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 void mapDatasetToDomainAxis(int index, int axisIndex) { List axisIndices = new java.util.ArrayList(1); axisIndices.add(new Integer(axisIndex)); mapDatasetToDomainAxes(index, axisIndices); }
void function(int index, int axisIndex) { List axisIndices = new java.util.ArrayList(1); axisIndices.add(new Integer(axisIndex)); mapDatasetToDomainAxes(index, axisIndices); }
/** * Maps a dataset to a particular domain axis. All data will be plotted * against axis zero by default, no mapping is required for this case. * * @param index the dataset index (zero-based). * @param axisIndex the axis index. * * @see #mapDatasetToRangeAxis(int, int) */
Maps a dataset to a particular domain axis. All data will be plotted against axis zero by default, no mapping is required for this case
mapDatasetToDomainAxis
{ "repo_name": "GitoMat/jfreechart", "path": "src/main/java/org/jfree/chart/plot/XYPlot.java", "license": "lgpl-2.1", "size": 197216 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,415,359
static private File prepareUnfinalizedTestEditLog(File testDir, int numTx, SortedMap<Long, Long> offsetToTxId) throws IOException { File inProgressFile = new File(testDir, NNStorage.getInProgressEditsFileName(1)); FSEditLog fsel = null, spyLog = null; try { fsel = FSImageTestUtil.createStandal...
static File function(File testDir, int numTx, SortedMap<Long, Long> offsetToTxId) throws IOException { File inProgressFile = new File(testDir, NNStorage.getInProgressEditsFileName(1)); FSEditLog fsel = null, spyLog = null; try { fsel = FSImageTestUtil.createStandaloneEditLog(testDir); spyLog = spy(fsel); doNothing().wh...
/** * Create an unfinalized edit log for testing purposes * * @param testDir Directory to create the edit log in * @param numTx Number of transactions to add to the new edit log * @param offsetToTxId A map from transaction IDs to offsets in the * ed...
Create an unfinalized edit log for testing purposes
prepareUnfinalizedTestEditLog
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSEditLogLoader.java", "license": "gpl-3.0", "size": 25616 }
[ "java.io.File", "java.io.IOException", "java.util.SortedMap", "org.junit.Assert", "org.mockito.Mockito" ]
import java.io.File; import java.io.IOException; import java.util.SortedMap; import org.junit.Assert; import org.mockito.Mockito;
import java.io.*; import java.util.*; import org.junit.*; import org.mockito.*;
[ "java.io", "java.util", "org.junit", "org.mockito" ]
java.io; java.util; org.junit; org.mockito;
559,046
@Override public void setAnnotateFirstOccurrenceOnly( boolean firstOccurrenceOnly) { this.firstOccurrenceOnly = firstOccurrenceOnly; if (firstOccurrenceOnly) { if (annotatedWords==null) { annotatedWords = new HashSet<String>( 101); } } else { an...
void function( boolean firstOccurrenceOnly) { this.firstOccurrenceOnly = firstOccurrenceOnly; if (firstOccurrenceOnly) { if (annotatedWords==null) { annotatedWords = new HashSet<String>( 101); } } else { annotatedWords = null; } }
/** * Set if only the first occurrence of a word should be annotated. If this is set to * <CODE>true</CODE>, an annotated word will be cached and further occurrences will be ignored. * The cache of annotated words will be cleared when {@link #reset() reset} is called. */
Set if only the first occurrence of a word should be annotated. If this is set to <code>true</code>, an annotated word will be cached and further occurrences will be ignored. The cache of annotated words will be cleared when <code>#reset() reset</code> is called
setAnnotateFirstOccurrenceOnly
{ "repo_name": "tensberg/jgloss-mirror", "path": "jgloss-core/src/main/java/jgloss/parser/AbstractParser.java", "license": "gpl-2.0", "size": 4723 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
2,334,007
@Deprecated public static HttpServletRequest getRequest(Request request) { return ServletUtils.getRequest(request); } private volatile HttpServletRequest request; private volatile Series<Parameter> requestHeaders; private volatile HttpServletResponse response; ...
static HttpServletRequest function(Request request) { return ServletUtils.getRequest(request); } private volatile HttpServletRequest request; private volatile Series<Parameter> requestHeaders; private volatile HttpServletResponse response; public ServletCall(Server server, HttpServletRequest request, HttpServletRespons...
/** * Returns the Servlet request that was used to generate the given Restlet * request. * * @param request * The Restlet request. * @return The Servlet request or null. * @deprecated Use {@link ServletUtils#getRequest(Request)} instead. */
Returns the Servlet request that was used to generate the given Restlet request
getRequest
{ "repo_name": "OpenNTF/WorkflowForXPages", "path": "source/com.ibm.activiti/src/org/restlet/ext/servlet/internal/ServletCall.java", "license": "apache-2.0", "size": 13675 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.restlet.Request", "org.restlet.Server", "org.restlet.data.Parameter", "org.restlet.ext.servlet.ServletUtils", "org.restlet.util.Series" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.restlet.Request; import org.restlet.Server; import org.restlet.data.Parameter; import org.restlet.ext.servlet.ServletUtils; import org.restlet.util.Series;
import javax.servlet.http.*; import org.restlet.*; import org.restlet.data.*; import org.restlet.ext.servlet.*; import org.restlet.util.*;
[ "javax.servlet", "org.restlet", "org.restlet.data", "org.restlet.ext", "org.restlet.util" ]
javax.servlet; org.restlet; org.restlet.data; org.restlet.ext; org.restlet.util;
1,291,647
Observable<ServiceResponse<Siamese>> getValidWithServiceResponseAsync();
Observable<ServiceResponse<Siamese>> getValidWithServiceResponseAsync();
/** * Get complex types that extend others. * * @return the observable to the Siamese object */
Get complex types that extend others
getValidWithServiceResponseAsync
{ "repo_name": "anudeepsharma/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodycomplex/Inheritances.java", "license": "mit", "size": 3318 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
748,540
@Override public Adapter adapt(Notifier notifier, Object type) { return super.adapt(notifier, this); }
Adapter function(Notifier notifier, Object type) { return super.adapt(notifier, this); }
/** * This implementation substitutes the factory itself as the key for the adapter. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This implementation substitutes the factory itself as the key for the adapter.
adapt
{ "repo_name": "awortmann/xmontiarc", "path": "ur1.diverse.cd.model.edit/src/cd/provider/CdItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 8272 }
[ "org.eclipse.emf.common.notify.Adapter", "org.eclipse.emf.common.notify.Notifier" ]
import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,563,294
public TransactionHandle beginTransaction() throws StorageException;
TransactionHandle function() throws StorageException;
/** * Returns a transaction handle for a new index transaction. * * @return New Transaction Handle */
Returns a transaction handle for a new index transaction
beginTransaction
{ "repo_name": "infochimps-forks/titan", "path": "titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/indexing/IndexProvider.java", "license": "apache-2.0", "size": 3452 }
[ "com.thinkaurelius.titan.diskstorage.StorageException", "com.thinkaurelius.titan.diskstorage.TransactionHandle" ]
import com.thinkaurelius.titan.diskstorage.StorageException; import com.thinkaurelius.titan.diskstorage.TransactionHandle;
import com.thinkaurelius.titan.diskstorage.*;
[ "com.thinkaurelius.titan" ]
com.thinkaurelius.titan;
2,016,560
public T caseMCommonReferenceableObj(MCommonReferenceableObj object) { return null; }
T function(MCommonReferenceableObj object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>MCommonReferenceableObj</em>'. * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>MCommonReferenceableObj</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObje...
Returns the result of interpreting the object as an instance of 'MCommonReferenceableObj'
caseMCommonReferenceableObj
{ "repo_name": "parraman/micobs", "path": "common/es.uah.aut.srg.micobs.pdl/src/es/uah/aut/srg/micobs/pdl/util/pdlSwitch.java", "license": "epl-1.0", "size": 33881 }
[ "es.uah.aut.srg.micobs.common.MCommonReferenceableObj" ]
import es.uah.aut.srg.micobs.common.MCommonReferenceableObj;
import es.uah.aut.srg.micobs.common.*;
[ "es.uah.aut" ]
es.uah.aut;
1,594,793
@Override public void processPacket(final Packet packet, final Queue<Packet> results) { if (packet.isXMLNS("/iq/query", INFO_XMLNS) || packet.isXMLNS("/iq/query", ITEMS_XMLNS)) { JID jid = packet.getStanzaTo(); JID from = packet.getStanzaFrom(); String node = packet.getAttribute("/iq/query", "node"); ...
void function(final Packet packet, final Queue<Packet> results) { if (packet.isXMLNS(STR, INFO_XMLNS) packet.isXMLNS(STR, ITEMS_XMLNS)) { JID jid = packet.getStanzaTo(); JID from = packet.getStanzaFrom(); String node = packet.getAttribute(STR, "node"); Element query = packet.getElement().getChild("query").clone(); if (...
/** * Method description * * * @param packet * @param results */
Method description
processPacket
{ "repo_name": "Smartupz/tigase-server", "path": "src/main/java/tigase/disco/XMPPServiceCollector.java", "license": "agpl-3.0", "size": 4247 }
[ "java.util.List", "java.util.Queue" ]
import java.util.List; import java.util.Queue;
import java.util.*;
[ "java.util" ]
java.util;
1,634,676
public VisitType getRadiologyVisitType() { return getVisitTypeByGlobalProperty(RadiologyConstants.GP_RADIOLOGY_VISIT_TYPE); }
VisitType function() { return getVisitTypeByGlobalProperty(RadiologyConstants.GP_RADIOLOGY_VISIT_TYPE); }
/** * Get VisitType for RadiologyOrder's * * @return visitType for radiology orders * @should return visit type for radiology orders * @should throw illegal state exception for non existing radiology visit type */
Get VisitType for RadiologyOrder's
getRadiologyVisitType
{ "repo_name": "oliverkrakora/openmrs-module-radiologydcm4chee", "path": "api/src/main/java/org/openmrs/module/radiology/RadiologyProperties.java", "license": "mpl-2.0", "size": 11687 }
[ "org.openmrs.VisitType" ]
import org.openmrs.VisitType;
import org.openmrs.*;
[ "org.openmrs" ]
org.openmrs;
727,006
void read(FlowFile source, InputStreamCallback reader) throws FlowFileAccessException; /** * Provides an InputStream that can be used to read the contents of the given FlowFile. * This method differs from those that make use of callbacks in that this method returns * an InputStream and expects t...
void read(FlowFile source, InputStreamCallback reader) throws FlowFileAccessException; /** * Provides an InputStream that can be used to read the contents of the given FlowFile. * This method differs from those that make use of callbacks in that this method returns * an InputStream and expects the caller to properly ha...
/** * Executes the given callback against the contents corresponding to the * given FlowFile. * * @param source flowfile to retrieve content of * @param reader that will be called to read the flowfile content * @throws IllegalStateException if detected that this method is being * ...
Executes the given callback against the contents corresponding to the given FlowFile
read
{ "repo_name": "speddy93/nifi", "path": "nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java", "license": "apache-2.0", "size": 41349 }
[ "java.io.InputStream", "org.apache.nifi.flowfile.FlowFile", "org.apache.nifi.processor.exception.FlowFileAccessException", "org.apache.nifi.processor.io.InputStreamCallback" ]
import java.io.InputStream; import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.processor.exception.FlowFileAccessException; import org.apache.nifi.processor.io.InputStreamCallback;
import java.io.*; import org.apache.nifi.flowfile.*; import org.apache.nifi.processor.exception.*; import org.apache.nifi.processor.io.*;
[ "java.io", "org.apache.nifi" ]
java.io; org.apache.nifi;
2,315,005
public boolean containsAll(Collection<?> collection) { return MapCollections.containsAllHelper(this, collection); }
boolean function(Collection<?> collection) { return MapCollections.containsAllHelper(this, collection); }
/** * Determine if the array map contains all of the keys in the given collection. * @param collection The collection whose contents are to be checked against. * @return Returns true if this array map contains a key for every entry * in <var>collection</var>, else returns false. */
Determine if the array map contains all of the keys in the given collection
containsAll
{ "repo_name": "ycdev-aosp/sdk-support", "path": "v4/src/java/android/support/v4/util/ArrayMap.java", "license": "apache-2.0", "size": 7714 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
111,666
public Deserializer getObjectDeserializer(String type) throws HessianProtocolException { Deserializer deserializer = getDeserializer(type); if (deserializer != null) return deserializer; else if (_hashMapDeserializer != null) return _hashMapDeserializer; else ...
Deserializer function(String type) throws HessianProtocolException { Deserializer deserializer = getDeserializer(type); if (deserializer != null) return deserializer; else if (_hashMapDeserializer != null) return _hashMapDeserializer; else { _hashMapDeserializer = new MapDeserializer(HashMap.class); return _hashMapDese...
/** * Reads the object as a map. */
Reads the object as a map
getObjectDeserializer
{ "repo_name": "sdgdsffdsfff/rsf", "path": "rsf-core/src/main/java/net/hasor/libs/com/caucho/hessian/io/SerializerFactory.java", "license": "apache-2.0", "size": 24804 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,750,861
public ServiceCall<List<CertificateItem>> listCertificatesAsync(final String vaultBaseUrl, final Integer maxresults, final ListOperationCallback<CertificateItem> serviceCallback) { return innerKeyVaultClient.getCertificatesAsync(vaultBaseUrl, maxresults, serviceCallback); }
ServiceCall<List<CertificateItem>> function(final String vaultBaseUrl, final Integer maxresults, final ListOperationCallback<CertificateItem> serviceCallback) { return innerKeyVaultClient.getCertificatesAsync(vaultBaseUrl, maxresults, serviceCallback); }
/** * List certificates in the specified vault. * * @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results. * @param serviceCallback the async ServiceCa...
List certificates in the specified vault
listCertificatesAsync
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClient.java", "license": "mit", "size": 85271 }
[ "com.microsoft.azure.ListOperationCallback", "com.microsoft.azure.keyvault.models.CertificateItem", "com.microsoft.rest.ServiceCall", "java.util.List" ]
import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.keyvault.models.CertificateItem; import com.microsoft.rest.ServiceCall; import java.util.List;
import com.microsoft.azure.*; import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.microsoft.azure; com.microsoft.rest; java.util;
1,164,497
private void decode(byte[] data, int width, int height) { long start = System.currentTimeMillis(); Result rawResult = null; PlanarYUVLuminanceSource source = CameraManager.get().buildLuminanceSource(data, width, height); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); try { ...
void function(byte[] data, int width, int height) { long start = System.currentTimeMillis(); Result rawResult = null; PlanarYUVLuminanceSource source = CameraManager.get().buildLuminanceSource(data, width, height); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source)); try { rawResult = multiFormatReader....
/** * Decode the data within the viewfinder rectangle, and time how long it took. For efficiency, * reuse the same reader objects from one decode to the next. * * @param data The YUV preview frame. * @param width The width of the preview frame. * @param height The height of the preview frame. */
Decode the data within the viewfinder rectangle, and time how long it took. For efficiency, reuse the same reader objects from one decode to the next
decode
{ "repo_name": "saqimtiaz/BibSearch", "path": "com.google.zxing.client.android.CaptureActivity/src/com/google/zxing/client/android/DecodeHandler.java", "license": "mit", "size": 3316 }
[ "android.os.Bundle", "android.os.Message", "android.util.Log", "com.google.zxing.BinaryBitmap", "com.google.zxing.ReaderException", "com.google.zxing.Result", "com.google.zxing.client.android.camera.CameraManager", "com.google.zxing.common.HybridBinarizer" ]
import android.os.Bundle; import android.os.Message; import android.util.Log; import com.google.zxing.BinaryBitmap; import com.google.zxing.ReaderException; import com.google.zxing.Result; import com.google.zxing.client.android.camera.CameraManager; import com.google.zxing.common.HybridBinarizer;
import android.os.*; import android.util.*; import com.google.zxing.*; import com.google.zxing.client.android.camera.*; import com.google.zxing.common.*;
[ "android.os", "android.util", "com.google.zxing" ]
android.os; android.util; com.google.zxing;
1,846,472
public ICache<String,Properties> getMessageCache();
ICache<String,Properties> function();
/** * <p> * Returns the cache used for externalized/internationalized messages. * </p> * <p> * This cache uses as keys the template names (as specified at * {@link org.thymeleaf.TemplateEngine#process(String, org.thymeleaf.context.IContext)}) * along with the locale the messag...
Returns the cache used for externalized/internationalized messages. This cache uses as keys the template names (as specified at <code>org.thymeleaf.TemplateEngine#process(String, org.thymeleaf.context.IContext)</code>) along with the locale the messages refer to (like "main_gl_ES"), and as values the Properties object ...
getMessageCache
{ "repo_name": "kigsmtua/thymeleaf", "path": "src/main/java/org/thymeleaf/cache/ICacheManager.java", "license": "apache-2.0", "size": 7260 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,405,072
static JDBCColumnDescriptorProvider fromParameterMetaData(ParameterMetaData metaData) { return col -> JDBCColumnDescriptor.create(() -> null, JDBCPropertyAccessor.jdbcType(() -> metaData.getParameterType(col)), JDBCPropertyAccessor.create(() -> metaData.getParameterTypeName(col)), JDBCPropertyAc...
static JDBCColumnDescriptorProvider fromParameterMetaData(ParameterMetaData metaData) { return col -> JDBCColumnDescriptor.create(() -> null, JDBCPropertyAccessor.jdbcType(() -> metaData.getParameterType(col)), JDBCPropertyAccessor.create(() -> metaData.getParameterTypeName(col)), JDBCPropertyAccessor.create(() -> meta...
/** * Create provider by the parameter metadata * * @param metaData the parameter metadata * @return a new {@code JDBCTypeProvider} instance * @see java.sql.ResultSetMetaData */
Create provider by the parameter metadata
fromParameterMetaData
{ "repo_name": "vert-x3/vertx-jdbc-client", "path": "src/main/java/io/vertx/ext/jdbc/spi/JDBCColumnDescriptorProvider.java", "license": "apache-2.0", "size": 3837 }
[ "io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor", "io.vertx.jdbcclient.impl.actions.JDBCPropertyAccessor", "java.sql.ParameterMetaData" ]
import io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor; import io.vertx.jdbcclient.impl.actions.JDBCPropertyAccessor; import java.sql.ParameterMetaData;
import io.vertx.jdbcclient.impl.actions.*; import java.sql.*;
[ "io.vertx.jdbcclient", "java.sql" ]
io.vertx.jdbcclient; java.sql;
2,679,958
@Deprecated public void send(DatagramPacket packet, byte ttl) throws IOException { checkOpen(); InetAddress packAddr = packet.getAddress(); int currTTL = getTimeToLive(); if (packAddr.isMulticastAddress() && (byte) currTTL != ttl) { try { setTimeToLive...
void function(DatagramPacket packet, byte ttl) throws IOException { checkOpen(); InetAddress packAddr = packet.getAddress(); int currTTL = getTimeToLive(); if (packAddr.isMulticastAddress() && (byte) currTTL != ttl) { try { setTimeToLive(ttl & 0xff); impl.send(packet); } finally { setTimeToLive(currTTL); } } else { imp...
/** * Sends the given {@code packet} on this socket, using the given {@code ttl}. This method is * deprecated because it modifies the TTL socket option for this socket twice on each call. * * @throws IOException if an error occurs. * @deprecated use {@link #setTimeToLive}. */
Sends the given packet on this socket, using the given ttl. This method is deprecated because it modifies the TTL socket option for this socket twice on each call
send
{ "repo_name": "xdajog/samsung_sources_i927", "path": "libcore/luni/src/main/java/java/net/MulticastSocket.java", "license": "gpl-2.0", "size": 13122 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
955,256
@Test public void testEmptyConfigs() { final WebResource rs = resource(); final String response = rs.path("network/configuration").get(String.class); assertThat(response, containsString("\"devices\":{}")); assertThat(response, containsString("\"links\":{}")); }
void function() { final WebResource rs = resource(); final String response = rs.path(STR).get(String.class); assertThat(response, containsString("\"devices\":{}")); assertThat(response, containsString("\"links\":{}")); }
/** * Tests the result of the rest api GET when there are no configs. */
Tests the result of the rest api GET when there are no configs
testEmptyConfigs
{ "repo_name": "planoAccess/clonedONOS", "path": "web/api/src/test/java/org/onosproject/rest/resources/NetworkConfigWebResourceTest.java", "license": "apache-2.0", "size": 11422 }
[ "com.sun.jersey.api.client.WebResource", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import com.sun.jersey.api.client.WebResource; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import com.sun.jersey.api.client.*; import org.hamcrest.*;
[ "com.sun.jersey", "org.hamcrest" ]
com.sun.jersey; org.hamcrest;
2,086,327
@PreAuthorize ("hasAnyRole('ROLE_USER_MANAGER','ROLE_DATA_MANAGER','ROLE_SYSTEM_MANAGER')") @Transactional (readOnly=true, propagation=Propagation.REQUIRED) @Cacheable (value = "user", key = "#id") public User getUser (String id) throws RootNotModifiableException { User u = userDao.read (id); ...
@PreAuthorize (STR) @Transactional (readOnly=true, propagation=Propagation.REQUIRED) @Cacheable (value = "user", key = "#id") User function (String id) throws RootNotModifiableException { User u = userDao.read (id); checkRoot (u); return u; }
/** * Return user corresponding to given id. * * @param id User id. * @throws RootNotModifiableException */
Return user corresponding to given id
getUser
{ "repo_name": "SentinelDataHub/DataHubSystem", "path": "core/src/main/java/fr/gael/dhus/service/UserService.java", "license": "agpl-3.0", "size": 35460 }
[ "fr.gael.dhus.database.object.User", "fr.gael.dhus.service.exception.RootNotModifiableException", "org.springframework.cache.annotation.Cacheable", "org.springframework.security.access.prepost.PreAuthorize", "org.springframework.transaction.annotation.Propagation", "org.springframework.transaction.annotat...
import fr.gael.dhus.database.object.User; import fr.gael.dhus.service.exception.RootNotModifiableException; import org.springframework.cache.annotation.Cacheable; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Propagation; import org.springframework.tr...
import fr.gael.dhus.database.object.*; import fr.gael.dhus.service.exception.*; import org.springframework.cache.annotation.*; import org.springframework.security.access.prepost.*; import org.springframework.transaction.annotation.*;
[ "fr.gael.dhus", "org.springframework.cache", "org.springframework.security", "org.springframework.transaction" ]
fr.gael.dhus; org.springframework.cache; org.springframework.security; org.springframework.transaction;
2,909,807
private void setReaderKey(String readerKey) { this.readerKey = readerKey == null || readerKey.trim().isEmpty() ? StringConstants.BLANK : readerKey; }
void function(String readerKey) { this.readerKey = readerKey == null readerKey.trim().isEmpty() ? StringConstants.BLANK : readerKey; }
/** * Set reader file suffix handling null and empty argument values * * @param readerKey * to set ; if empty or null {@link #readerKey} is set to * {@link StringConstants#BLANK}. */
Set reader file suffix handling null and empty argument values
setReaderKey
{ "repo_name": "UCDenver-ccp/datasource", "path": "datasource-rdfizer/src/main/java/edu/ucdenver/ccp/datasource/rdfizer/rdf/ice/RdfRecordWriter.java", "license": "bsd-3-clause", "size": 35316 }
[ "edu.ucdenver.ccp.common.string.StringConstants" ]
import edu.ucdenver.ccp.common.string.StringConstants;
import edu.ucdenver.ccp.common.string.*;
[ "edu.ucdenver.ccp" ]
edu.ucdenver.ccp;
1,913,245
@JsonProperty("private") public void setPrivate(Boolean _private) { this._private = _private; }
@JsonProperty(STR) void function(Boolean _private) { this._private = _private; }
/** * Whether this exchange is private (has apiKey) or public (no apiKey) * (Required) * */
Whether this exchange is private (has apiKey) or public (no apiKey) (Required)
setPrivate
{ "repo_name": "apiman/apiman-studio", "path": "back-end/hub-codegen/src/test/resources/OpenApi2JaxRsTest/_expected-nzdax/generated-api/src/main/java/org/example/api/beans/ExchangeResponse.java", "license": "apache-2.0", "size": 7548 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
2,673,751
public void removeAllbiboCourt() { Base.removeAll(this.model, this.getResource(), COURT); }
void function() { Base.removeAll(this.model, this.getResource(), COURT); }
/** * Removes all values of property Court * * [Generated from RDFReactor template rule #removeall1dynamic] */
Removes all values of property Court [Generated from RDFReactor template rule #removeall1dynamic]
removeAllbiboCourt
{ "repo_name": "oeg-upm/biotea", "path": "src/ws/biotea/ld2rdf/rdf/model/bibo/LegalDocument.java", "license": "apache-2.0", "size": 31487 }
[ "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdfreactor" ]
org.ontoware.rdfreactor;
2,812,186
public static String decryptString(CipherTextIvMac civ, SecretKeys secretKeys) throws UnsupportedEncodingException, GeneralSecurityException { return decryptString(civ, secretKeys, "UTF-8"); }
static String function(CipherTextIvMac civ, SecretKeys secretKeys) throws UnsupportedEncodingException, GeneralSecurityException { return decryptString(civ, secretKeys, "UTF-8"); }
/** * AES CBC decrypt. * * @param civ The cipher text, IV, and mac * @param secretKeys The AES & HMAC keys * @return A string derived from the decrypted bytes, which are interpreted * as a UTF-8 String * @throws java.security.GeneralSecurityException if AES is not implemented on this system ...
AES CBC decrypt
decryptString
{ "repo_name": "andyao/hawk", "path": "hawk/src/main/java/com/orhanobut/hawk/AesCbcWithIntegrity.java", "license": "apache-2.0", "size": 33429 }
[ "java.io.UnsupportedEncodingException", "java.security.GeneralSecurityException" ]
import java.io.UnsupportedEncodingException; import java.security.GeneralSecurityException;
import java.io.*; import java.security.*;
[ "java.io", "java.security" ]
java.io; java.security;
1,584,291
public List<Product> getProducts() { return products; }
List<Product> function() { return products; }
/** * Return the list of products * * @return Product's list */
Return the list of products
getProducts
{ "repo_name": "JMedinilla/deint_ManageProducts", "path": "MngPrd_4/app/src/main/java/com/jmedinilla/manageproducts/application/Repository.java", "license": "apache-2.0", "size": 1813 }
[ "com.jmedinilla.manageproducts.model.Product", "java.util.List" ]
import com.jmedinilla.manageproducts.model.Product; import java.util.List;
import com.jmedinilla.manageproducts.model.*; import java.util.*;
[ "com.jmedinilla.manageproducts", "java.util" ]
com.jmedinilla.manageproducts; java.util;
1,441,366
protected void initProviderChain() { providerChain = new ArrayList<ValueProvider>(); providerChain.add(new DefaultValueProvider()); } /** * Adds a {@link ResourceValueProvider} to the {@link #providerChain}. * * @param context the {@link Context}
void function() { providerChain = new ArrayList<ValueProvider>(); providerChain.add(new DefaultValueProvider()); } /** * Adds a {@link ResourceValueProvider} to the {@link #providerChain}. * * @param context the {@link Context}
/** * Adds items to the {@link #providerChain}. */
Adds items to the <code>#providerChain</code>
initProviderChain
{ "repo_name": "tarent/invio", "path": "invio-localization/android/base/src/main/java/de/tarent/nic/android/base/config/Config.java", "license": "gpl-2.0", "size": 2993 }
[ "android.content.Context", "java.util.ArrayList" ]
import android.content.Context; import java.util.ArrayList;
import android.content.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
2,568,135
private int sendRequest(State state, HttpURLConnection request) throws StopRequest { try { return request.getResponseCode(); } catch (IllegalArgumentException ex) { throw new StopRequest(DownloaderService.STATUS_HTTP_DATA_ERROR, "while trying t...
int function(State state, HttpURLConnection request) throws StopRequest { try { return request.getResponseCode(); } catch (IllegalArgumentException ex) { throw new StopRequest(DownloaderService.STATUS_HTTP_DATA_ERROR, STR + ex.toString(), ex); } catch (IOException ex) { logNetworkState(); throw new StopRequest(getFinal...
/** * Send the request to the server, handling any I/O exceptions. */
Send the request to the server, handling any I/O exceptions
sendRequest
{ "repo_name": "Over17/UnityOBBDownloader", "path": "src/unityOBBDownloader/src/main/java/com/google/android/vending/expansion/downloader/impl/DownloadThread.java", "license": "apache-2.0", "size": 34278 }
[ "java.io.IOException", "java.net.HttpURLConnection" ]
import java.io.IOException; import java.net.HttpURLConnection;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
226,622
public void setString(String name, String value) throws SQLException { int[] indexes = getIndexes(name); for (int i = 0; i < indexes.length; i++) { statement.setString(indexes[i], value); } }
void function(String name, String value) throws SQLException { int[] indexes = getIndexes(name); for (int i = 0; i < indexes.length; i++) { statement.setString(indexes[i], value); } }
/** * Sets a parameter. * * @param name * parameter name * @param value * parameter value * @throws SQLException * if an error occurred * @throws IllegalArgumentException * if the parameter does not exist * @see PreparedStatement#setString(...
Sets a parameter
setString
{ "repo_name": "llarreta/larretasources", "path": "Commons/src/main/java/ar/com/larreta/commons/persistence/NamedParameterStatement.java", "license": "apache-2.0", "size": 9641 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
609,110
public Map<String, NXgeometry> getAllGeometry();
Map<String, NXgeometry> function();
/** * Get all NXgeometry nodes: * <ul> * <li> * Position and orientation of detector</li> * </ul> * * @return a map from node names to the NXgeometry for that node. */
Get all NXgeometry nodes: Position and orientation of detector
getAllGeometry
{ "repo_name": "jonahkichwacoders/dawnsci", "path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXdetector.java", "license": "epl-1.0", "size": 22284 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,164,993
public void run() throws Exception { logger.log(Level.INFO, "======================================"); // 1 String name = "someMethod"; InvocationConstraint ic = Delegation.YES; InvocationConstraints constraints = new InvocationConstraints( ic, null);...
void function() throws Exception { logger.log(Level.INFO, STR); String name = STR; InvocationConstraint ic = Delegation.YES; InvocationConstraints constraints = new InvocationConstraints( ic, null); StringMethodDesc methodDesc1 = new StringMethodDesc(name, constraints); StringMethodDesc methodDesc2 = new StringMethodDe...
/** * This method performs all actions mentioned in class description. */
This method performs all actions mentioned in class description
run
{ "repo_name": "pfirmstone/JGDMS", "path": "qa/src/org/apache/river/test/spec/constraint/stringmethodconstraints/HashCode_Test.java", "license": "apache-2.0", "size": 5464 }
[ "java.util.logging.Level", "net.jini.constraint.StringMethodConstraints", "net.jini.core.constraint.Delegation", "net.jini.core.constraint.InvocationConstraint", "net.jini.core.constraint.InvocationConstraints", "org.apache.river.qa.harness.TestException" ]
import java.util.logging.Level; import net.jini.constraint.StringMethodConstraints; import net.jini.core.constraint.Delegation; import net.jini.core.constraint.InvocationConstraint; import net.jini.core.constraint.InvocationConstraints; import org.apache.river.qa.harness.TestException;
import java.util.logging.*; import net.jini.constraint.*; import net.jini.core.constraint.*; import org.apache.river.qa.harness.*;
[ "java.util", "net.jini.constraint", "net.jini.core", "org.apache.river" ]
java.util; net.jini.constraint; net.jini.core; org.apache.river;
144,721
public static @Nullable URL buildGetImageUrl(Context context, String size, String path) { Uri uri = buildGetImageUri(context, sizePath(size), path); return NetworkUtils.convertUriToUrl(uri); }
static @Nullable URL function(Context context, String size, String path) { Uri uri = buildGetImageUri(context, sizePath(size), path); return NetworkUtils.convertUriToUrl(uri); }
/** * Build a movie get image URL for the TMDb server. * @param context Context to use * @param size Image size to request * @param path Path to image size to request * @return The URL to use to query the server, or <code>null</code> if not able build */
Build a movie get image URL for the TMDb server
buildGetImageUrl
{ "repo_name": "ibuttimer/moviequest", "path": "app/src/main/java/ie/ianbuttimer/moviequest/utils/TMDbNetworkUtils.java", "license": "gpl-3.0", "size": 18958 }
[ "android.content.Context", "android.net.Uri", "android.support.annotation.Nullable" ]
import android.content.Context; import android.net.Uri; import android.support.annotation.Nullable;
import android.content.*; import android.net.*; import android.support.annotation.*;
[ "android.content", "android.net", "android.support" ]
android.content; android.net; android.support;
1,442,832
TransitionValues getMatchedTransitionValues(View view, boolean viewInStart) { if (mParent != null) { return mParent.getMatchedTransitionValues(view, viewInStart); } ArrayList<TransitionValues> lookIn = viewInStart ? mStartValuesList : mEndValuesList; if (lookIn == null) {...
TransitionValues getMatchedTransitionValues(View view, boolean viewInStart) { if (mParent != null) { return mParent.getMatchedTransitionValues(view, viewInStart); } ArrayList<TransitionValues> lookIn = viewInStart ? mStartValuesList : mEndValuesList; if (lookIn == null) { return null; } int count = lookIn.size(); int i...
/** * Find the matched start or end value for a given View. This is only valid * after playTransition starts. For example, it will be valid in * {@link #createAnimator(ViewGroup, TransitionValues, TransitionValues)}, but not * in {@link #captureStartValues(TransitionValues)}. * * @param vi...
Find the matched start or end value for a given View. This is only valid after playTransition starts. For example, it will be valid in <code>#createAnimator(ViewGroup, TransitionValues, TransitionValues)</code>, but not in <code>#captureStartValues(TransitionValues)</code>
getMatchedTransitionValues
{ "repo_name": "oeager/BaisinceManager", "path": "transitioncompat/src/main/java/com/bison/transition/Transition.java", "license": "apache-2.0", "size": 102943 }
[ "android.view.View", "java.util.ArrayList" ]
import android.view.View; import java.util.ArrayList;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
351,713
public PublicKey generatePublic(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof McEliecePublicKeySpec) { return new McEliecePublicKey((McEliecePublicKeySpec) keySpec); } else if (keySpec instanceof X509EncodedKeySpec) { // get the DER-encoded Key according to X.509 from the...
PublicKey function(KeySpec keySpec) throws InvalidKeySpecException { if (keySpec instanceof McEliecePublicKeySpec) { return new McEliecePublicKey((McEliecePublicKeySpec) keySpec); } else if (keySpec instanceof X509EncodedKeySpec) { byte[] encKey = ((X509EncodedKeySpec) keySpec).getEncoded(); SubjectPublicKeyInfo spki =...
/** * Converts, if possible, a key specification into a * {@link McEliecePublicKey}. Currently, the following key specifications * are supported: {@link McEliecePublicKeySpec}, {@link X509EncodedKeySpec}. * * @param keySpec * the key specification * @return the McEliec...
Converts, if possible, a key specification into a <code>McEliecePublicKey</code>. Currently, the following key specifications are supported: <code>McEliecePublicKeySpec</code>, <code>X509EncodedKeySpec</code>
generatePublic
{ "repo_name": "besom/bbossgroups-mvn", "path": "bboss_security/src/main/java/de/flexiprovider/pqc/ecc/mceliece/McElieceKeyFactory.java", "license": "apache-2.0", "size": 8475 }
[ "de.flexiprovider.api.exceptions.InvalidKeySpecException", "de.flexiprovider.api.keys.KeySpec", "de.flexiprovider.api.keys.PublicKey", "de.flexiprovider.common.util.ASN1Tools", "de.flexiprovider.pki.X509EncodedKeySpec" ]
import de.flexiprovider.api.exceptions.InvalidKeySpecException; import de.flexiprovider.api.keys.KeySpec; import de.flexiprovider.api.keys.PublicKey; import de.flexiprovider.common.util.ASN1Tools; import de.flexiprovider.pki.X509EncodedKeySpec;
import de.flexiprovider.api.exceptions.*; import de.flexiprovider.api.keys.*; import de.flexiprovider.common.util.*; import de.flexiprovider.pki.*;
[ "de.flexiprovider.api", "de.flexiprovider.common", "de.flexiprovider.pki" ]
de.flexiprovider.api; de.flexiprovider.common; de.flexiprovider.pki;
917,887
private static boolean checkAlreadyCompactedBasedOnSourceDirName (FileSystem fs, Dataset dataset) { try { Set<Path> renamedDirs = getDeepestLevelRenamedDirsWithFileExistence(fs, dataset.inputPaths()); return !renamedDirs.isEmpty(); } catch (IOException e) { LOG.error("Failed to get deepest d...
static boolean function (FileSystem fs, Dataset dataset) { try { Set<Path> renamedDirs = getDeepestLevelRenamedDirsWithFileExistence(fs, dataset.inputPaths()); return !renamedDirs.isEmpty(); } catch (IOException e) { LOG.error(STR, e); return false; } }
/** When renaming source directory strategy is used, a compaction completion means source directories * {@link Dataset#inputPaths()} contains at least one directory which has been renamed to something with * {@link MRCompactor#COMPACTION_RENAME_SOURCE_DIR_SUFFIX}. */
When renaming source directory strategy is used, a compaction completion means source directories <code>Dataset#inputPaths()</code> contains at least one directory which has been renamed to something with <code>MRCompactor#COMPACTION_RENAME_SOURCE_DIR_SUFFIX</code>
checkAlreadyCompactedBasedOnSourceDirName
{ "repo_name": "aditya1105/gobblin", "path": "gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactor.java", "license": "apache-2.0", "size": 45911 }
[ "java.io.IOException", "java.util.Set", "org.apache.gobblin.compaction.dataset.Dataset", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import java.util.Set; import org.apache.gobblin.compaction.dataset.Dataset; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import java.util.*; import org.apache.gobblin.compaction.dataset.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.util", "org.apache.gobblin", "org.apache.hadoop" ]
java.io; java.util; org.apache.gobblin; org.apache.hadoop;
343,678
public ResourceSet estimateResourceConsumptionLocal() { // We use a local compile, so much of the time is spent waiting for IO, // but there is still significant CPU; hence we estimate 50% cpu usage. return ResourceSet.createWithRamCpuIo(200, 0.5, 0.0); }
ResourceSet function() { return ResourceSet.createWithRamCpuIo(200, 0.5, 0.0); }
/** * Estimate resource consumption when this action is executed locally. */
Estimate resource consumption when this action is executed locally
estimateResourceConsumptionLocal
{ "repo_name": "zhexuany/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java", "license": "apache-2.0", "size": 63167 }
[ "com.google.devtools.build.lib.actions.ResourceSet" ]
import com.google.devtools.build.lib.actions.ResourceSet;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
1,923,117
public Observable<ServiceResponse<Void>> postRequiredWithServiceResponseAsync(ParameterGroupingPostRequiredParameters parameterGroupingPostRequiredParameters) { if (parameterGroupingPostRequiredParameters == null) { throw new IllegalArgumentException("Parameter parameterGroupingPostRequiredParam...
Observable<ServiceResponse<Void>> function(ParameterGroupingPostRequiredParameters parameterGroupingPostRequiredParameters) { if (parameterGroupingPostRequiredParameters == null) { throw new IllegalArgumentException(STR); }
/** * Post a bunch of required parameters grouped. * * @param parameterGroupingPostRequiredParameters Additional parameters for the operation * @return the {@link ServiceResponse} object if successful. */
Post a bunch of required parameters grouped
postRequiredWithServiceResponseAsync
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/azureparametergrouping/implementation/ParameterGroupingsImpl.java", "license": "mit", "size": 27857 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,177,550
public static double getHighestSamplePercentage (MapWork work) { double highestSamplePercentage = 0; for (String alias : work.getAliasToWork().keySet()) { if (work.getNameToSplitSample().containsKey(alias)) { Double rate = work.getNameToSplitSample().get(alias).getPercent(); if (rate != ...
static double function (MapWork work) { double highestSamplePercentage = 0; for (String alias : work.getAliasToWork().keySet()) { if (work.getNameToSplitSample().containsKey(alias)) { Double rate = work.getNameToSplitSample().get(alias).getPercent(); if (rate != null && rate > highestSamplePercentage) { highestSamplePe...
/** * Returns the highest sample percentage of any alias in the given MapWork */
Returns the highest sample percentage of any alias in the given MapWork
getHighestSamplePercentage
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java", "license": "apache-2.0", "size": 136880 }
[ "org.apache.hadoop.hive.ql.plan.MapWork" ]
import org.apache.hadoop.hive.ql.plan.MapWork;
import org.apache.hadoop.hive.ql.plan.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
108,266
private static String[] composeList(MessageFormat format, String[] list) { if (list.length <= 3) return list; // Use the given format to compose the first two elements into one String[] listItems = { list[0], list[1] }; String newItem = format.format(listItems); // Form a n...
static String[] function(MessageFormat format, String[] list) { if (list.length <= 3) return list; String[] listItems = { list[0], list[1] }; String newItem = format.format(listItems); String[] newList = new String[list.length-1]; System.arraycopy(list, 2, newList, 1, newList.length-1); newList[0] = newItem; return com...
/** * Given a list of strings, return a list shortened to three elements. * Shorten it by applying the given format to the first two elements * recursively. * @param format a format which takes two arguments * @param list a list of strings * @return if the list is three elements or shorter...
Given a list of strings, return a list shortened to three elements. Shorten it by applying the given format to the first two elements recursively
composeList
{ "repo_name": "haikuowuya/android_system_code", "path": "src/java/util/Locale.java", "license": "apache-2.0", "size": 104933 }
[ "java.io.ObjectStreamField", "java.text.MessageFormat" ]
import java.io.ObjectStreamField; import java.text.MessageFormat;
import java.io.*; import java.text.*;
[ "java.io", "java.text" ]
java.io; java.text;
184,886
Observable<Page<USqlExternalDataSource>> listExternalDataSourcesNextAsync(final String nextPageLink);
Observable<Page<USqlExternalDataSource>> listExternalDataSourcesNextAsync(final String nextPageLink);
/** * Retrieves the list of external data sources from the Data Lake Analytics catalog. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the observable to the PagedList&lt;USqlExternalDataSource&gt; object */
Retrieves the list of external data sources from the Data Lake Analytics catalog
listExternalDataSourcesNextAsync
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Catalogs.java", "license": "mit", "size": 188313 }
[ "com.microsoft.azure.Page", "com.microsoft.azure.management.datalake.analytics.models.USqlExternalDataSource" ]
import com.microsoft.azure.Page; import com.microsoft.azure.management.datalake.analytics.models.USqlExternalDataSource;
import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
41,432
public void removeLogger(EELogger logger) { if (getLoggers().containsValue(logger)) { // Make sure that this logger was made by this factory if (getLogger(logger.getName()) == logger) { getLoggers().remove(logger.getName()); if (getFileManager().doesLo...
void function(EELogger logger) { if (getLoggers().containsValue(logger)) { if (getLogger(logger.getName()) == logger) { getLoggers().remove(logger.getName()); if (getFileManager().doesLoggerFileLog(logger)) { getFileManager().stopFileLog(logger); } } } }
/** * Remove a logger from the held logger list. * * @param logger What Logger to remove */
Remove a logger from the held logger list
removeLogger
{ "repo_name": "ElecEntertainment/EEUtils", "path": "src/main/java/net/larry1123/elec/util/factorys/EELoggerFactory.java", "license": "apache-2.0", "size": 8768 }
[ "net.larry1123.elec.util.logger.EELogger" ]
import net.larry1123.elec.util.logger.EELogger;
import net.larry1123.elec.util.logger.*;
[ "net.larry1123.elec" ]
net.larry1123.elec;
1,860,614
@Test public void initiateMessageTest12() throws PcepParseException { byte[] initiateDeletionMsg = new byte[]{0x20, 0x0C, 0x00, 0x3c, 0x21, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, //SRP object 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0...
void function() throws PcepParseException { byte[] initiateDeletionMsg = new byte[]{0x20, 0x0C, 0x00, 0x3c, 0x21, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, 0x20, 0x10, 0x00, 0x24, 0x00, 0x00, 0x10, 0x03, 0x00, 0x12, 0x00, 0x10, (byte) 0xb6, 0x02, 0...
/** * This test case checks for SRP, LSP (StatefulIPv4LspIdentidiersTlv, SymbolicPathNameTlv) * objects in PcInitiate message. */
This test case checks for SRP, LSP (StatefulIPv4LspIdentidiersTlv, SymbolicPathNameTlv) objects in PcInitiate message
initiateMessageTest12
{ "repo_name": "planoAccess/clonedONOS", "path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepInitiateMsgTest.java", "license": "apache-2.0", "size": 60254 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.hamcrest.core.Is", "org.jboss.netty.buffer.ChannelBuffer", "org.jboss.netty.buffer.ChannelBuffers", "org.onosproject.pcepio.exceptions.PcepParseException" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepParseException;
import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*;
[ "org.hamcrest", "org.hamcrest.core", "org.jboss.netty", "org.onosproject.pcepio" ]
org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio;
471,689
public List<Criteria> getOredCriteria() { return oredCriteria; }
List<Criteria> function() { return oredCriteria; }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table role * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table role
getOredCriteria
{ "repo_name": "heqing90/myschool", "path": "src/main/java/com/fangyuan/myschool/model/RoleExample.java", "license": "gpl-3.0", "size": 22205 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,445,080
List<ModelProperty> getPreviousProperties();
List<ModelProperty> getPreviousProperties();
/** * Returns a List with the old {@link FormModel} properties */
Returns a List with the old <code>FormModel</code> properties
getPreviousProperties
{ "repo_name": "jhrcek/kie-wb-common", "path": "kie-wb-common-forms/kie-wb-common-forms-editor/kie-wb-common-forms-editor-api/src/main/java/org/kie/workbench/common/forms/editor/model/FormModelSynchronizationResult.java", "license": "apache-2.0", "size": 2351 }
[ "java.util.List", "org.kie.workbench.common.forms.model.ModelProperty" ]
import java.util.List; import org.kie.workbench.common.forms.model.ModelProperty;
import java.util.*; import org.kie.workbench.common.forms.model.*;
[ "java.util", "org.kie.workbench" ]
java.util; org.kie.workbench;
1,841,261
public boolean userExists(Transaction trans, String table, String username) throws DatabaseException{ try { if(!validString(username)) { throw new SQLException("Trying to use invalid characters at username:'"+username+"'"); } String query = ""; Connection connection = ((JD...
boolean function(Transaction trans, String table, String username) throws DatabaseException{ try { if(!validString(username)) { throw new SQLException(STR+username+"'"); } String query = STRloginSTR'STR';STRcharactersSTR'STR';STRamount")!=0) { return true; } } return false; } catch(SQLException sqle){ throw new Databas...
/** * Checks to see if a requested username is already taken * * @param trans * The current Transaction * @param username * The requested username * @return * True if the username already exists, false if it doesn't * @throws DatabaseException */
Checks to see if a requested username is already taken
userExists
{ "repo_name": "ZabinX/DuskRPG", "path": "DuskFiles/Dusk3.0.1/src/in/groan/dusk/db/Accounts.java", "license": "gpl-2.0", "size": 31017 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,272,929
public void writeAttribute(String attributeName, String attributeValue) throws JspException { if (currentState().isBlockTag()) { throw new IllegalStateException("Cannot write attributes after opening tag is closed."); } this.writer.append(" ").append(attributeName).append("=\"") .append(attributeValue)....
void function(String attributeName, String attributeValue) throws JspException { if (currentState().isBlockTag()) { throw new IllegalStateException(STR); } this.writer.append(" ").append(attributeName).append("=\"STR\""); }
/** * Write an HTML attribute with the specified name and value. * <p>Be sure to write all attributes <strong>before</strong> writing * any inner text or nested tags. * @throws IllegalStateException if the opening tag is closed */
Write an HTML attribute with the specified name and value. Be sure to write all attributes before writing any inner text or nested tags
writeAttribute
{ "repo_name": "spring-projects/spring-framework", "path": "spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java", "license": "apache-2.0", "size": 7566 }
[ "jakarta.servlet.jsp.JspException" ]
import jakarta.servlet.jsp.JspException;
import jakarta.servlet.jsp.*;
[ "jakarta.servlet.jsp" ]
jakarta.servlet.jsp;
1,056,696
@Test public void testIndexWithDifferentFldsReqPartialFldsInIdx() throws Exception { inlineSize = 10; IgniteEx ig0 = startGrid(0); GridQueryProcessor qryProc = ig0.context().query(); populateTable(qryProc, TEST_TBL_NAME, 2, "FIRST_NAME", "LAST_NAME", "ADDRESS", "LA...
void function() throws Exception { inlineSize = 10; IgniteEx ig0 = startGrid(0); GridQueryProcessor qryProc = ig0.context().query(); populateTable(qryProc, TEST_TBL_NAME, 2, STR, STR, STR, "LANG", STR); String sqlIdx1 = String.format(STRidx1\STR, TEST_TBL_NAME); qryProc.querySqlFields(new SqlFieldsQuery(sqlIdx1), true)...
/** * Tests different fields sequence in indexes. * Last field not participate in any index. */
Tests different fields sequence in indexes. Last field not participate in any index
testIndexWithDifferentFldsReqPartialFldsInIdx
{ "repo_name": "SomeFire/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/BasicIndexTest.java", "license": "apache-2.0", "size": 44701 }
[ "org.apache.ignite.cache.query.SqlFieldsQuery", "org.apache.ignite.internal.IgniteEx", "org.apache.ignite.internal.processors.query.GridQueryProcessor" ]
import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.query.GridQueryProcessor;
import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.query.*;
[ "org.apache.ignite" ]
org.apache.ignite;
645,102
EClass getnRICH_NO();
EClass getnRICH_NO();
/** * Returns the meta object for class '{@link sc.ndt.editor.turbsimtbs.nRICH_NO <em>nRICH NO</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>nRICH NO</em>'. * @see sc.ndt.editor.turbsimtbs.nRICH_NO * @generated */
Returns the meta object for class '<code>sc.ndt.editor.turbsimtbs.nRICH_NO nRICH NO</code>'.
getnRICH_NO
{ "repo_name": "cooked/NDT", "path": "sc.ndt.editor.turbsim.tbs/src-gen/sc/ndt/editor/turbsimtbs/TurbsimtbsPackage.java", "license": "gpl-3.0", "size": 204585 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
786,213
protected boolean supportsConfidences(Attribute label) { return (label != null && label.isNominal()); }
boolean function(Attribute label) { return (label != null && label.isNominal()); }
/** * This method determines if confidence attributes are created depending on the current label. * Usually this depends only on the fact that the label is nominal, but subclasses might override this to * avoid attribute construction for confidences. */
This method determines if confidence attributes are created depending on the current label. Usually this depends only on the fact that the label is nominal, but subclasses might override this to avoid attribute construction for confidences
supportsConfidences
{ "repo_name": "aborg0/rapidminer-vega", "path": "src/com/rapidminer/operator/learner/PredictionModel.java", "license": "agpl-3.0", "size": 13324 }
[ "com.rapidminer.example.Attribute" ]
import com.rapidminer.example.Attribute;
import com.rapidminer.example.*;
[ "com.rapidminer.example" ]
com.rapidminer.example;
2,622,726
public void addAndSelectNewProvider(String main_url, boolean danger_on) { FragmentTransaction fragment_transaction = fragment_manager.removePreviousFragment(NewProviderDialog.TAG); DialogFragment newFragment = NewProviderDialog.newInstance(); Bundle data = new Bundle(); data.putString(Provi...
void function(String main_url, boolean danger_on) { FragmentTransaction fragment_transaction = fragment_manager.removePreviousFragment(NewProviderDialog.TAG); DialogFragment newFragment = NewProviderDialog.newInstance(); Bundle data = new Bundle(); data.putString(Provider.MAIN_URL, main_url); data.putBoolean(ProviderIt...
/** * Open the new provider dialog with data */
Open the new provider dialog with data
addAndSelectNewProvider
{ "repo_name": "laborautonomo/bitmask_android", "path": "app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java", "license": "gpl-3.0", "size": 20645 }
[ "android.app.DialogFragment", "android.app.FragmentTransaction", "android.os.Bundle", "se.leap.bitmaskclient.ProviderListContent" ]
import android.app.DialogFragment; import android.app.FragmentTransaction; import android.os.Bundle; import se.leap.bitmaskclient.ProviderListContent;
import android.app.*; import android.os.*; import se.leap.bitmaskclient.*;
[ "android.app", "android.os", "se.leap.bitmaskclient" ]
android.app; android.os; se.leap.bitmaskclient;
2,023,765
public void setVersionValue(String versionValue) throws JNCException { setVersionValue(new YangEnumeration(versionValue, new String[] { "10.1.0", })); }
void function(String versionValue) throws JNCException { setVersionValue(new YangEnumeration(versionValue, new String[] { STR, })); }
/** * Sets the value for child leaf "version", * using a String value. * @param versionValue used during instantiation. */
Sets the value for child leaf "version", using a String value
setVersionValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/interface_/slg/MmeSlgIf.java", "license": "apache-2.0", "size": 12262 }
[ "com.tailf.jnc.YangEnumeration" ]
import com.tailf.jnc.YangEnumeration;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
1,734,641
void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<HTableDescriptor> descriptors) throws IOException;
void postGetTableDescriptors(ObserverContext<MasterCoprocessorEnvironment> ctx, List<HTableDescriptor> descriptors) throws IOException;
/** * Called after a getTableDescriptors request has been processed. * @param ctx the environment to interact with the framework and master * @param descriptors the list of descriptors about to be returned * @throws IOException */
Called after a getTableDescriptors request has been processed
postGetTableDescriptors
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java", "license": "apache-2.0", "size": 31996 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.hbase.HTableDescriptor" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.HTableDescriptor;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,870,051
public NetworkProfile withNetworkInterfaces(List<IpAddress> networkInterfaces) { this.networkInterfaces = networkInterfaces; return this; }
NetworkProfile function(List<IpAddress> networkInterfaces) { this.networkInterfaces = networkInterfaces; return this; }
/** * Set the networkInterfaces property: Specifies the network interfaces for the HANA instance. * * @param networkInterfaces the networkInterfaces value to set. * @return the NetworkProfile object itself. */
Set the networkInterfaces property: Specifies the network interfaces for the HANA instance
withNetworkInterfaces
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hanaonazure/azure-resourcemanager-hanaonazure/src/main/java/com/azure/resourcemanager/hanaonazure/models/NetworkProfile.java", "license": "mit", "size": 2468 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,970,507
protected static double getSlaTimePerHost(List<Host> hosts) { double slaViolationTimePerHost = 0; double totalTime = 0; for (Host _host : hosts) { HostDynamicWorkload host = (HostDynamicWorkload) _host; double previousTime = -1; double previousAllocated = 0; double previousRequested = 0; ...
static double function(List<Host> hosts) { double slaViolationTimePerHost = 0; double totalTime = 0; for (Host _host : hosts) { HostDynamicWorkload host = (HostDynamicWorkload) _host; double previousTime = -1; double previousAllocated = 0; double previousRequested = 0; for (HostStateHistoryEntry entry : host.getStateHi...
/** * Gets the sla time per host. * * @param hosts the hosts * @return the sla time per host */
Gets the sla time per host
getSlaTimePerHost
{ "repo_name": "hieuvt/tccloudsim", "path": "examples/org/cloudbus/cloudsim/examples/power/Helper.java", "license": "lgpl-3.0", "size": 27577 }
[ "java.util.List", "org.cloudbus.cloudsim.Host", "org.cloudbus.cloudsim.HostDynamicWorkload", "org.cloudbus.cloudsim.HostStateHistoryEntry" ]
import java.util.List; import org.cloudbus.cloudsim.Host; import org.cloudbus.cloudsim.HostDynamicWorkload; import org.cloudbus.cloudsim.HostStateHistoryEntry;
import java.util.*; import org.cloudbus.cloudsim.*;
[ "java.util", "org.cloudbus.cloudsim" ]
java.util; org.cloudbus.cloudsim;
1,829,739
if(string==null) return null; Map<String, String> params = new HashMap<>(); Matcher typeSubtype = TYPE_SUBTYPE.matcher(string); if (!typeSubtype.lookingAt()) return null; String type = typeSubtype.group(1).toLowerCase(Locale.US); String subtype = typeSubtype.group(2).toLowerCas...
if(string==null) return null; Map<String, String> params = new HashMap<>(); Matcher typeSubtype = TYPE_SUBTYPE.matcher(string); if (!typeSubtype.lookingAt()) return null; String type = typeSubtype.group(1).toLowerCase(Locale.US); String subtype = typeSubtype.group(2).toLowerCase(Locale.US); String charset = null; Match...
/** * Returns a media type for {@code string}, or null if {@code string} is not a * well-formed media type. */
Returns a media type for string, or null if string is not a well-formed media type
parse
{ "repo_name": "djodjoni/jus", "path": "jus-java/src/main/java/io/apptik/comm/jus/http/MediaType.java", "license": "apache-2.0", "size": 4937 }
[ "java.util.Collections", "java.util.HashMap", "java.util.Locale", "java.util.Map", "java.util.regex.Matcher" ]
import java.util.Collections; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.regex.Matcher;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
792,800
public static InputStream openFileForReading(final File file) { try { if (file.getName().endsWith(".gz") || file.getName().endsWith(".bfq")) { return openGzipFileForReading(file); } else { return new FileInputStream(file);...
static InputStream function(final File file) { try { if (file.getName().endsWith(".gz") file.getName().endsWith(".bfq")) { return openGzipFileForReading(file); } else { return new FileInputStream(file); } } catch (IOException ioe) { throw new SAMException(STR + file.getName(), ioe); } }
/** * Opens a file for reading, decompressing it if necessary * * @param file The file to open * @return the input stream to read from */
Opens a file for reading, decompressing it if necessary
openFileForReading
{ "repo_name": "eugenegardner/tenXMEIPolisher", "path": "src/htsjdk/samtools/util/IOUtil.java", "license": "gpl-3.0", "size": 35486 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,924,321
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux<PollResult<Void>, Void> beginDeleteAsync( String resourceGroupName, String profileName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono = deleteWithRespons...
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<Void>, Void> function( String resourceGroupName, String profileName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, profileName, context);...
/** * Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified * parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, * origins and custom domains. * * @param resourceGroupName Name of the ...
Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains
beginDeleteAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java", "license": "mit", "size": 123532 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.PollerFlux", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
2,913,783
public Builder addNonDataDeps(RuleContext ruleContext, Function<TransitiveInfoCollection, Runfiles> mapping) { for (TransitiveInfoCollection target : getNonDataDeps(ruleContext)) { addTargetExceptFileTargets(target, mapping); } return this; }
Builder function(RuleContext ruleContext, Function<TransitiveInfoCollection, Runfiles> mapping) { for (TransitiveInfoCollection target : getNonDataDeps(ruleContext)) { addTargetExceptFileTargets(target, mapping); } return this; }
/** * Collects runfiles from "srcs" and "deps" of a target. */
Collects runfiles from "srcs" and "deps" of a target
addNonDataDeps
{ "repo_name": "akira-baruah/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java", "license": "apache-2.0", "size": 47800 }
[ "com.google.common.base.Function" ]
import com.google.common.base.Function;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,872,011
public Set<Transition> getTransitions() { return transitions; }
Set<Transition> function() { return transitions; }
/** * Returns the set of outgoing transitions. * Subsequent changes are reflected in the automaton. * @return transition set */
Returns the set of outgoing transitions. Subsequent changes are reflected in the automaton
getTransitions
{ "repo_name": "miroculus/GNAT", "path": "src/brics/automaton/State.java", "license": "bsd-2-clause", "size": 5080 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,437,311
private void resubmit(ServerName oldServer, List<Action> toReplay, int numAttempt, int failureCount, Throwable throwable) { // We have something to replay. We're going to sleep a little before. // We have two contradicting needs here: // 1) We want to get the new location after h...
void function(ServerName oldServer, List<Action> toReplay, int numAttempt, int failureCount, Throwable throwable) { boolean retryImmediately = throwable instanceof RetryImmediatelyException; int nextAttemptNumber = retryImmediately ? numAttempt : numAttempt + 1; long backOffTime; if (retryImmediately) { backOffTime = 0...
/** * Log as much info as possible, and, if there is something to replay, * submit it again after a back off sleep. */
Log as much info as possible, and, if there is something to replay, submit it again after a back off sleep
resubmit
{ "repo_name": "HubSpot/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java", "license": "apache-2.0", "size": 50667 }
[ "java.util.List", "org.apache.hadoop.hbase.CallQueueTooBigException", "org.apache.hadoop.hbase.RetryImmediatelyException", "org.apache.hadoop.hbase.ServerName" ]
import java.util.List; import org.apache.hadoop.hbase.CallQueueTooBigException; import org.apache.hadoop.hbase.RetryImmediatelyException; import org.apache.hadoop.hbase.ServerName;
import java.util.*; import org.apache.hadoop.hbase.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
446,572
protected void add(ComparableObjectItem item, boolean notify) { ParamChecks.nullNotPermitted(item, "item"); if (this.autoSort) { int index = Collections.binarySearch(this.data, item); if (index < 0) { this.data.add(-index - 1, item); } ...
void function(ComparableObjectItem item, boolean notify) { ParamChecks.nullNotPermitted(item, "item"); if (this.autoSort) { int index = Collections.binarySearch(this.data, item); if (index < 0) { this.data.add(-index - 1, item); } else { if (this.allowDuplicateXValues) { int size = this.data.size(); while (index < size...
/** * Adds a data item to the series and, if requested, sends a * {@link SeriesChangeEvent} to all registered listeners. * * @param item the (x, y) item (<code>null</code> not permitted). * @param notify a flag that controls whether or not a * {@link SeriesChangeEvent} is ...
Adds a data item to the series and, if requested, sends a <code>SeriesChangeEvent</code> to all registered listeners
add
{ "repo_name": "Epsilon2/Memetic-Algorithm-for-TSP", "path": "jfreechart-1.0.16/source/org/jfree/data/ComparableObjectSeries.java", "license": "mit", "size": 14907 }
[ "java.util.Collections", "org.jfree.chart.util.ParamChecks", "org.jfree.data.general.SeriesException" ]
import java.util.Collections; import org.jfree.chart.util.ParamChecks; import org.jfree.data.general.SeriesException;
import java.util.*; import org.jfree.chart.util.*; import org.jfree.data.general.*;
[ "java.util", "org.jfree.chart", "org.jfree.data" ]
java.util; org.jfree.chart; org.jfree.data;
2,313,100
public static void unregisterLoggerContext(final String contextName, final MBeanServer mbs) { final String pattern = LoggerContextAdminMBean.PATTERN; final String search = String.format(pattern, escape(contextName), "*"); unregisterAllMatching(search, mbs); // unregister context mbean ...
static void function(final String contextName, final MBeanServer mbs) { final String pattern = LoggerContextAdminMBean.PATTERN; final String search = String.format(pattern, escape(contextName), "*"); unregisterAllMatching(search, mbs); unregisterStatusLogger(contextName, mbs); unregisterContextSelector(contextName, mbs...
/** * Unregisters all MBeans associated with the specified logger context (including MBeans for {@code LoggerConfig}s * and {@code Appender}s from the platform MBean server. * * @param contextName name of the logger context to unregister * @param mbs the MBean Server to unregister the instrumen...
Unregisters all MBeans associated with the specified logger context (including MBeans for LoggerConfigs and Appenders from the platform MBean server
unregisterLoggerContext
{ "repo_name": "renchunxiao/logging-log4j2", "path": "log4j-core/src/main/java/org/apache/logging/log4j/core/jmx/Server.java", "license": "apache-2.0", "size": 16950 }
[ "javax.management.MBeanServer" ]
import javax.management.MBeanServer;
import javax.management.*;
[ "javax.management" ]
javax.management;
653,308
public boolean update(Object object){ try { updateJsonData(object); return getDao(object).update(object)>0; }catch(Exception e){ GEL.e("Exception updating object: " + e.toString()); } //error getting all object return false; }
boolean function(Object object){ try { updateJsonData(object); return getDao(object).update(object)>0; }catch(Exception e){ GEL.e(STR + e.toString()); } return false; }
/** * Get all objects * @param object Object with Id defined */
Get all objects
update
{ "repo_name": "SilicorniO/googlyeyes-ormlite", "path": "ge-ormlite/src/main/java/com/silicornio/geormlite/GeORMLiteManager.java", "license": "apache-2.0", "size": 27141 }
[ "com.silicornio.geormlite.general.GEL" ]
import com.silicornio.geormlite.general.GEL;
import com.silicornio.geormlite.general.*;
[ "com.silicornio.geormlite" ]
com.silicornio.geormlite;
776,524
public static String postImmediate (Properties ctx, int AD_Client_ID, int AD_Table_ID, int Record_ID, boolean force, String trxName) { // Ensure the table has Posted column / i.e. GL_JournalBatch can be completed but not posted if (MColumn.getColumn_ID(MTable.getTableName(ctx, AD_Table_ID), "Posted") <= ...
static String function (Properties ctx, int AD_Client_ID, int AD_Table_ID, int Record_ID, boolean force, String trxName) { if (MColumn.getColumn_ID(MTable.getTableName(ctx, AD_Table_ID), STR) <= 0) return null; String error = null; if (MClient.isClientAccounting()) { log.info (STR + AD_Table_ID + STR + Record_ID); MAcc...
/** * Post Immediate * * @param ctx Client Context * @param AD_Client_ID Client ID of Document * @param AD_Table_ID Table ID of Document * @param Record_ID Record ID of this document * @param force force posting * @param trxName ignore, retained for backward c...
Post Immediate
postImmediate
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/process/DocumentEngine.java", "license": "gpl-2.0", "size": 34842 }
[ "java.util.Properties", "java.util.logging.Level", "org.compiere.acct.Doc", "org.compiere.db.CConnection", "org.compiere.interfaces.Server", "org.compiere.model.MAcctSchema", "org.compiere.model.MClient", "org.compiere.model.MColumn", "org.compiere.model.MTable", "org.compiere.util.Env" ]
import java.util.Properties; import java.util.logging.Level; import org.compiere.acct.Doc; import org.compiere.db.CConnection; import org.compiere.interfaces.Server; import org.compiere.model.MAcctSchema; import org.compiere.model.MClient; import org.compiere.model.MColumn; import org.compiere.model.MTable; import org....
import java.util.*; import java.util.logging.*; import org.compiere.acct.*; import org.compiere.db.*; import org.compiere.interfaces.*; import org.compiere.model.*; import org.compiere.util.*;
[ "java.util", "org.compiere.acct", "org.compiere.db", "org.compiere.interfaces", "org.compiere.model", "org.compiere.util" ]
java.util; org.compiere.acct; org.compiere.db; org.compiere.interfaces; org.compiere.model; org.compiere.util;
840,102
private boolean acceptClone(KeyEvent e) { int key = e.keyCode; if (!(isInState(STATE_DRAG_IN_PROGRESS | STATE_ACCESSIBLE_DRAG | STATE_ACCESSIBLE_DRAG_IN_PROGRESS))) return false; return (key == MODIFIER_CLONE); }
boolean function(KeyEvent e) { int key = e.keyCode; if (!(isInState(STATE_DRAG_IN_PROGRESS STATE_ACCESSIBLE_DRAG STATE_ACCESSIBLE_DRAG_IN_PROGRESS))) return false; return (key == MODIFIER_CLONE); }
/** * Returns true if the control key was the key in the key event and the tool * is in an acceptable state for this event. * * @param e * the key event * @return true if the key was control and can be accepted. */
Returns true if the control key was the key in the key event and the tool is in an acceptable state for this event
acceptClone
{ "repo_name": "archimatetool/archi", "path": "org.eclipse.gef/src/org/eclipse/gef/tools/DragEditPartsTracker.java", "license": "mit", "size": 25374 }
[ "org.eclipse.swt.events.KeyEvent" ]
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,351,266
public Class<? extends DocumentPresentationController> getDocumentPresentationControllerClass() { return documentPresentationControllerClass; }
Class<? extends DocumentPresentationController> function() { return documentPresentationControllerClass; }
/** * Full class name for the {@link DocumentPresentationController} that will be invoked to implement presentation * logic for the document * * @return class name for document presentation controller */
Full class name for the <code>DocumentPresentationController</code> that will be invoked to implement presentation logic for the document
getDocumentPresentationControllerClass
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-kns/src/main/java/org/kuali/kfs/krad/datadictionary/DocumentEntry.java", "license": "agpl-3.0", "size": 13917 }
[ "org.kuali.kfs.krad.document.DocumentPresentationController" ]
import org.kuali.kfs.krad.document.DocumentPresentationController;
import org.kuali.kfs.krad.document.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,726,949
List<ParticipantPropertyReference> participantPropertyReferences();
List<ParticipantPropertyReference> participantPropertyReferences();
/** * Gets the participantPropertyReferences property: The properties that represent the participating profile. * * @return the participantPropertyReferences value. */
Gets the participantPropertyReferences property: The properties that represent the participating profile
participantPropertyReferences
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/customerinsights/azure-resourcemanager-customerinsights/src/main/java/com/azure/resourcemanager/customerinsights/models/LinkResourceFormat.java", "license": "mit", "size": 18573 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
935,204
private void registerStore0(PlatformCacheStore store, boolean convertBinary) throws IgniteCheckedException { if (store instanceof PlatformDotNetCacheStore) { PlatformDotNetCacheStore store0 = (PlatformDotNetCacheStore)store; store0.initialize(ctx, convertBinary); } e...
void function(PlatformCacheStore store, boolean convertBinary) throws IgniteCheckedException { if (store instanceof PlatformDotNetCacheStore) { PlatformDotNetCacheStore store0 = (PlatformDotNetCacheStore)store; store0.initialize(ctx, convertBinary); } else throw new IgniteCheckedException(STR + store); }
/** * Internal store initialization routine. * * @param store Store. * @param convertBinary Convert binary flag. * @throws IgniteCheckedException If failed. */
Internal store initialization routine
registerStore0
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java", "license": "apache-2.0", "size": 33379 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.platform.cache.store.PlatformCacheStore", "org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.platform.cache.store.PlatformCacheStore; import org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetCacheStore;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.platform.cache.store.*; import org.apache.ignite.internal.processors.platform.dotnet.*;
[ "org.apache.ignite" ]
org.apache.ignite;
117,440
public static int convertToOptionValueInTimeDropDown(Date date) { //TODO: see if we can eliminate this method (i.e., merge with convertToDisplayValueInTimeDropDown) Calendar c = Calendar.getInstance(TimeZone.getTimeZone("UTC")); c.setTime(date); int hour = c.get(Calendar.HOUR_OF_DAY)...
static int function(Date date) { Calendar c = Calendar.getInstance(TimeZone.getTimeZone("UTC")); c.setTime(date); int hour = c.get(Calendar.HOUR_OF_DAY); int minutes = c.get(Calendar.MINUTE); hour = hour == 0 ? 24 : hour; hour = hour == 23 && minutes == 59 ? 24 : hour; return hour; }
/** * Formats a date in the corresponding option value in 'Time' dropdowns The * hour just after midnight is converted to option 24 (i.e., 2359 as shown * to the user) 23.59 is also converted to 24. (i.e., 23.59-00.59 ---> 24) */
Formats a date in the corresponding option value in 'Time' dropdowns The hour just after midnight is converted to option 24 (i.e., 2359 as shown to the user) 23.59 is also converted to 24. (i.e., 23.59-00.59 ---> 24)
convertToOptionValueInTimeDropDown
{ "repo_name": "karthikaacharya/teammates", "path": "src/main/java/teammates/common/util/TimeHelper.java", "license": "gpl-2.0", "size": 17599 }
[ "java.util.Calendar", "java.util.Date", "java.util.TimeZone" ]
import java.util.Calendar; import java.util.Date; import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
1,085,480
private ArrayString onFooterCallback(ArrayObject items) { // gets callback TooltipFooterCallback callback = getFooterCallback(); // checks if callback is consistent if (callback != null) { // invokes callback List<String> result = callback.onFooter(getChart(), ArrayListHelper.unmodifiableList(items, To...
ArrayString function(ArrayObject items) { TooltipFooterCallback callback = getFooterCallback(); if (callback != null) { List<String> result = callback.onFooter(getChart(), ArrayListHelper.unmodifiableList(items, TooltipItem.FACTORY)); return ArrayString.fromOrEmpty(result); } return EMPTY_ARRAY_STRING; }
/** * Manage the FOOTER callback invocation * * @param items list of tooltip items * @return array of tooltip items */
Manage the FOOTER callback invocation
onFooterCallback
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/configuration/TooltipsCallbacks.java", "license": "apache-2.0", "size": 22247 }
[ "java.util.List", "org.pepstock.charba.client.callbacks.TooltipFooterCallback", "org.pepstock.charba.client.commons.ArrayListHelper", "org.pepstock.charba.client.commons.ArrayObject", "org.pepstock.charba.client.commons.ArrayString", "org.pepstock.charba.client.items.TooltipItem" ]
import java.util.List; import org.pepstock.charba.client.callbacks.TooltipFooterCallback; import org.pepstock.charba.client.commons.ArrayListHelper; import org.pepstock.charba.client.commons.ArrayObject; import org.pepstock.charba.client.commons.ArrayString; import org.pepstock.charba.client.items.TooltipItem;
import java.util.*; import org.pepstock.charba.client.callbacks.*; import org.pepstock.charba.client.commons.*; import org.pepstock.charba.client.items.*;
[ "java.util", "org.pepstock.charba" ]
java.util; org.pepstock.charba;
2,271,193
@Test public void testEqualsFalse() { boolean eq12 = this.wd1.equals(this.wd2); assertFalse(eq12); }
void function() { boolean eq12 = this.wd1.equals(this.wd2); assertFalse(eq12); }
/** * Test of equals method, of class WorldDate. */
Test of equals method, of class WorldDate
testEqualsFalse
{ "repo_name": "asciiCerebrum/neocortexEngine", "path": "src/test/java/org/asciicerebrum/neocortexengine/domain/mechanics/WorldDateTest.java", "license": "mit", "size": 4252 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
159,194
final static int getBestCandidate(Candidate[] candidates) throws DecodeException { int l = candidates.length; if (l == 0) throw new DecodeException("No candidates"); int j; Candidate value; // sort the candidates using insertion sort. for (int i = 0; i < l; i++) { value = candidates[i]; j = i - ...
final static int getBestCandidate(Candidate[] candidates) throws DecodeException { int l = candidates.length; if (l == 0) throw new DecodeException(STR); int j; Candidate value; for (int i = 0; i < l; i++) { value = candidates[i]; j = i - 1; while (j >= 0 && candidates[j].getHamDist() > value.getHamDist()) { candidates...
/** * Returns the {@link Candidate} with the lowest hamming distance. * * @param candidates * Array of {@link Candidate}. * @return Value of the {@link Candidate} with the lowest hamming distance. * @throws DecodeException * Thrown if the candidate array is empty. */
Returns the <code>Candidate</code> with the lowest hamming distance
getBestCandidate
{ "repo_name": "onlinecity/oc-qrreader", "path": "src/dk/onlinecity/qrr/decode/HammingDistance.java", "license": "mit", "size": 1958 }
[ "dk.onlinecity.qrr.core.exceptions.DecodeException" ]
import dk.onlinecity.qrr.core.exceptions.DecodeException;
import dk.onlinecity.qrr.core.exceptions.*;
[ "dk.onlinecity.qrr" ]
dk.onlinecity.qrr;
2,645,369
public void setTickMarkPosition(DateTickMarkPosition position) { Args.nullNotPermitted(position, "position"); this.tickMarkPosition = position; fireChangeEvent(); }
void function(DateTickMarkPosition position) { Args.nullNotPermitted(position, STR); this.tickMarkPosition = position; fireChangeEvent(); }
/** * Sets the tick mark position (start, middle or end of the time period) * and sends an {@link AxisChangeEvent} to all registered listeners. * * @param position the position ({@code null} not permitted). */
Sets the tick mark position (start, middle or end of the time period) and sends an <code>AxisChangeEvent</code> to all registered listeners
setTickMarkPosition
{ "repo_name": "jfree/jfreechart", "path": "src/main/java/org/jfree/chart/axis/DateAxis.java", "license": "lgpl-2.1", "size": 67249 }
[ "org.jfree.chart.internal.Args" ]
import org.jfree.chart.internal.Args;
import org.jfree.chart.internal.*;
[ "org.jfree.chart" ]
org.jfree.chart;
603,972
private String getOpenAPIDefinitionForDeployment(Identifier apiId, String synapseEnvName, String clusterName) throws APIManagementException { String apiTenantDomain; String updatedDefinition = null; Map<String,String> hostsWithSchemes; String definition = super.getOpenAPI...
String function(Identifier apiId, String synapseEnvName, String clusterName) throws APIManagementException { String apiTenantDomain; String updatedDefinition = null; Map<String,String> hostsWithSchemes; String definition = super.getOpenAPIDefinition(apiId); APIDefinition oasParser = OASParserUtil.getOASParser(definitio...
/** * Get server URL updated Open API definition for given deployment (synapse gateway or container managed cluster) * @param apiId Id of the API * @param synapseEnvName Name of the synapse gateway environment * @param clusterName Name of the container managed cluster * @return Updated Open API...
Get server URL updated Open API definition for given deployment (synapse gateway or container managed cluster)
getOpenAPIDefinitionForDeployment
{ "repo_name": "jaadds/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java", "license": "apache-2.0", "size": 317390 }
[ "java.util.Map", "org.apache.commons.lang3.StringUtils", "org.wso2.carbon.apimgt.api.APIDefinition", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.APIIdentifier", "org.wso2.carbon.apimgt.api.model.APIProduct", "org.wso2.carbon.apimgt.api.model.APIProductIdentifie...
import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.wso2.carbon.apimgt.api.APIDefinition; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.api.model.APIProduct; import org.wso2.carbon.apimgt.api.model...
import java.util.*; import org.apache.commons.lang3.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.definitions.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.utils.multitenancy.*;
[ "java.util", "org.apache.commons", "org.wso2.carbon" ]
java.util; org.apache.commons; org.wso2.carbon;
945,022
public float getAlignment(int axis) { if (axis == X_AXIS) return super.getAlignment(axis); if (axis == Y_AXIS) { if (getViewCount() == 0) return 0.0F; float prefHeight = getPreferredSpan(Y_AXIS); View first = getView(0); float firstRowHeight = first.getP...
float function(int axis) { if (axis == X_AXIS) return super.getAlignment(axis); if (axis == Y_AXIS) { if (getViewCount() == 0) return 0.0F; float prefHeight = getPreferredSpan(Y_AXIS); View first = getView(0); float firstRowHeight = first.getPreferredSpan(Y_AXIS); return prefHeight != 0 ? (firstRowHeight * first.getAli...
/** * Gets the alignment. * * @param axis - the axis to get the alignment for. * @return the alignment. */
Gets the alignment
getAlignment
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/text/html/BlockView.java", "license": "gpl-2.0", "size": 22230 }
[ "javax.swing.text.View" ]
import javax.swing.text.View;
import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
279,129
ConfigPropertyConnection getConnection() throws ResourceException;
ConfigPropertyConnection getConnection() throws ResourceException;
/** * Get connection from factory * * @return ConfigPropertyConnection instance * @throws javax.resource.ResourceException Thrown if a connection can't be obtained */
Get connection from factory
getConnection
{ "repo_name": "xasx/wildfly", "path": "testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/deployment/rar/configproperty/ConfigPropertyConnectionFactory.java", "license": "lgpl-2.1", "size": 1631 }
[ "javax.resource.ResourceException" ]
import javax.resource.ResourceException;
import javax.resource.*;
[ "javax.resource" ]
javax.resource;
2,009,393
@Override public T visitExpression(@NotNull MurmurParser.ExpressionContext ctx) { return visitChildren(ctx); }
@Override public T visitExpression(@NotNull MurmurParser.ExpressionContext ctx) { return visitChildren(ctx); }
/** * {@inheritDoc} * * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */
The default implementation returns the result of calling <code>#visitChildren</code> on ctx
visitIdentifierList
{ "repo_name": "Mihail-K/Murmur", "path": "src/io/cloudchaser/murmur/parser/MurmurParserBaseVisitor.java", "license": "mit", "size": 5087 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,875,633
protected static WebElement waitForElemenForClickabletAndPoll(final By locator) { FluentWait<WebDriver> wait = new FluentWait<WebDriver>(getWebDriver()) .withTimeout(30, TimeUnit.SECONDS) .pollingEvery(1000, TimeUnit.MILLISECONDS) .ignoring(NoSuchElementException.class); WebElement element = wait.un...
static WebElement function(final By locator) { FluentWait<WebDriver> wait = new FluentWait<WebDriver>(getWebDriver()) .withTimeout(30, TimeUnit.SECONDS) .pollingEvery(1000, TimeUnit.MILLISECONDS) .ignoring(NoSuchElementException.class); WebElement element = wait.until(ExpectedConditions .elementToBeClickable(locator));...
/** * Wait for element to be clickable. * * @param locator * the locator * @return the web element */
Wait for element to be clickable
waitForElemenForClickabletAndPoll
{ "repo_name": "openMF/mifosx-e2e-testing", "path": "MifosTestAutomation/src/test/java/com/mifos/pages/MifosWebPage.java", "license": "mpl-2.0", "size": 59471 }
[ "java.util.concurrent.TimeUnit", "org.openqa.selenium.By", "org.openqa.selenium.NoSuchElementException", "org.openqa.selenium.WebDriver", "org.openqa.selenium.WebElement", "org.openqa.selenium.support.ui.ExpectedConditions", "org.openqa.selenium.support.ui.FluentWait" ]
import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.FluentWait;
import java.util.concurrent.*; import org.openqa.selenium.*; import org.openqa.selenium.support.ui.*;
[ "java.util", "org.openqa.selenium" ]
java.util; org.openqa.selenium;
1,136,926
@SuppressWarnings("unchecked") @Test @Category(RunnableOnService.class) public void testCoGroupByKeyHandleResults() { TupleTag<String> namesTag = new TupleTag<>(); TupleTag<String> addressesTag = new TupleTag<>(); TupleTag<String> purchasesTag = new TupleTag<>(); Pipeline p = TestPipeline.creat...
@SuppressWarnings(STR) @Category(RunnableOnService.class) void function() { TupleTag<String> namesTag = new TupleTag<>(); TupleTag<String> addressesTag = new TupleTag<>(); TupleTag<String> purchasesTag = new TupleTag<>(); Pipeline p = TestPipeline.create(); PCollection<KV<Integer, CoGbkResult>> coGbkResults = buildPurc...
/** * Tests the pipeline end-to-end. Builds the purchases CoGroupByKey, and * applies CorrelatePurchaseCountForAddressesWithoutNamesFn to the results. */
Tests the pipeline end-to-end. Builds the purchases CoGroupByKey, and applies CorrelatePurchaseCountForAddressesWithoutNamesFn to the results
testCoGroupByKeyHandleResults
{ "repo_name": "springml/DataflowJavaSDK", "path": "sdk/src/test/java/com/google/cloud/dataflow/sdk/transforms/join/CoGroupByKeyTest.java", "license": "apache-2.0", "size": 19139 }
[ "com.google.cloud.dataflow.sdk.Pipeline", "com.google.cloud.dataflow.sdk.testing.DataflowAssert", "com.google.cloud.dataflow.sdk.testing.RunnableOnService", "com.google.cloud.dataflow.sdk.testing.TestPipeline", "com.google.cloud.dataflow.sdk.transforms.ParDo", "com.google.cloud.dataflow.sdk.values.KV", ...
import com.google.cloud.dataflow.sdk.Pipeline; import com.google.cloud.dataflow.sdk.testing.DataflowAssert; import com.google.cloud.dataflow.sdk.testing.RunnableOnService; import com.google.cloud.dataflow.sdk.testing.TestPipeline; import com.google.cloud.dataflow.sdk.transforms.ParDo; import com.google.cloud.dataflow.s...
import com.google.cloud.dataflow.sdk.*; import com.google.cloud.dataflow.sdk.testing.*; import com.google.cloud.dataflow.sdk.transforms.*; import com.google.cloud.dataflow.sdk.values.*; import org.hamcrest.collection.*; import org.junit.experimental.categories.*;
[ "com.google.cloud", "org.hamcrest.collection", "org.junit.experimental" ]
com.google.cloud; org.hamcrest.collection; org.junit.experimental;
2,293,125
private static boolean matchesType( Optional<PublicSuffixType> desiredType, Optional<PublicSuffixType> actualType) { return desiredType.isPresent() ? desiredType.equals(actualType) : actualType.isPresent(); }
static boolean function( Optional<PublicSuffixType> desiredType, Optional<PublicSuffixType> actualType) { return desiredType.isPresent() ? desiredType.equals(actualType) : actualType.isPresent(); }
/** * If a {@code desiredType} is specified, returns true only if the {@code actualType} is * identical. Otherwise, returns true as long as {@code actualType} is present. */
If a desiredType is specified, returns true only if the actualType is identical. Otherwise, returns true as long as actualType is present
matchesType
{ "repo_name": "typetools/guava", "path": "guava/src/com/google/common/net/InternetDomainName.java", "license": "apache-2.0", "size": 26664 }
[ "com.google.common.base.Optional", "com.google.thirdparty.publicsuffix.PublicSuffixType" ]
import com.google.common.base.Optional; import com.google.thirdparty.publicsuffix.PublicSuffixType;
import com.google.common.base.*; import com.google.thirdparty.publicsuffix.*;
[ "com.google.common", "com.google.thirdparty" ]
com.google.common; com.google.thirdparty;
414,712
@WebResult(name = "prettyPrint") String prettyPrintCount(@WebParam(name = "prefix") String prefix, @WebParam(name = "suffix") String suffix);
@WebResult(name = STR) String prettyPrintCount(@WebParam(name = STR) String prefix, @WebParam(name = STR) String suffix);
/** * Returns a formated string composed of prefix + current count + suffix * * @param prefix * the prefix * @param suffix * the suffix * @return the formated string */
Returns a formated string composed of prefix + current count + suffix
prettyPrintCount
{ "repo_name": "kutala/activiti-in-action-codes", "path": "bpmn20-example/src/test/java/me/kafeitu/activiti/chapter15/counter/Counter.java", "license": "apache-2.0", "size": 1005 }
[ "javax.jws.WebParam", "javax.jws.WebResult" ]
import javax.jws.WebParam; import javax.jws.WebResult;
import javax.jws.*;
[ "javax.jws" ]
javax.jws;
1,364,850
public void checkTopologyRecovery() { Topology topology = EditionContextManager.getTopology(); EditionContext context = EditionContextManager.get(); context.setRecoveryOperation(recoveryHelperService.buildRecoveryOperation(topology)); if (context.getRecoveryOperation() != null) { ...
void function() { Topology topology = EditionContextManager.getTopology(); EditionContext context = EditionContextManager.get(); context.setRecoveryOperation(recoveryHelperService.buildRecoveryOperation(topology)); if (context.getRecoveryOperation() != null) { throw new RecoverTopologyException(STR, context.getRecovery...
/** * Checks if the topology needs to be recovered and eventually throws an error. * The {@link RecoverTopologyOperation} is cache for later use in recovering process */
Checks if the topology needs to be recovered and eventually throws an error. The <code>RecoverTopologyOperation</code> is cache for later use in recovering process
checkTopologyRecovery
{ "repo_name": "san-tak/alien4cloud", "path": "alien4cloud-core/src/main/java/org/alien4cloud/tosca/editor/EditorService.java", "license": "apache-2.0", "size": 26656 }
[ "org.alien4cloud.tosca.editor.exception.RecoverTopologyException", "org.alien4cloud.tosca.model.templates.Topology" ]
import org.alien4cloud.tosca.editor.exception.RecoverTopologyException; import org.alien4cloud.tosca.model.templates.Topology;
import org.alien4cloud.tosca.editor.exception.*; import org.alien4cloud.tosca.model.templates.*;
[ "org.alien4cloud.tosca" ]
org.alien4cloud.tosca;
862,118
@Test public void testTrafficTreatmentEncode() { Instruction output = Instructions.createOutput(PortNumber.portNumber(0)); Instruction modL2Src = Instructions.modL2Src(MacAddress.valueOf("11:22:33:44:55:66")); Instruction modL2Dst = Instructions.modL2Dst(MacAddress.valueOf("44:55:66:77:...
void function() { Instruction output = Instructions.createOutput(PortNumber.portNumber(0)); Instruction modL2Src = Instructions.modL2Src(MacAddress.valueOf(STR)); Instruction modL2Dst = Instructions.modL2Dst(MacAddress.valueOf(STR)); MeterId meterId = MeterId.meterId(1); Instruction meter = Instructions.meterTraffic(me...
/** * Tests encoding of a traffic treatment object. */
Tests encoding of a traffic treatment object
testTrafficTreatmentEncode
{ "repo_name": "sdnwiselab/onos", "path": "core/common/src/test/java/org/onosproject/codec/impl/TrafficTreatmentCodecTest.java", "license": "apache-2.0", "size": 8607 }
[ "com.fasterxml.jackson.databind.node.ObjectNode", "org.hamcrest.MatcherAssert", "org.onlab.packet.MacAddress", "org.onosproject.net.PortNumber", "org.onosproject.net.flow.DefaultTrafficTreatment", "org.onosproject.net.flow.TrafficTreatment", "org.onosproject.net.flow.instructions.Instruction", "org.on...
import com.fasterxml.jackson.databind.node.ObjectNode; import org.hamcrest.MatcherAssert; import org.onlab.packet.MacAddress; import org.onosproject.net.PortNumber; import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.flow.instructions.Ins...
import com.fasterxml.jackson.databind.node.*; import org.hamcrest.*; import org.onlab.packet.*; import org.onosproject.net.*; import org.onosproject.net.flow.*; import org.onosproject.net.flow.instructions.*; import org.onosproject.net.meter.*;
[ "com.fasterxml.jackson", "org.hamcrest", "org.onlab.packet", "org.onosproject.net" ]
com.fasterxml.jackson; org.hamcrest; org.onlab.packet; org.onosproject.net;
2,221,472
protected void addCodepagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DestinationData_codepage_feature"), getString("_UI_PropertyDescrip...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), RfcPackage.Literals.DESTINATION_DATA__CODEPAGE, true, false, false, ItemPropertyDescriptor.GENERI...
/** * This adds a property descriptor for the Codepage feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Codepage feature.
addCodepagePropertyDescriptor
{ "repo_name": "janstey/fuse-1", "path": "components/camel-sap/org.fusesource.camel.component.sap.model.edit/src/org/fusesource/camel/component/sap/model/rfc/provider/DestinationDataItemProvider.java", "license": "apache-2.0", "size": 44078 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.fusesource.camel.component.sap.model.rfc.RfcPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.fusesource.camel.component.sap.model.rfc.RfcPackage;
import org.eclipse.emf.edit.provider.*; import org.fusesource.camel.component.sap.model.rfc.*;
[ "org.eclipse.emf", "org.fusesource.camel" ]
org.eclipse.emf; org.fusesource.camel;
2,764,031
public void fieldChange(FieldContainer container, FieldType type, Object oldValue, Object newValue);
void function(FieldContainer container, FieldType type, Object oldValue, Object newValue);
/** * Called when a field value is changed. * * @param container field container * @param type field type * @param oldValue old value * @param newValue new value */
Called when a field value is changed
fieldChange
{ "repo_name": "srnsw/xena", "path": "plugins/project/ext/src/mpxj/src/net/sf/mpxj/listener/FieldListener.java", "license": "gpl-3.0", "size": 1483 }
[ "net.sf.mpxj.FieldContainer", "net.sf.mpxj.FieldType" ]
import net.sf.mpxj.FieldContainer; import net.sf.mpxj.FieldType;
import net.sf.mpxj.*;
[ "net.sf.mpxj" ]
net.sf.mpxj;
2,869,399
public ExclusionFilter get(); public void shutdown();
ExclusionFilter get(); public void function();
/** * close any resources used by this ExclusionFilter system. */
close any resources used by this ExclusionFilter system
shutdown
{ "repo_name": "sul-dlss/openwayback", "path": "wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExclusionFilterFactory.java", "license": "apache-2.0", "size": 1265 }
[ "org.archive.wayback.resourceindex.filters.ExclusionFilter" ]
import org.archive.wayback.resourceindex.filters.ExclusionFilter;
import org.archive.wayback.resourceindex.filters.*;
[ "org.archive.wayback" ]
org.archive.wayback;
2,901,177
private ClientListenerResponse moreResults(OdbcQueryMoreResultsRequest req) { try { long queryId = req.queryId(); OdbcQueryResults results = qryResults.get(queryId); if (results == null) return new OdbcResponse(ClientListenerResponse.STATUS_FAILED, ...
ClientListenerResponse function(OdbcQueryMoreResultsRequest req) { try { long queryId = req.queryId(); OdbcQueryResults results = qryResults.get(queryId); if (results == null) return new OdbcResponse(ClientListenerResponse.STATUS_FAILED, STR + queryId); results.nextResultSet(); OdbcResultSet set = results.currentResult...
/** * {@link OdbcQueryMoreResultsRequest} command handler. * * @param req Execute query request. * @return Response. */
<code>OdbcQueryMoreResultsRequest</code> command handler
moreResults
{ "repo_name": "psadusumilli/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java", "license": "apache-2.0", "size": 23697 }
[ "java.util.List", "org.apache.ignite.internal.processors.odbc.ClientListenerResponse", "org.apache.ignite.internal.util.typedef.internal.U" ]
import java.util.List; import org.apache.ignite.internal.processors.odbc.ClientListenerResponse; import org.apache.ignite.internal.util.typedef.internal.U;
import java.util.*; import org.apache.ignite.internal.processors.odbc.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,760,674
void setConf(Configuration conf) { this.conf = conf; }
void setConf(Configuration conf) { this.conf = conf; }
/** * For testing purposes to inject Configuration dependency * @param conf to replace default */
For testing purposes to inject Configuration dependency
setConf
{ "repo_name": "sankarh/hive", "path": "cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java", "license": "apache-2.0", "size": 33328 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,562,912
public List<AssociationRule> getRules() { return m_rules; }
List<AssociationRule> function() { return m_rules; }
/** * Get the rules. * * @return the rules. */
Get the rules
getRules
{ "repo_name": "runqingz/umple", "path": "Umplificator/UmplifiedProjects/weka-umplified-0/src/main/java/weka/associations/AssociationRules.java", "license": "mit", "size": 3562 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,513,056
private void removeAccessControlEntry(final AccessControlList acList, final AccessControlEntry acEntry, final String principalName) throws RepositoryException { if (ANY_WILDCARD.equals(principalName) || acEntry.getPrincipal...
void function(final AccessControlList acList, final AccessControlEntry acEntry, final String principalName) throws RepositoryException { if (ANY_WILDCARD.equals(principalName) acEntry.getPrincipal().getName().equals(principalName)) { acList.removeAccessControlEntry(acEntry); } }
/** * Removes the specified access control entry if the given principal name matches the principal associated with the * entry. * * @param acList * the access control list to remove the entry from * @param acEntry * the entry to be potentially removed * @param pri...
Removes the specified access control entry if the given principal name matches the principal associated with the entry
removeAccessControlEntry
{ "repo_name": "tourniquet-io/tourniquet-junit", "path": "tourniquet-jcr/src/main/java/io/tourniquet/junit/jcr/rules/ContentRepository.java", "license": "apache-2.0", "size": 18376 }
[ "javax.jcr.RepositoryException", "javax.jcr.security.AccessControlEntry", "javax.jcr.security.AccessControlList" ]
import javax.jcr.RepositoryException; import javax.jcr.security.AccessControlEntry; import javax.jcr.security.AccessControlList;
import javax.jcr.*; import javax.jcr.security.*;
[ "javax.jcr" ]
javax.jcr;
1,172,490
public void writePacketData(PacketBuffer buf) throws IOException { buf.writeString(this.channel); synchronized(this.data) { //This may be access multiple times, from multiple threads, lets be safe. this.data.markReaderIndex(); buf.writeBytes((ByteBuf)this.data); this.data...
void function(PacketBuffer buf) throws IOException { buf.writeString(this.channel); synchronized(this.data) { this.data.markReaderIndex(); buf.writeBytes((ByteBuf)this.data); this.data.resetReaderIndex(); } }
/** * Writes the raw packet data to the data stream. */
Writes the raw packet data to the data stream
writePacketData
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/network/play/server/SPacketCustomPayload.java", "license": "gpl-3.0", "size": 2137 }
[ "io.netty.buffer.ByteBuf", "java.io.IOException", "net.minecraft.network.PacketBuffer" ]
import io.netty.buffer.ByteBuf; import java.io.IOException; import net.minecraft.network.PacketBuffer;
import io.netty.buffer.*; import java.io.*; import net.minecraft.network.*;
[ "io.netty.buffer", "java.io", "net.minecraft.network" ]
io.netty.buffer; java.io; net.minecraft.network;
2,777,629
public static String unescapeFileName(String fileName) { int length = fileName.length(); int percentCharacterCount = 0; for (int i = 0; i < length; i++) { if (fileName.charAt(i) == '%') { percentCharacterCount++; } } if (percentCharacterCount == 0) { return fileName; ...
static String function(String fileName) { int length = fileName.length(); int percentCharacterCount = 0; for (int i = 0; i < length; i++) { if (fileName.charAt(i) == '%') { percentCharacterCount++; } } if (percentCharacterCount == 0) { return fileName; } int expectedLength = length - percentCharacterCount * 2; StringBu...
/** * Unescapes an escaped file or directory name back to its original value. * * <p>See {@link #escapeFileName(String)} for more information. * * @param fileName File name to be unescaped. * @return The original value of the file name before it was escaped, * or null if the escaped fileName see...
Unescapes an escaped file or directory name back to its original value. See <code>#escapeFileName(String)</code> for more information
unescapeFileName
{ "repo_name": "kj2648/ExoplayerMultitrackTry", "path": "library/src/main/java/com/google/android/exoplayer/util/Util.java", "license": "apache-2.0", "size": 41013 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,697,918
private void setUploadCount() { compositeDisposable.add(okHttpJsonApiClient .getUploadCount(sessionManager.getUserName()) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::setTotalUploadCount, ...
void function() { compositeDisposable.add(okHttpJsonApiClient .getUploadCount(sessionManager.getUserName()) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::setTotalUploadCount, t -> Timber.e(t, STR) )); }
/** * to fet the total number of images uploaded */
to fet the total number of images uploaded
setUploadCount
{ "repo_name": "nicolas-raoul/apps-android-commons", "path": "app/src/main/java/fr/free/nrw/commons/quiz/QuizChecker.java", "license": "apache-2.0", "size": 6225 }
[ "io.reactivex.android.schedulers.AndroidSchedulers", "io.reactivex.schedulers.Schedulers" ]
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers;
import io.reactivex.android.schedulers.*; import io.reactivex.schedulers.*;
[ "io.reactivex.android", "io.reactivex.schedulers" ]
io.reactivex.android; io.reactivex.schedulers;
1,955,494
public static AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream) { List providers = getAudioFileWriters(); Set returnTypesSet = new HashSet(); for(int i=0; i < providers.size(); i++) { AudioFileWriter writer = (AudioFileWriter) providers.get(i); AudioF...
static AudioFileFormat.Type[] function(AudioInputStream stream) { List providers = getAudioFileWriters(); Set returnTypesSet = new HashSet(); for(int i=0; i < providers.size(); i++) { AudioFileWriter writer = (AudioFileWriter) providers.get(i); AudioFileFormat.Type[] fileTypes = writer.getAudioFileTypes(stream); for(in...
/** * Obtains the file types that the system can write from the * audio input stream specified. * @param stream the audio input stream for which audio file type support * is queried * @return array of file types. If no file types are supported, * an array of length 0 is returned. */
Obtains the file types that the system can write from the audio input stream specified
getAudioFileTypes
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java", "license": "mit", "size": 64593 }
[ "java.util.HashSet", "java.util.List", "java.util.Set", "javax.sound.sampled.spi.AudioFileWriter" ]
import java.util.HashSet; import java.util.List; import java.util.Set; import javax.sound.sampled.spi.AudioFileWriter;
import java.util.*; import javax.sound.sampled.spi.*;
[ "java.util", "javax.sound" ]
java.util; javax.sound;
2,840,060
EAttribute getRelationshipPredicate_CharacteristicTypeConceptId();
EAttribute getRelationshipPredicate_CharacteristicTypeConceptId();
/** * Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.mrcm.RelationshipPredicate#getCharacteristicTypeConceptId <em>Characteristic Type Concept Id</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Characteristic Type C...
Returns the meta object for the attribute '<code>com.b2international.snowowl.snomed.mrcm.RelationshipPredicate#getCharacteristicTypeConceptId Characteristic Type Concept Id</code>'.
getRelationshipPredicate_CharacteristicTypeConceptId
{ "repo_name": "IHTSDO/snow-owl", "path": "snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/MrcmPackage.java", "license": "apache-2.0", "size": 82769 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,566,701
public static final NetBIOSSocket createListenerSocket(int lana, NetBIOSName nbName) throws WinsockNetBIOSException, NetBIOSSocketException { // Create the listener socket, check for duplicate names when registering return NetBIOSSocket.createListenerSocket(lana, nbName, false); }
static final NetBIOSSocket function(int lana, NetBIOSName nbName) throws WinsockNetBIOSException, NetBIOSSocketException { return NetBIOSSocket.createListenerSocket(lana, nbName, false); }
/** * Create a NetBIOS socket to listen for incoming sessions on the specified LANA * * @param lana int * @param nbName NetBIOSName * @return NetBIOSSocket * @exception NetBIOSSocketException * @exception WinsockNetBIOSException */
Create a NetBIOS socket to listen for incoming sessions on the specified LANA
createListenerSocket
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/netbios/win32/NetBIOSSocket.java", "license": "lgpl-3.0", "size": 11676 }
[ "org.alfresco.jlan.netbios.NetBIOSName" ]
import org.alfresco.jlan.netbios.NetBIOSName;
import org.alfresco.jlan.netbios.*;
[ "org.alfresco.jlan" ]
org.alfresco.jlan;
487,439
private void initMetrics(ServletContext servletContext, EnumSet<DispatcherType> disps) { log.debug("Initializing Metrics registries"); servletContext.setAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE, metricRegistry); servletContext.setAttribute(MetricsServlet.METRICS_REGISTRY, metricRegistry); log....
void function(ServletContext servletContext, EnumSet<DispatcherType> disps) { log.debug(STR); servletContext.setAttribute(InstrumentedFilter.REGISTRY_ATTRIBUTE, metricRegistry); servletContext.setAttribute(MetricsServlet.METRICS_REGISTRY, metricRegistry); log.debug(STR); FilterRegistration.Dynamic metricsFilter = servl...
/** * Initializes Metrics. */
Initializes Metrics
initMetrics
{ "repo_name": "kazoompa/mica2", "path": "mica-webapp/src/main/java/org/obiba/mica/config/WebConfiguration.java", "license": "gpl-3.0", "size": 12004 }
[ "com.codahale.metrics.servlet.InstrumentedFilter", "com.codahale.metrics.servlets.MetricsServlet", "java.util.EnumSet", "javax.servlet.DispatcherType", "javax.servlet.Filter", "javax.servlet.FilterRegistration", "javax.servlet.ServletContext" ]
import com.codahale.metrics.servlet.InstrumentedFilter; import com.codahale.metrics.servlets.MetricsServlet; import java.util.EnumSet; import javax.servlet.DispatcherType; import javax.servlet.Filter; import javax.servlet.FilterRegistration; import javax.servlet.ServletContext;
import com.codahale.metrics.servlet.*; import com.codahale.metrics.servlets.*; import java.util.*; import javax.servlet.*;
[ "com.codahale.metrics", "java.util", "javax.servlet" ]
com.codahale.metrics; java.util; javax.servlet;
213,409
public static long getModFileTime( File modFile ) throws IOException { long result = -1; ZipInputStream zis = null; try { zis = new ZipInputStream( new FileInputStream( modFile ) ); ZipEntry item; while ( (item = zis.getNextEntry()) != null ) { long n = item.getTime(); if ( n > result ) resul...
static long function( File modFile ) throws IOException { long result = -1; ZipInputStream zis = null; try { zis = new ZipInputStream( new FileInputStream( modFile ) ); ZipEntry item; while ( (item = zis.getNextEntry()) != null ) { long n = item.getTime(); if ( n > result ) result = n; zis.closeEntry(); } } finally { t...
/** * Returns the latest modification time among files within a mod. * * If no files have timestamps, -1 is returned. * * Presumably, this time is measured in milliseconds since the * epoch (00:00:00 GMT, January 1, 1970). * * @see java.util.zip.ZipEntry#getTime() */
Returns the latest modification time among files within a mod. If no files have timestamps, -1 is returned. Presumably, this time is measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970)
getModFileTime
{ "repo_name": "kartoFlane/Slipstream-Mod-Manager", "path": "src/main/java/net/vhati/modmanager/core/ModUtilities.java", "license": "gpl-2.0", "size": 41043 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.util.zip.ZipEntry", "java.util.zip.ZipInputStream" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
690,197
public static PendingResult<ElevationResult> getByPoint(GeoApiContext context, LatLng point) { // Enforcing English locale on floating point number to string conversion to avoid // location parsing confusion on server side. String location = String.format(Locale.ENGLISH, "%f,%f", point.lat, point.lng); ...
static PendingResult<ElevationResult> function(GeoApiContext context, LatLng point) { String location = String.format(Locale.ENGLISH, "%f,%f", point.lat, point.lng); return context.get(SingularResponse.class, BASE, STR, location); } private static class SingularResponse implements ApiResponse<ElevationResult> { public ...
/** * Retrieve the elevation of a single point. * * <p>For more detail, please see the * <a href="https://developers.google.com/maps/documentation/elevation/#Locations">documentation</a>. */
Retrieve the elevation of a single point. For more detail, please see the documentation
getByPoint
{ "repo_name": "johnjohndoe/google-maps-services-java", "path": "src/main/java/com/google/maps/ElevationApi.java", "license": "apache-2.0", "size": 5530 }
[ "com.google.maps.internal.ApiResponse", "com.google.maps.model.ElevationResult", "com.google.maps.model.LatLng", "java.util.Locale" ]
import com.google.maps.internal.ApiResponse; import com.google.maps.model.ElevationResult; import com.google.maps.model.LatLng; import java.util.Locale;
import com.google.maps.internal.*; import com.google.maps.model.*; import java.util.*;
[ "com.google.maps", "java.util" ]
com.google.maps; java.util;
1,872,184
public void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); } /** * {@inheritDoc}
void function(Component glassPane) { getRootPane().setGlassPane(glassPane); } /** * {@inheritDoc}
/** * Sets the <code>glassPane</code> property. * This method is called by the constructor. * @param glassPane the <code>glassPane</code> object for this frame * * @see #getGlassPane * @see RootPaneContainer#setGlassPane * * @beaninfo * hidden: true * descriptio...
Sets the <code>glassPane</code> property. This method is called by the constructor
setGlassPane
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/javax/swing/JFrame.java", "license": "apache-2.0", "size": 33318 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,166,425
private Collection<String> getJars(String dir) { ArrayList<String> jars = new ArrayList<String>(); File file = new File(dir); if (file.exists()) { String[] files = file.list(JarFilter.getDefaultInstance()); if (files != null) { for (int i = 0; i < files.length; i++) { String...
Collection<String> function(String dir) { ArrayList<String> jars = new ArrayList<String>(); File file = new File(dir); if (file.exists()) { String[] files = file.list(JarFilter.getDefaultInstance()); if (files != null) { for (int i = 0; i < files.length; i++) { String filename = file.getPath() + File.separator + files[...
/** * Get a list of jars from the specified directory. * * @return a list of jars in the specified directory * @param dir the directory to search */
Get a list of jars from the specified directory
getJars
{ "repo_name": "mcwarman/interlok", "path": "adapter/src/main/java/com/adaptris/core/management/ClasspathInitialiser.java", "license": "apache-2.0", "size": 8148 }
[ "java.io.File", "java.util.ArrayList", "java.util.Collection" ]
import java.io.File; import java.util.ArrayList; import java.util.Collection;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,113,658