method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private int readDeflated(byte[] buffer, int start, int length) throws IOException { int read = readFromInflater(buffer, start, length); if (read == 0) { if (inf.finished()) { return -1; } else if (inf.needsDictionary()) { throw new ZipE...
int function(byte[] buffer, int start, int length) throws IOException { int read = readFromInflater(buffer, start, length); if (read == 0) { if (inf.finished()) { return -1; } else if (inf.needsDictionary()) { throw new ZipException(STR + STR + STR); } else if (buf.lengthOfLastRead == -1) { throw new IOException(STR); ...
/** * Implementation of read for DEFLATED entries. */
Implementation of read for DEFLATED entries
readDeflated
{ "repo_name": "wspeirs/sop4j-base", "path": "src/main/java/com/sop4j/base/apache/compress/archivers/zip/ZipArchiveInputStream.java", "license": "apache-2.0", "size": 37230 }
[ "java.io.IOException", "java.util.zip.ZipException" ]
import java.io.IOException; import java.util.zip.ZipException;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
682,882
public void testSetNullRecordedException() { PortalException pe = new PortalException("Dummy message"); pe.initCause(null); }
void function() { PortalException pe = new PortalException(STR); pe.initCause(null); }
/** * Test that calling the deprecated legacy method * setRecordedException(null) does not throw any exceptions. */
Test that calling the deprecated legacy method setRecordedException(null) does not throw any exceptions
testSetNullRecordedException
{ "repo_name": "apetro/uPortal", "path": "uportal-war/src/test/java/org/apereo/portal/PortalExceptionTest.java", "license": "apache-2.0", "size": 2302 }
[ "org.apereo.portal.PortalException" ]
import org.apereo.portal.PortalException;
import org.apereo.portal.*;
[ "org.apereo.portal" ]
org.apereo.portal;
904,231
public List<Long> df(org.apache.hadoop.thriftfs.api.RequestContext ctx) throws org.apache.thrift.TException;
List<Long> function(org.apache.hadoop.thriftfs.api.RequestContext ctx) throws org.apache.thrift.TException;
/** * Return a list containing: * (index 0) The total storage capacity of the file system (in bytes). * (index 1) The total used space of the file system (in bytes). * (index 2) The available storage of the file system (in bytes). * * @param ctx */
Return a list containing: (index 0) The total storage capacity of the file system (in bytes). (index 1) The total used space of the file system (in bytes). (index 2) The available storage of the file system (in bytes)
df
{ "repo_name": "vmanoria/bluemix-hue-filebrowser", "path": "hue-3.8.1-bluemix/desktop/libs/hadoop/java/src/main/gen-java/org/apache/hadoop/thriftfs/api/Namenode.java", "license": "gpl-2.0", "size": 798351 }
[ "java.util.List", "org.apache.thrift.TException" ]
import java.util.List; import org.apache.thrift.TException;
import java.util.*; import org.apache.thrift.*;
[ "java.util", "org.apache.thrift" ]
java.util; org.apache.thrift;
1,766,623
@Override public void onClick(View view) { if ( onMenu ) { closeMenu(); return; } Button b0 = (Button)view; if ( b0 == mImage ) { if ( mMenu.getVisibility() == View.VISIBLE ) { mMenu.setVisibility( View.GONE ); onMenu = false; } else { mMenu.setVis...
void function(View view) { if ( onMenu ) { closeMenu(); return; } Button b0 = (Button)view; if ( b0 == mImage ) { if ( mMenu.getVisibility() == View.VISIBLE ) { mMenu.setVisibility( View.GONE ); onMenu = false; } else { mMenu.setVisibility( View.VISIBLE ); onMenu = true; } return; } int k1 = 0; if ( k1 < mNrButton1 && ...
/** implements user taps * @param view tapped view */
implements user taps
onClick
{ "repo_name": "marcocorvi/topodroid", "path": "src/com/topodroid/tdm/TdManagerActivity.java", "license": "gpl-3.0", "size": 13452 }
[ "android.view.View", "android.widget.Button" ]
import android.view.View; import android.widget.Button;
import android.view.*; import android.widget.*;
[ "android.view", "android.widget" ]
android.view; android.widget;
220,587
protected final IndexResponse index(String index, String type, String id, Map<String, Object> source) { return client().prepareIndex(index, type, id).setSource(source).execute().actionGet(); }
final IndexResponse function(String index, String type, String id, Map<String, Object> source) { return client().prepareIndex(index, type, id).setSource(source).execute().actionGet(); }
/** * Syntactic sugar for: * <pre> * client().prepareIndex(index, type).setSource(source).execute().actionGet(); * </pre> */
Syntactic sugar for: <code> client().prepareIndex(index, type).setSource(source).execute().actionGet(); </code>
index
{ "repo_name": "Ansh90/elasticsearch", "path": "core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java", "license": "apache-2.0", "size": 97784 }
[ "java.util.Map", "org.elasticsearch.action.index.IndexResponse" ]
import java.util.Map; import org.elasticsearch.action.index.IndexResponse;
import java.util.*; import org.elasticsearch.action.index.*;
[ "java.util", "org.elasticsearch.action" ]
java.util; org.elasticsearch.action;
1,766,360
@Override public void setCreator(final String creator) { this.creator = Lists.create(creator); }
void function(final String creator) { this.creator = Lists.create(creator); }
/** * Sets the DublinCore module creator. Convenience method that can be used when there is only * one creator to set. * <p> * * @param creator the DublinCore module creator to set, <b>null</b> if none. * */
Sets the DublinCore module creator. Convenience method that can be used when there is only one creator to set.
setCreator
{ "repo_name": "bibliolabs/rome", "path": "rome/src/main/java/com/rometools/rome/feed/module/DCModuleImpl.java", "license": "apache-2.0", "size": 26632 }
[ "com.rometools.utils.Lists" ]
import com.rometools.utils.Lists;
import com.rometools.utils.*;
[ "com.rometools.utils" ]
com.rometools.utils;
280,069
public boolean sendSingle(String from, Collection<String> to, Collection<String> cc, Collection<String> bcc) { return sendSingle(from, to, cc, bcc, hasHtmlText()); }
boolean function(String from, Collection<String> to, Collection<String> cc, Collection<String> bcc) { return sendSingle(from, to, cc, bcc, hasHtmlText()); }
/** * Sends this email to the recipients specified. * If an HTML format has been included in the template, then a call * with the {@code html} parameter as {@code true} will attempt * to send the email as a multipart/alternative MIME type. * * @param from email sender * @param to email recipients ...
Sends this email to the recipients specified. If an HTML format has been included in the template, then a call with the html parameter as true will attempt to send the email as a multipart/alternative MIME type
sendSingle
{ "repo_name": "gforghetti/jenkins-tomcat-wildbook", "path": "src/main/java/org/ecocean/EmailTemplate.java", "license": "gpl-2.0", "size": 37236 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
43,978
public void show(User selectedAssignee) { if (collaborators == null) { load(selectedAssignee); return; } final ArrayList<User> users = new ArrayList<>( collaborators.values()); int checked = -1; if (selectedAssignee != null) ...
void function(User selectedAssignee) { if (collaborators == null) { load(selectedAssignee); return; } final ArrayList<User> users = new ArrayList<>( collaborators.values()); int checked = -1; if (selectedAssignee != null) for (int i = 0; i < users.size(); i++) if (selectedAssignee.getLogin().equals(users.get(i).getLogi...
/** * Show dialog with given assignee selected * * @param selectedAssignee */
Show dialog with given assignee selected
show
{ "repo_name": "esironal/PocketHub", "path": "app/src/main/java/com/github/pockethub/ui/issue/AssigneeDialog.java", "license": "apache-2.0", "size": 4131 }
[ "java.util.ArrayList", "org.eclipse.egit.github.core.User" ]
import java.util.ArrayList; import org.eclipse.egit.github.core.User;
import java.util.*; import org.eclipse.egit.github.core.*;
[ "java.util", "org.eclipse.egit" ]
java.util; org.eclipse.egit;
1,199,666
public WebAppStackCollection withValue(List<WebAppStackInner> value) { this.value = value; return this; }
WebAppStackCollection function(List<WebAppStackInner> value) { this.value = value; return this; }
/** * Set the value property: Collection of resources. * * @param value the value value to set. * @return the WebAppStackCollection object itself. */
Set the value property: Collection of resources
withValue
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/WebAppStackCollection.java", "license": "mit", "size": 2145 }
[ "com.azure.resourcemanager.appservice.fluent.models.WebAppStackInner", "java.util.List" ]
import com.azure.resourcemanager.appservice.fluent.models.WebAppStackInner; import java.util.List;
import com.azure.resourcemanager.appservice.fluent.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
672,747
public String getShortName(OWLEntity e) { return pm.getShortForm(e); }
String function(OWLEntity e) { return pm.getShortForm(e); }
/** * Gets the short name (without namespaces) of an OWL 2 entity. * @param e An OWL 2 entity. * @return Short name of e. */
Gets the short name (without namespaces) of an OWL 2 entity
getShortName
{ "repo_name": "eschwert/DL-Learner", "path": "components-core/src/main/java/org/dllearner/utilities/FuzzyOwl2.java", "license": "gpl-3.0", "size": 63381 }
[ "org.semanticweb.owlapi.model.OWLEntity" ]
import org.semanticweb.owlapi.model.OWLEntity;
import org.semanticweb.owlapi.model.*;
[ "org.semanticweb.owlapi" ]
org.semanticweb.owlapi;
545,922
public @Nonnull Iterable<NetworkInterface> listNetworkInterfacesInVLAN(@Nonnull String vlanId) throws CloudException, InternalException;
@Nonnull Iterable<NetworkInterface> function(@Nonnull String vlanId) throws CloudException, InternalException;
/** * Lists all network interfaces connected to a specific VLAN. Valid only if the cloud provider supports VLANs. * @param vlanId the VLAN ID for the VLAN in which you are searching * @return all interfaces within the specified VLAN * @throws CloudException an error occurred in the cloud identifying...
Lists all network interfaces connected to a specific VLAN. Valid only if the cloud provider supports VLANs
listNetworkInterfacesInVLAN
{ "repo_name": "maksimov/dasein-cloud-core", "path": "src/main/java/org/dasein/cloud/network/VLANSupport.java", "license": "apache-2.0", "size": 44522 }
[ "javax.annotation.Nonnull", "org.dasein.cloud.CloudException", "org.dasein.cloud.InternalException" ]
import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException;
import javax.annotation.*; import org.dasein.cloud.*;
[ "javax.annotation", "org.dasein.cloud" ]
javax.annotation; org.dasein.cloud;
1,575,154
public static void toStreamEscaped(Writer out, Reader in) throws IOException { if (in == null) return; int ch; while ((ch = in.read()) >= 0) { switch (ch) { case '<': out.write("&lt;"); break; case '>': out.write("&gt;"); break; case...
static void function(Writer out, Reader in) throws IOException { if (in == null) return; int ch; while ((ch = in.read()) >= 0) { switch (ch) { case '<': out.write("&lt;"); break; case '>': out.write("&gt;"); break; case '&': out.write("&amp;"); break; case '\'': out.write(STR); break; case 'STR&#034;"); break; default:...
/** * Write to the stream escaping XML reserved characters. * * @param out the output stream. * @param in the value to be converted. */
Write to the stream escaping XML reserved characters
toStreamEscaped
{ "repo_name": "CleverCloud/Quercus", "path": "resin/src/main/java/com/caucho/el/Expr.java", "license": "gpl-2.0", "size": 34046 }
[ "java.io.IOException", "java.io.Reader", "java.io.Writer" ]
import java.io.IOException; import java.io.Reader; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
1,958,211
public void testCaseInsensitiveMatching() { DirectFeed feed = new DirectFeed(); feed.setBaseTitle("The Title"); StandardArticle article = new StandardArticle(""); article.setTitle("some article"); feed.appendArticle(article); assertTrue(FeedTitlePrope...
void function() { DirectFeed feed = new DirectFeed(); feed.setBaseTitle(STR); StandardArticle article = new StandardArticle(STRsome articleSTRtitle")); }
/** * Tests case-insensitive matching of titles. */
Tests case-insensitive matching of titles
testCaseInsensitiveMatching
{ "repo_name": "pitosalas/blogbridge", "path": "test/com/salas/bb/domain/query/articles/TestFeedTitleProperty.java", "license": "gpl-2.0", "size": 1935 }
[ "com.salas.bb.domain.DirectFeed", "com.salas.bb.domain.StandardArticle" ]
import com.salas.bb.domain.DirectFeed; import com.salas.bb.domain.StandardArticle;
import com.salas.bb.domain.*;
[ "com.salas.bb" ]
com.salas.bb;
2,543,122
List<Asset> getPostExportDefineTimeDependentAssets(BundlableNode bundlableNode) throws ModelOperationException;
List<Asset> getPostExportDefineTimeDependentAssets(BundlableNode bundlableNode) throws ModelOperationException;
/** * Returns the list of dependencies that happen to be required at define-time, but which are not needed for the * source-module to actually define itself. * * @param bundlableNode The bundlable node for which a bundle-set is being generated. * @return The list of dependent assets * @throws ModelOperatio...
Returns the list of dependencies that happen to be required at define-time, but which are not needed for the source-module to actually define itself
getPostExportDefineTimeDependentAssets
{ "repo_name": "janhancic/brjs", "path": "brjs-core/src/main/java/org/bladerunnerjs/api/SourceModule.java", "license": "lgpl-3.0", "size": 1808 }
[ "java.util.List", "org.bladerunnerjs.api.model.exception.ModelOperationException" ]
import java.util.List; import org.bladerunnerjs.api.model.exception.ModelOperationException;
import java.util.*; import org.bladerunnerjs.api.model.exception.*;
[ "java.util", "org.bladerunnerjs.api" ]
java.util; org.bladerunnerjs.api;
1,870,790
public void setLogDir(File logDir) { this.logDir = logDir; }
void function(File logDir) { this.logDir = logDir; }
/** * Set the logs directory. * * @param logDir - Log directory. */
Set the logs directory
setLogDir
{ "repo_name": "genehallman/node-berkeleydb", "path": "deps/db-18.1.40/util/db_gui/envpage/EnvConfig.java", "license": "mit", "size": 2973 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
366,331
public static void setStatus(Status status, VToDo vtodo) { Status currStatus = vtodo.getStatus(); if (currStatus != null) { vtodo.getProperties().remove(currStatus); } if (status != null) { vtodo.getProperties().add(status); } }
static void function(Status status, VToDo vtodo) { Status currStatus = vtodo.getStatus(); if (currStatus != null) { vtodo.getProperties().remove(currStatus); } if (status != null) { vtodo.getProperties().add(status); } }
/** * Update the STATUS property on a VTODO component. * * @param status * status to set. If null, the STATUS property will be removed * @param vtodo * vtodo component to update */
Update the STATUS property on a VTODO component
setStatus
{ "repo_name": "1and1/cosmo", "path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/calendar/ICalendarUtils.java", "license": "apache-2.0", "size": 23897 }
[ "net.fortuna.ical4j.model.component.VToDo", "net.fortuna.ical4j.model.property.Status" ]
import net.fortuna.ical4j.model.component.VToDo; import net.fortuna.ical4j.model.property.Status;
import net.fortuna.ical4j.model.component.*; import net.fortuna.ical4j.model.property.*;
[ "net.fortuna.ical4j" ]
net.fortuna.ical4j;
1,586,405
@Test public void delimiter() throws Exception { testInfo(this.getClass().getSimpleName() + " - delimiter"); try { int prefixes = 3 + random.nextInt(3); // 3-5 prefixes int keys = 2 + random.nextInt(3); // 2-5 keys int uploads = 2 + random.nextInt(3); // 2-4 uploads String delimiter...
void function() throws Exception { testInfo(this.getClass().getSimpleName() + STR); try { int prefixes = 3 + random.nextInt(3); int keys = 2 + random.nextInt(3); int uploads = 2 + random.nextInt(3); String delimiter = "/"; TreeMap<String, TreeMap<String, List<String>>> prefixKeyVersionMap = new TreeMap<String, TreeMap<...
/** * Test for verifying common prefixes using a delimiter */
Test for verifying common prefixes using a delimiter
delimiter
{ "repo_name": "sjones4/eutester", "path": "eutester4j/com/eucalyptus/tests/awssdk/S3ListVersionsTests.java", "license": "bsd-2-clause", "size": 87846 }
[ "com.amazonaws.AmazonServiceException", "com.amazonaws.services.s3.model.VersionListing", "com.eucalyptus.tests.awssdk.Eutester4j", "java.util.Collections", "java.util.LinkedList", "java.util.List", "java.util.TreeMap", "org.testng.AssertJUnit" ]
import com.amazonaws.AmazonServiceException; import com.amazonaws.services.s3.model.VersionListing; import com.eucalyptus.tests.awssdk.Eutester4j; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.TreeMap; import org.testng.AssertJUnit;
import com.amazonaws.*; import com.amazonaws.services.s3.model.*; import com.eucalyptus.tests.awssdk.*; import java.util.*; import org.testng.*;
[ "com.amazonaws", "com.amazonaws.services", "com.eucalyptus.tests", "java.util", "org.testng" ]
com.amazonaws; com.amazonaws.services; com.eucalyptus.tests; java.util; org.testng;
1,703,012
public final void setSecurityName(OctetString securityName) { this.securityName = securityName; }
final void function(OctetString securityName) { this.securityName = securityName; }
/** * Sets the security name to be used with this target. * @param securityName * an <code>OctetString</code> instance (must not be <code>null</code>). * @see #getSecurityName() */
Sets the security name to be used with this target
setSecurityName
{ "repo_name": "LoloCDF/Zinlok", "path": "libs/snmp4j-2.4.3/src/main/java/org/snmp4j/AbstractTarget.java", "license": "gpl-3.0", "size": 9271 }
[ "org.snmp4j.smi.OctetString" ]
import org.snmp4j.smi.OctetString;
import org.snmp4j.smi.*;
[ "org.snmp4j.smi" ]
org.snmp4j.smi;
2,588,950
public void configureHTTPPipeline(SocketChannel ch, ListenerConfiguration listenerConfiguration) { ChannelPipeline p = ch.pipeline(); // Removed the default encoder since http/2 version upgrade already added to pipeline if (RequestSizeValidationConfiguration.getInstance().isHeaderSizeValidat...
void function(SocketChannel ch, ListenerConfiguration listenerConfiguration) { ChannelPipeline p = ch.pipeline(); if (RequestSizeValidationConfiguration.getInstance().isHeaderSizeValidation()) { p.addLast(STR, new CustomHttpRequestDecoder()); } else { p.addLast(STR, new HttpRequestDecoder()); } if (RequestSizeValidatio...
/** * Configure the pipeline if user sent HTTP requests * * @param ch Channel * @param listenerConfiguration Listener Configuration */
Configure the pipeline if user sent HTTP requests
configureHTTPPipeline
{ "repo_name": "thusithathilina/carbon-transports", "path": "http/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/listener/HTTPServerChannelInitializer.java", "license": "apache-2.0", "size": 8593 }
[ "io.netty.channel.ChannelPipeline", "io.netty.channel.socket.SocketChannel", "io.netty.handler.codec.http.HttpContentCompressor", "io.netty.handler.codec.http.HttpRequestDecoder", "io.netty.handler.stream.ChunkedWriteHandler", "org.wso2.carbon.transport.http.netty.config.ListenerConfiguration", "org.wso...
import io.netty.channel.ChannelPipeline; import io.netty.channel.socket.SocketChannel; import io.netty.handler.codec.http.HttpContentCompressor; import io.netty.handler.codec.http.HttpRequestDecoder; import io.netty.handler.stream.ChunkedWriteHandler; import org.wso2.carbon.transport.http.netty.config.ListenerConfigura...
import io.netty.channel.*; import io.netty.channel.socket.*; import io.netty.handler.codec.http.*; import io.netty.handler.stream.*; import org.wso2.carbon.transport.http.netty.config.*;
[ "io.netty.channel", "io.netty.handler", "org.wso2.carbon" ]
io.netty.channel; io.netty.handler; org.wso2.carbon;
2,717,893
public final MockResultSet aSimpleMultiColResult(final Integer index) { if (index == null) { return null; } int rsid = index.intValue(); switch(rsid) { case 0: return MockResultSetUtils.buildZerothResultSet(1); case 1: MockResultSet mrs...
final MockResultSet function(final Integer index) { if (index == null) { return null; } int rsid = index.intValue(); switch(rsid) { case 0: return MockResultSetUtils.buildZerothResultSet(1); case 1: MockResultSet mrs = new MockResultSet(STR); mrs.setResultSetMetaData(MockResultSetUtils.buildMetaData( new ColumnMetaData...
/** * Returns a single resultset with multiple columns in each row. This * is used to test the functionality of the assert-resultset-equals * assertion. * @param index the result set id. * @return a single MockResult with two rows and three columns. */
Returns a single resultset with multiple columns in each row. This is used to test the functionality of the assert-resultset-equals assertion
aSimpleMultiColResult
{ "repo_name": "ecalo/SQLUnit-5.0-Fork", "path": "test/java/mock/SQLUnitMockDatabase.java", "license": "gpl-3.0", "size": 45758 }
[ "com.mockrunner.mock.jdbc.MockResultSet", "java.sql.Types" ]
import com.mockrunner.mock.jdbc.MockResultSet; import java.sql.Types;
import com.mockrunner.mock.jdbc.*; import java.sql.*;
[ "com.mockrunner.mock", "java.sql" ]
com.mockrunner.mock; java.sql;
210,812
public Contentlet checkin(Contentlet contentlet, Map<Relationship, List<Contentlet>> contentRelationships, List<Category> cats ,List<Permission> permissions, User user,boolean respectFrontendRoles) throws IllegalArgumentException,DotDataException,DotSecurityException, DotContentletStateException, DotContentletValida...
Contentlet function(Contentlet contentlet, Map<Relationship, List<Contentlet>> contentRelationships, List<Category> cats ,List<Permission> permissions, User user,boolean respectFrontendRoles) throws IllegalArgumentException,DotDataException,DotSecurityException, DotContentletStateException, DotContentletValidationExcep...
/** * Will check in a new version of you contentlet. The inode of your contentlet must be 0. * Note that the contentlet argument must be obtained using checkout methods. * @param contentlet - The inode of your contentlet must be 0. * @param contentRelationships - throws IllegalArgumentException if null. Used ...
Will check in a new version of you contentlet. The inode of your contentlet must be 0. Note that the contentlet argument must be obtained using checkout methods
checkin
{ "repo_name": "zhiqinghuang/core", "path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPI.java", "license": "gpl-3.0", "size": 64036 }
[ "com.dotmarketing.beans.Permission", "com.dotmarketing.exception.DotDataException", "com.dotmarketing.exception.DotSecurityException", "com.dotmarketing.portlets.categories.model.Category", "com.dotmarketing.portlets.contentlet.model.Contentlet", "com.dotmarketing.portlets.structure.model.Relationship", ...
import com.dotmarketing.beans.Permission; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.dotmarketing.portlets.categories.model.Category; import com.dotmarketing.portlets.contentlet.model.Contentlet; import com.dotmarketing.portlets.structure.model...
import com.dotmarketing.beans.*; import com.dotmarketing.exception.*; import com.dotmarketing.portlets.categories.model.*; import com.dotmarketing.portlets.contentlet.model.*; import com.dotmarketing.portlets.structure.model.*; import com.liferay.portal.model.*; import java.util.*;
[ "com.dotmarketing.beans", "com.dotmarketing.exception", "com.dotmarketing.portlets", "com.liferay.portal", "java.util" ]
com.dotmarketing.beans; com.dotmarketing.exception; com.dotmarketing.portlets; com.liferay.portal; java.util;
1,733,290
// methods ===================================================================== public void execute() throws SQLException { Connection con = null; boolean autoCommit = true; if (getUuids().length > 0) { // intitalize PreparedStatement stJobsDelete = null; PreparedStatement stCompletedJobsDe...
void function() throws SQLException { Connection con = null; boolean autoCommit = true; if (getUuids().length > 0) { PreparedStatement stJobsDelete = null; PreparedStatement stCompletedJobsDelete = null; PreparedStatement stHistoryDelete = null; ImsMetadataAdminDao adminDao = new ImsMetadataAdminDao(getRequestContext()...
/** * Executes request. * @throws java.sql.SQLException if request execution fails */
Executes request
execute
{ "repo_name": "usgin/usgin-geoportal", "path": "src/com/esri/gpt/catalog/harvest/repository/HrDeleteRequest.java", "license": "apache-2.0", "size": 6752 }
[ "com.esri.gpt.catalog.arcims.ImsMetadataAdminDao", "com.esri.gpt.framework.sql.ManagedConnection", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import com.esri.gpt.catalog.arcims.ImsMetadataAdminDao; import com.esri.gpt.framework.sql.ManagedConnection; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException;
import com.esri.gpt.catalog.arcims.*; import com.esri.gpt.framework.sql.*; import java.sql.*;
[ "com.esri.gpt", "java.sql" ]
com.esri.gpt; java.sql;
1,738,986
public GVTGlyphVector createGlyphVector(FontRenderContext frc, char[] chars) { StringCharacterIterator sci = new StringCharacterIterator(new String(chars)); return createGlyphVector(frc, sci); }
GVTGlyphVector function(FontRenderContext frc, char[] chars) { StringCharacterIterator sci = new StringCharacterIterator(new String(chars)); return createGlyphVector(frc, sci); }
/** * Returns a new GVTGlyphVector object for the specified array of * characters. * * @param frc The current font render context. * @param chars The array of chars that the glyph vector will represent. * * @return The new glyph vector. */
Returns a new GVTGlyphVector object for the specified array of characters
createGlyphVector
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/bridge/SVGGVTFont.java", "license": "apache-2.0", "size": 32318 }
[ "java.awt.font.FontRenderContext", "java.text.StringCharacterIterator", "org.apache.batik.gvt.font.GVTGlyphVector" ]
import java.awt.font.FontRenderContext; import java.text.StringCharacterIterator; import org.apache.batik.gvt.font.GVTGlyphVector;
import java.awt.font.*; import java.text.*; import org.apache.batik.gvt.font.*;
[ "java.awt", "java.text", "org.apache.batik" ]
java.awt; java.text; org.apache.batik;
1,870,361
XPropertySet createGridColumn( Object aGridModel, String sColumnService, String sDataField, int nWidth ) throws com.sun.star.uno.Exception { // the container to insert columns into XIndexContainer xColumnContainer = UNO.queryIndexContainer( aGridModel ); // the factory for c...
XPropertySet createGridColumn( Object aGridModel, String sColumnService, String sDataField, int nWidth ) throws com.sun.star.uno.Exception { XIndexContainer xColumnContainer = UNO.queryIndexContainer( aGridModel ); XGridColumnFactory xColumnFactory = UnoRuntime.queryInterface( XGridColumnFactory.class, aGridModel ); XI...
/** creates a column in a grid @param xGridModel specifies the model of the grid where the new column should be inserted @param sColumnService specifies the service name of the column to create (e.g. "NumericField") @param sDataField specifies the database fie...
creates a column in a grid
createGridColumn
{ "repo_name": "beppec56/core", "path": "odk/examples/DevelopersGuide/Forms/DataAwareness.java", "license": "gpl-3.0", "size": 41279 }
[ "com.sun.star.beans.XPropertySet", "com.sun.star.container.XIndexContainer", "com.sun.star.form.XGridColumnFactory", "com.sun.star.uno.UnoRuntime", "com.sun.star.uno.XInterface" ]
import com.sun.star.beans.XPropertySet; import com.sun.star.container.XIndexContainer; import com.sun.star.form.XGridColumnFactory; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface;
import com.sun.star.beans.*; import com.sun.star.container.*; import com.sun.star.form.*; import com.sun.star.uno.*;
[ "com.sun.star" ]
com.sun.star;
2,498,168
public Array<Entity> GetEntities() { _entities.clear(); for (Actor a : _stage.getActors()) { if (!(a instanceof Entity)) continue; _entities.add((Entity) a); } return _entities; }
Array<Entity> function() { _entities.clear(); for (Actor a : _stage.getActors()) { if (!(a instanceof Entity)) continue; _entities.add((Entity) a); } return _entities; }
/** * Gets the entities. * * @return the array */
Gets the entities
GetEntities
{ "repo_name": "DDuarte/feup-lpoo-maze_and_bombermen", "path": "bombermen2/bombermen/src/pt/up/fe/lpoo/bombermen/Game.java", "license": "mit", "size": 9877 }
[ "com.badlogic.gdx.scenes.scene2d.Actor", "com.badlogic.gdx.utils.Array" ]
import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.scenes.scene2d.*; import com.badlogic.gdx.utils.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
1,672,302
public Set<Property> getAllValuesOfprop(final SignalPropertyMultipleMatch partialMatch) { return rawAccumulateAllValuesOfprop(partialMatch.toArray()); }
Set<Property> function(final SignalPropertyMultipleMatch partialMatch) { return rawAccumulateAllValuesOfprop(partialMatch.toArray()); }
/** * Retrieve the set of values that occur in matches for prop. * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches * */
Retrieve the set of values that occur in matches for prop
getAllValuesOfprop
{ "repo_name": "ELTE-Soft/xUML-RT-Executor", "path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/SignalPropertyMultipleMatcher.java", "license": "epl-1.0", "size": 13700 }
[ "hu.eltesoft.modelexecution.validation.SignalPropertyMultipleMatch", "java.util.Set", "org.eclipse.uml2.uml.Property" ]
import hu.eltesoft.modelexecution.validation.SignalPropertyMultipleMatch; import java.util.Set; import org.eclipse.uml2.uml.Property;
import hu.eltesoft.modelexecution.validation.*; import java.util.*; import org.eclipse.uml2.uml.*;
[ "hu.eltesoft.modelexecution", "java.util", "org.eclipse.uml2" ]
hu.eltesoft.modelexecution; java.util; org.eclipse.uml2;
2,237,986
private HashMap<String, String> parseServerResponse(final String response) { HashMap<String, String> map = new HashMap<String, String>(); String[] pairs = response.split(","); for (String pair : pairs) { String[] parts = pair.split("=", 2); map...
HashMap<String, String> function(final String response) { HashMap<String, String> map = new HashMap<String, String>(); String[] pairs = response.split(","); for (String pair : pairs) { String[] parts = pair.split("=", 2); map.put(parts[0], parts[1]); } return map; }
/** * The server provides back key value pairs using an = sign and delimited * by a command. All keys are also a single character. * For example: a=kg4io3,b=skljsfoiew,c=1203 */
The server provides back key value pairs using an = sign and delimited by a command. All keys are also a single character. For example: a=kg4io3,b=skljsfoiew,c=1203
parseServerResponse
{ "repo_name": "kay-kim/mongo-java-driver", "path": "driver-core/src/main/com/mongodb/connection/ScramSha1Authenticator.java", "license": "apache-2.0", "size": 11423 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,484,217
List<Indicator> getIndicatorsWithoutGroups();
List<Indicator> getIndicatorsWithoutGroups();
/** * Gets all indicators which are not assigned to any groups. */
Gets all indicators which are not assigned to any groups
getIndicatorsWithoutGroups
{ "repo_name": "uonafya/jphes-core", "path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java", "license": "bsd-3-clause", "size": 7902 }
[ "java.util.List", "org.hisp.dhis.indicator.Indicator" ]
import java.util.List; import org.hisp.dhis.indicator.Indicator;
import java.util.*; import org.hisp.dhis.indicator.*;
[ "java.util", "org.hisp.dhis" ]
java.util; org.hisp.dhis;
1,510,353
public ServerKeyType serverKeyType() { return this.innerProperties() == null ? null : this.innerProperties().serverKeyType(); }
ServerKeyType function() { return this.innerProperties() == null ? null : this.innerProperties().serverKeyType(); }
/** * Get the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. * * @return the serverKeyType value. */
Get the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'
serverKeyType
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorInner.java", "license": "mit", "size": 4550 }
[ "com.azure.resourcemanager.synapse.models.ServerKeyType" ]
import com.azure.resourcemanager.synapse.models.ServerKeyType;
import com.azure.resourcemanager.synapse.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,199,790
@ServiceMethod(returns = ReturnType.SINGLE) JobResponseInner update(String jobName, String resourceGroupName, UpdateJobParameters body);
@ServiceMethod(returns = ReturnType.SINGLE) JobResponseInner update(String jobName, String resourceGroupName, UpdateJobParameters body);
/** * Updates specific properties of a job. You can call this operation to notify the Import/Export service that the * hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be * used to cancel an existing job. * * @param jobName The name of ...
Updates specific properties of a job. You can call this operation to notify the Import/Export service that the hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also be used to cancel an existing job
update
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/storageimportexport/azure-resourcemanager-storageimportexport/src/main/java/com/azure/resourcemanager/storageimportexport/fluent/JobsClient.java", "license": "mit", "size": 11439 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.storageimportexport.fluent.models.JobResponseInner", "com.azure.resourcemanager.storageimportexport.models.UpdateJobParameters" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.storageimportexport.fluent.models.JobResponseInner; import com.azure.resourcemanager.storageimportexport.models.UpdateJobParameters;
import com.azure.core.annotation.*; import com.azure.resourcemanager.storageimportexport.fluent.models.*; import com.azure.resourcemanager.storageimportexport.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,062,959
private static int selectStyle(char ch) { switch (ch) { case 'S': return SHORT; case 'M': return MEDIUM; case 'L': return LONG; case 'F': return FULL; case '-': return NONE; default: throw...
static int function(char ch) { switch (ch) { case 'S': return SHORT; case 'M': return MEDIUM; case 'L': return LONG; case 'F': return FULL; case '-': return NONE; default: throw new IllegalArgumentException(STR + ch); } } static class StyleFormatter implements DateTimePrinter, DateTimeParser { private static final Map<...
/** * Gets the JDK style code from the Joda code. * * @param ch the Joda style code * @return the JDK style code */
Gets the JDK style code from the Joda code
selectStyle
{ "repo_name": "mnn/AutoShutdown", "path": "src/main/java/externalAS/org/joda/time/format/DateTimeFormat.java", "license": "lgpl-2.1", "size": 32767 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,887,780
public IFigure getLayer(Object key) { if (innerLayers == null) return null; IFigure layer = scaledLayers.getLayer(key); if (layer != null) return layer; layer = printableLayers.getLayer(key); if (layer != null) return layer; return innerLayers.getLayer(key); }
IFigure function(Object key) { if (innerLayers == null) return null; IFigure layer = scaledLayers.getLayer(key); if (layer != null) return layer; layer = printableLayers.getLayer(key); if (layer != null) return layer; return innerLayers.getLayer(key); }
/** * Returns the layer indicated by the key. Searches all layered panes. * * @see LayerManager#getLayer(Object) */
Returns the layer indicated by the key. Searches all layered panes
getLayer
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/gef/editparts/ScalableRootEditPart.java", "license": "epl-1.0", "size": 10760 }
[ "org.eclipse.draw2d.IFigure" ]
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
950,807
public String[] get(String prefix, String name) { String[] res = {}; lastError = ""; String ns = XMPShema.getNameSpace(prefix, name); if (ns == null) { lastError = "Namespace not found for " + prefix + ":" + name; return res; } XmpProperty property = XMPShema.getProperty(prefix, name); if (property...
String[] function(String prefix, String name) { String[] res = {}; lastError = STRNamespace not found for STR:STRProperty not found for STR:" + name; return res; } String prop = property.getProperty(); ValueType valueType = property.getValueType(); if (valueType instanceof ValueTypes.Array) { try { int count = xmpMeta....
/** * get field values from xmp * * @param prefix * namespace prefix * @param name * field name * @return field value(s) or null (check lastError in this case). IF field * is array, then all fields in array are returned, if field is * s...
get field values from xmp
get
{ "repo_name": "andronix3/SmartXMP", "path": "com/smartg/xmp/XMPCollection.java", "license": "bsd-3-clause", "size": 10432 }
[ "com.adobe.xmp.XMPException", "com.adobe.xmp.properties.XMPProperty", "com.smartg.xmp.ValueTypes", "java.util.ArrayList" ]
import com.adobe.xmp.XMPException; import com.adobe.xmp.properties.XMPProperty; import com.smartg.xmp.ValueTypes; import java.util.ArrayList;
import com.adobe.xmp.*; import com.adobe.xmp.properties.*; import com.smartg.xmp.*; import java.util.*;
[ "com.adobe.xmp", "com.smartg.xmp", "java.util" ]
com.adobe.xmp; com.smartg.xmp; java.util;
1,577,142
public BytesReader getBytesReader() { if (fst == null) { return null; } else { return fst.getBytesReader(); } }
BytesReader function() { if (fst == null) { return null; } else { return fst.getBytesReader(); } }
/** * Returns a {@link BytesReader} to pass to the {@link #get(char[], int, FST.Arc, FST.BytesReader)} method. */
Returns a <code>BytesReader</code> to pass to the <code>#get(char[], int, FST.Arc, FST.BytesReader)</code> method
getBytesReader
{ "repo_name": "visouza/solr-5.0.0", "path": "lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/StemmerOverrideFilter.java", "license": "apache-2.0", "size": 8364 }
[ "org.apache.lucene.util.fst.FST" ]
import org.apache.lucene.util.fst.FST;
import org.apache.lucene.util.fst.*;
[ "org.apache.lucene" ]
org.apache.lucene;
1,865,520
private boolean isFilenameAvailable(String path) { for (String key : downloads.keySet()) { DownloadRequest r = downloads.get(key); if (StringUtils.equals(r.getDestination(), path)) { if (BuildConfig.DEBUG) Log.d(TAG, path ...
boolean function(String path) { for (String key : downloads.keySet()) { DownloadRequest r = downloads.get(key); if (StringUtils.equals(r.getDestination(), path)) { if (BuildConfig.DEBUG) Log.d(TAG, path + STR); return false; } } if (BuildConfig.DEBUG) Log.d(TAG, path + STR); return true; }
/** * Returns true if a filename is available and false if it has already been * taken by another requested download. */
Returns true if a filename is available and false if it has already been taken by another requested download
isFilenameAvailable
{ "repo_name": "TeodorKostadinov/PodcastApp", "path": "core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java", "license": "mit", "size": 14521 }
[ "android.util.Log", "de.danoeh.antennapod.core.BuildConfig", "de.danoeh.antennapod.core.service.download.DownloadRequest", "org.apache.commons.lang3.StringUtils" ]
import android.util.Log; import de.danoeh.antennapod.core.BuildConfig; import de.danoeh.antennapod.core.service.download.DownloadRequest; import org.apache.commons.lang3.StringUtils;
import android.util.*; import de.danoeh.antennapod.core.*; import de.danoeh.antennapod.core.service.download.*; import org.apache.commons.lang3.*;
[ "android.util", "de.danoeh.antennapod", "org.apache.commons" ]
android.util; de.danoeh.antennapod; org.apache.commons;
2,166,746
@Override public void run() { Long start = System.nanoTime(); try { client.setSoTimeout(10000); } catch (SocketException e) { WebServer.triggerInternalError("Socket Timeout Set failed for socket on port " + client.getLocalPort() + ": " +...
void function() { Long start = System.nanoTime(); try { client.setSoTimeout(10000); } catch (SocketException e) { WebServer.triggerInternalError(STR + client.getLocalPort() + STR + e.getMessage()); return; } WebServer.logDebug(STR + requestID); try { in = new BufferedReader(new InputStreamReader(client.getInputStream()...
/** * Reads the Request and determines the correct Site to handle this Request. It then has the Site process this * Request */
Reads the Request and determines the correct Site to handle this Request. It then has the Site process this Request
run
{ "repo_name": "EdHurtig/jServe", "path": "src/jServe/Core/Request.java", "license": "gpl-3.0", "size": 7006 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.io.PrintWriter", "java.net.SocketException" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.SocketException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,580,589
JavaClass jclass = classParser.parse(); Repository.addClass(jclass); return jclass; } }
JavaClass jclass = classParser.parse(); Repository.addClass(jclass); return jclass; } }
/** * Parse the class file into a JavaClass object. If succesful, the new * JavaClass is entered into the Repository. * * @return the parsed JavaClass * @throws IOException * if the class cannot be parsed */
Parse the class file into a JavaClass object. If succesful, the new JavaClass is entered into the Repository
parse
{ "repo_name": "OpenNTF/FindBug-for-Domino-Designer", "path": "findBugsEclipsePlugin/src/edu/umd/cs/findbugs/ba/RepositoryClassParser.java", "license": "lgpl-3.0", "size": 2679 }
[ "org.apache.bcel.Repository", "org.apache.bcel.classfile.JavaClass" ]
import org.apache.bcel.Repository; import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.*; import org.apache.bcel.classfile.*;
[ "org.apache.bcel" ]
org.apache.bcel;
1,604,369
public void dump (PrintWriter out) { // obtain our maximum count int max = 0; for (int ii = 0; ii < BUCKET_COUNT; ii++) { if (_counts[ii] > max) { max = _counts[ii]; } } // figure out how many digits are needed to display the bigge...
void function (PrintWriter out) { int max = 0; for (int ii = 0; ii < BUCKET_COUNT; ii++) { if (_counts[ii] > max) { max = _counts[ii]; } } int digits = (int)Math.ceil(Math.log(max) / Math.log(10)); digits = Math.max(digits, 1); for (int rr = 9; rr >= 0; rr--) { out.print(StringUtil.pad(STR STR*STR STRSTR-STRSTRSTRSTRST...
/** * Dumps a text representation of this percentiler to the supplied print stream. */
Dumps a text representation of this percentiler to the supplied print stream
dump
{ "repo_name": "threerings/vilya", "path": "core/src/main/java/com/threerings/parlor/rating/util/Percentiler.java", "license": "lgpl-2.1", "size": 14772 }
[ "com.samskivert.util.StringUtil", "com.threerings.parlor.Log", "java.io.PrintWriter" ]
import com.samskivert.util.StringUtil; import com.threerings.parlor.Log; import java.io.PrintWriter;
import com.samskivert.util.*; import com.threerings.parlor.*; import java.io.*;
[ "com.samskivert.util", "com.threerings.parlor", "java.io" ]
com.samskivert.util; com.threerings.parlor; java.io;
2,263,884
public void testTemplateQueryAsEscapedString() throws Exception { SearchRequest searchRequest = new SearchRequest(); searchRequest.indices("_all"); String query = "{" + " \"template\" : \"{ \\\"size\\\": \\\"{{size}}\\\", \\\"query\\\":{\\\"match_all\\\":{}}}\"," + " \"para...
void function() throws Exception { SearchRequest searchRequest = new SearchRequest(); searchRequest.indices("_all"); String query = "{" + STRtemplate\STR{ \\\STR: \\\STR, \\\STR:{\\\STR:{}}}\"," + STRparams\":{" + STRsize\STR + STR + "}"; searchRequest.template(parseTemplate(query)); SearchResponse searchResponse = cli...
/** * Test that template can be expressed as a single escaped string. */
Test that template can be expressed as a single escaped string
testTemplateQueryAsEscapedString
{ "repo_name": "kaneshin/elasticsearch", "path": "core/src/test/java/org/elasticsearch/index/query/TemplateQueryIT.java", "license": "apache-2.0", "size": 24336 }
[ "org.elasticsearch.action.search.SearchRequest", "org.elasticsearch.action.search.SearchResponse", "org.hamcrest.Matchers" ]
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchResponse; import org.hamcrest.Matchers;
import org.elasticsearch.action.search.*; import org.hamcrest.*;
[ "org.elasticsearch.action", "org.hamcrest" ]
org.elasticsearch.action; org.hamcrest;
644,040
@NotNull @SuppressWarnings("unused") protected List<Table<String, Attribute<String>, List<Attribute<String>>>> extractTableMetadata( @Nullable final List<String> tableNames, @NotNull final Connection connection, final boolean caseSensitiveness, @NotNull final MetadataExtracti...
@SuppressWarnings(STR) List<Table<String, Attribute<String>, List<Attribute<String>>>> function( @Nullable final List<String> tableNames, @NotNull final Connection connection, final boolean caseSensitiveness, @NotNull final MetadataExtractionListener metadataExtractionListener, @NotNull final MetaLanguageUtils metaLang...
/** * Processes the schema. * @param tableNames the table names. * @param connection the database connection. * @param caseSensitiveness whether the checks are case sensitive or not. * @param metadataExtractionListener the metadata extraction listener. * @param metaLanguageUtils the {@link...
Processes the schema
extractTableMetadata
{ "repo_name": "rydnr/queryj-rt", "path": "queryj-core/src/main/java/org/acmsl/queryj/metadata/engines/oracle/OracleMetadataManager.java", "license": "gpl-2.0", "size": 26710 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.HashMap", "java.util.List", "java.util.Map", "org.acmsl.commons.logging.UniqueLogFactory", "org.acmsl.queryj.api.MetaLanguageUtils", "org.acmsl.queryj.api.exceptions.QueryJException", "...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.acmsl.commons.logging.UniqueLogFactory; import org.acmsl.queryj.api.MetaLanguageUtils; import org.acmsl.queryj.api.exc...
import java.sql.*; import java.util.*; import org.acmsl.commons.logging.*; import org.acmsl.queryj.api.*; import org.acmsl.queryj.api.exceptions.*; import org.acmsl.queryj.metadata.*; import org.acmsl.queryj.metadata.vo.*; import org.apache.commons.logging.*; import org.jetbrains.annotations.*;
[ "java.sql", "java.util", "org.acmsl.commons", "org.acmsl.queryj", "org.apache.commons", "org.jetbrains.annotations" ]
java.sql; java.util; org.acmsl.commons; org.acmsl.queryj; org.apache.commons; org.jetbrains.annotations;
191,268
public void setupReviewButton(HttpServletRequest request, CurationService curatorService, SampleBean sampleBean, SpringSecurityAclService springSecurityAclService) throws Exception { boolean publicData = springSecurityAclService.checkObjectPublic(sampleBean.getDomain().getId(), SecureClassesEnum.SAMPLE...
void function(HttpServletRequest request, CurationService curatorService, SampleBean sampleBean, SpringSecurityAclService springSecurityAclService) throws Exception { boolean publicData = springSecurityAclService.checkObjectPublic(sampleBean.getDomain().getId(), SecureClassesEnum.SAMPLE.getClazz()); if (!publicData) { ...
/** * Logic moved from SampleAction.setUpSubmitForReviewButton() * @param request * @param curatorService * @param sampleBean * @throws Exception */
Logic moved from SampleAction.setUpSubmitForReviewButton()
setupReviewButton
{ "repo_name": "NCIP/cananolab", "path": "software/cananolab-webapp/src/gov/nih/nci/cananolab/restful/view/edit/SampleEditGeneralBean.java", "license": "bsd-3-clause", "size": 12713 }
[ "gov.nih.nci.cananolab.dto.common.DataReviewStatusBean", "gov.nih.nci.cananolab.dto.particle.SampleBean", "gov.nih.nci.cananolab.security.enums.SecureClassesEnum", "gov.nih.nci.cananolab.security.service.SpringSecurityAclService", "gov.nih.nci.cananolab.security.utils.SpringSecurityUtil", "gov.nih.nci.can...
import gov.nih.nci.cananolab.dto.common.DataReviewStatusBean; import gov.nih.nci.cananolab.dto.particle.SampleBean; import gov.nih.nci.cananolab.security.enums.SecureClassesEnum; import gov.nih.nci.cananolab.security.service.SpringSecurityAclService; import gov.nih.nci.cananolab.security.utils.SpringSecurityUtil; impor...
import gov.nih.nci.cananolab.dto.common.*; import gov.nih.nci.cananolab.dto.particle.*; import gov.nih.nci.cananolab.security.enums.*; import gov.nih.nci.cananolab.security.service.*; import gov.nih.nci.cananolab.security.utils.*; import gov.nih.nci.cananolab.service.curation.*; import javax.servlet.http.*;
[ "gov.nih.nci", "javax.servlet" ]
gov.nih.nci; javax.servlet;
2,274,224
public GameObject getObject(int id) { List<GameObject> actualObjects = new ArrayList(); for (int c = 0; c < objects.size(); c++) { boolean add = true; for(int index: spriteIndexes){ if (c == index) { add = false; } ...
GameObject function(int id) { List<GameObject> actualObjects = new ArrayList(); for (int c = 0; c < objects.size(); c++) { boolean add = true; for(int index: spriteIndexes){ if (c == index) { add = false; } } if (add) { actualObjects.add(objects.get(c)); } } for (GameObject g: actualObjects) { if (g.id == id) { return ...
/** * Gets the GameObject with the given ID. * @param id The ID of the GameObject to retrieve (GameObject.id). * @return The GameObject with the given ID. */
Gets the GameObject with the given ID
getObject
{ "repo_name": "YellowLineSoftworks/VIPER-Engine", "path": "src/game/Layer.java", "license": "bsd-3-clause", "size": 16158 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,599,154
@Override public Collection<String> getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.SAMPLERS }); }
Collection<String> function() { return Arrays.asList(new String[] { MenuFactory.SAMPLERS }); }
/** * This is the list of menu categories this gui component will be available * under. This implementation returns * {@link org.apache.jmeter.gui.util.MenuFactory#SAMPLERS}, which is * appropriate for most sampler components. * * @return a Collection of Strings, where each element i...
This is the list of menu categories this gui component will be available under. This implementation returns <code>org.apache.jmeter.gui.util.MenuFactory#SAMPLERS</code>, which is appropriate for most sampler components
getMenuCategories
{ "repo_name": "saketh7/Jmeter", "path": "src/core/org/apache/jmeter/samplers/gui/AbstractSamplerGui.java", "license": "apache-2.0", "size": 2423 }
[ "java.util.Arrays", "java.util.Collection", "org.apache.jmeter.gui.util.MenuFactory" ]
import java.util.Arrays; import java.util.Collection; import org.apache.jmeter.gui.util.MenuFactory;
import java.util.*; import org.apache.jmeter.gui.util.*;
[ "java.util", "org.apache.jmeter" ]
java.util; org.apache.jmeter;
1,293,759
public void commit() throws IOException { if (writer != null) { OutputCommitter outputCommitter = jobConf.getOutputCommitter(); TaskAttemptContext taskCtx = new TaskAttemptContextImpl(jobConf, attempt); if (outputCommitter.needsTaskCommit(taskCtx)) outpu...
void function() throws IOException { if (writer != null) { OutputCommitter outputCommitter = jobConf.getOutputCommitter(); TaskAttemptContext taskCtx = new TaskAttemptContextImpl(jobConf, attempt); if (outputCommitter.needsTaskCommit(taskCtx)) outputCommitter.commitTask(taskCtx); } }
/** * Commit task. * * @throws IOException In failed. */
Commit task
commit
{ "repo_name": "dlnufox/ignite", "path": "modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v1/HadoopV1OutputCollector.java", "license": "apache-2.0", "size": 4314 }
[ "java.io.IOException", "org.apache.hadoop.mapred.OutputCommitter", "org.apache.hadoop.mapred.TaskAttemptContext", "org.apache.hadoop.mapred.TaskAttemptContextImpl" ]
import java.io.IOException; import org.apache.hadoop.mapred.OutputCommitter; import org.apache.hadoop.mapred.TaskAttemptContext; import org.apache.hadoop.mapred.TaskAttemptContextImpl;
import java.io.*; import org.apache.hadoop.mapred.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,710,414
public static Future<?> removeAllNewFlags() { return dbExec.submit(() -> { final PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); adapter.setFeedItems(FeedItem.NEW, FeedItem.UNPLAYED); adapter.close(); EventBus.getDefault().post(...
static Future<?> function() { return dbExec.submit(() -> { final PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); adapter.setFeedItems(FeedItem.NEW, FeedItem.UNPLAYED); adapter.close(); EventBus.getDefault().post(new UnreadItemsUpdateEvent()); }); }
/** * Sets the 'read'-attribute of all NEW FeedItems to UNPLAYED. */
Sets the 'read'-attribute of all NEW FeedItems to UNPLAYED
removeAllNewFlags
{ "repo_name": "AntennaPod/AntennaPod", "path": "core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java", "license": "gpl-3.0", "size": 40497 }
[ "de.danoeh.antennapod.event.UnreadItemsUpdateEvent", "de.danoeh.antennapod.model.feed.FeedItem", "de.danoeh.antennapod.storage.database.PodDBAdapter", "java.util.concurrent.Future", "org.greenrobot.eventbus.EventBus" ]
import de.danoeh.antennapod.event.UnreadItemsUpdateEvent; import de.danoeh.antennapod.model.feed.FeedItem; import de.danoeh.antennapod.storage.database.PodDBAdapter; import java.util.concurrent.Future; import org.greenrobot.eventbus.EventBus;
import de.danoeh.antennapod.event.*; import de.danoeh.antennapod.model.feed.*; import de.danoeh.antennapod.storage.database.*; import java.util.concurrent.*; import org.greenrobot.eventbus.*;
[ "de.danoeh.antennapod", "java.util", "org.greenrobot.eventbus" ]
de.danoeh.antennapod; java.util; org.greenrobot.eventbus;
1,442,991
private static void setCurrentInstance(Map<String, ResourceBundle> context) { instance.set(context); }
static void function(Map<String, ResourceBundle> context) { instance.set(context); }
/** * <p>Replace the Map with the argument context.</p> * * @param context the Map to be stored in ThreadLocal storage. */
Replace the Map with the argument context
setCurrentInstance
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/javax.el.api/javax/el/ELUtil.java", "license": "mit", "size": 12701 }
[ "java.util.Map", "java.util.ResourceBundle" ]
import java.util.Map; import java.util.ResourceBundle;
import java.util.*;
[ "java.util" ]
java.util;
2,195,852
EList<ComplexValue> getComplexValues();
EList<ComplexValue> getComplexValues();
/** * Returns the value of the '<em><b>Complex Values</b></em>' containment reference list. * The list contents are of type {@link isostdisots_29002_10ed_1techxmlschemavalueSimplified.ComplexValue}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Complex Values</em>' containment reference li...
Returns the value of the 'Complex Values' containment reference list. The list contents are of type <code>isostdisots_29002_10ed_1techxmlschemavalueSimplified.ComplexValue</code>. If the meaning of the 'Complex Values' containment reference list isn't clear, there really should be more of a description here...
getComplexValues
{ "repo_name": "patrickneubauer/XMLIntellEdit", "path": "xmlintelledit/xmltext/src/main/java/isostdisots_29002_10ed_1techxmlschemavalueSimplified/Combination.java", "license": "mit", "size": 22428 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,903,286
public DomainObjectContainer container() { final DomainObjectContainer container = dsp.getContainer(); if(container == null) { throw new IllegalStateException( "No DomainObjectContainer available"); } return container; }
DomainObjectContainer function() { final DomainObjectContainer container = dsp.getContainer(); if(container == null) { throw new IllegalStateException( STR); } return container; }
/** * Convenience method, returning the {@link DomainObjectContainer}, * first ensuring that it is available. * * @throws IllegalStateException if not available */
Convenience method, returning the <code>DomainObjectContainer</code>, first ensuring that it is available
container
{ "repo_name": "incodehq/isis", "path": "core/specsupport/src/main/java/org/apache/isis/core/specsupport/scenarios/ScenarioExecution.java", "license": "apache-2.0", "size": 18922 }
[ "org.apache.isis.applib.DomainObjectContainer" ]
import org.apache.isis.applib.DomainObjectContainer;
import org.apache.isis.applib.*;
[ "org.apache.isis" ]
org.apache.isis;
1,430,775
public boolean validateTransformationMatrix4x4Type_MinLength(List<?> transformationMatrix4x4Type, DiagnosticChain diagnostics, Map<Object, Object> context) { int length = transformationMatrix4x4Type.size(); boolean result = length >= 16; if (!result && diagnostics != null) reportMinLengthViolation(CitygmlPa...
boolean function(List<?> transformationMatrix4x4Type, DiagnosticChain diagnostics, Map<Object, Object> context) { int length = transformationMatrix4x4Type.size(); boolean result = length >= 16; if (!result && diagnostics != null) reportMinLengthViolation(CitygmlPackage.Literals.TRANSFORMATION_MATRIX4X4_TYPE, transforma...
/** * Validates the MinLength constraint of '<em>Transformation Matrix4x4 Type</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Validates the MinLength constraint of 'Transformation Matrix4x4 Type'.
validateTransformationMatrix4x4Type_MinLength
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore/src/net/opengis/citygml/util/CitygmlValidator.java", "license": "apache-2.0", "size": 22089 }
[ "java.util.List", "java.util.Map", "net.opengis.citygml.CitygmlPackage", "org.eclipse.emf.common.util.DiagnosticChain" ]
import java.util.List; import java.util.Map; import net.opengis.citygml.CitygmlPackage; import org.eclipse.emf.common.util.DiagnosticChain;
import java.util.*; import net.opengis.citygml.*; import org.eclipse.emf.common.util.*;
[ "java.util", "net.opengis.citygml", "org.eclipse.emf" ]
java.util; net.opengis.citygml; org.eclipse.emf;
110,435
selectButton.setAction(new ValidatingAction(WMessages.getInstance(selectButton). getValidationErrors(), rbSelect) { @Override public void executeOnValid(final ActionEvent event) { selectAction.execute(event); }
selectButton.setAction(new ValidatingAction(WMessages.getInstance(selectButton). getValidationErrors(), rbSelect) { void function(final ActionEvent event) { selectAction.execute(event); }
/** * If validation passes, invoke the backing action. * * @param event the event which triggered validation. */
If validation passes, invoke the backing action
executeOnValid
{ "repo_name": "Joshua-Barclay/wcomponents", "path": "wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WDialogExample.java", "license": "gpl-3.0", "size": 21540 }
[ "com.github.bordertech.wcomponents.ActionEvent", "com.github.bordertech.wcomponents.WMessages", "com.github.bordertech.wcomponents.validation.ValidatingAction" ]
import com.github.bordertech.wcomponents.ActionEvent; import com.github.bordertech.wcomponents.WMessages; import com.github.bordertech.wcomponents.validation.ValidatingAction;
import com.github.bordertech.wcomponents.*; import com.github.bordertech.wcomponents.validation.*;
[ "com.github.bordertech" ]
com.github.bordertech;
2,489,536
public static void setMp3Cover(String audioFilePath,String imageFilePath) throws ID3ReadException, IOException, ID3WriteException { boolean save=false; MyID3 myID3 = new MyID3(); File src_file=new File(audioFilePath); MusicMetadataSet src_set = myID3.read(src_file); MusicMetadata metadata = (M...
static void function(String audioFilePath,String imageFilePath) throws ID3ReadException, IOException, ID3WriteException { boolean save=false; MyID3 myID3 = new MyID3(); File src_file=new File(audioFilePath); MusicMetadataSet src_set = myID3.read(src_file); MusicMetadata metadata = (MusicMetadata) src_set.getSimplified(...
/** * Set the mp3 cover * @param audioFilePath Absolute path of the source audio file * @param imageFilePath Absolute path of the image file * @throws ID3ReadException * @throws IOException * @throws ID3WriteException */
Set the mp3 cover
setMp3Cover
{ "repo_name": "sdecri/Souni", "path": "src/suoni/Utils.java", "license": "gpl-2.0", "size": 30714 }
[ "java.io.File", "java.io.IOException", "org.cmc.music.common.ID3ReadException", "org.cmc.music.common.ID3WriteException", "org.cmc.music.metadata.ImageData", "org.cmc.music.metadata.MusicMetadata", "org.cmc.music.metadata.MusicMetadataSet", "org.cmc.music.myid3.MyID3" ]
import java.io.File; import java.io.IOException; import org.cmc.music.common.ID3ReadException; import org.cmc.music.common.ID3WriteException; import org.cmc.music.metadata.ImageData; import org.cmc.music.metadata.MusicMetadata; import org.cmc.music.metadata.MusicMetadataSet; import org.cmc.music.myid3.MyID3;
import java.io.*; import org.cmc.music.common.*; import org.cmc.music.metadata.*; import org.cmc.music.myid3.*;
[ "java.io", "org.cmc.music" ]
java.io; org.cmc.music;
245,348
protected Injector getInjector() { return this.injector; }
Injector function() { return this.injector; }
/** Replies the injector. * * @return the injector. */
Replies the injector
getInjector
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/compiler/AbstractExtraLanguageGenerator.java", "license": "apache-2.0", "size": 26754 }
[ "com.google.inject.Injector" ]
import com.google.inject.Injector;
import com.google.inject.*;
[ "com.google.inject" ]
com.google.inject;
1,507,541
public void setNullPolicy(final NullPolicy nullPolicy) { this.nullPolicy = Objects.requireNonNull(nullPolicy, "nullPolicy"); }
void function(final NullPolicy nullPolicy) { this.nullPolicy = Objects.requireNonNull(nullPolicy, STR); }
/** * Set the policy regarding how null parameters are handled. * * @param nullPolicy The null policy */
Set the policy regarding how null parameters are handled
setNullPolicy
{ "repo_name": "SpongePowered/event-impl-gen", "path": "src/main/java/org/spongepowered/eventimplgen/factory/ClassGenerator.java", "license": "mit", "size": 18838 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
175,342
protected Activity xml2While(Activity whileActivity, Element whileElement) { While _while; if (whileActivity instanceof While) { _while = (While) whileActivity; } else { _while = BPELFactory.eINSTANCE.createWhile(); _while.setElement(whileElement); } // Handle condition element Element conditio...
Activity function(Activity whileActivity, Element whileElement) { While _while; if (whileActivity instanceof While) { _while = (While) whileActivity; } else { _while = BPELFactory.eINSTANCE.createWhile(); _while.setElement(whileElement); } Element conditionElement = ReconciliationHelper .getBPELChildElementByLocalName(...
/** * Converts an XML while element to a BPEL While object. */
Converts an XML while element to a BPEL While object
xml2While
{ "repo_name": "splinter/developer-studio", "path": "bps/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationBPELReader.java", "license": "apache-2.0", "size": 140766 }
[ "org.eclipse.bpel.model.Activity", "org.eclipse.bpel.model.BPELFactory", "org.eclipse.bpel.model.While", "org.w3c.dom.Element" ]
import org.eclipse.bpel.model.Activity; import org.eclipse.bpel.model.BPELFactory; import org.eclipse.bpel.model.While; import org.w3c.dom.Element;
import org.eclipse.bpel.model.*; import org.w3c.dom.*;
[ "org.eclipse.bpel", "org.w3c.dom" ]
org.eclipse.bpel; org.w3c.dom;
2,312,723
public static List<Pattern> getNoProxyHostPatterns(String noProxyHost) { if (noProxyHost==null) return Collections.emptyList(); List<Pattern> r = Lists.newArrayList(); for (String s : noProxyHost.split("[ \t\n,|]+")) { if (s.length()==0) continue; r.add(Pattern.com...
static List<Pattern> function(String noProxyHost) { if (noProxyHost==null) return Collections.emptyList(); List<Pattern> r = Lists.newArrayList(); for (String s : noProxyHost.split(STR)) { if (s.length()==0) continue; r.add(Pattern.compile(s.replace(".", "\\.").replace("*", ".*"))); } return r; } /** * * Use {@link #cr...
/** * Returns the list of properly formatted no proxy host names. */
Returns the list of properly formatted no proxy host names
getNoProxyHostPatterns
{ "repo_name": "gusreiber/jenkins", "path": "core/src/main/java/hudson/ProxyConfiguration.java", "license": "mit", "size": 13540 }
[ "com.google.common.collect.Lists", "java.util.Collections", "java.util.List", "java.util.regex.Pattern" ]
import com.google.common.collect.Lists; import java.util.Collections; import java.util.List; import java.util.regex.Pattern;
import com.google.common.collect.*; import java.util.*; import java.util.regex.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,192,853
void unassign(final byte[] regionName, final boolean force) throws IOException;
void unassign(final byte[] regionName, final boolean force) throws IOException;
/** * Unassign a region from current hosting regionserver. Region will then be assigned to a * regionserver chosen at random. Region could be reassigned back to the same server. Use {@link * #move(byte[], byte[])} if you want to control the region movement. * * @param regionName Region to unassign. Wi...
Unassign a region from current hosting regionserver. Region will then be assigned to a regionserver chosen at random. Region could be reassigned back to the same server. Use <code>#move(byte[], byte[])</code> if you want to control the region movement
unassign
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 97415 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
90,710
public static SimpleExpressionsPackage init() { if (isInited) return (SimpleExpressionsPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleExpressionsPackage.eNS_URI); // Obtain or create and register package SimpleExpressionsPackageImpl theSimpleExpressionsPackage = (SimpleExpressionsPackageImpl)(EPa...
static SimpleExpressionsPackage function() { if (isInited) return (SimpleExpressionsPackage)EPackage.Registry.INSTANCE.getEPackage(SimpleExpressionsPackage.eNS_URI); SimpleExpressionsPackageImpl theSimpleExpressionsPackage = (SimpleExpressionsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SimpleExpress...
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link SimpleExpressionsPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access...
Creates, registers, and initializes the Package for this model, and for any others upon which it depends. This method is used to initialize <code>SimpleExpressionsPackage#eINSTANCE</code> when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the pack...
init
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/testlanguages/simpleExpressions/impl/SimpleExpressionsPackageImpl.java", "license": "epl-1.0", "size": 8901 }
[ "org.eclipse.emf.ecore.EPackage", "org.eclipse.emf.ecore.EcorePackage", "org.eclipse.xtext.testlanguages.simpleExpressions.SimpleExpressionsPackage" ]
import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.xtext.testlanguages.simpleExpressions.SimpleExpressionsPackage;
import org.eclipse.emf.ecore.*; import org.eclipse.xtext.testlanguages.*;
[ "org.eclipse.emf", "org.eclipse.xtext" ]
org.eclipse.emf; org.eclipse.xtext;
2,313,206
@Override protected String createKey(Bookmark value) { return value.getName(); }
String function(Bookmark value) { return value.getName(); }
/** * Creates the key for storing the object in the properties. * * @param value the object to create the key from * @return the generated key */
Creates the key for storing the object in the properties
createKey
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/gui/tools/FileChooserBookmarksManagementPanel.java", "license": "gpl-3.0", "size": 10864 }
[ "com.googlecode.jfilechooserbookmarks.Bookmark" ]
import com.googlecode.jfilechooserbookmarks.Bookmark;
import com.googlecode.jfilechooserbookmarks.*;
[ "com.googlecode.jfilechooserbookmarks" ]
com.googlecode.jfilechooserbookmarks;
423,530
public int getIndexOf(JPanel panel) { if (panels == null) { return -1; } return panels.indexOf(panel); }
int function(JPanel panel) { if (panels == null) { return -1; } return panels.indexOf(panel); }
/** * Returns the index of the specified panel in this model. * * @param panel - the panel * @return the panel index */
Returns the index of the specified panel in this model
getIndexOf
{ "repo_name": "takisd123/executequery", "path": "src/org/underworldlabs/swing/wizard/DefaultWizardProcessModel.java", "license": "gpl-3.0", "size": 6109 }
[ "javax.swing.JPanel" ]
import javax.swing.JPanel;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
624,023
public static String binaryToString(BinaryObject obj) { int hash = obj.hashCode(); if (obj instanceof BinaryObjectEx) { BinaryObjectEx objEx = (BinaryObjectEx)obj; BinaryType meta; try { meta = ((BinaryObjectEx)obj).rawType(); } ...
static String function(BinaryObject obj) { int hash = obj.hashCode(); if (obj instanceof BinaryObjectEx) { BinaryObjectEx objEx = (BinaryObjectEx)obj; BinaryType meta; try { meta = ((BinaryObjectEx)obj).rawType(); } catch (BinaryObjectException ignore) { meta = null; } if (meta != null) { if (meta.isEnum()) { try { ret...
/** * Convert Binary object to string. * * @param obj Binary object. * @return String representation of Binary object. */
Convert Binary object to string
binaryToString
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryUtils.java", "license": "apache-2.0", "size": 17777 }
[ "org.apache.ignite.binary.BinaryObject", "org.apache.ignite.binary.BinaryObjectException", "org.apache.ignite.binary.BinaryType", "org.apache.ignite.internal.binary.BinaryObjectEx", "org.apache.ignite.internal.util.typedef.internal.S" ]
import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.binary.BinaryType; import org.apache.ignite.internal.binary.BinaryObjectEx; import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.binary.*; import org.apache.ignite.internal.binary.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,126,557
static public void main(String[] sa) throws IOException, FileNotFoundException, InterruptedException { byte[] localBa = new byte[10240]; if (sa.length < 1) { System.err.println(SYNTAX_MSG); System.exit(1); } String progname = sa[0]; System.err....
static void function(String[] sa) throws IOException, FileNotFoundException, InterruptedException { byte[] localBa = new byte[10240]; if (sa.length < 1) { System.err.println(SYNTAX_MSG); System.exit(1); } String progname = sa[0]; System.err.println( STR + STR); File tmpFile = File.createTempFile(STR, STR); String speci...
/** * To test the ExecHarness class itself. * (Basically, a sanity check). * * Note that we always exec another process. This makes it safe to * execute Java classes which may call System.exit(). * * @param sa sa[0] is the program to be run. * Remaining arguments will ...
To test the ExecHarness class itself. (Basically, a sanity check). Note that we always exec another process. This makes it safe to execute Java classes which may call System.exit()
main
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/hsqldb1733/src/org/hsqldb/test/ExecHarness.java", "license": "lgpl-3.0", "size": 12323 }
[ "java.io.File", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException" ]
import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
681,056
List<?> propertyValues(Class<?> entityClass, String propertyName, String where, String order) throws DataProviderException;
List<?> propertyValues(Class<?> entityClass, String propertyName, String where, String order) throws DataProviderException;
/** * Obtiene los valores de una propiedad. * * @param entityClass * clase entidad * @param propertyName * Nombre de la propiedad * @param where * sentencia de condición HQL. * @param order * sentencia de ordenación HQL. Ej.: 'name, date desc' ...
Obtiene los valores de una propiedad
propertyValues
{ "repo_name": "rranz/meccano4j_vaadin", "path": "javalego/javalego_data/src/main/java/com/javalego/data/DataProvider.java", "license": "gpl-3.0", "size": 6967 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,403,122
@SideOnly(Side.CLIENT) public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { return Item.getItemById(0); }
@SideOnly(Side.CLIENT) Item function(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) { return Item.getItemById(0); }
/** * Gets an item for the block being called on. Args: world, x, y, z */
Gets an item for the block being called on. Args: world, x, y, z
getItem
{ "repo_name": "jtrent238/jtrent238FoodMod", "path": "src/main/java/com/jtrent238/foodmod/Blockcandyportal.java", "license": "lgpl-2.1", "size": 6333 }
[ "net.minecraft.item.Item", "net.minecraft.world.World" ]
import net.minecraft.item.Item; import net.minecraft.world.World;
import net.minecraft.item.*; import net.minecraft.world.*;
[ "net.minecraft.item", "net.minecraft.world" ]
net.minecraft.item; net.minecraft.world;
1,935,227
public boolean isWarning() { return fSeverity == IStatus.WARNING; }
boolean function() { return fSeverity == IStatus.WARNING; }
/** * Returns if the status' severity is WARNING. */
Returns if the status' severity is WARNING
isWarning
{ "repo_name": "webratio/typescript.java", "path": "eclipse/ts.eclipse.ide.ui/src/ts/eclipse/ide/ui/preferences/StatusInfo.java", "license": "mit", "size": 4739 }
[ "org.eclipse.core.runtime.IStatus" ]
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
1,450,729
private JTextField getServiceURL() { if (serviceURL == null) { serviceURL = new JTextField(); } return serviceURL; }
JTextField function() { if (serviceURL == null) { serviceURL = new JTextField(); } return serviceURL; }
/** * This method initializes serviceURL * * @return javax.swing.JTextField */
This method initializes serviceURL
getServiceURL
{ "repo_name": "NCIP/cagrid", "path": "cagrid/Software/core/caGrid/projects/gaards-ui/src/org/cagrid/grape/TargetGridServiceEditor.java", "license": "bsd-3-clause", "size": 16219 }
[ "javax.swing.JTextField" ]
import javax.swing.JTextField;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,890,189
@ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<BackupShortTermRetentionPolicyInner>, BackupShortTermRetentionPolicyInner> beginUpdate( String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName, Integer ret...
@ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<BackupShortTermRetentionPolicyInner>, BackupShortTermRetentionPolicyInner> beginUpdate( String resourceGroupName, String serverName, String databaseName, ShortTermRetentionPolicyName policyName, Integer retentionDays);
/** * Updates a database's short term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseNa...
Updates a database's short term retention policy
beginUpdate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/BackupShortTermRetentionPoliciesClient.java", "license": "mit", "size": 29597 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyInner", "com.azure.resourcemanager.sql.models.ShortTermRet...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.BackupShortTermRetentionPolicyInner; import com.azure.resourcemanager.sql.mo...
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.sql.fluent.models.*; import com.azure.resourcemanager.sql.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,566,953
@SuppressWarnings("unchecked") private static IgniteConfiguration getConfiguration(String springCfgPath, @Nullable String logCfgPath) throws IgniteCheckedException { assert springCfgPath != null; File path = GridTestUtils.resolveIgnitePath(springCfgPath); if (path == null) ...
@SuppressWarnings(STR) static IgniteConfiguration function(String springCfgPath, @Nullable String logCfgPath) throws IgniteCheckedException { assert springCfgPath != null; File path = GridTestUtils.resolveIgnitePath(springCfgPath); if (path == null) throw new IgniteCheckedException(STR + new File(springCfgPath) + STR);...
/** * Initializes configurations. * * @param springCfgPath Configuration file path. * @param logCfgPath Log file name. * @return List of configurations. * @throws IgniteCheckedException If an error occurs. */
Initializes configurations
getConfiguration
{ "repo_name": "alexzaitzev/ignite", "path": "modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java", "license": "apache-2.0", "size": 13274 }
[ "java.io.File", "java.net.MalformedURLException", "java.util.Map", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.configuration.IgniteConfiguration", "org.apache.ignite.internal.util.typedef.F", "org.apache.ignite.internal.util.typedef.internal.U", "org.apache.ignite.testframework.Grid...
import java.io.File; import java.net.MalformedURLException; import java.util.Map; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ig...
import java.io.*; import java.net.*; import java.util.*; import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.testframework.*; import org.apache.ignite.testframework.jun...
[ "java.io", "java.net", "java.util", "org.apache.ignite", "org.apache.log4j", "org.jetbrains.annotations", "org.springframework.beans", "org.springframework.context" ]
java.io; java.net; java.util; org.apache.ignite; org.apache.log4j; org.jetbrains.annotations; org.springframework.beans; org.springframework.context;
1,492,021
// TODO(bazel-team): replace this method with assertThat(iterable).contains(target). // That doesn't work now because dynamic configurations aren't yet applied to top-level targets. // This means that getConfiguredTarget("//go:two") returns a different configuration than // requesting "//go:two" as a dependency...
void function(ConfiguredTarget target, ConfiguredTarget dep) throws Exception { Iterable<ConfiguredTarget> prereqs = getDirectPrerequisites(target); BuildConfiguration depConfig = dep.getConfiguration(); for (ConfiguredTarget contained : prereqs) { if (contained.getLabel().equals(dep.getLabel())) { BuildConfiguration c...
/** * Asserts that a target's prerequisites contain the given dependency. */
Asserts that a target's prerequisites contain the given dependency
assertDirectPrerequisitesContain
{ "repo_name": "mrdomino/bazel", "path": "src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java", "license": "apache-2.0", "size": 77290 }
[ "com.google.devtools.build.lib.analysis.ConfiguredTarget", "com.google.devtools.build.lib.analysis.config.BuildConfiguration", "org.junit.Assert" ]
import com.google.devtools.build.lib.analysis.ConfiguredTarget; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import org.junit.Assert;
import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.analysis.config.*; import org.junit.*;
[ "com.google.devtools", "org.junit" ]
com.google.devtools; org.junit;
2,373,935
public StepDataInterface getStepData() { return new MongoDBLookupData(); }
StepDataInterface function() { return new MongoDBLookupData(); }
/** * Get a new instance of the appropriate data class. This data class implements the * StepDataInterface. It basically contains the persisting data that needs to live on, even if a * worker thread is terminated. * * @return The appropriate StepDataInterface class. */
Get a new instance of the appropriate data class. This data class implements the StepDataInterface. It basically contains the persisting data that needs to live on, even if a worker thread is terminated
getStepData
{ "repo_name": "ivylabs/ivy-pdi-mongodb-steps", "path": "src/main/java/com/ivyis/di/trans/steps/mongodb/MongoDBLookupMeta.java", "license": "agpl-3.0", "size": 19620 }
[ "org.pentaho.di.trans.step.StepDataInterface" ]
import org.pentaho.di.trans.step.StepDataInterface;
import org.pentaho.di.trans.step.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,142,988
public static JMenu addAll(JMenu menu, Collection<Action> actions) { for (Action action : actions) { menu.add(menuComponentFactory.createActionComponent(action)); } return menu; }
static JMenu function(JMenu menu, Collection<Action> actions) { for (Action action : actions) { menu.add(menuComponentFactory.createActionComponent(action)); } return menu; }
/** * Adds all <code>Action</code> objects in the given <code>Collection</code> * to the given <code>JMenu</code> * * @param menu * the menu to add the actions to * @param actions * a <code>Collection</code> that may contain some * <code>Action</code>s. * @return the ...
Adds all <code>Action</code> objects in the given <code>Collection</code> to the given <code>JMenu</code>
addAll
{ "repo_name": "tilm4nn/swing-utils", "path": "src/de/tkuhn/swing/actions/ActionUtils.java", "license": "mit", "size": 5817 }
[ "java.util.Collection", "javax.swing.Action", "javax.swing.JMenu" ]
import java.util.Collection; import javax.swing.Action; import javax.swing.JMenu;
import java.util.*; import javax.swing.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
900,099
public void testDescendingKeySetDescendingIteratorOrder() { TreeMap map = map5(); NavigableSet s = map.descendingKeySet(); Iterator i = s.descendingIterator(); Integer last = (Integer)i.next(); assertEquals(last, one); int count = 1; while (i.hasNext()) { ...
void function() { TreeMap map = map5(); NavigableSet s = map.descendingKeySet(); Iterator i = s.descendingIterator(); Integer last = (Integer)i.next(); assertEquals(last, one); int count = 1; while (i.hasNext()) { Integer k = (Integer)i.next(); assertTrue(last.compareTo(k) < 0); last = k; ++count; } assertEquals(5, cou...
/** * descending iterator of descendingKeySet is ordered */
descending iterator of descendingKeySet is ordered
testDescendingKeySetDescendingIteratorOrder
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "jsr166-tests/src/test/java/jsr166/TreeMapTest.java", "license": "gpl-2.0", "size": 33145 }
[ "java.util.Iterator", "java.util.NavigableSet", "java.util.TreeMap" ]
import java.util.Iterator; import java.util.NavigableSet; import java.util.TreeMap;
import java.util.*;
[ "java.util" ]
java.util;
43,397
public static void main(String[] args) { // read the integers from a file In in = new In(args[0]); int[] whitelist = in.readAllInts(); // sort the array Arrays.sort(whitelist); // read integer key from standard input; print if not in whitelist while (!StdIn...
static void function(String[] args) { In in = new In(args[0]); int[] whitelist = in.readAllInts(); Arrays.sort(whitelist); while (!StdIn.isEmpty()) { int key = StdIn.readInt(); if (BinarySearch.indexOf(whitelist, key) == -1) StdOut.println(key); } } } /*******************************************************************...
/** * Reads in a sequence of integers from the whitelist file, specified as * a command-line argument; reads in integers from standard input; * prints to standard output those integers that do <em>not</em> appear in the file. */
Reads in a sequence of integers from the whitelist file, specified as a command-line argument; reads in integers from standard input; prints to standard output those integers that do not appear in the file
main
{ "repo_name": "yu-yuxuan/algs4_exercise", "path": "src/main/java/edu/princeton/cs/algs4/BinarySearch.java", "license": "gpl-3.0", "size": 4557 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,167,728
public ImmuTable without(Position index) { throw new SubclassResponsibilityException(); }
ImmuTable function(Position index) { throw new SubclassResponsibilityException(); }
/** * Return a new table just like the current one except with the association whose * key is 'index'. */
Return a new table just like the current one except with the association whose key is 'index'
without
{ "repo_name": "jonesd/udanax-gold2java", "path": "abora-gold/src/generated-sources/translator/info/dgjones/abora/gold/collection/tables/ImmuTable.java", "license": "mit", "size": 12354 }
[ "info.dgjones.abora.gold.collection.tables.ImmuTable", "info.dgjones.abora.gold.java.exception.SubclassResponsibilityException", "info.dgjones.abora.gold.spaces.basic.Position" ]
import info.dgjones.abora.gold.collection.tables.ImmuTable; import info.dgjones.abora.gold.java.exception.SubclassResponsibilityException; import info.dgjones.abora.gold.spaces.basic.Position;
import info.dgjones.abora.gold.collection.tables.*; import info.dgjones.abora.gold.java.exception.*; import info.dgjones.abora.gold.spaces.basic.*;
[ "info.dgjones.abora" ]
info.dgjones.abora;
2,875,820
@Test public void testFindOperationsGeographic2Geographic() throws Exception { String source = "EPSG:4258"; String target = "EPSG:4326"; int min = 2; String expectedText = "AUTHORITY[\"EPSG\",\"1149\"]"; Set<CoordinateOperation> operations = findOperations(source, target...
void function() throws Exception { String source = STR; String target = STR; int min = 2; String expectedText = STREPSG\",\"1149\"]"; Set<CoordinateOperation> operations = findOperations(source, target); int size = operations.size(); Assert.assertTrue( size >= min); assertOperationContained(operations, expectedText); }
/** * Tests findOperations method for a pair of known CRSs. 4258 (Geographic2D) to 4326 * (Geographic2D), with different datum */
Tests findOperations method for a pair of known CRSs. 4258 (Geographic2D) to 4326 (Geographic2D), with different datum
testFindOperationsGeographic2Geographic
{ "repo_name": "geotools/geotools", "path": "modules/plugin/epsg-hsql/src/test/java/org/geotools/referencing/factory/epsg/hsql/OperationFactoryTest.java", "license": "lgpl-2.1", "size": 25650 }
[ "java.util.Set", "org.junit.Assert", "org.opengis.referencing.operation.CoordinateOperation" ]
import java.util.Set; import org.junit.Assert; import org.opengis.referencing.operation.CoordinateOperation;
import java.util.*; import org.junit.*; import org.opengis.referencing.operation.*;
[ "java.util", "org.junit", "org.opengis.referencing" ]
java.util; org.junit; org.opengis.referencing;
26,078
public String readLine() throws IOException { if (inStream == null) { return null; } int totalIn = 0; if (inflater != null) { totalIn = inflater.getTotalIn(); } StringBuffer lineBuffer = new StringBuffer(LINE_BUFFER_LENGTH); ...
String function() throws IOException { if (inStream == null) { return null; } int totalIn = 0; if (inflater != null) { totalIn = inflater.getTotalIn(); } StringBuffer lineBuffer = new StringBuffer(LINE_BUFFER_LENGTH); int c; int lengthRead = 0; while (true) { c = read(); lengthRead++; if (c < 0) { if (lineBuffer.length...
/** * Reads till the next \n. In the returned string \r and \n is not included. * If the stream ended null is returned. * Throttle is controlled when using this method. */
Reads till the next \n. In the returned string \r and \n is not included. If the stream ended null is returned. Throttle is controlled when using this method
readLine
{ "repo_name": "deepstupid/phex", "path": "src/main/java/phex/util/GnutellaInputStream.java", "license": "agpl-3.0", "size": 9123 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,688,350
public Map<String, List<Agent>> getRunningAgents() { return (runningAgents); }
Map<String, List<Agent>> function() { return (runningAgents); }
/** * Returns the current collection of running agents. * @return agents */
Returns the current collection of running agents
getRunningAgents
{ "repo_name": "structr/structr", "path": "structr-core/src/main/java/org/structr/agent/AgentService.java", "license": "gpl-3.0", "size": 7915 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,795,187
public ApiResponse numberOfResults() throws ClientApiException { Map<String, String> map = null; return api.callApi("ajaxSpider", "view", "numberOfResults", map); }
ApiResponse function() throws ClientApiException { Map<String, String> map = null; return api.callApi(STR, "view", STR, map); }
/** * This component is optional and therefore the API will only work if it is installed */
This component is optional and therefore the API will only work if it is installed
numberOfResults
{ "repo_name": "profjrr/zaproxy", "path": "src/org/zaproxy/clientapi/gen/AjaxSpider.java", "license": "apache-2.0", "size": 2824 }
[ "java.util.Map", "org.zaproxy.clientapi.core.ApiResponse", "org.zaproxy.clientapi.core.ClientApiException" ]
import java.util.Map; import org.zaproxy.clientapi.core.ApiResponse; import org.zaproxy.clientapi.core.ClientApiException;
import java.util.*; import org.zaproxy.clientapi.core.*;
[ "java.util", "org.zaproxy.clientapi" ]
java.util; org.zaproxy.clientapi;
1,533,378
public ArrayList<ICardHint> getHints(){ ArrayList<ICardHint> hints = this.cardHints; this.cardHints = null; return hints; }
ArrayList<ICardHint> function(){ ArrayList<ICardHint> hints = this.cardHints; this.cardHints = null; return hints; }
/** * Get hints for all cards. * @return list of hints. */
Get hints for all cards
getHints
{ "repo_name": "majklllll/ija_prj", "path": "src/model/BoardModel.java", "license": "mit", "size": 9417 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,810,248
public String[] getColumns(String propertyPath, Criteria criteria) throws HibernateException;
String[] function(String propertyPath, Criteria criteria) throws HibernateException;
/** * Get the names of the columns mapped by a property path, * ignoring projection aliases */
Get the names of the columns mapped by a property path, ignoring projection aliases
getColumns
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "thirdparty/plugins/org.csstudio.platform.libs.hibernate/project/core/src/main/java/org/hibernate/criterion/CriteriaQuery.java", "license": "epl-1.0", "size": 3829 }
[ "org.hibernate.Criteria", "org.hibernate.HibernateException" ]
import org.hibernate.Criteria; import org.hibernate.HibernateException;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
183,555
public DocumentMutation merge(@NonNullable String path, @NonNullable Map<String, Object> map);
DocumentMutation function(@NonNullable String path, @NonNullable Map<String, Object> map);
/** * Merges the existing MAP at the given FieldPath with the specified Map. * <br/><br/> * @param path the FieldPath to apply this merge operation * @param map the Map to be merged * @return {@code this} for chained invocation */
Merges the existing MAP at the given FieldPath with the specified Map.
merge
{ "repo_name": "ojai/ojai", "path": "java/core/src/main/java/org/ojai/store/DocumentMutation.java", "license": "apache-2.0", "size": 47815 }
[ "java.util.Map", "org.ojai.annotation.API" ]
import java.util.Map; import org.ojai.annotation.API;
import java.util.*; import org.ojai.annotation.*;
[ "java.util", "org.ojai.annotation" ]
java.util; org.ojai.annotation;
2,771,538
public static <T> T eachLine(InputStream stream, @ClosureParams(value=FromString.class,options={"String","String,Integer"}) Closure<T> closure) throws IOException { return eachLine(stream, 1, closure); }
static <T> T function(InputStream stream, @ClosureParams(value=FromString.class,options={STR,STR}) Closure<T> closure) throws IOException { return eachLine(stream, 1, closure); }
/** * Iterates through this stream, passing each line to the given 1 or 2 arg closure. * The stream is closed before this method returns. * * @param stream a stream * @param closure a closure (arg 1 is line, optional arg 2 is line number starting at line 1) * @return the last value return...
Iterates through this stream, passing each line to the given 1 or 2 arg closure. The stream is closed before this method returns
eachLine
{ "repo_name": "antoaravinth/incubator-groovy", "path": "src/main/org/codehaus/groovy/runtime/IOGroovyMethods.java", "license": "apache-2.0", "size": 62643 }
[ "groovy.lang.Closure", "groovy.transform.stc.ClosureParams", "groovy.transform.stc.FromString", "java.io.IOException", "java.io.InputStream" ]
import groovy.lang.Closure; import groovy.transform.stc.ClosureParams; import groovy.transform.stc.FromString; import java.io.IOException; import java.io.InputStream;
import groovy.lang.*; import groovy.transform.stc.*; import java.io.*;
[ "groovy.lang", "groovy.transform.stc", "java.io" ]
groovy.lang; groovy.transform.stc; java.io;
1,204,173
public final void addToHintMap(final DecodeHintType hintType, final Object value) { this.readerHintMap.put(hintType, value); }
final void function(final DecodeHintType hintType, final Object value) { this.readerHintMap.put(hintType, value); }
/** * Adds a new hint value to reader (decode) hint map. */
Adds a new hint value to reader (decode) hint map
addToHintMap
{ "repo_name": "punkhorn/camel-upstream", "path": "components/camel-barcode/src/main/java/org/apache/camel/dataformat/barcode/BarcodeDataFormat.java", "license": "apache-2.0", "size": 10550 }
[ "com.google.zxing.DecodeHintType" ]
import com.google.zxing.DecodeHintType;
import com.google.zxing.*;
[ "com.google.zxing" ]
com.google.zxing;
1,417,752
public static MonitoringAgent createFromXml ( Element root ) throws MalformedXMLException { try { Element elId = root.getFirstChild(); long id = Long.parseLong( elId.getFirstChild().getText()); Element pubKey = root.getChild(1); if ( !pubKey.getName().equals( "publickey" )) throw new Malformed...
static MonitoringAgent function ( Element root ) throws MalformedXMLException { try { Element elId = root.getFirstChild(); long id = Long.parseLong( elId.getFirstChild().getText()); Element pubKey = root.getChild(1); if ( !pubKey.getName().equals( STR )) throw new MalformedXMLException(STR ); if ( ! pubKey.getAttribute...
/** * * Sets the state of the object from a string representation resulting from * a previous {@link #toXmlString} call. * * @param root parsed XML document * * @exception MalformedXMLException * */
Sets the state of the object from a string representation resulting from a previous <code>#toXmlString</code> call
createFromXml
{ "repo_name": "AlexRuppert/las2peer_project", "path": "java/i5/las2peer/security/MonitoringAgent.java", "license": "mit", "size": 8986 }
[ "java.security.PublicKey", "org.apache.commons.codec.binary.Base64" ]
import java.security.PublicKey; import org.apache.commons.codec.binary.Base64;
import java.security.*; import org.apache.commons.codec.binary.*;
[ "java.security", "org.apache.commons" ]
java.security; org.apache.commons;
628,296
protected void setUp() throws Exception { super.setUp(); oos = new ObjectOutputStream(bao = new ByteArrayOutputStream()); }
void function() throws Exception { super.setUp(); oos = new ObjectOutputStream(bao = new ByteArrayOutputStream()); }
/** * Sets up the fixture, for example, open a network connection. This method * is called before a test is executed. */
Sets up the fixture, for example, open a network connection. This method is called before a test is executed
setUp
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectOutputStreamTest.java", "license": "apache-2.0", "size": 44867 }
[ "java.io.ByteArrayOutputStream", "java.io.ObjectOutputStream" ]
import java.io.ByteArrayOutputStream; import java.io.ObjectOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,788,798
public PlotOrientation getOrientation();
PlotOrientation function();
/** * Gets the plot orientation (horizontal or vertical). */
Gets the plot orientation (horizontal or vertical)
getOrientation
{ "repo_name": "delafer/j7project", "path": "jasper352/csb-jasperreport-dep/src/net/sf/jasperreports/engine/JRChartPlot.java", "license": "gpl-2.0", "size": 6187 }
[ "org.jfree.chart.plot.PlotOrientation" ]
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.*;
[ "org.jfree.chart" ]
org.jfree.chart;
746,739
@Test public void testOutputCountAs() throws Exception { // Non-empty MovieSource movieSource = new MovieSource(); movieSource.insertMovie("1234", "Vertigo", "Mystery", "1950", 120, ImmutableList.of("Great!", "Awesome!"), true, (byte) 0x12, "Quentin Tarantino, Kate Winsle...
void function() throws Exception { MovieSource movieSource = new MovieSource(); movieSource.insertMovie("1234", STR, STR, "1950", 120, ImmutableList.of(STR, STR), true, (byte) 0x12, STR); movieSource.insertMovie("5678", STR, STR, "1998", 120, ImmutableList.of(STR, STR), true, (byte) 0x12, STR); Injector injector = Guic...
/** * Test for OUTPUT COUNT AS directive. * * @throws Exception */
Test for OUTPUT COUNT AS directive
testOutputCountAs
{ "repo_name": "slolars/yql-plus", "path": "yqlplus_engine/src/test/java/com/yahoo/yqlplus/engine/java/JavaProgramCompilerTest.java", "license": "apache-2.0", "size": 234382 }
[ "com.google.common.collect.ImmutableList", "com.google.inject.Guice", "com.google.inject.Injector", "com.yahoo.yqlplus.engine.CompiledProgram", "com.yahoo.yqlplus.engine.ProgramResult", "com.yahoo.yqlplus.engine.YQLPlusCompiler", "com.yahoo.yqlplus.engine.sources.MovieSource", "org.testng.Assert", "...
import com.google.common.collect.ImmutableList; import com.google.inject.Guice; import com.google.inject.Injector; import com.yahoo.yqlplus.engine.CompiledProgram; import com.yahoo.yqlplus.engine.ProgramResult; import com.yahoo.yqlplus.engine.YQLPlusCompiler; import com.yahoo.yqlplus.engine.sources.MovieSource; import ...
import com.google.common.collect.*; import com.google.inject.*; import com.yahoo.yqlplus.engine.*; import com.yahoo.yqlplus.engine.sources.*; import org.testng.*;
[ "com.google.common", "com.google.inject", "com.yahoo.yqlplus", "org.testng" ]
com.google.common; com.google.inject; com.yahoo.yqlplus; org.testng;
148,681
public static final Set getSaslServerMechanismNames() { return ServerFactory.getNames(); }
static final Set function() { return ServerFactory.getNames(); }
/** * Returns a {@link Set} of names of SASL Server mechanisms available from * this {@link Provider}. * * @return a {@link Set} of SASL Server mechanisms (Strings). */
Returns a <code>Set</code> of names of SASL Server mechanisms available from this <code>Provider</code>
getSaslServerMechanismNames
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/gnu/javax/crypto/jce/GnuSasl.java", "license": "bsd-3-clause", "size": 4847 }
[ "gnu.javax.crypto.sasl.ServerFactory", "java.util.Set" ]
import gnu.javax.crypto.sasl.ServerFactory; import java.util.Set;
import gnu.javax.crypto.sasl.*; import java.util.*;
[ "gnu.javax.crypto", "java.util" ]
gnu.javax.crypto; java.util;
2,712,181
private static void parseNameDB(File clientDB, TreeMap<Integer, String> nameMap) { try (BufferedReader in = new BufferedReader(new FileReader(clientDB))) { String line; while ((line = in.readLine()) != null) { if (line.isEmpty() || line.charAt(0) == '/') continue; String[] tokens = line.split("#...
static void function(File clientDB, TreeMap<Integer, String> nameMap) { try (BufferedReader in = new BufferedReader(new FileReader(clientDB))) { String line; while ((line = in.readLine()) != null) { if (line.isEmpty() line.charAt(0) == '/') continue; String[] tokens = line.split("#"); try { nameMap.put(Integer.parseInt...
/** * Parses client-side item name file. * @param clientDB the client-side item table file * @param nameMap the client-side ID/name map */
Parses client-side item name file
parseNameDB
{ "repo_name": "itdelatrisu/athena-item-name-checker", "path": "AthenaItemNameChecker.java", "license": "gpl-3.0", "size": 10339 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileReader", "java.io.IOException", "java.util.TreeMap" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.TreeMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,455,143
protected static Version normalizeIncompatibleImprovementsVersion(Version incompatibleImprovements) { _TemplateAPI.checkVersionNotNullAndSupported(incompatibleImprovements); if (incompatibleImprovements.intValue() < _TemplateAPI.VERSION_INT_2_3_0) { throw new IllegalArgumentException("Ve...
static Version function(Version incompatibleImprovements) { _TemplateAPI.checkVersionNotNullAndSupported(incompatibleImprovements); if (incompatibleImprovements.intValue() < _TemplateAPI.VERSION_INT_2_3_0) { throw new IllegalArgumentException(STR); } return is2324Bugfixed(incompatibleImprovements) ? Configuration.VERSI...
/** * Returns the lowest version number that is equivalent with the parameter version. * @since 2.3.21 */
Returns the lowest version number that is equivalent with the parameter version
normalizeIncompatibleImprovementsVersion
{ "repo_name": "woonsan/incubator-freemarker", "path": "src/main/java/freemarker/ext/beans/BeansWrapper.java", "license": "apache-2.0", "size": 83003 }
[ "freemarker.template.Configuration", "freemarker.template.ObjectWrapper", "freemarker.template.Version" ]
import freemarker.template.Configuration; import freemarker.template.ObjectWrapper; import freemarker.template.Version;
import freemarker.template.*;
[ "freemarker.template" ]
freemarker.template;
1,641,834
public List<T> getConfigInstances(); /** * Returns the {@link Manager}. * * @param enumConfig * the enum configuration class. * @return {@link Manager}
List<T> function(); /** * Returns the {@link Manager}. * * @param enumConfig * the enum configuration class. * @return {@link Manager}
/** * Returns the {@link List list} containing all config instance of current * {@link RepositoryServiceContext}. * * @return the config instances */
Returns the <code>List list</code> containing all config instance of current <code>RepositoryServiceContext</code>
getConfigInstances
{ "repo_name": "OldRepoPreservation/jgentle", "path": "src/org/jgentleframework/services/datalocator/context/RepositoryServiceContext.java", "license": "apache-2.0", "size": 1774 }
[ "java.util.List", "org.jgentleframework.services.datalocator.data.Manager" ]
import java.util.List; import org.jgentleframework.services.datalocator.data.Manager;
import java.util.*; import org.jgentleframework.services.datalocator.data.*;
[ "java.util", "org.jgentleframework.services" ]
java.util; org.jgentleframework.services;
1,805,056
@Override public boolean onTouchEvent(MotionEvent event) { // to move the button according to the finger coordinate mPosX = (int) event.getX(); mPosY = (int) event.getY(); if (event.getAction() == MotionEvent.ACTION_UP) { resetButtonPosition(); mThread.interrupt(); if (mCallback != null) mCa...
boolean function(MotionEvent event) { mPosX = (int) event.getX(); mPosY = (int) event.getY(); if (event.getAction() == MotionEvent.ACTION_UP) { resetButtonPosition(); mThread.interrupt(); if (mCallback != null) mCallback.onMove(getAngle(), getStrength()); } if (event.getAction() == MotionEvent.ACTION_DOWN) { if (mThrea...
/** * Handle touch screen motion event. Move the button according to the * finger coordinate and detect longPress by multiple pointers only. * * @param event The motion event. * @return True if the event was handled, false otherwise. */
Handle touch screen motion event. Move the button according to the finger coordinate and detect longPress by multiple pointers only
onTouchEvent
{ "repo_name": "PuzzleboxIO/jigsaw-android", "path": "jigsaw/src/main/java/io/puzzlebox/jigsaw/ui/JoystickView.java", "license": "agpl-3.0", "size": 13483 }
[ "android.view.MotionEvent", "android.view.ViewConfiguration" ]
import android.view.MotionEvent; import android.view.ViewConfiguration;
import android.view.*;
[ "android.view" ]
android.view;
1,803,061
@Override public java.util.Date getModifiedDate() { return _todo.getModifiedDate(); }
java.util.Date function() { return _todo.getModifiedDate(); }
/** * Returns the modified date of this todo. * * @return the modified date of this todo */
Returns the modified date of this todo
getModifiedDate
{ "repo_name": "gamerson/liferay-projects", "path": "todo/todo-portlet-service/src/main/java/com/liferay/ide/projects/todo/model/TodoWrapper.java", "license": "lgpl-2.1", "size": 12847 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
849,831
ProjectileMoveEvent createProjectileMoveEvent(int projectileId) { return EventTypesUtils.createProjectileMoveEvent(startTime, projectileId, x, y, speedX, speedY); } }
ProjectileMoveEvent createProjectileMoveEvent(int projectileId) { return EventTypesUtils.createProjectileMoveEvent(startTime, projectileId, x, y, speedX, speedY); } }
/** * Creates instance of {@link ProjectileMoveEvent} class using * data stored inside this {@link ProjectileMoveData} object. * * @param projectileId - identifier of projectile for which event * is created. * * @return Returns created instance of {@link ProjectileMoveEvent} cl...
Creates instance of <code>ProjectileMoveEvent</code> class using data stored inside this <code>ProjectileMoveData</code> object
createProjectileMoveEvent
{ "repo_name": "molszewski/dante", "path": "module/Simulation/src/net/java/dante/sim/event/EventsRepositoryBuilderImpl.java", "license": "lgpl-3.0", "size": 24177 }
[ "net.java.dante.sim.event.types.EventTypesUtils", "net.java.dante.sim.event.types.ProjectileMoveEvent" ]
import net.java.dante.sim.event.types.EventTypesUtils; import net.java.dante.sim.event.types.ProjectileMoveEvent;
import net.java.dante.sim.event.types.*;
[ "net.java.dante" ]
net.java.dante;
1,661,439
public List<DwcaResourceModel> filterResourcesWithoutRecords( List<DwcaResourceModel> resources);
List<DwcaResourceModel> function( List<DwcaResourceModel> resources);
/** * Return a subset with only resources that already have records * * @param resources * @return */
Return a subset with only resources that already have records
filterResourcesWithoutRecords
{ "repo_name": "sibbr/explorador", "path": "src/main/java/net/canadensys/dataportal/resource/service/ResourceService.java", "license": "mit", "size": 849 }
[ "java.util.List", "net.canadensys.dataportal.occurrence.model.DwcaResourceModel" ]
import java.util.List; import net.canadensys.dataportal.occurrence.model.DwcaResourceModel;
import java.util.*; import net.canadensys.dataportal.occurrence.model.*;
[ "java.util", "net.canadensys.dataportal" ]
java.util; net.canadensys.dataportal;
3,053
public String[] getTrimmedStrings(String name, String... defaultValue) { String valueString = get(name); if (null == valueString) { return defaultValue; } else { return StringUtils.getTrimmedStrings(valueString); } }
String[] function(String name, String... defaultValue) { String valueString = get(name); if (null == valueString) { return defaultValue; } else { return StringUtils.getTrimmedStrings(valueString); } }
/** * Get the comma delimited values of the <code>name</code> property as * an array of <code>String</code>s, trimmed of the leading and trailing whitespace. * If no such property is specified then default value is returned. * * @param name property name. * @param defaultValue The default value ...
Get the comma delimited values of the <code>name</code> property as an array of <code>String</code>s, trimmed of the leading and trailing whitespace. If no such property is specified then default value is returned
getTrimmedStrings
{ "repo_name": "JoeChien23/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java", "license": "apache-2.0", "size": 100519 }
[ "org.apache.hadoop.util.StringUtils" ]
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,480,974
protected static String parseAs7BitData(byte[] data, String encoding) { // Handle any encoding aliases, where outlook describes it differently if ("ansi".equals(encoding)) { encoding = DEFAULT_ENCODING; } // Decode return new String(data, Charset.forName(encoding...
static String function(byte[] data, String encoding) { if ("ansi".equals(encoding)) { encoding = DEFAULT_ENCODING; } return new String(data, Charset.forName(encoding)); }
/** * Parses as non-unicode, supposedly 7 bit data and returns the string that * that yields. */
Parses as non-unicode, supposedly 7 bit data and returns the string that that yields
parseAs7BitData
{ "repo_name": "lvweiwolf/poi-3.16", "path": "src/scratchpad/src/org/apache/poi/hsmf/datatypes/StringChunk.java", "license": "apache-2.0", "size": 4707 }
[ "java.nio.charset.Charset" ]
import java.nio.charset.Charset;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
1,957,099
private static int maxFinishIndexedBinarySearch( List<? extends TemporalProposition> list, long tstamp) { int low = 0; int high = list.size() - 1; while (low <= high) { int mid = (low + high) >>> 1; TemporalProposition midVal = list.get(mid);...
static int function( List<? extends TemporalProposition> list, long tstamp) { int low = 0; int high = list.size() - 1; while (low <= high) { int mid = (low + high) >>> 1; TemporalProposition midVal = list.get(mid); Long maxFinish = midVal.getInterval().getMaximumFinish(); int cmp = maxFinish != null ? maxFinish.compare...
/** * Binary search for a primitive parameter by timestamp, optimized for when * the parameters are stored in a list that implements * <code>java.util.RandomAccess</code>. * * @param list * a <code>List</code> of <code>PrimitiveParameter</code> * objects all with...
Binary search for a primitive parameter by timestamp, optimized for when the parameters are stored in a list that implements <code>java.util.RandomAccess</code>
maxFinishIndexedBinarySearch
{ "repo_name": "eurekaclinical/protempa", "path": "protempa-framework/src/main/java/org/protempa/proposition/PropositionUtil.java", "license": "apache-2.0", "size": 19403 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,342,821
public static XLMultiReference of(final XLSheetId sheetId, final XLRange... ranges) { ArgumentChecker.notNull(sheetId, "sheetId"); ArgumentChecker.notNullOrEmpty(ranges, "ranges"); return new XLMultiReference(sheetId, Arrays.asList(ranges)); }
static XLMultiReference function(final XLSheetId sheetId, final XLRange... ranges) { ArgumentChecker.notNull(sheetId, STR); ArgumentChecker.notNullOrEmpty(ranges, STR); return new XLMultiReference(sheetId, Arrays.asList(ranges)); }
/** * Static factory method to create an instance of XLReference. * * @param sheetId * the worksheet ID * @param ranges * a vararg of contiguous 2D range of cells * @return an instance of XLReference */
Static factory method to create an instance of XLReference
of
{ "repo_name": "McLeodMoores/xl4j", "path": "xll-core/src/main/java/com/mcleodmoores/xl4j/v1/api/values/XLMultiReference.java", "license": "gpl-3.0", "size": 3948 }
[ "com.mcleodmoores.xl4j.v1.util.ArgumentChecker", "java.util.Arrays" ]
import com.mcleodmoores.xl4j.v1.util.ArgumentChecker; import java.util.Arrays;
import com.mcleodmoores.xl4j.v1.util.*; import java.util.*;
[ "com.mcleodmoores.xl4j", "java.util" ]
com.mcleodmoores.xl4j; java.util;
1,313,282
public Icon addEmptyIcon();
Icon function();
/** * Return an icon using the 1px image * @return an Icon * @see */
Return an icon using the 1px image
addEmptyIcon
{ "repo_name": "CecileBONIN/Silverpeas-Core", "path": "web-core/src/main/java/com/stratelia/webactiv/util/viewGenerator/html/iconPanes/IconPane.java", "license": "agpl-3.0", "size": 2261 }
[ "com.stratelia.webactiv.util.viewGenerator.html.icons.Icon" ]
import com.stratelia.webactiv.util.viewGenerator.html.icons.Icon;
import com.stratelia.webactiv.util.*;
[ "com.stratelia.webactiv" ]
com.stratelia.webactiv;
2,088,195
public OidcLoginRequestPostProcessor oidcUser(OidcUser oidcUser) { this.oidcUser = () -> oidcUser; return this; } /** * Use the provided {@link ClientRegistration} as the client to authorize. * * The supplied {@link ClientRegistration} will be registered into an * {@link HttpSessionOAuth2Aut...
OidcLoginRequestPostProcessor function(OidcUser oidcUser) { this.oidcUser = () -> oidcUser; return this; } /** * Use the provided {@link ClientRegistration} as the client to authorize. * * The supplied {@link ClientRegistration} will be registered into an * {@link HttpSessionOAuth2AuthorizedClientRepository}. Tests rel...
/** * Use the provided {@link OidcUser} as the authenticated user. * @param oidcUser the {@link OidcUser} to use * @return the {@link OidcLoginRequestPostProcessor} for further configuration */
Use the provided <code>OidcUser</code> as the authenticated user
oidcUser
{ "repo_name": "fhanik/spring-security", "path": "test/src/main/java/org/springframework/security/test/web/servlet/request/SecurityMockMvcRequestPostProcessors.java", "license": "apache-2.0", "size": 66514 }
[ "org.springframework.security.oauth2.client.registration.ClientRegistration", "org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizedClientRepository", "org.springframework.security.oauth2.core.oidc.user.OidcUser" ]
import org.springframework.security.oauth2.client.registration.ClientRegistration; import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizedClientRepository; import org.springframework.security.oauth2.core.oidc.user.OidcUser;
import org.springframework.security.oauth2.client.registration.*; import org.springframework.security.oauth2.client.web.*; import org.springframework.security.oauth2.core.oidc.user.*;
[ "org.springframework.security" ]
org.springframework.security;
2,883,614