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
EReference getTMigration__principalArgumentType();
EReference getTMigration__principalArgumentType();
/** * Returns the meta object for the reference '{@link org.eclipse.n4js.ts.types.TMigration#get_principalArgumentType <em>principal Argument Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>principal Argument Type</em>'. * @see org.eclipse.n4js.t...
Returns the meta object for the reference '<code>org.eclipse.n4js.ts.types.TMigration#get_principalArgumentType principal Argument Type</code>'.
getTMigration__principalArgumentType
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js.ts.model/emf-gen/org/eclipse/n4js/ts/types/TypesPackage.java", "license": "epl-1.0", "size": 538237 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,864,306
public static ComponentUI createUI(JComponent x) { return new FlatSplitPaneUI(); }
static ComponentUI function(JComponent x) { return new FlatSplitPaneUI(); }
/** * Creates a new FlatSplitPaneUI instance */
Creates a new FlatSplitPaneUI instance
createUI
{ "repo_name": "toxeh/ExecuteQuery", "path": "java/src/org/underworldlabs/swing/plaf/FlatSplitPaneUI.java", "license": "gpl-3.0", "size": 2204 }
[ "javax.swing.JComponent", "javax.swing.plaf.ComponentUI" ]
import javax.swing.JComponent; import javax.swing.plaf.ComponentUI;
import javax.swing.*; import javax.swing.plaf.*;
[ "javax.swing" ]
javax.swing;
2,536,179
public void setSnmpAdaptorName(ObjectName name, String contextName) throws InstanceNotFoundException, ServiceNotFoundException;
void function(ObjectName name, String contextName) throws InstanceNotFoundException, ServiceNotFoundException;
/** * Sets the reference to the SNMP protocol adaptor through which the MIB * will be SNMP accessible and add this new MIB in the SNMP MIB handler * associated to the specified <CODE>name</CODE>. * * @param name The name of the SNMP protocol adaptor. * @param contextName The MIB context na...
Sets the reference to the SNMP protocol adaptor through which the MIB will be SNMP accessible and add this new MIB in the SNMP MIB handler associated to the specified <code>name</code>
setSnmpAdaptorName
{ "repo_name": "openjdk/jdk7u", "path": "jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibAgentMBean.java", "license": "gpl-2.0", "size": 12299 }
[ "javax.management.InstanceNotFoundException", "javax.management.ObjectName", "javax.management.ServiceNotFoundException" ]
import javax.management.InstanceNotFoundException; import javax.management.ObjectName; import javax.management.ServiceNotFoundException;
import javax.management.*;
[ "javax.management" ]
javax.management;
2,093,757
@Override public void freeTemporaryResources(boolean isErrorOccurred) throws IOException { closeFile(getEnumClassJavaFileHandle(), isErrorOccurred); closeFile(getEnumClassTempFileHandle(), true); super.freeTemporaryResources(isErrorOccurred); }
void function(boolean isErrorOccurred) throws IOException { closeFile(getEnumClassJavaFileHandle(), isErrorOccurred); closeFile(getEnumClassTempFileHandle(), true); super.freeTemporaryResources(isErrorOccurred); }
/** * Removes all temporary file handles. * * @param isErrorOccurred when translator fails to generate java files we * need to close all open file handles include temporary files * and java files. * @throws IOException when failed to delete the temporary files */
Removes all temporary file handles
freeTemporaryResources
{ "repo_name": "VinodKumarS-Huawei/ietf96yang", "path": "utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaEnumerationFragmentFiles.java", "license": "apache-2.0", "size": 11052 }
[ "java.io.IOException", "org.onosproject.yangutils.utils.io.impl.FileSystemUtil" ]
import java.io.IOException; import org.onosproject.yangutils.utils.io.impl.FileSystemUtil;
import java.io.*; import org.onosproject.yangutils.utils.io.impl.*;
[ "java.io", "org.onosproject.yangutils" ]
java.io; org.onosproject.yangutils;
131,394
protected String compressWhitespace(String rawMarkup) { // We don't want to compress whitespace inside <pre> tags, so we look // for matches and: // - Do whitespace compression on everything before the first match. // - Append the <pre>.*?</pre> match with no compression. // - Loop to find the next match....
String function(String rawMarkup) { Pattern preBlock = Pattern.compile(STR, Pattern.DOTALL Pattern.MULTILINE); Matcher m = preBlock.matcher(rawMarkup); int lastend = 0; StringBuffer sb = null; while (true) { boolean matched = m.find(); String nonPre = matched ? rawMarkup.substring(lastend, m.start()) : rawMarkup.substr...
/** * Remove whitespace from the raw markup * * @param rawMarkup * @return rawMarkup */
Remove whitespace from the raw markup
compressWhitespace
{ "repo_name": "astubbs/wicket.get-portals2", "path": "wicket/src/main/java/org/apache/wicket/markup/MarkupParser.java", "license": "apache-2.0", "size": 15287 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,334,695
private void printAlwaysSingleQuotedIdentifier(String identifier) throws IOException { print("'"); print(identifier); print("'"); } /** * {@inheritDoc}
void function(String identifier) throws IOException { print("'"); print(identifier); print("'"); } /** * {@inheritDoc}
/** * Prints the given identifier with enforced single quotes around it regardless of whether * delimited identifiers are turned on or not. * * @param identifier The identifier */
Prints the given identifier with enforced single quotes around it regardless of whether delimited identifiers are turned on or not
printAlwaysSingleQuotedIdentifier
{ "repo_name": "ramizul/ddlutilsplus", "path": "src/main/java/org/apache/ddlutils/platform/sybase/SybaseBuilder.java", "license": "apache-2.0", "size": 17405 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
535,676
RndProxyDef getRndSettingsCopy() { if (rndControl == null) return null; return rndControl.getRndSettingsCopy(); } RndProxyDef getInitialRndSettings() { return rndDef; }
RndProxyDef getRndSettingsCopy() { if (rndControl == null) return null; return rndControl.getRndSettingsCopy(); } RndProxyDef getInitialRndSettings() { return rndDef; }
/** * Returns a copy of the current rendering settings. * * @return See above. */
Returns a copy of the current rendering settings
getRndSettingsCopy
{ "repo_name": "tp81/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/rnd/RendererModel.java", "license": "gpl-2.0", "size": 46296 }
[ "org.openmicroscopy.shoola.env.rnd.RndProxyDef" ]
import org.openmicroscopy.shoola.env.rnd.RndProxyDef;
import org.openmicroscopy.shoola.env.rnd.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
2,107,973
@RequestMapping("/performGrouping") public String performGrouping(@ModelAttribute GroupingForm groupingForm, HttpServletRequest request) throws IOException, ServletException { Integer currentUserId = LearningWebUtil.getUserId(); boolean forceGroup = WebUtil.readBooleanParam(request, GroupingController.PA...
@RequestMapping(STR) String function(@ModelAttribute GroupingForm groupingForm, HttpServletRequest request) throws IOException, ServletException { Integer currentUserId = LearningWebUtil.getUserId(); boolean forceGroup = WebUtil.readBooleanParam(request, GroupingController.PARAM_FORCE_GROUPING, false); LearnerProgress ...
/** * Perform the grouping for the users who are currently running the lesson. If force is set to true, then we should * be in preview mode, and we want to override the chosen grouping to make it group straight away. */
Perform the grouping for the users who are currently running the lesson. If force is set to true, then we should be in preview mode, and we want to override the chosen grouping to make it group straight away
performGrouping
{ "repo_name": "lamsfoundation/lams", "path": "lams_learning/src/java/org/lamsfoundation/lams/learning/web/controller/GroupingController.java", "license": "gpl-2.0", "size": 10556 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "org.lamsfoundation.lams.learning.web.form.GroupingForm", "org.lamsfoundation.lams.learning.web.util.LearningWebUtil", "org.lamsfoundation.lams.learningdesign.Activity", "org.lamsfoundation.lams.learningdes...
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import org.lamsfoundation.lams.learning.web.form.GroupingForm; import org.lamsfoundation.lams.learning.web.util.LearningWebUtil; import org.lamsfoundation.lams.learningdesign.Activity; import org.lamsfoundat...
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.lamsfoundation.lams.learning.web.form.*; import org.lamsfoundation.lams.learning.web.util.*; import org.lamsfoundation.lams.learningdesign.*; import org.lamsfoundation.lams.learningdesign.dto.*; import org.lamsfoundation.lams.lesson.*; im...
[ "java.io", "javax.servlet", "org.lamsfoundation.lams", "org.springframework.web" ]
java.io; javax.servlet; org.lamsfoundation.lams; org.springframework.web;
383,765
public void receivedItemStatus(String key, int status) { SentItemStatus itemStatus = (SentItemStatus)sentItems.get(key); if (itemStatus == null) { itemStatus = (SentItemStatus)pendingSentItems.get(key); } if (itemStatus == null) { Log.error(TAG_LOG, "Setting...
void function(String key, int status) { SentItemStatus itemStatus = (SentItemStatus)sentItems.get(key); if (itemStatus == null) { itemStatus = (SentItemStatus)pendingSentItems.get(key); } if (itemStatus == null) { Log.error(TAG_LOG, STR + key); } else { itemStatus.setStatus(status); } }
/** * The client received the status for an item it sent out. */
The client received the status for an item it sent out
receivedItemStatus
{ "repo_name": "zjujunge/funambol", "path": "externals/java-sdk/sapisync/src/main/java/com/funambol/sapisync/SapiSyncStatus.java", "license": "agpl-3.0", "size": 32859 }
[ "com.funambol.util.Log" ]
import com.funambol.util.Log;
import com.funambol.util.*;
[ "com.funambol.util" ]
com.funambol.util;
1,649,829
protected void startParsing (final Attributes attrs) throws SAXException { this.buffer = new StringBuffer(); }
void function (final Attributes attrs) throws SAXException { this.buffer = new StringBuffer(); }
/** * Starts parsing. * * @param attrs the attributes. * @throws SAXException if there is a parsing error. */
Starts parsing
startParsing
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/jcommon-1.0.10/source/org/jfree/xml/parser/coretypes/StringReadHandler.java", "license": "gpl-2.0", "size": 3555 }
[ "org.xml.sax.Attributes", "org.xml.sax.SAXException" ]
import org.xml.sax.Attributes; import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
175,526
public static String sendMailToMany(List<String> receivers, String subject, String message) { try { InternetAddress[] receiverEmails = new InternetAddress[receivers.size()]; int ctr = 0; for(String email : receivers){ receiverEmails[ctr++] = new InternetAddress(email); } MultipleMailSender mS...
static String function(List<String> receivers, String subject, String message) { try { InternetAddress[] receiverEmails = new InternetAddress[receivers.size()]; int ctr = 0; for(String email : receivers){ receiverEmails[ctr++] = new InternetAddress(email); } MultipleMailSender mSender = new MultipleMailSender(receiverE...
/** * method to send mail to many email addresses * @param receivers the receiver's email addresses * @param subject the subject * @param message the message to send * @return error return error, if any */
method to send mail to many email addresses
sendMailToMany
{ "repo_name": "animesks/projects", "path": "Non_Academic/FileTrackingSystem_2012/WebApp/src/in/ac/iiitdmj/fts/communication/SmtpMailService.java", "license": "gpl-2.0", "size": 6939 }
[ "java.util.List", "javax.mail.internet.InternetAddress" ]
import java.util.List; import javax.mail.internet.InternetAddress;
import java.util.*; import javax.mail.internet.*;
[ "java.util", "javax.mail" ]
java.util; javax.mail;
2,037,655
int updateByPrimaryKeySelective(DBRouterRules record);
int updateByPrimaryKeySelective(DBRouterRules record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table routing_rules * * @mbggenerated Tue May 26 15:53:09 CST 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table routing_rules
updateByPrimaryKeySelective
{ "repo_name": "wolabs/womano", "path": "main/java/com/culabs/unicomportal/dao/DBRouterRulesMapper.java", "license": "apache-2.0", "size": 1593 }
[ "com.culabs.unicomportal.model.db.DBRouterRules" ]
import com.culabs.unicomportal.model.db.DBRouterRules;
import com.culabs.unicomportal.model.db.*;
[ "com.culabs.unicomportal" ]
com.culabs.unicomportal;
2,348,308
@Override public void handle(int repairNumber, ActiveRepairService.Status status, String message) { final RepairSegment segment = context.storage.getRepairSegment(segmentId).get(); Thread.currentThread().setName(clusterName + ":" + segment.getRunId() + ":" + segmentId); LOG.debug( "handle called...
void function(int repairNumber, ActiveRepairService.Status status, String message) { final RepairSegment segment = context.storage.getRepairSegment(segmentId).get(); Thread.currentThread().setName(clusterName + ":" + segment.getRunId() + ":" + segmentId); LOG.debug( STR, repairNumber, status, message); if (repairNumber...
/** * Called when there is an event coming either from JMX or this runner regarding on-going * repairs. * * @param repairNumber repair sequence number, obtained when triggering a repair * @param status new status of the repair * @param message additional information about the repair */
Called when there is an event coming either from JMX or this runner regarding on-going repairs
handle
{ "repo_name": "garo/cassandra-reaper", "path": "src/main/java/com/spotify/reaper/service/SegmentRunner.java", "license": "apache-2.0", "size": 18607 }
[ "com.spotify.reaper.core.RepairSegment", "org.apache.cassandra.service.ActiveRepairService", "org.joda.time.DateTime" ]
import com.spotify.reaper.core.RepairSegment; import org.apache.cassandra.service.ActiveRepairService; import org.joda.time.DateTime;
import com.spotify.reaper.core.*; import org.apache.cassandra.service.*; import org.joda.time.*;
[ "com.spotify.reaper", "org.apache.cassandra", "org.joda.time" ]
com.spotify.reaper; org.apache.cassandra; org.joda.time;
2,268,765
public void addDeviceRegistration(String username, DeviceRegistration registration, int tenantID, String userStoreDomain, Timestamp timestamp) throws FIDOAuthenticatorServerException { if (log.isDebugEnabled()) { log.debug("addDeviceRegistration...
void function(String username, DeviceRegistration registration, int tenantID, String userStoreDomain, Timestamp timestamp) throws FIDOAuthenticatorServerException { if (log.isDebugEnabled()) { log.debug(STR + username + STR +tenantID + STR + userStoreDomain +STR + registration.toJsonWithAttestationCert() + "}"); } Conn...
/** * Add Device Registration to store. * * @param username The username of Device Registration. * @param registration The FIDO Registration. * @param timestamp * @throws IdentityException when SQL statement can not be executed. */
Add Device Registration to store
addDeviceRegistration
{ "repo_name": "isharak/carbon-identity", "path": "components/application-authenticators/org.wso2.carbon.identity.application.authenticator.fido/src/main/java/org/wso2/carbon/identity/application/authenticator/fido/dao/DeviceStoreDAO.java", "license": "apache-2.0", "size": 15733 }
[ "com.yubico.u2f.data.DeviceRegistration", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "java.sql.Timestamp", "java.util.Calendar", "java.util.TimeZone", "org.wso2.carbon.identity.application.authenticator.fido.exception.FIDOAuthenticatorServerException", "org.wso2.ca...
import com.yubico.u2f.data.DeviceRegistration; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Timestamp; import java.util.Calendar; import java.util.TimeZone; import org.wso2.carbon.identity.application.authenticator.fido.exception.FIDOAuthenticatorServerExc...
import com.yubico.u2f.data.*; import java.sql.*; import java.util.*; import org.wso2.carbon.identity.application.authenticator.fido.exception.*; import org.wso2.carbon.identity.application.authenticator.fido.util.*; import org.wso2.carbon.identity.core.util.*;
[ "com.yubico.u2f", "java.sql", "java.util", "org.wso2.carbon" ]
com.yubico.u2f; java.sql; java.util; org.wso2.carbon;
954,844
public static void assertInputIsValid(final String input) { if (input == null) { throw new IllegalArgumentException("Cannot check validity of null input."); } if (!isUrl(input)) { assertFileIsReadable(new File(input)); } }
static void function(final String input) { if (input == null) { throw new IllegalArgumentException(STR); } if (!isUrl(input)) { assertFileIsReadable(new File(input)); } }
/** * Checks that an input is is non-null, a URL or a file, exists, * and if its a file then it is not a directory and is readable. If any * condition is false then a runtime exception is thrown. * * @param input the input to check for validity */
Checks that an input is is non-null, a URL or a file, exists, and if its a file then it is not a directory and is readable. If any condition is false then a runtime exception is thrown
assertInputIsValid
{ "repo_name": "eugenegardner/tenXMEIPolisher", "path": "src/htsjdk/samtools/util/IOUtil.java", "license": "gpl-3.0", "size": 35486 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,924,310
public int getJDBCMinorVersion() throws SQLException { return 0; // This class implements JDBC 3.0 }
int function() throws SQLException { return 0; }
/** * Retrieves the minor JDBC version number for this driver. * * @return JDBC version minor number * @exception SQLException if a database access error occurs * @since 1.4 */
Retrieves the minor JDBC version number for this driver
getJDBCMinorVersion
{ "repo_name": "hornn/interviews", "path": "src/pl/pljava/src/java/pljava/org/postgresql/pljava/jdbc/SPIDatabaseMetaData.java", "license": "apache-2.0", "size": 140347 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,270,976
@Override public TOpenResult open(TOpenParams params) { Preconditions.checkState(state_ == DataSourceState.CREATED); state_ = DataSourceState.OPENED; batchSize_ = INITIAL_BATCH_SIZE; schema_ = params.getRow_schema(); // Need to check validatePredicates again because the call in Prepare() was fro...
TOpenResult function(TOpenParams params) { Preconditions.checkState(state_ == DataSourceState.CREATED); state_ = DataSourceState.OPENED; batchSize_ = INITIAL_BATCH_SIZE; schema_ = params.getRow_schema(); if (validatePredicates(params.getPredicates())) { Preconditions.checkArgument(schema_.getColsSize() == 1); TColumnDe...
/** * Initializes the batch size and stores the table schema. */
Initializes the batch size and stores the table schema
open
{ "repo_name": "cloudera/Impala", "path": "ext-data-source/test/src/main/java/org/apache/impala/extdatasource/AllTypesDataSource.java", "license": "apache-2.0", "size": 13068 }
[ "com.google.common.base.Preconditions", "java.util.UUID", "org.apache.impala.extdatasource.thrift.TColumnDesc", "org.apache.impala.extdatasource.thrift.TOpenParams", "org.apache.impala.extdatasource.thrift.TOpenResult", "org.apache.impala.thrift.TColumnType", "org.apache.impala.thrift.TPrimitiveType", ...
import com.google.common.base.Preconditions; import java.util.UUID; import org.apache.impala.extdatasource.thrift.TColumnDesc; import org.apache.impala.extdatasource.thrift.TOpenParams; import org.apache.impala.extdatasource.thrift.TOpenResult; import org.apache.impala.thrift.TColumnType; import org.apache.impala.thrif...
import com.google.common.base.*; import java.util.*; import org.apache.impala.extdatasource.thrift.*; import org.apache.impala.thrift.*;
[ "com.google.common", "java.util", "org.apache.impala" ]
com.google.common; java.util; org.apache.impala;
1,923,158
public boolean valueExists(String name) { IntByReference pType, lpcbData; byte[] lpData = new byte[1]; pType = new IntByReference(); lpcbData = new IntByReference(); OUTER: while(true) { int r = Advapi32.INSTANCE.RegQueryValueEx(handle, name, null, pType...
boolean function(String name) { IntByReference pType, lpcbData; byte[] lpData = new byte[1]; pType = new IntByReference(); lpcbData = new IntByReference(); OUTER: while(true) { int r = Advapi32.INSTANCE.RegQueryValueEx(handle, name, null, pType, lpData, lpcbData); switch(r) { case WINERROR.ERROR_MORE_DATA: lpData = new...
/** * Does a specified value exist? */
Does a specified value exist
valueExists
{ "repo_name": "batmat/jenkins", "path": "core/src/main/java/hudson/util/jna/RegistryKey.java", "license": "mit", "size": 8889 }
[ "com.sun.jna.ptr.IntByReference" ]
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.*;
[ "com.sun.jna" ]
com.sun.jna;
755,089
public GridClientConfiguration setMarshaller(GridClientMarshaller marshaller) { this.marshaller = marshaller; return this; }
GridClientConfiguration function(GridClientMarshaller marshaller) { this.marshaller = marshaller; return this; }
/** * Sets the marshaller to use for communication. * * @param marshaller A marshaller to use. * @return {@code this} for chaining. */
Sets the marshaller to use for communication
setMarshaller
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/client/GridClientConfiguration.java", "license": "apache-2.0", "size": 32734 }
[ "org.apache.ignite.internal.client.marshaller.GridClientMarshaller" ]
import org.apache.ignite.internal.client.marshaller.GridClientMarshaller;
import org.apache.ignite.internal.client.marshaller.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,075,289
private void waitForBlock(LockStats origStats) throws DatabaseException, InterruptedException { long startTime = System.currentTimeMillis(); while (true) { Thread.yield(); Thread.sleep(10); if (System.currentTimeMillis() - startTime > MAX_IN...
void function(LockStats origStats) throws DatabaseException, InterruptedException { long startTime = System.currentTimeMillis(); while (true) { Thread.yield(); Thread.sleep(10); if (System.currentTimeMillis() - startTime > MAX_INSERT_MILLIS) { fail(STR); } LockStats stats = env.getLockStats(null); if (stats.getNWaiters...
/** * Waits for a new locker to block waiting for a lock. */
Waits for a new locker to block waiting for a lock
waitForBlock
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/je-3.2.44/test/com/sleepycat/je/test/PhantomRestartTest.java", "license": "gpl-2.0", "size": 17938 }
[ "com.sleepycat.je.DatabaseException", "com.sleepycat.je.LockStats" ]
import com.sleepycat.je.DatabaseException; import com.sleepycat.je.LockStats;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
1,249,502
return new DBI("jdbc:h2:portal;MODE=PostgreSQL;INIT=runscript from 'classpath:sql/schema.sql'"); } /** * Creates a stub of {@link ContainerRequest} that is used for testing. * * @param webApplication - a mock of {@link WebApplication}
return new DBI(STR); } /** * Creates a stub of {@link ContainerRequest} that is used for testing. * * @param webApplication - a mock of {@link WebApplication}
/** * Create a DBI instance for testing using the embedded H2 database schema. */
Create a DBI instance for testing using the embedded H2 database schema
createDBI
{ "repo_name": "icgc-dcc/dcc-portal", "path": "dcc-portal-server/src/test/java/org/icgc/dcc/portal/server/test/Tests.java", "license": "gpl-3.0", "size": 4616 }
[ "com.sun.jersey.spi.container.ContainerRequest", "com.sun.jersey.spi.container.WebApplication" ]
import com.sun.jersey.spi.container.ContainerRequest; import com.sun.jersey.spi.container.WebApplication;
import com.sun.jersey.spi.container.*;
[ "com.sun.jersey" ]
com.sun.jersey;
1,604,134
void addRTypeResourceName(RType rType, String resourceName, String resourceValue, ResourceDirectory resourceDirectory) { Map<String,Set<ResourceDirectory>> directoryResourceDirectoryMap=null; if(this.rTypeResourceDirectoryMap.containsKey(rType)){ directoryResourceDirectoryMap=this.rTypeResourceDirectoryMap.ge...
void addRTypeResourceName(RType rType, String resourceName, String resourceValue, ResourceDirectory resourceDirectory) { Map<String,Set<ResourceDirectory>> directoryResourceDirectoryMap=null; if(this.rTypeResourceDirectoryMap.containsKey(rType)){ directoryResourceDirectoryMap=this.rTypeResourceDirectoryMap.get(rType); ...
/** * add r type resource name * @param rType * @param resourceName * @param resourceDirectory */
add r type resource name
addRTypeResourceName
{ "repo_name": "oneliang/builder-android", "path": "src/main/java/com/oneliang/tools/builder/android/aapt/AaptResourceCollector.java", "license": "apache-2.0", "size": 14593 }
[ "com.oneliang.tools.builder.android.aapt.RDotTxtEntry", "java.util.HashMap", "java.util.HashSet", "java.util.Map", "java.util.Set" ]
import com.oneliang.tools.builder.android.aapt.RDotTxtEntry; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set;
import com.oneliang.tools.builder.android.aapt.*; import java.util.*;
[ "com.oneliang.tools", "java.util" ]
com.oneliang.tools; java.util;
268,840
MonitorTag[] getTags(boolean bigEndian) { List tags = new ArrayList(Arrays.asList(super.getTags())); if (numberRangeInverted) { tags.add(new MonitorTag(Monitor.MONITOR_SIGNAL_FILTER_TAG_NOT)); } tags.add(new MonitorTag(Monitor.MONITOR_SIGNAL_FILTER_TAG_NUMBER, n...
MonitorTag[] getTags(boolean bigEndian) { List tags = new ArrayList(Arrays.asList(super.getTags())); if (numberRangeInverted) { tags.add(new MonitorTag(Monitor.MONITOR_SIGNAL_FILTER_TAG_NOT)); } tags.add(new MonitorTag(Monitor.MONITOR_SIGNAL_FILTER_TAG_NUMBER, new Integer[] {new Integer(numberMin), new Integer(numberMa...
/** * Return an array of the OSE monitor protocol tags for this receive event * action point. * *@param bigEndian the target byte order. * * @return an array of the OSE monitor protocol tags for this receive event * action point. */
Return an array of the OSE monitor protocol tags for this receive event action point
getTags
{ "repo_name": "debabratahazra/OptimaLA", "path": "Optima/com.ose.system/src/com/ose/system/ReceiveEventActionPoint.java", "license": "epl-1.0", "size": 23132 }
[ "com.ose.system.service.monitor.Monitor", "com.ose.system.service.monitor.MonitorTag", "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import com.ose.system.service.monitor.Monitor; import com.ose.system.service.monitor.MonitorTag; import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import com.ose.system.service.monitor.*; import java.util.*;
[ "com.ose.system", "java.util" ]
com.ose.system; java.util;
1,358,047
public AbstractXmlDataSource dataSource() throws JRException { return dataSource("."); }
AbstractXmlDataSource function() throws JRException { return dataSource("."); }
/** * Creates a sub data source using as root document the document used by "this" data source. * The data source will contain exactly one record consisting of the document node itself. * * @return the xml sub data source * @throws JRException if the data source cannot be created * @see JRXmlDataSource#da...
Creates a sub data source using as root document the document used by "this" data source. The data source will contain exactly one record consisting of the document node itself
dataSource
{ "repo_name": "juniormesquitadandao/report4all", "path": "lib/src/net/sf/jasperreports/engine/data/AbstractXmlDataSource.java", "license": "mit", "size": 9514 }
[ "net.sf.jasperreports.engine.JRException" ]
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.*;
[ "net.sf.jasperreports" ]
net.sf.jasperreports;
2,858,302
private void init(Context context, ImageCacheParams cacheParams) { mCacheParams = cacheParams; final File diskCacheDir = getDiskCacheDir(context, cacheParams.uniqueName); if (cacheParams.diskCacheEnabled) { if (!diskCacheDir.exists()) { diskCacheDir.mkdir(); } if (getUsableSpace(diskCacheDir) > ...
void function(Context context, ImageCacheParams cacheParams) { mCacheParams = cacheParams; final File diskCacheDir = getDiskCacheDir(context, cacheParams.uniqueName); if (cacheParams.diskCacheEnabled) { if (!diskCacheDir.exists()) { diskCacheDir.mkdir(); } if (getUsableSpace(diskCacheDir) > cacheParams.diskCacheSize) {...
/** * Initialize the cache, providing all parameters. * * @param context The context to use * @param cacheParams The cache parameters to initialize the cache */
Initialize the cache, providing all parameters
init
{ "repo_name": "SteamedBunZL/PlayerTest", "path": "libs/ZI-master/src/com/yixia/zi/utils/ImageCache.java", "license": "apache-2.0", "size": 13674 }
[ "android.content.Context", "java.io.File", "java.io.IOException" ]
import android.content.Context; import java.io.File; import java.io.IOException;
import android.content.*; import java.io.*;
[ "android.content", "java.io" ]
android.content; java.io;
898,841
private Document postProcessDocument(String documentHeaderId, WorkflowDocument workflowDocument, Document document) { if (document != null) { document.getDocumentHeader().setWorkflowDocument(workflowDocument); document.processAfterRetrieve(); loadNotes(document); ...
Document function(String documentHeaderId, WorkflowDocument workflowDocument, Document document) { if (document != null) { document.getDocumentHeader().setWorkflowDocument(workflowDocument); document.processAfterRetrieve(); loadNotes(document); } return document; }
/** * Performs required post-processing for every document from the documentDao * * @param documentHeaderId * @param workflowDocument * @param document */
Performs required post-processing for every document from the documentDao
postProcessDocument
{ "repo_name": "sbower/kuali-rice-1", "path": "impl/src/main/java/org/kuali/rice/krad/service/impl/DocumentServiceImpl.java", "license": "apache-2.0", "size": 52079 }
[ "org.kuali.rice.kew.api.WorkflowDocument", "org.kuali.rice.krad.document.Document" ]
import org.kuali.rice.kew.api.WorkflowDocument; import org.kuali.rice.krad.document.Document;
import org.kuali.rice.kew.api.*; import org.kuali.rice.krad.document.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,833,067
long getPlanFollowerTimeStep(); /** * Get a new unique {@link ReservationId}. * * @return a new unique {@link ReservationId}
long getPlanFollowerTimeStep(); /** * Get a new unique {@link ReservationId}. * * @return a new unique {@link ReservationId}
/** * Return the time step (ms) at which the {@link PlanFollower} is invoked * * @return the time step (ms) at which the {@link PlanFollower} is invoked */
Return the time step (ms) at which the <code>PlanFollower</code> is invoked
getPlanFollowerTimeStep
{ "repo_name": "robzor92/hops", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/ReservationSystem.java", "license": "apache-2.0", "size": 4762 }
[ "org.apache.hadoop.yarn.api.records.ReservationId" ]
import org.apache.hadoop.yarn.api.records.ReservationId;
import org.apache.hadoop.yarn.api.records.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
921,092
private void findDeclaredNames(Node n, Node parent, Renamer renamer) { // Do a shallow traversal, so don't traverse into function declarations, // except for the name of the function itself. if (parent == null || !parent.isFunction() || n == parent.getFirstChild()) { if (NodeUtil.isV...
void function(Node n, Node parent, Renamer renamer) { if (parent == null !parent.isFunction() n == parent.getFirstChild()) { if (NodeUtil.isVarDeclaration(n)) { renamer.addDeclaredName(n.getString(), true); } else if (NodeUtil.isBlockScopedDeclaration(n)) { renamer.addDeclaredName(n.getString(), false); } else if (Node...
/** * Traverses the current scope and collects declared names. Does not * decent into functions or add CATCH exceptions. */
Traverses the current scope and collects declared names. Does not decent into functions or add CATCH exceptions
findDeclaredNames
{ "repo_name": "pauldraper/closure-compiler", "path": "src/com/google/javascript/jscomp/MakeDeclaredNamesUnique.java", "license": "apache-2.0", "size": 20886 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
699,363
@Override Collection<CellContainer<CELL, T>> getRows();
Collection<CellContainer<CELL, T>> getRows();
/** * Returns the {@link CellContainer Rows} of this {@link Table}. * * @return the {@link CellContainer Rows} of this {@link Table}. */
Returns the <code>CellContainer Rows</code> of this <code>Table</code>
getRows
{ "repo_name": "aftenkap/jutility-common", "path": "src/main/java/org/jutility/common/datatype/table/ICellTable.java", "license": "apache-2.0", "size": 4845 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,568,892
public List<SyndEntry> getEntries() { return entries; }
List<SyndEntry> function() { return entries; }
/** * Returns all entries of this CombinedFeed. * * @return List of SyndEntries * @see SyndEntry */
Returns all entries of this CombinedFeed
getEntries
{ "repo_name": "danielkec/FeedCombiner", "path": "src/main/java/cz/kec/wls/feedcombiner/model/CombinedFeed.java", "license": "mit", "size": 3271 }
[ "com.rometools.rome.feed.synd.SyndEntry", "java.util.List" ]
import com.rometools.rome.feed.synd.SyndEntry; import java.util.List;
import com.rometools.rome.feed.synd.*; import java.util.*;
[ "com.rometools.rome", "java.util" ]
com.rometools.rome; java.util;
760,930
public int getPriorityFromViews() { int priority = 1; int checkedId = ((RadioGroup) findViewById(R.id.radioGroup)).getCheckedRadioButtonId(); switch (checkedId) { case R.id.radButton1: priority = PRIORITY_HIGH; break; case R.id.radButto...
int function() { int priority = 1; int checkedId = ((RadioGroup) findViewById(R.id.radioGroup)).getCheckedRadioButtonId(); switch (checkedId) { case R.id.radButton1: priority = PRIORITY_HIGH; break; case R.id.radButton2: priority = PRIORITY_MEDIUM; break; case R.id.radButton3: priority = PRIORITY_LOW; } return priority...
/** * getPriority is called whenever the selected priority needs to be retrieved */
getPriority is called whenever the selected priority needs to be retrieved
getPriorityFromViews
{ "repo_name": "cfung/Android_App_ud851-Exercises", "path": "Lesson09b-ToDo-List-AAC/T09b.06-Exercise-UpdateTask/app/src/main/java/com/example/android/todolist/AddTaskActivity.java", "license": "apache-2.0", "size": 7349 }
[ "android.widget.RadioGroup" ]
import android.widget.RadioGroup;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,688,584
private void initSpy(final Game newGame, final Spy thisSpy) { final Spy newSPY = new Spy(); newSPY.setNation(thisSpy.getNation()); newSPY.setName(thisSpy.getName()); final Position newPos = new Position(); newPos.setX(thisSpy.getPosition().getX()); newPos.setY(thisSp...
void function(final Game newGame, final Spy thisSpy) { final Spy newSPY = new Spy(); newSPY.setNation(thisSpy.getNation()); newSPY.setName(thisSpy.getName()); final Position newPos = new Position(); newPos.setX(thisSpy.getPosition().getX()); newPos.setY(thisSpy.getPosition().getY()); newPos.setRegion(thisSpy.getPositio...
/** * Initialize this spy object. * * @param newGame the game object. * @param thisSpy the new spy object. */
Initialize this spy object
initSpy
{ "repo_name": "EaW1805/engine", "path": "src/main/java/com/eaw1805/core/initializers/GameInitializer.java", "license": "mit", "size": 56645 }
[ "com.eaw1805.data.managers.army.SpyManager", "com.eaw1805.data.model.Game", "com.eaw1805.data.model.army.Spy", "com.eaw1805.data.model.map.CarrierInfo", "com.eaw1805.data.model.map.Position" ]
import com.eaw1805.data.managers.army.SpyManager; import com.eaw1805.data.model.Game; import com.eaw1805.data.model.army.Spy; import com.eaw1805.data.model.map.CarrierInfo; import com.eaw1805.data.model.map.Position;
import com.eaw1805.data.managers.army.*; import com.eaw1805.data.model.*; import com.eaw1805.data.model.army.*; import com.eaw1805.data.model.map.*;
[ "com.eaw1805.data" ]
com.eaw1805.data;
520,082
@Override public void enterExclusive_or_expression(@NotNull FunctionParser.Exclusive_or_expressionContext ctx) { }
@Override public void enterExclusive_or_expression(@NotNull FunctionParser.Exclusive_or_expressionContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitInclusive_or_expression
{ "repo_name": "octopus-platform/joern", "path": "projects/extensions/joern-fuzzyc/src/main/java/antlr/FunctionBaseListener.java", "license": "lgpl-3.0", "size": 42232 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
647,306
public static GeoPoint latLonToPoint( double latitude, double longitude ) { Double lat = latitude * 1E6d; Double lng = longitude * 1E6d; GeoPoint point = new GeoPoint( lat.intValue(), lng.intValue() ); return point; }
static GeoPoint function( double latitude, double longitude ) { Double lat = latitude * 1E6d; Double lng = longitude * 1E6d; GeoPoint point = new GeoPoint( lat.intValue(), lng.intValue() ); return point; }
/** * Convert location coordinate to mapView's coordinate * * @param latitude * @param longitude * @return */
Convert location coordinate to mapView's coordinate
latLonToPoint
{ "repo_name": "XinyueZ/SlidingGallery", "path": "src/de/cellular/lib/geo/LocationDV.java", "license": "apache-2.0", "size": 8869 }
[ "com.google.android.maps.GeoPoint" ]
import com.google.android.maps.GeoPoint;
import com.google.android.maps.*;
[ "com.google.android" ]
com.google.android;
2,783,578
@Test public void testCreateTwoWrappers() throws InterruptedException, IOException { String message = "{\"vim_type\":\"Mock\",\"vim_address\":\"10.100.32.200\",\"username\":\"sonata.dem\"," + "\"name\":\"Athens.100.Demo\"," + "\"pass\":\"s0n@t@.dem\",\"city\":\"Athens\",\"country...
void function() throws InterruptedException, IOException { String message = "{\"vim_type\":\"Mock\",\"vim_address\":\"10.100.32.200\",\"username\":\"sonata.dem\"," + "\"name\":\"Athens.100.Demo\"," + "\"pass\":\"s0n@t@.dem\",\"city\":\"Athens\",\"country\":\"Greece\",\"domain\":\"default\"," + "\"configuration\":{\"ten...
/** * Create two wrappers with the same endpoint but using different tenants * * @throws IOException */
Create two wrappers with the same endpoint but using different tenants
testCreateTwoWrappers
{ "repo_name": "skolome/son-sp-infrabstract", "path": "vim-adaptor/adaptor/src/test/java/sonata/kernel/vimadaptor/AdaptorTest.java", "license": "apache-2.0", "size": 20077 }
[ "com.fasterxml.jackson.databind.ObjectMapper", "com.fasterxml.jackson.dataformat.yaml.YAMLFactory", "java.io.IOException", "java.util.ArrayList", "java.util.UUID", "java.util.concurrent.BlockingQueue", "java.util.concurrent.LinkedBlockingQueue", "org.json.JSONObject", "org.json.JSONTokener", "org....
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import java.io.IOException; import java.util.ArrayList; import java.util.UUID; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import org.json.JSONObject; import org....
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.dataformat.yaml.*; import java.io.*; import java.util.*; import java.util.concurrent.*; import org.json.*; import org.junit.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "org.json", "org.junit" ]
com.fasterxml.jackson; java.io; java.util; org.json; org.junit;
618,210
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux<StorageAccountInner> listAsync() { return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<StorageAccountInner> function() { return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); }
/** * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the * ListKeys operation for this. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if ...
Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this
listAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountsClientImpl.java", "license": "mit", "size": 213141 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.storage.fluent.models.StorageAccountInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.storage.fluent.models.StorageAccountInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.storage.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,333,678
public void sendMessages(GlowSession session) { if (!needsUpdate) { return; } int id = entity.entityId; if (entity instanceof GlowPlayer) { GlowPlayer player = (GlowPlayer) entity; if (player.getUniqueId().equals(session.getPlayer().getUniqueId()))...
void function(GlowSession session) { if (!needsUpdate) { return; } int id = entity.entityId; if (entity instanceof GlowPlayer) { GlowPlayer player = (GlowPlayer) entity; if (player.getUniqueId().equals(session.getPlayer().getUniqueId())) { id = 0; } } session.send(new EntityPropertyMessage(id, properties)); needsUpdate...
/** * Sends the managed entity's properties to the client, if the client's snapshot is stale. * * @param session the client's session */
Sends the managed entity's properties to the client, if the client's snapshot is stale
sendMessages
{ "repo_name": "GlowstoneMC/GlowstonePlusPlus", "path": "src/main/java/net/glowstone/entity/AttributeManager.java", "license": "mit", "size": 11464 }
[ "net.glowstone.net.GlowSession", "net.glowstone.net.message.play.entity.EntityPropertyMessage" ]
import net.glowstone.net.GlowSession; import net.glowstone.net.message.play.entity.EntityPropertyMessage;
import net.glowstone.net.*; import net.glowstone.net.message.play.entity.*;
[ "net.glowstone.net" ]
net.glowstone.net;
1,996,304
void write(List<WriteValueContainer> values);
void write(List<WriteValueContainer> values);
/** * Execute the write on the write value containers. * * @param values a list of WriteValueContainer. * @see Channel#getWriteContainer() */
Execute the write on the write value containers
write
{ "repo_name": "gythialy/openmuc", "path": "projects/core/api/src/main/java/org/openmuc/framework/dataaccess/DataAccessService.java", "license": "gpl-3.0", "size": 1859 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
771,046
public String getFaviconUrl(HttpServletRequest request) { FaviconProvider provider = manager.getFirst(); if (provider == null) { String url = ControllerHelper.renderRelativeUrl(request, DEFAULT_FAVICON_URL, true, false); return ControllerHelper.append...
String function(HttpServletRequest request) { FaviconProvider provider = manager.getFirst(); if (provider == null) { String url = ControllerHelper.renderRelativeUrl(request, DEFAULT_FAVICON_URL, true, false); return ControllerHelper.appendTimestamp(url, DEFAULT_FAVICON_URL); } return provider.getUrl(request); }
/** * Return the favicon icon URL. The URL will be taken from the added provider with highest order * value. If no provider exists the URL of the built-in default favicon will be returned. * * @param request * the current request * @return the URL of the favicon icon ...
Return the favicon icon URL. The URL will be taken from the added provider with highest order value. If no provider exists the URL of the built-in default favicon will be returned
getFaviconUrl
{ "repo_name": "Communote/communote-server", "path": "communote/webapp/src/main/java/com/communote/server/web/commons/resource/FaviconProviderManager.java", "license": "apache-2.0", "size": 2727 }
[ "com.communote.server.web.commons.helper.ControllerHelper", "javax.servlet.http.HttpServletRequest" ]
import com.communote.server.web.commons.helper.ControllerHelper; import javax.servlet.http.HttpServletRequest;
import com.communote.server.web.commons.helper.*; import javax.servlet.http.*;
[ "com.communote.server", "javax.servlet" ]
com.communote.server; javax.servlet;
647,900
void setActuate(ActuateType value);
void setActuate(ActuateType value);
/** * Sets the value of the '{@link net.opengis.gml.GeographicCRSRefType#getActuate <em>Actuate</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Actuate</em>' attribute. * @see org.w3._1999.xlink.ActuateType * @see #isSetActuate() * @see #unsetAc...
Sets the value of the '<code>net.opengis.gml.GeographicCRSRefType#getActuate Actuate</code>' attribute.
setActuate
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore/src/net/opengis/gml/GeographicCRSRefType.java", "license": "apache-2.0", "size": 14113 }
[ "org.w3._1999.xlink.ActuateType" ]
import org.w3._1999.xlink.ActuateType;
import org.w3.*;
[ "org.w3" ]
org.w3;
2,304,334
JobStatus getStatus();
JobStatus getStatus();
/** * Get migration status. * * @return */
Get migration status
getStatus
{ "repo_name": "gentics/mesh", "path": "mdm/api/src/main/java/com/gentics/mesh/core/data/job/HibJob.java", "license": "apache-2.0", "size": 7321 }
[ "com.gentics.mesh.core.rest.job.JobStatus" ]
import com.gentics.mesh.core.rest.job.JobStatus;
import com.gentics.mesh.core.rest.job.*;
[ "com.gentics.mesh" ]
com.gentics.mesh;
2,580,784
public void update() { try { idleThreads = JobThreadPool.getInstance().getPoolThreadCount(); } catch (Exception e) { e.printStackTrace(); idleThreads = -1; } try { runningThreads = JobThreadPool.getInstance().getRunningThreadsCount(); } catch (Exception e) { e.print...
void function() { try { idleThreads = JobThreadPool.getInstance().getPoolThreadCount(); } catch (Exception e) { e.printStackTrace(); idleThreads = -1; } try { runningThreads = JobThreadPool.getInstance().getRunningThreadsCount(); } catch (Exception e) { e.printStackTrace(); runningThreads = -1; } try { overflowThreads ...
/** * Update the details shown on the job list page */
Update the details shown on the job list page
update
{ "repo_name": "squaregoldfish/QuinCe", "path": "WebApp/src/uk/ac/exeter/QuinCe/web/jobs/JobsBean.java", "license": "gpl-3.0", "size": 8211 }
[ "uk.ac.exeter.QuinCe" ]
import uk.ac.exeter.QuinCe;
import uk.ac.exeter.*;
[ "uk.ac.exeter" ]
uk.ac.exeter;
2,583,342
@SuppressWarnings("Duplicates") protected void doInspectionTest(@NonNls @NotNull String[] testFiles, @NotNull Class inspectionClass, @NonNls @NotNull String quickFixName, boolean applyFix, ...
@SuppressWarnings(STR) void function(@NonNls @NotNull String[] testFiles, @NotNull Class inspectionClass, @NonNls @NotNull String quickFixName, boolean applyFix, boolean available) { myFixture.enableInspections(inspectionClass); myFixture.configureByFiles(testFiles); myFixture.checkHighlighting(true, false, false); fin...
/** * Runs daemon passes and looks for given fix within infos. * * @param testFiles names of files to participate; first is used for inspection and then for check by "_after". * @param inspectionClass what inspection to run * @param quickFixName how the resulting fix should be named (the human-r...
Runs daemon passes and looks for given fix within infos
doInspectionTest
{ "repo_name": "sabi0/intellij-community", "path": "python/testSrc/com/jetbrains/python/Py3QuickFixTest.java", "license": "apache-2.0", "size": 10753 }
[ "com.intellij.codeInsight.intention.IntentionAction", "java.util.List", "org.jetbrains.annotations.NonNls", "org.jetbrains.annotations.NotNull" ]
import com.intellij.codeInsight.intention.IntentionAction; import java.util.List; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull;
import com.intellij.*; import java.util.*; import org.jetbrains.annotations.*;
[ "com.intellij", "java.util", "org.jetbrains.annotations" ]
com.intellij; java.util; org.jetbrains.annotations;
1,880,893
private void refreshDataSourceTree() { Node selectedNode = getSelectedNode(); final String[] selectedPath = NodeOp.createPath(selectedNode, em.getRootContext()); Children rootChildren = em.getRootContext().getChildren(); Node dataSourcesFilterNode = rootChildren.findChild(DataSource...
void function() { Node selectedNode = getSelectedNode(); final String[] selectedPath = NodeOp.createPath(selectedNode, em.getRootContext()); Children rootChildren = em.getRootContext().getChildren(); Node dataSourcesFilterNode = rootChildren.findChild(DataSourcesNode.NAME); if (dataSourcesFilterNode == null) { logger.l...
/** * Refreshes changed content nodes */
Refreshes changed content nodes
refreshDataSourceTree
{ "repo_name": "sidheshenator/autopsy", "path": "Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java", "license": "apache-2.0", "size": 44709 }
[ "java.util.logging.Level", "org.openide.nodes.Children", "org.openide.nodes.Node", "org.openide.nodes.NodeOp", "org.sleuthkit.autopsy.datamodel.DataSourcesNode", "org.sleuthkit.autopsy.datamodel.RootContentChildren" ]
import java.util.logging.Level; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.nodes.NodeOp; import org.sleuthkit.autopsy.datamodel.DataSourcesNode; import org.sleuthkit.autopsy.datamodel.RootContentChildren;
import java.util.logging.*; import org.openide.nodes.*; import org.sleuthkit.autopsy.datamodel.*;
[ "java.util", "org.openide.nodes", "org.sleuthkit.autopsy" ]
java.util; org.openide.nodes; org.sleuthkit.autopsy;
199,878
@SuppressWarnings("unchecked") public void testInequalitiesCondition1() { for (int op : Arrays.asList(Token.LT, Token.GT, Token.LE, Token.GE)) { FlowScope blind = newScope(); testBinop(blind, op, createVar(blind, "a", createUnionType(STRING_TYPE, VOID_TYPE)), createNumb...
@SuppressWarnings(STR) void function() { for (int op : Arrays.asList(Token.LT, Token.GT, Token.LE, Token.GE)) { FlowScope blind = newScope(); testBinop(blind, op, createVar(blind, "a", createUnionType(STRING_TYPE, VOID_TYPE)), createNumber(8), Sets.newHashSet( new TypedName("a", STRING_TYPE)), Sets.newHashSet(new Typed...
/** * Tests reverse interpretation of a COMPARE(NAME, NUMBER) expression, * where COMPARE can be LE, LT, GE or GT. */
Tests reverse interpretation of a COMPARE(NAME, NUMBER) expression, where COMPARE can be LE, LT, GE or GT
testInequalitiesCondition1
{ "repo_name": "110035/kissy", "path": "tools/module-compiler/tests/com/google/javascript/jscomp/SemanticReverseAbstractInterpreterTest.java", "license": "mit", "size": 19701 }
[ "com.google.common.collect.Sets", "com.google.javascript.rhino.Token", "java.util.Arrays" ]
import com.google.common.collect.Sets; import com.google.javascript.rhino.Token; import java.util.Arrays;
import com.google.common.collect.*; import com.google.javascript.rhino.*; import java.util.*;
[ "com.google.common", "com.google.javascript", "java.util" ]
com.google.common; com.google.javascript; java.util;
1,955,491
public Status getStatus() { return status; } public enum Reason { UNEXPECTED_LINE_BREAK, UNEXPECTED_EOF, CHARACTER_AFTER_QUOTE, INVALID_CELL_FORMAT, TOO_SHORT_RECORD, TOO_LONG_RECORD, ...
Status function() { return status; } public enum Reason { UNEXPECTED_LINE_BREAK, UNEXPECTED_EOF, CHARACTER_AFTER_QUOTE, INVALID_CELL_FORMAT, TOO_SHORT_RECORD, TOO_LONG_RECORD, } public static final class Status implements Serializable { private static final long serialVersionUID = 1L; private final Reason reason; priva...
/** * Returns the status of this exception. * @return the status */
Returns the status of this exception
getStatus
{ "repo_name": "cocoatomo/asakusafw", "path": "core-project/asakusa-runtime/src/main/java/com/asakusafw/runtime/io/csv/CsvFormatException.java", "license": "apache-2.0", "size": 5784 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,571,056
public ToDo getTodo() { if( _taskObject == null ) { return null; } return _taskObject.getTodo(); }
ToDo function() { if( _taskObject == null ) { return null; } return _taskObject.getTodo(); }
/** * Internal helper method to get direct access to the TaskArgumentsObject's underlying content. * * @return the reference of BlackBerry ToDo Object. */
Internal helper method to get direct access to the TaskArgumentsObject's underlying content
getTodo
{ "repo_name": "marek/WebWorks", "path": "api/invoke/src/blackberry/invoke/taskArguments/TaskArgumentsObject.java", "license": "apache-2.0", "size": 2961 }
[ "javax.microedition.pim.ToDo" ]
import javax.microedition.pim.ToDo;
import javax.microedition.pim.*;
[ "javax.microedition" ]
javax.microedition;
1,263,130
private List<WritesAttribute> getWritesAttributes(Processor processor) { List<WritesAttribute> attributes = new ArrayList<>(); WritesAttributes writesAttributes = processor.getClass().getAnnotation(WritesAttributes.class); if (writesAttributes != null) { attributes.addAll(Arrays...
List<WritesAttribute> function(Processor processor) { List<WritesAttribute> attributes = new ArrayList<>(); WritesAttributes writesAttributes = processor.getClass().getAnnotation(WritesAttributes.class); if (writesAttributes != null) { attributes.addAll(Arrays.asList(writesAttributes.value())); } WritesAttribute writeA...
/** * Collects the attributes that a processor is writing to. * * @param processor the processor to describe * @return the list of attributes the processor is writing */
Collects the attributes that a processor is writing to
getWritesAttributes
{ "repo_name": "MiniPlayer/log-island", "path": "logisland-framework/logisland-documentation/src/main/java/com/hurence/logisland/documentation/html/HtmlProcessorDocumentationWriter.java", "license": "apache-2.0", "size": 7323 }
[ "com.hurence.logisland.annotation.behavior.WritesAttribute", "com.hurence.logisland.annotation.behavior.WritesAttributes", "com.hurence.logisland.processor.Processor", "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import com.hurence.logisland.annotation.behavior.WritesAttribute; import com.hurence.logisland.annotation.behavior.WritesAttributes; import com.hurence.logisland.processor.Processor; import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import com.hurence.logisland.annotation.behavior.*; import com.hurence.logisland.processor.*; import java.util.*;
[ "com.hurence.logisland", "java.util" ]
com.hurence.logisland; java.util;
747,378
public static String[] getAttributeValues( final X500Principal dn, final String attributeOid) { final RDNSequenceIterator rdnSeqIter = new RDNSequenceIterator( dn.getEncoded()); final List<String> values = new ArrayList<String>(); for (RelativeDistinguishedName rdn : rdnSeqIter) { fo...
static String[] function( final X500Principal dn, final String attributeOid) { final RDNSequenceIterator rdnSeqIter = new RDNSequenceIterator( dn.getEncoded()); final List<String> values = new ArrayList<String>(); for (RelativeDistinguishedName rdn : rdnSeqIter) { for (AttributeTypeAndValue atv : rdn.getItems()) { if (...
/** * Gets the values of the given attribute contained in the DN. * * <p><strong>NOTE:</strong> no escaping is done on special characters in the * values, which could be different from what would appear in the string * representation of the DN.</p> * * @param dn X.500 distinguished name. * @pa...
Gets the values of the given attribute contained in the DN. values, which could be different from what would appear in the string representation of the DN
getAttributeValues
{ "repo_name": "dfish3r/vt-crypt", "path": "src/main/java/edu/vt/middleware/crypt/x509/DNUtils.java", "license": "apache-2.0", "size": 5297 }
[ "edu.vt.middleware.crypt.x509.types.AttributeTypeAndValue", "edu.vt.middleware.crypt.x509.types.RelativeDistinguishedName", "java.util.ArrayList", "java.util.List", "javax.security.auth.x500.X500Principal" ]
import edu.vt.middleware.crypt.x509.types.AttributeTypeAndValue; import edu.vt.middleware.crypt.x509.types.RelativeDistinguishedName; import java.util.ArrayList; import java.util.List; import javax.security.auth.x500.X500Principal;
import edu.vt.middleware.crypt.x509.types.*; import java.util.*; import javax.security.auth.x500.*;
[ "edu.vt.middleware", "java.util", "javax.security" ]
edu.vt.middleware; java.util; javax.security;
1,323,631
public Calendar getPublishedDate() { return this.publishedDate; }
Calendar function() { return this.publishedDate; }
/** * Optional. Specifies the date when the OS image was added to the image * repository. * @return The PublishedDate value. */
Optional. Specifies the date when the OS image was added to the image repository
getPublishedDate
{ "repo_name": "manikandan-palaniappan/azure-sdk-for-java", "path": "management-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineVMImageUpdateParameters.java", "license": "apache-2.0", "size": 9230 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,260,776
public static void writeUnsignedVL(long data, DataOutput out) throws IOException { while (true) { if ((data & ~0x7FL) == 0) { out.writeByte((int) data); return; } else { out.writeByte((int) data & 0x7F | 0x80); data >>>= 7; } } }
static void function(long data, DataOutput out) throws IOException { while (true) { if ((data & ~0x7FL) == 0) { out.writeByte((int) data); return; } else { out.writeByte((int) data & 0x7F 0x80); data >>>= 7; } } }
/** * Encode a long as a variable length array. * * This method is appropriate for unsigned integers. For signed integers, negative values will * always consume 10 bytes, so it is recommended to use writeSignedVL instead. * * This is taken from the varint encoding in protobufs (BSD licensed). See *...
Encode a long as a variable length array. This method is appropriate for unsigned integers. For signed integers, negative values will always consume 10 bytes, so it is recommended to use writeSignedVL instead. This is taken from the varint encoding in protobufs (BSD licensed). See HREF
writeUnsignedVL
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java", "license": "apache-2.0", "size": 132544 }
[ "java.io.DataOutput", "java.io.IOException" ]
import java.io.DataOutput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,852,587
public Repository getRepository() { return rep; }
Repository function() { return rep; }
/** * Gets the repository for the job entry. * * @return the repository */
Gets the repository for the job entry
getRepository
{ "repo_name": "lihongqiang/kettle-4.4.0-stable", "path": "src/org/pentaho/di/job/entry/JobEntryBase.java", "license": "apache-2.0", "size": 33308 }
[ "org.pentaho.di.repository.Repository" ]
import org.pentaho.di.repository.Repository;
import org.pentaho.di.repository.*;
[ "org.pentaho.di" ]
org.pentaho.di;
494,977
public synchronized Class getProxyClass() { if ((proxyClass == null) && (proxyClassName != null)) { if (isDynamicProxy()) { return getClassOfObject(); } else { try ...
synchronized Class function() { if ((proxyClass == null) && (proxyClassName != null)) { if (isDynamicProxy()) { return getClassOfObject(); } else { try { proxyClass = ClassHelper.getClass(proxyClassName); } catch (ClassNotFoundException e) { throw new MetadataException(e); } } } return proxyClass; }
/** * Insert the method's description here. * Creation date: (26.01.2001 09:20:09) * @return java.lang.Class */
Insert the method's description here. Creation date: (26.01.2001 09:20:09)
getProxyClass
{ "repo_name": "kuali/ojb-1.0.4", "path": "src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java", "license": "apache-2.0", "size": 73402 }
[ "org.apache.ojb.broker.util.ClassHelper" ]
import org.apache.ojb.broker.util.ClassHelper;
import org.apache.ojb.broker.util.*;
[ "org.apache.ojb" ]
org.apache.ojb;
801,870
public boolean deleted(final Object entity) { DataAuditEvent event = events.get(entity); return event != null && event.getOperation() == Operation.DELETE; }
boolean function(final Object entity) { DataAuditEvent event = events.get(entity); return event != null && event.getOperation() == Operation.DELETE; }
/** * Checks if operation on an entity is deleted or not. * * @param entity the entity * * @return true, if operation is deleted; false otherwise */
Checks if operation on an entity is deleted or not
deleted
{ "repo_name": "NCIP/ctms-commons", "path": "core/src/main/java/gov/nih/nci/cabig/ctms/audit/AuditSession.java", "license": "bsd-3-clause", "size": 3420 }
[ "gov.nih.nci.cabig.ctms.audit.domain.DataAuditEvent", "gov.nih.nci.cabig.ctms.audit.domain.Operation" ]
import gov.nih.nci.cabig.ctms.audit.domain.DataAuditEvent; import gov.nih.nci.cabig.ctms.audit.domain.Operation;
import gov.nih.nci.cabig.ctms.audit.domain.*;
[ "gov.nih.nci" ]
gov.nih.nci;
790,258
int writeTo(FlatBufferBuilder builder);
int writeTo(FlatBufferBuilder builder);
/** * Returns the number of bytes taken to serialize the data in builder after writing to it. */
Returns the number of bytes taken to serialize the data in builder after writing to it
writeTo
{ "repo_name": "renesugar/arrow", "path": "java/vector/src/main/java/org/apache/arrow/vector/ipc/message/FBSerializable.java", "license": "apache-2.0", "size": 1134 }
[ "com.google.flatbuffers.FlatBufferBuilder" ]
import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.*;
[ "com.google.flatbuffers" ]
com.google.flatbuffers;
1,416,108
public NetworkQuotaInfo getActiveNetworkQuotaInfo() { try { return mService.getActiveNetworkQuotaInfo(); } catch (RemoteException e) { return null; } }
NetworkQuotaInfo function() { try { return mService.getActiveNetworkQuotaInfo(); } catch (RemoteException e) { return null; } }
/** * Return quota status for the current active network, or {@code null} if no * network is active. Quota status can change rapidly, so these values * shouldn't be cached. * * @hide */
Return quota status for the current active network, or null if no network is active. Quota status can change rapidly, so these values shouldn't be cached
getActiveNetworkQuotaInfo
{ "repo_name": "hdiwan/qksms", "path": "QKSMS/src/main/java/android/net/ConnectivityManager.java", "license": "gpl-3.0", "size": 32321 }
[ "android.os.RemoteException" ]
import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
7,504
private BaseDescr namedConsequence(CEDescrBuilder<?, ?> ce, NamedConsequenceDescrBuilder<?> namedConsequence) throws RecognitionException { if (namedConsequence == null) { namedConsequence = helper.start((DescrBuilder<?, ?>) ce, NamedConsequenceDescrBuilder.class, ...
BaseDescr function(CEDescrBuilder<?, ?> ce, NamedConsequenceDescrBuilder<?> namedConsequence) throws RecognitionException { if (namedConsequence == null) { namedConsequence = helper.start((DescrBuilder<?, ?>) ce, NamedConsequenceDescrBuilder.class, null); } try { match(input, DRL6Lexer.ID, DroolsSoftKeywords.DO, null, ...
/** * namedConsequence := DO LEFT_SQUARE ID RIGHT_SQUARE BREAK? */
namedConsequence := DO LEFT_SQUARE ID RIGHT_SQUARE BREAK
namedConsequence
{ "repo_name": "amckee23/drools", "path": "drools-compiler/src/main/java/org/drools/compiler/lang/DRL6Parser.java", "license": "apache-2.0", "size": 172886 }
[ "org.antlr.runtime.RecognitionException", "org.antlr.runtime.Token", "org.drools.compiler.lang.api.CEDescrBuilder", "org.drools.compiler.lang.api.DescrBuilder", "org.drools.compiler.lang.api.NamedConsequenceDescrBuilder", "org.drools.compiler.lang.descr.BaseDescr" ]
import org.antlr.runtime.RecognitionException; import org.antlr.runtime.Token; import org.drools.compiler.lang.api.CEDescrBuilder; import org.drools.compiler.lang.api.DescrBuilder; import org.drools.compiler.lang.api.NamedConsequenceDescrBuilder; import org.drools.compiler.lang.descr.BaseDescr;
import org.antlr.runtime.*; import org.drools.compiler.lang.api.*; import org.drools.compiler.lang.descr.*;
[ "org.antlr.runtime", "org.drools.compiler" ]
org.antlr.runtime; org.drools.compiler;
2,425,069
@Test public void testConfigureMaxConnsPerRoute() { System.out.println(getTestTraceHead("[NGSICartoDBSink.configure]") + "-------- backend.max_conns_per_route gets the configured value"); String apiKey = "1234567890abcdef"; String backendMaxConns = null; String ba...
void function() { System.out.println(getTestTraceHead(STR) + STR); String apiKey = STR; String backendMaxConns = null; String backendMaxConnsPerRoute = "3"; String batchSize = null; String batchTimeout = null; String batchTTL = null; String dataModel = null; String enableDistanceHistoric = null; String enableGrouping =...
/** * [NGSICartoDBSink.configure] -------- backend.max_conns_per_route gets the configured value. */
[NGSICartoDBSink.configure] -------- backend.max_conns_per_route gets the configured value
testConfigureMaxConnsPerRoute
{ "repo_name": "telefonicaid/fiware-cygnus", "path": "cygnus-ngsi/src/test/java/com/telefonica/iot/cygnus/sinks/NGSICartoDBSinkTest.java", "license": "agpl-3.0", "size": 104755 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
430,750
public boolean isOsMac() { return SystemUtils.IS_OS_MAC; }
boolean function() { return SystemUtils.IS_OS_MAC; }
/** * True if this is Mac system. */
True if this is Mac system
isOsMac
{ "repo_name": "SonarSource/sonarqube", "path": "sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java", "license": "lgpl-3.0", "size": 4185 }
[ "org.apache.commons.lang.SystemUtils" ]
import org.apache.commons.lang.SystemUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
390,715
private static APIRequestInfoDTO generateAPIInfoDTO(MessageContext messageContext) { APIRequestInfoDTO apiRequestInfoDTO = new APIRequestInfoDTO(); apiRequestInfoDTO.setContext((String) messageContext.getProperty(RESTConstants.REST_API_CONTEXT)); apiRequestInfoDTO.setVersion((String) messag...
static APIRequestInfoDTO function(MessageContext messageContext) { APIRequestInfoDTO apiRequestInfoDTO = new APIRequestInfoDTO(); apiRequestInfoDTO.setContext((String) messageContext.getProperty(RESTConstants.REST_API_CONTEXT)); apiRequestInfoDTO.setVersion((String) messageContext.getProperty(RESTConstants.SYNAPSE_REST...
/** * Generates APIRequestInfoDTO object using Synapse MessageContext. * * @param messageContext Synapse MessageContext * @return APIRequestInfoDTO */
Generates APIRequestInfoDTO object using Synapse MessageContext
generateAPIInfoDTO
{ "repo_name": "chamindias/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/ext/listener/ExtensionListenerUtil.java", "license": "apache-2.0", "size": 18307 }
[ "org.apache.synapse.MessageContext", "org.apache.synapse.rest.RESTConstants", "org.wso2.carbon.apimgt.common.gateway.dto.APIRequestInfoDTO", "org.wso2.carbon.apimgt.gateway.APIMgtGatewayConstants", "org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityUtils", "org.wso2.carbon.apimgt.gateway.handler...
import org.apache.synapse.MessageContext; import org.apache.synapse.rest.RESTConstants; import org.wso2.carbon.apimgt.common.gateway.dto.APIRequestInfoDTO; import org.wso2.carbon.apimgt.gateway.APIMgtGatewayConstants; import org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityUtils; import org.wso2.carbon.apimg...
import org.apache.synapse.*; import org.apache.synapse.rest.*; import org.wso2.carbon.apimgt.common.gateway.dto.*; import org.wso2.carbon.apimgt.gateway.*; import org.wso2.carbon.apimgt.gateway.handlers.security.*;
[ "org.apache.synapse", "org.wso2.carbon" ]
org.apache.synapse; org.wso2.carbon;
2,727,316
public static JSONObject getUsageCountForMonetization(long from, long to) throws APIManagementException { JSONObject jsonObject = null; String granularity = null; APIManagerConfiguration configuration = ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService() ...
static JSONObject function(long from, long to) throws APIManagementException { JSONObject jsonObject = null; String granularity = null; APIManagerConfiguration configuration = ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService() .getAPIManagerConfiguration(); granularity = configuration.getFirstProp...
/** * Implemented to get the API usage count for monetization. * * @param from : the start timestamp of the query. * @param to : the end timestamp of the query. * @return JSON Object. */
Implemented to get the API usage count for monetization
getUsageCountForMonetization
{ "repo_name": "ruks/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java", "license": "apache-2.0", "size": 564037 }
[ "org.apache.commons.lang3.StringUtils", "org.json.simple.JSONObject", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.impl.APIConstants", "org.wso2.carbon.apimgt.impl.APIManagerConfiguration", "org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder" ]
import org.apache.commons.lang3.StringUtils; import org.json.simple.JSONObject; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.APIConstants; import org.wso2.carbon.apimgt.impl.APIManagerConfiguration; import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder;
import org.apache.commons.lang3.*; import org.json.simple.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.internal.*;
[ "org.apache.commons", "org.json.simple", "org.wso2.carbon" ]
org.apache.commons; org.json.simple; org.wso2.carbon;
889,416
@Override public ResourceLocator getResourceLocator() { return SAPEditPlugin.INSTANCE; }
ResourceLocator function() { return SAPEditPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Return the resource locator for this item provider's resources.
getResourceLocator
{ "repo_name": "DaemonSu/fuse-master", "path": "components/camel-sap/org.fusesource.camel.component.sap.model.edit/src/org/fusesource/camel/component/sap/model/rfc/provider/ServerDataItemProvider.java", "license": "apache-2.0", "size": 17978 }
[ "org.eclipse.emf.common.util.ResourceLocator", "org.fusesource.camel.component.sap.model.SAPEditPlugin" ]
import org.eclipse.emf.common.util.ResourceLocator; import org.fusesource.camel.component.sap.model.SAPEditPlugin;
import org.eclipse.emf.common.util.*; import org.fusesource.camel.component.sap.model.*;
[ "org.eclipse.emf", "org.fusesource.camel" ]
org.eclipse.emf; org.fusesource.camel;
1,294,075
public boolean isSolrSearch() { if (VFS.equals(m_source)) { // VFS search selected return false; } // index selected and query entered --> Solr search else VFS return (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_source) && CmsStringUtil.isNotEmptyO...
boolean function() { if (VFS.equals(m_source)) { return false; } return (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_source) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_query)); }
/** * Returns <code>true</code> if Solr index is selected and a query was entered.<p> * * @return <code>true</code> if Solr index is selected and a query was entered */
Returns <code>true</code> if Solr index is selected and a query was entered
isSolrSearch
{ "repo_name": "ggiudetti/opencms-core", "path": "src-modules/org/opencms/workplace/tools/searchindex/sourcesearch/CmsSearchReplaceSettings.java", "license": "lgpl-2.1", "size": 8714 }
[ "org.opencms.util.CmsStringUtil" ]
import org.opencms.util.CmsStringUtil;
import org.opencms.util.*;
[ "org.opencms.util" ]
org.opencms.util;
873,512
ExecutionControl generate(ExecutionEnv env, Map<String,String> parameters) throws Throwable;
ExecutionControl generate(ExecutionEnv env, Map<String,String> parameters) throws Throwable;
/** * Create and return the {@code ExecutionControl} instance. * * @param env the execution environment, provided by JShell * @param parameters the {@linkplain #defaultParameters() default} or * modified parameter map. * @return the execution engine * @throws Throwable an exception th...
Create and return the ExecutionControl instance
generate
{ "repo_name": "md-5/jdk10", "path": "src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionControlProvider.java", "license": "gpl-2.0", "size": 2878 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,676,865
protected void showErrorNotification(final Page page, final Notification notification) { page.getUI().access(() -> notification.show(page)); }
void function(final Page page, final Notification notification) { page.getUI().access(() -> notification.show(page)); }
/** * Method to show notification on the given page. * * @param page * page to show notification on * @param notification * notification to show */
Method to show notification on the given page
showErrorNotification
{ "repo_name": "eclipse/hawkbit", "path": "hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/error/HawkbitUIErrorHandler.java", "license": "epl-1.0", "size": 5802 }
[ "com.vaadin.server.Page", "com.vaadin.ui.Notification" ]
import com.vaadin.server.Page; import com.vaadin.ui.Notification;
import com.vaadin.server.*; import com.vaadin.ui.*;
[ "com.vaadin.server", "com.vaadin.ui" ]
com.vaadin.server; com.vaadin.ui;
122,398
public static TaskConfiguration createConfig(Keyspace keyspace, String config){ Json postProcessingConfiguration = Json.object(); postProcessingConfiguration.set(REST.Request.KEYSPACE, keyspace.getValue()); postProcessingConfiguration.set(REST.Request.COMMIT_LOG_FIXING, Json.read(config).at(...
static TaskConfiguration function(Keyspace keyspace, String config){ Json postProcessingConfiguration = Json.object(); postProcessingConfiguration.set(REST.Request.KEYSPACE, keyspace.getValue()); postProcessingConfiguration.set(REST.Request.COMMIT_LOG_FIXING, Json.read(config).at(REST.Request.COMMIT_LOG_FIXING)); retur...
/** * Helper method which creates the task config needed in order to execute a PP task * * @param keyspace The keyspace of the graph to execute this on. * @param config The config which contains the concepts to post process * @return The task configuration encapsulating the above details in a m...
Helper method which creates the task config needed in order to execute a PP task
createConfig
{ "repo_name": "pluraliseseverythings/grakn", "path": "grakn-engine/src/main/java/ai/grakn/engine/postprocessing/PostProcessingTask.java", "license": "gpl-3.0", "size": 8607 }
[ "ai.grakn.Keyspace", "ai.grakn.engine.tasks.manager.TaskConfiguration" ]
import ai.grakn.Keyspace; import ai.grakn.engine.tasks.manager.TaskConfiguration;
import ai.grakn.*; import ai.grakn.engine.tasks.manager.*;
[ "ai.grakn", "ai.grakn.engine" ]
ai.grakn; ai.grakn.engine;
2,844,903
public void removeLayerCollectionListener(LayerCollectionListener listener);
void function(LayerCollectionListener listener);
/** * <p>Removes a listener of events produced on a collection of layers.</p> * * @param listener a <code>LayerCollectionListener</code> * * @see #addLayerCollectionListener(LayerCollectionListener) */
Removes a listener of events produced on a collection of layers
removeLayerCollectionListener
{ "repo_name": "iCarto/siga", "path": "libFMap/src/com/iver/cit/gvsig/fmap/layers/layerOperations/LayerCollection.java", "license": "gpl-3.0", "size": 5742 }
[ "com.iver.cit.gvsig.fmap.layers.LayerCollectionListener" ]
import com.iver.cit.gvsig.fmap.layers.LayerCollectionListener;
import com.iver.cit.gvsig.fmap.layers.*;
[ "com.iver.cit" ]
com.iver.cit;
872,291
protected int[] mapColumnsToProperties(final ResultSetMetaData rsmd, final PropertyDescriptor[] props) throws SQLException { final int cols = rsmd.getColumnCount(); final int[] columnToProperty = new int[cols + 1]; Arrays.fill(columnToProperty, PROPERTY_NOT_FOUND); for ...
int[] function(final ResultSetMetaData rsmd, final PropertyDescriptor[] props) throws SQLException { final int cols = rsmd.getColumnCount(); final int[] columnToProperty = new int[cols + 1]; Arrays.fill(columnToProperty, PROPERTY_NOT_FOUND); for (int col = 1; col <= cols; col++) { String columnName = rsmd.getColumnLabe...
/** * The positions in the returned array represent column numbers. The * values stored at each position represent the index in the * {@code PropertyDescriptor[]} for the bean property that matches * the column name. If no bean property was found for a column, the * position is set to {@code ...
The positions in the returned array represent column numbers. The values stored at each position represent the index in the PropertyDescriptor[] for the bean property that matches the column name. If no bean property was found for a column, the position is set to PROPERTY_NOT_FOUND
mapColumnsToProperties
{ "repo_name": "apache/commons-dbutils", "path": "src/main/java/org/apache/commons/dbutils/BeanProcessor.java", "license": "apache-2.0", "size": 20435 }
[ "java.beans.PropertyDescriptor", "java.sql.ResultSetMetaData", "java.sql.SQLException", "java.util.Arrays", "org.apache.commons.dbutils.annotations.Column" ]
import java.beans.PropertyDescriptor; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.Arrays; import org.apache.commons.dbutils.annotations.Column;
import java.beans.*; import java.sql.*; import java.util.*; import org.apache.commons.dbutils.annotations.*;
[ "java.beans", "java.sql", "java.util", "org.apache.commons" ]
java.beans; java.sql; java.util; org.apache.commons;
249,141
void deleteMember(PerunSession perunSession, Member member) throws InternalErrorException, MemberAlreadyRemovedException;
void deleteMember(PerunSession perunSession, Member member) throws InternalErrorException, MemberAlreadyRemovedException;
/** * Deletes only member data appropriated by member id. * * @param perunSession * @param member * @throws InternalErrorException * @throws MemberAlreadyRemovedException if there are 0 rows affected by removing from DB */
Deletes only member data appropriated by member id
deleteMember
{ "repo_name": "stavamichal/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/MembersManagerImplApi.java", "license": "bsd-2-clause", "size": 11622 }
[ "cz.metacentrum.perun.core.api.Member", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.MemberAlreadyRemovedException" ]
import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.MemberAlreadyRemovedException;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
1,056,950
EngineState getState();
EngineState getState();
/** * Returns the engine's current state. * * @return the engine's current state. */
Returns the engine's current state
getState
{ "repo_name": "panos--/ella", "path": "src/main/java/org/unbunt/ella/engine/corelang/Engine.java", "license": "gpl-2.0", "size": 15281 }
[ "org.unbunt.ella.engine.EngineState" ]
import org.unbunt.ella.engine.EngineState;
import org.unbunt.ella.engine.*;
[ "org.unbunt.ella" ]
org.unbunt.ella;
87,558
private static String holdabilityString(int holdability) { switch (holdability) { case ResultSet.HOLD_CURSORS_OVER_COMMIT: return "HOLD_CURSORS_OVER_COMMIT"; case ResultSet.CLOSE_CURSORS_AT_COMMIT: return "CLOSE_CURSORS_AT_COMMIT"; default: return ...
static String function(int holdability) { switch (holdability) { case ResultSet.HOLD_CURSORS_OVER_COMMIT: return STR; case ResultSet.CLOSE_CURSORS_AT_COMMIT: return STR; default: return STR; } }
/** * Convert holdability from an integer to a readable string. * * @param holdability an <code>int</code> value representing a holdability * @return a <code>String</code> value representing the same holdability * */
Convert holdability from an integer to a readable string
holdabilityString
{ "repo_name": "scnakandala/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ResultSetTest.java", "license": "apache-2.0", "size": 72380 }
[ "java.sql.ResultSet" ]
import java.sql.ResultSet;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,326,489
public void setSessionManager(SessionManager sessionManager) { if (LOG.isDebugEnabled()) { LOG.debug("setSessionManager(SessionManager " + sessionManager + ")"); } this.sessionManager = sessionManager; }
void function(SessionManager sessionManager) { if (LOG.isDebugEnabled()) { LOG.debug(STR + sessionManager + ")"); } this.sessionManager = sessionManager; }
/** * Dependency injection. * * @param sessionManager * The sessionManager to set. */
Dependency injection
setSessionManager
{ "repo_name": "harfalm/Sakai-10.1", "path": "common/common-composite-component/src/java/org/sakaiproject/component/common/manager/PersistableHelper.java", "license": "apache-2.0", "size": 4443 }
[ "org.sakaiproject.tool.api.SessionManager" ]
import org.sakaiproject.tool.api.SessionManager;
import org.sakaiproject.tool.api.*;
[ "org.sakaiproject.tool" ]
org.sakaiproject.tool;
176,438
private boolean handleFocusLost(FocusEvent fe) { Component currentFocus = getGlobalFocusOwner(); if (currentFocus != fe.getOppositeComponent()) { setGlobalFocusOwner(null); if (getGlobalFocusOwner() != null) { // TODO: Is this possible? If so, then we should try t...
boolean function(FocusEvent fe) { Component currentFocus = getGlobalFocusOwner(); if (currentFocus != fe.getOppositeComponent()) { setGlobalFocusOwner(null); if (getGlobalFocusOwner() != null) { } else { if (! fe.isTemporary()) { setGlobalPermanentFocusOwner(null); if (getGlobalPermanentFocusOwner() != null) { } else {...
/** * Handles FOCUS_LOST events for {@link #dispatchEvent(AWTEvent)}. * * @param fe the focus event * * @return if the event has been handled */
Handles FOCUS_LOST events for <code>#dispatchEvent(AWTEvent)</code>
handleFocusLost
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/awt/DefaultKeyboardFocusManager.java", "license": "gpl-2.0", "size": 18993 }
[ "java.awt.event.FocusEvent" ]
import java.awt.event.FocusEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,637,691
public static void main(String[] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }catch(Exception e1) { e1.printStackTrace(); } try { simulation = new Simulation(); frame = new MainFrame(); frame.setVisible(true); }catch(Exception e) { e.printSt...
static void function(String[] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }catch(Exception e1) { e1.printStackTrace(); } try { simulation = new Simulation(); frame = new MainFrame(); frame.setVisible(true); }catch(Exception e) { e.printStackTrace(); } }
/** * Launch the application. */
Launch the application
main
{ "repo_name": "Alexander01998/Galton-Brett-Simulation", "path": "Galton-Brett Simulation/src/tk/alexander01998/galton_brett/GaltonBrett.java", "license": "mpl-2.0", "size": 981 }
[ "javax.swing.UIManager", "tk.alexander01998.galton_brett.gui.MainFrame", "tk.alexander01998.galton_brett.simulation.Simulation" ]
import javax.swing.UIManager; import tk.alexander01998.galton_brett.gui.MainFrame; import tk.alexander01998.galton_brett.simulation.Simulation;
import javax.swing.*; import tk.alexander01998.galton_brett.gui.*; import tk.alexander01998.galton_brett.simulation.*;
[ "javax.swing", "tk.alexander01998.galton_brett" ]
javax.swing; tk.alexander01998.galton_brett;
870,606
protected void commitIfNeeded() throws SQLException { if (autoCommit && needCommit) { try { getTR().commit(); clearLOBMapping(); } catch (Throwable t) { throw handleException(t); }...
void function() throws SQLException { if (autoCommit && needCommit) { try { getTR().commit(); clearLOBMapping(); } catch (Throwable t) { throw handleException(t); } needCommit = false; } }
/** * if a commit is needed, perform it. * * Must have connection synchonization and context set up already. * * @exception SQLException if commit returns error */
if a commit is needed, perform it. Must have connection synchonization and context set up already
commitIfNeeded
{ "repo_name": "lpxz/grail-derby104", "path": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "license": "apache-2.0", "size": 101955 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,892,432
InputStream is = this.getClass().getClassLoader().getResourceAsStream(filename); return is; }
InputStream is = this.getClass().getClassLoader().getResourceAsStream(filename); return is; }
/** * Opens the file as a {@link InputStream}. */
Opens the file as a <code>InputStream</code>
openStream
{ "repo_name": "pwrose/biojava", "path": "biojava-structure/src/test/java/org/biojava/nbio/structure/rcsb/RCSBLigandsFactoryTest.java", "license": "lgpl-2.1", "size": 4441 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,777,404
public NodeIterator createNodeIterator(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion) throws DOMException { if (traversalSupport == null) ...
NodeIterator function(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion) throws DOMException { if (traversalSupport == null) { traversalSupport = new TraversalSupport(); } return traversalSupport.createNodeIterator(this, root, whatToShow, filter, entityReferenceExpansion); }
/** * <b>DOM</b>: Implements {@link * DocumentTraversal#createNodeIterator(Node,int,NodeFilter,boolean)}. */
DOM: Implements <code>DocumentTraversal#createNodeIterator(Node,int,NodeFilter,boolean)</code>
createNodeIterator
{ "repo_name": "Groostav/CMPT880-term-project", "path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/AbstractDocument.java", "license": "apache-2.0", "size": 95361 }
[ "org.apache.batik.dom.traversal.TraversalSupport", "org.w3c.dom.DOMException", "org.w3c.dom.Node", "org.w3c.dom.traversal.NodeFilter", "org.w3c.dom.traversal.NodeIterator" ]
import org.apache.batik.dom.traversal.TraversalSupport; import org.w3c.dom.DOMException; import org.w3c.dom.Node; import org.w3c.dom.traversal.NodeFilter; import org.w3c.dom.traversal.NodeIterator;
import org.apache.batik.dom.traversal.*; import org.w3c.dom.*; import org.w3c.dom.traversal.*;
[ "org.apache.batik", "org.w3c.dom" ]
org.apache.batik; org.w3c.dom;
1,813,031
public String getPassword() { return Scrambler.descramble(password); }
String function() { return Scrambler.descramble(password); }
/** * Returns the clear-text password (unscrambled) * * @return Password */
Returns the clear-text password (unscrambled)
getPassword
{ "repo_name": "hudson3-plugins/hudson-artifactory-plugin", "path": "src/main/java/org/jfrog/hudson/plugins/artifactory/util/Credentials.java", "license": "apache-2.0", "size": 1596 }
[ "hudson.util.Scrambler" ]
import hudson.util.Scrambler;
import hudson.util.*;
[ "hudson.util" ]
hudson.util;
1,981,933
protected void setData(ConfigItemSaveActionBase.DataResult data) { this.data = data; } @ToJSON protected EJsonDataResult result;
void function(ConfigItemSaveActionBase.DataResult data) { this.data = data; } protected EJsonDataResult result;
/** * set return data object. * * @param data * DataResult */
set return data object
setData
{ "repo_name": "sdgdsffdsfff/configcenter-1", "path": "src/main/java/com/baidu/cc/web/action/ConfigItemSaveActionBase.java", "license": "apache-2.0", "size": 8660 }
[ "com.baidu.cc.web.action.ConfigItemSaveActionBase", "com.baidu.lego.web.spi.EJsonDataResult" ]
import com.baidu.cc.web.action.ConfigItemSaveActionBase; import com.baidu.lego.web.spi.EJsonDataResult;
import com.baidu.cc.web.action.*; import com.baidu.lego.web.spi.*;
[ "com.baidu.cc", "com.baidu.lego" ]
com.baidu.cc; com.baidu.lego;
2,848,556
EAttribute getCustomProperty_Name();
EAttribute getCustomProperty_Name();
/** * Returns the meta object for the attribute '{@link ch.hilbri.assist.model.CustomProperty#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see ch.hilbri.assist.model.CustomProperty#getName() * @se...
Returns the meta object for the attribute '<code>ch.hilbri.assist.model.CustomProperty#getName Name</code>'.
getCustomProperty_Name
{ "repo_name": "RobertHilbrich/assist", "path": "ch.hilbri.assist.model/src-gen/ch/hilbri/assist/model/ModelPackage.java", "license": "gpl-2.0", "size": 419306 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
304,069
@TargetApi(Build.VERSION_CODES.M) public static void requestLocationPermission(Activity activity) { if (!locationPermissionGranted(activity)) { activity.requestPermissions( new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_PERMISSION); } ...
@TargetApi(Build.VERSION_CODES.M) static void function(Activity activity) { if (!locationPermissionGranted(activity)) { activity.requestPermissions( new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_PERMISSION); } }
/** * Request the location permission * Only needed in Android version 6.0 and up */
Request the location permission Only needed in Android version 6.0 and up
requestLocationPermission
{ "repo_name": "TylerCarberry/PTSD-Aid", "path": "app/src/main/java/com/tytanapps/ptsd/utils/PermissionUtil.java", "license": "mit", "size": 1913 }
[ "android.annotation.TargetApi", "android.app.Activity", "android.os.Build" ]
import android.annotation.TargetApi; import android.app.Activity; import android.os.Build;
import android.annotation.*; import android.app.*; import android.os.*;
[ "android.annotation", "android.app", "android.os" ]
android.annotation; android.app; android.os;
2,759,334
public static String getInspectItAgentJarFileLocation() { CodeSource cs = JavaAgent.class.getProtectionDomain().getCodeSource(); if (null != cs) { // no bootstrap definition for the inspectit agent is in place, thus we can use this // mechanism return cs.getLocation().getFile(); } else { List<Strin...
static String function() { CodeSource cs = JavaAgent.class.getProtectionDomain().getCodeSource(); if (null != cs) { return cs.getLocation().getFile(); } else { List<String> inputArgs = ManagementFactory.getRuntimeMXBean().getInputArguments(); for (String arg : inputArgs) { if (arg.contains(STR) && arg.contains(STR)) { ...
/** * Returns the path to the inspectit-agent.jar file. * * @return the path to the jar file. */
Returns the path to the inspectit-agent.jar file
getInspectItAgentJarFileLocation
{ "repo_name": "andy32323/inspectIT", "path": "Agent/src/info/novatec/inspectit/agent/javaagent/JavaAgent.java", "license": "agpl-3.0", "size": 18483 }
[ "info.novatec.inspectit.agent.Agent", "info.novatec.inspectit.agent.IAgent", "info.novatec.inspectit.agent.hooking.IHookDispatcher", "java.io.File", "java.io.IOException", "java.lang.management.ManagementFactory", "java.net.URLClassLoader", "java.security.CodeSource", "java.util.HashSet", "java.ut...
import info.novatec.inspectit.agent.Agent; import info.novatec.inspectit.agent.IAgent; import info.novatec.inspectit.agent.hooking.IHookDispatcher; import java.io.File; import java.io.IOException; import java.lang.management.ManagementFactory; import java.net.URLClassLoader; import java.security.CodeSource; import java...
import info.novatec.inspectit.agent.*; import info.novatec.inspectit.agent.hooking.*; import java.io.*; import java.lang.management.*; import java.net.*; import java.security.*; import java.util.*; import java.util.regex.*;
[ "info.novatec.inspectit", "java.io", "java.lang", "java.net", "java.security", "java.util" ]
info.novatec.inspectit; java.io; java.lang; java.net; java.security; java.util;
1,787,036
@SimpleProperty( category = PropertyCategory.BEHAVIOR) public String DataType() { return dataType; }
@SimpleProperty( category = PropertyCategory.BEHAVIOR) String function() { return dataType; }
/** * Returns the MIME type to pass to the activity. */
Returns the MIME type to pass to the activity
DataType
{ "repo_name": "Edeleon4/punya", "path": "appinventor/components/src/com/google/appinventor/components/runtime/ActivityStarter.java", "license": "apache-2.0", "size": 16870 }
[ "com.google.appinventor.components.annotations.PropertyCategory", "com.google.appinventor.components.annotations.SimpleProperty" ]
import com.google.appinventor.components.annotations.PropertyCategory; import com.google.appinventor.components.annotations.SimpleProperty;
import com.google.appinventor.components.annotations.*;
[ "com.google.appinventor" ]
com.google.appinventor;
770,127
Camera.Size getPreviewSize(int displayOrientation, int width, int height, Camera.Parameters parameters);
Camera.Size getPreviewSize(int displayOrientation, int width, int height, Camera.Parameters parameters);
/** * Called to allow you to indicate what size preview * should be used * * @param displayOrientation * orientation of the display in degrees * @param width * width of the available preview space * @param height * height of the available preview space * @param ...
Called to allow you to indicate what size preview should be used
getPreviewSize
{ "repo_name": "doo/cwac-camera", "path": "camera/src/main/java/com/commonsware/cwac/camera/CameraHost.java", "license": "apache-2.0", "size": 9131 }
[ "android.hardware.Camera" ]
import android.hardware.Camera;
import android.hardware.*;
[ "android.hardware" ]
android.hardware;
1,519,079
public List<String> extractDefines(String expression) { List<String> defines = new ArrayList<String>(); expression = expression.replaceAll("#ifdef", "").replaceAll("#if", "").replaceAll("defined", ""); Pattern pattern = Pattern.compile("(\\w+)"); formattedExpression = expression;...
List<String> function(String expression) { List<String> defines = new ArrayList<String>(); expression = expression.replaceAll(STR, STR#if", STRdefinedSTRSTR(\\w+)STRdefined(STR)"); } return defines; }
/** * parse a condition and returns the list of defines of this condition. * additionally this methods updates the formattedExpression with uppercased * defines names * * supported expression syntax example: * <code> * "(LightMap && SeparateTexCoord) || !ColorMap" * "#i...
parse a condition and returns the list of defines of this condition. additionally this methods updates the formattedExpression with uppercased defines names supported expression syntax example: <code> "(LightMap && SeparateTexCoord) || !ColorMap" "#if (defined(LightMap) && defined(SeparateTexCoord)) || !defined(ColorMa...
extractDefines
{ "repo_name": "delftsre/jmonkeyengine", "path": "jme3-core/src/plugins/java/com/jme3/material/plugins/ConditionParser.java", "license": "bsd-3-clause", "size": 4420 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,662,676
private static void recreateDatabase(final DbHelper dbHelper) { final File dbPath = databasePath(); final File corruptedPath = new File(LocalStorage.getBackupDirectory(), dbPath.getName() + DB_FILE_CORRUPTED_EXTENSION); if (FileUtils.copy(dbPath, corruptedPath)) { Log.i("DataStor...
static void function(final DbHelper dbHelper) { final File dbPath = databasePath(); final File corruptedPath = new File(LocalStorage.getBackupDirectory(), dbPath.getName() + DB_FILE_CORRUPTED_EXTENSION); if (FileUtils.copy(dbPath, corruptedPath)) { Log.i(STR + dbPath + STR + corruptedPath); } else { Log.e(STR); } try {...
/** * Attempt to recreate the database if opening has failed * * @param dbHelper dbHelper to use to reopen the database */
Attempt to recreate the database if opening has failed
recreateDatabase
{ "repo_name": "pstorch/cgeo", "path": "main/src/cgeo/geocaching/storage/DataStore.java", "license": "apache-2.0", "size": 143178 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,863,363
public Comparator<? super K> keyComparator() { return keyComparator; }
Comparator<? super K> function() { return keyComparator; }
/** * Returns the comparator that orders the multimap keys. */
Returns the comparator that orders the multimap keys
keyComparator
{ "repo_name": "qingsong-xu/guava", "path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/TreeMultimap.java", "license": "apache-2.0", "size": 6051 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
11,488
public List<ResultRow> selectAll(LookupResultsSelectable selectable, int maxRowsPerPage);
List<ResultRow> function(LookupResultsSelectable selectable, int maxRowsPerPage);
/** * This method performs the operations necessary for a multiple value lookup to select all of the results and rerender the page * * @param multipleValueLookupForm * @param maxRowsPerPage * @return a list of result rows, used by the UI to render the page */
This method performs the operations necessary for a multiple value lookup to select all of the results and rerender the page
selectAll
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/gl/web/struts/LookupDisplayTagSurrogate.java", "license": "apache-2.0", "size": 5280 }
[ "java.util.List", "org.kuali.rice.kns.web.ui.ResultRow" ]
import java.util.List; import org.kuali.rice.kns.web.ui.ResultRow;
import java.util.*; import org.kuali.rice.kns.web.ui.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
2,857,234
public static <T> T refresh(Connection connection, T target) throws SQLException { return OrmReader.refresh(connection, target); }
static <T> T function(Connection connection, T target) throws SQLException { return OrmReader.refresh(connection, target); }
/** * To refresh all fields in case they have changed in database. * * @param connection a SQL connection * @param target an annotated object with at least all @Id fields set. * @return the target object with all values updated or null if the object was not found anymore. * @throws SQLException ...
To refresh all fields in case they have changed in database
refresh
{ "repo_name": "brettwooldridge/SansOrm", "path": "src/main/java/com/zaxxer/sansorm/OrmElf.java", "license": "apache-2.0", "size": 14601 }
[ "com.zaxxer.sansorm.internal.OrmReader", "java.sql.Connection", "java.sql.SQLException" ]
import com.zaxxer.sansorm.internal.OrmReader; import java.sql.Connection; import java.sql.SQLException;
import com.zaxxer.sansorm.internal.*; import java.sql.*;
[ "com.zaxxer.sansorm", "java.sql" ]
com.zaxxer.sansorm; java.sql;
2,254,675
public static Test suite() { return new TestSuite(DefaultSimpleJsonReportWriterTest.class); }
static Test function() { return new TestSuite(DefaultSimpleJsonReportWriterTest.class); }
/** * Returns the test suite. * * @return the suite */
Returns the test suite
suite
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-json/src/test/java/adams/data/io/output/DefaultSimpleJsonReportWriterTest.java", "license": "gpl-3.0", "size": 2697 }
[ "junit.framework.Test", "junit.framework.TestSuite" ]
import junit.framework.Test; import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
881,200
private void executeUpdate(String request, boolean returnGeneratedKeys, Object... params) throws DAOException { try (PreparedStatement preparedStatement = initPreparedStatement(manager.getConnection(), request, returnGeneratedKeys, params);) { int status = preparedStatement.executeUpdate(); ...
void function(String request, boolean returnGeneratedKeys, Object... params) throws DAOException { try (PreparedStatement preparedStatement = initPreparedStatement(manager.getConnection(), request, returnGeneratedKeys, params);) { int status = preparedStatement.executeUpdate(); if (status == 0) { throw new DAOException...
/** * Make an SQL request to update a computer in the database. * @param request SQL request to execute * @param returnGeneratedKeys <code>true</code> if the request needs generated keys, * <code>false</code> otherwise * @param params parameters needed for the request * @throws DAOExceptio...
Make an SQL request to update a computer in the database
executeUpdate
{ "repo_name": "serrearthur/training-java", "path": "ComputerDataBase/src/main/java/cdb/dao/impl/DAOComputerImpl.java", "license": "apache-2.0", "size": 7739 }
[ "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
97,346
public PVCoordinatesProvider getPVTarget() { return targetPVProvider; }
PVCoordinatesProvider function() { return targetPVProvider; }
/** Get the position/velocity provider of the target . * @return the position/velocity provider of the target */
Get the position/velocity provider of the target
getPVTarget
{ "repo_name": "haisamido/SFDaaS", "path": "src/org/orekit/propagation/events/DihedralFieldOfViewDetector.java", "license": "lgpl-3.0", "size": 7448 }
[ "org.orekit.utils.PVCoordinatesProvider" ]
import org.orekit.utils.PVCoordinatesProvider;
import org.orekit.utils.*;
[ "org.orekit.utils" ]
org.orekit.utils;
2,470,953
public void setWidth(int w, boolean ensureDefinedWidth) { if (ensureDefinedWidth) { definedWidth = true; // on column resize expand ratio becomes zero expandRatio = 0; } if (width == w) { return; } ...
void function(int w, boolean ensureDefinedWidth) { if (ensureDefinedWidth) { definedWidth = true; expandRatio = 0; } if (width == w) { return; } if (width == -1) { captionContainer.getStyle().clearOverflow(); } width = w; if (w == -1) { captionContainer.getStyle().clearWidth(); setWidth(STRwidthSTRpx"); } else { Schedu...
/** * Sets the width of the cell. This width should not include any * possible indent modifications that are present in * {@link VScrollTableBody#getMaxIndent()}. * * @param w * The width of the cell * @param ensureDefinedWidth * ...
Sets the width of the cell. This width should not include any possible indent modifications that are present in <code>VScrollTableBody#getMaxIndent()</code>
setWidth
{ "repo_name": "udayinfy/vaadin", "path": "client/src/com/vaadin/client/ui/VScrollTable.java", "license": "apache-2.0", "size": 315709 }
[ "com.google.gwt.core.client.Scheduler", "com.google.gwt.user.client.Command" ]
import com.google.gwt.core.client.Scheduler; import com.google.gwt.user.client.Command;
import com.google.gwt.core.client.*; import com.google.gwt.user.client.*;
[ "com.google.gwt" ]
com.google.gwt;
296,438
QueryResult executeQuery(QueryOptions options, String formattedQuery);
QueryResult executeQuery(QueryOptions options, String formattedQuery);
/** * Execute query query result. * * @param options the options * @param formattedQuery the formatted query * @return the query result */
Execute query query result
executeQuery
{ "repo_name": "apereo/cas", "path": "support/cas-server-support-couchbase-core/src/main/java/org/apereo/cas/couchbase/core/CouchbaseClientFactory.java", "license": "apache-2.0", "size": 6318 }
[ "com.couchbase.client.java.query.QueryOptions", "com.couchbase.client.java.query.QueryResult" ]
import com.couchbase.client.java.query.QueryOptions; import com.couchbase.client.java.query.QueryResult;
import com.couchbase.client.java.query.*;
[ "com.couchbase.client" ]
com.couchbase.client;
1,627,321
void setMinPhenomenonTimeForOffering(String offering, DateTime minTime);
void setMinPhenomenonTimeForOffering(String offering, DateTime minTime);
/** * Sets the minimal phenomenon time for the specified offering to the * specified time. * * @param offering * the offering * @param minTime * the min phenomenon time */
Sets the minimal phenomenon time for the specified offering to the specified time
setMinPhenomenonTimeForOffering
{ "repo_name": "shane-axiom/SOS", "path": "core/api/src/main/java/org/n52/sos/cache/WritableContentCache.java", "license": "gpl-2.0", "size": 47509 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
302,832
EAttribute getPlatform_Mixed();
EAttribute getPlatform_Mixed();
/** * Returns the meta object for the attribute list '{@link org.dawnsci.marketplace.Platform#getMixed <em>Mixed</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute list '<em>Mixed</em>'. * @see org.dawnsci.marketplace.Platform#getMixed() * @see #getPlatform...
Returns the meta object for the attribute list '<code>org.dawnsci.marketplace.Platform#getMixed Mixed</code>'.
getPlatform_Mixed
{ "repo_name": "Itema-as/dawn-marketplace-server", "path": "org.dawnsci.marketplace.core/src-gen/org/dawnsci/marketplace/MarketplacePackage.java", "license": "epl-1.0", "size": 104026 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,373,363
EReference getDoStatement_S1();
EReference getDoStatement_S1();
/** * Returns the meta object for the containment reference '{@link com.euclideanspace.spad.editor.DoStatement#getS1 <em>S1</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>S1</em>'. * @see com.euclideanspace.spad.editor.DoStatement#ge...
Returns the meta object for the containment reference '<code>com.euclideanspace.spad.editor.DoStatement#getS1 S1</code>'.
getDoStatement_S1
{ "repo_name": "martinbaker/euclideanspace", "path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java", "license": "agpl-3.0", "size": 593321 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,228,737
public static void mkDirs(BlobStore blobStore, String container, String blobName) { if (blobStore != null && !Strings.isNullOrEmpty(blobName) && blobName.contains("/")) { String directory = BlobStoreUtils.parseDirectoryFromPath(blobName); blobStore.createDirectory(container, directory); ...
static void function(BlobStore blobStore, String container, String blobName) { if (blobStore != null && !Strings.isNullOrEmpty(blobName) && blobName.contains("/")) { String directory = BlobStoreUtils.parseDirectoryFromPath(blobName); blobStore.createDirectory(container, directory); } }
/** * Creates all directories that are part of the blobName. */
Creates all directories that are part of the blobName
mkDirs
{ "repo_name": "dmvolod/camel", "path": "components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsBlobStoreHelper.java", "license": "apache-2.0", "size": 5501 }
[ "com.google.common.base.Strings", "org.jclouds.blobstore.BlobStore", "org.jclouds.blobstore.util.BlobStoreUtils" ]
import com.google.common.base.Strings; import org.jclouds.blobstore.BlobStore; import org.jclouds.blobstore.util.BlobStoreUtils;
import com.google.common.base.*; import org.jclouds.blobstore.*; import org.jclouds.blobstore.util.*;
[ "com.google.common", "org.jclouds.blobstore" ]
com.google.common; org.jclouds.blobstore;
918,505
public List<String> indices() { return indices; }
List<String> function() { return indices; }
/** * Returns indices that were included into this snapshot * * @return list of indices */
Returns indices that were included into this snapshot
indices
{ "repo_name": "vvcephei/elasticsearch", "path": "core/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java", "license": "apache-2.0", "size": 10113 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,059,700
public static String oneAuthorPlusIni(String authorField) { String fixedAuthorField = AuthorList.fixAuthorForAlphabetization(authorField); String[] tokens = fixedAuthorField.split("\\s+\\band\\b\\s+"); if (tokens.length == 0) { return ""; } String firstAuthor = t...
static String function(String authorField) { String fixedAuthorField = AuthorList.fixAuthorForAlphabetization(authorField); String[] tokens = fixedAuthorField.split(STR); if (tokens.length == 0) { return STR,")[0]; StringBuilder authorSB = new StringBuilder(); authorSB.append(firstAuthor.substring(0, Math.min(CHARS_OF_...
/** * Gets the first part of the last name of the first * author/editor, and appends the last name initial of the * remaining authors/editors. * Maximum 5 characters * @param authorField a <code>String</code> * @return the surname of all authors/editors */
Gets the first part of the last name of the first author/editor, and appends the last name initial of the remaining authors/editors. Maximum 5 characters
oneAuthorPlusIni
{ "repo_name": "iksmada/DC-UFSCar-ES2-201601-GrupoDilema", "path": "src/main/java/net/sf/jabref/logic/labelpattern/LabelPatternUtil.java", "license": "gpl-2.0", "size": 54874 }
[ "net.sf.jabref.model.entry.AuthorList" ]
import net.sf.jabref.model.entry.AuthorList;
import net.sf.jabref.model.entry.*;
[ "net.sf.jabref" ]
net.sf.jabref;
577,756