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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@ApiModelProperty(example = "null", required = true, value = "Yesterday's total number of kills against enemy factions")
public Integer getYesterday() {
return yesterday;
} | @ApiModelProperty(example = "null", required = true, value = STR) Integer function() { return yesterday; } | /**
* Yesterday's total number of kills against enemy factions
*
* @return yesterday
**/ | Yesterday's total number of kills against enemy factions | getYesterday | {
"repo_name": "GoldenGnu/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/FactionWarfareStatsKills.java",
"license": "apache-2.0",
"size": 4013
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 631,585 |
public void consumeAsync(List<Purchase> purchases, OnConsumeMultiFinishedListener listener) {
checkNotDisposed();
checkSetupDone("consume");
consumeAsyncInternal(purchases, null, listener);
} | void function(List<Purchase> purchases, OnConsumeMultiFinishedListener listener) { checkNotDisposed(); checkSetupDone(STR); consumeAsyncInternal(purchases, null, listener); } | /**
* Same as {@link consumeAsync}, but for multiple items at once.
* @param purchases The list of PurchaseInfo objects representing the purchases to consume.
* @param listener The listener to notify when the consumption operation finishes.
*/ | Same as <code>consumeAsync</code>, but for multiple items at once | consumeAsync | {
"repo_name": "dunkfordyce/cordova-ios-storekit",
"path": "src/android/com/kuya/cordova/plugin/util/IabHelper.java",
"license": "mit",
"size": 44352
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,024,773 |
protected Service getServiceFrom(final Map<String, Object> model) {
return (Service) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_SERVICE);
} | Service function(final Map<String, Object> model) { return (Service) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_SERVICE); } | /**
* Gets validated service from the model.
*
* @param model the model
* @return the validated service from
*/ | Gets validated service from the model | getServiceFrom | {
"repo_name": "philliprower/cas",
"path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java",
"license": "apache-2.0",
"size": 10513
} | [
"java.util.Map",
"org.apereo.cas.CasViewConstants",
"org.apereo.cas.authentication.principal.Service"
] | import java.util.Map; import org.apereo.cas.CasViewConstants; import org.apereo.cas.authentication.principal.Service; | import java.util.*; import org.apereo.cas.*; import org.apereo.cas.authentication.principal.*; | [
"java.util",
"org.apereo.cas"
] | java.util; org.apereo.cas; | 219,615 |
public boolean getRotateYUp() {
if ( rotateYUp == null ) {
rotateYUp = (SFBool)getField( "rotateYUp" );
}
return( rotateYUp.getValue( ) );
} | boolean function() { if ( rotateYUp == null ) { rotateYUp = (SFBool)getField( STR ); } return( rotateYUp.getValue( ) ); } | /** Return the rotateYUp boolean value.
* @return The rotateYUp boolean value. */ | Return the rotateYUp boolean value | getRotateYUp | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/external/node/geospatial/SAIGeoOrigin.java",
"license": "gpl-2.0",
"size": 3459
} | [
"org.web3d.x3d.sai.SFBool"
] | import org.web3d.x3d.sai.SFBool; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 2,467,984 |
public float readFloat() throws IOException {
return Float.intBitsToFloat(readInt());
} | float function() throws IOException { return Float.intBitsToFloat(readInt()); } | /**
* Reads a little-endian IEEE754 32-bit float.
*
* @throws IOException if past end of input or error in underlying stream
*/ | Reads a little-endian IEEE754 32-bit float | readFloat | {
"repo_name": "google/s2-geometry-library-java",
"path": "src/com/google/common/geometry/LittleEndianInput.java",
"license": "apache-2.0",
"size": 3654
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,798,044 |
public void updateTemplate(String field, String value) {
HttpSession session = WebContextFactory.get().getSession();
boolean isNewTemplate = (session.getAttribute(Constants.NEW_TEMPLATE) != null)
? true : false;
TemplateQuery templateQuery = (TemplateQuery) Se... | void function(String field, String value) { HttpSession session = WebContextFactory.get().getSession(); boolean isNewTemplate = (session.getAttribute(Constants.NEW_TEMPLATE) != null) ? true : false; TemplateQuery templateQuery = (TemplateQuery) SessionMethods.getQuery(session); if (!isNewTemplate && session.getAttribut... | /**
* Update with the value given in input the field of the previous template
* saved into the session
* @param field the field to update
* @param value the value
*/ | Update with the value given in input the field of the previous template saved into the session | updateTemplate | {
"repo_name": "joshkh/intermine",
"path": "intermine/web/main/src/org/intermine/dwr/AjaxServices.java",
"license": "lgpl-2.1",
"size": 62567
} | [
"javax.servlet.http.HttpSession",
"org.apache.commons.beanutils.PropertyUtils",
"org.directwebremoting.WebContextFactory",
"org.intermine.template.TemplateQuery",
"org.intermine.web.logic.Constants",
"org.intermine.web.logic.session.SessionMethods"
] | import javax.servlet.http.HttpSession; import org.apache.commons.beanutils.PropertyUtils; import org.directwebremoting.WebContextFactory; import org.intermine.template.TemplateQuery; import org.intermine.web.logic.Constants; import org.intermine.web.logic.session.SessionMethods; | import javax.servlet.http.*; import org.apache.commons.beanutils.*; import org.directwebremoting.*; import org.intermine.template.*; import org.intermine.web.logic.*; import org.intermine.web.logic.session.*; | [
"javax.servlet",
"org.apache.commons",
"org.directwebremoting",
"org.intermine.template",
"org.intermine.web"
] | javax.servlet; org.apache.commons; org.directwebremoting; org.intermine.template; org.intermine.web; | 1,519,842 |
public void doScriptText(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
_doScript(req, rsp, "_scriptText.jelly");
} | void function(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { _doScript(req, rsp, STR); } | /**
* Run arbitrary Groovy script and return result as plain text.
*/ | Run arbitrary Groovy script and return result as plain text | doScriptText | {
"repo_name": "rsandell/jenkins",
"path": "core/src/main/java/hudson/model/Computer.java",
"license": "mit",
"size": 67103
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"org.kohsuke.stapler.StaplerRequest",
"org.kohsuke.stapler.StaplerResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; | import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*; | [
"java.io",
"javax.servlet",
"org.kohsuke.stapler"
] | java.io; javax.servlet; org.kohsuke.stapler; | 1,298,343 |
public PageResourceNotificationUserTypeResource getUserNotificationInfoList(String userId, Integer size, Integer page, String order) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing ... | PageResourceNotificationUserTypeResource function(String userId, Integer size, Integer page, String order) throws ApiException { Object localVarPostBody = null; if (userId == null) { throw new ApiException(400, STR); } String localVarPath = STR .replaceAll("\\{" + STR + "\\}", apiClient.escapeString(userId.toString()))... | /**
* View a user's notification settings
* <b>Permissions Needed:</b> NOTIFICATIONS_ADMIN or self
* @param userId The id of the subscriber or 'me' (required)
* @param size The number of objects returned per page (optional, default to 25)
* @param page The number of the page retur... | View a user's notification settings <b>Permissions Needed:</b> NOTIFICATIONS_ADMIN or self | getUserNotificationInfoList | {
"repo_name": "knetikmedia/knetikcloud-java-client",
"path": "src/main/java/com/knetikcloud/api/NotificationsApi.java",
"license": "apache-2.0",
"size": 23667
} | [
"com.knetikcloud.client.ApiException",
"com.knetikcloud.client.Pair",
"com.knetikcloud.model.PageResourceNotificationUserTypeResource",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.knetikcloud.client.ApiException; import com.knetikcloud.client.Pair; import com.knetikcloud.model.PageResourceNotificationUserTypeResource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.knetikcloud.client.*; import com.knetikcloud.model.*; import java.util.*; | [
"com.knetikcloud.client",
"com.knetikcloud.model",
"java.util"
] | com.knetikcloud.client; com.knetikcloud.model; java.util; | 2,332,564 |
public Number getVersion() {
return (Number) getAttributeInternal(VERSION);
} | Number function() { return (Number) getAttributeInternal(VERSION); } | /**
* Gets the attribute value for VERSION using the alias name Version
*/ | Gets the attribute value for VERSION using the alias name Version | getVersion | {
"repo_name": "CBIIT/cadsr-util",
"path": "cadsrutil/src/java/gov/nih/nci/ncicb/cadsr/common/persistence/bc4j/FormValidValuesViewRowImpl.java",
"license": "bsd-3-clause",
"size": 10480
} | [
"oracle.jbo.domain.Number"
] | import oracle.jbo.domain.Number; | import oracle.jbo.domain.*; | [
"oracle.jbo.domain"
] | oracle.jbo.domain; | 2,060,673 |
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException | UnsupportedLookAndFeelException e1) {
//honestly, if this doesnt work, whatever we'll use default.... | static void function(String[] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException InstantiationException IllegalAccessException UnsupportedLookAndFeelException e1) { } try { TilesetLoadDialog dialog = new TilesetLoadDialog(); TilesetManager manager = new Ti... | /**
* Launch the application.
*/ | Launch the application | main | {
"repo_name": "clearlyspam23/JAnGLE",
"path": "src/main/java/com/clearlyspam23/GLE/basic/layers/tile/gui/TilesetLoadDialog.java",
"license": "mit",
"size": 3991
} | [
"com.clearlyspam23.GLE",
"java.awt.BorderLayout",
"java.awt.FlowLayout",
"javax.swing.JButton",
"javax.swing.JDialog",
"javax.swing.JPanel",
"javax.swing.UIManager",
"javax.swing.UnsupportedLookAndFeelException"
] | import com.clearlyspam23.GLE; import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; | import com.clearlyspam23.*; import java.awt.*; import javax.swing.*; | [
"com.clearlyspam23",
"java.awt",
"javax.swing"
] | com.clearlyspam23; java.awt; javax.swing; | 675,027 |
public void setZoom(TouchImageView img) {
PointF center = img.getScrollPosition();
setZoom(img.getCurrentZoom(), center.x, center.y, img.getScaleType());
} | void function(TouchImageView img) { PointF center = img.getScrollPosition(); setZoom(img.getCurrentZoom(), center.x, center.y, img.getScaleType()); } | /**
* Set zoom parameters equal to another TouchImageView. Including scale, position,
* and ScaleType.
*
* @param img the img
*/ | Set zoom parameters equal to another TouchImageView. Including scale, position, and ScaleType | setZoom | {
"repo_name": "lanhuaguizha/Christian",
"path": "app/src/main/kotlin/ren/qinc/markdowneditors/lib/TouchImageView.java",
"license": "gpl-3.0",
"size": 42833
} | [
"android.graphics.PointF"
] | import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,765,696 |
public CacheService getCacheService() {
return cacheService;
} | CacheService function() { return cacheService; } | /**
* Returns the cache layer
*
* @return cacheService
*/ | Returns the cache layer | getCacheService | {
"repo_name": "afilias-technologies/deviceatlas-cloud-java",
"path": "deviceatlas-cloud-java-client/src/main/java/com/deviceatlas/cloud/deviceidentification/client/Client.java",
"license": "mit",
"size": 27594
} | [
"com.deviceatlas.cloud.deviceidentification.service.CacheService"
] | import com.deviceatlas.cloud.deviceidentification.service.CacheService; | import com.deviceatlas.cloud.deviceidentification.service.*; | [
"com.deviceatlas.cloud"
] | com.deviceatlas.cloud; | 2,308,147 |
IFile getFile(String path, IFile.Flags flags) throws IOException; | IFile getFile(String path, IFile.Flags flags) throws IOException; | /**
* Retrieve an IFile with the specified flags.
*
* @param flags IFile.READONLY, IFile.READWRITE, IFile.READVOLATILE, IFile.NOCACHE
*
* @since 1.0
*/ | Retrieve an IFile with the specified flags | getFile | {
"repo_name": "joval/jSAF",
"path": "src/jsaf/intf/io/IFilesystem.java",
"license": "lgpl-2.1",
"size": 9487
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,257,061 |
@Test public void testProject() {
final String sql = "select \"product_name\", 0 as zero\n"
+ "from \"foodmart\"\n"
+ "order by \"product_name\"";
final String explain = "PLAN=EnumerableInterpreter\n"
+ " BindableSort(sort0=[$0], dir0=[ASC])\n"
+ " DruidQuery(table=[[foodma... | @Test void function() { final String sql = STRproduct_name\STR + STRfoodmart\"\n" + STRproduct_name\STRPLAN=EnumerableInterpreter\nSTR BindableSort(sort0=[$0], dir0=[ASC])\nSTR DruidQuery(table=[[foodmart, foodmart]], STRintervals=[[1900-01-09T00:00:00.000Z/2992-01-10T00:00:00.000Z]], projects=[[$3, 0]])STRproduct_name... | /** Tests that projections of columns are pushed into the DruidQuery, and
* projections of expressions that Druid cannot handle (in this case, a
* literal 0) stay up. */ | Tests that projections of columns are pushed into the DruidQuery, and projections of expressions that Druid cannot handle (in this case, a | testProject | {
"repo_name": "dindin5258/calcite",
"path": "druid/src/test/java/org/apache/calcite/test/DruidAdapterIT.java",
"license": "apache-2.0",
"size": 236571
} | [
"org.apache.calcite.adapter.druid.DruidQuery",
"org.junit.Test"
] | import org.apache.calcite.adapter.druid.DruidQuery; import org.junit.Test; | import org.apache.calcite.adapter.druid.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 2,774,276 |
public void addMessageType(Message mes) {
if (!hexPar.addConvertMessageListener(this, mes)) {
// Id is already Used by another AmType
String str = JOptionPane.showInputDialog(null, "You can choose a differen AMType id for this Template : "
+ mes.getClass().getName() + "\n enter new ID: ", "AMTYPE al... | void function(Message mes) { if (!hexPar.addConvertMessageListener(this, mes)) { String str = JOptionPane.showInputDialog(null, STR + mes.getClass().getName() + STR, STR, 1); while (!hexPar.AMTypeFree(Integer.parseInt(str))) { str = JOptionPane.showInputDialog(null, STR + mes.getClass().getName() + STR, STR, 1); } hexP... | /**
* adds a message Template to the hexParser, if the AmType Id is already
* used, we ask for a new One
*/ | adds a message Template to the hexParser, if the AmType Id is already used, we ask for a new One | addMessageType | {
"repo_name": "wsntools/iris",
"path": "iris/src/main/java/com/wsntools/iris/packageDecode/parser/PackageDecoder.java",
"license": "mpl-2.0",
"size": 6390
} | [
"javax.swing.JOptionPane",
"net.tinyos.message.Message"
] | import javax.swing.JOptionPane; import net.tinyos.message.Message; | import javax.swing.*; import net.tinyos.message.*; | [
"javax.swing",
"net.tinyos.message"
] | javax.swing; net.tinyos.message; | 729,401 |
public static void pullInClinicalStatement(
Object source,
Object target,
String subjectPersonId,
String focalPersonId,
FactLists factLists
) throws ImproperUsageException, DataFormatException, InvalidDataException {
String _METHODNAME = "pullI... | static void function( Object source, Object target, String subjectPersonId, String focalPersonId, FactLists factLists ) throws ImproperUsageException, DataFormatException, InvalidDataException { String _METHODNAME = STR; if (source == null) { String errStr = _METHODNAME + STR; logger.error(errStr); throw new ImproperUs... | /**
* Populate internal vMR object from corresponding external vMR object;
*
* @param source external vMR object (an extension of the schema ClinicalStatement class)
* @param target internal vMR object to be populated (a descendent of ClinicalStatement)
* @param subjectPersonId
* @param focalPersonId
* @... | Populate internal vMR object from corresponding external vMR object | pullInClinicalStatement | {
"repo_name": "TonyWang-UMU/TFG-TWang",
"path": "opencds-parent/opencds-vmr-1_0/opencds-vmr-1_0-mappings/src/main/java/org/opencds/vmr/v1_0/mappings/mappers/OneObjectMapper.java",
"license": "apache-2.0",
"size": 69426
} | [
"org.opencds.common.exceptions.DataFormatException",
"org.opencds.common.exceptions.ImproperUsageException",
"org.opencds.common.exceptions.InvalidDataException",
"org.opencds.vmr.v1_0.internal.AdverseEvent",
"org.opencds.vmr.v1_0.internal.AppointmentProposal",
"org.opencds.vmr.v1_0.internal.AppointmentRe... | import org.opencds.common.exceptions.DataFormatException; import org.opencds.common.exceptions.ImproperUsageException; import org.opencds.common.exceptions.InvalidDataException; import org.opencds.vmr.v1_0.internal.AdverseEvent; import org.opencds.vmr.v1_0.internal.AppointmentProposal; import org.opencds.vmr.v1_0.inter... | import org.opencds.common.exceptions.*; import org.opencds.vmr.v1_0.internal.*; import org.opencds.vmr.v1_0.mappings.in.*; | [
"org.opencds.common",
"org.opencds.vmr"
] | org.opencds.common; org.opencds.vmr; | 1,883,559 |
public ConcurrentHashMap<String,ArrayList> getMemoryGroups() {
return(memoryGroups);
} | ConcurrentHashMap<String,ArrayList> function() { return(memoryGroups); } | /**
* Returns the full HashMap which for every memory group Name it is associated a list of codeletGroups
*
* @return the HashMap with all pairs (groupname,list of codeletGroups belonging to groupname)
*/ | Returns the full HashMap which for every memory group Name it is associated a list of codeletGroups | getMemoryGroups | {
"repo_name": "rgudwin/cst",
"path": "src/main/java/br/unicamp/cst/core/entities/Mind.java",
"license": "lgpl-3.0",
"size": 8252
} | [
"java.util.ArrayList",
"java.util.concurrent.ConcurrentHashMap"
] | import java.util.ArrayList; import java.util.concurrent.ConcurrentHashMap; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,278,232 |
public boolean pause() {
resetSyncParams();
if (stopTimestampUs == C.TIME_UNSET) {
// The audio track is going to be paused, so reset the timestamp poller to ensure it doesn't
// supply an advancing position.
Assertions.checkNotNull(audioTimestampPoller).reset();
return true;
}
... | boolean function() { resetSyncParams(); if (stopTimestampUs == C.TIME_UNSET) { Assertions.checkNotNull(audioTimestampPoller).reset(); return true; } return false; } | /**
* Pauses the audio track position tracker, returning whether the audio track needs to be paused
* to cause playback to pause. If {@code false} is returned the audio track will pause without
* further interaction, as the end of stream has been handled.
*/ | Pauses the audio track position tracker, returning whether the audio track needs to be paused to cause playback to pause. If false is returned the audio track will pause without further interaction, as the end of stream has been handled | pause | {
"repo_name": "tkpb/Telegram",
"path": "TMessagesProj/src/main/java/com/google/android/exoplayer2/audio/AudioTrackPositionTracker.java",
"license": "gpl-2.0",
"size": 24065
} | [
"com.google.android.exoplayer2.util.Assertions"
] | import com.google.android.exoplayer2.util.Assertions; | import com.google.android.exoplayer2.util.*; | [
"com.google.android"
] | com.google.android; | 750,172 |
private void blockAndCheckIfStopped(ZooKeeperNodeTracker tracker)
throws IOException, InterruptedException {
while (tracker.blockUntilAvailable(this.msgInterval, false) == null) {
if (this.stopped) {
throw new IOException("Received the shutdown message while waiting.");
}
}
} | void function(ZooKeeperNodeTracker tracker) throws IOException, InterruptedException { while (tracker.blockUntilAvailable(this.msgInterval, false) == null) { if (this.stopped) { throw new IOException(STR); } } } | /**
* Utilty method to wait indefinitely on a znode availability while checking
* if the region server is shut down
* @param tracker znode tracker to use
* @throws IOException any IO exception, plus if the RS is stopped
* @throws InterruptedException
*/ | Utilty method to wait indefinitely on a znode availability while checking if the region server is shut down | blockAndCheckIfStopped | {
"repo_name": "matteobertozzi/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java",
"license": "apache-2.0",
"size": 151789
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker"
] | import java.io.IOException; import org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker; | import java.io.*; import org.apache.hadoop.hbase.zookeeper.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,571,666 |
public void setConstraint(Constraint<?, T> constraint) {
iConstraint = constraint;
} | void function(Constraint<?, T> constraint) { iConstraint = constraint; } | /** Sets constraint
* @param constraint a constraint
**/ | Sets constraint | setConstraint | {
"repo_name": "UniTime/cpsolver",
"path": "src/org/cpsolver/ifs/extension/AssignedValueSet.java",
"license": "lgpl-3.0",
"size": 8347
} | [
"org.cpsolver.ifs.model.Constraint"
] | import org.cpsolver.ifs.model.Constraint; | import org.cpsolver.ifs.model.*; | [
"org.cpsolver.ifs"
] | org.cpsolver.ifs; | 1,475,091 |
void insertRow(int row)
{
// Adjust any merged cells
SheetRangeImpl sr = null;
Iterator i = ranges.iterator();
while (i.hasNext())
{
sr = (SheetRangeImpl) i.next();
sr.insertRow(row);
}
} | void insertRow(int row) { SheetRangeImpl sr = null; Iterator i = ranges.iterator(); while (i.hasNext()) { sr = (SheetRangeImpl) i.next(); sr.insertRow(row); } } | /**
* Used to adjust the merged cells following a row insertion
*/ | Used to adjust the merged cells following a row insertion | insertRow | {
"repo_name": "miraculix0815/jexcelapi",
"path": "src/jxl/write/biff/MergedCells.java",
"license": "lgpl-3.0",
"size": 7807
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,779,942 |
@ApiModelProperty(example = "/subscriptions?limit=1&offset=0&apiId=01234567-0123-0123-0123-012345678901&groupId=", value = "Link to the previous subset of resources qualified. Empty if current subset is the first subset returned. ")
public String getPrevious() {
return previous;
... | @ApiModelProperty(example = STR, value = STR) String function() { return previous; } | /**
* Link to the previous subset of resources qualified. Empty if current subset is the first subset returned.
* @return previous
**/ | Link to the previous subset of resources qualified. Empty if current subset is the first subset returned | getPrevious | {
"repo_name": "abimarank/product-apim",
"path": "integration-tests/src/main/java/org/wso2/carbon/apimgt/rest/integration/tests/model/SubscriptionList.java",
"license": "apache-2.0",
"size": 4883
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,426,622 |
@Source("com/google/appinventor/images/lists.png")
ImageResource lists(); | @Source(STR) ImageResource lists(); | /**
* Built in drawer item: lists
*/ | Built in drawer item: lists | lists | {
"repo_name": "jisqyv/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/Images.java",
"license": "apache-2.0",
"size": 19490
} | [
"com.google.gwt.resources.client.ImageResource"
] | import com.google.gwt.resources.client.ImageResource; | import com.google.gwt.resources.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,697,645 |
public static HRegion openHRegion(final HRegionInfo info,
final TableDescriptor htd, final WAL wal, final Configuration conf,
final RegionServerServices rsServices,
final CancelableProgressable reporter)
throws IOException {
return openHRegion(FSUtils.getRootDir(conf), info, htd, wal, conf, rsServic... | static HRegion function(final HRegionInfo info, final TableDescriptor htd, final WAL wal, final Configuration conf, final RegionServerServices rsServices, final CancelableProgressable reporter) throws IOException { return openHRegion(FSUtils.getRootDir(conf), info, htd, wal, conf, rsServices, reporter); } | /**
* Open a Region.
* @param info Info for region to be opened
* @param htd the table descriptor
* @param wal WAL for region to use. This method will call
* WAL#setSequenceNumber(long) passing the result of the call to
* HRegion#getMinSequenceId() to ensure the wal id is properly kept
* up. HRegi... | Open a Region | openHRegion | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 328407
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.client.TableDescriptor",
"org.apache.hadoop.hbase.util.CancelableProgressable",
"org.apache.hadoop.hbase.util.FSUtils"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.client.TableDescriptor; import org.apache.hadoop.hbase.util.CancelableProgressable; import org.apache.hadoop.hbase.util.FSUtils; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,503,274 |
public static LocalStreamEnvironment createLocalEnvironment(int parallelism, Configuration configuration) {
LocalStreamEnvironment currentEnvironment = new LocalStreamEnvironment(configuration);
currentEnvironment.setParallelism(parallelism);
return currentEnvironment;
} | static LocalStreamEnvironment function(int parallelism, Configuration configuration) { LocalStreamEnvironment currentEnvironment = new LocalStreamEnvironment(configuration); currentEnvironment.setParallelism(parallelism); return currentEnvironment; } | /**
* Creates a {@link LocalStreamEnvironment}. The local execution environment
* will run the program in a multi-threaded fashion in the same JVM as the
* environment was created in. It will use the parallelism specified in the
* parameter.
*
* @param parallelism
* The parallelism for the local environ... | Creates a <code>LocalStreamEnvironment</code>. The local execution environment will run the program in a multi-threaded fashion in the same JVM as the environment was created in. It will use the parallelism specified in the parameter | createLocalEnvironment | {
"repo_name": "zimmermatt/flink",
"path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java",
"license": "apache-2.0",
"size": 79024
} | [
"org.apache.flink.configuration.Configuration"
] | import org.apache.flink.configuration.Configuration; | import org.apache.flink.configuration.*; | [
"org.apache.flink"
] | org.apache.flink; | 528,522 |
void setTerminalSize(int columns, int rows) throws IOException; | void setTerminalSize(int columns, int rows) throws IOException; | /**
* Attempts to resize the terminal through dtterm extensions "CSI 8 ; rows ; columns ; t". This isn't widely
* supported, which is why the method is not exposed through the common Terminal interface.
* @param columns New size (columns)
* @param rows New size (rows)
* @throws java.io.IOExcept... | Attempts to resize the terminal through dtterm extensions "CSI 8 ; rows ; columns ; t". This isn't widely supported, which is why the method is not exposed through the common Terminal interface | setTerminalSize | {
"repo_name": "mabe02/lanterna",
"path": "src/main/java/com/googlecode/lanterna/terminal/ExtendedTerminal.java",
"license": "lgpl-3.0",
"size": 4447
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,713,933 |
public Section getSectionForPosition(int position) {
int currentPos = 0;
for (Map.Entry<String, Section> entry : sections.entrySet()) {
Section section = entry.getValue();
// ignore invisible sections
if (!section.isVisible()) continue;
int section... | Section function(int position) { int currentPos = 0; for (Map.Entry<String, Section> entry : sections.entrySet()) { Section section = entry.getValue(); if (!section.isVisible()) continue; int sectionTotal = section.getSectionItemsTotal(); if (position >= currentPos && position <= (currentPos + sectionTotal - 1)) { retu... | /**
* Returns the Section object for a position in the adapter
* @param position position in the adapter
* @return Section object for that position
*/ | Returns the Section object for a position in the adapter | getSectionForPosition | {
"repo_name": "apowell656/SectionedRecyclerViewAdapter",
"path": "library/src/main/java/io/github/luizgrp/sectionedrecyclerviewadapter/SectionedRecyclerViewAdapter.java",
"license": "mit",
"size": 12251
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 919,095 |
public void applyUpdatesOnRecovery(
@Nullable WALIterator it,
IgniteBiPredicate<WALPointer, WALRecord> recPredicate,
IgnitePredicate<DataEntry> entryPredicate
) throws IgniteCheckedException {
if (it == null)
return;
cctx.walState().runWithOutWAL(() -> {
... | void function( @Nullable WALIterator it, IgniteBiPredicate<WALPointer, WALRecord> recPredicate, IgnitePredicate<DataEntry> entryPredicate ) throws IgniteCheckedException { if (it == null) return; cctx.walState().runWithOutWAL(() -> { while (it.hasNext()) { IgniteBiTuple<WALPointer, WALRecord> next = it.next(); WALRecor... | /**
* Apply update from some iterator and with specific filters.
*
* @param it WalIterator.
* @param recPredicate Wal record filter.
* @param entryPredicate Entry filter.
*/ | Apply update from some iterator and with specific filters | applyUpdatesOnRecovery | {
"repo_name": "ilantukh/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java",
"license": "apache-2.0",
"size": 208144
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.IgniteException",
"org.apache.ignite.internal.pagemem.wal.WALIterator",
"org.apache.ignite.internal.pagemem.wal.WALPointer",
"org.apache.ignite.internal.pagemem.wal.record.DataEntry",
"org.apache.ignite.internal.pagemem.wal.record.DataRecord",... | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.internal.pagemem.wal.WALIterator; import org.apache.ignite.internal.pagemem.wal.WALPointer; import org.apache.ignite.internal.pagemem.wal.record.DataEntry; import org.apache.ignite.internal.pagemem.wal.re... | import org.apache.ignite.*; import org.apache.ignite.internal.pagemem.wal.*; import org.apache.ignite.internal.pagemem.wal.record.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 1,961,129 |
Promise<Void> start(String id, StartActionDto action); | Promise<Void> start(String id, StartActionDto action); | /**
* Starts debug session when connection is established. Some debug server might not required this
* step.
*
* @param id debug session id
* @param action the start action parameters
*/ | Starts debug session when connection is established. Some debug server might not required this step | start | {
"repo_name": "sudaraka94/che",
"path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClient.java",
"license": "epl-1.0",
"size": 4500
} | [
"org.eclipse.che.api.debug.shared.dto.action.StartActionDto",
"org.eclipse.che.api.promises.client.Promise"
] | import org.eclipse.che.api.debug.shared.dto.action.StartActionDto; import org.eclipse.che.api.promises.client.Promise; | import org.eclipse.che.api.debug.shared.dto.action.*; import org.eclipse.che.api.promises.client.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,907,173 |
void setWarningLevel(CompilerOptions options,
String name, CheckLevel level) {
DiagnosticGroup group = forName(name);
Preconditions.checkNotNull(group, "No warning class for name: %s", name);
options.setWarningLevel(group, level);
} | void setWarningLevel(CompilerOptions options, String name, CheckLevel level) { DiagnosticGroup group = forName(name); Preconditions.checkNotNull(group, STR, name); options.setWarningLevel(group, level); } | /**
* Adds warning levels by name.
*/ | Adds warning levels by name | setWarningLevel | {
"repo_name": "thurday/closure-compiler",
"path": "src/com/google/javascript/jscomp/DiagnosticGroups.java",
"license": "apache-2.0",
"size": 21507
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 241,400 |
public InputStream retrieve() throws IOException, SQLException,
AuthorizeException
{
// Maybe should return AuthorizeException??
AuthorizeManager.authorizeAction(bContext, this, Constants.READ);
return BitstreamStorageManager.retrieve(bContext, bRow
.getIntCo... | InputStream function() throws IOException, SQLException, AuthorizeException { AuthorizeManager.authorizeAction(bContext, this, Constants.READ); return BitstreamStorageManager.retrieve(bContext, bRow .getIntColumn(STR)); } | /**
* Retrieve the contents of the bitstream
*
* @return a stream from which the bitstream can be read.
* @throws IOException
* @throws SQLException
* @throws AuthorizeException
*/ | Retrieve the contents of the bitstream | retrieve | {
"repo_name": "jamie-dryad/dryad-repo",
"path": "dspace-api/src/main/java/org/dspace/content/Bitstream.java",
"license": "bsd-3-clause",
"size": 21323
} | [
"java.io.IOException",
"java.io.InputStream",
"java.sql.SQLException",
"org.dspace.authorize.AuthorizeException",
"org.dspace.authorize.AuthorizeManager",
"org.dspace.core.Constants",
"org.dspace.storage.bitstore.BitstreamStorageManager"
] | import java.io.IOException; import java.io.InputStream; import java.sql.SQLException; import org.dspace.authorize.AuthorizeException; import org.dspace.authorize.AuthorizeManager; import org.dspace.core.Constants; import org.dspace.storage.bitstore.BitstreamStorageManager; | import java.io.*; import java.sql.*; import org.dspace.authorize.*; import org.dspace.core.*; import org.dspace.storage.bitstore.*; | [
"java.io",
"java.sql",
"org.dspace.authorize",
"org.dspace.core",
"org.dspace.storage"
] | java.io; java.sql; org.dspace.authorize; org.dspace.core; org.dspace.storage; | 1,010,705 |
@Test
public void getUrlEncodedWithPercent() throws Exception {
String unencoded = "/%";
final AtomicReference<String> path = new AtomicReference<String>();
handler = new RequestHandler() { | void function() throws Exception { String unencoded = "/%"; final AtomicReference<String> path = new AtomicReference<String>(); handler = new RequestHandler() { | /**
* Make a GET request with a URL that needs encoding
*
* @throws Exception
*/ | Make a GET request with a URL that needs encoding | getUrlEncodedWithPercent | {
"repo_name": "jiripetrlik/droolsjbpm-integration",
"path": "kie-remote/kie-remote-common/src/test/java/org/kie/remote/common/rest/KieRemoteHttpRequestTest.java",
"license": "apache-2.0",
"size": 77298
} | [
"java.util.concurrent.atomic.AtomicReference"
] | import java.util.concurrent.atomic.AtomicReference; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 1,765,875 |
public List<DescriptorMathTree> getMeasures() {
return Collections.unmodifiableList(measures);
} | List<DescriptorMathTree> function() { return Collections.unmodifiableList(measures); } | /**
* Gets a list of the defined measures.
*
* @return a list of the defined measures
*/ | Gets a list of the defined measures | getMeasures | {
"repo_name": "pmeisen/dis-timeintervaldataanalyzer",
"path": "src/net/meisen/dissertation/impl/parser/query/select/SelectQuery.java",
"license": "bsd-3-clause",
"size": 11838
} | [
"java.util.Collections",
"java.util.List",
"net.meisen.dissertation.impl.parser.query.select.measures.DescriptorMathTree"
] | import java.util.Collections; import java.util.List; import net.meisen.dissertation.impl.parser.query.select.measures.DescriptorMathTree; | import java.util.*; import net.meisen.dissertation.impl.parser.query.select.measures.*; | [
"java.util",
"net.meisen.dissertation"
] | java.util; net.meisen.dissertation; | 1,047,934 |
public void saveStick(File target) throws IOException {
ZipOutputStream zos = null;
try {
zos = new ZipOutputStream(new FileOutputStream(target));
LinkedList<String> stack = new LinkedList<String>();
zip(zos, path, stack);
} finally {
if(zos !=... | void function(File target) throws IOException { ZipOutputStream zos = null; try { zos = new ZipOutputStream(new FileOutputStream(target)); LinkedList<String> stack = new LinkedList<String>(); zip(zos, path, stack); } finally { if(zos != null){ try { zos.closeEntry(); zos.close(); } catch (IOException e) {} } } } | /**
* saves the whole stick to zip file
* @param target the zip file to write to
* @throws IOException
*/ | saves the whole stick to zip file | saveStick | {
"repo_name": "Martin-Dames/Tingeltangel",
"path": "core/src/main/java/tingeltangel/core/BookiiStick.java",
"license": "gpl-2.0",
"size": 24165
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.util.LinkedList",
"java.util.zip.ZipOutputStream"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.LinkedList; import java.util.zip.ZipOutputStream; | import java.io.*; import java.util.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,485,076 |
public void deletePreviousConsent(Interview interview, String consentName); | void function(Interview interview, String consentName); | /**
* Marks the previous {@link Consent} of a specific interview (if exist) as deleted.
* @param interview Interview for which the consent will be retrieve.
*/ | Marks the previous <code>Consent</code> of a specific interview (if exist) as deleted | deletePreviousConsent | {
"repo_name": "obiba/onyx",
"path": "onyx-modules/onyx-marble/onyx-marble-core/src/main/java/org/obiba/onyx/marble/core/service/ConsentService.java",
"license": "gpl-3.0",
"size": 1982
} | [
"org.obiba.onyx.core.domain.participant.Interview"
] | import org.obiba.onyx.core.domain.participant.Interview; | import org.obiba.onyx.core.domain.participant.*; | [
"org.obiba.onyx"
] | org.obiba.onyx; | 330,175 |
@Override public void exitQuery(@NotNull LuceneSqlParser.QueryContext ctx) { } | @Override public void exitQuery(@NotNull LuceneSqlParser.QueryContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterQuery | {
"repo_name": "bbejeck/nosql-jdbc-driver",
"path": "src/main/java/bbejeck/nosql/antlr/generated/LuceneSqlBaseListener.java",
"license": "apache-2.0",
"size": 18266
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,893,667 |
public static Iterator<String[]> parseCsvDelimitedReader(final Reader reader)
throws IOException {
return parseDelimitedReader(reader, ',', DEFAULT_QUOTE);
} | static Iterator<String[]> function(final Reader reader) throws IOException { return parseDelimitedReader(reader, ',', DEFAULT_QUOTE); } | /**
* Return an Iterator over a comma/tab delimited file. Iterator.next() splits the current line
* and returns a String[] of the bits, stripped of all quotes.
* Lines beginning with # are ignored.
* @param reader the Reader to read from
* @return an Iterator over the lines of the Reader
... | Return an Iterator over a comma/tab delimited file. Iterator.next() splits the current line and returns a String[] of the bits, stripped of all quotes. Lines beginning with # are ignored | parseCsvDelimitedReader | {
"repo_name": "joshkh/intermine",
"path": "intermine/objectstore/main/src/org/intermine/util/FormattedTextParser.java",
"license": "lgpl-2.1",
"size": 4958
} | [
"java.io.IOException",
"java.io.Reader",
"java.util.Iterator"
] | import java.io.IOException; import java.io.Reader; import java.util.Iterator; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,819,511 |
@ServiceMethod(returns = ReturnType.SINGLE)
DeploymentExtendedInner createOrUpdateAtTenantScope(String deploymentName, ScopedDeployment parameters); | @ServiceMethod(returns = ReturnType.SINGLE) DeploymentExtendedInner createOrUpdateAtTenantScope(String deploymentName, ScopedDeployment parameters); | /**
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation... | You can provide the template and parameters directly in the request or link to JSON files | createOrUpdateAtTenantScope | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java",
"license": "mit",
"size": 218889
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.resources.fluent.models.DeploymentExtendedInner",
"com.azure.resourcemanager.resources.models.ScopedDeployment"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.resources.fluent.models.DeploymentExtendedInner; import com.azure.resourcemanager.resources.models.ScopedDeployment; | import com.azure.core.annotation.*; import com.azure.resourcemanager.resources.fluent.models.*; import com.azure.resourcemanager.resources.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 217,442 |
void setCorrelationExpression(NamespacedProperty value); | void setCorrelationExpression(NamespacedProperty value); | /**
* Sets the value of the '{@link org.wso2.developerstudio.eclipse.esb.mediators.AggregateMediator#getCorrelationExpression <em>Correlation Expression</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Correlation Expression</em>' containme... | Sets the value of the '<code>org.wso2.developerstudio.eclipse.esb.mediators.AggregateMediator#getCorrelationExpression Correlation Expression</code>' containment reference. | setCorrelationExpression | {
"repo_name": "thiliniish/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.esb/src/org/wso2/developerstudio/eclipse/esb/mediators/AggregateMediator.java",
"license": "apache-2.0",
"size": 8128
} | [
"org.wso2.developerstudio.eclipse.esb.NamespacedProperty"
] | import org.wso2.developerstudio.eclipse.esb.NamespacedProperty; | import org.wso2.developerstudio.eclipse.esb.*; | [
"org.wso2.developerstudio"
] | org.wso2.developerstudio; | 851,242 |
@SuppressWarnings({"deprecation", // test of deprecated function
"EqualsIncompatibleType"})
@Test
public void testPAssertEqualsSingletonUnsupported() throws Exception {
thrown.expect(UnsupportedOperationException.class);
thrown.expectMessage("isEqualTo");
PCollection<Integer> pcollection = pipe... | @SuppressWarnings({STR, STR}) void function() throws Exception { thrown.expect(UnsupportedOperationException.class); thrown.expectMessage(STR); PCollection<Integer> pcollection = pipeline.apply(Create.of(42)); PAssert.thatSingleton(pcollection).equals(42); } | /**
* Test that we throw an error at pipeline construction time when the user mistakenly uses
* {@code PAssert.thatSingleton().equals()} instead of the test method {@code .isEqualTo}.
*/ | Test that we throw an error at pipeline construction time when the user mistakenly uses PAssert.thatSingleton().equals() instead of the test method .isEqualTo | testPAssertEqualsSingletonUnsupported | {
"repo_name": "tgroh/incubator-beam",
"path": "sdks/java/core/src/test/java/org/apache/beam/sdk/testing/PAssertTest.java",
"license": "apache-2.0",
"size": 21285
} | [
"org.apache.beam.sdk.transforms.Create",
"org.apache.beam.sdk.values.PCollection"
] | import org.apache.beam.sdk.transforms.Create; import org.apache.beam.sdk.values.PCollection; | import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.values.*; | [
"org.apache.beam"
] | org.apache.beam; | 1,911,436 |
@Override
public void freeTemporaryResources(boolean isErrorOccurred)
throws IOException {
closeFile(getConstructorImplTempFileHandle(), true);
super.freeTemporaryResources(isErrorOccurred);
} | void function(boolean isErrorOccurred) throws IOException { closeFile(getConstructorImplTempFileHandle(), true); super.freeTemporaryResources(isErrorOccurred); } | /**
* Removes all temporary file handles.
*
* @param isErrorOccurred when translator fails to generate java files we
* need to close all open file handles include temporary files
* and java files.
* @throws IOException when failed to delete the temporary files
*/ | Removes all temporary file handles | freeTemporaryResources | {
"repo_name": "VinodKumarS-Huawei/ietf96yang",
"path": "utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaBeanFragmentFiles.java",
"license": "apache-2.0",
"size": 4293
} | [
"java.io.IOException",
"org.onosproject.yangutils.utils.io.impl.FileSystemUtil"
] | import java.io.IOException; import org.onosproject.yangutils.utils.io.impl.FileSystemUtil; | import java.io.*; import org.onosproject.yangutils.utils.io.impl.*; | [
"java.io",
"org.onosproject.yangutils"
] | java.io; org.onosproject.yangutils; | 707,067 |
public void test(TestHarness harness)
{
// map of declared fields which should exists
Map<String, String> testedDeclaredFields = null;
// map of declared fields for (Open)JDK6
Map<String, String> testedDeclaredFields_jdk6 = new HashMap<String, String>();
// map of decla... | void function(TestHarness harness) { Map<String, String> testedDeclaredFields = null; Map<String, String> testedDeclaredFields_jdk6 = new HashMap<String, String>(); Map<String, String> testedDeclaredFields_jdk7 = new HashMap<String, String>(); testedDeclaredFields_jdk7.put(STR, STR); final Object o = new StackOverflowE... | /**
* Runs the test using the specified harness.
*
* @param harness the test harness (<code>null</code> not permitted).
*/ | Runs the test using the specified harness | test | {
"repo_name": "niloc132/mauve-gwt",
"path": "src/main/java/gnu/testlet/java/lang/StackOverflowError/classInfo/getDeclaredFields.java",
"license": "gpl-2.0",
"size": 3655
} | [
"gnu.testlet.TestHarness",
"java.lang.StackOverflowError",
"java.util.HashMap",
"java.util.Map"
] | import gnu.testlet.TestHarness; import java.lang.StackOverflowError; import java.util.HashMap; import java.util.Map; | import gnu.testlet.*; import java.lang.*; import java.util.*; | [
"gnu.testlet",
"java.lang",
"java.util"
] | gnu.testlet; java.lang; java.util; | 1,638,026 |
public static void plotNodeValueLists(SeriesData[] seriesData,
String dstDir, PlotType type, PlotStyle style,
NodeValueListOrderBy sortBy, NodeValueListOrder sortOrder)
throws IOException, InterruptedException {
Log.info("plotting nodevaluelists sorted by " + sortBy.toString()
+ " in " + sortOrder.toS... | static void function(SeriesData[] seriesData, String dstDir, PlotType type, PlotStyle style, NodeValueListOrderBy sortBy, NodeValueListOrder sortOrder) throws IOException, InterruptedException { Log.info(STR + sortBy.toString() + STR + sortOrder.toString() + STR); for (AggregatedMetric m : seriesData[0].getAggregation(... | /**
* Plots NodeValueLists by calling Plotting.plotNodeValueList for each list.
*
* @param seriesData
* SeriesData which will be plotted
* @param dstDir
* Destination directory
* @param type
* PlotType
* @param style
* PlotStyle
* @param sortBy
* ... | Plots NodeValueLists by calling Plotting.plotNodeValueList for each list | plotNodeValueLists | {
"repo_name": "Rwilmes/DNA3",
"path": "src/dna/plot/Plotting.java",
"license": "gpl-3.0",
"size": 23921
} | [
"dna.plot.Gnuplot",
"dna.plot.data.PlotData",
"dna.series.aggdata.AggregatedMetric",
"dna.series.aggdata.AggregatedNodeValueList",
"dna.series.data.SeriesData",
"dna.util.Log",
"java.io.IOException"
] | import dna.plot.Gnuplot; import dna.plot.data.PlotData; import dna.series.aggdata.AggregatedMetric; import dna.series.aggdata.AggregatedNodeValueList; import dna.series.data.SeriesData; import dna.util.Log; import java.io.IOException; | import dna.plot.*; import dna.plot.data.*; import dna.series.aggdata.*; import dna.series.data.*; import dna.util.*; import java.io.*; | [
"dna.plot",
"dna.plot.data",
"dna.series.aggdata",
"dna.series.data",
"dna.util",
"java.io"
] | dna.plot; dna.plot.data; dna.series.aggdata; dna.series.data; dna.util; java.io; | 1,034,924 |
private String queuePeekOrFail(String workspaceId) throws ServerException {
try (@SuppressWarnings("unused")
Unlocker u = stripedLocks.readLock(workspaceId)) {
ensurePreDestroyIsNotExecuted();
EnvironmentHolder environmentHolder = environments.get(workspaceId);
if (environmentHolder == n... | String function(String workspaceId) throws ServerException { try (@SuppressWarnings(STR) Unlocker u = stripedLocks.readLock(workspaceId)) { ensurePreDestroyIsNotExecuted(); EnvironmentHolder environmentHolder = environments.get(workspaceId); if (environmentHolder == null environmentHolder.startQueue == null) { throw ne... | /**
* Gets head config from the queue associated with the given {@code workspaceId}.
*
* <p>Note that this method won't actually poll the queue.
*
* <p>Fails if environment start was interrupted by stop(queue doesn't exist).
*
* @return machine config which is in the queue head, or null if there ar... | Gets head config from the queue associated with the given workspaceId. Note that this method won't actually poll the queue. Fails if environment start was interrupted by stop(queue doesn't exist) | queuePeekOrFail | {
"repo_name": "TypeFox/che",
"path": "wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/CheEnvironmentEngine.java",
"license": "epl-1.0",
"size": 57062
} | [
"org.eclipse.che.api.core.ServerException",
"org.eclipse.che.commons.lang.concurrent.Unlocker"
] | import org.eclipse.che.api.core.ServerException; import org.eclipse.che.commons.lang.concurrent.Unlocker; | import org.eclipse.che.api.core.*; import org.eclipse.che.commons.lang.concurrent.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 622,884 |
void cleanupQuery(Session session); | void cleanupQuery(Session session); | /**
* Cleanup after a query. This is the very last notification after the query finishes, regardless if it succeeds or fails.
* An exception thrown in this method will not affect the result of the query.
*/ | Cleanup after a query. This is the very last notification after the query finishes, regardless if it succeeds or fails. An exception thrown in this method will not affect the result of the query | cleanupQuery | {
"repo_name": "electrum/presto",
"path": "core/trino-main/src/main/java/io/trino/metadata/Metadata.java",
"license": "apache-2.0",
"size": 24596
} | [
"io.trino.Session"
] | import io.trino.Session; | import io.trino.*; | [
"io.trino"
] | io.trino; | 1,347,027 |
private void addPeriod(DynamicsPeriod period, CList<DynamicsPeriod> target) {
//add at correct position
int pos = 0;
while (pos < target.size() && target.get(pos).startTime.compareTo(period.startTime) < 0)
pos++;
//add at this position, but only if the following (if any) period does not overlap
if (pos ... | void function(DynamicsPeriod period, CList<DynamicsPeriod> target) { int pos = 0; while (pos < target.size() && target.get(pos).startTime.compareTo(period.startTime) < 0) pos++; if (pos + 1 < target.size() && target.get(pos + 1).startTime.compareTo(period.endTime) < 0) throw new IllegalArgumentException(STR); target.ad... | /**
* Adds the given period into the given list. When there are collisions,
* an {@link IllegalArgumentException} is thrown.
*/ | Adds the given period into the given list. When there are collisions, an <code>IllegalArgumentException</code> is thrown | addPeriod | {
"repo_name": "Xenoage/Zong",
"path": "midi-out/src/com/xenoage/zong/io/midi/out/dynamics/DynamicsPeriodsBuilder.java",
"license": "agpl-3.0",
"size": 3240
} | [
"com.xenoage.utils.collections.CList"
] | import com.xenoage.utils.collections.CList; | import com.xenoage.utils.collections.*; | [
"com.xenoage.utils"
] | com.xenoage.utils; | 1,633,714 |
@Test
public void testOnDestroy() {
poolClass.close();
assertEquals(5, hookClass.destroy);
}
| void function() { poolClass.close(); assertEquals(5, hookClass.destroy); } | /**
* Test method for {@link com.jolbox.bonecp.hooks.AbstractConnectionHook#onDestroy(com.jolbox.bonecp.ConnectionHandle)}.
*/ | Test method for <code>com.jolbox.bonecp.hooks.AbstractConnectionHook#onDestroy(com.jolbox.bonecp.ConnectionHandle)</code> | testOnDestroy | {
"repo_name": "liuxing521a/itas-core",
"path": "utils/src/test/java/com/jolbox/bonecp/hooks/TestConnectionHook.java",
"license": "apache-2.0",
"size": 6451
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 35,578 |
public static List<org.wso2.carbon.identity.application.common.model.idp.xsd.Property> getPropertySetStartsWith(
org.wso2.carbon.identity.application.common.model.idp.xsd.Property[] properties,
String startWith) {
List<org.wso2.carbon.identity.application.common.model.idp.xsd.Propert... | static List<org.wso2.carbon.identity.application.common.model.idp.xsd.Property> function( org.wso2.carbon.identity.application.common.model.idp.xsd.Property[] properties, String startWith) { List<org.wso2.carbon.identity.application.common.model.idp.xsd.Property> propertySet = new ArrayList<>(); for (org.wso2.carbon.id... | /**
* This is used in front end. Property is the type of stub generated property
*
* @param properties properties list to iterate
* @param startWith the peoperty list startswith the given name
* @return
*/ | This is used in front end. Property is the type of stub generated property | getPropertySetStartsWith | {
"repo_name": "hpmtissera/carbon-identity",
"path": "components/idp-mgt/org.wso2.carbon.idp.mgt.ui/src/main/java/org/wso2/carbon/idp/mgt/ui/util/IdPManagementUIUtil.java",
"license": "apache-2.0",
"size": 73141
} | [
"java.util.ArrayList",
"java.util.List",
"org.wso2.carbon.identity.application.common.model.idp.xsd.Property"
] | import java.util.ArrayList; import java.util.List; import org.wso2.carbon.identity.application.common.model.idp.xsd.Property; | import java.util.*; import org.wso2.carbon.identity.application.common.model.idp.xsd.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 223,794 |
public List<RAFFileEntry> getFileEntries() {
return fileEntries;
} | List<RAFFileEntry> function() { return fileEntries; } | /**
* Retrieve the list of file entries in this archive.
* @return
*/ | Retrieve the list of file entries in this archive | getFileEntries | {
"repo_name": "jonathanedgecombe/raf-library",
"path": "src/com/jonathanedgecombe/raf/RAFFile.java",
"license": "isc",
"size": 3784
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,531,289 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<IoTSecurityAggregatedRecommendationInner>> listSinglePageAsync(
String resourceGroupName, String solutionName, Integer top, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<IoTSecurityAggregatedRecommendationInner>> function( String resourceGroupName, String solutionName, Integer top, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscr... | /**
* Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case
* insensitive.
* @param solutionName The name of the IoT Securi... | Use this method to get the list of aggregated security analytics recommendations of yours IoT Security solution | listSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/IotSecuritySolutionsAnalyticsRecommendationsClientImpl.java",
"license": "mit",
"size": 29503
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.security.fluent.models.IoTSecurityAggregatedRecommendationInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.IoTSecurityAggregatedRecommendationIn... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.security.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,436,612 |
public List<RemoteTenant> getTenants(int offset, int limit); | List<RemoteTenant> function(int offset, int limit); | /**
* Get a list of all tenants for a given offset and limit,
*
* @param offset
* @param limit
* @return
*/ | Get a list of all tenants for a given offset and limit | getTenants | {
"repo_name": "ferronrsmith/easyrec",
"path": "easyrec-web/src/main/java/org/easyrec/store/dao/web/RemoteTenantDAO.java",
"license": "gpl-3.0",
"size": 5087
} | [
"java.util.List",
"org.easyrec.model.core.web.RemoteTenant"
] | import java.util.List; import org.easyrec.model.core.web.RemoteTenant; | import java.util.*; import org.easyrec.model.core.web.*; | [
"java.util",
"org.easyrec.model"
] | java.util; org.easyrec.model; | 460,309 |
protected void init() {
messageDamper = new OFMessageDamper(OFMESSAGE_DAMPER_CAPACITY,
EnumSet.of(OFType.FLOW_MOD),
OFMESSAGE_DAMPER_TIMEOUT);
} | void function() { messageDamper = new OFMessageDamper(OFMESSAGE_DAMPER_CAPACITY, EnumSet.of(OFType.FLOW_MOD), OFMESSAGE_DAMPER_TIMEOUT); } | /**
* init data structures
*
*/ | init data structures | init | {
"repo_name": "yeasy/lazyctrl",
"path": "ccm/floodlight-lc/src/main/java/net/floodlightcontroller/routing/ForwardingBase.java",
"license": "apache-2.0",
"size": 26654
} | [
"java.util.EnumSet",
"net.floodlightcontroller.util.OFMessageDamper",
"org.openflow.protocol.OFType"
] | import java.util.EnumSet; import net.floodlightcontroller.util.OFMessageDamper; import org.openflow.protocol.OFType; | import java.util.*; import net.floodlightcontroller.util.*; import org.openflow.protocol.*; | [
"java.util",
"net.floodlightcontroller.util",
"org.openflow.protocol"
] | java.util; net.floodlightcontroller.util; org.openflow.protocol; | 934,005 |
public void printUsage(PrintWriter pw, int width, String app,
Options options) {
// initialise the string buffer
StringBuffer buff = new StringBuffer(defaultSyntaxPrefix).append(app)
.append(" ");
// create a list for processed option groups
final Collection processedGroups = new ArrayList();
// t... | void function(PrintWriter pw, int width, String app, Options options) { StringBuffer buff = new StringBuffer(defaultSyntaxPrefix).append(app) .append(" "); final Collection processedGroups = new ArrayList(); Option option; List optList = new ArrayList(options.getOptions()); Collections.sort(optList, new OptionComparato... | /**
* <p>
* Prints the usage statement for the specified application.
* </p>
*
* @param pw
* The PrintWriter to print the usage statement
* @param width
* The number of characters to display per line
* @param app
* The application name
* @param options
* ... | Prints the usage statement for the specified application. | printUsage | {
"repo_name": "janlindblom/sdedit",
"path": "src/org/apache/commons/cli/HelpFormatter.java",
"license": "bsd-2-clause",
"size": 27350
} | [
"java.io.PrintWriter",
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.Iterator",
"java.util.List"
] | import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,006,545 |
public void writeElementValue(XmlNamespace xmlNamespace, String localName,
Object value) throws XMLStreamException,
ServiceXmlSerializationException {
this.writeElementValue(xmlNamespace, localName, localName, value);
} | void function(XmlNamespace xmlNamespace, String localName, Object value) throws XMLStreamException, ServiceXmlSerializationException { this.writeElementValue(xmlNamespace, localName, localName, value); } | /**
* Writes the element value.
*
* @param xmlNamespace The XML namespace.
* @param localName The local name of the element.
* @param value The value.
* @throws javax.xml.stream.XMLStreamException the xML stream exception
* @throws microsoft.exchange.webservices.data.exception.ServiceXmlS... | Writes the element value | writeElementValue | {
"repo_name": "relateiq/ews-java-api",
"path": "src/main/java/microsoft/exchange/webservices/data/core/EwsServiceXmlWriter.java",
"license": "mit",
"size": 19735
} | [
"javax.xml.stream.XMLStreamException"
] | import javax.xml.stream.XMLStreamException; | import javax.xml.stream.*; | [
"javax.xml"
] | javax.xml; | 1,818,795 |
private static Page retrieveLoginPage(boolean spInitiated) {
// start login attempt with target SP
try {
// create a URI of the start page (which also checks the validity of the string as URI)
URL loginURL;
if (spInitiated) {
// login from the SP's start page
loginURL = idpConfig.getIdPIn... | static Page function(boolean spInitiated) { try { URL loginURL; if (spInitiated) { loginURL = idpConfig.getIdPInitURL(); Page retrievedPage = browser.getPage(loginURL); ArrayList<Interaction> interactions = idpConfig.getPreResponseInteractions(); for(Interaction interaction : interactions){ if(retrievedPage instanceof ... | /**
* TODO: check if this is still needed
*
* Retrieves the login page from the SP, thereby sending the SP's AuthnRequest to
* the mock IdP.
*
* @return the login page, or null if the login page could not be retrieved
*/ | Retrieves the login page from the SP, thereby sending the SP's AuthnRequest to the mock IdP | retrieveLoginPage | {
"repo_name": "rmokiem-topdesk/SAML2WebSSOTest-IdP",
"path": "src/main/java/saml2webssotest/idp/IdPTestRunner.java",
"license": "lgpl-3.0",
"size": 17122
} | [
"com.gargoylesoftware.htmlunit.ElementNotFoundException",
"com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException",
"com.gargoylesoftware.htmlunit.Page",
"com.gargoylesoftware.htmlunit.html.HtmlPage",
"java.io.IOException",
"java.net.MalformedURLException",
"java.util.ArrayList"
] | import com.gargoylesoftware.htmlunit.ElementNotFoundException; import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.html.HtmlPage; import java.io.IOException; import java.net.MalformedURLException; import java.util.ArrayList... | import com.gargoylesoftware.htmlunit.*; import com.gargoylesoftware.htmlunit.html.*; import java.io.*; import java.net.*; import java.util.*; | [
"com.gargoylesoftware.htmlunit",
"java.io",
"java.net",
"java.util"
] | com.gargoylesoftware.htmlunit; java.io; java.net; java.util; | 840,969 |
@NotNull
public Customer getLoggedCustomer(@NotNull Customer defaultValue); | Customer function(@NotNull Customer defaultValue); | /** Get an immutable logged Customer from session of returns the default Value
* @return */ | Get an immutable logged Customer from session of returns the default Value | getLoggedCustomer | {
"repo_name": "pponec/ujorm",
"path": "samples/wicket/src/main/java/org/ujorm/hotels/service/SessionService.java",
"license": "apache-2.0",
"size": 1405
} | [
"org.jetbrains.annotations.NotNull",
"org.ujorm.hotels.entity.Customer"
] | import org.jetbrains.annotations.NotNull; import org.ujorm.hotels.entity.Customer; | import org.jetbrains.annotations.*; import org.ujorm.hotels.entity.*; | [
"org.jetbrains.annotations",
"org.ujorm.hotels"
] | org.jetbrains.annotations; org.ujorm.hotels; | 269,053 |
public okhttp3.Call getAPIVersionsCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/apis/";
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayL... | okhttp3.Call function(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; String localVarPath = STR; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, Str... | /**
* Build call for getAPIVersions
*
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><t... | Build call for getAPIVersions | getAPIVersionsCall | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/ApisApi.java",
"license": "apache-2.0",
"size": 6225
} | [
"io.kubernetes.client.openapi.ApiCallback",
"io.kubernetes.client.openapi.ApiException",
"io.kubernetes.client.openapi.Pair",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import io.kubernetes.client.openapi.ApiCallback; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.Pair; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import io.kubernetes.client.openapi.*; import java.util.*; | [
"io.kubernetes.client",
"java.util"
] | io.kubernetes.client; java.util; | 2,523,625 |
return Optional.ofNullable(this.memory);
}
public static class Builder extends ConfigDTO.Builder<Builder> {
private final CommandStatus bStatus;
private final String bExecutable;
private final long bCheckDelay;
private Integer bMemory;
public Builder(
... | return Optional.ofNullable(this.memory); } public static class Builder extends ConfigDTO.Builder<Builder> { private final CommandStatus bStatus; private final String bExecutable; private final long bCheckDelay; private Integer bMemory; public Builder( @JsonProperty("name") final String name, @JsonProperty("user") final... | /**
* Get the default amount of memory (in MB) to use for jobs which use this command.
*
* @return Optional of the amount of memory as it could be null if none set
*/ | Get the default amount of memory (in MB) to use for jobs which use this command | getMemory | {
"repo_name": "ajoymajumdar/genie",
"path": "genie-common/src/main/java/com/netflix/genie/common/dto/Command.java",
"license": "apache-2.0",
"size": 5024
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"java.util.Optional"
] | import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Optional; | import com.fasterxml.jackson.annotation.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.util"
] | com.fasterxml.jackson; java.util; | 2,379,062 |
public void logError(String msg, Throwable error) throws RemoteException;
| void function(String msg, Throwable error) throws RemoteException; | /**
* Convenience method to send an errorlogmessage to the logmanager. This method prints a stacktrace from
* the parameter error and adds it to the logmessage. The level of the logmessage is set to ERROR_LEVEL.
*
* @param msg a msg of the error.
* @param error an error to be logged.
*
* @see co... | Convenience method to send an errorlogmessage to the logmanager. This method prints a stacktrace from the parameter error and adds it to the logmessage. The level of the logmessage is set to ERROR_LEVEL | logError | {
"repo_name": "tolo/JServer",
"path": "src/java/com/teletalk/jserver/rmi/remote/RemoteSubComponent.java",
"license": "apache-2.0",
"size": 14573
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 459,262 |
public static BufferedImage rasterToBufferedImage(
Raster raster,
ImageTypeSpecifier imageType)
{
if (imageType == null)
{
if (raster.getDataBuffer().getDataType() == DataBuffe... | static BufferedImage function( Raster raster, ImageTypeSpecifier imageType) { if (imageType == null) { if (raster.getDataBuffer().getDataType() == DataBuffer.TYPE_BYTE) imageType = ImageTypeSpecifier.createGrayscale(8, DataBuffer.TYPE_BYTE, false); else throw new IllegalArgumentException( STR); } BufferedImage bufImage... | /**
* Utility method for creating a BufferedImage from a source raster
* Currently only Float->Byte and Byte->Byte are supported. Will throw an
* {@link UnsupportedOperationException} if the conversion is not supported.
*
* @param raster
* @param imageType
* @return
*/ | Utility method for creating a BufferedImage from a source raster Currently only Float->Byte and Byte->Byte are supported. Will throw an <code>UnsupportedOperationException</code> if the conversion is not supported | rasterToBufferedImage | {
"repo_name": "hobu/nitro",
"path": "java/nitf.imageio/src/java/nitf/imageio/ImageIOUtils.java",
"license": "lgpl-3.0",
"size": 21348
} | [
"java.awt.image.BufferedImage",
"java.awt.image.DataBuffer",
"java.awt.image.DataBufferByte",
"java.awt.image.DataBufferDouble",
"java.awt.image.DataBufferFloat",
"java.awt.image.DataBufferUShort",
"java.awt.image.Raster",
"javax.imageio.ImageTypeSpecifier"
] | import java.awt.image.BufferedImage; import java.awt.image.DataBuffer; import java.awt.image.DataBufferByte; import java.awt.image.DataBufferDouble; import java.awt.image.DataBufferFloat; import java.awt.image.DataBufferUShort; import java.awt.image.Raster; import javax.imageio.ImageTypeSpecifier; | import java.awt.image.*; import javax.imageio.*; | [
"java.awt",
"javax.imageio"
] | java.awt; javax.imageio; | 1,775,543 |
public ItemStack getCurrentItemOrArmor(int par1)
{
if(par1==0)
if(this.inventory.currentItem==-1)
return null;
else
return this.inventory.mainInventory[this.inventory.currentItem];
return this.inventory.armorInventory[par1-1];
} | ItemStack function(int par1) { if(par1==0) if(this.inventory.currentItem==-1) return null; else return this.inventory.mainInventory[this.inventory.currentItem]; return this.inventory.armorInventory[par1-1]; } | /**
* 0 = item, 1-n is armor
*/ | 0 = item, 1-n is armor | getCurrentItemOrArmor | {
"repo_name": "nekosune/UnDeath",
"path": "src/main/java/com/nekokittygames/modjam/UnDeath/EntityPlayerZombiePigmen.java",
"license": "gpl-2.0",
"size": 12914
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,892,062 |
@Override
public void actionPerformed(final ActionEvent e) {
if (isFilterWindowVisible()) {
setFilterWindowVisible(false);
}
}
}
private class FilterWindowListener extends MouseAdapter implements AncestorListener,
FocusListener,
... | void function(final ActionEvent e) { if (isFilterWindowVisible()) { setFilterWindowVisible(false); } } } private class FilterWindowListener extends MouseAdapter implements AncestorListener, FocusListener, WindowFocusListener { | /**
* DOCUMENT ME!
*
* @param e DOCUMENT ME!
*/ | DOCUMENT ME | actionPerformed | {
"repo_name": "cismet/cismet-gui-commons",
"path": "src/main/java/de/cismet/tools/gui/autocomplete/CompleterFilterWithWindow.java",
"license": "lgpl-3.0",
"size": 12504
} | [
"java.awt.event.ActionEvent",
"java.awt.event.FocusListener",
"java.awt.event.MouseAdapter",
"java.awt.event.WindowFocusListener",
"javax.swing.event.AncestorListener"
] | import java.awt.event.ActionEvent; import java.awt.event.FocusListener; import java.awt.event.MouseAdapter; import java.awt.event.WindowFocusListener; import javax.swing.event.AncestorListener; | import java.awt.event.*; import javax.swing.event.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,771,343 |
public boolean copy(final Plot destination, final Runnable whenDone) {
final PlotId offset = new PlotId(destination.getId().x - this.getId().x, destination.getId().y - this.getId().y);
final Location db = destination.getBottomAbs();
final Location ob = this.getBottomAbs();
final int ... | boolean function(final Plot destination, final Runnable whenDone) { final PlotId offset = new PlotId(destination.getId().x - this.getId().x, destination.getId().y - this.getId().y); final Location db = destination.getBottomAbs(); final Location ob = this.getBottomAbs(); final int offsetX = db.getX() - ob.getX(); final ... | /**
* Copy a plot to a location, both physically and the settings
* @param destination
* @param whenDone
* @return
*/ | Copy a plot to a location, both physically and the settings | copy | {
"repo_name": "SilverCory/PlotSquared",
"path": "Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java",
"license": "gpl-3.0",
"size": 98015
} | [
"com.intellectualcrafters.plot.PS",
"com.intellectualcrafters.plot.database.DBFunc",
"com.intellectualcrafters.plot.util.TaskManager",
"java.util.HashSet"
] | import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.database.DBFunc; import com.intellectualcrafters.plot.util.TaskManager; import java.util.HashSet; | import com.intellectualcrafters.plot.*; import com.intellectualcrafters.plot.database.*; import com.intellectualcrafters.plot.util.*; import java.util.*; | [
"com.intellectualcrafters.plot",
"java.util"
] | com.intellectualcrafters.plot; java.util; | 1,262,048 |
public Grid.Column addComponentColumn(Object propertyId, ComponentGenerator<T> generator) {
return componentGridDecorator.addComponentColumn(propertyId, generator);
} | Grid.Column function(Object propertyId, ComponentGenerator<T> generator) { return componentGridDecorator.addComponentColumn(propertyId, generator); } | /**
* Add a generated component column to the ComponentGrid.
*
* @param propertyId the generated column's property-id
* @param generator the component-generator
* @return the grid for method chaining
*/ | Add a generated component column to the ComponentGrid | addComponentColumn | {
"repo_name": "datenhahn/componentrenderer",
"path": "componentrenderer/src/main/java/de/datenhahn/vaadin/componentrenderer/grid/ComponentGrid.java",
"license": "apache-2.0",
"size": 4889
} | [
"com.vaadin.v7.ui.Grid"
] | import com.vaadin.v7.ui.Grid; | import com.vaadin.v7.ui.*; | [
"com.vaadin.v7"
] | com.vaadin.v7; | 2,857,143 |
private String searchForManga(String searchTerm) throws IOException{
String url = "http://www.mangahere.com/search.php";
String encoded = URLEncoder.encode(searchTerm, "UTF-8");
url += "?name=" + encoded;
Document doc = Jsoup.connect(url).timeout(5000).get();
Elements results = doc.getElementsByClass("resu... | String function(String searchTerm) throws IOException{ String url = STRUTF-8STR?name=STRresult_searchSTR;STRaSTRhrefSTR"; } | /**
* Searches for the manga name and returns the URL.
* @param searchTerm The name of the Manga
* @return The URL
* @throws IOException if something goes wrong
*/ | Searches for the manga name and returns the URL | searchForManga | {
"repo_name": "Skylion007/java-manga-reader",
"path": "src/org/skylion/mangareader/mangaengine/MangaHereAPI.java",
"license": "gpl-3.0",
"size": 15359
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 307,897 |
@Override
protected List<ColumnDescription> getColumnDescriptions(PortletExecutionAggregationDiscriminator reportColumnDiscriminator,
PortletExecutionReportForm form) {
int groupSize = form.getGroups().size();
int portletSize = form.get... | List<ColumnDescription> function(PortletExecutionAggregationDiscriminator reportColumnDiscriminator, PortletExecutionReportForm form) { int groupSize = form.getGroups().size(); int portletSize = form.getPortlets().size(); int executionTypeSize = form.getExecutionTypeNames().size(); String portletName = reportColumnDisc... | /**
* Create column descriptions for the portlet report using the configured report
* labelling strategy.
*
* @param reportColumnDiscriminator
* @param form The original query form
* @return
*/ | Create column descriptions for the portlet report using the configured report labelling strategy | getColumnDescriptions | {
"repo_name": "ASU-Capstone/uPortal-Forked",
"path": "uportal-war/src/main/java/org/jasig/portal/portlets/statistics/PortletExecutionStatisticsController.java",
"license": "apache-2.0",
"size": 13128
} | [
"com.google.visualization.datasource.datatable.ColumnDescription",
"java.util.List",
"org.jasig.portal.events.aggr.portletexec.PortletExecutionAggregationDiscriminator",
"org.jasig.portal.portlets.statistics.ReportTitleAndColumnDescriptionStrategy"
] | import com.google.visualization.datasource.datatable.ColumnDescription; import java.util.List; import org.jasig.portal.events.aggr.portletexec.PortletExecutionAggregationDiscriminator; import org.jasig.portal.portlets.statistics.ReportTitleAndColumnDescriptionStrategy; | import com.google.visualization.datasource.datatable.*; import java.util.*; import org.jasig.portal.events.aggr.portletexec.*; import org.jasig.portal.portlets.statistics.*; | [
"com.google.visualization",
"java.util",
"org.jasig.portal"
] | com.google.visualization; java.util; org.jasig.portal; | 2,477,371 |
public List<String> getAllClusterNodeAddresses() {
if (AndesContext.getInstance().isClusteringEnabled()) {
return clusterAgent.getAllClusterNodeAddresses();
}
return new ArrayList<>();
} | List<String> function() { if (AndesContext.getInstance().isClusteringEnabled()) { return clusterAgent.getAllClusterNodeAddresses(); } return new ArrayList<>(); } | /**
* Gets address of all the members in the cluster. i.e address:port
*
* @return A list of address of the nodes in a cluster
*/ | Gets address of all the members in the cluster. i.e address:port | getAllClusterNodeAddresses | {
"repo_name": "ThilankaBowala/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/server/cluster/ClusterManager.java",
"license": "apache-2.0",
"size": 11017
} | [
"java.util.ArrayList",
"java.util.List",
"org.wso2.andes.kernel.AndesContext"
] | import java.util.ArrayList; import java.util.List; import org.wso2.andes.kernel.AndesContext; | import java.util.*; import org.wso2.andes.kernel.*; | [
"java.util",
"org.wso2.andes"
] | java.util; org.wso2.andes; | 284,991 |
private void generatePostamble() {
out.popIndent();
out.printil("} catch (java.lang.Throwable t) {");
out.pushIndent();
out.printil("if (!(t instanceof javax.servlet.jsp.SkipPageException)){");
out.pushIndent();
out.printil("out = _jspx_out;");
out.printil("if... | void function() { out.popIndent(); out.printil(STR); out.pushIndent(); out.printil(STR); out.pushIndent(); out.printil(STR); out.printil(STR); out.pushIndent(); out.printil(STR); out.pushIndent(); out.printil(STR); out.pushIndent(); out.printil(STR); out.popIndent(); out.printil(STR); out.pushIndent(); out.printil(STR)... | /**
* Generates the ending part of the static portion of the servlet.
*/ | Generates the ending part of the static portion of the servlet | generatePostamble | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.22/Generator.java",
"license": "mit",
"size": 173069
} | [
"java.text.SimpleDateFormat",
"java.util.ArrayList",
"java.util.TimeZone",
"java.util.Vector",
"org.apache.jasper.JasperException"
] | import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.TimeZone; import java.util.Vector; import org.apache.jasper.JasperException; | import java.text.*; import java.util.*; import org.apache.jasper.*; | [
"java.text",
"java.util",
"org.apache.jasper"
] | java.text; java.util; org.apache.jasper; | 600,423 |
public Document findById(String _id, QueryCondition condition, String...fieldPaths) throws StoreException; | Document function(String _id, QueryCondition condition, String...fieldPaths) throws StoreException; | /**
* Returns the Document with the given `_id` if it matches the specified condition. If a Document
* with the specified `_id` does not exist in this DocumentStore or does not satisfy the specified
* condition, {@code null} is returned. The returned Document will include only the specified fields.
*
* @... | Returns the Document with the given `_id` if it matches the specified condition. If a Document with the specified `_id` does not exist in this DocumentStore or does not satisfy the specified condition, null is returned. The returned Document will include only the specified fields | findById | {
"repo_name": "ojai/ojai",
"path": "java/core/src/main/java/org/ojai/store/DocumentStore.java",
"license": "apache-2.0",
"size": 43225
} | [
"org.ojai.Document",
"org.ojai.store.exceptions.StoreException"
] | import org.ojai.Document; import org.ojai.store.exceptions.StoreException; | import org.ojai.*; import org.ojai.store.exceptions.*; | [
"org.ojai",
"org.ojai.store"
] | org.ojai; org.ojai.store; | 998,650 |
public ImageView getImage(int index) {
return viewFetcher.getView(ImageView.class, index);
}
| ImageView function(int index) { return viewFetcher.getView(ImageView.class, index); } | /**
* Returns an ImageView with a given index.
*
* @param index the index of the {@link ImageView}. {@code 0} if only one is available
* @return the {@link ImageView} with a specified index or {@code null} if index is invalid
*
*/ | Returns an ImageView with a given index | getImage | {
"repo_name": "bghtrbb/robotium",
"path": "robotium-solo/src/main/java/com/jayway/android/robotium/solo/Solo.java",
"license": "apache-2.0",
"size": 58591
} | [
"android.widget.ImageView"
] | import android.widget.ImageView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 557,222 |
String from=sendMailInformation.getFromAddress();
String user=sendMailInformation.getUser();
String host=sendMailInformation.getHost();
Properties properties = new Properties();
// set host
properties.put(MAIL_SMTP_HOST, host);
// set authenticator true
properties.put(MAIL_SMTP_AUTH, true);
Session se... | String from=sendMailInformation.getFromAddress(); String user=sendMailInformation.getUser(); String host=sendMailInformation.getHost(); Properties properties = new Properties(); properties.put(MAIL_SMTP_HOST, host); properties.put(MAIL_SMTP_AUTH, true); Session session = Session.getDefaultInstance(properties); session.... | /**
* send mail
* @param sendMailInformation
* @throws Exception
*/ | send mail | send | {
"repo_name": "oneliang/common-util",
"path": "src/main/java/com/oneliang/util/mail/Mail.java",
"license": "apache-2.0",
"size": 6380
} | [
"com.oneliang.util.common.StringUtil",
"java.util.Date",
"java.util.List",
"java.util.Properties",
"javax.activation.CommandMap",
"javax.activation.DataHandler",
"javax.activation.DataSource",
"javax.activation.FileDataSource",
"javax.activation.MailcapCommandMap",
"javax.mail.BodyPart",
"javax.... | import com.oneliang.util.common.StringUtil; import java.util.Date; import java.util.List; import java.util.Properties; import javax.activation.CommandMap; import javax.activation.DataHandler; import javax.activation.DataSource; import javax.activation.FileDataSource; import javax.activation.MailcapCommandMap; import ja... | import com.oneliang.util.common.*; import java.util.*; import javax.activation.*; import javax.mail.*; import javax.mail.internet.*; | [
"com.oneliang.util",
"java.util",
"javax.activation",
"javax.mail"
] | com.oneliang.util; java.util; javax.activation; javax.mail; | 557,726 |
public String getDataType()
{
String datatype = null;
if (Property.this.getTypeName() != null)
{
datatype = Property.this.getTypeName().getName();
}
if (datatype == null || datatype.equals(DataTyp... | String function() { String datatype = null; if (Property.this.getTypeName() != null) { datatype = Property.this.getTypeName().getName(); } if (datatype == null datatype.equals(DataTypeDefinition.ANY.toString())) { if (value != null) { DataTypeDefinition dataTypeDefinition = getDictionaryService().getDataType(value.getC... | /**
* Gets the value datatype
*
* @return the value datatype
*/ | Gets the value datatype | getDataType | {
"repo_name": "Kast0rTr0y/community-edition",
"path": "projects/remote-api/source/java/org/alfresco/repo/web/scripts/admin/NodeBrowserPost.java",
"license": "lgpl-3.0",
"size": 46014
} | [
"org.alfresco.service.cmr.dictionary.DataTypeDefinition"
] | import org.alfresco.service.cmr.dictionary.DataTypeDefinition; | import org.alfresco.service.cmr.dictionary.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 783,078 |
public void onLivingUpdate()
{
if (this.worldObj.isDaytime() && !this.worldObj.isRemote && !this.isChild())
{
float f = this.getBrightness(1.0F);
BlockPos blockpos = new BlockPos(this.posX, (double)Math.round(this.posY), this.posZ);
if (f > 0.5F && this.rand.... | void function() { if (this.worldObj.isDaytime() && !this.worldObj.isRemote && !this.isChild()) { float f = this.getBrightness(1.0F); BlockPos blockpos = new BlockPos(this.posX, (double)Math.round(this.posY), this.posZ); if (f > 0.5F && this.rand.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.worldObj.canSeeSky(blockpo... | /**
* Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
* use this to react to sunlight and start to burn.
*/ | Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn | onLivingUpdate | {
"repo_name": "SkidJava/BaseClient",
"path": "new_1.8.8/net/minecraft/entity/monster/EntityZombie.java",
"license": "gpl-2.0",
"size": 28653
} | [
"net.minecraft.entity.EntityLiving",
"net.minecraft.entity.passive.EntityChicken",
"net.minecraft.item.ItemStack",
"net.minecraft.util.BlockPos"
] | import net.minecraft.entity.EntityLiving; import net.minecraft.entity.passive.EntityChicken; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; | import net.minecraft.entity.*; import net.minecraft.entity.passive.*; import net.minecraft.item.*; import net.minecraft.util.*; | [
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.util"
] | net.minecraft.entity; net.minecraft.item; net.minecraft.util; | 2,224,390 |
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<IntegrationServiceEnvironmentSkuDefinitionInner> listAsync(
String resourceGroup, String integrationServiceEnvironmentName, Context context) {
return new PagedFlux<>(
() -> listSinglePageAsync(resourceGroup, integratio... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<IntegrationServiceEnvironmentSkuDefinitionInner> function( String resourceGroup, String integrationServiceEnvironmentName, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroup, integrationServiceEnvironmentName, context), nextLink -... | /**
* Gets a list of integration service environment Skus.
*
* @param resourceGroup The resource group.
* @param integrationServiceEnvironmentName The integration service environment name.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thr... | Gets a list of integration service environment Skus | listAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/logic/azure-resourcemanager-logic/src/main/java/com/azure/resourcemanager/logic/implementation/IntegrationServiceEnvironmentSkusClientImpl.java",
"license": "mit",
"size": 16915
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.core.util.Context",
"com.azure.resourcemanager.logic.fluent.models.IntegrationServiceEnvironmentSkuDefinitionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.logic.fluent.models.IntegrationServiceEnvironmentSkuDefinitionInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.logic.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,787,370 |
private Stream<String> getKeysStream() {
val cursor = client.getConnectionFactory().getConnection()
.scan(ScanOptions.scanOptions().match(getPatternTicketRedisKey())
.count(SCAN_COUNT)
.build());
return StreamSupport
.stream(Spliterators.sp... | Stream<String> function() { val cursor = client.getConnectionFactory().getConnection() .scan(ScanOptions.scanOptions().match(getPatternTicketRedisKey()) .count(SCAN_COUNT) .build()); return StreamSupport .stream(Spliterators.spliteratorUnknownSize(cursor, Spliterator.ORDERED), false) .map(key -> (String) client.getKeyS... | /**
* Get a stream of all CAS-related keys from Redis DB.
*
* @return stream of all CAS-related keys from Redis DB
*/ | Get a stream of all CAS-related keys from Redis DB | getKeysStream | {
"repo_name": "rrenomeron/cas",
"path": "support/cas-server-support-redis-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/RedisTicketRegistry.java",
"license": "apache-2.0",
"size": 6069
} | [
"java.io.IOException",
"java.util.Spliterator",
"java.util.Spliterators",
"java.util.stream.Collectors",
"java.util.stream.Stream",
"java.util.stream.StreamSupport",
"org.springframework.data.redis.core.ScanOptions"
] | import java.io.IOException; import java.util.Spliterator; import java.util.Spliterators; import java.util.stream.Collectors; import java.util.stream.Stream; import java.util.stream.StreamSupport; import org.springframework.data.redis.core.ScanOptions; | import java.io.*; import java.util.*; import java.util.stream.*; import org.springframework.data.redis.core.*; | [
"java.io",
"java.util",
"org.springframework.data"
] | java.io; java.util; org.springframework.data; | 2,355,393 |
void updateCount(INodesInPath iip, int numOfINodes,
QuotaCounts counts, boolean checkQuota)
throws QuotaExceededException {
assert hasWriteLock();
if (!namesystem.isImageLoaded()) {
//still initializing. do not check or update quotas.
return;
}
if (n... | void updateCount(INodesInPath iip, int numOfINodes, QuotaCounts counts, boolean checkQuota) throws QuotaExceededException { assert hasWriteLock(); if (!namesystem.isImageLoaded()) { return; } if (numOfINodes > iip.length()) { numOfINodes = iip.length(); } if (checkQuota && !skipQuotaCheck) { verifyQuota(iip, numOfINode... | /** update count of each inode with quota
*
* @param iip inodes in a path
* @param numOfINodes the number of inodes to update starting from index 0
* @param counts the count of space/namespace/type usage to be update
* @param checkQuota if true then check if quota is exceeded
* @throws QuotaExceededE... | update count of each inode with quota | updateCount | {
"repo_name": "matrix-stone/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java",
"license": "apache-2.0",
"size": 57399
} | [
"org.apache.hadoop.hdfs.protocol.QuotaExceededException"
] | import org.apache.hadoop.hdfs.protocol.QuotaExceededException; | import org.apache.hadoop.hdfs.protocol.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 448,338 |
@Override
public Map<String, String> getNameMap() {
return nameMap;
} | Map<String, String> function() { return nameMap; } | /**
* Returns the name map which is unmodifiable; or null if there is none.
*/ | Returns the name map which is unmodifiable; or null if there is none | getNameMap | {
"repo_name": "flofreud/aws-sdk-java",
"path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/xspec/UpdateItemExpressionSpec.java",
"license": "apache-2.0",
"size": 2650
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,389,396 |
public boolean hasAllPermissions(String... permissions) {
Subject subject = this.getSubject();
return subject == null ? false : subject.isPermittedAll(permissions);
} | boolean function(String... permissions) { Subject subject = this.getSubject(); return subject == null ? false : subject.isPermittedAll(permissions); } | /**
* Verify that the current user has all the following permissions.
*
* @param permissions
* @return
*/ | Verify that the current user has all the following permissions | hasAllPermissions | {
"repo_name": "CCAFS/ccafs-ap",
"path": "security/src/main/java/org/cgiar/ccafs/security/BaseSecurityContext.java",
"license": "gpl-3.0",
"size": 3932
} | [
"org.apache.shiro.subject.Subject"
] | import org.apache.shiro.subject.Subject; | import org.apache.shiro.subject.*; | [
"org.apache.shiro"
] | org.apache.shiro; | 1,636,035 |
public final StandardSubjectBuilder withMessage(@NullableDecl String messageToPrepend) {
return withMessage("%s", messageToPrepend);
} | final StandardSubjectBuilder function(@NullableDecl String messageToPrepend) { return withMessage("%s", messageToPrepend); } | /**
* Returns a new instance that will output the given message before the main failure message. If
* this method is called multiple times, the messages will appear in the order that they were
* specified.
*/ | Returns a new instance that will output the given message before the main failure message. If this method is called multiple times, the messages will appear in the order that they were specified | withMessage | {
"repo_name": "cgruber/truth",
"path": "core/src/main/java/com/google/common/truth/StandardSubjectBuilder.java",
"license": "apache-2.0",
"size": 8608
} | [
"org.checkerframework.checker.nullness.compatqual.NullableDecl"
] | import org.checkerframework.checker.nullness.compatqual.NullableDecl; | import org.checkerframework.checker.nullness.compatqual.*; | [
"org.checkerframework.checker"
] | org.checkerframework.checker; | 2,508,981 |
private void startRequest() throws IOException {
if (connected) {
return;
}
final UrlRequest.Builder requestBuilder = new UrlRequest.Builder(
getURL().toString(), new CronetUrlRequestCallback(), mMessageLoop, mCronetEngine);
if (doOutput) {
if ... | void function() throws IOException { if (connected) { return; } final UrlRequest.Builder requestBuilder = new UrlRequest.Builder( getURL().toString(), new CronetUrlRequestCallback(), mMessageLoop, mCronetEngine); if (doOutput) { if (mOutputStream != null) { requestBuilder.setUploadDataProvider( mOutputStream.getUploadD... | /**
* Starts the request if {@code connected} is false.
*/ | Starts the request if connected is false | startRequest | {
"repo_name": "Bysmyyr/chromium-crosswalk",
"path": "components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java",
"license": "bsd-3-clause",
"size": 19387
} | [
"android.util.Pair",
"java.io.IOException",
"org.chromium.net.UrlRequest"
] | import android.util.Pair; import java.io.IOException; import org.chromium.net.UrlRequest; | import android.util.*; import java.io.*; import org.chromium.net.*; | [
"android.util",
"java.io",
"org.chromium.net"
] | android.util; java.io; org.chromium.net; | 860,519 |
public static final byte[] serializeToBytes(final Object object) {
if (object == null)
throw new IllegalArgumentException("Object was null");
try {
return jsonMapper.writeValueAsBytes(object);
} catch (JsonProcessingException e) {
throw new JSONException(e);
}
}
| static final byte[] function(final Object object) { if (object == null) throw new IllegalArgumentException(STR); try { return jsonMapper.writeValueAsBytes(object); } catch (JsonProcessingException e) { throw new JSONException(e); } } | /**
* Serializes the given object to a JSON byte array
* @param object The object to serialize
* @return A JSON formatted byte array
* @throws IllegalArgumentException if the object was null
* @throws JSONException if the object could not be serialized
*/ | Serializes the given object to a JSON byte array | serializeToBytes | {
"repo_name": "nickman/PL-TSDB",
"path": "pltsdb-core/src/main/java/com/heliosapm/pltsdb/json/JSONOps.java",
"license": "apache-2.0",
"size": 33309
} | [
"com.fasterxml.jackson.core.JsonProcessingException"
] | import com.fasterxml.jackson.core.JsonProcessingException; | import com.fasterxml.jackson.core.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 659,588 |
public static ASN1ObjectIdentifier getOID(
String name)
{
return (ASN1ObjectIdentifier)objIds.get(Strings.toLowerCase(name));
} | static ASN1ObjectIdentifier function( String name) { return (ASN1ObjectIdentifier)objIds.get(Strings.toLowerCase(name)); } | /**
* return the object identifier signified by the passed in name. Null
* if there is no object identifier associated with name.
*
* @return the object identifier associated with name, if present.
*/ | return the object identifier signified by the passed in name. Null if there is no object identifier associated with name | getOID | {
"repo_name": "Skywalker-11/spongycastle",
"path": "core/src/main/java/org/spongycastle/asn1/anssi/ANSSINamedCurves.java",
"license": "mit",
"size": 3730
} | [
"org.spongycastle.asn1.ASN1ObjectIdentifier",
"org.spongycastle.util.Strings"
] | import org.spongycastle.asn1.ASN1ObjectIdentifier; import org.spongycastle.util.Strings; | import org.spongycastle.asn1.*; import org.spongycastle.util.*; | [
"org.spongycastle.asn1",
"org.spongycastle.util"
] | org.spongycastle.asn1; org.spongycastle.util; | 1,521,425 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
rightClickMenu = new javax.swing.JPopupMenu();
cutMenuItem = new javax.swing.JMenuItem();
copyMenuItem = new javax.swing.JMenuItem... | @SuppressWarnings(STR) void function() { rightClickMenu = new javax.swing.JPopupMenu(); cutMenuItem = new javax.swing.JMenuItem(); copyMenuItem = new javax.swing.JMenuItem(); pasteMenuItem = new javax.swing.JMenuItem(); selectAllMenuItem = new javax.swing.JMenuItem(); sizeUnitComboBox = new javax.swing.JComboBox<String... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "eXcomm/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/filesearch/SizeSearchPanel.java",
"license": "apache-2.0",
"size": 7883
} | [
"java.text.NumberFormat",
"javax.swing.JCheckBox",
"javax.swing.JComboBox",
"javax.swing.JFormattedTextField",
"javax.swing.JMenuItem",
"org.openide.util.NbBundle"
] | import java.text.NumberFormat; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JFormattedTextField; import javax.swing.JMenuItem; import org.openide.util.NbBundle; | import java.text.*; import javax.swing.*; import org.openide.util.*; | [
"java.text",
"javax.swing",
"org.openide.util"
] | java.text; javax.swing; org.openide.util; | 191,748 |
private void tryToGetAudioFocus() {
if (mAudioFocus != AudioFocus.FOCUS
&& mAudioManager != null
&& (AudioManager.AUDIOFOCUS_REQUEST_GRANTED == mAudioManager.requestAudioFocus( this,
... | void function() { if (mAudioFocus != AudioFocus.FOCUS && mAudioManager != null && (AudioManager.AUDIOFOCUS_REQUEST_GRANTED == mAudioManager.requestAudioFocus( this, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN)) ) { mAudioFocus = AudioFocus.FOCUS; } } | /**
* Requests the audio focus to the Audio Manager
*/ | Requests the audio focus to the Audio Manager | tryToGetAudioFocus | {
"repo_name": "SmruthiManjunath/owncloud_friends",
"path": "src/com/owncloud/android/media/MediaService.java",
"license": "gpl-2.0",
"size": 26295
} | [
"android.media.AudioManager"
] | import android.media.AudioManager; | import android.media.*; | [
"android.media"
] | android.media; | 1,377,810 |
public StorageUnitNotificationRegistration updateStorageUnitNotificationRegistration(NotificationRegistrationKey notificationRegistrationKey,
StorageUnitNotificationRegistrationUpdateRequest request); | StorageUnitNotificationRegistration function(NotificationRegistrationKey notificationRegistrationKey, StorageUnitNotificationRegistrationUpdateRequest request); | /**
* Updates an existing storage unit notification by key.
*
* @param notificationRegistrationKey the storage unit notification registration key
*
* @return the storage unit notification registration that got updated
*/ | Updates an existing storage unit notification by key | updateStorageUnitNotificationRegistration | {
"repo_name": "kusid/herd",
"path": "herd-code/herd-service/src/main/java/org/finra/herd/service/StorageUnitNotificationRegistrationService.java",
"license": "apache-2.0",
"size": 3833
} | [
"org.finra.herd.model.api.xml.NotificationRegistrationKey",
"org.finra.herd.model.api.xml.StorageUnitNotificationRegistration",
"org.finra.herd.model.api.xml.StorageUnitNotificationRegistrationUpdateRequest"
] | import org.finra.herd.model.api.xml.NotificationRegistrationKey; import org.finra.herd.model.api.xml.StorageUnitNotificationRegistration; import org.finra.herd.model.api.xml.StorageUnitNotificationRegistrationUpdateRequest; | import org.finra.herd.model.api.xml.*; | [
"org.finra.herd"
] | org.finra.herd; | 560,491 |
public final void update(Element element) {
update(element.getAttribute("name"), element.getAttribute("address"),
Integer.parseInt(element.getAttribute("port")),
Integer.parseInt(element.getAttribute("slotsAvailable")),
Integer.parseInt(element.getAttribute("curr... | final void function(Element element) { update(element.getAttribute("name"), element.getAttribute(STR), Integer.parseInt(element.getAttribute("port")), Integer.parseInt(element.getAttribute(STR)), Integer.parseInt(element.getAttribute(STR)), Boolean.parseBoolean(element.getAttribute(STR)), element.getAttribute(STR), Int... | /**
* Update the server info from an element.
*
* @param element The <code>Element</code> to update from.
*/ | Update the server info from an element | update | {
"repo_name": "edijman/SOEN_6431_Colonization_Game",
"path": "src/net/sf/freecol/common/ServerInfo.java",
"license": "gpl-2.0",
"size": 7394
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,658,970 |
public void buildReport(Explanation explanation, Object stream) {
if (explanation == null) {
throw new ExplanationException("The entered explanation must not be null");
}
if (stream == null) {
throw new ExplanationException("The entered stream must not be null");
... | void function(Explanation explanation, Object stream) { if (explanation == null) { throw new ExplanationException(STR); } if (stream == null) { throw new ExplanationException(STR); } insertHeader(explanation, stream); ArrayList<ExplanationChunk> chunks = explanation.getChunks(); for (int i = 0; i < chunks.size(); i++) ... | /**
* Creates a report based on the provided explanation and writes it to the
* provided output stream.
*
* @param explanation the explanation that needs to be transformed into a
* report
* @param stream output stream to which the report is to be written
*
* @throws org.goodolda... | Creates a report based on the provided explanation and writes it to the provided output stream | buildReport | {
"repo_name": "bojantomic/jeff",
"path": "src/main/java/org/goodoldai/jeff/report/ReportBuilder.java",
"license": "lgpl-3.0",
"size": 6730
} | [
"java.util.ArrayList",
"org.goodoldai.jeff.explanation.Explanation",
"org.goodoldai.jeff.explanation.ExplanationChunk",
"org.goodoldai.jeff.explanation.ExplanationException"
] | import java.util.ArrayList; import org.goodoldai.jeff.explanation.Explanation; import org.goodoldai.jeff.explanation.ExplanationChunk; import org.goodoldai.jeff.explanation.ExplanationException; | import java.util.*; import org.goodoldai.jeff.explanation.*; | [
"java.util",
"org.goodoldai.jeff"
] | java.util; org.goodoldai.jeff; | 1,969,733 |
public synchronized void addTreeChangeListener(String treeName, TreeChangeListener listener) {
if (treeName == VALUE && this.hasNoListeners()) {
this.engageModels();
}
super.addTreeChangeListener(treeName, listener);
}
| synchronized void function(String treeName, TreeChangeListener listener) { if (treeName == VALUE && this.hasNoListeners()) { this.engageModels(); } super.addTreeChangeListener(treeName, listener); } | /**
* Extend to start listening to the models if necessary.
* @see org.eclipse.persistence.tools.workbench.utility.Model#addTreeChangeListener(String, TreeChangeListener)
*/ | Extend to start listening to the models if necessary | addTreeChangeListener | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/AspectAdapter.java",
"license": "epl-1.0",
"size": 13859
} | [
"org.eclipse.persistence.tools.workbench.utility.events.TreeChangeListener"
] | import org.eclipse.persistence.tools.workbench.utility.events.TreeChangeListener; | import org.eclipse.persistence.tools.workbench.utility.events.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 2,349,428 |
public void testSerialization() {
IntervalCategoryItemLabelGenerator g1
= new IntervalCategoryItemLabelGenerator(
"{3} - {4}", DateFormat.getInstance()
);
IntervalCategoryItemLabelGenerator g2 = null;
try {
ByteArrayOutputStream buffer =... | void function() { IntervalCategoryItemLabelGenerator g1 = new IntervalCategoryItemLabelGenerator( STR, DateFormat.getInstance() ); IntervalCategoryItemLabelGenerator g2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(g1); out.c... | /**
* Serialize an instance, restore it, and check for equality.
*/ | Serialize an instance, restore it, and check for equality | testSerialization | {
"repo_name": "SpoonLabs/astor",
"path": "examples/chart_11/tests/org/jfree/chart/labels/junit/IntervalCategoryLabelGeneratorTests.java",
"license": "gpl-2.0",
"size": 5176
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.ObjectInput",
"java.io.ObjectInputStream",
"java.io.ObjectOutput",
"java.io.ObjectOutputStream",
"java.text.DateFormat",
"org.jfree.chart.labels.IntervalCategoryItemLabelGenerator"
] | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.text.DateFormat; import org.jfree.chart.labels.IntervalCategoryItemLabelGenerator; | import java.io.*; import java.text.*; import org.jfree.chart.labels.*; | [
"java.io",
"java.text",
"org.jfree.chart"
] | java.io; java.text; org.jfree.chart; | 212,107 |
Observable<ServiceResponse<List<Double>>> getFloatValidAsync(); | Observable<ServiceResponse<List<Double>>> getFloatValidAsync(); | /**
* Get float array value [0, -0.01, 1.2e20].
*
* @return the observable to the List<Double> object
*/ | Get float array value [0, -0.01, 1.2e20] | getFloatValidAsync | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyarray/Arrays.java",
"license": "mit",
"size": 72234
} | [
"com.microsoft.rest.ServiceResponse",
"java.util.List"
] | import com.microsoft.rest.ServiceResponse; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,501,152 |
public static boolean isFileLocked(File file) {
boolean isLocked = false;
FileOutputStream input = null;
FileLock lock = null;
if (!file.exists()) {
return false;
}
try {
input = new FileOutputStream(file);
FileChannel fileChannel = input.getChannel();
lock = fileChannel.tryLock();
if (... | static boolean function(File file) { boolean isLocked = false; FileOutputStream input = null; FileLock lock = null; if (!file.exists()) { return false; } try { input = new FileOutputStream(file); FileChannel fileChannel = input.getChannel(); lock = fileChannel.tryLock(); if (lock == null) isLocked = true; else lock.rel... | /**
* Uses Java 1.4's FileLock class to test for a file lock
*
* @param file
* @return
*/ | Uses Java 1.4's FileLock class to test for a file lock | isFileLocked | {
"repo_name": "sakim/snownote",
"path": "org.eclipse.epf.richtext/src/org/eclipse/epf/common/utils/FileUtil.java",
"license": "epl-1.0",
"size": 27931
} | [
"java.io.File",
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"java.io.IOException",
"java.nio.channels.FileChannel",
"java.nio.channels.FileLock",
"java.nio.channels.OverlappingFileLockException"
] | import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; import java.nio.channels.OverlappingFileLockException; | import java.io.*; import java.nio.channels.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,056,624 |
protected void emit_XFunctionTypeRef___LeftParenthesisKeyword_0_0_RightParenthesisKeyword_0_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
| void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); } | /**
* Syntax:
* ('(' ')')?
*/ | Syntax: ('(' ')') | emit_XFunctionTypeRef___LeftParenthesisKeyword_0_0_RightParenthesisKeyword_0_2__q | {
"repo_name": "lunifera/lunifera-dsl",
"path": "org.lunifera.dsl.common.xtext/src-gen/org/lunifera/dsl/common/xtext/serializer/AbstractCommonGrammarSyntacticSequencer.java",
"license": "epl-1.0",
"size": 8390
} | [
"java.util.List",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.nodemodel.INode",
"org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider"
] | import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider; | import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.xtext"
] | java.util; org.eclipse.emf; org.eclipse.xtext; | 733,243 |
@SuppressWarnings("unchecked")
public static List<Coche> getCoches(){
EntityManager em = factoria.createEntityManager();
// Hacemos la consulta.
Query q = em.createQuery("SELECT u FROM Coche u");
List<Coche> lc = q.getResultList();
// Cerramos el gestor.
em.close();
return lc;
} | @SuppressWarnings(STR) static List<Coche> function(){ EntityManager em = factoria.createEntityManager(); Query q = em.createQuery(STR); List<Coche> lc = q.getResultList(); em.close(); return lc; } | /**
* Obtener todos los coches de la base de datos.
*
* @return Devuelve la lista de los coches con sus atributos que
* hay en la base de datos.
* */ | Obtener todos los coches de la base de datos | getCoches | {
"repo_name": "alvaromm/CarService",
"path": "CarService/src/paquete/CocheDB.java",
"license": "gpl-2.0",
"size": 8610
} | [
"java.util.List",
"javax.persistence.EntityManager",
"javax.persistence.Query"
] | import java.util.List; import javax.persistence.EntityManager; import javax.persistence.Query; | import java.util.*; import javax.persistence.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 1,684,106 |
protected interface Sink {
void writeHeaders(Metadata metadata, @Nullable byte[] payload);
/**
* Sends an outbound frame to the remote end point.
*
* @param frame a buffer containing the chunk of data to be sent, or {@code null} if {@code
* endOfStream} with no data to send
... | interface Sink { void function(Metadata metadata, @Nullable byte[] payload); /** * Sends an outbound frame to the remote end point. * * @param frame a buffer containing the chunk of data to be sent, or {@code null} if { * endOfStream} with no data to send * @param endOfStream {@code true} if this is the last frame; {@c... | /**
* Sends the request headers to the remote end point.
*
* @param metadata the metadata to be sent
* @param payload the payload needs to be sent in the headers if not null. Should only be used
* when sending an unary GET request
*/ | Sends the request headers to the remote end point | writeHeaders | {
"repo_name": "dapengzhang0/grpc-java",
"path": "core/src/main/java/io/grpc/internal/AbstractClientStream.java",
"license": "apache-2.0",
"size": 19093
} | [
"io.grpc.Metadata",
"javax.annotation.Nullable"
] | import io.grpc.Metadata; import javax.annotation.Nullable; | import io.grpc.*; import javax.annotation.*; | [
"io.grpc",
"javax.annotation"
] | io.grpc; javax.annotation; | 1,448,511 |
public Appender<ILoggingEvent> getAppender(String name) throws ReflectiveOperationException {
if (cache.containsKey(name)) {
return cache.get(name);
} else {
Appender<ILoggingEvent> appender = loader.load(name);
cache.put(name, appender);
return appender;
}
} | Appender<ILoggingEvent> function(String name) throws ReflectiveOperationException { if (cache.containsKey(name)) { return cache.get(name); } else { Appender<ILoggingEvent> appender = loader.load(name); cache.put(name, appender); return appender; } } | /**
* Provides the existing appender or loads the new one by appender name.
*
* @param name the name of the appender to load
* @return the loaded appender
*/ | Provides the existing appender or loads the new one by appender name | getAppender | {
"repo_name": "gnieh/logback-config",
"path": "src/main/java/org/gnieh/logback/config/ConfigAppendersCache.java",
"license": "apache-2.0",
"size": 1682
} | [
"ch.qos.logback.classic.spi.ILoggingEvent",
"ch.qos.logback.core.Appender"
] | import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.Appender; | import ch.qos.logback.classic.spi.*; import ch.qos.logback.core.*; | [
"ch.qos.logback"
] | ch.qos.logback; | 1,498,333 |
@Test(expected = InterruptedException.class)
public void whenClientTimeoutDetectedThenMainThreadIsInterrupted()
throws InterruptedException, IOException {
final long timeoutMillis = 100;
final long intervalMillis = timeoutMillis * 2; // Interval > timeout to trigger disconnection.
final ProjectWor... | @Test(expected = InterruptedException.class) void function() throws InterruptedException, IOException { final long timeoutMillis = 100; final long intervalMillis = timeoutMillis * 2; final ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, STR, tmp); workspace.setUp(); Thread.currentThr... | /**
* Verifies that a client timeout will be detected by a Nailgun NGInputStream reading from a
* blocking heartbeat stream.
*/ | Verifies that a client timeout will be detected by a Nailgun NGInputStream reading from a blocking heartbeat stream | whenClientTimeoutDetectedThenMainThreadIsInterrupted | {
"repo_name": "marcinkwiatkowski/buck",
"path": "test/com/facebook/buck/cli/DaemonIntegrationTest.java",
"license": "apache-2.0",
"size": 25608
} | [
"com.facebook.buck.testutil.integration.ProjectWorkspace",
"com.facebook.buck.testutil.integration.TestContext",
"com.facebook.buck.testutil.integration.TestDataHelper",
"com.facebook.buck.util.Threads",
"com.google.common.collect.ImmutableMap",
"java.io.IOException",
"org.junit.Assert",
"org.junit.Te... | import com.facebook.buck.testutil.integration.ProjectWorkspace; import com.facebook.buck.testutil.integration.TestContext; import com.facebook.buck.testutil.integration.TestDataHelper; import com.facebook.buck.util.Threads; import com.google.common.collect.ImmutableMap; import java.io.IOException; import org.junit.Asse... | import com.facebook.buck.testutil.integration.*; import com.facebook.buck.util.*; import com.google.common.collect.*; import java.io.*; import org.junit.*; | [
"com.facebook.buck",
"com.google.common",
"java.io",
"org.junit"
] | com.facebook.buck; com.google.common; java.io; org.junit; | 745,228 |
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");... | Observable<ServiceResponse<Page<AuthorizationRuleInner>>> function(final String resourceGroupName, final String namespaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (namespaceName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) {... | /**
* Authorization rules for a namespace.
*
ServiceResponse<PageImpl<AuthorizationRuleInner>> * @param resourceGroupName Name of the Resource group within the Azure subscription.
ServiceResponse<PageImpl<AuthorizationRuleInner>> * @param namespaceName The namespace name
* @throws IllegalArgument... | Authorization rules for a namespace | listAuthorizationRulesSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/relay/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/relay/v2017_04_01/implementation/NamespacesInner.java",
"license": "mit",
"size": 116946
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 862,603 |
@Override
public void setCreateDate(Date createDate) {
model.setCreateDate(createDate);
} | void function(Date createDate) { model.setCreateDate(createDate); } | /**
* Sets the create date of this clicks.
*
* @param createDate the create date of this clicks
*/ | Sets the create date of this clicks | setCreateDate | {
"repo_name": "peerkar/liferay-gsearch",
"path": "liferay-gsearch-workspace/modules/gsearch-click-tracking/gsearch-click-tracking-api/src/main/java/fi/soveltia/liferay/gsearch/click/tracking/model/ClicksWrapper.java",
"license": "lgpl-3.0",
"size": 6929
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,722,339 |
private Object extractTableFields(List<ScrapableField> fields, Element element, FIELD_TYPE type) throws PostProcessingException {
ArrayList extractedFields = new ArrayList();
Document temp_company_info = new Document();
for (int i = 0; i < fields.size(); i++) {
Document ext... | Object function(List<ScrapableField> fields, Element element, FIELD_TYPE type) throws PostProcessingException { ArrayList extractedFields = new ArrayList(); Document temp_company_info = new Document(); for (int i = 0; i < fields.size(); i++) { Document extracted_content = getSelectedElement(fields.get(i), element); if ... | /**
* extracts data from the specified table fields
*
* @param tableSelector: CSS table selector
* @param fields: list of table fields
* @return an ArrayList of HashMap (corresponds to the extracted table
* fields)
*/ | extracts data from the specified table fields | extractTableFields | {
"repo_name": "MKLab-ITI/easIE",
"path": "src/main/java/certh/iti/mklab/easie/extractors/TableFieldExtractor.java",
"license": "apache-2.0",
"size": 4222
} | [
"java.util.ArrayList",
"java.util.List",
"org.bson.Document",
"org.jsoup.nodes.Element"
] | import java.util.ArrayList; import java.util.List; import org.bson.Document; import org.jsoup.nodes.Element; | import java.util.*; import org.bson.*; import org.jsoup.nodes.*; | [
"java.util",
"org.bson",
"org.jsoup.nodes"
] | java.util; org.bson; org.jsoup.nodes; | 160,081 |
Future<Object> asyncCallbackRequestBody(String endpointUri, Object body, Synchronization onCompletion); | Future<Object> asyncCallbackRequestBody(String endpointUri, Object body, Synchronization onCompletion); | /**
* Sends an asynchronous body to the given endpoint.
* Uses an {@link ExchangePattern#InOut} message exchange pattern.
*
* @param endpointUri the endpoint URI to send the exchange to
* @param body the body to send
* @param onCompletion callback invoked when exchange has been... | Sends an asynchronous body to the given endpoint. Uses an <code>ExchangePattern#InOut</code> message exchange pattern | asyncCallbackRequestBody | {
"repo_name": "jmandawg/camel",
"path": "camel-core/src/main/java/org/apache/camel/ProducerTemplate.java",
"license": "apache-2.0",
"size": 55517
} | [
"java.util.concurrent.Future",
"org.apache.camel.spi.Synchronization"
] | import java.util.concurrent.Future; import org.apache.camel.spi.Synchronization; | import java.util.concurrent.*; import org.apache.camel.spi.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 646,115 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.