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
private HashMap<Integer,Object> getlobHMObj() { if (rootConnection.lobHashMap == null) { rootConnection.lobHashMap = new HashMap<Integer,Object>(); } return rootConnection.lobHashMap; }
HashMap<Integer,Object> function() { if (rootConnection.lobHashMap == null) { rootConnection.lobHashMap = new HashMap<Integer,Object>(); } return rootConnection.lobHashMap; }
/** * Return the Hash Map in the root connection * @return the HashMap that contains the locator to LOB object mapping */
Return the Hash Map in the root connection
getlobHMObj
{ "repo_name": "trejkaz/derby", "path": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "license": "apache-2.0", "size": 142130 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,463,641
int n = expander.numSymmetries(); // number of symmetric tuples int m = locations.length; int[][] tuples = new int[n][m]; // Create n tuples location by location for (int j = 0; j < m; ++j) { int[] symmetries = expander.getSymmetries(locations[j]); assert symmetries.length == n; for (int i = 0; i <...
int n = expander.numSymmetries(); int m = locations.length; int[][] tuples = new int[n][m]; for (int j = 0; j < m; ++j) { int[] symmetries = expander.getSymmetries(locations[j]); assert symmetries.length == n; for (int i = 0; i < n; ++i) { tuples[i][j] = symmetries[i]; } } ArrayList<int[]> unique = new ArrayList<>(Arra...
/** * Returns a list of tuples (arrays of locations) expanded with a symmetry expander. * The list always starts with the given tuple. * * @param locations * array of margin-based locations (like in boards with margins) */
Returns a list of tuples (arrays of locations) expanded with a symmetry expander. The list always starts with the given tuple
createSymmetric
{ "repo_name": "mszubert/2048", "path": "src/main/java/put/ci/cevo/games/encodings/ntuple/expanders/SymmetryUtils.java", "license": "apache-2.0", "size": 1308 }
[ "java.util.ArrayList", "java.util.Arrays" ]
import java.util.ArrayList; import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,708,806
public static ims.edischarge.domain.objects.Summary extractSummary(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.EDischargeSTHKSummaryForProcComponentVo valueObject) { return extractSummary(domainFactory, valueObject, new HashMap()); }
static ims.edischarge.domain.objects.Summary function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.EDischargeSTHKSummaryForProcComponentVo valueObject) { return extractSummary(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractSummary
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/clinical/vo/domain/EDischargeSTHKSummaryForProcComponentVoAssembler.java", "license": "agpl-3.0", "size": 16252 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,687,518
public Buffer readRawBytes(int size) throws IOException { if( size == 0) { return new Buffer(new byte[]{}); } if( this.pos+size > limit ) { throw new EOFException(); } // If the underlying stream is a ByteArrayInputStream // t...
Buffer function(int size) throws IOException { if( size == 0) { return new Buffer(new byte[]{}); } if( this.pos+size > limit ) { throw new EOFException(); } if( bis!=null ) { Buffer rc = bis.readBuffer(size); if( rc==null rc.getLength() < size ) { throw new EOFException(); } this.pos += rc.getLength(); return rc; } byt...
/** * Read a fixed size of bytes from the input. * * @throws InvalidProtocolBufferException * The end of the stream or the current limit was reached. */
Read a fixed size of bytes from the input
readRawBytes
{ "repo_name": "chirino/hawtbuf", "path": "hawtbuf-proto/src/main/java/org/fusesource/hawtbuf/proto/CodedInputStream.java", "license": "apache-2.0", "size": 14322 }
[ "java.io.EOFException", "java.io.IOException", "org.fusesource.hawtbuf.Buffer" ]
import java.io.EOFException; import java.io.IOException; import org.fusesource.hawtbuf.Buffer;
import java.io.*; import org.fusesource.hawtbuf.*;
[ "java.io", "org.fusesource.hawtbuf" ]
java.io; org.fusesource.hawtbuf;
1,737,167
public String buildMainPanelContext(VelocityPortlet portlet, Context context, RunData data, SessionState state) { String template = null; context.put("action", "AssignmentAction"); context.put("tlang", rb); context.put("dateFormat", getDateFormatString()); context.put("cheffeedbackhelper", this); Stri...
String function(VelocityPortlet portlet, Context context, RunData data, SessionState state) { String template = null; context.put(STR, STR); context.put("tlang", rb); context.put(STR, getDateFormatString()); context.put(STR, this); String contextString = (String) state.getAttribute(STATE_CONTEXT_STRING); boolean allowA...
/** * central place for dispatching the build routines based on the state name */
central place for dispatching the build routines based on the state name
buildMainPanelContext
{ "repo_name": "harfalm/Sakai-10.1", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 605178 }
[ "org.sakaiproject.assignment.api.Assignment", "org.sakaiproject.assignment.cover.AssignmentService", "org.sakaiproject.cheftool.Context", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.cheftool.VelocityPortlet", "org.sakaiproject.component.cover.ServerConfigurationService", "org.sakaiproject.eve...
import org.sakaiproject.assignment.api.Assignment; import org.sakaiproject.assignment.cover.AssignmentService; import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.component.cover.ServerConfigurationService; import ...
import org.sakaiproject.assignment.api.*; import org.sakaiproject.assignment.cover.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.component.cover.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*; import org.sakaiproject.site.api.*; import org.sakaiproject.site.cover.*;
[ "org.sakaiproject.assignment", "org.sakaiproject.cheftool", "org.sakaiproject.component", "org.sakaiproject.event", "org.sakaiproject.exception", "org.sakaiproject.site" ]
org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.component; org.sakaiproject.event; org.sakaiproject.exception; org.sakaiproject.site;
1,498,474
public Interrogation newInterrogation(CfgContext context, Node node) { if (node != null) { Interrogation component = new Interrogation(); component.configure(context,node,node.getAttributes()); return component; } return null; }
Interrogation function(CfgContext context, Node node) { if (node != null) { Interrogation component = new Interrogation(); component.configure(context,node,node.getAttributes()); return component; } return null; }
/** * Instantiates and configures a new Interrogation component. * <br/>The node argument can be null, if so then return a null value. * @param context the configuration context * @param node the configuration node associated with the component * @return the new Interrogation component (null if the ...
Instantiates and configures a new Interrogation component. The node argument can be null, if so then return a null value
newInterrogation
{ "repo_name": "usgin/usgin-geoportal", "path": "src/com/esri/gpt/catalog/schema/SchemaFactory.java", "license": "apache-2.0", "size": 12665 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
824,739
public void setRepeatT(boolean val) { if ( repeatT == null ) { repeatT = (SFBool)getField( "repeatT" ); } repeatT.setValue( val ); }
void function(boolean val) { if ( repeatT == null ) { repeatT = (SFBool)getField( STR ); } repeatT.setValue( val ); }
/** Set the repeatT field. * @param val The boolean to set. */
Set the repeatT field
setRepeatT
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/sai/external/node/texturing/SAIPixelTexture.java", "license": "gpl-2.0", "size": 3244 }
[ "org.web3d.x3d.sai.SFBool" ]
import org.web3d.x3d.sai.SFBool;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
2,795,125
public static double calculateZScore(double percentile) { // Set percentile gt0 and lt1, otherwise the error // function will return Infinity. if (percentile >= 1.0) { percentile = 0.999; } else if (percentile <= 0.0) { percentile = 0.001; } return -1 * Math.sqrt(2) * Erf.erfcInv(2...
static double function(double percentile) { if (percentile >= 1.0) { percentile = 0.999; } else if (percentile <= 0.0) { percentile = 0.001; } return -1 * Math.sqrt(2) * Erf.erfcInv(2 * percentile); }
/** * Z is the z-score that corresponds to the percentile. * z-scores correspond exactly to percentiles, e.g., * z-scores of: * -1.881, // 3rd * -1.645, // 5th * -1.282, // 10th * -0.674, // 25th * 0, // 50th * 0.674, // 75th * 1.036, // 85th * 1.282, // 90th * 1.645, // 95t...
Z is the z-score that corresponds to the percentile. z-scores correspond exactly to percentiles, e.g., z-scores of: -1.881, // 3rd -1.645, // 5th -1.282, // 10th -0.674, // 25th 0, // 50th 0.674, // 75th 1.036, // 85th 1.282, // 90th 1.645, // 95th 1.881 // 97th
calculateZScore
{ "repo_name": "synthetichealth/synthea", "path": "src/main/java/org/mitre/synthea/world/concepts/GrowthChart.java", "license": "apache-2.0", "size": 5700 }
[ "org.apache.commons.math3.special.Erf" ]
import org.apache.commons.math3.special.Erf;
import org.apache.commons.math3.special.*;
[ "org.apache.commons" ]
org.apache.commons;
2,811,011
@Override public String getTypeString() { return getTypeString(TYPE_ASCII); } } public static class UTC extends UInt { public static final TimeZone UTC_TIME_ZONE = TimeZone.getTimeZone("UTC"); public static final String DATE_FORMAT_P...
String function() { return getTypeString(TYPE_ASCII); } } public static class UTC extends UInt { public static final TimeZone UTC_TIME_ZONE = TimeZone.getTimeZone("UTC"); public static final String DATE_FORMAT_PATTERN = STR; private static final double SECONDS_PER_DAY = 86400.0; private static final double SECONDS_TO_D...
/** * Returns this value's data type String. */
Returns this value's data type String
getTypeString
{ "repo_name": "seadas/beam", "path": "beam-core/src/main/java/org/esa/beam/framework/datamodel/ProductData.java", "license": "gpl-3.0", "size": 100346 }
[ "java.util.TimeZone" ]
import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
2,682,747
Response createWiki(@QueryParam("template") String template, Wiki wiki) throws XWikiRestException;
Response createWiki(@QueryParam(STR) String template, Wiki wiki) throws XWikiRestException;
/** * Create a wiki. * * @param template the wiki template to be used for initializing the new wiki. Can be null. * @param wiki the wiki model object (see {@link org.xwiki.rest.model.jaxb.Wiki})containing information about the * wiki to be created. * @return a response containing a descrip...
Create a wiki
createWiki
{ "repo_name": "pbondoer/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-rest/xwiki-platform-wiki-rest-api/src/main/java/org/xwiki/wiki/rest/WikiManagerREST.java", "license": "lgpl-2.1", "size": 1815 }
[ "javax.ws.rs.QueryParam", "javax.ws.rs.core.Response", "org.xwiki.rest.XWikiRestException", "org.xwiki.rest.model.jaxb.Wiki" ]
import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import org.xwiki.rest.XWikiRestException; import org.xwiki.rest.model.jaxb.Wiki;
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.xwiki.rest.*; import org.xwiki.rest.model.jaxb.*;
[ "javax.ws", "org.xwiki.rest" ]
javax.ws; org.xwiki.rest;
1,173,138
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<ConnectionSettingInner> updateAsync( String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters) { return updateWithResponseAsync(resourceGroupName, resourceName, connectionName, parameters) ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<ConnectionSettingInner> function( String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters) { return updateWithResponseAsync(resourceGroupName, resourceName, connectionName, parameters) .flatMap( (Response<ConnectionSettingI...
/** * Updates a Connection Setting registration for a Bot Service. * * @param resourceGroupName The name of the Bot resource group in the user subscription. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. ...
Updates a Connection Setting registration for a Bot Service
updateAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsClientImpl.java", "license": "mit", "size": 71427 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.botservice.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,061,255
public List<BackupInfo> getBackupHistory(int n, BackupInfo.Filter... filters) throws IOException { if (filters.length == 0) return getHistory(n); List<BackupInfo> history = getBackupHistory(); List<BackupInfo> result = new ArrayList<BackupInfo>(); for (BackupInfo bi : history) { if (result.size...
List<BackupInfo> function(int n, BackupInfo.Filter... filters) throws IOException { if (filters.length == 0) return getHistory(n); List<BackupInfo> history = getBackupHistory(); List<BackupInfo> result = new ArrayList<BackupInfo>(); for (BackupInfo bi : history) { if (result.size() == n) break; boolean passed = true; f...
/** * Get backup history records filtered by list of filters. * @param n max number of records * @param filters list of filters * @return backup records * @throws IOException */
Get backup history records filtered by list of filters
getBackupHistory
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java", "license": "apache-2.0", "size": 67577 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hbase.backup.BackupInfo" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.backup.BackupInfo;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.backup.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,075,204
public boolean hasLimboPlayer(String name) { checkNotNull(name); return cache.containsKey(name.toLowerCase()); }
boolean function(String name) { checkNotNull(name); return cache.containsKey(name.toLowerCase()); }
/** * Method hasLimboPlayer. * * @param name String * * @return boolean */
Method hasLimboPlayer
hasLimboPlayer
{ "repo_name": "sgdc3/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java", "license": "gpl-3.0", "size": 4637 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
713,163
LOG.debug("Calling index providers"); List<IndexProvider> indexProviders = null; try { indexProviders = registryManager.getIndexProviders(new Version(meteorProperties.getProperty("meteor.version"))); } catch (RegistryException e1) { responseData.addIndexProviderMessage(RsMsgLevelEnum.E, MeteorMessage.REG...
LOG.debug(STR); List<IndexProvider> indexProviders = null; try { indexProviders = registryManager.getIndexProviders(new Version(meteorProperties.getProperty(STR))); } catch (RegistryException e1) { responseData.addIndexProviderMessage(RsMsgLevelEnum.E, MeteorMessage.REGISTRY_NO_CONNECTION, null); throw new MeteorQueryE...
/** * Gets a list of data providers that have data for the provided SSN * * @param ssn * the ssn of the borrower to get data for * @param responseData * the response data object to write any index provider messages * to * @return data provider information returned from ...
Gets a list of data providers that have data for the provided SSN
getDataProviders
{ "repo_name": "NationalStudentClearinghouse/Meteor4", "path": "accessprovider/src/main/java/org/meteornetwork/meteor/provider/access/service/IndexQueryService.java", "license": "lgpl-2.1", "size": 10368 }
[ "java.util.HashSet", "java.util.List", "java.util.Set", "org.meteornetwork.meteor.common.registry.RegistryException", "org.meteornetwork.meteor.common.registry.data.IndexProvider", "org.meteornetwork.meteor.common.util.Version", "org.meteornetwork.meteor.common.util.message.MeteorMessage", "org.meteor...
import java.util.HashSet; import java.util.List; import java.util.Set; import org.meteornetwork.meteor.common.registry.RegistryException; import org.meteornetwork.meteor.common.registry.data.IndexProvider; import org.meteornetwork.meteor.common.util.Version; import org.meteornetwork.meteor.common.util.message.MeteorMes...
import java.util.*; import org.meteornetwork.meteor.common.registry.*; import org.meteornetwork.meteor.common.registry.data.*; import org.meteornetwork.meteor.common.util.*; import org.meteornetwork.meteor.common.util.message.*; import org.meteornetwork.meteor.common.xml.indexresponse.*; import org.meteornetwork.meteor...
[ "java.util", "org.meteornetwork.meteor" ]
java.util; org.meteornetwork.meteor;
866,374
@ServiceMethod(returns = ReturnType.SINGLE) VpnClientConnectionHealthDetailListResultInner getVpnclientConnectionHealth( String resourceGroupName, String virtualNetworkGatewayName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) VpnClientConnectionHealthDetailListResultInner getVpnclientConnectionHealth( String resourceGroupName, String virtualNetworkGatewayName, Context context);
/** * Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified * resource group. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param contex...
Get VPN client connection health detail per P2S client connection of the virtual network gateway in the specified resource group
getVpnclientConnectionHealth
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java", "license": "mit", "size": 135947 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.VpnClientConnectionHealthDetailListResultInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.VpnClientConnectionHealthDetailListResultInner;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,644,804
public ScreenBrightness getScreenBrightness() { return screenBrightness; }
ScreenBrightness function() { return screenBrightness; }
/** * Gets this player's {@link ScreenBrightness}. * * @return The screen brightness. */
Gets this player's <code>ScreenBrightness</code>
getScreenBrightness
{ "repo_name": "Major-/apollo", "path": "game/src/main/org/apollo/game/model/entity/Player.java", "license": "isc", "size": 24470 }
[ "org.apollo.game.model.entity.setting.ScreenBrightness" ]
import org.apollo.game.model.entity.setting.ScreenBrightness;
import org.apollo.game.model.entity.setting.*;
[ "org.apollo.game" ]
org.apollo.game;
1,986,315
EClass getAssociation();
EClass getAssociation();
/** * Returns the meta object for class '{@link org.roboid.studio.contentscomposer.Association <em>Association</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Association</em>'. * @see org.roboid.studio.contentscomposer.Association * @generated */
Returns the meta object for class '<code>org.roboid.studio.contentscomposer.Association Association</code>'.
getAssociation
{ "repo_name": "roboidstudio/embedded", "path": "org.roboid.studio.contentscomposer.model/src/org/roboid/studio/contentscomposer/ContentsComposerPackage.java", "license": "lgpl-2.1", "size": 131603 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
74,389
void handleResponse(HttpResponse response, HttpContext context) throws IOException;
void handleResponse(HttpResponse response, HttpContext context) throws IOException;
/** * Triggered when an HTTP response is ready to be processed. * * @param response * the HTTP response to be processed * @param context * the actual HTTP context */
Triggered when an HTTP response is ready to be processed
handleResponse
{ "repo_name": "cictourgune/MDP-Airbnb", "path": "httpcomponents-core-4.4/httpcore-nio/src/main/java-deprecated/org/apache/http/nio/protocol/NHttpRequestExecutionHandler.java", "license": "apache-2.0", "size": 4983 }
[ "java.io.IOException", "org.apache.http.HttpResponse", "org.apache.http.protocol.HttpContext" ]
import java.io.IOException; import org.apache.http.HttpResponse; import org.apache.http.protocol.HttpContext;
import java.io.*; import org.apache.http.*; import org.apache.http.protocol.*;
[ "java.io", "org.apache.http" ]
java.io; org.apache.http;
2,130,104
public File getZipfile() { FileProvider fp = (FileProvider) getArchive().as(FileProvider.class); return fp.getFile(); }
File function() { FileProvider fp = (FileProvider) getArchive().as(FileProvider.class); return fp.getFile(); }
/** * Get the zipfile that holds this ZipResource. * @return the zipfile as a File. */
Get the zipfile that holds this ZipResource
getZipfile
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/types/resources/ZipResource.java", "license": "gpl-2.0", "size": 6721 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,638,082
public void setBounds(Rectangle rectangle) { // Does nothing since the bounds cannot be set on list children // individually. }
void function(Rectangle rectangle) { }
/** * Does nothing since the bounds cannot be set on list children * individually. * * @param rectangle not used here */
Does nothing since the bounds cannot be set on list children individually
setBounds
{ "repo_name": "nmacs/lm3s-uclinux", "path": "lib/classpath/javax/swing/JList.java", "license": "gpl-2.0", "size": 78224 }
[ "java.awt.Rectangle" ]
import java.awt.Rectangle;
import java.awt.*;
[ "java.awt" ]
java.awt;
470,411
public synchronized TaskCompletionEvent[] getTaskCompletionEvents( int startFrom) throws IOException{ return jobSubmitClient.getTaskCompletionEvents( getID(), startFrom, 10); }
synchronized TaskCompletionEvent[] function( int startFrom) throws IOException{ return jobSubmitClient.getTaskCompletionEvents( getID(), startFrom, 10); }
/** * Fetch task completion events from jobtracker for this job. */
Fetch task completion events from jobtracker for this job
getTaskCompletionEvents
{ "repo_name": "rjpower/hadoop", "path": "src/mapred/org/apache/hadoop/mapred/JobClient.java", "license": "apache-2.0", "size": 72472 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,024,529
@Generated @Selector("maximumQuantity") public native HKQuantity maximumQuantity();
@Selector(STR) native HKQuantity function();
/** * maximumQuantity * <p> * Returns the maximum quantity in the time period represented by the receiver. */
maximumQuantity Returns the maximum quantity in the time period represented by the receiver
maximumQuantity
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/healthkit/HKStatistics.java", "license": "apache-2.0", "size": 11010 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
302,367
void write(SMPPPacket packet, boolean withOptionalParams) throws IOException;
void write(SMPPPacket packet, boolean withOptionalParams) throws IOException;
/** * Send an SMPP packet to the SMSC. * @param packet The packet to send. * @param withOptionalParams <code>true</code> to send the packet&apos;s * optional parameters during the write, <code>false</code> to omit the * optional parameters. * @throws IOException */
Send an SMPP packet to the SMSC
write
{ "repo_name": "umermansoor/java-smpp-api", "path": "src/main/java/com/adenki/smpp/net/SmscLink.java", "license": "lgpl-2.1", "size": 3784 }
[ "com.adenki.smpp.message.SMPPPacket", "java.io.IOException" ]
import com.adenki.smpp.message.SMPPPacket; import java.io.IOException;
import com.adenki.smpp.message.*; import java.io.*;
[ "com.adenki.smpp", "java.io" ]
com.adenki.smpp; java.io;
2,138,958
public ServerListenerBuilder addStoppedCallback(Consumer<? super Server> consumer) { serverStoppedCallbacks.add(requireNonNull(consumer, "consumer")); return this; }
ServerListenerBuilder function(Consumer<? super Server> consumer) { serverStoppedCallbacks.add(requireNonNull(consumer, STR)); return this; }
/** * Add {@link Consumer} invoked when the {@link Server} is stopped. * (see: {@link ServerListener#serverStopped(Server)}) */
Add <code>Consumer</code> invoked when the <code>Server</code> is stopped. (see: <code>ServerListener#serverStopped(Server)</code>)
addStoppedCallback
{ "repo_name": "imasahiro/armeria", "path": "core/src/main/java/com/linecorp/armeria/server/ServerListenerBuilder.java", "license": "apache-2.0", "size": 11374 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
401,391
EReference getAssociationProperty_InverseAssociationProperties();
EReference getAssociationProperty_InverseAssociationProperties();
/** * Returns the meta object for the containment reference list '{@link org.dresdenocl.pivotmodel.AssociationProperty#getInverseAssociationProperties <em>Inverse Association Properties</em>}'. * <!-- begin-user-doc --> <!-- * end-user-doc --> * @return the meta object for the containment reference list '<e...
Returns the meta object for the containment reference list '<code>org.dresdenocl.pivotmodel.AssociationProperty#getInverseAssociationProperties Inverse Association Properties</code>'.
getAssociationProperty_InverseAssociationProperties
{ "repo_name": "dresden-ocl/dresdenocl", "path": "plugins/org.dresdenocl.pivotmodel/src/org/dresdenocl/pivotmodel/PivotModelPackage.java", "license": "lgpl-3.0", "size": 98285 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
672,069
public Observable<ServiceResponse<OperationStatus>> updateCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter) { if (this.client.endpoint() == null) { throw ne...
Observable<ServiceResponse<OperationStatus>> function(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException(STR); } if (appId == null) { throw new Illega...
/** * Update a role for a given composite entity in a version of the application. * * @param appId The application ID. * @param versionId The version ID. * @param cEntityId The composite entity extractor ID. * @param roleId The entity role ID. * @param updateCompositeEntityRoleOptiona...
Update a role for a given composite entity in a version of the application
updateCompositeEntityRoleWithServiceResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java", "license": "mit", "size": 818917 }
[ "com.microsoft.azure.cognitiveservices.language.luis.authoring.models.OperationStatus", "com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UpdateCompositeEntityRoleOptionalParameter", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.OperationStatus; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UpdateCompositeEntityRoleOptionalParameter; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,213,573
boolean getFeature0(String featureId) throws XMLConfigurationException { return super.getFeature(featureId); }
boolean getFeature0(String featureId) throws XMLConfigurationException { return super.getFeature(featureId); }
/** * Returns the state of a feature. This method calls getFeature() * on ParserConfigurationSettings, bypassing getFeature() on this * class. */
Returns the state of a feature. This method calls getFeature() on ParserConfigurationSettings, bypassing getFeature() on this class
getFeature0
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java", "license": "gpl-2.0", "size": 58530 }
[ "com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException" ]
import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
import com.sun.org.apache.xerces.internal.xni.parser.*;
[ "com.sun.org" ]
com.sun.org;
83,050
public File getBackupFile() { return new File(Jenkins.get().getRootDir(),"plugins/"+getShortName() + ".bak"); }
File function() { return new File(Jenkins.get().getRootDir(),STR+getShortName() + ".bak"); }
/** * Where is the backup file? */
Where is the backup file
getBackupFile
{ "repo_name": "recena/jenkins", "path": "core/src/main/java/hudson/PluginWrapper.java", "license": "mit", "size": 45597 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,189,125
public void setTldSkipPatterns(Collection<String> patterns) { Assert.notNull(patterns, "Patterns must not be null"); this.tldSkipPatterns = new LinkedHashSet<>(patterns); }
void function(Collection<String> patterns) { Assert.notNull(patterns, STR); this.tldSkipPatterns = new LinkedHashSet<>(patterns); }
/** * Set the patterns that match jars to ignore for TLD scanning. See Tomcat's * catalina.properties for typical values. Defaults to a list drawn from that source. * @param patterns the jar patterns to skip when scanning for TLDs etc */
Set the patterns that match jars to ignore for TLD scanning. See Tomcat's catalina.properties for typical values. Defaults to a list drawn from that source
setTldSkipPatterns
{ "repo_name": "habuma/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java", "license": "apache-2.0", "size": 26936 }
[ "java.util.Collection", "java.util.LinkedHashSet", "org.springframework.util.Assert" ]
import java.util.Collection; import java.util.LinkedHashSet; import org.springframework.util.Assert;
import java.util.*; import org.springframework.util.*;
[ "java.util", "org.springframework.util" ]
java.util; org.springframework.util;
2,788,486
public void initialiseBounds() { _minX = _minY = Integer.MAX_VALUE; _maxX = _maxY = Integer.MIN_VALUE; List<Ligne> allLignes = new ArrayList<Ligne>(_lignes); allLignes.addAll(_taxiway); allLignes.addAll(_pushbacks); trouverLimitesReels(allLignes); trouverLimitesReels(get_points...
void function() { _minX = _minY = Integer.MAX_VALUE; _maxX = _maxY = Integer.MIN_VALUE; List<Ligne> allLignes = new ArrayList<Ligne>(_lignes); allLignes.addAll(_taxiway); allLignes.addAll(_pushbacks); trouverLimitesReels(allLignes); trouverLimitesReels(get_points()); }
/** * Initialise les limites de l'aeroport. */
Initialise les limites de l'aeroport
initialiseBounds
{ "repo_name": "avaret/simuroul", "path": "simuroul_pilote/src/fr/iessa/metier/infra/Aeroport.java", "license": "gpl-3.0", "size": 6716 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
281,851
public static GdbPrint parse(GdbOutput gdbOutput) throws GdbParseException { String output = gdbOutput.getOutput(); Matcher matcher = GDB_PRINT.matcher(output); if (matcher.find()) { String value = matcher.group(2); return new GdbPrint(value); } thro...
static GdbPrint function(GdbOutput gdbOutput) throws GdbParseException { String output = gdbOutput.getOutput(); Matcher matcher = GDB_PRINT.matcher(output); if (matcher.find()) { String value = matcher.group(2); return new GdbPrint(value); } throw new GdbParseException(GdbPrint.class, output); }
/** * Factory method. */
Factory method
parse
{ "repo_name": "gazarenkov/che-sketch", "path": "plugins/plugin-gdb/che-plugin-gdb-server/src/main/java/org/eclipse/che/plugin/gdb/server/parser/GdbPrint.java", "license": "epl-1.0", "size": 1465 }
[ "java.util.regex.Matcher", "org.eclipse.che.plugin.gdb.server.exception.GdbParseException" ]
import java.util.regex.Matcher; import org.eclipse.che.plugin.gdb.server.exception.GdbParseException;
import java.util.regex.*; import org.eclipse.che.plugin.gdb.server.exception.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
699,779
public void flushBase64() throws java.io.IOException { if(this.position > 0) { if(this.encode) { this.out.write(Base64.encode3to4(this.b4, this.buffer, this.position, this.options)); this.position = 0; ...
void function() throws java.io.IOException { if(this.position > 0) { if(this.encode) { this.out.write(Base64.encode3to4(this.b4, this.buffer, this.position, this.options)); this.position = 0; } else { throw new java.io.IOException(STR); } } }
/** * Method added by PHIL. [Thanks, PHIL. -Rob] This pads the buffer * without closing the stream. * * @throws java.io.IOException if there's an error. */
Method added by PHIL. [Thanks, PHIL. -Rob] This pads the buffer without closing the stream
flushBase64
{ "repo_name": "fireandfuel/Niobe-Legion", "path": "shared/src/niobe/legion/shared/Base64.java", "license": "lgpl-3.0", "size": 89841 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,783,253
public static Date addSeconds(Date date, int seconds) { Calendar calendar = toCalendar(date); CalendarUtil.addSeconds(calendar, seconds); return calendar.getTime(); }
static Date function(Date date, int seconds) { Calendar calendar = toCalendar(date); CalendarUtil.addSeconds(calendar, seconds); return calendar.getTime(); }
/** * Add the given amount of seconds to the given date. It actually converts the date to Calendar * and calls {@link CalendarUtil#addSeconds(Calendar, int)} and then converts back to date. * @param date The date to add the given amount of seconds to. * @param seconds The amount of seconds to be add...
Add the given amount of seconds to the given date. It actually converts the date to Calendar and calls <code>CalendarUtil#addSeconds(Calendar, int)</code> and then converts back to date
addSeconds
{ "repo_name": "masterucm1617/botzzaroni", "path": "BotzzaroniDev/src/icaro/aplicaciones/informacion/gestionPizzeria/DateUtil.java", "license": "gpl-3.0", "size": 22471 }
[ "java.util.Calendar", "java.util.Date" ]
import java.util.Calendar; import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
76,677
if (type.isArray() || type.isPrimitive()) return null; if (name.equals(type.getTypeDeclaration().getQualifiedName())) return type; final ITypeBinding binding= type.getSuperclass(); if (binding != null) { final ITypeBinding result= findTypeInHierarchy(binding, name); if (result != null) return re...
if (type.isArray() type.isPrimitive()) return null; if (name.equals(type.getTypeDeclaration().getQualifiedName())) return type; final ITypeBinding binding= type.getSuperclass(); if (binding != null) { final ITypeBinding result= findTypeInHierarchy(binding, name); if (result != null) return result; } return null; } priv...
/** * Finds the type with the given fully qualified name (generic type * parameters included) in the hierarchy. * * @param type * The hierarchy type to find the super type in * @param name * The fully qualified name of the super type * @return The found super type, or <code>null</...
Finds the type with the given fully qualified name (generic type parameters included) in the hierarchy
findTypeInHierarchy
{ "repo_name": "boniatillo-com/PhaserEditor", "path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/corext/refactoring/structure/UseSuperTypeProcessor.java", "license": "epl-1.0", "size": 20890 }
[ "org.eclipse.wst.jsdt.core.IType", "org.eclipse.wst.jsdt.core.dom.ITypeBinding", "org.eclipse.wst.jsdt.internal.corext.refactoring.util.TextEditBasedChangeManager" ]
import org.eclipse.wst.jsdt.core.IType; import org.eclipse.wst.jsdt.core.dom.ITypeBinding; import org.eclipse.wst.jsdt.internal.corext.refactoring.util.TextEditBasedChangeManager;
import org.eclipse.wst.jsdt.core.*; import org.eclipse.wst.jsdt.core.dom.*; import org.eclipse.wst.jsdt.internal.corext.refactoring.util.*;
[ "org.eclipse.wst" ]
org.eclipse.wst;
378,353
private Map<TopicPartition, List<ConsumerRecord<K, V>>> pollOnce(long timeout) { // TODO: Sub-requests should take into account the poll timeout (KAFKA-1894) coordinator.ensureCoordinatorKnown(); // ensure we have partitions assigned if we expect to if (subscriptions.partitionsAutoA...
Map<TopicPartition, List<ConsumerRecord<K, V>>> function(long timeout) { coordinator.ensureCoordinatorKnown(); if (subscriptions.partitionsAutoAssigned()) coordinator.ensurePartitionAssignment(); if (!subscriptions.hasAllFetchPositions()) updateFetchPositions(this.subscriptions.missingFetchPositions()); Cluster cluster...
/** * Do one round of polling. In addition to checking for new data, this does any needed * heart-beating, auto-commits, and offset updates. * @param timeout The maximum time to block in the underlying poll * @return The fetched records (may be empty) */
Do one round of polling. In addition to checking for new data, this does any needed heart-beating, auto-commits, and offset updates
pollOnce
{ "repo_name": "samaitra/kafka", "path": "clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java", "license": "apache-2.0", "size": 69133 }
[ "java.util.List", "java.util.Map", "org.apache.kafka.common.Cluster", "org.apache.kafka.common.TopicPartition" ]
import java.util.List; import java.util.Map; import org.apache.kafka.common.Cluster; import org.apache.kafka.common.TopicPartition;
import java.util.*; import org.apache.kafka.common.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
2,426,836
@Test public void testDescribe() { final Item item = new Item("name1", "class", "subclass", new HashMap<String, String>()); assertThat(item.describe(), equalTo("You see a §'name1'.")); item.setDescription("Description."); item.setBoundTo("hero"); item.put("min_level", 1); item.put("atk", 2); item...
void function() { final Item item = new Item("name1", "class", STR, new HashMap<String, String>()); assertThat(item.describe(), equalTo(STR)); item.setDescription(STR); item.setBoundTo("hero"); item.put(STR, 1); item.put("atk", 2); item.put("def", 3); item.put("rate", 4); item.put(STR, 5); item.put("range", 6); item.pu...
/** * Tests for describe. */
Tests for describe
testDescribe
{ "repo_name": "AntumDeluge/arianne-stendhal", "path": "tests/games/stendhal/server/entity/item/ItemTest.java", "license": "gpl-2.0", "size": 14749 }
[ "games.stendhal.common.constants.Nature", "java.util.HashMap", "org.hamcrest.Matchers", "org.junit.Assert" ]
import games.stendhal.common.constants.Nature; import java.util.HashMap; import org.hamcrest.Matchers; import org.junit.Assert;
import games.stendhal.common.constants.*; import java.util.*; import org.hamcrest.*; import org.junit.*;
[ "games.stendhal.common", "java.util", "org.hamcrest", "org.junit" ]
games.stendhal.common; java.util; org.hamcrest; org.junit;
719,205
@Override public final IExpr arg2() { return arg2; }
final IExpr function() { return arg2; }
/** * Get the second argument (i.e. the third element of the underlying list structure) of the <code> * AST</code> function (i.e. get(2) ). <br> * <b>Example:</b> for the AST representing the expression <code>x^y</code> (i.e. <code> * Power(x, y)</code>), <code>arg2()</code> returns <code>y</code>. * ...
Get the second argument (i.e. the third element of the underlying list structure) of the <code> AST</code> function (i.e. get(2) ). Example: for the AST representing the expression <code>x^y</code> (i.e. <code> Power(x, y)</code>), <code>arg2()</code> returns <code>y</code>
arg2
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/B3.java", "license": "gpl-3.0", "size": 25695 }
[ "org.matheclipse.core.interfaces.IExpr" ]
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.core.interfaces.*;
[ "org.matheclipse.core" ]
org.matheclipse.core;
1,134,791
public ExternalNavigationParams.Builder buildExternalNavigationParams( NavigationHandle navigationHandle, RedirectHandler redirectHandler, boolean shouldCloseTab, GURL escapedUrl) { boolean isInitialTabLaunchInBackground = mClient.wasTabLaunchedFromLongPressInBackgrou...
ExternalNavigationParams.Builder function( NavigationHandle navigationHandle, RedirectHandler redirectHandler, boolean shouldCloseTab, GURL escapedUrl) { boolean isInitialTabLaunchInBackground = mClient.wasTabLaunchedFromLongPressInBackground() && shouldCloseTab; return new ExternalNavigationParams .Builder(escapedUrl,...
/** * Returns ExternalNavigationParams.Builder to generate ExternalNavigationParams for * ExternalNavigationHandler#shouldOverrideUrlLoading(). */
Returns ExternalNavigationParams.Builder to generate ExternalNavigationParams for ExternalNavigationHandler#shouldOverrideUrlLoading()
buildExternalNavigationParams
{ "repo_name": "chromium/chromium", "path": "components/external_intents/android/java/src/org/chromium/components/external_intents/InterceptNavigationDelegateImpl.java", "license": "bsd-3-clause", "size": 16012 }
[ "org.chromium.content_public.browser.NavigationHandle" ]
import org.chromium.content_public.browser.NavigationHandle;
import org.chromium.content_public.browser.*;
[ "org.chromium.content_public" ]
org.chromium.content_public;
1,798,070
public void partProcessingCompleted(BoardLocation board, Placement placement); // TODO Maybe partProcessingFailed with a reason // TODO Add job progress information, especially after pre-processing // so that listeners can know the total placement count to be processed.
void function(BoardLocation board, Placement placement);
/** * Fired when the JobProcessor has completed all operations regarding the * given Placement. * @param board * @param placement */
Fired when the JobProcessor has completed all operations regarding the given Placement
partProcessingCompleted
{ "repo_name": "firepick-delta/openpnp", "path": "src/main/java/org/openpnp/JobProcessorListener.java", "license": "gpl-3.0", "size": 3580 }
[ "org.openpnp.model.BoardLocation", "org.openpnp.model.Placement" ]
import org.openpnp.model.BoardLocation; import org.openpnp.model.Placement;
import org.openpnp.model.*;
[ "org.openpnp.model" ]
org.openpnp.model;
2,642,258
@Override public void startPrefixMapping(String prefix, String uri) throws SAXException { _handler.startPrefixMapping(prefix, uri); }
void function(String prefix, String uri) throws SAXException { _handler.startPrefixMapping(prefix, uri); }
/** * Implements org.xml.sax.ContentHandler.startPrefixMapping() * Begin the scope of a prefix-URI Namespace mapping. */
Implements org.xml.sax.ContentHandler.startPrefixMapping() Begin the scope of a prefix-URI Namespace mapping
startPrefixMapping
{ "repo_name": "md-5/jdk10", "path": "src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerHandlerImpl.java", "license": "gpl-2.0", "size": 15833 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
64,326
public ServiceFuture<ExpressRouteCircuitsArpTableListResultInner> beginListArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback<ExpressRouteCircuitsArpTableListResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginL...
ServiceFuture<ExpressRouteCircuitsArpTableListResultInner> function(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback<ExpressRouteCircuitsArpTableListResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginListArpTableWithServiceResponseAsy...
/** * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. * * @param resourceGroupName The name of the resource group. * @param crossConnectionName The name of the ExpressRouteCrossConnection. * @param peeringName The name of the peeri...
Gets the currently advertised ARP table associated with the express route cross connection in a resource group
beginListArpTableAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/implementation/ExpressRouteCrossConnectionsInner.java", "license": "mit", "size": 100923 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
670,264
if (buf.remaining() != SIZE) throw new IllegalArgumentException(); int id = buf.getShort() & 0xFFFF; int chunk = buf.getShort() & 0xFFFF; int nextSector = ByteBufferUtils.getTriByte(buf); int type = buf.get() & 0xFF; byte[] data = new byte[DATA_SIZE]; buf.get(data); return new Sector(type, id, chun...
if (buf.remaining() != SIZE) throw new IllegalArgumentException(); int id = buf.getShort() & 0xFFFF; int chunk = buf.getShort() & 0xFFFF; int nextSector = ByteBufferUtils.getTriByte(buf); int type = buf.get() & 0xFF; byte[] data = new byte[DATA_SIZE]; buf.get(data); return new Sector(type, id, chunk, nextSector, data);...
/** * Decodes the specified {@link ByteBuffer} into a {@link Sector} object. * @param buf The buffer. * @return The sector. */
Decodes the specified <code>ByteBuffer</code> into a <code>Sector</code> object
decode
{ "repo_name": "davidi2/mopar", "path": "src/net/scapeemulator/cache/Sector.java", "license": "isc", "size": 3249 }
[ "net.scapeemulator.cache.util.ByteBufferUtils" ]
import net.scapeemulator.cache.util.ByteBufferUtils;
import net.scapeemulator.cache.util.*;
[ "net.scapeemulator.cache" ]
net.scapeemulator.cache;
622,589
ServiceClientCredentials getCredentials();
ServiceClientCredentials getCredentials();
/** * Gets The management credentials for Azure.. * * @return the credentials value. */
Gets The management credentials for Azure.
getCredentials
{ "repo_name": "matt-gibbs/AutoRest", "path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/subscriptionidapiversion/MicrosoftAzureTestUrl.java", "license": "mit", "size": 2886 }
[ "com.microsoft.rest.credentials.ServiceClientCredentials" ]
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.credentials.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
648,951
public void setMB(final TwoBitField mB) { this.mB = mB; }
void function(final TwoBitField mB) { this.mB = mB; }
/** * set mB of type TwoBitField . * @param mB to be set */
set mB of type TwoBitField
setMB
{ "repo_name": "mksmbrtsh/LLRPexplorer", "path": "src/org/llrp/ltk/generated/parameters/C1G2BlockWrite.java", "license": "apache-2.0", "size": 14553 }
[ "org.llrp.ltk.types.TwoBitField" ]
import org.llrp.ltk.types.TwoBitField;
import org.llrp.ltk.types.*;
[ "org.llrp.ltk" ]
org.llrp.ltk;
2,139,427
@Test public void testChooseRandomInclude3() { String scope = "/d1"; Map<Node, Integer> frequency = pickNodesAtRandom(200, scope, null); LOG.info("No node is excluded."); for (int i = 0; i < 5; ++i) { // all nodes should be more than zero assertTrue(dataNodes[i] + " should have been chos...
void function() { String scope = "/d1"; Map<Node, Integer> frequency = pickNodesAtRandom(200, scope, null); LOG.info(STR); for (int i = 0; i < 5; ++i) { assertTrue(dataNodes[i] + STR, frequency.get(dataNodes[i]) > 0); } }
/** * Tests chooseRandom with include scope, no exlucde nodes. */
Tests chooseRandom with include scope, no exlucde nodes
testChooseRandomInclude3
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/net/TestNetworkTopology.java", "license": "apache-2.0", "size": 20251 }
[ "java.util.Map", "org.junit.Assert" ]
import java.util.Map; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,286,530
public static int getScriptEditorPort() { IPreferenceStore prefs = Activator.getDefault().getPreferenceStore(); try { return Integer.parseInt(prefs.getString(GHIDRA_SCRIPT_EDITOR_PORT_NUMBER)); } catch (NumberFormatException e) { return -1; } }
static int function() { IPreferenceStore prefs = Activator.getDefault().getPreferenceStore(); try { return Integer.parseInt(prefs.getString(GHIDRA_SCRIPT_EDITOR_PORT_NUMBER)); } catch (NumberFormatException e) { return -1; } }
/** * Gets the port used for script editor. * * @return The port used for script editor. Will return -1 if the port is not set. */
Gets the port used for script editor
getScriptEditorPort
{ "repo_name": "NationalSecurityAgency/ghidra", "path": "GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/ghidrascripteditor/preferences/GhidraScriptEditorPreferences.java", "license": "apache-2.0", "size": 2236 }
[ "org.eclipse.jface.preference.IPreferenceStore" ]
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,407,009
protected void paintComponent(Graphics g) { super.paintComponent(getGraphics2D(g)); }
void function(Graphics g) { super.paintComponent(getGraphics2D(g)); }
/** * The <code>paintComponent</code> method is overridden so we apply any necessary rendering hints to the Graphics * object. */
The <code>paintComponent</code> method is overridden so we apply any necessary rendering hints to the Graphics object
paintComponent
{ "repo_name": "kevinmcgoldrick/Tank", "path": "tools/script_filter/src/main/java/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.java", "license": "epl-1.0", "size": 75671 }
[ "java.awt.Graphics" ]
import java.awt.Graphics;
import java.awt.*;
[ "java.awt" ]
java.awt;
50,390
private int getDecisionForStr(PolicyDecisionPoint pdp, String requestStr) throws Exception { final RequestContext request = RequestResponseContextFactory.createRequestCtx(); request.readRequest(IOUtils.toInputStream(requestStr, StandardCharsets.UTF_8)); return getDecision(pdp, request); ...
int function(PolicyDecisionPoint pdp, String requestStr) throws Exception { final RequestContext request = RequestResponseContextFactory.createRequestCtx(); request.readRequest(IOUtils.toInputStream(requestStr, StandardCharsets.UTF_8)); return getDecision(pdp, request); }
/** * Get the decision from the given PDP for the given request string (XML as a String). * * @param pdp * @param requestStr * @return * @throws Exception */
Get the decision from the given PDP for the given request string (XML as a String)
getDecisionForStr
{ "repo_name": "xasx/wildfly", "path": "testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/security/xacml/JBossPDPInteroperabilityTestCase.java", "license": "lgpl-2.1", "size": 19099 }
[ "java.nio.charset.StandardCharsets", "org.apache.commons.io.IOUtils", "org.jboss.security.xacml.factories.RequestResponseContextFactory", "org.jboss.security.xacml.interfaces.PolicyDecisionPoint", "org.jboss.security.xacml.interfaces.RequestContext" ]
import java.nio.charset.StandardCharsets; import org.apache.commons.io.IOUtils; import org.jboss.security.xacml.factories.RequestResponseContextFactory; import org.jboss.security.xacml.interfaces.PolicyDecisionPoint; import org.jboss.security.xacml.interfaces.RequestContext;
import java.nio.charset.*; import org.apache.commons.io.*; import org.jboss.security.xacml.factories.*; import org.jboss.security.xacml.interfaces.*;
[ "java.nio", "org.apache.commons", "org.jboss.security" ]
java.nio; org.apache.commons; org.jboss.security;
2,384,667
protected VisorNodeDataCollectorJobResult run(VisorNodeDataCollectorJobResult res, VisorNodeDataCollectorTaskArg arg) { res.igniteInstanceName(ignite.name()); res.topologyVersion(ignite.cluster().topologyVersion()); long start0 = U.currentTimeMillis(); events(res, arg); ...
VisorNodeDataCollectorJobResult function(VisorNodeDataCollectorJobResult res, VisorNodeDataCollectorTaskArg arg) { res.igniteInstanceName(ignite.name()); res.topologyVersion(ignite.cluster().topologyVersion()); long start0 = U.currentTimeMillis(); events(res, arg); if (debug) start0 = log(ignite.log(), STR, getClass(),...
/** * Execution logic of concrete job. * * @param res Result response. * @param arg Job argument. * @return Job result. */
Execution logic of concrete job
run
{ "repo_name": "nivanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java", "license": "apache-2.0", "size": 9853 }
[ "org.apache.ignite.internal.util.typedef.internal.U", "org.apache.ignite.internal.visor.util.VisorTaskUtils" ]
import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.internal.visor.util.VisorTaskUtils;
import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.internal.visor.util.*;
[ "org.apache.ignite" ]
org.apache.ignite;
967,766
public RouteDefinition from(Endpoint endpoint) { RouteDefinition route = createRoute(); route.from(endpoint); return route(route); }
RouteDefinition function(Endpoint endpoint) { RouteDefinition route = createRoute(); route.from(endpoint); return route(route); }
/** * Creates a new route from the given endpoint * * @param endpoint the from endpoint * @return the builder */
Creates a new route from the given endpoint
from
{ "repo_name": "christophd/camel", "path": "core/camel-core-model/src/main/java/org/apache/camel/model/RoutesDefinition.java", "license": "apache-2.0", "size": 12997 }
[ "org.apache.camel.Endpoint" ]
import org.apache.camel.Endpoint;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
335,450
public void sort() { Menu menu = new Menu(); Choice choice = menu.display( new Choice("Merge"), new Choice("Quick"), new Choice("Shell") ); switch (choice.getName()) { case "Merge": // do stuff for merge sor...
void function() { Menu menu = new Menu(); Choice choice = menu.display( new Choice("Merge"), new Choice("Quick"), new Choice("Shell") ); switch (choice.getName()) { case "Merge": this.sortAndSearch.mergeSort(this.dataset); break; case "Quick": this.sortAndSearch.quickSort(this.dataset); break; case "Shell": this.sortAn...
/** * Present the user with the option to sort a data set using three sorting methods */
Present the user with the option to sort a data set using three sorting methods
sort
{ "repo_name": "Deathnerd/CSC310", "path": "src/main/com/gilleland/george/homework/Assignment3.java", "license": "mit", "size": 5916 }
[ "com.gilleland.george.objects.Choice", "com.gilleland.george.utils.Menu" ]
import com.gilleland.george.objects.Choice; import com.gilleland.george.utils.Menu;
import com.gilleland.george.objects.*; import com.gilleland.george.utils.*;
[ "com.gilleland.george" ]
com.gilleland.george;
983,008
public static long periodEnd(long now, long period) { QDate localCalendar = QDate.allocateLocalDate(); long endTime = periodEnd(now, period, localCalendar); QDate.freeLocalDate(localCalendar); return endTime; }
static long function(long now, long period) { QDate localCalendar = QDate.allocateLocalDate(); long endTime = periodEnd(now, period, localCalendar); QDate.freeLocalDate(localCalendar); return endTime; }
/** * Calculates the next period end. The calculation is in local time. * * @param now the current time in GMT ms since the epoch * * @return the time of the next period in GMT ms since the epoch */
Calculates the next period end. The calculation is in local time
periodEnd
{ "repo_name": "WelcomeHUME/svn-caucho-com-resin", "path": "modules/kernel/src/com/caucho/config/types/Period.java", "license": "gpl-2.0", "size": 6900 }
[ "com.caucho.util.QDate" ]
import com.caucho.util.QDate;
import com.caucho.util.*;
[ "com.caucho.util" ]
com.caucho.util;
240,243
public void readPacketData(DataInput par1DataInput) throws IOException { this.objectiveName = readString(par1DataInput, 16); this.objectiveDisplayName = readString(par1DataInput, 32); this.change = par1DataInput.readByte(); }
void function(DataInput par1DataInput) throws IOException { this.objectiveName = readString(par1DataInput, 16); this.objectiveDisplayName = readString(par1DataInput, 32); this.change = par1DataInput.readByte(); }
/** * Abstract. Reads the raw packet data from the data stream. */
Abstract. Reads the raw packet data from the data stream
readPacketData
{ "repo_name": "HATB0T/RuneCraftery", "path": "forge/mcp/src/minecraft/net/minecraft/network/packet/Packet206SetObjective.java", "license": "lgpl-3.0", "size": 1815 }
[ "java.io.DataInput", "java.io.IOException" ]
import java.io.DataInput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,046,639
@Test void closesTemplateInputStream() throws IOException { final String template = "hello, world!"; final StateAwareInputStream stream = new StateAwareInputStream( IOUtils.toInputStream(template, StandardCharsets.UTF_8) ); MatcherAssert.assertThat( IOUtil...
void closesTemplateInputStream() throws IOException { final String template = STR; final StateAwareInputStream stream = new StateAwareInputStream( IOUtils.toInputStream(template, StandardCharsets.UTF_8) ); MatcherAssert.assertThat( IOUtils.toString( new RsVelocity( stream, Collections.<CharSequence, Object>emptyMap() )...
/** * RsVelocity should close template's InputStream after serving response. * @throws IOException If some problem inside */
RsVelocity should close template's InputStream after serving response
closesTemplateInputStream
{ "repo_name": "simonjenga/takes", "path": "src/test/java/org/takes/rs/RsVelocityTest.java", "license": "mit", "size": 3644 }
[ "java.io.IOException", "java.nio.charset.StandardCharsets", "java.util.Collections", "org.apache.commons.io.IOUtils", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.takes.misc.StateAwareInputStream" ]
import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Collections; import org.apache.commons.io.IOUtils; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.takes.misc.StateAwareInputStream;
import java.io.*; import java.nio.charset.*; import java.util.*; import org.apache.commons.io.*; import org.hamcrest.*; import org.takes.misc.*;
[ "java.io", "java.nio", "java.util", "org.apache.commons", "org.hamcrest", "org.takes.misc" ]
java.io; java.nio; java.util; org.apache.commons; org.hamcrest; org.takes.misc;
1,565,015
@Generated @Selector("removeElement:") public native boolean removeElement(NSObject element);
@Selector(STR) native boolean function(NSObject element);
/** * Removes the given NSObject from this octree * Note that this is an exhaustive search and is can be slow for larger trees. * Cache the relevant GKOctreeNode and use removeElement:WithNode: for better performance. * * @param element the element to be removed * @return returns YES if th...
Removes the given NSObject from this octree Note that this is an exhaustive search and is can be slow for larger trees. Cache the relevant GKOctreeNode and use removeElement:WithNode: for better performance
removeElement
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/gameplaykit/GKOctree.java", "license": "apache-2.0", "size": 5890 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,511,847
private void preCheckout(Launcher launcher, BuildListener listener) throws IOException, InterruptedException{ if (project instanceof BuildableItemWithBuildWrappers) { BuildableItemWithBuildWrappers biwbw = (BuildableItemWithBuildWrappers) project; for (BuildWrapper bw : ...
void function(Launcher launcher, BuildListener listener) throws IOException, InterruptedException{ if (project instanceof BuildableItemWithBuildWrappers) { BuildableItemWithBuildWrappers biwbw = (BuildableItemWithBuildWrappers) project; for (BuildWrapper bw : biwbw.getBuildWrappersList()) bw.preCheckout(AbstractBuild.t...
/** * Run preCheckout on {@link BuildWrapper}s * * @param launcher * The launcher, never null. * @param listener * Never null, connected to the main build output. * @throws IOException * @throws InterruptedException */
Run preCheckout on <code>BuildWrapper</code>s
preCheckout
{ "repo_name": "sumitk1/jenkins", "path": "core/src/main/java/hudson/model/AbstractBuild.java", "license": "mit", "size": 45066 }
[ "hudson.tasks.BuildWrapper", "java.io.IOException" ]
import hudson.tasks.BuildWrapper; import java.io.IOException;
import hudson.tasks.*; import java.io.*;
[ "hudson.tasks", "java.io" ]
hudson.tasks; java.io;
2,039,645
void addPermanentRole(Role label);
void addPermanentRole(Role label);
/** * Add a role to this User's Role Set. * @param label The label of the Role you want to add. */
Add a role to this User's Role Set
addPermanentRole
{ "repo_name": "moio/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/user/User.java", "license": "gpl-2.0", "size": 14492 }
[ "com.redhat.rhn.domain.role.Role" ]
import com.redhat.rhn.domain.role.Role;
import com.redhat.rhn.domain.role.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
1,887,361
public static void setSeed(long s) { seed = s; random = new Random(seed); }
static void function(long s) { seed = s; random = new Random(seed); }
/** * Sets the seed of the psedurandom number generator. */
Sets the seed of the psedurandom number generator
setSeed
{ "repo_name": "KenyStev/Algoritmos", "path": "lib/stdlib/StdRandom.java", "license": "gpl-3.0", "size": 12066 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,096,983
public boolean complete() { Map<ClientTransport.PingCallback, Executor> callbacks; long roundTripTimeNanos; synchronized (this) { if (completed) { return false; } completed = true; roundTripTimeNanos = this.roundTripTimeNanos = stopwatch.elapsed(TimeUnit.NANOSECONDS); ...
boolean function() { Map<ClientTransport.PingCallback, Executor> callbacks; long roundTripTimeNanos; synchronized (this) { if (completed) { return false; } completed = true; roundTripTimeNanos = this.roundTripTimeNanos = stopwatch.elapsed(TimeUnit.NANOSECONDS); callbacks = this.callbacks; this.callbacks = null; } for (...
/** * Completes this operation successfully. The stopwatch given during construction is used to * measure the elapsed time. Registered callbacks are invoked and provided the measured elapsed * time. * * @return true if the operation is marked as complete; false if it was already complete */
Completes this operation successfully. The stopwatch given during construction is used to measure the elapsed time. Registered callbacks are invoked and provided the measured elapsed time
complete
{ "repo_name": "rmichela/grpc-java", "path": "core/src/main/java/io/grpc/internal/Http2Ping.java", "license": "apache-2.0", "size": 7019 }
[ "io.grpc.internal.ClientTransport", "java.util.Map", "java.util.concurrent.Executor", "java.util.concurrent.TimeUnit" ]
import io.grpc.internal.ClientTransport; import java.util.Map; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit;
import io.grpc.internal.*; import java.util.*; import java.util.concurrent.*;
[ "io.grpc.internal", "java.util" ]
io.grpc.internal; java.util;
728,483
public Locale getLocale() { return iLocale; }
Locale function() { return iLocale; }
/** * Gets the locale that will be used for printing and parsing. * * @return the locale to use */
Gets the locale that will be used for printing and parsing
getLocale
{ "repo_name": "charles-cooper/idylfin", "path": "src/org/joda/time/format/PeriodFormatter.java", "license": "apache-2.0", "size": 11342 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
679,387
public void reversePriority(MarkerField field) { if (descendingFields.remove(field)) { return; } descendingFields.add(field); }
void function(MarkerField field) { if (descendingFields.remove(field)) { return; } descendingFields.add(field); }
/** * Switch the priority of the field from ascending to descending or vice * versa. * * @param field */
Switch the priority of the field from ascending to descending or vice versa
reversePriority
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerComparator.java", "license": "epl-1.0", "size": 5697 }
[ "org.eclipse.ui.views.markers.MarkerField" ]
import org.eclipse.ui.views.markers.MarkerField;
import org.eclipse.ui.views.markers.*;
[ "org.eclipse.ui" ]
org.eclipse.ui;
2,205,170
synchronized void resetAccounting(long newLastTime) { long interval = newLastTime - lastTime.getAndSet(newLastTime); if (interval == 0) { // nothing to do return; } if (logger.isDebugEnabled() && interval > checkInterval() << 1) { logger.debug("Acc...
synchronized void resetAccounting(long newLastTime) { long interval = newLastTime - lastTime.getAndSet(newLastTime); if (interval == 0) { return; } if (logger.isDebugEnabled() && interval > checkInterval() << 1) { logger.debug(STR + interval + STR + checkInterval() + STR + name); } lastReadBytes = currentReadBytes.getA...
/** * Reset the accounting on Read and Write. * * @param newLastTime the milliseconds unix timestamp that we should be considered up-to-date for. */
Reset the accounting on Read and Write
resetAccounting
{ "repo_name": "tbrooks8/netty", "path": "handler/src/main/java/io/netty/handler/traffic/TrafficCounter.java", "license": "apache-2.0", "size": 20742 }
[ "java.util.concurrent.ScheduledExecutorService" ]
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
616,986
public void storeRMDelegationToken( RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) { handleStoreEvent(new RMStateStoreRMDTEvent(rmDTIdentifier, renewDate, RMStateStoreEventType.STORE_DELEGATION_TOKEN)); }
void function( RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) { handleStoreEvent(new RMStateStoreRMDTEvent(rmDTIdentifier, renewDate, RMStateStoreEventType.STORE_DELEGATION_TOKEN)); }
/** * RMDTSecretManager call this to store the state of a delegation token * and sequence number */
RMDTSecretManager call this to store the state of a delegation token and sequence number
storeRMDelegationToken
{ "repo_name": "lukmajercak/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStore.java", "license": "apache-2.0", "size": 51874 }
[ "org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier" ]
import org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier;
import org.apache.hadoop.yarn.security.client.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,328,271
QueueInfo getQueueInfo(boolean includeChildQueues, boolean recursive);
QueueInfo getQueueInfo(boolean includeChildQueues, boolean recursive);
/** * Get queue information * @param includeChildQueues include child queues? * @param recursive recursively get child queue information? * @return queue information */
Get queue information
getQueueInfo
{ "repo_name": "dilaver/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/Queue.java", "license": "apache-2.0", "size": 4103 }
[ "org.apache.hadoop.yarn.api.records.QueueInfo" ]
import org.apache.hadoop.yarn.api.records.QueueInfo;
import org.apache.hadoop.yarn.api.records.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,334,144
@Override public ReturnValue go(String[] args) throws Exception { // Create the Spring application context. ApplicationContext applicationContext = createApplicationContext(); // Parse the command line arguments and return a return value if we shouldn't continue processing (e.g. we ...
ReturnValue function(String[] args) throws Exception { ApplicationContext applicationContext = createApplicationContext(); ReturnValue returnValue = parseCommandLineArguments(args, applicationContext); if (returnValue != null) { return returnValue; } S3FileTransferRequestParamsDto params = S3FileTransferRequestParamsDt...
/** * Parses the command line arguments and calls the controller to process the upload. * * @param args the command line arguments passed to the program. * * @return the return value of the application. * @throws Exception if there are problems performing the upload. */
Parses the command line arguments and calls the controller to process the upload
go
{ "repo_name": "FINRAOS/herd", "path": "herd-code/herd-tools/herd-uploader/src/main/java/org/finra/herd/tools/uploader/UploaderApp.java", "license": "apache-2.0", "size": 10287 }
[ "org.finra.herd.model.dto.RegServerAccessParamsDto", "org.finra.herd.model.dto.S3FileTransferRequestParamsDto", "org.finra.herd.tools.common.ToolsArgumentHelper", "org.springframework.context.ApplicationContext" ]
import org.finra.herd.model.dto.RegServerAccessParamsDto; import org.finra.herd.model.dto.S3FileTransferRequestParamsDto; import org.finra.herd.tools.common.ToolsArgumentHelper; import org.springframework.context.ApplicationContext;
import org.finra.herd.model.dto.*; import org.finra.herd.tools.common.*; import org.springframework.context.*;
[ "org.finra.herd", "org.springframework.context" ]
org.finra.herd; org.springframework.context;
1,711,821
public static Image compressedByteArrayToImage(byte[] data) { try { // unzip data ByteArrayInputStream byteStream = new ByteArrayInputStream(data); GZIPInputStream zippedStream = new GZIPInputStream(byteStream); ObjectInputStream objectStream = new ObjectInputStream(zippedStream); ...
static Image function(byte[] data) { try { ByteArrayInputStream byteStream = new ByteArrayInputStream(data); GZIPInputStream zippedStream = new GZIPInputStream(byteStream); ObjectInputStream objectStream = new ObjectInputStream(zippedStream); int width = objectStream.readShort(); int height = objectStream.readShort(); ...
/** * Converts a byte array to an image that has previously been converted with imageToCompressedByteArray(Image image). * The image is not recognizable as image from standard tools. * * @param data The image. * @return The image. */
Converts a byte array to an image that has previously been converted with imageToCompressedByteArray(Image image). The image is not recognizable as image from standard tools
compressedByteArrayToImage
{ "repo_name": "peterzhu2118/Music-Player", "path": "src/StarRater.java", "license": "gpl-2.0", "size": 32372 }
[ "java.awt.Image", "java.awt.Toolkit", "java.awt.image.MemoryImageSource", "java.io.ByteArrayInputStream", "java.io.ObjectInputStream", "java.util.zip.GZIPInputStream" ]
import java.awt.Image; import java.awt.Toolkit; import java.awt.image.MemoryImageSource; import java.io.ByteArrayInputStream; import java.io.ObjectInputStream; import java.util.zip.GZIPInputStream;
import java.awt.*; import java.awt.image.*; import java.io.*; import java.util.zip.*;
[ "java.awt", "java.io", "java.util" ]
java.awt; java.io; java.util;
2,593,681
public void enable() throws IOException { // This has to be synchronized or it can collide with the check in the task. synchronized (optOutLock) { // Check if the server owner has already set opt-out, if not, set it. if (isOptOut()) { configuration.set("opt-ou...
void function() throws IOException { synchronized (optOutLock) { if (isOptOut()) { configuration.set(STR, false); configuration.save(configurationFile); } if (task == null) { start(); } } }
/** * Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task. * * @throws java.io.IOException */
Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task
enable
{ "repo_name": "zhouhaha/WebInterface", "path": "src/net/andylizi/webinterface/Metrics.java", "license": "lgpl-3.0", "size": 25684 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,595,207
@NotNull private Iterator<Group> getMembership(boolean includeInherited) throws RepositoryException { if (isEveryone()) { return Collections.<Group>emptySet().iterator(); } MembershipProvider mMgr = getMembershipProvider(); Iterator<String> oakPaths = mMgr.getMembers...
Iterator<Group> function(boolean includeInherited) throws RepositoryException { if (isEveryone()) { return Collections.<Group>emptySet().iterator(); } MembershipProvider mMgr = getMembershipProvider(); Iterator<String> oakPaths = mMgr.getMembership(getTree(), includeInherited); Authorizable everyoneGroup = userManager....
/** * Retrieve the group membership of this authorizable. * * @param includeInherited Flag indicating whether the resulting iterator only * contains groups this authorizable is declared member of or if inherited * group membership is respected. * * @return Iterator of groups this auth...
Retrieve the group membership of this authorizable
getMembership
{ "repo_name": "trekawek/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/AuthorizableImpl.java", "license": "apache-2.0", "size": 9658 }
[ "com.google.common.collect.ImmutableSet", "com.google.common.collect.Iterators", "java.util.Collections", "java.util.Iterator", "javax.jcr.RepositoryException", "org.apache.jackrabbit.api.security.user.Authorizable", "org.apache.jackrabbit.api.security.user.Group", "org.apache.jackrabbit.commons.itera...
import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterators; import java.util.Collections; import java.util.Iterator; import javax.jcr.RepositoryException; import org.apache.jackrabbit.api.security.user.Authorizable; import org.apache.jackrabbit.api.security.user.Group; import org.apache.j...
import com.google.common.collect.*; import java.util.*; import javax.jcr.*; import org.apache.jackrabbit.api.security.user.*; import org.apache.jackrabbit.commons.iterator.*; import org.apache.jackrabbit.oak.spi.security.principal.*; import org.apache.jackrabbit.oak.spi.security.user.*;
[ "com.google.common", "java.util", "javax.jcr", "org.apache.jackrabbit" ]
com.google.common; java.util; javax.jcr; org.apache.jackrabbit;
2,877,698
assertThatClassIsImmutable(DefaultFloatingIp.class); }
assertThatClassIsImmutable(DefaultFloatingIp.class); }
/** * Checks that the DefaultFloatingIp class is immutable. */
Checks that the DefaultFloatingIp class is immutable
testImmutability
{ "repo_name": "kuujo/onos", "path": "apps/vtn/vtnrsc/src/test/java/org/onosproject/vtnrsc/floatingip/DefaultFloatingIpTest.java", "license": "apache-2.0", "size": 5514 }
[ "org.onosproject.vtnrsc.DefaultFloatingIp" ]
import org.onosproject.vtnrsc.DefaultFloatingIp;
import org.onosproject.vtnrsc.*;
[ "org.onosproject.vtnrsc" ]
org.onosproject.vtnrsc;
750,220
private static void check(SecureRandom orig, SecureRandom copy, boolean equal, String mech) { int o = orig.nextInt(); int c = copy.nextInt(); System.out.printf("%nRandom number generated for mechanism: '%s' " + "from original instance as: '%s' and from serialized ...
static void function(SecureRandom orig, SecureRandom copy, boolean equal, String mech) { int o = orig.nextInt(); int c = copy.nextInt(); System.out.printf(STR + STR + STR, mech, o, c); if (equal) { Asserts.assertEquals(o, c, mech); } else { Asserts.assertNotEquals(o, c, mech); } }
/** * Verify the similarity of random numbers generated though both original * as well as deserialized instance. */
Verify the similarity of random numbers generated though both original as well as deserialized instance
check
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "test/java/security/SecureRandom/SerializedSeedTest.java", "license": "gpl-2.0", "size": 9038 }
[ "java.security.SecureRandom" ]
import java.security.SecureRandom;
import java.security.*;
[ "java.security" ]
java.security;
2,794,611
public static InputFile create(java.io.File basedir, java.io.File file) { String relativePath = getRelativePath(basedir, file); if (relativePath != null) { return create(basedir, relativePath); } return null; }
static InputFile function(java.io.File basedir, java.io.File file) { String relativePath = getRelativePath(basedir, file); if (relativePath != null) { return create(basedir, relativePath); } return null; }
/** * For internal and for testing purposes. Please use the FileSystem component to access files. */
For internal and for testing purposes. Please use the FileSystem component to access files
create
{ "repo_name": "joansmith/sonarqube", "path": "sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFileUtils.java", "license": "lgpl-3.0", "size": 5037 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,635,867
public static java.util.List extractPatientICPList(ims.domain.ILightweightDomainFactory domainFactory, ims.icp.vo.PatientICP_DisplayVoCollection voCollection) { return extractPatientICPList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.icp.vo.PatientICP_DisplayVoCollection voCollection) { return extractPatientICPList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.icps.instantiation.domain.objects.PatientICP list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.icps.instantiation.domain.objects.PatientICP list from the value object collection
extractPatientICPList
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/icp/vo/domain/PatientICP_DisplayVoAssembler.java", "license": "agpl-3.0", "size": 16332 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,072,513
CatalogueDBAdapter db = new CatalogueDBAdapter(context); db.open(); try { // Load the goodreads reviews boolean ok = processReviews(qMgr, db); // If it's a sync job, then start the 'send' part and save last syn date if (mIsSync) { GoodreadsManager.setLastSyncDate(mStartDate); QueueMa...
CatalogueDBAdapter db = new CatalogueDBAdapter(context); db.open(); try { boolean ok = processReviews(qMgr, db); if (mIsSync) { GoodreadsManager.setLastSyncDate(mStartDate); QueueManager.getQueueManager().enqueueTask(new SendAllBooksTask(true), BcQueueManager.QUEUE_MAIN, 0); } return ok; } finally { if (db != null) db....
/** * Do the actual work. */
Do the actual work
run
{ "repo_name": "Grunthos/Book-Catalogue", "path": "src/com/eleybourn/bookcatalogue/goodreads/ImportAllTask.java", "license": "gpl-3.0", "size": 21403 }
[ "com.eleybourn.bookcatalogue.BcQueueManager", "com.eleybourn.bookcatalogue.CatalogueDBAdapter", "net.philipwarner.taskqueue.QueueManager" ]
import com.eleybourn.bookcatalogue.BcQueueManager; import com.eleybourn.bookcatalogue.CatalogueDBAdapter; import net.philipwarner.taskqueue.QueueManager;
import com.eleybourn.bookcatalogue.*; import net.philipwarner.taskqueue.*;
[ "com.eleybourn.bookcatalogue", "net.philipwarner.taskqueue" ]
com.eleybourn.bookcatalogue; net.philipwarner.taskqueue;
621,039
FLyrVect createLayer(IProjection projection) throws Exception;
FLyrVect createLayer(IProjection projection) throws Exception;
/** * Creates a new layer using the information from the panels returned in * {@link #getPanels(WizardAndami)} and the given projection to create a new * layer. * * @param projection * the projection of the new layer * @return the new layer or <code>null</code> if the laye...
Creates a new layer using the information from the panels returned in <code>#getPanels(WizardAndami)</code> and the given projection to create a new layer
createLayer
{ "repo_name": "iCarto/siga", "path": "extCAD/src/com/iver/cit/gvsig/gui/cad/createLayer/NewLayerWizard.java", "license": "gpl-3.0", "size": 1208 }
[ "com.iver.cit.gvsig.fmap.layers.FLyrVect", "org.cresques.cts.IProjection" ]
import com.iver.cit.gvsig.fmap.layers.FLyrVect; import org.cresques.cts.IProjection;
import com.iver.cit.gvsig.fmap.layers.*; import org.cresques.cts.*;
[ "com.iver.cit", "org.cresques.cts" ]
com.iver.cit; org.cresques.cts;
2,338,075
public void testCreateRedundantBucket() { final String[] regionPath = new String[] { getUniqueName() + "-PR-0" }; final int numBuckets = 1; final int redundantCopies = 1; final int localMaxMemory = 100; // create the PartitionedRegion on the first two members createR...
void function() { final String[] regionPath = new String[] { getUniqueName() + "-PR-0" }; final int numBuckets = 1; final int redundantCopies = 1; final int localMaxMemory = 100; createRegion(Host.getHost(0).getVM(0), regionPath[0], localMaxMemory, numBuckets, redundantCopies); createRegion(Host.getHost(0).getVM(1), re...
/** * Creates a bucket on two members. Then brings up a third member and creates * an extra redundant copy of the bucket on it. */
Creates a bucket on two members. Then brings up a third member and creates an extra redundant copy of the bucket on it
testCreateRedundantBucket
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java", "license": "apache-2.0", "size": 73093 }
[ "com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember" ]
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
1,648,620
public void saveDConfigBean(OutputStream outputArchive, DConfigBeanRoot bean) throws ConfigurationException;
void function(OutputStream outputArchive, DConfigBeanRoot bean) throws ConfigurationException;
/** * Save to disk all the configuration beans associated with a particular deployment * descriptor file. The saved data may be fully or partially configured DConfigBeans. * The output file format is recommended to be XML. * * @param outputArchive The output stream to which the DConfigBeans sho...
Save to disk all the configuration beans associated with a particular deployment descriptor file. The saved data may be fully or partially configured DConfigBeans. The output file format is recommended to be XML
saveDConfigBean
{ "repo_name": "salyh/javamailspec", "path": "geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/DeploymentConfiguration.java", "license": "apache-2.0", "size": 4960 }
[ "java.io.OutputStream", "javax.enterprise.deploy.spi.exceptions.ConfigurationException" ]
import java.io.OutputStream; import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
import java.io.*; import javax.enterprise.deploy.spi.exceptions.*;
[ "java.io", "javax.enterprise" ]
java.io; javax.enterprise;
342,323
public ReportGenerator.Format getReportFormat() { return reportFormat; }
ReportGenerator.Format function() { return reportFormat; }
/** * Get the value of reportFormat. * * @return the value of reportFormat */
Get the value of reportFormat
getReportFormat
{ "repo_name": "jeremylong/DependencyCheck", "path": "core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java", "license": "apache-2.0", "size": 33221 }
[ "org.owasp.dependencycheck.reporting.ReportGenerator" ]
import org.owasp.dependencycheck.reporting.ReportGenerator;
import org.owasp.dependencycheck.reporting.*;
[ "org.owasp.dependencycheck" ]
org.owasp.dependencycheck;
2,791,002
public static void main(String[] args) { DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder() .credential(tokenCredential) .buildClient(); PagedIterable<...
static void function(String[] args) { DefaultAzureCredential tokenCredential = new DefaultAzureCredentialBuilder().build(); MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder() .credential(tokenCredential) .buildClient(); PagedIterable<MetricNamespace> metricNamespaces = metricsQueryClient.listMetric...
/** * The main method to execute the sample. * @param args Ignored args. */
The main method to execute the sample
main
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/monitor/azure-monitor-query/src/samples/java/com/azure/monitor/query/MetricNamespacesSample.java", "license": "mit", "size": 1252 }
[ "com.azure.core.http.rest.PagedIterable", "com.azure.identity.DefaultAzureCredential", "com.azure.identity.DefaultAzureCredentialBuilder", "com.azure.monitor.query.models.MetricNamespace", "java.time.OffsetDateTime" ]
import com.azure.core.http.rest.PagedIterable; import com.azure.identity.DefaultAzureCredential; import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.monitor.query.models.MetricNamespace; import java.time.OffsetDateTime;
import com.azure.core.http.rest.*; import com.azure.identity.*; import com.azure.monitor.query.models.*; import java.time.*;
[ "com.azure.core", "com.azure.identity", "com.azure.monitor", "java.time" ]
com.azure.core; com.azure.identity; com.azure.monitor; java.time;
651,368
void applyAuthorizationConfigPolicy(HiveConf hiveConf) throws HiveAuthzPluginException;
void applyAuthorizationConfigPolicy(HiveConf hiveConf) throws HiveAuthzPluginException;
/** * Modify the given HiveConf object to configure authorization related parameters * or other parameters related to hive security * @param hiveConf * @throws HiveAuthzPluginException */
Modify the given HiveConf object to configure authorization related parameters or other parameters related to hive security
applyAuthorizationConfigPolicy
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveAuthorizer.java", "license": "apache-2.0", "size": 10171 }
[ "org.apache.hadoop.hive.conf.HiveConf" ]
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,010,465
public static void initSAXFactory(String factoryClassName, boolean namespaceAware, boolean validating) { if (factoryClassName != null) { try { saxFactory = (SAXParserFactory)Class.forName(factoryClass...
static void function(String factoryClassName, boolean namespaceAware, boolean validating) { if (factoryClassName != null) { try { saxFactory = (SAXParserFactory)Class.forName(factoryClassName). newInstance(); if (System.getProperty(saxParserFactoryProperty) == null) { System.setProperty(saxParserFactoryProperty, factor...
/** Initialize the SAX parser factory. * * @param factoryClassName The (optional) class name of the desired * SAXParserFactory implementation. Will be * assigned to the system property * <b>javax.xml.parsers.SAXParserFactor...
Initialize the SAX parser factory
initSAXFactory
{ "repo_name": "hugosato/apache-axis", "path": "src/org/apache/axis/utils/XMLUtils.java", "license": "apache-2.0", "size": 34551 }
[ "javax.xml.parsers.SAXParserFactory" ]
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.*;
[ "javax.xml" ]
javax.xml;
1,319,081
public static QDataSet square( QDataSet t ) { QDataSet modt= lt( modp( t, DataSetUtil.asDataSet(TAU) ), PI ); return link( t, modt ); }
static QDataSet function( QDataSet t ) { QDataSet modt= lt( modp( t, DataSetUtil.asDataSet(TAU) ), PI ); return link( t, modt ); }
/** * generates a square from the tags, where a the signal is 1 from 0-PI, 0 from PI-2*PI, etc. * @param t the independent values. * @return square wave with a period of 2 PI. */
generates a square from the tags, where a the signal is 1 from 0-PI, 0 from PI-2*PI, etc
square
{ "repo_name": "autoplot/app", "path": "QDataSet/src/org/das2/qds/ops/Ops.java", "license": "gpl-2.0", "size": 492716 }
[ "org.das2.qds.DataSetUtil", "org.das2.qds.QDataSet" ]
import org.das2.qds.DataSetUtil; import org.das2.qds.QDataSet;
import org.das2.qds.*;
[ "org.das2.qds" ]
org.das2.qds;
524,966
public final <T> T registerService(final Class<T> serviceClass, final T service, final Map<String, Object> properties) { Dictionary<String, Object> serviceProperties = null; if (properties != null) { serviceProperties = new Hashtable<String, Object>(properties); } bundleC...
final <T> T function(final Class<T> serviceClass, final T service, final Map<String, Object> properties) { Dictionary<String, Object> serviceProperties = null; if (properties != null) { serviceProperties = new Hashtable<String, Object>(properties); } bundleContext().registerService(serviceClass != null ? serviceClass.g...
/** * Registers a service in the mocked OSGi environment. * @param <T> Service type * @param serviceClass Service class * @param service Service instance * @param properties Service properties (optional) * @return Registered service instance */
Registers a service in the mocked OSGi environment
registerService
{ "repo_name": "dulvac/sling", "path": "testing/mocks/osgi-mock/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java", "license": "apache-2.0", "size": 6910 }
[ "java.util.Dictionary", "java.util.Hashtable", "java.util.Map" ]
import java.util.Dictionary; import java.util.Hashtable; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
460,592
DatabaseUserInfo[] getDatabaseUsers(String environmentName) throws RSSManagerException;
DatabaseUserInfo[] getDatabaseUsers(String environmentName) throws RSSManagerException;
/** * Get all database users in a environment * * @param environmentName the name of the environment * @return DatabaseUserInfo array * @throws RSSManagerException if error occurred when getting database users */
Get all database users in a environment
getDatabaseUsers
{ "repo_name": "wso2/carbon-storage-management", "path": "components/rss-manager/org.wso2.carbon.rssmanager.core/src/main/java/org/wso2/carbon/rssmanager/core/service/RSSManagerService.java", "license": "apache-2.0", "size": 17847 }
[ "org.wso2.carbon.rssmanager.core.dto.DatabaseUserInfo", "org.wso2.carbon.rssmanager.core.exception.RSSManagerException" ]
import org.wso2.carbon.rssmanager.core.dto.DatabaseUserInfo; import org.wso2.carbon.rssmanager.core.exception.RSSManagerException;
import org.wso2.carbon.rssmanager.core.dto.*; import org.wso2.carbon.rssmanager.core.exception.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
936,889
@SuppressWarnings("unchecked") protected void setup() throws IOException, ClassNotFoundException { File timeStampsDesign = new File(diskDir_, TIMESTAMPS_FILE_PREFIX + getClass().getSimpleName() + "_" + getDb().getReplicaID()); if (timeStampsDesign.exists()) { //deserialize timeStamp of design file map In...
@SuppressWarnings(STR) void function() throws IOException, ClassNotFoundException { File timeStampsDesign = new File(diskDir_, TIMESTAMPS_FILE_PREFIX + getClass().getSimpleName() + "_" + getDb().getReplicaID()); if (timeStampsDesign.exists()) { InputStream fis = new FileInputStream(timeStampsDesign); InputStream bisr =...
/** * Sets up the designSync and builds the map with all OnDisk-files + timestamps * * @throws IOException * @throws ClassNotFoundException */
Sets up the designSync and builds the map with all OnDisk-files + timestamps
setup
{ "repo_name": "rPraml/org.openntf.domino", "path": "domino/design-impl/src/main/java/org/openntf/domino/design/sync/SyncTask.java", "license": "apache-2.0", "size": 13593 }
[ "java.io.BufferedInputStream", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "java.io.ObjectInput", "java.io.ObjectInputStream", "java.util.HashMap", "java.util.Map" ]
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.util.HashMap; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,922,566
@Test public void testIOExceptionsDuringHandshakeWrite() throws Exception { server = createEchoServer(SecurityProtocol.SSL); testIOExceptionsDuringHandshake(FailureAction.NO_OP, FailureAction.THROW_IO_EXCEPTION); }
void function() throws Exception { server = createEchoServer(SecurityProtocol.SSL); testIOExceptionsDuringHandshake(FailureAction.NO_OP, FailureAction.THROW_IO_EXCEPTION); }
/** * Tests that IOExceptions from write during SSL handshake are not treated as authentication failures. */
Tests that IOExceptions from write during SSL handshake are not treated as authentication failures
testIOExceptionsDuringHandshakeWrite
{ "repo_name": "mihbor/kafka", "path": "clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java", "license": "apache-2.0", "size": 56396 }
[ "org.apache.kafka.common.security.auth.SecurityProtocol" ]
import org.apache.kafka.common.security.auth.SecurityProtocol;
import org.apache.kafka.common.security.auth.*;
[ "org.apache.kafka" ]
org.apache.kafka;
1,319,166
public final void setFileState(FileState state) { m_state = state; }
final void function(FileState state) { m_state = state; }
/** * Set the associated file state for the request * * @param state FileState */
Set the associated file state for the request
setFileState
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/server/filesys/loader/DeleteFileRequest.java", "license": "lgpl-3.0", "size": 3650 }
[ "org.alfresco.jlan.server.filesys.cache.FileState" ]
import org.alfresco.jlan.server.filesys.cache.FileState;
import org.alfresco.jlan.server.filesys.cache.*;
[ "org.alfresco.jlan" ]
org.alfresco.jlan;
1,564,134
public T caseArchimateElement(IArchimateElement object) { return null; }
T function(IArchimateElement object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Element</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @...
Returns the result of interpreting the object as an instance of 'Element'. This implementation returns null; returning a non-null result will terminate the switch.
caseArchimateElement
{ "repo_name": "archimatetool/archi", "path": "com.archimatetool.model/src/com/archimatetool/model/util/ArchimateSwitch.java", "license": "mit", "size": 256079 }
[ "com.archimatetool.model.IArchimateElement" ]
import com.archimatetool.model.IArchimateElement;
import com.archimatetool.model.*;
[ "com.archimatetool.model" ]
com.archimatetool.model;
2,036,821
public ItemStack hook_getPickBlock(MovingObjectPosition trace, World world, int blockX, int blockY, int blockZ, EntityPlayer player) {return null;}
public ItemStack hook_getPickBlock(MovingObjectPosition trace, World world, int blockX, int blockY, int blockZ, EntityPlayer player) {return null;}
/** Call this from addCollisionBoxesToList for cover-supporting blocks. * Returns true if the tile entity implements IPartContainer. */
Call this from addCollisionBoxesToList for cover-supporting blocks. Returns true if the tile entity implements IPartContainer
hook_addCollisionBoxesToList
{ "repo_name": "kremnev8/AdvancedSpaceStaion-mod", "path": "src/main/java/mods/immibis/core/api/multipart/IMultipartSystem.java", "license": "mit", "size": 3719 }
[ "net.minecraft.entity.player.EntityPlayer", "net.minecraft.item.ItemStack", "net.minecraft.util.MovingObjectPosition", "net.minecraft.world.World" ]
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World;
import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.item", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world;
1,873,097
protected void writeParameter( final String name ) throws IOException, ReportWriterException { if ( "dataSource".equals( name ) == false ) { super.writeParameter( name ); return; } final DataSource ds = (DataSource) getObjectDescription().getParameter( name ); final ObjectDescription dsDe...
void function( final String name ) throws IOException, ReportWriterException { if ( STR.equals( name ) == false ) { super.writeParameter( name ); return; } final DataSource ds = (DataSource) getObjectDescription().getParameter( name ); final ObjectDescription dsDesc = getParameterDescription( name ); final String dsnam...
/** * Writes a parameter. * * @param name * the name. * @throws IOException * if there is an I/O problem. * @throws ReportWriterException * if the report definition could not be written. */
Writes a parameter
writeParameter
{ "repo_name": "mbatchelor/pentaho-reporting", "path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/modules/parser/extwriter/DataSourceWriter.java", "license": "lgpl-2.1", "size": 3916 }
[ "java.io.IOException", "org.pentaho.reporting.engine.classic.core.filter.DataSource", "org.pentaho.reporting.engine.classic.core.modules.parser.ext.ExtParserModule", "org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription", "org.pentaho.reporting.libraries.xmlns.writer.X...
import java.io.IOException; import org.pentaho.reporting.engine.classic.core.filter.DataSource; import org.pentaho.reporting.engine.classic.core.modules.parser.ext.ExtParserModule; import org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription; import org.pentaho.reporting.libraries....
import java.io.*; import org.pentaho.reporting.engine.classic.core.filter.*; import org.pentaho.reporting.engine.classic.core.modules.parser.ext.*; import org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.*; import org.pentaho.reporting.libraries.xmlns.writer.*;
[ "java.io", "org.pentaho.reporting" ]
java.io; org.pentaho.reporting;
2,764,812
protected ClientConnectionOperator createConnectionOperator(final SchemeRegistry schreg) { return new DefaultClientConnectionOperator(schreg, this.dnsResolver); }
ClientConnectionOperator function(final SchemeRegistry schreg) { return new DefaultClientConnectionOperator(schreg, this.dnsResolver); }
/** * Hook for creating the connection operator. * It is called by the constructor. * Derived classes can override this method to change the * instantiation of the operator. * The default implementation here instantiates * {@link DefaultClientConnectionOperator DefaultClientConnectionOpera...
Hook for creating the connection operator. It is called by the constructor. Derived classes can override this method to change the instantiation of the operator. The default implementation here instantiates <code>DefaultClientConnectionOperator DefaultClientConnectionOperator</code>
createConnectionOperator
{ "repo_name": "max3163/jmeter", "path": "src/protocol/http/org/apache/jmeter/protocol/http/sampler/hc/JMeterPoolingClientConnectionManager.java", "license": "apache-2.0", "size": 14293 }
[ "org.apache.http.conn.ClientConnectionOperator", "org.apache.http.conn.scheme.SchemeRegistry", "org.apache.http.impl.conn.DefaultClientConnectionOperator" ]
import org.apache.http.conn.ClientConnectionOperator; import org.apache.http.conn.scheme.SchemeRegistry; import org.apache.http.impl.conn.DefaultClientConnectionOperator;
import org.apache.http.conn.*; import org.apache.http.conn.scheme.*; import org.apache.http.impl.conn.*;
[ "org.apache.http" ]
org.apache.http;
2,025,077
public static void startPublicRoomsSearch(final String server, final String pattern, final ApiCallback<List<PublicRoom>> callback) { Log.d(LOG_TAG, "## startPublicRoomsSearch() " + " : server " + server + " pattern " + pattern); // on android, a request cannot be cancelled // so define a ke...
static void function(final String server, final String pattern, final ApiCallback<List<PublicRoom>> callback) { Log.d(LOG_TAG, STR + STR + server + STR + pattern); mRequestKey = STR + System.currentTimeMillis(); mRequestServer = server; mSearchedPattern = pattern; mForwardPaginationToken = null; launchPublicRoomsReques...
/** * Start a new public rooms search * @param server set the server in which searches, null if any * @param pattern the pattern to search * @param callback the asynchronous callback */
Start a new public rooms search
startPublicRoomsSearch
{ "repo_name": "noepitome/neon-android", "path": "neon/src/main/java/im/neon/PublicRoomsManager.java", "license": "apache-2.0", "size": 10908 }
[ "java.util.List", "org.matrix.androidsdk.rest.callback.ApiCallback", "org.matrix.androidsdk.rest.model.PublicRoom", "org.matrix.androidsdk.util.Log" ]
import java.util.List; import org.matrix.androidsdk.rest.callback.ApiCallback; import org.matrix.androidsdk.rest.model.PublicRoom; import org.matrix.androidsdk.util.Log;
import java.util.*; import org.matrix.androidsdk.rest.callback.*; import org.matrix.androidsdk.rest.model.*; import org.matrix.androidsdk.util.*;
[ "java.util", "org.matrix.androidsdk" ]
java.util; org.matrix.androidsdk;
675,834
@Override public Iterator<Tuple> iterator();
Iterator<Tuple> function();
/** * Iterate through the entire store * * @return an iterator */
Iterate through the entire store
iterator
{ "repo_name": "linkedin/Cubert", "path": "src/main/java/com/linkedin/cubert/utils/TupleStore.java", "license": "apache-2.0", "size": 2659 }
[ "java.util.Iterator", "org.apache.pig.data.Tuple" ]
import java.util.Iterator; import org.apache.pig.data.Tuple;
import java.util.*; import org.apache.pig.data.*;
[ "java.util", "org.apache.pig" ]
java.util; org.apache.pig;
839,697
public int purgeExpired(GridCacheContext cctx, IgniteInClosure2X<GridCacheEntryEx, GridCacheVersion> c, int amount) throws IgniteCheckedException { CacheDataStore delegate0 = init0(true); if (delegate0 == null || pendingTree == null) return 0; ...
int function(GridCacheContext cctx, IgniteInClosure2X<GridCacheEntryEx, GridCacheVersion> c, int amount) throws IgniteCheckedException { CacheDataStore delegate0 = init0(true); if (delegate0 == null pendingTree == null) return 0; GridDhtLocalPartition part = cctx.topology().localPartition(partId, AffinityTopologyVersio...
/** * Removes expired entries from data store. * * @param cctx Cache context. * @param c Expiry closure that should be applied to expired entry. See {@link GridCacheTtlManager} for details. * @param amount Limit of processed entries by single call, {@code -1} for no limit. ...
Removes expired entries from data store
purgeExpired
{ "repo_name": "voipp/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java", "license": "apache-2.0", "size": 66464 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion", "org.apache.ignite.internal.processors.cache.GridCacheContext", "org.apache.ignite.internal.processors.cache.GridCacheEntryEx", "org.apache.ignite.internal.processors.cache.distributed.dht.G...
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheEntryEx; import org.apache.ignite.internal.processors.cache.dis...
import org.apache.ignite.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.dht.*; import org.apache.ignite.internal.processors.cache.tree.*; import org.apache.ignite.internal.processors.cache.v...
[ "org.apache.ignite" ]
org.apache.ignite;
1,037,611
@Override public Optional<Connection> getConnection(Class connectionKey) { synchronized (connectionMap) { return Optional.ofNullable(connectionMap.get(connectionKey)); } }
Optional<Connection> function(Class connectionKey) { synchronized (connectionMap) { return Optional.ofNullable(connectionMap.get(connectionKey)); } }
/** * Returns an respective Connection for a given ConnectionKey. * <p> * Since this Connection might not (yet) exist, it is wrapped in an Optional. * * @param connectionKey the Key for the Connection * @return the Optional.of(connection for connectionKey) */
Returns an respective Connection for a given ConnectionKey. Since this Connection might not (yet) exist, it is wrapped in an Optional
getConnection
{ "repo_name": "ThorbenKuck/NetCom2", "path": "core/src/main/java/com/github/thorbenkuck/netcom2/network/shared/clients/NativeClient.java", "license": "mit", "size": 17264 }
[ "com.github.thorbenkuck.netcom2.network.shared.connections.Connection", "java.util.Optional" ]
import com.github.thorbenkuck.netcom2.network.shared.connections.Connection; import java.util.Optional;
import com.github.thorbenkuck.netcom2.network.shared.connections.*; import java.util.*;
[ "com.github.thorbenkuck", "java.util" ]
com.github.thorbenkuck; java.util;
316,865
Block block = GenericBlockParse.parse(bytes); return parse(block); } @ExternalValue public static final String TYPE_META = "type";
Block block = GenericBlockParse.parse(bytes); return parse(block); } public static final String TYPE_META = "type";
/** * Parse any block. * * @param bytes * the block data. * @return a {@link Block}. */
Parse any block
parse
{ "repo_name": "sarah-happy/happy-archive", "path": "archive/src/main/java/org/yi/happy/archive/block/parser/BlockParse.java", "license": "apache-2.0", "size": 1871 }
[ "org.yi.happy.archive.block.Block" ]
import org.yi.happy.archive.block.Block;
import org.yi.happy.archive.block.*;
[ "org.yi.happy" ]
org.yi.happy;
994,600
protected PooledRPCClient borrowRpcClient(long now, PooledRPCClient rpcClient) throws RPCRequestException { //we have a rpc client, lets set it up //flag to see if we need to nullify boolean setToNull = false; try { rpcClient.lock(); if (rpcClient.isReleased()) { return null; ...
PooledRPCClient function(long now, PooledRPCClient rpcClient) throws RPCRequestException { boolean setToNull = false; try { rpcClient.lock(); if (rpcClient.isReleased()) { return null; } if (!rpcClient.isDiscarded() && !rpcClient.isInitialized()) { rpcClient.connect(); } if ((!rpcClient.isDiscarded()) && rpcClient.vali...
/** * Validates and configures a previously idle rpc client * * @param now - timestamp * @param rpcClient - the rpc client to validate and configure * @return ch * @throws RPCRequestException if a validation error happens */
Validates and configures a previously idle rpc client
borrowRpcClient
{ "repo_name": "richardfearn/diirt", "path": "pvmanager/pvmanager-pva/src/main/java/org/diirt/service/pva/rpcservice/rpcclient/RPCClientPool.java", "license": "mit", "size": 29718 }
[ "java.util.logging.Level", "org.epics.pvaccess.server.rpc.RPCRequestException", "org.epics.pvdata.pv.Status" ]
import java.util.logging.Level; import org.epics.pvaccess.server.rpc.RPCRequestException; import org.epics.pvdata.pv.Status;
import java.util.logging.*; import org.epics.pvaccess.server.rpc.*; import org.epics.pvdata.pv.*;
[ "java.util", "org.epics.pvaccess", "org.epics.pvdata" ]
java.util; org.epics.pvaccess; org.epics.pvdata;
118,126
protected void updateButtonDrawables() { defaultPlayDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_play_arrow_white, R.color.exomedia_default_controls_button_selector); defaultPauseDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_pause_white, R.color....
void function() { defaultPlayDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_play_arrow_white, R.color.exomedia_default_controls_button_selector); defaultPauseDrawable = EMResourceUtil.tintList(getContext(), R.drawable.exomedia_ic_pause_white, R.color.exomedia_default_controls_button_selector); ...
/** * Updates the drawables used for the buttons to AppCompatTintDrawables */
Updates the drawables used for the buttons to AppCompatTintDrawables
updateButtonDrawables
{ "repo_name": "ayaseruri/luxunPro", "path": "exoplayer/src/main/java/com/devbrackets/android/exomedia/ui/widget/VideoControls.java", "license": "apache-2.0", "size": 25171 }
[ "com.devbrackets.android.exomedia.util.EMResourceUtil" ]
import com.devbrackets.android.exomedia.util.EMResourceUtil;
import com.devbrackets.android.exomedia.util.*;
[ "com.devbrackets.android" ]
com.devbrackets.android;
1,835,273
static final void addPassFactoryBefore( List<PassFactory> factoryList, PassFactory factory, String passName) { factoryList.add( findPassIndexByName(factoryList, passName), factory); }
static final void addPassFactoryBefore( List<PassFactory> factoryList, PassFactory factory, String passName) { factoryList.add( findPassIndexByName(factoryList, passName), factory); }
/** * Insert the given pass factory before the factory of the given name. */
Insert the given pass factory before the factory of the given name
addPassFactoryBefore
{ "repo_name": "mbrukman/closure-compiler", "path": "src/com/google/javascript/jscomp/PassConfig.java", "license": "apache-2.0", "size": 9093 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
219,936
public void testInsertManyRowsAfterOneRowKey() throws SQLException { // Do a one-row insert into a table with an auto-generated key. Statement s = createStatement(); s.execute("insert into t11_AutoGen(c11) values (99)"); int expected=1; String sql="insert into t...
void function() throws SQLException { Statement s = createStatement(); s.execute(STR); int expected=1; String sql=STR; s.execute(sql, Statement.RETURN_GENERATED_KEYS); int keyval = getKeyValue (s.getGeneratedKeys()); assertEquals(STR, expected, keyval); s.executeUpdate(sql, Statement.RETURN_GENERATED_KEYS); keyval = ge...
/** * Requests generated keys for a multi-row insert statement after a * one-row insert into a table with an auto-generated key. * Old harness Test 7. * Expected result: ResultSet has one row with a non-NULL key for the * one-row insert. * @throws SQLException */
Requests generated keys for a multi-row insert statement after a one-row insert into a table with an auto-generated key. Old harness Test 7. Expected result: ResultSet has one row with a non-NULL key for the one-row insert
testInsertManyRowsAfterOneRowKey
{ "repo_name": "scnakandala/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoGenJDBC30Test.java", "license": "apache-2.0", "size": 52987 }
[ "java.sql.PreparedStatement", "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
584,013
public Map<String, Object> getParametersMap() { return parametersMap; }
Map<String, Object> function() { return parametersMap; }
/** * Restituisce la mappa dei parametri associata all'utente. * * @return mappa dei parametri associata all'utente. */
Restituisce la mappa dei parametri associata all'utente
getParametersMap
{ "repo_name": "MakeITBologna/zefiro", "path": "zefiro/src/main/java/it/makeit/profiler/dao/UsersBaseBean.java", "license": "agpl-3.0", "size": 18664 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,032,893