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 Collection<File> getCreatedDirectories() {
return createdDirectories;
} | Collection<File> function() { return createdDirectories; } | /**
* Return the set of created directories.
*
* @return Directories which have been created
*/ | Return the set of created directories | getCreatedDirectories | {
"repo_name": "pimtegelaar/commons-io-test3",
"path": "src/test/java/org/apache/commons/io/monitor/CollectionFileListener.java",
"license": "apache-2.0",
"size": 5168
} | [
"java.io.File",
"java.util.Collection"
] | import java.io.File; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 195,726 |
@EventHandler(priority = EventPriority.LOWEST)
public void onInventoryClick(InventoryClickEvent event) {
Player player = (Player) event.getWhoClicked(); // The player that
// clicked the item
Inventory inventory = event.getInventory(); // The inventory that was clicked in
if (inv... | @EventHandler(priority = EventPriority.LOWEST) void function(InventoryClickEvent event) { Player player = (Player) event.getWhoClicked(); Inventory inventory = event.getInventory(); if (inventory.getName() == null) { return; } int slot = event.getRawSlot(); if (!inventory.getName().equals(plugin.myLocale(player.getUniq... | /**
* Handles when the schematics panel is actually clicked
* @param event
*/ | Handles when the schematics panel is actually clicked | onInventoryClick | {
"repo_name": "tastybento/acidisland",
"path": "src/com/wasteofplastic/acidisland/panels/SchematicsPanel.java",
"license": "gpl-2.0",
"size": 6595
} | [
"com.wasteofplastic.acidisland.Settings",
"com.wasteofplastic.acidisland.util.Util",
"com.wasteofplastic.acidisland.util.VaultHelper",
"java.util.List",
"org.bukkit.ChatColor",
"org.bukkit.entity.Player",
"org.bukkit.event.EventHandler",
"org.bukkit.event.EventPriority",
"org.bukkit.event.inventory.... | import com.wasteofplastic.acidisland.Settings; import com.wasteofplastic.acidisland.util.Util; import com.wasteofplastic.acidisland.util.VaultHelper; import java.util.List; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import o... | import com.wasteofplastic.acidisland.*; import com.wasteofplastic.acidisland.util.*; import java.util.*; import org.bukkit.*; import org.bukkit.entity.*; import org.bukkit.event.*; import org.bukkit.event.inventory.*; import org.bukkit.inventory.*; | [
"com.wasteofplastic.acidisland",
"java.util",
"org.bukkit",
"org.bukkit.entity",
"org.bukkit.event",
"org.bukkit.inventory"
] | com.wasteofplastic.acidisland; java.util; org.bukkit; org.bukkit.entity; org.bukkit.event; org.bukkit.inventory; | 1,677,272 |
public int fetch(long[] timestamps, ByteBuffer rawdata, int bufsize) throws IOException, LFDDamagedException;
| int function(long[] timestamps, ByteBuffer rawdata, int bufsize) throws IOException, LFDDamagedException; | /**
* Fetches up to bufsize entries into specified buffers
* @param timestamps array of size at least bufsize to which timestamps will be written
* @param rawdata buffer to which values will be written, in-order as timestamps are.
* Must be at least bufsize*recsize in size
* @param bufsize maximum items to r... | Fetches up to bufsize entries into specified buffers | fetch | {
"repo_name": "piotrmaslanka/polka",
"path": "src/polka/lfds/LFDResultSet.java",
"license": "mit",
"size": 1957
} | [
"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; | 815,880 |
@SuppressWarnings({ "unchecked", "rawtypes" })
public static Converter<?, ?> createEnumArrayConverter(Class<? extends Enum<?>> enumType, int dimensions) {
Preconditions.checkArgument(dimensions >= 1 && dimensions <= 255, "invalid dimensions");
Class<?> aType = enumType;
Class<?> bType = ... | @SuppressWarnings({ STR, STR }) static Converter<?, ?> function(Class<? extends Enum<?>> enumType, int dimensions) { Preconditions.checkArgument(dimensions >= 1 && dimensions <= 255, STR); Class<?> aType = enumType; Class<?> bType = EnumValue.class; Converter<?, ?> converter = EnumConverter.createEnumConverter(enumType... | /**
* Create a {@link Converter} for arrays based on converting the base elements with an {@link EnumConverter}.
*
* @param enumType base enum type
* @param dimensions number of array dimensions
* @return new converter
* @throws IllegalArgumentException if {@code enumType} is null
* @... | Create a <code>Converter</code> for arrays based on converting the base elements with an <code>EnumConverter</code> | createEnumArrayConverter | {
"repo_name": "permazen/permazen",
"path": "permazen-main/src/main/java/io/permazen/EnumConverter.java",
"license": "apache-2.0",
"size": 4148
} | [
"com.google.common.base.Converter",
"com.google.common.base.Preconditions",
"io.permazen.core.EnumValue",
"java.lang.reflect.Array"
] | import com.google.common.base.Converter; import com.google.common.base.Preconditions; import io.permazen.core.EnumValue; import java.lang.reflect.Array; | import com.google.common.base.*; import io.permazen.core.*; import java.lang.reflect.*; | [
"com.google.common",
"io.permazen.core",
"java.lang"
] | com.google.common; io.permazen.core; java.lang; | 198,502 |
@Generated
@Selector("setImageTitle:")
public native void setImageTitle(String value); | @Selector(STR) native void function(String value); | /**
* [@property] imageTitle
* <p>
* Title text associated with the image or media .
*/ | [@property] imageTitle Title text associated with the image or media | setImageTitle | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/messages/MSMessageTemplateLayout.java",
"license": "apache-2.0",
"size": 9476
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,748,595 |
void sendToReplicas(IntraReplicaCommand cmd); | void sendToReplicas(IntraReplicaCommand cmd); | /**
* send a message to all replicas
*
* @param cmd the to be sent message
*/ | send a message to all replicas | sendToReplicas | {
"repo_name": "Archistar/archistar-bft",
"path": "src/main/java/at/archistar/bft/server/BftEngineCallbacks.java",
"license": "lgpl-2.1",
"size": 1671
} | [
"at.archistar.bft.messages.IntraReplicaCommand"
] | import at.archistar.bft.messages.IntraReplicaCommand; | import at.archistar.bft.messages.*; | [
"at.archistar.bft"
] | at.archistar.bft; | 2,538,953 |
@GetMapping("featured")
@ResponseBody
@Deprecated
public List<Object> getFeaturedOccurrences() {
LOG.warn("Featured occurrences have been removed.");
return Lists.newArrayList();
} | @GetMapping(STR) List<Object> function() { LOG.warn(STR); return Lists.newArrayList(); } | /**
* Removed API call, which supported a stream of featured occurrences on the old GBIF.org homepage.
* @return An empty list.
*/ | Removed API call, which supported a stream of featured occurrences on the old GBIF.org homepage | getFeaturedOccurrences | {
"repo_name": "gbif/occurrence",
"path": "occurrence-ws/src/main/java/org/gbif/occurrence/ws/resources/OccurrenceResource.java",
"license": "apache-2.0",
"size": 8574
} | [
"com.google.common.collect.Lists",
"java.util.List",
"org.springframework.web.bind.annotation.GetMapping"
] | import com.google.common.collect.Lists; import java.util.List; import org.springframework.web.bind.annotation.GetMapping; | import com.google.common.collect.*; import java.util.*; import org.springframework.web.bind.annotation.*; | [
"com.google.common",
"java.util",
"org.springframework.web"
] | com.google.common; java.util; org.springframework.web; | 1,084,956 |
public static Tag status(ServerWebExchange exchange) {
HttpStatus status = exchange.getResponse().getStatusCode();
if (status == null) {
status = HttpStatus.OK;
}
return Tag.of("status", String.valueOf(status.value()));
} | static Tag function(ServerWebExchange exchange) { HttpStatus status = exchange.getResponse().getStatusCode(); if (status == null) { status = HttpStatus.OK; } return Tag.of(STR, String.valueOf(status.value())); } | /**
* Creates a {@code method} tag based on the response status of the given
* {@code exchange}.
* @param exchange the exchange
* @return the "status" tag derived from the response status
*/ | Creates a method tag based on the response status of the given exchange | status | {
"repo_name": "felipeg48/spring-boot",
"path": "spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTags.java",
"license": "apache-2.0",
"size": 4020
} | [
"io.micrometer.core.instrument.Tag",
"org.springframework.http.HttpStatus",
"org.springframework.web.server.ServerWebExchange"
] | import io.micrometer.core.instrument.Tag; import org.springframework.http.HttpStatus; import org.springframework.web.server.ServerWebExchange; | import io.micrometer.core.instrument.*; import org.springframework.http.*; import org.springframework.web.server.*; | [
"io.micrometer.core",
"org.springframework.http",
"org.springframework.web"
] | io.micrometer.core; org.springframework.http; org.springframework.web; | 2,286,095 |
void sendMessage(String subject, String body, List<String> recipientIds);
| void sendMessage(String subject, String body, List<String> recipientIds); | /**
* Send a textual message to a list of recipientIds
* Requires id from LinkedInProfile object
*
* @param subject The subject of message
* @param body The body or text of message (does not support html)
* @param recipientIds List of ids
*/ | Send a textual message to a list of recipientIds Requires id from LinkedInProfile object | sendMessage | {
"repo_name": "wilkinsona/spring-social-linkedin",
"path": "spring-social-linkedin/src/main/java/org/springframework/social/linkedin/api/CommunicationOperations.java",
"license": "apache-2.0",
"size": 2630
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 394,641 |
@Test
public void testGetNullCacheValue() throws IOException {
Path targetDirectory = scratch.dir("/external");
Path targetPath = targetDirectory.getChild(downloadedFile.getBaseName());
Path actualTargetPath = repositoryCache.get(downloadedFileSha256, targetPath, KeyType.SHA256);
assertEquals(actua... | void function() throws IOException { Path targetDirectory = scratch.dir(STR); Path targetPath = targetDirectory.getChild(downloadedFile.getBaseName()); Path actualTargetPath = repositoryCache.get(downloadedFileSha256, targetPath, KeyType.SHA256); assertEquals(actualTargetPath, null); } | /**
* Test that the get method retrieves a null if the value is not cached.
*/ | Test that the get method retrieves a null if the value is not cached | testGetNullCacheValue | {
"repo_name": "juhalindfors/bazel-patches",
"path": "src/test/java/com/google/devtools/build/lib/bazel/repository/cache/RepositoryCacheTest.java",
"license": "apache-2.0",
"size": 6878
} | [
"com.google.devtools.build.lib.bazel.repository.cache.RepositoryCache",
"com.google.devtools.build.lib.vfs.Path",
"java.io.IOException",
"org.junit.Assert"
] | import com.google.devtools.build.lib.bazel.repository.cache.RepositoryCache; import com.google.devtools.build.lib.vfs.Path; import java.io.IOException; import org.junit.Assert; | import com.google.devtools.build.lib.bazel.repository.cache.*; import com.google.devtools.build.lib.vfs.*; import java.io.*; import org.junit.*; | [
"com.google.devtools",
"java.io",
"org.junit"
] | com.google.devtools; java.io; org.junit; | 2,179,565 |
public MultipleCurrencyInterestRateCurveSensitivity plus(final MultipleCurrencyInterestRateCurveSensitivity other) {
ArgumentChecker.notNull(other, "Sensitivity");
final TreeMap<Currency, InterestRateCurveSensitivity> map = new TreeMap<>();
map.putAll(_sensitivity);
MultipleCurrencyInterestRateCurveSe... | MultipleCurrencyInterestRateCurveSensitivity function(final MultipleCurrencyInterestRateCurveSensitivity other) { ArgumentChecker.notNull(other, STR); final TreeMap<Currency, InterestRateCurveSensitivity> map = new TreeMap<>(); map.putAll(_sensitivity); MultipleCurrencyInterestRateCurveSensitivity result = new Multiple... | /**
* Create a new multiple currency sensitivity by adding another multiple currency sensitivity.
* For each currency in the other multiple currency sensitivity, the currency and its associated sensitivity are added.
* @param other The multiple currency sensitivity. Not null.
* @return The new multiple curr... | Create a new multiple currency sensitivity by adding another multiple currency sensitivity. For each currency in the other multiple currency sensitivity, the currency and its associated sensitivity are added | plus | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/forex/method/MultipleCurrencyInterestRateCurveSensitivity.java",
"license": "apache-2.0",
"size": 7956
} | [
"com.opengamma.analytics.financial.interestrate.InterestRateCurveSensitivity",
"com.opengamma.util.ArgumentChecker",
"com.opengamma.util.money.Currency",
"java.util.TreeMap"
] | import com.opengamma.analytics.financial.interestrate.InterestRateCurveSensitivity; import com.opengamma.util.ArgumentChecker; import com.opengamma.util.money.Currency; import java.util.TreeMap; | import com.opengamma.analytics.financial.interestrate.*; import com.opengamma.util.*; import com.opengamma.util.money.*; import java.util.*; | [
"com.opengamma.analytics",
"com.opengamma.util",
"java.util"
] | com.opengamma.analytics; com.opengamma.util; java.util; | 1,769,882 |
public static Date parseDate( final String dateString )
{
if ( StringUtils.isEmpty( dateString ) )
{
return null;
}
return DATE_FORMATTER.parseDateTime( dateString ).toDate();
}
/**
* Creates a {@link java.util.Date} from the given {@link jav... | static Date function( final String dateString ) { if ( StringUtils.isEmpty( dateString ) ) { return null; } return DATE_FORMATTER.parseDateTime( dateString ).toDate(); } /** * Creates a {@link java.util.Date} from the given {@link java.time.LocalDateTime} | /**
* Parses the given string into a Date using the supported date formats.
* Returns null if the string cannot be parsed.
*
* @param dateString the date string.
* @return a date.
*/ | Parses the given string into a Date using the supported date formats. Returns null if the string cannot be parsed | parseDate | {
"repo_name": "troyel/dhis2-core",
"path": "dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/DateUtils.java",
"license": "bsd-3-clause",
"size": 24563
} | [
"java.time.LocalDateTime",
"java.util.Date",
"org.springframework.util.StringUtils"
] | import java.time.LocalDateTime; import java.util.Date; import org.springframework.util.StringUtils; | import java.time.*; import java.util.*; import org.springframework.util.*; | [
"java.time",
"java.util",
"org.springframework.util"
] | java.time; java.util; org.springframework.util; | 1,371,253 |
private static void expandPrologue(OPT_IR ir) {
boolean useDU = ir.options.getOptLevel() >= 1;
if (useDU) {
// set up register lists for dead code elimination.
OPT_DefUse.computeDU(ir);
}
OPT_Instruction p = ir.firstInstructionInCodeOrder().
nextInstructionInCodeOrder();
if (V... | static void function(OPT_IR ir) { boolean useDU = ir.options.getOptLevel() >= 1; if (useDU) { OPT_DefUse.computeDU(ir); } OPT_Instruction p = ir.firstInstructionInCodeOrder(). nextInstructionInCodeOrder(); if (VM.VerifyAssertions) VM._assert(p.operator == IR_PROLOGUE); OPT_Instruction start = p.nextInstructionInCodeOrd... | /**
* Expand the prologue instruction.
*/ | Expand the prologue instruction | expandPrologue | {
"repo_name": "rmcilroy/HeraJVM",
"path": "rvm/src/org/jikesrvm/compilers/opt/ia32/OPT_CallingConvention.java",
"license": "epl-1.0",
"size": 27313
} | [
"org.jikesrvm.compilers.opt.ir.Prologue"
] | import org.jikesrvm.compilers.opt.ir.Prologue; | import org.jikesrvm.compilers.opt.ir.*; | [
"org.jikesrvm.compilers"
] | org.jikesrvm.compilers; | 763,633 |
public Tr removeChild(Node child){
children.remove(child);
return this;
} | Tr function(Node child){ children.remove(child); return this; } | /**
* Removes the child node
* @param child node to be removed
* @return the node
*/ | Removes the child node | removeChild | {
"repo_name": "abdulmudabir/Gagawa",
"path": "src/com/hp/gagawa/java/elements/Tr.java",
"license": "mit",
"size": 5537
} | [
"com.hp.gagawa.java.Node"
] | import com.hp.gagawa.java.Node; | import com.hp.gagawa.java.*; | [
"com.hp.gagawa"
] | com.hp.gagawa; | 1,352,810 |
//-----------------------------------------------------------------------
public StubTypeBean getStubType() {
return _stubType;
} | StubTypeBean function() { return _stubType; } | /**
* Gets the stubType.
* @return the value of the property, not null
*/ | Gets the stubType | getStubType | {
"repo_name": "McLeodMoores/starling",
"path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/cds/CDSSecurityBean.java",
"license": "apache-2.0",
"size": 33407
} | [
"com.opengamma.masterdb.security.hibernate.StubTypeBean"
] | import com.opengamma.masterdb.security.hibernate.StubTypeBean; | import com.opengamma.masterdb.security.hibernate.*; | [
"com.opengamma.masterdb"
] | com.opengamma.masterdb; | 2,813,954 |
public static Message obtainMessage(int eventType, String tag, boolean data) {
Message message = obtainMessage(eventType, tag);
Logger.d(TAG, "obtainMessage() boolean : " + data);
Bundle bundle = message.getData();
bundle.putBoolean(WindowBinder.REMOTE_KEY_DATA, data);
return... | static Message function(int eventType, String tag, boolean data) { Message message = obtainMessage(eventType, tag); Logger.d(TAG, STR + data); Bundle bundle = message.getData(); bundle.putBoolean(WindowBinder.REMOTE_KEY_DATA, data); return message; } | /**
* Obtain a message of the event type using specific tag and a boolean value
* @param eventType The type of event to be transfered
* @param tag The tag of object to receive this message
* @param data The extra data attached to this message
* @return The message
*/ | Obtain a message of the event type using specific tag and a boolean value | obtainMessage | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/packages/apps/RCSe/core/src/com/mediatek/rcse/plugin/message/PluginController.java",
"license": "gpl-2.0",
"size": 8950
} | [
"android.os.Bundle",
"android.os.Message",
"com.mediatek.rcse.api.Logger",
"com.mediatek.rcse.service.binder.WindowBinder"
] | import android.os.Bundle; import android.os.Message; import com.mediatek.rcse.api.Logger; import com.mediatek.rcse.service.binder.WindowBinder; | import android.os.*; import com.mediatek.rcse.api.*; import com.mediatek.rcse.service.binder.*; | [
"android.os",
"com.mediatek.rcse"
] | android.os; com.mediatek.rcse; | 1,447,011 |
public String getSelectedSystemUnderTestInfo(Page page)
{
SystemUnderTest selectedSut = getSavedSelectedSystemUnderTest(page);
SystemUnderTest defaultSut = null;
try
{
Set<SystemUnderTest> suts = getPageSystemsUnderTests(page.getSpaceKey(), page.getTitle());
... | String function(Page page) { SystemUnderTest selectedSut = getSavedSelectedSystemUnderTest(page); SystemUnderTest defaultSut = null; try { Set<SystemUnderTest> suts = getPageSystemsUnderTests(page.getSpaceKey(), page.getTitle()); for(SystemUnderTest sut : suts) { if(selectedSut != null && selectedSut.equalsTo(sut)) { r... | /**
* Retrieves from the page propeties the selectedSystemUnderTestInfo.
* If none registered the default sut will be saved and returned.
* The key must correspond to an excisting SystemUnderTest else the default one will be
* saved and returned.
* @param page
* @return the selectedSystemU... | Retrieves from the page propeties the selectedSystemUnderTestInfo. If none registered the default sut will be saved and returned. The key must correspond to an excisting SystemUnderTest else the default one will be saved and returned | getSelectedSystemUnderTestInfo | {
"repo_name": "strator-dev/greenpepper",
"path": "greenpepper-open/confluence3/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/velocity/ConfluenceGreenPepper.java",
"license": "apache-2.0",
"size": 33951
} | [
"com.atlassian.confluence.pages.Page",
"com.greenpepper.server.GreenPepperServerException",
"com.greenpepper.server.domain.SystemUnderTest",
"java.util.Set"
] | import com.atlassian.confluence.pages.Page; import com.greenpepper.server.GreenPepperServerException; import com.greenpepper.server.domain.SystemUnderTest; import java.util.Set; | import com.atlassian.confluence.pages.*; import com.greenpepper.server.*; import com.greenpepper.server.domain.*; import java.util.*; | [
"com.atlassian.confluence",
"com.greenpepper.server",
"java.util"
] | com.atlassian.confluence; com.greenpepper.server; java.util; | 781,931 |
public void lPEventObjectChanged(ChangeEvent e) throws Throwable {
super.lPEventObjectChanged(e);
int selectedIndex = this.getSelectedIndex();
if (selectedIndex == IDX_PANEL_AUSWHAL) {
createAuswahl();
panelQueryPersonal.eventYouAreSelected(false);
panelQueryPersonal.updateButtons();
} else if (se... | void function(ChangeEvent e) throws Throwable { super.lPEventObjectChanged(e); int selectedIndex = this.getSelectedIndex(); if (selectedIndex == IDX_PANEL_AUSWHAL) { createAuswahl(); panelQueryPersonal.eventYouAreSelected(false); panelQueryPersonal.updateButtons(); } else if (selectedIndex == IDX_PANEL_ZEITDATEN) { cre... | /**
* Behandle ChangeEvent; zB Tabwechsel oben.
*
* @param e
* ChangeEvent
* @throws Throwable
*/ | Behandle ChangeEvent; zB Tabwechsel oben | lPEventObjectChanged | {
"repo_name": "erdincay/lpclientpc",
"path": "src/com/lp/client/zeiterfassung/TabbedPaneZeiterfassung.java",
"license": "agpl-3.0",
"size": 81638
} | [
"java.sql.Date",
"javax.swing.event.ChangeEvent"
] | import java.sql.Date; import javax.swing.event.ChangeEvent; | import java.sql.*; import javax.swing.event.*; | [
"java.sql",
"javax.swing"
] | java.sql; javax.swing; | 1,704,833 |
Graph graph = new Graph();
assertTrue(graph != null);
}
| Graph graph = new Graph(); assertTrue(graph != null); } | /**
* Creating a new graph.
*/ | Creating a new graph | testGraph | {
"repo_name": "marekrei/semgraph",
"path": "src/sem/test/graph/GraphTest.java",
"license": "agpl-3.0",
"size": 7108
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 992,146 |
void closeChannel(String channelId, IConnectionStatus connStatus); | void closeChannel(String channelId, IConnectionStatus connStatus); | /**
* Disconnect a channel from the network. The IConnectionStatus instance acts as
* a callback for the driver to communicate when the channel was actually
* disconnected.
*
* @param channelId
* channel
* @param connStatus
* IConnectionStatus instance
... | Disconnect a channel from the network. The IConnectionStatus instance acts as a callback for the driver to communicate when the channel was actually disconnected | closeChannel | {
"repo_name": "egacl/gatewayio",
"path": "GatewayProjects/GatewayNetworks/GatewayNetworkService/src/main/java/cl/io/gateway/network/driver/INetworkDriver.java",
"license": "apache-2.0",
"size": 4353
} | [
"cl.io.gateway.network.IConnectionStatus"
] | import cl.io.gateway.network.IConnectionStatus; | import cl.io.gateway.network.*; | [
"cl.io.gateway"
] | cl.io.gateway; | 2,071,832 |
public static BreakIterator getSentenceInstance()
{
return getSentenceInstance(Locale.getDefault());
} | static BreakIterator function() { return getSentenceInstance(Locale.getDefault()); } | /**
* Returns a new <code>BreakIterator</code> instance
* for <a href="BreakIterator.html#sentence">sentence breaks</a>
* for the {@linkplain Locale#getDefault() default locale}.
* @return A break iterator for sentence breaks
*/ | Returns a new <code>BreakIterator</code> instance for sentence breaks for the Locale#getDefault() default locale | getSentenceInstance | {
"repo_name": "wangsongpeng/jdk-src",
"path": "src/main/java/java/text/BreakIterator.java",
"license": "apache-2.0",
"size": 23165
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,457,554 |
public void decorateItemDispatcher(ItemDispatcher dispatcher) {
for (ItemHandler handler : itemHandlers) {
dispatcher.bind(handler);
}
}
| void function(ItemDispatcher dispatcher) { for (ItemHandler handler : itemHandlers) { dispatcher.bind(handler); } } | /**
* Decorates an item dispatcher with all the item handlers registered to the context.
*
* @param dispatcher The dispatcher to decorate.
*/ | Decorates an item dispatcher with all the item handlers registered to the context | decorateItemDispatcher | {
"repo_name": "davidi2/mopar",
"path": "src/net/scapeemulator/game/plugin/ScriptContext.java",
"license": "isc",
"size": 7626
} | [
"net.scapeemulator.game.dispatcher.item.ItemDispatcher",
"net.scapeemulator.game.dispatcher.item.ItemHandler"
] | import net.scapeemulator.game.dispatcher.item.ItemDispatcher; import net.scapeemulator.game.dispatcher.item.ItemHandler; | import net.scapeemulator.game.dispatcher.item.*; | [
"net.scapeemulator.game"
] | net.scapeemulator.game; | 2,002,426 |
public int comparesTo(Date date) {
if (date.before(m_start))
return 1;
if (date.after(m_end) || date.equals(m_end) )
return -1;
else return 0;
} | int function(Date date) { if (date.before(m_start)) return 1; if (date.after(m_end) date.equals(m_end) ) return -1; else return 0; } | /**
* Returns -1, 0, 1 based on how date compares to this interval
*
* @param date a {@link java.util.Date} object.
* @return -1 if the interval is entirely before date,
* 0 if the interval contains date,
* 1 if the interface entirely follows date,
* for t... | Returns -1, 0, 1 based on how date compares to this interval | comparesTo | {
"repo_name": "bugcy013/opennms-tmp-tools",
"path": "core/lib/src/main/java/org/opennms/core/utils/TimeInterval.java",
"license": "gpl-2.0",
"size": 4333
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,609,753 |
private void setToolbar(){
// Make toolbar
Toolbar toolbar = (Toolbar) findViewById(R.id.activity_app_info_tool_bar);
// Use the Toolbar equivalent to the ActionBar
setSupportActionBar(toolbar);
ActionBar bar = getSupportActionBar();
if (null != bar) {
... | void function(){ Toolbar toolbar = (Toolbar) findViewById(R.id.activity_app_info_tool_bar); setSupportActionBar(toolbar); ActionBar bar = getSupportActionBar(); if (null != bar) { bar.setDisplayShowHomeEnabled(false); bar.setDisplayShowTitleEnabled(true); bar.setDisplayHomeAsUpEnabled(true); } setTitle(getResources().g... | /**
* Setup toolbar as actionbar, and set title text.
*/ | Setup toolbar as actionbar, and set title text | setToolbar | {
"repo_name": "TweetMap/TweetMapForAndroid",
"path": "app/src/main/java/jp/co/tweetmap/HelpActivity.java",
"license": "apache-2.0",
"size": 4165
} | [
"android.support.v7.app.ActionBar",
"android.support.v7.widget.Toolbar"
] | import android.support.v7.app.ActionBar; import android.support.v7.widget.Toolbar; | import android.support.v7.app.*; import android.support.v7.widget.*; | [
"android.support"
] | android.support; | 857,544 |
SearchResult<Biomaterial> searchForBiomaterials(BiomaterialSearchCriteria criteria, LimitOffset limitOffset)
throws InvalidReferenceException, UnsupportedCategoryException; | SearchResult<Biomaterial> searchForBiomaterials(BiomaterialSearchCriteria criteria, LimitOffset limitOffset) throws InvalidReferenceException, UnsupportedCategoryException; | /**
* Search for biomaterials satisfying the given search criteria.
*
* @param criteria the search criteria
* @param limitOffset an optional parameter specifying the number of results to return, and the offset of the first
* result to return within the overall result set. May be lef... | Search for biomaterials satisfying the given search criteria | searchForBiomaterials | {
"repo_name": "NCIP/caarray",
"path": "software/caarray-ejb.jar/src/main/java/gov/nih/nci/caarray/services/external/v1_0/search/SearchService.java",
"license": "bsd-3-clause",
"size": 16586
} | [
"gov.nih.nci.caarray.external.v1_0.query.BiomaterialSearchCriteria",
"gov.nih.nci.caarray.external.v1_0.query.LimitOffset",
"gov.nih.nci.caarray.external.v1_0.query.SearchResult",
"gov.nih.nci.caarray.external.v1_0.sample.Biomaterial",
"gov.nih.nci.caarray.services.external.v1_0.InvalidReferenceException",
... | import gov.nih.nci.caarray.external.v1_0.query.BiomaterialSearchCriteria; import gov.nih.nci.caarray.external.v1_0.query.LimitOffset; import gov.nih.nci.caarray.external.v1_0.query.SearchResult; import gov.nih.nci.caarray.external.v1_0.sample.Biomaterial; import gov.nih.nci.caarray.services.external.v1_0.InvalidReferen... | import gov.nih.nci.caarray.external.v1_0.query.*; import gov.nih.nci.caarray.external.v1_0.sample.*; import gov.nih.nci.caarray.services.external.v1_0.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 1,883,863 |
public void setBaseURISAXResolver(BaseURISAXResolver resolver) {
baseURIResolver = resolver;
} | void function(BaseURISAXResolver resolver) { baseURIResolver = resolver; } | /**
* Set the base URI resolver for the XBRL XLink handler.
* @param resolver the base URI resolver used by the XLink handler.
*/ | Set the base URI resolver for the XBRL XLink handler | setBaseURISAXResolver | {
"repo_name": "martinggww/Programming",
"path": "XBRL/xbrl-api/module-api/src/main/java/org/xbrlapi/xlink/handler/XBRLXLinkHandlerImpl.java",
"license": "gpl-2.0",
"size": 15679
} | [
"org.xbrlapi.xmlbase.BaseURISAXResolver"
] | import org.xbrlapi.xmlbase.BaseURISAXResolver; | import org.xbrlapi.xmlbase.*; | [
"org.xbrlapi.xmlbase"
] | org.xbrlapi.xmlbase; | 2,696,746 |
static Table create(DruidSchema druidSchema, String dataSourceName,
List<Interval> intervals, Map<String, SqlTypeName> fieldMap,
Set<String> metricNameSet, String timestampColumnName,
Map<String, List<ComplexMetric>> complexMetrics) {
final Immutab... | static Table create(DruidSchema druidSchema, String dataSourceName, List<Interval> intervals, Map<String, SqlTypeName> fieldMap, Set<String> metricNameSet, String timestampColumnName, Map<String, List<ComplexMetric>> complexMetrics) { final ImmutableMap<String, SqlTypeName> fields = ImmutableMap.copyOf(fieldMap); retur... | /** Creates a {@link DruidTable} by copying the given parameters.
*
* @param druidSchema Druid schema
* @param dataSourceName Data source name in Druid, also table name
* @param intervals Intervals, or null to use default
* @param fieldMap Fully populated map of fields (dimensions plus metrics)
* @par... | Creates a <code>DruidTable</code> by copying the given parameters | create | {
"repo_name": "datametica/calcite",
"path": "druid/src/main/java/org/apache/calcite/adapter/druid/DruidTable.java",
"license": "apache-2.0",
"size": 11946
} | [
"com.google.common.collect.ImmutableMap",
"com.google.common.collect.ImmutableSet",
"java.util.List",
"java.util.Map",
"java.util.Set",
"org.apache.calcite.schema.Table",
"org.apache.calcite.sql.type.SqlTypeName",
"org.joda.time.Interval"
] | import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.calcite.schema.Table; import org.apache.calcite.sql.type.SqlTypeName; import org.joda.time.Interval; | import com.google.common.collect.*; import java.util.*; import org.apache.calcite.schema.*; import org.apache.calcite.sql.type.*; import org.joda.time.*; | [
"com.google.common",
"java.util",
"org.apache.calcite",
"org.joda.time"
] | com.google.common; java.util; org.apache.calcite; org.joda.time; | 1,664,217 |
public void deleteDiscussionForum(DiscussionForum forum) {
long id = forum.getId().longValue();
eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_REMOVE, getEventMessage(forum), false));
try {
getSession().evict(forum);
} ca... | void function(DiscussionForum forum) { long id = forum.getId().longValue(); eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_REMOVE, getEventMessage(forum), false)); try { getSession().evict(forum); } catch (Exception e) { e.printStackTrace(); LOG.error(STR + forum.getId... | /**
* Delete a discussion forum and all topics/messages
*/ | Delete a discussion forum and all topics/messages | deleteDiscussionForum | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "msgcntr/messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/MessageForumsForumManagerImpl.java",
"license": "apache-2.0",
"size": 59914
} | [
"java.util.List",
"org.sakaiproject.api.app.messageforums.Area",
"org.sakaiproject.api.app.messageforums.DiscussionForum",
"org.sakaiproject.api.app.messageforums.DiscussionForumService",
"org.sakaiproject.api.app.messageforums.Topic"
] | import java.util.List; import org.sakaiproject.api.app.messageforums.Area; import org.sakaiproject.api.app.messageforums.DiscussionForum; import org.sakaiproject.api.app.messageforums.DiscussionForumService; import org.sakaiproject.api.app.messageforums.Topic; | import java.util.*; import org.sakaiproject.api.app.messageforums.*; | [
"java.util",
"org.sakaiproject.api"
] | java.util; org.sakaiproject.api; | 20,259 |
public void RandObjectId() {
_objectId = (short) IdFactory.getInstance().newId();
}
| void function() { _objectId = (short) IdFactory.getInstance().newId(); } | /**
* method to rand new id
*/ | method to rand new id | RandObjectId | {
"repo_name": "MuOnlineRepositories/MuOnline",
"path": "openmu-take-two/src/main/java/eu/derbed/openmu/gs/muObjects/MuObject.java",
"license": "apache-2.0",
"size": 3871
} | [
"eu.derbed.openmu.gs.IdFactory"
] | import eu.derbed.openmu.gs.IdFactory; | import eu.derbed.openmu.gs.*; | [
"eu.derbed.openmu"
] | eu.derbed.openmu; | 2,746,883 |
@Test
public void testRMHeartbeatStopWhenLeadershipRevoked() throws Exception {
final long heartbeatInterval = 1L;
final long heartbeatTimeout = 10000L;
final long pollTimeout = 1000L;
final RecordingHeartbeatServices heartbeatServices =
new RecordingHeartbeatServ... | void function() throws Exception { final long heartbeatInterval = 1L; final long heartbeatTimeout = 10000L; final long pollTimeout = 1000L; final RecordingHeartbeatServices heartbeatServices = new RecordingHeartbeatServices(heartbeatInterval, heartbeatTimeout); final ResourceID rmResourceID = ResourceID.generate(); fin... | /**
* Tests that the heartbeat is stopped once the TaskExecutor detects that the RM is no longer
* leader.
*
* <p>See FLINK-8462
*/ | Tests that the heartbeat is stopped once the TaskExecutor detects that the RM is no longer leader. See FLINK-8462 | testRMHeartbeatStopWhenLeadershipRevoked | {
"repo_name": "tillrohrmann/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java",
"license": "apache-2.0",
"size": 134667
} | [
"java.util.concurrent.BlockingQueue",
"java.util.concurrent.TimeUnit",
"org.apache.flink.runtime.clusterframework.types.ResourceID",
"org.apache.flink.runtime.resourcemanager.ResourceManagerId",
"org.apache.flink.runtime.resourcemanager.utils.TestingResourceManagerGateway",
"org.apache.flink.runtime.rpc.R... | import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.runtime.resourcemanager.ResourceManagerId; import org.apache.flink.runtime.resourcemanager.utils.TestingResourceManagerGateway; import org.apache.fl... | import java.util.concurrent.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.resourcemanager.*; import org.apache.flink.runtime.resourcemanager.utils.*; import org.apache.flink.runtime.rpc.*; import org.apache.flink.runtime.state.*; import org.apache.flink.runtime.taskexecuto... | [
"java.util",
"org.apache.flink",
"org.hamcrest",
"org.junit"
] | java.util; org.apache.flink; org.hamcrest; org.junit; | 928,700 |
public void copy(){
if (table != null && table.getItemCount()>0) {
Clipboard clipboard = new Clipboard(table.getDisplay());
TextTransfer textTransfer = TextTransfer.getInstance();
clipboard.setContents(new String[]{getText(table)}, new Transfer[]{textTransfer});
... | void function(){ if (table != null && table.getItemCount()>0) { Clipboard clipboard = new Clipboard(table.getDisplay()); TextTransfer textTransfer = TextTransfer.getInstance(); clipboard.setContents(new String[]{getText(table)}, new Transfer[]{textTransfer}); clipboard.dispose(); } } | /**
* Copies the table's contents to the clipboard.
*/ | Copies the table's contents to the clipboard | copy | {
"repo_name": "WiednerF/ARXPlugin",
"path": "src/org/deidentifier/arx/kettle/risk/common/ClipboardHandlerTable.java",
"license": "apache-2.0",
"size": 4070
} | [
"org.eclipse.swt.dnd.Clipboard",
"org.eclipse.swt.dnd.TextTransfer",
"org.eclipse.swt.dnd.Transfer"
] | import org.eclipse.swt.dnd.Clipboard; import org.eclipse.swt.dnd.TextTransfer; import org.eclipse.swt.dnd.Transfer; | import org.eclipse.swt.dnd.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 745,325 |
public XInputFile[] getFiles() {
ArrayList arrayList = new ArrayList();
rawInterface.add_native_files(arrayList);
XInputFile[] xInputFiles = new XInputFile[arrayList.size()];
int i = 0;
for (Iterator it = arrayList.iterator(); it.hasNext();) {
xInputFiles[i++] = new XInputFile((String) it.next());
... | XInputFile[] function() { ArrayList arrayList = new ArrayList(); rawInterface.add_native_files(arrayList); XInputFile[] xInputFiles = new XInputFile[arrayList.size()]; int i = 0; for (Iterator it = arrayList.iterator(); it.hasNext();) { xInputFiles[i++] = new XInputFile((String) it.next()); } return xInputFiles; } | /**
* Get files in the directory.
*
* @return files in the directory
*/ | Get files in the directory | getFiles | {
"repo_name": "silid/project-x-cvs",
"path": "src/net/sourceforge/dvb/projectx/xinput/topfield_raw/XInputDirectoryImpl.java",
"license": "gpl-2.0",
"size": 4608
} | [
"java.util.ArrayList",
"java.util.Iterator",
"net.sourceforge.dvb.projectx.xinput.XInputFile"
] | import java.util.ArrayList; import java.util.Iterator; import net.sourceforge.dvb.projectx.xinput.XInputFile; | import java.util.*; import net.sourceforge.dvb.projectx.xinput.*; | [
"java.util",
"net.sourceforge.dvb"
] | java.util; net.sourceforge.dvb; | 1,192,504 |
public BufferedImage createDummyImage( int width, int height ) {
BufferedImage dummyImage = gc.createCompatibleImage( width, height, Transparency.OPAQUE );
Graphics2D g2d = dummyImage.createGraphics();
g2d.setColor( dummyColor );
g2d.fillRect( 0, 0, width-1, height-1 );
g2d.dispose();
return dummyImage;... | BufferedImage function( int width, int height ) { BufferedImage dummyImage = gc.createCompatibleImage( width, height, Transparency.OPAQUE ); Graphics2D g2d = dummyImage.createGraphics(); g2d.setColor( dummyColor ); g2d.fillRect( 0, 0, width-1, height-1 ); g2d.dispose(); return dummyImage; } | /**
* Returns a solid rectangle for use as a fallback image.
*
* The result will NOT be cached.
*/ | Returns a solid rectangle for use as a fallback image. The result will NOT be cached | createDummyImage | {
"repo_name": "Vhati/ftl-profile-editor",
"path": "src/main/java/net/blerf/ftl/ui/floorplan/DefaultSpriteImageProvider.java",
"license": "gpl-2.0",
"size": 19672
} | [
"java.awt.Graphics2D",
"java.awt.Transparency",
"java.awt.image.BufferedImage"
] | import java.awt.Graphics2D; import java.awt.Transparency; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 71,843 |
@Override
public double calculatePhaseTimeGradient(AbstractPhaseScope phaseScope) {
double timeGradient = 1.0;
for (Termination termination : terminationList) {
double nextTimeGradient = termination.calculatePhaseTimeGradient(phaseScope);
if (nextTimeGradient >= 0.0) {
... | double function(AbstractPhaseScope phaseScope) { double timeGradient = 1.0; for (Termination termination : terminationList) { double nextTimeGradient = termination.calculatePhaseTimeGradient(phaseScope); if (nextTimeGradient >= 0.0) { timeGradient = Math.min(timeGradient, nextTimeGradient); } } return timeGradient; } | /**
* Calculates the minimum timeGradient of all Terminations.
* Not supported timeGradients (-1.0) are ignored.
* @param phaseScope never null
* @return the minimum timeGradient of the Terminations.
*/ | Calculates the minimum timeGradient of all Terminations. Not supported timeGradients (-1.0) are ignored | calculatePhaseTimeGradient | {
"repo_name": "oskopek/optaplanner",
"path": "optaplanner-core/src/main/java/org/optaplanner/core/impl/solver/termination/AndCompositeTermination.java",
"license": "apache-2.0",
"size": 4313
} | [
"org.optaplanner.core.impl.phase.scope.AbstractPhaseScope"
] | import org.optaplanner.core.impl.phase.scope.AbstractPhaseScope; | import org.optaplanner.core.impl.phase.scope.*; | [
"org.optaplanner.core"
] | org.optaplanner.core; | 1,089,420 |
public TopicPartition partition() {
return partition;
} | TopicPartition function() { return partition; } | /**
* Returns the partition with which this queue is associated
*
* @return TopicPartition
*/ | Returns the partition with which this queue is associated | partition | {
"repo_name": "sslavic/kafka",
"path": "streams/src/main/java/org/apache/kafka/streams/processor/internals/RecordQueue.java",
"license": "apache-2.0",
"size": 7508
} | [
"org.apache.kafka.common.TopicPartition"
] | import org.apache.kafka.common.TopicPartition; | import org.apache.kafka.common.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 1,137,127 |
public static List getVisiableColumnBindingsList(
DesignElementHandle handle, boolean includeSelf )
{
List bindingList = new ArrayList( );
if ( includeSelf )
{
Iterator iterator = getBindingColumnIterator( handle );
while ( iterator.hasNext( ) )
{
bindingList.add( iterator.next( ) );
}
}
... | static List function( DesignElementHandle handle, boolean includeSelf ) { List bindingList = new ArrayList( ); if ( includeSelf ) { Iterator iterator = getBindingColumnIterator( handle ); while ( iterator.hasNext( ) ) { bindingList.add( iterator.next( ) ); } } ReportItemHandle holder = getBindingHolder( handle ); if ( ... | /**
* Returns all visible column bindings for the given element
*
* @param handle
* the handle of the element
* @return the list of all visible column bindings.The list order is from
* the top to the given element
*/ | Returns all visible column bindings for the given element | getVisiableColumnBindingsList | {
"repo_name": "sguan-actuate/birt",
"path": "UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DEUtil.java",
"license": "epl-1.0",
"size": 91152
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.eclipse.birt.report.model.api.DesignElementHandle",
"org.eclipse.birt.report.model.api.ReportItemHandle"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.birt.report.model.api.DesignElementHandle; import org.eclipse.birt.report.model.api.ReportItemHandle; | import java.util.*; import org.eclipse.birt.report.model.api.*; | [
"java.util",
"org.eclipse.birt"
] | java.util; org.eclipse.birt; | 1,870,435 |
EventQueue.invokeLater(new Runnable() { | EventQueue.invokeLater(new Runnable() { | /**
* Launch the application.
*/ | Launch the application | main | {
"repo_name": "quangvuwpi/SixesWild",
"path": "SixesWild/src/src/sw/app/Application_BoardPanel.java",
"license": "mit",
"size": 928
} | [
"java.awt.EventQueue"
] | import java.awt.EventQueue; | import java.awt.*; | [
"java.awt"
] | java.awt; | 964,406 |
private void addRestResourceClasses(Set<Class<?>> resources) {
resources.add(giftask.Giftask.class);
resources.add(giftask.TesterResource.class);
resources.add(giftask.UsuariosResource.class);
} | void function(Set<Class<?>> resources) { resources.add(giftask.Giftask.class); resources.add(giftask.TesterResource.class); resources.add(giftask.UsuariosResource.class); } | /**
* Do not modify addRestResourceClasses() method.
* It is automatically populated with
* all resources defined in the project.
* If required, comment out calling this method in getClasses().
*/ | Do not modify addRestResourceClasses() method. It is automatically populated with all resources defined in the project. If required, comment out calling this method in getClasses() | addRestResourceClasses | {
"repo_name": "antorof/Giftask-service-java-deprecated-",
"path": "src/java/giftask/ApplicationConfig.java",
"license": "mit",
"size": 1989
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 637,367 |
public static ShapeModel findShapeModelByC2jNameIfExists(IntermediateModel intermediateModel, String shapeC2jName) {
for (ShapeModel shape : intermediateModel.getShapes().values()) {
if (shape.getC2jName().equals(shapeC2jName)) {
return shape;
}
}
retu... | static ShapeModel function(IntermediateModel intermediateModel, String shapeC2jName) { for (ShapeModel shape : intermediateModel.getShapes().values()) { if (shape.getC2jName().equals(shapeC2jName)) { return shape; } } return null; } | /**
* Search for intermediate shape model by its c2j name.
*
* @return ShapeModel or null if the shape doesn't exist (if it's primitive or container type for example)
*/ | Search for intermediate shape model by its c2j name | findShapeModelByC2jNameIfExists | {
"repo_name": "dagnir/aws-sdk-java",
"path": "aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/Utils.java",
"license": "apache-2.0",
"size": 10404
} | [
"com.amazonaws.codegen.model.intermediate.IntermediateModel",
"com.amazonaws.codegen.model.intermediate.ShapeModel"
] | import com.amazonaws.codegen.model.intermediate.IntermediateModel; import com.amazonaws.codegen.model.intermediate.ShapeModel; | import com.amazonaws.codegen.model.intermediate.*; | [
"com.amazonaws.codegen"
] | com.amazonaws.codegen; | 1,482,196 |
@ServiceMethod(returns = ReturnType.SINGLE)
ApiIssuesGetResponse getWithResponse(
String resourceGroupName,
String serviceName,
String apiId,
String issueId,
Boolean expandCommentsAttachments,
Context context); | @ServiceMethod(returns = ReturnType.SINGLE) ApiIssuesGetResponse getWithResponse( String resourceGroupName, String serviceName, String apiId, String issueId, Boolean expandCommentsAttachments, Context context); | /**
* Gets the details of the Issue for an API specified by its identifier.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param apiId API identifier. Must be unique in the current API Management service instance.
... | Gets the details of the Issue for an API specified by its identifier | getWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/fluent/ApiIssuesClient.java",
"license": "mit",
"size": 14834
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.apimanagement.models.ApiIssuesGetResponse"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.apimanagement.models.ApiIssuesGetResponse; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.apimanagement.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,642,448 |
public Flow<JobXMLDescriptor> createFlow()
{
return new FlowImpl<JobXMLDescriptor>(this, "flow", model);
} | Flow<JobXMLDescriptor> function() { return new FlowImpl<JobXMLDescriptor>(this, "flow", model); } | /**
* Creates a new <code>flow</code> element
* @return the new created instance of <code>Flow<JobXMLDescriptor></code>
*/ | Creates a new <code>flow</code> element | createFlow | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/jobXML10/JobXMLDescriptorImpl.java",
"license": "epl-1.0",
"size": 18396
} | [
"org.jboss.shrinkwrap.descriptor.api.jobXML10.Flow",
"org.jboss.shrinkwrap.descriptor.api.jobXML10.JobXMLDescriptor"
] | import org.jboss.shrinkwrap.descriptor.api.jobXML10.Flow; import org.jboss.shrinkwrap.descriptor.api.jobXML10.JobXMLDescriptor; | import org.jboss.shrinkwrap.descriptor.api.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 150,132 |
@Override
public boolean addComponent(final Object obj, final boolean allowComponentRegistry) {
// TODO: Allow to add ComponentFactory + contract (renew with reload etc.)?
if (obj == this) throw new IllegalArgumentException("Can not register NoCheatPlus with itself.");
if (allComponents.contains(o... | boolean function(final Object obj, final boolean allowComponentRegistry) { if (obj == this) throw new IllegalArgumentException(STR); if (allComponents.contains(obj)){ return false; } boolean added = false; if (obj instanceof Listener) { addListener((Listener) obj); added = true; } if (obj instanceof INotifyReload) { no... | /**
* Convenience method to add components according to implemented interfaces,
* like Listener, INotifyReload, INeedConfig.<br>
* For the NoCheatPlus instance this must be done after the configuration has been initialized.
* @param allowComponentRegistry Only registers ComponentRegistry instances ... | Convenience method to add components according to implemented interfaces, like Listener, INotifyReload, INeedConfig. For the NoCheatPlus instance this must be done after the configuration has been initialized | addComponent | {
"repo_name": "MyPictures/NoCheatPlus",
"path": "NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/NoCheatPlus.java",
"license": "gpl-3.0",
"size": 43282
} | [
"fr.neatmonster.nocheatplus.components.ComponentRegistry",
"fr.neatmonster.nocheatplus.components.ConsistencyChecker",
"fr.neatmonster.nocheatplus.components.DisableListener",
"fr.neatmonster.nocheatplus.components.IHoldSubComponents",
"fr.neatmonster.nocheatplus.components.INeedConfig",
"fr.neatmonster.n... | import fr.neatmonster.nocheatplus.components.ComponentRegistry; import fr.neatmonster.nocheatplus.components.ConsistencyChecker; import fr.neatmonster.nocheatplus.components.DisableListener; import fr.neatmonster.nocheatplus.components.IHoldSubComponents; import fr.neatmonster.nocheatplus.components.INeedConfig; import... | import fr.neatmonster.nocheatplus.components.*; import fr.neatmonster.nocheatplus.utilities.*; import org.bukkit.event.*; | [
"fr.neatmonster.nocheatplus",
"org.bukkit.event"
] | fr.neatmonster.nocheatplus; org.bukkit.event; | 104,763 |
private com.extjs.gxt.ui.client.widget.grid.Grid<ProjectDTOLight> buildTestProjectPanel() {
ColumnModel cm = buildColumnModelTestProject();
testProjectStore.setMonitorChanges(true);
com.extjs.gxt.ui.client.widget.grid.Grid<ProjectDTOLight> grid = new com.extjs.gxt.ui.client.widget.grid.Grid<ProjectDTOLight>... | com.extjs.gxt.ui.client.widget.grid.Grid<ProjectDTOLight> function() { ColumnModel cm = buildColumnModelTestProject(); testProjectStore.setMonitorChanges(true); com.extjs.gxt.ui.client.widget.grid.Grid<ProjectDTOLight> grid = new com.extjs.gxt.ui.client.widget.grid.Grid<ProjectDTOLight>( testProjectStore, cm); grid.set... | /**
* Builds the test projects panel.
*
* @return The panel.
*/ | Builds the test projects panel | buildTestProjectPanel | {
"repo_name": "spMohanty/sigmah_svn_to_git_migration_test",
"path": "sigmah/src/main/java/org/sigmah/client/page/dashboard/CreateProjectWindow.java",
"license": "gpl-3.0",
"size": 30599
} | [
"com.extjs.gxt.ui.client.widget.grid.ColumnModel",
"com.google.gwt.user.client.ui.Grid",
"org.sigmah.shared.dto.ProjectDTOLight"
] | import com.extjs.gxt.ui.client.widget.grid.ColumnModel; import com.google.gwt.user.client.ui.Grid; import org.sigmah.shared.dto.ProjectDTOLight; | import com.extjs.gxt.ui.client.widget.grid.*; import com.google.gwt.user.client.ui.*; import org.sigmah.shared.dto.*; | [
"com.extjs.gxt",
"com.google.gwt",
"org.sigmah.shared"
] | com.extjs.gxt; com.google.gwt; org.sigmah.shared; | 1,573,910 |
protected void setInput(InputStream stdin) {
this.stdin = stdin;
updateReadyStatus();
}
| void function(InputStream stdin) { this.stdin = stdin; updateReadyStatus(); } | /**
* Sets standard input to be passed on to the invoked cgi script
*
* @param stdin InputStream to be used
*
*/ | Sets standard input to be passed on to the invoked cgi script | setInput | {
"repo_name": "IAMTJW/Tomcat-8.5.20",
"path": "tomcat-8.5.20/java/org/apache/catalina/servlets/CGIServlet.java",
"license": "apache-2.0",
"size": 70877
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 356,093 |
void cleanup(Animator animator)
{
effect.cleanup(animator);
}
| void cleanup(Animator animator) { effect.cleanup(animator); } | /**
* Clean up any artifacts created during the transition. This could include, for example,
* PropertySetter objects (or other TimingTargets) added to the animator during the init() phase.
*/ | Clean up any artifacts created during the transition. This could include, for example, PropertySetter objects (or other TimingTargets) added to the animator during the init() phase | cleanup | {
"repo_name": "theyelllowdart/jmockit",
"path": "samples/AnimatedTransitions/src/org/jdesktop/animation/transitions/AnimationState.java",
"license": "mit",
"size": 6583
} | [
"org.jdesktop.animation.timing.Animator"
] | import org.jdesktop.animation.timing.Animator; | import org.jdesktop.animation.timing.*; | [
"org.jdesktop.animation"
] | org.jdesktop.animation; | 1,335,883 |
public static List<Unit> getUnitsToTransportThatCantMoveToHigherValue(
final GamePlayer player,
final Unit transport,
final Set<Territory> territoriesToLoadFrom,
final Collection<Unit> unitsToIgnore,
final Map<Territory, ProTerritory> moveMap,
final Map<Unit, Set<Territory>> unitMo... | static List<Unit> function( final GamePlayer player, final Unit transport, final Set<Territory> territoriesToLoadFrom, final Collection<Unit> unitsToIgnore, final Map<Territory, ProTerritory> moveMap, final Map<Unit, Set<Territory>> unitMoveMap, final double value) { final List<Unit> unitsToIgnoreOrHaveBetterLandMove =... | /**
* Returns the units to transport via {@code transport} whose land movement value does not exceed
* {@code value}.
*/ | Returns the units to transport via transport whose land movement value does not exceed value | getUnitsToTransportThatCantMoveToHigherValue | {
"repo_name": "triplea-game/triplea",
"path": "game-app/game-core/src/main/java/games/strategy/triplea/ai/pro/util/ProTransportUtils.java",
"license": "gpl-3.0",
"size": 21219
} | [
"games.strategy.engine.data.GamePlayer",
"games.strategy.engine.data.Territory",
"games.strategy.engine.data.Unit",
"games.strategy.triplea.ai.pro.data.ProTerritory",
"games.strategy.triplea.delegate.TransportTracker",
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"java.util.Map",... | import games.strategy.engine.data.GamePlayer; import games.strategy.engine.data.Territory; import games.strategy.engine.data.Unit; import games.strategy.triplea.ai.pro.data.ProTerritory; import games.strategy.triplea.delegate.TransportTracker; import java.util.ArrayList; import java.util.Collection; import java.util.Li... | import games.strategy.engine.data.*; import games.strategy.triplea.ai.pro.data.*; import games.strategy.triplea.delegate.*; import java.util.*; | [
"games.strategy.engine",
"games.strategy.triplea",
"java.util"
] | games.strategy.engine; games.strategy.triplea; java.util; | 97,898 |
public int find(String what, int start) {
try {
ByteBuffer src = ByteBuffer.wrap(this.bytes, 0, this.length);
ByteBuffer tgt = encode(what);
byte b = tgt.get();
src.position(start);
while (src.hasRemaining()) {
if (b == src.get()) { // matching first byte
src.mark(... | int function(String what, int start) { try { ByteBuffer src = ByteBuffer.wrap(this.bytes, 0, this.length); ByteBuffer tgt = encode(what); byte b = tgt.get(); src.position(start); while (src.hasRemaining()) { if (b == src.get()) { src.mark(); tgt.mark(); boolean found = true; int pos = src.position() - 1; while (tgt.has... | /**
* Finds any occurence of <code>what</code> in the backing buffer, starting as position <code>start</code>. The
* starting position is measured in bytes and the return value is in terms of byte position in the buffer. The backing
* buffer is not converted to a string for this operation.
*
* @return by... | Finds any occurence of <code>what</code> in the backing buffer, starting as position <code>start</code>. The starting position is measured in bytes and the return value is in terms of byte position in the buffer. The backing buffer is not converted to a string for this operation | find | {
"repo_name": "pwong-mapr/incubator-drill",
"path": "exec/vector/src/main/java/org/apache/drill/exec/util/Text.java",
"license": "apache-2.0",
"size": 19109
} | [
"java.nio.ByteBuffer",
"java.nio.charset.CharacterCodingException"
] | import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException; | import java.nio.*; import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 1,791,433 |
public static Actor convertToTable (final TableBuilder usingBuilder, final CellWidget<?>... widgets) {
for (final CellWidget<?> widget : widgets) {
usingBuilder.append(widget);
}
return usingBuilder.build();
} | static Actor function (final TableBuilder usingBuilder, final CellWidget<?>... widgets) { for (final CellWidget<?> widget : widgets) { usingBuilder.append(widget); } return usingBuilder.build(); } | /**
* Utility method. Appends all widgets into the passed builder and creates a table with no additional
* settings.
*/ | Utility method. Appends all widgets into the passed builder and creates a table with no additional settings | convertToTable | {
"repo_name": "billy1380/VisEditor",
"path": "UI/src/com/kotcrab/vis/ui/building/utilities/layouts/TableLayout.java",
"license": "apache-2.0",
"size": 2436
} | [
"com.badlogic.gdx.scenes.scene2d.Actor",
"com.kotcrab.vis.ui.building.TableBuilder",
"com.kotcrab.vis.ui.building.utilities.CellWidget"
] | import com.badlogic.gdx.scenes.scene2d.Actor; import com.kotcrab.vis.ui.building.TableBuilder; import com.kotcrab.vis.ui.building.utilities.CellWidget; | import com.badlogic.gdx.scenes.scene2d.*; import com.kotcrab.vis.ui.building.*; import com.kotcrab.vis.ui.building.utilities.*; | [
"com.badlogic.gdx",
"com.kotcrab.vis"
] | com.badlogic.gdx; com.kotcrab.vis; | 1,553,499 |
public static TalonSRX talonSRX(int deviceNumber, TalonSRX leader, boolean reverse) {
CANTalon talon = new CANTalon(deviceNumber);
talon.changeControlMode(TalonControlMode.Follower);
talon.set(leader.getDeviceID());
talon.reverseOutput(reverse);
return... | static TalonSRX function(int deviceNumber, TalonSRX leader, boolean reverse) { CANTalon talon = new CANTalon(deviceNumber); talon.changeControlMode(TalonControlMode.Follower); talon.set(leader.getDeviceID()); talon.reverseOutput(reverse); return talonSRX(talon, 0.0d, 0.0d); } | /**
* Creates a {@link TalonSRX} motor controller that follows another Talon SRX. The resulting TalonSRX will have neither
* a {@link TalonSRX#getAnalogInput()} or a {@link TalonSRX#getEncoderInput()}.
*
* @param deviceNumber the CAN device number for the Talon SRX; may not be null
... | Creates a <code>TalonSRX</code> motor controller that follows another Talon SRX. The resulting TalonSRX will have neither a <code>TalonSRX#getAnalogInput()</code> or a <code>TalonSRX#getEncoderInput()</code> | talonSRX | {
"repo_name": "WawerOS/strongback-java",
"path": "strongback/src/org/strongback/hardware/Hardware.java",
"license": "mit",
"size": 49556
} | [
"com.ctre.CANTalon",
"org.strongback.components.TalonSRX"
] | import com.ctre.CANTalon; import org.strongback.components.TalonSRX; | import com.ctre.*; import org.strongback.components.*; | [
"com.ctre",
"org.strongback.components"
] | com.ctre; org.strongback.components; | 1,537,571 |
public static Range iterateRangeBounds(XYDataset dataset,
boolean includeInterval) {
double minimum = Double.POSITIVE_INFINITY;
double maximum = Double.NEGATIVE_INFINITY;
int seriesCount = dataset.getSeriesCount();
// handle three cases by dataset type
if (includ... | static Range function(XYDataset dataset, boolean includeInterval) { double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int seriesCount = dataset.getSeriesCount(); if (includeInterval && dataset instanceof IntervalXYDataset) { IntervalXYDataset ixyd = (IntervalXYDataset) dataset; for (... | /**
* Iterates over the data items of the xy dataset to find
* the range bounds.
*
* @param dataset the dataset ({@code null} not permitted).
* @param includeInterval a flag that determines, for an
* {@link IntervalXYDataset}, whether the y-interval or just the
* y... | Iterates over the data items of the xy dataset to find the range bounds | iterateRangeBounds | {
"repo_name": "simon04/jfreechart",
"path": "src/main/java/org/jfree/data/general/DatasetUtilities.java",
"license": "lgpl-2.1",
"size": 94747
} | [
"org.jfree.data.Range",
"org.jfree.data.xy.IntervalXYDataset",
"org.jfree.data.xy.OHLCDataset",
"org.jfree.data.xy.XYDataset"
] | import org.jfree.data.Range; import org.jfree.data.xy.IntervalXYDataset; import org.jfree.data.xy.OHLCDataset; import org.jfree.data.xy.XYDataset; | import org.jfree.data.*; import org.jfree.data.xy.*; | [
"org.jfree.data"
] | org.jfree.data; | 613,244 |
public static String marshalJson(@NotNull Object object)
throws JAXBException {
try (StringWriter sw = new StringWriter()) {
marshalJson(object, sw);
return sw.toString();
} catch (IOException ioe) {
// This exception is thrown when operations are perf... | static String function(@NotNull Object object) throws JAXBException { try (StringWriter sw = new StringWriter()) { marshalJson(object, sw); return sw.toString(); } catch (IOException ioe) { throw new IllegalStateException(STR, ioe); } } /** * Marshals the given XML {@link Object} into the given {@link Writer} as JSON r... | /**
* Marshals the given {@link Object} to an JSON {@link String}.
*
* @param object The {@link Object} to marshal.
* @return The Json {@link String} representation of the object.
* @throws JAXBException See {@link Marshaller#marshal(Object, Writer)}.
* @since 1.0.0
*/ | Marshals the given <code>Object</code> to an JSON <code>String</code> | marshalJson | {
"repo_name": "LeoNerdoG/kapua",
"path": "commons/src/main/java/org/eclipse/kapua/commons/util/xml/XmlUtil.java",
"license": "epl-1.0",
"size": 18410
} | [
"java.io.IOException",
"java.io.StringWriter",
"java.io.Writer",
"javax.validation.constraints.NotNull",
"javax.xml.bind.JAXBException",
"javax.xml.bind.Marshaller"
] | import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import javax.validation.constraints.NotNull; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; | import java.io.*; import javax.validation.constraints.*; import javax.xml.bind.*; | [
"java.io",
"javax.validation",
"javax.xml"
] | java.io; javax.validation; javax.xml; | 1,531,656 |
public String readString()
throws IOException
{
// Length
int length = inputStream.read();
byte[] bytes = new byte[length];
read(bytes, length);
return new String(bytes);
}
| String function() throws IOException { int length = inputStream.read(); byte[] bytes = new byte[length]; read(bytes, length); return new String(bytes); } | /** Reads a string from remote device.
* It first reads the length (int), followed by the characters.
* String is not null-terminated.
* Strings have to be limited to 255 chars max.
* Is used by {@link BluetoothDiscovery BluetoothDiscovery}.
* @return String that is read from the remote de... | Reads a string from remote device. It first reads the length (int), followed by the characters. String is not null-terminated. Strings have to be limited to 255 chars max. Is used by <code>BluetoothDiscovery BluetoothDiscovery</code> | readString | {
"repo_name": "nsaje/Kurve",
"path": "src/BluetoothConnection.java",
"license": "gpl-3.0",
"size": 11879
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,395,416 |
@Test
public void testBindingIsDisposed() throws ContextException {
YView yView = factory.createView();
YGridLayout yGridlayout = factory.createGridLayout();
yView.setContent(yGridlayout);
YLabel yLabel = factory.createLabel();
yGridlayout.getElements().add(yLabel);
VaadinRenderer renderer = new Vaadin... | void function() throws ContextException { YView yView = factory.createView(); YGridLayout yGridlayout = factory.createGridLayout(); yView.setContent(yGridlayout); YLabel yLabel = factory.createLabel(); yGridlayout.getElements().add(yLabel); VaadinRenderer renderer = new VaadinRenderer(); renderer.render(rootLayout, yVi... | /**
* Test the automatic disposal of bindings
*
* @throws ContextException
*/ | Test the automatic disposal of bindings | testBindingIsDisposed | {
"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/LabelPresentationTests.java",
"license": "epl-1.0",
"size": 15880
} | [
"com.vaadin.ui.Component",
"org.eclipse.emf.ecp.ecview.common.context.ContextException",
"org.eclipse.emf.ecp.ecview.common.editpart.DelegatingEditPartManager",
"org.eclipse.emf.ecp.ecview.common.model.core.YView",
"org.eclipse.emf.ecp.ecview.common.presentation.IWidgetPresentation",
"org.eclipse.emf.ecp.... | import com.vaadin.ui.Component; import org.eclipse.emf.ecp.ecview.common.context.ContextException; 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.presentation.IWidgetPresentation; import org... | import com.vaadin.ui.*; import org.eclipse.emf.ecp.ecview.common.context.*; 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.eclip... | [
"com.vaadin.ui",
"org.eclipse.emf",
"org.junit",
"org.lunifera.runtime"
] | com.vaadin.ui; org.eclipse.emf; org.junit; org.lunifera.runtime; | 2,270,305 |
public boolean createReportWithMailingDetails(DashboardReportDataModel data) {
try {
fillData(data);
visibilityOf(addEmail, 2);
clickOn(addEmail, 2);
visibilityOf(senderEmailAddress, 2);
senderEmailAddress.sendKeys(data.getSenderEmailAddress());
visibilityOf(receiverEmailAddress, 2);
receiverE... | boolean function(DashboardReportDataModel data) { try { fillData(data); visibilityOf(addEmail, 2); clickOn(addEmail, 2); visibilityOf(senderEmailAddress, 2); senderEmailAddress.sendKeys(data.getSenderEmailAddress()); visibilityOf(receiverEmailAddress, 2); receiverEmailAddress.sendKeys(data.getReceiverEmailAddress()); v... | /**
* creates report with different frequencies, time range, theme, pdf type etc
*
* @param data
* @return
*/ | creates report with different frequencies, time range, theme, pdf type etc | createReportWithMailingDetails | {
"repo_name": "CognizantOneDevOps/Insights",
"path": "PlatformRegressionTest/src/main/java/com/cognizant/devops/platformregressiontest/test/ui/dashboardreportdownload/DashboardReportDownloadConfiguration.java",
"license": "apache-2.0",
"size": 11114
} | [
"com.cognizant.devops.platformregressiontest.test.ui.testdatamodel.DashboardReportDataModel",
"org.testng.SkipException"
] | import com.cognizant.devops.platformregressiontest.test.ui.testdatamodel.DashboardReportDataModel; import org.testng.SkipException; | import com.cognizant.devops.platformregressiontest.test.ui.testdatamodel.*; import org.testng.*; | [
"com.cognizant.devops",
"org.testng"
] | com.cognizant.devops; org.testng; | 1,534,242 |
public static Instruction pushVlan(EthType ethType) {
return new L2ModificationInstruction.ModVlanHeaderInstruction(
L2ModificationInstruction.L2SubType.VLAN_PUSH,
ethType);
} | static Instruction function(EthType ethType) { return new L2ModificationInstruction.ModVlanHeaderInstruction( L2ModificationInstruction.L2SubType.VLAN_PUSH, ethType); } | /**
* Creates a push VLAN header instruction using the supplied Ethernet type.
*
* @param ethType the Ethernet type to use
* @return a L2 modification
*/ | Creates a push VLAN header instruction using the supplied Ethernet type | pushVlan | {
"repo_name": "sdnwiselab/onos",
"path": "core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java",
"license": "apache-2.0",
"size": 25757
} | [
"org.onlab.packet.EthType"
] | import org.onlab.packet.EthType; | import org.onlab.packet.*; | [
"org.onlab.packet"
] | org.onlab.packet; | 2,500,059 |
Factorial factorial = new Factorial();
int result = factorial.calc(5);
int expected = 120;
assertThat(result, is(expected));
} | Factorial factorial = new Factorial(); int result = factorial.calc(5); int expected = 120; assertThat(result, is(expected)); } | /**
* Test calculate factorial.
*/ | Test calculate factorial | whenFiveThenOneHunderTwenty | {
"repo_name": "maximignashov/mignashov",
"path": "chapter_001/src/test/java/ru/job4j/loop/FactorialTest.java",
"license": "apache-2.0",
"size": 784
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 3,636 |
// Add business logic below. (Right-click in editor and choose
// "Insert Code > Add Business Method")
public Document getDocumentoFirmado(Firma firma, Document document) {
String idcertified = firma.getRutafirma();
String idpassword = firma.getClavefirma();
IPKStoreManager sto... | Document function(Firma firma, Document document) { String idcertified = firma.getRutafirma(); String idpassword = firma.getClavefirma(); IPKStoreManager storeManager = null; KeyStore ks = null; try { ks = KeyStore.getInstance(STR); ks.load(new java.io.FileInputStream(idcertified), idpassword.toCharArray()); storeManag... | /**
* Firma Electronicamente a un documento xml
*
* @param firma
* @param document documneto XML
* @return Documento firmado
*/ | Firma Electronicamente a un documento xml | getDocumentoFirmado | {
"repo_name": "diego10j/jye",
"path": "jye/jye-ejb/src/java/comprobantesElectronicos/ejb/ejbFirmarDocumento.java",
"license": "gpl-2.0",
"size": 7391
} | [
"es.mityc.firmaJava.libreria.xades.DataToSign",
"es.mityc.firmaJava.libreria.xades.EnumFormatoFirma",
"es.mityc.firmaJava.libreria.xades.FirmaXML",
"es.mityc.firmaJava.libreria.xades.XAdESSchemas",
"es.mityc.javasign.pkstore.IPKStoreManager",
"es.mityc.javasign.pkstore.keystore.KSStore",
"es.mityc.javas... | import es.mityc.firmaJava.libreria.xades.DataToSign; import es.mityc.firmaJava.libreria.xades.EnumFormatoFirma; import es.mityc.firmaJava.libreria.xades.FirmaXML; import es.mityc.firmaJava.libreria.xades.XAdESSchemas; import es.mityc.javasign.pkstore.IPKStoreManager; import es.mityc.javasign.pkstore.keystore.KSStore; i... | import es.mityc.*; import es.mityc.javasign.pkstore.*; import es.mityc.javasign.pkstore.keystore.*; import es.mityc.javasign.xml.refs.*; import java.security.*; import java.security.cert.*; import java.util.*; import org.apache.log4j.*; import org.w3c.dom.*; | [
"es.mityc",
"es.mityc.javasign",
"java.security",
"java.util",
"org.apache.log4j",
"org.w3c.dom"
] | es.mityc; es.mityc.javasign; java.security; java.util; org.apache.log4j; org.w3c.dom; | 2,659,702 |
synchronized void removeLease(StringBytesWritable holder, String src
) throws IOException {
Lease lease = getLease(holder);
if (lease != null) {
removeLease(lease, src);
}
} | synchronized void removeLease(StringBytesWritable holder, String src ) throws IOException { Lease lease = getLease(holder); if (lease != null) { removeLease(lease, src); } } | /**
* Remove the lease for the specified holder and src
*/ | Remove the lease for the specified holder and src | removeLease | {
"repo_name": "kohsuke/hadoop",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java",
"license": "apache-2.0",
"size": 13231
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 829,612 |
static void copyToStream(File file, OutputStream out) throws IOException {
try (InputStream in = new FileInputStream(file)) {
IOUtils.copy(in, out);
} finally {
delete(file);
}
} | static void copyToStream(File file, OutputStream out) throws IOException { try (InputStream in = new FileInputStream(file)) { IOUtils.copy(in, out); } finally { delete(file); } } | /**
* Copies the contents of the file to the specified outputstream, without zipping or applying any other changes.
*
* @param file
* @param out
* @throws IOException
*/ | Copies the contents of the file to the specified outputstream, without zipping or applying any other changes | copyToStream | {
"repo_name": "torakiki/sejda",
"path": "sejda-core/src/main/java/org/sejda/core/support/io/OutputWriterHelper.java",
"license": "agpl-3.0",
"size": 9038
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream",
"org.apache.commons.io.IOUtils"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.apache.commons.io.IOUtils; | import java.io.*; import org.apache.commons.io.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 761,900 |
protected String[] splitTransformationConfig(String transformation) {
Matcher matcher = EXTRACT_FUNCTION_PATTERN.matcher(transformation);
if (!matcher.matches()) {
throw new IllegalArgumentException("given transformation function '" + transformation + "' does not follow the expected pattern '<function>(<patt... | String[] function(String transformation) { Matcher matcher = EXTRACT_FUNCTION_PATTERN.matcher(transformation); if (!matcher.matches()) { throw new IllegalArgumentException(STR + transformation + STR); } matcher.reset(); matcher.find(); String type = matcher.group(1); String pattern = matcher.group(2); return new String... | /**
* Splits a transformation configuration string into its two parts - the
* transformation type and the function/pattern to apply.
*
* @param transformation the string to split
* @return a string array with exactly two entries for the type and the function
*/ | Splits a transformation configuration string into its two parts - the transformation type and the function/pattern to apply | splitTransformationConfig | {
"repo_name": "PlegmaLabs/openhab",
"path": "bundles/binding/org.openhab.binding.tcp/src/main/java/org/openhab/binding/tcp/protocol/internal/UDPBinding.java",
"license": "epl-1.0",
"size": 10163
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 337,759 |
public BoneContext getBoneContext(Long boneOMA) {
return boneContexts.get(boneOMA);
}
| BoneContext function(Long boneOMA) { return boneContexts.get(boneOMA); } | /**
* This method returns the bone context for the given bone old memory
* address. If no context exists then <b>null</b> is returned.
*
* @param boneOMA
* the bone's old memory address
* @return bone's context
*/ | This method returns the bone context for the given bone old memory address. If no context exists then null is returned | getBoneContext | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "external/jmonkeyengine/engine/src/blender/com/jme3/scene/plugins/blender/BlenderContext.java",
"license": "gpl-2.0",
"size": 21154
} | [
"com.jme3.scene.plugins.blender.animations.BoneContext"
] | import com.jme3.scene.plugins.blender.animations.BoneContext; | import com.jme3.scene.plugins.blender.animations.*; | [
"com.jme3.scene"
] | com.jme3.scene; | 101,047 |
public SuggestionCriteria statusIsOneOf(ContributionStatus... statuses) {
CollectionUtil.addAllIgnoreNull(this.statuses, statuses);
return this;
} | SuggestionCriteria function(ContributionStatus... statuses) { CollectionUtil.addAllIgnoreNull(this.statuses, statuses); return this; } | /**
* Sets the list of status criterion to find suggestions which have their status equals to one
* of
* the given ones.
* @param statuses the status list that the suggestion statuses must verify.
* @return the suggestion criteria itself with the new criterion on the suggestion statuses.
*/ | Sets the list of status criterion to find suggestions which have their status equals to one of the given ones | statusIsOneOf | {
"repo_name": "auroreallibe/Silverpeas-Components",
"path": "suggestionBox/suggestionBox-library/src/main/java/org/silverpeas/components/suggestionbox/model/SuggestionCriteria.java",
"license": "agpl-3.0",
"size": 9506
} | [
"org.silverpeas.core.contribution.ContributionStatus",
"org.silverpeas.core.util.CollectionUtil"
] | import org.silverpeas.core.contribution.ContributionStatus; import org.silverpeas.core.util.CollectionUtil; | import org.silverpeas.core.contribution.*; import org.silverpeas.core.util.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 2,468,410 |
public BeamSqlEnv build() {
checkNotNull(pipelineOptions);
JdbcConnection jdbcConnection = JdbcDriver.connect(defaultTableProvider, pipelineOptions);
configureSchemas(jdbcConnection);
loadBeamBuiltinFunctions();
loadUdfs();
addUdfsUdafs(jdbcConnection);
QueryPlanner p... | BeamSqlEnv function() { checkNotNull(pipelineOptions); JdbcConnection jdbcConnection = JdbcDriver.connect(defaultTableProvider, pipelineOptions); configureSchemas(jdbcConnection); loadBeamBuiltinFunctions(); loadUdfs(); addUdfsUdafs(jdbcConnection); QueryPlanner planner = instantiatePlanner(jdbcConnection, ruleSets); r... | /**
* Build function to create an instance of BeamSqlEnv based on preset fields.
*
* @return BeamSqlEnv.
*/ | Build function to create an instance of BeamSqlEnv based on preset fields | build | {
"repo_name": "iemejia/incubator-beam",
"path": "sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/BeamSqlEnv.java",
"license": "apache-2.0",
"size": 11900
} | [
"org.apache.beam.vendor.calcite.v1_20_0.com.google.common.base.Preconditions"
] | import org.apache.beam.vendor.calcite.v1_20_0.com.google.common.base.Preconditions; | import org.apache.beam.vendor.calcite.v1_20_0.com.google.common.base.*; | [
"org.apache.beam"
] | org.apache.beam; | 1,547,537 |
public static List<ErrataFile> lookupErrataFile(Errata errata, Package pack) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("errata", errata);
params.put("package", pack);
return singleton.listObjectsByNamedQuery(
"PublishedErrataFile.lookup... | static List<ErrataFile> function(Errata errata, Package pack) { Map<String, Object> params = new HashMap<String, Object>(); params.put(STR, errata); params.put(STR, pack); return singleton.listObjectsByNamedQuery( STR, params); } | /**
* Lookup an errataFile object by it's errata and package
* @param errata the errata associated
* @param pack the package associated
* @return the requested errata file object
*/ | Lookup an errataFile object by it's errata and package | lookupErrataFile | {
"repo_name": "lhellebr/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/errata/ErrataFactory.java",
"license": "gpl-2.0",
"size": 48855
} | [
"com.redhat.rhn.domain.rhnpackage.Package",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.redhat.rhn.domain.rhnpackage.Package; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.redhat.rhn.domain.rhnpackage.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 433,868 |
public DocumentMutation setOrReplace(@NonNullable FieldPath path, float f); | DocumentMutation function(@NonNullable FieldPath path, float f); | /**
* Sets or replaces the field at the given FieldPath to the specified
* {@code float} value.
*
* @param path path of the field that needs to be updated
* @param f the new value to set at the FieldPath
* @return {@code this} for chained invocation
*/ | Sets or replaces the field at the given FieldPath to the specified float value | setOrReplace | {
"repo_name": "ojai/ojai",
"path": "java/core/src/main/java/org/ojai/store/DocumentMutation.java",
"license": "apache-2.0",
"size": 47815
} | [
"org.ojai.FieldPath",
"org.ojai.annotation.API"
] | import org.ojai.FieldPath; import org.ojai.annotation.API; | import org.ojai.*; import org.ojai.annotation.*; | [
"org.ojai",
"org.ojai.annotation"
] | org.ojai; org.ojai.annotation; | 2,771,511 |
public void testWriteLockInterruptibly() throws InterruptedException {
final StampedLock lock = new StampedLock();
long s = lock.writeLockInterruptibly();
assertTrue(lock.isWriteLocked());
releaseWriteLock(lock, s);
} | void function() throws InterruptedException { final StampedLock lock = new StampedLock(); long s = lock.writeLockInterruptibly(); assertTrue(lock.isWriteLocked()); releaseWriteLock(lock, s); } | /**
* writeLockInterruptibly succeeds if unlocked
*/ | writeLockInterruptibly succeeds if unlocked | testWriteLockInterruptibly | {
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/libcore/ojluni/src/test/java/util/concurrent/tck/StampedLockTest.java",
"license": "gpl-2.0",
"size": 45363
} | [
"java.util.concurrent.locks.StampedLock"
] | import java.util.concurrent.locks.StampedLock; | import java.util.concurrent.locks.*; | [
"java.util"
] | java.util; | 2,662,969 |
public static String retrieveDisplayName(String id, boolean daylight, int style, Locale locale) {
String[] names = retrieveDisplayNamesImpl(id, locale);
if (Objects.nonNull(names)) {
return names[(daylight ? 4 : 2) - style];
} else {
return null;
}
} | static String function(String id, boolean daylight, int style, Locale locale) { String[] names = retrieveDisplayNamesImpl(id, locale); if (Objects.nonNull(names)) { return names[(daylight ? 4 : 2) - style]; } else { return null; } } | /**
* Retrieves a standard or daylight-saving time name for the given time zone ID.
*
* @param id time zone ID
* @param daylight true for a daylight saving time name, or false for a standard time name
* @param style TimeZone.LONG or TimeZone.SHORT
* @param locale desired Locale
... | Retrieves a standard or daylight-saving time name for the given time zone ID | retrieveDisplayName | {
"repo_name": "JetBrains/jdk8u_jdk",
"path": "src/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java",
"license": "gpl-2.0",
"size": 9726
} | [
"java.util.Locale",
"java.util.Objects"
] | import java.util.Locale; import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 653,537 |
public Timestamp getUpdated();
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; | Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR; | /** Get Updated.
* Date this record was updated
*/ | Get Updated. Date this record was updated | getUpdated | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/I_AD_OrgInfo.java",
"license": "gpl-2.0",
"size": 9685
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,861,325 |
public void keyTyped(KeyEvent e) {
} | void function(KeyEvent e) { } | /**
* Is called when a key is typed.
* @param e the key event
*/ | Is called when a key is typed | keyTyped | {
"repo_name": "jurkov/j-algo-mod",
"path": "src/org/jalgo/module/hoare/view/View.java",
"license": "gpl-2.0",
"size": 32171
} | [
"java.awt.event.KeyEvent"
] | import java.awt.event.KeyEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,245,112 |
@Override
public void onBlur(BlurEvent event) {
if (!readOnly) {
try {
int newHourValue = Integer.parseInt(hourValueBox.getValue());
if (oldHourValue != newHourValue) {
if (newHourValu... | void function(BlurEvent event) { if (!readOnly) { try { int newHourValue = Integer.parseInt(hourValueBox.getValue()); if (oldHourValue != newHourValue) { if (newHourValue > getHourSpinner().getMax()) { newHourValue = (int) getHourSpinner().getMax(); } if (newHourValue < getHourSpinner().getMin()) { newHourValue = (int)... | /**
* This method will fire if focus is lost on the hour input field
*
* @author Michael Barnard <michael.barnard@a24group.com>
* @since 3 August 2015
*
* @param event - The blur event that made this code execute
*/ | This method will fire if focus is lost on the hour input field | onBlur | {
"repo_name": "A24Group/ssGWT-lib",
"path": "src/org/ssgwt/client/ui/form/spinner/DurationSpinner.java",
"license": "apache-2.0",
"size": 27139
} | [
"com.google.gwt.event.dom.client.BlurEvent",
"com.google.gwt.event.dom.client.BlurHandler"
] | import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; | import com.google.gwt.event.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,788,496 |
private List<String> getPlayerProperties(boolean updatePolledPropertiesOnly) {
List<String> properties = new ArrayList<String>();
if (updatePolledPropertiesOnly) {
for (String property : watches.values()) {
if (properties.contains(property)) {
continu... | List<String> function(boolean updatePolledPropertiesOnly) { List<String> properties = new ArrayList<String>(); if (updatePolledPropertiesOnly) { for (String property : watches.values()) { if (properties.contains(property)) { continue; } else if (property.equals(STR)) { properties.add(property); } else if (property.equa... | /**
* get a distinct list of player properties we have items configured for
*
* @param updatePolledPropertiesOnly
* Only get the properties that need to be refreshed by polling if true,
* otherwise get all the properties that have items configured for
* @return
... | get a distinct list of player properties we have items configured for | getPlayerProperties | {
"repo_name": "svenschaefer74/openhab",
"path": "bundles/binding/org.openhab.binding.xbmc/src/main/java/org/openhab/binding/xbmc/rpc/XbmcConnector.java",
"license": "epl-1.0",
"size": 26185
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,354,912 |
public static ItemStack getPlantForMeta(int par0) {
switch (par0) {
case 1:
return new ItemStack(plantRed);
case 2:
return new ItemStack(plantYellow);
case 3:
return new ItemStack(sapling, 1, 0);
case 4:
... | static ItemStack function(int par0) { switch (par0) { case 1: return new ItemStack(plantRed); case 2: return new ItemStack(plantYellow); case 3: return new ItemStack(sapling, 1, 0); case 4: return new ItemStack(sapling, 1, 1); case 5: return new ItemStack(sapling, 1, 2); case 6: return new ItemStack(sapling, 1, 3); cas... | /**
* Return the item associated with the specified flower pot metadata value.
*/ | Return the item associated with the specified flower pot metadata value | getPlantForMeta | {
"repo_name": "DirectCodeGraveyard/Minetweak",
"path": "src/main/java/net/minecraft/block/BlockFlowerPot.java",
"license": "lgpl-3.0",
"size": 6712
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,917,661 |
@Override
protected void startParsing(final Attributes attrs) throws SAXException
{
final Element element = getElement();
copyElementType(element);
copyAttributes(attrs, element);
} | void function(final Attributes attrs) throws SAXException { final Element element = getElement(); copyElementType(element); copyAttributes(attrs, element); } | /**
* Starts parsing.
*
* @param attrs the attributes.
* @throws org.xml.sax.SAXException if there is a parsing error.
*/ | Starts parsing | startParsing | {
"repo_name": "jvanz/core",
"path": "reportbuilder/java/org/libreoffice/report/pentaho/parser/ElementReadHandler.java",
"license": "gpl-3.0",
"size": 2408
} | [
"org.jfree.report.structure.Element",
"org.xml.sax.Attributes",
"org.xml.sax.SAXException"
] | import org.jfree.report.structure.Element; import org.xml.sax.Attributes; import org.xml.sax.SAXException; | import org.jfree.report.structure.*; import org.xml.sax.*; | [
"org.jfree.report",
"org.xml.sax"
] | org.jfree.report; org.xml.sax; | 1,563,340 |
public CalendarEntry getPayCalEntry();
| CalendarEntry function(); | /**
* The payCalEntry object associated with the TkCalendar
*
* <p>
* payCalEntry of a TkCalendar
* <p>
*
* @return payCalEntry for TkCalendar
*/ | The payCalEntry object associated with the TkCalendar payCalEntry of a TkCalendar | getPayCalEntry | {
"repo_name": "kuali/kpme",
"path": "tk-lm/api/src/main/java/org/kuali/kpme/tklm/api/time/calendar/TkCalendarContract.java",
"license": "apache-2.0",
"size": 2940
} | [
"org.kuali.kpme.core.api.calendar.entry.CalendarEntry"
] | import org.kuali.kpme.core.api.calendar.entry.CalendarEntry; | import org.kuali.kpme.core.api.calendar.entry.*; | [
"org.kuali.kpme"
] | org.kuali.kpme; | 426,700 |
public void setUnderlyingSeniority(String underlyingSeniority) {
JodaBeanUtils.notNull(underlyingSeniority, "underlyingSeniority");
this._underlyingSeniority = underlyingSeniority;
} | void function(String underlyingSeniority) { JodaBeanUtils.notNull(underlyingSeniority, STR); this._underlyingSeniority = underlyingSeniority; } | /**
* Sets the underlyingSeniority.
* @param underlyingSeniority the new value of the property, not null
*/ | Sets the underlyingSeniority | setUnderlyingSeniority | {
"repo_name": "McLeodMoores/starling",
"path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/cds/CDSSecurityBean.java",
"license": "apache-2.0",
"size": 33407
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 2,813,963 |
public Set<QueryTarget> evaluateQuery(QueryExpression expr)
throws QueryException, InterruptedException {
Set<String> targetLiterals = new HashSet<>();
expr.collectTargetPatterns(targetLiterals);
try {
targetPatternEvaluator.preloadTargetPatterns(targetLiterals);
} catch (BuildTargetExcept... | Set<QueryTarget> function(QueryExpression expr) throws QueryException, InterruptedException { Set<String> targetLiterals = new HashSet<>(); expr.collectTargetPatterns(targetLiterals); try { targetPatternEvaluator.preloadTargetPatterns(targetLiterals); } catch (BuildTargetException BuildFileParseException IOException e)... | /**
* Evaluate the specified query expression in this environment.
*
* @return the resulting set of targets.
* @throws QueryException if the evaluation failed.
*/ | Evaluate the specified query expression in this environment | evaluateQuery | {
"repo_name": "dushmis/buck",
"path": "src/com/facebook/buck/cli/BuckQueryEnvironment.java",
"license": "apache-2.0",
"size": 11033
} | [
"com.facebook.buck.json.BuildFileParseException",
"com.facebook.buck.model.BuildTargetException",
"com.facebook.buck.query.QueryException",
"com.facebook.buck.query.QueryExpression",
"com.facebook.buck.query.QueryTarget",
"java.io.IOException",
"java.util.HashSet",
"java.util.Set"
] | import com.facebook.buck.json.BuildFileParseException; import com.facebook.buck.model.BuildTargetException; import com.facebook.buck.query.QueryException; import com.facebook.buck.query.QueryExpression; import com.facebook.buck.query.QueryTarget; import java.io.IOException; import java.util.HashSet; import java.util.Se... | import com.facebook.buck.json.*; import com.facebook.buck.model.*; import com.facebook.buck.query.*; import java.io.*; import java.util.*; | [
"com.facebook.buck",
"java.io",
"java.util"
] | com.facebook.buck; java.io; java.util; | 1,051,241 |
private static void processEvent(SimEvent e) {
int dest, src;
SimEntity dest_ent;
// Update the system's clock
if (e.eventTime() < clock) {
throw new IllegalArgumentException("Past event detected.");
}
clock = e.eventTime();
// Ok now process it
switch (e.getType()) {
case SimEvent.ENULL:
... | static void function(SimEvent e) { int dest, src; SimEntity dest_ent; if (e.eventTime() < clock) { throw new IllegalArgumentException(STR); } clock = e.eventTime(); switch (e.getType()) { case SimEvent.ENULL: throw new IllegalArgumentException(STR); case SimEvent.CREATE: SimEntity newe = (SimEntity) e.getData(); addEnt... | /**
* Processes an event.
*
* @param e the e
*/ | Processes an event | processEvent | {
"repo_name": "asmhmahmud/Bats-Autoscaler",
"path": "AzureSimulator/src/org/cloudbus/cloudsim/core/CloudSim.java",
"license": "gpl-3.0",
"size": 25716
} | [
"org.cloudbus.cloudsim.core.predicates.Predicate"
] | import org.cloudbus.cloudsim.core.predicates.Predicate; | import org.cloudbus.cloudsim.core.predicates.*; | [
"org.cloudbus.cloudsim"
] | org.cloudbus.cloudsim; | 2,731,437 |
public static String generateActivationKey() {
return RandomStringUtils.randomNumeric(DEF_COUNT);
} | static String function() { return RandomStringUtils.randomNumeric(DEF_COUNT); } | /**
* Generates an activation key.
*
* @return the generated activation key
*/ | Generates an activation key | generateActivationKey | {
"repo_name": "GIP-RECIA/esup-publisher-ui",
"path": "src/main/java/org/esupportail/publisher/service/util/RandomUtil.java",
"license": "apache-2.0",
"size": 1403
} | [
"org.apache.commons.lang3.RandomStringUtils"
] | import org.apache.commons.lang3.RandomStringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,043,333 |
Builder controllers(List<ControllerInfo> controllers); | Builder controllers(List<ControllerInfo> controllers); | /**
* Returns bridge description builder with given controllers.
*
* @param controllers set of controllers
* @return bridge description builder
*/ | Returns bridge description builder with given controllers | controllers | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "core/api/src/main/java/org/onosproject/net/behaviour/BridgeDescription.java",
"license": "apache-2.0",
"size": 4911
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,425,797 |
Optional<FocalPoint> parseFocalPointFromParams(Map<String, String[]> parameters); | Optional<FocalPoint> parseFocalPointFromParams(Map<String, String[]> parameters); | /**
* given a list of parameters, this will return an optional focal point from those parameters
*
* @param parameters
* @return
*/ | given a list of parameters, this will return an optional focal point from those parameters | parseFocalPointFromParams | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotmarketing/image/focalpoint/FocalPointAPI.java",
"license": "gpl-3.0",
"size": 1205
} | [
"java.util.Map",
"java.util.Optional"
] | import java.util.Map; import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 2,496,419 |
@Test public void gzipWithRedirectAndConnectionReuse() throws Exception {
server.enqueue(new MockResponse()
.setResponseCode(HttpURLConnection.HTTP_MOVED_TEMP)
.addHeader("Location: /foo")
.addHeader("Content-Encoding: gzip")
.setBody(gzip("Moved! Moved! Moved!")));
server.enqu... | @Test void function() throws Exception { server.enqueue(new MockResponse() .setResponseCode(HttpURLConnection.HTTP_MOVED_TEMP) .addHeader(STR) .addHeader(STR) .setBody(gzip(STR))); server.enqueue(new MockResponse().setBody(STR)); server.play(); HttpURLConnection connection = client.open(server.getUrl("/")); assertConte... | /**
* We had a bug where we weren't closing Gzip streams on redirects.
* https://github.com/square/okhttp/issues/441
*/ | We had a bug where we weren't closing Gzip streams on redirects. HREF | gzipWithRedirectAndConnectionReuse | {
"repo_name": "koush/okhttp",
"path": "okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/URLConnectionTest.java",
"license": "apache-2.0",
"size": 126678
} | [
"com.squareup.okhttp.mockwebserver.MockResponse",
"com.squareup.okhttp.mockwebserver.RecordedRequest",
"java.net.HttpURLConnection",
"org.junit.Assert",
"org.junit.Test"
] | import com.squareup.okhttp.mockwebserver.MockResponse; import com.squareup.okhttp.mockwebserver.RecordedRequest; import java.net.HttpURLConnection; import org.junit.Assert; import org.junit.Test; | import com.squareup.okhttp.mockwebserver.*; import java.net.*; import org.junit.*; | [
"com.squareup.okhttp",
"java.net",
"org.junit"
] | com.squareup.okhttp; java.net; org.junit; | 875,155 |
protected void scanSystemVariable() throws SQLSyntaxErrorException {
if (ch != '@' || sql[curIndex + 1] != '@') throw err("first char must be @@");
offsetCache = curIndex + 2;
sizeCache = 0;
scanChar(2);
if (ch == '`') {
for (++sizeCache;; ++sizeCache) {
... | void function() throws SQLSyntaxErrorException { if (ch != '@' sql[curIndex + 1] != '@') throw err(STR); offsetCache = curIndex + 2; sizeCache = 0; scanChar(2); if (ch == '`') { for (++sizeCache;; ++sizeCache) { if (scanChar() == '`') { ++sizeCache; if (scanChar() != '`') { break; } } } } else { for (; CharTypes.isIden... | /**
* first <code>@@</code> is included
*/ | first <code>@@</code> is included | scanSystemVariable | {
"repo_name": "lostdragon/cobar",
"path": "cobar-parser/src/main/java/com/alibaba/cobar/parser/recognizer/lexer/SQLLexer.java",
"license": "apache-2.0",
"size": 36124
} | [
"com.alibaba.cobar.parser.recognizer.Token",
"java.sql.SQLSyntaxErrorException"
] | import com.alibaba.cobar.parser.recognizer.Token; import java.sql.SQLSyntaxErrorException; | import com.alibaba.cobar.parser.recognizer.*; import java.sql.*; | [
"com.alibaba.cobar",
"java.sql"
] | com.alibaba.cobar; java.sql; | 1,940,633 |
public void update(OrderBookUpdate orderBookUpdate) {
LimitOrder limitOrder = orderBookUpdate.getLimitOrder();
List<LimitOrder> limitOrders = getOrders(limitOrder.getType());
int idx = Collections.binarySearch(limitOrders, limitOrder);
if (idx >= 0) {
limitOrders.remove(idx);
}
... | void function(OrderBookUpdate orderBookUpdate) { LimitOrder limitOrder = orderBookUpdate.getLimitOrder(); List<LimitOrder> limitOrders = getOrders(limitOrder.getType()); int idx = Collections.binarySearch(limitOrders, limitOrder); if (idx >= 0) { limitOrders.remove(idx); } else { idx = -idx - 1; } if (orderBookUpdate.g... | /**
* Given an OrderBookUpdate, it will replace and old matching limit order in
* the orderbook or simply get added. The timeStamp may be updated as well.
*
* @param orderBookUpdate the new OrderBookUpdate
*/ | Given an OrderBookUpdate, it will replace and old matching limit order in the orderbook or simply get added. The timeStamp may be updated as well | update | {
"repo_name": "coingecko/XChange",
"path": "xchange-core/src/main/java/com/xeiam/xchange/dto/marketdata/OrderBook.java",
"license": "mit",
"size": 4716
} | [
"com.xeiam.xchange.dto.trade.LimitOrder",
"java.math.BigDecimal",
"java.util.Collections",
"java.util.List"
] | import com.xeiam.xchange.dto.trade.LimitOrder; import java.math.BigDecimal; import java.util.Collections; import java.util.List; | import com.xeiam.xchange.dto.trade.*; import java.math.*; import java.util.*; | [
"com.xeiam.xchange",
"java.math",
"java.util"
] | com.xeiam.xchange; java.math; java.util; | 281,390 |
public List<RestrictionEntry> getManifestRestrictions(String packageName) {
ApplicationInfo appInfo = null;
try {
appInfo = mContext.getPackageManager().getApplicationInfo(packageName,
PackageManager.GET_META_DATA);
} catch (NameNotFoundException pnfe) {
... | List<RestrictionEntry> function(String packageName) { ApplicationInfo appInfo = null; try { appInfo = mContext.getPackageManager().getApplicationInfo(packageName, PackageManager.GET_META_DATA); } catch (NameNotFoundException pnfe) { throw new IllegalArgumentException(STR + packageName); } if (appInfo == null !appInfo.m... | /**
* Parse and return the list of restrictions defined in the manifest for the specified
* package, if any.
*
* @param packageName The application for which to fetch the restrictions list.
* @return The list of RestrictionEntry objects created from the XML file specified
* in the manifest... | Parse and return the list of restrictions defined in the manifest for the specified package, if any | getManifestRestrictions | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/content/RestrictionsManager.java",
"license": "gpl-3.0",
"size": 30582
} | [
"android.content.pm.ApplicationInfo",
"android.content.pm.PackageManager",
"android.content.res.XmlResourceParser",
"java.util.List"
] | import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.XmlResourceParser; import java.util.List; | import android.content.pm.*; import android.content.res.*; import java.util.*; | [
"android.content",
"java.util"
] | android.content; java.util; | 861,757 |
@SuppressWarnings("unchecked")
private <V> TypeToken<V> resolveClass(Configuration conf, String typeAttr, Class<V> superType) {
Class<? extends V> userClass = conf.getClass(typeAttr, null, superType);
if (userClass == null) {
return null;
}
return (TypeToken<V>) TypeToken.of(userClass).getSup... | @SuppressWarnings(STR) <V> TypeToken<V> function(Configuration conf, String typeAttr, Class<V> superType) { Class<? extends V> userClass = conf.getClass(typeAttr, null, superType); if (userClass == null) { return null; } return (TypeToken<V>) TypeToken.of(userClass).getSupertype(superType); } /** * Sets the output key ... | /**
* Returns a resolved {@link TypeToken} of the given super type by reading a class from the job configuration that
* extends from super type.
*
* @param conf the job configuration
* @param typeAttr The job configuration attribute for getting the user class
* @param superType Super type of the class... | Returns a resolved <code>TypeToken</code> of the given super type by reading a class from the job configuration that extends from super type | resolveClass | {
"repo_name": "chtyim/cdap",
"path": "cdap-app-fabric/src/main/java/co/cask/cdap/internal/app/runtime/batch/MapReduceRuntimeService.java",
"license": "apache-2.0",
"size": 44216
} | [
"com.google.common.collect.Sets",
"com.google.common.reflect.TypeToken",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.mapreduce.Mapper",
"org.apache.hadoop.mapreduce.Reducer"
] | import com.google.common.collect.Sets; import com.google.common.reflect.TypeToken; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; | import com.google.common.collect.*; import com.google.common.reflect.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.mapreduce.*; | [
"com.google.common",
"org.apache.hadoop"
] | com.google.common; org.apache.hadoop; | 656,971 |
@PUT
@Path("/apps/{app-id}/workers/{worker-id}/instances")
public void setWorkerInstances(HttpRequest request, HttpResponder responder,
@PathParam("namespace-id") String namespaceId,
@PathParam("app-id") String appId,
... | @Path(STR) void function(HttpRequest request, HttpResponder responder, @PathParam(STR) String namespaceId, @PathParam(STR) String appId, @PathParam(STR) String workerId) throws ExecutionException, InterruptedException { int instances; try { try { instances = getInstances(request); } catch (IllegalArgumentException e) {... | /**
* Sets the number of instances of a worker.
*/ | Sets the number of instances of a worker | setWorkerInstances | {
"repo_name": "mpouttuclarke/cdap",
"path": "cdap-app-fabric/src/main/java/co/cask/cdap/gateway/handlers/ProgramLifecycleHttpHandler.java",
"license": "apache-2.0",
"size": 69089
} | [
"co.cask.cdap.app.runtime.ProgramRuntimeService",
"co.cask.cdap.internal.app.runtime.ProgramOptionConstants",
"co.cask.cdap.proto.Id",
"co.cask.cdap.proto.ProgramType",
"co.cask.http.HttpResponder",
"com.google.common.collect.ImmutableMap",
"com.google.gson.JsonSyntaxException",
"java.util.concurrent.... | import co.cask.cdap.app.runtime.ProgramRuntimeService; import co.cask.cdap.internal.app.runtime.ProgramOptionConstants; import co.cask.cdap.proto.Id; import co.cask.cdap.proto.ProgramType; import co.cask.http.HttpResponder; import com.google.common.collect.ImmutableMap; import com.google.gson.JsonSyntaxException; impor... | import co.cask.cdap.app.runtime.*; import co.cask.cdap.internal.app.runtime.*; import co.cask.cdap.proto.*; import co.cask.http.*; import com.google.common.collect.*; import com.google.gson.*; import java.util.concurrent.*; import javax.ws.rs.*; import org.jboss.netty.handler.codec.http.*; | [
"co.cask.cdap",
"co.cask.http",
"com.google.common",
"com.google.gson",
"java.util",
"javax.ws",
"org.jboss.netty"
] | co.cask.cdap; co.cask.http; com.google.common; com.google.gson; java.util; javax.ws; org.jboss.netty; | 344,295 |
public boolean conditionSatisfied() {
return ((WhileTask) getIWIRTask()).getCondition().eval();
} | boolean function() { return ((WhileTask) getIWIRTask()).getCondition().eval(); } | /**
* Condition satisfied.
*
* @return true, if successful
*/ | Condition satisfied | conditionSatisfied | {
"repo_name": "CSCSI/Triana",
"path": "triana-shiwaall/src/main/java/org/trianacode/shiwaall/iwir/holders/WhileTaskHolder.java",
"license": "apache-2.0",
"size": 2068
} | [
"org.shiwa.fgi.iwir.WhileTask"
] | import org.shiwa.fgi.iwir.WhileTask; | import org.shiwa.fgi.iwir.*; | [
"org.shiwa.fgi"
] | org.shiwa.fgi; | 1,933,704 |
@Override
public byte[] get(Object key) {
if (!(key instanceof ImmutableBytesPtr)) {
// TODO ... work on type safety
}
ImmutableBytesPtr ikey = (ImmutableBytesPtr)key;
byte[] value = null;
int bucketIndex = getBucketIndex(ikey);
FileMap byteMap = dire... | byte[] function(Object key) { if (!(key instanceof ImmutableBytesPtr)) { } ImmutableBytesPtr ikey = (ImmutableBytesPtr)key; byte[] value = null; int bucketIndex = getBucketIndex(ikey); FileMap byteMap = directory[bucketIndex]; if (directory[curMapBufferIndex].pageIndex != byteMap.pageIndex) { FileMap curByteMap = direc... | /**
* Get a key from the spillable data structures. page is determined via hash partitioning, and a bloomFilter check
* is used to determine if its worth paging in the data.
*/ | Get a key from the spillable data structures. page is determined via hash partitioning, and a bloomFilter check is used to determine if its worth paging in the data | get | {
"repo_name": "ankitsinghal/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/cache/aggcache/SpillMap.java",
"license": "apache-2.0",
"size": 20490
} | [
"org.apache.phoenix.hbase.index.util.ImmutableBytesPtr"
] | import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr; | import org.apache.phoenix.hbase.index.util.*; | [
"org.apache.phoenix"
] | org.apache.phoenix; | 2,507,709 |
private void readName(StringTokenizer line){
StringTokenizer data = new StringTokenizer(line.nextToken(), " = \" ");
data.nextToken();
algorithmName = new String(data.nextToken());
while(data.hasMoreTokens()){
algorithmName += " "+data.nextToken(); //We read the algo... | void function(StringTokenizer line){ StringTokenizer data = new StringTokenizer(line.nextToken(), STR STR "+data.nextToken(); } } | /**
* It reads the name of the algorithm from the configuration file
* @param line StringTokenizer It is the line containing the algorithm name.
*/ | It reads the name of the algorithm from the configuration file | readName | {
"repo_name": "TheMurderer/keel",
"path": "src/keel/Algorithms/Associative_Classification/ClassifierFuzzyFCRA/parseParameters.java",
"license": "gpl-3.0",
"size": 8255
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 2,148,663 |
public AbstractFile getCurrentFile() {
return currentFile;
}
| AbstractFile function() { return currentFile; } | /**
* Returns the file currently being processed.
* @return the file currently being processed.
*/ | Returns the file currently being processed | getCurrentFile | {
"repo_name": "Keltek/mucommander",
"path": "src/main/com/mucommander/job/FileJob.java",
"license": "gpl-3.0",
"size": 33807
} | [
"com.mucommander.commons.file.AbstractFile"
] | import com.mucommander.commons.file.AbstractFile; | import com.mucommander.commons.file.*; | [
"com.mucommander.commons"
] | com.mucommander.commons; | 1,963,165 |
String globalFilter =
System.getProperty("expected-" + serialPropName,
Security.getProperty(serialPropName));
if (globalFilter == null) {
return new Object[0][];
}
String[] patterns = globalFilter.split(";");
Object[][] objects = new O... | String globalFilter = System.getProperty(STR + serialPropName, Security.getProperty(serialPropName)); if (globalFilter == null) { return new Object[0][]; } String[] patterns = globalFilter.split(";"); Object[][] objects = new Object[patterns.length][]; for (int i = 0; i < patterns.length; i++) { Object o; boolean allow... | /**
* DataProvider of patterns and objects derived from the configured process-wide filter.
* @return Array of arrays of pattern, object, allowed boolean, and API factory
*/ | DataProvider of patterns and objects derived from the configured process-wide filter | globalPatternElements | {
"repo_name": "JetBrains/jdk8u_jdk",
"path": "test/java/io/Serializable/serialFilter/GlobalFilterTest.java",
"license": "gpl-2.0",
"size": 9654
} | [
"java.security.Security",
"org.testng.Assert"
] | import java.security.Security; import org.testng.Assert; | import java.security.*; import org.testng.*; | [
"java.security",
"org.testng"
] | java.security; org.testng; | 534,175 |
protected final boolean hasChainedCommand(SMBSrvPacket pkt) {
// Determine if the command code is an AndX command
int cmd = pkt.getCommand();
if (cmd == PacketType.SessionSetupAndX
|| cmd == PacketType.TreeConnectAndX
|| cmd == PacketType.OpenAndX
|| cmd == PacketType.WriteAndX
... | final boolean function(SMBSrvPacket pkt) { int cmd = pkt.getCommand(); if (cmd == PacketType.SessionSetupAndX cmd == PacketType.TreeConnectAndX cmd == PacketType.OpenAndX cmd == PacketType.WriteAndX cmd == PacketType.ReadAndX cmd == PacketType.LogoffAndX cmd == PacketType.LockingAndX cmd == PacketType.NTCreateAndX) { r... | /**
* Determine if the request is a chained (AndX) type command and there is a chained
* command in this request.
*
* @param pkt SMBSrvPacket
* @return true if there is a chained request to be handled, else false.
*/ | Determine if the request is a chained (AndX) type command and there is a chained command in this request | hasChainedCommand | {
"repo_name": "arcusys/Liferay-CIFS",
"path": "source/java/org/alfresco/jlan/smb/server/ProtocolHandler.java",
"license": "gpl-3.0",
"size": 6024
} | [
"org.alfresco.jlan.smb.PacketType"
] | import org.alfresco.jlan.smb.PacketType; | import org.alfresco.jlan.smb.*; | [
"org.alfresco.jlan"
] | org.alfresco.jlan; | 663,598 |
@Test
void testWritePDF()
{
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
int index = 0;
try
{
for (int i = -1000; i < 3000; i += 200)
{
index = i;
COSInteger cosInt = COSInteger.get(i);
... | void testWritePDF() { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); int index = 0; try { for (int i = -1000; i < 3000; i += 200) { index = i; COSInteger cosInt = COSInteger.get(i); cosInt.writePDF(outStream); testByteArrays(String.valueOf(i).getBytes(StandardCharsets.ISO_8859_1), outStream.toByteArray(... | /**
* Tests writePDF() - this method takes an {@link java.io.OutputStream} and writes this object to it.
*/ | Tests writePDF() - this method takes an <code>java.io.OutputStream</code> and writes this object to it | testWritePDF | {
"repo_name": "kalaspuffar/pdfbox",
"path": "pdfbox/src/test/java/org/apache/pdfbox/cos/TestCOSInteger.java",
"license": "apache-2.0",
"size": 5279
} | [
"java.io.ByteArrayOutputStream",
"java.nio.charset.StandardCharsets",
"org.junit.jupiter.api.Assertions"
] | import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; import org.junit.jupiter.api.Assertions; | import java.io.*; import java.nio.charset.*; import org.junit.jupiter.api.*; | [
"java.io",
"java.nio",
"org.junit.jupiter"
] | java.io; java.nio; org.junit.jupiter; | 1,800,076 |
@Test
public void testProducerReadNoFilterAlreadySeen() throws Exception {
final Map<String, Object> headers = new HashMap<>();
String endpoint = "direct:read-people-nofilterseen";
int expectedMsgCount = 3;
MockEndpoint mockEndpoint = getMockEndpoint("mock:producer-noalreadyseen... | void function() throws Exception { final Map<String, Object> headers = new HashMap<>(); String endpoint = STR; int expectedMsgCount = 3; MockEndpoint mockEndpoint = getMockEndpoint(STR); mockEndpoint.expectedMessageCount(expectedMsgCount); int expectedEntities = -1; for (int i = 0; i < expectedMsgCount; ++i) { final OD... | /**
* Read entity set of the People object and with no filter already seen, all
* items should be present in each message
*
* @throws Exception
*/ | Read entity set of the People object and with no filter already seen, all items should be present in each message | testProducerReadNoFilterAlreadySeen | {
"repo_name": "punkhorn/camel-upstream",
"path": "components/camel-olingo2/camel-olingo2-component/src/test/java/org/apache/camel/component/olingo2/Olingo2ComponentTest.java",
"license": "apache-2.0",
"size": 19595
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.camel.component.mock.MockEndpoint",
"org.apache.olingo.odata2.api.ep.feed.ODataFeed"
] | import java.util.HashMap; import java.util.Map; import org.apache.camel.component.mock.MockEndpoint; import org.apache.olingo.odata2.api.ep.feed.ODataFeed; | import java.util.*; import org.apache.camel.component.mock.*; import org.apache.olingo.odata2.api.ep.feed.*; | [
"java.util",
"org.apache.camel",
"org.apache.olingo"
] | java.util; org.apache.camel; org.apache.olingo; | 2,171,993 |
public void removeCommit(@Nonnull Revision r) {
checkArgument(checkNotNull(r).isBranch(), "Not a branch revision: %s", r);
commits.remove(r);
} | void function(@Nonnull Revision r) { checkArgument(checkNotNull(r).isBranch(), STR, r); commits.remove(r); } | /**
* Removes the commit with the given revision <code>r</code>. Does nothing
* if there is no such commit.
*
* @param r the revision of the commit to remove.
* @throws IllegalArgumentException if r is not a branch revision.
*/ | Removes the commit with the given revision <code>r</code>. Does nothing if there is no such commit | removeCommit | {
"repo_name": "davidegiannella/jackrabbit-oak",
"path": "oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Branch.java",
"license": "apache-2.0",
"size": 15477
} | [
"com.google.common.base.Preconditions",
"javax.annotation.Nonnull"
] | import com.google.common.base.Preconditions; import javax.annotation.Nonnull; | import com.google.common.base.*; import javax.annotation.*; | [
"com.google.common",
"javax.annotation"
] | com.google.common; javax.annotation; | 261,129 |
public static boolean pvalMatches(List<String> partial, List<String> full) {
if(partial.size() > full.size()) {
return false;
}
Iterator<String> p = partial.iterator();
Iterator<String> f = full.iterator();
while(p.hasNext()) {
String pval = p.next();
String fval = f.next();
... | static boolean function(List<String> partial, List<String> full) { if(partial.size() > full.size()) { return false; } Iterator<String> p = partial.iterator(); Iterator<String> f = full.iterator(); while(p.hasNext()) { String pval = p.next(); String fval = f.next(); if (pval.length() != 0 && !pval.equals(fval)) { return... | /**
* Returns true if partial has the same values as full for all values that
* aren't empty in partial.
*/ | Returns true if partial has the same values as full for all values that aren't empty in partial | pvalMatches | {
"repo_name": "scalingdata/Impala",
"path": "thirdparty/hive-1.2.1.2.3.0.0-2557/src/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java",
"license": "apache-2.0",
"size": 62064
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 666,448 |
public static ImageIcon getImageIcon(String fileName) {
String imagePackage = getImagePackage();
ImageIcon imageIcon=null;
try {
imageIcon = new ImageIcon(BundleHelper.class.getResource((imagePackage + fileName)));
} catch (Exception err) {
System.err.println("Error while searching for image file... | static ImageIcon function(String fileName) { String imagePackage = getImagePackage(); ImageIcon imageIcon=null; try { imageIcon = new ImageIcon(BundleHelper.class.getResource((imagePackage + fileName))); } catch (Exception err) { System.err.println(STR + fileName + STR + imagePackage); err.printStackTrace(); } return i... | /**
* Gets the image icon for the specified image.
*
* @param fileName the file name
* @return the image icon
*/ | Gets the image icon for the specified image | getImageIcon | {
"repo_name": "EnFlexIT/AgentWorkbench",
"path": "eclipseProjects/org.agentgui/bundles/de.enflexit.common/src/de/enflexit/common/BundleHelper.java",
"license": "lgpl-2.1",
"size": 1056
} | [
"javax.swing.ImageIcon"
] | import javax.swing.ImageIcon; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,746,220 |
private void createAreaInProcess(String processId, String areaId, OspfArea area) {
Set<String> interfaceIpList = new HashSet<>();
Set<String> areaIdList = new HashSet<>();
Iterator<OspfProcess> processItr = processes.iterator();
while (processItr.hasNext()) {
OspfProcess... | void function(String processId, String areaId, OspfArea area) { Set<String> interfaceIpList = new HashSet<>(); Set<String> areaIdList = new HashSet<>(); Iterator<OspfProcess> processItr = processes.iterator(); while (processItr.hasNext()) { OspfProcess process = processItr.next(); List<OspfArea> areasInProcess = proces... | /**
* Creates a new area information in the process.
*
* @param processId process id
* @param areaId area id
* @param area OSPF area instance
*/ | Creates a new area information in the process | createAreaInProcess | {
"repo_name": "Phaneendra-Huawei/demo",
"path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/Controller.java",
"license": "apache-2.0",
"size": 33295
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.List",
"java.util.Set",
"org.onosproject.ospf.controller.OspfArea",
"org.onosproject.ospf.controller.OspfInterface",
"org.onosproject.ospf.controller.OspfProcess"
] | import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.onosproject.ospf.controller.OspfArea; import org.onosproject.ospf.controller.OspfInterface; import org.onosproject.ospf.controller.OspfProcess; | import java.util.*; import org.onosproject.ospf.controller.*; | [
"java.util",
"org.onosproject.ospf"
] | java.util; org.onosproject.ospf; | 2,447,604 |
public Method getMethod() {
return method;
} | Method function() { return method; } | /**
* Gets intercepted method that annotated with caching annotation.
*
* @return method
*/ | Gets intercepted method that annotated with caching annotation | getMethod | {
"repo_name": "gorcz/Hystrix",
"path": "hystrix-contrib/hystrix-javanica/src/main/java/com/netflix/hystrix/contrib/javanica/cache/CacheInvocationContext.java",
"license": "apache-2.0",
"size": 6891
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,119,776 |
public int getLinesChanged() throws IOException {
populate();
return stats.total;
} | int function() throws IOException { populate(); return stats.total; } | /**
* Number of lines added + removed.
*/ | Number of lines added + removed | getLinesChanged | {
"repo_name": "Shredder121/github-api",
"path": "src/main/java/org/kohsuke/github/GHCommit.java",
"license": "mit",
"size": 10886
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,922,933 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.