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
@Override public void close() throws IOException { try { super.close(); } finally { if (file != null) { file.delete(); file = null; } } } }
void function() throws IOException { try { super.close(); } finally { if (file != null) { file.delete(); file = null; } } } }
/** * Delete this underlying file when close is called. * * @throws IOException */
Delete this underlying file when close is called
close
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/textextractors/TikaTextExtractor.java", "license": "apache-2.0", "size": 25298 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
995,162
TableName[] listTableNames(String regex) throws IOException;
TableName[] listTableNames(String regex) throws IOException;
/** * List all of the names of userspace tables. * @param regex The regular expression to match against * @return TableName[] table names * @throws IOException if a remote or network exception occurs */
List all of the names of userspace tables
listTableNames
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 97415 }
[ "java.io.IOException", "org.apache.hadoop.hbase.TableName" ]
import java.io.IOException; import org.apache.hadoop.hbase.TableName;
import java.io.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
90,678
init(TestUserMode.SUPER_TENANT_ADMIN); }
init(TestUserMode.SUPER_TENANT_ADMIN); }
/** * Initializing test case * * @throws XPathExpressionException */
Initializing test case
prepare
{ "repo_name": "milindaperera/product-ei", "path": "integration/broker-tests/tests-integration/tests-amqp/src/test/java/org/wso2/mb/integration/tests/amqp/functional/HierarchicalTopicsTestCase.java", "license": "apache-2.0", "size": 14262 }
[ "org.wso2.carbon.automation.engine.context.TestUserMode" ]
import org.wso2.carbon.automation.engine.context.TestUserMode;
import org.wso2.carbon.automation.engine.context.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,446,248
private void addProperty(Property prop, int index, Map<String,Property> keys_map, String key_name) throws MalformedObjectNameException { if (keys_map.containsKey(key_name)) throw new MalformedObjectNameException("key `" + ...
void function(Property prop, int index, Map<String,Property> keys_map, String key_name) throws MalformedObjectNameException { if (keys_map.containsKey(key_name)) throw new MalformedObjectNameException(STR + key_name +STR); if (index == _kp_array.length) { Property[] tmp_prop_array = new Property[index + 10]; System.arr...
/** * Add passed property to the list at the given index * for the passed key name */
Add passed property to the list at the given index for the passed key name
addProperty
{ "repo_name": "flyzsd/java-code-snippets", "path": "ibm.jdk8/src/javax/management/ObjectName.java", "license": "mit", "size": 83036 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,909,933
public RequestTemplate query(String configKey, String... values) { queries.remove(checkNotNull(configKey, "configKey")); if (values != null && values.length > 0 && values[0] != null) { ArrayList<String> encoded = new ArrayList<String>(); for (String value : values) { encoded.add(encodeIfNo...
RequestTemplate function(String configKey, String... values) { queries.remove(checkNotNull(configKey, STR)); if (values != null && values.length > 0 && values[0] != null) { ArrayList<String> encoded = new ArrayList<String>(); for (String value : values) { encoded.add(encodeIfNotVariable(value)); } this.queries.put(enco...
/** * Replaces queries with the specified {@code configKey} with url decoded {@code values} supplied. * <br> When the {@code value} is {@code null}, all queries with the {@code configKey} are * removed. <br> <br><br><b>relationship to JAXRS 2.0</b><br> <br> Like {@code WebTarget.query}, * except the values ...
Replaces queries with the specified configKey with url decoded values supplied. When the value is null, all queries with the configKey are removed. relationship to JAXRS 2.0 Like WebTarget.query, except the values can be templatized. ex. <code> template.query(&quot;Signature&quot;, &quot;{signature}&quot;); </code>
query
{ "repo_name": "zhoupan/feign", "path": "core/src/main/java/feign/RequestTemplate.java", "license": "apache-2.0", "size": 20014 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,492,873
@VisibleForTesting protected synchronized ServerName createRegionServerStatusStub(boolean refresh) { if (rssStub != null) { return masterAddressTracker.getMasterAddress(); } ServerName sn = null; long previousLogTime = 0; RegionServerStatusService.BlockingInterface intRssStub = null; L...
synchronized ServerName function(boolean refresh) { if (rssStub != null) { return masterAddressTracker.getMasterAddress(); } ServerName sn = null; long previousLogTime = 0; RegionServerStatusService.BlockingInterface intRssStub = null; LockService.BlockingInterface intLockStub = null; boolean interrupted = false; try {...
/** * Get the current master from ZooKeeper and open the RPC connection to it. To get a fresh * connection, the current rssStub must be null. Method will block until a master is available. * You can break from this block by requesting the server stop. * @param refresh If true then master address will be rea...
Get the current master from ZooKeeper and open the RPC connection to it. To get a fresh connection, the current rssStub must be null. Method will block until a master is available. You can break from this block by requesting the server stop
createRegionServerStatusStub
{ "repo_name": "bijugs/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java", "license": "apache-2.0", "size": 150913 }
[ "java.io.IOException", "org.apache.hadoop.hbase.ServerName", "org.apache.hadoop.hbase.ipc.ServerNotRunningYetException", "org.apache.hadoop.hbase.master.HMaster", "org.apache.hadoop.hbase.master.MasterRpcServicesVersionWrapper", "org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos", "org...
import java.io.IOException; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.ipc.ServerNotRunningYetException; import org.apache.hadoop.hbase.master.HMaster; import org.apache.hadoop.hbase.master.MasterRpcServicesVersionWrapper; import org.apache.hadoop.hbase.shaded.protobuf.generated.LockServi...
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.ipc.*; import org.apache.hadoop.hbase.master.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*; import org.apache.hadoop.ipc.*; import org.apache.hbase.thirdparty.com.google.protobuf.*;
[ "java.io", "org.apache.hadoop", "org.apache.hbase" ]
java.io; org.apache.hadoop; org.apache.hbase;
1,306,605
protected void sync(final UdoDomainObject2<?> source, final Iterable<? extends UdoDomainObject2<?>> targetList) { for (UdoDomainObject2<?> target : targetList) { if (target instanceof WithApplicationTenancyPathPersisted) { final WithApplicationTenancyPathPersisted withApplication...
void function(final UdoDomainObject2<?> source, final Iterable<? extends UdoDomainObject2<?>> targetList) { for (UdoDomainObject2<?> target : targetList) { if (target instanceof WithApplicationTenancyPathPersisted) { final WithApplicationTenancyPathPersisted withApplicationTenancyPathPersisted = (WithApplicationTenancy...
/** * Convenience for subclasses. */
Convenience for subclasses
sync
{ "repo_name": "estatio/estatio", "path": "estatioapp/app/src/main/java/org/estatio/module/base/dom/apptenancy/ApplicationTenancySubscriberAlgorithm.java", "license": "apache-2.0", "size": 10105 }
[ "org.estatio.module.base.dom.UdoDomainObject2" ]
import org.estatio.module.base.dom.UdoDomainObject2;
import org.estatio.module.base.dom.*;
[ "org.estatio.module" ]
org.estatio.module;
1,475,489
public Unit getCarrier() { return carrier; }
Unit function() { return carrier; }
/** * Get the carrier unit. * * @return The carrier {@code Unit}. */
Get the carrier unit
getCarrier
{ "repo_name": "FreeCol/freecol", "path": "src/net/sf/freecol/client/gui/panel/CargoPanel.java", "license": "gpl-2.0", "size": 6796 }
[ "net.sf.freecol.common.model.Unit" ]
import net.sf.freecol.common.model.Unit;
import net.sf.freecol.common.model.*;
[ "net.sf.freecol" ]
net.sf.freecol;
1,329,893
public FilterChain getFilterChain() { return this.filterChain; }
FilterChain function() { return this.filterChain; }
/** * Get filter chain associated with the request. */
Get filter chain associated with the request
getFilterChain
{ "repo_name": "pistolove/sourcecode4junit", "path": "Source4Tomcat/src/org/apache/catalina/connector/Request.java", "license": "apache-2.0", "size": 100331 }
[ "javax.servlet.FilterChain" ]
import javax.servlet.FilterChain;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
2,903,125
public static byte[] unwrapVCF(File sourceFile, File tmpFile) throws FileNotFoundException, IOException { ZipArchiveInputStream in = null; FileOutputStream fos = null; String hmacString = null; try { in = new ZipArchiveInputStream(new FileInputStream(sourceFile)); ArchiveEntry entry; // ByteArr...
static byte[] function(File sourceFile, File tmpFile) throws FileNotFoundException, IOException { ZipArchiveInputStream in = null; FileOutputStream fos = null; String hmacString = null; try { in = new ZipArchiveInputStream(new FileInputStream(sourceFile)); ArchiveEntry entry; in.getNextEntry(); fos = new FileOutputStre...
/** * Method extracts the VCF file stored within the zipped import file to the * given destination file. It further returns the corresponding hmac stored * within the archive. * * @param sourceFile * import archive * @param tmpFile * temporary file to extract the CVF to * @retur...
Method extracts the VCF file stored within the zipped import file to the given destination file. It further returns the corresponding hmac stored within the archive
unwrapVCF
{ "repo_name": "perec-jar/PanBox", "path": "panbox-core/src/org/panbox/core/identitymgmt/VCardProtector.java", "license": "gpl-3.0", "size": 7471 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException", "org.apache.commons.compress.archivers.ArchiveEntry", "org.apache.commons.compress.archivers.zip.ZipArchiveInputStream", "org.apache.commons.io.IOUtils", "org.panbox.core.Ut...
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import org.apache.commons.compress.archivers.ArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; import org.apache.commons.io.IOUtils;...
import java.io.*; import org.apache.commons.compress.archivers.*; import org.apache.commons.compress.archivers.zip.*; import org.apache.commons.io.*; import org.panbox.core.*;
[ "java.io", "org.apache.commons", "org.panbox.core" ]
java.io; org.apache.commons; org.panbox.core;
2,107,321
private ZnodeSplitInfo getAlternateAppPath(String appId) throws Exception { for (Map.Entry<Integer, String> entry : rmAppRootHierarchies.entrySet()) { // Look for other paths int splitIndex = entry.getKey(); if (splitIndex != appIdNodeSplitIndex) { String alternatePath = getL...
ZnodeSplitInfo function(String appId) throws Exception { for (Map.Entry<Integer, String> entry : rmAppRootHierarchies.entrySet()) { int splitIndex = entry.getKey(); if (splitIndex != appIdNodeSplitIndex) { String alternatePath = getLeafZnodePath(appId, entry.getValue(), splitIndex, false); if (exists(alternatePath)) { ...
/** * Get alternate path for app id if path according to configured split index * does not exist. We look for path based on all possible split indices. * @param appId * @return a {@link ZnodeSplitInfo} object containing the path and split * index if it exists, null otherwise. * @throws Exception if...
Get alternate path for app id if path according to configured split index does not exist. We look for path based on all possible split indices
getAlternateAppPath
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java", "license": "apache-2.0", "size": 55526 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,222,164
public static ConfigurationContextService getConfigurationContextService() { return configurationContextService; }
static ConfigurationContextService function() { return configurationContextService; }
/** * method to get configurationContextService * @return configurationContextService */
method to get configurationContextService
getConfigurationContextService
{ "repo_name": "panelion/incubator-stratos", "path": "components/org.apache.stratos.usage.agent/src/main/java/org/apache/stratos/usage/agent/util/PublisherUtils.java", "license": "apache-2.0", "size": 17888 }
[ "org.wso2.carbon.utils.ConfigurationContextService" ]
import org.wso2.carbon.utils.ConfigurationContextService;
import org.wso2.carbon.utils.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,095,477
public static final String readString(byte[] bytes, String charset) throws IOException { return readString(bytes, 0, bytes.length, Charset.forName(charset)); }
static final String function(byte[] bytes, String charset) throws IOException { return readString(bytes, 0, bytes.length, Charset.forName(charset)); }
/** Convert a byte array to a string; consistently uses \n line endings * in java. The conversion is limited to the specified offset/length * pair, and uses the requested charset to decode the bytes. * * @param bytes the array of bytes to convert * @param charset the charset to use to convert ...
Convert a byte array to a string; consistently uses \n line endings in java. The conversion is limited to the specified offset/length pair, and uses the requested charset to decode the bytes
readString
{ "repo_name": "mfadili/ajiel3", "path": "src/main/java/com/google/ajiel/service/util/UtilIO.java", "license": "apache-2.0", "size": 18929 }
[ "java.io.IOException", "java.nio.charset.Charset" ]
import java.io.IOException; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,710,804
@Delete(Constants.RequestParameters.SECTION_ID) public CompletableFuture<Void> deleteSection(Principal principal, @RequestParam(value=Constants.RequestParameters.SECTION_ID, required=true) int id) { User currentUser = getUser(principal); if(!currentUser.isAdmin() && !currentUser.canManagePieces()) { ...
@Delete(Constants.RequestParameters.SECTION_ID) CompletableFuture<Void> function(Principal principal, @RequestParam(value=Constants.RequestParameters.SECTION_ID, required=true) int id) { User currentUser = getUser(principal); if(!currentUser.isAdmin() && !currentUser.canManagePieces()) { return CompletableFuture.failed...
/** * Deletes an existing {@link Section} object and all Children from the database. * * @param id Unique Id associated with the {@link Section} object to be deleted. * @return Nothing on successful deletion. * @throws EntityNotFoundException when the id does not match an existing {@link Section} object...
Deletes an existing <code>Section</code> object and all Children from the database
deleteSection
{ "repo_name": "googleinterns/role-call", "path": "backend/src/main/java/com/google/rolecall/restcontrollers/SectionManagement.java", "license": "apache-2.0", "size": 6708 }
[ "com.google.rolecall.Constants", "com.google.rolecall.models.User", "com.google.rolecall.restcontrollers.Annotations", "com.google.rolecall.restcontrollers.exceptionhandling.RequestExceptions", "com.google.rolecall.services.SectionServices", "java.security.Principal", "java.util.concurrent.CompletableFu...
import com.google.rolecall.Constants; import com.google.rolecall.models.User; import com.google.rolecall.restcontrollers.Annotations; import com.google.rolecall.restcontrollers.exceptionhandling.RequestExceptions; import com.google.rolecall.services.SectionServices; import java.security.Principal; import java.util.conc...
import com.google.rolecall.*; import com.google.rolecall.models.*; import com.google.rolecall.restcontrollers.*; import com.google.rolecall.restcontrollers.exceptionhandling.*; import com.google.rolecall.services.*; import java.security.*; import java.util.concurrent.*; import org.springframework.web.bind.annotation.*;
[ "com.google.rolecall", "java.security", "java.util", "org.springframework.web" ]
com.google.rolecall; java.security; java.util; org.springframework.web;
2,188,037
public ChannelFuture writePushPromise(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding, ChannelPromise promise) { try { if (connection.isGoAway()) { throw protocolError("Sending push promise after connection going away."...
ChannelFuture function(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding, ChannelPromise promise) { try { if (connection.isGoAway()) { throw protocolError(STR); } Http2Stream stream = connection.requireStream(streamId); connection.local().reservePushStream(promisedStreamId...
/** * Writes (and flushes) the given {@code PUSH_PROMISE} to the remote endpoint. */
Writes (and flushes) the given PUSH_PROMISE to the remote endpoint
writePushPromise
{ "repo_name": "kamyu104/netty", "path": "codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandler.java", "license": "apache-2.0", "size": 45115 }
[ "io.netty.channel.ChannelFuture", "io.netty.channel.ChannelHandlerContext", "io.netty.channel.ChannelPromise", "io.netty.handler.codec.http2.Http2Exception" ]
import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPromise; import io.netty.handler.codec.http2.Http2Exception;
import io.netty.channel.*; import io.netty.handler.codec.http2.*;
[ "io.netty.channel", "io.netty.handler" ]
io.netty.channel; io.netty.handler;
866,446
public void openPath(String path, I_CmsOuTreeType type, CmsUUID groupID) { if (type == null) { return; } try { expandItem(m_rootOu); String[] pathP = path.split("/"); String complPath = ""; for (String subP : pathP) { ...
void function(String path, I_CmsOuTreeType type, CmsUUID groupID) { if (type == null) { return; } try { expandItem(m_rootOu); String[] pathP = path.split("/"); String complPath = STR/STRUnable to read OU", e); } }
/** * Opens given path.<p> * * @param path ou path (=ou-name) * @param type type (ou,group or user) * @param groupID id of group (optional) */
Opens given path
openPath
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/ui/apps/user/CmsOuTree.java", "license": "lgpl-2.1", "size": 17069 }
[ "org.opencms.util.CmsUUID" ]
import org.opencms.util.CmsUUID;
import org.opencms.util.*;
[ "org.opencms.util" ]
org.opencms.util;
2,425,711
public CppModel setLinkTargetType(LinkTargetType linkType) { this.linkType = linkType; return this; }
CppModel function(LinkTargetType linkType) { this.linkType = linkType; return this; }
/** * Sets the link type used for the link actions. Note that only static links are supported at this * time. */
Sets the link type used for the link actions. Note that only static links are supported at this time
setLinkTargetType
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java", "license": "apache-2.0", "size": 35138 }
[ "com.google.devtools.build.lib.rules.cpp.Link" ]
import com.google.devtools.build.lib.rules.cpp.Link;
import com.google.devtools.build.lib.rules.cpp.*;
[ "com.google.devtools" ]
com.google.devtools;
1,890,571
public Object readFromRowIntoObject(AbstractRecord databaseRow, JoinedAttributeManager joinManager, Object targetObject, CacheKey parentCacheKey, ObjectBuildingQuery sourceQuery, AbstractSession executionSession, boolean isTargetProtected) throws DatabaseException { ContainerPolicy cp = getContainerPolicy...
Object function(AbstractRecord databaseRow, JoinedAttributeManager joinManager, Object targetObject, CacheKey parentCacheKey, ObjectBuildingQuery sourceQuery, AbstractSession executionSession, boolean isTargetProtected) throws DatabaseException { ContainerPolicy cp = getContainerPolicy(); Object container = null; if (r...
/** * INTERNAL: * Extract the primary key values from the row, then create an * org.eclipse.persistence.internal.oxm.Reference instance and stored it * on the session's org.eclipse.persistence.internal.oxm.ReferenceResolver. */
Extract the primary key values from the row, then create an org.eclipse.persistence.internal.oxm.Reference instance and stored it on the session's org.eclipse.persistence.internal.oxm.ReferenceResolver
readFromRowIntoObject
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/mappings/XMLCollectionReferenceMapping.java", "license": "epl-1.0", "size": 23980 }
[ "org.eclipse.persistence.exceptions.DatabaseException", "org.eclipse.persistence.internal.identitymaps.CacheKey", "org.eclipse.persistence.internal.queries.ContainerPolicy", "org.eclipse.persistence.internal.queries.JoinedAttributeManager", "org.eclipse.persistence.internal.sessions.AbstractRecord", "org....
import org.eclipse.persistence.exceptions.DatabaseException; import org.eclipse.persistence.internal.identitymaps.CacheKey; import org.eclipse.persistence.internal.queries.ContainerPolicy; import org.eclipse.persistence.internal.queries.JoinedAttributeManager; import org.eclipse.persistence.internal.sessions.AbstractRe...
import org.eclipse.persistence.exceptions.*; import org.eclipse.persistence.internal.identitymaps.*; import org.eclipse.persistence.internal.queries.*; import org.eclipse.persistence.internal.sessions.*; import org.eclipse.persistence.oxm.record.*; import org.eclipse.persistence.queries.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,049,532
@ServiceMethod(returns = ReturnType.SINGLE) public Response<ScriptExecutionInner> getWithResponse( String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).bloc...
@ServiceMethod(returns = ReturnType.SINGLE) Response<ScriptExecutionInner> function( String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).block(); }
/** * Get an script execution by name in a private cloud. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param scriptExecutionName Name of the user-invoked script execution resource. * @para...
Get an script execution by name in a private cloud
getWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java", "license": "mit", "size": 69310 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.avs.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,778,135
public ImmutableSet<ChunkPos> getChunkList() { return ImmutableSet.copyOf(requestedChunks); } } public static class ForceChunkEvent extends Event { private final Ticket ticket; private final ChunkPos location; public ForceChunkEvent(Ticket ticket, Ch...
ImmutableSet<ChunkPos> function() { return ImmutableSet.copyOf(requestedChunks); } } public static class ForceChunkEvent extends Event { private final Ticket ticket; private final ChunkPos location; public ForceChunkEvent(Ticket ticket, ChunkPos location) { this.ticket = ticket; this.location = location; }
/** * Gets a list of requested chunks for this ticket. */
Gets a list of requested chunks for this ticket
getChunkList
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraftforge/common/ForgeChunkManager.java", "license": "lgpl-2.1", "size": 44787 }
[ "com.google.common.collect.ImmutableSet", "net.minecraft.util.math.ChunkPos", "net.minecraftforge.fml.common.eventhandler.Event" ]
import com.google.common.collect.ImmutableSet; import net.minecraft.util.math.ChunkPos; import net.minecraftforge.fml.common.eventhandler.Event;
import com.google.common.collect.*; import net.minecraft.util.math.*; import net.minecraftforge.fml.common.eventhandler.*;
[ "com.google.common", "net.minecraft.util", "net.minecraftforge.fml" ]
com.google.common; net.minecraft.util; net.minecraftforge.fml;
2,743,881
EClass getAmbientTemperature();
EClass getAmbientTemperature();
/** * Returns the meta object for class '{@link org.openhab.binding.tinkerforge.internal.model.AmbientTemperature <em>Ambient Temperature</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Ambient Temperature</em>'. * @see org.openhab.binding.tinkerforge.in...
Returns the meta object for class '<code>org.openhab.binding.tinkerforge.internal.model.AmbientTemperature Ambient Temperature</code>'.
getAmbientTemperature
{ "repo_name": "gregfinley/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/ModelPackage.java", "license": "epl-1.0", "size": 665067 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
64,093
public void addHandler(ActivityHandler inHandler) { Log.d(TAG, String .format("The List of Handlers will be added by %s Handler" + inHandler.toString())); handlerList.add(inHandler); }
void function(ActivityHandler inHandler) { Log.d(TAG, String .format(STR + inHandler.toString())); handlerList.add(inHandler); }
/** * Method addHandler() used to add the new ActivityHandler to the current * main list of handlers * * @param inHandler * The ActivityHandler */
Method addHandler() used to add the new ActivityHandler to the current main list of handlers
addHandler
{ "repo_name": "PhamPhi/birdy_task", "path": "src/com/frm/bdTask/BirdyApp.java", "license": "gpl-2.0", "size": 6316 }
[ "android.util.Log", "com.frm.bdTask.controls.ActivityHandler" ]
import android.util.Log; import com.frm.bdTask.controls.ActivityHandler;
import android.util.*; import com.frm.*;
[ "android.util", "com.frm" ]
android.util; com.frm;
1,238,109
@Basic @Column(name = "NO_VOTES", precision = 20) public long getNoVotes() { return noVotes; }
@Column(name = STR, precision = 20) long function() { return noVotes; }
/** * Gets the value of the noVotes property. * */
Gets the value of the noVotes property
getNoVotes
{ "repo_name": "Hack23/cia", "path": "model.internal.application.user.impl/src/main/java/com/hack23/cia/model/internal/application/data/committee/impl/ViewRiksdagenVoteDataBallotPoliticianSummary.java", "license": "apache-2.0", "size": 36311 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,472,851
public static boolean deleteFileFromMediaDB(Context context, String filePath) { LogUtils.i(TAG, "<deleteFileFromMediaDB> begin"); if (null == context) { LogUtils.e(TAG, "<deleteFileFromMediaDB> context is null"); return false; } if (null == filePath) { ...
static boolean function(Context context, String filePath) { LogUtils.i(TAG, STR); if (null == context) { LogUtils.e(TAG, STR); return false; } if (null == filePath) { LogUtils.i(TAG, STR); return false; } ContentResolver resolver = context.getContentResolver(); Uri base = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; fi...
/** * delete file from Media database * * @param context * the context that call this function * @param filePath * the file path to to deleted */
delete file from Media database
deleteFileFromMediaDB
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/SoundRecorder/src/com/android/soundrecorder/SoundRecorderUtils.java", "license": "gpl-2.0", "size": 4579 }
[ "android.content.ContentResolver", "android.content.Context", "android.net.Uri", "android.provider.MediaStore" ]
import android.content.ContentResolver; import android.content.Context; import android.net.Uri; import android.provider.MediaStore;
import android.content.*; import android.net.*; import android.provider.*;
[ "android.content", "android.net", "android.provider" ]
android.content; android.net; android.provider;
2,315,505
void skip() throws IOException;
void skip() throws IOException;
/** * Skips the song */
Skips the song
skip
{ "repo_name": "zombachu/DubTrack4J", "path": "src/main/java/io/sponges/dubtrack4j/framework/Song.java", "license": "mit", "size": 2106 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,366,328
public static CallHandler findCall(String callId) { if (Logger.logLevel >= Logger.LOG_DETAIL) { Logger.println("findCall: looking for " + callId + ", " + activeCalls.size() + " active calls"); } synchronized(activeCalls) { for (int i = 0; i < activeCalls.size(); i++) { CallHa...
static CallHandler function(String callId) { if (Logger.logLevel >= Logger.LOG_DETAIL) { Logger.println(STR + callId + STR + activeCalls.size() + STR); } synchronized(activeCalls) { for (int i = 0; i < activeCalls.size(); i++) { CallHandler call = (CallHandler)activeCalls.elementAt(i); CallParticipant cp = call.getCall...
/** * Find a call by callId. * * Calls are kept in the activeCalls list and uniquely identified * by <callId>::<name>@<phoneNumber> for a phone call and * * This method searches for a call with the callId. */
Find a call by callId. Calls are kept in the activeCalls list and uniquely identified by ::@ for a phone call and This method searches for a call with the callId
findCall
{ "repo_name": "damirkusar/jvoicebridge", "path": "voip/src/com/sun/voip/server/CallHandler.java", "license": "gpl-2.0", "size": 30871 }
[ "com.sun.voip.CallParticipant", "com.sun.voip.Logger" ]
import com.sun.voip.CallParticipant; import com.sun.voip.Logger;
import com.sun.voip.*;
[ "com.sun.voip" ]
com.sun.voip;
691,333
public static boolean addLinks(@NonNull Spannable text, @NonNull Pattern pattern, @Nullable String scheme) { if (shouldAddLinksFallbackToFramework()) { return Linkify.addLinks(text, pattern, scheme); } return addLinks(text, pattern, scheme, null, null, null); }
static boolean function(@NonNull Spannable text, @NonNull Pattern pattern, @Nullable String scheme) { if (shouldAddLinksFallbackToFramework()) { return Linkify.addLinks(text, pattern, scheme); } return addLinks(text, pattern, scheme, null, null, null); }
/** * Applies a regex to a Spannable turning the matches into * links. * * @param text Spannable whose text is to be marked-up with links * @param pattern Regex pattern to be used for finding links * @param scheme URL scheme string (eg <code>http://</code>) to be ...
Applies a regex to a Spannable turning the matches into links
addLinks
{ "repo_name": "AndroidX/androidx", "path": "core/core/src/main/java/androidx/core/text/util/LinkifyCompat.java", "license": "apache-2.0", "size": 20796 }
[ "android.text.Spannable", "android.text.util.Linkify", "androidx.annotation.NonNull", "androidx.annotation.Nullable", "java.util.regex.Pattern" ]
import android.text.Spannable; import android.text.util.Linkify; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.util.regex.Pattern;
import android.text.*; import android.text.util.*; import androidx.annotation.*; import java.util.regex.*;
[ "android.text", "androidx.annotation", "java.util" ]
android.text; androidx.annotation; java.util;
422,507
private void setTimestampInternal(int parameterIndex, Timestamp x, Calendar targetCalendar, TimeZone tz, boolean rollForward) throws SQLException { if (x == null) { setNull(parameterIndex, java.sql.Types.TIMESTAMP); } else { checkClosed(); if (!this.useLegacyDate...
void function(int parameterIndex, Timestamp x, Calendar targetCalendar, TimeZone tz, boolean rollForward) throws SQLException { if (x == null) { setNull(parameterIndex, java.sql.Types.TIMESTAMP); } else { checkClosed(); if (!this.useLegacyDatetimeCode) { newSetTimestampInternal(parameterIndex, x, targetCalendar); } els...
/** * Set a parameter to a java.sql.Timestamp value. The driver converts this * to a SQL TIMESTAMP value when it sends it to the database. * * @param parameterIndex * the first parameter is 1, the second is 2, ... * @param x * the parameter value * @param t...
Set a parameter to a java.sql.Timestamp value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database
setTimestampInternal
{ "repo_name": "mwaylabs/mysql-connector-j", "path": "src/com/mysql/jdbc/PreparedStatement.java", "license": "gpl-2.0", "size": 199515 }
[ "java.sql.SQLException", "java.sql.Timestamp", "java.sql.Types", "java.text.SimpleDateFormat", "java.util.Calendar", "java.util.Locale", "java.util.TimeZone" ]
import java.sql.SQLException; import java.sql.Timestamp; import java.sql.Types; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone;
import java.sql.*; import java.text.*; import java.util.*;
[ "java.sql", "java.text", "java.util" ]
java.sql; java.text; java.util;
2,860,016
public void deleteAnchor(RemoveAnchors removeAnchors);
void function(RemoveAnchors removeAnchors);
/** * Delete the given list of direct anchors. * * @param removeAnchors */
Delete the given list of direct anchors
deleteAnchor
{ "repo_name": "AurionProject/Aurion", "path": "Product/Production/Adapters/General/CONNECTAdminGUI/src/main/java/gov/hhs/fha/nhinc/admingui/services/DirectService.java", "license": "bsd-3-clause", "size": 6917 }
[ "org.nhind.config.RemoveAnchors" ]
import org.nhind.config.RemoveAnchors;
import org.nhind.config.*;
[ "org.nhind.config" ]
org.nhind.config;
2,585,452
void enterSafeMode(boolean resourcesLow) throws IOException { writeLock(); try { // Stop the secret manager, since rolling the master key would // try to write to the edit log stopSecretManager(); // Ensure that any concurrent operations have been fully synced // before entering...
void enterSafeMode(boolean resourcesLow) throws IOException { writeLock(); try { stopSecretManager(); boolean isEditlogOpenForWrite = getEditLog().isOpenForWrite(); if (isEditlogOpenForWrite) { getEditLog().logSyncAll(); } if (!isInSafeMode()) { safeMode = new SafeModeInfo(resourcesLow); return; } if (resourcesLow) { s...
/** * Enter safe mode. If resourcesLow is false, then we assume it is manual * @throws IOException */
Enter safe mode. If resourcesLow is false, then we assume it is manual
enterSafeMode
{ "repo_name": "yncxcw/Yarn-SBlock", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 338725 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,318,675
protected boolean areParametersQueryInvariant() throws StandardException { return (getVariantTypeOfParams() == Qualifier.QUERY_INVARIANT); }
boolean function() throws StandardException { return (getVariantTypeOfParams() == Qualifier.QUERY_INVARIANT); }
/** * Return whether or not all of the parameters to this node are * QUERY_INVARIANT or CONSTANT. This is useful for VTIs - a VTI is a candidate * for materialization if all of its parameters are QUERY_INVARIANT or CONSTANT * * @return Whether or not all of the parameters to this node are QUERY_INVARIANT or ...
Return whether or not all of the parameters to this node are QUERY_INVARIANT or CONSTANT. This is useful for VTIs - a VTI is a candidate for materialization if all of its parameters are QUERY_INVARIANT or CONSTANT
areParametersQueryInvariant
{ "repo_name": "scnakandala/derby", "path": "java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java", "license": "apache-2.0", "size": 47051 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.store.access.Qualifier" ]
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.store.access.Qualifier;
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.store.access.*;
[ "org.apache.derby" ]
org.apache.derby;
631,367
@NotNull @Override public DecoratorFactory getDecoratorFactory() { return CachingDecoratorFactory.getInstance(); }
DecoratorFactory function() { return CachingDecoratorFactory.getInstance(); }
/** * Retrieves the {@link DecoratorFactory} instance. * @return such instance. */
Retrieves the <code>DecoratorFactory</code> instance
getDecoratorFactory
{ "repo_name": "rydnr/queryj", "path": "queryj-template-packaging/src/main/java/org/acmsl/queryj/templates/packaging/TemplatePackagingTemplateGenerator.java", "license": "gpl-2.0", "size": 2789 }
[ "org.acmsl.queryj.metadata.CachingDecoratorFactory", "org.acmsl.queryj.metadata.DecoratorFactory" ]
import org.acmsl.queryj.metadata.CachingDecoratorFactory; import org.acmsl.queryj.metadata.DecoratorFactory;
import org.acmsl.queryj.metadata.*;
[ "org.acmsl.queryj" ]
org.acmsl.queryj;
2,551,172
EAttribute getParam_Name();
EAttribute getParam_Name();
/** * Returns the meta object for the attribute list '{@link org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Param#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute list '<em>Name</em>'. * @see org.eclipse.xtext.parsetree.fo...
Returns the meta object for the attribute list '<code>org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Param#getName Name</code>'.
getParam_Name
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/formatter/formattertestlanguage/FormattertestlanguagePackage.java", "license": "epl-1.0", "size": 56203 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
37,244
public boolean tryMoveToEntityLiving(Entity p_75497_1_, double p_75497_2_) { PathEntity var4 = this.getPathToEntityLiving(p_75497_1_); return var4 != null ? this.setPath(var4, p_75497_2_) : false; }
boolean function(Entity p_75497_1_, double p_75497_2_) { PathEntity var4 = this.getPathToEntityLiving(p_75497_1_); return var4 != null ? this.setPath(var4, p_75497_2_) : false; }
/** * Try to find and set a path to EntityLiving. Returns true if successful. */
Try to find and set a path to EntityLiving. Returns true if successful
tryMoveToEntityLiving
{ "repo_name": "Myrninvollo/Server", "path": "src/net/minecraft/pathfinding/PathNavigate.java", "license": "gpl-2.0", "size": 17589 }
[ "net.minecraft.entity.Entity" ]
import net.minecraft.entity.Entity;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
2,660,654
public void debug(ShapeRenderer gizmo) { for(Actor actor : this.actors) { actor.debug(gizmo); } }
void function(ShapeRenderer gizmo) { for(Actor actor : this.actors) { actor.debug(gizmo); } }
/** * Draw debug information of the layer. * Performs debug information drawing on all actors. * @param gizmo */
Draw debug information of the layer. Performs debug information drawing on all actors
debug
{ "repo_name": "konrad92/clockwork-2d", "path": "src/vault/clockwork/system/Scene.java", "license": "mit", "size": 9403 }
[ "com.badlogic.gdx.graphics.glutils.ShapeRenderer" ]
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.graphics.glutils.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
2,761,494
public net.jxta.document.Element getParent( ) { Node node = getAssocNode(); if( node.getOwnerDocument().equals( node ) ) return new DOMXMLElement( root, node ); else return new DOMXMLElement( root, node.getParentNode() ); }
net.jxta.document.Element function( ) { Node node = getAssocNode(); if( node.getOwnerDocument().equals( node ) ) return new DOMXMLElement( root, node ); else return new DOMXMLElement( root, node.getParentNode() ); }
/** * Get the parent of this element. If the element has not been inserted into * the Document then null is returned. If this element is the root of the * Document then it returns itself. **/
Get the parent of this element. If the element has not been inserted into the Document then null is returned. If this element is the root of the Document then it returns itself
getParent
{ "repo_name": "idega/net.jxta", "path": "src/java/net/jxta/impl/document/DOMXMLElement.java", "license": "gpl-3.0", "size": 12364 }
[ "org.w3c.dom.Element", "org.w3c.dom.Node" ]
import org.w3c.dom.Element; import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,935,140
private int processPollFds() throws IOException { if (pollFds.get(0).revents == POLLIN) { // Read bytes from the wakeup pipe until the pipe is empty. byte[] buffer = new byte[8]; while (IoBridge.read(wakeupIn, buffer, 0, 1) > 0) { } } int read...
int function() throws IOException { if (pollFds.get(0).revents == POLLIN) { byte[] buffer = new byte[8]; while (IoBridge.read(wakeupIn, buffer, 0, 1) > 0) { } } int readyKeyCount = 0; for (int i = 1; i < pollFds.size(); ++i) { StructPollfd pollFd = pollFds.get(i); if (pollFd.revents == 0) { continue; } if (pollFd.fd ==...
/** * Updates the key ready ops and selected key set. */
Updates the key ready ops and selected key set
processPollFds
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/java/nio/SelectorImpl.java", "license": "gpl-3.0", "size": 13287 }
[ "android.system.StructPollfd", "java.io.IOException" ]
import android.system.StructPollfd; import java.io.IOException;
import android.system.*; import java.io.*;
[ "android.system", "java.io" ]
android.system; java.io;
768,450
public void start(PluginContext ctx) throws IgniteCheckedException;
void function(PluginContext ctx) throws IgniteCheckedException;
/** * Starts grid component. * * @param ctx Plugin context. * @throws IgniteCheckedException Throws in case of any errors. */
Starts grid component
start
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java", "license": "apache-2.0", "size": 5899 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,696,103
public void removeGeofences() { // Start a request to add geofences mRequestType = REQUEST_TYPE.REMOVE_ALL; if (!servicesConnected()) { return; } mLocationClient = new LocationClient(this, this, this); // If a request is not already under...
void function() { mRequestType = REQUEST_TYPE.REMOVE_ALL; if (!servicesConnected()) { return; } mLocationClient = new LocationClient(this, this, this); if (!mInProgress) { mInProgress = true; mLocationClient.connect(); } else { } }
/** * Start a request for geofence monitoring by calling * LocationClient.connect(). */
Start a request for geofence monitoring by calling LocationClient.connect()
removeGeofences
{ "repo_name": "xran-deex/Toury-Android", "path": "src/twilight/of/the/devs/toury/MainActivity.java", "license": "mit", "size": 30836 }
[ "com.google.android.gms.location.LocationClient" ]
import com.google.android.gms.location.LocationClient;
import com.google.android.gms.location.*;
[ "com.google.android" ]
com.google.android;
1,597,032
Observable<ServiceResponse<Void>> head408Async();
Observable<ServiceResponse<Void>> head408Async();
/** * Return 408 status code, then 200 after retry. * * @return the {@link ServiceResponse} object if successful. */
Return 408 status code, then 200 after retry
head408Async
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/HttpRetrys.java", "license": "mit", "size": 12804 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,411,561
@JsonAnyGetter public Map<String, Object> additionalProperties() { return this.additionalProperties; }
Map<String, Object> function() { return this.additionalProperties; }
/** * Get the additionalProperties property: (Deprecated. Please use LogSettings) Log storage settings. * * @return the additionalProperties value. */
Get the additionalProperties property: (Deprecated. Please use LogSettings) Log storage settings
additionalProperties
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/LogStorageSettings.java", "license": "mit", "size": 5997 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,861,824
public void testNavalUnitMoveToTileWithSettlement() { // For this test we need a different map Map map = getCoastTestMap(plainsType); game.setMap(map); Tile unitTile = map.getTile(10, 9); assertFalse("Unit tile should be ocean",unitTile.isLand()); Unit galleon = new...
void function() { Map map = getCoastTestMap(plainsType); game.setMap(map); Tile unitTile = map.getTile(10, 9); assertFalse(STR,unitTile.isLand()); Unit galleon = new ServerUnit(game, unitTile, game.getCurrentPlayer(), galleonType); Tile settlementTile = map.getTile(9, 9); assertTrue(STR, settlementTile.isLand()); FreeC...
/** * Checks possible move of a naval unit to a tile with a settlement */
Checks possible move of a naval unit to a tile with a settlement
testNavalUnitMoveToTileWithSettlement
{ "repo_name": "edijman/SOEN_6431_Colonization_Game", "path": "test/src/net/sf/freecol/common/model/BaseCostDeciderTest.java", "license": "gpl-2.0", "size": 10258 }
[ "net.sf.freecol.common.model.Map", "net.sf.freecol.common.model.Stance", "net.sf.freecol.common.model.pathfinding.CostDecider", "net.sf.freecol.common.model.pathfinding.CostDeciders", "net.sf.freecol.common.option.BooleanOption", "net.sf.freecol.server.model.ServerUnit", "net.sf.freecol.util.test.FreeCo...
import net.sf.freecol.common.model.Map; import net.sf.freecol.common.model.Stance; import net.sf.freecol.common.model.pathfinding.CostDecider; import net.sf.freecol.common.model.pathfinding.CostDeciders; import net.sf.freecol.common.option.BooleanOption; import net.sf.freecol.server.model.ServerUnit; import net.sf.free...
import net.sf.freecol.common.model.*; import net.sf.freecol.common.model.pathfinding.*; import net.sf.freecol.common.option.*; import net.sf.freecol.server.model.*; import net.sf.freecol.util.test.*;
[ "net.sf.freecol" ]
net.sf.freecol;
953,486
File getProjectDir();
File getProjectDir();
/** * The root directory of the included build. */
The root directory of the included build
getProjectDir
{ "repo_name": "gstevey/gradle", "path": "subprojects/core-api/src/main/java/org/gradle/api/initialization/IncludedBuild.java", "license": "apache-2.0", "size": 1228 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,484,007
public void copy() { GWTFolder folderToCopy = (GWTFolder) actualItem.getUserObject(); folderSelectPopup.setEntryPoint(FolderSelectPopup.ENTRYPOINT_MAIL); folderSelectPopup.setToCopy(folderToCopy); showDirectorySelectPopup(); hideMenuPopup(); }
void function() { GWTFolder folderToCopy = (GWTFolder) actualItem.getUserObject(); folderSelectPopup.setEntryPoint(FolderSelectPopup.ENTRYPOINT_MAIL); folderSelectPopup.setToCopy(folderToCopy); showDirectorySelectPopup(); hideMenuPopup(); }
/** * Copy folder on file browser ( only trash mode ) */
Copy folder on file browser ( only trash mode )
copy
{ "repo_name": "codelibs/n2dms", "path": "src/main/java/com/openkm/frontend/client/widget/mail/MailTree.java", "license": "gpl-2.0", "size": 2846 }
[ "com.openkm.frontend.client.bean.GWTFolder", "com.openkm.frontend.client.widget.foldertree.FolderSelectPopup" ]
import com.openkm.frontend.client.bean.GWTFolder; import com.openkm.frontend.client.widget.foldertree.FolderSelectPopup;
import com.openkm.frontend.client.bean.*; import com.openkm.frontend.client.widget.foldertree.*;
[ "com.openkm.frontend" ]
com.openkm.frontend;
996,018
@Test(expectedExceptions = { IndexOutOfBoundsException.class }) public void testInsertByteArrayPortionNegativeOffset() throws Exception { ByteStringBuffer buffer = new ByteStringBuffer(); buffer.insert(0, new byte[0], -1, 0); }
@Test(expectedExceptions = { IndexOutOfBoundsException.class }) void function() throws Exception { ByteStringBuffer buffer = new ByteStringBuffer(); buffer.insert(0, new byte[0], -1, 0); }
/** * Provides test coverage for the {@code insert} method variant that takes a * portion of a byte array with a negative offset. * * @throws Exception If an unexpected problem occurs. */
Provides test coverage for the insert method variant that takes a portion of a byte array with a negative offset
testInsertByteArrayPortionNegativeOffset
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/util/ByteStringBufferTestCase.java", "license": "gpl-2.0", "size": 141047 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
2,813,148
OffsetDateTime nextResetTime();
OffsetDateTime nextResetTime();
/** * Gets the nextResetTime property: Next reset time of usage. * * @return the nextResetTime value. */
Gets the nextResetTime property: Next reset time of usage
nextResetTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupManagementUsage.java", "license": "mit", "size": 1530 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,768,703
EClass getBip();
EClass getBip();
/** * Returns the meta object for class '{@link robotG.robot.Bip <em>Bip</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Bip</em>'. * @see robotG.robot.Bip * @generated */
Returns the meta object for class '<code>robotG.robot.Bip Bip</code>'.
getBip
{ "repo_name": "bseznec/TP4INFO", "path": "IDM/IDM/src/robotG/robot/RobotPackage.java", "license": "gpl-3.0", "size": 24851 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
71,091
@Override public void removeVolumes( final Collection<StorageLocation> storageLocsToRemove, boolean clearFailure) { Collection<StorageLocation> storageLocationsToRemove = new ArrayList<>(storageLocsToRemove); Map<String, List<ReplicaInfo>> blkToInvalidate = new HashMap<>(); List<Stri...
void function( final Collection<StorageLocation> storageLocsToRemove, boolean clearFailure) { Collection<StorageLocation> storageLocationsToRemove = new ArrayList<>(storageLocsToRemove); Map<String, List<ReplicaInfo>> blkToInvalidate = new HashMap<>(); List<String> storageToRemove = new ArrayList<>(); try (AutoCloseabl...
/** * Removes a set of volumes from FsDataset. * @param storageLocsToRemove a set of * {@link StorageLocation}s for each volume. * @param clearFailure set true to clear failure information. */
Removes a set of volumes from FsDataset
removeVolumes
{ "repo_name": "ronny-macmaster/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java", "license": "apache-2.0", "size": 117788 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.HashMap", "java.util.Iterator", "java.util.List", "java.util.Map", "org.apache.hadoop.hdfs.server.common.Storage", "org.apache.hadoop.hdfs.server.datanode.ReplicaInfo", "org.apache.hadoop.hdfs.server.datanode.StorageLocation", "org.apache.h...
import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.hadoop.hdfs.server.common.Storage; import org.apache.hadoop.hdfs.server.datanode.ReplicaInfo; import org.apache.hadoop.hdfs.server.datanode.Storage...
import java.util.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.datanode.*; import org.apache.hadoop.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,362,264
protected Pattern getPattern() { return THE_PATTERN; }
Pattern function() { return THE_PATTERN; }
/** * Returns the regexp for this datatype. * * @return the regexp for this datatype * @see nu.validator.datatype.AbstractDatetime#getPattern() */
Returns the regexp for this datatype
getPattern
{ "repo_name": "YOTOV-LIMITED/validator", "path": "src/nu/validator/datatype/Date.java", "license": "mit", "size": 2508 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,512,576
public Single<List<generated.rx3.reactive.guice.tables.pojos.Something>> findManyBySomejsonobject(Collection<JsonObject> values) { return findManyByCondition(Something.SOMETHING.SOMEJSONOBJECT.in(values)); }
Single<List<generated.rx3.reactive.guice.tables.pojos.Something>> function(Collection<JsonObject> values) { return findManyByCondition(Something.SOMETHING.SOMEJSONOBJECT.in(values)); }
/** * Find records that have <code>someJsonObject IN (values)</code> * asynchronously */
Find records that have <code>someJsonObject IN (values)</code> asynchronously
findManyBySomejsonobject
{ "repo_name": "jklingsporn/vertx-jooq", "path": "vertx-jooq-generate/src/test/java/generated/rx3/reactive/guice/tables/daos/SomethingDao.java", "license": "mit", "size": 15145 }
[ "io.reactivex.rxjava3.core.Single", "io.vertx.core.json.JsonObject", "java.util.Collection", "java.util.List" ]
import io.reactivex.rxjava3.core.Single; import io.vertx.core.json.JsonObject; import java.util.Collection; import java.util.List;
import io.reactivex.rxjava3.core.*; import io.vertx.core.json.*; import java.util.*;
[ "io.reactivex.rxjava3", "io.vertx.core", "java.util" ]
io.reactivex.rxjava3; io.vertx.core; java.util;
635,310
@NumInRange(min = 5) public int getMinPasswordLength() { return minPasswordLength; }
@NumInRange(min = 5) int function() { return minPasswordLength; }
/** * Gets the min password length. * * @return the min password length */
Gets the min password length
getMinPasswordLength
{ "repo_name": "NCIP/caaers", "path": "caAERS/software/core/src/main/java/gov/nih/nci/cabig/caaers/domain/security/passwordpolicy/PasswordCreationPolicy.java", "license": "bsd-3-clause", "size": 3406 }
[ "gov.nih.nci.cabig.caaers.validation.annotation.NumInRange" ]
import gov.nih.nci.cabig.caaers.validation.annotation.NumInRange;
import gov.nih.nci.cabig.caaers.validation.annotation.*;
[ "gov.nih.nci" ]
gov.nih.nci;
2,055,888
public void enableErasureCodingPolicy(String ecPolicyName) throws IOException { dfs.enableErasureCodingPolicy(ecPolicyName); }
void function(String ecPolicyName) throws IOException { dfs.enableErasureCodingPolicy(ecPolicyName); }
/** * Enable erasure coding policy. * * @param ecPolicyName The name of the policy to be enabled. * @throws IOException */
Enable erasure coding policy
enableErasureCodingPolicy
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/HdfsAdmin.java", "license": "apache-2.0", "size": 23787 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
959,058
public ObjectType getTopMostDefiningType(String propertyName) { Preconditions.checkState(isConstructor() || isInterface()); Preconditions.checkArgument(getInstanceType().hasProperty(propertyName)); FunctionType ctor = this; if (isInterface()) { return getTopDefiningInterface(getInstanceType(), ...
ObjectType function(String propertyName) { Preconditions.checkState(isConstructor() isInterface()); Preconditions.checkArgument(getInstanceType().hasProperty(propertyName)); FunctionType ctor = this; if (isInterface()) { return getTopDefiningInterface(getInstanceType(), propertyName); } ObjectType topInstanceType = nul...
/** * Given a constructor or an interface type and a property, finds the * top-most superclass that has the property defined (including this * constructor). */
Given a constructor or an interface type and a property, finds the top-most superclass that has the property defined (including this constructor)
getTopMostDefiningType
{ "repo_name": "rintaro/closure-compiler", "path": "src/com/google/javascript/rhino/jstype/FunctionType.java", "license": "apache-2.0", "size": 50077 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,574,330
private void analyzePingResponse(InputStream response) throws HRInvalidResponseException { try { BufferedReader reader = new BufferedReader(new InputStreamReader(response)); reader.readLine(); reader.close(); } catch (IOException ex) { throw new HRInvalidResponseException("Invalid response....
void function(InputStream response) throws HRInvalidResponseException { try { BufferedReader reader = new BufferedReader(new InputStreamReader(response)); reader.readLine(); reader.close(); } catch (IOException ex) { throw new HRInvalidResponseException(STR, ex); } }
/** * Analyzes response from the ping request. * @param response response from the server * @throws HRInvalidResponseException if response is invalid */
Analyzes response from the ping request
analyzePingResponse
{ "repo_name": "usgin/usgin-geoportal", "path": "src/com/esri/gpt/catalog/harvest/clients/HRArcGisClient.java", "license": "apache-2.0", "size": 3718 }
[ "com.esri.gpt.catalog.harvest.clients.exceptions.HRInvalidResponseException", "java.io.BufferedReader", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader" ]
import com.esri.gpt.catalog.harvest.clients.exceptions.HRInvalidResponseException; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader;
import com.esri.gpt.catalog.harvest.clients.exceptions.*; import java.io.*;
[ "com.esri.gpt", "java.io" ]
com.esri.gpt; java.io;
1,552,331
public static MethodSpec.Builder constructorBuilder(ModifierBuilder modifiers) { return modifiers.to(MethodSpec.constructorBuilder()); } /** * Shortcut for {@link #methodBuilder(ModifierBuilder, Object, String)} with * returnsType=void. * * @param modifiers * mod...
static MethodSpec.Builder function(ModifierBuilder modifiers) { return modifiers.to(MethodSpec.constructorBuilder()); } /** * Shortcut for {@link #methodBuilder(ModifierBuilder, Object, String)} with * returnsType=void. * * @param modifiers * modifiers * @param name * - method name * @return {@link MethodSpec.Builder}
/** * Shortcut for {@link MethodSpec#constructorBuilder()} with modifiers. * * @param modifiers * modifiers */
Shortcut for <code>MethodSpec#constructorBuilder()</code> with modifiers
constructorBuilder
{ "repo_name": "hrgdavor/javapoet-util", "path": "src/main/java/hr/hrg/javapoet/PoetUtil.java", "license": "mit", "size": 21001 }
[ "com.squareup.javapoet.MethodSpec" ]
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.*;
[ "com.squareup.javapoet" ]
com.squareup.javapoet;
1,039,089
private LinkedHashMap<String, String> getAvailableLocales(CmsResource resource) { LinkedHashMap<String, String> result = null; List<Locale> locales = null; try { if (CmsResourceTypeXmlPage.isXmlPage(resource)) { locales = CmsXmlPageFactory.unmarshal(getCmsObject(...
LinkedHashMap<String, String> function(CmsResource resource) { LinkedHashMap<String, String> result = null; List<Locale> locales = null; try { if (CmsResourceTypeXmlPage.isXmlPage(resource)) { locales = CmsXmlPageFactory.unmarshal(getCmsObject(), resource, getRequest()).getLocales(); } else if (CmsResourceTypeXmlConten...
/** * Returns the available locales mapped to there display name for the given resource * or <code>null</code> in case of non xml-content/xml-page resources.<p> * * @param resource the resource * * @return the available locales */
Returns the available locales mapped to there display name for the given resource or <code>null</code> in case of non xml-content/xml-page resources
getAvailableLocales
{ "repo_name": "sbonoc/opencms-core", "path": "src/org/opencms/gwt/CmsVfsService.java", "license": "lgpl-2.1", "size": 80757 }
[ "java.util.LinkedHashMap", "java.util.List", "java.util.Locale", "org.opencms.file.CmsResource", "org.opencms.file.types.CmsResourceTypeXmlContainerPage", "org.opencms.file.types.CmsResourceTypeXmlContent", "org.opencms.file.types.CmsResourceTypeXmlPage", "org.opencms.main.CmsException", "org.opencm...
import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import org.opencms.file.CmsResource; import org.opencms.file.types.CmsResourceTypeXmlContainerPage; import org.opencms.file.types.CmsResourceTypeXmlContent; import org.opencms.file.types.CmsResourceTypeXmlPage; import org.opencms.main.CmsEx...
import java.util.*; import org.opencms.file.*; import org.opencms.file.types.*; import org.opencms.main.*; import org.opencms.xml.containerpage.*; import org.opencms.xml.content.*; import org.opencms.xml.page.*;
[ "java.util", "org.opencms.file", "org.opencms.main", "org.opencms.xml" ]
java.util; org.opencms.file; org.opencms.main; org.opencms.xml;
1,202,443
public InstallRequest createUpgradePlanRequest(ExtensionId extensionId, String namespace) { InstallRequest installRequest = new InstallRequest(); installRequest.addNamespace(namespace); List<String> jobId; if (extensionId != null) { installRequest.addExtension(extensi...
InstallRequest function(ExtensionId extensionId, String namespace) { InstallRequest installRequest = new InstallRequest(); installRequest.addNamespace(namespace); List<String> jobId; if (extensionId != null) { installRequest.addExtension(extensionId); jobId = ExtensionRequest.getJobId(ExtensionRequest.JOBID_PLAN_PREFIX...
/** * Create a request used when asking for the upgrade plan of an extension on a namespace. * * @param extensionId the id of the extension * @param namespace the namespace to upgrade * @return the request to pass t the job * @since 9.5 */
Create a request used when asking for the upgrade plan of an extension on a namespace
createUpgradePlanRequest
{ "repo_name": "xwiki/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-extension/xwiki-platform-extension-script/src/main/java/org/xwiki/extension/script/ExtensionManagerScriptService.java", "license": "lgpl-2.1", "size": 44384 }
[ "java.util.List", "org.xwiki.extension.ExtensionId", "org.xwiki.extension.job.ExtensionRequest", "org.xwiki.extension.job.InstallRequest" ]
import java.util.List; import org.xwiki.extension.ExtensionId; import org.xwiki.extension.job.ExtensionRequest; import org.xwiki.extension.job.InstallRequest;
import java.util.*; import org.xwiki.extension.*; import org.xwiki.extension.job.*;
[ "java.util", "org.xwiki.extension" ]
java.util; org.xwiki.extension;
2,508,700
public void testDefaults() { RemoveConnectionMutationOperator oper = new RemoveConnectionMutationOperator(); assertEquals( "wrong default mutation rate", RemoveConnectionMutationOperator.DEFAULT_MUTATE_RATE, oper.getMutationRate(), 0.0f ); assertEquals( "wrong default mutation rate", RemoveConnectionMutationOp...
void function() { RemoveConnectionMutationOperator oper = new RemoveConnectionMutationOperator(); assertEquals( STR, RemoveConnectionMutationOperator.DEFAULT_MUTATE_RATE, oper.getMutationRate(), 0.0f ); assertEquals( STR, RemoveConnectionMutationOperator.DEFAULT_MAX_WEIGHT_REMOVED, oper.getMaxWeightRemoved(), 0.0f ); }
/** * test default values */
test default values
testDefaults
{ "repo_name": "jasoyode/gasneat", "path": "src/test/java/com/anji/neat/test/PruneMutationOperatorTest.java", "license": "gpl-3.0", "size": 6970 }
[ "com.anji.neat.RemoveConnectionMutationOperator" ]
import com.anji.neat.RemoveConnectionMutationOperator;
import com.anji.neat.*;
[ "com.anji.neat" ]
com.anji.neat;
2,032,850
public static Element addChildElementCDATAValue(Element element, String childElementName, String childElementValue, Document document) { Element newElement = addChildElement(element, childElementName, document); newElement.appendChild(document.createCDATASection(childElementValue)); ...
static Element function(Element element, String childElementName, String childElementValue, Document document) { Element newElement = addChildElement(element, childElementName, document); newElement.appendChild(document.createCDATASection(childElementValue)); return newElement; }
/** Creates a child element with the given name and appends it to the element child node list. * Also creates a CDATASection node with the given value and appends it to the new elements child node list. */
Creates a child element with the given name and appends it to the element child node list. Also creates a CDATASection node with the given value and appends it to the new elements child node list
addChildElementCDATAValue
{ "repo_name": "zamentur/ofbiz_ynh", "path": "sources/framework/base/src/org/ofbiz/base/util/UtilXml.java", "license": "apache-2.0", "size": 49565 }
[ "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
103,923
private static void checkFileValidation(File file){ if (file == null) throw new NullPointerException("File must not be null"); if (!file.exists()) { throw new IllegalArgumentException("The file: " + file.getPath() + " doesn't exist."); } file.canRead...
static void function(File file){ if (file == null) throw new NullPointerException(STR); if (!file.exists()) { throw new IllegalArgumentException(STR + file.getPath() + STR); } file.canRead(); }
/** * Checks if the file is a valid file and readable. * * @throws SecurityException If a security manager exists and its * {@link SecurityManager#checkRead(java.lang.String)} method * denies read access to the file * @throws NullPointerException if file is null * @thr...
Checks if the file is a valid file and readable
checkFileValidation
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jdk/src/java.desktop/share/classes/java/awt/Desktop.java", "license": "gpl-2.0", "size": 39126 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
795,329
public synchronized String getTheory(boolean onlyDynamic) { StringBuffer buffer = new StringBuffer(); for (Iterator<ClauseInfo> dynamicClauses = dynamicDBase.iterator(); dynamicClauses.hasNext();) { ClauseInfo d = dynamicClauses.next(); buffer.append(d.toString(engine.getOperatorManager())).append("\n"); ...
synchronized String function(boolean onlyDynamic) { StringBuffer buffer = new StringBuffer(); for (Iterator<ClauseInfo> dynamicClauses = dynamicDBase.iterator(); dynamicClauses.hasNext();) { ClauseInfo d = dynamicClauses.next(); buffer.append(d.toString(engine.getOperatorManager())).append("\n"); } if (!onlyDynamic) fo...
/** * Gets current theory * * @param onlyDynamic if true, fetches only dynamic clauses */
Gets current theory
getTheory
{ "repo_name": "zakski/project-soisceal", "path": "2p-mvn/tuProlog-3.2.1-mvn/src/alice/tuprolog/TheoryManager.java", "license": "lgpl-3.0", "size": 11681 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,280,501
public static String format(final short key) throws MissingResourceException { return getResources((Locale) null).getString(key); }
static String function(final short key) throws MissingResourceException { return getResources((Locale) null).getString(key); }
/** * Gets a string for the given key from this resource bundle or one of its parents. * * @param key The key for the desired string. * @return The string for the given key. * @throws MissingResourceException If no object for the given key can be found. */
Gets a string for the given key from this resource bundle or one of its parents
format
{ "repo_name": "desruisseaux/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java", "license": "apache-2.0", "size": 45951 }
[ "java.util.Locale", "java.util.MissingResourceException" ]
import java.util.Locale; import java.util.MissingResourceException;
import java.util.*;
[ "java.util" ]
java.util;
1,897,513
@Test public void logInt() { try { Expression expression = getExpressionWithFunctionContext("log(1)"); assertEquals(ExpressionType.DOUBLE, expression.getExpressionType()); assertEquals(0.0, expression.evaluateNumerical(), 1e-15); } catch (ExpressionException e) { fail(e.getMessage()); } }
void function() { try { Expression expression = getExpressionWithFunctionContext(STR); assertEquals(ExpressionType.DOUBLE, expression.getExpressionType()); assertEquals(0.0, expression.evaluateNumerical(), 1e-15); } catch (ExpressionException e) { fail(e.getMessage()); } }
/** * log tests */
log tests
logInt
{ "repo_name": "rapidminer/rapidminer-studio", "path": "src/test/java/com/rapidminer/tools/expression/internal/function/AntlrParserMathematicalTest.java", "license": "agpl-3.0", "size": 20334 }
[ "com.rapidminer.tools.expression.Expression", "com.rapidminer.tools.expression.ExpressionException", "com.rapidminer.tools.expression.ExpressionType", "org.junit.Assert" ]
import com.rapidminer.tools.expression.Expression; import com.rapidminer.tools.expression.ExpressionException; import com.rapidminer.tools.expression.ExpressionType; import org.junit.Assert;
import com.rapidminer.tools.expression.*; import org.junit.*;
[ "com.rapidminer.tools", "org.junit" ]
com.rapidminer.tools; org.junit;
2,869,452
void delete(final Plot plot);
void delete(final Plot plot);
/** * Delete a plot * * @param plot Plot that should be deleted */
Delete a plot
delete
{ "repo_name": "SilverCory/PlotSquared", "path": "Core/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java", "license": "gpl-3.0", "size": 10403 }
[ "com.intellectualcrafters.plot.object.Plot" ]
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.*;
[ "com.intellectualcrafters.plot" ]
com.intellectualcrafters.plot;
1,313,421
public final boolean isFirstMatch(Match match) { Match firstMatch = playedMatches.get(0); boolean result = firstMatch == match; return result; }
final boolean function(Match match) { Match firstMatch = playedMatches.get(0); boolean result = firstMatch == match; return result; }
/** * Indicates if the specified match * corresponds to the first match played * in this tournament. * * @param match * Match to be checked. * @return * {@code true} iff the specified match is the first one of the tournament. */
Indicates if the specified match corresponds to the first match played in this tournament
isFirstMatch
{ "repo_name": "vlabatut/totalboumboum", "path": "src/org/totalboumboum/game/tournament/AbstractTournament.java", "license": "gpl-2.0", "size": 13061 }
[ "org.totalboumboum.game.match.Match" ]
import org.totalboumboum.game.match.Match;
import org.totalboumboum.game.match.*;
[ "org.totalboumboum.game" ]
org.totalboumboum.game;
484,791
public FrameError getError() { return error; }
FrameError function() { return error; }
/** * Retrieves the frame error. * * @return The frame error. * * @see #setError(FrameError) * @see FrameError */
Retrieves the frame error
getError
{ "repo_name": "digidotcom/XBeeJavaLibrary", "path": "library/src/main/java/com/digi/xbee/api/packet/devicecloud/FrameErrorPacket.java", "license": "mpl-2.0", "size": 5045 }
[ "com.digi.xbee.api.models.FrameError" ]
import com.digi.xbee.api.models.FrameError;
import com.digi.xbee.api.models.*;
[ "com.digi.xbee" ]
com.digi.xbee;
468,945
private int getLastLineIndentation(TabContentTextBuffer tabContentBuffer){ int count = 0; try { int lastLineIndex = tabContentBuffer.getLineOfOffset( tabContentBuffer.getCaretPosition() )-1; int lastLineStart = tabContentBuffer.getLineStartOffset( lastLineIndex ); ...
int function(TabContentTextBuffer tabContentBuffer){ int count = 0; try { int lastLineIndex = tabContentBuffer.getLineOfOffset( tabContentBuffer.getCaretPosition() )-1; int lastLineStart = tabContentBuffer.getLineStartOffset( lastLineIndex ); int lastLineLength = tabContentBuffer.getLineEndOffset( lastLineIndex ) - las...
/** * Get the indentation of the line previous to the one the caret is currently on in tabContentBuffer * @return number of spaces to indent on the new line */
Get the indentation of the line previous to the one the caret is currently on in tabContentBuffer
getLastLineIndentation
{ "repo_name": "jonobrien/School_Backups", "path": "swen262/HTMLEditor/src/command/KeyPressedCommand.java", "license": "gpl-3.0", "size": 6116 }
[ "javax.swing.text.BadLocationException" ]
import javax.swing.text.BadLocationException;
import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
2,077,176
private void addFirstChildElements() { for (Node node : nodes) { if (DOMHelper.getPreviousSiblingElement(node) == null) { result.add(node); } } }
void function() { for (Node node : nodes) { if (DOMHelper.getPreviousSiblingElement(node) == null) { result.add(node); } } }
/** * Add {@code :first-child} elements. * * @see <a href="http://www.w3.org/TR/css3-selectors/#first-child-pseudo"><code>:first-child</code> pseudo-class</a> */
Add :first-child elements
addFirstChildElements
{ "repo_name": "connect-group/thymesheet", "path": "src/main/java/com/connect_group/thymesheet/css/selectors/dom/internal/PseudoClassSpecifierChecker.java", "license": "apache-2.0", "size": 8413 }
[ "com.connect_group.thymesheet.css.selectors.dom.DOMHelper", "org.thymeleaf.dom.Node" ]
import com.connect_group.thymesheet.css.selectors.dom.DOMHelper; import org.thymeleaf.dom.Node;
import com.connect_group.thymesheet.css.selectors.dom.*; import org.thymeleaf.dom.*;
[ "com.connect_group.thymesheet", "org.thymeleaf.dom" ]
com.connect_group.thymesheet; org.thymeleaf.dom;
2,069,575
public long getElapsedYear() { // Today + rest of this month + previous months until January long elapsed = getElapsedMonth(); int month = calendar.get(Calendar.MONTH) - 1; int year = calendar.get(Calendar.YEAR); while (month > Calendar.JANUARY) { elapsed += getD...
long function() { long elapsed = getElapsedMonth(); int month = calendar.get(Calendar.MONTH) - 1; int year = calendar.get(Calendar.YEAR); while (month > Calendar.JANUARY) { elapsed += getDaysInMonth(year, month) * MS_PER_DAY; month--; } return elapsed; }
/** * Returns the time elapsed so far this year in milliseconds. * * @return Time elapsed this year in milliseconds. */
Returns the time elapsed so far this year in milliseconds
getElapsedYear
{ "repo_name": "h4h13/RetroMusicPlayer", "path": "app/src/main/java/code/name/monkey/retromusic/util/CalendarUtil.java", "license": "gpl-3.0", "size": 3542 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
2,900,412
public static void assertEquals(String message, Example expected, Example actual) { Assert.assertEquals(message + " (number of attributes)", expected.getAttributes().allSize(), actual.getAttributes() .allSize()); Assert.assertEquals(message + " (number of special attributes)", expected.getAttributes().s...
static void function(String message, Example expected, Example actual) { Assert.assertEquals(message + STR, expected.getAttributes().allSize(), actual.getAttributes() .allSize()); Assert.assertEquals(message + STR, expected.getAttributes().specialSize(), actual .getAttributes().specialSize()); Iterator<Attribute> allEx...
/** * Tests the two examples by testing the value of the examples for every given attribute. This * method is sensitive to the regular attribute ordering. * * @param message * message to display if an error occurs. If it contains "{0}" and "{1}", it will be * replaced with the at...
Tests the two examples by testing the value of the examples for every given attribute. This method is sensitive to the regular attribute ordering
assertEquals
{ "repo_name": "boob-sbcm/3838438", "path": "src/main/java/com/rapidminer/test_utils/RapidAssert.java", "license": "agpl-3.0", "size": 22122 }
[ "com.rapidminer.example.Attribute", "com.rapidminer.example.Example", "java.text.MessageFormat", "java.util.ArrayList", "java.util.Iterator", "java.util.List", "junit.framework.AssertionFailedError", "org.junit.Assert" ]
import com.rapidminer.example.Attribute; import com.rapidminer.example.Example; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import junit.framework.AssertionFailedError; import org.junit.Assert;
import com.rapidminer.example.*; import java.text.*; import java.util.*; import junit.framework.*; import org.junit.*;
[ "com.rapidminer.example", "java.text", "java.util", "junit.framework", "org.junit" ]
com.rapidminer.example; java.text; java.util; junit.framework; org.junit;
2,385,986
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Void> failoverAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { return beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId) .last() .flatMap(this.client::getLroFinalR...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String resourceGroupName, String serverName, String databaseName, String linkId) { return beginFailoverAsync(resourceGroupName, serverName, databaseName, linkId) .last() .flatMap(this.client::getLroFinalResultOrError); }
/** * Sets which replica database is primary by failing over from the current primary replica database. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serverName ...
Sets which replica database is primary by failing over from the current primary replica database
failoverAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ReplicationLinksClientImpl.java", "license": "mit", "size": 86786 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
1,962,857
void removeVariablesLocal(String taskId, Collection<String> variableNames);
void removeVariablesLocal(String taskId, Collection<String> variableNames);
/** * Removes all variables in the given collection from the task (not considering parent scopes). Non existing variable names are simply ignored. */
Removes all variables in the given collection from the task (not considering parent scopes). Non existing variable names are simply ignored
removeVariablesLocal
{ "repo_name": "robsoncardosoti/flowable-engine", "path": "modules/flowable5-engine/src/main/java/org/activiti/engine/TaskService.java", "license": "apache-2.0", "size": 24405 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,779,631
@Test public void testRemoveDuplictesOnRoot() { AvlTreeMap<Integer, Integer> tree = createTree(); assertTrue( tree.isDupsAllowed() ); tree.insert( 3, 4 ); tree.insert( 3, 5 ); assertEquals( 1, tree.getSize() ); assertTrue( 4 == tree.remove( 3, 4 ) ); ...
void function() { AvlTreeMap<Integer, Integer> tree = createTree(); assertTrue( tree.isDupsAllowed() ); tree.insert( 3, 4 ); tree.insert( 3, 5 ); assertEquals( 1, tree.getSize() ); assertTrue( 4 == tree.remove( 3, 4 ) ); assertNotNull( tree.getRoot() ); assertEquals( 1, tree.getSize() ); assertTrue( 5 == tree.remove( 3...
/** * checks the root node value(s) when duplicates are allowed and * only single node(size one) is present */
checks the root node value(s) when duplicates are allowed and only single node(size one) is present
testRemoveDuplictesOnRoot
{ "repo_name": "lucastheisen/apache-directory-server", "path": "core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMapTest.java", "license": "apache-2.0", "size": 12834 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
865,377
public DistributionBuilder addDataFile(File fileToAdd) { // @todo Write Unit tests for this // @todo assert a file dataFiles.add(fileToAdd); return this; }
DistributionBuilder function(File fileToAdd) { dataFiles.add(fileToAdd); return this; }
/** * Adds a specific file to the distribution to build. The * file will be added directo * * @param fileToAdd The file to add to the distribtion, * must not be {@code null}. * * @see #DATA_DIRECTORY */
Adds a specific file to the distribution to build. The file will be added directo
addDataFile
{ "repo_name": "sslavic/Thotti", "path": "thotticore/src/main/java/de/fischer/thotti/core/distbuilder/DistributionBuilder.java", "license": "apache-2.0", "size": 12094 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
696,339
public @Nonnull Iterable<String> listShares(@Nonnull String providerImageId) throws CloudException, InternalException; /** * Lists the image classes supported in this cloud. * @return the supported image classes * @throws CloudException an error occurred with the cloud provider * @throws In...
@Nonnull Iterable<String> function(@Nonnull String providerImageId) throws CloudException, InternalException; /** * Lists the image classes supported in this cloud. * @return the supported image classes * @throws CloudException an error occurred with the cloud provider * @throws InternalException a local error occurred...
/** * Provides the account numbers for all accounts which which the specified machine image has been shared. This method * should return an empty list when sharing is unsupported. * @param providerImageId the unique ID of the image being checked * @return a list of account numbers with which the tar...
Provides the account numbers for all accounts which which the specified machine image has been shared. This method should return an empty list when sharing is unsupported
listShares
{ "repo_name": "maksimov/dasein-cloud-core", "path": "src/main/java/org/dasein/cloud/compute/MachineImageSupport.java", "license": "apache-2.0", "size": 38481 }
[ "javax.annotation.Nonnull", "org.dasein.cloud.CloudException", "org.dasein.cloud.InternalException" ]
import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException;
import javax.annotation.*; import org.dasein.cloud.*;
[ "javax.annotation", "org.dasein.cloud" ]
javax.annotation; org.dasein.cloud;
11,086
public final void registerCandidate(@NonNull Class<? extends IntentCandidate> classOfCandidate) { registerCandidate(createCandidate(classOfCandidate)); } /** * Registers an instance of {@link IntentCandidate} with the specified <var>packagePattern</var> * for this assistant, so it can be used to filter ...
final void function(@NonNull Class<? extends IntentCandidate> classOfCandidate) { registerCandidate(createCandidate(classOfCandidate)); } /** * Registers an instance of {@link IntentCandidate} with the specified <var>packagePattern</var> * for this assistant, so it can be used to filter intent candidates for a specific...
/** * Same as {@link #registerCandidate(IntentCandidate)} where instance of intent candidate will be created * using the specified <var>classOfCandidate</var>. * * @param classOfCandidate Class of candidate from which to create new IntentCandidate instance. * @see #registerCandidates(Class[]) */
Same as <code>#registerCandidate(IntentCandidate)</code> where instance of intent candidate will be created using the specified classOfCandidate
registerCandidate
{ "repo_name": "android-libraries/android_dialogs", "path": "library/src/intent/java/com/albedinsky/android/dialog/intent/IntentAssistant.java", "license": "apache-2.0", "size": 17043 }
[ "android.content.Intent", "android.support.annotation.NonNull" ]
import android.content.Intent; import android.support.annotation.NonNull;
import android.content.*; import android.support.annotation.*;
[ "android.content", "android.support" ]
android.content; android.support;
692,744
@Test public void verifyFourthIdentity() { BigInteger sum = ZERO; for (int n = 0; n < getMaxTests(); n++) { sum = sum.add(BigInteger.valueOf(n).multiply(seq.get(n))); BigInteger x = BigInteger.valueOf(n).multiply(seq.get(n + 2)) .sub...
void function() { BigInteger sum = ZERO; for (int n = 0; n < getMaxTests(); n++) { sum = sum.add(BigInteger.valueOf(n).multiply(seq.get(n))); BigInteger x = BigInteger.valueOf(n).multiply(seq.get(n + 2)) .subtract(seq.get(n + 3)).add(TWO); Assert.assertEquals(sum, x); } }
/** * Verify fourth identity (per Wikipedia): sum(iF(i)) = nF(n+2) - F(n+3) + 2 */
Verify fourth identity (per Wikipedia): sum(iF(i)) = nF(n+2) - F(n+3) + 2
verifyFourthIdentity
{ "repo_name": "beargiles/projecteuler", "path": "src/test/java/com/invariantproperties/projecteuler/recurrence/FibonacciNumberTest.java", "license": "apache-2.0", "size": 7844 }
[ "java.math.BigInteger", "org.junit.Assert" ]
import java.math.BigInteger; import org.junit.Assert;
import java.math.*; import org.junit.*;
[ "java.math", "org.junit" ]
java.math; org.junit;
179,934
public void processTouchEvent(MotionEvent ev) { final int action = MotionEventCompat.getActionMasked(ev); final int actionIndex = MotionEventCompat.getActionIndex(ev); if (action == MotionEvent.ACTION_DOWN) { // Reset things for a new event stream, just in case we didn't get ...
void function(MotionEvent ev) { final int action = MotionEventCompat.getActionMasked(ev); final int actionIndex = MotionEventCompat.getActionIndex(ev); if (action == MotionEvent.ACTION_DOWN) { cancel(); } if (mVelocityTracker == null) { mVelocityTracker = VelocityTracker.obtain(); } mVelocityTracker.addMovement(ev); sw...
/** * Process a touch event received by the parent view. This method will dispatch callback events * as needed before returning. The parent view's onTouchEvent implementation should call this. * * @param ev The touch event received by the parent view */
Process a touch event received by the parent view. This method will dispatch callback events as needed before returning. The parent view's onTouchEvent implementation should call this
processTouchEvent
{ "repo_name": "xdujiang/Nimingban", "path": "app/src/main/java/com/hippo/nimingban/widget/ViewDragHelper.java", "license": "apache-2.0", "size": 61831 }
[ "android.support.v4.view.MotionEventCompat", "android.view.MotionEvent", "android.view.VelocityTracker", "android.view.View" ]
import android.support.v4.view.MotionEventCompat; import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View;
import android.support.v4.view.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
2,343,792
public Class<? extends Combiner<I, M>> getCombinerClass() { return combinerClass; }
Class<? extends Combiner<I, M>> function() { return combinerClass; }
/** * Get Combiner used * * @return Combiner */
Get Combiner used
getCombinerClass
{ "repo_name": "skymanaditya1/giraph", "path": "giraph-core/src/main/java/org/apache/giraph/conf/GiraphClasses.java", "license": "apache-2.0", "size": 19338 }
[ "org.apache.giraph.combiner.Combiner" ]
import org.apache.giraph.combiner.Combiner;
import org.apache.giraph.combiner.*;
[ "org.apache.giraph" ]
org.apache.giraph;
2,850,925
public boolean execute(String action, String rawArgs, CallbackContext callbackContext) throws JSONException { JSONArray args = new JSONArray(rawArgs); return execute(action, args, callbackContext); }
boolean function(String action, String rawArgs, CallbackContext callbackContext) throws JSONException { JSONArray args = new JSONArray(rawArgs); return execute(action, args, callbackContext); }
/** * Executes the request. * * This method is called from the WebView thread. To do a non-trivial amount of work, use: * cordova.getThreadPool().execute(runnable); * * To run on the UI thread, use: * cordova.getActivity().runOnUiThread(runnable); * * @param action ...
Executes the request. This method is called from the WebView thread. To do a non-trivial amount of work, use: cordova.getThreadPool().execute(runnable); To run on the UI thread, use: cordova.getActivity().runOnUiThread(runnable)
execute
{ "repo_name": "cjk/biorder", "path": "cordova/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java", "license": "gpl-2.0", "size": 7258 }
[ "org.apache.cordova.CallbackContext", "org.json.JSONArray", "org.json.JSONException" ]
import org.apache.cordova.CallbackContext; import org.json.JSONArray; import org.json.JSONException;
import org.apache.cordova.*; import org.json.*;
[ "org.apache.cordova", "org.json" ]
org.apache.cordova; org.json;
2,612,296
public int readRGBInt(String name) throws IOException { newDumpLevel(name, "RGB"); int ret = (0xff << 24) | (readUI8("red") << 16) | (readUI8("green") << 8) | readUI8("blue"); endDumpLevel(); return ret; }
int function(String name) throws IOException { newDumpLevel(name, "RGB"); int ret = (0xff << 24) (readUI8("red") << 16) (readUI8("green") << 8) readUI8("blue"); endDumpLevel(); return ret; }
/** * Reads one RGB value from the stream * * @param name * @return RGB value * @throws IOException */
Reads one RGB value from the stream
readRGBInt
{ "repo_name": "Djamana/jpexs-decompiler", "path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java", "license": "gpl-3.0", "size": 128697 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
225,269
final ComponentLookup componentLookup = ComponentLookup.getInstance(); componentLookup.registerComponent(new NetworkComponentImpl()); }
final ComponentLookup componentLookup = ComponentLookup.getInstance(); componentLookup.registerComponent(new NetworkComponentImpl()); }
/** * Inits the base components. */
Inits the base components
initBaseComponents
{ "repo_name": "CymricNPG/abattle", "path": "ABattle.Server/src/net/npg/abattle/server/Server.java", "license": "apache-2.0", "size": 1259 }
[ "net.npg.abattle.common.component.ComponentLookup", "net.npg.abattle.communication.network.impl.NetworkComponentImpl" ]
import net.npg.abattle.common.component.ComponentLookup; import net.npg.abattle.communication.network.impl.NetworkComponentImpl;
import net.npg.abattle.common.component.*; import net.npg.abattle.communication.network.impl.*;
[ "net.npg.abattle" ]
net.npg.abattle;
2,176,331
String getCaCertificate(final String caProvider) throws IOException;
String getCaCertificate(final String caProvider) throws IOException;
/** * Returns PEM-encoded chained CA certificate * @param caProvider * @return returns CA certificate chain string */
Returns PEM-encoded chained CA certificate
getCaCertificate
{ "repo_name": "GabrielBrascher/cloudstack", "path": "api/src/main/java/org/apache/cloudstack/ca/CAManager.java", "license": "apache-2.0", "size": 7161 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
695,102
public final Point readPos() { final int x = readShort(); final int y = readShort(); return new Point(x, y); }
final Point function() { final int x = readShort(); final int y = readShort(); return new Point(x, y); }
/** * Reads a MapleStory Position information. This consists of 2 short * integer. * * @return The Position read. */
Reads a MapleStory Position information. This consists of 2 short integer
readPos
{ "repo_name": "swordiemen/Mushy", "path": "src/tools/data/LittleEndianAccessor.java", "license": "gpl-3.0", "size": 9900 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,591,493
public static void enableUniversalBucket() { if (Loader.instance().hasReachedState(LoaderState.PREINITIALIZATION)) { FMLLog.getLogger().log(Level.ERROR, "Trying to activate the universal filled bucket too late. Call it statically in your Mods class. Mod: {}", Loader.instance().active...
static void function() { if (Loader.instance().hasReachedState(LoaderState.PREINITIALIZATION)) { FMLLog.getLogger().log(Level.ERROR, STR, Loader.instance().activeModContainer().getName()); } else { universalBucketEnabled = true; } }
/** * Enables the universal bucket in forge. * Has to be called before pre-initialization. * Actually just call it statically in your mod class. */
Enables the universal bucket in forge. Has to be called before pre-initialization. Actually just call it statically in your mod class
enableUniversalBucket
{ "repo_name": "Merlijnv/MFM", "path": "build/tmp/recompileMc/sources/net/minecraftforge/fluids/FluidRegistry.java", "license": "gpl-3.0", "size": 15371 }
[ "net.minecraftforge.fml.common.FMLLog", "net.minecraftforge.fml.common.Loader", "net.minecraftforge.fml.common.LoaderState", "org.apache.logging.log4j.Level" ]
import net.minecraftforge.fml.common.FMLLog; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.LoaderState; import org.apache.logging.log4j.Level;
import net.minecraftforge.fml.common.*; import org.apache.logging.log4j.*;
[ "net.minecraftforge.fml", "org.apache.logging" ]
net.minecraftforge.fml; org.apache.logging;
2,500,606
private void registerSwiftModuleMergeAction( IntermediateArtifacts intermediateArtifacts, CompilationArtifacts compilationArtifacts, ObjcProvider objcProvider) { ObjcConfiguration objcConfiguration = ObjcRuleClasses.objcConfiguration(ruleContext); AppleConfiguration appleConfiguration = rule...
void function( IntermediateArtifacts intermediateArtifacts, CompilationArtifacts compilationArtifacts, ObjcProvider objcProvider) { ObjcConfiguration objcConfiguration = ObjcRuleClasses.objcConfiguration(ruleContext); AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class); ImmutableLi...
/** * Merges multiple .partial_swiftmodule files together. Also produces a swift header that can be * used by Objective-C code. */
Merges multiple .partial_swiftmodule files together. Also produces a swift header that can be used by Objective-C code
registerSwiftModuleMergeAction
{ "repo_name": "kamalmarhubi/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java", "license": "apache-2.0", "size": 60627 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.actions.CustomCommandLine", "com.google.devtools.build.lib.rules.apple.AppleConfiguration", "com.google.devtools.build.lib.rules.apple.AppleToolchain", "com.google.devtools....
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.actions.CustomCommandLine; import com.google.devtools.build.lib.rules.apple.AppleConfiguration; import com.google.devtools.build.lib.rules.apple.AppleToolchain; import com...
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.actions.*; import com.google.devtools.build.lib.rules.apple.*; import com.google.devtools.build.lib.rules.objc.*; import com.google.devtools.build.lib.vfs.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
360,592
@Override public void setDefault() { primary0 = new ColorUIResource(103, 152, 203); // protected static ColorUIResource primary1; primary1 = new ColorUIResource(101, 138, 187); primary2 = new ColorUIResource(103, 152, 203); primary3 = new ColorUIResource(233, 238, 245); // // secondary0...
void function() { primary0 = new ColorUIResource(103, 152, 203); primary1 = new ColorUIResource(101, 138, 187); primary2 = new ColorUIResource(103, 152, 203); primary3 = new ColorUIResource(233, 238, 245); secondary1 = new ColorUIResource(190, 179, 153); secondary2 = new ColorUIResource(246, 239, 224); secondary3 = new...
/** * Set Defaults */
Set Defaults
setDefault
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-legacy/org/adempiere/plaf/AdempiereThemeInnova.java", "license": "gpl-2.0", "size": 3708 }
[ "javax.swing.plaf.ColorUIResource" ]
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.*;
[ "javax.swing" ]
javax.swing;
1,801,827
public static void packHeader(PkgHeader header, byte[] bs) throws UnsupportedEncodingException { Arrays.fill(bs, 0, FDHT_PROTO_PKG_HEADER_SIZE, (byte)0); ProtoCommon.int2buff(header.body_len, bs, PROTO_HEADER_BODY_LEN_INDEX); ProtoCommon.int2buff(header.key_hash_co...
static void function(PkgHeader header, byte[] bs) throws UnsupportedEncodingException { Arrays.fill(bs, 0, FDHT_PROTO_PKG_HEADER_SIZE, (byte)0); ProtoCommon.int2buff(header.body_len, bs, PROTO_HEADER_BODY_LEN_INDEX); ProtoCommon.int2buff(header.key_hash_code, bs, PROTO_HEADER_KEY_HASH_CODE_INDEX); ProtoCommon.int2buff(...
/** * pack header by FastDHT transfer protocol * * @param header package header * @param bs byte buff */
pack header by FastDHT transfer protocol
packHeader
{ "repo_name": "youxiaxiaomage/yx-platform", "path": "yx-platform-common/src/main/java/org/csource/fastdht/ProtoCommon.java", "license": "apache-2.0", "size": 9101 }
[ "java.io.UnsupportedEncodingException", "java.util.Arrays" ]
import java.io.UnsupportedEncodingException; import java.util.Arrays;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
467,465
void addContent(ByteBuf buffer, boolean last) throws IOException;
void addContent(ByteBuf buffer, boolean last) throws IOException;
/** * Add the content from the ChannelBuffer * * @param buffer * must be not null except if last is set to False * @param last * True of the buffer is the last one * @exception IOException */
Add the content from the ChannelBuffer
addContent
{ "repo_name": "nathanchen/netty-netty-5.0.0.Alpha1", "path": "codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpData.java", "license": "apache-2.0", "size": 6101 }
[ "io.netty.buffer.ByteBuf", "java.io.IOException" ]
import io.netty.buffer.ByteBuf; import java.io.IOException;
import io.netty.buffer.*; import java.io.*;
[ "io.netty.buffer", "java.io" ]
io.netty.buffer; java.io;
2,567,201
private static String getRfc5987ExtValue(String text) { StringBuilder builder = new StringBuilder("UTF-8''"); for (int i = 0; i < text.length(); ) { int codePoint = text.codePointAt(i); int len = Character.charCount(codePoint); if ((codePoint >= '0' && codePoint <= '9') || (codePoi...
static String function(String text) { StringBuilder builder = new StringBuilder(STR); for (int i = 0; i < text.length(); ) { int codePoint = text.codePointAt(i); int len = Character.charCount(codePoint); if ((codePoint >= '0' && codePoint <= '9') (codePoint >= 'A' && codePoint <= 'Z') (codePoint >= 'a' && codePoint <= ...
/** * Returns an RFC 5987 ext-value encoding of the given text, with charset UTF-8 and no language * tag. */
Returns an RFC 5987 ext-value encoding of the given text, with charset UTF-8 and no language tag
getRfc5987ExtValue
{ "repo_name": "jenkinsci/google-storage-plugin", "path": "src/main/java/com/google/jenkins/plugins/storage/HttpHeaders.java", "license": "apache-2.0", "size": 3131 }
[ "com.google.common.base.Charsets" ]
import com.google.common.base.Charsets;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
327,297
@Schema(example = "User-specific message.", description = "Text to display to the user in the header of the UI") public String getHeaderText() { return headerText; }
@Schema(example = STR, description = STR) String function() { return headerText; }
/** * Text to display to the user in the header of the UI * @return headerText **/
Text to display to the user in the header of the UI
getHeaderText
{ "repo_name": "iterate-ch/cyberduck", "path": "brick/src/main/java/ch/cyberduck/core/brick/io/swagger/client/model/UsersIdBody.java", "license": "gpl-3.0", "size": 36297 }
[ "io.swagger.v3.oas.annotations.media.Schema" ]
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.*;
[ "io.swagger.v3" ]
io.swagger.v3;
213,325
public void processMessage(JsonObject messagetJsonObject, ServerSessionFactory factory, ResponseSender responseSender, String internalSessionId) throws IOException { if (messagetJsonObject.has(Request.METHOD_FIELD_NAME)) { processRequestMessage(factory, messagetJsonObject, responseSender, internalSes...
void function(JsonObject messagetJsonObject, ServerSessionFactory factory, ResponseSender responseSender, String internalSessionId) throws IOException { if (messagetJsonObject.has(Request.METHOD_FIELD_NAME)) { processRequestMessage(factory, messagetJsonObject, responseSender, internalSessionId); } else { processRespons...
/** * Process incoming message. The response is sent using responseSender. If null, the session will * be used. * * @param messagetJsonObject * @param factory * @param responseSender * @param internalSessionId * @throws IOException */
Process incoming message. The response is sent using responseSender. If null, the session will be used
processMessage
{ "repo_name": "jcabezasg/kurento-java", "path": "kurento-jsonrpc/kurento-jsonrpc-server/src/main/java/org/kurento/jsonrpc/internal/server/ProtocolManager.java", "license": "apache-2.0", "size": 16168 }
[ "com.google.gson.JsonObject", "java.io.IOException", "org.kurento.jsonrpc.internal.client.TransactionImpl", "org.kurento.jsonrpc.message.Request" ]
import com.google.gson.JsonObject; import java.io.IOException; import org.kurento.jsonrpc.internal.client.TransactionImpl; import org.kurento.jsonrpc.message.Request;
import com.google.gson.*; import java.io.*; import org.kurento.jsonrpc.internal.client.*; import org.kurento.jsonrpc.message.*;
[ "com.google.gson", "java.io", "org.kurento.jsonrpc" ]
com.google.gson; java.io; org.kurento.jsonrpc;
2,367,239
//----------------------------------------------------------------------- public String toString(DateTimeFormatter formatter) { if (formatter == null) { return toString(); } return formatter.print(this); }
String function(DateTimeFormatter formatter) { if (formatter == null) { return toString(); } return formatter.print(this); }
/** * Uses the specified formatter to convert this partial to a String. * * @param formatter the formatter to use, null means use <code>toString()</code>. * @return the formatted string, not null * @since 1.1 */
Uses the specified formatter to convert this partial to a String
toString
{ "repo_name": "PavelSozonov/JodaTimeTesting", "path": "src/main/java/org/joda/time/base/AbstractInstant.java", "license": "apache-2.0", "size": 15049 }
[ "org.joda.time.format.DateTimeFormatter" ]
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.*;
[ "org.joda.time" ]
org.joda.time;
472,928
@Override void startSourceMapping(Node node) { checkState(sourceMapDetailLevel != null); checkState(node != null); if (createSrcMap && node.getSourceFileName() != null && node.getLineno() > 0 && sourceMapDetailLevel.apply(node)) { int line = getCurrentLine...
void startSourceMapping(Node node) { checkState(sourceMapDetailLevel != null); checkState(node != null); if (createSrcMap && node.getSourceFileName() != null && node.getLineno() > 0 && sourceMapDetailLevel.apply(node)) { int line = getCurrentLineIndex(); int index = getCurrentCharIndex(); checkState(line >= 0); Mapping...
/** * Starts the source mapping for the given * node at the current position. */
Starts the source mapping for the given node at the current position
startSourceMapping
{ "repo_name": "GerHobbelt/closure-compiler", "path": "src/com/google/javascript/jscomp/CodePrinter.java", "license": "apache-2.0", "size": 27636 }
[ "com.google.common.base.Preconditions", "com.google.debugging.sourcemap.FilePosition", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Preconditions; import com.google.debugging.sourcemap.FilePosition; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.debugging.sourcemap.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.debugging", "com.google.javascript" ]
com.google.common; com.google.debugging; com.google.javascript;
2,767,507
public final double getEstimatedTripTime(boolean useMargin, double distance) { double result = 0; // Determine average driving speed for all mission members. double averageSpeed = getAverageVehicleSpeedForOperators(); if (averageSpeed > 0) { double averageSpeedMillisol = averageSpeed / MarsClock.MILL...
final double function(boolean useMargin, double distance) { double result = 0; double averageSpeed = getAverageVehicleSpeedForOperators(); if (averageSpeed > 0) { double averageSpeedMillisol = averageSpeed / MarsClock.MILLISOLS_PER_HOUR; result = distance / averageSpeedMillisol; } if (useMargin) { result += 500D; } ret...
/** * Gets the estimated time for a trip. * * @param useMargin use time buffers in estimation if true. * @param distance the distance of the trip. * @return time (millisols) * @throws MissionException */
Gets the estimated time for a trip
getEstimatedTripTime
{ "repo_name": "mars-sim/mars-sim", "path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/VehicleMission.java", "license": "gpl-3.0", "size": 54214 }
[ "org.mars_sim.msp.core.time.MarsClock" ]
import org.mars_sim.msp.core.time.MarsClock;
import org.mars_sim.msp.core.time.*;
[ "org.mars_sim.msp" ]
org.mars_sim.msp;
1,631,487
@Test public void retainServedDateFormat() throws Exception { // Serve a response with a non-standard date format that OkHttp supports. Date lastModifiedDate = new Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-1)); Date servedDate = new Date(System.currentTimeMillis() + TimeUnit.HOURS.toMilli...
@Test void function() throws Exception { Date lastModifiedDate = new Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-1)); Date servedDate = new Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-2)); DateFormat dateFormat = new SimpleDateFormat(STR, Locale.US); dateFormat.setTimeZone(TimeZone.getTime...
/** * For Last-Modified and Date headers, we should echo the date back in the * exact format we were served. */
For Last-Modified and Date headers, we should echo the date back in the exact format we were served
retainServedDateFormat
{ "repo_name": "VioletLife/okhttp", "path": "okhttp-urlconnection/src/test/java/com/squareup/okhttp/UrlConnectionCacheTest.java", "license": "apache-2.0", "size": 78105 }
[ "com.squareup.okhttp.mockwebserver.MockResponse", "com.squareup.okhttp.mockwebserver.RecordedRequest", "java.net.HttpURLConnection", "java.text.DateFormat", "java.text.SimpleDateFormat", "java.util.Date", "java.util.Locale", "java.util.TimeZone", "java.util.concurrent.TimeUnit", "org.junit.Assert"...
import com.squareup.okhttp.mockwebserver.MockResponse; import com.squareup.okhttp.mockwebserver.RecordedRequest; import java.net.HttpURLConnection; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import java.util.concurrent.TimeU...
import com.squareup.okhttp.mockwebserver.*; import java.net.*; import java.text.*; import java.util.*; import java.util.concurrent.*; import org.junit.*;
[ "com.squareup.okhttp", "java.net", "java.text", "java.util", "org.junit" ]
com.squareup.okhttp; java.net; java.text; java.util; org.junit;
2,079,952
DeviceEvent removeDevice(DeviceId deviceId);
DeviceEvent removeDevice(DeviceId deviceId);
/** * Administratively removes the specified device from the store. * * @param deviceId device to be removed * @return null if no such device, or was forwarded to remove master */
Administratively removes the specified device from the store
removeDevice
{ "repo_name": "oplinkoms/onos", "path": "core/api/src/main/java/org/onosproject/net/device/DeviceStore.java", "license": "apache-2.0", "size": 7498 }
[ "org.onosproject.net.DeviceId" ]
import org.onosproject.net.DeviceId;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,728,383
protected void loadModuleInfo(final InputStream in) throws ModuleInitializeException { if (in == null) { throw new NullPointerException ("Given InputStream is null."); } try { final ArrayList optionalModules = new ArrayList(); final ArrayList dependendModules = new A...
void function(final InputStream in) throws ModuleInitializeException { if (in == null) { throw new NullPointerException (STR); } try { final ArrayList optionalModules = new ArrayList(); final ArrayList dependendModules = new ArrayList(); final ReaderHelper rh = new ReaderHelper(new BufferedReader (new InputStreamReader...
/** * Loads the module descriptiong from the given input stream. The module description * must conform to the rules define in the class description. The file must be encoded * with "ISO-8859-1" (like property files). * * @param in the input stream from where to read the file * @throws ModuleInitialize...
Loads the module descriptiong from the given input stream. The module description must conform to the rules define in the class description. The file must be encoded with "ISO-8859-1" (like property files)
loadModuleInfo
{ "repo_name": "apetresc/JCommon", "path": "src/main/java/org/jfree/base/modules/AbstractModule.java", "license": "lgpl-2.1", "size": 22050 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.util.ArrayList" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,797,923
public DcmElement putUL(int tag, String value) { return put( value != null && value.length() != 0 ? ValueElement.createUL( tag, StringUtils.parseInt(value, 0L, 0xFFFFFFFFL)) : ValueElement.createUL(tag)); }
DcmElement function(int tag, String value) { return put( value != null && value.length() != 0 ? ValueElement.createUL( tag, StringUtils.parseInt(value, 0L, 0xFFFFFFFFL)) : ValueElement.createUL(tag)); }
/** * Description of the Method * * @param tag Description of the Parameter * @param value Description of the Parameter * @return Description of the Return Value */
Description of the Method
putUL
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4che14/tags/DCM4CHE_1_4_2/src/java/org/dcm4cheri/data/DcmObjectImpl.java", "license": "apache-2.0", "size": 83021 }
[ "org.dcm4che.data.DcmElement", "org.dcm4cheri.util.StringUtils" ]
import org.dcm4che.data.DcmElement; import org.dcm4cheri.util.StringUtils;
import org.dcm4che.data.*; import org.dcm4cheri.util.*;
[ "org.dcm4che.data", "org.dcm4cheri.util" ]
org.dcm4che.data; org.dcm4cheri.util;
1,519,972
static void measureTask(String taskName, String action, Object context, long elapsedTimeNanos) { if (elapsedTimeNanos > Values.SLOW_TASK_THRESHOLD_NANOS) { Log.log(context, "SLOW TASK: ", action, " ", taskName, " took ", Long.toString(((long) (elapsedTimeNanos * Conte...
static void measureTask(String taskName, String action, Object context, long elapsedTimeNanos) { if (elapsedTimeNanos > Values.SLOW_TASK_THRESHOLD_NANOS) { Log.log(context, STR, action, " ", taskName, STR, Long.toString(((long) (elapsedTimeNanos * ContextUtils.INVERSE_1000000))), "ms"); } } /** * A convenience method t...
/** * Logs when the elapsed time > a threshold * * @see Values#SLOW_TASK_THRESHOLD_NANOS */
Logs when the elapsed time > a threshold
measureTask
{ "repo_name": "fimtra/datafission", "path": "src/main/java/com/fimtra/datafission/core/ContextUtils.java", "license": "apache-2.0", "size": 30968 }
[ "com.fimtra.datafission.DataFissionProperties", "com.fimtra.util.Log" ]
import com.fimtra.datafission.DataFissionProperties; import com.fimtra.util.Log;
import com.fimtra.datafission.*; import com.fimtra.util.*;
[ "com.fimtra.datafission", "com.fimtra.util" ]
com.fimtra.datafission; com.fimtra.util;
2,546,611