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 List<String> getRequestedConnectionUserIdsForUser(final String userId);
| List<String> function(final String userId); | /**
* Get a list of unconfirmed Friend requests for a given user. Uses a native SQL query
* Returns: (all those where userId is the friend_uuid and confirmed=false)
*
* @param userId uuid of the user to retrieve the list of friends for
*/ | Get a list of unconfirmed Friend requests for a given user. Uses a native SQL query Returns: (all those where userId is the friend_uuid and confirmed=false) | getRequestedConnectionUserIdsForUser | {
"repo_name": "marktriggs/nyu-sakai-10.4",
"path": "profile2/impl/src/java/org/sakaiproject/profile2/dao/ProfileDao.java",
"license": "apache-2.0",
"size": 19837
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,180,401 |
public void testRemoveFirst() {
ArrayDeque q = populatedDeque(SIZE);
for (int i = 0; i < SIZE; ++i) {
assertEquals(i, q.removeFirst());
}
try {
q.removeFirst();
shouldThrow();
} catch (NoSuchElementException success) {}
assertNull(q... | void function() { ArrayDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertEquals(i, q.removeFirst()); } try { q.removeFirst(); shouldThrow(); } catch (NoSuchElementException success) {} assertNull(q.peekFirst()); } | /**
* removeFirst() removes first element, or throws NSEE if empty
*/ | removeFirst() removes first element, or throws NSEE if empty | testRemoveFirst | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/ArrayDequeTest.java",
"license": "apache-2.0",
"size": 26347
} | [
"java.util.ArrayDeque",
"java.util.NoSuchElementException"
] | import java.util.ArrayDeque; import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 542,428 |
public void addPermanentReward(PermanentReward reward) {
rewards.add(reward);
} | void function(PermanentReward reward) { rewards.add(reward); } | /**
* Adds the transfered permanent reward like a Badge or Achievement to all
* already obtained rewards.
*
* @param reward
* The permanent reward that was just obtained.
*/ | Adds the transfered permanent reward like a Badge or Achievement to all already obtained rewards | addPermanentReward | {
"repo_name": "InteractiveSystemsGroup/GamificationEngine-Kinben",
"path": "src/main/java/info/interactivesystems/gamificationengine/entities/Player.java",
"license": "lgpl-3.0",
"size": 17370
} | [
"info.interactivesystems.gamificationengine.entities.rewards.PermanentReward"
] | import info.interactivesystems.gamificationengine.entities.rewards.PermanentReward; | import info.interactivesystems.gamificationengine.entities.rewards.*; | [
"info.interactivesystems.gamificationengine"
] | info.interactivesystems.gamificationengine; | 2,538,984 |
public void dayRollAssertions() {
long epoc = 0L;
long dayAfterEpoc = epoc + DateTime.ONE_DAY;
long dayBeforeEpoc = epoc - DateTime.ONE_DAY;
assertEquals("Wed Dec 31 18:00:00 CST 1969", new Date(epoc).toString());
assertEquals("Thu Jan 01 18:00:00 CST 1970", new Date(dayAfterEpoc).toString());
assertEqua... | void function() { long epoc = 0L; long dayAfterEpoc = epoc + DateTime.ONE_DAY; long dayBeforeEpoc = epoc - DateTime.ONE_DAY; assertEquals(STR, new Date(epoc).toString()); assertEquals(STR, new Date(dayAfterEpoc).toString()); assertEquals(STR, new Date(dayBeforeEpoc).toString()); long monthAfterEpoc = epoc + (DateTime.O... | /**
* this test discovered that using ints as constants caused a
* multiplication constraint when using a month
* so the constants ONE_DAY exc were changed to longs
*/ | this test discovered that using ints as constants caused a multiplication constraint when using a month so the constants ONE_DAY exc were changed to longs | dayRollAssertions | {
"repo_name": "adligo/i_util_tests.adligo.org",
"path": "src/org/adligo/i/util_tests/shared/DateTimeAssertions.java",
"license": "apache-2.0",
"size": 9203
} | [
"java.util.Date",
"org.adligo.i.util.shared.DateTime"
] | import java.util.Date; import org.adligo.i.util.shared.DateTime; | import java.util.*; import org.adligo.i.util.shared.*; | [
"java.util",
"org.adligo.i"
] | java.util; org.adligo.i; | 207,163 |
Pointer TessBaseAPIGetTsvText(TessBaseAPI handle, int page_number); | Pointer TessBaseAPIGetTsvText(TessBaseAPI handle, int page_number); | /**
* Make a TSV-formatted string from the internal data structures.
* page_number is 0-based but will appear in the output as 1-based. Returned
* string must be freed with the delete [] operator.
*
* @param handle the TesseractAPI instance
* @param page_number page number
* @re... | Make a TSV-formatted string from the internal data structures. page_number is 0-based but will appear in the output as 1-based. Returned string must be freed with the delete [] operator | TessBaseAPIGetTsvText | {
"repo_name": "nguyenq/tess4j",
"path": "src/main/java/net/sourceforge/tess4j/TessAPI.java",
"license": "apache-2.0",
"size": 53040
} | [
"com.sun.jna.Pointer"
] | import com.sun.jna.Pointer; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 622,008 |
ValueScanCursor<V> sscan(K key, ScanCursor scanCursor); | ValueScanCursor<V> sscan(K key, ScanCursor scanCursor); | /**
* Incrementally iterate Set elements.
*
* @param key the key.
* @param scanCursor cursor to resume from a previous scan, must not be {@code null}.
* @return ValueScanCursor<V> scan cursor.
*/ | Incrementally iterate Set elements | sscan | {
"repo_name": "lettuce-io/lettuce-core",
"path": "src/main/java/io/lettuce/core/api/sync/RedisSetCommands.java",
"license": "apache-2.0",
"size": 10193
} | [
"io.lettuce.core.ScanCursor",
"io.lettuce.core.ValueScanCursor"
] | import io.lettuce.core.ScanCursor; import io.lettuce.core.ValueScanCursor; | import io.lettuce.core.*; | [
"io.lettuce.core"
] | io.lettuce.core; | 2,658,228 |
public static void showException( Logger log, String paddingSpace, Throwable t )
{
int i;
log.error( paddingSpace + "failed: class: " + t.getClass().getName() );
if (t instanceof AxisFault)
{
log.error( paddingSpace + "failed: fault code: " + ((AxisFault)t).getFaultCode() );
log.error( paddingSpa... | static void function( Logger log, String paddingSpace, Throwable t ) { int i; log.error( paddingSpace + STR + t.getClass().getName() ); if (t instanceof AxisFault) { log.error( paddingSpace + STR + ((AxisFault)t).getFaultCode() ); log.error( paddingSpace + STR + ((AxisFault)t).getReason() ); } else { log.error( padding... | /**
* Show exception.
*
* @param log
* Logger.
* @param paddingSpace
* String.
* @param t
* Throwable.
*/ | Show exception | showException | {
"repo_name": "djsilenceboy/LearnTest",
"path": "Java_Test/AppMavenWsSample1/Backup/CodesSet_Axis2/src/test/java/com/djs/test/maven_sample/InfoHelper.java",
"license": "apache-2.0",
"size": 2746
} | [
"org.apache.axis2.AxisFault",
"org.apache.log4j.Logger"
] | import org.apache.axis2.AxisFault; import org.apache.log4j.Logger; | import org.apache.axis2.*; import org.apache.log4j.*; | [
"org.apache.axis2",
"org.apache.log4j"
] | org.apache.axis2; org.apache.log4j; | 866,411 |
private BufferedImage getBufferedImageCopy(Image img, Color bgcolor) {
BufferedImage imageCopy = null;
int width = img.getWidth(null);
int height = img.getHeight(null);
if (width > 0 && height > 0) {
int imageType;
if (img instanceof Buffered... | BufferedImage function(Image img, Color bgcolor) { BufferedImage imageCopy = null; int width = img.getWidth(null); int height = img.getHeight(null); if (width > 0 && height > 0) { int imageType; if (img instanceof BufferedImage) { BufferedImage bufImage = (BufferedImage) img; imageType = bufImage.getType(); } else { im... | /**
* Return a new <code>BufferedImage</code>
* that contains a copy of the provided
* <code>Image</code> where its
* transparent pixels have been replaced by
* <code>bgcolor</code>. If the new
* <code>BufferedImage</code> can not be created,
* probably because the original image has ... | Return a new <code>BufferedImage</code> that contains a copy of the provided <code>Image</code> where its transparent pixels have been replaced by <code>bgcolor</code>. If the new <code>BufferedImage</code> can not be created, probably because the original image has not finished loading, then <code>null</code> is retur... | getBufferedImageCopy | {
"repo_name": "Taichi-SHINDO/jdk9-jdk",
"path": "src/java.desktop/share/classes/sun/print/ProxyGraphics2D.java",
"license": "gpl-2.0",
"size": 64981
} | [
"java.awt.Color",
"java.awt.Graphics",
"java.awt.Image",
"java.awt.image.BufferedImage"
] | import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,146,772 |
public static void copyStream (InputStream input, ByteBuffer output) throws IOException {
copyStream(input, output, new byte[DEFAULT_BUFFER_SIZE]);
}
| static void function (InputStream input, ByteBuffer output) throws IOException { copyStream(input, output, new byte[DEFAULT_BUFFER_SIZE]); } | /** Allocates a {@value #DEFAULT_BUFFER_SIZE} byte[] for use as a temporary buffer and calls
* {@link #copyStream(InputStream, OutputStream, byte[])}. */ | Allocates a #DEFAULT_BUFFER_SIZE byte[] for use as a temporary buffer and calls | copyStream | {
"repo_name": "codepoke/libgdx",
"path": "gdx/src/com/badlogic/gdx/utils/StreamUtils.java",
"license": "apache-2.0",
"size": 6510
} | [
"java.io.IOException",
"java.io.InputStream",
"java.nio.ByteBuffer"
] | import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,844,357 |
public LinkTable generateFakeLinkTable(List<InetAddress> ips, List<InetAddress> masks) throws ControllerException
{
int n = ips.size();
if (n != masks.size())
throw new ControllerException("Failed when generating link table: Sizes of IP and mask lists are not equal.");
List<Link> links = new ArrayList<Link... | LinkTable function(List<InetAddress> ips, List<InetAddress> masks) throws ControllerException { int n = ips.size(); if (n != masks.size()) throw new ControllerException(STR); List<Link> links = new ArrayList<Link>(); for (int i=0; i<n-1; i++) { for (int j=i+1; j<n; j++) { Link li = this.generateFakeLink(ips.get(i), mas... | /**
* Randomly generate links between a set of sources and a set of targets
* @param sources
* @param targets
* @return
*/ | Randomly generate links between a set of sources and a set of targets | generateFakeLinkTable | {
"repo_name": "synchromedia/OpenGSN",
"path": "controller/src/main/java/com/opengsn/controller/generator/LinkParamGenerator.java",
"license": "apache-2.0",
"size": 4025
} | [
"com.opengsn.controller.ControllerException",
"com.opengsn.controller.model.Link",
"com.opengsn.controller.model.LinkTable",
"java.net.InetAddress",
"java.util.ArrayList",
"java.util.List"
] | import com.opengsn.controller.ControllerException; import com.opengsn.controller.model.Link; import com.opengsn.controller.model.LinkTable; import java.net.InetAddress; import java.util.ArrayList; import java.util.List; | import com.opengsn.controller.*; import com.opengsn.controller.model.*; import java.net.*; import java.util.*; | [
"com.opengsn.controller",
"java.net",
"java.util"
] | com.opengsn.controller; java.net; java.util; | 1,858,216 |
static Map<String, String> getTags(final TSDB tsdb,
final byte[] row) throws NoSuchUniqueId {
try {
return getTagsAsync(tsdb, row).joinUninterruptibly();
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException("Shoul... | static Map<String, String> getTags(final TSDB tsdb, final byte[] row) throws NoSuchUniqueId { try { return getTagsAsync(tsdb, row).joinUninterruptibly(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(STR, e); } } | /**
* Returns the tags stored in the given row key.
* @param tsdb The TSDB instance to use for Unique ID lookups.
* @param row The row key from which to extract the tags.
* @return A map of tag names (keys), tag values (values).
* @throws NoSuchUniqueId if the row key contained an invalid ID (unlikely).
... | Returns the tags stored in the given row key | getTags | {
"repo_name": "alienth/opentsdb",
"path": "src/core/Tags.java",
"license": "lgpl-2.1",
"size": 32002
} | [
"java.util.Map",
"net.opentsdb.uid.NoSuchUniqueId"
] | import java.util.Map; import net.opentsdb.uid.NoSuchUniqueId; | import java.util.*; import net.opentsdb.uid.*; | [
"java.util",
"net.opentsdb.uid"
] | java.util; net.opentsdb.uid; | 2,796,411 |
final JFrame testFrame = GuiActionRunner | final JFrame testFrame = GuiActionRunner | /**
* Sets up the test view.
*
* @param model
* @throws Exception
*/ | Sets up the test view | setUp | {
"repo_name": "dteoh/tidal-app",
"path": "src/test/java/com/dteoh/tidal/views/RippleViewTests.java",
"license": "gpl-3.0",
"size": 4097
} | [
"javax.swing.JFrame",
"org.fest.swing.edt.GuiActionRunner"
] | import javax.swing.JFrame; import org.fest.swing.edt.GuiActionRunner; | import javax.swing.*; import org.fest.swing.edt.*; | [
"javax.swing",
"org.fest.swing"
] | javax.swing; org.fest.swing; | 331,599 |
public Shape getLegendBar() {
return this.legendBar;
}
| Shape function() { return this.legendBar; } | /**
* Returns the shape used to represent bars in each legend item.
*
* @return The shape used to represent bars in each legend item (never
* {@code null}).
*
* @see #setLegendBar(Shape)
*/ | Returns the shape used to represent bars in each legend item | getLegendBar | {
"repo_name": "simon04/jfreechart",
"path": "src/main/java/org/jfree/chart/renderer/xy/XYBarRenderer.java",
"license": "lgpl-2.1",
"size": 44973
} | [
"java.awt.Shape"
] | import java.awt.Shape; | import java.awt.*; | [
"java.awt"
] | java.awt; | 302,909 |
public void storeGroupEnvelopeString ( String store ) throws EncodingFailedException, UnsupportedEncodingException, DecodingFailedException, MalformedXMLException, IOException {
groupCache = new Envelope( store, MockAgentFactory.getGroup1() );
groupCache.close();
}
| void function ( String store ) throws EncodingFailedException, UnsupportedEncodingException, DecodingFailedException, MalformedXMLException, IOException { groupCache = new Envelope( store, MockAgentFactory.getGroup1() ); groupCache.close(); } | /**
* store a simple string encrypted for the group
* @param store a string to store for the group
* @throws EncodingFailedException
* @throws IOException
* @throws MalformedXMLException
* @throws DecodingFailedException
* @throws UnsupportedEncodingException
*/ | store a simple string encrypted for the group | storeGroupEnvelopeString | {
"repo_name": "AlexRuppert/las2peer_project",
"path": "java/i5/las2peer/testing/TestService.java",
"license": "mit",
"size": 8124
} | [
"java.io.IOException",
"java.io.UnsupportedEncodingException"
] | import java.io.IOException; import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 556,292 |
public void enableGiltMarketParticipation(
final double giltDebtTarget
) {
this.giltDebtTarget = Math.max(giltDebtTarget, 0.);
}
/**
* Enable goods market participation for this {@link Government} {@link Agent} | void function( final double giltDebtTarget ) { this.giltDebtTarget = Math.max(giltDebtTarget, 0.); } /** * Enable goods market participation for this {@link Government} {@link Agent} | /**
* Enable Gilt market participation with a custom
* government debt target. The argument to this method should
* be non-negative. Otherwise, the argument is silently trimmed
* to zero.
*/ | Enable Gilt market participation with a custom government debt target. The argument to this method should be non-negative. Otherwise, the argument is silently trimmed to zero | enableGiltMarketParticipation | {
"repo_name": "crisis-economics/CRISIS",
"path": "CRISIS/src/eu/crisis_economics/abm/government/Government.java",
"license": "gpl-3.0",
"size": 32501
} | [
"eu.crisis_economics.abm.Agent"
] | import eu.crisis_economics.abm.Agent; | import eu.crisis_economics.abm.*; | [
"eu.crisis_economics.abm"
] | eu.crisis_economics.abm; | 1,346,463 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<AppServiceCertificateOrderInner>> listByResourceGroupNextSinglePageAsync(
String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be nul... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<AppServiceCertificateOrderInner>> function( String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String a... | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped ... | Get the next page of items | listByResourceGroupNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServiceCertificateOrdersClientImpl.java",
"license": "mit",
"size": 205075
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.appservice.fluent.models.AppServiceCertificateOrderInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.appservice.fluent.models.AppServiceCertificateOrderInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,360,475 |
public void initGUI ()
{
try
{
SwingEngine swingEngine = new SwingEngine(this);
swingEngine.setClassLoader (AppPlugin.class.getClassLoader ());
JPanel panel =
(JPanel) swingEngine.render (getClass ().getResource ("/swixml/Preferences.xml"));
alwaysDrawWindowContents.setSelected (true);
dra... | void function () { try { SwingEngine swingEngine = new SwingEngine(this); swingEngine.setClassLoader (AppPlugin.class.getClassLoader ()); JPanel panel = (JPanel) swingEngine.render (getClass ().getResource (STR)); alwaysDrawWindowContents.setSelected (true); drawAntiAliased.setSelected (true); language.addItem (new Lan... | /**
* Initialize the gui. Subclasses should override this method to create a
* custom gui.
*/ | Initialize the gui. Subclasses should override this method to create a custom gui | initGUI | {
"repo_name": "grappendorf/openmetix",
"path": "plugin/metix-client/src/java/de/iritgo/openmetix/client/gui/PreferencesGUIPane.java",
"license": "gpl-2.0",
"size": 7181
} | [
"de.iritgo.openmetix.app.AppPlugin",
"de.iritgo.openmetix.core.logger.Log",
"java.awt.GridBagConstraints",
"java.util.Iterator",
"java.util.List",
"javax.swing.JPanel",
"javax.swing.plaf.metal.MetalTheme",
"org.swixml.SwingEngine"
] | import de.iritgo.openmetix.app.AppPlugin; import de.iritgo.openmetix.core.logger.Log; import java.awt.GridBagConstraints; import java.util.Iterator; import java.util.List; import javax.swing.JPanel; import javax.swing.plaf.metal.MetalTheme; import org.swixml.SwingEngine; | import de.iritgo.openmetix.app.*; import de.iritgo.openmetix.core.logger.*; import java.awt.*; import java.util.*; import javax.swing.*; import javax.swing.plaf.metal.*; import org.swixml.*; | [
"de.iritgo.openmetix",
"java.awt",
"java.util",
"javax.swing",
"org.swixml"
] | de.iritgo.openmetix; java.awt; java.util; javax.swing; org.swixml; | 478,137 |
Authorship createAuthorship(PerunSession sess, Authorship authorship) throws CabinetException; | Authorship createAuthorship(PerunSession sess, Authorship authorship) throws CabinetException; | /**
* Creates Authorship. Everything except current date must be already set in Authorship object.
* Authorship is checked for existence before creation.
* When authorship is successfully created, users priority coefficient is updated.
*
* @param sess PerunSession
* @param authorship Authorship to be create... | Creates Authorship. Everything except current date must be already set in Authorship object. Authorship is checked for existence before creation. When authorship is successfully created, users priority coefficient is updated | createAuthorship | {
"repo_name": "zlamalp/perun",
"path": "perun-cabinet/src/main/java/cz/metacentrum/perun/cabinet/bl/AuthorshipManagerBl.java",
"license": "bsd-2-clause",
"size": 6592
} | [
"cz.metacentrum.perun.cabinet.model.Authorship",
"cz.metacentrum.perun.core.api.PerunSession"
] | import cz.metacentrum.perun.cabinet.model.Authorship; import cz.metacentrum.perun.core.api.PerunSession; | import cz.metacentrum.perun.cabinet.model.*; import cz.metacentrum.perun.core.api.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 2,459,167 |
File file = new File(named);
if (canExecute(file)) {
return named;
}
addPathFromEnvironment();
if (Platform.getCurrent().is(Platform.MAC)) {
addMacSpecificPath();
}
for (String pathSegment : pathSegmentBuilder.build()) {
for (String ending : ENDINGS) {
file = ... | File file = new File(named); if (canExecute(file)) { return named; } addPathFromEnvironment(); if (Platform.getCurrent().is(Platform.MAC)) { addMacSpecificPath(); } for (String pathSegment : pathSegmentBuilder.build()) { for (String ending : ENDINGS) { file = new File(pathSegment, named + ending); if (canExecute(file))... | /**
* Find the executable by scanning the file system and the PATH. In the case of Windows this
* method allows common executable endings (".com", ".bat" and ".exe") to be omitted.
*
* @param named The name of the executable to find
* @return The absolute path to the executable, or null if no match is ma... | Find the executable by scanning the file system and the PATH. In the case of Windows this method allows common executable endings (".com", ".bat" and ".exe") to be omitted | find | {
"repo_name": "sevaseva/selenium",
"path": "java/client/src/org/openqa/selenium/os/ExecutableFinder.java",
"license": "apache-2.0",
"size": 3582
} | [
"java.io.File",
"org.openqa.selenium.Platform"
] | import java.io.File; import org.openqa.selenium.Platform; | import java.io.*; import org.openqa.selenium.*; | [
"java.io",
"org.openqa.selenium"
] | java.io; org.openqa.selenium; | 2,320,182 |
public InputStream getInputStream() {
return new ByteArrayInputStream(pfbdata);
} | InputStream function() { return new ByteArrayInputStream(pfbdata); } | /**
* Returns the pfb data as stream.
*
* @return Returns the pfb data as stream.
*/ | Returns the pfb data as stream | getInputStream | {
"repo_name": "sencko/NALB",
"path": "nalb2013/src/org/apache/fontbox/pfb/PfbParser.java",
"license": "gpl-2.0",
"size": 4735
} | [
"java.io.ByteArrayInputStream",
"java.io.InputStream"
] | import java.io.ByteArrayInputStream; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 361,793 |
void set(@Nullable File file); | void set(@Nullable File file); | /**
* Sets the location of this file, using a {@link File} instance. {@link File} instances with relative paths are resolved relative to the project directory of the project
* that owns this property instance.
*/ | Sets the location of this file, using a <code>File</code> instance. <code>File</code> instances with relative paths are resolved relative to the project directory of the project that owns this property instance | set | {
"repo_name": "gradle/gradle",
"path": "subprojects/core-api/src/main/java/org/gradle/api/file/FileSystemLocationProperty.java",
"license": "apache-2.0",
"size": 2989
} | [
"java.io.File",
"javax.annotation.Nullable"
] | import java.io.File; import javax.annotation.Nullable; | import java.io.*; import javax.annotation.*; | [
"java.io",
"javax.annotation"
] | java.io; javax.annotation; | 2,647,283 |
protected Connection getCloseSuppressingConnectionProxy(Connection target) {
return (Connection) Proxy.newProxyInstance(
Connection.class.getClassLoader(),
new Class[] {Connection.class},
new CloseSuppressingInvocationHandler(target));
}
private static class CloseSuppressingInvocationHandler impl... | Connection function(Connection target) { return (Connection) Proxy.newProxyInstance( Connection.class.getClassLoader(), new Class[] {Connection.class}, new CloseSuppressingInvocationHandler(target)); } private static class CloseSuppressingInvocationHandler implements InvocationHandler { private final Connection target;... | /**
* Wrap the given Connection with a proxy that delegates every method call to it
* but suppresses close calls. This is useful for allowing application code to
* handle a special framework Connection just like an ordinary Connection from a
* CCI ConnectionFactory.
* @param target the original Connection to ... | Wrap the given Connection with a proxy that delegates every method call to it but suppresses close calls. This is useful for allowing application code to handle a special framework Connection just like an ordinary Connection from a CCI ConnectionFactory | getCloseSuppressingConnectionProxy | {
"repo_name": "kingtang/spring-learn",
"path": "spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java",
"license": "gpl-3.0",
"size": 7842
} | [
"java.lang.reflect.InvocationHandler",
"java.lang.reflect.Proxy",
"javax.resource.cci.Connection"
] | import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; import javax.resource.cci.Connection; | import java.lang.reflect.*; import javax.resource.cci.*; | [
"java.lang",
"javax.resource"
] | java.lang; javax.resource; | 1,144,474 |
public MinOptMax toMinOptMax(PercentBaseContext context) {
int min = getMinimum(context).isAuto() ? 0
: getMinimum(context).getLength().getValue(context);
int opt = getOptimum(context).isAuto() ? min
: getOptimum(context).getLength().getValue(context);
int max... | MinOptMax function(PercentBaseContext context) { int min = getMinimum(context).isAuto() ? 0 : getMinimum(context).getLength().getValue(context); int opt = getOptimum(context).isAuto() ? min : getOptimum(context).getLength().getValue(context); int max = getMaximum(context).isAuto() ? Integer.MAX_VALUE : getMaximum(conte... | /**
* Converts this <code>LengthRangeProperty</code> to a <code>MinOptMax</code>.
*
* @param context Percentage evaluation context
* @return the requested MinOptMax instance
*/ | Converts this <code>LengthRangeProperty</code> to a <code>MinOptMax</code> | toMinOptMax | {
"repo_name": "pellcorp/fop",
"path": "src/java/org/apache/fop/fo/properties/LengthRangeProperty.java",
"license": "apache-2.0",
"size": 11756
} | [
"org.apache.fop.datatypes.PercentBaseContext",
"org.apache.fop.traits.MinOptMax"
] | import org.apache.fop.datatypes.PercentBaseContext; import org.apache.fop.traits.MinOptMax; | import org.apache.fop.datatypes.*; import org.apache.fop.traits.*; | [
"org.apache.fop"
] | org.apache.fop; | 1,764,921 |
private void setControlsVisible(boolean visible)
{
int mode = visible ? View.VISIBLE : View.GONE;
mSlidingView.setVisibility(mode);
mControlsVisible = visible;
if (visible) {
mPlayPauseButton.requestFocus();
}
} | void function(boolean visible) { int mode = visible ? View.VISIBLE : View.GONE; mSlidingView.setVisibility(mode); mControlsVisible = visible; if (visible) { mPlayPauseButton.requestFocus(); } } | /**
* Set the visibility of the controls views.
*
* @param visible True to show, false to hide
*/ | Set the visibility of the controls views | setControlsVisible | {
"repo_name": "vanilla-music/vanilla",
"path": "app/src/main/java/ch/blinkenlights/android/vanilla/FullPlaybackActivity.java",
"license": "gpl-3.0",
"size": 20321
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 596,667 |
public T fromBytes(byte[] bytes) throws IOException {
return fromJson(new String(bytes, 0, bytes.length, UTF_8));
} | T function(byte[] bytes) throws IOException { return fromJson(new String(bytes, 0, bytes.length, UTF_8)); } | /**
* Deserialize from a byte array.
* @param bytes byte array
* @throws IOException IO problems
* @throws EOFException not enough data
*/ | Deserialize from a byte array | fromBytes | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/JsonSerialization.java",
"license": "apache-2.0",
"size": 10713
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 125,333 |
if (shortPressAvailable != null) {
store.put(Names.shortPressAvailable, shortPressAvailable);
} else {
store.remove(Names.shortPressAvailable);
}
}
| if (shortPressAvailable != null) { store.put(Names.shortPressAvailable, shortPressAvailable); } else { store.remove(Names.shortPressAvailable); } } | /**
* set the button supports a short press.
* @param shortPressAvailable whether the button supports a short press.
*/ | set the button supports a short press | setShortPressAvailable | {
"repo_name": "Luxoft/SDLP2",
"path": "SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java",
"license": "lgpl-2.1",
"size": 4730
} | [
"com.smartdevicelink.proxy.constants.Names"
] | import com.smartdevicelink.proxy.constants.Names; | import com.smartdevicelink.proxy.constants.*; | [
"com.smartdevicelink.proxy"
] | com.smartdevicelink.proxy; | 1,942,294 |
private void deactivateFeature(PinFeature feature) {
fireFeatureDeactivating(feature);
feature.teardown();
setActiveFeature(null);
fireFeatureDeactivated(feature);
} | void function(PinFeature feature) { fireFeatureDeactivating(feature); feature.teardown(); setActiveFeature(null); fireFeatureDeactivated(feature); } | /**
* This method deactivates a feature. The feature will be torn down
* and the {@code activeFeature()} will be set to {@code null}.
*
* @param feature
* the feature
*/ | This method deactivates a feature. The feature will be torn down and the activeFeature() will be set to null | deactivateFeature | {
"repo_name": "doordeck/simplegpio",
"path": "simplegpio-core/src/main/java/com/doordeck/simplegpio/Pin.java",
"license": "apache-2.0",
"size": 17190
} | [
"com.doordeck.simplegpio.gpio.PinFeature"
] | import com.doordeck.simplegpio.gpio.PinFeature; | import com.doordeck.simplegpio.gpio.*; | [
"com.doordeck.simplegpio"
] | com.doordeck.simplegpio; | 295,727 |
public VideoArchival archival() {
return this.innerProperties() == null ? null : this.innerProperties().archival();
} | VideoArchival function() { return this.innerProperties() == null ? null : this.innerProperties().archival(); } | /**
* Get the archival property: Video archival properties.
*
* @return the archival value.
*/ | Get the archival property: Video archival properties | archival | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java",
"license": "mit",
"size": 6573
} | [
"com.azure.resourcemanager.videoanalyzer.models.VideoArchival"
] | import com.azure.resourcemanager.videoanalyzer.models.VideoArchival; | import com.azure.resourcemanager.videoanalyzer.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 80,902 |
public static MutateRequest buildMutateRequest(
final byte[] regionName, final Delete delete) throws IOException {
MutateRequest.Builder builder = MutateRequest.newBuilder();
RegionSpecifier region = buildRegionSpecifier(
RegionSpecifierType.REGION_NAME, regionName);
builder.setRegion(region);... | static MutateRequest function( final byte[] regionName, final Delete delete) throws IOException { MutateRequest.Builder builder = MutateRequest.newBuilder(); RegionSpecifier region = buildRegionSpecifier( RegionSpecifierType.REGION_NAME, regionName); builder.setRegion(region); builder.setMutate(ProtobufUtil.toMutate(Mu... | /**
* Create a protocol buffer MutateRequest for a delete
*
* @param regionName
* @param delete
* @return a mutate request
* @throws IOException
*/ | Create a protocol buffer MutateRequest for a delete | buildMutateRequest | {
"repo_name": "matteobertozzi/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java",
"license": "apache-2.0",
"size": 43120
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.client.Delete",
"org.apache.hadoop.hbase.protobuf.generated.ClientProtos",
"org.apache.hadoop.hbase.protobuf.generated.HBaseProtos"
] | import java.io.IOException; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; | import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,602,284 |
private void finishLoss(double a_dMass,ArrayList<AnnotationEntity> a_aLoss)
{
if ( a_aLoss.size() > 0 )
{
this.m_objAnnotation.setLoss(a_aLoss);
this.startCalcResidue(a_dMass);
this.m_objAnnotation.setLoss(new ArrayList<AnnotationEntity>());
}
... | void function(double a_dMass,ArrayList<AnnotationEntity> a_aLoss) { if ( a_aLoss.size() > 0 ) { this.m_objAnnotation.setLoss(a_aLoss); this.startCalcResidue(a_dMass); this.m_objAnnotation.setLoss(new ArrayList<AnnotationEntity>()); } } | /**
* Finish loss of small molecules
*
* @param a_dMass mass
* @param a_aLoss list of lost molecules annotation
*/ | Finish loss of small molecules | finishLoss | {
"repo_name": "glycoinfo/eurocarbdb",
"path": "application/GlycoPeakfinder/src/java/org/eurocarbdb/applications/ms/glycopeakfinder/calculation/GlycoPeakfinder.java",
"license": "gpl-3.0",
"size": 61845
} | [
"java.util.ArrayList",
"org.eurocarbdb.applications.ms.glycopeakfinder.calculation.storage.AnnotationEntity"
] | import java.util.ArrayList; import org.eurocarbdb.applications.ms.glycopeakfinder.calculation.storage.AnnotationEntity; | import java.util.*; import org.eurocarbdb.applications.ms.glycopeakfinder.calculation.storage.*; | [
"java.util",
"org.eurocarbdb.applications"
] | java.util; org.eurocarbdb.applications; | 421,342 |
public AggregationInterval aggregationInterval() {
return this.aggregationInterval;
} | AggregationInterval function() { return this.aggregationInterval; } | /**
* Get the aggregationInterval property: The aggregation interval of the Timeseries.
*
* @return the aggregationInterval value.
*/ | Get the aggregationInterval property: The aggregation interval of the Timeseries | aggregationInterval | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/TimeseriesInner.java",
"license": "mit",
"size": 7113
} | [
"com.azure.resourcemanager.frontdoor.models.AggregationInterval"
] | import com.azure.resourcemanager.frontdoor.models.AggregationInterval; | import com.azure.resourcemanager.frontdoor.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,152,771 |
public void addProtocolCommandListener(ProtocolCommandListener listener)
{
_commandSupport_.addProtocolCommandListener(listener);
}
| void function(ProtocolCommandListener listener) { _commandSupport_.addProtocolCommandListener(listener); } | /***
* Adds a ProtocolCommandListener. Delegates this task to
* {@link #_commandSupport_ _commandSupport_ }.
* <p>
* @param listener The ProtocolCommandListener to add.
***/ | Adds a ProtocolCommandListener. Delegates this task to <code>#_commandSupport_ _commandSupport_ </code>. | addProtocolCommandListener | {
"repo_name": "bdaum/zoraPD",
"path": "com.bdaum.zoom.net.core/src/org/apache/commons/net/ftp/FTP.java",
"license": "gpl-2.0",
"size": 67481
} | [
"org.apache.commons.net.ProtocolCommandListener"
] | import org.apache.commons.net.ProtocolCommandListener; | import org.apache.commons.net.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,197,968 |
public Observable<ServiceResponse<Page<ProductInner>>> getMultiplePagesNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<ProductInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* A paging operation that includes a nextLink that has 10 pages.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @return the PagedList<ProductInner> object wrapped in {@link ServiceResponse} if successful.
*/ | A paging operation that includes a nextLink that has 10 pages | getMultiplePagesNextSinglePageAsync | {
"repo_name": "tbombach/autorest",
"path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/paging/implementation/PagingsInner.java",
"license": "mit",
"size": 168428
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,192,932 |
switch (typeCode) {
case Types.TINYINT :
case Types.SQL_SMALLINT :
case Types.SQL_INTEGER :
case Types.SQL_BIGINT :
return typeWidth;
case Types.SQL_REAL :
case Types.SQL_FLOAT :
case Types.SQL_DOUBLE :
... | switch (typeCode) { case Types.TINYINT : case Types.SQL_SMALLINT : case Types.SQL_INTEGER : case Types.SQL_BIGINT : return typeWidth; case Types.SQL_REAL : case Types.SQL_FLOAT : case Types.SQL_DOUBLE : return 64; case Types.SQL_NUMERIC : case Types.SQL_DECIMAL : return (int) precision; default : throw Error.runtimeErr... | /**
* Returns decimal precision for NUMERIC/DECIMAL. Returns binary precision
* for other parts.
*/ | Returns decimal precision for NUMERIC/DECIMAL. Returns binary precision for other parts | getPrecision | {
"repo_name": "ggorsontanguy/pocHSQLDB",
"path": "hsqldb-2.2.9/hsqldb/src/org/hsqldb/types/NumberType.java",
"license": "gpl-3.0",
"size": 60441
} | [
"org.hsqldb.error.Error",
"org.hsqldb.error.ErrorCode"
] | import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; | import org.hsqldb.error.*; | [
"org.hsqldb.error"
] | org.hsqldb.error; | 2,334,094 |
private void handleExperienceGain(PlayerInteractEvent event, int blockID, int meta)
{
//Get data about the current event.
EntityPlayer player = event.entityPlayer;
//Get what the player previously did.
PlayerInteractEntry entry = ArrowsPlus.instance.playerBlockHarvestingMap.get(player.username);
int prev... | void function(PlayerInteractEvent event, int blockID, int meta) { EntityPlayer player = event.entityPlayer; PlayerInteractEntry entry = ArrowsPlus.instance.playerBlockHarvestingMap.get(player.username); int previousBlockID = 0; int previousMeta = 0; if (entry != null) { previousBlockID = entry.blockID; previousMeta = e... | /**
* Left click event. Checks to see if the player's experience needs to be upped.
*
* @param event Instance of the event.
* @param blockID Block ID that was clicked.
* @param meta Meta of block that was clicked.
*/ | Left click event. Checks to see if the player's experience needs to be upped | handleExperienceGain | {
"repo_name": "WildBamaBoy/arrows-plus",
"path": "Forge/mcp/src/minecraft/arrowsplus/core/forge/EventHooks.java",
"license": "gpl-3.0",
"size": 16874
} | [
"net.minecraft.block.Block",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.util.ChatMessageComponent",
"net.minecraftforge.event.entity.player.PlayerInteractEvent"
] | import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatMessageComponent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; | import net.minecraft.block.*; import net.minecraft.entity.player.*; import net.minecraft.util.*; import net.minecraftforge.event.entity.player.*; | [
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.util",
"net.minecraftforge.event"
] | net.minecraft.block; net.minecraft.entity; net.minecraft.util; net.minecraftforge.event; | 938,005 |
public static void showToast(final Context context, @StringRes final int resId) {
showToast(context, context.getString(resId));
} | static void function(final Context context, @StringRes final int resId) { showToast(context, context.getString(resId)); } | /**
* Show a long toast message to the user. This can be called from any thread.
*
* @param context
* the activity the user is facing
* @param resId
* the message
*/ | Show a long toast message to the user. This can be called from any thread | showToast | {
"repo_name": "tobiasge/cgeo",
"path": "main/src/cgeo/geocaching/activity/ActivityMixin.java",
"license": "apache-2.0",
"size": 9025
} | [
"android.content.Context",
"androidx.annotation.StringRes"
] | import android.content.Context; import androidx.annotation.StringRes; | import android.content.*; import androidx.annotation.*; | [
"android.content",
"androidx.annotation"
] | android.content; androidx.annotation; | 358,599 |
// ===========================================================================
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "NP_UNWRITTEN_FIELD")
public void _unresolved(CommandContext ci)
{
ci.tableHeader("Service", "Unresolved Fields");
Map<String, Service> sorted = new T... | @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = STR) void function(CommandContext ci) { ci.tableHeader(STR, STR); Map<String, Service> sorted = new TreeMap<String, Service>(); for (Service s : gluer.getServices()) sorted.put(s.getServiceClass().getCanonicalName(), s); for (Entry<String, Service> e : sorted.en... | /**
* Executes the unresolved command.
*
* @param ci The current context.
*/ | Executes the unresolved command | _unresolved | {
"repo_name": "gevaerts/Gluewine",
"path": "imp/src/java/org/gluewine/console/impl/SystemCommandProvider.java",
"license": "apache-2.0",
"size": 27950
} | [
"java.util.Map",
"java.util.TreeMap",
"org.gluewine.console.CommandContext",
"org.gluewine.core.glue.Service"
] | import java.util.Map; import java.util.TreeMap; import org.gluewine.console.CommandContext; import org.gluewine.core.glue.Service; | import java.util.*; import org.gluewine.console.*; import org.gluewine.core.glue.*; | [
"java.util",
"org.gluewine.console",
"org.gluewine.core"
] | java.util; org.gluewine.console; org.gluewine.core; | 674,533 |
public static int writeByteArray(byte [] buffer, final int boffset,
final byte [] row, final int roffset, final int rlength,
final byte [] family, final int foffset, int flength,
final byte [] qualifier, final int qoffset, int qlength,
final long timestamp, final Type type,
final byte []... | static int function(byte [] buffer, final int boffset, final byte [] row, final int roffset, final int rlength, final byte [] family, final int foffset, int flength, final byte [] qualifier, final int qoffset, int qlength, final long timestamp, final Type type, final byte [] value, final int voffset, int vlength, Tag[]... | /**
* Write KeyValue format into the provided byte array.
*
* @param buffer the bytes buffer to use
* @param boffset buffer offset
* @param row row key
* @param roffset row offset
* @param rlength row length
* @param family family name
* @param foffset family offset
* @param flength family... | Write KeyValue format into the provided byte array | writeByteArray | {
"repo_name": "ZhangXFeng/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java",
"license": "apache-2.0",
"size": 99516
} | [
"org.apache.hadoop.hbase.util.Bytes"
] | import org.apache.hadoop.hbase.util.Bytes; | import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,124,521 |
public DateTimeFormatterBuilder appendHourOfDay(int minDigits) {
return appendDecimal(DateTimeFieldType.hourOfDay(), minDigits, 2);
} | DateTimeFormatterBuilder function(int minDigits) { return appendDecimal(DateTimeFieldType.hourOfDay(), minDigits, 2); } | /**
* Instructs the printer to emit a numeric hourOfDay field.
*
* @param minDigits minimum number of digits to print
* @return this DateTimeFormatterBuilder, for chaining
*/ | Instructs the printer to emit a numeric hourOfDay field | appendHourOfDay | {
"repo_name": "omnissiah/WhenGreen",
"path": "WhenGreen/app/libs/joda-time-2.8/src/main/java/org/joda/time/format/DateTimeFormatterBuilder.java",
"license": "gpl-3.0",
"size": 99112
} | [
"org.joda.time.DateTimeFieldType"
] | import org.joda.time.DateTimeFieldType; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 1,973,464 |
@Test(expected = NoResolvedResultException.class)
public void control2() {
final File file = Maven.resolver().resolve("junit:junit:4.11").withClassPathResolution(false)
.withMavenCentralRepo(false).withoutTransitivity().asSingle(File.class);
new ValidationUtil("junit").validate(f... | @Test(expected = NoResolvedResultException.class) void function() { final File file = Maven.resolver().resolve(STR).withClassPathResolution(false) .withMavenCentralRepo(false).withoutTransitivity().asSingle(File.class); new ValidationUtil("junit").validate(file); final File localRepo = new File(FAKE_REPO); Assert.asser... | /**
* Ensures the artifact we will fetch in the actual tests is no present in any default repositories.
*/ | Ensures the artifact we will fetch in the actual tests is no present in any default repositories | control2 | {
"repo_name": "oliveti/resolver",
"path": "impl-maven/src/test/java/org/jboss/shrinkwrap/resolver/impl/maven/integration/AdditionalRemoteRepositoryTestCase.java",
"license": "apache-2.0",
"size": 11024
} | [
"java.io.File",
"org.jboss.shrinkwrap.resolver.api.NoResolvedResultException",
"org.jboss.shrinkwrap.resolver.api.maven.Maven",
"org.jboss.shrinkwrap.resolver.impl.maven.util.ValidationUtil",
"org.junit.Assert",
"org.junit.Test"
] | import java.io.File; import org.jboss.shrinkwrap.resolver.api.NoResolvedResultException; import org.jboss.shrinkwrap.resolver.api.maven.Maven; import org.jboss.shrinkwrap.resolver.impl.maven.util.ValidationUtil; import org.junit.Assert; import org.junit.Test; | import java.io.*; import org.jboss.shrinkwrap.resolver.api.*; import org.jboss.shrinkwrap.resolver.api.maven.*; import org.jboss.shrinkwrap.resolver.impl.maven.util.*; import org.junit.*; | [
"java.io",
"org.jboss.shrinkwrap",
"org.junit"
] | java.io; org.jboss.shrinkwrap; org.junit; | 2,600,912 |
public static void limitNumMapTasks(String table, JobConf job)
throws IOException {
int regions = MetaReader.getRegionCount(HBaseConfiguration.create(job), table);
if (job.getNumMapTasks() > regions)
job.setNumMapTasks(regions);
} | static void function(String table, JobConf job) throws IOException { int regions = MetaReader.getRegionCount(HBaseConfiguration.create(job), table); if (job.getNumMapTasks() > regions) job.setNumMapTasks(regions); } | /**
* Ensures that the given number of map tasks for the given job
* configuration does not exceed the number of regions for the given table.
*
* @param table The table to get the region count for.
* @param job The current job configuration to adjust.
* @throws IOException When retrieving the table ... | Ensures that the given number of map tasks for the given job configuration does not exceed the number of regions for the given table | limitNumMapTasks | {
"repo_name": "lilonglai/hbase-0.96.2",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableMapReduceUtil.java",
"license": "apache-2.0",
"size": 12629
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.HBaseConfiguration",
"org.apache.hadoop.hbase.catalog.MetaReader",
"org.apache.hadoop.mapred.JobConf"
] | import java.io.IOException; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.catalog.MetaReader; import org.apache.hadoop.mapred.JobConf; | import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.catalog.*; import org.apache.hadoop.mapred.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,592,914 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(DbchangelogPackage.eINSTANCE.getCreateProcedureType_Mixed(),
FeatureMapUtil.crea... | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (DbchangelogPackage.eINSTANCE.getCreateProcedureType_Mixed(), FeatureMapUtil.createEntry (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CO... | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "dzonekl/LiquibaseEditor",
"path": "plugins/org.liquidbase.model.edit/src/org/liquibase/xml/ns/dbchangelog/provider/CreateProcedureTypeItemProvider.java",
"license": "mit",
"size": 13404
} | [
"java.util.Collection",
"org.eclipse.emf.ecore.util.FeatureMapUtil",
"org.eclipse.emf.ecore.xml.type.XMLTypePackage",
"org.liquibase.xml.ns.dbchangelog.DbchangelogPackage"
] | import java.util.Collection; import org.eclipse.emf.ecore.util.FeatureMapUtil; import org.eclipse.emf.ecore.xml.type.XMLTypePackage; import org.liquibase.xml.ns.dbchangelog.DbchangelogPackage; | import java.util.*; import org.eclipse.emf.ecore.util.*; import org.eclipse.emf.ecore.xml.type.*; import org.liquibase.xml.ns.dbchangelog.*; | [
"java.util",
"org.eclipse.emf",
"org.liquibase.xml"
] | java.util; org.eclipse.emf; org.liquibase.xml; | 2,429,384 |
@Metadata(description = "To use a custom thread pool for the server. This option should only be used in special circumstances.")
public void setThreadPool(ThreadPool threadPool) {
this.threadPool = threadPool;
} | @Metadata(description = STR) void function(ThreadPool threadPool) { this.threadPool = threadPool; } | /**
* To use a custom thread pool for the server. This option should only be used in special circumstances.
*/ | To use a custom thread pool for the server. This option should only be used in special circumstances | setThreadPool | {
"repo_name": "josefkarasek/camel",
"path": "components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java",
"license": "apache-2.0",
"size": 56155
} | [
"org.apache.camel.spi.Metadata",
"org.eclipse.jetty.util.thread.ThreadPool"
] | import org.apache.camel.spi.Metadata; import org.eclipse.jetty.util.thread.ThreadPool; | import org.apache.camel.spi.*; import org.eclipse.jetty.util.thread.*; | [
"org.apache.camel",
"org.eclipse.jetty"
] | org.apache.camel; org.eclipse.jetty; | 334,531 |
CandidateInfo addCandidate(CandidateRecord candidateRecord, String sessionId); | CandidateInfo addCandidate(CandidateRecord candidateRecord, String sessionId); | /**
* This method asks for recording the current result. Recording is not
* guaranteed as system could opt to discard the result.
*
* @param candidateRecord current record
* @return CandidateInfo with the position of the record in the ranking and
* an indication of acceptance.
*/ | This method asks for recording the current result. Recording is not guaranteed as system could opt to discard the result | addCandidate | {
"repo_name": "albertonavarro/cabotrafalgar",
"path": "recordserver-client/src/main/java/com/navid/trafalgar/persistence/RecordPersistenceService.java",
"license": "gpl-3.0",
"size": 1488
} | [
"com.navid.trafalgar.model.CandidateRecord"
] | import com.navid.trafalgar.model.CandidateRecord; | import com.navid.trafalgar.model.*; | [
"com.navid.trafalgar"
] | com.navid.trafalgar; | 1,848,916 |
Set<Permission> permissions(); | Set<Permission> permissions(); | /**
* Returns the permissions requested by the application.
*
* @return requested permissions
*/ | Returns the permissions requested by the application | permissions | {
"repo_name": "packet-tracker/onos",
"path": "core/api/src/main/java/org/onosproject/app/ApplicationDescription.java",
"license": "apache-2.0",
"size": 2222
} | [
"java.util.Set",
"org.onosproject.security.Permission"
] | import java.util.Set; import org.onosproject.security.Permission; | import java.util.*; import org.onosproject.security.*; | [
"java.util",
"org.onosproject.security"
] | java.util; org.onosproject.security; | 1,989,346 |
public ServiceFuture<List<WorkspaceInner>> listAsync(final ServiceCallback<List<WorkspaceInner>> serviceCallback) {
return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback);
} | ServiceFuture<List<WorkspaceInner>> function(final ServiceCallback<List<WorkspaceInner>> serviceCallback) { return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); } | /**
* Gets the workspaces in a subscription.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceFuture} object
*/ | Gets the workspaces in a subscription | listAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesInner.java",
"license": "mit",
"size": 57374
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.List"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,103,185 |
@ApiModelProperty(value = "The fix for this specific package version.")
public VulnerabilityTypeVulnerabilityLocation getFixedLocation() {
return fixedLocation;
} | @ApiModelProperty(value = STR) VulnerabilityTypeVulnerabilityLocation function() { return fixedLocation; } | /**
* The fix for this specific package version.
* @return fixedLocation
**/ | The fix for this specific package version | getFixedLocation | {
"repo_name": "grafeas/client-java",
"path": "src/main/java/io/grafeas/model/VulnerabilityTypeDetail.java",
"license": "apache-2.0",
"size": 8501
} | [
"io.grafeas.model.VulnerabilityTypeVulnerabilityLocation",
"io.swagger.annotations.ApiModelProperty"
] | import io.grafeas.model.VulnerabilityTypeVulnerabilityLocation; import io.swagger.annotations.ApiModelProperty; | import io.grafeas.model.*; import io.swagger.annotations.*; | [
"io.grafeas.model",
"io.swagger.annotations"
] | io.grafeas.model; io.swagger.annotations; | 1,801,435 |
void prepare() throws ClusteringFault; | void prepare() throws ClusteringFault; | /**
* First phase of the 2-phase commit protocol.
* Notifies a node that it needs to prepare to switch to a new configuration.
*
* @throws ClusteringFault If an error occurs while preparing to commit
*/ | First phase of the 2-phase commit protocol. Notifies a node that it needs to prepare to switch to a new configuration | prepare | {
"repo_name": "intalio/axis2",
"path": "modules/kernel/src/org/apache/axis2/clustering/configuration/ConfigurationManager.java",
"license": "apache-2.0",
"size": 5640
} | [
"org.apache.axis2.clustering.ClusteringFault"
] | import org.apache.axis2.clustering.ClusteringFault; | import org.apache.axis2.clustering.*; | [
"org.apache.axis2"
] | org.apache.axis2; | 1,881,616 |
public void doPrev_back_next_submission(RunData rundata, String option)
{
if (!"POST".equals(rundata.getRequest().getMethod())) {
return;
}
SessionState state = ((JetspeedRunData) rundata).getPortletSessionState(((JetspeedRunData) rundata).getJs_peid());
// save the instructor input
boolean hasChang... | void function(RunData rundata, String option) { if (!"POST".equals(rundata.getRequest().getMethod())) { return; } SessionState state = ((JetspeedRunData) rundata).getPortletSessionState(((JetspeedRunData) rundata).getJs_peid()); boolean hasChange = readGradeForm(rundata, state, "save"); if (state.getAttribute(STATE_MES... | /**
* Responding to the request of submission navigation
* @param rundata
* @param option
*/ | Responding to the request of submission navigation | doPrev_back_next_submission | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 631432
} | [
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.util.ParameterParser"
] | import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.util.ParameterParser; | import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; import org.sakaiproject.util.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event",
"org.sakaiproject.util"
] | org.sakaiproject.cheftool; org.sakaiproject.event; org.sakaiproject.util; | 683,173 |
public String getStandardIdentifier(Project project, Deliverable deliverable, boolean useComposedCodification); | String function(Project project, Deliverable deliverable, boolean useComposedCodification); | /**
* This method returns the deliverable identifier whether using composed codification (that is with the organization
* IATI
* standard id) or a simple id.
*
* @param project , the project to get the standard identifier from.
* @param deliverable, the deliverable related to get the standard identif... | This method returns the deliverable identifier whether using composed codification (that is with the organization IATI standard id) or a simple id | getStandardIdentifier | {
"repo_name": "CCAFS/ccafs-ap",
"path": "impactPathways/src/main/java/org/cgiar/ccafs/ap/data/manager/DeliverableManager.java",
"license": "gpl-3.0",
"size": 7190
} | [
"org.cgiar.ccafs.ap.data.model.Deliverable",
"org.cgiar.ccafs.ap.data.model.Project"
] | import org.cgiar.ccafs.ap.data.model.Deliverable; import org.cgiar.ccafs.ap.data.model.Project; | import org.cgiar.ccafs.ap.data.model.*; | [
"org.cgiar.ccafs"
] | org.cgiar.ccafs; | 1,297,309 |
public ShortToken visitShort(EditsElement e) throws IOException {
return (ShortToken)visit(tokenizer.read(new ShortToken(e)));
} | ShortToken function(EditsElement e) throws IOException { return (ShortToken)visit(tokenizer.read(new ShortToken(e))); } | /**
* Convenience shortcut method to parse a specific token type
*/ | Convenience shortcut method to parse a specific token type | visitShort | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/EditsVisitor.java",
"license": "apache-2.0",
"size": 6249
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.tools.offlineEditsViewer.Tokenizer"
] | import java.io.IOException; import org.apache.hadoop.hdfs.tools.offlineEditsViewer.Tokenizer; | import java.io.*; import org.apache.hadoop.hdfs.tools.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,226,606 |
private RuleInterface instantiateRule(String validationRule,
AbstractAttributeUIBeanInterface attributeUIBeanInformationIntf)
throws DynamicExtensionsSystemException
{
RuleConfigurationObject ruleConfigurationObject = null;
RuleInterface rule = null;
DomainObjectFactory domainObjectFactory = Dom... | RuleInterface function(String validationRule, AbstractAttributeUIBeanInterface attributeUIBeanInformationIntf) throws DynamicExtensionsSystemException { RuleConfigurationObject ruleConfigurationObject = null; RuleInterface rule = null; DomainObjectFactory domainObjectFactory = DomainObjectFactory.getInstance(); Control... | /**
* This method populates and returns a new Rule depending upon the Rule name
* @param validationRule
* @param attributeUIBeanInformationIntf
* @return
* @throws DynamicExtensionsSystemException
*/ | This method populates and returns a new Rule depending upon the Rule name | instantiateRule | {
"repo_name": "NCIP/cab2b",
"path": "software/dependencies/dynamicextensions/caB2B_2009_JUN_02/src/edu/common/dynamicextensions/processor/AttributeProcessor.java",
"license": "bsd-3-clause",
"size": 75758
} | [
"edu.common.dynamicextensions.domain.DomainObjectFactory",
"edu.common.dynamicextensions.domaininterface.validationrules.RuleInterface",
"edu.common.dynamicextensions.domaininterface.validationrules.RuleParameterInterface",
"edu.common.dynamicextensions.exception.DynamicExtensionsSystemException",
"edu.comm... | import edu.common.dynamicextensions.domain.DomainObjectFactory; import edu.common.dynamicextensions.domaininterface.validationrules.RuleInterface; import edu.common.dynamicextensions.domaininterface.validationrules.RuleParameterInterface; import edu.common.dynamicextensions.exception.DynamicExtensionsSystemException; i... | import edu.common.dynamicextensions.domain.*; import edu.common.dynamicextensions.domaininterface.validationrules.*; import edu.common.dynamicextensions.exception.*; import edu.common.dynamicextensions.ui.interfaces.*; import edu.common.dynamicextensions.ui.util.*; import java.util.*; | [
"edu.common.dynamicextensions",
"java.util"
] | edu.common.dynamicextensions; java.util; | 850,541 |
public void onRunClick(View v) {
runQuery();
} | void function(View v) { runQuery(); } | /**
* Called when "Run" button is clicked
*
* @param v
*/ | Called when "Run" button is clicked | onRunClick | {
"repo_name": "iFernandoSousa/cordova-salesforcesdk",
"path": "src/android/com/salesforce/androidsdk/smartstore/ui/SmartStoreInspectorActivity.java",
"license": "unlicense",
"size": 10574
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,441,829 |
private Bitmap loadFileBitmap(String pathName) {
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inScaled = false;
return BitmapFactory.decodeFile(pathName, opts);
} | Bitmap function(String pathName) { BitmapFactory.Options opts = new BitmapFactory.Options(); opts.inScaled = false; return BitmapFactory.decodeFile(pathName, opts); } | /**
* Loads an image from filesystem.
*/ | Loads an image from filesystem | loadFileBitmap | {
"repo_name": "rdunning0823/tophat",
"path": "android/src/NativeView.java",
"license": "gpl-2.0",
"size": 14455
} | [
"android.graphics.Bitmap",
"android.graphics.BitmapFactory"
] | import android.graphics.Bitmap; import android.graphics.BitmapFactory; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,571,436 |
protected void _drawHealthBar(Graphics2D gphx, Game game, Rectangle r)
{
int maxHP = maxHealthPoints;
if(limitHealthPoints != 1000)
maxHP = limitHealthPoints;
double wiggleX = r.width * 0.1f;
double wiggleY = r.height * 0.1f;
double prop = Math.max(0,Math.min... | void function(Graphics2D gphx, Game game, Rectangle r) { int maxHP = maxHealthPoints; if(limitHealthPoints != 1000) maxHP = limitHealthPoints; double wiggleX = r.width * 0.1f; double wiggleY = r.height * 0.1f; double prop = Math.max(0,Math.min(1, healthPoints / (double) maxHP)); double barHeight = r.height-wiggleY; int... | /**
* Draws the health bar, as a vertical bar on top (and left) of the sprite.
* @param gphx graphics to draw in.
* @param game game being played at the moment.
* @param r rectangle of this sprite.
*/ | Draws the health bar, as a vertical bar on top (and left) of the sprite | _drawHealthBar | {
"repo_name": "tohahn/UE_ML",
"path": "UE06/gvgai/src/core/VGDLSprite.java",
"license": "gpl-3.0",
"size": 32756
} | [
"java.awt.Graphics2D",
"java.awt.Rectangle"
] | import java.awt.Graphics2D; import java.awt.Rectangle; | import java.awt.*; | [
"java.awt"
] | java.awt; | 870,541 |
public static DocumentBuilder newDocumentBuilder() throws ParserConfigurationException {
// Prepare for DOM Document building
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setExpandEntityReferences(true);
documentBuilderFactory.setNamespaceAware... | static DocumentBuilder function() throws ParserConfigurationException { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); documentBuilderFactory.setExpandEntityReferences(true); documentBuilderFactory.setNamespaceAware(true); documentBuilderFactory.setValidating(false); documentBuild... | /**
* Creates and configures a re-usable instance of DocumentBuilder.
*
* @throws ParserConfigurationException when it's not possible to configure
* the DocumentBuilder as required.
*/ | Creates and configures a re-usable instance of DocumentBuilder | newDocumentBuilder | {
"repo_name": "martian-a/cards-against-humanity",
"path": "src/main/java/com/kaikoda/cah/Deck.java",
"license": "gpl-3.0",
"size": 13423
} | [
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException"
] | import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; | import javax.xml.parsers.*; | [
"javax.xml"
] | javax.xml; | 446,153 |
@FunctionalInterface
public interface WriteCallback {
boolean write(ByteBuffer buffer, long position) throws IOException;
} | @FunctionalInterface interface WriteCallback { boolean function(ByteBuffer buffer, long position) throws IOException; } | /**
* Performs an uninterruptable write of the given bytes to the given file position.
*
* @param buffer
* the bytes to write
* @param position
* the file position to write them to
* @return true iff an attempt was made to interrupt the write via {@link Thread#interrupt()}. N... | Performs an uninterruptable write of the given bytes to the given file position | write | {
"repo_name": "Niky4000/UsefulUtils",
"path": "projects/others/eclipse-platform-parent/eclipse.jdt.core-master/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/nd/db/ChunkWriter.java",
"license": "gpl-3.0",
"size": 5643
} | [
"java.io.IOException",
"java.nio.ByteBuffer"
] | import java.io.IOException; import java.nio.ByteBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 257,008 |
public static MozuClient<com.mozu.api.contracts.location.LocationCollection> getLocationsClient() throws Exception
{
return getLocationsClient( null, null, null, null, null);
}
| static MozuClient<com.mozu.api.contracts.location.LocationCollection> function() throws Exception { return getLocationsClient( null, null, null, null, null); } | /**
*
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.location.LocationCollection> mozuClient=GetLocationsClient();
* client.setBaseAddress(url);
* client.executeRequest();
* LocationCollection locationCollection = client.Result();
* </code></pre></p>
* @return Mozu.Api.MozuClient <com.moz... | <code><code> MozuClient mozuClient=GetLocationsClient(); client.setBaseAddress(url); client.executeRequest(); LocationCollection locationCollection = client.Result(); </code></code> | getLocationsClient | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/admin/LocationClient.java",
"license": "mit",
"size": 11864
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 263,636 |
@SuppressWarnings("unused")
@Test
// BEGIN SUPRESS CATCH EXCEPTION
public void test_InternalStructure() throws Exception {
// END SUPRESS CATCH EXCEPTION
// build the view model
// ...> yView
// ......> yText
YView yView = factory.createView();
YCheckBox yCheckBox = factory.createCheckBox();
yView.s... | @SuppressWarnings(STR) void function() throws Exception { YView yView = factory.createView(); YCheckBox yCheckBox = factory.createCheckBox(); yView.setContent(yCheckBox); VaadinRenderer renderer = new VaadinRenderer(); renderer.render(rootLayout, yView, null); ICheckboxEditpart checkBoxEditpart = DelegatingEditPartMana... | /**
* Tests the internal structure.
*
* @throws Exception
*/ | Tests the internal structure | test_InternalStructure | {
"repo_name": "lunifera/lunifera-runtime-web",
"path": "org.lunifera.runtime.web.ecview.presentation.vaadin.tests/src/org/lunifera/runtime/web/ecview/presentation/vaadin/tests/presentation/HorizontalLayoutPresentationTests.java",
"license": "epl-1.0",
"size": 22914
} | [
"com.vaadin.ui.CheckBox",
"com.vaadin.ui.Component",
"com.vaadin.ui.ComponentContainer",
"com.vaadin.ui.CssLayout",
"org.eclipse.emf.ecp.ecview.common.editpart.DelegatingEditPartManager",
"org.eclipse.emf.ecp.ecview.common.model.core.YView",
"org.eclipse.emf.ecp.ecview.common.presentation.IWidgetPresent... | import com.vaadin.ui.CheckBox; import com.vaadin.ui.Component; import com.vaadin.ui.ComponentContainer; import com.vaadin.ui.CssLayout; import org.eclipse.emf.ecp.ecview.common.editpart.DelegatingEditPartManager; import org.eclipse.emf.ecp.ecview.common.model.core.YView; import org.eclipse.emf.ecp.ecview.common.present... | import com.vaadin.ui.*; import org.eclipse.emf.ecp.ecview.common.editpart.*; import org.eclipse.emf.ecp.ecview.common.model.core.*; import org.eclipse.emf.ecp.ecview.common.presentation.*; import org.eclipse.emf.ecp.ecview.extension.model.extension.*; import org.eclipse.emf.ecp.ecview.ui.core.editparts.extension.*; imp... | [
"com.vaadin.ui",
"org.eclipse.emf",
"org.junit",
"org.lunifera.runtime"
] | com.vaadin.ui; org.eclipse.emf; org.junit; org.lunifera.runtime; | 1,271,287 |
@Nullable public UUID subjectId() {
return subjId;
} | @Nullable UUID function() { return subjId; } | /**
* Gets client ID for which this projection was created.
*
* @return Client ID.
*/ | Gets client ID for which this projection was created | subjectId | {
"repo_name": "dlnufox/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOperationContext.java",
"license": "apache-2.0",
"size": 5327
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,784,633 |
public Invitation getInvitation(int id) {
Connection connection = null;
try {
connection = getConnection();
return invitationDao.getInvitation(connection, id);
} catch (Exception ex) {
SilverTrace.error("Silverpeas.Bus.SocialNetwork.Invitation",
"InvitationService.ignoreInvita... | Invitation function(int id) { Connection connection = null; try { connection = getConnection(); return invitationDao.getInvitation(connection, id); } catch (Exception ex) { SilverTrace.error(STR, STR, "", ex); } finally { DBUtil.close(connection); } return null; } | /**
* rturn invitation by her id
* @param senderId
* @param receiverId
* @return Invitation
*/ | rturn invitation by her id | getInvitation | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "lib-core/src/main/java/com/silverpeas/socialnetwork/invitation/InvitationService.java",
"license": "agpl-3.0",
"size": 8809
} | [
"com.stratelia.silverpeas.silvertrace.SilverTrace",
"com.stratelia.webactiv.util.DBUtil",
"java.sql.Connection"
] | import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.util.DBUtil; import java.sql.Connection; | import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.util.*; import java.sql.*; | [
"com.stratelia.silverpeas",
"com.stratelia.webactiv",
"java.sql"
] | com.stratelia.silverpeas; com.stratelia.webactiv; java.sql; | 2,482,954 |
public void addConditional(String c) {
conditionString = c;
String condition = "";
String[] stringArray = c.split(" ");
for (String a : stringArray) {
condition += (findMatches(a) + " ");
}
if (condition.charAt(condition.length()-1)==(' ')){
condition= condition.substring(0, condi... | void function(String c) { conditionString = c; String condition = STR STR STR STR"); trigger.conditionExpression = (new Expression(condition)); } | /**
* Passes the builder a string of values separated with a space the
* correspond to a conditional
*
* @param c
*/ | Passes the builder a string of values separated with a space the correspond to a conditional | addConditional | {
"repo_name": "tsmacdonald/simulator",
"path": "src/edu/wheaton/simulator/entity/Trigger.java",
"license": "mit",
"size": 19525
} | [
"edu.wheaton.simulator.expression.Expression"
] | import edu.wheaton.simulator.expression.Expression; | import edu.wheaton.simulator.expression.*; | [
"edu.wheaton.simulator"
] | edu.wheaton.simulator; | 1,201,793 |
@Override
public Object encode(final Object value) throws EncoderException {
if (value == null) {
return null;
} else if (value instanceof String) {
return encode((String) value);
} else {
throw new EncoderException("Objects of type " +
... | Object function(final Object value) throws EncoderException { if (value == null) { return null; } else if (value instanceof String) { return encode((String) value); } else { throw new EncoderException(STR + value.getClass().getName() + STR); } } | /**
* Encodes an object into its Base64 form using the default charset. Unsafe characters are escaped.
*
* @param value
* object to convert to Base64 form
* @return Base64 object
* @throws EncoderException
* thrown if a failure condition is encountered du... | Encodes an object into its Base64 form using the default charset. Unsafe characters are escaped | encode | {
"repo_name": "MaxCDN/java-maxcdn",
"path": "src/org/apache/commons/codec/net/BCodec.java",
"license": "mit",
"size": 8791
} | [
"org.apache.commons.codec.EncoderException"
] | import org.apache.commons.codec.EncoderException; | import org.apache.commons.codec.*; | [
"org.apache.commons"
] | org.apache.commons; | 534,298 |
@Test(expected = IllegalArgumentException.class)
public void addContentBadTableName4() throws ClassNotFoundException, SQLException, ConformanceException, IOException
{
final File testFile = TestUtility.getRandomFile();
try(final GeoPackage gpkg = new GeoPackage(testFile, GeoPackage.OpenMode.... | @Test(expected = IllegalArgumentException.class) void function() throws ClassNotFoundException, SQLException, ConformanceException, IOException { final File testFile = TestUtility.getRandomFile(); try(final GeoPackage gpkg = new GeoPackage(testFile, GeoPackage.OpenMode.Create)) { gpkg.core().addContent(STR, STR, STR, S... | /**
* Tests if the GeoPackageCore throws an IllegalArgumentException
* when adding content with a bad Table Name value for the
* Content
*/ | Tests if the GeoPackageCore throws an IllegalArgumentException when adding content with a bad Table Name value for the Content | addContentBadTableName4 | {
"repo_name": "GitHubRGI/swagd",
"path": "GeoPackage/src/test/java/com/rgi/geopackage/GeoPackageCoreAPITest.java",
"license": "mit",
"size": 51865
} | [
"com.rgi.common.BoundingBox",
"com.rgi.geopackage.verification.ConformanceException",
"java.io.File",
"java.io.IOException",
"java.sql.SQLException",
"org.junit.Assert",
"org.junit.Test"
] | import com.rgi.common.BoundingBox; import com.rgi.geopackage.verification.ConformanceException; import java.io.File; import java.io.IOException; import java.sql.SQLException; import org.junit.Assert; import org.junit.Test; | import com.rgi.common.*; import com.rgi.geopackage.verification.*; import java.io.*; import java.sql.*; import org.junit.*; | [
"com.rgi.common",
"com.rgi.geopackage",
"java.io",
"java.sql",
"org.junit"
] | com.rgi.common; com.rgi.geopackage; java.io; java.sql; org.junit; | 2,182,206 |
public ResourceLocalService getResourceLocalService() {
return resourceLocalService;
} | ResourceLocalService function() { return resourceLocalService; } | /**
* Returns the resource local service.
*
* @return the resource local service
*/ | Returns the resource local service | getResourceLocalService | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/state_lkpLocalServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 174889
} | [
"com.liferay.portal.service.ResourceLocalService"
] | import com.liferay.portal.service.ResourceLocalService; | import com.liferay.portal.service.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 1,787,539 |
public void setAnnots(List<PDFAnnotation> annots) {
this.annots = annots;
for (PDFAnnotation pdfAnnotation : annots) {
// add command to the page if needed
this.commands.addAll(pdfAnnotation.getPageCommandsForAnnotation());
}
}
| void function(List<PDFAnnotation> annots) { this.annots = annots; for (PDFAnnotation pdfAnnotation : annots) { this.commands.addAll(pdfAnnotation.getPageCommandsForAnnotation()); } } | /*************************************************************************
* Set annotations for this PDF page
*
* @param annots
************************************************************************/ | Set annotations for this PDF page | setAnnots | {
"repo_name": "Bennyz1/PDFrenderer",
"path": "src/com/sun/pdfview/PDFPage.java",
"license": "lgpl-2.1",
"size": 28249
} | [
"com.sun.pdfview.annotation.PDFAnnotation",
"java.util.List"
] | import com.sun.pdfview.annotation.PDFAnnotation; import java.util.List; | import com.sun.pdfview.annotation.*; import java.util.*; | [
"com.sun.pdfview",
"java.util"
] | com.sun.pdfview; java.util; | 698,217 |
public List getSectioncontrols() {
return sectioncontrols;
} | List function() { return sectioncontrols; } | /**
* Returns the sectioncontrols.
* @return List
*/ | Returns the sectioncontrols | getSectioncontrols | {
"repo_name": "stevenhva/InfoLearn_OpenOLAT",
"path": "src/main/java/org/olat/ims/qti/editor/beecom/objects/Section.java",
"license": "apache-2.0",
"size": 10360
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,485,982 |
public DelayDefinition delayTime(Long delay) {
setExpression(ExpressionNodeHelper.toExpressionDefinition(ExpressionBuilder.constantExpression(delay)));
return this;
} | DelayDefinition function(Long delay) { setExpression(ExpressionNodeHelper.toExpressionDefinition(ExpressionBuilder.constantExpression(delay))); return this; } | /**
* Sets the delay time in millis to delay
*
* @param delay delay time in millis
* @return the builder
*/ | Sets the delay time in millis to delay | delayTime | {
"repo_name": "Fabryprog/camel",
"path": "core/camel-core/src/main/java/org/apache/camel/model/DelayDefinition.java",
"license": "apache-2.0",
"size": 5300
} | [
"org.apache.camel.builder.ExpressionBuilder"
] | import org.apache.camel.builder.ExpressionBuilder; | import org.apache.camel.builder.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,456,255 |
public static <LL> MeasurementScheduler<LL, MetricType<LL>, MetricDataPoint> forMetrics(
String name, Consumer<MetricDataPoint> completionHandler) {
return new MeasurementScheduler<LL, MetricType<LL>, MetricDataPoint>(name, completionHandler) { | static <LL> MeasurementScheduler<LL, MetricType<LL>, MetricDataPoint> function( String name, Consumer<MetricDataPoint> completionHandler) { return new MeasurementScheduler<LL, MetricType<LL>, MetricDataPoint>(name, completionHandler) { | /**
* Static method that builds a scheduler for metric collection.
*
* @param name the name of the scheduler (used for things like naming the threads)
* @param completionHandler object that is notified of metric values when they are collected
*
* @return the new metric collection scheduler... | Static method that builds a scheduler for metric collection | forMetrics | {
"repo_name": "jpkrohling/hawkular-agent",
"path": "hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/scheduler/MeasurementScheduler.java",
"license": "apache-2.0",
"size": 12098
} | [
"org.hawkular.agent.monitor.inventory.MetricType",
"org.hawkular.agent.monitor.storage.MetricDataPoint",
"org.hawkular.agent.monitor.util.Consumer"
] | import org.hawkular.agent.monitor.inventory.MetricType; import org.hawkular.agent.monitor.storage.MetricDataPoint; import org.hawkular.agent.monitor.util.Consumer; | import org.hawkular.agent.monitor.inventory.*; import org.hawkular.agent.monitor.storage.*; import org.hawkular.agent.monitor.util.*; | [
"org.hawkular.agent"
] | org.hawkular.agent; | 1,811,446 |
public void warning(String message, String category) {
if (this.isLoggingOff) {
return;
}
log(SessionLog.WARNING, category, message);
} | void function(String message, String category) { if (this.isLoggingOff) { return; } log(SessionLog.WARNING, category, message); } | /**
* PUBLIC:
* <p>
* This method is called when a warning level message needs to be logged.
* The message will be translated
* </p><p>
*
* @param message the message key
* </p>
*/ | This method is called when a warning level message needs to be logged. The message will be translated | warning | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/AbstractSession.java",
"license": "epl-1.0",
"size": 198170
} | [
"org.eclipse.persistence.logging.SessionLog"
] | import org.eclipse.persistence.logging.SessionLog; | import org.eclipse.persistence.logging.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 1,015,782 |
private void getLogShipperProperties() {
minShippingInterval = PropertyUtil.
getSystemInt(Property.REPLICATION_MIN_SHIPPING_INTERVAL, (int)MIN);
maxShippingInterval = PropertyUtil.
getSystemInt(Property.REPLICATION_MAX_SHIPPING_INTERVAL, (int)MAX);
// To guarantee a ... | void function() { minShippingInterval = PropertyUtil. getSystemInt(Property.REPLICATION_MIN_SHIPPING_INTERVAL, (int)MIN); maxShippingInterval = PropertyUtil. getSystemInt(Property.REPLICATION_MAX_SHIPPING_INTERVAL, (int)MAX); int buffers = ReplicationLogBuffer.DEFAULT_NUMBER_LOG_BUFFERS; if (minShippingInterval > maxSh... | /**
* Load relevant system properties: max and min log shipping interval
*/ | Load relevant system properties: max and min log shipping interval | getLogShipperProperties | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.engine/org/apache/derby/impl/store/replication/master/AsynchronousLogShipper.java",
"license": "apache-2.0",
"size": 18229
} | [
"org.apache.derby.iapi.services.property.PropertyUtil",
"org.apache.derby.impl.store.replication.buffer.ReplicationLogBuffer",
"org.apache.derby.shared.common.reference.Property",
"org.apache.derby.shared.common.sanity.SanityManager"
] | import org.apache.derby.iapi.services.property.PropertyUtil; import org.apache.derby.impl.store.replication.buffer.ReplicationLogBuffer; import org.apache.derby.shared.common.reference.Property; import org.apache.derby.shared.common.sanity.SanityManager; | import org.apache.derby.iapi.services.property.*; import org.apache.derby.impl.store.replication.buffer.*; import org.apache.derby.shared.common.reference.*; import org.apache.derby.shared.common.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 1,916,247 |
public void testHasQObject2() throws IOException {
CharArrayReader reader = new CharArrayReader(
" Q_OBJ ECT ".toCharArray());
boolean hasQObject = MetaObjectParser.hasQObject(reader);
assertFalse(hasQObject);
} | void function() throws IOException { CharArrayReader reader = new CharArrayReader( STR.toCharArray()); boolean hasQObject = MetaObjectParser.hasQObject(reader); assertFalse(hasQObject); } | /**
* Test that the lack of Q_OBJECT causes hasQObject to return false.
* @throws IOException test fails on IOException
*/ | Test that the lack of Q_OBJECT causes hasQObject to return false | testHasQObject2 | {
"repo_name": "maven-nar/cpptasks-parallel",
"path": "src/test/java/com/github/maven_nar/cpptasks/trolltech/TestMetaObjectParser.java",
"license": "apache-2.0",
"size": 1832
} | [
"com.github.maven_nar.cpptasks.trolltech.MetaObjectParser",
"java.io.CharArrayReader",
"java.io.IOException"
] | import com.github.maven_nar.cpptasks.trolltech.MetaObjectParser; import java.io.CharArrayReader; import java.io.IOException; | import com.github.maven_nar.cpptasks.trolltech.*; import java.io.*; | [
"com.github.maven_nar",
"java.io"
] | com.github.maven_nar; java.io; | 1,422,719 |
public Connection openConnection() throws DataWarningException {
Connection con = null;
try {
con = DBUtil.makeConnection(JNDINames.DATAWARNING_DATASOURCE);
} catch (RuntimeException e) {
throw new DataWarningException(
"com.silverpeas.dataWarning.implementation.DataWarningDataManage... | Connection function() throws DataWarningException { Connection con = null; try { con = DBUtil.makeConnection(JNDINames.DATAWARNING_DATASOURCE); } catch (RuntimeException e) { throw new DataWarningException( STR, SilverpeasRuntimeException.WARNING, e.getMessage(), STR, e); } catch (Exception e) { throw new DataWarningEx... | /**
* Ouverture de la connection vers la source de donnees
*
* @return Connection la connection
* @exception DataWarningException
*/ | Ouverture de la connection vers la source de donnees | openConnection | {
"repo_name": "CecileBONIN/Silverpeas-Components",
"path": "datawarning/datawarning-jar/src/main/java/com/silverpeas/dataWarning/model/DataWarningDataManager.java",
"license": "agpl-3.0",
"size": 19726
} | [
"com.silverpeas.dataWarning.DataWarningException",
"com.stratelia.webactiv.util.DBUtil",
"com.stratelia.webactiv.util.JNDINames",
"com.stratelia.webactiv.util.exception.SilverpeasRuntimeException",
"java.sql.Connection"
] | import com.silverpeas.dataWarning.DataWarningException; import com.stratelia.webactiv.util.DBUtil; import com.stratelia.webactiv.util.JNDINames; import com.stratelia.webactiv.util.exception.SilverpeasRuntimeException; import java.sql.Connection; | import com.silverpeas.*; import com.stratelia.webactiv.util.*; import com.stratelia.webactiv.util.exception.*; import java.sql.*; | [
"com.silverpeas",
"com.stratelia.webactiv",
"java.sql"
] | com.silverpeas; com.stratelia.webactiv; java.sql; | 1,776,528 |
public AbstractBindingBuilder matchesHeaders(CharSequence headerName,
Predicate<? super String> valuePredicate) {
requireNonNull(headerName, "headerName");
requireNonNull(valuePredicate, "valuePredicate");
headerPredicates.add(RoutingPredicate... | AbstractBindingBuilder function(CharSequence headerName, Predicate<? super String> valuePredicate) { requireNonNull(headerName, STR); requireNonNull(valuePredicate, STR); headerPredicates.add(RoutingPredicate.ofHeaders(headerName, valuePredicate)); return this; } | /**
* Sets the {@link Route} to accept a request when the specified {@code valuePredicate} evaluates
* {@code true} with the value of the specified {@code headerName} header.
*/ | Sets the <code>Route</code> to accept a request when the specified valuePredicate evaluates true with the value of the specified headerName header | matchesHeaders | {
"repo_name": "line/armeria",
"path": "core/src/main/java/com/linecorp/armeria/server/AbstractBindingBuilder.java",
"license": "apache-2.0",
"size": 20864
} | [
"java.util.Objects",
"java.util.function.Predicate"
] | import java.util.Objects; import java.util.function.Predicate; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 2,581,526 |
boolean releaseToGlobalPool(Set<LabelResourceId> release); | boolean releaseToGlobalPool(Set<LabelResourceId> release); | /**
* Releases unused labels to the global resource pool.
*
* @param release release the collection of releasing labels
* @return success or fail
*/ | Releases unused labels to the global resource pool | releaseToGlobalPool | {
"repo_name": "maxkondr/onos-porta",
"path": "incubator/api/src/main/java/org/onosproject/incubator/net/resource/label/LabelResourceStore.java",
"license": "apache-2.0",
"size": 3908
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,063,680 |
public SqlIdentifier plus(String name, SqlParserPos pos) {
final ImmutableList<String> names =
ImmutableList.<String>builder().addAll(this.names).add(name).build();
final ImmutableList<SqlParserPos> componentPositions;
final SqlParserPos pos2;
if (this.componentPositions != null) {
final... | SqlIdentifier function(String name, SqlParserPos pos) { final ImmutableList<String> names = ImmutableList.<String>builder().addAll(this.names).add(name).build(); final ImmutableList<SqlParserPos> componentPositions; final SqlParserPos pos2; if (this.componentPositions != null) { final ImmutableList.Builder<SqlParserPos... | /**
* Creates an identifier that consists of this identifier plus a name segment.
* Does not modify this identifier.
*/ | Creates an identifier that consists of this identifier plus a name segment. Does not modify this identifier | plus | {
"repo_name": "julianhyde/calcite",
"path": "core/src/main/java/org/apache/calcite/sql/SqlIdentifier.java",
"license": "apache-2.0",
"size": 12276
} | [
"com.google.common.collect.ImmutableList",
"org.apache.calcite.sql.parser.SqlParserPos"
] | import com.google.common.collect.ImmutableList; import org.apache.calcite.sql.parser.SqlParserPos; | import com.google.common.collect.*; import org.apache.calcite.sql.parser.*; | [
"com.google.common",
"org.apache.calcite"
] | com.google.common; org.apache.calcite; | 1,647,837 |
void addRequestHeaderDontRepleace(String key, String value) {
if(userHeaders == null) {
userHeaders = new Hashtable();
}
if(!userHeaders.containsKey(key)) {
userHeaders.put(key, value);
}
} | void addRequestHeaderDontRepleace(String key, String value) { if(userHeaders == null) { userHeaders = new Hashtable(); } if(!userHeaders.containsKey(key)) { userHeaders.put(key, value); } } | /**
* Adds the given header to the request that will be sent unless the header
* is already set to something else
*
* @param key the header key
* @param value the header value
*/ | Adds the given header to the request that will be sent unless the header is already set to something else | addRequestHeaderDontRepleace | {
"repo_name": "Firethunder/CodenameOne",
"path": "CodenameOne/src/com/codename1/io/ConnectionRequest.java",
"license": "gpl-2.0",
"size": 90869
} | [
"java.util.Hashtable"
] | import java.util.Hashtable; | import java.util.*; | [
"java.util"
] | java.util; | 1,422,029 |
ServiceConfig<DemoServiceImpl> service = new ServiceConfig<>();
service.setApplication(new ApplicationConfig("dubbo-demo-api-provider"));
service.setRegistry(new RegistryConfig("multicast://224.5.6.7:1234"));
service.setInterface(DemoService.class);
service.setRef(new DemoServiceImpl());... | ServiceConfig<DemoServiceImpl> service = new ServiceConfig<>(); service.setApplication(new ApplicationConfig(STR)); service.setRegistry(new RegistryConfig("multicast: service.setInterface(DemoService.class); service.setRef(new DemoServiceImpl()); service.export(); System.in.read(); } | /**
* In order to make sure multicast registry works, need to specify '-Djava.net.preferIPv4Stack=true' before
* launch the application
*/ | In order to make sure multicast registry works, need to specify '-Djava.net.preferIPv4Stack=true' before launch the application | main | {
"repo_name": "alibaba/dubbo",
"path": "dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java",
"license": "apache-2.0",
"size": 1671
} | [
"org.apache.dubbo.config.ApplicationConfig",
"org.apache.dubbo.config.RegistryConfig",
"org.apache.dubbo.config.ServiceConfig",
"org.apache.dubbo.demo.DemoService"
] | import org.apache.dubbo.config.ApplicationConfig; import org.apache.dubbo.config.RegistryConfig; import org.apache.dubbo.config.ServiceConfig; import org.apache.dubbo.demo.DemoService; | import org.apache.dubbo.config.*; import org.apache.dubbo.demo.*; | [
"org.apache.dubbo"
] | org.apache.dubbo; | 2,863,815 |
private void register(final ServiceReference ref, final Object job) {
try {
final String name = getServiceIdentifier(ref);
final Boolean concurrent = getBooleanProperty(ref, Scheduler.PROPERTY_SCHEDULER_CONCURRENT);
final Object runOn = ref.getProperty(Scheduler.PROPERTY_... | void function(final ServiceReference ref, final Object job) { try { final String name = getServiceIdentifier(ref); final Boolean concurrent = getBooleanProperty(ref, Scheduler.PROPERTY_SCHEDULER_CONCURRENT); final Object runOn = ref.getProperty(Scheduler.PROPERTY_SCHEDULER_RUN_ON); String[] runOnOpts = null; if ( runOn... | /**
* Register a job or task
* @param type The type (job or task)
* @param ref The service reference
* @throws IllegalArgumentException
*/ | Register a job or task | register | {
"repo_name": "plutext/sling",
"path": "bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/WhiteboardHandler.java",
"license": "apache-2.0",
"size": 9699
} | [
"java.util.Date",
"org.apache.sling.commons.scheduler.Scheduler",
"org.osgi.framework.Constants",
"org.osgi.framework.ServiceReference"
] | import java.util.Date; import org.apache.sling.commons.scheduler.Scheduler; import org.osgi.framework.Constants; import org.osgi.framework.ServiceReference; | import java.util.*; import org.apache.sling.commons.scheduler.*; import org.osgi.framework.*; | [
"java.util",
"org.apache.sling",
"org.osgi.framework"
] | java.util; org.apache.sling; org.osgi.framework; | 1,469,166 |
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/6454")
public Builder setScheduledExecutorService(
ScheduledExecutorService scheduledExecutorService) {
this.scheduledExecutorService = checkNotNull(scheduledExecutorService);
return this;
} | @ExperimentalApi("https: Builder function( ScheduledExecutorService scheduledExecutorService) { this.scheduledExecutorService = checkNotNull(scheduledExecutorService); return this; } | /**
* See {@link Args#getScheduledExecutorService}.
*/ | See <code>Args#getScheduledExecutorService</code> | setScheduledExecutorService | {
"repo_name": "ejona86/grpc-java",
"path": "api/src/main/java/io/grpc/NameResolver.java",
"license": "apache-2.0",
"size": 23898
} | [
"com.google.common.base.Preconditions",
"java.util.concurrent.ScheduledExecutorService"
] | import com.google.common.base.Preconditions; import java.util.concurrent.ScheduledExecutorService; | import com.google.common.base.*; import java.util.concurrent.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,616,779 |
@Test
public void testJobGetEmpty() throws P4JavaException {
when(server.execMapCmdList(eq(JOB.toString()), argThat(EMPTY_MATCHER), eq(null)))
.thenReturn(buildEmptyGetResultMap());
IJob job = jobDelegator.getJob("");
verify(server).execMapCmdList(eq(JOB.toString()), argT... | void function() throws P4JavaException { when(server.execMapCmdList(eq(JOB.toString()), argThat(EMPTY_MATCHER), eq(null))) .thenReturn(buildEmptyGetResultMap()); IJob job = jobDelegator.getJob(STRnewSTRopenSTRStatus")); } | /**
* Test job get empty.
*
* @throws P4JavaException the p4 java exception
*/ | Test job get empty | testJobGetEmpty | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/r18-1/src/test/java/com/perforce/p4java/impl/mapbased/server/cmd/JobDelegatorTest.java",
"license": "apache-2.0",
"size": 17883
} | [
"com.perforce.p4java.core.IJob",
"com.perforce.p4java.exception.P4JavaException",
"com.perforce.p4java.server.CmdSpec",
"org.mockito.ArgumentMatchers",
"org.mockito.Mockito"
] | import com.perforce.p4java.core.IJob; import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.server.CmdSpec; import org.mockito.ArgumentMatchers; import org.mockito.Mockito; | import com.perforce.p4java.core.*; import com.perforce.p4java.exception.*; import com.perforce.p4java.server.*; import org.mockito.*; | [
"com.perforce.p4java",
"org.mockito"
] | com.perforce.p4java; org.mockito; | 1,269,786 |
@Override
public IComplexNDArray scalar(IComplexFloat value, int offset) {
return createComplex(new float[]{value.realComponent(), value.imaginaryComponent()}, new int[]{1}, new int[]{1}, offset);
} | IComplexNDArray function(IComplexFloat value, int offset) { return createComplex(new float[]{value.realComponent(), value.imaginaryComponent()}, new int[]{1}, new int[]{1}, offset); } | /**
* Create a scalar nd array with the specified value and offset
*
* @param value the value of the scalar
* @param offset the offset of the ndarray
* @return the scalar nd array
*/ | Create a scalar nd array with the specified value and offset | scalar | {
"repo_name": "rahulpalamuttam/nd4j",
"path": "nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java",
"license": "apache-2.0",
"size": 59439
} | [
"org.nd4j.linalg.api.complex.IComplexFloat",
"org.nd4j.linalg.api.complex.IComplexNDArray"
] | import org.nd4j.linalg.api.complex.IComplexFloat; import org.nd4j.linalg.api.complex.IComplexNDArray; | import org.nd4j.linalg.api.complex.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 841,555 |
public LLVMValueRef getVirtualFunctionTablePointer(LLVMBuilderRef builder, LLVMValueRef baseValue, NamedType baseType, NamedType searchType)
{
if (!(baseType.getResolvedTypeDefinition() instanceof ClassDefinition))
{
throw new IllegalArgumentException("Cannot find a VFT pointer on something of type: "... | LLVMValueRef function(LLVMBuilderRef builder, LLVMValueRef baseValue, NamedType baseType, NamedType searchType) { if (!(baseType.getResolvedTypeDefinition() instanceof ClassDefinition)) { throw new IllegalArgumentException(STR + baseType); } ClassDefinition encapsulatingClassDefinition = null; Deque<GenericTypeSpeciali... | /**
* Finds a pointer to a virtual function table pointer inside the specified base value.
* The base type should be a class, and should never be nullable.
* @param builder - the LLVMBuilderRef to build instructions with
* @param baseValue - the base value to find the virtual function table pointer inside
... | Finds a pointer to a virtual function table pointer inside the specified base value. The base type should be a class, and should never be nullable | getVirtualFunctionTablePointer | {
"repo_name": "abryant/Plinth",
"path": "src/eu/bryants/anthony/plinth/compiler/passes/llvm/VirtualFunctionHandler.java",
"license": "bsd-3-clause",
"size": 88378
} | [
"eu.bryants.anthony.plinth.ast.ClassDefinition",
"eu.bryants.anthony.plinth.ast.InterfaceDefinition",
"eu.bryants.anthony.plinth.ast.metadata.GenericTypeSpecialiser",
"eu.bryants.anthony.plinth.ast.type.NamedType",
"eu.bryants.anthony.plinth.ast.type.PrimitiveType",
"java.util.Deque",
"java.util.LinkedL... | import eu.bryants.anthony.plinth.ast.ClassDefinition; import eu.bryants.anthony.plinth.ast.InterfaceDefinition; import eu.bryants.anthony.plinth.ast.metadata.GenericTypeSpecialiser; import eu.bryants.anthony.plinth.ast.type.NamedType; import eu.bryants.anthony.plinth.ast.type.PrimitiveType; import java.util.Deque; impo... | import eu.bryants.anthony.plinth.ast.*; import eu.bryants.anthony.plinth.ast.metadata.*; import eu.bryants.anthony.plinth.ast.type.*; import java.util.*; | [
"eu.bryants.anthony",
"java.util"
] | eu.bryants.anthony; java.util; | 244,153 |
protected void draw (final Picture picture, final boolean add)
{
Component parent;
boolean dolayout;
Dimension before;
Dimension after;
parent = getParent ();
dolayout = false;
synchronized (mMosaic)
{
if (parent instanceof JViewport)
... | void function (final Picture picture, final boolean add) { Component parent; boolean dolayout; Dimension before; Dimension after; parent = getParent (); dolayout = false; synchronized (mMosaic) { if (parent instanceof JViewport) { before = getPreferredSize (); mMosaic.add (picture); after = calculatePreferredSize (); i... | /**
* Draw an image on screen.
* @param picture The picture to draw.
* @param add If <code>true</code>, the picture is added to the history.
*/ | Draw an image on screen | draw | {
"repo_name": "besom/bbossgroups-mvn",
"path": "bboss_taglib/src/main/java/org/htmlparser/lexerapplications/thumbelina/PicturePanel.java",
"license": "apache-2.0",
"size": 19383
} | [
"java.awt.Component",
"java.awt.Dimension",
"javax.swing.JViewport"
] | import java.awt.Component; import java.awt.Dimension; import javax.swing.JViewport; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 584,730 |
public static String getSimpleName(Class<? extends Annotation> annotationType) {
return annotationType.getSimpleName();
} | static String function(Class<? extends Annotation> annotationType) { return annotationType.getSimpleName(); } | /**
* Returns the simple name of an annotation, mainly used for printing
* annotation names in error messages/user-facing strings
*
* @param annotationType annotation
* @return annotation's simple name
*/ | Returns the simple name of an annotation, mainly used for printing annotation names in error messages/user-facing strings | getSimpleName | {
"repo_name": "SpongePowered/Mixin",
"path": "src/main/java/org/spongepowered/asm/util/Annotations.java",
"license": "mit",
"size": 31514
} | [
"java.lang.annotation.Annotation"
] | import java.lang.annotation.Annotation; | import java.lang.annotation.*; | [
"java.lang"
] | java.lang; | 1,426,922 |
@Override
public synchronized void release() {
// No more notifications to config generator
if (this.helixManager != null) {
if (helixManager.isConnected()) {
this.helixManager.disconnect();
}
this.helixManager = null;
}
if (this.configGenerator != null) {
try {... | synchronized void function() { if (this.helixManager != null) { if (helixManager.isConnected()) { this.helixManager.disconnect(); } this.helixManager = null; } if (this.configGenerator != null) { try { this.configGenerator.close(); } catch (IOException e) { e.printStackTrace(); } this.configGenerator = null; } if (shar... | /**
* May be called multiple times. Multiple sequential calls should be idemPotent.
*/ | May be called multiple times. Multiple sequential calls should be idemPotent | release | {
"repo_name": "pinterest/rocksplicator",
"path": "cluster_management/src/main/java/com/pinterest/rocksplicator/spectator/ConfigGeneratorClusterSpectatorImpl.java",
"license": "apache-2.0",
"size": 8491
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,304,513 |
public static RefactoringStatus checkFilesToBeChanged(IFile[] files, IProgressMonitor monitor)
throws CoreException {
// ResourceChangeChecker checker =
// new ResourceChangeChecker();
// for (int i = 0; i < files.length; i++) {
// checker.getDeltaFactory().change(files[i]);
// }
... | static RefactoringStatus function(IFile[] files, IProgressMonitor monitor) throws CoreException { return new RefactoringStatus(); } | /**
* A helper method to check a set of changed files.
*
* @param files the array of files that change
* @param monitor a progress monitor to report progress or <code>null</code> if progress reporting
* is not desired
* @return a refactoring status containing the detect problems
* @throws CoreE... | A helper method to check a set of changed files | checkFilesToBeChanged | {
"repo_name": "sleshchenko/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/ltk/core/refactoring/participants/ResourceChangeChecker.java",
"license": "epl-1.0",
"size": 5651
} | [
"org.eclipse.core.resources.IFile",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IProgressMonitor",
"org.eclipse.ltk.core.refactoring.RefactoringStatus"
] | import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.ltk.core.refactoring.RefactoringStatus; | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.ltk.core.refactoring.*; | [
"org.eclipse.core",
"org.eclipse.ltk"
] | org.eclipse.core; org.eclipse.ltk; | 2,294,012 |
public List<Class<? extends CategoryProperty>> getRetainableProperties();
| List<Class<? extends CategoryProperty>> function(); | /**
* Get a list of {@link CategoryProperty} classes to be retained when
* creating {@link CategoryParentsStream}.
*
* @return the list of {@link CategoryProperty} classes to be retained when
* creating {@link CategoryParentsStream}, or {@code null} if there
* are no such proper... | Get a list of <code>CategoryProperty</code> classes to be retained when creating <code>CategoryParentsStream</code> | getRetainableProperties | {
"repo_name": "terrancesnyder/solr-analytics",
"path": "lucene/facet/src/java/org/apache/lucene/facet/enhancements/params/EnhancementsIndexingParams.java",
"license": "apache-2.0",
"size": 2791
} | [
"java.util.List",
"org.apache.lucene.facet.index.attributes.CategoryProperty"
] | import java.util.List; import org.apache.lucene.facet.index.attributes.CategoryProperty; | import java.util.*; import org.apache.lucene.facet.index.attributes.*; | [
"java.util",
"org.apache.lucene"
] | java.util; org.apache.lucene; | 949,498 |
public void addServerDefinition(String mechanism, String protocol, String serverName,
Map<String, String> props, CallbackHandler cbh) {
serverDefinitionMap.put(mechanism, new TSaslServerDefinition(mechanism, protocol, serverName,
props, cbh));
} | void function(String mechanism, String protocol, String serverName, Map<String, String> props, CallbackHandler cbh) { serverDefinitionMap.put(mechanism, new TSaslServerDefinition(mechanism, protocol, serverName, props, cbh)); } | /**
* Add a supported server definition to this transport. See the Java
* documentation for <code>Sasl.createSaslServer</code> for the details of the
* parameters.
*/ | Add a supported server definition to this transport. See the Java documentation for <code>Sasl.createSaslServer</code> for the details of the parameters | addServerDefinition | {
"repo_name": "traceguide/api-php",
"path": "vendor/apache/thrift/lib/java/src/org/apache/thrift/transport/TSaslServerTransport.java",
"license": "mit",
"size": 8840
} | [
"java.util.Map",
"javax.security.auth.callback.CallbackHandler"
] | import java.util.Map; import javax.security.auth.callback.CallbackHandler; | import java.util.*; import javax.security.auth.callback.*; | [
"java.util",
"javax.security"
] | java.util; javax.security; | 2,579,346 |
public T xquery(String text) {
return expression(new XQueryExpression(text));
} | T function(String text) { return expression(new XQueryExpression(text)); } | /**
* Evaluates an <a
* href="http://camel.apache.org/xquery.html">XQuery expression</a>
*
* @param text the expression to be evaluated
* @return the builder to continue processing the DSL
*/ | Evaluates an XQuery expression | xquery | {
"repo_name": "acartapanis/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java",
"license": "apache-2.0",
"size": 38841
} | [
"org.apache.camel.model.language.XQueryExpression"
] | import org.apache.camel.model.language.XQueryExpression; | import org.apache.camel.model.language.*; | [
"org.apache.camel"
] | org.apache.camel; | 939,656 |
public void addAudioProcessor(final AudioProcessor audioProcessor) {
audioProcessors.add(audioProcessor);
} | void function(final AudioProcessor audioProcessor) { audioProcessors.add(audioProcessor); } | /**
* Adds an AudioProcessor to the chain of processors.
*
* @param audioProcessor The AudioProcessor to add.
*/ | Adds an AudioProcessor to the chain of processors | addAudioProcessor | {
"repo_name": "srubin/TarsosDSP",
"path": "src/be/hogent/tarsos/dsp/MicrophoneAudioDispatcher.java",
"license": "gpl-3.0",
"size": 13496
} | [
"be.hogent.tarsos.dsp.AudioProcessor"
] | import be.hogent.tarsos.dsp.AudioProcessor; | import be.hogent.tarsos.dsp.*; | [
"be.hogent.tarsos"
] | be.hogent.tarsos; | 301,889 |
List<Document> search(DocumentQuery documentQuery); | List<Document> search(DocumentQuery documentQuery); | /**
* Search documents
*/ | Search documents | search | {
"repo_name": "robertoandrade/cyclos",
"path": "src/nl/strohalm/cyclos/services/customization/DocumentService.java",
"license": "gpl-2.0",
"size": 2208
} | [
"java.util.List",
"nl.strohalm.cyclos.entities.customization.documents.Document",
"nl.strohalm.cyclos.entities.customization.documents.DocumentQuery"
] | import java.util.List; import nl.strohalm.cyclos.entities.customization.documents.Document; import nl.strohalm.cyclos.entities.customization.documents.DocumentQuery; | import java.util.*; import nl.strohalm.cyclos.entities.customization.documents.*; | [
"java.util",
"nl.strohalm.cyclos"
] | java.util; nl.strohalm.cyclos; | 2,454,390 |
private void analyzeObjectDescriptions(AboutObjectDescription[] objectDescs) {
for (AboutObjectDescription bod : objectDescs) {
String objPath = bod.path;
String[] ifaces = bod.interfaces;
boolean timeAuth = false; // whether current objPath implements
... | void function(AboutObjectDescription[] objectDescs) { for (AboutObjectDescription bod : objectDescs) { String objPath = bod.path; String[] ifaces = bod.interfaces; boolean timeAuth = false; Clock currClock = null; for (String iface : ifaces) { if (!iface.startsWith(TimeServiceConst.IFNAME_PREFIX)) { continue; } if (ifa... | /**
* Iterates over the array of {@link BusObjectDescription} and creates the
* Time Service objects in depend on the found interfaces
*
* @param objectDescs
*/ | Iterates over the array of <code>BusObjectDescription</code> and creates the Time Service objects in depend on the found interfaces | analyzeObjectDescriptions | {
"repo_name": "gcampax/alljoyn",
"path": "alljoyn/services/time/java/TimeService/src/org/allseen/timeservice/client/TimeServiceClient.java",
"license": "isc",
"size": 19455
} | [
"android.util.Log",
"org.alljoyn.bus.AboutObjectDescription",
"org.allseen.timeservice.TimeServiceConst",
"org.allseen.timeservice.ajinterfaces.TimeAuthority"
] | import android.util.Log; import org.alljoyn.bus.AboutObjectDescription; import org.allseen.timeservice.TimeServiceConst; import org.allseen.timeservice.ajinterfaces.TimeAuthority; | import android.util.*; import org.alljoyn.bus.*; import org.allseen.timeservice.*; import org.allseen.timeservice.ajinterfaces.*; | [
"android.util",
"org.alljoyn.bus",
"org.allseen.timeservice"
] | android.util; org.alljoyn.bus; org.allseen.timeservice; | 629,749 |
public void setValidator(Validator validator) {
this.validator = validator;
} | void function(Validator validator) { this.validator = validator; } | /**
* A validator can be defined here so a validation constraint can bind to a table model cell
* @param validator the validator to set
*/ | A validator can be defined here so a validation constraint can bind to a table model cell | setValidator | {
"repo_name": "saeder/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/table/AbstractTableModel.java",
"license": "gpl-2.0",
"size": 3088
} | [
"com.codename1.ui.validation.Validator"
] | import com.codename1.ui.validation.Validator; | import com.codename1.ui.validation.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 1,401,214 |
@Test
public void cdsResponseWithUpstreamTlsContext() {
DiscoveryRpcCall call = startResourceWatcher(CDS, CDS_RESOURCE, cdsResourceWatcher);
// Management server sends back CDS response with UpstreamTlsContext.
Any clusterEds =
Any.pack(mf.buildEdsCluster(CDS_RESOURCE, "eds-cluster-foo.googleap... | void function() { DiscoveryRpcCall call = startResourceWatcher(CDS, CDS_RESOURCE, cdsResourceWatcher); Any clusterEds = Any.pack(mf.buildEdsCluster(CDS_RESOURCE, STR, STR, null, true, mf.buildUpstreamTlsContext(STR, STR), null)); List<Any> clusters = ImmutableList.of( Any.pack(mf.buildLogicalDnsCluster(STR, STR, 443, S... | /**
* CDS response containing UpstreamTlsContext for a cluster.
*/ | CDS response containing UpstreamTlsContext for a cluster | cdsResponseWithUpstreamTlsContext | {
"repo_name": "ejona86/grpc-java",
"path": "xds/src/test/java/io/grpc/xds/ClientXdsClientTestBase.java",
"license": "apache-2.0",
"size": 112190
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.Iterables",
"com.google.common.truth.Truth",
"com.google.protobuf.Any",
"io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig",
"io.grpc.xds.XdsClient",
"java.util.List",
"org.mockito.Mockito"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.truth.Truth; import com.google.protobuf.Any; import io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig; import io.grpc.xds.XdsClient; import java.util.List; import org.mockito.Mockit... | import com.google.common.collect.*; import com.google.common.truth.*; import com.google.protobuf.*; import io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.*; import io.grpc.xds.*; import java.util.*; import org.mockito.*; | [
"com.google.common",
"com.google.protobuf",
"io.envoyproxy.envoy",
"io.grpc.xds",
"java.util",
"org.mockito"
] | com.google.common; com.google.protobuf; io.envoyproxy.envoy; io.grpc.xds; java.util; org.mockito; | 825,170 |
public static ValidWriteIdList getTableValidWriteIdListWithTxnList(
Configuration conf, String dbName, String tableName) throws LockException {
HiveTxnManager sessionTxnMgr = SessionState.get().getTxnMgr();
if (sessionTxnMgr == null) {
return null;
}
ValidWriteIdList validWriteIdList = nul... | static ValidWriteIdList function( Configuration conf, String dbName, String tableName) throws LockException { HiveTxnManager sessionTxnMgr = SessionState.get().getTxnMgr(); if (sessionTxnMgr == null) { return null; } ValidWriteIdList validWriteIdList = null; ValidTxnWriteIdList validTxnWriteIdList = null; String validT... | /**
* Returns ValidWriteIdList for the table with the given "dbName" and "tableName".
* This is called when HiveConf has no list for the table.
* Otherwise use getTableSnapshot().
* @param conf Configuration
* @param dbName
* @param tableName
* @return ValidWriteIdList on success, null on fai... | Returns ValidWriteIdList for the table with the given "dbName" and "tableName". This is called when HiveConf has no list for the table. Otherwise use getTableSnapshot() | getTableValidWriteIdListWithTxnList | {
"repo_name": "sankarh/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java",
"license": "apache-2.0",
"size": 132988
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hive.common.ValidTxnList",
"org.apache.hadoop.hive.common.ValidTxnWriteIdList",
"org.apache.hadoop.hive.common.ValidWriteIdList",
"org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager",
"org.apache.hadoop.h... | import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.common.ValidTxnList; import org.apache.hadoop.hive.common.ValidTxnWriteIdList; import org.apache.hadoop.hive.common.ValidWriteIdList; import org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager; imp... | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hive.common.*; import org.apache.hadoop.hive.ql.lockmgr.*; import org.apache.hadoop.hive.ql.session.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 422,325 |
@Override
protected Iterator<String> getKeysInternal(final String prefix) {
// build the path
final String[] splitPath = StringUtils.split(prefix, ".");
final List<String> path = Arrays.asList(splitPath);
try {
// find the context matching the specified path
... | Iterator<String> function(final String prefix) { final String[] splitPath = StringUtils.split(prefix, "."); final List<String> path = Arrays.asList(splitPath); try { final Context context = getContext(path, getBaseContext()); final Set<String> keys = new HashSet<>(); if (context != null) { recursiveGetKeys(keys, contex... | /**
* Returns an iterator with all property keys starting with the given prefix.
*
* @param prefix the prefix
* @return an iterator with the selected keys
*/ | Returns an iterator with all property keys starting with the given prefix | getKeysInternal | {
"repo_name": "apache/commons-configuration",
"path": "src/main/java/org/apache/commons/configuration2/JNDIConfiguration.java",
"license": "apache-2.0",
"size": 13722
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.HashSet",
"java.util.Iterator",
"java.util.List",
"java.util.Set",
"javax.naming.Context",
"javax.naming.NameNotFoundException",
"javax.naming.NamingException",
"org.apache.commons.configuration2.event.ConfigurationErrorEvent",
"org.apache.co... | import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import javax.naming.Context; import javax.naming.NameNotFoundException; import javax.naming.NamingException; import org.apache.commons.configuration2.event.Configuration... | import java.util.*; import javax.naming.*; import org.apache.commons.configuration2.event.*; import org.apache.commons.lang3.*; | [
"java.util",
"javax.naming",
"org.apache.commons"
] | java.util; javax.naming; org.apache.commons; | 2,460,943 |
private long getConnectedChildMapJoinSize(Operator<? extends OperatorDesc> op, OptimizeSparkProcContext ctx) {
if ((op instanceof UnionOperator) || (op instanceof ReduceSinkOperator)) {
//Work Boundary, stop exploring.
return 0;
}
if (op instanceof MapJoinOperator) {
//Found child mapjo... | long function(Operator<? extends OperatorDesc> op, OptimizeSparkProcContext ctx) { if ((op instanceof UnionOperator) (op instanceof ReduceSinkOperator)) { return 0; } if (op instanceof MapJoinOperator) { long mjSize = ctx.getMjOpSizes().get(op); return mjSize; } long result = 0; for (Operator<? extends OperatorDesc> ch... | /**
* Examines this operator and all the children, for mapjoins that will be in the same work.
* @param op given operator
* @param ctx context to pass information.
* @return total size of child mapjoins in same work as this operator.
*/ | Examines this operator and all the children, for mapjoins that will be in the same work | getConnectedChildMapJoinSize | {
"repo_name": "vergilchiu/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/spark/SparkMapJoinOptimizer.java",
"license": "apache-2.0",
"size": 18190
} | [
"org.apache.hadoop.hive.ql.exec.MapJoinOperator",
"org.apache.hadoop.hive.ql.exec.Operator",
"org.apache.hadoop.hive.ql.exec.ReduceSinkOperator",
"org.apache.hadoop.hive.ql.exec.UnionOperator",
"org.apache.hadoop.hive.ql.parse.spark.OptimizeSparkProcContext",
"org.apache.hadoop.hive.ql.plan.OperatorDesc"
... | import org.apache.hadoop.hive.ql.exec.MapJoinOperator; import org.apache.hadoop.hive.ql.exec.Operator; import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator; import org.apache.hadoop.hive.ql.exec.UnionOperator; import org.apache.hadoop.hive.ql.parse.spark.OptimizeSparkProcContext; import org.apache.hadoop.hive.ql.pl... | import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.parse.spark.*; import org.apache.hadoop.hive.ql.plan.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,323,222 |
Concept getConceptByName(Config config, String name); | Concept getConceptByName(Config config, String name); | /**
* Gets concept by its name. The given {@code config} will be used while performing this action.
*
* @param config the configuration to be used while performing this action
* @param name the name of the concept
* @return the concept with given name
*/ | Gets concept by its name. The given config will be used while performing this action | getConceptByName | {
"repo_name": "martokarski/modules",
"path": "openmrs/src/main/java/org/motechproject/openmrs/resource/ConceptResource.java",
"license": "bsd-3-clause",
"size": 3399
} | [
"org.motechproject.openmrs.config.Config",
"org.motechproject.openmrs.domain.Concept"
] | import org.motechproject.openmrs.config.Config; import org.motechproject.openmrs.domain.Concept; | import org.motechproject.openmrs.config.*; import org.motechproject.openmrs.domain.*; | [
"org.motechproject.openmrs"
] | org.motechproject.openmrs; | 851,226 |
public void render(final Graphics2D g) throws SVGException {
root.render(g);
}
// public List pick(final Point2D point, final List retVec) throws SVGException {
// return pick(point, false, retVec);
// }
//
// public List pick(final Point2D point, final boolean boundingBox, List retVec) throws SVG... | void function(final Graphics2D g) throws SVGException { root.render(g); } | /**
* Draws this diagram to the passed graphics context
*/ | Draws this diagram to the passed graphics context | render | {
"repo_name": "gama-platform/gama",
"path": "msi.gama.ext/src/msi/gama/ext/svgsalamander/SVGDiagram.java",
"license": "gpl-3.0",
"size": 5938
} | [
"java.awt.Graphics2D"
] | import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,606,366 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.