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
private void checkIfLandHasChildren() { for (ILand child : land.getChildren()) { coll.add(new CollisionsEntry(LandError.HAS_CHILDREN, child, 0)); } }
void function() { for (ILand child : land.getChildren()) { coll.add(new CollisionsEntry(LandError.HAS_CHILDREN, child, 0)); } }
/** * Check if land has children. */
Check if land has children
checkIfLandHasChildren
{ "repo_name": "Tabinol/Factoid", "path": "src/main/java/me/tabinol/factoid/lands/collisions/Collisions.java", "license": "gpl-3.0", "size": 12464 }
[ "me.tabinol.factoidapi.lands.ILand" ]
import me.tabinol.factoidapi.lands.ILand;
import me.tabinol.factoidapi.lands.*;
[ "me.tabinol.factoidapi" ]
me.tabinol.factoidapi;
1,472,680
public AutoscaleSettingResourceInner withProfiles(List<AutoscaleProfile> profiles) { this.profiles = profiles; return this; }
AutoscaleSettingResourceInner function(List<AutoscaleProfile> profiles) { this.profiles = profiles; return this; }
/** * Set the profiles value. * * @param profiles the profiles value to set * @return the AutoscaleSettingResourceInner object itself. */
Set the profiles value
withProfiles
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/implementation/AutoscaleSettingResourceInner.java", "license": "mit", "size": 4503 }
[ "com.microsoft.azure.management.monitor.AutoscaleProfile", "java.util.List" ]
import com.microsoft.azure.management.monitor.AutoscaleProfile; import java.util.List;
import com.microsoft.azure.management.monitor.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
1,274,514
@Test public void toFilesRename_AllowOverwrite_MultipleFiles_AllOutputFilesDoNotExist() throws IOException { // set up File sourceFile = new File("src/test/resources/Thumbnailator/grid.png"); Rename rename = Rename.PREFIX_DOT_THUMBNAIL; File originalFile1 = TestUtils.createTempFile(TMPDIR, "png...
void function() throws IOException { File sourceFile = new File(STR); Rename rename = Rename.PREFIX_DOT_THUMBNAIL; File originalFile1 = TestUtils.createTempFile(TMPDIR, "png"); File originalFile2 = TestUtils.createTempFile(TMPDIR, "png"); File fileThatDoesntExist1 = makeRenamedFile(originalFile1, rename); File fileThat...
/** * Test for the {@link Thumbnails.Builder} class where, * <ol> * <li>the two argument toFiles(Rename) is called</li> * <li>allowOverwrite is true</li> * <li>multiple files are specified</li> * <li>all of the output files do not exist</li> * </ol> * and the expected outcome is, * <ol> * ...
Test for the <code>Thumbnails.Builder</code> class where, the two argument toFiles(Rename) is called allowOverwrite is true multiple files are specified all of the output files do not exist and the expected outcome is, The destination file is overwritten
toFilesRename_AllowOverwrite_MultipleFiles_AllOutputFilesDoNotExist
{ "repo_name": "passerby4j/thumbnailator", "path": "src/test/java/net/coobird/thumbnailator/ThumbnailsBuilderInputOutputTest.java", "license": "mit", "size": 303967 }
[ "java.io.File", "java.io.IOException", "net.coobird.thumbnailator.name.Rename", "org.junit.Assert" ]
import java.io.File; import java.io.IOException; import net.coobird.thumbnailator.name.Rename; import org.junit.Assert;
import java.io.*; import net.coobird.thumbnailator.name.*; import org.junit.*;
[ "java.io", "net.coobird.thumbnailator", "org.junit" ]
java.io; net.coobird.thumbnailator; org.junit;
272,400
@GuardedBy("workerInfo") private void processWorkerRemovedBlocks(MasterWorkerInfo workerInfo, Collection<Long> removedBlockIds) { for (long removedBlockId : removedBlockIds) { MasterBlockInfo block = mBlocks.get(removedBlockId); // TODO(calvin): Investigate if this branching logic can be simpl...
@GuardedBy(STR) void function(MasterWorkerInfo workerInfo, Collection<Long> removedBlockIds) { for (long removedBlockId : removedBlockIds) { MasterBlockInfo block = mBlocks.get(removedBlockId); if (block == null) { workerInfo.removeBlock(removedBlockId); continue; } synchronized (block) { LOG.info(STR, removedBlockId, ...
/** * Updates the worker and block metadata for blocks removed from a worker. * * @param workerInfo The worker metadata object * @param removedBlockIds A list of block ids removed from the worker */
Updates the worker and block metadata for blocks removed from a worker
processWorkerRemovedBlocks
{ "repo_name": "jswudi/alluxio", "path": "core/server/master/src/main/java/alluxio/master/block/DefaultBlockMaster.java", "license": "apache-2.0", "size": 32846 }
[ "java.util.Collection", "javax.annotation.concurrent.GuardedBy" ]
import java.util.Collection; import javax.annotation.concurrent.GuardedBy;
import java.util.*; import javax.annotation.concurrent.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
382,215
public final Property<ViewProcessor> viewProcessor() { return metaBean().viewProcessor().createProperty(this); }
final Property<ViewProcessor> function() { return metaBean().viewProcessor().createProperty(this); }
/** * Gets the the {@code viewProcessor} property. * @return the property, not null */
Gets the the viewProcessor property
viewProcessor
{ "repo_name": "McLeodMoores/starling", "path": "projects/starling-client/src/main/java/com/mcleodmoores/starling/client/component/AnalyticServiceComponentFactory.java", "license": "apache-2.0", "size": 13638 }
[ "com.opengamma.engine.view.ViewProcessor", "org.joda.beans.Property" ]
import com.opengamma.engine.view.ViewProcessor; import org.joda.beans.Property;
import com.opengamma.engine.view.*; import org.joda.beans.*;
[ "com.opengamma.engine", "org.joda.beans" ]
com.opengamma.engine; org.joda.beans;
2,623,158
public String getArticleNameForId(int id) throws MediaWikiAPIException { Iterator<String> result = queryListResult( new BasicNameValuePair[] { new BasicNameValuePair("prop", "info"), new BasicNameValuePair("pageids", "" + id) }, "page", "title").iterator(); if (result.hasNext()) { return result.next(); ...
String function(int id) throws MediaWikiAPIException { Iterator<String> result = queryListResult( new BasicNameValuePair[] { new BasicNameValuePair("propSTRinfo"), new BasicNameValuePair(STR, STRpageSTRtitle").iterator(); if (result.hasNext()) { return result.next(); } return null; }
/** * Returns the article name for an article ID or null if no such article * exists. * * @param id * an article id. * @return the article name for the given article ID or null if no such * article exists. * @throws MediaWikiAPIException */
Returns the article name for an article ID or null if no such article exists
getArticleNameForId
{ "repo_name": "ag-csw/ExpertFinder", "path": "src-mediawiki/de/csw/expertfinder/mediawiki/api/MediaWikiAPI.java", "license": "lgpl-3.0", "size": 34668 }
[ "java.util.Iterator", "org.apache.http.message.BasicNameValuePair" ]
import java.util.Iterator; import org.apache.http.message.BasicNameValuePair;
import java.util.*; import org.apache.http.message.*;
[ "java.util", "org.apache.http" ]
java.util; org.apache.http;
1,588,288
public static Optional<String> showInputDialog(final Object message, final Object initialSelectionValue) { return Optional.ofNullable(JOptionPane.showInputDialog(message, initialSelectionValue)); } /** * Shows a question-message dialog requesting input from the user parented to {@code parentCo...
static Optional<String> function(final Object message, final Object initialSelectionValue) { return Optional.ofNullable(JOptionPane.showInputDialog(message, initialSelectionValue)); } /** * Shows a question-message dialog requesting input from the user parented to {@code parentComponent}. * The dialog is displayed on t...
/** * Shows a question-message dialog requesting input from the user, with the input value initialized to {@code initialSelectionValue}. * The dialog uses the default frame, which usually means it is centered on the screen. * * @param message the {@code Object} to display * @param...
Shows a question-message dialog requesting input from the user, with the input value initialized to initialSelectionValue. The dialog uses the default frame, which usually means it is centered on the screen
showInputDialog
{ "repo_name": "nelkinda/japi", "path": "swing/library/src/main/java/com/nelkinda/javax/swing/JOptionPane2.java", "license": "lgpl-3.0", "size": 11789 }
[ "java.awt.Component", "java.awt.HeadlessException", "java.util.Optional", "javax.swing.JOptionPane" ]
import java.awt.Component; import java.awt.HeadlessException; import java.util.Optional; import javax.swing.JOptionPane;
import java.awt.*; import java.util.*; import javax.swing.*;
[ "java.awt", "java.util", "javax.swing" ]
java.awt; java.util; javax.swing;
410,049
private ExitCode checkCwdInWorkspace(EventHandler eventHandler) { if (!commandAnnotation.mustRunInWorkspace()) { return ExitCode.SUCCESS; } if (!workspace.getDirectories().inWorkspace()) { eventHandler.handle( Event.error( "The '" + commandAnnotation....
ExitCode function(EventHandler eventHandler) { if (!commandAnnotation.mustRunInWorkspace()) { return ExitCode.SUCCESS; } if (!workspace.getDirectories().inWorkspace()) { eventHandler.handle( Event.error( STR + commandAnnotation.name() + STR + STR + STR + STR STR does not currently work properly from paths STRcontaining...
/** * Only some commands work if cwd != workspaceSuffix in Blaze. In that case, also check if Blaze * was called from the output directory and fail if it was. */
Only some commands work if cwd != workspaceSuffix in Blaze. In that case, also check if Blaze was called from the output directory and fail if it was
checkCwdInWorkspace
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeOptionHandler.java", "license": "apache-2.0", "size": 28323 }
[ "com.google.devtools.build.lib.events.Event", "com.google.devtools.build.lib.events.EventHandler", "com.google.devtools.build.lib.util.ExitCode" ]
import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.util.*;
[ "com.google.devtools" ]
com.google.devtools;
1,797,225
Index index = readIndex(indexId); long position = (long) index.getId() * SECTOR_HEADER_SIZE; Preconditions.checkArgument(sectorChannel.size() >= position + SECTOR_SIZE); byte[] data = new byte[index.getLength()]; int next = index.getId(); int offset = 0; for (int chunk = 0; offset < index.getLength(); ...
Index index = readIndex(indexId); long position = (long) index.getId() * SECTOR_HEADER_SIZE; Preconditions.checkArgument(sectorChannel.size() >= position + SECTOR_SIZE); byte[] data = new byte[index.getLength()]; int next = index.getId(); int offset = 0; for (int chunk = 0; offset < index.getLength(); chunk++) { int re...
/** * Gets a {@link ByteBuffer} of data within this cache for the specified index id. * * @param indexId The file id to get. * @return A wrapped byte buffer of the specified files data, never {@code null}. * @throws IOException If some I/O exception occurs. */
Gets a <code>ByteBuffer</code> of data within this cache for the specified index id
get
{ "repo_name": "atomicint/brandywine", "path": "src/main/java/me/ryleykimmel/brandywine/fs/Cache.java", "license": "gpl-2.0", "size": 5155 }
[ "com.google.common.base.Preconditions", "java.nio.ByteBuffer" ]
import com.google.common.base.Preconditions; import java.nio.ByteBuffer;
import com.google.common.base.*; import java.nio.*;
[ "com.google.common", "java.nio" ]
com.google.common; java.nio;
2,361,092
void connect(String dataSource, String username, String password) throws SQLException;
void connect(String dataSource, String username, String password) throws SQLException;
/** * Connects to the database using a default database for the user. * * @param dataSource * Host (optionally port), machine name or any other data source * identifier */
Connects to the database using a default database for the user
connect
{ "repo_name": "dbfit/dbfit", "path": "dbfit-java/core/src/main/java/dbfit/api/DBEnvironment.java", "license": "gpl-2.0", "size": 6884 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
399,265
public void addAll(Collection<Role> roles);
void function(Collection<Role> roles);
/** * <p> * Adds all specified roles to the role group. * </p> * * @param roles the list of roles to be added. */
Adds all specified roles to the role group.
addAll
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/picketbox/org/jboss/security/identity/RoleGroup.java", "license": "gpl-2.0", "size": 2542 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
409,740
@Test void testSubQueryValues() { final String sql = "select deptno\n" + "from EMP\n" + "where deptno > (values 10)"; sql(sql).ok(); }
@Test void testSubQueryValues() { final String sql = STR + STR + STR; sql(sql).ok(); }
/** * Test case for * <a href="https://issues.apache.org/jira/browse/CALCITE-695">[CALCITE-695] * SqlSingleValueAggFunction is created when it may not be needed</a>. */
Test case for [CALCITE-695] SqlSingleValueAggFunction is created when it may not be needed
testSubQueryValues
{ "repo_name": "vlsi/calcite", "path": "core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java", "license": "apache-2.0", "size": 133510 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
2,451,881
public OffsetDateTime lastConnectTime() { return this.lastConnectTime; }
OffsetDateTime function() { return this.lastConnectTime; }
/** * Get the lastConnectTime property: The most recent time at which the integration runtime was connected in ISO8601 * format. * * @return the lastConnectTime value. */
Get the lastConnectTime property: The most recent time at which the integration runtime was connected in ISO8601 format
lastConnectTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeNodeInner.java", "license": "mit", "size": 10595 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,898,637
private void writeBingSearchRanksAsTSVForInchiChunk(Set<String> inchis, String outputPath, Boolean appendOutput) throws IOException { // Define headers List<String> bingRankerHeaderFields = new ArrayList<>(); addChemicalHeaders(bingRankerHeaderFields); // Open TSV writer try(TSVWriter<Stri...
void function(Set<String> inchis, String outputPath, Boolean appendOutput) throws IOException { List<String> bingRankerHeaderFields = new ArrayList<>(); addChemicalHeaders(bingRankerHeaderFields); try(TSVWriter<String, String> tsvWriter = new TSVWriter<>(bingRankerHeaderFields)) { tsvWriter.open(new File(outputPath), a...
/** * This function writes the Bing Search ranks for a chunk of inchis in a TSV file, append only option. * @param inchis (Set<String>) set of InChI string representations * @param outputPath (String) path indicating the output file * @param appendOutput (Boolean) whether to append the results to the output...
This function writes the Bing Search ranks for a chunk of inchis in a TSV file, append only option
writeBingSearchRanksAsTSVForInchiChunk
{ "repo_name": "20n/act", "path": "reachables/src/main/java/act/installer/bing/BingSearchRanker.java", "license": "gpl-3.0", "size": 23338 }
[ "com.act.utils.TSVWriter", "com.mongodb.BasicDBObject", "com.mongodb.DBCursor", "java.io.File", "java.io.IOException", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Set" ]
import com.act.utils.TSVWriter; import com.mongodb.BasicDBObject; import com.mongodb.DBCursor; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set;
import com.act.utils.*; import com.mongodb.*; import java.io.*; import java.util.*;
[ "com.act.utils", "com.mongodb", "java.io", "java.util" ]
com.act.utils; com.mongodb; java.io; java.util;
2,593,842
public void setTextLocale(Locale locale) { mLocaleChanged = true; mTextPaint.setTextLocale(locale); }
void function(Locale locale) { mLocaleChanged = true; mTextPaint.setTextLocale(locale); }
/** * Set the default {@link Locale} of the text in this TextView to the given value. This value * is used to choose appropriate typefaces for ambiguous characters. Typically used for CJK * locales to disambiguate Hanzi/Kanji/Hanja characters. * * @param locale the {@link Locale} for drawing te...
Set the default <code>Locale</code> of the text in this TextView to the given value. This value is used to choose appropriate typefaces for ambiguous characters. Typically used for CJK locales to disambiguate Hanzi/Kanji/Hanja characters
setTextLocale
{ "repo_name": "OmniEvo/android_frameworks_base", "path": "core/java/android/widget/TextView.java", "license": "gpl-3.0", "size": 380764 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,627,196
private void setScreenName(String screenName) { if (TextUtils.equals(mScreenName, screenName)) return; mScreenName = screenName; onScreenNameChanged(); }
void function(String screenName) { if (TextUtils.equals(mScreenName, screenName)) return; mScreenName = screenName; onScreenNameChanged(); }
/** * Sets the name to display for the device. */
Sets the name to display for the device
setScreenName
{ "repo_name": "CapOM/ChromiumGStreamerBackend", "path": "chrome/android/java/src/org/chromium/chrome/browser/media/remote/ExpandedControllerActivity.java", "license": "bsd-3-clause", "size": 12306 }
[ "android.text.TextUtils" ]
import android.text.TextUtils;
import android.text.*;
[ "android.text" ]
android.text;
2,551,717
@Test public void fromFilesIterable_Single_toFile() throws IOException { // given File f = new File("src/test/resources/Thumbnailator/grid.png"); File outFile = new File("src/test/resources/Thumbnailator/grid.tmp.png"); outFile.deleteOnExit(); // when Thumbnails.fromFiles((Iterable<File>)...
void function() throws IOException { File f = new File(STR); File outFile = new File(STR); outFile.deleteOnExit(); Thumbnails.fromFiles((Iterable<File>)Arrays.asList(f)) .size(50, 50) .toFile(outFile); BufferedImage fromFileImage = ImageIO.read(outFile); assertEquals(50, fromFileImage.getWidth()); assertEquals(50, from...
/** * Test for the {@link Thumbnails.Builder} class where, * <ol> * <li>Thumbnails.fromFiles(Iterable[File])</li> * <li>toFile(File)</li> * </ol> * and the expected outcome is, * <ol> * <li>An image is written to the specified file.</li> * </ol> * @throws IOException */
Test for the <code>Thumbnails.Builder</code> class where, Thumbnails.fromFiles(Iterable[File]) toFile(File) and the expected outcome is, An image is written to the specified file.
fromFilesIterable_Single_toFile
{ "repo_name": "passerby4j/thumbnailator", "path": "src/test/java/net/coobird/thumbnailator/ThumbnailsBuilderInputOutputTest.java", "license": "mit", "size": 303967 }
[ "java.awt.image.BufferedImage", "java.io.File", "java.io.IOException", "java.util.Arrays", "javax.imageio.ImageIO", "org.junit.Assert" ]
import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.Arrays; import javax.imageio.ImageIO; import org.junit.Assert;
import java.awt.image.*; import java.io.*; import java.util.*; import javax.imageio.*; import org.junit.*;
[ "java.awt", "java.io", "java.util", "javax.imageio", "org.junit" ]
java.awt; java.io; java.util; javax.imageio; org.junit;
272,282
public void init() { Log.d(TAG, "Init Web Server"); }
void function() { Log.d(TAG, STR); }
/** * Used to initialize and customize the server. */
Used to initialize and customize the server
init
{ "repo_name": "tonyconstantinides/LiveMultimedia", "path": "app/src/main/java/com/constantinnovationsinc/livemultimedia/servers/SimpleWebServer.java", "license": "apache-2.0", "size": 22508 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
692,290
private static void classParameterIsNotNull(Class<?> clazz) { checkNotNull(clazz, "The class to compare actual with should not be null"); }
static void function(Class<?> clazz) { checkNotNull(clazz, STR); }
/** * used to check that the class to compare is not null, in that case throws a {@link NullPointerException} with an * explicit message. * * @param clazz the date to check * @throws NullPointerException with an explicit message if the given class is null */
used to check that the class to compare is not null, in that case throws a <code>NullPointerException</code> with an explicit message
classParameterIsNotNull
{ "repo_name": "xasx/assertj-core", "path": "src/main/java/org/assertj/core/internal/Classes.java", "license": "apache-2.0", "size": 23773 }
[ "org.assertj.core.util.Preconditions" ]
import org.assertj.core.util.Preconditions;
import org.assertj.core.util.*;
[ "org.assertj.core" ]
org.assertj.core;
2,590,229
public static void apiManagementHeadDelegationSettings( com.azure.resourcemanager.apimanagement.ApiManagementManager manager) { manager.delegationSettings().getEntityTagWithResponse("rg1", "apimService1", Context.NONE); }
static void function( com.azure.resourcemanager.apimanagement.ApiManagementManager manager) { manager.delegationSettings().getEntityTagWithResponse("rg1", STR, Context.NONE); }
/** * Sample code: ApiManagementHeadDelegationSettings. * * @param manager Entry point to ApiManagementManager. */
Sample code: ApiManagementHeadDelegationSettings
apiManagementHeadDelegationSettings
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/samples/java/com/azure/resourcemanager/apimanagement/DelegationSettingsGetEntityTagSamples.java", "license": "mit", "size": 898 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
132,626
public CppLinkActionBuilder setInterfaceOutput(Artifact interfaceOutput) { this.interfaceOutput = interfaceOutput; return this; }
CppLinkActionBuilder function(Artifact interfaceOutput) { this.interfaceOutput = interfaceOutput; return this; }
/** * Sets the interface output of the link. A non-null argument can only be provided if the link * type is {@code DYNAMIC_LIBRARY} and fake is false. */
Sets the interface output of the link. A non-null argument can only be provided if the link type is DYNAMIC_LIBRARY and fake is false
setInterfaceOutput
{ "repo_name": "mrdomino/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java", "license": "apache-2.0", "size": 63537 }
[ "com.google.devtools.build.lib.actions.Artifact" ]
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
2,577,978
@Bean(initMethod = "", destroyMethod = "") // Camel handles the lifecycle of this bean @ConditionalOnMissingBean(ProducerTemplate.class) ProducerTemplate producerTemplate(CamelContext camelContext, CamelConfigurationProperties config) { return camelContext.c...
@Bean(initMethod = STR") @ConditionalOnMissingBean(ProducerTemplate.class) ProducerTemplate producerTemplate(CamelContext camelContext, CamelConfigurationProperties config) { return camelContext.createProducerTemplate(config.getProducerTemplateCacheSize()); }
/** * Default producer template for the bootstrapped Camel context. */
Default producer template for the bootstrapped Camel context
producerTemplate
{ "repo_name": "arnaud-deprez/camel", "path": "components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java", "license": "apache-2.0", "size": 6470 }
[ "org.apache.camel.CamelContext", "org.apache.camel.ProducerTemplate", "org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean", "org.springframework.context.annotation.Bean" ]
import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean;
import org.apache.camel.*; import org.springframework.boot.autoconfigure.condition.*; import org.springframework.context.annotation.*;
[ "org.apache.camel", "org.springframework.boot", "org.springframework.context" ]
org.apache.camel; org.springframework.boot; org.springframework.context;
1,845,898
public static Set<String> getOutputEntryNames(List<SignerConfig> signerConfigs) { Set<String> result = new HashSet<>(2 * signerConfigs.size() + 1); for (SignerConfig signerConfig : signerConfigs) { String signerName = signerConfig.name; result.add("META-INF/" + signerName + "...
static Set<String> function(List<SignerConfig> signerConfigs) { Set<String> result = new HashSet<>(2 * signerConfigs.size() + 1); for (SignerConfig signerConfig : signerConfigs) { String signerName = signerConfig.name; result.add(STR + signerName + ".SF"); PublicKey publicKey = signerConfig.certificates.get(0).getPubli...
/** * Returns the names of JAR entries which this signer will produce as part of v1 signature. */
Returns the names of JAR entries which this signer will produce as part of v1 signature
getOutputEntryNames
{ "repo_name": "bihe0832/AndroidGetAPKInfo", "path": "apksig/src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java", "license": "apache-2.0", "size": 28879 }
[ "java.security.PublicKey", "java.util.HashSet", "java.util.List", "java.util.Locale", "java.util.Set" ]
import java.security.PublicKey; import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Set;
import java.security.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
122,837
private boolean verify(Text key, Value value, boolean historical, long timestamp) { // NOTE: locking happens in super.get() methods return historical ? get(key, timestamp).contains(value) : get(key) .contains(value); }
boolean function(Text key, Value value, boolean historical, long timestamp) { return historical ? get(key, timestamp).contains(value) : get(key) .contains(value); }
/** * Return {@code true} if {@code value} <em>currently</em> exists in the * field mapped from {@code key} or existed in that field at * {@code timestamp} if {@code historical} is {@code true}. * * @param key * @param value * @param historical - if {@code true}, read from the histor...
Return true if value currently exists in the field mapped from key or existed in that field at timestamp if historical is true
verify
{ "repo_name": "mAzurkovic/concourse", "path": "concourse-server/src/main/java/org/cinchapi/concourse/server/storage/db/PrimaryRecord.java", "license": "apache-2.0", "size": 6730 }
[ "org.cinchapi.concourse.server.model.Text", "org.cinchapi.concourse.server.model.Value" ]
import org.cinchapi.concourse.server.model.Text; import org.cinchapi.concourse.server.model.Value;
import org.cinchapi.concourse.server.model.*;
[ "org.cinchapi.concourse" ]
org.cinchapi.concourse;
2,571,741
RequestCallback submit(List<Request> commands, SecurityContext ctx) throws ProcessException, DSOutOfServiceException, DSAccessException { try { return new RequestCallback(gw.submit(ctx, commands, null)); } catch (Throwable e) { handleException(e, "Cannot execute the command."); // Never reached th...
RequestCallback submit(List<Request> commands, SecurityContext ctx) throws ProcessException, DSOutOfServiceException, DSAccessException { try { return new RequestCallback(gw.submit(ctx, commands, null)); } catch (Throwable e) { handleException(e, STR); throw new ProcessException(STR, e); } }
/** * Executes the commands. * * @param commands The commands to execute. * @param ctx The security context. * @return See above. * @throws ProcessException If an error occurred while running the script. * @throws DSOutOfServiceException If the connection is broken, or logged in * @throws DSAccessExcept...
Executes the commands
submit
{ "repo_name": "dominikl/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java", "license": "gpl-2.0", "size": 262766 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
165,136
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<ResourceSku> list(Context context) { return new PagedIterable<>(listAsync(context)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ResourceSku> function(Context context) { return new PagedIterable<>(listAsync(context)); }
/** * Lists all of the available skus of the Microsoft.AppPlatform provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. ...
Lists all of the available skus of the Microsoft.AppPlatform provider
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/SkusClientImpl.java", "license": "mit", "size": 13414 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.appplatform.models.ResourceSku" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.appplatform.models.ResourceSku;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appplatform.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
208,256
protected void sequence_SolidColorDefinition(EObject context, SolidColorDefinition semanticObject) { if(errorAcceptor != null) { if(transientValues.isValueTransient(semanticObject, SPrototyperPackage.Literals.SOLID_COLOR_DEFINITION__COLOR) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.creat...
void function(EObject context, SolidColorDefinition semanticObject) { if(errorAcceptor != null) { if(transientValues.isValueTransient(semanticObject, SPrototyperPackage.Literals.SOLID_COLOR_DEFINITION__COLOR) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SProto...
/** * Constraint: * color=Color */
Constraint: color=Color
sequence_SolidColorDefinition
{ "repo_name": "glefur/s-prototyper", "path": "plugins/fr.obeo.dsl.sprototyper/src-gen/fr/obeo/dsl/serializer/SPrototyperSemanticSequencer.java", "license": "apache-2.0", "size": 113304 }
[ "fr.obeo.dsl.sPrototyper.SPrototyperPackage", "fr.obeo.dsl.sPrototyper.SolidColorDefinition", "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.serializer.acceptor.SequenceFeeder", "org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider", "org.eclipse.xtext.serializer.sequencer.ITransientValueServ...
import fr.obeo.dsl.sPrototyper.SPrototyperPackage; import fr.obeo.dsl.sPrototyper.SolidColorDefinition; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider; import org.eclipse.xtext.serializer.sequencer.IT...
import fr.obeo.dsl.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*;
[ "fr.obeo.dsl", "org.eclipse.emf", "org.eclipse.xtext" ]
fr.obeo.dsl; org.eclipse.emf; org.eclipse.xtext;
241,744
public static String formatMessage(String key, Object[] args) throws MissingResourceException { return localizableSupport.formatMessage(key, args); }
static String function(String key, Object[] args) throws MissingResourceException { return localizableSupport.formatMessage(key, args); }
/** * Implements {@link * org.apache.batik.i18n.Localizable#formatMessage(String,Object[])}. */
Implements <code>org.apache.batik.i18n.Localizable#formatMessage(String,Object[])</code>
formatMessage
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/swing/svg/Messages.java", "license": "apache-2.0", "size": 2277 }
[ "java.util.MissingResourceException" ]
import java.util.MissingResourceException;
import java.util.*;
[ "java.util" ]
java.util;
918,619
@Test public void testUnion1() { final int[] ints1 = {33, 100000}; final int[] ints2 = {34, 100000}; List<Integer> expected = Arrays.asList(33, 34, 100000); ConciseSet set1 = new ConciseSet(); for (int i : ints1) { set1.add(i); } ConciseSet set2 = new ConciseSet(); for (int ...
void function() { final int[] ints1 = {33, 100000}; final int[] ints2 = {34, 100000}; List<Integer> expected = Arrays.asList(33, 34, 100000); ConciseSet set1 = new ConciseSet(); for (int i : ints1) { set1.add(i); } ConciseSet set2 = new ConciseSet(); for (int i : ints2) { set2.add(i); } List<ImmutableConciseSet> sets =...
/** * Set 1: zero literal, zero fill with flipped bit 33, literal * Set 2: zero literal, zero fill with flipped bit 34, literal * <p/> * Testing merge */
Set 1: zero literal, zero fill with flipped bit 33, literal Set 2: zero literal, zero fill with flipped bit 34, literal Testing merge
testUnion1
{ "repo_name": "zhihuij/druid", "path": "extendedset/src/test/java/io/druid/extendedset/intset/ImmutableConciseSetTest.java", "license": "apache-2.0", "size": 50965 }
[ "java.util.Arrays", "java.util.List" ]
import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,220,317
OrganisationUnit[] getByMuncipalityNumberAndOrganisationType(int fromMuncipalityNumber, int toMuncipalityNumber, String orgType); // SchemaList createReportDa...
OrganisationUnit[] getByMuncipalityNumberAndOrganisationType(int fromMuncipalityNumber, int toMuncipalityNumber, String orgType);
/** * Returns the organisation types having muncipality numbers in the specified range. * * @param fromMuncipalityNumber * @param toMuncipalityNumber * @param orgType * @return */
Returns the organisation types having muncipality numbers in the specified range
getByMuncipalityNumberAndOrganisationType
{ "repo_name": "NationalLibraryOfNorway/Bibliotekstatistikk", "path": "organisationregister/src/main/java/no/abmu/organisationregister/service/OrganisationUnitService.java", "license": "gpl-2.0", "size": 5550 }
[ "no.abmu.organisationregister.domain.OrganisationUnit" ]
import no.abmu.organisationregister.domain.OrganisationUnit;
import no.abmu.organisationregister.domain.*;
[ "no.abmu.organisationregister" ]
no.abmu.organisationregister;
418,759
public void writePacketData(PacketBuffer buf) throws IOException { buf.writeUniqueId(this.uniqueId); buf.writeEnumValue(this.operation); switch (this.operation) { case ADD: buf.writeTextComponent(this.name); buf.writeFloat(this.percent...
void function(PacketBuffer buf) throws IOException { buf.writeUniqueId(this.uniqueId); buf.writeEnumValue(this.operation); switch (this.operation) { case ADD: buf.writeTextComponent(this.name); buf.writeFloat(this.percent); buf.writeEnumValue(this.color); buf.writeEnumValue(this.overlay); buf.writeByte(this.getFlags())...
/** * Writes the raw packet data to the data stream. */
Writes the raw packet data to the data stream
writePacketData
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/network/play/server/SPacketUpdateBossInfo.java", "license": "gpl-3.0", "size": 5564 }
[ "java.io.IOException", "net.minecraft.network.PacketBuffer" ]
import java.io.IOException; import net.minecraft.network.PacketBuffer;
import java.io.*; import net.minecraft.network.*;
[ "java.io", "net.minecraft.network" ]
java.io; net.minecraft.network;
618,835
public final String getText() throws PssstException { return mBody; }
final String function() throws PssstException { return mBody; }
/** * Returns the response body. * @return Text * @throws PssstException */
Returns the response body
getText
{ "repo_name": "pssst/pssst-java", "path": "app/src/main/java/name/pssst/api/internal/Response.java", "license": "gpl-3.0", "size": 4691 }
[ "name.pssst.api.PssstException" ]
import name.pssst.api.PssstException;
import name.pssst.api.*;
[ "name.pssst.api" ]
name.pssst.api;
54,259
public boolean isTargetMethod(JavaNameOccurrence occ) { if (occ.getNameForWhichThisIsAQualifier() != null) { if (occ.getLocation().getImage().endsWith(".size")) { return true; } } return false; }
boolean function(JavaNameOccurrence occ) { if (occ.getNameForWhichThisIsAQualifier() != null) { if (occ.getLocation().getImage().endsWith(".size")) { return true; } } return false; }
/** * Determine if we're dealing with .size method * * @param occ * The name occurrence * @return true if it's .size, else false */
Determine if we're dealing with .size method
isTargetMethod
{ "repo_name": "byronka/xenos", "path": "utils/pmd-bin-5.2.2/src/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/UseCollectionIsEmptyRule.java", "license": "mit", "size": 4217 }
[ "net.sourceforge.pmd.lang.java.symboltable.JavaNameOccurrence" ]
import net.sourceforge.pmd.lang.java.symboltable.JavaNameOccurrence;
import net.sourceforge.pmd.lang.java.symboltable.*;
[ "net.sourceforge.pmd" ]
net.sourceforge.pmd;
2,200,331
protected NodeFigure createNodeFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShapeForward(); figure.add(shape); contentPane = setupContentPane(shape); figure_ = figure; createNodeShapeReverse(); return figure; }
NodeFigure function() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShapeForward(); figure.add(shape); contentPane = setupContentPane(shape); figure_ = figure; createNodeShapeReverse(); return figure; }
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated NOT */
Creates figure for this edit part. Body of this method does not depend on settings in generation model so you may safely remove generated tag and modify it
createNodeFigure
{ "repo_name": "chanakaudaya/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/parts/RecipientListEndPointInputConnectorEditPart.java", "license": "apache-2.0", "size": 11582 }
[ "org.eclipse.draw2d.IFigure", "org.eclipse.draw2d.StackLayout", "org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure" ]
import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.StackLayout; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.draw2d.*; import org.eclipse.gmf.runtime.gef.ui.figures.*;
[ "org.eclipse.draw2d", "org.eclipse.gmf" ]
org.eclipse.draw2d; org.eclipse.gmf;
2,159,367
public String[] getRecentCaseNames() { String[] caseNames = new String[LENGTH]; Iterator<RecentCase> mostRecentFirst = recentCases.descendingIterator(); int i = 0; String currentCaseName = null; try { currentCaseName = Case.getCurrentCase().getDisplayName(); ...
String[] function() { String[] caseNames = new String[LENGTH]; Iterator<RecentCase> mostRecentFirst = recentCases.descendingIterator(); int i = 0; String currentCaseName = null; try { currentCaseName = Case.getCurrentCase().getDisplayName(); } catch (IllegalStateException ex) { } while (mostRecentFirst.hasNext()) { Str...
/** * Gets the recent case names. * * @return caseNames An array String[LENGTH - 1], newest case first, with any * extra spots filled with "" */
Gets the recent case names
getRecentCaseNames
{ "repo_name": "dgrove727/autopsy", "path": "Core/src/org/sleuthkit/autopsy/casemodule/RecentCases.java", "license": "apache-2.0", "size": 14858 }
[ "java.util.Iterator", "org.apache.commons.lang.ArrayUtils" ]
import java.util.Iterator; import org.apache.commons.lang.ArrayUtils;
import java.util.*; import org.apache.commons.lang.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
1,867,324
public ARXPopulationModel getPopulationModel() { return this.populationModel; }
ARXPopulationModel function() { return this.populationModel; }
/** * Returns the backing model * @return */
Returns the backing model
getPopulationModel
{ "repo_name": "COWYARD/arx", "path": "src/gui/org/deidentifier/arx/gui/model/ModelRisk.java", "license": "apache-2.0", "size": 7828 }
[ "org.deidentifier.arx.ARXPopulationModel" ]
import org.deidentifier.arx.ARXPopulationModel;
import org.deidentifier.arx.*;
[ "org.deidentifier.arx" ]
org.deidentifier.arx;
1,378,143
public void sendHello(WsDiscoveryService service) throws WsDiscoveryXMLException, WsDiscoveryNetworkException { WsDiscoveryS11SOAPMessage<HelloType> hello; try { hello = WsDiscoveryS11Utilities.createWsdSOAPMessageHello(service); } catch (SOAPOverUDPException ex) { t...
void function(WsDiscoveryService service) throws WsDiscoveryXMLException, WsDiscoveryNetworkException { WsDiscoveryS11SOAPMessage<HelloType> hello; try { hello = WsDiscoveryS11Utilities.createWsdSOAPMessageHello(service); } catch (SOAPOverUDPException ex) { throw new WsDiscoveryXMLException(STR, ex); } if (useProxy) { ...
/** * Send Hello. * * @param service Service that says Hello. */
Send Hello
sendHello
{ "repo_name": "nateridderman/java-ws-discovery", "path": "wsdiscovery-lib/src/main/java/com/ms/wsdiscovery/standard11/WsDiscoveryS11DispatchThread.java", "license": "lgpl-3.0", "size": 36661 }
[ "com.ms.wsdiscovery.exception.WsDiscoveryNetworkException", "com.ms.wsdiscovery.exception.WsDiscoveryXMLException", "com.ms.wsdiscovery.jaxb.standard11.wsdiscovery.HelloType", "com.ms.wsdiscovery.servicedirectory.WsDiscoveryService", "com.skjegstad.soapoverudp.exceptions.SOAPOverUDPException" ]
import com.ms.wsdiscovery.exception.WsDiscoveryNetworkException; import com.ms.wsdiscovery.exception.WsDiscoveryXMLException; import com.ms.wsdiscovery.jaxb.standard11.wsdiscovery.HelloType; import com.ms.wsdiscovery.servicedirectory.WsDiscoveryService; import com.skjegstad.soapoverudp.exceptions.SOAPOverUDPException;
import com.ms.wsdiscovery.exception.*; import com.ms.wsdiscovery.jaxb.standard11.wsdiscovery.*; import com.ms.wsdiscovery.servicedirectory.*; import com.skjegstad.soapoverudp.exceptions.*;
[ "com.ms.wsdiscovery", "com.skjegstad.soapoverudp" ]
com.ms.wsdiscovery; com.skjegstad.soapoverudp;
2,786,855
public static double calculateColumnTotal(Values2D data, int column) { ParamChecks.nullNotPermitted(data, "data"); double total = 0.0; int rowCount = data.getRowCount(); for (int r = 0; r < rowCount; r++) { Number n = data.getValue(r, column); if (n != n...
static double function(Values2D data, int column) { ParamChecks.nullNotPermitted(data, "data"); double total = 0.0; int rowCount = data.getRowCount(); for (int r = 0; r < rowCount; r++) { Number n = data.getValue(r, column); if (n != null) { total += n.doubleValue(); } } return total; }
/** * Returns the total of the values in one column of the supplied data * table. * * @param data the table of values ({@code null} not permitted). * @param column the column index (zero-based). * * @return The total of the values in the specified column. */
Returns the total of the values in one column of the supplied data table
calculateColumnTotal
{ "repo_name": "simon04/jfreechart", "path": "src/main/java/org/jfree/data/DataUtilities.java", "license": "lgpl-2.1", "size": 9928 }
[ "org.jfree.chart.util.ParamChecks" ]
import org.jfree.chart.util.ParamChecks;
import org.jfree.chart.util.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,813,426
public int getLogSize() { Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; try { con = DbConnectionManager.getConnection(); pstmt = con.prepareStatement(COUNT_LOG_ENTRIES); rs = pstmt.executeQuery(); rs.next(); return rs.getInt(1); } catch (SQLException s...
int function() { Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; try { con = DbConnectionManager.getConnection(); pstmt = con.prepareStatement(COUNT_LOG_ENTRIES); rs = pstmt.executeQuery(); rs.next(); return rs.getInt(1); } catch (SQLException sqle) { Log.error(sqle); } finally { DbConnectio...
/** * Returns the size of the ofGoJaraStatistics table * * @return number rows in database as int or -1 if an error occurred */
Returns the size of the ofGoJaraStatistics table
getLogSize
{ "repo_name": "surevine/openfire-bespoke", "path": "src/plugins/gojara/src/java/org/jivesoftware/openfire/plugin/gojara/database/DatabaseManager.java", "license": "gpl-2.0", "size": 9173 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "org.jivesoftware.database.DbConnectionManager" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.jivesoftware.database.DbConnectionManager;
import java.sql.*; import org.jivesoftware.database.*;
[ "java.sql", "org.jivesoftware.database" ]
java.sql; org.jivesoftware.database;
1,385,123
EventFamilyFactory getEventFamilyFactory(); /** * Submits an event listeners resolution request * * @param eventFQNs List of event class FQNs which have to be supported by endpoint. * @param listener Result listener {@link FindEventListenersCallback}}
EventFamilyFactory getEventFamilyFactory(); /** * Submits an event listeners resolution request * * @param eventFQNs List of event class FQNs which have to be supported by endpoint. * @param listener Result listener {@link FindEventListenersCallback}}
/** * Retrieves Kaa event family factory. * * @return {@link EventFamilyFactory} object. * */
Retrieves Kaa event family factory
getEventFamilyFactory
{ "repo_name": "Deepnekroz/kaa", "path": "client/client-multi/client-java-core/src/main/java/org/kaaproject/kaa/client/GenericKaaClient.java", "license": "apache-2.0", "size": 18737 }
[ "java.util.List", "org.kaaproject.kaa.client.event.EventFamilyFactory", "org.kaaproject.kaa.client.event.FindEventListenersCallback" ]
import java.util.List; import org.kaaproject.kaa.client.event.EventFamilyFactory; import org.kaaproject.kaa.client.event.FindEventListenersCallback;
import java.util.*; import org.kaaproject.kaa.client.event.*;
[ "java.util", "org.kaaproject.kaa" ]
java.util; org.kaaproject.kaa;
705,440
public void closeTablePool(final byte[] tableName) throws IOException { closeTablePool(Bytes.toString(tableName)); }
void function(final byte[] tableName) throws IOException { closeTablePool(Bytes.toString(tableName)); }
/** * See {@link #closeTablePool(String)}. * * @param tableName */
See <code>#closeTablePool(String)</code>
closeTablePool
{ "repo_name": "JichengSong/hbase", "path": "src/main/java/org/apache/hadoop/hbase/client/HTablePool.java", "license": "apache-2.0", "size": 16478 }
[ "java.io.IOException", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,518,072
public static double getHours(long time) { return (double) TimeUnit.MILLISECONDS.toHours(time - System.currentTimeMillis()); }
static double function(long time) { return (double) TimeUnit.MILLISECONDS.toHours(time - System.currentTimeMillis()); }
/** * Return the hours since the provided time. * * @param time The provided time. * @return Hours. */
Return the hours since the provided time
getHours
{ "repo_name": "DemigodsRPG/DemigodsRPG", "path": "src/main/java/com/demigodsrpg/util/misc/TimeUtil.java", "license": "bsd-3-clause", "size": 3037 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,106,716
@Override protected void onBindDialogView(View v) { super.onBindDialogView(v); mPicker.setHour(mLastHour); mPicker.setMinute(mLastMinute); }
void function(View v) { super.onBindDialogView(v); mPicker.setHour(mLastHour); mPicker.setMinute(mLastMinute); }
/** * Called to bind the dialog view. * @param v The view. */
Called to bind the dialog view
onBindDialogView
{ "repo_name": "Keidan/WorkTime", "path": "app/src/main/java/fr/ralala/worktime/ui/dialogs/TimePreferenceDialog.java", "license": "gpl-3.0", "size": 3469 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
361,996
public ClosableIterator<java.lang.String> getAllNames() { return Base.getAll(this.model, this.getResource(), NAME, java.lang.String.class); }
ClosableIterator<java.lang.String> function() { return Base.getAll(this.model, this.getResource(), NAME, java.lang.String.class); }
/** * Get all values of property Name * @return a ClosableIterator of $type * [Generated from RDFReactor template rule #get12dynamic] */
Get all values of property Name [Generated from RDFReactor template rule #get12dynamic]
getAllNames
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-foaf/src/main/java/com/xmlns/foaf/Thing.java", "license": "mit", "size": 274766 }
[ "org.ontoware.aifbcommons.collection.ClosableIterator", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.aifbcommons.collection.ClosableIterator; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.aifbcommons.collection.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.aifbcommons", "org.ontoware.rdfreactor" ]
org.ontoware.aifbcommons; org.ontoware.rdfreactor;
2,809,983
@Test(timeout=100000) public void testBalancerCliWithIncludeListInAFile() throws Exception { final Configuration conf = new HdfsConfiguration(); initConf(conf); Set<String> includeHosts = new HashSet<String>(); includeHosts.add( "datanodeY"); doTest(conf, new long[]{CAPACITY, CAPACITY}, new Stri...
@Test(timeout=100000) void function() throws Exception { final Configuration conf = new HdfsConfiguration(); initConf(conf); Set<String> includeHosts = new HashSet<String>(); includeHosts.add( STR); doTest(conf, new long[]{CAPACITY, CAPACITY}, new String[]{RACK0, RACK1}, CAPACITY, RACK2, new HostNameBasedNodes(new Stri...
/** * Test a cluster with even distribution, * then three nodes are added to the cluster, * runs balancer with two of the nodes in the include list */
Test a cluster with even distribution, then three nodes are added to the cluster, runs balancer with two of the nodes in the include list
testBalancerCliWithIncludeListInAFile
{ "repo_name": "dilaver/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java", "license": "apache-2.0", "size": 58618 }
[ "java.util.HashSet", "java.util.Set", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hdfs.HdfsConfiguration", "org.apache.hadoop.hdfs.server.balancer.Balancer", "org.junit.Test" ]
import java.util.HashSet; import java.util.Set; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.hdfs.server.balancer.Balancer; import org.junit.Test;
import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.balancer.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
1,426,537
public void setTimeZone(TimeZone value) { synchronized(m_Format) { m_Format.setTimeZone(value); } }
void function(TimeZone value) { synchronized(m_Format) { m_Format.setTimeZone(value); } }
/** * Sets the timezone to use. * * @param value the new timezone * @see SimpleDateFormat#setTimeZone(TimeZone) */
Sets the timezone to use
setTimeZone
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/core/DateFormat.java", "license": "gpl-3.0", "size": 6268 }
[ "java.util.TimeZone" ]
import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
1,303,826
public Date getTsLastupdate() { return tsLastupdate; }
Date function() { return tsLastupdate; }
/** * This method was generated by MyBatis Generator. * This method returns the value of the database column sm_userbaseinfo.ts_lastupdate * * @return the value of sm_userbaseinfo.ts_lastupdate * * @mbggenerated */
This method was generated by MyBatis Generator. This method returns the value of the database column sm_userbaseinfo.ts_lastupdate
getTsLastupdate
{ "repo_name": "Gitpiece/ssm", "path": "ssm-db/src/main/java/com/icfcc/db/user/SmUserbaseinfo.java", "license": "apache-2.0", "size": 6402 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,240,956
protected void initialize(Element root) { XMLElement doc = (XMLElement) root; if(!XMLElement.class.isInstance(root)) { throw new IllegalArgumentException(getClass().getName() + " only supports XMLElement"); } if (!doc.getName().equals(tagRoot)) { ...
void function(Element root) { XMLElement doc = (XMLElement) root; if(!XMLElement.class.isInstance(root)) { throw new IllegalArgumentException(getClass().getName() + STR); } if (!doc.getName().equals(tagRoot)) { throw new IllegalArgumentException( STR + getClass().getName() + STR + doc.getName()); } Enumeration elements...
/** * Intialize a Discovery Query from a portion of a structured document. * @param root document to intialize from */
Intialize a Discovery Query from a portion of a structured document
initialize
{ "repo_name": "johnjianfang/jxse", "path": "src/main/java/net/jxta/impl/content/defprovider/DataRequest.java", "license": "apache-2.0", "size": 11633 }
[ "java.util.Enumeration", "net.jxta.document.Element", "net.jxta.document.XMLElement", "net.jxta.logging.Logging" ]
import java.util.Enumeration; import net.jxta.document.Element; import net.jxta.document.XMLElement; import net.jxta.logging.Logging;
import java.util.*; import net.jxta.document.*; import net.jxta.logging.*;
[ "java.util", "net.jxta.document", "net.jxta.logging" ]
java.util; net.jxta.document; net.jxta.logging;
1,115,490
protected void cleanDiagnosticDir() { U.delete(defaultDiagnosticDir); U.delete(customDiagnosticDir); }
void function() { U.delete(defaultDiagnosticDir); U.delete(customDiagnosticDir); }
/** * Clean diagnostic directories. */
Clean diagnostic directories
cleanDiagnosticDir
{ "repo_name": "xtern/ignite", "path": "modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java", "license": "apache-2.0", "size": 123624 }
[ "org.apache.ignite.internal.util.typedef.internal.U" ]
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,250,715
public static void clearSubContexts(ContextSource contextSource, Name name) throws NamingException { DirContext ctx = null; try { ctx = contextSource.getReadWriteContext(); clearSubContexts(ctx, name); } finally { try { ctx.close(); ...
static void function(ContextSource contextSource, Name name) throws NamingException { DirContext ctx = null; try { ctx = contextSource.getReadWriteContext(); clearSubContexts(ctx, name); } finally { try { ctx.close(); } catch (Exception e) { } } }
/** * Clear the directory sub-tree starting with the node represented by the * supplied distinguished name. * * @param contextSource the ContextSource to use for getting a DirContext. * @param name the distinguished name of the root node. * @throws NamingException if anything goes...
Clear the directory sub-tree starting with the node represented by the supplied distinguished name
clearSubContexts
{ "repo_name": "vitorgv/spring-ldap", "path": "test-support/src/main/java/org/springframework/ldap/test/LdapTestUtils.java", "license": "apache-2.0", "size": 10964 }
[ "javax.naming.Name", "javax.naming.NamingException", "javax.naming.directory.DirContext", "org.springframework.ldap.core.ContextSource" ]
import javax.naming.Name; import javax.naming.NamingException; import javax.naming.directory.DirContext; import org.springframework.ldap.core.ContextSource;
import javax.naming.*; import javax.naming.directory.*; import org.springframework.ldap.core.*;
[ "javax.naming", "org.springframework.ldap" ]
javax.naming; org.springframework.ldap;
261,146
@Override public SparseRealVector fastPlus(SparseRealVector x, SparseRealVector y) { int n = Math.max(x.values.size(),y.values.size()); // indexCounter(x, y); SparseElement<Double>[] elements = new SparseElement[n]; Vector<SparseElement<Double>> v = new Vector(elements,0); Itera...
SparseRealVector function(SparseRealVector x, SparseRealVector y) { int n = Math.max(x.values.size(),y.values.size()); SparseElement<Double>[] elements = new SparseElement[n]; Vector<SparseElement<Double>> v = new Vector(elements,0); Iterator<SparseElement<Double>> iter_x = x.elements(); Iterator<SparseElement<Double>>...
/** * Adds the second vector to the first vector. * The addition process is component by component. * The result of the operation is stored in the first vector. * @param x The first vector * @param y The second vector */
Adds the second vector to the first vector. The addition process is component by component. The result of the operation is stored in the first vector
fastPlus
{ "repo_name": "danaderp/unalcol", "path": "math/src/unalcol/types/real/array/sparse/SparseRealVectorSpace.java", "license": "gpl-2.0", "size": 8089 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,828,608
public ManagedDatabaseUpdate withTags(Map<String, String> tags) { this.tags = tags; return this; }
ManagedDatabaseUpdate function(Map<String, String> tags) { this.tags = tags; return this; }
/** * Set the tags property: Resource tags. * * @param tags the tags value to set. * @return the ManagedDatabaseUpdate object itself. */
Set the tags property: Resource tags
withTags
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/models/ManagedDatabaseUpdate.java", "license": "mit", "size": 15425 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,532,520
public boolean canTraverseOutsideSubtree() { return m_xpath.getExpression().canTraverseOutsideSubtree(); } public AVTPartXPath(XPath xpath) { m_xpath = xpath; } public AVTPartXPath( String val, org.apache.xml.utils.PrefixResolver nsNode, XPathParser xpathProcessor, ...
boolean function() { return m_xpath.getExpression().canTraverseOutsideSubtree(); } public AVTPartXPath(XPath xpath) { m_xpath = xpath; } public AVTPartXPath( String val, org.apache.xml.utils.PrefixResolver nsNode, XPathParser xpathProcessor, XPathFactory factory, XPathContext liaison) throws javax.xml.transform.Transfo...
/** * Tell if this expression or it's subexpressions can traverse outside * the current subtree. * * @return true if traversal outside the context node's subtree can occur. */
Tell if this expression or it's subexpressions can traverse outside the current subtree
canTraverseOutsideSubtree
{ "repo_name": "mirego/j2objc", "path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/AVTPartXPath.java", "license": "apache-2.0", "size": 4995 }
[ "org.apache.xpath.XPath", "org.apache.xpath.XPathContext", "org.apache.xpath.XPathFactory", "org.apache.xpath.compiler.XPathParser" ]
import org.apache.xpath.XPath; import org.apache.xpath.XPathContext; import org.apache.xpath.XPathFactory; import org.apache.xpath.compiler.XPathParser;
import org.apache.xpath.*; import org.apache.xpath.compiler.*;
[ "org.apache.xpath" ]
org.apache.xpath;
775,638
public static CandidateEntry findByU_cD_First(long userId, Date createDate, OrderByComparator<CandidateEntry> orderByComparator) throws com.liferay.micro.maintainance.candidate.exception.NoSuchEntryException { return getPersistence() .findByU_cD_First(userId, createDate, orderByComparator); }
static CandidateEntry function(long userId, Date createDate, OrderByComparator<CandidateEntry> orderByComparator) throws com.liferay.micro.maintainance.candidate.exception.NoSuchEntryException { return getPersistence() .findByU_cD_First(userId, createDate, orderByComparator); }
/** * Returns the first candidate entry in the ordered set where userId = &#63; and createDate = &#63;. * * @param userId the user ID * @param createDate the create date * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching candidate entry * @th...
Returns the first candidate entry in the ordered set where userId = &#63; and createDate = &#63;
findByU_cD_First
{ "repo_name": "moltam89/OWXP", "path": "modules/micro-maintainance-candidate/micro-maintainance-candidate-api/src/main/java/com/liferay/micro/maintainance/candidate/service/persistence/CandidateEntryUtil.java", "license": "gpl-3.0", "size": 103522 }
[ "com.liferay.micro.maintainance.candidate.model.CandidateEntry", "com.liferay.portal.kernel.util.OrderByComparator", "java.util.Date" ]
import com.liferay.micro.maintainance.candidate.model.CandidateEntry; import com.liferay.portal.kernel.util.OrderByComparator; import java.util.Date;
import com.liferay.micro.maintainance.candidate.model.*; import com.liferay.portal.kernel.util.*; import java.util.*;
[ "com.liferay.micro", "com.liferay.portal", "java.util" ]
com.liferay.micro; com.liferay.portal; java.util;
1,684,273
public Iterator keys() { return this.map.keySet().iterator(); }
Iterator function() { return this.map.keySet().iterator(); }
/** * Get an enumeration of the keys of the JSONObject. * * @return An iterator of the keys. */
Get an enumeration of the keys of the JSONObject
keys
{ "repo_name": "igorekpotworek/facebook4j", "path": "facebook4j-core/src/main/java/facebook4j/internal/org/json/JSONObject.java", "license": "apache-2.0", "size": 56492 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,680,740
@Test public void testrunMultipleActions_multipleaction_success_all() { List<VdcActionType> actionTypes = new ArrayList<>(); actionTypes.add(VdcActionType.AddDisk); actionTypes.add(VdcActionType.AddBricksToGlusterVolume); List<VdcActionParametersBase> testParameters = new ArrayLi...
void function() { List<VdcActionType> actionTypes = new ArrayList<>(); actionTypes.add(VdcActionType.AddDisk); actionTypes.add(VdcActionType.AddBricksToGlusterVolume); List<VdcActionParametersBase> testParameters = new ArrayList<>(); testParameters.add(new VdcActionParametersBase()); testParameters.add(new VdcActionPar...
/** * Run the following test case. * <ol> * <li>Run MultipleActions with multiple actions, that are successful.</li> * <li>Check to make sure the callback is called</li> * </ol> */
Run the following test case. Run MultipleActions with multiple actions, that are successful. Check to make sure the callback is called
testrunMultipleActions_multipleaction_success_all
{ "repo_name": "OpenUniversity/ovirt-engine", "path": "frontend/webadmin/modules/frontend/src/test/java/org/ovirt/engine/ui/frontend/FrontendActionTest.java", "license": "apache-2.0", "size": 39847 }
[ "java.util.ArrayList", "java.util.List", "org.junit.Assert", "org.mockito.Matchers", "org.mockito.Mockito", "org.ovirt.engine.core.common.action.VdcActionParametersBase", "org.ovirt.engine.core.common.action.VdcActionType", "org.ovirt.engine.core.common.action.VdcReturnValueBase", "org.ovirt.engine....
import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.mockito.Matchers; import org.mockito.Mockito; import org.ovirt.engine.core.common.action.VdcActionParametersBase; import org.ovirt.engine.core.common.action.VdcActionType; import org.ovirt.engine.core.common.action.VdcReturnValueBase...
import java.util.*; import org.junit.*; import org.mockito.*; import org.ovirt.engine.core.common.action.*; import org.ovirt.engine.ui.uicompat.*;
[ "java.util", "org.junit", "org.mockito", "org.ovirt.engine" ]
java.util; org.junit; org.mockito; org.ovirt.engine;
2,900,662
//----------------------------------------------------------------------- private void readObject(ObjectInputStream s) throws InvalidObjectException { throw new InvalidObjectException("Deserialization via serialization delegate"); }
void function(ObjectInputStream s) throws InvalidObjectException { throw new InvalidObjectException(STR); }
/** * Defend against malicious streams. * * @throws InvalidObjectException always */
Defend against malicious streams
readObject
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/java/time/chrono/JapaneseDate.java", "license": "mit", "size": 30041 }
[ "java.io.InvalidObjectException", "java.io.ObjectInputStream" ]
import java.io.InvalidObjectException; import java.io.ObjectInputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,107,137
static boolean matchesLayout( String repoLayout, String mirrorLayout ) { boolean result = false; // simple checks first to short circuit processing below. if ( StringUtils.isEmpty( mirrorLayout ) || WILDCARD.equals( mirrorLayout ) ) { result = true; } ...
static boolean matchesLayout( String repoLayout, String mirrorLayout ) { boolean result = false; if ( StringUtils.isEmpty( mirrorLayout ) WILDCARD.equals( mirrorLayout ) ) { result = true; } else if ( mirrorLayout.equals( repoLayout ) ) { result = true; } else { String[] layouts = mirrorLayout.split( "," ); for ( Strin...
/** * Checks whether the layouts configured for a mirror match with the layout of the repository. * * @param repoLayout The layout of the repository, may be {@code null}. * @param mirrorLayout The layouts supported by the mirror, may be {@code null}. * @return {@code true} if the layouts associ...
Checks whether the layouts configured for a mirror match with the layout of the repository
matchesLayout
{ "repo_name": "xasx/maven", "path": "maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java", "license": "apache-2.0", "size": 29999 }
[ "org.codehaus.plexus.util.StringUtils" ]
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.*;
[ "org.codehaus.plexus" ]
org.codehaus.plexus;
1,163,780
public void testCurrentOfResultSet() throws Exception { createTestTable("dept", DS, "dept_data"); createTestTable("emp", ES+","+DNO+")", "emp_data"); PreparedStatement selForUpd = prepareStatement ("select * from dept for update of dname"); selForUpd.setCursorName("C1");...
void function() throws Exception { createTestTable("dept", DS, STR); createTestTable("emp", ES+","+DNO+")", STR); PreparedStatement selForUpd = prepareStatement (STR); selForUpd.setCursorName("C1"); ResultSet rs = selForUpd.executeQuery(); PreparedStatement tst = prepareStatement (STR); PreparedStatement sel = prepareS...
/** * Test CurrentOfResultSet */
Test CurrentOfResultSet
testCurrentOfResultSet
{ "repo_name": "scnakandala/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/ResultSetsFromPreparedStatementTest.java", "license": "apache-2.0", "size": 99228 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet" ]
import java.sql.PreparedStatement; import java.sql.ResultSet;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,913,533
public void testSerialization() throws Exception { NavigableMap x = map5(); NavigableMap y = serialClone(x); assertNotSame(x, y); assertEquals(x.size(), y.size()); assertEquals(x.toString(), y.toString()); assertEquals(x, y); assertEquals(y, x); y.cle...
void function() throws Exception { NavigableMap x = map5(); NavigableMap y = serialClone(x); assertNotSame(x, y); assertEquals(x.size(), y.size()); assertEquals(x.toString(), y.toString()); assertEquals(x, y); assertEquals(y, x); y.clear(); assertTrue(y.isEmpty()); assertFalse(x.equals(y)); }
/** * A deserialized/reserialized map equals original */
A deserialized/reserialized map equals original
testSerialization
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/ConcurrentSkipListMapTest.java", "license": "gpl-2.0", "size": 41793 }
[ "java.util.NavigableMap" ]
import java.util.NavigableMap;
import java.util.*;
[ "java.util" ]
java.util;
1,977,537
@ApiModelProperty(value = "") public Integer getTotalPages() { return totalPages; }
@ApiModelProperty(value = "") Integer function() { return totalPages; }
/** * Get totalPages * @return totalPages **/
Get totalPages
getTotalPages
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/main/java/com/knetikcloud/model/PageResourceChatMessageResource.java", "license": "apache-2.0", "size": 7644 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,732,036
private List<Double> standardize() { List<Double> standardized = new ArrayList<Double>(); double actualMean = meanType ? geometricMean(onsets) : arithmeticMean(onsets); for (double onset : onsets) { double shifted = onset - actualMean; shifted += mean; if (shifted != 0) { shifted...
List<Double> function() { List<Double> standardized = new ArrayList<Double>(); double actualMean = meanType ? geometricMean(onsets) : arithmeticMean(onsets); for (double onset : onsets) { double shifted = onset - actualMean; shifted += mean; if (shifted != 0) { shifted = Math.max(shifted, Simulator.getController().getM...
/** * Transform a list of random numbers into one standardized about an exact * mean. * * @return a standardized list of numbers. */
Transform a list of random numbers into one standardized about an exact mean
standardize
{ "repo_name": "cal-r/sscctd", "path": "src/simulator/util/VariableDistribution.java", "license": "mpl-2.0", "size": 7556 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,294,885
// TODO: make overridable method with calculated native type, offset, etc Object readField(StructField structField) { // Get the offset of the field int offset = structField.offset; // Determine the type of the field Class fieldType = structField.type; FromNativeConvert...
Object readField(StructField structField) { int offset = structField.offset; Class fieldType = structField.type; FromNativeConverter readConverter = structField.readConverter; if (readConverter != null) { fieldType = readConverter.nativeType(); } Object currentValue = (Structure.class.isAssignableFrom(fieldType) Callba...
/** Read the given field and return its value. The Java field will be * updated from the contents of native memory. */
Read the given field and return its value. The Java field will be updated from the contents of native memory
readField
{ "repo_name": "netjunki/jna-android", "path": "src/com/sun/jna/Structure.java", "license": "lgpl-2.1", "size": 54518 }
[ "java.nio.Buffer" ]
import java.nio.Buffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,417,274
Node n = parse(session, value); if (n == null) { return null; } return createReferenceValue(n, session.getValueFactory(), weak); }
Node n = parse(session, value); if (n == null) { return null; } return createReferenceValue(n, session.getValueFactory(), weak); }
/** * Parses the given source string and returns the correct Value object. * If no node matches returns <code>null</code>. * <p/> * * @param value a path or UUID * @param weak true to create a WeakReference value * @return the value or <code>null</code> * @throws RepositoryExcept...
Parses the given source string and returns the correct Value object. If no node matches returns <code>null</code>.
parse
{ "repo_name": "tmaret/sling", "path": "bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/ReferenceParser.java", "license": "apache-2.0", "size": 3432 }
[ "javax.jcr.Node" ]
import javax.jcr.Node;
import javax.jcr.*;
[ "javax.jcr" ]
javax.jcr;
245,003
@Override public void processMainClass( final JavaClassSource javaClass ) { if ( !ModelGenUtils.isAnnotationPresent( javaClass, Jackson2Processor.Annotation_Class_Json_Ignore_Type ) ) { ModelGenUtils.setAnnotationValue( ModelGenUtils.addAnnotation( javaClass, Jackson2Processor.Annotation_Class_Json_Include...
void function( final JavaClassSource javaClass ) { if ( !ModelGenUtils.isAnnotationPresent( javaClass, Jackson2Processor.Annotation_Class_Json_Ignore_Type ) ) { ModelGenUtils.setAnnotationValue( ModelGenUtils.addAnnotation( javaClass, Jackson2Processor.Annotation_Class_Json_Include ), Jackson2Processor.Literal_Enum_Jso...
/** * processMainClass * (non-Javadoc). * * @param javaClass the java class * @see io.github.rampantlions.codetools.CommonProcessor#processMainClass(org.jboss.forge.roaster.model.source.JavaClassSource) */
processMainClass (non-Javadoc)
processMainClass
{ "repo_name": "RampantLions/CodeTools", "path": "CodeToolsModules/CodeToolsJackson2/CodeToolsJackson2Processors/src/main/java/io/github/rampantlions/codetools/jackson2/processors/Jackson2Processor.java", "license": "apache-2.0", "size": 4118 }
[ "io.github.rampantlions.codetools.ModelGenUtils", "org.jboss.forge.roaster.model.source.FieldSource", "org.jboss.forge.roaster.model.source.JavaClassSource" ]
import io.github.rampantlions.codetools.ModelGenUtils; import org.jboss.forge.roaster.model.source.FieldSource; import org.jboss.forge.roaster.model.source.JavaClassSource;
import io.github.rampantlions.codetools.*; import org.jboss.forge.roaster.model.source.*;
[ "io.github.rampantlions", "org.jboss.forge" ]
io.github.rampantlions; org.jboss.forge;
779,180
Observable<Map<String, Double>> getDoubleValidAsync();
Observable<Map<String, Double>> getDoubleValidAsync();
/** * Get float dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}. * * @return the observable to the Map&lt;String, Double&gt; object */
Get float dictionary value {"0": 0, "1": -0.01, "2": 1.2e20}
getDoubleValidAsync
{ "repo_name": "anudeepsharma/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/Dictionarys.java", "license": "mit", "size": 79030 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
788,765
public Builder byJobKeys(Iterable<IJobKey> jobKeys) { requireNonNull(jobKeys); return new Builder(query.deepCopy().setJobKeys(IJobKey.toBuildersSet(jobKeys))); }
Builder function(Iterable<IJobKey> jobKeys) { requireNonNull(jobKeys); return new Builder(query.deepCopy().setJobKeys(IJobKey.toBuildersSet(jobKeys))); }
/** * Returns a new builder scoped to the jobs uniquely identified by the given jobKeys. A * builder can only be scoped to jobs once. * * @param jobKeys The job keys to scope this builder to. * @return A new Builder scoped to the job keys. */
Returns a new builder scoped to the jobs uniquely identified by the given jobKeys. A builder can only be scoped to jobs once
byJobKeys
{ "repo_name": "kidaa/aurora", "path": "src/main/java/org/apache/aurora/scheduler/base/Query.java", "license": "apache-2.0", "size": 12668 }
[ "java.util.Objects", "org.apache.aurora.scheduler.storage.entities.IJobKey" ]
import java.util.Objects; import org.apache.aurora.scheduler.storage.entities.IJobKey;
import java.util.*; import org.apache.aurora.scheduler.storage.entities.*;
[ "java.util", "org.apache.aurora" ]
java.util; org.apache.aurora;
1,709,171
public void insert(final FluoClient fluo, final Collection<RyaStatement> triples, final Optional<String> visibility) { checkNotNull(fluo); checkNotNull(triples); checkNotNull(visibility); try(Transaction tx = fluo.newTransaction()) { for(final RyaStatement triple : tripl...
void function(final FluoClient fluo, final Collection<RyaStatement> triples, final Optional<String> visibility) { checkNotNull(fluo); checkNotNull(triples); checkNotNull(visibility); try(Transaction tx = fluo.newTransaction()) { for(final RyaStatement triple : triples) { try { tx.set(spoFormat(triple), FluoQueryColumns...
/** * Insert a batch of triples into Fluo. * * @param fluo - A connection to the Fluo table that will be updated. (not null) * @param triples - The triples to insert. (not null) * @param visibility - The visibility/permissions required to view the triples once stored. * Note: The same visi...
Insert a batch of triples into Fluo
insert
{ "repo_name": "kchilton2/incubator-rya", "path": "extras/rya.pcj.fluo/pcj.fluo.api/src/main/java/org/apache/rya/indexing/pcj/fluo/api/InsertTriples.java", "license": "apache-2.0", "size": 5753 }
[ "com.google.common.base.Optional", "com.google.common.base.Preconditions", "java.util.Collection", "org.apache.fluo.api.client.FluoClient", "org.apache.fluo.api.client.Transaction", "org.apache.fluo.api.data.Bytes", "org.apache.rya.api.domain.RyaStatement", "org.apache.rya.indexing.pcj.fluo.app.query....
import com.google.common.base.Optional; import com.google.common.base.Preconditions; import java.util.Collection; import org.apache.fluo.api.client.FluoClient; import org.apache.fluo.api.client.Transaction; import org.apache.fluo.api.data.Bytes; import org.apache.rya.api.domain.RyaStatement; import org.apache.rya.index...
import com.google.common.base.*; import java.util.*; import org.apache.fluo.api.client.*; import org.apache.fluo.api.data.*; import org.apache.rya.api.domain.*; import org.apache.rya.indexing.pcj.fluo.app.query.*;
[ "com.google.common", "java.util", "org.apache.fluo", "org.apache.rya" ]
com.google.common; java.util; org.apache.fluo; org.apache.rya;
249,401
@Generated @Selector("setAnchorB:") public native void setAnchorB(@ByValue SCNVector3 value);
@Selector(STR) native void function(@ByValue SCNVector3 value);
/** * the attach point of bodyB */
the attach point of bodyB
setAnchorB
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/scenekit/SCNPhysicsBallSocketJoint.java", "license": "apache-2.0", "size": 7308 }
[ "org.moe.natj.general.ann.ByValue", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.ByValue; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,350,152
@Test public void testDontChangeValueOnException() throws Exception { // set valid value final Double targetValue = 50.5; taskMock.setPercentComplete(targetValue); assertThat(taskMock.getPercentComplete(), IsNot.not(IsNull.nullValue())); assertThat(taskMock.getPercentComplete(), IsInstanceOf.in...
void function() throws Exception { final Double targetValue = 50.5; taskMock.setPercentComplete(targetValue); assertThat(taskMock.getPercentComplete(), IsNot.not(IsNull.nullValue())); assertThat(taskMock.getPercentComplete(), IsInstanceOf.instanceOf(Double.class)); assertThat(taskMock.getPercentComplete(), IsEqual.equa...
/** * Test for checking if the value changes in case of a thrown exception * * @throws Exception */
Test for checking if the value changes in case of a thrown exception
testDontChangeValueOnException
{ "repo_name": "sanjay444/ews-java-api", "path": "src/test/java/microsoft/exchange/webservices/data/core/service/items/TaskTest.java", "license": "mit", "size": 5424 }
[ "org.hamcrest.core.IsEqual", "org.hamcrest.core.IsInstanceOf", "org.hamcrest.core.IsNot", "org.hamcrest.core.IsNull", "org.junit.Assert" ]
import org.hamcrest.core.IsEqual; import org.hamcrest.core.IsInstanceOf; import org.hamcrest.core.IsNot; import org.hamcrest.core.IsNull; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
120,731
protected void updateState(ChannelUID channelUID, State state) { synchronized (this) { if (this.callback != null) { this.callback.stateUpdated(channelUID, state); } else { throw new IllegalStateException("Could not update state, because callback is mis...
void function(ChannelUID channelUID, State state) { synchronized (this) { if (this.callback != null) { this.callback.stateUpdated(channelUID, state); } else { throw new IllegalStateException(STR); } } }
/** * * Updates the state of the thing. * * @param channelUID * unique id of the channel, which was updated * @param state * new state * @throws IllegalStateException * if handler is not initialized correctly, because no callback is present ...
Updates the state of the thing
updateState
{ "repo_name": "fatihboy/smarthome", "path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/binding/BaseThingHandler.java", "license": "epl-1.0", "size": 20690 }
[ "org.eclipse.smarthome.core.thing.ChannelUID", "org.eclipse.smarthome.core.types.State" ]
import org.eclipse.smarthome.core.thing.ChannelUID; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.thing.*; import org.eclipse.smarthome.core.types.*;
[ "org.eclipse.smarthome" ]
org.eclipse.smarthome;
2,005,098
public void testSchemaIsResetWhenDeleted() throws SQLException { final String userSchema = "AUSER"; ConnectionPoolDataSource cpDs = J2EEDataSource.getConnectionPoolDataSource(); J2EEDataSource.setBeanProperty(cpDs, "createDatabase", "create"); PooledConnec...
void function() throws SQLException { final String userSchema = "AUSER"; ConnectionPoolDataSource cpDs = J2EEDataSource.getConnectionPoolDataSource(); J2EEDataSource.setBeanProperty(cpDs, STR, STR); PooledConnection pc = cpDs.getPooledConnection(userSchema, STR); Connection con = pc.getConnection(); JDBC.assertCurrentS...
/** * Tests that deleting the current / default schema doesn't cause the next * logical connection to fail. * <p> * Relevant Jira issue: DERBY-3690. * * @throws SQLException if something goes wrong */
Tests that deleting the current / default schema doesn't cause the next logical connection to fail. Relevant Jira issue: DERBY-3690
testSchemaIsResetWhenDeleted
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java", "license": "apache-2.0", "size": 186489 }
[ "java.sql.Connection", "java.sql.SQLException", "java.sql.Statement", "javax.sql.ConnectionPoolDataSource", "javax.sql.PooledConnection", "org.apache.derbyTesting.junit.J2EEDataSource", "org.apache.derbyTesting.junit.JDBC" ]
import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import javax.sql.ConnectionPoolDataSource; import javax.sql.PooledConnection; import org.apache.derbyTesting.junit.J2EEDataSource; import org.apache.derbyTesting.junit.JDBC;
import java.sql.*; import javax.sql.*; import org.apache.*;
[ "java.sql", "javax.sql", "org.apache" ]
java.sql; javax.sql; org.apache;
661,648
public Result testGetEventSetDescriptors() { assertEquals(beanInfo.getEventSetDescriptors()[0] .getAddListenerMethod().getName(), "addFredListener"); assertEquals(beanInfo.getEventSetDescriptors().length, 1); return passed(); }
Result function() { assertEquals(beanInfo.getEventSetDescriptors()[0] .getAddListenerMethod().getName(), STR); assertEquals(beanInfo.getEventSetDescriptors().length, 1); return passed(); }
/** * Verify getEventSetDescriptors() method. */
Verify getEventSetDescriptors() method
testGetEventSetDescriptors
{ "repo_name": "freeVM/freeVM", "path": "enhanced/buildtest/tests/functional/src/test/functional/org/apache/harmony/test/func/api/java/beans/introspector/useallmethods/ReturnTheSameAsInRealBeanInfoTest.java", "license": "apache-2.0", "size": 5234 }
[ "org.apache.harmony.share.Result" ]
import org.apache.harmony.share.Result;
import org.apache.harmony.share.*;
[ "org.apache.harmony" ]
org.apache.harmony;
1,297,849
private static ArrayNode variables(List<Object[]> variables) { ArrayNode array = JsonUtils.createArrayNode(); for (Object[] name : variables) { array.add(variable(name)); } return array; }
static ArrayNode function(List<Object[]> variables) { ArrayNode array = JsonUtils.createArrayNode(); for (Object[] name : variables) { array.add(variable(name)); } return array; }
/** * Encodes an array of variables as a JSON array. */
Encodes an array of variables as a JSON array
variables
{ "repo_name": "phensley/template-compiler", "path": "core/src/main/java/com/squarespace/template/AstEmitter.java", "license": "apache-2.0", "size": 11570 }
[ "com.fasterxml.jackson.databind.node.ArrayNode", "java.util.List" ]
import com.fasterxml.jackson.databind.node.ArrayNode; import java.util.List;
import com.fasterxml.jackson.databind.node.*; import java.util.*;
[ "com.fasterxml.jackson", "java.util" ]
com.fasterxml.jackson; java.util;
1,692,309
private Response resume(String simulationName) { ActiveSimulatorData activeSimulatorData = EventSimulatorMap.getInstance().getActiveSimulatorMap() .get(simulationName); if (activeSimulatorData != null) { EventSimulator eventSimulator = activeSimulatorData.getEventSimulato...
Response function(String simulationName) { ActiveSimulatorData activeSimulatorData = EventSimulatorMap.getInstance().getActiveSimulatorMap() .get(simulationName); if (activeSimulatorData != null) { EventSimulator eventSimulator = activeSimulatorData.getEventSimulator(); switch (eventSimulator.getStatus()) { case PAUSE:...
/** * resume() is used to resume a paused feed simulation * * @param simulationName name of simulation being started * @return response */
resume() is used to resume a paused feed simulation
resume
{ "repo_name": "Anoukh/carbon-analytics", "path": "components/org.wso2.carbon.event.simulator.core/src/main/java/org/wso2/carbon/event/simulator/core/impl/FeedApiServiceImpl.java", "license": "apache-2.0", "size": 38552 }
[ "javax.ws.rs.core.Response", "org.wso2.carbon.event.simulator.core.service.EventSimulator", "org.wso2.carbon.event.simulator.core.service.EventSimulatorMap", "org.wso2.carbon.event.simulator.core.service.bean.ActiveSimulatorData", "org.wso2.carbon.stream.processor.common.exception.ResponseMapper" ]
import javax.ws.rs.core.Response; import org.wso2.carbon.event.simulator.core.service.EventSimulator; import org.wso2.carbon.event.simulator.core.service.EventSimulatorMap; import org.wso2.carbon.event.simulator.core.service.bean.ActiveSimulatorData; import org.wso2.carbon.stream.processor.common.exception.ResponseMapp...
import javax.ws.rs.core.*; import org.wso2.carbon.event.simulator.core.service.*; import org.wso2.carbon.event.simulator.core.service.bean.*; import org.wso2.carbon.stream.processor.common.exception.*;
[ "javax.ws", "org.wso2.carbon" ]
javax.ws; org.wso2.carbon;
1,949,893
protected QueryTransformer groups(String ... groups) { this.m_groups.addAll(Arrays.asList(groups)); return this; }
QueryTransformer function(String ... groups) { this.m_groups.addAll(Arrays.asList(groups)); return this; }
/** Specifies one or more group names found within the <i>queryPattern</i> * (e.g. "column"), the text matching each group will be modified as * dictated by the other options (e.g. by adding a prefix and suffix). */
Specifies one or more group names found within the queryPattern (e.g. "column"), the text matching each group will be modified as
groups
{ "repo_name": "paulmartel/voltdb", "path": "src/frontend/org/voltdb/NonVoltDBBackend.java", "license": "agpl-3.0", "size": 40578 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
885,816
public static void main(String[] args) { if (DFSUtil.parseHelpArgument(args, USAGE, System.out, true)) { System.exit(0); } try { System.exit(ToolRunner.run(new HdfsConfiguration(), new Cli(), args)); } catch (Throwable e) { LOG.error("Exiting balancer due an exception", e); Sy...
static void function(String[] args) { if (DFSUtil.parseHelpArgument(args, USAGE, System.out, true)) { System.exit(0); } try { System.exit(ToolRunner.run(new HdfsConfiguration(), new Cli(), args)); } catch (Throwable e) { LOG.error(STR, e); System.exit(-1); } }
/** * Run a balancer * @param args Command line arguments */
Run a balancer
main
{ "repo_name": "qqming113/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java", "license": "apache-2.0", "size": 34590 }
[ "org.apache.hadoop.hdfs.DFSUtil", "org.apache.hadoop.hdfs.HdfsConfiguration", "org.apache.hadoop.util.ToolRunner" ]
import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.util.ToolRunner;
import org.apache.hadoop.hdfs.*; import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,484,355
public boolean getFollowRedirects() { return this.followRedirects; } /** Sets whether version 1.1 of the HTTP protocol should be used per default. * * @param http11 <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0 * * @deprecated Use {@link HttpMethodParams#setVersion(H...
boolean function() { return this.followRedirects; } /** Sets whether version 1.1 of the HTTP protocol should be used per default. * * @param http11 <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0 * * @deprecated Use {@link HttpMethodParams#setVersion(HttpVersion)}
/** * Returns <tt>true</tt> if the HTTP method should automatically follow HTTP redirects * (status code 302, etc.), <tt>false</tt> otherwise. * * @return <tt>true</tt> if the method will automatically follow HTTP redirects, * <tt>false</tt> otherwise. */
Returns true if the HTTP method should automatically follow HTTP redirects (status code 302, etc.), false otherwise
getFollowRedirects
{ "repo_name": "fmassart/commons-httpclient", "path": "src/java/org/apache/commons/httpclient/HttpMethodBase.java", "license": "apache-2.0", "size": 93729 }
[ "org.apache.commons.httpclient.params.HttpMethodParams" ]
import org.apache.commons.httpclient.params.HttpMethodParams;
import org.apache.commons.httpclient.params.*;
[ "org.apache.commons" ]
org.apache.commons;
39,022
public void setDTDHandler (DTDHandler handler) { xmlReader.setDTDHandler(handler); }
void function (DTDHandler handler) { xmlReader.setDTDHandler(handler); }
/** * Register the DTD event handler. * * @param handler The new DTD event handler. * @see org.xml.sax.Parser#setDTDHandler */
Register the DTD event handler
setDTDHandler
{ "repo_name": "selmentdev/selment-toolchain", "path": "source/gcc-latest/libjava/classpath/external/sax/org/xml/sax/helpers/XMLReaderAdapter.java", "license": "gpl-3.0", "size": 14962 }
[ "org.xml.sax.DTDHandler" ]
import org.xml.sax.DTDHandler;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,436,402
byte[] qualityData() throws IOException;
byte[] qualityData() throws IOException;
/** * Returns the quality data for the current sequence. This returns the internal byte array of the implementor. The array will only be filled up to <code>currentLength</code>. * @return the current quality data. * @throws IllegalStateException if <code>nextSequence()</code> returned false on its last call. ...
Returns the quality data for the current sequence. This returns the internal byte array of the implementor. The array will only be filled up to <code>currentLength</code>
qualityData
{ "repo_name": "RealTimeGenomics/rtg-tools", "path": "src/com/rtg/reader/SequenceDataSource.java", "license": "bsd-2-clause", "size": 4519 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,091,240
@Test public void testAppendPermanentFailures() throws Exception { try (DurableDataLog log = createDurableDataLog()) { log.initialize(TIMEOUT); List<CompletableFuture<LogAddress>> appendFutures = new ArrayList<>(); try { // Suspend a bookie (this will...
void function() throws Exception { try (DurableDataLog log = createDurableDataLog()) { log.initialize(TIMEOUT); List<CompletableFuture<LogAddress>> appendFutures = new ArrayList<>(); try { stopFirstBookie(); int writeCount = getWriteCount(); for (int i = 0; i < writeCount; i++) { appendFutures.add(log.append(new Compos...
/** * Tests the ability to retry writes when Bookies fail. */
Tests the ability to retry writes when Bookies fail
testAppendPermanentFailures
{ "repo_name": "pravega/pravega", "path": "segmentstore/storage/impl/src/test/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLogTests.java", "license": "apache-2.0", "size": 46311 }
[ "io.pravega.common.ObjectClosedException", "io.pravega.common.util.CompositeByteArraySegment", "io.pravega.common.util.RetriesExhaustedException", "io.pravega.segmentstore.storage.DurableDataLog", "io.pravega.segmentstore.storage.DurableDataLogException", "io.pravega.segmentstore.storage.LogAddress", "i...
import io.pravega.common.ObjectClosedException; import io.pravega.common.util.CompositeByteArraySegment; import io.pravega.common.util.RetriesExhaustedException; import io.pravega.segmentstore.storage.DurableDataLog; import io.pravega.segmentstore.storage.DurableDataLogException; import io.pravega.segmentstore.storage....
import io.pravega.common.*; import io.pravega.common.util.*; import io.pravega.segmentstore.storage.*; import io.pravega.test.common.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*;
[ "io.pravega.common", "io.pravega.segmentstore", "io.pravega.test", "java.util" ]
io.pravega.common; io.pravega.segmentstore; io.pravega.test; java.util;
1,066,369
public void getLocalFilterRoutingForPutAllOp(DistributedPutAllOperation dpao, DistributedPutAllOperation.PutAllEntryData[] putAllData) { final boolean isDebugEnabled = logger.isDebugEnabled(); if (this.region != null && this.localProfile.hasCacheServer) { Set clientsInv = null; Set clients ...
void function(DistributedPutAllOperation dpao, DistributedPutAllOperation.PutAllEntryData[] putAllData) { final boolean isDebugEnabled = logger.isDebugEnabled(); if (this.region != null && this.localProfile.hasCacheServer) { Set clientsInv = null; Set clients = null; int size = putAllData.length; CqService cqService = ...
/** * computes FilterRoutingInfo objects for each of the given events */
computes FilterRoutingInfo objects for each of the given events
getLocalFilterRoutingForPutAllOp
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/FilterProfile.java", "license": "apache-2.0", "size": 78922 }
[ "java.util.Set", "org.apache.geode.cache.query.internal.cq.CqService", "org.apache.geode.internal.cache.DistributedPutAllOperation", "org.apache.geode.internal.cache.FilterRoutingInfo" ]
import java.util.Set; import org.apache.geode.cache.query.internal.cq.CqService; import org.apache.geode.internal.cache.DistributedPutAllOperation; import org.apache.geode.internal.cache.FilterRoutingInfo;
import java.util.*; import org.apache.geode.cache.query.internal.cq.*; import org.apache.geode.internal.cache.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
505,220
public BigDecimal getTotPayr() { return totPayr; }
BigDecimal function() { return totPayr; }
/** * Gets the tot payr amount of transaction. * * @return the tot payr amount of transaction. */
Gets the tot payr amount of transaction
getTotPayr
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/core/gov/opm/scrd/entities/application/PaymentMoveTransaction.java", "license": "apache-2.0", "size": 12066 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,216,611
public static CrystallizerRecipe getChemicalCrystallizerRecipe(GasInput input) { if(input.isValid()) { HashMap<GasInput, CrystallizerRecipe> recipes = Recipe.CHEMICAL_CRYSTALLIZER.get(); CrystallizerRecipe recipe = recipes.get(input); return recipe == null ? null : recipe.copy(); } return null; ...
static CrystallizerRecipe function(GasInput input) { if(input.isValid()) { HashMap<GasInput, CrystallizerRecipe> recipes = Recipe.CHEMICAL_CRYSTALLIZER.get(); CrystallizerRecipe recipe = recipes.get(input); return recipe == null ? null : recipe.copy(); } return null; }
/** * Gets the Chemical Crystallizer Recipe for the defined Gas input. * @param input - GasInput * @return CrystallizerRecipe */
Gets the Chemical Crystallizer Recipe for the defined Gas input
getChemicalCrystallizerRecipe
{ "repo_name": "Microsoft/vsminecraft", "path": "minecraftpkg/MekanismModSample/src/main/java/mekanism/common/recipe/RecipeHandler.java", "license": "mit", "size": 21916 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,877,869
public Builder applyToAllUnaryMethods( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
Builder function( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
/** * Applies the given settings updater function to all of the unary API methods in this service. * * <p>Note: This method does not support applying settings to streaming methods. */
Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods
applyToAllUnaryMethods
{ "repo_name": "googleads/google-ads-java", "path": "google-ads-stubs-v9/src/main/java/com/google/ads/googleads/v9/services/stub/DynamicSearchAdsSearchTermViewServiceStubSettings.java", "license": "apache-2.0", "size": 12183 }
[ "com.google.api.core.ApiFunction", "com.google.api.gax.rpc.UnaryCallSettings" ]
import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.core.*; import com.google.api.gax.rpc.*;
[ "com.google.api" ]
com.google.api;
540,025
public PrintStream getShowProgressStream() { return showProgressStream; }
PrintStream function() { return showProgressStream; }
/** * Javadoc for this public method is generated via * the doc templates in the doc_src directory. */
Javadoc for this public method is generated via the doc templates in the doc_src directory
getShowProgressStream
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/je-3.2.44/src/com/sleepycat/je/VerifyConfig.java", "license": "gpl-2.0", "size": 3449 }
[ "java.io.PrintStream" ]
import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
1,939,620
public Builder put(String setting, long value, TimeUnit timeUnit) { put(setting, timeUnit.toMillis(value) + "ms"); return this; }
Builder function(String setting, long value, TimeUnit timeUnit) { put(setting, timeUnit.toMillis(value) + "ms"); return this; }
/** * Sets the setting with the provided setting key and the time value. * * @param setting The setting key * @param value The time value * @return The builder */
Sets the setting with the provided setting key and the time value
put
{ "repo_name": "fuchao01/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/settings/Settings.java", "license": "apache-2.0", "size": 52409 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,345,487
public static String formatMessage(String domain, String key, Object[] arguments) throws MissingResourceException { ResourceBundle resourceBundle = getResourceBundle(domain); if(resourceBundle == null){ init(); resourceBundle = getResourceBundle(domain); ...
static String function(String domain, String key, Object[] arguments) throws MissingResourceException { ResourceBundle resourceBundle = getResourceBundle(domain); if(resourceBundle == null){ init(); resourceBundle = getResourceBundle(domain); if(resourceBundle == null) throw new MissingResourceException(STR + domain, n...
/** * Formats a message with the specified arguments using the given * locale information. * * @param domain domain from which error string is to come. * @param key The message key. * @param arguments The message replacement text arguments. The order * ...
Formats a message with the specified arguments using the given locale information
formatMessage
{ "repo_name": "AlexBrowneP/xerces-for-android", "path": "src/mf/org/apache/xerces/dom/DOMMessageFormatter.java", "license": "apache-2.0", "size": 5360 }
[ "java.util.MissingResourceException", "java.util.ResourceBundle" ]
import java.util.MissingResourceException; import java.util.ResourceBundle;
import java.util.*;
[ "java.util" ]
java.util;
1,079,132
public String constructCompleteHtmlTag() { String completeHtmlTag; if (StringUtils.isEmpty(getHref())) completeHtmlTag = getDisplayText(); else completeHtmlTag = getPrependDisplayText() + "<a title=\"" + title + "\"" + " href=\"" + getHref() + "\"" ...
String function() { String completeHtmlTag; if (StringUtils.isEmpty(getHref())) completeHtmlTag = getDisplayText(); else completeHtmlTag = getPrependDisplayText() + STRSTR\STR href=\STR\STR STR STRSTR onClick=\STR\" ") + (StringUtils.isEmpty(getTarget()) ? "STR target=\STR\" ") + ">" + getDisplayText() + "</a>" + getAp...
/** * * This method generates anchor tag. * * @see HtmlData#constructCompleteHtmlTag() */
This method generates anchor tag
constructCompleteHtmlTag
{ "repo_name": "ricepanda/rice-git3", "path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/lookup/HtmlData.java", "license": "apache-2.0", "size": 14282 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
795,348
public @Nullable Calendar getMaxDate() { return dateSpinner.getMaxDate(); }
@Nullable Calendar function() { return dateSpinner.getMaxDate(); }
/** * Gets the current maximum allowed date for the DateSpinner. * @return The maximum date, or null if there is none. */
Gets the current maximum allowed date for the DateSpinner
getMaxDate
{ "repo_name": "SimplicityApks/ReminderDatePicker", "path": "lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/ReminderDatePicker.java", "license": "apache-2.0", "size": 19227 }
[ "android.support.annotation.Nullable", "java.util.Calendar" ]
import android.support.annotation.Nullable; import java.util.Calendar;
import android.support.annotation.*; import java.util.*;
[ "android.support", "java.util" ]
android.support; java.util;
2,641,502
public static boolean onMenuItemClicked(@NonNull Fragment fragment, int menuItemId, @NonNull FeedItem selectedItem) { @NonNull Context context = fragment.requireContext(); if (menuItemId == R.id.skip_episode_item) { IntentUtils.sendLocalBroadc...
static boolean function(@NonNull Fragment fragment, int menuItemId, @NonNull FeedItem selectedItem) { @NonNull Context context = fragment.requireContext(); if (menuItemId == R.id.skip_episode_item) { IntentUtils.sendLocalBroadcast(context, PlaybackService.ACTION_SKIP_CURRENT_EPISODE); } else if (menuItemId == R.id.remo...
/** * Default menu handling for the given FeedItem. * * A Fragment instance, (rather than the more generic Context), is needed as a parameter * to support some UI operations, e.g., creating a Snackbar. */
Default menu handling for the given FeedItem. A Fragment instance, (rather than the more generic Context), is needed as a parameter to support some UI operations, e.g., creating a Snackbar
onMenuItemClicked
{ "repo_name": "johnjohndoe/AntennaPod", "path": "app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java", "license": "mit", "size": 11960 }
[ "android.content.Context", "android.util.Log", "androidx.annotation.NonNull", "androidx.fragment.app.Fragment", "de.danoeh.antennapod.core.preferences.GpodnetPreferences", "de.danoeh.antennapod.core.preferences.PlaybackPreferences", "de.danoeh.antennapod.core.service.playback.PlaybackService", "de.dan...
import android.content.Context; import android.util.Log; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import de.danoeh.antennapod.core.preferences.GpodnetPreferences; import de.danoeh.antennapod.core.preferences.PlaybackPreferences; import de.danoeh.antennapod.core.service.playback.Playbac...
import android.content.*; import android.util.*; import androidx.annotation.*; import androidx.fragment.app.*; import de.danoeh.antennapod.core.preferences.*; import de.danoeh.antennapod.core.service.playback.*; import de.danoeh.antennapod.core.storage.*; import de.danoeh.antennapod.core.sync.*; import de.danoeh.antenn...
[ "android.content", "android.util", "androidx.annotation", "androidx.fragment", "de.danoeh.antennapod" ]
android.content; android.util; androidx.annotation; androidx.fragment; de.danoeh.antennapod;
1,996,258
public final void doRun() { try { if(thread!=null && thread.isAlive()) { logger.log(Level.INFO, name+" thread is still running. Execution aborted."); return; }
final void function() { try { if(thread!=null && thread.isAlive()) { logger.log(Level.INFO, name+STR); return; }
/** * Schedules this periodic work now in a new thread, if one isn't already running. */
Schedules this periodic work now in a new thread, if one isn't already running
doRun
{ "repo_name": "fujibee/hudson", "path": "core/src/main/java/hudson/model/AsyncPeriodicWork.java", "license": "mit", "size": 3206 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,032,587
public int execute(Map<String, String> input) { return execute(input, new HashMap<String, Object>()); }
int function(Map<String, String> input) { return execute(input, new HashMap<String, Object>()); }
/** * Executes the command. * * @param input An array of arguments and options * * @return The command exit code */
Executes the command
execute
{ "repo_name": "nanocom/console", "path": "src/main/java/org/nanocom/console/tester/CommandTester.java", "license": "mit", "size": 2923 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
916,756
public final void setDisplayName(IContext context, String displayname) { getMendixObject().setValue(context, MemberNames.DisplayName.toString(), displayname); }
final void function(IContext context, String displayname) { getMendixObject().setValue(context, MemberNames.DisplayName.toString(), displayname); }
/** * Set value of DisplayName * @param context * @param displayname */
Set value of DisplayName
setDisplayName
{ "repo_name": "mendix/MobileSlider", "path": "test/javasource/permissionsapi/proxies/AppRole.java", "license": "apache-2.0", "size": 5764 }
[ "com.mendix.systemwideinterfaces.core.IContext" ]
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.systemwideinterfaces.core.*;
[ "com.mendix.systemwideinterfaces" ]
com.mendix.systemwideinterfaces;
335,289
public void updateConfiguration(InstanceConfiguration gc) { gc.setFilePath(tfWebFilePath.getText()); }
void function(InstanceConfiguration gc) { gc.setFilePath(tfWebFilePath.getText()); }
/** * Updates the configuration to reflect the GUI * * @param gc the global configuration */
Updates the configuration to reflect the GUI
updateConfiguration
{ "repo_name": "taconaut/ums-mlx", "path": "plugins/WebDlnaFolderPlugin/src/main/java/net/pms/plugin/dlnatreefolder/web/gui/InstanceConfigurationPanel.java", "license": "gpl-2.0", "size": 4102 }
[ "net.pms.plugin.dlnatreefolder.web.configuration.InstanceConfiguration" ]
import net.pms.plugin.dlnatreefolder.web.configuration.InstanceConfiguration;
import net.pms.plugin.dlnatreefolder.web.configuration.*;
[ "net.pms.plugin" ]
net.pms.plugin;
2,597,998
private void identifyPotentialConflicts(List<CommitteeSchedule> committeeSchedules, List<Date> conflictDates) { Date scheduleDate = null; int count = 0; for(Date date : conflictDates) { count = 0; for(CommitteeSchedule committeeSchedule : committeeSchedules) { ...
void function(List<CommitteeSchedule> committeeSchedules, List<Date> conflictDates) { Date scheduleDate = null; int count = 0; for(Date date : conflictDates) { count = 0; for(CommitteeSchedule committeeSchedule : committeeSchedules) { scheduleDate = committeeSchedule.getScheduledDate(); if(DateUtils.isSameDay(date, sch...
/** * Helper method to identify potential conflicts and adds error message to map. * @param committeeSchedules * @param conflictDates */
Helper method to identify potential conflicts and adds error message to map
identifyPotentialConflicts
{ "repo_name": "sanjupolus/KC6.oLatest", "path": "coeus-impl/src/main/java/org/kuali/kra/committee/rules/CommitteeScheduleDateConflictRule.java", "license": "agpl-3.0", "size": 5442 }
[ "java.sql.Date", "java.util.List", "org.kuali.coeus.sys.framework.util.DateUtils", "org.kuali.kra.committee.bo.CommitteeSchedule", "org.kuali.kra.infrastructure.KeyConstants" ]
import java.sql.Date; import java.util.List; import org.kuali.coeus.sys.framework.util.DateUtils; import org.kuali.kra.committee.bo.CommitteeSchedule; import org.kuali.kra.infrastructure.KeyConstants;
import java.sql.*; import java.util.*; import org.kuali.coeus.sys.framework.util.*; import org.kuali.kra.committee.bo.*; import org.kuali.kra.infrastructure.*;
[ "java.sql", "java.util", "org.kuali.coeus", "org.kuali.kra" ]
java.sql; java.util; org.kuali.coeus; org.kuali.kra;
2,072,909
public boolean hasNext() throws SQLException { boolean hasNext = (this.nextRow != null); if (!hasNext && !this.streamerClosed) { this.io.closeStreamer(this); this.streamerClosed = true; } return hasNext; }
boolean function() throws SQLException { boolean hasNext = (this.nextRow != null); if (!hasNext && !this.streamerClosed) { this.io.closeStreamer(this); this.streamerClosed = true; } return hasNext; }
/** * Returns true if another row exsists. * * @return true if more rows * @throws SQLException * if a database error occurs */
Returns true if another row exsists
hasNext
{ "repo_name": "BasicOperations/vids", "path": "sql/mysql-connector-java-3.1.14/src/com/mysql/jdbc/RowDataDynamic.java", "license": "gpl-3.0", "size": 10243 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,145,864
private Result pIntegerSuffix(final int yyStart) throws IOException { int yyC; int yyIndex; Result yyResult; Void yyValue; ParseError yyError = ParseError.DUMMY; // Alternative 1. yyResult = pLongLongSuffix(yyStart); yyError = yyResult.select(yyError); if...
Result function(final int yyStart) throws IOException { int yyC; int yyIndex; Result yyResult; Void yyValue; ParseError yyError = ParseError.DUMMY; yyResult = pLongLongSuffix(yyStart); yyError = yyResult.select(yyError); if (yyResult.hasValue()) { final int yyChoice1 = yyResult.index; yyC = character(yyChoice1); if (-1...
/** * Parse nonterminal xtc.lang.CConstant.IntegerSuffix. * * @param yyStart The index. * @return The result. * @throws IOException Signals an I/O error. */
Parse nonterminal xtc.lang.CConstant.IntegerSuffix
pIntegerSuffix
{ "repo_name": "wandoulabs/xtc-rats", "path": "xtc-core/src/main/java/xtc/lang/jeannie/JeannieParser.java", "license": "lgpl-2.1", "size": 647687 }
[ "java.io.IOException", "xtc.parser.ParseError", "xtc.parser.Result", "xtc.parser.SemanticValue" ]
import java.io.IOException; import xtc.parser.ParseError; import xtc.parser.Result; import xtc.parser.SemanticValue;
import java.io.*; import xtc.parser.*;
[ "java.io", "xtc.parser" ]
java.io; xtc.parser;
2,001,326
private synchronized RemoteBundleContext getRemoteBundleContext() { if (remoteBundleContext == null) { // !! Absolutely necesary for RMI class loading to work // TODO maybe use ContextClassLoaderUtils.doWithClassLoader Thread.currentThread().setContextClassLoader(this.ge...
synchronized RemoteBundleContext function() { if (remoteBundleContext == null) { Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); LOG.info(STR + registry + STR + name + STR + rmiLookupTimeout); Throwable reason = null; long startedTrying = System.currentTimeMillis(); do { try { remoteBund...
/** * Looks up the {@link RemoteBundleContext} via RMI. The lookup will timeout in the specified * number of millis. * * @return remote bundle context */
Looks up the <code>RemoteBundleContext</code> via RMI. The lookup will timeout in the specified number of millis
getRemoteBundleContext
{ "repo_name": "ops4j/org.ops4j.pax.exam2", "path": "core/pax-exam-container-rbc-client/src/main/java/org/ops4j/pax/exam/rbc/client/intern/RemoteBundleContextClientImpl.java", "license": "apache-2.0", "size": 10398 }
[ "java.rmi.NotBoundException", "java.rmi.RemoteException", "org.ops4j.pax.exam.rbc.internal.RemoteBundleContext" ]
import java.rmi.NotBoundException; import java.rmi.RemoteException; import org.ops4j.pax.exam.rbc.internal.RemoteBundleContext;
import java.rmi.*; import org.ops4j.pax.exam.rbc.internal.*;
[ "java.rmi", "org.ops4j.pax" ]
java.rmi; org.ops4j.pax;
900,698
@Adjacency(label = FILE_REGEXES, direction = Direction.OUT) void addFileRegex(IgnoredFileRegexModel fileRegex);
@Adjacency(label = FILE_REGEXES, direction = Direction.OUT) void addFileRegex(IgnoredFileRegexModel fileRegex);
/** * Add regex used to ignore the file. */
Add regex used to ignore the file
addFileRegex
{ "repo_name": "OndraZizka/windup", "path": "rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/model/IgnoredFilesReportModel.java", "license": "epl-1.0", "size": 1573 }
[ "com.tinkerpop.blueprints.Direction", "com.tinkerpop.frames.Adjacency", "org.jboss.windup.graph.model.report.IgnoredFileRegexModel" ]
import com.tinkerpop.blueprints.Direction; import com.tinkerpop.frames.Adjacency; import org.jboss.windup.graph.model.report.IgnoredFileRegexModel;
import com.tinkerpop.blueprints.*; import com.tinkerpop.frames.*; import org.jboss.windup.graph.model.report.*;
[ "com.tinkerpop.blueprints", "com.tinkerpop.frames", "org.jboss.windup" ]
com.tinkerpop.blueprints; com.tinkerpop.frames; org.jboss.windup;
2,068,555