method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static Action scheduleRebootAction(User scheduler, Server srvr, Date earliestAction) { return scheduleAction(scheduler, srvr, ActionFactory.TYPE_REBOOT, ActionFactory.TYPE_REBOOT.getName(), earliestAction); }
static Action function(User scheduler, Server srvr, Date earliestAction) { return scheduleAction(scheduler, srvr, ActionFactory.TYPE_REBOOT, ActionFactory.TYPE_REBOOT.getName(), earliestAction); }
/** * Schedule a scheduleRebootAction against a system * @param scheduler User scheduling the action. * @param srvr Server for which the action affects. * @param earliestAction Date run the Action * @return Currently scheduled KickstartAction */
Schedule a scheduleRebootAction against a system
scheduleRebootAction
{ "repo_name": "colloquium/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/action/ActionManager.java", "license": "gpl-2.0", "size": 73734 }
[ "com.redhat.rhn.domain.action.Action", "com.redhat.rhn.domain.action.ActionFactory", "com.redhat.rhn.domain.server.Server", "com.redhat.rhn.domain.user.User", "java.util.Date" ]
import com.redhat.rhn.domain.action.Action; import com.redhat.rhn.domain.action.ActionFactory; import com.redhat.rhn.domain.server.Server; import com.redhat.rhn.domain.user.User; import java.util.Date;
import com.redhat.rhn.domain.action.*; import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
2,616,918
VirtualHost setContext(Map<String,Object> context);
VirtualHost setContext(Map<String,Object> context);
/** * Set the context * @param context * @return */
Set the context
setContext
{ "repo_name": "core9/module-server", "path": "src/api/java/io/core9/plugin/server/VirtualHost.java", "license": "mit", "size": 863 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,298,933
@Test public void longDates() { assertTrue(toDateFromLongFormat("2011-12-22T21:00:00+0000") != null); assertTrue(toDateFromLongFormat("2011-12-22T21:00:00") != null); assertTrue(toDateFromLongFormat("1331784257") != null); assertTrue(toDateFromLongFormat("junk") == null); }
void function() { assertTrue(toDateFromLongFormat(STR) != null); assertTrue(toDateFromLongFormat(STR) != null); assertTrue(toDateFromLongFormat(STR) != null); assertTrue(toDateFromLongFormat("junk") == null); }
/** * FB uses "long" date formats with and without timezones. Make sure we handle both gracefully. */
FB uses "long" date formats with and without timezones. Make sure we handle both gracefully
longDates
{ "repo_name": "oleke/Gender-Mining", "path": "restfb/source/test/com/restfb/util/DateUtilsTest.java", "license": "apache-2.0", "size": 2653 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,229,943
private void startAnimation(long time, OverviewAnimationType type) { startAnimation(time, type, TabModel.INVALID_TAB_INDEX, false); }
void function(long time, OverviewAnimationType type) { startAnimation(time, type, TabModel.INVALID_TAB_INDEX, false); }
/** * Starts an animation on the stack. * * @param time The current time of the app in ms. * @param type The type of the animation to start. */
Starts an animation on the stack
startAnimation
{ "repo_name": "Chilledheart/chromium", "path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java", "license": "bsd-3-clause", "size": 111044 }
[ "org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation", "org.chromium.chrome.browser.tabmodel.TabModel" ]
import org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation; import org.chromium.chrome.browser.tabmodel.TabModel;
import org.chromium.chrome.browser.compositor.layouts.phone.stack.*; import org.chromium.chrome.browser.tabmodel.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
1,848,332
static void printList(final PrintWriter pw, final List l) { for (int i = 0; i < l.size(); ++i) { Object o = l.get(i); if (o instanceof List) { printList(pw, (List) o); } else { pw.print(o.toString()); } } }
static void printList(final PrintWriter pw, final List l) { for (int i = 0; i < l.size(); ++i) { Object o = l.get(i); if (o instanceof List) { printList(pw, (List) o); } else { pw.print(o.toString()); } } }
/** * Prints the given string tree. * * @param pw * the writer to be used to print the tree. * @param l * a string tree, i.e., a string list that can contain other * string lists, and so on recursively. */
Prints the given string tree
printList
{ "repo_name": "AlterRS/Deobfuscator", "path": "deps/alterrs/asm/util/AbstractVisitor.java", "license": "mit", "size": 6857 }
[ "java.io.PrintWriter", "java.util.List" ]
import java.io.PrintWriter; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,911,596
@Test public void testMultiThreadedUploadAndLocking() throws RepositoryBackendException { final int VANITY_URLS = 3; final int RESOURCES_PER_VANITY_URL = 10; List<EsaResourceImpl> list = createRandomizedListOfResources(VANITY_URLS, RESOURCES_PER_VANITY_URL); ExecutorService exec...
void function() throws RepositoryBackendException { final int VANITY_URLS = 3; final int RESOURCES_PER_VANITY_URL = 10; List<EsaResourceImpl> list = createRandomizedListOfResources(VANITY_URLS, RESOURCES_PER_VANITY_URL); ExecutorService executor = Executors.newFixedThreadPool(10); for (EsaResourceImpl esa : list) { Run...
/** * Run multi-threaded upload of multiple resources * * @throws RepositoryResourceException * @throws RepositoryBackendException */
Run multi-threaded upload of multiple resources
testMultiThreadedUploadAndLocking
{ "repo_name": "ashleyrobertson/tool.lars", "path": "client-lib-tests/src/fat/java/com/ibm/ws/repository/test/ResourceTest.java", "license": "apache-2.0", "size": 67928 }
[ "com.ibm.ws.repository.common.enums.DisplayPolicy", "com.ibm.ws.repository.exceptions.RepositoryBackendException", "com.ibm.ws.repository.resources.RepositoryResource", "com.ibm.ws.repository.resources.internal.EsaResourceImpl", "com.ibm.ws.repository.resources.writeable.EsaResourceWritable", "java.util.C...
import com.ibm.ws.repository.common.enums.DisplayPolicy; import com.ibm.ws.repository.exceptions.RepositoryBackendException; import com.ibm.ws.repository.resources.RepositoryResource; import com.ibm.ws.repository.resources.internal.EsaResourceImpl; import com.ibm.ws.repository.resources.writeable.EsaResourceWritable; i...
import com.ibm.ws.repository.common.enums.*; import com.ibm.ws.repository.exceptions.*; import com.ibm.ws.repository.resources.*; import com.ibm.ws.repository.resources.internal.*; import com.ibm.ws.repository.resources.writeable.*; import java.util.*; import java.util.concurrent.*; import org.junit.*;
[ "com.ibm.ws", "java.util", "org.junit" ]
com.ibm.ws; java.util; org.junit;
841,106
public String getVariableValue() { StringBuilder sb = new StringBuilder(); sb.append("<VariableValuesXml>"); ObservableList<EwiVariableDVO> items = this.createEwiValue.getTbCustomValue().getItems(); for (EwiVariableDVO item : items) { sb.append("<Object name='").append(item.getName()).append("'>"); St...
String function() { StringBuilder sb = new StringBuilder(); sb.append(STR); ObservableList<EwiVariableDVO> items = this.createEwiValue.getTbCustomValue().getItems(); for (EwiVariableDVO item : items) { sb.append(STR).append(item.getName()).append("'>"); String value = item.getValue(); if (ValueUtil.isNotEmpty(value)) s...
/** * * ewi value * * @작성자 : KYJ * @작성일 : 2018. 8. 12. * @return */
ewi value
getVariableValue
{ "repo_name": "callakrsos/Gargoyle", "path": "gargoyle-rax/src/main/java/com/kyj/fx/behavior/text/BehaviorDesignTab.java", "license": "gpl-2.0", "size": 10572 }
[ "com.kyj.fx.commons.utils.ValueUtil" ]
import com.kyj.fx.commons.utils.ValueUtil;
import com.kyj.fx.commons.utils.*;
[ "com.kyj.fx" ]
com.kyj.fx;
1,871,120
public void setView(int view) { if (view == HorizontalVerticalViewHandler.HORIZONTAL) { setHorizontalView(true); } else { setVerticalView(true); } }
void function(int view) { if (view == HorizontalVerticalViewHandler.HORIZONTAL) { setHorizontalView(true); } else { setVerticalView(true); } }
/** * Sets the view * 1 = HORIZONTAL * 2 = VERTICAL */
Sets the view 1 = HORIZONTAL 2 = VERTICAL
setView
{ "repo_name": "idega/com.idega.block.trade", "path": "src/java/com/idega/block/trade/stockroom/presentation/ProductItemImages.java", "license": "gpl-3.0", "size": 5104 }
[ "com.idega.builder.handler.HorizontalVerticalViewHandler" ]
import com.idega.builder.handler.HorizontalVerticalViewHandler;
import com.idega.builder.handler.*;
[ "com.idega.builder" ]
com.idega.builder;
2,180,286
@Test public void testPosixStyleLong() throws RequiredOptionsMissingException, MissingArgumentException, TerminalException, UnknownOptionException, ArgumentFileNotFoundException { final MockCommand command = new MockCommand(); ArgParser.parseAndRun(command, "-W", "input", "fooInput"); As...
void function() throws RequiredOptionsMissingException, MissingArgumentException, TerminalException, UnknownOptionException, ArgumentFileNotFoundException { final MockCommand command = new MockCommand(); ArgParser.parseAndRun(command, "-W", "input", STR); Assert.assertEquals(STR, STR, command.getInput()); Assert.assert...
/** * Tests that GNU style options with -W are accepted and processed properly. * @throws RequiredOptionsMissingException (unexpected). * @throws TerminalException (unexpected). * @throws UnknownOptionException (unexpected). * @throws MissingArgumentException (unexpected). * @throws Argume...
Tests that GNU style options with -W are accepted and processed properly
testPosixStyleLong
{ "repo_name": "christianhujer/japi", "path": "historic/libs/argparser/src/tst/test/net/sf/japi/io/args/ArgParserTest.java", "license": "lgpl-3.0", "size": 31092 }
[ "net.sf.japi.io.args.ArgParser", "net.sf.japi.io.args.ArgumentFileNotFoundException", "net.sf.japi.io.args.MissingArgumentException", "net.sf.japi.io.args.RequiredOptionsMissingException", "net.sf.japi.io.args.TerminalException", "net.sf.japi.io.args.UnknownOptionException", "org.junit.Assert" ]
import net.sf.japi.io.args.ArgParser; import net.sf.japi.io.args.ArgumentFileNotFoundException; import net.sf.japi.io.args.MissingArgumentException; import net.sf.japi.io.args.RequiredOptionsMissingException; import net.sf.japi.io.args.TerminalException; import net.sf.japi.io.args.UnknownOptionException; import org.jun...
import net.sf.japi.io.args.*; import org.junit.*;
[ "net.sf.japi", "org.junit" ]
net.sf.japi; org.junit;
2,480,790
private JComponent makeHelixCanvas() { return new JPanel() { private static final long serialVersionUID = 1L;
JComponent function() { return new JPanel() { private static final long serialVersionUID = 1L;
/** * Return a JComponent object that will display a helix and a short * copyright notice. **/
Return a JComponent object that will display a helix and a short copyright notice
makeHelixCanvas
{ "repo_name": "mrGeen/Artemis", "path": "uk/ac/sanger/artemis/components/Splash.java", "license": "gpl-3.0", "size": 37550 }
[ "javax.swing.JComponent", "javax.swing.JPanel" ]
import javax.swing.JComponent; import javax.swing.JPanel;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,082,023
interface WithOptions { WithResource withOptions(Map<String, String> options); }
interface WithOptions { WithResource withOptions(Map<String, String> options); }
/** * Specifies options. * @param options A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request * @return the next definition stage */
Specifies options
withOptions
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/CassandraTableGetResults.java", "license": "mit", "size": 5590 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
990,449
String sahiBase = "../"; // where Sahi is installed or unzipped userDataDirectory = "myuserdata"; Configuration.initJava(sahiBase, userDataDirectory); // Sets up configuration for proxy. Sets Controller to java mode. browser = new Browser("firefox"); browser.open(); }
String sahiBase = "../"; userDataDirectory = STR; Configuration.initJava(sahiBase, userDataDirectory); browser = new Browser(STR); browser.open(); }
/** * This starts the Sahi proxy, toggles the proxy settings on Internet Explorer * and starts a browser instance. This could be part of your setUp method in a JUnit test. * */
This starts the Sahi proxy, toggles the proxy settings on Internet Explorer and starts a browser instance. This could be part of your setUp method in a JUnit test
setUp
{ "repo_name": "rajiesh/functional-tests", "path": "libs/com.thoughtworks.twist.driver.sahi_5.0.0.13841-7582c47b464e14/sahi/sample_java_project/src/in/co/sahi/JavaClientTest.java", "license": "apache-2.0", "size": 2152 }
[ "net.sf.sahi.client.Browser", "net.sf.sahi.config.Configuration" ]
import net.sf.sahi.client.Browser; import net.sf.sahi.config.Configuration;
import net.sf.sahi.client.*; import net.sf.sahi.config.*;
[ "net.sf.sahi" ]
net.sf.sahi;
2,574,320
@Test public void equalsAndHashCodeEqualTest() throws Exception { EqualsVerifier.forClass(TkConsumes.class) .withRedefinedSuperclass() .suppress(Warning.TRANSIENT_FIELDS) .verify(); }
void function() throws Exception { EqualsVerifier.forClass(TkConsumes.class) .withRedefinedSuperclass() .suppress(Warning.TRANSIENT_FIELDS) .verify(); }
/** * Checks TkConsumes equals method. * @throws Exception If some problem inside */
Checks TkConsumes equals method
equalsAndHashCodeEqualTest
{ "repo_name": "dalifreire/takes", "path": "src/test/java/org/takes/facets/fork/TkConsumesTest.java", "license": "mit", "size": 3946 }
[ "nl.jqno.equalsverifier.EqualsVerifier", "nl.jqno.equalsverifier.Warning" ]
import nl.jqno.equalsverifier.EqualsVerifier; import nl.jqno.equalsverifier.Warning;
import nl.jqno.equalsverifier.*;
[ "nl.jqno.equalsverifier" ]
nl.jqno.equalsverifier;
772,138
@Override @VisibleForTesting // productionVisibility = Visibility.PRIVATE public void setDeletedPackages(Iterable<PackageIdentifier> pkgs) { // Invalidate the old deletedPackages as they may exist now. invalidateDeletedPackages(deletedPackages.get()); deletedPackages.set(ImmutableSet.copyOf(pkgs)); ...
@VisibleForTesting void function(Iterable<PackageIdentifier> pkgs) { invalidateDeletedPackages(deletedPackages.get()); deletedPackages.set(ImmutableSet.copyOf(pkgs)); invalidateDeletedPackages(deletedPackages.get()); }
/** * Sets the packages that should be treated as deleted and ignored. */
Sets the packages that should be treated as deleted and ignored
setDeletedPackages
{ "repo_name": "mikelalcon/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java", "license": "apache-2.0", "size": 29695 }
[ "com.google.common.annotations.VisibleForTesting", "com.google.common.collect.ImmutableSet", "com.google.devtools.build.lib.cmdline.PackageIdentifier" ]
import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.cmdline.PackageIdentifier;
import com.google.common.annotations.*; import com.google.common.collect.*; import com.google.devtools.build.lib.cmdline.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
548,490
private void testConnectViaHttpProxyToHttps(ProxyConfig proxyConfig) throws Exception { TestSSLContext testSSLContext = TestSSLContext.create(); RecordingHostnameVerifier hostnameVerifier = new RecordingHostnameVerifier(); server.useHttps(testSSLContext.serverContext.getSocketFactory(), tru...
void function(ProxyConfig proxyConfig) throws Exception { TestSSLContext testSSLContext = TestSSLContext.create(); RecordingHostnameVerifier hostnameVerifier = new RecordingHostnameVerifier(); server.useHttps(testSSLContext.serverContext.getSocketFactory(), true); server.enqueue(new MockResponse() .setSocketPolicy(Sock...
/** * We were verifying the wrong hostname when connecting to an HTTPS site * through a proxy. http://b/3097277 */
We were verifying the wrong hostname when connecting to an HTTPS site through a proxy. HREF
testConnectViaHttpProxyToHttps
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/frameworks/base/tests/net/tests/src/mediatek/net/libcore/URLConnectionTest.java", "license": "gpl-2.0", "size": 105754 }
[ "com.mediatek.mockwebserver.MockResponse", "com.mediatek.mockwebserver.RecordedRequest", "com.mediatek.mockwebserver.SocketPolicy", "javax.net.ssl.HttpsURLConnection" ]
import com.mediatek.mockwebserver.MockResponse; import com.mediatek.mockwebserver.RecordedRequest; import com.mediatek.mockwebserver.SocketPolicy; import javax.net.ssl.HttpsURLConnection;
import com.mediatek.mockwebserver.*; import javax.net.ssl.*;
[ "com.mediatek.mockwebserver", "javax.net" ]
com.mediatek.mockwebserver; javax.net;
2,349,499
// LI2281.07 @Override public TimerService getTimerService() throws IllegalStateException { // Calling getTimerService is not allowed from setSessionContext. if ((state == PRE_CREATE)) // prevent in setSessionContext { IllegalStateException ise; ise = new Ill...
TimerService function() throws IllegalStateException { if ((state == PRE_CREATE)) { IllegalStateException ise; ise = new IllegalStateException(STR + STR + getStateName(state)); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, STR + ise); throw ise; } return super.getTimerService(); } public...
/** * Get access to the EJB Timer Service. <p> * * @return The EJB Timer Service. * * @exception IllegalStateException The Container throws the exception * if the instance is not allowed to use this method (e.g. if the bean * ...
Get access to the EJB Timer Service.
getTimerService
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/StatelessBeanO.java", "license": "epl-1.0", "size": 40207 }
[ "com.ibm.websphere.ras.Tr", "com.ibm.websphere.ras.TraceComponent", "javax.ejb.TimerService" ]
import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import javax.ejb.TimerService;
import com.ibm.websphere.ras.*; import javax.ejb.*;
[ "com.ibm.websphere", "javax.ejb" ]
com.ibm.websphere; javax.ejb;
555,332
public com.mozu.api.contracts.tenant.TenantCollection getTenantScopesForUser(String userId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.tenant.TenantCollection> client = com.mozu.api.clients.platform.adminuser.AdminUserClient.getTenantScopesForUserClient( userId, responseFields); ...
com.mozu.api.contracts.tenant.TenantCollection function(String userId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.tenant.TenantCollection> client = com.mozu.api.clients.platform.adminuser.AdminUserClient.getTenantScopesForUserClient( userId, responseFields); client.setContext(_apiContex...
/** * Retrieves a list of the Mozu tenants or development stores for which the specified user has an assigned role. * <p><pre><code> * AdminUser adminuser = new AdminUser(); * TenantCollection tenantCollection = adminuser.getTenantScopesForUser( userId, responseFields); * </code></pre></p> * @param respons...
Retrieves a list of the Mozu tenants or development stores for which the specified user has an assigned role. <code><code> AdminUser adminuser = new AdminUser(); TenantCollection tenantCollection = adminuser.getTenantScopesForUser( userId, responseFields); </code></code>
getTenantScopesForUser
{ "repo_name": "eileenzhuang1/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/platform/adminuser/AdminUserResource.java", "license": "mit", "size": 3977 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
261,313
void outputImage(TIFFDirectory tiffDir, InputSource tiffSource) throws SAXException, IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); // RenderedOp imageOp; // try { // // Encode the file as a PNG image. // imageOp = JAI.create("encode", src, baos, "PNG", null); // } catch (...
void outputImage(TIFFDirectory tiffDir, InputSource tiffSource) throws SAXException, IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); AttributesImpl att = new AttributesImpl(); att.addAttribute(PNG_URI, BasicImageNormaliser.DESCRIPTION_TAG_NAME, IMG_PREFIX + ":" + BasicImageNormaliser.DESCRIPTION...
/** * Use JAI to convert the image to PNG. Call outputTiffMetadata to extract the image's metadata. * Wrap a Base64 encoding of the image in metadata (including the extracted metadata) * @param src JAI RenderedOp of the source image * @param tiffDir representation of the TIFF file structure * @param tiffSourc...
Use JAI to convert the image to PNG. Call outputTiffMetadata to extract the image's metadata. Wrap a Base64 encoding of the image in metadata (including the extracted metadata)
outputImage
{ "repo_name": "srnsw/xena", "path": "plugins/image/src/au/gov/naa/digipres/xena/plugin/image/tiff/TiffToXenaPngNormaliser.java", "license": "gpl-3.0", "size": 38593 }
[ "au.gov.naa.digipres.xena.plugin.image.BasicImageNormaliser", "au.gov.naa.digipres.xena.util.InputStreamEncoder", "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream", "org.apache.batik.ext.awt.image.codec.tiff.TIFFDirectory", "org.xml.sax.Conte...
import au.gov.naa.digipres.xena.plugin.image.BasicImageNormaliser; import au.gov.naa.digipres.xena.util.InputStreamEncoder; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import org.apache.batik.ext.awt.image.codec.tiff.TIFFDirectory; i...
import au.gov.naa.digipres.xena.plugin.image.*; import au.gov.naa.digipres.xena.util.*; import java.io.*; import org.apache.batik.ext.awt.image.codec.tiff.*; import org.xml.sax.*; import org.xml.sax.helpers.*;
[ "au.gov.naa", "java.io", "org.apache.batik", "org.xml.sax" ]
au.gov.naa; java.io; org.apache.batik; org.xml.sax;
2,068,922
private void sendHandShakeMessage(OFType type) throws IOException { // Send initial Features Request List<OFMessage> msglist = new ArrayList<OFMessage>(1); msglist.add(factory.getMessage(type)); channel.write(msglist); }
void function(OFType type) throws IOException { List<OFMessage> msglist = new ArrayList<OFMessage>(1); msglist.add(factory.getMessage(type)); channel.write(msglist); }
/** * Send initial switch setup information that we need before adding * the switch * @throws IOException */
Send initial switch setup information that we need before adding the switch
sendHandShakeMessage
{ "repo_name": "wallnerryan/FL_HAND", "path": "src/main/java/net/floodlightcontroller/core/internal/Controller.java", "license": "apache-2.0", "size": 85963 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.openflow.protocol.OFMessage", "org.openflow.protocol.OFType" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.openflow.protocol.OFMessage; import org.openflow.protocol.OFType;
import java.io.*; import java.util.*; import org.openflow.protocol.*;
[ "java.io", "java.util", "org.openflow.protocol" ]
java.io; java.util; org.openflow.protocol;
2,088,680
public static Location locate(Source src, ASTNode node){ return createLocation( src, src.getContent(), node.getStartPosition(), node.getStartPosition() + node.getLength() ); } /** * Locates a word in the {@code Source} * * @param code The {@code Source} to be insp...
static Location function(Source src, ASTNode node){ return createLocation( src, src.getContent(), node.getStartPosition(), node.getStartPosition() + node.getLength() ); } /** * Locates a word in the {@code Source} * * @param code The {@code Source} to be inspected. * @param word The word to be located * * @return The l...
/** * Locates a ASTNode in the {@code Source}. * * @param src The Source being inspected. * @param node The ASTNode to be located. * @return A {@code Location} in the {@code Source} where a ASTNode is found. */
Locates a ASTNode in the Source
locate
{ "repo_name": "vesperin/mix", "path": "src/main/java/com/vesperin/base/locations/Locations.java", "license": "apache-2.0", "size": 10060 }
[ "com.vesperin.base.Source", "org.eclipse.jdt.core.dom.ASTNode" ]
import com.vesperin.base.Source; import org.eclipse.jdt.core.dom.ASTNode;
import com.vesperin.base.*; import org.eclipse.jdt.core.dom.*;
[ "com.vesperin.base", "org.eclipse.jdt" ]
com.vesperin.base; org.eclipse.jdt;
704,395
public QuerySnapshot retrieveFilesCollection(Snapshot snapshot) throws ExecutionException, InterruptedException { Dataset sourceDataset = snapshot.getSourceDataset(); String collectionName = String.format("%s-files", sourceDataset.getId()); return retrieveCollectionByName( sourceDataset.getP...
QuerySnapshot function(Snapshot snapshot) throws ExecutionException, InterruptedException { Dataset sourceDataset = snapshot.getSourceDataset(); String collectionName = String.format(STR, sourceDataset.getId()); return retrieveCollectionByName( sourceDataset.getProjectResource().getGoogleProjectId(), collectionName); }
/** * Given a snapshot, retrieve the -files metadata collection from its source Dataset Firestore * * @param snapshot target snapshot * @return QuerySnapshot representation of the -files collection in source Dataset. */
Given a snapshot, retrieve the -files metadata collection from its source Dataset Firestore
retrieveFilesCollection
{ "repo_name": "DataBiosphere/jade-data-repo", "path": "src/main/java/bio/terra/service/filedata/google/firestore/FireStoreDao.java", "license": "bsd-3-clause", "size": 25609 }
[ "bio.terra.service.dataset.Dataset", "bio.terra.service.snapshot.Snapshot", "com.google.cloud.firestore.QuerySnapshot", "java.util.concurrent.ExecutionException" ]
import bio.terra.service.dataset.Dataset; import bio.terra.service.snapshot.Snapshot; import com.google.cloud.firestore.QuerySnapshot; import java.util.concurrent.ExecutionException;
import bio.terra.service.dataset.*; import bio.terra.service.snapshot.*; import com.google.cloud.firestore.*; import java.util.concurrent.*;
[ "bio.terra.service", "com.google.cloud", "java.util" ]
bio.terra.service; com.google.cloud; java.util;
941,082
@Test(expected = IllegalStateException.class) public void testEventHandlerActiveWithUninitializedContext() { assumeUsbTestsEnabled(); final Context context = new Context(); LibUsb.eventHandlerActive(context); }
@Test(expected = IllegalStateException.class) void function() { assumeUsbTestsEnabled(); final Context context = new Context(); LibUsb.eventHandlerActive(context); }
/** * Tests {@link LibUsb#eventHandlerActive(Context)} with uninitialized USB * context. */
Tests <code>LibUsb#eventHandlerActive(Context)</code> with uninitialized USB context
testEventHandlerActiveWithUninitializedContext
{ "repo_name": "usb4java/usb4java", "path": "src/test/java/org/usb4java/LibUsbTest.java", "license": "mit", "size": 45109 }
[ "org.junit.Test", "org.usb4java.Context", "org.usb4java.LibUsb", "org.usb4java.test.UsbAssume" ]
import org.junit.Test; import org.usb4java.Context; import org.usb4java.LibUsb; import org.usb4java.test.UsbAssume;
import org.junit.*; import org.usb4java.*; import org.usb4java.test.*;
[ "org.junit", "org.usb4java", "org.usb4java.test" ]
org.junit; org.usb4java; org.usb4java.test;
534,700
private void findTypes(String prefix, ISearchRequestor storage, int type) { // TODO (david) should add camel case support SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor( storage, this.unitToSkip, this.javaProject, this.nameLookup); int index = prefix.lastIndexOf('.'); if (i...
void function(String prefix, ISearchRequestor storage, int type) { SearchableEnvironmentRequestor requestor = new SearchableEnvironmentRequestor( storage, this.unitToSkip, this.javaProject, this.nameLookup); int index = prefix.lastIndexOf('.'); if (index == -1) { this.nameLookup.seekTypes(prefix, null, true, type, requ...
/** * Returns all types whose name starts with the given (qualified) * <code>prefix</code>. * * If the <code>prefix</code> is unqualified, all types whose simple name * matches the <code>prefix</code> are returned. */
Returns all types whose name starts with the given (qualified) <code>prefix</code>. If the <code>prefix</code> is unqualified, all types whose simple name matches the <code>prefix</code> are returned
findTypes
{ "repo_name": "boniatillo-com/PhaserEditor", "path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/SearchableEnvironment.java", "license": "epl-1.0", "size": 33456 }
[ "org.eclipse.wst.jsdt.core.IPackageFragment", "org.eclipse.wst.jsdt.internal.codeassist.ISearchRequestor" ]
import org.eclipse.wst.jsdt.core.IPackageFragment; import org.eclipse.wst.jsdt.internal.codeassist.ISearchRequestor;
import org.eclipse.wst.jsdt.core.*; import org.eclipse.wst.jsdt.internal.codeassist.*;
[ "org.eclipse.wst" ]
org.eclipse.wst;
422,057
@Override public final void onWebsocketOpen( WebSocket conn, Handshakedata handshake ) { connectLatch.countDown(); onOpen( (ServerHandshake) handshake ); }
final void function( WebSocket conn, Handshakedata handshake ) { connectLatch.countDown(); onOpen( (ServerHandshake) handshake ); }
/** * Calls subclass' implementation of <var>onOpen</var>. * * @param conn */
Calls subclass' implementation of onOpen
onWebsocketOpen
{ "repo_name": "mingot/matlab-websockets", "path": "Java-WebSocket/src/main/java/org/java_websocket/client/WebSocketClient.java", "license": "mit", "size": 11713 }
[ "org.java_websocket.WebSocket", "org.java_websocket.handshake.Handshakedata", "org.java_websocket.handshake.ServerHandshake" ]
import org.java_websocket.WebSocket; import org.java_websocket.handshake.Handshakedata; import org.java_websocket.handshake.ServerHandshake;
import org.java_websocket.*; import org.java_websocket.handshake.*;
[ "org.java_websocket", "org.java_websocket.handshake" ]
org.java_websocket; org.java_websocket.handshake;
2,895,403
public ViewConfig getViewConfigFromArchive(File archiveFile) throws JAXBException, IOException { ClassLoader cl = URLClassLoader.newInstance(new URL[]{archiveFile.toURI().toURL()}); InputStream configStream = cl.getResourceAsStream(VIEW_XML); if (configStream == null) { configStream = cl.getR...
ViewConfig function(File archiveFile) throws JAXBException, IOException { ClassLoader cl = URLClassLoader.newInstance(new URL[]{archiveFile.toURI().toURL()}); InputStream configStream = cl.getResourceAsStream(VIEW_XML); if (configStream == null) { configStream = cl.getResourceAsStream(WEB_INF_VIEW_XML); if (configStrea...
/** * Get the view configuration from the given archive file. * * @param archiveFile the archive file * * @return the associated view configuration * * @throws JAXBException if xml is malformed */
Get the view configuration from the given archive file
getViewConfigFromArchive
{ "repo_name": "sekikn/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/view/ViewArchiveUtility.java", "license": "apache-2.0", "size": 5640 }
[ "java.io.File", "java.io.IOException", "java.io.InputStream", "java.net.URLClassLoader", "javax.xml.bind.JAXBContext", "javax.xml.bind.JAXBException", "javax.xml.bind.Unmarshaller", "org.apache.ambari.server.view.configuration.ViewConfig" ]
import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URLClassLoader; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import org.apache.ambari.server.view.configuration.ViewConfig;
import java.io.*; import java.net.*; import javax.xml.bind.*; import org.apache.ambari.server.view.configuration.*;
[ "java.io", "java.net", "javax.xml", "org.apache.ambari" ]
java.io; java.net; javax.xml; org.apache.ambari;
803,835
public PolicyUnitDao getPolicyUnitDao() { return getDao(PolicyUnitDao.class); }
PolicyUnitDao function() { return getDao(PolicyUnitDao.class); }
/** * Returns the singleton instance of {@link PolicyUnitDao}. * * @return the dao */
Returns the singleton instance of <code>PolicyUnitDao</code>
getPolicyUnitDao
{ "repo_name": "jtux270/translate", "path": "ovirt/3.6_source/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/DbFacade.java", "license": "gpl-3.0", "size": 42484 }
[ "org.ovirt.engine.core.dao.scheduling.PolicyUnitDao" ]
import org.ovirt.engine.core.dao.scheduling.PolicyUnitDao;
import org.ovirt.engine.core.dao.scheduling.*;
[ "org.ovirt.engine" ]
org.ovirt.engine;
2,876,205
public void add(String key, long value) throws ArgumentNullException, ArgumentException { if(key==null) throw new ArgumentNullException("Key cannot be null.\r\nParameter name: key"); if(this.namedTags.containsKey(key)) throw new ArgumentException("Key already exists."); ...
void function(String key, long value) throws ArgumentNullException, ArgumentException { if(key==null) throw new ArgumentNullException(STR); if(this.namedTags.containsKey(key)) throw new ArgumentException(STR); this.namedTags.put(key, value); }
/** * Add long value against key * @param key to refer element * @param value long to be added in tag dictionary */
Add long value against key
add
{ "repo_name": "joseananio/TayzGrid", "path": "src/tgruntime/src/com/alachisoft/tayzgrid/runtime/caching/NamedTagsDictionary.java", "license": "apache-2.0", "size": 6512 }
[ "com.alachisoft.tayzgrid.runtime.exceptions.ArgumentException", "com.alachisoft.tayzgrid.runtime.exceptions.ArgumentNullException" ]
import com.alachisoft.tayzgrid.runtime.exceptions.ArgumentException; import com.alachisoft.tayzgrid.runtime.exceptions.ArgumentNullException;
import com.alachisoft.tayzgrid.runtime.exceptions.*;
[ "com.alachisoft.tayzgrid" ]
com.alachisoft.tayzgrid;
278,544
protected void endTextObject() throws IOException { if (inTextMode) { inTextMode = false; PSGenerator generator = getGenerator(); generator.writeln("ET"); generator.restoreGraphicsState(); } }
void function() throws IOException { if (inTextMode) { inTextMode = false; PSGenerator generator = getGenerator(); generator.writeln("ET"); generator.restoreGraphicsState(); } }
/** * Indicates the end of a text object. * @throws IOException if an I/O error occurs */
Indicates the end of a text object
endTextObject
{ "repo_name": "spepping/fop-cs", "path": "src/java/org/apache/fop/render/ps/PSPainter.java", "license": "apache-2.0", "size": 18479 }
[ "java.io.IOException", "org.apache.xmlgraphics.ps.PSGenerator" ]
import java.io.IOException; import org.apache.xmlgraphics.ps.PSGenerator;
import java.io.*; import org.apache.xmlgraphics.ps.*;
[ "java.io", "org.apache.xmlgraphics" ]
java.io; org.apache.xmlgraphics;
2,294,741
public ArrayList loadResults(Connection conn) throws DotDataException { if (gotResult == false) { loadResult(conn); } return (results != null) ? results : new ArrayList(); }
ArrayList function(Connection conn) throws DotDataException { if (gotResult == false) { loadResult(conn); } return (results != null) ? results : new ArrayList(); }
/** * Returns the results. * * @return ArrayList */
Returns the results
loadResults
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/dotmarketing/common/db/DotConnect.java", "license": "gpl-3.0", "size": 43436 }
[ "com.dotmarketing.exception.DotDataException", "java.sql.Connection", "java.util.ArrayList" ]
import com.dotmarketing.exception.DotDataException; import java.sql.Connection; import java.util.ArrayList;
import com.dotmarketing.exception.*; import java.sql.*; import java.util.*;
[ "com.dotmarketing.exception", "java.sql", "java.util" ]
com.dotmarketing.exception; java.sql; java.util;
955,914
public static Method getPrivateMethod(Class<?> objectClass, String methodName) throws NoSuchMethodException { Method method = objectClass.getDeclaredMethod(methodName); method.setAccessible(true); return method; }
static Method function(Class<?> objectClass, String methodName) throws NoSuchMethodException { Method method = objectClass.getDeclaredMethod(methodName); method.setAccessible(true); return method; }
/** * Gets private method of a class Invoke the method using * method.invoke(objectInstance, params...) * * Caveat: only find method declared in the current Class, not inherited * from supertypes */
Gets private method of a class Invoke the method using method.invoke(objectInstance, params...) Caveat: only find method declared in the current Class, not inherited from supertypes
getPrivateMethod
{ "repo_name": "CS2103JAN2017-T09-B1/main", "path": "src/test/java/seedu/today/testutil/TestUtil.java", "license": "mit", "size": 16771 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,322,733
public ValueNode getClone() throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(false, "getClone() not expected to be called for " + getClass().getName()); } return null; }
ValueNode function() throws StandardException { if (SanityManager.DEBUG) { SanityManager.ASSERT(false, STR + getClass().getName()); } return null; }
/** * Return a clone of this node. * * @return ValueNode A clone of this node. * * @exception StandardException Thrown on error */
Return a clone of this node
getClone
{ "repo_name": "lpxz/grail-derby104", "path": "java/engine/org/apache/derby/impl/sql/compile/ValueNode.java", "license": "apache-2.0", "size": 44750 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.services.sanity.SanityManager" ]
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.services.sanity.SanityManager;
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.services.sanity.*;
[ "org.apache.derby" ]
org.apache.derby;
318,583
private boolean excludeFromSearchResults(PurchasingAccountsPayableProcessingReport newReport, String activeSelection) { // If the user selects processed by CAMs, we should exclude the GL lines which have no submit amount as the search result if ((KFSConstants.ACTIVE_INDICATOR.equalsIgnoreCase(acti...
boolean function(PurchasingAccountsPayableProcessingReport newReport, String activeSelection) { if ((KFSConstants.ACTIVE_INDICATOR.equalsIgnoreCase(activeSelection) && (newReport.getTransactionLedgerSubmitAmount() == null newReport.getTransactionLedgerSubmitAmount().isZero()))) { return true; } return false; }
/** * To decide if the the given newReport should be added to the search result collection. * * @param newReport * @param activeSelection * @return */
To decide if the the given newReport should be added to the search result collection
excludeFromSearchResults
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/cab/businessobject/lookup/PurApReportLookupableHelperServiceImpl.java", "license": "agpl-3.0", "size": 18931 }
[ "org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableProcessingReport", "org.kuali.kfs.sys.KFSConstants" ]
import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableProcessingReport; import org.kuali.kfs.sys.KFSConstants;
import org.kuali.kfs.module.cab.businessobject.*; import org.kuali.kfs.sys.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,171,613
protected void registerRecordDescriptor(int type, List<RecordDescriptor> recordDescriptors) { typeToDescriptorMap.put(type, recordDescriptors); }
void function(int type, List<RecordDescriptor> recordDescriptors) { typeToDescriptorMap.put(type, recordDescriptors); }
/** * Add the DNS record descriptor objects to the record type to descriptor * mapping. * * @param type the DNS record type. * @param recordDescriptors the DNS record descriptors */
Add the DNS record descriptor objects to the record type to descriptor mapping
registerRecordDescriptor
{ "repo_name": "ChetnaChaudhari/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/BaseServiceRecordProcessor.java", "license": "apache-2.0", "size": 13749 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
970,815
@Override public final void setValidatedNodeType(SqlNode node, RelDataType type) { Objects.requireNonNull(type); Objects.requireNonNull(node); if (type.equals(unknownType)) { // don't set anything until we know what it is, and don't overwrite // a known type with the unknown type return;...
@Override final void function(SqlNode node, RelDataType type) { Objects.requireNonNull(type); Objects.requireNonNull(node); if (type.equals(unknownType)) { return; } nodeToTypeMap.put(node, type); }
/** * Saves the type of a {@link SqlNode}, now that it has been validated. * * <p>Unlike the base class method, this method is not deprecated. * It is available from within Calcite, but is not part of the public API. * * @param node A SQL parse tree node, never null * @param type Its type; must not...
Saves the type of a <code>SqlNode</code>, now that it has been validated. Unlike the base class method, this method is not deprecated. It is available from within Calcite, but is not part of the public API
setValidatedNodeType
{ "repo_name": "julianhyde/calcite", "path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java", "license": "apache-2.0", "size": 234622 }
[ "java.util.Objects", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.sql.SqlNode" ]
import java.util.Objects; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.sql.SqlNode;
import java.util.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,297,906
public boolean resourcesChanged(Collection<IFile> changedFiles) throws AppEngineException { Preconditions.checkNotNull(changedFiles); Preconditions.checkNotNull(descriptorFile); boolean layoutChanged = hasLayoutChanged(changedFiles); // files may be newly exposed or removed boolean hasNewDescriptor =...
boolean function(Collection<IFile> changedFiles) throws AppEngineException { Preconditions.checkNotNull(changedFiles); Preconditions.checkNotNull(descriptorFile); boolean layoutChanged = hasLayoutChanged(changedFiles); boolean hasNewDescriptor = (layoutChanged hasAppEngineDescriptor(changedFiles)) && !descriptorFile.eq...
/** * Update to the set of resource modifications in this project (added, removed, or changed). * Return {@code true} if there were changes. * * @throws AppEngineException when some error occurred parsing or interpreting some relevant file */
Update to the set of resource modifications in this project (added, removed, or changed). Return true if there were changes
resourcesChanged
{ "repo_name": "GoogleCloudPlatform/google-cloud-eclipse", "path": "plugins/com.google.cloud.tools.eclipse.appengine.facets/src/com/google/cloud/tools/eclipse/appengine/facets/ui/navigator/model/AppEngineProjectElement.java", "license": "apache-2.0", "size": 15876 }
[ "com.google.cloud.tools.appengine.AppEngineException", "com.google.common.base.Preconditions", "java.util.Collection", "org.eclipse.core.resources.IFile" ]
import com.google.cloud.tools.appengine.AppEngineException; import com.google.common.base.Preconditions; import java.util.Collection; import org.eclipse.core.resources.IFile;
import com.google.cloud.tools.appengine.*; import com.google.common.base.*; import java.util.*; import org.eclipse.core.resources.*;
[ "com.google.cloud", "com.google.common", "java.util", "org.eclipse.core" ]
com.google.cloud; com.google.common; java.util; org.eclipse.core;
525,452
@Test void checkSetterGetter() { ProgressBar bar = new ProgressBar(10); assertNotNull(bar); bar.setProgress(); bar.setProgress(); bar.setProgress(); bar.setProgress(); bar.setProgress(); assertEquals(4, bar.getProgress()); bar.setText(TEXT)...
void checkSetterGetter() { ProgressBar bar = new ProgressBar(10); assertNotNull(bar); bar.setProgress(); bar.setProgress(); bar.setProgress(); bar.setProgress(); bar.setProgress(); assertEquals(4, bar.getProgress()); bar.setText(TEXT); assertEquals(TEXT, bar.getText()); bar.updateUI(); }
/** * Manually set values and retrieve these values. */
Manually set values and retrieve these values
checkSetterGetter
{ "repo_name": "ottlinger/fotorenamer", "path": "src/test/java/de/aikiit/fotorenamer/gui/ProgressBarTest.java", "license": "apache-2.0", "size": 1755 }
[ "org.junit.jupiter.api.Assertions" ]
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
1,250,617
public static boolean validatePassword(String password, String correctHash) throws NoSuchAlgorithmException, InvalidKeySpecException { return validatePassword(password.toCharArray(), correctHash); }
static boolean function(String password, String correctHash) throws NoSuchAlgorithmException, InvalidKeySpecException { return validatePassword(password.toCharArray(), correctHash); }
/** * Validates a password using a hash. * * @param password the password to check * @param correctHash the hash of the valid password * @return true if the password is correct, false if not */
Validates a password using a hash
validatePassword
{ "repo_name": "AdaptiveMe/adaptive-data-jpa", "path": "src/main/java/me/adaptive/core/data/util/PasswordHash.java", "license": "apache-2.0", "size": 7741 }
[ "java.security.NoSuchAlgorithmException", "java.security.spec.InvalidKeySpecException" ]
import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException;
import java.security.*; import java.security.spec.*;
[ "java.security" ]
java.security;
2,622,941
public boolean contains( final String channelID ) { final Iterator it = channels.iterator( ); while( it.hasNext( ) ) { Channel ch = (Channel)it.next( ); if( channelID.equals( ch.getChannelID( ) ) ) { return true; } ...
boolean function( final String channelID ) { final Iterator it = channels.iterator( ); while( it.hasNext( ) ) { Channel ch = (Channel)it.next( ); if( channelID.equals( ch.getChannelID( ) ) ) { return true; } } return false; }
/** * Check for contains channel. * * @param channelID * * @return true if channel contained */
Check for contains channel
contains
{ "repo_name": "andybalaam/freeguide", "path": "src/freeguide/common/lib/fgspecific/data/TVChannelsSet.java", "license": "gpl-2.0", "size": 7132 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,542,505
public static <IN, OUT> CompletableFuture<OUT> handleAsyncIfNotDone( CompletableFuture<IN> completableFuture, Executor executor, BiFunction<? super IN, Throwable, ? extends OUT> handler) { return completableFuture.isDone() ? completableFuture.handle(handle...
static <IN, OUT> CompletableFuture<OUT> function( CompletableFuture<IN> completableFuture, Executor executor, BiFunction<? super IN, Throwable, ? extends OUT> handler) { return completableFuture.isDone() ? completableFuture.handle(handler) : completableFuture.handleAsync(handler, executor); }
/** * This function takes a {@link CompletableFuture} and a handler function for the result of this * future. If the input future is already done, this function returns {@link * CompletableFuture#handle(BiFunction)}. Otherwise, the return value is {@link * CompletableFuture#handleAsync(BiFunction, E...
This function takes a <code>CompletableFuture</code> and a handler function for the result of this future. If the input future is already done, this function returns <code>CompletableFuture#handle(BiFunction)</code>. Otherwise, the return value is <code>CompletableFuture#handleAsync(BiFunction, Executor)</code> with th...
handleAsyncIfNotDone
{ "repo_name": "kl0u/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java", "license": "apache-2.0", "size": 57033 }
[ "java.util.concurrent.CompletableFuture", "java.util.concurrent.Executor", "java.util.function.BiFunction" ]
import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; import java.util.function.BiFunction;
import java.util.concurrent.*; import java.util.function.*;
[ "java.util" ]
java.util;
2,400,273
Acceptor createAcceptor(String name, ClusterConnection clusterConnection, Map<String, Object> configuration, BufferHandler handler, ConnectionLifeCycleListener listener, Executor thr...
Acceptor createAcceptor(String name, ClusterConnection clusterConnection, Map<String, Object> configuration, BufferHandler handler, ConnectionLifeCycleListener listener, Executor threadPool, ScheduledExecutorService scheduledThreadPool, Map<String, ProtocolManager> protocolMap);
/** * Create a new instance of an Acceptor. * * @param name the name of the acceptor * @param configuration the configuration * @param handler the handler * @param listener the listener * @param threadPool the threadpool * @param sched...
Create a new instance of an Acceptor
createAcceptor
{ "repo_name": "ryanemerson/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/AcceptorFactory.java", "license": "apache-2.0", "size": 2252 }
[ "java.util.Map", "java.util.concurrent.Executor", "java.util.concurrent.ScheduledExecutorService", "org.apache.activemq.artemis.core.server.cluster.ClusterConnection", "org.apache.activemq.artemis.spi.core.protocol.ProtocolManager" ]
import java.util.Map; import java.util.concurrent.Executor; import java.util.concurrent.ScheduledExecutorService; import org.apache.activemq.artemis.core.server.cluster.ClusterConnection; import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
import java.util.*; import java.util.concurrent.*; import org.apache.activemq.artemis.core.server.cluster.*; import org.apache.activemq.artemis.spi.core.protocol.*;
[ "java.util", "org.apache.activemq" ]
java.util; org.apache.activemq;
943,496
private void broadcastUpdate(final String action) { final Intent fwDownloadIntent = new Intent(action); sendBroadcast(fwDownloadIntent); }
void function(final String action) { final Intent fwDownloadIntent = new Intent(action); sendBroadcast(fwDownloadIntent); }
/** * Update firmware download progress information. * * @param action used for filtering. */
Update firmware download progress information
broadcastUpdate
{ "repo_name": "sevencore/BLEFOTA", "path": "blefotalib/src/main/java/kr/co/sevencore/blefotalib/BflFwDownloadService.java", "license": "gpl-2.0", "size": 22210 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
2,438,831
public void onEntry(Object pojo, Member method, Object[] args) { // Nothing to do in the default implementation }
void function(Object pojo, Member method, Object[] args) { }
/** * Callback method called when a method will be invoked. * This default implementation does nothing. * @param pojo the pojo on which the method is called. * @param method the method invoked. * @param args the arguments array. * @see MethodInterceptor#onEntry(Object, Method, Object...
Callback method called when a method will be invoked. This default implementation does nothing
onEntry
{ "repo_name": "boneman1231/org.apache.felix", "path": "trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/PrimitiveHandler.java", "license": "apache-2.0", "size": 9693 }
[ "java.lang.reflect.Member" ]
import java.lang.reflect.Member;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,188,031
private String getGroupKey(long rawKey) { int cardinality = _cardinalities[0]; StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].get((int) (rawKey % cardinality)).toString()); rawKey /= cardinality; for (int i = 1; i < _numGroupByExpressions; i++) { groupKeyBuilder.append(Aggreg...
String function(long rawKey) { int cardinality = _cardinalities[0]; StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].get((int) (rawKey % cardinality)).toString()); rawKey /= cardinality; for (int i = 1; i < _numGroupByExpressions; i++) { groupKeyBuilder.append(AggregationGroupByTrimmingService.GROUP_K...
/** * Helper method to get group key from raw key. * * @param rawKey Long raw key * @return String group key */
Helper method to get group key from raw key
getGroupKey
{ "repo_name": "apucher/pinot", "path": "pinot-core/src/main/java/com/linkedin/pinot/core/query/aggregation/groupby/DictionaryBasedGroupKeyGenerator.java", "license": "apache-2.0", "size": 27198 }
[ "it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap" ]
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import it.unimi.dsi.fastutil.objects.*;
[ "it.unimi.dsi" ]
it.unimi.dsi;
512,953
public void marshal(java.io.Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); } //-- void marshal(java.io.Writer)
void function(java.io.Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); }
/** * Method marshal * * @param out */
Method marshal
marshal
{ "repo_name": "brandt/GridSphere", "path": "src/org/gridsphere/portletcontainer/impl/descriptor/TitleType.java", "license": "apache-2.0", "size": 3386 }
[ "org.exolab.castor.xml.Marshaller" ]
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.*;
[ "org.exolab.castor" ]
org.exolab.castor;
1,720,183
private void postStatusUpdateIntent() { sendBroadcast(new Intent(ACTION_PLAYER_STATUS_CHANGED)); }
void function() { sendBroadcast(new Intent(ACTION_PLAYER_STATUS_CHANGED)); }
/** * Send ACTION_PLAYER_STATUS_CHANGED without changing the status attribute. */
Send ACTION_PLAYER_STATUS_CHANGED without changing the status attribute
postStatusUpdateIntent
{ "repo_name": "SpicyCurry/AntennaPod", "path": "core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java", "license": "mit", "size": 50054 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
775,452
private void exportScheduledTransactions(XmlSerializer xmlSerializer) throws IOException{ //for now we will export only scheduled transactions to XML Cursor cursor = mScheduledActionDbAdapter.fetchAllRecords( ScheduledActionEntry.COLUMN_TYPE + "=?", new String[]{ScheduledAction.Actio...
void function(XmlSerializer xmlSerializer) throws IOException{ Cursor cursor = mScheduledActionDbAdapter.fetchAllRecords( ScheduledActionEntry.COLUMN_TYPE + "=?", new String[]{ScheduledAction.ActionType.TRANSACTION.name()}); while (cursor.moveToNext()) { String actionUID = cursor.getString(cursor.getColumnIndexOrThrow(...
/** * Serializes {@link ScheduledAction}s from the database to XML * @param xmlSerializer XML serializer * @throws IOException */
Serializes <code>ScheduledAction</code>s from the database to XML
exportScheduledTransactions
{ "repo_name": "meg23/gnucash-android", "path": "app/src/main/java/org/gnucash/android/export/xml/GncXmlExporter.java", "license": "apache-2.0", "size": 39617 }
[ "android.database.Cursor", "java.io.IOException", "java.sql.Timestamp", "org.gnucash.android.db.DatabaseSchema", "org.gnucash.android.db.TransactionsDbAdapter", "org.gnucash.android.model.Account", "org.gnucash.android.model.PeriodType", "org.gnucash.android.model.ScheduledAction", "org.xmlpull.v1.X...
import android.database.Cursor; import java.io.IOException; import java.sql.Timestamp; import org.gnucash.android.db.DatabaseSchema; import org.gnucash.android.db.TransactionsDbAdapter; import org.gnucash.android.model.Account; import org.gnucash.android.model.PeriodType; import org.gnucash.android.model.ScheduledActio...
import android.database.*; import java.io.*; import java.sql.*; import org.gnucash.android.db.*; import org.gnucash.android.model.*; import org.xmlpull.v1.*;
[ "android.database", "java.io", "java.sql", "org.gnucash.android", "org.xmlpull.v1" ]
android.database; java.io; java.sql; org.gnucash.android; org.xmlpull.v1;
2,626,648
public void runWhenNextVisible() { // if there is one already: toggling twice is the identity if (editor.fFoldingRunner != null) { editor.fFoldingRunner.cancel(); return; } IWorkbenchPartSite site= editor.getSite(); if (site != null) { IWor...
void function() { if (editor.fFoldingRunner != null) { editor.fFoldingRunner.cancel(); return; } IWorkbenchPartSite site= editor.getSite(); if (site != null) { IWorkbenchPage page= site.getPage(); if (!page.isPartVisible(editor)) { fPage= page; editor.fFoldingRunner= this; page.addPartListener(this); return; } } toggle...
/** * Makes sure that the editor's folding state is correct the next time * it becomes visible. If it already is visible, it toggles the folding * state. If not, it either registers a part listener to toggle folding * when the editor becomes visible, or cancels an already registered * runner. ...
Makes sure that the editor's folding state is correct the next time it becomes visible. If it already is visible, it toggles the folding state. If not, it either registers a part listener to toggle folding when the editor becomes visible, or cancels an already registered runner
runWhenNextVisible
{ "repo_name": "rohitmohan96/ceylon-ide-eclipse", "path": "plugins/com.redhat.ceylon.eclipse.ui/src/com/redhat/ceylon/eclipse/code/editor/ToggleFoldingRunner.java", "license": "epl-1.0", "size": 3773 }
[ "org.eclipse.ui.IWorkbenchPage", "org.eclipse.ui.IWorkbenchPartSite" ]
import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.*;
[ "org.eclipse.ui" ]
org.eclipse.ui;
795,772
public Activity newActivity(Class<?> clazz, Context context, IBinder token, Application application, Intent intent, ActivityInfo info, CharSequence title, Activity parent, String id, Object lastNonConfigurationInstance) throws InstantiationException, IllegalAccessE...
Activity function(Class<?> clazz, Context context, IBinder token, Application application, Intent intent, ActivityInfo info, CharSequence title, Activity parent, String id, Object lastNonConfigurationInstance) throws InstantiationException, IllegalAccessException { Activity activity = (Activity)clazz.newInstance(); Act...
/** * Perform instantiation of an {@link Activity} object. This method is intended for use with * unit tests, such as android.test.ActivityUnitTestCase. The activity will be useable * locally but will be missing some of the linkages necessary for use within the sytem. * * @param clazz The Cl...
Perform instantiation of an <code>Activity</code> object. This method is intended for use with unit tests, such as android.test.ActivityUnitTestCase. The activity will be useable locally but will be missing some of the linkages necessary for use within the sytem
newActivity
{ "repo_name": "ketanbj/eapps", "path": "android/frameworks/base/core/java/android/app/Instrumentation.java", "license": "mit", "size": 77837 }
[ "android.content.Context", "android.content.Intent", "android.content.pm.ActivityInfo", "android.content.res.Configuration", "android.os.IBinder" ]
import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.os.IBinder;
import android.content.*; import android.content.pm.*; import android.content.res.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
2,363,325
Element<Corner> previous( Element<Corner> e ) { if (e.prev == null) { return list.getTail(); } else { return e.prev; } }
Element<Corner> previous( Element<Corner> e ) { if (e.prev == null) { return list.getTail(); } else { return e.prev; } }
/** * Returns the previous corner in the list */
Returns the previous corner in the list
previous
{ "repo_name": "lessthanoptimal/BoofCV", "path": "main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/PolylineSplitMerge.java", "license": "apache-2.0", "size": 29914 }
[ "org.ddogleg.struct.DogLinkedList" ]
import org.ddogleg.struct.DogLinkedList;
import org.ddogleg.struct.*;
[ "org.ddogleg.struct" ]
org.ddogleg.struct;
1,080,353
public static void fill( final int[][] array, final int value ) { for ( int i = array.length; i-- != 0; ) Arrays.fill( array[ i ], value ); }
static void function( final int[][] array, final int value ) { for ( int i = array.length; i-- != 0; ) Arrays.fill( array[ i ], value ); }
/** Fills the given big array with the given value. * * <P>This method uses a backward loop. It is significantly faster than the corresponding method in {@link Arrays}. * * @param array a big array. * @param value the new value for all elements of the big array. */
Fills the given big array with the given value. This method uses a backward loop. It is significantly faster than the corresponding method in <code>Arrays</code>
fill
{ "repo_name": "tommyettinger/doughyo", "path": "src/main/java/vigna/fastutil/ints/IntBigArrays.java", "license": "apache-2.0", "size": 50205 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,233,637
Future<RestfulCollection<ActivityEntry>> getActivityEntries(UserId userId, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, Set<String> activityIds, SecurityToken token) throws ProtocolException;
Future<RestfulCollection<ActivityEntry>> getActivityEntries(UserId userId, GroupId groupId, String appId, Set<String> fields, CollectionOptions options, Set<String> activityIds, SecurityToken token) throws ProtocolException;
/** * Returns a set of activities for the passed in user and group that corresponds to a list of * activityIds. * * @param userId The set of ids of the people to fetch activities for. * @param groupId Indicates whether to fetch activities for a group. * @param appId The app id. * @pa...
Returns a set of activities for the passed in user and group that corresponds to a list of activityIds
getActivityEntries
{ "repo_name": "hoatle/gatein-shindig", "path": "extras/src/main/java/org/apache/shindig/extras/as/opensocial/spi/ActivityStreamService.java", "license": "apache-2.0", "size": 5325 }
[ "java.util.Set", "java.util.concurrent.Future", "org.apache.shindig.auth.SecurityToken", "org.apache.shindig.extras.as.opensocial.model.ActivityEntry", "org.apache.shindig.protocol.ProtocolException", "org.apache.shindig.protocol.RestfulCollection", "org.apache.shindig.social.opensocial.spi.CollectionOp...
import java.util.Set; import java.util.concurrent.Future; import org.apache.shindig.auth.SecurityToken; import org.apache.shindig.extras.as.opensocial.model.ActivityEntry; import org.apache.shindig.protocol.ProtocolException; import org.apache.shindig.protocol.RestfulCollection; import org.apache.shindig.social.opensoc...
import java.util.*; import java.util.concurrent.*; import org.apache.shindig.auth.*; import org.apache.shindig.extras.as.opensocial.model.*; import org.apache.shindig.protocol.*; import org.apache.shindig.social.opensocial.spi.*;
[ "java.util", "org.apache.shindig" ]
java.util; org.apache.shindig;
2,781,807
public final void setDynamicLayerInfos(DynamicLayerInfo[] dynamicLayerInfos) { _setDynamicLayerInfos(Util.objectArrayToJSO(dynamicLayerInfos)); }
final void function(DynamicLayerInfo[] dynamicLayerInfos) { _setDynamicLayerInfos(Util.objectArrayToJSO(dynamicLayerInfos)); }
/** * Specify an array of DynamicLayerInfos used to change the layer ordering or to redefine the map. (As of v2.7) * * @param dynamicLayerInfos - An array of dynamic layer infos. */
Specify an array of DynamicLayerInfos used to change the layer ordering or to redefine the map. (As of v2.7)
setDynamicLayerInfos
{ "repo_name": "CSTARS/gwt-esri", "path": "src/main/java/edu/ucdavis/cstars/client/layers/ArcGISDynamicMapServiceLayer.java", "license": "lgpl-3.0", "size": 25196 }
[ "edu.ucdavis.cstars.client.Util" ]
import edu.ucdavis.cstars.client.Util;
import edu.ucdavis.cstars.client.*;
[ "edu.ucdavis.cstars" ]
edu.ucdavis.cstars;
713,442
public synchronized IComment editLocalInstructionComment(final INaviCodeNode node, final INaviInstruction instruction, final IComment comment, final String commentText) throws CouldntSaveDataException { Preconditions.checkNotNull(instruction, "IE00100: Instruction argument can not be null"); retur...
synchronized IComment function(final INaviCodeNode node, final INaviInstruction instruction, final IComment comment, final String commentText) throws CouldntSaveDataException { Preconditions.checkNotNull(instruction, STR); return editComment(new InstructionCommentingStrategy(instruction, node, CommentScope.LOCAL), comm...
/** * Edits a local comment associated to an instruction. * * @param node The code node where the instruction is located in. * @param instruction The instruction whose local comment is edited. * @param comment The comment which is edited. * @param commentText The comment text to be inserted into the c...
Edits a local comment associated to an instruction
editLocalInstructionComment
{ "repo_name": "aeppert/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/CommentManager.java", "license": "apache-2.0", "size": 127063 }
[ "com.google.common.base.Preconditions", "com.google.security.zynamics.binnavi.Database", "com.google.security.zynamics.binnavi.Gui" ]
import com.google.common.base.Preconditions; import com.google.security.zynamics.binnavi.Database; import com.google.security.zynamics.binnavi.Gui;
import com.google.common.base.*; import com.google.security.zynamics.binnavi.*;
[ "com.google.common", "com.google.security" ]
com.google.common; com.google.security;
2,333,517
private CustomCheckBox addCheckBox(Composite parent, String title){ //create the checkBox CustomCheckBox checkbox = new CustomCheckBox(parent, SWT.NONE, "NewXPageDialog.AddDataSource.Checkbox"); // $NON-NLS-1$ checkbox.setText(title); GridData span = SWTLayoutUtils.createGDFillHorizo...
CustomCheckBox function(Composite parent, String title){ CustomCheckBox checkbox = new CustomCheckBox(parent, SWT.NONE, STR); checkbox.setText(title); GridData span = SWTLayoutUtils.createGDFillHorizontal(); span.horizontalSpan = 2; checkbox.setLayoutData(span); return checkbox; }
/** * This method creates a custom checkBox with a given title as a child of a parent Composite * @param parent - the parent composite to add the checkBox to * @param title - the label to give the checkBox * @return a CustomCheckBox that has been added as a child of the parent Composite with an appr...
This method creates a custom checkBox with a given title as a child of a parent Composite
addCheckBox
{ "repo_name": "paulswithers/XPagesExtensionLibrary", "path": "extlib-des/lwp/product/design/eclipse/plugins/com.ibm.xsp.extlib.designer.tooling/src/com/ibm/xsp/extlib/designer/tooling/palette/dojoform/SliderDropDialog.java", "license": "apache-2.0", "size": 9733 }
[ "com.ibm.commons.swt.SWTLayoutUtils", "com.ibm.commons.swt.controls.custom.CustomCheckBox", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.widgets.Composite" ]
import com.ibm.commons.swt.SWTLayoutUtils; import com.ibm.commons.swt.controls.custom.CustomCheckBox; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite;
import com.ibm.commons.swt.*; import com.ibm.commons.swt.controls.custom.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "com.ibm.commons", "org.eclipse.swt" ]
com.ibm.commons; org.eclipse.swt;
2,408,343
private String parseMessage(String message, GVBuffer gvBuffer, Map<String, Object> params) throws PropertiesHandlerException { MessageFormatter messageFormatter = new MessageFormatter(PropertiesHandler.expand(message, params, gvBuffer), gvBuffer, escapeHTMLInGVBufferFields); ret...
String function(String message, GVBuffer gvBuffer, Map<String, Object> params) throws PropertiesHandlerException { MessageFormatter messageFormatter = new MessageFormatter(PropertiesHandler.expand(message, params, gvBuffer), gvBuffer, escapeHTMLInGVBufferFields); return messageFormatter.toString(); }
/** * Parses the text message applying the substitutions. * * @param messageText * the template message. * @param gvBuffer * the input buffer * @return the message parsed. * @throws PropertiesHandlerException */
Parses the text message applying the substitutions
parseMessage
{ "repo_name": "green-vulcano/gv-legacy", "path": "gvlegacy/gvvcl-mail/src/main/java/it/greenvulcano/gvesb/virtual/smtp/SMTPCallOperation.java", "license": "lgpl-3.0", "size": 28730 }
[ "it.greenvulcano.gvesb.buffer.GVBuffer", "it.greenvulcano.gvesb.utils.MessageFormatter", "it.greenvulcano.util.metadata.PropertiesHandler", "it.greenvulcano.util.metadata.PropertiesHandlerException", "java.util.Map" ]
import it.greenvulcano.gvesb.buffer.GVBuffer; import it.greenvulcano.gvesb.utils.MessageFormatter; import it.greenvulcano.util.metadata.PropertiesHandler; import it.greenvulcano.util.metadata.PropertiesHandlerException; import java.util.Map;
import it.greenvulcano.gvesb.buffer.*; import it.greenvulcano.gvesb.utils.*; import it.greenvulcano.util.metadata.*; import java.util.*;
[ "it.greenvulcano.gvesb", "it.greenvulcano.util", "java.util" ]
it.greenvulcano.gvesb; it.greenvulcano.util; java.util;
988,203
private List<String> checkResources(Sheet sheet) { ArrayList<String> errors = new ArrayList<String>(); for (int i = 1; i <= sheet.getLastRowNum(); i++) { Row row = sheet.getRow(i); if (isRowEmpty(row)) continue; String type = ""; if (row.getCell(RESOURCE_ID).getCellType() != CellType.NUMER...
List<String> function(Sheet sheet) { ArrayList<String> errors = new ArrayList<String>(); for (int i = 1; i <= sheet.getLastRowNum(); i++) { Row row = sheet.getRow(i); if (isRowEmpty(row)) continue; String type = STRResource in row STR has missing or invalid id.STRResource in row STR has missing or invalid type.STRResou...
/** * Checks the resources sheet to find any parse errors. * * @param sheet the resources sheet * * @return the list of error messages */
Checks the resources sheet to find any parse errors
checkResources
{ "repo_name": "ptgrogan/spacenet", "path": "src/main/java/edu/mit/spacenet/data/Spreadsheet_2_5.java", "license": "apache-2.0", "size": 99299 }
[ "java.util.ArrayList", "java.util.List", "org.apache.poi.ss.usermodel.Row", "org.apache.poi.ss.usermodel.Sheet" ]
import java.util.ArrayList; import java.util.List; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet;
import java.util.*; import org.apache.poi.ss.usermodel.*;
[ "java.util", "org.apache.poi" ]
java.util; org.apache.poi;
461,938
protected BufferedImage toImage(GL2 gl, int w, int h) { gl.glReadBuffer(GL.GL_FRONT); // or GL.GL_BACK ByteBuffer glBB = Buffers.newDirectByteBuffer(4 * w * h); gl.glReadPixels(0, 0, w, h, GL2.GL_BGRA, GL.GL_BYTE, glBB); BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE...
BufferedImage function(GL2 gl, int w, int h) { gl.glReadBuffer(GL.GL_FRONT); ByteBuffer glBB = Buffers.newDirectByteBuffer(4 * w * h); gl.glReadPixels(0, 0, w, h, GL2.GL_BGRA, GL.GL_BYTE, glBB); BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_BGR); int[] bd = ((DataBufferInt) bi.getRaster().getDataBuf...
/** * Turns gl to BufferedImage with fixed format * * @param gl * @param w * @param h * @return */
Turns gl to BufferedImage with fixed format
toImage
{ "repo_name": "SensorsINI/jaer", "path": "src/net/sf/jaer/util/avioutput/AbstractAviWriter.java", "license": "lgpl-2.1", "size": 30204 }
[ "com.jogamp.common.nio.Buffers", "java.awt.image.BufferedImage", "java.awt.image.DataBufferInt", "java.nio.ByteBuffer" ]
import com.jogamp.common.nio.Buffers; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; import java.nio.ByteBuffer;
import com.jogamp.common.nio.*; import java.awt.image.*; import java.nio.*;
[ "com.jogamp.common", "java.awt", "java.nio" ]
com.jogamp.common; java.awt; java.nio;
1,787,830
public static ChangeData createForTest(Change.Id id, int currentPatchSetId) { ChangeData cd = new ChangeData(null, null, null, null, null, null, null, null, null, null, null, null, null, id); cd.currentPatchSet = new PatchSet(new PatchSet.Id(id, currentPatchSetId)); return cd; } private final...
static ChangeData function(Change.Id id, int currentPatchSetId) { ChangeData cd = new ChangeData(null, null, null, null, null, null, null, null, null, null, null, null, null, id); cd.currentPatchSet = new PatchSet(new PatchSet.Id(id, currentPatchSetId)); return cd; } private final ReviewDb db; private final GitReposito...
/** * Create an instance for testing only. * <p> * Attempting to lazy load data will fail with NPEs. Callers may consider * manually setting fields that can be set. * * @param id change ID * @return instance for testing. */
Create an instance for testing only. Attempting to lazy load data will fail with NPEs. Callers may consider manually setting fields that can be set
createForTest
{ "repo_name": "renchaorevee/gerrit", "path": "gerrit-server/src/main/java/com/google/gerrit/server/query/change/ChangeData.java", "license": "apache-2.0", "size": 26390 }
[ "com.google.common.collect.ListMultimap", "com.google.gerrit.common.data.SubmitRecord", "com.google.gerrit.reviewdb.client.Account", "com.google.gerrit.reviewdb.client.Change", "com.google.gerrit.reviewdb.client.ChangeMessage", "com.google.gerrit.reviewdb.client.PatchLineComment", "com.google.gerrit.rev...
import com.google.common.collect.ListMultimap; import com.google.gerrit.common.data.SubmitRecord; import com.google.gerrit.reviewdb.client.Account; import com.google.gerrit.reviewdb.client.Change; import com.google.gerrit.reviewdb.client.ChangeMessage; import com.google.gerrit.reviewdb.client.PatchLineComment; import c...
import com.google.common.collect.*; import com.google.gerrit.common.data.*; import com.google.gerrit.reviewdb.client.*; import com.google.gerrit.reviewdb.server.*; import com.google.gerrit.server.*; import com.google.gerrit.server.change.*; import com.google.gerrit.server.git.*; import com.google.gerrit.server.notedb.*...
[ "com.google.common", "com.google.gerrit", "com.google.inject", "java.util", "org.eclipse.jgit" ]
com.google.common; com.google.gerrit; com.google.inject; java.util; org.eclipse.jgit;
230,454
protected CmsMessages getMessageBundle(String bundleName, Locale locale) throws IOException { if (Locale.ENGLISH.equals(locale)) { return new CmsMessages(bundleName, locale); } String source = getMessageBundleSourceName(bundleName, locale); String fileName = CmsStringUti...
CmsMessages function(String bundleName, Locale locale) throws IOException { if (Locale.ENGLISH.equals(locale)) { return new CmsMessages(bundleName, locale); } String source = getMessageBundleSourceName(bundleName, locale); String fileName = CmsStringUtil.substitute(bundleName, ".", "/") + "_" + locale.toString() + STR;...
/** * Prepares the test for the given bundle and locale and * returns a message bundle that DOES NOT include the default keys.<p> * * @param bundleName the resource bundle to prepare * @param locale the locale to prepare the resource bundle for * * @return a message bundle that DOES N...
Prepares the test for the given bundle and locale and returns a message bundle that DOES NOT include the default keys
getMessageBundle
{ "repo_name": "victos/opencms-core", "path": "test/org/opencms/i18n/TestCmsMessageBundles.java", "license": "lgpl-2.1", "size": 22200 }
[ "java.io.IOException", "java.util.Locale", "org.opencms.test.OpenCmsTestProperties", "org.opencms.util.CmsFileUtil", "org.opencms.util.CmsStringUtil" ]
import java.io.IOException; import java.util.Locale; import org.opencms.test.OpenCmsTestProperties; import org.opencms.util.CmsFileUtil; import org.opencms.util.CmsStringUtil;
import java.io.*; import java.util.*; import org.opencms.test.*; import org.opencms.util.*;
[ "java.io", "java.util", "org.opencms.test", "org.opencms.util" ]
java.io; java.util; org.opencms.test; org.opencms.util;
669,775
@Override public int indexOf(DOM pItemDOM) { throw new ExInternal("JITMapSet cannot return the index of an item"); }
int function(DOM pItemDOM) { throw new ExInternal(STR); }
/** * JITMapSet doesn't store a list of entries like DOMMapSets do, so cannot find an index. Calling this will throw an * exception. * @param pItemDOM * @return * @throws ExInternal as it cannot return an item index */
JITMapSet doesn't store a list of entries like DOMMapSets do, so cannot find an index. Calling this will throw an exception
indexOf
{ "repo_name": "Fivium/FOXopen", "path": "src/main/java/net/foxopen/fox/module/mapset/JITMapSet.java", "license": "gpl-3.0", "size": 10866 }
[ "net.foxopen.fox.ex.ExInternal" ]
import net.foxopen.fox.ex.ExInternal;
import net.foxopen.fox.ex.*;
[ "net.foxopen.fox" ]
net.foxopen.fox;
2,145,143
@Override public Object exec(Tuple input) throws IOException { if (!valueLoaded) { if (input == null || input.size() == 0) { valueLoaded = true; return null; } int pos; if (inputBuffer != null) { ...
Object function(Tuple input) throws IOException { if (!valueLoaded) { if (input == null input.size() == 0) { valueLoaded = true; return null; } int pos; if (inputBuffer != null) { pos = DataType.toInteger(input.get(0)); scalarfilename = DataType.toString(input.get(1)); DataBag inputBag = inputBuffer.get(scalarfilename)...
/** * Java level API * * @param input * expects a single constant that is the name of the file to be * read */
Java level API
exec
{ "repo_name": "wenbingYu/pig-source", "path": "src/org/apache/pig/impl/builtin/ReadScalars.java", "license": "apache-2.0", "size": 4967 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.pig.backend.executionengine.ExecException", "org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRConfiguration", "org.apache.pig.data.DataBag", "org.apache.pig.data.DataType", "org.apache.pig.data.Tuple", "org.apache...
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.pig.backend.executionengine.ExecException; import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRConfiguration; import org.apache.pig.data.DataBag; import org.apache.pig.data.DataType; import org.apache.pig.data.T...
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.pig.backend.executionengine.*; import org.apache.pig.backend.hadoop.executionengine.*; import org.apache.pig.data.*; import org.apache.pig.impl.io.*; import org.apache.pig.impl.util.*;
[ "java.io", "org.apache.hadoop", "org.apache.pig" ]
java.io; org.apache.hadoop; org.apache.pig;
385,351
public static ObjectId computeChangeId(final ObjectId treeId, final ObjectId firstParentId, final PersonIdent author, final PersonIdent committer, final String message) throws IOException { String cleanMessage = clean(message); if (cleanMessage.length() == 0) return null; StringBuilder b = new Stri...
static ObjectId function(final ObjectId treeId, final ObjectId firstParentId, final PersonIdent author, final PersonIdent committer, final String message) throws IOException { String cleanMessage = clean(message); if (cleanMessage.length() == 0) return null; StringBuilder b = new StringBuilder(); b.append(STR); b.appen...
/** * Compute a Change-Id. * * @param treeId * The id of the tree that would be committed * @param firstParentId * parent id of previous commit or null * @param author * the {@link PersonIdent} for the presumed author and time * @param committer * the {@li...
Compute a Change-Id
computeChangeId
{ "repo_name": "DanielliUrbieta/ProjetoHidraWS", "path": "src/org/eclipse/jgit/util/ChangeIdUtil.java", "license": "gpl-2.0", "size": 10096 }
[ "java.io.IOException", "java.util.regex.Pattern", "org.eclipse.jgit.lib.Constants", "org.eclipse.jgit.lib.ObjectId", "org.eclipse.jgit.lib.ObjectInserter", "org.eclipse.jgit.lib.PersonIdent" ]
import java.io.IOException; import java.util.regex.Pattern; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectInserter; import org.eclipse.jgit.lib.PersonIdent;
import java.io.*; import java.util.regex.*; import org.eclipse.jgit.lib.*;
[ "java.io", "java.util", "org.eclipse.jgit" ]
java.io; java.util; org.eclipse.jgit;
985,708
private void createLeftQuad() { Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); // This color creates a blue value image. The effect will have a strength of 80% (set by the alpha value). material.setColor("Color", new ColorRGBA(0f, 0f, 1f, 0.8f)); ...
void function() { Material material = new Material(assetManager, STR); material.setColor("Color", new ColorRGBA(0f, 0f, 1f, 0.8f)); material.getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Custom); material.getAdditionalRenderState().setBlendEquation(RenderState.BlendEquation.Subtract); material.getAdditi...
/** * Adds a "transparent" quad to the scene, that shows an inverse blue value sight of the scene behind. */
Adds a "transparent" quad to the scene, that shows an inverse blue value sight of the scene behind
createLeftQuad
{ "repo_name": "atomixnmc/jmonkeyengine", "path": "jme3-examples/src/main/java/jme3test/renderer/TestBlendEquations.java", "license": "bsd-3-clause", "size": 6073 }
[ "com.jme3.material.Material", "com.jme3.material.RenderState", "com.jme3.math.ColorRGBA", "com.jme3.renderer.queue.RenderQueue", "com.jme3.scene.Geometry", "com.jme3.scene.shape.Quad" ]
import com.jme3.material.Material; import com.jme3.material.RenderState; import com.jme3.math.ColorRGBA; import com.jme3.renderer.queue.RenderQueue; import com.jme3.scene.Geometry; import com.jme3.scene.shape.Quad;
import com.jme3.material.*; import com.jme3.math.*; import com.jme3.renderer.queue.*; import com.jme3.scene.*; import com.jme3.scene.shape.*;
[ "com.jme3.material", "com.jme3.math", "com.jme3.renderer", "com.jme3.scene" ]
com.jme3.material; com.jme3.math; com.jme3.renderer; com.jme3.scene;
2,064,889
public static final FieldInfo forField(final Field field) { return new FieldInfo(field.getType().getCanonicalName(), field.getName()); }
static final FieldInfo function(final Field field) { return new FieldInfo(field.getType().getCanonicalName(), field.getName()); }
/** * Generates field information for the specified field. * * @param field * the field to analyze. * @return the generated information. */
Generates field information for the specified field
forField
{ "repo_name": "SHAF-WORK/shaf", "path": "core/src/main/java/org/shaf/core/content/FieldInfo.java", "license": "apache-2.0", "size": 4065 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,657,492
public void setUp() throws Exception { m_group = new WikiGroup(); }
void function() throws Exception { m_group = new WikiGroup(); }
/** * DOCUMENT ME! * * @throws Exception DOCUMENT ME! */
DOCUMENT ME
setUp
{ "repo_name": "hgschmie/EyeWiki", "path": "src/test/de/softwareforge/eyewiki/auth/WikiGroupTest.java", "license": "lgpl-2.1", "size": 6529 }
[ "de.softwareforge.eyewiki.auth.WikiGroup" ]
import de.softwareforge.eyewiki.auth.WikiGroup;
import de.softwareforge.eyewiki.auth.*;
[ "de.softwareforge.eyewiki" ]
de.softwareforge.eyewiki;
893,357
public void onMotionEvent(MotionEvent event) { final int action = event.getActionMasked(); switch (action) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_POINTER_DOWN: { final int pointerId = event.getPointerId(event.getActionI...
void function(MotionEvent event) { final int action = event.getActionMasked(); switch (action) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_POINTER_DOWN: { final int pointerId = event.getPointerId(event.getActionIndex()); final int pointerFlag = (1 << pointerId); mInjectedPointersDown = pointerFlag; mLastInj...
/** * Processes an injected {@link MotionEvent} event. * * @param event The event to process. */
Processes an injected <code>MotionEvent</code> event
onMotionEvent
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/com/android/server/accessibility/TouchExplorer.java", "license": "apache-2.0", "size": 83058 }
[ "android.util.Slog", "android.view.MotionEvent" ]
import android.util.Slog; import android.view.MotionEvent;
import android.util.*; import android.view.*;
[ "android.util", "android.view" ]
android.util; android.view;
1,010,598
private int getInt() throws IOException { int mult = 1; int val = tkn.nextToken(); if (tkn.sval != null && tkn.sval.equals("-")) { mult = -1; val = tkn.nextToken(); } if (val != StreamTokenizer.TT_NUMBER) { if (tkn.sval...
int function() throws IOException { int mult = 1; int val = tkn.nextToken(); if (tkn.sval != null && tkn.sval.equals("-")) { mult = -1; val = tkn.nextToken(); } if (val != StreamTokenizer.TT_NUMBER) { if (tkn.sval == null) { System.err.println(STR + tkn.lineno()); System.exit(1); } String str = tkn.sval.toLowerCase(Loc...
/** * Read an int from the command file * Negative numbers are preceded by "-" */
Read an int from the command file Negative numbers are preceded by "-"
getInt
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/tools/src/testing/java/com/pivotal/gemfirexd/internal/impl/drda/TestProto.java", "license": "apache-2.0", "size": 37042 }
[ "java.io.IOException", "java.io.StreamTokenizer", "java.util.Locale" ]
import java.io.IOException; import java.io.StreamTokenizer; import java.util.Locale;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
294,306
private void registerAvroSchemas(SchemaProvider schemaProvider) { // register the schemas, so that shuffle does not serialize the full schemas if (null != schemaProvider) { List<Schema> schemas = Arrays.asList(schemaProvider.getSourceSchema(), schemaProvider.getTargetSchema()); log.info("Registeri...
void function(SchemaProvider schemaProvider) { if (null != schemaProvider) { List<Schema> schemas = Arrays.asList(schemaProvider.getSourceSchema(), schemaProvider.getTargetSchema()); log.info(STR + schemas); jssc.sc().getConf().registerAvroSchemas(JavaConversions.asScalaBuffer(schemas).toList()); } }
/** * Register Avro Schemas * @param schemaProvider Schema Provider */
Register Avro Schemas
registerAvroSchemas
{ "repo_name": "vinothchandar/hoodie", "path": "hoodie-utilities/src/main/java/com/uber/hoodie/utilities/deltastreamer/HoodieDeltaStreamer.java", "license": "apache-2.0", "size": 20211 }
[ "com.uber.hoodie.utilities.schema.SchemaProvider", "java.util.Arrays", "java.util.List", "org.apache.avro.Schema" ]
import com.uber.hoodie.utilities.schema.SchemaProvider; import java.util.Arrays; import java.util.List; import org.apache.avro.Schema;
import com.uber.hoodie.utilities.schema.*; import java.util.*; import org.apache.avro.*;
[ "com.uber.hoodie", "java.util", "org.apache.avro" ]
com.uber.hoodie; java.util; org.apache.avro;
396,215
public BasicReview findReview(String changeId, String author) { try { CustomFilterBean customFilter = new CustomFilterBean(); customFilter.setAuthor(author); customFilter.setState(new State[] {State.DRAFT, State.REVIEW}); List<BasicReview> reviews = session.ge...
BasicReview function(String changeId, String author) { try { CustomFilterBean customFilter = new CustomFilterBean(); customFilter.setAuthor(author); customFilter.setState(new State[] {State.DRAFT, State.REVIEW}); List<BasicReview> reviews = session.getReviewsForCustomFilter(customFilter); System.out.println(STR + revie...
/** * Finds the best review as a BasicReview for a given changeId and author. */
Finds the best review as a BasicReview for a given changeId and author
findReview
{ "repo_name": "Netflix-Skunkworks/post2crucible", "path": "src/main/java/com/netflix/postreview/Crucible.java", "license": "apache-2.0", "size": 13194 }
[ "com.atlassian.theplugin.commons.crucible.api.model.BasicReview", "com.atlassian.theplugin.commons.crucible.api.model.CustomFilterBean", "com.atlassian.theplugin.commons.crucible.api.model.State", "com.atlassian.theplugin.commons.remoteapi.RemoteApiException", "com.atlassian.theplugin.commons.util.LoggerImp...
import com.atlassian.theplugin.commons.crucible.api.model.BasicReview; import com.atlassian.theplugin.commons.crucible.api.model.CustomFilterBean; import com.atlassian.theplugin.commons.crucible.api.model.State; import com.atlassian.theplugin.commons.remoteapi.RemoteApiException; import com.atlassian.theplugin.commons....
import com.atlassian.theplugin.commons.crucible.api.model.*; import com.atlassian.theplugin.commons.remoteapi.*; import com.atlassian.theplugin.commons.util.*; import java.util.*;
[ "com.atlassian.theplugin", "java.util" ]
com.atlassian.theplugin; java.util;
2,874,720
public JobStatus[] getJobsFromQueue(String queueName) throws IOException { return jobSubmitClient.getJobsFromQueue(queueName); }
JobStatus[] function(String queueName) throws IOException { return jobSubmitClient.getJobsFromQueue(queueName); }
/** * Gets all the jobs which were added to particular Job Queue * * @param queueName name of the Job Queue * @return Array of jobs present in the job queue * @throws IOException */
Gets all the jobs which were added to particular Job Queue
getJobsFromQueue
{ "repo_name": "awylie/hadoop", "path": "src/mapred/org/apache/hadoop/mapred/JobClient.java", "license": "apache-2.0", "size": 77764 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,818,600
private void validateIncrementalOptions(SqoopOptions options) throws InvalidOptionsException { if (options.getIncrementalMode() != SqoopOptions.IncrementalMode.None && options.getIncrementalTestColumn() == null) { throw new InvalidOptionsException( "For an incremental import, the check column must b...
void function(SqoopOptions options) throws InvalidOptionsException { if (options.getIncrementalMode() != SqoopOptions.IncrementalMode.None && options.getIncrementalTestColumn() == null) { throw new InvalidOptionsException( STR + STR + INCREMENT_COL_ARG + STR + HELP_STR); } if (options.getIncrementalMode() == SqoopOptio...
/** * Validate the incremental import options. */
Validate the incremental import options
validateIncrementalOptions
{ "repo_name": "unicredit/zSqoop", "path": "src/java/org/apache/sqoop/tool/ImportTool.java", "license": "apache-2.0", "size": 33922 }
[ "com.cloudera.sqoop.SqoopOptions" ]
import com.cloudera.sqoop.SqoopOptions;
import com.cloudera.sqoop.*;
[ "com.cloudera.sqoop" ]
com.cloudera.sqoop;
2,125,559
public void writeListEnd() throws IOException { flushIfFull(); _buffer[_offset++] = (byte) BC_END; }
void function() throws IOException { flushIfFull(); _buffer[_offset++] = (byte) BC_END; }
/** * Writes the tail of the list to the stream for a variable-length list. */
Writes the tail of the list to the stream for a variable-length list
writeListEnd
{ "repo_name": "zhushuchen/Ocean", "path": "项目源码/dubbo/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Output.java", "license": "agpl-3.0", "size": 34700 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
695,531
public void handleSplitImage(ImageCheckerResult result, final Object action, ImageCheckerType index) { if (!CollectionUtils.isEmpty(result.getMifResults())) { //Indicate what do depending on the index. MIFNotificationDialog dialog = new MIFNotificationDialog(view, result.getMifResults(), action, ind...
void function(ImageCheckerResult result, final Object action, ImageCheckerType index) { if (!CollectionUtils.isEmpty(result.getMifResults())) { MIFNotificationDialog dialog = new MIFNotificationDialog(view, result.getMifResults(), action, index, TreeViewerAgent.getAvailableUserGroups()); dialog.addPropertyChangeListene...
/** * Implemented as specified by the {@link TreeViewer} interface. * @see TreeViewer#handleSplitImage(Map, Object, int) */
Implemented as specified by the <code>TreeViewer</code> interface
handleSplitImage
{ "repo_name": "dpwrussell/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java", "license": "gpl-2.0", "size": 162421 }
[ "java.beans.PropertyChangeListener", "org.apache.commons.collections.CollectionUtils", "org.openmicroscopy.shoola.agents.treeviewer.ImageChecker", "org.openmicroscopy.shoola.agents.treeviewer.TreeViewerAgent", "org.openmicroscopy.shoola.agents.treeviewer.util.MIFNotificationDialog", "org.openmicroscopy.sh...
import java.beans.PropertyChangeListener; import org.apache.commons.collections.CollectionUtils; import org.openmicroscopy.shoola.agents.treeviewer.ImageChecker; import org.openmicroscopy.shoola.agents.treeviewer.TreeViewerAgent; import org.openmicroscopy.shoola.agents.treeviewer.util.MIFNotificationDialog; import org....
import java.beans.*; import org.apache.commons.collections.*; import org.openmicroscopy.shoola.agents.treeviewer.*; import org.openmicroscopy.shoola.agents.treeviewer.util.*; import org.openmicroscopy.shoola.env.data.model.*;
[ "java.beans", "org.apache.commons", "org.openmicroscopy.shoola" ]
java.beans; org.apache.commons; org.openmicroscopy.shoola;
2,650,581
newSelection = (HashMap<Class<?>, IPersistentObject>) currentSelection.clone(); if (typeClass.equals(Patient.class)) { setPatientSelection((Patient) object); } else if (typeClass.equals(Konsultation.class)) { setKonsultationSelection((Konsultation) object); } else if (typeClass.equals(Fall.class)) { ...
newSelection = (HashMap<Class<?>, IPersistentObject>) currentSelection.clone(); if (typeClass.equals(Patient.class)) { setPatientSelection((Patient) object); } else if (typeClass.equals(Konsultation.class)) { setKonsultationSelection((Konsultation) object); } else if (typeClass.equals(Fall.class)) { setFallSelection((F...
/** * Set a new valid {@link ElexisContext}. * * @param typeClass * the {@link Class} to set * @param object * the object, of typeClass to set * @return a list of {@link ElexisEvent} to be communicated to the listeners */
Set a new valid <code>ElexisContext</code>
setSelection
{ "repo_name": "elexis/elexis-3-core", "path": "bundles/ch.elexis.core.data/src/ch/elexis/core/data/events/ElexisContext.java", "license": "epl-1.0", "size": 6465 }
[ "ch.elexis.core.data.interfaces.IPersistentObject", "ch.elexis.data.Fall", "ch.elexis.data.Konsultation", "ch.elexis.data.Patient", "java.util.HashMap" ]
import ch.elexis.core.data.interfaces.IPersistentObject; import ch.elexis.data.Fall; import ch.elexis.data.Konsultation; import ch.elexis.data.Patient; import java.util.HashMap;
import ch.elexis.core.data.interfaces.*; import ch.elexis.data.*; import java.util.*;
[ "ch.elexis.core", "ch.elexis.data", "java.util" ]
ch.elexis.core; ch.elexis.data; java.util;
1,891,937
public HadoopProcessorAdapter hadoop();
HadoopProcessorAdapter function();
/** * Gets Hadoop processor. * * @return Hadoop processor. */
Gets Hadoop processor
hadoop
{ "repo_name": "vadopolski/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java", "license": "apache-2.0", "size": 18159 }
[ "org.apache.ignite.internal.processors.hadoop.HadoopProcessorAdapter" ]
import org.apache.ignite.internal.processors.hadoop.HadoopProcessorAdapter;
import org.apache.ignite.internal.processors.hadoop.*;
[ "org.apache.ignite" ]
org.apache.ignite;
408,043
@Deprecated public UpdateInventoryRequest newUpdateInventoryRequest(String orgToken, String requesterEmail, String product, String p...
UpdateInventoryRequest function(String orgToken, String requesterEmail, String product, String productVersion, Collection<AgentProjectInfo> projects, String userKey, Map<String, String> extraProperties) { return (UpdateInventoryRequest) prepareRequest(new UpdateInventoryRequest(projects), orgToken, requesterEmail, prod...
/** * Create new Inventory Update request. * * @param orgToken WhiteSource organization token. * @param requesterEmail Email of the WhiteSource user that requests to update WhiteSource. * @param projects Projects status statement to update. * @param product Name or White...
Create new Inventory Update request
newUpdateInventoryRequest
{ "repo_name": "whitesource/agents", "path": "wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/RequestFactory.java", "license": "apache-2.0", "size": 42043 }
[ "java.util.Collection", "java.util.Map", "org.whitesource.agent.api.model.AgentProjectInfo" ]
import java.util.Collection; import java.util.Map; import org.whitesource.agent.api.model.AgentProjectInfo;
import java.util.*; import org.whitesource.agent.api.model.*;
[ "java.util", "org.whitesource.agent" ]
java.util; org.whitesource.agent;
2,610,497
public ArrayList<Movie> getMovies(INotifiableManager manager, int sortBy, String sortOrder, boolean hideWatched) { StringBuilder sb = new StringBuilder(); sb.append(SELECT_MOVIES); sb.append(WHERE_MOVIES); sb.append(" WHERE movie.idFile=files.idFile AND path.idPath=files.idPath AND movie.idMovie=art.media_id...
ArrayList<Movie> function(INotifiableManager manager, int sortBy, String sortOrder, boolean hideWatched) { StringBuilder sb = new StringBuilder(); sb.append(SELECT_MOVIES); sb.append(WHERE_MOVIES); sb.append(STR); sb.append(watchedFilter(hideWatched)); sb.append(moviesOrderBy(sortBy, sortOrder)); return parseMovies(mCo...
/** * Gets all movies from database * @param sortBy Sort field, see SortType.* * @param sortOrder Sort order, must be either SortType.ASC or SortType.DESC. * @return All movies */
Gets all movies from database
getMovies
{ "repo_name": "murat8505/android-xbmcremote-1", "path": "src/org/xbmc/httpapi/client/VideoClient.java", "license": "gpl-2.0", "size": 20029 }
[ "java.util.ArrayList", "org.xbmc.api.business.INotifiableManager", "org.xbmc.api.object.Movie" ]
import java.util.ArrayList; import org.xbmc.api.business.INotifiableManager; import org.xbmc.api.object.Movie;
import java.util.*; import org.xbmc.api.business.*; import org.xbmc.api.object.*;
[ "java.util", "org.xbmc.api" ]
java.util; org.xbmc.api;
1,144,955
private Set<String> getOutputNamesFromAnnotations(Class pluginClass) { Set<String> set = new HashSet<String>(); if (null != pluginClass) { Annotation annotation = pluginClass.getAnnotation(Output.class); if (annotation instanceof Output) { Output inputs = (Out...
Set<String> function(Class pluginClass) { Set<String> set = new HashSet<String>(); if (null != pluginClass) { Annotation annotation = pluginClass.getAnnotation(Output.class); if (annotation instanceof Output) { Output inputs = (Output) annotation; Item items[] = inputs.value(); if (0 == items.length) { set.add(Output.D...
/** * Builds a set of output image names from the subclass annotations. * * @param pluginClass * @return set of names */
Builds a set of output image names from the subclass annotations
getOutputNamesFromAnnotations
{ "repo_name": "imagej/workflow", "path": "src/main/java/imagej/workflow/plugin/PluginAnnotations.java", "license": "bsd-2-clause", "size": 5714 }
[ "java.lang.annotation.Annotation", "java.util.HashSet", "java.util.Set" ]
import java.lang.annotation.Annotation; import java.util.HashSet; import java.util.Set;
import java.lang.annotation.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,707,152
@Description("The driver URL") public String getUrl();
@Description(STR) String function();
/** * Returns the URL */
Returns the URL
getUrl
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/management/server/JdbcDriverMXBean.java", "license": "gpl-2.0", "size": 2590 }
[ "com.caucho.jmx.Description" ]
import com.caucho.jmx.Description;
import com.caucho.jmx.*;
[ "com.caucho.jmx" ]
com.caucho.jmx;
2,782,914
return ShrinkWrap.create(WebArchive.class, "wsat-simple.war") .addPackages(true, RestaurantServiceATImpl.class.getPackage()).addAsResource("context-handlers.xml") .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")) .setManifest(new StringAs...
return ShrinkWrap.create(WebArchive.class, STR) .addPackages(true, RestaurantServiceATImpl.class.getPackage()).addAsResource(STR) .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create(STR)) .setManifest(new StringAsset(ManifestMF)); }
/** * Create the deployment archive to be deployed by Arquillian. * * @return a WebArchive representing the required deployment */
Create the deployment archive to be deployed by Arquillian
createTestArchive
{ "repo_name": "luksa/jboss-eap-quickstarts", "path": "wsat-simple/src/test/java/org/jboss/as/quickstarts/wsat/simple/ClientTest.java", "license": "apache-2.0", "size": 5377 }
[ "org.jboss.shrinkwrap.api.ArchivePaths", "org.jboss.shrinkwrap.api.ShrinkWrap", "org.jboss.shrinkwrap.api.asset.EmptyAsset", "org.jboss.shrinkwrap.api.asset.StringAsset", "org.jboss.shrinkwrap.api.spec.WebArchive" ]
import org.jboss.shrinkwrap.api.ArchivePaths; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.asset.StringAsset; import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.api.*; import org.jboss.shrinkwrap.api.asset.*; import org.jboss.shrinkwrap.api.spec.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
1,517,939
private void printType(SnmpTextualConvention type, String indent, int smiVersion) { os.println("TEXTUAL-CONVENTION"); if (type.getDisplayHint() != null) { os.print(" DISPLAY-HINT "); os.print(getQuote(type.getDispla...
void function(SnmpTextualConvention type, String indent, int smiVersion) { os.println(STR); if (type.getDisplayHint() != null) { os.print(STR); os.print(getQuote(type.getDisplayHint())); os.println(); } os.print(STR); os.println(type.getStatus()); printDescription(type.getDescription()); if (type.getReference() != null...
/** * Prints an SNMP textual convention. * * @param type the type to print * @param indent the indentation to use on new lines * @param smiVersion the SMI version to use */
Prints an SNMP textual convention
printType
{ "repo_name": "tmoskun/JSNMPWalker", "path": "lib/mibble-2.9.3/src/java/net/percederberg/mibble/MibWriter.java", "license": "gpl-3.0", "size": 37984 }
[ "net.percederberg.mibble.snmp.SnmpTextualConvention" ]
import net.percederberg.mibble.snmp.SnmpTextualConvention;
import net.percederberg.mibble.snmp.*;
[ "net.percederberg.mibble" ]
net.percederberg.mibble;
2,552,397
public static StringBuffer printList(Collection<String> list) { StringBuffer sb = new StringBuffer(); if (list != null && list.size() > 0) { Iterator<String> iter = list.iterator(); while (true) { sb.append(escape(iter.next())); if (iter.hasNext()) { sb.append(", "); ...
static StringBuffer function(Collection<String> list) { StringBuffer sb = new StringBuffer(); if (list != null && list.size() > 0) { Iterator<String> iter = list.iterator(); while (true) { sb.append(escape(iter.next())); if (iter.hasNext()) { sb.append(STR); } else { break; } } } return sb; }
/** * Escapes the items of the Collection and returns them in a StringBuffer, * separated by commas. * * @param list * @return list of the elements of the collection, sepparated by commas */
Escapes the items of the Collection and returns them in a StringBuffer, separated by commas
printList
{ "repo_name": "ermh/Gdata-mavenized", "path": "java/sample/gbase/recipe/DisplayUtils.java", "license": "apache-2.0", "size": 7286 }
[ "java.util.Collection", "java.util.Iterator" ]
import java.util.Collection; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,005,325
public void stop() { synchronized(this) { if (stopRequested) return; stopRequested = true; } try { if (state != null) { state.exitState(haContext); } } catch (ServiceFailedException e) { LOG.warn("Encountered exception while exiting state", e); } final...
void function() { synchronized(this) { if (stopRequested) return; stopRequested = true; } try { if (state != null) { state.exitState(haContext); } } catch (ServiceFailedException e) { LOG.warn(STR, e); } finally { stopMetricsLogger(); stopCommonServices(); if (metrics != null) { metrics.shutdown(); } if (namesystem != ...
/** * Stop all NameNode threads and wait for all to finish. */
Stop all NameNode threads and wait for all to finish
stop
{ "repo_name": "lukmajercak/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java", "license": "apache-2.0", "size": 87488 }
[ "org.apache.hadoop.ha.ServiceFailedException", "org.apache.hadoop.metrics2.util.MBeans" ]
import org.apache.hadoop.ha.ServiceFailedException; import org.apache.hadoop.metrics2.util.MBeans;
import org.apache.hadoop.ha.*; import org.apache.hadoop.metrics2.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
877,156
@Override public void run() { // Convenience wrapper around System.in this.reader = new BufferedReader(new InputStreamReader(System.in)); // Helpful little instructions. System.out .println("Send broadcast messages by typing and hitting <Enter>."); System.out .println("Send pri...
void function() { this.reader = new BufferedReader(new InputStreamReader(System.in)); System.out .println(STR); System.out .println(STR); System.out.println(STRquit\STR); while (this.keepRunning) { try { if (!this.reader.ready()) { try { Thread.sleep(100); } catch (InterruptedException ie) { } continue; } String line =...
/** * Continuously awaits user input and passes the chat messages or quit request * to any registered UserInputListener interfaces. */
Continuously awaits user input and passes the chat messages or quit request to any registered UserInputListener interfaces
run
{ "repo_name": "romoore/cs352-chat", "path": "src/main/java/edu/rutgers/cs/chat/ui/ConsoleUI.java", "license": "gpl-2.0", "size": 7378 }
[ "edu.rutgers.cs.chat.Client", "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader" ]
import edu.rutgers.cs.chat.Client; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader;
import edu.rutgers.cs.chat.*; import java.io.*;
[ "edu.rutgers.cs", "java.io" ]
edu.rutgers.cs; java.io;
598,935
private Map<String, String> getPartitionColMapping(final Table hiveTable, final String partitionColumnLabel) { final Map<String, String> partitionColMapping = new HashMap<>(); int i = 0; for (FieldSchema col : hiveTable.getPartitionKeys()) { partitionColMapping.put(col.getName(), partitionColumnLabe...
Map<String, String> function(final Table hiveTable, final String partitionColumnLabel) { final Map<String, String> partitionColMapping = new HashMap<>(); int i = 0; for (FieldSchema col : hiveTable.getPartitionKeys()) { partitionColMapping.put(col.getName(), partitionColumnLabel+i); i++; } return partitionColMapping; }
/** * Create mapping of Hive partition column to directory column mapping. */
Create mapping of Hive partition column to directory column mapping
getPartitionColMapping
{ "repo_name": "johnnywale/drill", "path": "contrib/storage-hive/core/src/main/java/org/apache/drill/exec/planner/sql/logical/ConvertHiveParquetScanToDrillParquetScan.java", "license": "apache-2.0", "size": 12084 }
[ "java.util.HashMap", "java.util.Map", "org.apache.hadoop.hive.metastore.api.FieldSchema", "org.apache.hadoop.hive.metastore.api.Table" ]
import java.util.HashMap; import java.util.Map; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Table;
import java.util.*; import org.apache.hadoop.hive.metastore.api.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,691,913
public ArrayList validate() { ArrayList errs = new ArrayList(); DigiDocException ex = null; X509Certificate cert = getSignersCertificate(); if(cert != null) ex = validateSignersCertificate(cert); if(ex != null) errs.add(ex); return errs; ...
ArrayList function() { ArrayList errs = new ArrayList(); DigiDocException ex = null; X509Certificate cert = getSignersCertificate(); if(cert != null) ex = validateSignersCertificate(cert); if(ex != null) errs.add(ex); return errs; }
/** * Helper method to validate the whole * KeyInfo object * @return a possibly empty list of DigiDocException objects */
Helper method to validate the whole KeyInfo object
validate
{ "repo_name": "open-eid/digidoc4j", "path": "ddoc4j/src/main/java/org/digidoc4j/ddoc/KeyInfo.java", "license": "lgpl-2.1", "size": 5485 }
[ "java.security.cert.X509Certificate", "java.util.ArrayList" ]
import java.security.cert.X509Certificate; import java.util.ArrayList;
import java.security.cert.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
2,715,284
void setCondition( TriggerCondition value );
void setCondition( TriggerCondition value );
/** * Sets the value of the '{@link org.eclipse.birt.chart.model.data.Trigger#getCondition <em>Condition</em>}' attribute. * <!-- begin-user-doc --> <!-- end-user-doc --> * @param value the new value of the '<em>Condition</em>' attribute. * @see org.eclipse.birt.chart.model.attribute.TriggerCondition * @see #...
Sets the value of the '<code>org.eclipse.birt.chart.model.data.Trigger#getCondition Condition</code>' attribute.
setCondition
{ "repo_name": "sguan-actuate/birt", "path": "chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/data/Trigger.java", "license": "epl-1.0", "size": 6789 }
[ "org.eclipse.birt.chart.model.attribute.TriggerCondition" ]
import org.eclipse.birt.chart.model.attribute.TriggerCondition;
import org.eclipse.birt.chart.model.attribute.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
508,334
@Override protected Object clone() throws CloneNotSupportedException { AbstractRenderer clone = (AbstractRenderer) super.clone(); if (this.seriesVisibleList != null) { clone.seriesVisibleList = (BooleanList) this.seriesVisibleList.clone(); } ...
Object function() throws CloneNotSupportedException { AbstractRenderer clone = (AbstractRenderer) super.clone(); if (this.seriesVisibleList != null) { clone.seriesVisibleList = (BooleanList) this.seriesVisibleList.clone(); } if (this.seriesVisibleInLegendList != null) { clone.seriesVisibleInLegendList = (BooleanList) t...
/** * Returns an independent copy of the renderer. * * @return A clone. * * @throws CloneNotSupportedException if some component of the renderer * does not support cloning. */
Returns an independent copy of the renderer
clone
{ "repo_name": "sebkur/JFreeChart", "path": "src/main/java/org/jfree/chart/renderer/AbstractRenderer.java", "license": "lgpl-3.0", "size": 142687 }
[ "javax.swing.event.EventListenerList", "org.jfree.chart.util.CloneUtils", "org.jfree.util.BooleanList", "org.jfree.util.PaintList", "org.jfree.util.ShapeList", "org.jfree.util.ShapeUtilities", "org.jfree.util.StrokeList" ]
import javax.swing.event.EventListenerList; import org.jfree.chart.util.CloneUtils; import org.jfree.util.BooleanList; import org.jfree.util.PaintList; import org.jfree.util.ShapeList; import org.jfree.util.ShapeUtilities; import org.jfree.util.StrokeList;
import javax.swing.event.*; import org.jfree.chart.util.*; import org.jfree.util.*;
[ "javax.swing", "org.jfree.chart", "org.jfree.util" ]
javax.swing; org.jfree.chart; org.jfree.util;
1,469,536
public void removeValue(V value) { Set<K> keys = m_reverseMap.removeAll(value); for (K key : keys) { m_forwardMap.remove(key); } }
void function(V value) { Set<K> keys = m_reverseMap.removeAll(value); for (K key : keys) { m_forwardMap.remove(key); } }
/** * Removes all entries with the given value.<p> * * @param value the value */
Removes all entries with the given value
removeValue
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/util/CmsManyToOneMap.java", "license": "lgpl-2.1", "size": 3821 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
708,135
protected Object unwrap(Object value) { if (value == null) { return null; } if (value instanceof Wrapper) { value = ((Wrapper)value).unwrap(); } return value; }
Object function(Object value) { if (value == null) { return null; } if (value instanceof Wrapper) { value = ((Wrapper)value).unwrap(); } return value; }
/** * Unwraps passed value from JavaScript wrapper interface. * * @param value Value to be unwrapped. * @return Unwrapped value. */
Unwraps passed value from JavaScript wrapper interface
unwrap
{ "repo_name": "jutils/jsen-js", "path": "src/main/java/com/jsen/javascript/JavaScriptEngine.java", "license": "gpl-2.0", "size": 12376 }
[ "org.mozilla.javascript.Wrapper" ]
import org.mozilla.javascript.Wrapper;
import org.mozilla.javascript.*;
[ "org.mozilla.javascript" ]
org.mozilla.javascript;
2,717,215
private static void verifyEntityTimeline( EventsOfOneEntity retrievedEvents, String entityId, String entityType, TimelineEvent... actualEvents) { assertEquals(entityId, retrievedEvents.getEntityId()); assertEquals(entityType, retrievedEvents.getEntityType()); assertEquals(actualEvents.length, ...
static void function( EventsOfOneEntity retrievedEvents, String entityId, String entityType, TimelineEvent... actualEvents) { assertEquals(entityId, retrievedEvents.getEntityId()); assertEquals(entityType, retrievedEvents.getEntityType()); assertEquals(actualEvents.length, retrievedEvents.getEvents().size()); for (int ...
/** * Verify timeline events */
Verify timeline events
verifyEntityTimeline
{ "repo_name": "busbey/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/timeline/TimelineStoreTestUtils.java", "license": "apache-2.0", "size": 44644 }
[ "org.apache.hadoop.yarn.api.records.timeline.TimelineEvent", "org.apache.hadoop.yarn.api.records.timeline.TimelineEvents", "org.junit.Assert" ]
import org.apache.hadoop.yarn.api.records.timeline.TimelineEvent; import org.apache.hadoop.yarn.api.records.timeline.TimelineEvents; import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.timeline.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
2,516,964
public Parse[] getTagNodes() { List<Parse> tags = new LinkedList<Parse>(); List<Parse> nodes = new LinkedList<Parse>(); nodes.addAll(this.parts); while(nodes.size() != 0) { Parse p = nodes.remove(0); if (p.isPosTag()) { tags.add(p); } else { nodes.addAll(0,p.par...
Parse[] function() { List<Parse> tags = new LinkedList<Parse>(); List<Parse> nodes = new LinkedList<Parse>(); nodes.addAll(this.parts); while(nodes.size() != 0) { Parse p = nodes.remove(0); if (p.isPosTag()) { tags.add(p); } else { nodes.addAll(0,p.parts); } } return tags.toArray(new Parse[tags.size()]); }
/** * Returns the parse nodes which are children of this node and which are pos tags. * * @return the parse nodes which are children of this node and which are pos tags. */
Returns the parse nodes which are children of this node and which are pos tags
getTagNodes
{ "repo_name": "SowaLabs/OpenNLP", "path": "opennlp-tools/src/main/java/opennlp/tools/parser/Parse.java", "license": "apache-2.0", "size": 34346 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
200,175
public SearchReply getReply() { return m_reply; } private class InternalDebuggerListener extends DebugEventListenerAdapter {
SearchReply function() { return m_reply; } private class InternalDebuggerListener extends DebugEventListenerAdapter {
/** * Returns the received search reply. If no search reply was received this method returns null. * * @return The received search reply or null. */
Returns the received search reply. If no search reply was received this method returns null
getReply
{ "repo_name": "guiquanz/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/Debug/MemoryPanel/Implementations/CSearchWaiter.java", "license": "apache-2.0", "size": 4787 }
[ "com.google.security.zynamics.binnavi.debug.connection.packets.replies.SearchReply", "com.google.security.zynamics.binnavi.debug.debugger.DebugEventListenerAdapter" ]
import com.google.security.zynamics.binnavi.debug.connection.packets.replies.SearchReply; import com.google.security.zynamics.binnavi.debug.debugger.DebugEventListenerAdapter;
import com.google.security.zynamics.binnavi.debug.connection.packets.replies.*; import com.google.security.zynamics.binnavi.debug.debugger.*;
[ "com.google.security" ]
com.google.security;
2,320,250
@ReactMethod public void getLanguage(Callback callback) { String language = getCurrentLanguage(); System.out.println("The current language is " + language); callback.invoke(null, language); }
void function(Callback callback) { String language = getCurrentLanguage(); System.out.println(STR + language); callback.invoke(null, language); }
/** * Export a method callable from javascript that returns the current language * * @param callback */
Export a method callable from javascript that returns the current language
getLanguage
{ "repo_name": "stefalda/ReactNativeLocalization", "path": "android/src/main/java/com/babisoft/ReactNativeLocalization/ReactNativeLocalization.java", "license": "mit", "size": 2396 }
[ "com.facebook.react.bridge.Callback" ]
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.*;
[ "com.facebook.react" ]
com.facebook.react;
944,150
@GwtIncompatible("java.util.regex") public static Splitter on(final Pattern separatorPattern) { checkNotNull(separatorPattern); checkArgument(!separatorPattern.matcher("").matches(), "The pattern may not match the empty string: %s", separatorPattern);
@GwtIncompatible(STR) static Splitter function(final Pattern separatorPattern) { checkNotNull(separatorPattern); checkArgument(!separatorPattern.matcher(STRThe pattern may not match the empty string: %s", separatorPattern);
/** * Returns a splitter that considers any subsequence matching {@code * pattern} to be a separator. For example, {@code * Splitter.on(Pattern.compile("\r?\n")).split(entireFile)} splits a string * into lines whether it uses DOS-style or UNIX-style line terminators. * * @param separatorPattern the pa...
Returns a splitter that considers any subsequence matching pattern to be a separator. For example, Splitter.on(Pattern.compile("\r?\n")).split(entireFile) splits a string into lines whether it uses DOS-style or UNIX-style line terminators
on
{ "repo_name": "hceylan/guava", "path": "guava/src/com/google/common/base/Splitter.java", "license": "apache-2.0", "size": 20472 }
[ "com.google.common.annotations.GwtIncompatible", "com.google.common.base.Preconditions", "java.util.regex.Pattern" ]
import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Preconditions; import java.util.regex.Pattern;
import com.google.common.annotations.*; import com.google.common.base.*; import java.util.regex.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,446,974
Iterator it = ruleElements.iterator(); while (it.hasNext()) { Rule rule = ((RuleCombinerElement) (it.next())).getRule(); AbstractResult result = rule.evaluate(context); int value = result.getDecision(); // in the case of PERMIT, DENY, or INDETERMINATE, we always ...
Iterator it = ruleElements.iterator(); while (it.hasNext()) { Rule rule = ((RuleCombinerElement) (it.next())).getRule(); AbstractResult result = rule.evaluate(context); int value = result.getDecision(); if (value != Result.DECISION_NOT_APPLICABLE) { return result; } } return ResultFactory.getFactory().getResult(Result....
/** * Applies the combining rule to the set of rules based on the evaluation context. * * @param context the context from the request * @param parameters a (possibly empty) non-null <code>List</code> of * <code>CombinerParameter<code>s * @param ruleElements the rules to combine...
Applies the combining rule to the set of rules based on the evaluation context
combine
{ "repo_name": "TU-Berlin-SNET/tresor-pdp-caching", "path": "modules/balana/modules/balana-core/src/main/java/org/wso2/balana/combine/xacml2/FirstApplicableRuleAlg.java", "license": "apache-2.0", "size": 4622 }
[ "java.util.Iterator", "org.wso2.balana.Rule", "org.wso2.balana.combine.RuleCombinerElement", "org.wso2.balana.ctx.AbstractResult", "org.wso2.balana.ctx.ResultFactory", "org.wso2.balana.ctx.xacml2.Result" ]
import java.util.Iterator; import org.wso2.balana.Rule; import org.wso2.balana.combine.RuleCombinerElement; import org.wso2.balana.ctx.AbstractResult; import org.wso2.balana.ctx.ResultFactory; import org.wso2.balana.ctx.xacml2.Result;
import java.util.*; import org.wso2.balana.*; import org.wso2.balana.combine.*; import org.wso2.balana.ctx.*; import org.wso2.balana.ctx.xacml2.*;
[ "java.util", "org.wso2.balana" ]
java.util; org.wso2.balana;
667,673
public Collection<JobExecutionQueryResult> batchGet(Collection<JobExecutionQuery> queries) throws RemoteInvocationException { Set<ComplexResourceKey<JobExecutionQuery, EmptyRecord>> ids = Sets.newHashSet(); for (JobExecutionQuery query : queries) { ids.add(new ComplexResourceKey<JobExecutionQuery...
Collection<JobExecutionQueryResult> function(Collection<JobExecutionQuery> queries) throws RemoteInvocationException { Set<ComplexResourceKey<JobExecutionQuery, EmptyRecord>> ids = Sets.newHashSet(); for (JobExecutionQuery query : queries) { ids.add(new ComplexResourceKey<JobExecutionQuery, EmptyRecord>(query, new Empt...
/** * Get a collection of {@link JobExecutionQueryResult}s for a collection of {@link JobExecutionQuery}s. * * <p> * The order of {@link JobExecutionQueryResult}s may not match the order of {@link JobExecutionQuery}s. * </p> * * @param queries a collection of {@link JobExecutionQuery}s * @re...
Get a collection of <code>JobExecutionQueryResult</code>s for a collection of <code>JobExecutionQuery</code>s. The order of <code>JobExecutionQueryResult</code>s may not match the order of <code>JobExecutionQuery</code>s.
batchGet
{ "repo_name": "zliu41/gobblin", "path": "gobblin-rest-service/gobblin-rest-client/src/main/java/gobblin/rest/JobExecutionInfoClient.java", "license": "apache-2.0", "size": 4126 }
[ "com.google.common.collect.Sets", "com.linkedin.r2.RemoteInvocationException", "com.linkedin.restli.client.BatchGetRequest", "com.linkedin.restli.client.ErrorHandlingBehavior", "com.linkedin.restli.common.BatchResponse", "com.linkedin.restli.common.ComplexResourceKey", "com.linkedin.restli.common.EmptyR...
import com.google.common.collect.Sets; import com.linkedin.r2.RemoteInvocationException; import com.linkedin.restli.client.BatchGetRequest; import com.linkedin.restli.client.ErrorHandlingBehavior; import com.linkedin.restli.common.BatchResponse; import com.linkedin.restli.common.ComplexResourceKey; import com.linkedin....
import com.google.common.collect.*; import com.linkedin.r2.*; import com.linkedin.restli.client.*; import com.linkedin.restli.common.*; import java.util.*;
[ "com.google.common", "com.linkedin.r2", "com.linkedin.restli", "java.util" ]
com.google.common; com.linkedin.r2; com.linkedin.restli; java.util;
1,251,074
public static ParameterizedType mapOf(Type keyType, Type valueType) { return newParameterizedType(Map.class, keyType, valueType); } // for other custom collections types, use newParameterizedType()
static ParameterizedType function(Type keyType, Type valueType) { return newParameterizedType(Map.class, keyType, valueType); }
/** * Returns a type modelling a {@link Map} whose keys are of type * {@code keyType} and whose values are of type {@code valueType}. * * @return a {@link java.io.Serializable serializable} parameterized type. */
Returns a type modelling a <code>Map</code> whose keys are of type keyType and whose values are of type valueType
mapOf
{ "repo_name": "easyfmxu/guice", "path": "core/src/com/google/inject/util/Types.java", "license": "apache-2.0", "size": 4633 }
[ "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type", "java.util.Map" ]
import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.Map;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
584,937
@Deprecated public CreatureType getCreatureType();
CreatureType function();
/** * Get the spawner's creature type. * * @return The creature type. * @deprecated In favour of {@link #getSpawnedType()}. */
Get the spawner's creature type
getCreatureType
{ "repo_name": "SpannaProject/SpannaAPI", "path": "src/main/java/org/spanna/block/CreatureSpawner.java", "license": "apache-2.0", "size": 1985 }
[ "org.spanna.entity.CreatureType" ]
import org.spanna.entity.CreatureType;
import org.spanna.entity.*;
[ "org.spanna.entity" ]
org.spanna.entity;
843,849
@MediumTest public void testDuplicateTabIDsKillsOldActivities() throws Exception { launchThreeTabs(); final DocumentTabModelSelector selector = ChromeApplication.getDocumentTabModelSelector(); final int lastTabId = selector.getCurrentTabId(); final Activity lastT...
void function() throws Exception { launchThreeTabs(); final DocumentTabModelSelector selector = ChromeApplication.getDocumentTabModelSelector(); final int lastTabId = selector.getCurrentTabId(); final Activity lastTrackedActivity = ApplicationStatus.getLastTrackedFocusedActivity(); MultiActivityTestBase.launchHomescree...
/** * Confirm that firing an Intent for a document that has an ID for an already existing Tab kills * the original. */
Confirm that firing an Intent for a document that has an ID for an already existing Tab kills the original
testDuplicateTabIDsKillsOldActivities
{ "repo_name": "SaschaMester/delicium", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/document/DocumentModeTest.java", "license": "bsd-3-clause", "size": 30968 }
[ "android.app.Activity", "android.content.Intent", "android.net.Uri", "org.chromium.base.ApplicationStatus", "org.chromium.chrome.browser.ChromeApplication", "org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector", "org.chromium.chrome.test.MultiActivityTestBase" ]
import android.app.Activity; import android.content.Intent; import android.net.Uri; import org.chromium.base.ApplicationStatus; import org.chromium.chrome.browser.ChromeApplication; import org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector; import org.chromium.chrome.test.MultiActivityTestBase;
import android.app.*; import android.content.*; import android.net.*; import org.chromium.base.*; import org.chromium.chrome.browser.*; import org.chromium.chrome.browser.tabmodel.document.*; import org.chromium.chrome.test.*;
[ "android.app", "android.content", "android.net", "org.chromium.base", "org.chromium.chrome" ]
android.app; android.content; android.net; org.chromium.base; org.chromium.chrome;
674,200