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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
public User getUserRequest(final Principal userID, final LDAPConnection ldapConn)
throws UserNotFoundException, TransientException,
AccessControlException
{
return getUser(userID, config.getUserRequestsDN(), ldapConn, false);
} | User function(final Principal userID, final LDAPConnection ldapConn) throws UserNotFoundException, TransientException, AccessControlException { return getUser(userID, config.getUserRequestsDN(), ldapConn, false); } | /**
* Obtain a user who is awaiting approval.
*
* @param userID The user ID of the pending user.
* @param ldapConn The LDAPConnection instance to use.
* @return A User instance awaiting approval.
*
* @throws UserNotFoundException when the user is not found in the ... | Obtain a user who is awaiting approval | getUserRequest | {
"repo_name": "opencadc/ac",
"path": "cadc-access-control-server/src/main/java/ca/nrc/cadc/ac/server/ldap/LdapUserDAO.java",
"license": "agpl-3.0",
"size": 70064
} | [
"ca.nrc.cadc.ac.User",
"ca.nrc.cadc.ac.UserNotFoundException",
"ca.nrc.cadc.net.TransientException",
"com.unboundid.ldap.sdk.LDAPConnection",
"java.security.AccessControlException",
"java.security.Principal"
] | import ca.nrc.cadc.ac.User; import ca.nrc.cadc.ac.UserNotFoundException; import ca.nrc.cadc.net.TransientException; import com.unboundid.ldap.sdk.LDAPConnection; import java.security.AccessControlException; import java.security.Principal; | import ca.nrc.cadc.ac.*; import ca.nrc.cadc.net.*; import com.unboundid.ldap.sdk.*; import java.security.*; | [
"ca.nrc.cadc",
"com.unboundid.ldap",
"java.security"
] | ca.nrc.cadc; com.unboundid.ldap; java.security; | 2,662,151 |
@Override
public Object onRetainNonConfigurationInstance() {
NonConfigurationInstanceState state = new NonConfigurationInstanceState(mWakeLock);
Log.d(TAG, "Handing wakelock off to NonConfigurationInstanceState");
mWakeLock = null;
return state;
} | Object function() { NonConfigurationInstanceState state = new NonConfigurationInstanceState(mWakeLock); Log.d(TAG, STR); mWakeLock = null; return state; } | /**
* Reconfiguring, so propagate the wakelock to the next instance. This runs between onStop()
* and onDestroy() and only if we are changing configuration (e.g. rotation). Also clears
* mWakeLock so the subsequent call to onDestroy does not release it.
*/ | Reconfiguring, so propagate the wakelock to the next instance. This runs between onStop() and onDestroy() and only if we are changing configuration (e.g. rotation). Also clears mWakeLock so the subsequent call to onDestroy does not release it | onRetainNonConfigurationInstance | {
"repo_name": "xorware/android_packages_apps_Settings",
"path": "src/com/android/settings/CryptKeeper.java",
"license": "lgpl-3.0",
"size": 42160
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 133,452 |
public static BinaryMessageDecoder<PlayingCard> getDecoder() {
return DECODER;
} | static BinaryMessageDecoder<PlayingCard> function() { return DECODER; } | /**
* Return the BinaryMessageDecoder instance used by this class.
* @return the message decoder used by this class
*/ | Return the BinaryMessageDecoder instance used by this class | getDecoder | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/schemaregistry/azure-data-schemaregistry-avro/src/samples/java/com/azure/data/schemaregistry/avro/generatedtestsources/PlayingCard.java",
"license": "mit",
"size": 16064
} | [
"org.apache.avro.message.BinaryMessageDecoder"
] | import org.apache.avro.message.BinaryMessageDecoder; | import org.apache.avro.message.*; | [
"org.apache.avro"
] | org.apache.avro; | 1,317,655 |
public void updateRemoteStoreDefList(List<StoreDefinition> storeDefs)
throws VoldemortException {
updateRemoteStoreDefList(storeDefs, currentCluster.getNodeIds());
} | void function(List<StoreDefinition> storeDefs) throws VoldemortException { updateRemoteStoreDefList(storeDefs, currentCluster.getNodeIds()); } | /**
* Wrapper for updateRemoteStoreDefList : update this for all nodes
* <p>
*
* @param storeDefs The new store list
* @throws VoldemortException
*/ | Wrapper for updateRemoteStoreDefList : update this for all nodes | updateRemoteStoreDefList | {
"repo_name": "cshaxu/voldemort",
"path": "src/java/voldemort/client/protocol/admin/AdminClient.java",
"license": "apache-2.0",
"size": 234723
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,860,359 |
LOSStorageLocation getStorageLocation(LOSPickRequestPosition position)
throws BusinessObjectNotFoundException,
BusinessObjectSecurityException;
| LOSStorageLocation getStorageLocation(LOSPickRequestPosition position) throws BusinessObjectNotFoundException, BusinessObjectSecurityException; | /**
* Returns StorageLocation from where to Pick for given
* LOSPickRequestPosition
*
* @param position
* @return StorageLocation from where to Pick
*/ | Returns StorageLocation from where to Pick for given LOSPickRequestPosition | getStorageLocation | {
"repo_name": "tedvals/mywms",
"path": "server.app/los.inventory-ejb/src/de/linogistix/los/inventory/facade/ExtinguishFacade.java",
"license": "gpl-3.0",
"size": 4238
} | [
"de.linogistix.los.inventory.pick.model.LOSPickRequestPosition",
"de.linogistix.los.location.model.LOSStorageLocation",
"de.linogistix.los.query.exception.BusinessObjectNotFoundException",
"de.linogistix.los.runtime.BusinessObjectSecurityException"
] | import de.linogistix.los.inventory.pick.model.LOSPickRequestPosition; import de.linogistix.los.location.model.LOSStorageLocation; import de.linogistix.los.query.exception.BusinessObjectNotFoundException; import de.linogistix.los.runtime.BusinessObjectSecurityException; | import de.linogistix.los.inventory.pick.model.*; import de.linogistix.los.location.model.*; import de.linogistix.los.query.exception.*; import de.linogistix.los.runtime.*; | [
"de.linogistix.los"
] | de.linogistix.los; | 2,825,647 |
public Observable<ServiceResponse<RouteInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required... | Observable<ServiceResponse<RouteInner>> function(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (routeTableName == null) { throw new IllegalArgumentException(STR); } if (routeName == null) { ... | /**
* Creates or updates a route in the specified route table.
*
* @param resourceGroupName The name of the resource group.
* @param routeTableName The name of the route table.
* @param routeName The name of the route.
* @param routeParameters Parameters supplied to the create or update ro... | Creates or updates a route in the specified route table | beginCreateOrUpdateWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/RoutesInner.java",
"license": "mit",
"size": 43032
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,911,258 |
public int readUI16(String name) throws IOException {
newDumpLevel(name, "UI16");
int ret = readUI16Internal();
endDumpLevel(ret);
return ret;
} | int function(String name) throws IOException { newDumpLevel(name, "UI16"); int ret = readUI16Internal(); endDumpLevel(ret); return ret; } | /**
* Reads one UI16 (Unsigned 16bit integer) value from the stream
*
* @param name
* @return UI16 value
* @throws IOException
*/ | Reads one UI16 (Unsigned 16bit integer) value from the stream | readUI16 | {
"repo_name": "jindrapetrik/jpexs-decompiler",
"path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java",
"license": "gpl-3.0",
"size": 130581
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,056,937 |
void setImporting(boolean importing, Object importResult)
{
this.importing = importing;
if (importResult == null) return;
if (importResult instanceof ImportErrorObject) {
importFailureCount++;
} else {
importSuccessCount++;
}
}
| void setImporting(boolean importing, Object importResult) { this.importing = importing; if (importResult == null) return; if (importResult instanceof ImportErrorObject) { importFailureCount++; } else { importSuccessCount++; } } | /**
* Sets the flag indicating if there are on-going imports.
*
* @param importing Pass <code>true</code> if there are on-going imports,
* <code>false</code> otherwise.
* @param importResult The result of the import.
*/ | Sets the flag indicating if there are on-going imports | setImporting | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerModel.java",
"license": "gpl-2.0",
"size": 44661
} | [
"org.openmicroscopy.shoola.util.file.ImportErrorObject"
] | import org.openmicroscopy.shoola.util.file.ImportErrorObject; | import org.openmicroscopy.shoola.util.file.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 1,225,735 |
public final Control[] getControls() {
Control[] returnedArray = new Control[controls.length];
for (int i = 0; i < controls.length; i++) {
returnedArray[i] = controls[i];
}
return returnedArray;
} | final Control[] function() { Control[] returnedArray = new Control[controls.length]; for (int i = 0; i < controls.length; i++) { returnedArray[i] = controls[i]; } return returnedArray; } | /**
* Obtains the set of controls supported by the
* line. If no controls are supported, returns an
* array of length 0.
* @return control set
*/ | Obtains the set of controls supported by the line. If no controls are supported, returns an array of length 0 | getControls | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/com/sun/media/sound/AbstractLine.java",
"license": "mit",
"size": 6869
} | [
"javax.sound.sampled.Control"
] | import javax.sound.sampled.Control; | import javax.sound.sampled.*; | [
"javax.sound"
] | javax.sound; | 9,253 |
@Override
public boolean equals(final Object o) {
if (o == null) {
return false;
}
if (o == this) {
return true;
}
if (o.getClass() != getClass()) {
return false;
}
final Resource r = (Resource) o;
return r.getP... | boolean function(final Object o) { if (o == null) { return false; } if (o == this) { return true; } if (o.getClass() != getClass()) { return false; } final Resource r = (Resource) o; return r.getPath().equals(getPath()); } | /**
* Merged resources are considered equal if their paths are equal,
* regardless of the list of mapped resources.
*
* @param o Object to compare with
* @return Returns <code>true</code> if the two merged resources have the
* same path.
*/ | Merged resources are considered equal if their paths are equal, regardless of the list of mapped resources | equals | {
"repo_name": "plutext/sling",
"path": "contrib/extensions/resourcemerger/src/main/java/org/apache/sling/resourcemerger/impl/MergedResource.java",
"license": "apache-2.0",
"size": 5516
} | [
"org.apache.sling.api.resource.Resource"
] | import org.apache.sling.api.resource.Resource; | import org.apache.sling.api.resource.*; | [
"org.apache.sling"
] | org.apache.sling; | 96,283 |
return new Builder();
}
public static class Builder {
private Settings settings = Settings.EMPTY;
private List<Class<? extends Plugin>> pluginClasses = new ArrayList<>(); | return new Builder(); } public static class Builder { private Settings settings = Settings.EMPTY; private List<Class<? extends Plugin>> pluginClasses = new ArrayList<>(); | /**
* Handy method ot create a {@link org.elasticsearch.client.transport.TransportClient.Builder}.
*/ | Handy method ot create a <code>org.elasticsearch.client.transport.TransportClient.Builder</code> | builder | {
"repo_name": "strapdata/elassandra-test",
"path": "core/src/main/java/org/elasticsearch/client/transport/TransportClient.java",
"license": "apache-2.0",
"size": 11730
} | [
"java.util.ArrayList",
"java.util.List",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.plugins.Plugin"
] | import java.util.ArrayList; import java.util.List; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.plugins.Plugin; | import java.util.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.plugins.*; | [
"java.util",
"org.elasticsearch.common",
"org.elasticsearch.plugins"
] | java.util; org.elasticsearch.common; org.elasticsearch.plugins; | 2,515,339 |
private static void removeProguardLine(File propertiesFile) throws IOException
{
String contentWithoutProguardStatement = null;
contentWithoutProguardStatement = read(propertiesFile, true);
write(propertiesFile, contentWithoutProguardStatement);
}
| static void function(File propertiesFile) throws IOException { String contentWithoutProguardStatement = null; contentWithoutProguardStatement = read(propertiesFile, true); write(propertiesFile, contentWithoutProguardStatement); } | /**
* Remove the following line to file
* proguard.config=proguard.cfg
* if it exists
* @param project
* @throws IOException
*/ | Remove the following line to file proguard.config=proguard.cfg if it exists | removeProguardLine | {
"repo_name": "DmitryADP/diff_qc750",
"path": "tools/motodev/src/plugins/android/src/com/motorola/studio/android/obfuscate/ObfuscatorManager.java",
"license": "gpl-2.0",
"size": 12731
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 703,064 |
boolean markSystemCollectionsForPurge(Location loc);
| boolean markSystemCollectionsForPurge(Location loc); | /**
* Marks system collections as purge candidates when a location is deleted or
* modified
*
* @param loc
* - location object
* @return true if the collection was not already marked
*/ | Marks system collections as purge candidates when a location is deleted or modified | markSystemCollectionsForPurge | {
"repo_name": "bdaum/zoraPD",
"path": "com.bdaum.zoom.core/src/com/bdaum/zoom/core/db/IDbManager.java",
"license": "gpl-2.0",
"size": 21435
} | [
"com.bdaum.zoom.cat.model.location.Location"
] | import com.bdaum.zoom.cat.model.location.Location; | import com.bdaum.zoom.cat.model.location.*; | [
"com.bdaum.zoom"
] | com.bdaum.zoom; | 425,821 |
public void testGetProxyAuthHostAuthConnKeepAlive() throws Exception {
UsernamePasswordCredentials creds =
new UsernamePasswordCredentials("testuser", "testpass");
this.client.getState().setCredentials(AuthScope.ANY, creds);
this.client.getState().setProxyCredentials(A... | void function() throws Exception { UsernamePasswordCredentials creds = new UsernamePasswordCredentials(STR, STR); this.client.getState().setCredentials(AuthScope.ANY, creds); this.client.getState().setProxyCredentials(AuthScope.ANY, creds); HttpRequestHandlerChain handlerchain = new HttpRequestHandlerChain(); handlerch... | /**
* Tests GET via authenticating proxy + host auth + connection keep-alive
*/ | Tests GET via authenticating proxy + host auth + connection keep-alive | testGetProxyAuthHostAuthConnKeepAlive | {
"repo_name": "magneticmoon/httpclient3-ntml",
"path": "src/test/org/apache/commons/httpclient/TestProxy.java",
"license": "apache-2.0",
"size": 30892
} | [
"org.apache.commons.httpclient.auth.AuthScope",
"org.apache.commons.httpclient.methods.GetMethod",
"org.apache.commons.httpclient.server.AuthRequestHandler",
"org.apache.commons.httpclient.server.HttpRequestHandlerChain",
"org.apache.commons.httpclient.server.HttpServiceHandler"
] | import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.server.AuthRequestHandler; import org.apache.commons.httpclient.server.HttpRequestHandlerChain; import org.apache.commons.httpclient.server.HttpServiceHandler; | import org.apache.commons.httpclient.auth.*; import org.apache.commons.httpclient.methods.*; import org.apache.commons.httpclient.server.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,751,662 |
private List<IObject> assertAnnotations(List<String> parents,
List<String> children, List<String> namespaces, Parameters p)
throws ServerError {
final boolean[] status = new boolean[] { false, false };
final Exception[] exc = new Exception[1];
final List<IObject> rv =... | List<IObject> function(List<String> parents, List<String> children, List<String> namespaces, Parameters p) throws ServerError { final boolean[] status = new boolean[] { false, false }; final Exception[] exc = new Exception[1]; final List<IObject> rv = new ArrayList<IObject>(); if (p == null) { p = new ParametersI(); } ... | /**
* If not filter is provided in the parameters argument, then one is
* automatically added for the current user.
*/ | If not filter is provided in the parameters argument, then one is automatically added for the current user | assertAnnotations | {
"repo_name": "simleo/openmicroscopy",
"path": "components/blitz/test/ome/services/blitz/test/TimelineITest.java",
"license": "gpl-2.0",
"size": 16113
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,642,264 |
private PointF transformCoordTouchToBitmap(float x, float y, boolean clipToBitmap) {
matrix.getValues(m);
float origW = getDrawable().getIntrinsicWidth();
float origH = getDrawable().getIntrinsicHeight();
float transX = m[Matrix.MTRANS_X];
float transY = m[Matrix.MTRANS_... | PointF function(float x, float y, boolean clipToBitmap) { matrix.getValues(m); float origW = getDrawable().getIntrinsicWidth(); float origH = getDrawable().getIntrinsicHeight(); float transX = m[Matrix.MTRANS_X]; float transY = m[Matrix.MTRANS_Y]; float finalX = ((x - transX) * origW) / getImageWidth(); float finalY = ... | /**
* This function will transform the coordinates in the touch event to the coordinate
* system of the drawable that the imageview contain
* @param x x-coordinate of touch event
* @param y y-coordinate of touch event
* @param clipToBitmap Touch event may occur within view, but outside image c... | This function will transform the coordinates in the touch event to the coordinate system of the drawable that the imageview contain | transformCoordTouchToBitmap | {
"repo_name": "zhenbinwei/MyDemo",
"path": "app/src/main/java/com/example/weizhenbin/mydemo/widget/imgcheck/TouchImageView.java",
"license": "apache-2.0",
"size": 41019
} | [
"android.graphics.Matrix",
"android.graphics.PointF"
] | import android.graphics.Matrix; import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,620,998 |
public Builder put(String key, TimeValue timeValue) {
return put(key, timeValue.toString());
} | Builder function(String key, TimeValue timeValue) { return put(key, timeValue.toString()); } | /**
* Sets a time value setting with the provided setting key and value.
*
* @param key The setting key
* @param timeValue The setting timeValue
* @return The builder
*/ | Sets a time value setting with the provided setting key and value | put | {
"repo_name": "mjason3/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/common/settings/Settings.java",
"license": "apache-2.0",
"size": 57531
} | [
"org.elasticsearch.common.unit.TimeValue"
] | import org.elasticsearch.common.unit.TimeValue; | import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,417,744 |
static void sleep(final Duration duration) throws InterruptedException {
final Instant finishInstant = Instant.now().plus(duration);
Duration remainingDuration = duration;
do {
Thread.sleep(remainingDuration.toMillis(), getNanosOfMiili(remainingDuration));
remainingDu... | static void sleep(final Duration duration) throws InterruptedException { final Instant finishInstant = Instant.now().plus(duration); Duration remainingDuration = duration; do { Thread.sleep(remainingDuration.toMillis(), getNanosOfMiili(remainingDuration)); remainingDuration = Duration.between(Instant.now(), finishInsta... | /**
* Sleeps for a guaranteed minimum duration unless interrupted.
*
* This method exists because Thread.sleep(100) can sleep for 0, 70, 100 or 200ms or anything else it deems appropriate.
* Read {@link Thread#sleep(long, int)}} for further interesting details.
*
* @param duration the slee... | Sleeps for a guaranteed minimum duration unless interrupted. This method exists because Thread.sleep(100) can sleep for 0, 70, 100 or 200ms or anything else it deems appropriate. Read <code>Thread#sleep(long, int)</code>} for further interesting details | sleep | {
"repo_name": "apache/commons-io",
"path": "src/main/java/org/apache/commons/io/ThreadMonitor.java",
"license": "apache-2.0",
"size": 4512
} | [
"java.time.Duration",
"java.time.Instant"
] | import java.time.Duration; import java.time.Instant; | import java.time.*; | [
"java.time"
] | java.time; | 300,746 |
@Test
public void testConstruction() {
KubevirtNetwork network = network1;
assertEquals(NETWORK_ID_1, network.networkId());
assertEquals(TYPE_1, network.type());
assertEquals(NAME_1, network.name());
assertEquals(MTU_1, network.mtu());
assertEquals(GATEWAY_IP_1, ... | void function() { KubevirtNetwork network = network1; assertEquals(NETWORK_ID_1, network.networkId()); assertEquals(TYPE_1, network.type()); assertEquals(NAME_1, network.name()); assertEquals(MTU_1, network.mtu()); assertEquals(GATEWAY_IP_1, network.gatewayIp()); assertEquals(DEFAULT_ROUTE_1, network.defaultRoute()); a... | /**
* Test object construction.
*/ | Test object construction | testConstruction | {
"repo_name": "opennetworkinglab/onos",
"path": "apps/kubevirt-networking/api/src/test/java/org/onosproject/kubevirtnetworking/api/DefaultKubevirtNetworkTest.java",
"license": "apache-2.0",
"size": 6519
} | [
"com.google.common.collect.ImmutableSet",
"junit.framework.TestCase"
] | import com.google.common.collect.ImmutableSet; import junit.framework.TestCase; | import com.google.common.collect.*; import junit.framework.*; | [
"com.google.common",
"junit.framework"
] | com.google.common; junit.framework; | 1,869,786 |
@SuppressWarnings("unchecked")
public List<SEGPROGRAMA> getListFromPermises(List<Short> SEGPERMISOXGPO, SEGSISTEMA SEGSISTEMA) {
Iterator<Short> itGruposDelUsuario = SEGPERMISOXGPO.iterator();
int cont = 1;
StringBuffer st = new StringBuffer();
while (itGruposDelUsuario.hasNext()) {
Short reg = (Sh... | @SuppressWarnings(STR) List<SEGPROGRAMA> function(List<Short> SEGPERMISOXGPO, SEGSISTEMA SEGSISTEMA) { Iterator<Short> itGruposDelUsuario = SEGPERMISOXGPO.iterator(); int cont = 1; StringBuffer st = new StringBuffer(); while (itGruposDelUsuario.hasNext()) { Short reg = (Short) itGruposDelUsuario.next(); if(cont == 1){ ... | /**
* Get List of contacts from database
* @return list of all contacts
*/ | Get List of contacts from database | getListFromPermises | {
"repo_name": "IvanSantiago/retopublico",
"path": "MiMappir/src/mx/gob/sct/utic/mimappir/admseg/postgreSQL/dao/SEGPROGRAMA_DAO.java",
"license": "gpl-2.0",
"size": 3208
} | [
"java.util.Iterator",
"java.util.List",
"mx.gob.sct.utic.mimappir.admseg.postgreSQL.model.SEGPERMISOXGPO"
] | import java.util.Iterator; import java.util.List; import mx.gob.sct.utic.mimappir.admseg.postgreSQL.model.SEGPERMISOXGPO; | import java.util.*; import mx.gob.sct.utic.mimappir.admseg.*; | [
"java.util",
"mx.gob.sct"
] | java.util; mx.gob.sct; | 51,033 |
protected void afterPropertiesSet() throws Exception {
RemoteFileConfiguration config = getConfiguration();
ObjectHelper.notEmpty(config.getHost(), "host");
ObjectHelper.notEmpty(config.getProtocol(), "protocol");
} | void function() throws Exception { RemoteFileConfiguration config = getConfiguration(); ObjectHelper.notEmpty(config.getHost(), "host"); ObjectHelper.notEmpty(config.getProtocol(), STR); } | /**
* Validates this endpoint if its configured properly.
*
* @throws Exception is thrown if endpoint is invalid configured for its mandatory options
*/ | Validates this endpoint if its configured properly | afterPropertiesSet | {
"repo_name": "shuliangtao/apache-camel-2.13.0-src",
"path": "components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java",
"license": "apache-2.0",
"size": 7705
} | [
"org.apache.camel.util.ObjectHelper"
] | import org.apache.camel.util.ObjectHelper; | import org.apache.camel.util.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,948,970 |
@Override
public void windowClosing(WindowEvent event) {
FreeColClient freeColClient = getFreeColClient();
if (freeColClient.isInGame() || freeColClient.isMapEditor()) {
freeColClient.askToQuit();
} else {
freeColClient.quit();
}
} | void function(WindowEvent event) { FreeColClient freeColClient = getFreeColClient(); if (freeColClient.isInGame() freeColClient.isMapEditor()) { freeColClient.askToQuit(); } else { freeColClient.quit(); } } | /**
* Invoked when the window is closing.
*
* @param event The event that has information on the action.
*/ | Invoked when the window is closing | windowClosing | {
"repo_name": "FreeCol/freecol",
"path": "src/net/sf/freecol/client/gui/WindowedFrameListener.java",
"license": "gpl-2.0",
"size": 3031
} | [
"java.awt.event.WindowEvent",
"net.sf.freecol.client.FreeColClient"
] | import java.awt.event.WindowEvent; import net.sf.freecol.client.FreeColClient; | import java.awt.event.*; import net.sf.freecol.client.*; | [
"java.awt",
"net.sf.freecol"
] | java.awt; net.sf.freecol; | 92,135 |
public static boolean checkGroupElem(BigInteger g) {
return g.compareTo(BigInteger.valueOf(2)) < 0 || g.compareTo(SM.MODULUS_MINUS_2) > 0;
} | static boolean function(BigInteger g) { return g.compareTo(BigInteger.valueOf(2)) < 0 g.compareTo(SM.MODULUS_MINUS_2) > 0; } | /**
* Check that an BigInteger is in the right range to be a (non-unit) group
* element.
*
* @param g the BigInteger to check.
* @return true if the BigInteger is in the right range, false otherwise.
*/ | Check that an BigInteger is in the right range to be a (non-unit) group element | checkGroupElem | {
"repo_name": "jitsi/otr4j",
"path": "src/main/java/net/java/otr4j/crypto/SM.java",
"license": "apache-2.0",
"size": 26389
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 588,813 |
EReference getAbstractService_ReturnType(); | EReference getAbstractService_ReturnType(); | /**
* Returns the meta object for the containment reference '{@link org.xtuml.bp.xtext.masl.masl.structure.AbstractService#getReturnType <em>Return Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Return Type</em>'.
* @see org.xtuml.bp... | Returns the meta object for the containment reference '<code>org.xtuml.bp.xtext.masl.masl.structure.AbstractService#getReturnType Return Type</code>'. | getAbstractService_ReturnType | {
"repo_name": "lwriemen/bridgepoint",
"path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/emf-gen/org/xtuml/bp/xtext/masl/masl/structure/StructurePackage.java",
"license": "apache-2.0",
"size": 189771
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,703,151 |
CommandLineConfig setOutputManifest(List<String> outputManifests) {
this.outputManifests = Lists.newArrayList();
for (String manifestName : outputManifests) {
if (!manifestName.isEmpty()) {
this.outputManifests.add(manifestName);
}
}
this.outputManifests = Immutable... | CommandLineConfig setOutputManifest(List<String> outputManifests) { this.outputManifests = Lists.newArrayList(); for (String manifestName : outputManifests) { if (!manifestName.isEmpty()) { this.outputManifests.add(manifestName); } } this.outputManifests = ImmutableList.copyOf(this.outputManifests); return this; } priv... | /**
* Sets whether to print output manifest files.
* Filter out empty file names.
*/ | Sets whether to print output manifest files. Filter out empty file names | setOutputManifest | {
"repo_name": "wenzowski/closure-compiler",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 65519
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.Lists",
"java.util.List"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,026,314 |
protected synchronized void resetConfiguration(String value) throws org.dbwiki.exception.WikiException {
ConfigSetting setting = null;
try {
setting = new ConfigSetting(value);
} catch (Exception exception) {
throw new WikiFatalException(exception);
}
server().resetWikiConfiguration(this, setting.... | synchronized void function(String value) throws org.dbwiki.exception.WikiException { ConfigSetting setting = null; try { setting = new ConfigSetting(value); } catch (Exception exception) { throw new WikiFatalException(exception); } server().resetWikiConfiguration(this, setting.getLayoutVersion(), setting.getTemplateVer... | /** Reset the configuration.
* The value is the parameter value of a ?reset=value request. The format
* currently is expected to be <int>_<int>_<int> and these <int>'s are
* layout file version, template file version, and style sheet file version.
*
* @param value String
* @throws org.dbwiki.exception.Wi... | Reset the configuration. The value is the parameter value of a ?reset=value request. The format currently is expected to be __ and these 's are layout file version, template file version, and style sheet file version | resetConfiguration | {
"repo_name": "jamescheney/database-wiki",
"path": "src/org/dbwiki/web/server/DatabaseWiki.java",
"license": "gpl-3.0",
"size": 45935
} | [
"org.dbwiki.exception.WikiFatalException"
] | import org.dbwiki.exception.WikiFatalException; | import org.dbwiki.exception.*; | [
"org.dbwiki.exception"
] | org.dbwiki.exception; | 215,326 |
public void testFacetLazyLoaded() throws QuickFixException {
DefDescriptor<T> desc = addSourceAutoCleanup(getDefClass(),
String.format(baseTag, "", "<aura:text aura:load='LAZY'/>"));
T def = desc.getDef();
AttributeDefRef body = getBodyAttributeFromDef(def);
assertTru... | void function() throws QuickFixException { DefDescriptor<T> desc = addSourceAutoCleanup(getDefClass(), String.format(baseTag, STR<aura:text aura:load='LAZY'/>STRmarkup: .getAttributeDefRef(STR).getValue()).getQualifiedName()); } | /**
* When a facet is marked for Lazy/Exclusive loading, parentDef has a LazyComponentDefRef
*/ | When a facet is marked for Lazy/Exclusive loading, parentDef has a LazyComponentDefRef | testFacetLazyLoaded | {
"repo_name": "igor-sfdc/aura",
"path": "aura-impl/src/test/java/org/auraframework/def/BaseComponentDefTest.java",
"license": "apache-2.0",
"size": 93773
} | [
"org.auraframework.throwable.quickfix.QuickFixException"
] | import org.auraframework.throwable.quickfix.QuickFixException; | import org.auraframework.throwable.quickfix.*; | [
"org.auraframework.throwable"
] | org.auraframework.throwable; | 2,024,241 |
public Map<String, String> getBuilderTypes() {
return builderTypes;
} | Map<String, String> function() { return builderTypes; } | /**
* The builder types.
*
* @return the types, not null
*/ | The builder types | getBuilderTypes | {
"repo_name": "fengshao0907/joda-beans",
"path": "src/main/java/org/joda/beans/gen/BeanGenConfig.java",
"license": "apache-2.0",
"size": 13982
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 179,372 |
public static int findPeriodClassically(int X, int N) {
return findPeriodClassically(new Apint(X), new Apint(N)).intValue();
} | static int function(int X, int N) { return findPeriodClassically(new Apint(X), new Apint(N)).intValue(); } | /**
* Finds the period of the function f(x) = X^r mod N, given
* N and X
* @param X the X to using in calculating r
* @param N the modulus of the function above
* @return the period of the function above
*/ | Finds the period of the function f(x) = X^r mod N, given N and X | findPeriodClassically | {
"repo_name": "vontell/qstudio",
"path": "src/main/java/core/util/Mathematics.java",
"license": "apache-2.0",
"size": 8677
} | [
"org.apfloat.Apint"
] | import org.apfloat.Apint; | import org.apfloat.*; | [
"org.apfloat"
] | org.apfloat; | 1,098,887 |
@Generated
@Selector("insertArrangedSubview:atIndex:")
public native void insertArrangedSubviewAtIndex(UIView view, @NUInt long stackIndex); | @Selector(STR) native void function(UIView view, @NUInt long stackIndex); | /**
* Adds the view as a subview of the container if it isn't already.
* Updates the stack index (but not the subview index) of the
* arranged subview if it's already in the arrangedSubviews list.
*/ | Adds the view as a subview of the container if it isn't already. Updates the stack index (but not the subview index) of the arranged subview if it's already in the arrangedSubviews list | insertArrangedSubviewAtIndex | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UIStackView.java",
"license": "apache-2.0",
"size": 25877
} | [
"org.moe.natj.general.ann.NUInt",
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.general.ann.NUInt; import org.moe.natj.objc.ann.Selector; | import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,052,197 |
public static ims.emergency.domain.objects.InterventionTreatmentDetail extractInterventionTreatmentDetail(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.InterventionTreatmentDetailVo valueObject)
{
return extractInterventionTreatmentDetail(domainFactory, valueObject, new HashMap());
} | static ims.emergency.domain.objects.InterventionTreatmentDetail function(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.InterventionTreatmentDetailVo valueObject) { return extractInterventionTreatmentDetail(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractInterventionTreatmentDetail | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/InterventionTreatmentDetailVoAssembler.java",
"license": "agpl-3.0",
"size": 18684
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 907,398 |
@Override
public void internalFrameClosed(InternalFrameEvent e) {
JInternalFrame frameClosed = (JInternalFrame)e.getSource();
// end management of this frame
removeFromManagedFrameList(frameClosed);
// remove from the set of open frames
openFrameSet.remove(frame... | void function(InternalFrameEvent e) { JInternalFrame frameClosed = (JInternalFrame)e.getSource(); removeFromManagedFrameList(frameClosed); openFrameSet.remove(frameClosed); } | /**
* Invoked when an internal frame has been closed.
* @param e InternalFrameEvent the related event
*/ | Invoked when an internal frame has been closed | internalFrameClosed | {
"repo_name": "levans/Open-Quark",
"path": "src/Quark_Gems/src/org/openquark/gems/client/ResultValueDisplayer.java",
"license": "bsd-3-clause",
"size": 17368
} | [
"javax.swing.JInternalFrame",
"javax.swing.event.InternalFrameEvent"
] | import javax.swing.JInternalFrame; import javax.swing.event.InternalFrameEvent; | import javax.swing.*; import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 2,837,044 |
public void testMpp12SubprojectFrom14() throws Exception
{
ProjectFile mpp = new MPPReader().read(m_basedir + "/mpp12subproject-from14.mpp");
testSubprojects(mpp, true);
} | void function() throws Exception { ProjectFile mpp = new MPPReader().read(m_basedir + STR); testSubprojects(mpp, true); } | /**
* Test subproject data read from an MPP12 file saved by Project 2010.
*
* @throws Exception
*/ | Test subproject data read from an MPP12 file saved by Project 2010 | testMpp12SubprojectFrom14 | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/junit/MppSubprojectTest.java",
"license": "lgpl-2.1",
"size": 5205
} | [
"net.sf.mpxj.ProjectFile",
"net.sf.mpxj.mpp.MPPReader"
] | import net.sf.mpxj.ProjectFile; import net.sf.mpxj.mpp.MPPReader; | import net.sf.mpxj.*; import net.sf.mpxj.mpp.*; | [
"net.sf.mpxj"
] | net.sf.mpxj; | 1,947,485 |
EAttribute getConcreteDomainElementPredicate_CharacteristicTypeConceptId(); | EAttribute getConcreteDomainElementPredicate_CharacteristicTypeConceptId(); | /**
* Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.mrcm.ConcreteDomainElementPredicate#getCharacteristicTypeConceptId <em>Characteristic Type Concept Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Characterist... | Returns the meta object for the attribute '<code>com.b2international.snowowl.snomed.mrcm.ConcreteDomainElementPredicate#getCharacteristicTypeConceptId Characteristic Type Concept Id</code>'. | getConcreteDomainElementPredicate_CharacteristicTypeConceptId | {
"repo_name": "IHTSDO/snow-owl",
"path": "snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/MrcmPackage.java",
"license": "apache-2.0",
"size": 82769
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,566,691 |
@Override
protected void updateAdapter() {
if (!mIsResumed) {
return;
}
List users = new ArrayList();
if (mShowMode == SHOW_MODE_TYPE_FOLLOWERS) {
if (mUser.getFollowers() != null) {
users.addAll(mUser.getFollowers().keySet());
... | void function() { if (!mIsResumed) { return; } List users = new ArrayList(); if (mShowMode == SHOW_MODE_TYPE_FOLLOWERS) { if (mUser.getFollowers() != null) { users.addAll(mUser.getFollowers().keySet()); } } else if (mUserArray != null) { users.addAll(mUserArray); } else if (mUser.getFollowings() != null) { users.addAll... | /**
* Update this {@link org.tomahawk.tomahawk_android.fragments.TomahawkFragment}'s {@link
* org.tomahawk.tomahawk_android.adapters.TomahawkListAdapter} content
*/ | Update this <code>org.tomahawk.tomahawk_android.fragments.TomahawkFragment</code>'s <code>org.tomahawk.tomahawk_android.adapters.TomahawkListAdapter</code> content | updateAdapter | {
"repo_name": "tomahawk-player/tomahawk-android",
"path": "app/src/main/java/org/tomahawk/tomahawk_android/fragments/UsersFragment.java",
"license": "gpl-3.0",
"size": 3895
} | [
"java.util.ArrayList",
"java.util.List",
"org.tomahawk.tomahawk_android.adapters.Segment"
] | import java.util.ArrayList; import java.util.List; import org.tomahawk.tomahawk_android.adapters.Segment; | import java.util.*; import org.tomahawk.tomahawk_android.adapters.*; | [
"java.util",
"org.tomahawk.tomahawk_android"
] | java.util; org.tomahawk.tomahawk_android; | 1,970,886 |
public Set<UserPermission> getUserPermissions() {
return userPermissions;
} | Set<UserPermission> function() { return userPermissions; } | /**
* Returns a list of the permissions for this node. Note that the returned permissions are not inherited
* from nodes above; Only the assigned permissions for this node are returned.
*
* @return the user permissions of this index.
*/ | Returns a list of the permissions for this node. Note that the returned permissions are not inherited from nodes above; Only the assigned permissions for this node are returned | getUserPermissions | {
"repo_name": "gfneto/Hive2Hive",
"path": "org.hive2hive.core/src/main/java/org/hive2hive/core/model/FolderIndex.java",
"license": "mit",
"size": 8721
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,828,784 |
public OperationError error() {
return this.error;
} | OperationError function() { return this.error; } | /**
* Get the error property: Error details for the operation in case of a failure.
*
* @return the error value.
*/ | Get the error property: Error details for the operation in case of a failure | error | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/fluent/models/OperationResultInner.java",
"license": "mit",
"size": 2926
} | [
"com.azure.resourcemanager.devtestlabs.models.OperationError"
] | import com.azure.resourcemanager.devtestlabs.models.OperationError; | import com.azure.resourcemanager.devtestlabs.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,875,828 |
ChannelBuf writeDataView(DataView data); | ChannelBuf writeDataView(DataView data); | /**
* Sets the specified {@link DataView} at the current writerIndex and
* increases the writerIndex according to the lenght of the data view
* in this buffer.
*
* @param data The boolean data
* @return This stream for chaining
*/ | Sets the specified <code>DataView</code> at the current writerIndex and increases the writerIndex according to the lenght of the data view in this buffer | writeDataView | {
"repo_name": "Kiskae/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/network/ChannelBuf.java",
"license": "mit",
"size": 16582
} | [
"org.spongepowered.api.data.DataView"
] | import org.spongepowered.api.data.DataView; | import org.spongepowered.api.data.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 848,988 |
@Test(expected = IllegalArgumentException.class)
public void testNotSimple() throws IOException, ServletException {
TesterHttpServletRequest request = new TesterHttpServletRequest();
request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN,
TesterFilterConfigs.HTTPS_WWW_APACHE_ORG)... | @Test(expected = IllegalArgumentException.class) void function() throws IOException, ServletException { TesterHttpServletRequest request = new TesterHttpServletRequest(); request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, TesterFilterConfigs.HTTPS_WWW_APACHE_ORG); request.setHeader( CorsFilter.REQUEST_HEADER_ACCESS_CO... | /**
* Tests if a non-simple request is given to simple request handler.
*
* @throws IOException
* @throws ServletException
*/ | Tests if a non-simple request is given to simple request handler | testNotSimple | {
"repo_name": "wenzhucjy/tomcat_source",
"path": "tomcat-8.0.9-sourcecode/test/org/apache/catalina/filters/TestCorsFilter.java",
"license": "apache-2.0",
"size": 60957
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"org.junit.Test"
] | import java.io.IOException; import javax.servlet.ServletException; import org.junit.Test; | import java.io.*; import javax.servlet.*; import org.junit.*; | [
"java.io",
"javax.servlet",
"org.junit"
] | java.io; javax.servlet; org.junit; | 148,907 |
@Pure
public static ImmutableMap<TrackGroup, TrackSelectionOverride>
clearTrackSelectionOverridesForType(
@C.TrackType int trackType,
ImmutableMap<TrackGroup, TrackSelectionOverride> trackSelectionOverrides) {
ImmutableMap.Builder<TrackGroup, TrackSelectionOverride> overridesBuilder =
... | static ImmutableMap<TrackGroup, TrackSelectionOverride> function( @C.TrackType int trackType, ImmutableMap<TrackGroup, TrackSelectionOverride> trackSelectionOverrides) { ImmutableMap.Builder<TrackGroup, TrackSelectionOverride> overridesBuilder = ImmutableMap.builder(); for (Map.Entry<TrackGroup, TrackSelectionOverride>... | /**
* Removes all {@link TrackSelectionOverride overrides} associated with {@link TrackGroup
* TrackGroups} of type {@code trackType}.
*
* @param trackType The {@link C.TrackType} of all overrides to remove.
* @param trackSelectionOverrides The current {@link TrackSelectionOverride overrides}.
* @retu... | Removes all <code>TrackSelectionOverride overrides</code> associated with <code>TrackGroup TrackGroups</code> of type trackType | clearTrackSelectionOverridesForType | {
"repo_name": "ened/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java",
"license": "apache-2.0",
"size": 8885
} | [
"com.google.android.exoplayer2.source.TrackGroup",
"com.google.android.exoplayer2.trackselection.TrackSelectionParameters",
"com.google.android.exoplayer2.util.MimeTypes",
"com.google.common.collect.ImmutableMap",
"java.util.Map"
] | import com.google.android.exoplayer2.source.TrackGroup; import com.google.android.exoplayer2.trackselection.TrackSelectionParameters; import com.google.android.exoplayer2.util.MimeTypes; import com.google.common.collect.ImmutableMap; import java.util.Map; | import com.google.android.exoplayer2.source.*; import com.google.android.exoplayer2.trackselection.*; import com.google.android.exoplayer2.util.*; import com.google.common.collect.*; import java.util.*; | [
"com.google.android",
"com.google.common",
"java.util"
] | com.google.android; com.google.common; java.util; | 2,460,560 |
@VisibleForTesting
public static native void mkfifo(String path, int mode) throws IOException; | static native void function(String path, int mode) throws IOException; | /**
* Native wrapper around POSIX mkfifo(3) C library call.
*
* @param path the name of the pipe to create.
* @param mode the mode with which to create the pipe.
* @throws IOException if the mkfifo failed.
*/ | Native wrapper around POSIX mkfifo(3) C library call | mkfifo | {
"repo_name": "Asana/bazel",
"path": "src/main/java/com/google/devtools/build/lib/unix/NativePosixFiles.java",
"license": "apache-2.0",
"size": 15575
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,145,032 |
public void init() {
super.init();
// Initialise node properties
setDefaultInputNodes(0);
setMinimumInputNodes(0);
setMaximumInputNodes(0);
setDefaultOutputNodes(2);
setMinimumOutputNodes(2);
setMaximumOutputNodes(Integer.MAX_VALUE);
// Init... | void function() { super.init(); setDefaultInputNodes(0); setMinimumInputNodes(0); setMaximumInputNodes(0); setDefaultOutputNodes(2); setMinimumOutputNodes(2); setMaximumOutputNodes(Integer.MAX_VALUE); setParameterUpdatePolicy(Task.PROCESS_UPDATE); setPopUpDescription(STR); setHelpFileLocation(STR); if (!isParameter("h0... | /**
* Called when the unit is created. Initialises the unit's properties and
* parameters.
*/ | Called when the unit is created. Initialises the unit's properties and parameters | init | {
"repo_name": "CSCSI/Triana",
"path": "triana-toolboxes/gftgu/src/main/java/gftgu/EarthOrbit.java",
"license": "apache-2.0",
"size": 12427
} | [
"org.trianacode.taskgraph.Task"
] | import org.trianacode.taskgraph.Task; | import org.trianacode.taskgraph.*; | [
"org.trianacode.taskgraph"
] | org.trianacode.taskgraph; | 1,956,353 |
native Pointer GetCurrentProcess(); | native Pointer GetCurrentProcess(); | /**
* Retrieves a pseudo handle for the current process.
*
* https://msdn.microsoft.com/en-us/library/windows/desktop/ms683179%28v=vs.85%29.aspx
*
* @return a pseudo handle to the current process.
*/ | Retrieves a pseudo handle for the current process. HREF | GetCurrentProcess | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/bootstrap/JNAKernel32Library.java",
"license": "apache-2.0",
"size": 11777
} | [
"com.sun.jna.Pointer"
] | import com.sun.jna.Pointer; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 1,723,797 |
public static List<String> overlayProfiles(Container container) {
Version version = container.getVersion();
Set<String> result = new LinkedHashSet<String>();
List<String> profiles = container.getProfileIds();
recursiveAddProfiles(version, result, profiles);
return Collections... | static List<String> function(Container container) { Version version = container.getVersion(); Set<String> result = new LinkedHashSet<String>(); List<String> profiles = container.getProfileIds(); recursiveAddProfiles(version, result, profiles); return Collections.unmodifiableList(new ArrayList<String>(result)); } | /**
* Returns the effective list of profile ids for the current container;
* that is the list of all profiles and descendant profiles in order in which their values
* are to be applied.
*/ | Returns the effective list of profile ids for the current container; that is the list of all profiles and descendant profiles in order in which their values are to be applied | overlayProfiles | {
"repo_name": "hekonsek/fabric8",
"path": "sandbox/fabric/fabric-api/src/main/java/io/fabric8/api/Containers.java",
"license": "apache-2.0",
"size": 13153
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.LinkedHashSet",
"java.util.List",
"java.util.Set"
] | import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 465,187 |
public Map<String, Object> pushCountWebsites(); | Map<String, Object> function(); | /**
* Get amount of websites
* @return
*/ | Get amount of websites | pushCountWebsites | {
"repo_name": "PavelEvleev/my-spring-books",
"path": "emailsender/src/main/java/com/sendpulse/restapi/SendpulseInterface.java",
"license": "mit",
"size": 9316
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,193,600 |
public int putAndMoveToFirst( final K k, final int v ) {
final K key[] = this.key;
final boolean used[] = this.used;
final int mask = this.mask;
// The starting point.
int pos = ( (k) == null ? 0x87fcd5c : it.unimi.dsi.fastutil.HashCommon.murmurHash3( (k).hashCode() ) ) & mask;
// There's always an unused ... | int function( final K k, final int v ) { final K key[] = this.key; final boolean used[] = this.used; final int mask = this.mask; int pos = ( (k) == null ? 0x87fcd5c : it.unimi.dsi.fastutil.HashCommon.murmurHash3( (k).hashCode() ) ) & mask; while( used[ pos ] ) { if ( ( (k) == null ? (key[ pos ]) == null : (k).equals(ke... | /** Adds a pair to the map; if the key is already present, it is moved to the first position of the iteration order.
*
* @param k the key.
* @param v the value.
* @return the old value, or the {@linkplain #defaultReturnValue() default return value} if no value was present for the given key.
*/ | Adds a pair to the map; if the key is already present, it is moved to the first position of the iteration order | putAndMoveToFirst | {
"repo_name": "karussell/fastutil",
"path": "src/it/unimi/dsi/fastutil/objects/Object2IntLinkedOpenHashMap.java",
"license": "apache-2.0",
"size": 49106
} | [
"it.unimi.dsi.fastutil.HashCommon"
] | import it.unimi.dsi.fastutil.HashCommon; | import it.unimi.dsi.fastutil.*; | [
"it.unimi.dsi"
] | it.unimi.dsi; | 1,351,353 |
public void doHandle(Class<?> clazz)
{
if (Util.isServletType(clazz))
{
handleClass(clazz);
Method[] methods = clazz.getDeclaredMethods();
for (int i=0; i<methods.length; i++)
handleMethod(clazz, methods[i]);
Field[] fi... | void function(Class<?> clazz) { if (Util.isServletType(clazz)) { handleClass(clazz); Method[] methods = clazz.getDeclaredMethods(); for (int i=0; i<methods.length; i++) handleMethod(clazz, methods[i]); Field[] fields = clazz.getDeclaredFields(); for (int i=0; i<fields.length; i++) handleField(clazz, fields[i]); } } | /**
* Class level Resource annotations declare a name in the
* environment that will be looked up at runtime. They do
* not specify an injection.
*/ | Class level Resource annotations declare a name in the environment that will be looked up at runtime. They do not specify an injection | doHandle | {
"repo_name": "whiteley/jetty8",
"path": "jetty-annotations/src/main/java/org/eclipse/jetty/annotations/ResourceAnnotationHandler.java",
"license": "apache-2.0",
"size": 16598
} | [
"java.lang.reflect.Field",
"java.lang.reflect.Method"
] | import java.lang.reflect.Field; import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 417,232 |
protected PropertyValueList getAggregateValues(
EPGMElement element, List<PropertyValueAggregator> valueAggregators) throws IOException {
List<PropertyValue> propertyValues = Lists.newArrayList();
String propertyKey;
for (PropertyValueAggregator valueAggregator : valueAggregators) {
propertyKey... | PropertyValueList function( EPGMElement element, List<PropertyValueAggregator> valueAggregators) throws IOException { List<PropertyValue> propertyValues = Lists.newArrayList(); String propertyKey; for (PropertyValueAggregator valueAggregator : valueAggregators) { propertyKey = valueAggregator.getPropertyKey(); if (valu... | /**
* Returns the property values of the given element which are used for
* aggregation. If the EPGM element does not have a property, it uses
* {@code PropertyValue.NULL_VALUE} instead.
*
* @param element attributed EPGM element
* @param valueAggregators aggregate functions
* @retur... | Returns the property values of the given element which are used for aggregation. If the EPGM element does not have a property, it uses PropertyValue.NULL_VALUE instead | getAggregateValues | {
"repo_name": "p3et/gradoop",
"path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/grouping/functions/BuildBase.java",
"license": "apache-2.0",
"size": 7636
} | [
"com.google.common.collect.Lists",
"java.io.IOException",
"java.util.List",
"org.gradoop.common.model.api.entities.EPGMElement",
"org.gradoop.common.model.impl.properties.PropertyValue",
"org.gradoop.common.model.impl.properties.PropertyValueList",
"org.gradoop.flink.model.impl.operators.grouping.functi... | import com.google.common.collect.Lists; import java.io.IOException; import java.util.List; import org.gradoop.common.model.api.entities.EPGMElement; import org.gradoop.common.model.impl.properties.PropertyValue; import org.gradoop.common.model.impl.properties.PropertyValueList; import org.gradoop.flink.model.impl.opera... | import com.google.common.collect.*; import java.io.*; import java.util.*; import org.gradoop.common.model.api.entities.*; import org.gradoop.common.model.impl.properties.*; import org.gradoop.flink.model.impl.operators.grouping.functions.aggregation.*; | [
"com.google.common",
"java.io",
"java.util",
"org.gradoop.common",
"org.gradoop.flink"
] | com.google.common; java.io; java.util; org.gradoop.common; org.gradoop.flink; | 1,678,645 |
@Type(type = "com.servinglynk.hmis.warehouse.enums.EmploymentEmploymentTypeEnumType")
@Basic( optional = true )
@Column( name = "employment_type" )
public EmploymentEmploymentTypeEnum getEmploymentType() {
return this.employmentType;
} | @Type(type = STR) @Basic( optional = true ) @Column( name = STR ) EmploymentEmploymentTypeEnum function() { return this.employmentType; } | /**
* Return the value associated with the column: employmentType.
* @return A EmploymentEmploymentTypeEnum object (this.employmentType)
*/ | Return the value associated with the column: employmentType | getEmploymentType | {
"repo_name": "servinglynk/servinglynk-hmis",
"path": "hmis-model-v2014/src/main/java/com/servinglynk/hmis/warehouse/model/v2014/Employment.java",
"license": "mpl-2.0",
"size": 11594
} | [
"com.servinglynk.hmis.warehouse.enums.EmploymentEmploymentTypeEnum",
"javax.persistence.Basic",
"javax.persistence.Column",
"org.hibernate.annotations.Type"
] | import com.servinglynk.hmis.warehouse.enums.EmploymentEmploymentTypeEnum; import javax.persistence.Basic; import javax.persistence.Column; import org.hibernate.annotations.Type; | import com.servinglynk.hmis.warehouse.enums.*; import javax.persistence.*; import org.hibernate.annotations.*; | [
"com.servinglynk.hmis",
"javax.persistence",
"org.hibernate.annotations"
] | com.servinglynk.hmis; javax.persistence; org.hibernate.annotations; | 2,635,757 |
public ArrayDeque<E> clone() {
try {
@SuppressWarnings("unchecked")
ArrayDeque<E> result = (ArrayDeque<E>) super.clone();
result.elements = Arrays.copyOf(elements, elements.length);
return result;
} catch (CloneNotSupportedException e) {
t... | ArrayDeque<E> function() { try { @SuppressWarnings(STR) ArrayDeque<E> result = (ArrayDeque<E>) super.clone(); result.elements = Arrays.copyOf(elements, elements.length); return result; } catch (CloneNotSupportedException e) { throw new AssertionError(); } } private static final long serialVersionUID = 23409857980340389... | /**
* Returns a copy of this deque.
*
* @return a copy of this deque
*/ | Returns a copy of this deque | clone | {
"repo_name": "viavansi/mupdf-android",
"path": "src/main/java/com/artifex/mupdfdemo/ArrayDeque.java",
"license": "agpl-3.0",
"size": 29348
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 580,720 |
void moveNodes(MindMapNode selected, List selecteds, int direction); | void moveNodes(MindMapNode selected, List selecteds, int direction); | /**
* moves selected and selecteds (if they are child of the same parent and
* adjacent) in the direction specified (up = -1, down = 1).
* */ | moves selected and selecteds (if they are child of the same parent and adjacent) in the direction specified (up = -1, down = 1) | moveNodes | {
"repo_name": "zeroghj/FreeMind",
"path": "freemind/modes/mindmapmode/actions/MindMapActions.java",
"license": "gpl-2.0",
"size": 11116
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,450,618 |
public void setValueFont(Font f) {
if (this.plot != null) {
this.plot.setValueFont(f);
}
}
| void function(Font f) { if (this.plot != null) { this.plot.setValueFont(f); } } | /**
* Sets the value font.
*
* @param f the font.
*/ | Sets the value font | setValueFont | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/plot/JThermometer.java",
"license": "lgpl-3.0",
"size": 10437
} | [
"java.awt.Font"
] | import java.awt.Font; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,712,782 |
int getTableBlockSizeInMB() {
String tableBlockSize = null;
// In case of old store there will not be any map for table properties so table properties
// will be null
Map<String, String> tableProperties = getFactTable().getTableProperties();
if (null != tableProperties) {
tableBlockSize = ta... | int getTableBlockSizeInMB() { String tableBlockSize = null; Map<String, String> tableProperties = getFactTable().getTableProperties(); if (null != tableProperties) { tableBlockSize = tableProperties.get(CarbonCommonConstants.TABLE_BLOCKSIZE); } if (null == tableBlockSize) { tableBlockSize = CarbonCommonConstants.TABLE_... | /**
* This method will return the table size. Default table block size will be considered
* in case not specified by the user
*/ | This method will return the table size. Default table block size will be considered in case not specified by the user | getTableBlockSizeInMB | {
"repo_name": "manishgupta88/carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/metadata/schema/table/TableInfo.java",
"license": "apache-2.0",
"size": 12313
} | [
"java.util.Map",
"org.apache.carbondata.core.constants.CarbonCommonConstants"
] | import java.util.Map; import org.apache.carbondata.core.constants.CarbonCommonConstants; | import java.util.*; import org.apache.carbondata.core.constants.*; | [
"java.util",
"org.apache.carbondata"
] | java.util; org.apache.carbondata; | 1,378,153 |
public ServiceFuture<CustomImageInner> getAsync(String resourceGroupName, String labName, String name, final ServiceCallback<CustomImageInner> serviceCallback) {
return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback);
} | ServiceFuture<CustomImageInner> function(String resourceGroupName, String labName, String name, final ServiceCallback<CustomImageInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, labName, name), serviceCallback); } | /**
* Get custom image.
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the custom image.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumen... | Get custom image | getAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/devtestlabs/mgmt-v2018_09_15/src/main/java/com/microsoft/azure/management/devtestlabs/v2018_09_15/implementation/CustomImagesInner.java",
"license": "mit",
"size": 63566
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,189,745 |
public Stroke getSeriesOutlineStroke(int series) {
// return the override, if there is one...
if (this.outlineStroke != null) {
return this.outlineStroke;
}
// otherwise look up the stroke table
Stroke result = this.outlineStrokeList.getStroke(series);
i... | Stroke function(int series) { if (this.outlineStroke != null) { return this.outlineStroke; } Stroke result = this.outlineStrokeList.getStroke(series); if (result == null) { DrawingSupplier supplier = getDrawingSupplier(); if (supplier != null) { result = supplier.getNextOutlineStroke(); this.outlineStrokeList.setStroke... | /**
* Returns the stroke used to outline the items in a series.
*
* @param series the series (zero-based index).
*
* @return The stroke (never <code>null</code>).
*/ | Returns the stroke used to outline the items in a series | getSeriesOutlineStroke | {
"repo_name": "opensim-org/opensim-gui",
"path": "Gui/opensim/jfreechart/src/org/jfree/chart/renderer/AbstractRenderer.java",
"license": "apache-2.0",
"size": 98153
} | [
"java.awt.Stroke",
"org.jfree.chart.plot.DrawingSupplier"
] | import java.awt.Stroke; import org.jfree.chart.plot.DrawingSupplier; | import java.awt.*; import org.jfree.chart.plot.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 1,950,218 |
public Builder setIntervalDescription(EmptyParam intervalDescription) {
this.intervalDescription = intervalDescription;
return this;
} | Builder function(EmptyParam intervalDescription) { this.intervalDescription = intervalDescription; return this; } | /**
* Description of the mandate interval. Only required if 'payment_schedule' parameter is
* 'interval' or 'combined'.
*/ | Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined' | setIntervalDescription | {
"repo_name": "stripe/stripe-java",
"path": "src/main/java/com/stripe/param/PaymentIntentUpdateParams.java",
"license": "mit",
"size": 323121
} | [
"com.stripe.param.common.EmptyParam"
] | import com.stripe.param.common.EmptyParam; | import com.stripe.param.common.*; | [
"com.stripe.param"
] | com.stripe.param; | 495,766 |
private void recycleHeaderIfExists(WrapperView wv) {
View header = wv.mHeader;
if (header != null) {
mHeaderCache.add(header);
}
} | void function(WrapperView wv) { View header = wv.mHeader; if (header != null) { mHeaderCache.add(header); } } | /**
* Will recycle header_list_section from {@link WrapperView} if it exists
*/ | Will recycle header_list_section from <code>WrapperView</code> if it exists | recycleHeaderIfExists | {
"repo_name": "Kingjimny/gdmc-mm",
"path": "extra_libs/Android-PullToRefreshLibrary/src/com/handmark/pulltorefresh/library/stickylistheaders/AdapterWrapper.java",
"license": "apache-2.0",
"size": 6067
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 166,635 |
public void testGetInstance03() throws NoSuchAlgorithmException,
IllegalArgumentException, KeyStoreException,
UnrecoverableKeyException {
try {
KeyManagerFactory.getInstance(null, mProv);
fail("NoSuchAlgorithmException or NullPointerException should be thrown ... | void function() throws NoSuchAlgorithmException, IllegalArgumentException, KeyStoreException, UnrecoverableKeyException { try { KeyManagerFactory.getInstance(null, mProv); fail(STR); } catch (NoSuchAlgorithmException e) { } catch (NullPointerException e) { } for (int i = 0; i < invalidValues.length; i++) { try { KeyMan... | /**
* Test for <code>getInstance(String algorithm, Provider provider)</code>
* method
* Assertions:
* throws NullPointerException when algorithm is null;
* throws NoSuchAlgorithmException when algorithm is not correct;
* throws IllegalArgumentException when provider is null;
* retur... | Test for <code>getInstance(String algorithm, Provider provider)</code> method Assertions: throws NullPointerException when algorithm is null; throws NoSuchAlgorithmException when algorithm is not correct; throws IllegalArgumentException when provider is null; returns KeyManagerFactory object | testGetInstance03 | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/x-net/src/test/api/java/org/apache/harmony/xnet/tests/javax/net/ssl/KeyManagerFactory2Test.java",
"license": "apache-2.0",
"size": 11534
} | [
"java.security.KeyStoreException",
"java.security.NoSuchAlgorithmException",
"java.security.Provider",
"java.security.UnrecoverableKeyException",
"javax.net.ssl.KeyManagerFactory"
] | import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.Provider; import java.security.UnrecoverableKeyException; import javax.net.ssl.KeyManagerFactory; | import java.security.*; import javax.net.ssl.*; | [
"java.security",
"javax.net"
] | java.security; javax.net; | 736,666 |
public static MonetaryAmount calculate(MonetaryAmount amount, RateAndPeriods rateAndPeriods) {
Objects.requireNonNull(amount, "Amount required");
Objects.requireNonNull(rateAndPeriods, "Rate required");
MonetaryAmount sum = null;
Rate rate = rateAndPeriods.getRate();
int peri... | static MonetaryAmount function(MonetaryAmount amount, RateAndPeriods rateAndPeriods) { Objects.requireNonNull(amount, STR); Objects.requireNonNull(rateAndPeriods, STR); MonetaryAmount sum = null; Rate rate = rateAndPeriods.getRate(); int periods = rateAndPeriods.getPeriods(); for(int i=1;i<=periods;i++){ MonetaryAmount... | /**
* Performs the calculation.
*
* @param amount the first payment
* @param rateAndPeriods The rate and periods, not null.
* @return the resulting amount, never null.
*/ | Performs the calculation | calculate | {
"repo_name": "JavaMoney/javamoney-lib",
"path": "calc/src/main/java/org/javamoney/calc/common/PresentValueOfAnnuity.java",
"license": "apache-2.0",
"size": 3473
} | [
"java.util.Objects",
"javax.money.MonetaryAmount"
] | import java.util.Objects; import javax.money.MonetaryAmount; | import java.util.*; import javax.money.*; | [
"java.util",
"javax.money"
] | java.util; javax.money; | 1,368,320 |
public void print() {
BigDecimal bruttoGesamt = new BigDecimal(0.0);
BigDecimal nettoGesamt = new BigDecimal(0.0);
BigDecimal katasterNetto = new BigDecimal(0.0);
BigDecimal katasterBrutto = new BigDecimal(0.0);
BigDecimal baulastenNetto = new BigDecimal(0.0);
BigDeci... | void function() { BigDecimal bruttoGesamt = new BigDecimal(0.0); BigDecimal nettoGesamt = new BigDecimal(0.0); BigDecimal katasterNetto = new BigDecimal(0.0); BigDecimal katasterBrutto = new BigDecimal(0.0); BigDecimal baulastenNetto = new BigDecimal(0.0); BigDecimal baulastenBrutto = new BigDecimal(0.0); BigDecimal ne... | /**
* DOCUMENT ME!
*/ | DOCUMENT ME | print | {
"repo_name": "cismet/cids-custom-wuppertal",
"path": "src/main/java/de/cismet/cids/custom/reports/wunda_blau/PrintBillingReportForCustomer.java",
"license": "lgpl-3.0",
"size": 17514
} | [
"de.cismet.cids.dynamics.CidsBean",
"java.math.BigDecimal",
"java.util.ArrayList",
"java.util.Collection",
"javax.swing.JOptionPane",
"org.openide.util.NbBundle"
] | import de.cismet.cids.dynamics.CidsBean; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collection; import javax.swing.JOptionPane; import org.openide.util.NbBundle; | import de.cismet.cids.dynamics.*; import java.math.*; import java.util.*; import javax.swing.*; import org.openide.util.*; | [
"de.cismet.cids",
"java.math",
"java.util",
"javax.swing",
"org.openide.util"
] | de.cismet.cids; java.math; java.util; javax.swing; org.openide.util; | 2,278,174 |
@GET
@Produces({ MediaType.TEXT_XML + ";charset=UTF-8", MCRJerseyUtil.APPLICATION_JSON_UTF8 })
@Path("/{" + PARAM_MCRID + "}/derivates/{" + PARAM_DERID + "}/contents{path:(/.*)*}")
public Response listContents(@Context UriInfo info,
@Context Request request, @PathParam(PARAM_MCRID) String mcrid,... | @Produces({ MediaType.TEXT_XML + STR, MCRJerseyUtil.APPLICATION_JSON_UTF8 }) @Path("/{" + PARAM_MCRID + STR + PARAM_DERID + STR) Response function(@Context UriInfo info, @Context Request request, @PathParam(PARAM_MCRID) String mcrid, @PathParam(PARAM_DERID) String derid, @PathParam("path") @DefaultValue("/") String pat... | /** returns a list of derivates for a given MyCoRe Object
*
* @param info - the injected Jersey URIInfo object
* @param request - the injected JAX-WS request object
*
* @param mcrid - a object identifier of syntax [id] or [prefix]:[id]
* @param derid - a derivate identifier of syntax [id]... | returns a list of derivates for a given MyCoRe Object | listContents | {
"repo_name": "MyCoRe-Org/mycore",
"path": "mycore-restapi/src/main/java/org/mycore/restapi/v1/MCRRestAPIObjects.java",
"license": "gpl-3.0",
"size": 16102
} | [
"javax.ws.rs.DefaultValue",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Request",
"javax.ws.rs.core.Response",
"javax.ws.rs.core.UriInfo",
"org.mycore.frontend.jersey.MC... | import javax.ws.rs.DefaultValue; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Request; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; impo... | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.mycore.frontend.jersey.*; import org.mycore.restapi.v1.errors.*; import org.mycore.restapi.v1.utils.*; | [
"javax.ws",
"org.mycore.frontend",
"org.mycore.restapi"
] | javax.ws; org.mycore.frontend; org.mycore.restapi; | 2,722,223 |
public static TaskList createTaskList(Vector<TaskList> subtasksIn, boolean orderedIn)
{
//-- If the size of the task list is zero, just return the empty task list
//-- to save memory since we need only one object to represent all the
//-- functionally-equivalent empty task lists.
if (subtasksIn.size... | static TaskList function(Vector<TaskList> subtasksIn, boolean orderedIn) { if (subtasksIn.size() == 0) return empty; TaskList retVal = new TaskList(subtasksIn.size(), orderedIn); for (int i = 0; i < subtasksIn.size(); i++) retVal.subtasks[i] = subtasksIn.get(i); return retVal; } | /** To create a non-atomic task list. This is defined as a static function
* rather than a constructor because it returns <code>TaskList.empty</code>
* if the required task list is of length 0 rather than creating a new empty
* task list. Other than that, this function acts like a constructor.
*
* @p... | To create a non-atomic task list. This is defined as a static function rather than a constructor because it returns <code>TaskList.empty</code> if the required task list is of length 0 rather than creating a new empty task list. Other than that, this function acts like a constructor | createTaskList | {
"repo_name": "dandrocec/PaaSInterop",
"path": "SemanticServiceDescription/src/java/JSHOP2/TaskList.java",
"license": "gpl-3.0",
"size": 13049
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,583,702 |
public static Timestamp changeTimezone(MySQLConnection conn,
Calendar sessionCalendar,
Calendar targetCalendar,
Timestamp tstamp,
TimeZone fromTz,
TimeZone toTz,
boolean rollForward) {
if ((conn != null)) {
if (conn.getUseTimezone()) {
// Convert the timestamp from GMT to the server's ... | static Timestamp function(MySQLConnection conn, Calendar sessionCalendar, Calendar targetCalendar, Timestamp tstamp, TimeZone fromTz, TimeZone toTz, boolean rollForward) { if ((conn != null)) { if (conn.getUseTimezone()) { Calendar fromCal = Calendar.getInstance(fromTz); fromCal.setTime(tstamp); int fromOffset = fromCa... | /**
* Change the given timestamp from one timezone to another
*
* @param conn
* the current connection to the MySQL server
* @param tstamp
* the timestamp to change
* @param fromTz
* the timezone to change from
* @param toTz
* the timezone to change to
... | Change the given timestamp from one timezone to another | changeTimezone | {
"repo_name": "vaisaghvt/gameAnalyzer",
"path": "mysql-connector-java-5.1.22/src/com/mysql/jdbc/TimeUtil.java",
"license": "mit",
"size": 58799
} | [
"java.sql.Timestamp",
"java.util.Calendar",
"java.util.TimeZone"
] | import java.sql.Timestamp; import java.util.Calendar; import java.util.TimeZone; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 869,825 |
private int parseNewarray(int offset, Visitor visitor) {
int value = bytes.getUnsignedByte(offset + 1);
CstType type;
switch (value) {
case ByteOps.NEWARRAY_BOOLEAN: {
type = CstType.BOOLEAN_ARRAY;
break;
}
case ByteOps.NEWA... | int function(int offset, Visitor visitor) { int value = bytes.getUnsignedByte(offset + 1); CstType type; switch (value) { case ByteOps.NEWARRAY_BOOLEAN: { type = CstType.BOOLEAN_ARRAY; break; } case ByteOps.NEWARRAY_CHAR: { type = CstType.CHAR_ARRAY; break; } case ByteOps.NEWARRAY_DOUBLE: { type = CstType.DOUBLE_ARRAY;... | /**
* Helper to deal with {@code newarray}.
*
* @param offset the offset to the {@code newarray} opcode itself
* @param visitor {@code non-null;} visitor to use
* @return instruction length, in bytes
*/ | Helper to deal with newarray | parseNewarray | {
"repo_name": "alibaba/atlas",
"path": "atlas-gradle-plugin/dexpatch/src/main/java/com/taobao/android/dx/cf/code/BytecodeArray.java",
"license": "apache-2.0",
"size": 53655
} | [
"com.taobao.android.dx.rop.cst.Constant",
"com.taobao.android.dx.rop.cst.CstInteger",
"com.taobao.android.dx.rop.cst.CstLiteralBits",
"com.taobao.android.dx.rop.cst.CstType",
"com.taobao.android.dx.util.Hex",
"java.util.ArrayList"
] | import com.taobao.android.dx.rop.cst.Constant; import com.taobao.android.dx.rop.cst.CstInteger; import com.taobao.android.dx.rop.cst.CstLiteralBits; import com.taobao.android.dx.rop.cst.CstType; import com.taobao.android.dx.util.Hex; import java.util.ArrayList; | import com.taobao.android.dx.rop.cst.*; import com.taobao.android.dx.util.*; import java.util.*; | [
"com.taobao.android",
"java.util"
] | com.taobao.android; java.util; | 818,012 |
private void saveDataToModel() {
// Gets the model
final ChartWizard wizard = (ChartWizard) this.getWizard();
final ChartModel chartModel = wizard.getModel();
// Set chart columns
int[] indexes = this.getSelectedIndexes();
int rowTitleIndex = this.rowTitle.getSelectionIndex();
if (indexes.length > 0) ... | void function() { final ChartWizard wizard = (ChartWizard) this.getWizard(); final ChartModel chartModel = wizard.getModel(); int[] indexes = this.getSelectedIndexes(); int rowTitleIndex = this.rowTitle.getSelectionIndex(); if (indexes.length > 0) { chartModel.setLineChart(this.chartType.getSelectionIndex() == BarChart... | /**
* Saves the gathered data to the model.
*/ | Saves the gathered data to the model | saveDataToModel | {
"repo_name": "DavidGutknecht/elexis-3-base",
"path": "bundles/ch.unibe.iam.scg.archie/src/ch/unibe/iam/scg/archie/ui/wizards/BarChartPage.java",
"license": "epl-1.0",
"size": 10668
} | [
"ch.unibe.iam.scg.archie.model.ChartModel"
] | import ch.unibe.iam.scg.archie.model.ChartModel; | import ch.unibe.iam.scg.archie.model.*; | [
"ch.unibe.iam"
] | ch.unibe.iam; | 1,438,203 |
private void checkProgramError(IntBuffer compiled, int id) {
final GL gl = GLU.getCurrentGL();
if (compiled.get(0) == 0) {
IntBuffer iVal = BufferUtils.createIntBuffer(1);
gl.glGetObjectParameterivARB(id,
GL.GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal); // TODO C... | void function(IntBuffer compiled, int id) { final GL gl = GLU.getCurrentGL(); if (compiled.get(0) == 0) { IntBuffer iVal = BufferUtils.createIntBuffer(1); gl.glGetObjectParameterivARB(id, GL.GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal); int length = iVal.get(); String out = null; if (length > 0) { ByteBuffer infoLog = BufferUt... | /**
* Check for program errors. If an error is detected, program exits.
*
* @param compiled the compiler state for a given shader
* @param id shader's id
*/ | Check for program errors. If an error is detected, program exits | checkProgramError | {
"repo_name": "tectronics/xenogeddon",
"path": "src/com/jme/scene/state/jogl/JOGLShaderObjectsState.java",
"license": "gpl-2.0",
"size": 14614
} | [
"com.jme.system.JmeException",
"com.jme.util.geom.BufferUtils",
"java.nio.ByteBuffer",
"java.nio.IntBuffer",
"javax.media.opengl.glu.GLU"
] | import com.jme.system.JmeException; import com.jme.util.geom.BufferUtils; import java.nio.ByteBuffer; import java.nio.IntBuffer; import javax.media.opengl.glu.GLU; | import com.jme.system.*; import com.jme.util.geom.*; import java.nio.*; import javax.media.opengl.glu.*; | [
"com.jme.system",
"com.jme.util",
"java.nio",
"javax.media"
] | com.jme.system; com.jme.util; java.nio; javax.media; | 957,934 |
public Collection<? extends IZipNode> getChildren() {
init();
return (children != null)? Arrays.asList(children) : null;
}
| Collection<? extends IZipNode> function() { init(); return (children != null)? Arrays.asList(children) : null; } | /**
* Implements <tt>IZipNode#getChildren()</tt> method.
*/ | Implements IZipNode#getChildren() method | getChildren | {
"repo_name": "asmyczek/java-zipper",
"path": "src/com/mu/zipper/ZipNode.java",
"license": "bsd-3-clause",
"size": 2832
} | [
"java.util.Arrays",
"java.util.Collection"
] | import java.util.Arrays; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 928,863 |
protected String getNameServiceId(Configuration conf) {
return DFSUtil.getNamenodeNameServiceId(conf);
} | String function(Configuration conf) { return DFSUtil.getNamenodeNameServiceId(conf); } | /**
* Get the name service Id for the node
* @return name service Id or null if federation is not configured
*/ | Get the name service Id for the node | getNameServiceId | {
"repo_name": "ouyangjie/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java",
"license": "apache-2.0",
"size": 68088
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.DFSUtil"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.DFSUtil; | import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 272,004 |
public static PlaceholderFragment newInstance(int sectionNumber) {
PlaceholderFragment fragment = new PlaceholderFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
... | static PlaceholderFragment function(int sectionNumber) { PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } public PlaceholderFragment() { } | /**
* Returns a new instance of this fragment for the given section
* number.
*/ | Returns a new instance of this fragment for the given section number | newInstance | {
"repo_name": "petermuller/android-gpio-controller",
"path": "RaspberryPiGPIOController/app/src/main/java/io/github/petermuller/raspberrypigpiocontroller/MainActivity.java",
"license": "gpl-2.0",
"size": 12054
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,458,120 |
public final int skipBytes(int n) throws IOException {
return (int) skip(n);
} | final int function(int n) throws IOException { return (int) skip(n); } | /**
* Skip as many bytes as possible, but no more than {@code n}.
*
* @param n the number of bytes to skip
* @return the number of bytes that were skipped
*/ | Skip as many bytes as possible, but no more than n | skipBytes | {
"repo_name": "splicemachine/spliceengine",
"path": "db-engine/src/main/java/com/splicemachine/db/iapi/services/io/ArrayInputStream.java",
"license": "agpl-3.0",
"size": 22588
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,564,046 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
referenceList = new javax.swing.JList<>(references);
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.sw... | void function() { jScrollPane1 = new javax.swing.JScrollPane(); referenceList = new javax.swing.JList<>(references); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); trackList = new javax.swing.JList<>(trackListModel); referenceList.setSelectionMode(j... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "rhilker/ReadXplorer",
"path": "readxplorer-tools-transcriptionanalyses/src/main/java/de/cebitec/readxplorer/transcriptionanalyses/differentialexpression/wizard/SelectTrackVisualPanel.java",
"license": "gpl-3.0",
"size": 7604
} | [
"de.cebitec.readxplorer.databackend.dataobjects.PersistentReference",
"de.cebitec.readxplorer.databackend.dataobjects.PersistentTrack",
"javax.swing.ListSelectionModel"
] | import de.cebitec.readxplorer.databackend.dataobjects.PersistentReference; import de.cebitec.readxplorer.databackend.dataobjects.PersistentTrack; import javax.swing.ListSelectionModel; | import de.cebitec.readxplorer.databackend.dataobjects.*; import javax.swing.*; | [
"de.cebitec.readxplorer",
"javax.swing"
] | de.cebitec.readxplorer; javax.swing; | 541,803 |
@ConfigAttributeSetter(name = SECURITY_PEER_VERIFY_MEMBER_TIMEOUT)
void setSecurityPeerMembershipTimeout(int attValue);
int DEFAULT_SECURITY_PEER_VERIFYMEMBER_TIMEOUT = 1000;
int MAX_SECURITY_PEER_VERIFYMEMBER_TIMEOUT = 60000;
@ConfigAttribute(type = Integer.class, min = 0, max = MAX_SECURITY_PEER... | @ConfigAttributeSetter(name = SECURITY_PEER_VERIFY_MEMBER_TIMEOUT) void setSecurityPeerMembershipTimeout(int attValue); int DEFAULT_SECURITY_PEER_VERIFYMEMBER_TIMEOUT = 1000; int MAX_SECURITY_PEER_VERIFYMEMBER_TIMEOUT = 60000; @ConfigAttribute(type = Integer.class, min = 0, max = MAX_SECURITY_PEER_VERIFYMEMBER_TIMEOUT)... | /**
* Set timeout for peer membership check when security is enabled. The timeout must be less than
* peer handshake timeout.
*
*/ | Set timeout for peer membership check when security is enabled. The timeout must be less than peer handshake timeout | setSecurityPeerMembershipTimeout | {
"repo_name": "pdxrunner/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionConfig.java",
"license": "apache-2.0",
"size": 179138
} | [
"org.apache.geode.distributed.ConfigurationProperties"
] | import org.apache.geode.distributed.ConfigurationProperties; | import org.apache.geode.distributed.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,382,259 |
private JCheckBox getChkProcessForm() {
if (chkProcessForm == null) {
chkProcessForm = new JCheckBox();
chkProcessForm.setText(Constant.messages.getString("spider.options.label.processform"));
| JCheckBox function() { if (chkProcessForm == null) { chkProcessForm = new JCheckBox(); chkProcessForm.setText(Constant.messages.getString(STR)); | /**
* This method initializes the checkbox for process form option.
*
* @return javax.swing.JCheckBox
*/ | This method initializes the checkbox for process form option | getChkProcessForm | {
"repo_name": "0xkasun/zaproxy",
"path": "src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java",
"license": "apache-2.0",
"size": 18538
} | [
"javax.swing.JCheckBox",
"org.parosproxy.paros.Constant"
] | import javax.swing.JCheckBox; import org.parosproxy.paros.Constant; | import javax.swing.*; import org.parosproxy.paros.*; | [
"javax.swing",
"org.parosproxy.paros"
] | javax.swing; org.parosproxy.paros; | 283,469 |
private String formatExceptionMessage(String exceptionMessage, String sql,
Object[] args) {
String template = "{0} URI => {1} SQL => {2} PARAMS => {3}";
String paramsString = (ArrayUtils.isEmpty(args)) ? "NONE" : Arrays
.toString(args);
Object[] templateArgs = new Object[] { exceptionMessage, getUri(), ... | String function(String exceptionMessage, String sql, Object[] args) { String template = STR; String paramsString = (ArrayUtils.isEmpty(args)) ? "NONE" : Arrays .toString(args); Object[] templateArgs = new Object[] { exceptionMessage, getUri(), sql, paramsString }; String message = MessageFormat.format(template, templat... | /**
* Used to generate the exception messages used through this class
*/ | Used to generate the exception messages used through this class | formatExceptionMessage | {
"repo_name": "thomasmaurel/ensj-healthcheck",
"path": "src/org/ensembl/healthcheck/util/ConnectionBasedSqlTemplateImpl.java",
"license": "apache-2.0",
"size": 12626
} | [
"java.text.MessageFormat",
"java.util.Arrays",
"org.apache.commons.lang.ArrayUtils"
] | import java.text.MessageFormat; import java.util.Arrays; import org.apache.commons.lang.ArrayUtils; | import java.text.*; import java.util.*; import org.apache.commons.lang.*; | [
"java.text",
"java.util",
"org.apache.commons"
] | java.text; java.util; org.apache.commons; | 2,898,318 |
public Object openFile(FileInputStream fis){
Object fileData;
try{
ObjectInputStream ois = new ObjectInputStream(fis);
fileData = ois.readObject();
ois.close();
}catch(IOException e){
this.errStatus = "";
return null;
} catch (ClassNotFoundException e) {
return null;
}
retur... | Object function(FileInputStream fis){ Object fileData; try{ ObjectInputStream ois = new ObjectInputStream(fis); fileData = ois.readObject(); ois.close(); }catch(IOException e){ this.errStatus = ""; return null; } catch (ClassNotFoundException e) { return null; } return fileData; } | /**
* FileInputStream fis = activity.openFileInput(filename);
* @return NicoInfoData
*/ | FileInputStream fis = activity.openFileInput(filename) | openFile | {
"repo_name": "sahyanorn/a",
"path": "NicoLiveViewer/src/jp/android/sahya/NicoLiveViewer/NicoFile.java",
"license": "gpl-2.0",
"size": 2665
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.io.ObjectInputStream"
] | import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,281,188 |
private static List<AbstractFile> getTopLevelFiles(Content dataSource) {
List<AbstractFile> topLevelFiles = new ArrayList<>();
Collection<AbstractFile> rootObjects = dataSource.accept(new GetRootDirectoryVisitor());
if (rootObjects.isEmpty() && dataSource instanceof AbstractFile) {
... | static List<AbstractFile> function(Content dataSource) { List<AbstractFile> topLevelFiles = new ArrayList<>(); Collection<AbstractFile> rootObjects = dataSource.accept(new GetRootDirectoryVisitor()); if (rootObjects.isEmpty() && dataSource instanceof AbstractFile) { topLevelFiles.add((AbstractFile) dataSource); } else ... | /**
* Gets the top level files such as file system root directories, layout
* files and virtual directories for a data source. Used to create file
* tasks to put into the root directories queue.
*
* @param dataSource The data source.
* @return A list of top level files.
*/ | Gets the top level files such as file system root directories, layout files and virtual directories for a data source. Used to create file tasks to put into the root directories queue | getTopLevelFiles | {
"repo_name": "sidheshenator/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/ingest/IngestTasksScheduler.java",
"license": "apache-2.0",
"size": 29429
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"java.util.logging.Level",
"org.sleuthkit.datamodel.AbstractFile",
"org.sleuthkit.datamodel.Content",
"org.sleuthkit.datamodel.TskCoreException"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.logging.Level; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.TskCoreException; | import java.util.*; import java.util.logging.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.sleuthkit.datamodel"
] | java.util; org.sleuthkit.datamodel; | 1,121,821 |
protected void moveCurrent(StorageDirectory sd)
throws IOException {
File curDir = sd.getCurrentDir();
File tmpCkptDir = sd.getLastCheckpointTmp();
// mv current -> lastcheckpoint.tmp
// only if current is formatted - has VERSION file
if(sd.getVersionFile().exists()) {
assert curDir.exists... | void function(StorageDirectory sd) throws IOException { File curDir = sd.getCurrentDir(); File tmpCkptDir = sd.getLastCheckpointTmp(); if(sd.getVersionFile().exists()) { assert curDir.exists() : curDir + STR; assert !tmpCkptDir.exists() : tmpCkptDir + STR; rename(curDir, tmpCkptDir); } if(!curDir.exists() && !curDir.mk... | /**
* Move {@code current} to {@code lastcheckpoint.tmp} and
* recreate empty {@code current}.
* {@code current} is moved only if it is well formatted,
* that is contains VERSION file.
*
* @see org.apache.hadoop.hdfs.server.common.Storage.StorageDirectory#getLastCheckpointTmp()
* @see org.apache.h... | Move current to lastcheckpoint.tmp and recreate empty current. current is moved only if it is well formatted, that is contains VERSION file | moveCurrent | {
"repo_name": "thisisvoa/hadoop-0.20",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java",
"license": "apache-2.0",
"size": 62398
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 346,615 |
void checkFrameValue(final Object value) {
if (value == Opcodes.TOP || value == Opcodes.INTEGER
|| value == Opcodes.FLOAT || value == Opcodes.LONG
|| value == Opcodes.DOUBLE || value == Opcodes.NULL
|| value == Opcodes.UNINITIALIZED_THIS) {
return;... | void checkFrameValue(final Object value) { if (value == Opcodes.TOP value == Opcodes.INTEGER value == Opcodes.FLOAT value == Opcodes.LONG value == Opcodes.DOUBLE value == Opcodes.NULL value == Opcodes.UNINITIALIZED_THIS) { return; } if (value instanceof String) { checkInternalName((String) value, STR); return; } if (!(... | /**
* Checks a stack frame value.
*
* @param value
* the value to be checked.
*/ | Checks a stack frame value | checkFrameValue | {
"repo_name": "Fantast/mvel",
"path": "src/main/java/org/mvel2/asm/util/CheckMethodAdapter.java",
"license": "apache-2.0",
"size": 52174
} | [
"org.mvel2.asm.Label",
"org.mvel2.asm.Opcodes"
] | import org.mvel2.asm.Label; import org.mvel2.asm.Opcodes; | import org.mvel2.asm.*; | [
"org.mvel2.asm"
] | org.mvel2.asm; | 103,777 |
@Override
public String getAddColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean useAutoinc,
String pk, boolean semicolon ) {
return "ALTER TABLE " + tablename + " ADD " + getFieldDefinition( v, tk, pk, useAutoinc, true, false );
} | String function( String tablename, ValueMetaInterface v, String tk, boolean useAutoinc, String pk, boolean semicolon ) { return STR + tablename + STR + getFieldDefinition( v, tk, pk, useAutoinc, true, false ); } | /**
* Generates the SQL statement to add a column to the specified table For this generic type, i set it to the most
* common possibility.
*
* @param tablename
* The table to add
* @param v
* The column defined as a value
* @param tk
* the name of the technical key ... | Generates the SQL statement to add a column to the specified table For this generic type, i set it to the most common possibility | getAddColumnStatement | {
"repo_name": "tkafalas/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/database/TeradataDatabaseMeta.java",
"license": "apache-2.0",
"size": 13892
} | [
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 178,497 |
protected void addSoftwareElementNamesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Mapping... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ModelPackage.Literals.MAPPING_RELATION__SOFTWARE_ELEMENT_NAMES, false, false, false, ItemProperty... | /**
* This adds a property descriptor for the Software Element Names feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Software Element Names feature. | addSoftwareElementNamesPropertyDescriptor | {
"repo_name": "RobertHilbrich/assist",
"path": "ch.hilbri.assist.model.edit/src/ch/hilbri/assist/model/provider/MappingRelationItemProvider.java",
"license": "gpl-2.0",
"size": 8164
} | [
"ch.hilbri.assist.model.ModelPackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import ch.hilbri.assist.model.ModelPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import ch.hilbri.assist.model.*; import org.eclipse.emf.edit.provider.*; | [
"ch.hilbri.assist",
"org.eclipse.emf"
] | ch.hilbri.assist; org.eclipse.emf; | 2,307,327 |
public static HaskellLinkRule createLinkRule(
BuildTarget target,
ProjectFilesystem projectFilesystem,
BuildRuleParams baseParams,
ActionGraphBuilder graphBuilder,
HaskellPlatform platform,
Linker.LinkType linkType,
ImmutableList<Arg> linkerFlags,
Iterable<Arg> linkerIn... | static HaskellLinkRule function( BuildTarget target, ProjectFilesystem projectFilesystem, BuildRuleParams baseParams, ActionGraphBuilder graphBuilder, HaskellPlatform platform, Linker.LinkType linkType, ImmutableList<Arg> linkerFlags, Iterable<Arg> linkerInputs, Iterable<? extends NativeLinkableGroup> deps, ImmutableSe... | /**
* Create a Haskell link rule that links the given inputs to a executable or shared library and
* pulls in transitive native linkable deps from the given dep roots.
*/ | Create a Haskell link rule that links the given inputs to a executable or shared library and pulls in transitive native linkable deps from the given dep roots | createLinkRule | {
"repo_name": "facebook/buck",
"path": "src/com/facebook/buck/features/haskell/HaskellDescriptionUtils.java",
"license": "apache-2.0",
"size": 25019
} | [
"com.facebook.buck.core.model.BuildTarget",
"com.facebook.buck.core.model.InternalFlavor",
"com.facebook.buck.core.model.impl.BuildTargetPaths",
"com.facebook.buck.core.rules.ActionGraphBuilder",
"com.facebook.buck.core.rules.BuildRule",
"com.facebook.buck.core.rules.BuildRuleParams",
"com.facebook.buck... | import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.model.InternalFlavor; import com.facebook.buck.core.model.impl.BuildTargetPaths; import com.facebook.buck.core.rules.ActionGraphBuilder; import com.facebook.buck.core.rules.BuildRule; import com.facebook.buck.core.rules.BuildRuleParams; impo... | import com.facebook.buck.core.model.*; import com.facebook.buck.core.model.impl.*; import com.facebook.buck.core.rules.*; import com.facebook.buck.core.rules.common.*; import com.facebook.buck.core.toolchain.tool.*; import com.facebook.buck.cxx.*; import com.facebook.buck.cxx.toolchain.linker.*; import com.facebook.buc... | [
"com.facebook.buck",
"com.google.common",
"java.nio",
"java.util"
] | com.facebook.buck; com.google.common; java.nio; java.util; | 2,197,584 |
public static MfpDiagnostics initialize() {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "initialize");
// We should only do this once
if (singleton == null) {
singleton = new MfpDiagnostics();
singleton.register(packageList);
}
if (TraceComponent.... | static MfpDiagnostics function() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, STR); if (singleton == null) { singleton = new MfpDiagnostics(); singleton.register(packageList); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, STR); return singleton; ... | /**
* Initialise the diagnostic module by creating the singleton instance and registering
* it with the diagnostic engine in Websphere.
*/ | Initialise the diagnostic module by creating the singleton instance and registering it with the diagnostic engine in Websphere | initialize | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/MfpDiagnostics.java",
"license": "epl-1.0",
"size": 10706
} | [
"com.ibm.websphere.ras.TraceComponent",
"com.ibm.ws.sib.utils.ras.SibTr"
] | import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.sib.utils.ras.SibTr; | import com.ibm.websphere.ras.*; import com.ibm.ws.sib.utils.ras.*; | [
"com.ibm.websphere",
"com.ibm.ws"
] | com.ibm.websphere; com.ibm.ws; | 1,036,021 |
void closeCq(String cqName, ClientProxyMembershipID clientProxyId) throws CqException; | void closeCq(String cqName, ClientProxyMembershipID clientProxyId) throws CqException; | /**
* Called directly on server side.
*
* @param cqName
* @param clientProxyId
* @throws CqException
*/ | Called directly on server side | closeCq | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/query/internal/cq/CqService.java",
"license": "apache-2.0",
"size": 8587
} | [
"org.apache.geode.cache.query.CqException",
"org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID"
] | import org.apache.geode.cache.query.CqException; import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID; | import org.apache.geode.cache.query.*; import org.apache.geode.internal.cache.tier.sockets.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,755,575 |
private List<QuadNode> mergeAndSort( List<QuadNode> toBeMerged ) {
Collections.sort( toBeMerged );
List<QuadNode> resultList = new ArrayList<QuadNode>( toBeMerged );
boolean needsResort = true;
while ( needsResort ) {
needsResort = false;
List<QuadNode> ... | List<QuadNode> function( List<QuadNode> toBeMerged ) { Collections.sort( toBeMerged ); List<QuadNode> resultList = new ArrayList<QuadNode>( toBeMerged ); boolean needsResort = true; while ( needsResort ) { needsResort = false; List<QuadNode> tmpResults = new ArrayList<QuadNode>( resultList ); Iterator<QuadNode> it = tm... | /**
* A little helper function which first sorts the given list of quadnodes according to their sorting order and
* afterwards merges all stripes which are adjacent and have the same resolution.
*
* @param toBeMerged
* the list of Quadnodes which must be sorted and merged.
... | A little helper function which first sorts the given list of quadnodes according to their sorting order and afterwards merges all stripes which are adjacent and have the same resolution | mergeAndSort | {
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/ogcwebservices/wpvs/utils/QuadTreeSplitter.java",
"license": "lgpl-2.1",
"size": 41439
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.Iterator",
"java.util.List",
"org.deegree.model.spatialschema.Envelope",
"org.deegree.model.spatialschema.GeometryException",
"org.deegree.model.spatialschema.GeometryFactory",
"org.deegree.model.spatialschema.Surface",
"org.deegree.model.sp... | import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import org.deegree.model.spatialschema.Envelope; import org.deegree.model.spatialschema.GeometryException; import org.deegree.model.spatialschema.GeometryFactory; import org.deegree.model.spatialschema.Surface; i... | import java.util.*; import org.deegree.model.spatialschema.*; import org.deegree.ogcwebservices.wpvs.configuration.*; | [
"java.util",
"org.deegree.model",
"org.deegree.ogcwebservices"
] | java.util; org.deegree.model; org.deegree.ogcwebservices; | 702,032 |
public User getUserDetails(){
User user = new User();
String selectQuery = "SELECT * FROM " + User.TABLE_NAME;
SQLiteDatabase db = this.getWritableDatabase();
createUserTable(db);
Cursor cursor = db.rawQuery(selectQuery, null);
// Move to first row
cursor.moveToFirst();
... | User function(){ User user = new User(); String selectQuery = STR + User.TABLE_NAME; SQLiteDatabase db = this.getWritableDatabase(); createUserTable(db); Cursor cursor = db.rawQuery(selectQuery, null); cursor.moveToFirst(); if(cursor.getCount() > 0){ user.setUsername(cursor.getString(cursor.getColumnIndex(User.USERNAME... | /**
* Getting user data from database
* */ | Getting user data from database | getUserDetails | {
"repo_name": "Prasad1337/Scavenger-Hunt",
"path": "src/csci567/scavengerhunt/tools/DatabaseHandler.java",
"license": "gpl-2.0",
"size": 5475
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; | import android.database.*; import android.database.sqlite.*; | [
"android.database"
] | android.database; | 2,659,798 |
if (!validateParticipants(seller, buyer)) return;
PrivateStore store = seller.getStore();
tradeList = loadObjIds(seller, tradeList);
if (tradeList == null) return; // Invalid items found or store was empty
Storage inventory = buyer.getInventor... | if (!validateParticipants(seller, buyer)) return; PrivateStore store = seller.getStore(); tradeList = loadObjIds(seller, tradeList); if (tradeList == null) return; Storage inventory = buyer.getInventory(); int freeSlots = inventory.getLimit() - inventory.getItemsWithKinah().size() + 1; if (freeSlots < tradeList.size())... | /**
* This method will move the item to the new player and move kinah to item
* owner
*/ | This method will move the item to the new player and move kinah to item owner | sellStoreItem | {
"repo_name": "GiGatR00n/Aion-Core-v4.7.5",
"path": "AC-Game/src/com/aionemu/gameserver/services/PrivateStoreService.java",
"license": "gpl-2.0",
"size": 13129
} | [
"com.aionemu.gameserver.model.gameobjects.Item",
"com.aionemu.gameserver.model.gameobjects.player.PrivateStore",
"com.aionemu.gameserver.model.items.storage.Storage",
"com.aionemu.gameserver.model.trade.TradeItem",
"com.aionemu.gameserver.model.trade.TradePSItem",
"com.aionemu.gameserver.services.item.Ite... | import com.aionemu.gameserver.model.gameobjects.Item; import com.aionemu.gameserver.model.gameobjects.player.PrivateStore; import com.aionemu.gameserver.model.items.storage.Storage; import com.aionemu.gameserver.model.trade.TradeItem; import com.aionemu.gameserver.model.trade.TradePSItem; import com.aionemu.gameserver.... | import com.aionemu.gameserver.model.gameobjects.*; import com.aionemu.gameserver.model.gameobjects.player.*; import com.aionemu.gameserver.model.items.storage.*; import com.aionemu.gameserver.model.trade.*; import com.aionemu.gameserver.services.item.*; import com.aionemu.gameserver.utils.*; | [
"com.aionemu.gameserver"
] | com.aionemu.gameserver; | 32,198 |
public void setConnectedCounts(int[] counts) {
for(int i = 0;i < counts.length;i++) {
connectedCounts.setTrueCount(i, counts[i]);
}
}
/**
* Sets the connected count {@link SparseBinaryMatrix} | void function(int[] counts) { for(int i = 0;i < counts.length;i++) { connectedCounts.setTrueCount(i, counts[i]); } } /** * Sets the connected count {@link SparseBinaryMatrix} | /**
* Sets the indexed count of synapses connected at the columns in each index.
* @param counts
*/ | Sets the indexed count of synapses connected at the columns in each index | setConnectedCounts | {
"repo_name": "rhyolight/htm.java",
"path": "src/main/java/org/numenta/nupic/Connections.java",
"license": "gpl-3.0",
"size": 47639
} | [
"org.numenta.nupic.util.SparseBinaryMatrix"
] | import org.numenta.nupic.util.SparseBinaryMatrix; | import org.numenta.nupic.util.*; | [
"org.numenta.nupic"
] | org.numenta.nupic; | 752,936 |
public Observable<ServiceResponse<Page<VirtualMachineInner>>> listByLocationSinglePageAsync(final String location) {
if (location == null) {
throw new IllegalArgumentException("Parameter location is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
... | Observable<ServiceResponse<Page<VirtualMachineInner>>> function(final String location) { if (location == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } | /**
* Gets all the virtual machines under the specified subscription for the specified location.
*
ServiceResponse<PageImpl1<VirtualMachineInner>> * @param location The location for which virtual machines under the subscription are queried.
* @throws IllegalArgumentException thrown if parameters fail... | Gets all the virtual machines under the specified subscription for the specified location | listByLocationSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/compute/v2020_06_01/implementation/VirtualMachinesInner.java",
"license": "mit",
"size": 261375
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,926,557 |
private String[] splitTagged(String text) {
Vector<String> strings = new Vector<String>();
int index = find(text, "\uE008" + "0>", 1); //$NON-NLS-1$ //$NON-NLS-2$
while (index != -1) {
String candidate = text.substring(0, index);
int ends = find(candidate, "<0" + "\uE007", 0); //$NON-... | String[] function(String text) { Vector<String> strings = new Vector<String>(); int index = find(text, STR + "0>", 1); while (index != -1) { String candidate = text.substring(0, index); int ends = find(candidate, "<0" + STR, 0); while (ends != -1) { if (!candidate.substring(0, ends + 6).endsWith("0" + STR)) { end... | /**
* Split tagged.
* @param text
* the text
* @return the string[]
*/ | Split tagged | splitTagged | {
"repo_name": "heartsome/tmxeditor8",
"path": "hsconverter/net.heartsome.cat.converter.rtf/src/net/heartsome/cat/converter/rtf/Rtf2Xliff.java",
"license": "gpl-2.0",
"size": 96309
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,540,813 |
public boolean exists(){
if(!topZip.exists()){
return false; //Don't bother trying
}
try{
getInputStream().close();
return true;
} catch(IOException e){
return false;
}
} | boolean function(){ if(!topZip.exists()){ return false; } try{ getInputStream().close(); return true; } catch(IOException e){ return false; } } | /**
* Returns if this file exists or not. Note this is a non-trivial operation.
*
* @return
*/ | Returns if this file exists or not. Note this is a non-trivial operation | exists | {
"repo_name": "dbuxo/CommandHelper",
"path": "src/main/java/com/laytonsmith/PureUtilities/ZipReader.java",
"license": "mit",
"size": 14983
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,272,659 |
public boolean getCanSpawnHere() {
BlockPos blockpos = new BlockPos(this.posX,
this.getEntityBoundingBox().minY, this.posZ);
if (blockpos.getY() >= this.worldObj.getSeaLevel()) {
return false;
} else {
int i = this.worldObj.getLightFromNeighbors(blockpos);
int j = 4;
if (this.isDateAroundHall... | boolean function() { BlockPos blockpos = new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ); if (blockpos.getY() >= this.worldObj.getSeaLevel()) { return false; } else { int i = this.worldObj.getLightFromNeighbors(blockpos); int j = 4; if (this.isDateAroundHalloween(this.worldObj.getCurrentDate())) { ... | /**
* Checks if the entity's current position is a valid location to spawn this
* entity.
*/ | Checks if the entity's current position is a valid location to spawn this entity | getCanSpawnHere | {
"repo_name": "aspyker/mobycraft",
"path": "src/src/main/java/org/redfrog404/mobycraft/entity/EntityChaosMonkey.java",
"license": "apache-2.0",
"size": 8719
} | [
"net.minecraft.util.BlockPos"
] | import net.minecraft.util.BlockPos; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 827,720 |
// Game is played over the default ignite.
try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
if (!ExamplesUtils.checkMinTopologySize(ignite.cluster(), 2))
return;
System.out.println();
System.out.println(">>> Messaging ping-pong exa... | try (Ignite ignite = Ignition.start(STR)) { if (!ExamplesUtils.checkMinTopologySize(ignite.cluster(), 2)) return; System.out.println(); System.out.println(STR); ClusterGroup nodeB = ignite.cluster().forRemotes().forRandom(); | /**
* Executes example.
*
* @param args Command line arguments, none required.
* @throws Exception If example execution failed.
*/ | Executes example | main | {
"repo_name": "afinka77/ignite",
"path": "examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java",
"license": "apache-2.0",
"size": 4770
} | [
"org.apache.ignite.Ignite",
"org.apache.ignite.Ignition",
"org.apache.ignite.cluster.ClusterGroup",
"org.apache.ignite.examples.ExamplesUtils"
] | import org.apache.ignite.Ignite; import org.apache.ignite.Ignition; import org.apache.ignite.cluster.ClusterGroup; import org.apache.ignite.examples.ExamplesUtils; | import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.examples.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 240,611 |
public void setCustomURIResolver(URIResolver resolver) {
this.uriResolver = resolver;
} | void function(URIResolver resolver) { this.uriResolver = resolver; } | /**
* Sets the custom URI Resolver. It is used for resolving factory-level URIs like
* hyphenation patterns and as backup for URI resolution performed during a
* rendering run.
*
* @param resolver
* the new URI resolver
*/ | Sets the custom URI Resolver. It is used for resolving factory-level URIs like hyphenation patterns and as backup for URI resolution performed during a rendering run | setCustomURIResolver | {
"repo_name": "spepping/fop-cs",
"path": "src/java/org/apache/fop/apps/FOURIResolver.java",
"license": "apache-2.0",
"size": 15243
} | [
"javax.xml.transform.URIResolver"
] | import javax.xml.transform.URIResolver; | import javax.xml.transform.*; | [
"javax.xml"
] | javax.xml; | 1,332,930 |
protected boolean isAffectedByOpenable(IJavaScriptElementDelta delta, IJavaScriptElement element) {
if (element instanceof CompilationUnit) {
CompilationUnit cu = (CompilationUnit) element;
ChangeCollector collector = this.changeCollector;
if (collector == null) {
collector = new ChangeCollector(this)... | boolean function(IJavaScriptElementDelta delta, IJavaScriptElement element) { if (element instanceof CompilationUnit) { CompilationUnit cu = (CompilationUnit) element; ChangeCollector collector = this.changeCollector; if (collector == null) { collector = new ChangeCollector(this); } try { collector.addChange(cu, delta)... | /**
* Returns true if the given type delta (a compilation unit delta or a
* class file delta) could affect this type hierarchy.
*/ | Returns true if the given type delta (a compilation unit delta or a class file delta) could affect this type hierarchy | isAffectedByOpenable | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/hierarchy/TypeHierarchy.java",
"license": "epl-1.0",
"size": 39218
} | [
"org.eclipse.wst.jsdt.core.IJavaScriptElement",
"org.eclipse.wst.jsdt.core.IJavaScriptElementDelta",
"org.eclipse.wst.jsdt.core.IType",
"org.eclipse.wst.jsdt.core.JavaScriptModelException",
"org.eclipse.wst.jsdt.internal.core.ClassFile",
"org.eclipse.wst.jsdt.internal.core.CompilationUnit"
] | import org.eclipse.wst.jsdt.core.IJavaScriptElement; import org.eclipse.wst.jsdt.core.IJavaScriptElementDelta; import org.eclipse.wst.jsdt.core.IType; import org.eclipse.wst.jsdt.core.JavaScriptModelException; import org.eclipse.wst.jsdt.internal.core.ClassFile; import org.eclipse.wst.jsdt.internal.core.CompilationUnit... | import org.eclipse.wst.jsdt.core.*; import org.eclipse.wst.jsdt.internal.core.*; | [
"org.eclipse.wst"
] | org.eclipse.wst; | 144,546 |
void copyAttributes(String token, String srcId, String dstId, ExtendedAttributes extAttr) throws AccessDeniedException,
PathNotFoundException, DatabaseException; | void copyAttributes(String token, String srcId, String dstId, ExtendedAttributes extAttr) throws AccessDeniedException, PathNotFoundException, DatabaseException; | /**
* Copy attributes from a node to another.
*
* @param token Security token.
* @param srcId The path that identifies an unique document or its UUID.
* @param dstId The path that identifies an unique document or its UUID.
* @param extAttr Which attributes need to be copied.
*/ | Copy attributes from a node to another | copyAttributes | {
"repo_name": "codelibs/n2dms",
"path": "src/main/java/com/openkm/module/RepositoryModule.java",
"license": "gpl-2.0",
"size": 8414
} | [
"com.openkm.bean.ExtendedAttributes",
"com.openkm.core.AccessDeniedException",
"com.openkm.core.DatabaseException",
"com.openkm.core.PathNotFoundException"
] | import com.openkm.bean.ExtendedAttributes; import com.openkm.core.AccessDeniedException; import com.openkm.core.DatabaseException; import com.openkm.core.PathNotFoundException; | import com.openkm.bean.*; import com.openkm.core.*; | [
"com.openkm.bean",
"com.openkm.core"
] | com.openkm.bean; com.openkm.core; | 905,528 |
public SpringApplicationBuilder profiles(String... profiles) {
this.additionalProfiles.addAll(Arrays.asList(profiles));
this.application.setAdditionalProfiles(this.additionalProfiles
.toArray(new String[this.additionalProfiles.size()]));
return this;
} | SpringApplicationBuilder function(String... profiles) { this.additionalProfiles.addAll(Arrays.asList(profiles)); this.application.setAdditionalProfiles(this.additionalProfiles .toArray(new String[this.additionalProfiles.size()])); return this; } | /**
* Add to the active Spring profiles for this app (and its parent and children).
* @param profiles the profiles to add.
* @return the current builder
*/ | Add to the active Spring profiles for this app (and its parent and children) | profiles | {
"repo_name": "wwadge/spring-boot",
"path": "spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java",
"license": "apache-2.0",
"size": 16679
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,617,319 |
static SpawnAction.Builder spawnOnDarwinActionBuilder(RuleContext ruleContext) {
AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class);
return new SpawnAction.Builder()
.setEnvironment(appleConfiguration.getEnvironmentForIosAction())
.setExecutionInfo(Immuta... | static SpawnAction.Builder spawnOnDarwinActionBuilder(RuleContext ruleContext) { AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class); return new SpawnAction.Builder() .setEnvironment(appleConfiguration.getEnvironmentForIosAction()) .setExecutionInfo(ImmutableMap.of(ExecutionRequire... | /**
* Creates a new spawn action builder that requires a darwin architecture to run.
*/ | Creates a new spawn action builder that requires a darwin architecture to run | spawnOnDarwinActionBuilder | {
"repo_name": "kamalmarhubi/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java",
"license": "apache-2.0",
"size": 51028
} | [
"com.google.common.collect.ImmutableMap",
"com.google.devtools.build.lib.analysis.RuleContext",
"com.google.devtools.build.lib.analysis.actions.SpawnAction",
"com.google.devtools.build.lib.packages.RuleClass",
"com.google.devtools.build.lib.rules.apple.AppleConfiguration"
] | import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.actions.SpawnAction; import com.google.devtools.build.lib.packages.RuleClass; import com.google.devtools.build.lib.rules.apple.AppleConfiguration; | import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.analysis.actions.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.rules.apple.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 1,979,683 |
public void testNonStandardConnectionCollation() throws Exception {
if (versionMeetsMinimum(4, 1)) {
String collationToSet = "utf8_bin";
String characterSet = "utf-8";
Properties props = new Properties();
props.setProperty("connectionCollation", collationToSe... | void function() throws Exception { if (versionMeetsMinimum(4, 1)) { String collationToSet = STR; String characterSet = "utf-8"; Properties props = new Properties(); props.setProperty(STR, collationToSet); props.setProperty(STR, characterSet); Connection collConn = null; Statement collStmt = null; ResultSet collRs = nul... | /**
* Tests the ability to set the connection collation via properties.
*
* @throws Exception
* if an error occurs or the test fails
*/ | Tests the ability to set the connection collation via properties | testNonStandardConnectionCollation | {
"repo_name": "slockhart/sql-app",
"path": "mysql-connector-java-5.1.34/src/testsuite/simple/ConnectionTest.java",
"license": "gpl-2.0",
"size": 74127
} | [
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.Statement",
"java.util.Properties"
] | import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import java.util.Properties; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,656,965 |
public void setSubAccount(SubAccount subAccount) {
this.subAccount = subAccount;
} | void function(SubAccount subAccount) { this.subAccount = subAccount; } | /**
* Sets the subAccount attribute value.
*
* @param subAccount The subAccount to set.
* @deprecated
*/ | Sets the subAccount attribute value | setSubAccount | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/bc/businessobject/BudgetConstructionAppointmentFundingReason.java",
"license": "apache-2.0",
"size": 10384
} | [
"org.kuali.kfs.coa.businessobject.SubAccount"
] | import org.kuali.kfs.coa.businessobject.SubAccount; | import org.kuali.kfs.coa.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,257,578 |
@POST
@Path("/localidad")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response updateLocalidad(Localidad localidad) {
LocalidadMaster tm = new LocalidadMaster(getPath());
try {
tm.updateLocalidad(localidad);
} catch (Exception e) {
return Response.status(500).en... | @Path(STR) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response function(Localidad localidad) { LocalidadMaster tm = new LocalidadMaster(getPath()); try { tm.updateLocalidad(localidad); } catch (Exception e) { return Response.status(500).entity(doErrorMessage(e)).build(); } return Respon... | /**
* Actualiza una localidad de la base de datos.
* @param localidad Localidad con los nuevos datos.
* @return Resultado de intentar actualizar la localidad
*/ | Actualiza una localidad de la base de datos | updateLocalidad | {
"repo_name": "ravelinx22/Iteracion2Sistrans",
"path": "src/rest/LocalidadServices.java",
"license": "mit",
"size": 3533
} | [
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response"
] | import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; | import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"javax.ws"
] | javax.ws; | 1,004,255 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.