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
Date getCompletedDateTime();
Date getCompletedDateTime();
/** * Returns the value of the '<em><b>Completed Date Time</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Completed Date Time</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '...
Returns the value of the 'Completed Date Time' attribute. If the meaning of the 'Completed Date Time' attribute isn't clear, there really should be more of a description here...
getCompletedDateTime
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/InfAssets/ProcedureDataSet.java", "license": "mit", "size": 7773 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,601,335
public void diff_cleanupSemanticLossless(LinkedList<Diff> diffs) { String equality1, edit, equality2; String commonString; int commonOffset; int score, bestScore; String bestEquality1, bestEdit, bestEquality2; // Create a new iterator at the start. ListIterator<Diff> pointer = diffs.listIt...
void function(LinkedList<Diff> diffs) { String equality1, edit, equality2; String commonString; int commonOffset; int score, bestScore; String bestEquality1, bestEdit, bestEquality2; ListIterator<Diff> pointer = diffs.listIterator(); Diff prevDiff = pointer.hasNext() ? pointer.next() : null; Diff thisDiff = pointer.has...
/** * Look for single edits surrounded on both sides by equalities * which can be shifted sideways to align the edit to a word boundary. * e.g: The c<ins>at c</ins>ame. -> The <ins>cat </ins>came. * @param diffs LinkedList of Diff objects. */
Look for single edits surrounded on both sides by equalities which can be shifted sideways to align the edit to a word boundary. e.g: The cat came. -> The cat came
diff_cleanupSemanticLossless
{ "repo_name": "mgreau/when-websocket-met-asciidoctor", "path": "src/main/java/com/mgreau/wwsmad/diff/diff_match_patch.java", "license": "mit", "size": 89017 }
[ "java.util.LinkedList", "java.util.ListIterator" ]
import java.util.LinkedList; import java.util.ListIterator;
import java.util.*;
[ "java.util" ]
java.util;
1,411,469
long processInStreamOutLong(int type, BinaryRawReaderEx reader) throws IgniteCheckedException;
long processInStreamOutLong(int type, BinaryRawReaderEx reader) throws IgniteCheckedException;
/** * Process IN operation. * * @param type Type. * @param reader Binary reader. * @return Result. * @throws IgniteCheckedException In case of exception. */
Process IN operation
processInStreamOutLong
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformTarget.java", "license": "apache-2.0", "size": 4177 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.binary.BinaryRawReaderEx" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.binary.BinaryRawReaderEx;
import org.apache.ignite.*; import org.apache.ignite.internal.binary.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,707,406
@DoesServiceRequest public final CloudBlob createSnapshot(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException { return this.createSnapshot(null , accessCondition, options, opContext); }
final CloudBlob function(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException { return this.createSnapshot(null , accessCondition, options, opContext); }
/** * Creates a snapshot of the blob using the specified request options and operation context. * * @param accessCondition * An {@link AccessCondition} object that represents the access conditions for the blob. * @param options * A {@link BlobRequestOptions} object th...
Creates a snapshot of the blob using the specified request options and operation context
createSnapshot
{ "repo_name": "emgerner-msft/azure-storage-java", "path": "microsoft-azure-storage/src/com/microsoft/azure/storage/blob/CloudBlob.java", "license": "apache-2.0", "size": 133550 }
[ "com.microsoft.azure.storage.AccessCondition", "com.microsoft.azure.storage.OperationContext", "com.microsoft.azure.storage.StorageException" ]
import com.microsoft.azure.storage.AccessCondition; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException;
import com.microsoft.azure.storage.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,124,299
@Test public void testPutWorkSheetHyperlink() { System.out.println("PutWorkSheetHyperlink"); String name = "test_cells.xlsx"; String sheetName = "Sheet1"; Integer firstRow = 1; Integer firstColumn = 1; Integer totalRows = 1; Integer totalColumns = 1; String address = "a1"; String storage = ""; S...
void function() { System.out.println(STR); String name = STR; String sheetName = STR; Integer firstRow = 1; Integer firstColumn = 1; Integer totalRows = 1; Integer totalColumns = 1; String address = "a1"; String storage = STRSTRexp:" + apiException.getMessage()); assertNull(apiException); } }
/** * Test of PutWorkSheetHyperlink method, of class CellsApi. */
Test of PutWorkSheetHyperlink method, of class CellsApi
testPutWorkSheetHyperlink
{ "repo_name": "aspose-cells/Aspose.Cells-for-Cloud", "path": "SDKs/Aspose.Cells-Cloud-SDK-for-Android/Aspose.Cells-Cloud-SDK-Android/src/test/java/com/aspose/cells/api/CellsApiTest.java", "license": "mit", "size": 91749 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
239,852
@Test public void testReadFrom() throws Exception { ospfExternalDestination = new OspfExternalDestination(); ospfExternalDestination.setExternalRouterTag(2); ospfExternalDestination.setMetric(100); ospfExternalDestination.setType1orType2Metric(true); externalLsa.addExtern...
void function() throws Exception { ospfExternalDestination = new OspfExternalDestination(); ospfExternalDestination.setExternalRouterTag(2); ospfExternalDestination.setMetric(100); ospfExternalDestination.setType1orType2Metric(true); externalLsa.addExternalDestination(ospfExternalDestination); ospfExternalDestination1 ...
/** * Tests readFrom() method. */
Tests readFrom() method
testReadFrom
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/types/ExternalLsaTest.java", "license": "apache-2.0", "size": 9712 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.jboss.netty.buffer.ChannelBuffers", "org.onosproject.ospf.protocol.lsa.subtypes.OspfExternalDestination" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.ospf.protocol.lsa.subtypes.OspfExternalDestination;
import org.hamcrest.*; import org.jboss.netty.buffer.*; import org.onosproject.ospf.protocol.lsa.subtypes.*;
[ "org.hamcrest", "org.jboss.netty", "org.onosproject.ospf" ]
org.hamcrest; org.jboss.netty; org.onosproject.ospf;
1,542,140
public static char[] toCharArray(Reader input) throws IOException { CharArrayWriter sw = new CharArrayWriter(); copy(input, sw); return sw.toCharArray(); } // read toString //-----------------------------------------------------------------------
static char[] function(Reader input) throws IOException { CharArrayWriter sw = new CharArrayWriter(); copy(input, sw); return sw.toCharArray(); }
/** * Get the contents of a <code>Reader</code> as a character array. * <p/> * This method buffers the input internally, so there is no need to use a * <code>BufferedReader</code>. * * @param input the <code>Reader</code> to read from * @return the requested character array ...
Get the contents of a <code>Reader</code> as a character array. This method buffers the input internally, so there is no need to use a <code>BufferedReader</code>
toCharArray
{ "repo_name": "wzx54321/XinFramework", "path": "app/src/main/java/com/xin/framework/xinframwork/utils/common/io/IOUtils.java", "license": "apache-2.0", "size": 100603 }
[ "java.io.CharArrayWriter", "java.io.IOException", "java.io.Reader" ]
import java.io.CharArrayWriter; import java.io.IOException; import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
2,074,099
private void updateAvailableRepoKeys(List<RepoKeyType> repoList, PermissionTargetModel permissionTarget, List<String> tempRepoKeysList) { repoList.stream(). filter((RepoKeyType key) -> !tempRepoKeysList.contains(key.getRepoKey())). forEach(key -> ...
void function(List<RepoKeyType> repoList, PermissionTargetModel permissionTarget, List<String> tempRepoKeysList) { repoList.stream(). filter((RepoKeyType key) -> !tempRepoKeysList.contains(key.getRepoKey())). forEach(key -> permissionTarget.getAvailableRepoKeys().add( new RepoKeyType(key.getType(), key.getRepoKey())) )...
/** * update permission Available repo keys list * * @param repoList - all repo list keys * @param permissionTarget - target permission selected repo keys * @param tempRepoKeysList - temp repo keys list */
update permission Available repo keys list
updateAvailableRepoKeys
{ "repo_name": "alancnet/artifactory", "path": "web/rest-ui/src/main/java/org/artifactory/ui/rest/service/admin/security/permissions/GetPermissionsTargetService.java", "license": "apache-2.0", "size": 10206 }
[ "java.util.List", "org.artifactory.ui.rest.model.admin.security.permissions.PermissionTargetModel", "org.artifactory.ui.rest.model.utils.repositories.RepoKeyType" ]
import java.util.List; import org.artifactory.ui.rest.model.admin.security.permissions.PermissionTargetModel; import org.artifactory.ui.rest.model.utils.repositories.RepoKeyType;
import java.util.*; import org.artifactory.ui.rest.model.admin.security.permissions.*; import org.artifactory.ui.rest.model.utils.repositories.*;
[ "java.util", "org.artifactory.ui" ]
java.util; org.artifactory.ui;
2,841,221
public void testListEnum() { List<SystemCapabilityType> enumValueList = Arrays.asList(SystemCapabilityType.values()); List<SystemCapabilityType> enumTestList = new ArrayList<SystemCapabilityType>(); enumTestList.add(SystemCapabilityType.NAVIGATION); enumTestList.add(SystemCapabilityType.PHONE_CALL); enum...
void function() { List<SystemCapabilityType> enumValueList = Arrays.asList(SystemCapabilityType.values()); List<SystemCapabilityType> enumTestList = new ArrayList<SystemCapabilityType>(); enumTestList.add(SystemCapabilityType.NAVIGATION); enumTestList.add(SystemCapabilityType.PHONE_CALL); enumTestList.add(SystemCapabil...
/** * Verifies the possible enum values of SystemCapabilityType. */
Verifies the possible enum values of SystemCapabilityType
testListEnum
{ "repo_name": "914802951/sdl_android", "path": "sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/SystemCapabilityTypeTests.java", "license": "bsd-3-clause", "size": 4738 }
[ "com.smartdevicelink.proxy.rpc.enums.SystemCapabilityType", "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import com.smartdevicelink.proxy.rpc.enums.SystemCapabilityType; import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import com.smartdevicelink.proxy.rpc.enums.*; import java.util.*;
[ "com.smartdevicelink.proxy", "java.util" ]
com.smartdevicelink.proxy; java.util;
1,545,770
@Override protected Object execute(Object[] data, State state) { if (returnType == Attribute.Type.DOUBLE) { double total = 0; for (Object aObj : data) { total += Double.parseDouble(String.valueOf(aObj)); } return total; } else { ...
Object function(Object[] data, State state) { if (returnType == Attribute.Type.DOUBLE) { double total = 0; for (Object aObj : data) { total += Double.parseDouble(String.valueOf(aObj)); } return total; } else { long total = 0; for (Object aObj : data) { total += Long.parseLong(String.valueOf(aObj)); } return total; } }
/** * The main execution method which will be called upon event arrival * when there are more then one function parameter * * @param data the runtime values of function parameters * @param state * @return the function result */
The main execution method which will be called upon event arrival when there are more then one function parameter
execute
{ "repo_name": "gokul/siddhi", "path": "modules/siddhi-samples/quick-start-samples/src/main/java/io/siddhi/sample/util/CustomFunctionExtension.java", "license": "apache-2.0", "size": 3854 }
[ "io.siddhi.core.util.snapshot.state.State", "io.siddhi.query.api.definition.Attribute" ]
import io.siddhi.core.util.snapshot.state.State; import io.siddhi.query.api.definition.Attribute;
import io.siddhi.core.util.snapshot.state.*; import io.siddhi.query.api.definition.*;
[ "io.siddhi.core", "io.siddhi.query" ]
io.siddhi.core; io.siddhi.query;
289,958
public ModelAndView handleHelpKKDAllmentReportPage01(HttpServletRequest request, HttpServletResponse response) throws ServletException { String viewName = "kkdAllmentHelpScreenPage01View"; return new ModelAndView(viewName); }
ModelAndView function(HttpServletRequest request, HttpServletResponse response) throws ServletException { String viewName = STR; return new ModelAndView(viewName); }
/** * Custom handler handleHelpKKDAllmentReportPage01. * * @param request current HTTP request * @param response current HTTP response * @return a ModelAndView to render the response */
Custom handler handleHelpKKDAllmentReportPage01
handleHelpKKDAllmentReportPage01
{ "repo_name": "NationalLibraryOfNorway/Bibliotekstatistikk", "path": "abmstatistikk-main/src/main/java/no/abmu/abmstatistikk/web/ABMStatistikkHelpController.java", "license": "gpl-2.0", "size": 61831 }
[ "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.springframework.web.servlet.ModelAndView" ]
import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView;
import javax.servlet.*; import javax.servlet.http.*; import org.springframework.web.servlet.*;
[ "javax.servlet", "org.springframework.web" ]
javax.servlet; org.springframework.web;
2,867,007
if (cfg == null) { return descr; } // cfg.type() defaults to DIRECT, so there is a risk of unwanted override. // do we want this behavior? Link.Type type = descr.type(); if (cfg.type() != type) { type = cfg.type(); } SparseAnnotations sa ...
if (cfg == null) { return descr; } Link.Type type = descr.type(); if (cfg.type() != type) { type = cfg.type(); } SparseAnnotations sa = combine(cfg, descr.annotations()); return new DefaultLinkDescription(descr.src(), descr.dst(), type, sa); }
/** * Generates a LinkDescription containing fields from a LinkDescription and * a LinkConfig. * * @param cfg the link config entity from network config * @param descr a LinkDescription * @return LinkDescription based on both sources */
Generates a LinkDescription containing fields from a LinkDescription and a LinkConfig
combine
{ "repo_name": "sdnwiselab/onos", "path": "core/net/src/main/java/org/onosproject/net/link/impl/BasicLinkOperator.java", "license": "apache-2.0", "size": 5360 }
[ "org.onosproject.net.Link", "org.onosproject.net.SparseAnnotations", "org.onosproject.net.link.DefaultLinkDescription" ]
import org.onosproject.net.Link; import org.onosproject.net.SparseAnnotations; import org.onosproject.net.link.DefaultLinkDescription;
import org.onosproject.net.*; import org.onosproject.net.link.*;
[ "org.onosproject.net" ]
org.onosproject.net;
266,963
public List<VenState> queryByRange(String jpqlStmt, int firstResult, int maxResults);
List<VenState> function(String jpqlStmt, int firstResult, int maxResults);
/** * queryByRange - allows querying by range/block * * @param jpqlStmt * @param firstResult * @param maxResults * @return a list of VenState */
queryByRange - allows querying by range/block
queryByRange
{ "repo_name": "yauritux/venice-legacy", "path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/VenStateSessionEJBRemote.java", "license": "apache-2.0", "size": 2160 }
[ "com.gdn.venice.persistence.VenState", "java.util.List" ]
import com.gdn.venice.persistence.VenState; import java.util.List;
import com.gdn.venice.persistence.*; import java.util.*;
[ "com.gdn.venice", "java.util" ]
com.gdn.venice; java.util;
805,390
public WorkspaceRuntimeImpl getRuntime(String workspaceId) throws NotFoundException, ServerException { requireNonNull(workspaceId, "Required non-null workspace id"); RuntimeState state; try (@SuppressWarnings("unused") Unlocker u = locks.readLock(workspaceId)) { state = new Runti...
WorkspaceRuntimeImpl function(String workspaceId) throws NotFoundException, ServerException { requireNonNull(workspaceId, STR); RuntimeState state; try (@SuppressWarnings(STR) Unlocker u = locks.readLock(workspaceId)) { state = new RuntimeState(getExistingState(workspaceId)); } return new WorkspaceRuntimeImpl(state.env...
/** * Gets workspace runtime descriptor. * * @param workspaceId * the id of the workspace to get its runtime * @return descriptor which describes current state of the workspace runtime * @throws NotFoundException * when workspace with given {@code workspaceId} is not f...
Gets workspace runtime descriptor
getRuntime
{ "repo_name": "snjeza/che", "path": "wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/WorkspaceRuntimes.java", "license": "epl-1.0", "size": 49995 }
[ "java.util.Objects", "org.eclipse.che.api.core.NotFoundException", "org.eclipse.che.api.core.ServerException", "org.eclipse.che.api.workspace.server.model.impl.WorkspaceRuntimeImpl", "org.eclipse.che.commons.lang.concurrent.Unlocker" ]
import java.util.Objects; import org.eclipse.che.api.core.NotFoundException; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.workspace.server.model.impl.WorkspaceRuntimeImpl; import org.eclipse.che.commons.lang.concurrent.Unlocker;
import java.util.*; import org.eclipse.che.api.core.*; import org.eclipse.che.api.workspace.server.model.impl.*; import org.eclipse.che.commons.lang.concurrent.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
588,981
public static Tailer create(File file, TailerListener listener, long delayMillis) { return create(file, listener, delayMillis, false); }
static Tailer function(File file, TailerListener listener, long delayMillis) { return create(file, listener, delayMillis, false); }
/** * Creates and starts a Tailer for the given file, starting at the beginning of the file * * @param file the file to follow. * @param listener the TailerListener to use. * @param delayMillis the delay between checks of the file for new content in milliseconds. * @return The new tailer ...
Creates and starts a Tailer for the given file, starting at the beginning of the file
create
{ "repo_name": "Herobrine2Nether/NetherLauncher", "path": "src/org/apache/commons/io/input/Tailer.java", "license": "mit", "size": 17367 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,871,036
static UnsignedInt signedToUnsigned32(int value) { return new UnsignedInt((long)((value << 1) ^ (value >> 31))); }
static UnsignedInt signedToUnsigned32(int value) { return new UnsignedInt((long)((value << 1) ^ (value >> 31))); }
/** * Convert signed int32 to unsigned int32 in Zigzag encoding. * @param value Signed int32 value. * @return Matched unsigned int32. */
Convert signed int32 to unsigned int32 in Zigzag encoding
signedToUnsigned32
{ "repo_name": "fuzhouch/qbranch", "path": "core/src/main/java/net/dummydigit/qbranch/utils/ZigZag.java", "license": "mit", "size": 3184 }
[ "net.dummydigit.qbranch.UnsignedInt" ]
import net.dummydigit.qbranch.UnsignedInt;
import net.dummydigit.qbranch.*;
[ "net.dummydigit.qbranch" ]
net.dummydigit.qbranch;
227,315
public byte[] convertToVorbisSetupHeaderPacketAndAdditionalPackets(long fileOffsetOfStartingOggPage, RandomAccessFile raf) throws IOException, CannotReadException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); //Seek to specified offset raf.seek(fileOffsetOfStartingOggPage)...
byte[] function(long fileOffsetOfStartingOggPage, RandomAccessFile raf) throws IOException, CannotReadException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); raf.seek(fileOffsetOfStartingOggPage); OggPageHeader setupPageHeader = OggPageHeader.read(raf); if (setupPageHeader.getPacketList().size() > 1) { ra...
/** * The Vorbis Setup Header may span multiple(2) pages, athough it doesnt normally. We pass the start of the * file offset of the OggPage it belongs on, it probably won't be first packet, also returns any addditional * packets that immediately follow the setup header in original file * *...
The Vorbis Setup Header may span multiple(2) pages, athough it doesnt normally. We pass the start of the file offset of the OggPage it belongs on, it probably won't be first packet, also returns any addditional packets that immediately follow the setup header in original file
convertToVorbisSetupHeaderPacketAndAdditionalPackets
{ "repo_name": "jacky8hyf/musique", "path": "dependencies/jaudiotagger/src/main/java/org/jaudiotagger/audio/ogg/OggVorbisTagReader.java", "license": "lgpl-3.0", "size": 28100 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.RandomAccessFile", "org.jaudiotagger.audio.exceptions.CannotReadException", "org.jaudiotagger.audio.ogg.util.OggPageHeader", "org.jaudiotagger.audio.ogg.util.VorbisHeader" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.RandomAccessFile; import org.jaudiotagger.audio.exceptions.CannotReadException; import org.jaudiotagger.audio.ogg.util.OggPageHeader; import org.jaudiotagger.audio.ogg.util.VorbisHeader;
import java.io.*; import org.jaudiotagger.audio.exceptions.*; import org.jaudiotagger.audio.ogg.util.*;
[ "java.io", "org.jaudiotagger.audio" ]
java.io; org.jaudiotagger.audio;
1,884,047
public SearchSourceBuilder getSearchSource() { return this.searchRequest.source(); }
SearchSourceBuilder function() { return this.searchRequest.source(); }
/** * Gets if the source of the {@link SearchSourceBuilder} initially used on this request. */
Gets if the source of the <code>SearchSourceBuilder</code> initially used on this request
getSearchSource
{ "repo_name": "robin13/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/asyncsearch/SubmitAsyncSearchRequest.java", "license": "apache-2.0", "size": 9237 }
[ "org.elasticsearch.search.builder.SearchSourceBuilder" ]
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.builder.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
1,185,997
@Override protected String getLivingSound() { return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "ostrichlivingsound"; }
String function() { return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + STR; }
/** * Returns the sound this mob makes while it's alive. */
Returns the sound this mob makes while it's alive
getLivingSound
{ "repo_name": "soultek101/projectzulu1.7.10", "path": "src/main/java/com/stek101/projectzulu/common/mobs/entity/EntityOstrich.java", "license": "lgpl-2.1", "size": 6170 }
[ "com.stek101.projectzulu.common.core.DefaultProps" ]
import com.stek101.projectzulu.common.core.DefaultProps;
import com.stek101.projectzulu.common.core.*;
[ "com.stek101.projectzulu" ]
com.stek101.projectzulu;
1,440,843
public Decision canAllocate(ShardRouting shardRouting, RoutingAllocation allocation) { return Decision.ALWAYS; }
Decision function(ShardRouting shardRouting, RoutingAllocation allocation) { return Decision.ALWAYS; }
/** * Returns a {@link Decision} whether the given shard routing can be allocated at all at this state of the * {@link RoutingAllocation}. The default is {@link Decision#ALWAYS}. */
Returns a <code>Decision</code> whether the given shard routing can be allocated at all at this state of the <code>RoutingAllocation</code>. The default is <code>Decision#ALWAYS</code>
canAllocate
{ "repo_name": "EvilMcJerkface/crate", "path": "server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/AllocationDecider.java", "license": "apache-2.0", "size": 5705 }
[ "org.elasticsearch.cluster.routing.ShardRouting", "org.elasticsearch.cluster.routing.allocation.RoutingAllocation" ]
import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.cluster.routing.allocation.RoutingAllocation;
import org.elasticsearch.cluster.routing.*; import org.elasticsearch.cluster.routing.allocation.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
1,936,319
public Connection testHomeMadeConnection(String dbUrl, String dbUser, String dbPassword) throws SQLException{ return DriverManager.getConnection(dbUrl, dbUser, dbPassword); }
Connection function(String dbUrl, String dbUser, String dbPassword) throws SQLException{ return DriverManager.getConnection(dbUrl, dbUser, dbPassword); }
/** * Only added for demonstration purpose in the user manual * Don't use in your applications! * * @param dbUrl * @param dbUser * @param dbPassword * @return * @throws SQLException */
Only added for demonstration purpose in the user manual Don't use in your applications
testHomeMadeConnection
{ "repo_name": "Unforgettable631/jdbcslim", "path": "src/main/java/six42/fitnesse/jdbcslim/SQLCommand.java", "license": "mpl-2.0", "size": 17503 }
[ "java.sql.Connection", "java.sql.DriverManager", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,976,070
public PrivateLinkServiceConnectionProperties withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; }
PrivateLinkServiceConnectionProperties function( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; }
/** * Set the privateLinkServiceConnectionState property: A collection of read-only information about the state of the * connection to the remote resource. * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateLinkServiceConnection...
Set the privateLinkServiceConnectionState property: A collection of read-only information about the state of the connection to the remote resource
withPrivateLinkServiceConnectionState
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/PrivateLinkServiceConnectionProperties.java", "license": "mit", "size": 5712 }
[ "com.azure.resourcemanager.network.models.PrivateLinkServiceConnectionState" ]
import com.azure.resourcemanager.network.models.PrivateLinkServiceConnectionState;
import com.azure.resourcemanager.network.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
813,862
EClass getCustomerConsumer();
EClass getCustomerConsumer();
/** * Returns the meta object for class '{@link gluemodel.CIM.IEC61970.Informative.Financial.CustomerConsumer <em>Customer Consumer</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Customer Consumer</em>'. * @see gluemodel.CIM.IEC61970.Informative.Financial.Cu...
Returns the meta object for class '<code>gluemodel.CIM.IEC61970.Informative.Financial.CustomerConsumer Customer Consumer</code>'.
getCustomerConsumer
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/Financial/FinancialPackage.java", "license": "mit", "size": 116407 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,777,170
public boolean allReplicasActive(ShardId shardId, Metadata metadata) { final List<ShardRouting> shards = assignedShards(shardId); if (shards.isEmpty() || shards.size() < metadata.getIndexSafe(shardId.getIndex()).getNumberOfReplicas() + 1) { return false; // if we are empty nothing is act...
boolean function(ShardId shardId, Metadata metadata) { final List<ShardRouting> shards = assignedShards(shardId); if (shards.isEmpty() shards.size() < metadata.getIndexSafe(shardId.getIndex()).getNumberOfReplicas() + 1) { return false; } for (ShardRouting shard : shards) { if (!shard.active()) { return false; } } retur...
/** * Returns <code>true</code> iff all replicas are active for the given shard routing. Otherwise <code>false</code> */
Returns <code>true</code> iff all replicas are active for the given shard routing. Otherwise <code>false</code>
allReplicasActive
{ "repo_name": "gingerwizard/elasticsearch", "path": "server/src/main/java/org/elasticsearch/cluster/routing/RoutingNodes.java", "license": "apache-2.0", "size": 55706 }
[ "java.util.List", "org.elasticsearch.cluster.metadata.Metadata", "org.elasticsearch.index.shard.ShardId" ]
import java.util.List; import org.elasticsearch.cluster.metadata.Metadata; import org.elasticsearch.index.shard.ShardId;
import java.util.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.index.shard.*;
[ "java.util", "org.elasticsearch.cluster", "org.elasticsearch.index" ]
java.util; org.elasticsearch.cluster; org.elasticsearch.index;
1,608,013
default void grantTablePrivileges(ConnectorSession session, SchemaTableName tableName, Set<Privilege> privileges, String grantee, boolean grantOption) { throw new PrestoException(NOT_SUPPORTED, "This connector does not support grants"); }
default void grantTablePrivileges(ConnectorSession session, SchemaTableName tableName, Set<Privilege> privileges, String grantee, boolean grantOption) { throw new PrestoException(NOT_SUPPORTED, STR); }
/** * Grants the specified privilege to the specified user on the specified table */
Grants the specified privilege to the specified user on the specified table
grantTablePrivileges
{ "repo_name": "sopel39/presto", "path": "presto-spi/src/main/java/io/prestosql/spi/connector/ConnectorMetadata.java", "license": "apache-2.0", "size": 18147 }
[ "io.prestosql.spi.PrestoException", "io.prestosql.spi.security.Privilege", "java.util.Set" ]
import io.prestosql.spi.PrestoException; import io.prestosql.spi.security.Privilege; import java.util.Set;
import io.prestosql.spi.*; import io.prestosql.spi.security.*; import java.util.*;
[ "io.prestosql.spi", "java.util" ]
io.prestosql.spi; java.util;
1,304,217
public static HttpResponse fromEvent(ServerSentEvent sse) { return fromEvent(defaultHttpHeaders, sse, HttpHeaders.of()); }
static HttpResponse function(ServerSentEvent sse) { return fromEvent(defaultHttpHeaders, sse, HttpHeaders.of()); }
/** * Creates a new Server-Sent Events stream of the specified {@code content}. * * @param sse the {@link ServerSentEvent} object supposed to send as contents */
Creates a new Server-Sent Events stream of the specified content
fromEvent
{ "repo_name": "line/armeria", "path": "core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java", "license": "apache-2.0", "size": 18326 }
[ "com.linecorp.armeria.common.HttpHeaders", "com.linecorp.armeria.common.HttpResponse", "com.linecorp.armeria.common.sse.ServerSentEvent" ]
import com.linecorp.armeria.common.HttpHeaders; import com.linecorp.armeria.common.HttpResponse; import com.linecorp.armeria.common.sse.ServerSentEvent;
import com.linecorp.armeria.common.*; import com.linecorp.armeria.common.sse.*;
[ "com.linecorp.armeria" ]
com.linecorp.armeria;
1,969,899
Object put(char key, Object value) { if (itemsKeys == null) { itemsKeys = new char[1]; itemsKeys[0] = key; itemsObjs = new Object[1]; itemsObjs[0] = value; return value; }// if first time int index ...
Object put(char key, Object value) { if (itemsKeys == null) { itemsKeys = new char[1]; itemsKeys[0] = key; itemsObjs = new Object[1]; itemsObjs[0] = value; return value; } int index = Arrays.binarySearch(itemsKeys, key); if (index<0) { index = ~index; resize(index); itemsKeys[index] = key; itemsObjs[index] = value; } r...
/** * put the object into the char map using the char as the key */
put the object into the char map using the char as the key
put
{ "repo_name": "masterucm1617/botzzaroni", "path": "BotzzaroniDev/GATE_Developer_8.4/src/main/gate/creole/gazetteer/DefaultGazetteer.java", "license": "gpl-3.0", "size": 22056 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,462,080
@Override public void enterGenericConstructorDeclaration(@NotNull PJParser.GenericConstructorDeclarationContext ctx) { }
@Override public void enterGenericConstructorDeclaration(@NotNull PJParser.GenericConstructorDeclarationContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitIfRule
{ "repo_name": "Diolor/PJ", "path": "src/main/java/com/lorentzos/pj/PJBaseListener.java", "license": "mit", "size": 73292 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
782,570
public static void registerGlobalNamespace(final String prefix, final String namespaceURI) { sGlobalNamespaces.put(prefix, namespaceURI); } public XPathHelper() { // copy global namespaces for (final Entry<String, String> entry : getGlobalNamespaces().entrySet()) { getNamespaceContext().addNames...
static void function(final String prefix, final String namespaceURI) { sGlobalNamespaces.put(prefix, namespaceURI); } public XPathHelper() { for (final Entry<String, String> entry : getGlobalNamespaces().entrySet()) { getNamespaceContext().addNamespace(entry.getKey(), entry.getValue()); } for (final Entry<QName, Class<...
/** * Registers a global namespace. Global namespaces are added to the list of * namespaces of a webtest at the webtest start. * @param prefix the namespace prefix to resolve * @param namespaceURI the namespace URI */
Registers a global namespace. Global namespaces are added to the list of namespaces of a webtest at the webtest start
registerGlobalNamespace
{ "repo_name": "lukecampbell/webtest", "path": "src/main/java/com/canoo/webtest/engine/xpath/XPathHelper.java", "license": "apache-2.0", "size": 13215 }
[ "com.gargoylesoftware.htmlunit.html.xpath.XPathUtils", "java.lang.reflect.Field", "java.util.Map", "javax.xml.namespace.QName", "org.apache.xpath.functions.Function" ]
import com.gargoylesoftware.htmlunit.html.xpath.XPathUtils; import java.lang.reflect.Field; import java.util.Map; import javax.xml.namespace.QName; import org.apache.xpath.functions.Function;
import com.gargoylesoftware.htmlunit.html.xpath.*; import java.lang.reflect.*; import java.util.*; import javax.xml.namespace.*; import org.apache.xpath.functions.*;
[ "com.gargoylesoftware.htmlunit", "java.lang", "java.util", "javax.xml", "org.apache.xpath" ]
com.gargoylesoftware.htmlunit; java.lang; java.util; javax.xml; org.apache.xpath;
904,017
public void globalSampling(@Nullable Boolean val) throws IgniteCheckedException;
void function(@Nullable Boolean val) throws IgniteCheckedException;
/** * Enables, disables or clears sampling flag. * * @param val {@code True} to turn on sampling, {@code false} to turn it off, {@code null} to clear sampling state. * @throws IgniteCheckedException If failed. */
Enables, disables or clears sampling flag
globalSampling
{ "repo_name": "ryanzz/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsEx.java", "license": "apache-2.0", "size": 4867 }
[ "org.apache.ignite.IgniteCheckedException", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.IgniteCheckedException; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
538,212
default void onActivation(Supplier<Iterator<T>> eventsIt, Supplier<Iterator<T>> newEventsIt, Supplier<Iterator<T>> expiredIt, Long referenceTime) { throw new UnsupportedOperationException("Not implemented"); }
default void onActivation(Supplier<Iterator<T>> eventsIt, Supplier<Iterator<T>> newEventsIt, Supplier<Iterator<T>> expiredIt, Long referenceTime) { throw new UnsupportedOperationException(STR); }
/** * Called on activation of the window due to the {@link TriggerPolicy}. This is typically invoked when the windows are persisted in * state and is huge to be loaded entirely in memory. * * @param eventsIt a supplier of iterator over the list of current events in the window * @param newE...
Called on activation of the window due to the <code>TriggerPolicy</code>. This is typically invoked when the windows are persisted in state and is huge to be loaded entirely in memory
onActivation
{ "repo_name": "srdo/storm", "path": "storm-client/src/jvm/org/apache/storm/windowing/WindowLifecycleListener.java", "license": "apache-2.0", "size": 2752 }
[ "java.util.Iterator", "java.util.function.Supplier" ]
import java.util.Iterator; import java.util.function.Supplier;
import java.util.*; import java.util.function.*;
[ "java.util" ]
java.util;
2,866,003
List errors = new ArrayList(); return validate(element, null, errors); }
List errors = new ArrayList(); return validate(element, null, errors); }
/** * Validate this element from the root. * * @param element filled in element to be validated. * @return list of ValidationError objects. If this list is * returned empty, then the element validated successfully * @see org.sakaiproject.metaobj.shared.model.ValidationError */
Validate this element from the root
validate
{ "repo_name": "harfalm/Sakai-10.1", "path": "metaobj/metaobj-impl/api-impl/src/java/org/sakaiproject/metaobj/shared/mgt/impl/StructuredArtifactValidationServiceImpl.java", "license": "apache-2.0", "size": 10698 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,627,281
public PaymentApplicationDocument createSaveAndApprovePaymentApplicationToMatchInvoice(CustomerInvoiceDocument customerInvoiceDocument, String approvalAnnotation, List workflowNotificationRecipients) throws WorkflowException;
PaymentApplicationDocument function(CustomerInvoiceDocument customerInvoiceDocument, String approvalAnnotation, List workflowNotificationRecipients) throws WorkflowException;
/** * This method creates, saves and approves a PaymentApplication document for a given invoice with the * given approval annotation and adhoc recipients. * * @param customerInvoiceDocument invoice to create PaymentApplication from * @param approvalAnnotation annotation for approval action ...
This method creates, saves and approves a PaymentApplication document for a given invoice with the given approval annotation and adhoc recipients
createSaveAndApprovePaymentApplicationToMatchInvoice
{ "repo_name": "ua-eas/kfs-devops-automation-fork", "path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/service/PaymentApplicationDocumentService.java", "license": "agpl-3.0", "size": 6767 }
[ "java.util.List", "org.kuali.kfs.module.ar.document.CustomerInvoiceDocument", "org.kuali.kfs.module.ar.document.PaymentApplicationDocument", "org.kuali.rice.kew.api.exception.WorkflowException" ]
import java.util.List; import org.kuali.kfs.module.ar.document.CustomerInvoiceDocument; import org.kuali.kfs.module.ar.document.PaymentApplicationDocument; import org.kuali.rice.kew.api.exception.WorkflowException;
import java.util.*; import org.kuali.kfs.module.ar.document.*; import org.kuali.rice.kew.api.exception.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
1,120,719
public void callAsync( byte channel, short objId, short procId, Object... args ) { RpcCallMessage msg = new RpcCallMessage(-1, channel, objId, procId, args); if( log.isLoggable(Level.FINEST) ) { log.log(Level.FINEST, "Sending:{0} on channel:{1}", new Object[]{msg, channel})...
void function( byte channel, short objId, short procId, Object... args ) { RpcCallMessage msg = new RpcCallMessage(-1, channel, objId, procId, args); if( log.isLoggable(Level.FINEST) ) { log.log(Level.FINEST, STR, new Object[]{msg, channel}); } connection.send(channel, msg); }
/** * Performs a remote procedure call with the specified arguments but does * not wait for a response. The outbound message is sent on the specified channel. * There is no inbound response message. */
Performs a remote procedure call with the specified arguments but does not wait for a response. The outbound message is sent on the specified channel. There is no inbound response message
callAsync
{ "repo_name": "OpenGrabeso/jmonkeyengine", "path": "jme3-networking/src/main/java/com/jme3/network/service/rpc/RpcConnection.java", "license": "bsd-3-clause", "size": 10206 }
[ "com.jme3.network.service.rpc.msg.RpcCallMessage", "java.util.logging.Level" ]
import com.jme3.network.service.rpc.msg.RpcCallMessage; import java.util.logging.Level;
import com.jme3.network.service.rpc.msg.*; import java.util.logging.*;
[ "com.jme3.network", "java.util" ]
com.jme3.network; java.util;
1,487,228
public static String replaceAllColumnReferences(String input, Map<Long, String> idToColumnName) { Matcher matcher = PATTERN_COLUMM_ID.matcher(input); // This will contain the new string StringBuffer sb = new StringBuffer(); while (matcher.find()) { // The group will be a raw value like: '_C123_' ...
static String function(String input, Map<Long, String> idToColumnName) { Matcher matcher = PATTERN_COLUMM_ID.matcher(input); StringBuffer sb = new StringBuffer(); while (matcher.find()) { String group = matcher.group(); Long id = Long.parseLong(group.substring(2, group.length() - 1)); String name = idToColumnName.get(i...
/** * Replace all column id (_C123_) in the given input string with the name of the * column. * * @param input * @param idToColumnMap * @return */
Replace all column id (_C123_) in the given input string with the name of the column
replaceAllColumnReferences
{ "repo_name": "Sage-Bionetworks/Synapse-Repository-Services", "path": "lib/jdomodels/src/main/java/org/sagebionetworks/repo/model/dbo/dao/table/TableExceptionTranslatorImpl.java", "license": "apache-2.0", "size": 5488 }
[ "java.util.Map", "java.util.regex.Matcher" ]
import java.util.Map; import java.util.regex.Matcher;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
990,688
@ParameterizedTest @MethodSource("java.util.Locale#getAvailableLocales") public void testToLocales(final Locale actualLocale) { assertEquals(actualLocale, LocaleUtils.toLocale(actualLocale)); }
@MethodSource(STR) void function(final Locale actualLocale) { assertEquals(actualLocale, LocaleUtils.toLocale(actualLocale)); }
/** * Test toLocale(Locale) method. */
Test toLocale(Locale) method
testToLocales
{ "repo_name": "britter/commons-lang", "path": "src/test/java/org/apache/commons/lang3/LocaleUtilsTest.java", "license": "apache-2.0", "size": 22798 }
[ "java.util.Locale", "org.junit.jupiter.api.Assertions", "org.junit.jupiter.params.provider.MethodSource" ]
import java.util.Locale; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.provider.MethodSource;
import java.util.*; import org.junit.jupiter.api.*; import org.junit.jupiter.params.provider.*;
[ "java.util", "org.junit.jupiter" ]
java.util; org.junit.jupiter;
2,525,937
public int authentication (String pplayer) { String uunew1; Edit_admin ea = new Edit_admin(); int c = 0,flag=0; boolean pp = false,uu = false; String z,x ; Scanner inputuser = null; Scanner inputuser1=null; try{ inputuser...
int function (String pplayer) { String uunew1; Edit_admin ea = new Edit_admin(); int c = 0,flag=0; boolean pp = false,uu = false; String z,x ; Scanner inputuser = null; Scanner inputuser1=null; try{ inputuser = new Scanner(new File(STR+ea.uunew+STR)); } catch (IOException e) { JOptionPane.showMessageDialog(this,STR,STR...
/** * Creates new form Editing */
Creates new form Editing
authentication
{ "repo_name": "hazimhanif/hangmanJV", "path": "HANGMANapplet/src/Player_Login.java", "license": "gpl-2.0", "size": 12376 }
[ "java.io.File", "java.io.IOException", "java.util.Scanner", "javax.swing.JOptionPane" ]
import java.io.File; import java.io.IOException; import java.util.Scanner; import javax.swing.JOptionPane;
import java.io.*; import java.util.*; import javax.swing.*;
[ "java.io", "java.util", "javax.swing" ]
java.io; java.util; javax.swing;
2,249,408
private File buildFile(String placeId) { StringBuilder fileNameBuilder = new StringBuilder(); fileNameBuilder.append(this.cacheDir.getPath()) .append(File.separator) .append(DEFAULT_FILE_NAME) .append(placeId); return new File(fileNameBuilder....
File function(String placeId) { StringBuilder fileNameBuilder = new StringBuilder(); fileNameBuilder.append(this.cacheDir.getPath()) .append(File.separator) .append(DEFAULT_FILE_NAME) .append(placeId); return new File(fileNameBuilder.toString()); }
/** * Build a file, used to be inserted in the disk cache. * * @param placeId The id place to build the file. * @return A valid file. */
Build a file, used to be inserted in the disk cache
buildFile
{ "repo_name": "siarhei-luskanau/siarhei.luskanau.places", "path": "data/src/main/java/siarhei/luskanau/places/data/cache/PlaceCacheImpl.java", "license": "mit", "size": 6814 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
939,792
protected Expression equals(int opPos) throws TransformerException { return compileOperation(new Equals(), opPos); }
Expression function(int opPos) throws TransformerException { return compileOperation(new Equals(), opPos); }
/** * Compile a '=' operation. * * @param opPos The current position in the m_opMap array. * * @return reference to {@link com.sun.org.apache.xpath.internal.operations.Equals} instance. * * @throws TransformerException if a error occurs creating the Expression. */
Compile a '=' operation
equals
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/org/apache/xpath/internal/compiler/Compiler.java", "license": "apache-2.0", "size": 39039 }
[ "com.sun.org.apache.xpath.internal.Expression", "com.sun.org.apache.xpath.internal.operations.Equals", "javax.xml.transform.TransformerException" ]
import com.sun.org.apache.xpath.internal.Expression; import com.sun.org.apache.xpath.internal.operations.Equals; import javax.xml.transform.TransformerException;
import com.sun.org.apache.xpath.internal.*; import com.sun.org.apache.xpath.internal.operations.*; import javax.xml.transform.*;
[ "com.sun.org", "javax.xml" ]
com.sun.org; javax.xml;
313,551
public List<MLetContent> parse(URL url) throws IOException { String mth = "parse"; // Warning Messages String requiresTypeWarning = "<arg type=... value=...> tag requires type parameter."; String requiresValueWarning = "<arg type=... value=...> tag requires value parameter."; ...
List<MLetContent> function(URL url) throws IOException { String mth = "parse"; String requiresTypeWarning = STR; String requiresValueWarning = STR; String paramOutsideWarning = STR; String requiresCodeWarning = STR; String requiresJarsWarning = STR; URLConnection conn; conn = url.openConnection(); Reader in = new Buffe...
/** * Scan an html file for {@literal <mlet>} tags. */
Scan an html file for tags
parse
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.management/share/classes/javax/management/loading/MLetParser.java", "license": "gpl-2.0", "size": 10205 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.io.Reader", "java.net.URLConnection", "java.util.ArrayList", "java.util.List", "java.util.Map", "java.util.logging.Level" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.net.URLConnection; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.logging.Level;
import java.io.*; import java.net.*; import java.util.*; import java.util.logging.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
1,698,515
@RequestProcessing(value = "/admin-preference.do", method = HTTPRequestMethod.GET) public void showAdminPreferenceFunction(final HttpServletRequest request, final HTTPRequestContext context) { final AbstractFreeMarkerRenderer renderer = new ConsoleRenderer(); context.setRenderer(renderer); ...
@RequestProcessing(value = STR, method = HTTPRequestMethod.GET) void function(final HttpServletRequest request, final HTTPRequestContext context) { final AbstractFreeMarkerRenderer renderer = new ConsoleRenderer(); context.setRenderer(renderer); final String templateName = STR; renderer.setTemplateName(templateName); f...
/** * Shows administrator preference function with the specified context. * * @param request the specified request * @param context the specified context */
Shows administrator preference function with the specified context
showAdminPreferenceFunction
{ "repo_name": "sshiting/solo", "path": "src/main/java/org/b3log/solo/processor/console/AdminConsole.java", "license": "apache-2.0", "size": 11570 }
[ "java.util.Locale", "java.util.Map", "java.util.TimeZone", "javax.servlet.http.HttpServletRequest", "org.b3log.latke.Latkes", "org.b3log.latke.logging.Level", "org.b3log.latke.service.ServiceException", "org.b3log.latke.servlet.HTTPRequestContext", "org.b3log.latke.servlet.HTTPRequestMethod", "org...
import java.util.Locale; import java.util.Map; import java.util.TimeZone; import javax.servlet.http.HttpServletRequest; import org.b3log.latke.Latkes; import org.b3log.latke.logging.Level; import org.b3log.latke.service.ServiceException; import org.b3log.latke.servlet.HTTPRequestContext; import org.b3log.latke.servlet....
import java.util.*; import javax.servlet.http.*; import org.b3log.latke.*; import org.b3log.latke.logging.*; import org.b3log.latke.service.*; import org.b3log.latke.servlet.*; import org.b3log.latke.servlet.annotation.*; import org.b3log.latke.servlet.renderer.freemarker.*; import org.b3log.solo.model.*; import org.b3...
[ "java.util", "javax.servlet", "org.b3log.latke", "org.b3log.solo", "org.json" ]
java.util; javax.servlet; org.b3log.latke; org.b3log.solo; org.json;
718,372
public RedisTransaction georadiusbymember(String key, String member, double radius, GeoUnit unit, Handler<AsyncResult<String>> handler) { delegate.georadiusbymember(key, member, radius, unit, handler); return this; }
RedisTransaction function(String key, String member, double radius, GeoUnit unit, Handler<AsyncResult<String>> handler) { delegate.georadiusbymember(key, member, radius, unit, handler); return this; }
/** * This command is exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area * to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial * index represented by the sorted set. * @param key Key string * @param ...
This command is exactly like GEORADIUS with the sole difference that instead of taking, as the center of the area to query, a longitude and latitude value, it takes the name of a member already existing inside the geospatial index represented by the sorted set
georadiusbymember
{ "repo_name": "brianjcj/vertx-redis-client", "path": "src/main/generated/io/vertx/rxjava/redis/RedisTransaction.java", "license": "apache-2.0", "size": 184983 }
[ "io.vertx.core.AsyncResult", "io.vertx.core.Handler", "io.vertx.redis.op.GeoUnit" ]
import io.vertx.core.AsyncResult; import io.vertx.core.Handler; import io.vertx.redis.op.GeoUnit;
import io.vertx.core.*; import io.vertx.redis.op.*;
[ "io.vertx.core", "io.vertx.redis" ]
io.vertx.core; io.vertx.redis;
638,769
@SuppressWarnings("rawtypes") public static Map<String, Object> encodeToMap(LoggingEvent loggingEvent, boolean includeLocationInfo) { Map<String, Object> logstashEvent = new LoggingEventMap(); String threadName = loggingEvent.getThreadName(); long timestamp = loggingEvent.getTimeStamp(); HashMap<Str...
@SuppressWarnings(STR) static Map<String, Object> function(LoggingEvent loggingEvent, boolean includeLocationInfo) { Map<String, Object> logstashEvent = new LoggingEventMap(); String threadName = loggingEvent.getThreadName(); long timestamp = loggingEvent.getTimeStamp(); HashMap<String, Object> exceptionInformation = n...
/** * Encodes a LoggingEvent into a HashMap using the logstash JSON format. * * @param loggingEvent * The LoggingEvent to encode. * @param includeLocationInfo * Whether to include LocationInfo in the map, or not. * @return A Map representing the LoggingEvent, which is suitable to...
Encodes a LoggingEvent into a HashMap using the logstash JSON format
encodeToMap
{ "repo_name": "prateekm/samza", "path": "samza-log4j/src/main/java/org/apache/samza/logging/log4j/serializers/LoggingEventJsonSerde.java", "license": "apache-2.0", "size": 7131 }
[ "java.util.HashMap", "java.util.Map", "org.apache.log4j.spi.LocationInfo", "org.apache.log4j.spi.LoggingEvent", "org.apache.log4j.spi.ThrowableInformation" ]
import java.util.HashMap; import java.util.Map; import org.apache.log4j.spi.LocationInfo; import org.apache.log4j.spi.LoggingEvent; import org.apache.log4j.spi.ThrowableInformation;
import java.util.*; import org.apache.log4j.spi.*;
[ "java.util", "org.apache.log4j" ]
java.util; org.apache.log4j;
941,746
public void logBuildRunAction(final BuildRunAction bra) { ConfigurationManager.getInstance().saveObject(bra); }
void function(final BuildRunAction bra) { ConfigurationManager.getInstance().saveObject(bra); }
/** * Logs an action on a build run by storing this {@link * BuildRunAction} object. */
Logs an action on a build run by storing this <code>BuildRunAction</code> object
logBuildRunAction
{ "repo_name": "simeshev/parabuild-ci", "path": "src/org/parabuild/ci/configuration/ResultGroupManager.java", "license": "lgpl-3.0", "size": 8973 }
[ "org.parabuild.ci.object.BuildRunAction" ]
import org.parabuild.ci.object.BuildRunAction;
import org.parabuild.ci.object.*;
[ "org.parabuild.ci" ]
org.parabuild.ci;
2,693,395
ResourceSet query(XMLResource res, String query) throws XMLDBException;
ResourceSet query(XMLResource res, String query) throws XMLDBException;
/** * Process an XPath query based on the result of a previous query. * The XMLResource contains the result received from a previous * query. * * @param res an XMLResource as obtained from a previous query. * @param query the XPath query * * @return the results of the query ...
Process an XPath query based on the result of a previous query. The XMLResource contains the result received from a previous query
query
{ "repo_name": "windauer/exist", "path": "exist-core/src/main/java/org/exist/xmldb/EXistXPathQueryService.java", "license": "lgpl-2.1", "size": 6423 }
[ "org.xmldb.api.base.ResourceSet", "org.xmldb.api.base.XMLDBException", "org.xmldb.api.modules.XMLResource" ]
import org.xmldb.api.base.ResourceSet; import org.xmldb.api.base.XMLDBException; import org.xmldb.api.modules.XMLResource;
import org.xmldb.api.base.*; import org.xmldb.api.modules.*;
[ "org.xmldb.api" ]
org.xmldb.api;
843,254
@Override public void exitConstantExpression(@NotNull PJParser.ConstantExpressionContext ctx) { }
@Override public void exitConstantExpression(@NotNull PJParser.ConstantExpressionContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterConstantExpression
{ "repo_name": "Diolor/PJ", "path": "src/main/java/com/lorentzos/pj/PJBaseListener.java", "license": "mit", "size": 73292 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
782,401
@Override public boolean commit() throws LoginException { if (log.isDebugEnabled()) { log.debug("commit " + principal); } // If authentication was not successful, just return false if (principal == null) { return false; } // Add our Princ...
boolean function() throws LoginException { if (log.isDebugEnabled()) { log.debug(STR + principal); } if (principal == null) { return false; } if (!subject.getPrincipals().contains(principal)) { subject.getPrincipals().add(principal); if (principal instanceof GenericPrincipal) { String roles[] = ((GenericPrincipal) prin...
/** * Phase 2 of authenticating a <code>Subject</code> when Phase 1 * was successful. This method is called if the <code>LoginContext</code> * succeeded in the overall authentication chain. * * @return <code>true</code> if the authentication succeeded, or * <code>false</code> if this <co...
Phase 2 of authenticating a <code>Subject</code> when Phase 1 was successful. This method is called if the <code>LoginContext</code> succeeded in the overall authentication chain
commit
{ "repo_name": "apache/tomcat", "path": "java/org/apache/catalina/realm/JAASMemoryLoginModule.java", "license": "apache-2.0", "size": 15565 }
[ "javax.security.auth.login.LoginException" ]
import javax.security.auth.login.LoginException;
import javax.security.auth.login.*;
[ "javax.security" ]
javax.security;
2,794,089
private JTextPane getJTextFieldDestination() { if (jTextFieldDestination == null) { jTextFieldDestination = new JTextPane(); } return jTextFieldDestination; }
JTextPane function() { if (jTextFieldDestination == null) { jTextFieldDestination = new JTextPane(); } return jTextFieldDestination; }
/** * This method initializes jTextFieldDestination. * @return javax.swing.JTextField */
This method initializes jTextFieldDestination
getJTextFieldDestination
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/core/gui/Translation.java", "license": "lgpl-2.1", "size": 43677 }
[ "javax.swing.JTextPane" ]
import javax.swing.JTextPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,262,248
if (isSnapshot() || (AUTOSCALING_FEATURE_FLAG_REGISTERED != null && AUTOSCALING_FEATURE_FLAG_REGISTERED)) { return List.of(AUTOSCALING_ENABLED_SETTING); } else { return List.of(); } }
if (isSnapshot() (AUTOSCALING_FEATURE_FLAG_REGISTERED != null && AUTOSCALING_FEATURE_FLAG_REGISTERED)) { return List.of(AUTOSCALING_ENABLED_SETTING); } else { return List.of(); } }
/** * The settings defined by autoscaling. * * @return the settings */
The settings defined by autoscaling
getSettings
{ "repo_name": "HonzaKral/elasticsearch", "path": "x-pack/plugin/autoscaling/src/main/java/org/elasticsearch/xpack/autoscaling/Autoscaling.java", "license": "apache-2.0", "size": 6997 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,478,219
public void loadChildFragment(Fragment fragment) { Validate.notNull(fragment); FragmentManager fm = getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); ft.replace(R.id.mainView, fragment, "main") .addToBackStack(null) .commit()...
void function(Fragment fragment) { Validate.notNull(fragment); FragmentManager fm = getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); ft.replace(R.id.mainView, fragment, "main") .addToBackStack(null) .commit(); }
/** * Load Fragment on top of other fragments * @param fragment */
Load Fragment on top of other fragments
loadChildFragment
{ "repo_name": "tausiq/DroidPlate", "path": "droidplate/src/main/java/com/genericslab/droidplate/CoreActivity.java", "license": "apache-2.0", "size": 4399 }
[ "android.support.v4.app.Fragment", "android.support.v4.app.FragmentManager", "android.support.v4.app.FragmentTransaction", "com.genericslab.droidplate.helper.Validate" ]
import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import com.genericslab.droidplate.helper.Validate;
import android.support.v4.app.*; import com.genericslab.droidplate.helper.*;
[ "android.support", "com.genericslab.droidplate" ]
android.support; com.genericslab.droidplate;
2,506,973
public static void paintMiddleArrow(Location sender, Location receiver, Color color, Graphics2D g, VisualCanvas panel, double strokeWidth) { Point2D.Double senderPoint = PainterHelper.locationToTransformedPoint( sender, panel); Point2D.Double receiverPoint = PainterHelper...
static void function(Location sender, Location receiver, Color color, Graphics2D g, VisualCanvas panel, double strokeWidth) { Point2D.Double senderPoint = PainterHelper.locationToTransformedPoint( sender, panel); Point2D.Double receiverPoint = PainterHelper .locationToTransformedPoint(receiver, panel); Point2D.Double m...
/** * Paints an arrow from a location to another location * * @param sender * @param receiver * @param color * @param g * @param panel */
Paints an arrow from a location to another location
paintMiddleArrow
{ "repo_name": "NetMoc/Yaes", "path": "src/main/java/yaes/ui/visualization/painters/PainterHelper.java", "license": "apache-2.0", "size": 13401 }
[ "java.awt.Color", "java.awt.Graphics2D", "java.awt.geom.Point2D" ]
import java.awt.Color; import java.awt.Graphics2D; import java.awt.geom.Point2D;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,885,512
Ct.SignedCertificateTimestamp.Builder sctBuilder = Ct.SignedCertificateTimestamp.newBuilder(); int version = (int) readNumber(inputStream, 1 ); if (version != Ct.Version.V1.getNumber()) { throw new SerializationException(String.format("Unknown version: %d", version)); } sctBuilder.setVersion(Ct.V...
Ct.SignedCertificateTimestamp.Builder sctBuilder = Ct.SignedCertificateTimestamp.newBuilder(); int version = (int) readNumber(inputStream, 1 ); if (version != Ct.Version.V1.getNumber()) { throw new SerializationException(String.format(STR, version)); } sctBuilder.setVersion(Ct.Version.valueOf(version)); byte[] keyId = ...
/** * Parses a SignedCertificateTimestamp from binary encoding. * @param inputStream byte stream of binary encoding. * @return Built CT.SignedCertificateTimestamp * @throws SerializationException if the data stream is too short. */
Parses a SignedCertificateTimestamp from binary encoding
parseSCTFromBinary
{ "repo_name": "mozmark/tls-observatory", "path": "vendor/github.com/google/certificate-transparency/java/src/org/certificatetransparency/ctlog/serialization/Deserializer.java", "license": "mpl-2.0", "size": 12751 }
[ "com.google.protobuf.ByteString", "org.certificatetransparency.ctlog.proto.Ct" ]
import com.google.protobuf.ByteString; import org.certificatetransparency.ctlog.proto.Ct;
import com.google.protobuf.*; import org.certificatetransparency.ctlog.proto.*;
[ "com.google.protobuf", "org.certificatetransparency.ctlog" ]
com.google.protobuf; org.certificatetransparency.ctlog;
562,837
public void store() { try (FileOutputStream fos = new FileOutputStream(SETTINGS_PATH)){ super.storeToXML( fos, new SimpleDateFormat("yyyyMMdd_HHmmss"). format(Calendar.getInstance().getTime())); fos.clo...
void function() { try (FileOutputStream fos = new FileOutputStream(SETTINGS_PATH)){ super.storeToXML( fos, new SimpleDateFormat(STR). format(Calendar.getInstance().getTime())); fos.close(); } catch (Exception e) { System.err.println(STR + SETTINGS_PATH + STR); } }
/** * Stores changed properties */
Stores changed properties
store
{ "repo_name": "XMV-Solutions/ImportTestcases2JiraZephyr", "path": "src/main/java/xmv/solutions/IT2JZ/GUI/Settings.java", "license": "gpl-3.0", "size": 2217 }
[ "java.io.FileOutputStream", "java.text.SimpleDateFormat", "java.util.Calendar" ]
import java.io.FileOutputStream; import java.text.SimpleDateFormat; import java.util.Calendar;
import java.io.*; import java.text.*; import java.util.*;
[ "java.io", "java.text", "java.util" ]
java.io; java.text; java.util;
21,404
protected Button getChangeControl( Composite parent ) { if ( checkBox == null ) { checkBox = new Button( parent, SWT.CHECK | SWT.LEFT ); checkBox.setFont( parent.getFont( ) ); checkBox.addSelectionListener( new SelectionAdapter( ) {
Button function( Composite parent ) { if ( checkBox == null ) { checkBox = new Button( parent, SWT.CHECK SWT.LEFT ); checkBox.setFont( parent.getFont( ) ); checkBox.addSelectionListener( new SelectionAdapter( ) {
/** * Returns the change button for this field editor. * * @param parent * The Composite to create the receiver in. * * @return the change button */
Returns the change button for this field editor
getChangeControl
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/BooleanFieldEditor.java", "license": "epl-1.0", "size": 7661 }
[ "org.eclipse.swt.events.SelectionAdapter", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Composite" ]
import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.events.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
521,828
private Address[] createAddressesFromIdentities(List<? extends OLATPrincipal> recipients, MailerResult result) { Address[] addresses = null; if (recipients != null && recipients.size() > 0) { List<Address> validRecipients = new ArrayList<Address>(); for (int i = 0; i < recipi...
Address[] function(List<? extends OLATPrincipal> recipients, MailerResult result) { Address[] addresses = null; if (recipients != null && recipients.size() > 0) { List<Address> validRecipients = new ArrayList<Address>(); for (int i = 0; i < recipients.size(); i++) { OLATPrincipal principal = recipients.get(i); try { va...
/** * Helper: creates an address array from a list of identities * * @param recipients * @param result * @return Address array */
Helper: creates an address array from a list of identities
createAddressesFromIdentities
{ "repo_name": "huihoo/olat", "path": "OLAT-LMS/src/main/java/org/olat/system/mail/MailerWithTemplate.java", "license": "apache-2.0", "size": 19343 }
[ "java.util.ArrayList", "java.util.List", "javax.mail.Address", "javax.mail.internet.AddressException", "javax.mail.internet.InternetAddress", "org.olat.system.security.OLATPrincipal" ]
import java.util.ArrayList; import java.util.List; import javax.mail.Address; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import org.olat.system.security.OLATPrincipal;
import java.util.*; import javax.mail.*; import javax.mail.internet.*; import org.olat.system.security.*;
[ "java.util", "javax.mail", "org.olat.system" ]
java.util; javax.mail; org.olat.system;
2,067,022
@ApiModelProperty(value = "") public ThrottleLimitDTO getDefaultLimit() { return defaultLimit; }
@ApiModelProperty(value = "") ThrottleLimitDTO function() { return defaultLimit; }
/** * Get defaultLimit * @return defaultLimit **/
Get defaultLimit
getDefaultLimit
{ "repo_name": "Minoli/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.admin/src/gen/java/org/wso2/carbon/apimgt/rest/api/admin/dto/ApplicationThrottlePolicyDTO.java", "license": "apache-2.0", "size": 2101 }
[ "io.swagger.annotations.ApiModelProperty", "org.wso2.carbon.apimgt.rest.api.admin.dto.ThrottleLimitDTO" ]
import io.swagger.annotations.ApiModelProperty; import org.wso2.carbon.apimgt.rest.api.admin.dto.ThrottleLimitDTO;
import io.swagger.annotations.*; import org.wso2.carbon.apimgt.rest.api.admin.dto.*;
[ "io.swagger.annotations", "org.wso2.carbon" ]
io.swagger.annotations; org.wso2.carbon;
2,229,517
public BigDecimal getAmount(String amount) throws Exception { // validations StringBuffer newAmount = new StringBuffer(); for (int i = 0; i < amount.length(); i++) { if (amount.charAt(i) != DECIMALPOINT && amount.charAt(i) != THOUSANDPOINT) { newAmount.append(amount.charAt(i)); } ...
BigDecimal function(String amount) throws Exception { StringBuffer newAmount = new StringBuffer(); for (int i = 0; i < amount.length(); i++) { if (amount.charAt(i) != DECIMALPOINT && amount.charAt(i) != THOUSANDPOINT) { newAmount.append(amount.charAt(i)); } } try { Integer.parseInt(newAmount.toString()); } catch (Excep...
/** * Transformation of an amount of money submited by the admin * user to be inserted as a BigDecimal in the database * @param amount * @param locale * @return * @throws Exception */
Transformation of an amount of money submited by the admin user to be inserted as a BigDecimal in the database
getAmount
{ "repo_name": "xyz2410/shopizer", "path": "sm-core/src/main/java/com/salesmanager/core/utils/ProductPriceUtils.java", "license": "gpl-2.0", "size": 17053 }
[ "com.salesmanager.core.constants.Constants", "java.math.BigDecimal", "java.util.Locale", "java.util.regex.Matcher", "java.util.regex.Pattern", "org.apache.commons.lang3.StringUtils", "org.apache.commons.validator.routines.BigDecimalValidator", "org.apache.commons.validator.routines.CurrencyValidator" ...
import com.salesmanager.core.constants.Constants; import java.math.BigDecimal; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; import org.apache.commons.validator.routines.BigDecimalValidator; import org.apache.commons.validator.routi...
import com.salesmanager.core.constants.*; import java.math.*; import java.util.*; import java.util.regex.*; import org.apache.commons.lang3.*; import org.apache.commons.validator.routines.*;
[ "com.salesmanager.core", "java.math", "java.util", "org.apache.commons" ]
com.salesmanager.core; java.math; java.util; org.apache.commons;
575,744
public void addNewScript(JsAst ast) { if (!addNewSourceAst(ast)) { return; } Node emptyScript = new Node(Token.SCRIPT); InputId inputId = ast.getInputId(); emptyScript.setInputId(inputId); emptyScript.setStaticSourceFile( SourceFile.fromCode(inputId.getIdName(), "")); proces...
void function(JsAst ast) { if (!addNewSourceAst(ast)) { return; } Node emptyScript = new Node(Token.SCRIPT); InputId inputId = ast.getInputId(); emptyScript.setInputId(inputId); emptyScript.setStaticSourceFile( SourceFile.fromCode(inputId.getIdName(), "")); processNewScript(ast, emptyScript); }
/** * Adds a new Script AST to the compile state. If a script for the same file * already exists the script will not be added, instead a call to * #replaceScript should be used. * * @param ast the ast of the new file */
Adds a new Script AST to the compile state. If a script for the same file already exists the script will not be added, instead a call to #replaceScript should be used
addNewScript
{ "repo_name": "robbert/closure-compiler", "path": "src/com/google/javascript/jscomp/Compiler.java", "license": "apache-2.0", "size": 83465 }
[ "com.google.javascript.rhino.InputId", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.javascript.rhino.InputId; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,011,766
public String getObjectLockLegalHoldStatus() { return (String) metadata.get(Headers.OBJECT_LOCK_LEGAL_HOLD_STATUS); }
String function() { return (String) metadata.get(Headers.OBJECT_LOCK_LEGAL_HOLD_STATUS); }
/** * The Legal Hold status of the specified object. */
The Legal Hold status of the specified object
getObjectLockLegalHoldStatus
{ "repo_name": "jentfoo/aws-sdk-java", "path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ObjectMetadata.java", "license": "apache-2.0", "size": 36837 }
[ "com.amazonaws.services.s3.Headers" ]
import com.amazonaws.services.s3.Headers;
import com.amazonaws.services.s3.*;
[ "com.amazonaws.services" ]
com.amazonaws.services;
1,447,999
private static String readBodyString(ResponseBody body) throws PushNetworkException { if (body == null) { throw new PushNetworkException("No body!"); } try { return body.string(); } catch (IOException e) { throw new PushNetworkException(e); } } /** * Converts {@link IOEx...
static String function(ResponseBody body) throws PushNetworkException { if (body == null) { throw new PushNetworkException(STR); } try { return body.string(); } catch (IOException e) { throw new PushNetworkException(e); } } /** * Converts {@link IOException} on body reading to {@link PushNetworkException}. * {@link IOE...
/** * Converts {@link IOException} on body reading to {@link PushNetworkException}. */
Converts <code>IOException</code> on body reading to <code>PushNetworkException</code>
readBodyString
{ "repo_name": "AsamK/TextSecure", "path": "libsignal/service/src/main/java/org/whispersystems/signalservice/internal/push/PushServiceSocket.java", "license": "gpl-3.0", "size": 115198 }
[ "java.io.IOException", "org.whispersystems.signalservice.api.push.exceptions.MalformedResponseException", "org.whispersystems.signalservice.api.push.exceptions.PushNetworkException" ]
import java.io.IOException; import org.whispersystems.signalservice.api.push.exceptions.MalformedResponseException; import org.whispersystems.signalservice.api.push.exceptions.PushNetworkException;
import java.io.*; import org.whispersystems.signalservice.api.push.exceptions.*;
[ "java.io", "org.whispersystems.signalservice" ]
java.io; org.whispersystems.signalservice;
18,972
//----------------------------------------------------------------------- @GwtIncompatible("incompatible method") public static String getStackTrace(final Throwable throwable) { final StringWriter sw = new StringWriter(); final PrintWriter pw = new PrintWriter(sw, true); throwable.p...
@GwtIncompatible(STR) static String function(final Throwable throwable) { final StringWriter sw = new StringWriter(); final PrintWriter pw = new PrintWriter(sw, true); throwable.printStackTrace(pw); return sw.getBuffer().toString(); }
/** * <p>Gets the stack trace from a Throwable as a String.</p> * * <p>The result of this method vary by JDK version as this method * uses {@link Throwable#printStackTrace(java.io.PrintWriter)}. * On JDK1.3 and earlier, the cause exception will not be shown * unless the specified throwable...
Gets the stack trace from a Throwable as a String. The result of this method vary by JDK version as this method uses <code>Throwable#printStackTrace(java.io.PrintWriter)</code>. On JDK1.3 and earlier, the cause exception will not be shown unless the specified throwable alters printStackTrace
getStackTrace
{ "repo_name": "ManfredTremmel/gwt-commons-lang3", "path": "src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java", "license": "apache-2.0", "size": 34855 }
[ "com.google.gwt.core.shared.GwtIncompatible", "java.io.PrintWriter", "java.io.StringWriter" ]
import com.google.gwt.core.shared.GwtIncompatible; import java.io.PrintWriter; import java.io.StringWriter;
import com.google.gwt.core.shared.*; import java.io.*;
[ "com.google.gwt", "java.io" ]
com.google.gwt; java.io;
561,912
Component getComponent();
Component getComponent();
/** * Returns the component to add next to the text field. * * @return The component to add next to the text field. */
Returns the component to add next to the text field
getComponent
{ "repo_name": "chubbymaggie/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/FilterPanel/IFilterComponent.java", "license": "apache-2.0", "size": 1599 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,360,370
public JSONObject disableSubscription(ApiQuery query) { this.apiConnection = new ApiConnection(Definitions.PAYSTACK_SUBSCRIPTIONS_DISABLE_SUBSCRIPTION); return this.apiConnection.connectAndQuery(query); }
JSONObject function(ApiQuery query) { this.apiConnection = new ApiConnection(Definitions.PAYSTACK_SUBSCRIPTIONS_DISABLE_SUBSCRIPTION); return this.apiConnection.connectAndQuery(query); }
/** * Used to disable a subscription * * @param query * @return */
Used to disable a subscription
disableSubscription
{ "repo_name": "SeunAdelekan/PaystackJava", "path": "src/me/iyanuadelekan/paystackjava/core/Subscriptions.java", "license": "mit", "size": 4308 }
[ "me.iyanuadelekan.paystackjava.constants.Definitions", "org.json.JSONObject" ]
import me.iyanuadelekan.paystackjava.constants.Definitions; import org.json.JSONObject;
import me.iyanuadelekan.paystackjava.constants.*; import org.json.*;
[ "me.iyanuadelekan.paystackjava", "org.json" ]
me.iyanuadelekan.paystackjava; org.json;
2,846,862
public Collection<ConceptName> getShortNames() { Vector<ConceptName> shortNames = new Vector<ConceptName>(); if (getNames().size() == 0) { if (log.isDebugEnabled()) { log.debug("The Concept with id: " + conceptId + " has no names"); } } else { for (ConceptName name : getNames()) { if (name.isS...
Collection<ConceptName> function() { Vector<ConceptName> shortNames = new Vector<ConceptName>(); if (getNames().size() == 0) { if (log.isDebugEnabled()) { log.debug(STR + conceptId + STR); } } else { for (ConceptName name : getNames()) { if (name.isShort()) { shortNames.add(name); } } } return shortNames; }
/** * Gets a collection of short names for this concept from all locales. * * @return a collection of all short names for this concept */
Gets a collection of short names for this concept from all locales
getShortNames
{ "repo_name": "milankarunarathne/openmrs-core", "path": "api/src/main/java/org/openmrs/Concept.java", "license": "mpl-2.0", "size": 56492 }
[ "java.util.Collection", "java.util.Vector" ]
import java.util.Collection; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,456,763
SqlExceptionHelper getSqlExceptionHelper();
SqlExceptionHelper getSqlExceptionHelper();
/** * Obtain the helper for dealing with JDBC {@link java.sql.SQLException} faults. * * @return This environment's helper. */
Obtain the helper for dealing with JDBC <code>java.sql.SQLException</code> faults
getSqlExceptionHelper
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/main/java/org/hibernate/engine/jdbc/env/spi/JdbcEnvironment.java", "license": "lgpl-2.1", "size": 2952 }
[ "org.hibernate.engine.jdbc.spi.SqlExceptionHelper" ]
import org.hibernate.engine.jdbc.spi.SqlExceptionHelper;
import org.hibernate.engine.jdbc.spi.*;
[ "org.hibernate.engine" ]
org.hibernate.engine;
56,854
public void setKey(IKey key) { this.keyWrapper = key; }
void function(IKey key) { this.keyWrapper = key; }
/** * Sets the {@link IKey} that is used to wrap/unwrap the content key during encryption. * * @param key * An {@link IKey} object. */
Sets the <code>IKey</code> that is used to wrap/unwrap the content key during encryption
setKey
{ "repo_name": "hnn-project/azure-content", "path": "demo/storage-demo/storage-demo-java/src/main/java/com/microsoft/azure/storage/blob/BlobEncryptionPolicy.java", "license": "mit", "size": 14264 }
[ "com.microsoft.azure.keyvault.core.IKey" ]
import com.microsoft.azure.keyvault.core.IKey;
import com.microsoft.azure.keyvault.core.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
227,334
public void setKunden(List<Kunde> kunden) { assert kunden != null : "Vorbedingung verletzt: kunden != null"; _kundenListe = kunden; sortiereKunden(); fireTableDataChanged(); }
void function(List<Kunde> kunden) { assert kunden != null : STR; _kundenListe = kunden; sortiereKunden(); fireTableDataChanged(); }
/** * Setze die anzuzeigenden Kunden. Nach dem Setzen wird die Tabelle * aktualisiert. * * @param kunden Eine Liste aller Kunden auf der gearbeitet wird. * Nachträgliche Änderungen der Liste wirken sich auch auf das * Model aus. * * @require kunden != null...
Setze die anzuzeigenden Kunden. Nach dem Setzen wird die Tabelle aktualisiert
setKunden
{ "repo_name": "polemonium/SE2Project", "path": "src/de/uni_hamburg/informatik/swt/se2/mediathek/werkzeuge/subwerkzeuge/kundenauflister/KundenTableModel.java", "license": "unlicense", "size": 3523 }
[ "de.uni_hamburg.informatik.swt.se2.mediathek.materialien.Kunde", "java.util.List" ]
import de.uni_hamburg.informatik.swt.se2.mediathek.materialien.Kunde; import java.util.List;
import de.uni_hamburg.informatik.swt.se2.mediathek.materialien.*; import java.util.*;
[ "de.uni_hamburg.informatik", "java.util" ]
de.uni_hamburg.informatik; java.util;
279,880
private boolean queueIsReallyEmpty(BlockingQueue<?> q) { for (int i = 0; i < CHECKPOINT_NUM; i++) { try { Thread.sleep(CHECKPOINT_INTERVAL_MS); } catch (InterruptedException ie) { return false; } if (!q.isEmpty()) { return false; } } return true; }
boolean function(BlockingQueue<?> q) { for (int i = 0; i < CHECKPOINT_NUM; i++) { try { Thread.sleep(CHECKPOINT_INTERVAL_MS); } catch (InterruptedException ie) { return false; } if (!q.isEmpty()) { return false; } } return true; }
/** * Checks if queue is empty by checking at CHECKPOINT_NUM points with * CHECKPOINT_INTERVAL_MS interval. * This doesn't mean the queue might not fill up at some point later, but * it should decrease the probability that we lose a call this way. */
Checks if queue is empty by checking at CHECKPOINT_NUM points with CHECKPOINT_INTERVAL_MS interval. This doesn't mean the queue might not fill up at some point later, but it should decrease the probability that we lose a call this way
queueIsReallyEmpty
{ "repo_name": "ctrezzo/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallQueueManager.java", "license": "apache-2.0", "size": 14085 }
[ "java.util.concurrent.BlockingQueue" ]
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
712,610
public void replaceAllNonRecursive(final JsonElement node) { stack.push(node); while (!stack.isEmpty()) { JsonElement current = stack.pop(); if (current.isJsonArray()) { pushAllElements(current.getAsJsonArray()); } els...
void function(final JsonElement node) { stack.push(node); while (!stack.isEmpty()) { JsonElement current = stack.pop(); if (current.isJsonArray()) { pushAllElements(current.getAsJsonArray()); } else if (current.isJsonObject()) { exploreObject(current.getAsJsonObject()); } } }
/** * Calls replaceJsonPath() method for this node and all its children. * @param node root node */
Calls replaceJsonPath() method for this node and all its children
replaceAllNonRecursive
{ "repo_name": "nagyistoce/Wilma", "path": "wilma-application/modules/wilma-webapp/src/main/java/com/epam/wilma/webapp/stub/response/formatter/json/JsonTemplateFormatter.java", "license": "gpl-3.0", "size": 4994 }
[ "com.google.gson.JsonElement" ]
import com.google.gson.JsonElement;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
2,523,332
private ArrayList<String> getFromResourceAndPrefs(String newPrefix) { if (!TextUtils.isEmpty(newPrefix)) { this.currentPrefix = newPrefix + ":"; } // The spinner is loaded with a bunch of statically // defined values from the string resource, and then any user-defined va...
ArrayList<String> function(String newPrefix) { if (!TextUtils.isEmpty(newPrefix)) { this.currentPrefix = newPrefix + ":"; } String[] typesArray = spendAdder.getResources().getStringArray(R.array.types_array); ArrayList<String> arrayList = new ArrayList<String>(); for (String spendType : typesArray) { String stripped = ...
/** * Assign a new value for the currentPrefix. * Create a new ArrayList and fill it with the values from the resource and the prefs. * Only values prefixed with the currentPriefix will be loaded (after stripping the prefix). * @return */
Assign a new value for the currentPrefix. Create a new ArrayList and fill it with the values from the resource and the prefs. Only values prefixed with the currentPriefix will be loaded (after stripping the prefix)
getFromResourceAndPrefs
{ "repo_name": "manangatangy/android-kidspend", "path": "src/com/manangatangy/kidspend/SpinnerWithPrefs.java", "license": "gpl-2.0", "size": 11678 }
[ "android.app.Activity", "android.content.SharedPreferences", "android.text.TextUtils", "java.util.ArrayList" ]
import android.app.Activity; import android.content.SharedPreferences; import android.text.TextUtils; import java.util.ArrayList;
import android.app.*; import android.content.*; import android.text.*; import java.util.*;
[ "android.app", "android.content", "android.text", "java.util" ]
android.app; android.content; android.text; java.util;
2,175,754
@Override protected Bookmark fromString(String s) { return null; }
Bookmark function(String s) { return null; }
/** * Turns the string obtained from the properties file into an object. * * @param s the string to parse * @return always null */
Turns the string obtained from the properties file into an object
fromString
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/gui/tools/FileChooserBookmarksManagementPanel.java", "license": "gpl-3.0", "size": 10864 }
[ "com.googlecode.jfilechooserbookmarks.Bookmark" ]
import com.googlecode.jfilechooserbookmarks.Bookmark;
import com.googlecode.jfilechooserbookmarks.*;
[ "com.googlecode.jfilechooserbookmarks" ]
com.googlecode.jfilechooserbookmarks;
423,531
@Nullable @Override public String getAgencyColorString(@NonNull Context context) { return null; // default }
String function(@NonNull Context context) { return null; }
/** * Override if multiple {@link ModuleProvider} implementations in same app. */
Override if multiple <code>ModuleProvider</code> implementations in same app
getAgencyColorString
{ "repo_name": "mtransitapps/mtransit-for-android", "path": "src/main/java/org/mtransit/android/provider/ModuleProvider.java", "license": "apache-2.0", "size": 22184 }
[ "android.content.Context", "androidx.annotation.NonNull" ]
import android.content.Context; import androidx.annotation.NonNull;
import android.content.*; import androidx.annotation.*;
[ "android.content", "androidx.annotation" ]
android.content; androidx.annotation;
1,304,717
public static java.util.Set extractCsPrimaryProblemSet(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.CSPrimaryProblemVoCollection voCollection) { return extractCsPrimaryProblemSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.CSPrimaryProblemVoCollection voCollection) { return extractCsPrimaryProblemSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.core.clinical.domain.objects.CsPrimaryProblem set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.core.clinical.domain.objects.CsPrimaryProblem set from the value object collection
extractCsPrimaryProblemSet
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/CSPrimaryProblemVoAssembler.java", "license": "agpl-3.0", "size": 20515 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,655,284
public void testDynamicArgs() throws SQLException { PreparedStatement ps; String[] variants; String[][] expected = null; // Check look-ahead also for ? in grammar since offset is not reserved variants = makeVariants( "select * from t1%", NEXT_ROWS_ONLY, "?", null ); ...
void function() throws SQLException { PreparedStatement ps; String[] variants; String[][] expected = null; variants = makeVariants( STR, NEXT_ROWS_ONLY, "?", null ); for (String variant : variants) { ps = prepareStatement( variant ); } variants = makeVariants( STR, NEXT_ROWS_ONLY, "?", "?" ); for ( int j = 0; j < varia...
/** * Test dynamic arguments * * @throws java.sql.SQLException */
Test dynamic arguments
testDynamicArgs
{ "repo_name": "scnakandala/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/OffsetFetchNextTest.java", "license": "apache-2.0", "size": 36955 }
[ "java.sql.PreparedStatement", "java.sql.SQLException", "java.sql.Types", "org.apache.derbyTesting.junit.JDBC" ]
import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Types; import org.apache.derbyTesting.junit.JDBC;
import java.sql.*; import org.apache.*;
[ "java.sql", "org.apache" ]
java.sql; org.apache;
1,911,187
public Trilean applyToTruthValue(boolean initialTruthValue) { if (initialTruthValue) { if (maintainsTruth) { return Trilean.TRUE; } else if (negatesTruth) { return Trilean.FALSE; } else { return Trilean.UNKNOWN; } } else { if (maintainsFalsehood) { ...
Trilean function(boolean initialTruthValue) { if (initialTruthValue) { if (maintainsTruth) { return Trilean.TRUE; } else if (negatesTruth) { return Trilean.FALSE; } else { return Trilean.UNKNOWN; } } else { if (maintainsFalsehood) { return Trilean.FALSE; } else if (negatesFalsehood) { return Trilean.TRUE; } else { retu...
/** * Implements the finite state automata of composing the truth value of a sentence with a natural logic relation being * applied. * @param initialTruthValue The truth value of the premise (the original sentence). * @return The truth value of the consequent -- that is, the sentence once it's been modified...
Implements the finite state automata of composing the truth value of a sentence with a natural logic relation being applied
applyToTruthValue
{ "repo_name": "hbbpb/stanford-corenlp-gv", "path": "src/edu/stanford/nlp/naturalli/NaturalLogicRelation.java", "license": "gpl-2.0", "size": 25709 }
[ "edu.stanford.nlp.util.Trilean", "java.util.Collections", "java.util.HashMap", "java.util.Map" ]
import edu.stanford.nlp.util.Trilean; import java.util.Collections; import java.util.HashMap; import java.util.Map;
import edu.stanford.nlp.util.*; import java.util.*;
[ "edu.stanford.nlp", "java.util" ]
edu.stanford.nlp; java.util;
397,316
public static boolean matchesMultiplePlayers(String p_82377_0_) { Matcher var1 = tokenPattern.matcher(p_82377_0_); if (!var1.matches()) { return false; } else { Map var2 = getArgumentMap(var1.group(2)); String var3 = var1.group(1); int var4 = !"a".equals(var3) && !"e".equals(var3) ? 1 : 0; retu...
static boolean function(String p_82377_0_) { Matcher var1 = tokenPattern.matcher(p_82377_0_); if (!var1.matches()) { return false; } else { Map var2 = getArgumentMap(var1.group(2)); String var3 = var1.group(1); int var4 = !"a".equals(var3) && !"e".equals(var3) ? 1 : 0; return func_179653_a(var2, "c", var4) != 1; } }
/** * Returns whether the given pattern can match more than one player. */
Returns whether the given pattern can match more than one player
matchesMultiplePlayers
{ "repo_name": "KubaKaszycki/FreeCraft", "path": "src/main/java/kk/freecraft/command/PlayerSelector.java", "license": "gpl-3.0", "size": 21045 }
[ "java.util.Map", "java.util.regex.Matcher" ]
import java.util.Map; import java.util.regex.Matcher;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
2,180,292
public void flush() throws IOException { if (printWriter != null) { printWriter.flush(); } if (gzipOutputStream != null) { gzipOutputStream.flush(); } }
void function() throws IOException { if (printWriter != null) { printWriter.flush(); } if (gzipOutputStream != null) { gzipOutputStream.flush(); } }
/** * Flushes all the streams for this response. */
Flushes all the streams for this response
flush
{ "repo_name": "BastienSabos/TestProject", "path": "src/main/java/com/bastien/sabos/testapp/web/filter/gzip/GZipServletResponseWrapper.java", "license": "apache-2.0", "size": 3528 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
706,794
public void removeChangeListener(ChartChangeListener listener) { Args.nullNotPermitted(listener, "listener"); this.changeListeners.remove(ChartChangeListener.class, listener); }
void function(ChartChangeListener listener) { Args.nullNotPermitted(listener, STR); this.changeListeners.remove(ChartChangeListener.class, listener); }
/** * Deregisters an object for notification of changes to the chart. * * @param listener the listener ({@code null} not permitted) * * @see #addChangeListener(ChartChangeListener) */
Deregisters an object for notification of changes to the chart
removeChangeListener
{ "repo_name": "jfree/jfreechart", "path": "src/main/java/org/jfree/chart/JFreeChart.java", "license": "lgpl-2.1", "size": 55514 }
[ "org.jfree.chart.event.ChartChangeListener", "org.jfree.chart.internal.Args" ]
import org.jfree.chart.event.ChartChangeListener; import org.jfree.chart.internal.Args;
import org.jfree.chart.event.*; import org.jfree.chart.internal.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,001,653
public static <T> ArrayList<T> toList(Enumeration<T> en){ ArrayList<T> arr = new ArrayList<T>(); if( en != null ){ while(en.hasMoreElements()){ arr.add( en.nextElement() ); } } return arr; }
static <T> ArrayList<T> function(Enumeration<T> en){ ArrayList<T> arr = new ArrayList<T>(); if( en != null ){ while(en.hasMoreElements()){ arr.add( en.nextElement() ); } } return arr; }
/** * Utility function to use enumerations in foreach loop. * * @param en Enumeration of some sort * @return a list containing elements from Enumeration */
Utility function to use enumerations in foreach loop
toList
{ "repo_name": "bjarneh/libb", "path": "src/com/github/bjarneh/utilz/handy.java", "license": "gpl-3.0", "size": 10434 }
[ "java.util.ArrayList", "java.util.Enumeration" ]
import java.util.ArrayList; import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
403,130
public void prepareNewExchangeResponseMessage(Exchange exchange) throws Exception { String requestID = (String)exchange.getIn().getHeader("federatedQueryRequestGUID"); log.debug("Federeated Query Request ID: " + requestID); //Create a new map with WS Addressing message properties that we want to override ...
void function(Exchange exchange) throws Exception { String requestID = (String)exchange.getIn().getHeader(STR); log.debug(STR + requestID); HashMap<String, String> wsAddressingMessageProperties = new HashMap<String, String>(); if (StringUtils.isNotEmpty(requestID)) { wsAddressingMessageProperties.put(STR,requestID); } ...
/** * This method will use an existing exchange and set the 'out' message with the WS-Addressing message ID. This removes all the headers from the 'in' * message which tend to confuse Camel. * * @param exchange * @throws Exception */
This method will use an existing exchange and set the 'out' message with the WS-Addressing message ID. This removes all the headers from the 'in' message which tend to confuse Camel
prepareNewExchangeResponseMessage
{ "repo_name": "ojbc/entity-resolution", "path": "Entity_Resolution_Service_Intermediary/src/main/java/gov/nij/processor/MessageProcessor.java", "license": "apache-2.0", "size": 9986 }
[ "java.util.HashMap", "java.util.Map", "org.apache.camel.Exchange", "org.apache.commons.lang.StringUtils", "org.apache.cxf.endpoint.Client", "org.apache.cxf.message.Message" ]
import java.util.HashMap; import java.util.Map; import org.apache.camel.Exchange; import org.apache.commons.lang.StringUtils; import org.apache.cxf.endpoint.Client; import org.apache.cxf.message.Message;
import java.util.*; import org.apache.camel.*; import org.apache.commons.lang.*; import org.apache.cxf.endpoint.*; import org.apache.cxf.message.*;
[ "java.util", "org.apache.camel", "org.apache.commons", "org.apache.cxf" ]
java.util; org.apache.camel; org.apache.commons; org.apache.cxf;
2,732,424
public void mouseDoubleClick(MouseEvent mouseEvent, EditPartViewer viewer) { Tool tool = getActiveTool(); if (tool != null) tool.mouseDoubleClick(mouseEvent, viewer); }
void function(MouseEvent mouseEvent, EditPartViewer viewer) { Tool tool = getActiveTool(); if (tool != null) tool.mouseDoubleClick(mouseEvent, viewer); }
/** * Called when the mouse button has been double-clicked on a Viewer. * * @param mouseEvent * The SWT mouse event * @param viewer * The source of the event. */
Called when the mouse button has been double-clicked on a Viewer
mouseDoubleClick
{ "repo_name": "archimatetool/archi", "path": "org.eclipse.gef/src/org/eclipse/gef/EditDomain.java", "license": "mit", "size": 14480 }
[ "org.eclipse.swt.events.MouseEvent" ]
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,271,152
public CategoryToolTipGenerator getSeriesToolTipGenerator(int series) { return (CategoryToolTipGenerator) this.toolTipGeneratorList.get(series); }
CategoryToolTipGenerator function(int series) { return (CategoryToolTipGenerator) this.toolTipGeneratorList.get(series); }
/** * Returns the tool tip generator for the specified series (a "layer 1" * generator). * * @param series the series index (zero-based). * * @return The tool tip generator (possibly <code>null</code>). * * @see #setSeriesToolTipGenerator(int, CategoryToolTipGenerator) ...
Returns the tool tip generator for the specified series (a "layer 1" generator)
getSeriesToolTipGenerator
{ "repo_name": "ilyessou/jfreechart", "path": "source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java", "license": "lgpl-2.1", "size": 75804 }
[ "org.jfree.chart.labels.CategoryToolTipGenerator" ]
import org.jfree.chart.labels.CategoryToolTipGenerator;
import org.jfree.chart.labels.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,775,168
protected void assertNoSystemNotifications() { Assert.assertFalse( "Error notification with system error exception is shown", isNotificationPresent("system")); }
void function() { Assert.assertFalse( STR, isNotificationPresent(STR)); }
/** * Asserts that no system notifications are shown. */
Asserts that no system notifications are shown
assertNoSystemNotifications
{ "repo_name": "jdahlstrom/vaadin.react", "path": "uitest/src/test/java/com/vaadin/tests/tb3/AbstractTB3Test.java", "license": "apache-2.0", "size": 41679 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
857,220
final Matcher matcher = KEYWORDS_ARGS_FORMAT.matcher(args.trim()); if (!matcher.matches()) { return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE)); } // keywords delimited by whitespace final String[] keywords = matcher.group("...
final Matcher matcher = KEYWORDS_ARGS_FORMAT.matcher(args.trim()); if (!matcher.matches()) { return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE)); } final String[] keywords = matcher.group(STR).split("\\s+"); final Set<String> keywordSet = new HashSet<>(Arrays.asList(key...
/** * Parses the given {@code String} of arguments in the context of the FindCommand and returns an FindCommand object * for execution. */
Parses the given String of arguments in the context of the FindCommand and returns an FindCommand object for execution
parse
{ "repo_name": "Manish1Dahiya/main", "path": "src/main/java/seedu/taskmanager/logic/parser/FindCommandParser.java", "license": "mit", "size": 1262 }
[ "java.util.Arrays", "java.util.HashSet", "java.util.Set", "java.util.regex.Matcher" ]
import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.regex.Matcher;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
1,898,655
List<EntityLink> getEntityLinkChildrenForTask(String taskId);
List<EntityLink> getEntityLinkChildrenForTask(String taskId);
/** * Retrieves the {@link EntityLink}s associated with the given task. */
Retrieves the <code>EntityLink</code>s associated with the given task
getEntityLinkChildrenForTask
{ "repo_name": "paulstapleton/flowable-engine", "path": "modules/flowable-engine/src/main/java/org/flowable/engine/RuntimeService.java", "license": "apache-2.0", "size": 63251 }
[ "java.util.List", "org.flowable.entitylink.api.EntityLink" ]
import java.util.List; import org.flowable.entitylink.api.EntityLink;
import java.util.*; import org.flowable.entitylink.api.*;
[ "java.util", "org.flowable.entitylink" ]
java.util; org.flowable.entitylink;
177,228
@Override public void onCompletion(MediaPlayer mp) { mVideoPlayer.seekTo(0); }
void function(MediaPlayer mp) { mVideoPlayer.seekTo(0); }
/** * Called when the file is finished playing. * * Rewinds the video * * @param mp {@link MediaPlayer} instance performing the playback. */
Called when the file is finished playing. Rewinds the video
onCompletion
{ "repo_name": "CEREMA/com.cerema.cloud", "path": "src/com/cerema/cloud/ui/preview/PreviewVideoActivity.java", "license": "gpl-2.0", "size": 8837 }
[ "android.media.MediaPlayer" ]
import android.media.MediaPlayer;
import android.media.*;
[ "android.media" ]
android.media;
1,724,149
public void setPerUserEvictionPolicyClassName(final String username, final String value) { assertInitializationAllowed(); if (perUserEvictionPolicyClassName == null) { perUserEvictionPolicyClassName = new HashMap<>(); } perUserEvictionPolicyClassName.put(usern...
void function(final String username, final String value) { assertInitializationAllowed(); if (perUserEvictionPolicyClassName == null) { perUserEvictionPolicyClassName = new HashMap<>(); } perUserEvictionPolicyClassName.put(username, value); }
/** * Sets a user specific value for * {@link GenericObjectPool#getEvictionPolicyClassName()} for the specified * user's pool. * @param username The user * @param value The value */
Sets a user specific value for <code>GenericObjectPool#getEvictionPolicyClassName()</code> for the specified user's pool
setPerUserEvictionPolicyClassName
{ "repo_name": "Nickname0806/Test_Q4", "path": "java/org/apache/tomcat/dbcp/dbcp2/datasources/PerUserPoolDataSource.java", "license": "apache-2.0", "size": 40987 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,808,260
public View getMaster() { return this.master; } //-- View getMaster()
View function() { return this.master; }
/** * Get reference to the master view<br /><br /><a * href="http://docs.webix.com/api__link__ui.datasuggest_master_config.html">Webix * API Reference</a> * * @return View */
Get reference to the master viewWebix API Reference
getMaster
{ "repo_name": "zhv/webix-api", "path": "src/main/java/com/webix/ui/model/context/Datasuggest.java", "license": "bsd-3-clause", "size": 24253 }
[ "com.webix.ui.model.View" ]
import com.webix.ui.model.View;
import com.webix.ui.model.*;
[ "com.webix.ui" ]
com.webix.ui;
614,046
public Properties getProperties(Properties props) { props = super.getProperties(props); String prefix = PropUtils.getScopedPropertyPrefix(this); if (projLoaders != null) { StringBuffer markerlist = new StringBuffer(); int count = 0; for (Iterator<Projecti...
Properties function(Properties props) { props = super.getProperties(props); String prefix = PropUtils.getScopedPropertyPrefix(this); if (projLoaders != null) { StringBuffer markerlist = new StringBuffer(); int count = 0; for (Iterator<ProjectionLoader> it = projLoaders.iterator(); it.hasNext();) { ProjectionLoader pl =...
/** * Create the properties to create ProjectionLoaders that this loader * created. */
Create the properties to create ProjectionLoaders that this loader created
getProperties
{ "repo_name": "d2fn/passage", "path": "src/main/java/com/bbn/openmap/proj/ProjectionFactory.java", "license": "mit", "size": 21034 }
[ "com.bbn.openmap.PropertyConsumer", "com.bbn.openmap.util.PropUtils", "java.util.Iterator", "java.util.Properties" ]
import com.bbn.openmap.PropertyConsumer; import com.bbn.openmap.util.PropUtils; import java.util.Iterator; import java.util.Properties;
import com.bbn.openmap.*; import com.bbn.openmap.util.*; import java.util.*;
[ "com.bbn.openmap", "java.util" ]
com.bbn.openmap; java.util;
1,421,781
List<User> getAdmins(PerunSession perunSession, Facility facility, boolean onlyDirectAdmins) throws InternalErrorException, PrivilegeException, FacilityNotExistsException;
List<User> getAdmins(PerunSession perunSession, Facility facility, boolean onlyDirectAdmins) throws InternalErrorException, PrivilegeException, FacilityNotExistsException;
/** * Get list of all user administrators for supported role and given facility. * * If onlyDirectAdmins is true, return only direct users of the group for supported role. * * Supported roles: FacilityAdmin * * @param perunSession * @param facility * @param onlyDirectAdmins if true, get only direct us...
Get list of all user administrators for supported role and given facility. If onlyDirectAdmins is true, return only direct users of the group for supported role. Supported roles: FacilityAdmin
getAdmins
{ "repo_name": "Simcsa/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/FacilitiesManagerBl.java", "license": "bsd-2-clause", "size": 39157 }
[ "cz.metacentrum.perun.core.api.Facility", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.User", "cz.metacentrum.perun.core.api.exceptions.FacilityNotExistsException", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions....
import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.User; import cz.metacentrum.perun.core.api.exceptions.FacilityNotExistsException; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.cor...
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
2,848,440
@ServiceMethod(returns = ReturnType.SINGLE) Response<DatabaseVulnerabilityAssessmentRuleBaselineInner> getWithResponse( String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, ...
@ServiceMethod(returns = ReturnType.SINGLE) Response<DatabaseVulnerabilityAssessmentRuleBaselineInner> getWithResponse( String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineNam...
/** * Gets a database's vulnerability assessment rule baseline. * * @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 managedInstanceName The name of the managed instanc...
Gets a database's vulnerability assessment rule baseline
getWithResponse
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.java", "license": "mit", "size": 21237 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.sql.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineInner", "com.azure.resourcemanager.sql.models.VulnerabilityAssessme...
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.sql.fluent.models.DatabaseVulnerabilityAssessmentRuleBaselineInner; import com.azure.resourcemanager.sql.models.Vuln...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.sql.fluent.models.*; import com.azure.resourcemanager.sql.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,217,071
public static ValueMatcher makeValueMatcher( final ColumnSelectorFactory columnSelectorFactory, final String columnName, final String value ) { final ColumnSelectorPlus<ValueMatcherColumnSelectorStrategy> selector = DimensionHandlerUtils.createColumnSelectorPlus( ValueMat...
static ValueMatcher function( final ColumnSelectorFactory columnSelectorFactory, final String columnName, final String value ) { final ColumnSelectorPlus<ValueMatcherColumnSelectorStrategy> selector = DimensionHandlerUtils.createColumnSelectorPlus( ValueMatcherColumnSelectorStrategyFactory.instance(), DefaultDimensionS...
/** * Create a ValueMatcher that compares row values to the provided string. * <p> * An implementation of this method should be able to handle dimensions of various types. * * @param columnSelectorFactory Selector for columns. * @param columnName The column to filter. * @param value ...
Create a ValueMatcher that compares row values to the provided string. An implementation of this method should be able to handle dimensions of various types
makeValueMatcher
{ "repo_name": "noddi/druid", "path": "processing/src/main/java/io/druid/segment/filter/Filters.java", "license": "apache-2.0", "size": 21780 }
[ "io.druid.query.ColumnSelectorPlus", "io.druid.query.dimension.DefaultDimensionSpec", "io.druid.query.filter.ValueMatcher", "io.druid.query.filter.ValueMatcherColumnSelectorStrategy", "io.druid.query.filter.ValueMatcherColumnSelectorStrategyFactory", "io.druid.segment.ColumnSelectorFactory", "io.druid.s...
import io.druid.query.ColumnSelectorPlus; import io.druid.query.dimension.DefaultDimensionSpec; import io.druid.query.filter.ValueMatcher; import io.druid.query.filter.ValueMatcherColumnSelectorStrategy; import io.druid.query.filter.ValueMatcherColumnSelectorStrategyFactory; import io.druid.segment.ColumnSelectorFactor...
import io.druid.query.*; import io.druid.query.dimension.*; import io.druid.query.filter.*; import io.druid.segment.*;
[ "io.druid.query", "io.druid.segment" ]
io.druid.query; io.druid.segment;
1,895,076
public static void checkRenderingControls(Registry context) { // TODO Auto-generated method stub if (!(context.equals(registry))) throw new IllegalArgumentException("Not allow to access method."); RenderingControlProxy proxy; Entry<Long, RenderingControl> e; Iterator<Entry<Long, RenderingControl>> i = ...
static void function(Registry context) { if (!(context.equals(registry))) throw new IllegalArgumentException(STR); RenderingControlProxy proxy; Entry<Long, RenderingControl> e; Iterator<Entry<Long, RenderingControl>> i = singleton.rndSvcProxies.entrySet().iterator(); Long value = (Long) context.lookup(LookupNames.RE_TI...
/** * Checks if the rendering controls are still active. Shuts the inactive * ones. * * @param context Reference to the registry. To ensure that agents cannot * call the method. It must be a reference to the * container's registry. */
Checks if the rendering controls are still active. Shuts the inactive ones
checkRenderingControls
{ "repo_name": "emilroz/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/rnd/PixelsServicesFactory.java", "license": "gpl-2.0", "size": 27446 }
[ "java.util.Iterator", "java.util.Map", "org.openmicroscopy.shoola.env.LookupNames", "org.openmicroscopy.shoola.env.config.Registry", "org.openmicroscopy.shoola.env.log.Logger" ]
import java.util.Iterator; import java.util.Map; import org.openmicroscopy.shoola.env.LookupNames; import org.openmicroscopy.shoola.env.config.Registry; import org.openmicroscopy.shoola.env.log.Logger;
import java.util.*; import org.openmicroscopy.shoola.env.*; import org.openmicroscopy.shoola.env.config.*; import org.openmicroscopy.shoola.env.log.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
402,945
public Timestamp getRRStartDate () { return (Timestamp)get_Value(COLUMNNAME_RRStartDate); }
Timestamp function () { return (Timestamp)get_Value(COLUMNNAME_RRStartDate); }
/** Get Revenue Recognition Start. @return Revenue Recognition Start Date */
Get Revenue Recognition Start
getRRStartDate
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/X_C_InvoiceLine.java", "license": "gpl-2.0", "size": 26675 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,410,345
private static void writeValueTag(FileImageOutputStream stream, int tag, TiffType type, int value) throws IOException { stream.writeShort(tag); stream.writeShort(getTypeInt(type)); stream.writeInt(1); writeLeftAlignedValue(stream, ...
static void function(FileImageOutputStream stream, int tag, TiffType type, int value) throws IOException { stream.writeShort(tag); stream.writeShort(getTypeInt(type)); stream.writeInt(1); writeLeftAlignedValue(stream, type, value); }
/** * writeValueTag() writes an image file directory (IFD) entry whose value * fits into the Value Offset. * See Section 2 (page 15) of the TIFF spec for more details. * * @param stream the stream representing the file being written. * @param tag the tag that identifies the field. * @param type the...
writeValueTag() writes an image file directory (IFD) entry whose value fits into the Value Offset. See Section 2 (page 15) of the TIFF spec for more details
writeValueTag
{ "repo_name": "academicjargon/Berkeley", "path": "pj1/TIFFEncoder.java", "license": "mit", "size": 11387 }
[ "java.io.IOException", "javax.imageio.stream.FileImageOutputStream" ]
import java.io.IOException; import javax.imageio.stream.FileImageOutputStream;
import java.io.*; import javax.imageio.stream.*;
[ "java.io", "javax.imageio" ]
java.io; javax.imageio;
281,368
private String getConditionClause(int index) throws ExportRulesException { Case currentCase; try { currentCase = Case.getCurrentCaseThrows(); } catch (NoCurrentCaseException ex) { throw new ExportRulesException("Exceptio...
String function(int index) throws ExportRulesException { Case currentCase; try { currentCase = Case.getCurrentCaseThrows(); } catch (NoCurrentCaseException ex) { throw new ExportRulesException(STR, ex); } SleuthkitCase caseDb = currentCase.getSleuthkitCase(); BlackboardArtifact.Type artifactType; try { artifactType = c...
/** * Gets the SQL condition clause for the condition. * * @param index The index of the condition within the collection of * conditions that make up a rule. It is used for table * name aliasing. * * @re...
Gets the SQL condition clause for the condition
getConditionClause
{ "repo_name": "esaunders/autopsy", "path": "Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/FileExportRuleSet.java", "license": "apache-2.0", "size": 41669 }
[ "org.apache.commons.codec.binary.Hex", "org.sleuthkit.autopsy.casemodule.Case", "org.sleuthkit.autopsy.casemodule.NoCurrentCaseException", "org.sleuthkit.datamodel.BlackboardArtifact", "org.sleuthkit.datamodel.BlackboardAttribute", "org.sleuthkit.datamodel.SleuthkitCase", "org.sleuthkit.datamodel.TskCor...
import org.apache.commons.codec.binary.Hex; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuth...
import org.apache.commons.codec.binary.*; import org.sleuthkit.autopsy.casemodule.*; import org.sleuthkit.datamodel.*;
[ "org.apache.commons", "org.sleuthkit.autopsy", "org.sleuthkit.datamodel" ]
org.apache.commons; org.sleuthkit.autopsy; org.sleuthkit.datamodel;
1,430,945
Shell parent = getParent(); sShell = new Shell(parent, SWT.DIALOG_TRIM | SWT.NO_REDRAW_RESIZE | SWT.APPLICATION_MODAL ); sShell.setText("Replace"); sShell.setSize(new Point(351, 178)); FormLayout formLayout = new FormLayout (); sShell.setLayout(formLayout); searchText = new Text(sShell, ...
Shell parent = getParent(); sShell = new Shell(parent, SWT.DIALOG_TRIM SWT.NO_REDRAW_RESIZE SWT.APPLICATION_MODAL ); sShell.setText(STR); sShell.setSize(new Point(351, 178)); FormLayout formLayout = new FormLayout (); sShell.setLayout(formLayout); searchText = new Text(sShell, SWT.SINGLE SWT.BORDER); FormData frmData =...
/** * This method initializes sShell */
This method initializes sShell
open
{ "repo_name": "ontometrics/ontokettle", "path": "src/de/proconis/StyledText/StyledTextCompReplace.java", "license": "lgpl-2.1", "size": 7903 }
[ "org.eclipse.swt.graphics.Point", "org.eclipse.swt.layout.FormAttachment", "org.eclipse.swt.layout.FormData", "org.eclipse.swt.layout.FormLayout", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Label", "org.eclipse.swt.widgets.Shell", "org.eclipse.swt.widgets.Text" ]
import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,708,691
@Test public void testSlotRequestFailure() throws Exception { try (final SlotManagerImpl slotManager = createSlotManager( ResourceManagerId.generate(), new TestingResourceActionsBuilder().build())) { final SlotRequest slotReque...
void function() throws Exception { try (final SlotManagerImpl slotManager = createSlotManager( ResourceManagerId.generate(), new TestingResourceActionsBuilder().build())) { final SlotRequest slotRequest = new SlotRequest( new JobID(), new AllocationID(), ResourceProfile.UNKNOWN, STR); slotManager.registerSlotRequest(sl...
/** * Tests that the SlotManager retries allocating a slot if the TaskExecutor#requestSlot call * fails. */
Tests that the SlotManager retries allocating a slot if the TaskExecutor#requestSlot call fails
testSlotRequestFailure
{ "repo_name": "tillrohrmann/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerImplTest.java", "license": "apache-2.0", "size": 96159 }
[ "java.util.concurrent.ArrayBlockingQueue", "java.util.concurrent.BlockingQueue", "java.util.concurrent.CompletableFuture", "org.apache.flink.api.common.JobID", "org.apache.flink.api.java.tuple.Tuple6", "org.apache.flink.runtime.clusterframework.types.AllocationID", "org.apache.flink.runtime.clusterframe...
import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.CompletableFuture; import org.apache.flink.api.common.JobID; import org.apache.flink.api.java.tuple.Tuple6; import org.apache.flink.runtime.clusterframework.types.AllocationID; import org.apache.flink....
import java.util.concurrent.*; import org.apache.flink.api.common.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.messages.*; import org.apache.flink.runtime.resourcemanager.*; import org.apache.flink.runtime.resourcemanager.registra...
[ "java.util", "org.apache.flink", "org.hamcrest", "org.junit" ]
java.util; org.apache.flink; org.hamcrest; org.junit;
2,532,194
void checkGone(Finder finder);
void checkGone(Finder finder);
/** * Polls until the {@link UiElement} found using the given finder is gone, or * the default timeout is reached. * * @param finder The matching mechanism * @throws TimeoutException If matching element is not gone within the default * timeout */
Polls until the <code>UiElement</code> found using the given finder is gone, or the default timeout is reached
checkGone
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/external/droiddriver/src/com/google/android/droiddriver/DroidDriver.java", "license": "apache-2.0", "size": 4175 }
[ "com.google.android.droiddriver.finders.Finder" ]
import com.google.android.droiddriver.finders.Finder;
import com.google.android.droiddriver.finders.*;
[ "com.google.android" ]
com.google.android;
2,035,701
protected void resetRuntimeRatios(Function<R, DistributionRatio> function) { ArrayList<DistributionRatio> runtimeRatios = new ArrayList<>(size()); int i = 0; for (R resource : all()) { DistributionRatio dr = function.apply(i++, resource); runtimeRatios.add(dr); ...
void function(Function<R, DistributionRatio> function) { ArrayList<DistributionRatio> runtimeRatios = new ArrayList<>(size()); int i = 0; for (R resource : all()) { DistributionRatio dr = function.apply(i++, resource); runtimeRatios.add(dr); } setRuntimeRatios(runtimeRatios); }
/** * Refresh runtime ratios. * * @param function calculate {@link me.ellios.hedwig.rpc.loadbalancer.DistributionRatio} from the {@code R} resource. */
Refresh runtime ratios
resetRuntimeRatios
{ "repo_name": "ellios/hedwig", "path": "hedwig-rpc-core/src/main/java/me/ellios/hedwig/rpc/loadbalancer/ParameterizedLoadBalancer.java", "license": "apache-2.0", "size": 3622 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,463,025