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
@Override public String getText(Object object) { String label = ((Axis)object).getField(); return label == null || label.length() == 0 ? getString("_UI_Axis_type") : getString("_UI_Axis_type") + " " + label; }
String function(Object object) { String label = ((Axis)object).getField(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the label text for the adapted class.
getText
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/t24/core/com.odcgroup.t24.enquiry.model.edit/src/com/odcgroup/t24/enquiry/enquiry/provider/AxisItemProvider.java", "license": "epl-1.0", "size": 6055 }
[ "com.odcgroup.t24.enquiry.enquiry.Axis" ]
import com.odcgroup.t24.enquiry.enquiry.Axis;
import com.odcgroup.t24.enquiry.enquiry.*;
[ "com.odcgroup.t24" ]
com.odcgroup.t24;
1,433,903
private void initComps() { WebComponent meta = new WebComponent("meta"); final IModel<String> urlModel = new LoadableDetachableModel<String>() { private static final long serialVersionUID = 1L;
void function() { WebComponent meta = new WebComponent("meta"); final IModel<String> urlModel = new LoadableDetachableModel<String>() { private static final long serialVersionUID = 1L;
/** * Adds components. */
Adds components
initComps
{ "repo_name": "martin-g/wicket-osgi", "path": "wicket-core/src/main/java/org/apache/wicket/markup/html/pages/BrowserInfoPage.java", "license": "apache-2.0", "size": 4248 }
[ "org.apache.wicket.markup.html.WebComponent", "org.apache.wicket.model.IModel", "org.apache.wicket.model.LoadableDetachableModel" ]
import org.apache.wicket.markup.html.WebComponent; import org.apache.wicket.model.IModel; import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.markup.html.*; import org.apache.wicket.model.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,981,329
Observable<Page<DataLakeAnalyticsAccountBasic>> listNextAsync(final String nextPageLink);
Observable<Page<DataLakeAnalyticsAccountBasic>> listNextAsync(final String nextPageLink);
/** * Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail th...
Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any
listNextAsync
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Accounts.java", "license": "mit", "size": 49196 }
[ "com.microsoft.azure.Page", "com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountBasic" ]
import com.microsoft.azure.Page; import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountBasic;
import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
307,830
public static synchronized RandomGenerator getRandomGenerator() { return randomGenerator; } /** * Evolve the given population. Evolution stops when the stopping condition * is satisfied. Updates the {@link #getGenerationsEvolved() generationsEvolved}
static synchronized RandomGenerator function() { return randomGenerator; } /** * Evolve the given population. Evolution stops when the stopping condition * is satisfied. Updates the {@link #getGenerationsEvolved() generationsEvolved}
/** * Returns the (static) random generator. * * @return the static random generator shared by GA implementation classes */
Returns the (static) random generator
getRandomGenerator
{ "repo_name": "najibghadri/NeuralNetworkSimulator", "path": "src/org/apache/commons/math3/genetics/GeneticAlgorithm.java", "license": "mit", "size": 8616 }
[ "org.apache.commons.math3.random.RandomGenerator" ]
import org.apache.commons.math3.random.RandomGenerator;
import org.apache.commons.math3.random.*;
[ "org.apache.commons" ]
org.apache.commons;
103,165
public void doUpgrade(StaplerResponse rsp) throws IOException, ServletException { requirePOST(); Hudson.getInstance().checkPermission(Hudson.ADMINISTER); HudsonUpgradeJob job = new HudsonUpgradeJob(getCoreSource(), Hudson.getAuthentication()); if(!Lifecycle.get().canRewriteHudsonWar(...
void function(StaplerResponse rsp) throws IOException, ServletException { requirePOST(); Hudson.getInstance().checkPermission(Hudson.ADMINISTER); HudsonUpgradeJob job = new HudsonUpgradeJob(getCoreSource(), Hudson.getAuthentication()); if(!Lifecycle.get().canRewriteHudsonWar()) { sendError(STR); return; } LOGGER.info(S...
/** * Schedules a Jenkins upgrade. */
Schedules a Jenkins upgrade
doUpgrade
{ "repo_name": "pantheon-systems/jenkins", "path": "core/src/main/java/hudson/model/UpdateCenter.java", "license": "mit", "size": 38797 }
[ "hudson.lifecycle.Lifecycle", "java.io.IOException", "javax.servlet.ServletException", "org.kohsuke.stapler.StaplerResponse" ]
import hudson.lifecycle.Lifecycle; import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.StaplerResponse;
import hudson.lifecycle.*; import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*;
[ "hudson.lifecycle", "java.io", "javax.servlet", "org.kohsuke.stapler" ]
hudson.lifecycle; java.io; javax.servlet; org.kohsuke.stapler;
2,892,505
@SuppressWarnings("static-method") @Test public void testBuildFromTextIterator() { final LinkedList<String> textList = new LinkedList<>(); textList.add("first query\t1 2 5 3"); textList.add("second query\t100 12"); final GroundTruth<String> groundTruth = GroundTruth.buildFromTextIte...
@SuppressWarnings(STR) void function() { final LinkedList<String> textList = new LinkedList<>(); textList.add(STR); textList.add(STR); final GroundTruth<String> groundTruth = GroundTruth.buildFromTextIterator(textList.iterator(), "\t", " "); final LinkedList<String> firstQuery = new LinkedList<>(); firstQuery.add("firs...
/** * Test method for * {@link GroundTruth#buildFromTextIterator(Iterator, String, String)}. */
Test method for <code>GroundTruth#buildFromTextIterator(Iterator, String, String)</code>
testBuildFromTextIterator
{ "repo_name": "ZabuzaW/LexiSearch", "path": "test/de/zabuza/lexisearch/benchmarking/GroundTruthTest.java", "license": "gpl-3.0", "size": 9145 }
[ "java.util.Collection", "java.util.HashSet", "java.util.LinkedList", "org.junit.Assert" ]
import java.util.Collection; import java.util.HashSet; import java.util.LinkedList; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
210,909
@Test public void shouldNotUseBetweenSymmetric() { // given SqlConstraints.setDisableBetweenSymmetricPredicate(true); int min = uniqueInt(10); int max = min + uniqueInt(10); // when String actual = between("lhs", min, max); // then String expected = "lhs BETWEEN " + min + " AND " +...
void function() { SqlConstraints.setDisableBetweenSymmetricPredicate(true); int min = uniqueInt(10); int max = min + uniqueInt(10); String actual = between("lhs", min, max); String expected = STR + min + STR + max; assertEquals(expected, actual); }
/** * Don't use BETWEEN SYMMETRIC (only use BETWEEN) when requested. */
Don't use BETWEEN SYMMETRIC (only use BETWEEN) when requested
shouldNotUseBetweenSymmetric
{ "repo_name": "zangsir/ANNIS", "path": "annis-service/src/test/java/annis/sqlgen/TestSqlConstraints.java", "license": "apache-2.0", "size": 8569 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,512,745
private void testBadlyFormedUri(final String uri, final String errorMsg) { try { new URLFileNameParser(80).parseUri(null, null, uri); fail(); } catch (final FileSystemException e) { assertSameMessage(errorMsg, uri, e); } }
void function(final String uri, final String errorMsg) { try { new URLFileNameParser(80).parseUri(null, null, uri); fail(); } catch (final FileSystemException e) { assertSameMessage(errorMsg, uri, e); } }
/** * Tests that parsing a URI fails with the expected error. */
Tests that parsing a URI fails with the expected error
testBadlyFormedUri
{ "repo_name": "wso2/wso2-commons-vfs", "path": "commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/test/GenericFileNameTestCase.java", "license": "apache-2.0", "size": 6617 }
[ "org.apache.commons.vfs2.FileSystemException", "org.apache.commons.vfs2.provider.URLFileNameParser" ]
import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.provider.URLFileNameParser;
import org.apache.commons.vfs2.*; import org.apache.commons.vfs2.provider.*;
[ "org.apache.commons" ]
org.apache.commons;
2,076,819
@Test public void testTwoPhaseCommitTwoRM_2() throws Exception { IPhynixxXAConnection<ITestConnection> xaCon1 = factory1.getXAConnection(); ITestConnection con1 = xaCon1.getConnection(); IPhynixxXAConnection<ITestConnection> xaCon2 = factory1.getXAConnection(); ITestConnection c...
void function() throws Exception { IPhynixxXAConnection<ITestConnection> xaCon1 = factory1.getXAConnection(); ITestConnection con1 = xaCon1.getConnection(); IPhynixxXAConnection<ITestConnection> xaCon2 = factory1.getXAConnection(); ITestConnection con2 = xaCon2.getConnection(); IPhynixxXAConnection<ITestConnection> xaC...
/** * one XAResourceProgressState Factory ( == resourceManagers) but two * Connections. The connections are joined and the transaction end sup in a * one-phase-commit * * @throws Exception */
one XAResourceProgressState Factory ( == resourceManagers) but two Connections. The connections are joined and the transaction end sup in a one-phase-commit
testTwoPhaseCommitTwoRM_2
{ "repo_name": "csc19601128/Phynixx", "path": "phynixx/phynixx-xa/src/test/java/org/csc/phynixx/xa/XAResourceIntegrationTest.java", "license": "apache-2.0", "size": 45393 }
[ "org.csc.phynixx.phynixx.testconnection.ITestConnection" ]
import org.csc.phynixx.phynixx.testconnection.ITestConnection;
import org.csc.phynixx.phynixx.testconnection.*;
[ "org.csc.phynixx" ]
org.csc.phynixx;
2,099,766
public ChannelFuture sendFuture(Class<? extends Protocol> packetProtocol) throws Exception { if (!isCancelled()) { ByteBuf output = constructPacket(packetProtocol, true); return user().sendRawPacketFuture(output); } return user().getChannel().newFailedFuture(new Excep...
ChannelFuture function(Class<? extends Protocol> packetProtocol) throws Exception { if (!isCancelled()) { ByteBuf output = constructPacket(packetProtocol, true); return user().sendRawPacketFuture(output); } return user().getChannel().newFailedFuture(new Exception(STR)); }
/** * Send this packet to the associated user. * Be careful not to send packets twice. * (Sends it after current) * Also returns the packets ChannelFuture * * @param packetProtocol - The protocol version of the packet. * @return The packets ChannelFuture * @throws Exception if it...
Send this packet to the associated user. Be careful not to send packets twice. (Sends it after current) Also returns the packets ChannelFuture
sendFuture
{ "repo_name": "Matsv/ViaVersion", "path": "common/src/main/java/us/myles/ViaVersion/api/PacketWrapper.java", "license": "mit", "size": 17795 }
[ "io.netty.buffer.ByteBuf", "io.netty.channel.ChannelFuture", "us.myles.ViaVersion" ]
import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelFuture; import us.myles.ViaVersion;
import io.netty.buffer.*; import io.netty.channel.*; import us.myles.*;
[ "io.netty.buffer", "io.netty.channel", "us.myles" ]
io.netty.buffer; io.netty.channel; us.myles;
2,595,698
public long getTemporaryKeyStoreRetentionMinutes() { long minutes; String value = getProperty(TEMPORARYSTORE_RETENTION_MINUTES); if(StringUtils.isEmpty(value)) { LOG.debug("Value of {} is not set, using default value ({})", TEMPORARYSTORE_RETENTION_MINUTES.getKey(), TEMPORARYSTO...
long function() { long minutes; String value = getProperty(TEMPORARYSTORE_RETENTION_MINUTES); if(StringUtils.isEmpty(value)) { LOG.debug(STR, TEMPORARYSTORE_RETENTION_MINUTES.getKey(), TEMPORARYSTORE_RETENTION_MINUTES.getDefaultValue()); minutes = TEMPORARYSTORE_RETENTION_MINUTES.getDefaultValue(); } else { try { minut...
/** * Gets the temporary keystore retention time in minutes. * <p/> * This value is retrieved from the Ambari property named 'security.temporary.keystore.retention.minutes'. * If not set, the default value of 90 (minutes) will be returned. * * @return a timeout value (in minutes) */
Gets the temporary keystore retention time in minutes. This value is retrieved from the Ambari property named 'security.temporary.keystore.retention.minutes'. If not set, the default value of 90 (minutes) will be returned
getTemporaryKeyStoreRetentionMinutes
{ "repo_name": "sekikn/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java", "license": "apache-2.0", "size": 252637 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
860,389
private Map<String, HueDevice> getHueDevices() { Collection<Item> items = getTaggedItems(); Map<String, HueDevice> devices = new HashMap<String, HueDevice>(); Iterator<Item> it = items.iterator(); while (it.hasNext()) { Item item = it.next(); devices.put(item....
Map<String, HueDevice> function() { Collection<Item> items = getTaggedItems(); Map<String, HueDevice> devices = new HashMap<String, HueDevice>(); Iterator<Item> it = items.iterator(); while (it.hasNext()) { Item item = it.next(); devices.put(item.getName(), itemToDevice(item)); } return devices; }
/** * Returns a map of all our items that have voice tags. * * @param username * @return * Map <item name, HueDevice> */
Returns a map of all our items that have voice tags
getHueDevices
{ "repo_name": "mickey4u/new_mart", "path": "addons/io/org.openhab.io.hueemulation/src/main/java/org/openhab/io/hueemulation/internal/HueEmulationServlet.java", "license": "epl-1.0", "size": 18934 }
[ "java.util.Collection", "java.util.HashMap", "java.util.Iterator", "java.util.Map", "org.eclipse.smarthome.core.items.Item", "org.openhab.io.hueemulation.internal.api.HueDevice" ]
import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.eclipse.smarthome.core.items.Item; import org.openhab.io.hueemulation.internal.api.HueDevice;
import java.util.*; import org.eclipse.smarthome.core.items.*; import org.openhab.io.hueemulation.internal.api.*;
[ "java.util", "org.eclipse.smarthome", "org.openhab.io" ]
java.util; org.eclipse.smarthome; org.openhab.io;
1,145,501
public void testConfiguredSites() throws Throwable { echo("Testing Site Configuration"); CmsSiteManagerImpl siteManager = OpenCms.getSiteManager(); echo("Testing default Uri"); assertEquals("/sites/default/", siteManager.getDefaultUri()); echo("Testing workplace server"); ...
void function() throws Throwable { echo(STR); CmsSiteManagerImpl siteManager = OpenCms.getSiteManager(); echo(STR); assertEquals(STR, siteManager.getDefaultUri()); echo(STR); assertEquals(STR/sites/default/folder1STRTesting Site: 'STR'STRTesting Server ProtocolSTRhttpSTRTesting Server NameSTRlocalhostSTRTesting Server ...
/** * Tests the configured site settings.<p> * * @throws Throwable if something goes wrong */
Tests the configured site settings
testConfiguredSites
{ "repo_name": "victos/opencms-core", "path": "test/org/opencms/configuration/TestSiteConfiguration.java", "license": "lgpl-2.1", "size": 5005 }
[ "org.opencms.main.OpenCms", "org.opencms.site.CmsSiteManagerImpl" ]
import org.opencms.main.OpenCms; import org.opencms.site.CmsSiteManagerImpl;
import org.opencms.main.*; import org.opencms.site.*;
[ "org.opencms.main", "org.opencms.site" ]
org.opencms.main; org.opencms.site;
1,607,858
@Override public void getTask(@NonNull final String taskId, @NonNull final GetTaskCallback callback) { checkNotNull(taskId); checkNotNull(callback); Task cachedTask = getTaskWithId(taskId); // Respond immediately with cache if available if (cachedTask != null) { ...
void function(@NonNull final String taskId, @NonNull final GetTaskCallback callback) { checkNotNull(taskId); checkNotNull(callback); Task cachedTask = getTaskWithId(taskId); if (cachedTask != null) { callback.onTaskLoaded(cachedTask); return; }
/** * Gets tasks from local data source (sqlite) unless the table is new or empty. In that case it * uses the network data source. This is done to simplify the sample. * <p> * Note: {@link GetTaskCallback#onDataNotAvailable()} is fired if both data sources fail to * get the data. */
Gets tasks from local data source (sqlite) unless the table is new or empty. In that case it uses the network data source. This is done to simplify the sample. Note: <code>GetTaskCallback#onDataNotAvailable()</code> is fired if both data sources fail to get the data
getTask
{ "repo_name": "sdsxer/mmdiary", "path": "client/source/mmdiary/app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/source/TasksRepository.java", "license": "apache-2.0", "size": 10865 }
[ "android.support.annotation.NonNull", "com.example.android.architecture.blueprints.todoapp.tasks.domain.model.Task", "com.google.common.base.Preconditions" ]
import android.support.annotation.NonNull; import com.example.android.architecture.blueprints.todoapp.tasks.domain.model.Task; import com.google.common.base.Preconditions;
import android.support.annotation.*; import com.example.android.architecture.blueprints.todoapp.tasks.domain.model.*; import com.google.common.base.*;
[ "android.support", "com.example.android", "com.google.common" ]
android.support; com.example.android; com.google.common;
1,720,250
public double parRate(final DepositZero deposit, final YieldCurveBundle curves) { final YieldAndDiscountCurve dsc = curves.getCurve(deposit.getDiscountingCurveName()); final double startTime = deposit.getStartTime(); final double endTime = deposit.getEndTime(); final double rcc = Math.log(dsc.getDisco...
double function(final DepositZero deposit, final YieldCurveBundle curves) { final YieldAndDiscountCurve dsc = curves.getCurve(deposit.getDiscountingCurveName()); final double startTime = deposit.getStartTime(); final double endTime = deposit.getEndTime(); final double rcc = Math.log(dsc.getDiscountFactor(startTime) / d...
/** * Computes the deposit fair rate given the start and end time and the accrual factor. * When deposit has already start the number may not be meaning full as the remaining period is not in line with the accrual factor. * @param deposit The deposit. * @param curves The curves. * @return The rate. */
Computes the deposit fair rate given the start and end time and the accrual factor. When deposit has already start the number may not be meaning full as the remaining period is not in line with the accrual factor
parRate
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/cash/method/DepositZeroDiscountingMethod.java", "license": "apache-2.0", "size": 9382 }
[ "com.opengamma.analytics.financial.interestrate.ContinuousInterestRate", "com.opengamma.analytics.financial.interestrate.InterestRate", "com.opengamma.analytics.financial.interestrate.YieldCurveBundle", "com.opengamma.analytics.financial.interestrate.cash.derivative.DepositZero", "com.opengamma.analytics.fi...
import com.opengamma.analytics.financial.interestrate.ContinuousInterestRate; import com.opengamma.analytics.financial.interestrate.InterestRate; import com.opengamma.analytics.financial.interestrate.YieldCurveBundle; import com.opengamma.analytics.financial.interestrate.cash.derivative.DepositZero; import com.opengamm...
import com.opengamma.analytics.financial.interestrate.*; import com.opengamma.analytics.financial.interestrate.cash.derivative.*; import com.opengamma.analytics.financial.model.interestrate.curve.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
1,024,312
void finalizeContext(HttpContext context);
void finalizeContext(HttpContext context);
/** * Triggered when the connection is terminated. This event can be used * to release objects stored in the context or perform some other kind * of cleanup. * * @param context the actual HTTP context */
Triggered when the connection is terminated. This event can be used to release objects stored in the context or perform some other kind of cleanup
finalizeContext
{ "repo_name": "cictourgune/MDP-Airbnb", "path": "httpcomponents-core-4.4/httpcore-nio/src/main/java-deprecated/org/apache/http/nio/protocol/NHttpRequestExecutionHandler.java", "license": "apache-2.0", "size": 4983 }
[ "org.apache.http.protocol.HttpContext" ]
import org.apache.http.protocol.HttpContext;
import org.apache.http.protocol.*;
[ "org.apache.http" ]
org.apache.http;
2,130,105
private static String getImpersonateClientId(Map<String, String> settings) { return settings.get("oauth.keycloak.impersonateClient"); }
static String function(Map<String, String> settings) { return settings.get(STR); }
/** * Returns impersonate client id * * @param settings settings * @return impersonate client id */
Returns impersonate client id
getImpersonateClientId
{ "repo_name": "Metatavu/edelphi", "path": "common-cdi/src/main/java/fi/metatavu/edelphi/keycloak/KeycloakController.java", "license": "gpl-3.0", "size": 20518 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
791,594
public ItemStack getItemStack(int i) { ItemStack is = null; String arg = parameter.get(i); if(ItemStackSyntax.items.containsKey(arg.toLowerCase())) { is = ItemStackSyntax.items.get(arg.toLowerCase()); } else if(arg.contains(":")) { String a = arg.split(":")[0]; String b = arg.split(":")[1]; int i...
ItemStack function(int i) { ItemStack is = null; String arg = parameter.get(i); if(ItemStackSyntax.items.containsKey(arg.toLowerCase())) { is = ItemStackSyntax.items.get(arg.toLowerCase()); } else if(arg.contains(":")) { String a = arg.split(":")[0]; String b = arg.split(":")[1]; int id = 0; int meta = Integer.parseInt...
/** * Get argument as ItemStack * @param i The index in your command, starts at 0 * @return */
Get argument as ItemStack
getItemStack
{ "repo_name": "KennethWussmann/Levitate", "path": "src/main/java/de/ketrwu/levitate/ParameterSet.java", "license": "gpl-2.0", "size": 5232 }
[ "de.ketrwu.levitate.syntax.ItemStackSyntax", "org.bukkit.Material", "org.bukkit.inventory.ItemStack" ]
import de.ketrwu.levitate.syntax.ItemStackSyntax; import org.bukkit.Material; import org.bukkit.inventory.ItemStack;
import de.ketrwu.levitate.syntax.*; import org.bukkit.*; import org.bukkit.inventory.*;
[ "de.ketrwu.levitate", "org.bukkit", "org.bukkit.inventory" ]
de.ketrwu.levitate; org.bukkit; org.bukkit.inventory;
1,561,305
public StringBuffer format(Object pat, StringBuffer result, FieldPosition fpos) { String pattern = processPattern((String) pat); int lastOffset = 0; for (int i = 0; i <= maxOffset; ++i) { int offidx = offsets[i]; result.append(pattern.substring(lastOffset, offsets[i]...
StringBuffer function(Object pat, StringBuffer result, FieldPosition fpos) { String pattern = processPattern((String) pat); int lastOffset = 0; for (int i = 0; i <= maxOffset; ++i) { int offidx = offsets[i]; result.append(pattern.substring(lastOffset, offsets[i])); lastOffset = offidx; String key = arguments[i]; String...
/** * Formats the parsed string by inserting table's values. * @param pat a string pattern * @param result Buffer to be used for result. * @param fpos position * @return Formatted string */
Formats the parsed string by inserting table's values
format
{ "repo_name": "kiwiandroiddev/starcraft-2-build-player", "path": "app/src/main/java/com/kiwiandroiddev/sc2buildassistant/util/MapFormat.java", "license": "mit", "size": 14577 }
[ "java.text.FieldPosition" ]
import java.text.FieldPosition;
import java.text.*;
[ "java.text" ]
java.text;
670,309
private Object supressSerialization(Object obj) { SerializableProxy res = new SerializableProxy(UUID.randomUUID()); serializedObj.put(res.uuid, obj); return res; }
Object function(Object obj) { SerializableProxy res = new SerializableProxy(UUID.randomUUID()); serializedObj.put(res.uuid, obj); return res; }
/** * Returns an object that should be returned from writeReplace() method. * * @param obj Object that must not be changed after serialization/deserialization. * @return An object to return from writeReplace() */
Returns an object that should be returned from writeReplace() method
supressSerialization
{ "repo_name": "vladisav/ignite", "path": "modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java", "license": "apache-2.0", "size": 77511 }
[ "java.util.UUID" ]
import java.util.UUID;
import java.util.*;
[ "java.util" ]
java.util;
2,136,775
public void addToKeyStore(KeyPair keyPair, X509Certificate[] chain, String alias) throws KeyStoreException { key_store.setKeyEntry(alias, keyPair.getPrivate(), KS_PASSWORD, chain); }
void function(KeyPair keyPair, X509Certificate[] chain, String alias) throws KeyStoreException { key_store.setKeyEntry(alias, keyPair.getPrivate(), KS_PASSWORD, chain); }
/** * Add the private key and the certificate chain to the key store. */
Add the private key and the certificate chain to the key store
addToKeyStore
{ "repo_name": "elegnamnden/tsl-trust", "path": "admin-webapp/src/main/java/se/tillvaxtverket/tsltrust/webservice/daemon/ca/CertificationAuthority.java", "license": "gpl-3.0", "size": 19576 }
[ "java.security.KeyPair", "java.security.KeyStoreException", "java.security.cert.X509Certificate" ]
import java.security.KeyPair; import java.security.KeyStoreException; import java.security.cert.X509Certificate;
import java.security.*; import java.security.cert.*;
[ "java.security" ]
java.security;
1,741,027
private void chooseActivityDialog(){ final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); LayoutInflater inflater = getActivity().getLayoutInflater(); final View dialogView = inflater.inflate(R.layout.choose_activity_dialog, null); dialogBuilder.setView(dialogV...
void function(){ final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(context); LayoutInflater inflater = getActivity().getLayoutInflater(); final View dialogView = inflater.inflate(R.layout.choose_activity_dialog, null); dialogBuilder.setView(dialogView); alertDialog = dialogBuilder.show(); ListView listV...
/** * Dialog to choose sports activities */
Dialog to choose sports activities
chooseActivityDialog
{ "repo_name": "HeikkiDev/osport-hello", "path": "app/src/main/java/com/proyecto/enrique/osporthello/Fragments/HomeFragment.java", "license": "apache-2.0", "size": 38269 }
[ "android.content.res.Resources", "android.support.v7.app.AlertDialog", "android.view.LayoutInflater", "android.view.View", "android.widget.ListView", "com.proyecto.enrique.osporthello.Adapters", "com.proyecto.enrique.osporthello.Models", "java.util.ArrayList" ]
import android.content.res.Resources; import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.widget.ListView; import com.proyecto.enrique.osporthello.Adapters; import com.proyecto.enrique.osporthello.Models; import java.util.ArrayList;
import android.content.res.*; import android.support.v7.app.*; import android.view.*; import android.widget.*; import com.proyecto.enrique.osporthello.*; import java.util.*;
[ "android.content", "android.support", "android.view", "android.widget", "com.proyecto.enrique", "java.util" ]
android.content; android.support; android.view; android.widget; com.proyecto.enrique; java.util;
1,988,142
public void createPopupMenu(Component aComponent,int x, int y) { }
void function(Component aComponent,int x, int y) { }
/** * Creates a popup menu for this panel in the OTB. Not used. */
Creates a popup menu for this panel in the OTB. Not used
createPopupMenu
{ "repo_name": "kernsuite-debian/lofar", "path": "SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/AntennaConfigPanel.java", "license": "gpl-3.0", "size": 71504 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,458,431
private static void applyOpenSSLFix() throws SecurityException { if ((Build.VERSION.SDK_INT < VERSION_CODE_JELLY_BEAN) || (Build.VERSION.SDK_INT > VERSION_CODE_JELLY_BEAN_MR2)) { // No need to apply the fix return; } try { // Mix in the de...
static void function() throws SecurityException { if ((Build.VERSION.SDK_INT < VERSION_CODE_JELLY_BEAN) (Build.VERSION.SDK_INT > VERSION_CODE_JELLY_BEAN_MR2)) { return; } try { Class.forName(STR) .getMethod(STR, byte[].class) .invoke(null, generateSeed()); int bytesRead = (Integer) Class.forName( STR) .getMethod(STR, S...
/** * Applies the fix for OpenSSL PRNG having low entropy. Does nothing if the * fix is not needed. * * @throws SecurityException if the fix is needed but could not be applied. */
Applies the fix for OpenSSL PRNG having low entropy. Does nothing if the fix is not needed
applyOpenSSLFix
{ "repo_name": "9Cube-dpustula/andOTP", "path": "app/src/main/java/org/shadowice/flocke/andotp/Utilities/PRNGFixes.java", "license": "mit", "size": 12436 }
[ "android.os.Build", "java.io.IOException" ]
import android.os.Build; import java.io.IOException;
import android.os.*; import java.io.*;
[ "android.os", "java.io" ]
android.os; java.io;
1,585,193
private void logPlane(Plane plane) { logln("FLIGHT_ID: " + plane.getFlightId()); logln(plane.getPilot().getInformationAsFormattedText()); if (plane.getCoPilot().isPresent()) { logln(plane.getCoPilot().get().getInformationAsFormattedText()); } else { logln(Role...
void function(Plane plane) { logln(STR + plane.getFlightId()); logln(plane.getPilot().getInformationAsFormattedText()); if (plane.getCoPilot().isPresent()) { logln(plane.getCoPilot().get().getInformationAsFormattedText()); } else { logln(Role.CO_PILOT + STR); } if (plane.getCabinCrewList().isPresent()) { for (Person p ...
/** * Logs the planes information as formatted text to the example log. * * @param plane {@link Plane}-instance whose information is written to the log */
Logs the planes information as formatted text to the example log
logPlane
{ "repo_name": "WargulWB/javaExampleProject", "path": "src/main/java/jep/example/io/xml/XmlIoExample.java", "license": "mit", "size": 4272 }
[ "jep.example.io.xml.Person" ]
import jep.example.io.xml.Person;
import jep.example.io.xml.*;
[ "jep.example.io" ]
jep.example.io;
2,859,486
public void setAssetDepreciationDate (Timestamp AssetDepreciationDate);
void function (Timestamp AssetDepreciationDate);
/** Set Asset Depreciation Date. * Date of last depreciation */
Set Asset Depreciation Date. Date of last depreciation
setAssetDepreciationDate
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/I_I_FixedAsset.java", "license": "gpl-2.0", "size": 16713 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,848,367
protected Subscription findSubscription(final String topicArn, final String queueArn) { if(topicArn == null){ throw new IllegalArgumentException("topicArn cannot be null"); } if(queueArn == null){ throw new IllegalArgumentException("queueArn cannot be null"); } ListSubscriptionsByTopicResult result; ...
Subscription function(final String topicArn, final String queueArn) { if(topicArn == null){ throw new IllegalArgumentException(STR); } if(queueArn == null){ throw new IllegalArgumentException(STR); } ListSubscriptionsByTopicResult result; do { ListSubscriptionsByTopicRequest request = new ListSubscriptionsByTopicReques...
/** * Finds this subscription of the topic to the queue if it exists. * @param topicArn * @param queueArn * @return */
Finds this subscription of the topic to the queue if it exists
findSubscription
{ "repo_name": "john-hill/worker-utilities", "path": "src/main/java/org/sagebionetworks/workers/util/aws/message/MessageQueueImpl.java", "license": "mit", "size": 13474 }
[ "com.amazonaws.services.sns.model.ListSubscriptionsByTopicRequest", "com.amazonaws.services.sns.model.ListSubscriptionsByTopicResult", "com.amazonaws.services.sns.model.Subscription" ]
import com.amazonaws.services.sns.model.ListSubscriptionsByTopicRequest; import com.amazonaws.services.sns.model.ListSubscriptionsByTopicResult; import com.amazonaws.services.sns.model.Subscription;
import com.amazonaws.services.sns.model.*;
[ "com.amazonaws.services" ]
com.amazonaws.services;
1,790,834
public void unsubscribe(String source, Bundle data) throws IOException { if (data == null) { data = new Bundle(); } // Use the register servlet, with 'delete=true'. // Registration service returns a registration_id on success - or an error code. data.putString(EXT...
void function(String source, Bundle data) throws IOException { if (data == null) { data = new Bundle(); } data.putString(EXTRA_DELETE, "1"); subscribe(source, data); }
/** * Unsubscribe from a source to stop receiving messages from it. * <p> * This function is blocking and should not be called on the main thread. * * @param source to unsubscribe * @param data (optional) additional information. * @throws IOException if the request fails. */
Unsubscribe from a source to stop receiving messages from it. This function is blocking and should not be called on the main thread
unsubscribe
{ "repo_name": "scheib/chromium", "path": "components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GoogleCloudMessagingV2.java", "license": "bsd-3-clause", "size": 7690 }
[ "android.os.Bundle", "java.io.IOException" ]
import android.os.Bundle; import java.io.IOException;
import android.os.*; import java.io.*;
[ "android.os", "java.io" ]
android.os; java.io;
1,719,171
public File getIndexJar() { return xmlIndexJar; }
File function() { return xmlIndexJar; }
/** * Get the {@code index.jar} file that represents the local swap repo. */
Get the index.jar file that represents the local swap repo
getIndexJar
{ "repo_name": "CopperheadOS/platform_packages_apps_F-Droid", "path": "app/src/main/java/org/fdroid/fdroid/localrepo/LocalRepoManager.java", "license": "gpl-3.0", "size": 19216 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,769,354
void adjustBreaker(long delta) { if (this.breakerService != null) { CircuitBreaker breaker = this.breakerService.getBreaker(CircuitBreaker.REQUEST); if (this.checkBreaker == true) { // checking breaker means potentially tripping, but it doesn't // have...
void adjustBreaker(long delta) { if (this.breakerService != null) { CircuitBreaker breaker = this.breakerService.getBreaker(CircuitBreaker.REQUEST); if (this.checkBreaker == true) { if (delta > 0) { try { breaker.addEstimateBytesAndMaybeBreak(delta, STR); } catch (CircuitBreakingException e) { breaker.addWithoutBreakin...
/** * Adjust the circuit breaker with the given delta, if the delta is * negative, or checkBreaker is false, the breaker will be adjusted * without tripping */
Adjust the circuit breaker with the given delta, if the delta is negative, or checkBreaker is false, the breaker will be adjusted without tripping
adjustBreaker
{ "repo_name": "palecur/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/util/BigArrays.java", "license": "apache-2.0", "size": 28051 }
[ "org.elasticsearch.common.breaker.CircuitBreaker", "org.elasticsearch.common.breaker.CircuitBreakingException" ]
import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.breaker.CircuitBreakingException;
import org.elasticsearch.common.breaker.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
424,885
public static void startActivityForResult(@NonNull final Bundle extras, @NonNull final Activity activity, @NonNull final String pkg, @NonNull final String cls, ...
static void function(@NonNull final Bundle extras, @NonNull final Activity activity, @NonNull final String pkg, @NonNull final String cls, final int requestCode, @Nullable final Bundle options) { startActivityForResult(activity, extras, pkg, cls, requestCode, options); }
/** * Start the activity for result. * * @param extras The Bundle of extras to add to this intent. * @param activity The activity. * @param pkg The name of the package. * @param cls The name of the class. * @param requestCode if &gt;= 0, this code will be retur...
Start the activity for result
startActivityForResult
{ "repo_name": "didi/DoraemonKit", "path": "Android/dokit-util/src/main/java/com/didichuxing/doraemonkit/util/ActivityUtils.java", "license": "apache-2.0", "size": 90700 }
[ "android.app.Activity", "android.os.Bundle", "androidx.annotation.NonNull", "androidx.annotation.Nullable" ]
import android.app.Activity; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable;
import android.app.*; import android.os.*; import androidx.annotation.*;
[ "android.app", "android.os", "androidx.annotation" ]
android.app; android.os; androidx.annotation;
2,638,874
@Deprecated public KeyIterator getKeyIterator(InetSocketAddress address) throws MemcachedException, InterruptedException, TimeoutException;
KeyIterator function(InetSocketAddress address) throws MemcachedException, InterruptedException, TimeoutException;
/** * Get key iterator for special memcached server.You must known that the * iterator is a snapshot for memcached all keys,it is not real-time.The * 'stats cachedump" has length limitation,so iterator could not visit all * keys if you have many keys.Your application should not be dependent on ...
Get key iterator for special memcached server.You must known that the iterator is a snapshot for memcached all keys,it is not real-time.The 'stats cachedump" has length limitation,so iterator could not visit all keys if you have many keys.Your application should not be dependent on this feature
getKeyIterator
{ "repo_name": "springning/xmemcached", "path": "src/main/java/net/rubyeye/xmemcached/MemcachedClient.java", "license": "apache-2.0", "size": 60137 }
[ "java.net.InetSocketAddress", "java.util.concurrent.TimeoutException", "net.rubyeye.xmemcached.exception.MemcachedException" ]
import java.net.InetSocketAddress; import java.util.concurrent.TimeoutException; import net.rubyeye.xmemcached.exception.MemcachedException;
import java.net.*; import java.util.concurrent.*; import net.rubyeye.xmemcached.exception.*;
[ "java.net", "java.util", "net.rubyeye.xmemcached" ]
java.net; java.util; net.rubyeye.xmemcached;
2,909,086
public void setQueryContextService(final QueryContextService queryContextService) { this.queryContextService = queryContextService; }
void function(final QueryContextService queryContextService) { this.queryContextService = queryContextService; }
/** * Set a new value for the queryContextService property. * * @param queryContextService * the queryContextService to set */
Set a new value for the queryContextService property
setQueryContextService
{ "repo_name": "openfurther/further-open-core", "path": "fqe/fqe-ws/src/main/java/edu/utah/further/fqe/ws/FqeServiceRestImpl.java", "license": "apache-2.0", "size": 28626 }
[ "edu.utah.further.fqe.api.service.query.QueryContextService" ]
import edu.utah.further.fqe.api.service.query.QueryContextService;
import edu.utah.further.fqe.api.service.query.*;
[ "edu.utah.further" ]
edu.utah.further;
585,826
@SuppressWarnings( "unchecked" ) protected static List<String> receiveDebugBuffer( OutputStream outputStream, InputStream inputStream, LogChannelInterface log ) throws KettleException { List<String> stdOutStdErr = new ArrayList<String>(); boolean debug = log == null || log.isDebug(); ObjectMapper m...
@SuppressWarnings( STR ) static List<String> function( OutputStream outputStream, InputStream inputStream, LogChannelInterface log ) throws KettleException { List<String> stdOutStdErr = new ArrayList<String>(); boolean debug = log == null log.isDebug(); ObjectMapper mapper = new ObjectMapper(); Map<String, Object> comm...
/** * Std out and err are redirected to StringIO objects in the server. This * method retrieves the values of those buffers. * * @param outputStream the output stream to talk to the server on * @param inputStream the input stream to receive server responses from * @param log optional log ...
Std out and err are redirected to StringIO objects in the server. This method retrieves the values of those buffers
receiveDebugBuffer
{ "repo_name": "pentaho-labs/pentaho-cpython-plugin", "path": "src/org/pentaho/python/ServerUtils.java", "license": "apache-2.0", "size": 45122 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.codehaus.jackson.map.ObjectMapper", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.log...
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.codehaus.jackson.map.ObjectMapper; import org.pentaho.di.core.exception.KettleException...
import java.io.*; import java.util.*; import org.codehaus.jackson.map.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.logging.*;
[ "java.io", "java.util", "org.codehaus.jackson", "org.pentaho.di" ]
java.io; java.util; org.codehaus.jackson; org.pentaho.di;
2,441,973
protected final NamespaceService getNamespaceService() { return m_davHelper.getNamespaceService(); }
final NamespaceService function() { return m_davHelper.getNamespaceService(); }
/** * Convenience method to return the namespace service * * @return NamespaceService */
Convenience method to return the namespace service
getNamespaceService
{ "repo_name": "to2y/AlfrescoOnlineEditWebDAV", "path": "OnlineEditWebDAV/src/jp/aegif/alfresco/online_webdav/WebDAVMethod.java", "license": "gpl-2.0", "size": 46386 }
[ "org.alfresco.service.namespace.NamespaceService" ]
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.*;
[ "org.alfresco.service" ]
org.alfresco.service;
1,424,777
@Step List<ICell> cellsMatch(String regex);
List<ICell> cellsMatch(String regex);
/** * Get all Cells with values matches to searched regex */
Get all Cells with values matches to searched regex
cellsMatch
{ "repo_name": "bes422/JDI", "path": "Java/JDI/jdi-uitest-core/src/main/java/com/epam/jdi/uitests/core/interfaces/complex/tables/ITable.java", "license": "gpl-3.0", "size": 10479 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,836,125
// TODO(louiscryan): Not clear if we want to use this idiom for 'simple' stubs. public static <ReqT, RespT> Iterator<RespT> blockingServerStreamingCall( ClientCall<ReqT, RespT> call, ReqT param) { BlockingResponseStream<RespT> result = new BlockingResponseStream<RespT>(call); asyncUnaryRequestCall(cal...
static <ReqT, RespT> Iterator<RespT> function( ClientCall<ReqT, RespT> call, ReqT param) { BlockingResponseStream<RespT> result = new BlockingResponseStream<RespT>(call); asyncUnaryRequestCall(call, param, result.listener(), true); return result; }
/** * Executes a server-streaming call returning a blocking {@link Iterator} over the * response stream. * @return an iterator over the response stream. */
Executes a server-streaming call returning a blocking <code>Iterator</code> over the response stream
blockingServerStreamingCall
{ "repo_name": "aglne/grpc-java", "path": "stub/src/main/java/io/grpc/stub/ClientCalls.java", "license": "bsd-3-clause", "size": 13599 }
[ "io.grpc.ClientCall", "java.util.Iterator" ]
import io.grpc.ClientCall; import java.util.Iterator;
import io.grpc.*; import java.util.*;
[ "io.grpc", "java.util" ]
io.grpc; java.util;
1,366,827
String getMethodHelp() throws XmlRpcException;
String getMethodHelp() throws XmlRpcException;
/** <p>This method may be used to implement * {@link XmlRpcListableHandlerMapping#getMethodHelp(String)}. * Typically, the handler mapping will pick up the * matching handler, invoke its method * {@link #getMethodHelp()}, and return the result.</p> */
This method may be used to implement <code>XmlRpcListableHandlerMapping#getMethodHelp(String)</code>. Typically, the handler mapping will pick up the matching handler, invoke its method <code>#getMethodHelp()</code>, and return the result
getMethodHelp
{ "repo_name": "kralf/ros-android", "path": "src/xmlrpc/org/apache/xmlrpc/metadata/XmlRpcMetaDataHandler.java", "license": "apache-2.0", "size": 2393 }
[ "org.apache.xmlrpc.XmlRpcException" ]
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.*;
[ "org.apache.xmlrpc" ]
org.apache.xmlrpc;
1,220,143
private void deleteFiles(final Set<IPath> nameSet, IProgressMonitor monitor) throws CoreException { if (nameSet == null || nameSet.isEmpty()) { return; } Set<IContainer> subFolders = new HashSet<IContainer>(); for (IPath filePath : nameSet) { // G...
void function(final Set<IPath> nameSet, IProgressMonitor monitor) throws CoreException { if (nameSet == null nameSet.isEmpty()) { return; } Set<IContainer> subFolders = new HashSet<IContainer>(); for (IPath filePath : nameSet) { IFile currentFile = project.getFile(filePath); if (currentFile.exists()) { IContainer folde...
/** * Deletes a set of files from the file system, and also their parent * folders if those become empty during this process. * * @param nameSet set of file paths * @param monitor progress monitor * @throws CoreException if an error occurs */
Deletes a set of files from the file system, and also their parent folders if those become empty during this process
deleteFiles
{ "repo_name": "rondiplomatico/texlipse", "path": "source/net/sourceforge/texlipse/builder/OutputFileManager.java", "license": "epl-1.0", "size": 28451 }
[ "java.util.HashSet", "java.util.Set", "org.eclipse.core.resources.IContainer", "org.eclipse.core.resources.IFile", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.IPath", "org.eclipse.core.runtime.IProgressMonitor" ]
import java.util.HashSet; import java.util.Set; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor;
import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*;
[ "java.util", "org.eclipse.core" ]
java.util; org.eclipse.core;
1,573,733
public Set getUnsynchronizedFragments() { final ID3v2_4 total = new ID3v2_4(id3v2tag); final Set set = new HashSet(32); total.append(id3v1tag); total.append(lyrics3tag); total.append(filenameTag); total.append(id3v2tag); final ID3v2_4 id3v1 = new ID3v2_4(id3v1...
Set function() { final ID3v2_4 total = new ID3v2_4(id3v2tag); final Set set = new HashSet(32); total.append(id3v1tag); total.append(lyrics3tag); total.append(filenameTag); total.append(id3v2tag); final ID3v2_4 id3v1 = new ID3v2_4(id3v1tag); final ID3v2_4 lyrics3 = new ID3v2_4(lyrics3tag); final ID3v2_4 filename = new I...
/** * Returns a HashSet of unsynchronized fragments across all tags in this object. A fragment is unsynchronized if it * exists in two or more tags but is not equal across all of them. * * @return a HashSet of unsynchronized fragments */
Returns a HashSet of unsynchronized fragments across all tags in this object. A fragment is unsynchronized if it exists in two or more tags but is not equal across all of them
getUnsynchronizedFragments
{ "repo_name": "Gooair/groovesquid", "path": "src/main/java/org/farng/mp3/MP3File.java", "license": "gpl-3.0", "size": 48247 }
[ "java.util.HashSet", "java.util.Iterator", "java.util.Set", "org.farng.mp3.id3.AbstractID3v2", "org.farng.mp3.id3.AbstractID3v2Frame" ]
import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.farng.mp3.id3.AbstractID3v2; import org.farng.mp3.id3.AbstractID3v2Frame;
import java.util.*; import org.farng.mp3.id3.*;
[ "java.util", "org.farng.mp3" ]
java.util; org.farng.mp3;
256,959
public static ConfigFunctionsManager getConfigFunctionsManager() { return engine.getConfigFunctionsManager(); }
static ConfigFunctionsManager function() { return engine.getConfigFunctionsManager(); }
/** * Returns the Resource manager. * <p> * @return The Resource manager. */
Returns the Resource manager.
getConfigFunctionsManager
{ "repo_name": "whichonespink44/TerrainControl", "path": "common/src/main/java/com/khorn/terraincontrol/TerrainControl.java", "license": "mit", "size": 11264 }
[ "com.khorn.terraincontrol.configuration.ConfigFunctionsManager" ]
import com.khorn.terraincontrol.configuration.ConfigFunctionsManager;
import com.khorn.terraincontrol.configuration.*;
[ "com.khorn.terraincontrol" ]
com.khorn.terraincontrol;
1,593,944
static void accept( final AnnotationVisitor av, final String name, final Object value) { if (av != null) { if (value instanceof String[]) { String[] typeconst = (String[]) value; av.visitEnum(name, typeconst[0], typeconst[1]); ...
static void accept( final AnnotationVisitor av, final String name, final Object value) { if (av != null) { if (value instanceof String[]) { String[] typeconst = (String[]) value; av.visitEnum(name, typeconst[0], typeconst[1]); } else if (value instanceof AnnotationNode) { AnnotationNode an = (AnnotationNode) value; an....
/** * Makes the given visitor visit a given annotation value. * * @param av an annotation visitor. Maybe <tt>null</tt>. * @param name the value name. * @param value the actual value. */
Makes the given visitor visit a given annotation value
accept
{ "repo_name": "syntelos/gwtcc", "path": "src/com/google/gwt/dev/asm/tree/AnnotationNode.java", "license": "apache-2.0", "size": 6617 }
[ "com.google.gwt.dev.asm.AnnotationVisitor", "java.util.List" ]
import com.google.gwt.dev.asm.AnnotationVisitor; import java.util.List;
import com.google.gwt.dev.asm.*; import java.util.*;
[ "com.google.gwt", "java.util" ]
com.google.gwt; java.util;
1,652,479
public String parseIfMatches(String tag) throws ValidationException { Matcher matcher = detectionPattern().matcher(tag); if (!matcher.matches()) { return null; } String tagValue = matcher.group(1); String errorMsg = validator().apply(tagValue); if (errorMsg != null) { ...
String function(String tag) throws ValidationException { Matcher matcher = detectionPattern().matcher(tag); if (!matcher.matches()) { return null; } String tagValue = matcher.group(1); String errorMsg = validator().apply(tagValue); if (errorMsg != null) { throw new ValidationException(tagValue, errorMsg); } return tagV...
/** * Returns the parsed value from a tag, if this {@link ParseableRequirement} detects that it is * responsible for it, otherwise returns {@code null}. * * @throws ValidationException if the value parsed out of the tag doesn't pass the validator. */
Returns the parsed value from a tag, if this <code>ParseableRequirement</code> detects that it is responsible for it, otherwise returns null
parseIfMatches
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java", "license": "apache-2.0", "size": 9201 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.ImmutableMap", "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.regex.Matcher; import java.util.regex.Pattern;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.regex.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,243,006
private PathEntity createEntityPathTo(Entity par1Entity, double par2, double par4, double par6, float par8) { this.path.clearPath(); this.pointMap.clearMap(); boolean flag = this.isPathingInWater; int i = MathHelper.floor_double(par1Entity.boundingBox.minY + 0.5D); if (t...
PathEntity function(Entity par1Entity, double par2, double par4, double par6, float par8) { this.path.clearPath(); this.pointMap.clearMap(); boolean flag = this.isPathingInWater; int i = MathHelper.floor_double(par1Entity.boundingBox.minY + 0.5D); if (this.canEntityDrown && par1Entity.isInWater()) { i = (int)par1Entity...
/** * Internal implementation of creating a path from an entity to a point */
Internal implementation of creating a path from an entity to a point
createEntityPathTo
{ "repo_name": "HATB0T/RuneCraftery", "path": "forge/mcp/src/minecraft/net/minecraft/pathfinding/PathFinder.java", "license": "lgpl-3.0", "size": 14801 }
[ "net.minecraft.block.Block", "net.minecraft.entity.Entity", "net.minecraft.util.MathHelper" ]
import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper;
import net.minecraft.block.*; import net.minecraft.entity.*; import net.minecraft.util.*;
[ "net.minecraft.block", "net.minecraft.entity", "net.minecraft.util" ]
net.minecraft.block; net.minecraft.entity; net.minecraft.util;
936,530
private static int version() { System.err.println("dx version " + Version.VERSION); //todo fix it return 0; }
static int function() { System.err.println(STR + Version.VERSION); return 0; }
/** * Prints the version message. */
Prints the version message
version
{ "repo_name": "tranleduy2000/javaide", "path": "dx/src/main/java/com/duy/dx/command/Main.java", "license": "gpl-3.0", "size": 7850 }
[ "com.duy.dx.Version" ]
import com.duy.dx.Version;
import com.duy.dx.*;
[ "com.duy.dx" ]
com.duy.dx;
1,939,723
private Map retrieveDocumentActions(String cashManagementDocId, TransactionalDocumentPresentationController presentationController, TransactionalDocumentAuthorizer docAuthorizer) { Map documentActionsMap = null; try { final CashManagementDocument cmDoc = (CashManagementDocument)SpringCon...
Map function(String cashManagementDocId, TransactionalDocumentPresentationController presentationController, TransactionalDocumentAuthorizer docAuthorizer) { Map documentActionsMap = null; try { final CashManagementDocument cmDoc = (CashManagementDocument)SpringContext.getBean(DocumentService.class).getByDocumentHeader...
/** * Retrieves the document actions for the given cash management document * @param cashManagementDocId the id of the cash management document to check * @param presentationController the presentation controller of the cash management document * @param docAuthorizer the cash management document aut...
Retrieves the document actions for the given cash management document
retrieveDocumentActions
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/fp/document/web/struts/DepositWizardAction.java", "license": "apache-2.0", "size": 49629 }
[ "java.util.Map", "java.util.Set", "org.kuali.kfs.fp.document.CashManagementDocument", "org.kuali.kfs.sys.context.SpringContext", "org.kuali.rice.kew.api.exception.WorkflowException", "org.kuali.rice.kns.document.authorization.TransactionalDocumentAuthorizer", "org.kuali.rice.kns.document.authorization.T...
import java.util.Map; import java.util.Set; import org.kuali.kfs.fp.document.CashManagementDocument; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.kns.document.authorization.TransactionalDocumentAuthorizer; import org.kuali.rice.kns.docu...
import java.util.*; import org.kuali.kfs.fp.document.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.kns.document.authorization.*; import org.kuali.rice.krad.service.*; import org.kuali.rice.krad.util.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
2,086,634
@Override public void addAboutItems(JMenu m, Application app, @Nullable View v) { ActionMap am = app.getActionMap(v); Action a; if (null != (a = am.get(AboutAction.ID))) { add(m,a); } }
void function(JMenu m, Application app, @Nullable View v) { ActionMap am = app.getActionMap(v); Action a; if (null != (a = am.get(AboutAction.ID))) { add(m,a); } }
/** Adds items for the following actions to the menu: * <ul> * <li>{@link AboutAction}</li> * </ul> */
Adds items for the following actions to the menu: <code>AboutAction</code>
addAboutItems
{ "repo_name": "runqingz/umple", "path": "Umplificator/UmplifiedProjects/jhotdraw7/src/main/java/org/jhotdraw/app/DefaultMenuBuilder.java", "license": "mit", "size": 10691 }
[ "edu.umd.cs.findbugs.annotations.Nullable", "javax.swing.Action", "javax.swing.ActionMap", "javax.swing.JMenu", "org.jhotdraw.app.action.app.AboutAction" ]
import edu.umd.cs.findbugs.annotations.Nullable; import javax.swing.Action; import javax.swing.ActionMap; import javax.swing.JMenu; import org.jhotdraw.app.action.app.AboutAction;
import edu.umd.cs.findbugs.annotations.*; import javax.swing.*; import org.jhotdraw.app.action.app.*;
[ "edu.umd.cs", "javax.swing", "org.jhotdraw.app" ]
edu.umd.cs; javax.swing; org.jhotdraw.app;
2,700,681
private void invokeConfigurationMethod(Object targetInstance, ITestNGMethod tm, Object[] params, ITestResult testResult) throws InvocationTargetException, IllegalAccessException { // Ma...
void function(Object targetInstance, ITestNGMethod tm, Object[] params, ITestResult testResult) throws InvocationTargetException, IllegalAccessException { tm.setId(ThreadUtil.currentThreadInfo()); { InvokedMethod invokedMethod= new InvokedMethod(targetInstance, tm, System.currentTimeMillis(), testResult); runInvokedMet...
/** * Effectively invokes a configuration method on all passed in instances. * TODO: Should change this method to be more like invokeMethod() so that we can * handle calls to {@code IInvokedMethodListener} better. * * @param targetInstance the instance to invoke the configuration method on * @param tm...
Effectively invokes a configuration method on all passed in instances. handle calls to IInvokedMethodListener better
invokeConfigurationMethod
{ "repo_name": "akozlova/testng", "path": "src/main/java/org/testng/internal/Invoker.java", "license": "apache-2.0", "size": 68558 }
[ "java.lang.reflect.InvocationTargetException", "org.testng.IConfigurable", "org.testng.ITestNGMethod", "org.testng.ITestResult", "org.testng.Reporter", "org.testng.TestNGException", "org.testng.internal.thread.ThreadUtil" ]
import java.lang.reflect.InvocationTargetException; import org.testng.IConfigurable; import org.testng.ITestNGMethod; import org.testng.ITestResult; import org.testng.Reporter; import org.testng.TestNGException; import org.testng.internal.thread.ThreadUtil;
import java.lang.reflect.*; import org.testng.*; import org.testng.internal.thread.*;
[ "java.lang", "org.testng", "org.testng.internal" ]
java.lang; org.testng; org.testng.internal;
375,519
@SuppressWarnings("rawtypes") private MigrationInformation inheritUnmodifiedFields(Migration migration, MigrationInformation migrationInfo) { String identifier = migrationInfo.getIdentifier(); if (identifier == null) { identifier = migration.getMigrationSource() != null ? migration.g...
@SuppressWarnings(STR) MigrationInformation function(Migration migration, MigrationInformation migrationInfo) { String identifier = migrationInfo.getIdentifier(); if (identifier == null) { identifier = migration.getMigrationSource() != null ? migration.getMigrationSource().getDefaultIdentifier() .getIdentifier() : migr...
/** * Fills in migration modification information object with data inherited from previous version of migration. * * @param migration * migration before modification. * @param migrationInfo * migration modification information. * @return filled in migration modi...
Fills in migration modification information object with data inherited from previous version of migration
inheritUnmodifiedFields
{ "repo_name": "psnc-dl/darceo", "path": "wrdz/wrdz-zmd/business/src/main/java/pl/psnc/synat/wrdz/zmd/object/migration/ObjectMigrationManagerBean.java", "license": "gpl-3.0", "size": 24035 }
[ "pl.psnc.synat.wrdz.zmd.entity.object.migration.Migration", "pl.psnc.synat.wrdz.zmd.entity.types.MigrationType", "pl.psnc.synat.wrdz.zmd.input.MigrationInformation" ]
import pl.psnc.synat.wrdz.zmd.entity.object.migration.Migration; import pl.psnc.synat.wrdz.zmd.entity.types.MigrationType; import pl.psnc.synat.wrdz.zmd.input.MigrationInformation;
import pl.psnc.synat.wrdz.zmd.entity.object.migration.*; import pl.psnc.synat.wrdz.zmd.entity.types.*; import pl.psnc.synat.wrdz.zmd.input.*;
[ "pl.psnc.synat" ]
pl.psnc.synat;
594,525
public void deleteRefactoringDescriptors(final RefactoringDescriptorProxy[] proxies, final IRefactoringDescriptorDeleteQuery query, IProgressMonitor monitor) throws CoreException { Assert.isNotNull(proxies); Assert.isNotNull(query); if (monitor == null) monitor= new NullProgressMonitor(); try { monitor...
void function(final RefactoringDescriptorProxy[] proxies, final IRefactoringDescriptorDeleteQuery query, IProgressMonitor monitor) throws CoreException { Assert.isNotNull(proxies); Assert.isNotNull(query); if (monitor == null) monitor= new NullProgressMonitor(); try { monitor.beginTask(RefactoringCoreMessages.Refactori...
/** * Deletes the specified refactoring descriptors from their associated * refactoring histories. * * @param proxies * the refactoring descriptor proxies * @param query * the refactoring descriptor delete query to use * @param monitor * the progress monitor to use, or...
Deletes the specified refactoring descriptors from their associated refactoring histories
deleteRefactoringDescriptors
{ "repo_name": "dhuebner/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ltk-core-refactoring/src/main/java/org/eclipse/ltk/internal/core/refactoring/history/RefactoringHistoryService.java", "license": "epl-1.0", "size": 40828 }
[ "java.util.HashSet", "java.util.Set", "org.eclipse.core.runtime.Assert", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.core.runtime.NullProgressMonitor", "org.eclipse.core.runtime.SubProgressMonitor", "org.eclipse.ltk.core.refactoring.RefactoringDe...
import java.util.HashSet; import java.util.Set; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.ltk.core.re...
import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.ltk.core.refactoring.*; import org.eclipse.ltk.core.refactoring.history.*; import org.eclipse.ltk.internal.core.refactoring.*;
[ "java.util", "org.eclipse.core", "org.eclipse.ltk" ]
java.util; org.eclipse.core; org.eclipse.ltk;
2,452,427
public List<Organization> getOrganizationsForFormViewer() throws Exception { List<Organization> orgs = organizationBlo.getOrganizations(); for (Organization org : orgs) { int[] types = {Folder.FORM_FOLDER, Folder.BASIC_DATA_FOLDER, Folder.REFERENCE_DATA_FOLDER, Folder...
List<Organization> function() throws Exception { List<Organization> orgs = organizationBlo.getOrganizations(); for (Organization org : orgs) { int[] types = {Folder.FORM_FOLDER, Folder.BASIC_DATA_FOLDER, Folder.REFERENCE_DATA_FOLDER, Folder.RELEASED_FORM_FOLDER,}; wfFolderBlo.getChildrenFoldersForOrgViewer(org, types);...
/** * Gets all organizations for form explorer tree in data & form perspective. * These organizations include all form folders that may contain forms and * the forms. * * @return * @throws Exception * @date 2011-11-2 下午09:31:58 */
Gets all organizations for form explorer tree in data & form perspective. These organizations include all form folders that may contain forms and the forms
getOrganizationsForFormViewer
{ "repo_name": "CloudBPM/SwinFlowCloud-CloudSide", "path": "springboot_api/src/main/java/com/cloudibpm/blo/form/FormBlo.java", "license": "apache-2.0", "size": 6719 }
[ "com.cloudibpm.core.TreeNode", "com.cloudibpm.core.folder.Folder", "com.cloudibpm.core.organization.Organization", "java.util.List" ]
import com.cloudibpm.core.TreeNode; import com.cloudibpm.core.folder.Folder; import com.cloudibpm.core.organization.Organization; import java.util.List;
import com.cloudibpm.core.*; import com.cloudibpm.core.folder.*; import com.cloudibpm.core.organization.*; import java.util.*;
[ "com.cloudibpm.core", "java.util" ]
com.cloudibpm.core; java.util;
2,311,638
// private static final AudioFormat.Encoding[] NO_ENCODING = {}; // private static final AudioFormat.Encoding[] PCM_ENCODING = { // AudioFormat.Encoding.PCM_SIGNED }; // private static final AudioFormat.Encoding[] FLAC_ENCODING = { // FlacEncoding.FLAC }; // private static final AudioFormat.Encoding[...
AudioFormat.Encoding[] function() { if (HAS_ENCODING) { AudioFormat.Encoding[] encodings = { FlacEncoding.FLAC, AudioFormat.Encoding.PCM_SIGNED }; return encodings; } else { AudioFormat.Encoding[] encodings = { FlacEncoding.FLAC }; return encodings; } }
/** * Obtains the set of source format encodings from which format conversion * services are provided by this provider. * * @return array of source format encodings. The array will always have a * length of at least 1. */
Obtains the set of source format encodings from which format conversion services are provided by this provider
getSourceEncodings
{ "repo_name": "XtremeMP-Project/xtrememp-fx", "path": "xtrememp-audio-spi-flac/src/org/kc7bfi/jflac/sound/spi/FlacFormatConversionProvider.java", "license": "bsd-3-clause", "size": 11201 }
[ "javax.sound.sampled.AudioFormat" ]
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.*;
[ "javax.sound" ]
javax.sound;
1,428,816
@Override public java.math.BigDecimal getWriteOffAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt); if (bd == null) return Env.ZERO; return bd; }
java.math.BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt); if (bd == null) return Env.ZERO; return bd; }
/** Get Write-off Amount. @return Amount to write-off */
Get Write-off Amount
getWriteOffAmt
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_C_Payment.java", "license": "gpl-2.0", "size": 53379 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
104,565
public HTable truncateTable(byte [] tableName) throws IOException { HTable table = new HTable(getConfiguration(), tableName); Scan scan = new Scan(); ResultScanner resScan = table.getScanner(scan); for(Result res : resScan) { Delete del = new Delete(res.getRow()); table.delete(del); } ...
HTable function(byte [] tableName) throws IOException { HTable table = new HTable(getConfiguration(), tableName); Scan scan = new Scan(); ResultScanner resScan = table.getScanner(scan); for(Result res : resScan) { Delete del = new Delete(res.getRow()); table.delete(del); } resScan = table.getScanner(scan); return table...
/** * Provide an existing table name to truncate * @param tableName existing table * @return HTable to that new table * @throws IOException */
Provide an existing table name to truncate
truncateTable
{ "repo_name": "bcopeland/hbase-thrift", "path": "src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 58875 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Delete", "org.apache.hadoop.hbase.client.HTable", "org.apache.hadoop.hbase.client.Result", "org.apache.hadoop.hbase.client.ResultScanner", "org.apache.hadoop.hbase.client.Scan" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
341,162
public static void main(String[] args) throws Exception { int res = ToolRunner.run(new Configuration(), new LoadGenerator(), args); System.exit(res); }
static void function(String[] args) throws Exception { int res = ToolRunner.run(new Configuration(), new LoadGenerator(), args); System.exit(res); }
/** Main program * * @param args command line arguments * @throws Exception */
Main program
main
{ "repo_name": "Shmuma/hadoop", "path": "src/test/org/apache/hadoop/fs/loadGenerator/LoadGenerator.java", "license": "apache-2.0", "size": 17799 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.util.ToolRunner" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.util.ToolRunner;
import org.apache.hadoop.conf.*; import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,251,634
void setNewDepthMax(@NonNegative int depthMax);
void setNewDepthMax(@NonNegative int depthMax);
/** * Set the depth max of the outer ring. * * @param depthMax the new maximum depth */
Set the depth max of the outer ring
setNewDepthMax
{ "repo_name": "sirixdb/sirix", "path": "bundles/sirix-gui/src/main/java/org/sirix/gui/view/model/interfaces/Model.java", "license": "bsd-3-clause", "size": 5803 }
[ "org.checkerframework.checker.index.qual.NonNegative" ]
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.index.qual.*;
[ "org.checkerframework.checker" ]
org.checkerframework.checker;
1,496,235
@Override public AggIterOutcome outputCurrentBatch() { // Handle the case of an EMIT with an empty batch if ( handleEmit && ( batchHolders == null || batchHolders[0].size() == 0 ) ) { lastBatchOutputCount = 0; // empty allocateOutgoing(0); for (VectorWrapper<?> v : outgoing) { v.g...
AggIterOutcome function() { if ( handleEmit && ( batchHolders == null batchHolders[0].size() == 0 ) ) { lastBatchOutputCount = 0; allocateOutgoing(0); for (VectorWrapper<?> v : outgoing) { v.getValueVector().getMutator().setValueCount(0); } outgoing.getContainer().setRecordCount(0); this.outcome = IterOutcome.EMIT; han...
/** * Output the next batch from partition "nextPartitionToReturn" * * @return iteration outcome (e.g., OK, NONE ...) */
Output the next batch from partition "nextPartitionToReturn"
outputCurrentBatch
{ "repo_name": "ppadma/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java", "license": "apache-2.0", "size": 69912 }
[ "java.io.IOException", "java.util.ArrayList", "org.apache.drill.common.exceptions.UserException", "org.apache.drill.exec.record.RecordBatch", "org.apache.drill.exec.record.RecordBatchSizer", "org.apache.drill.exec.record.VectorWrapper" ]
import java.io.IOException; import java.util.ArrayList; import org.apache.drill.common.exceptions.UserException; import org.apache.drill.exec.record.RecordBatch; import org.apache.drill.exec.record.RecordBatchSizer; import org.apache.drill.exec.record.VectorWrapper;
import java.io.*; import java.util.*; import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.record.*;
[ "java.io", "java.util", "org.apache.drill" ]
java.io; java.util; org.apache.drill;
1,135,076
@Override public void onPlaybackStart() { if (!mSession.isActive()) { mSession.setActive(true); } mDelayedStopHandler.removeCallbacksAndMessages(null); // The service needs to continue running even after the bound client (usually a // MediaController) discon...
void function() { if (!mSession.isActive()) { mSession.setActive(true); } mDelayedStopHandler.removeCallbacksAndMessages(null); startService(new Intent(getApplicationContext(), MusicService.class)); }
/** * Callback method called from PlaybackManager whenever the music is about to play. */
Callback method called from PlaybackManager whenever the music is about to play
onPlaybackStart
{ "repo_name": "cuongnd/test_pro", "path": "android_application/bho886/soundplayer/src/main/java/com/example/android/uamp/MusicService.java", "license": "gpl-2.0", "size": 19641 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
340,598
@Deprecated public Site getSite() { return getNonPersistentSite(); }
Site function() { return getNonPersistentSite(); }
/** * Returns a Site instance that is not attached to any Hibernate session * @return * @deprecated this has been changed to {@link #getNonPersistentSite()} to explicitly indicate that the site * being returned is not attached to a Hibernate session */
Returns a Site instance that is not attached to any Hibernate session
getSite
{ "repo_name": "caosg/BroadleafCommerce", "path": "common/src/main/java/org/broadleafcommerce/common/web/BroadleafRequestContext.java", "license": "apache-2.0", "size": 26089 }
[ "org.broadleafcommerce.common.site.domain.Site" ]
import org.broadleafcommerce.common.site.domain.Site;
import org.broadleafcommerce.common.site.domain.*;
[ "org.broadleafcommerce.common" ]
org.broadleafcommerce.common;
936,843
ExclusiveContentRepository forRepository(Factory<? extends ArtifactRepository> repository);
ExclusiveContentRepository forRepository(Factory<? extends ArtifactRepository> repository);
/** * Declares the repository * @param repository the repository for which we declare exclusive content * @return this repository descriptor */
Declares the repository
forRepository
{ "repo_name": "gradle/gradle", "path": "subprojects/core-api/src/main/java/org/gradle/api/artifacts/repositories/ExclusiveContentRepository.java", "license": "apache-2.0", "size": 1841 }
[ "org.gradle.internal.Factory" ]
import org.gradle.internal.Factory;
import org.gradle.internal.*;
[ "org.gradle.internal" ]
org.gradle.internal;
2,433,777
protected void translateFromAbsoluteToLayoutRelative(Translatable t) { IFigure figure = getLayoutContainer(); figure.translateToRelative(t); figure.translateFromParent(t); Point negatedLayoutOrigin = getLayoutOrigin().getNegated(); t.performTranslate(negatedLayoutOrigin.x, negatedLayoutOrigin.y); } ...
void function(Translatable t) { IFigure figure = getLayoutContainer(); figure.translateToRelative(t); figure.translateFromParent(t); Point negatedLayoutOrigin = getLayoutOrigin().getNegated(); t.performTranslate(negatedLayoutOrigin.x, negatedLayoutOrigin.y); }
/** * Translates a {@link Translatable} in absolute coordinates to be * layout-relative, i.e. relative to the {@link #getLayoutContainer()}'s * origin, which is obtained via {@link #getLayoutOrigin()}. * * @param t * the Translatable in absolute coordinates to be translated to * ...
Translates a <code>Translatable</code> in absolute coordinates to be layout-relative, i.e. relative to the <code>#getLayoutContainer()</code>'s origin, which is obtained via <code>#getLayoutOrigin()</code>
translateFromAbsoluteToLayoutRelative
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "rap/org.eclipse.gef/src/org/eclipse/gef/editpolicies/LayoutEditPolicy.java", "license": "lgpl-2.1", "size": 15680 }
[ "org.eclipse.draw2d.IFigure", "org.eclipse.draw2d.geometry.Point", "org.eclipse.draw2d.geometry.Translatable" ]
import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Translatable;
import org.eclipse.draw2d.*; import org.eclipse.draw2d.geometry.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
2,201,050
public void testSequentialUpdatesNoConflicts() throws Exception { IgniteEx ignite0 = startGrid(0); final IgniteEx ignite1 = startGrid(1); final String intFieldName = "f1";
void function() throws Exception { IgniteEx ignite0 = startGrid(0); final IgniteEx ignite1 = startGrid(1); final String intFieldName = "f1";
/** * Verifies that all sequential updates that don't introduce any conflicts are accepted and observed by all nodes. */
Verifies that all sequential updates that don't introduce any conflicts are accepted and observed by all nodes
testSequentialUpdatesNoConflicts
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java", "license": "apache-2.0", "size": 16349 }
[ "org.apache.ignite.internal.IgniteEx" ]
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,563,090
@Test public void testReplicatedRegionPersistentWanGateway_restartSenderWithCleanQueues_expectNoEventsReceived() { Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1)); Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort)); create...
void function() { Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1)); Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort)); createCacheInVMs(nyPort, vm2, vm3); createReceiverInVMs(vm2, vm3); createCacheInVMs(lnPort, vm4, vm5, vm6, vm7); String ...
/** * Enable persistence for GatewaySender, stop the sender and start it with clean-queues option. * Check if the remote site receives all the event. */
Enable persistence for GatewaySender, stop the sender and start it with clean-queues option. Check if the remote site receives all the event
testReplicatedRegionPersistentWanGateway_restartSenderWithCleanQueues_expectNoEventsReceived
{ "repo_name": "davinash/geode", "path": "geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/serial/SerialWANPersistenceEnabledGatewaySenderDUnitTest.java", "license": "apache-2.0", "size": 26874 }
[ "org.apache.geode.internal.cache.wan.WANTestBase", "org.apache.geode.test.dunit.AsyncInvocation", "org.junit.Assert" ]
import org.apache.geode.internal.cache.wan.WANTestBase; import org.apache.geode.test.dunit.AsyncInvocation; import org.junit.Assert;
import org.apache.geode.internal.cache.wan.*; import org.apache.geode.test.dunit.*; import org.junit.*;
[ "org.apache.geode", "org.junit" ]
org.apache.geode; org.junit;
206,732
private void initReportPanel() { reportInitJP= new JPanel(); reportInitJP.setLayout(new MigLayout("align 50% 50%")); reportInitJP.setBackground(Color.WHITE); reportStartLabel= new JLabel("Choose a patient to start a pharmacogenomic analysis."); reportStartLabel.setFont(new Font(reportStartLabel.getFont(...
void function() { reportInitJP= new JPanel(); reportInitJP.setLayout(new MigLayout(STR)); reportInitJP.setBackground(Color.WHITE); reportStartLabel= new JLabel(STR); reportStartLabel.setFont(new Font(reportStartLabel.getFont().getName(), Font.PLAIN, 14)); reportStartLabel.setForeground(Color.DARK_GRAY); reportInitJP.ad...
/** * Initialize the report panel. */
Initialize the report panel
initReportPanel
{ "repo_name": "ronammar/pharmacogenomics", "path": "src/pgx/PGXPanel.java", "license": "lgpl-3.0", "size": 37951 }
[ "java.awt.Color", "java.awt.Font", "javax.swing.BorderFactory", "javax.swing.JLabel", "javax.swing.JPanel", "javax.swing.JScrollPane", "net.miginfocom.swing.MigLayout" ]
import java.awt.Color; import java.awt.Font; import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import net.miginfocom.swing.MigLayout;
import java.awt.*; import javax.swing.*; import net.miginfocom.swing.*;
[ "java.awt", "javax.swing", "net.miginfocom.swing" ]
java.awt; javax.swing; net.miginfocom.swing;
976,859
@Nullable public CacheConfiguration getMetaCacheConfiguration() { return metaCacheCfg; }
@Nullable CacheConfiguration function() { return metaCacheCfg; }
/** * Cache config to store IGFS meta information. * * @return Cache configuration object. */
Cache config to store IGFS meta information
getMetaCacheConfiguration
{ "repo_name": "alexzaitzev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java", "license": "apache-2.0", "size": 30260 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
1,502,035
public void setLastUpdated(Date lastUpdated) { this.lastUpdated = lastUpdated; }
void function(Date lastUpdated) { this.lastUpdated = lastUpdated; }
/** * When the account info was last updated. * * @param lastUpdated When the account info was last updated. */
When the account info was last updated
setLastUpdated
{ "repo_name": "stoicflame/ofx4j", "path": "src/main/java/com/webcohesion/ofx4j/domain/data/signup/AccountInfoRequest.java", "license": "apache-2.0", "size": 1442 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,718,261
public boolean contains(Object mapEntry) { if (!(mapEntry instanceof Map.Entry)) { return false; } DataCursor cursor = null; try { cursor = new DataCursor(view, false); Map.Entry entry = (Map.Entry) mapEntry; OperationStatus status = ...
boolean function(Object mapEntry) { if (!(mapEntry instanceof Map.Entry)) { return false; } DataCursor cursor = null; try { cursor = new DataCursor(view, false); Map.Entry entry = (Map.Entry) mapEntry; OperationStatus status = cursor.findBoth(entry.getKey(), entry.getValue(), false); return (status == OperationStatus.S...
/** * Returns true if this set contains the specified element. * This method conforms to the {@link Set#contains} interface. * * @param mapEntry is a {@link java.util.Map.Entry} instance to be checked. * * @return true if the key-value pair is present in the set, or false if * the map...
Returns true if this set contains the specified element. This method conforms to the <code>Set#contains</code> interface
contains
{ "repo_name": "prat0318/dbms", "path": "mini_dbms/je-5.0.103/src/com/sleepycat/collections/StoredEntrySet.java", "license": "mit", "size": 7094 }
[ "com.sleepycat.je.OperationStatus", "java.util.Map" ]
import com.sleepycat.je.OperationStatus; import java.util.Map;
import com.sleepycat.je.*; import java.util.*;
[ "com.sleepycat.je", "java.util" ]
com.sleepycat.je; java.util;
2,363,253
private Map<String, TaskObject> getMap(String map) { return requestStatusMap.get(map); }
Map<String, TaskObject> function(String map) { return requestStatusMap.get(map); }
/** * Helper method to get a request status map given the name. */
Helper method to get a request status map given the name
getMap
{ "repo_name": "williamchengit/TestRepo", "path": "solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java", "license": "apache-2.0", "size": 52146 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,148,869
public OffsetDateTime getLastUpdated() { return this.lastUpdated; }
OffsetDateTime function() { return this.lastUpdated; }
/** * Get the lastUpdated property: The last updated timestamp for the pipeline run event in ISO8601 format. * * @return the lastUpdated value. */
Get the lastUpdated property: The last updated timestamp for the pipeline run event in ISO8601 format
getLastUpdated
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-analytics-synapse-artifacts/src/main/java/com/azure/analytics/synapse/artifacts/models/PipelineRun.java", "license": "mit", "size": 6489 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
897,313
@Override public synchronized void save() { if(areStatsDisabled()){ return; } if (BulkChange.contains(this)) return; File userFolder = getUserFolder(); if (userFolder == null) { return; } ...
synchronized void function() { if(areStatsDisabled()){ return; } if (BulkChange.contains(this)) return; File userFolder = getUserFolder(); if (userFolder == null) { return; } XmlFile configFile = getConfigFile(userFolder); try { configFile.write(this); SaveableListener.fireOnChange(this, configFile); } catch (IOExcepti...
/** * Saves the configuration info to the disk. */
Saves the configuration info to the disk
save
{ "repo_name": "patbos/jenkins", "path": "core/src/main/java/jenkins/security/apitoken/ApiTokenStats.java", "license": "mit", "size": 11361 }
[ "hudson.model.listeners.SaveableListener", "java.io.File", "java.io.IOException", "java.util.logging.Level" ]
import hudson.model.listeners.SaveableListener; import java.io.File; import java.io.IOException; import java.util.logging.Level;
import hudson.model.listeners.*; import java.io.*; import java.util.logging.*;
[ "hudson.model.listeners", "java.io", "java.util" ]
hudson.model.listeners; java.io; java.util;
1,948,237
public void readMetaData(Transfer transfer) throws IOException { dataType = transfer.readInt(); precision = transfer.readLong(); scale = transfer.readInt(); nullable = transfer.readInt(); }
void function(Transfer transfer) throws IOException { dataType = transfer.readInt(); precision = transfer.readLong(); scale = transfer.readInt(); nullable = transfer.readInt(); }
/** * Write the parameter meta data from the transfer object. * * @param transfer the transfer object */
Write the parameter meta data from the transfer object
readMetaData
{ "repo_name": "ferquies/2dam", "path": "AD/Tema 2/h2/src/main/org/h2/expression/ParameterRemote.java", "license": "gpl-3.0", "size": 2567 }
[ "java.io.IOException", "org.h2.value.Transfer" ]
import java.io.IOException; import org.h2.value.Transfer;
import java.io.*; import org.h2.value.*;
[ "java.io", "org.h2.value" ]
java.io; org.h2.value;
1,994,587
public RequestedContentTypeResolverBuilder mediaType(String key, MediaType mediaType) { this.mediaTypes.put(key, mediaType); return this; }
RequestedContentTypeResolverBuilder function(String key, MediaType mediaType) { this.mediaTypes.put(key, mediaType); return this; }
/** * Alternative to {@link #mediaTypes} to add a single mapping. */
Alternative to <code>#mediaTypes</code> to add a single mapping
mediaType
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.web.reactive/org/springframework/web/reactive/accept/RequestedContentTypeResolverBuilder.java", "license": "mit", "size": 8479 }
[ "org.springframework.http.MediaType" ]
import org.springframework.http.MediaType;
import org.springframework.http.*;
[ "org.springframework.http" ]
org.springframework.http;
1,807,980
public void setReadOnly(boolean readOnly) throws SQLException { this.conn.setReadOnly(readOnly); }
void function(boolean readOnly) throws SQLException { this.conn.setReadOnly(readOnly); }
/** * * Puts this connection in read-only mode as a hint to enable * * database optimizations. * * * * <P> * <B>Note: </B> This method cannot be called while in the * * middle of a transaction. * * * * @param readOnly * true enables read-only mode; false disables * ...
Puts this connection in read-only mode as a hint to enable database optimizations. Note: This method cannot be called while in the middle of a transaction
setReadOnly
{ "repo_name": "idega/com.idega.core", "path": "src/java/com/idega/data/DatastoreConnection.java", "license": "gpl-3.0", "size": 22381 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
171,626
private void showArrow(int whichArrow, int requestedX) { final View showArrow = (whichArrow == R.id.arrow_up) ? mArrowUp : mArrowDown; final View hideArrow = (whichArrow == R.id.arrow_up) ? mArrowDown : mArrowUp; final int arrowWidth = mArrowUp.getMeasuredWidth(); showArrow.setVisib...
void function(int whichArrow, int requestedX) { final View showArrow = (whichArrow == R.id.arrow_up) ? mArrowUp : mArrowDown; final View hideArrow = (whichArrow == R.id.arrow_up) ? mArrowDown : mArrowUp; final int arrowWidth = mArrowUp.getMeasuredWidth(); showArrow.setVisibility(View.VISIBLE); ViewGroup.MarginLayoutPar...
/** * Show arrow * * @param whichArrow arrow type resource id * @param requestedX distance from left screen */
Show arrow
showArrow
{ "repo_name": "kshark27/UltraExplorer", "path": "filebrowserULTRA/src/com/mirrorlabs/quickaction/QuickAction.java", "license": "gpl-3.0", "size": 9568 }
[ "android.view.View", "android.view.ViewGroup" ]
import android.view.View; import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
1,647,659
public void setMenuItemLoggerPanel(JCheckBoxMenuItem menuItemLoggerPanel) { this.menuItemLoggerPanel = menuItemLoggerPanel; }
void function(JCheckBoxMenuItem menuItemLoggerPanel) { this.menuItemLoggerPanel = menuItemLoggerPanel; }
/** * Set the menu item LoggerPanel. * @param menuItemLoggerPanel The menu item LoggerPanel */
Set the menu item LoggerPanel
setMenuItemLoggerPanel
{ "repo_name": "yuyupapa/OpenSource", "path": "apache-jmeter-3.0/src/core/org/apache/jmeter/gui/GuiPackage.java", "license": "apache-2.0", "size": 29555 }
[ "javax.swing.JCheckBoxMenuItem" ]
import javax.swing.JCheckBoxMenuItem;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,583,345
public void doShow_student_submission(RunData data) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); Set t = (Set) state.getAttribute(STUDENT_LIST_SHOW_TABLE); ParameterParser params = data.getParameters(); String id = params.getString("studentI...
void function(RunData data) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); Set t = (Set) state.getAttribute(STUDENT_LIST_SHOW_TABLE); ParameterParser params = data.getParameters(); String id = params.getString(STR); t.add(id); state.setAttribute(STUDENT_LI...
/** * Action is to show the student submissions */
Action is to show the student submissions
doShow_student_submission
{ "repo_name": "rodriguezdevera/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 685575 }
[ "java.util.Set", "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.event.api.SessionState", "org.sakaiproject.util.ParameterParser" ]
import java.util.Set; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.util.ParameterParser;
import java.util.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; import org.sakaiproject.util.*;
[ "java.util", "org.sakaiproject.cheftool", "org.sakaiproject.event", "org.sakaiproject.util" ]
java.util; org.sakaiproject.cheftool; org.sakaiproject.event; org.sakaiproject.util;
1,051,861
public void addChangeListener(ChangeListener l) { if (listener != null) { throw new IllegalStateException(); } listener = l; }
void function(ChangeListener l) { if (listener != null) { throw new IllegalStateException(); } listener = l; }
/** Add a listener to changes of the panel's validity. * @param l the listener to add * @see #isValid */
Add a listener to changes of the panel's validity
addChangeListener
{ "repo_name": "Jacksson/mywms", "path": "rich.client/los.clientsuite/LOS Processes/src/de/linogistix/wmsprocesses/stockunittransfer/BOStockUnitTransferPanelChoose.java", "license": "gpl-2.0", "size": 12735 }
[ "javax.swing.event.ChangeListener" ]
import javax.swing.event.ChangeListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
1,848,839
protected static void getAlignedPoint(Point2D p, VisualItem item, double w, double h, int xAlign, int yAlign) { double x = item.getX(), y = item.getY(); if ( Double.isNaN(x) || Double.isInfinite(x) ) x = 0; // safety check if ( Double.isNaN(y) || Double.isInfinit...
static void function(Point2D p, VisualItem item, double w, double h, int xAlign, int yAlign) { double x = item.getX(), y = item.getY(); if ( Double.isNaN(x) Double.isInfinite(x) ) x = 0; if ( Double.isNaN(y) Double.isInfinite(y) ) y = 0; if ( xAlign == Constants.CENTER ) { x = x-(w/2); } else if ( xAlign == Constants.R...
/** * Helper method, which calculates the top-left co-ordinate of an item * given the item's alignment. */
Helper method, which calculates the top-left co-ordinate of an item given the item's alignment
getAlignedPoint
{ "repo_name": "ezegarra/microbrowser", "path": "src/prefuse/render/LabelRenderer.java", "license": "bsd-3-clause", "size": 29353 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
582,062
FinderState updateAssociatedDataConsNameForFieldName(final Name.DataCons associatedDataConsNameForFieldName) { return new FinderState(Collections.singletonList(associatedDataConsNameForFieldName), this.associatedTypeClassNameForInstanceMethod); }
FinderState updateAssociatedDataConsNameForFieldName(final Name.DataCons associatedDataConsNameForFieldName) { return new FinderState(Collections.singletonList(associatedDataConsNameForFieldName), this.associatedTypeClassNameForInstanceMethod); }
/** * Constructs a new state object based on this one, but with an updated name representing * the data constructor that is associated with any field names encountered during the * visitation. * * @param associatedDataConsNameForFieldName * data co...
Constructs a new state object based on this one, but with an updated name representing the data constructor that is associated with any field names encountered during the visitation
updateAssociatedDataConsNameForFieldName
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/compiler/IdentifierOccurrenceFinder.java", "license": "bsd-3-clause", "size": 81938 }
[ "java.util.Collections", "org.openquark.cal.compiler.SourceModel" ]
import java.util.Collections; import org.openquark.cal.compiler.SourceModel;
import java.util.*; import org.openquark.cal.compiler.*;
[ "java.util", "org.openquark.cal" ]
java.util; org.openquark.cal;
481,400
public static java.util.Set extractTumourSerumMarkerSet(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.TumourSerumMarkersVoCollection voCollection) { return extractTumourSerumMarkerSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.TumourSerumMarkersVoCollection voCollection) { return extractTumourSerumMarkerSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.oncology.configuration.domain.objects.TumourSerumMarker set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.oncology.configuration.domain.objects.TumourSerumMarker set from the value object collection
extractTumourSerumMarkerSet
{ "repo_name": "openhealthcare/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/clinicaladmin/vo/domain/TumourSerumMarkersVoAssembler.java", "license": "agpl-3.0", "size": 18379 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,654,457
@WebMethod(operationName = "deleteRoleResponsibilityAction") @CacheEvict(value={Permission.Cache.NAME, Responsibility.Cache.NAME, RoleMembership.Cache.NAME, RoleMember.Cache.NAME, DelegateMember.Cache.NAME, RoleResponsibility.Cache.NAME, DelegateType.Cache.NAME }, allEntries = true) void deleteRoleResponsib...
@WebMethod(operationName = STR) @CacheEvict(value={Permission.Cache.NAME, Responsibility.Cache.NAME, RoleMembership.Cache.NAME, RoleMember.Cache.NAME, DelegateMember.Cache.NAME, RoleResponsibility.Cache.NAME, DelegateType.Cache.NAME }, allEntries = true) void deleteRoleResponsibilityAction(@WebParam(name = STR) String ...
/** * Deletes the given RoleResponsibilityAction * * @since 2.1.2 * @param roleResponsibilityActionId id of the RoleResponsibilityAction to delete. * @throws RiceIllegalArgumentException if roleResponsibilityActionId is null. * @throws RiceIllegalStateException if roleResponsibilityAction ...
Deletes the given RoleResponsibilityAction
deleteRoleResponsibilityAction
{ "repo_name": "ricepanda/rice-git3", "path": "rice-middleware/kim/kim-api/src/main/java/org/kuali/rice/kim/api/role/RoleService.java", "license": "apache-2.0", "size": 48854 }
[ "javax.jws.WebMethod", "javax.jws.WebParam", "org.kuali.rice.core.api.exception.RiceIllegalArgumentException", "org.kuali.rice.kim.api.common.delegate.DelegateMember", "org.kuali.rice.kim.api.common.delegate.DelegateType", "org.kuali.rice.kim.api.permission.Permission", "org.kuali.rice.kim.api.responsib...
import javax.jws.WebMethod; import javax.jws.WebParam; import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; import org.kuali.rice.kim.api.common.delegate.DelegateMember; import org.kuali.rice.kim.api.common.delegate.DelegateType; import org.kuali.rice.kim.api.permission.Permission; import org.kuali.ri...
import javax.jws.*; import org.kuali.rice.core.api.exception.*; import org.kuali.rice.kim.api.common.delegate.*; import org.kuali.rice.kim.api.permission.*; import org.kuali.rice.kim.api.responsibility.*; import org.springframework.cache.annotation.*;
[ "javax.jws", "org.kuali.rice", "org.springframework.cache" ]
javax.jws; org.kuali.rice; org.springframework.cache;
2,794,519
@Test(expected = IllegalArgumentException.class) public void testInvalidValueOfIncorrectString() { Ip4Address ipAddress; String fromString = "NoSuchIpAddress"; ipAddress = Ip4Address.valueOf(fromString); }
@Test(expected = IllegalArgumentException.class) void function() { Ip4Address ipAddress; String fromString = STR; ipAddress = Ip4Address.valueOf(fromString); }
/** * Tests invalid valueOf() converter for an incorrect string. */
Tests invalid valueOf() converter for an incorrect string
testInvalidValueOfIncorrectString
{ "repo_name": "kuujo/onos", "path": "utils/misc/src/test/java/org/onlab/packet/Ip4AddressTest.java", "license": "apache-2.0", "size": 13533 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,946,441
@Test public void verifySublistWithOffset() { int startIndex = 1; List<E> list = seq.subList(startIndex, getMaxTests()); Assert.assertEquals(getMaxTests() - startIndex, list.size()); for (int n = 0; n < list.size(); n++) { Assert.assertEquals(seq.get(startIndex + n),...
void function() { int startIndex = 1; List<E> list = seq.subList(startIndex, getMaxTests()); Assert.assertEquals(getMaxTests() - startIndex, list.size()); for (int n = 0; n < list.size(); n++) { Assert.assertEquals(seq.get(startIndex + n), list.get(n)); } }
/** * Verify the sublist works with offset. */
Verify the sublist works with offset
verifySublistWithOffset
{ "repo_name": "beargiles/projecteuler", "path": "src/test/java/com/invariantproperties/projecteuler/AbstractSequenceTest.java", "license": "apache-2.0", "size": 9284 }
[ "java.util.List", "org.junit.Assert" ]
import java.util.List; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,183,246
public static String emailPassword(HttpServletRequest request, HttpServletResponse response) { String defaultScreenLocation = "component://securityext/widget/EmailSecurityScreens.xml#PasswordEmail"; Delegator delegator = (Delegator) request.getAttribute("delegator"); LocalDispatcher dispatc...
static String function(HttpServletRequest request, HttpServletResponse response) { String defaultScreenLocation = STRdelegatorSTRdispatcherSTRtrueSTRsecurity.propertiesSTRpassword.encryptSTRUSERNAMESTRtrueSTRsecurity.propertiesSTRusername.lowercaseSTRloginevents.username_was_empty_reenterSTR_ERROR_MESSAGE_STRerrorSTRUs...
/** * Email the password for the userLoginId specified in the request object. * * @param request The HTTPRequest object for the current request * @param response The HTTPResponse object for the current request * @return String specifying the exit status of this event */
Email the password for the userLoginId specified in the request object
emailPassword
{ "repo_name": "gildaslemoal/elpi", "path": "applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java", "license": "gpl-2.0", "size": 20128 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,327,811
public void save(RepositoryElementInterface repositoryElement, String versionComment, ProgressMonitorListener monitor, boolean overwrite) throws KettleException;
void function(RepositoryElementInterface repositoryElement, String versionComment, ProgressMonitorListener monitor, boolean overwrite) throws KettleException;
/** * Save an object to the repository optionally overwriting any associated objects. * @param repositoryElement Object to save * @param versionComment Version comment for update * @param monitor Progress Monitor to report feedback to * @param overwrite Overwrite any existing objects involved ...
Save an object to the repository optionally overwriting any associated objects
save
{ "repo_name": "juanmjacobs/kettle", "path": "src/org/pentaho/di/repository/Repository.java", "license": "lgpl-2.1", "size": 25729 }
[ "org.pentaho.di.core.ProgressMonitorListener", "org.pentaho.di.core.exception.KettleException" ]
import org.pentaho.di.core.ProgressMonitorListener; import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,220,102
protected boolean keepFirst(ImmutableBytesWritable ibw1, ImmutableBytesWritable ibw2) { return 0 >= getDataType().compareTo(ibw1, columnModifier, ibw2, columnModifier, getDataType()); }
boolean function(ImmutableBytesWritable ibw1, ImmutableBytesWritable ibw2) { return 0 >= getDataType().compareTo(ibw1, columnModifier, ibw2, columnModifier, getDataType()); }
/** * Compares two bytes writables, and returns true if the first one should be * kept, and false otherwise. For the MIN function, this method will return * true if the first bytes writable is less than the second. * * @param ibw1 the first bytes writable * @param ibw2 the second bytes wr...
Compares two bytes writables, and returns true if the first one should be kept, and false otherwise. For the MIN function, this method will return true if the first bytes writable is less than the second
keepFirst
{ "repo_name": "forcedotcom/phoenix", "path": "phoenix-core/src/main/java/com/salesforce/phoenix/expression/aggregator/MinAggregator.java", "license": "bsd-3-clause", "size": 4316 }
[ "org.apache.hadoop.hbase.io.ImmutableBytesWritable" ]
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.hbase.io.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,656,292
@Test public void testMakeCoffee_3() throws Exception { CoffeeMaker fixture = new CoffeeMaker(); Recipe r = new Recipe(); r.setPrice(1); int amtPaid = 1; int result = fixture.makeCoffee(r, amtPaid); // add additional test code here assertEquals(0, result); }
void function() throws Exception { CoffeeMaker fixture = new CoffeeMaker(); Recipe r = new Recipe(); r.setPrice(1); int amtPaid = 1; int result = fixture.makeCoffee(r, amtPaid); assertEquals(0, result); }
/** * Run the int makeCoffee(Recipe,int) method test. * * @throws Exception * * @generatedBy CodePro at 4/27/16 6:34 PM */
Run the int makeCoffee(Recipe,int) method test
testMakeCoffee_3
{ "repo_name": "Nahom30/cosc603-Negash-project5", "path": "CoffeeMaker/src/edu/towson/cis/cosc603/project5/coffeemaker/CoffeeMakerTest.java", "license": "gpl-3.0", "size": 15836 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,682,202
public IgniteStripedThreadPoolExecutor asyncCallbackPool();
IgniteStripedThreadPoolExecutor function();
/** * Gets async callback pool. * * @return Async callback pool. */
Gets async callback pool
asyncCallbackPool
{ "repo_name": "ptupitsyn/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java", "license": "apache-2.0", "size": 20940 }
[ "org.apache.ignite.thread.IgniteStripedThreadPoolExecutor" ]
import org.apache.ignite.thread.IgniteStripedThreadPoolExecutor;
import org.apache.ignite.thread.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,045,636
public void removeIIOReadProgressListener (IIOReadProgressListener listener) { if (listener == null || progressListeners == null) { return; } progressListeners = removeFromList(progressListeners, listener); }
void function (IIOReadProgressListener listener) { if (listener == null progressListeners == null) { return; } progressListeners = removeFromList(progressListeners, listener); }
/** * Removes an <code>IIOReadProgressListener</code> from the list * of registered progress listeners. If the listener was not * previously registered, or if <code>listener</code> is * <code>null</code>, no exception will be thrown and no action * will be taken. * * @param listener ...
Removes an <code>IIOReadProgressListener</code> from the list of registered progress listeners. If the listener was not previously registered, or if <code>listener</code> is <code>null</code>, no exception will be thrown and no action will be taken
removeIIOReadProgressListener
{ "repo_name": "haikuowuya/android_system_code", "path": "src/javax/imageio/ImageReader.java", "license": "apache-2.0", "size": 118398 }
[ "javax.imageio.event.IIOReadProgressListener" ]
import javax.imageio.event.IIOReadProgressListener;
import javax.imageio.event.*;
[ "javax.imageio" ]
javax.imageio;
2,570,824
public void updateUserInfo(final String firstName, final String lastName) { final String url = HttpConstants.getApiBaseUrl() + ApiEndpoints.UPDATE_USER_INFO; final JSONObject mUserProfileObject = new JSONObject(); final JSONObject mUserProfileMasterObject = new JSONObject()...
void function(final String firstName, final String lastName) { final String url = HttpConstants.getApiBaseUrl() + ApiEndpoints.UPDATE_USER_INFO; final JSONObject mUserProfileObject = new JSONObject(); final JSONObject mUserProfileMasterObject = new JSONObject(); try { mUserProfileObject.put(HttpConstants.FIRST_NAME, fi...
/** * Updates the user info with just the first name and last name * * @param firstName The user's first name * @param lastName The user's last name */
Updates the user info with just the first name and last name
updateUserInfo
{ "repo_name": "barterli/barterli_android", "path": "barterli/src/main/java/li/barter/fragments/AbstractBarterLiFragment.java", "license": "apache-2.0", "size": 19501 }
[ "com.android.volley.Request", "li.barter.http.BlMultiPartRequest", "li.barter.http.HttpConstants", "org.json.JSONException", "org.json.JSONObject" ]
import com.android.volley.Request; import li.barter.http.BlMultiPartRequest; import li.barter.http.HttpConstants; import org.json.JSONException; import org.json.JSONObject;
import com.android.volley.*; import li.barter.http.*; import org.json.*;
[ "com.android.volley", "li.barter.http", "org.json" ]
com.android.volley; li.barter.http; org.json;
1,253,606
@Test public void iterateTemplateNames() throws Exception { final MkContainer container = new MkGrizzlyContainer().next( new MkAnswer.Simple( HttpURLConnection.HTTP_OK, Json.createArrayBuilder() .add("C") .add("Java") ...
void function() throws Exception { final MkContainer container = new MkGrizzlyContainer().next( new MkAnswer.Simple( HttpURLConnection.HTTP_OK, Json.createArrayBuilder() .add("C") .add("Java") .build() .toString() ) ).start(); final RtGitignores gitignores = new RtGitignores( new RtGithub(new JdkRequest(container.home(...
/** * RtGitignores can iterate template names. * @throws Exception if there is any error */
RtGitignores can iterate template names
iterateTemplateNames
{ "repo_name": "prondzyn/jcabi-github", "path": "src/test/java/com/jcabi/github/RtGitignoresTest.java", "license": "bsd-3-clause", "size": 3488 }
[ "com.jcabi.http.mock.MkAnswer", "com.jcabi.http.mock.MkContainer", "com.jcabi.http.mock.MkGrizzlyContainer", "com.jcabi.http.request.JdkRequest", "java.net.HttpURLConnection", "javax.json.Json", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import com.jcabi.http.mock.MkAnswer; import com.jcabi.http.mock.MkContainer; import com.jcabi.http.mock.MkGrizzlyContainer; import com.jcabi.http.request.JdkRequest; import java.net.HttpURLConnection; import javax.json.Json; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import com.jcabi.http.mock.*; import com.jcabi.http.request.*; import java.net.*; import javax.json.*; import org.hamcrest.*;
[ "com.jcabi.http", "java.net", "javax.json", "org.hamcrest" ]
com.jcabi.http; java.net; javax.json; org.hamcrest;
1,955,476
public void addCounterSuperColumn(CounterSuperColumn superColumn) { this.counterSuperColumns.add(superColumn); }
void function(CounterSuperColumn superColumn) { this.counterSuperColumns.add(superColumn); }
/** * Adds the counter super column. * * @param superColumn the super column */
Adds the counter super column
addCounterSuperColumn
{ "repo_name": "ravisund/Kundera", "path": "src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/ThriftRow.java", "license": "apache-2.0", "size": 6194 }
[ "org.apache.cassandra.thrift.CounterSuperColumn" ]
import org.apache.cassandra.thrift.CounterSuperColumn;
import org.apache.cassandra.thrift.*;
[ "org.apache.cassandra" ]
org.apache.cassandra;
2,472,078
@SuppressWarnings({"PackageVisibleInnerClass", "PublicInnerClass"}) public static interface IndexesFactory { ArrayList<Index> createIndexes(GridH2Table tbl); } @SuppressWarnings("PackageVisibleInnerClass") static class ScanIndex implements Index { static final...
@SuppressWarnings({STR, STR}) static interface IndexesFactory { ArrayList<Index> function(GridH2Table tbl); } @SuppressWarnings(STR) static class ScanIndex implements Index { static final String SCAN_INDEX_NAME_SUFFIX = STR; private static final IndexType TYPE = IndexType.createScan(false); private final GridH2IndexBas...
/** * Create list of indexes. First must be primary key, after that all unique indexes and * only then non-unique indexes. * All indexes must be subtypes of {@link GridH2TreeIndex}. * * @param tbl Table to create indexes for. * @return List of indexes. */
Create list of indexes. First must be primary key, after that all unique indexes and only then non-unique indexes. All indexes must be subtypes of <code>GridH2TreeIndex</code>
createIndexes
{ "repo_name": "agura/incubator-ignite", "path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java", "license": "apache-2.0", "size": 28243 }
[ "java.util.ArrayList", "org.h2.index.Index", "org.h2.index.IndexType" ]
import java.util.ArrayList; import org.h2.index.Index; import org.h2.index.IndexType;
import java.util.*; import org.h2.index.*;
[ "java.util", "org.h2.index" ]
java.util; org.h2.index;
728,611
public Metadata getMetadata();
Metadata function();
/** * The iPhoto metadata for the image. * * @return The iPhoto metadata for the image. */
The iPhoto metadata for the image
getMetadata
{ "repo_name": "rometools/rome", "path": "rome-modules/src/main/java/com/rometools/modules/photocast/PhotocastModule.java", "license": "apache-2.0", "size": 2760 }
[ "com.rometools.modules.photocast.types.Metadata" ]
import com.rometools.modules.photocast.types.Metadata;
import com.rometools.modules.photocast.types.*;
[ "com.rometools.modules" ]
com.rometools.modules;
810,420
public interface EaseUserProfileProvider { EaseUser getUser(String username); }
interface EaseUserProfileProvider { EaseUser function(String username); }
/** * return EaseUser for input username * @param username * @return */
return EaseUser for input username
getUser
{ "repo_name": "simonOrganization/safe", "path": "easeui/src/com/hyphenate/easeui/controller/EaseUI.java", "license": "apache-2.0", "size": 9391 }
[ "com.hyphenate.easeui.domain.EaseUser" ]
import com.hyphenate.easeui.domain.EaseUser;
import com.hyphenate.easeui.domain.*;
[ "com.hyphenate.easeui" ]
com.hyphenate.easeui;
2,088,671
private TQueryExecRequest createExecRequest( Planner planner, StringBuilder explainString) throws ImpalaException { TQueryCtx queryCtx = planner.getQueryCtx(); AnalysisContext.AnalysisResult analysisResult = planner.getAnalysisResult(); boolean isMtExec = analysisResult.isQueryStmt() && quer...
TQueryExecRequest function( Planner planner, StringBuilder explainString) throws ImpalaException { TQueryCtx queryCtx = planner.getQueryCtx(); AnalysisContext.AnalysisResult analysisResult = planner.getAnalysisResult(); boolean isMtExec = analysisResult.isQueryStmt() && queryCtx.request.query_options.isSetMt_dop() && q...
/** * Create a populated TQueryExecRequest, corresponding to the supplied planner. */
Create a populated TQueryExecRequest, corresponding to the supplied planner
createExecRequest
{ "repo_name": "924060929/impala-frontend", "path": "fe/src/main/java/org/apache/impala/service/Frontend.java", "license": "apache-2.0", "size": 55472 }
[ "com.google.common.collect.Lists", "java.util.ArrayList", "java.util.List", "org.apache.impala.analysis.AnalysisContext", "org.apache.impala.common.ImpalaException", "org.apache.impala.planner.PlanFragment", "org.apache.impala.planner.Planner", "org.apache.impala.thrift.TPlanExecInfo", "org.apache.i...
import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.List; import org.apache.impala.analysis.AnalysisContext; import org.apache.impala.common.ImpalaException; import org.apache.impala.planner.PlanFragment; import org.apache.impala.planner.Planner; import org.apache.impala.thrift.TPlanExe...
import com.google.common.collect.*; import java.util.*; import org.apache.impala.analysis.*; import org.apache.impala.common.*; import org.apache.impala.planner.*; import org.apache.impala.thrift.*;
[ "com.google.common", "java.util", "org.apache.impala" ]
com.google.common; java.util; org.apache.impala;
1,457,201
public List getCollectionDescriptors(boolean withInherited) { if(withInherited && getSuperClassDescriptor() != null) { List result = new ArrayList(m_CollectionDescriptors); result.addAll(getSuperClassDescriptor().getCollectionDescriptors(true)); return r...
List function(boolean withInherited) { if(withInherited && getSuperClassDescriptor() != null) { List result = new ArrayList(m_CollectionDescriptors); result.addAll(getSuperClassDescriptor().getCollectionDescriptors(true)); return result; } else { return m_CollectionDescriptors; } }
/** * Returns all defined {@link CollectionDescriptor} for * this class descriptor. * * @param withInherited If <em>true</em> inherited super class references will be included. */
Returns all defined <code>CollectionDescriptor</code> for this class descriptor
getCollectionDescriptors
{ "repo_name": "kuali/ojb-1.0.4", "path": "src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java", "license": "apache-2.0", "size": 73402 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
801,894
@Produce public UserForgotPasswordSuccessEvent produceUserForgotPasswordSuccessEvent() { return new UserForgotPasswordSuccessEvent(); }
UserForgotPasswordSuccessEvent function() { return new UserForgotPasswordSuccessEvent(); }
/** * Creates an event for successful Forgot Password request * * @param user * User currently signed in * @return */
Creates an event for successful Forgot Password request
produceUserForgotPasswordSuccessEvent
{ "repo_name": "rdrobinson3/LoginAndSignupTutorial", "path": "src/com/keyconsultant/parse/logintutorial/model/user/UserManager.java", "license": "apache-2.0", "size": 5074 }
[ "com.keyconsultant.parse.logintutorial.model.user.authenticate.UserForgotPasswordSuccessEvent" ]
import com.keyconsultant.parse.logintutorial.model.user.authenticate.UserForgotPasswordSuccessEvent;
import com.keyconsultant.parse.logintutorial.model.user.authenticate.*;
[ "com.keyconsultant.parse" ]
com.keyconsultant.parse;
2,174,836
public void updatePrototypes() throws IOException, ScriptingException;
void function() throws IOException, ScriptingException;
/** * This method is called before an execution context for a request * evaluation is entered to let the Engine know it should update * its prototype information */
This method is called before an execution context for a request evaluation is entered to let the Engine know it should update its prototype information
updatePrototypes
{ "repo_name": "axiomsoftware/axiom-stack", "path": "src/java/axiom/scripting/ScriptingEngine.java", "license": "agpl-3.0", "size": 4904 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,171,574
@Override public void addLayoutComponent(String name, Component comp) { }
void function(String name, Component comp) { }
/** * Not used by this class. */
Not used by this class
addLayoutComponent
{ "repo_name": "benbenw/jmeter", "path": "src/jorphan/src/main/java/org/apache/jorphan/gui/layout/VerticalLayout.java", "license": "apache-2.0", "size": 8024 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,728,726