method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void setBitsPerCoordinate(int bitsPerCoordinate) { getCOSObject().setInt(COSName.BITS_PER_COORDINATE, bitsPerCoordinate); this.bitsPerCoordinate = bitsPerCoordinate; }
void function(int bitsPerCoordinate) { getCOSObject().setInt(COSName.BITS_PER_COORDINATE, bitsPerCoordinate); this.bitsPerCoordinate = bitsPerCoordinate; }
/** * Set the number of bits per coordinate. * * @param bitsPerCoordinate the number of bits per coordinate */
Set the number of bits per coordinate
setBitsPerCoordinate
{ "repo_name": "kalaspuffar/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PDTriangleBasedShadingType.java", "license": "apache-2.0", "size": 8726 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
865,397
public Set<DistributedMember> getMembers();
Set<DistributedMember> function();
/** * Returns a set of the other non-administrative members in the distributed system. * @since 6.6 */
Returns a set of the other non-administrative members in the distributed system
getMembers
{ "repo_name": "rvs/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/Cache.java", "license": "apache-2.0", "size": 17099 }
[ "com.gemstone.gemfire.distributed.DistributedMember", "java.util.Set" ]
import com.gemstone.gemfire.distributed.DistributedMember; import java.util.Set;
import com.gemstone.gemfire.distributed.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
1,205,967
public static String getOutputPath(Properties properties, DataStore<?,?> store) { return findProperty(properties, store, OUTPUT_PATH, null); }
static String function(Properties properties, DataStore<?,?> store) { return findProperty(properties, store, OUTPUT_PATH, null); }
/** * Returns the output path as read from the properties for file-backed data stores. */
Returns the output path as read from the properties for file-backed data stores
getOutputPath
{ "repo_name": "enis/gora", "path": "gora-core/src/main/java/org/gora/store/DataStoreFactory.java", "license": "apache-2.0", "size": 10884 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,885,762
@Test public void testCopyNodes() { GeoServerInput input = new GeoServerInput(null); GeoServerInput.overrideGeoServerClientClass(DummyGeoServerClient.class); FSTree tree = new FSTree(); DefaultMutableTreeNode rootNode; rootNode = new DefaultMutableTreeNode("Root"); ...
void function() { GeoServerInput input = new GeoServerInput(null); GeoServerInput.overrideGeoServerClientClass(DummyGeoServerClient.class); FSTree tree = new FSTree(); DefaultMutableTreeNode rootNode; rootNode = new DefaultMutableTreeNode("Root"); DefaultTreeModel model = new DefaultTreeModel(rootNode); input.populate(...
/** * Test method for {@link * com.sldeditor.extension.filesystem.geoserver.GeoServerInput#copyNodes(com.sldeditor.common.NodeInterface, * java.util.Map)}. */
Test method for <code>com.sldeditor.extension.filesystem.geoserver.GeoServerInput#copyNodes(com.sldeditor.common.NodeInterface, java.util.Map)</code>
testCopyNodes
{ "repo_name": "robward-scisys/sldeditor", "path": "modules/application/src/test/java/com/sldeditor/test/unit/extension/filesystem/geoserver/GeoServerInputTest.java", "license": "gpl-3.0", "size": 28982 }
[ "com.sldeditor.common.NodeInterface", "com.sldeditor.common.SLDDataInterface", "com.sldeditor.common.data.GeoServerConnection", "com.sldeditor.common.data.SLDData", "com.sldeditor.common.data.StyleWrapper", "com.sldeditor.datasource.extension.filesystem.node.FSTree", "com.sldeditor.datasource.extension....
import com.sldeditor.common.NodeInterface; import com.sldeditor.common.SLDDataInterface; import com.sldeditor.common.data.GeoServerConnection; import com.sldeditor.common.data.SLDData; import com.sldeditor.common.data.StyleWrapper; import com.sldeditor.datasource.extension.filesystem.node.FSTree; import com.sldeditor.d...
import com.sldeditor.common.*; import com.sldeditor.common.data.*; import com.sldeditor.datasource.extension.filesystem.node.*; import com.sldeditor.datasource.extension.filesystem.node.geoserver.*; import com.sldeditor.extension.filesystem.geoserver.*; import com.sldeditor.test.unit.extension.filesystem.file.sld.*; im...
[ "com.sldeditor.common", "com.sldeditor.datasource", "com.sldeditor.extension", "com.sldeditor.test", "java.util", "javax.swing", "org.junit.jupiter" ]
com.sldeditor.common; com.sldeditor.datasource; com.sldeditor.extension; com.sldeditor.test; java.util; javax.swing; org.junit.jupiter;
1,665,587
public void forceCommit() throws IgniteCheckedException { commitIfLocked(); }
void function() throws IgniteCheckedException { commitIfLocked(); }
/** * Forces commit for this tx. * * @throws IgniteCheckedException If commit failed. */
Forces commit for this tx
forceCommit
{ "repo_name": "rfqu/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java", "license": "apache-2.0", "size": 38919 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,109,395
public Shape3F getShape() { return this.shape; }
Shape3F function() { return this.shape; }
/** * Returns the {@link Shape3F} instance associated with this {@code Primitive} instance. * * @return the {@code Shape3F} instance associated with this {@code Primitive} instance */
Returns the <code>Shape3F</code> instance associated with this Primitive instance
getShape
{ "repo_name": "macroing/Dayflower", "path": "src/main/java/org/dayflower/scene/Primitive.java", "license": "lgpl-3.0", "size": 30952 }
[ "org.dayflower.geometry.Shape3F" ]
import org.dayflower.geometry.Shape3F;
import org.dayflower.geometry.*;
[ "org.dayflower.geometry" ]
org.dayflower.geometry;
423,709
public void setTestInput(File testInput) { this.testInput = testInput; }
void function(File testInput) { this.testInput = testInput; }
/** Set the input file for tests. * * @param testInput the testInput to set */
Set the input file for tests
setTestInput
{ "repo_name": "gallandarakhneorg/sarl", "path": "eclipse-sarl/plugins/io.sarl.m2e/src/io/sarl/m2e/SARLConfiguration.java", "license": "apache-2.0", "size": 4511 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,881,129
public static boolean bytesWriteObject(ActiveMQBuffer message, Object value) { if (value == null) { throw new NullPointerException("Attempt to write a null value"); } if (value instanceof String) { bytesWriteUTF(message, (String) value); } else if (value instanceof Boolean) ...
static boolean function(ActiveMQBuffer message, Object value) { if (value == null) { throw new NullPointerException(STR); } if (value instanceof String) { bytesWriteUTF(message, (String) value); } else if (value instanceof Boolean) { bytesWriteBoolean(message, (Boolean) value); } else if (value instanceof Character) { ...
/** * Returns true if it could send the Object to any known format * * @param message * @param value * @return */
Returns true if it could send the Object to any known format
bytesWriteObject
{ "repo_name": "franz1981/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/reader/BytesMessageUtil.java", "license": "apache-2.0", "size": 5471 }
[ "org.apache.activemq.artemis.api.core.ActiveMQBuffer" ]
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.*;
[ "org.apache.activemq" ]
org.apache.activemq;
1,622,481
@Test public void whenMethodsEqualsAndHashcodeRedefined() { Calendar birthdayfirst = new GregorianCalendar(1977, 5, 7); Calendar birthdaysecond = new GregorianCalendar(1977, 5, 7); User4 first = new User4("Evgen", 30, birthdayfirst); User4 second = new User4("Evgen", 30, birthday...
void function() { Calendar birthdayfirst = new GregorianCalendar(1977, 5, 7); Calendar birthdaysecond = new GregorianCalendar(1977, 5, 7); User4 first = new User4("Evgen", 30, birthdayfirst); User4 second = new User4("Evgen", 30, birthdaysecond); Map<User4, Object> map = new HashMap<>(); map.put(first, null); map.put(s...
/** * Test the map when the methods equals() and hashcode() is redefined. */
Test the map when the methods equals() and hashcode() is redefined
whenMethodsEqualsAndHashcodeRedefined
{ "repo_name": "evgenymatveev/Task", "path": "chapter_005/src/test/java/ru/ematveev/map/UserTest.java", "license": "apache-2.0", "size": 2455 }
[ "java.util.Calendar", "java.util.GregorianCalendar", "java.util.HashMap", "java.util.Map" ]
import java.util.Calendar; import java.util.GregorianCalendar; import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,842,498
List<AbstractFinance> findByPrivateEntity_Id(Integer privateEntityId);
List<AbstractFinance> findByPrivateEntity_Id(Integer privateEntityId);
/** * Find by privateEntity. * * @param privateEntityId */
Find by privateEntity
findByPrivateEntity_Id
{ "repo_name": "eldevanjr/helianto-finance", "path": "src/main/java/org/helianto/finance/repository/AbstractFinanceRepository.java", "license": "apache-2.0", "size": 10914 }
[ "java.util.List", "org.helianto.finance.domain.AbstractFinance" ]
import java.util.List; import org.helianto.finance.domain.AbstractFinance;
import java.util.*; import org.helianto.finance.domain.*;
[ "java.util", "org.helianto.finance" ]
java.util; org.helianto.finance;
1,993,121
final String identifier = RandomStringUtils.randomAlphanumeric(10);
final String identifier = RandomStringUtils.randomAlphanumeric(10);
/** * Tests if PsFacebook can call DefaultFacebookClient APIs. * @throws Exception if any error occurs */
Tests if PsFacebook can call DefaultFacebookClient APIs
canLogin
{ "repo_name": "essobedo/takes", "path": "src/test/java/org/takes/facets/auth/social/PsFacebookTest.java", "license": "mit", "size": 3582 }
[ "org.apache.commons.lang.RandomStringUtils" ]
import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
792,927
void delete(long requestID) throws SQLException;
void delete(long requestID) throws SQLException;
/** * Deletes the request with the supplied ID from the database. * * @param requestID The ID of the episode to delete. * @throws java.sql.SQLException */
Deletes the request with the supplied ID from the database
delete
{ "repo_name": "pveeckhout/TimeCloud", "path": "src/timecloud/dao/request/RequestDAO.java", "license": "mit", "size": 3958 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,091,092
public GridLoadBalancerManager loadBalancing();
GridLoadBalancerManager function();
/** * Gets load balancing manager. * * @return Load balancing manager. */
Gets load balancing manager
loadBalancing
{ "repo_name": "ryanzz/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java", "license": "apache-2.0", "size": 15904 }
[ "org.apache.ignite.internal.managers.loadbalancer.GridLoadBalancerManager" ]
import org.apache.ignite.internal.managers.loadbalancer.GridLoadBalancerManager;
import org.apache.ignite.internal.managers.loadbalancer.*;
[ "org.apache.ignite" ]
org.apache.ignite;
779,218
private static Intent createIntentForSingleWebsitePreferences( Context context, String url, @SettingsNavigationSource int navigationSource) { Bundle args = SingleWebsiteSettings.createFragmentArgsForSite(url); args.putInt(SettingsNavigationSource.EXTRA_KEY, navigationSource); Set...
static Intent function( Context context, String url, @SettingsNavigationSource int navigationSource) { Bundle args = SingleWebsiteSettings.createFragmentArgsForSite(url); args.putInt(SettingsNavigationSource.EXTRA_KEY, navigationSource); SettingsLauncher settingsLauncher = new SettingsLauncherImpl(); return settingsLau...
/** * Creates an intent to launch single website preferences for the specified {@param url}. */
Creates an intent to launch single website preferences for the specified url
createIntentForSingleWebsitePreferences
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivitySettingsLauncher.java", "license": "bsd-3-clause", "size": 4876 }
[ "android.content.Context", "android.content.Intent", "android.os.Bundle", "org.chromium.chrome.browser.settings.SettingsLauncher", "org.chromium.chrome.browser.settings.SettingsLauncherImpl", "org.chromium.components.browser_ui.site_settings.SettingsNavigationSource", "org.chromium.components.browser_ui...
import android.content.Context; import android.content.Intent; import android.os.Bundle; import org.chromium.chrome.browser.settings.SettingsLauncher; import org.chromium.chrome.browser.settings.SettingsLauncherImpl; import org.chromium.components.browser_ui.site_settings.SettingsNavigationSource; import org.chromium.c...
import android.content.*; import android.os.*; import org.chromium.chrome.browser.settings.*; import org.chromium.components.browser_ui.site_settings.*;
[ "android.content", "android.os", "org.chromium.chrome", "org.chromium.components" ]
android.content; android.os; org.chromium.chrome; org.chromium.components;
1,146,696
private void publish(GenericRecord message) throws IOException { if (!_keepStreaming) { return; } _producer.produce(_topicName, message.toString().getBytes(StandardCharsets.UTF_8)); }
void function(GenericRecord message) throws IOException { if (!_keepStreaming) { return; } _producer.produce(_topicName, message.toString().getBytes(StandardCharsets.UTF_8)); }
/** * Publishes the message to the kafka topic */
Publishes the message to the kafka topic
publish
{ "repo_name": "linkedin/pinot", "path": "pinot-tools/src/main/java/org/apache/pinot/tools/streams/githubevents/PullRequestMergedEventsStream.java", "license": "apache-2.0", "size": 12864 }
[ "java.io.IOException", "java.nio.charset.StandardCharsets", "org.apache.avro.generic.GenericRecord" ]
import java.io.IOException; import java.nio.charset.StandardCharsets; import org.apache.avro.generic.GenericRecord;
import java.io.*; import java.nio.charset.*; import org.apache.avro.generic.*;
[ "java.io", "java.nio", "org.apache.avro" ]
java.io; java.nio; org.apache.avro;
2,627,472
@SuppressWarnings("unused") public Root getMiddlemanDirectory(RepositoryName repositoryName) { return outputRoots.middlemanDirectory; }
@SuppressWarnings(STR) Root function(RepositoryName repositoryName) { return outputRoots.middlemanDirectory; }
/** * Returns the internal directory (used for middlemen) for this build configuration. * TODO(kchodorow): Use the repository name to derive the middleman directory. */
Returns the internal directory (used for middlemen) for this build configuration. TODO(kchodorow): Use the repository name to derive the middleman directory
getMiddlemanDirectory
{ "repo_name": "mrdomino/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java", "license": "apache-2.0", "size": 96280 }
[ "com.google.devtools.build.lib.actions.Root", "com.google.devtools.build.lib.cmdline.RepositoryName" ]
import com.google.devtools.build.lib.actions.Root; import com.google.devtools.build.lib.cmdline.RepositoryName;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.cmdline.*;
[ "com.google.devtools" ]
com.google.devtools;
1,687,031
@Factory public static <T extends Comparable<T>> Matcher<? super T> lessThan(T value) { return new OrderingComparison<T>(value, 1, 1); }
static <T extends Comparable<T>> Matcher<? super T> function(T value) { return new OrderingComparison<T>(value, 1, 1); }
/** * Is value < expected? */
Is value < expected
lessThan
{ "repo_name": "nagyist/marketcetera", "path": "trunk/core/src/test/java/org/marketcetera/core/position/impl/OrderingComparison.java", "license": "apache-2.0", "size": 2733 }
[ "org.hamcrest.Matcher" ]
import org.hamcrest.Matcher;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
128,893
private void recalculateContentBounds() { this.childRect.set(0, 0, 0, 0); for(int i = 0; i < this.contents.getChildCount(); i++) { IEntity child = this.contents.getChildByIndex(i); //Debug.d("Scrollable Recalculating with child: "+child); final float childLeft = c...
void function() { this.childRect.set(0, 0, 0, 0); for(int i = 0; i < this.contents.getChildCount(); i++) { IEntity child = this.contents.getChildByIndex(i); final float childLeft = child.getX()-(child.getWidth()/2)-this.padding; final float childRight = child.getX()+(child.getWidth()/2)+this.padding; final float childB...
/** * Recalculate the ChildRect values for child Entities * Whenever an Entity is added or removed from the Scrollable, it's ChildRect needs to be * re-calculated to find the new boundary rectangle that will contain them */
Recalculate the ChildRect values for child Entities Whenever an Entity is added or removed from the Scrollable, it's ChildRect needs to be re-calculated to find the new boundary rectangle that will contain them
recalculateContentBounds
{ "repo_name": "mhall119/Phoenicia", "path": "app/src/main/java/com/linguaculturalists/phoenicia/components/Scrollable.java", "license": "gpl-3.0", "size": 21228 }
[ "org.andengine.entity.IEntity" ]
import org.andengine.entity.IEntity;
import org.andengine.entity.*;
[ "org.andengine.entity" ]
org.andengine.entity;
2,176,851
public static final List<Isbn13TestBean> getNotNumericTestBeans() { final List<Isbn13TestBean> wrongCases = new ArrayList<Isbn13TestBean>(); wrongCases.add(new Isbn13TestBean("978383621803Y")); return wrongCases; }
static final List<Isbn13TestBean> function() { final List<Isbn13TestBean> wrongCases = new ArrayList<Isbn13TestBean>(); wrongCases.add(new Isbn13TestBean(STR)); return wrongCases; }
/** * get wrong test beans. * * @return wrong test beans */
get wrong test beans
getNotNumericTestBeans
{ "repo_name": "ManfredTremmel/mt-bean-validators", "path": "src/test/java/de/knightsoftnet/validators/shared/testcases/Isbn13TestCases.java", "license": "apache-2.0", "size": 2999 }
[ "de.knightsoftnet.validators.shared.beans.Isbn13TestBean", "java.util.ArrayList", "java.util.List" ]
import de.knightsoftnet.validators.shared.beans.Isbn13TestBean; import java.util.ArrayList; import java.util.List;
import de.knightsoftnet.validators.shared.beans.*; import java.util.*;
[ "de.knightsoftnet.validators", "java.util" ]
de.knightsoftnet.validators; java.util;
13,006
@Override protected void printAggregates() { printRetrieveStudyAggregates(queryInstancesAggregates, firstResponseAggregates, firstFrameAggregates, totalAggregates, transferRateAggregates, frameRateAggregates); } private static final ObjectMapper MAPPER = new ObjectMapper() .configure(Des...
void function() { printRetrieveStudyAggregates(queryInstancesAggregates, firstResponseAggregates, firstFrameAggregates, totalAggregates, transferRateAggregates, frameRateAggregates); } private static final ObjectMapper MAPPER = new ObjectMapper() .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
/** * Prints calculated aggregates for all iterations to stdout. */
Prints calculated aggregates for all iterations to stdout
printAggregates
{ "repo_name": "GoogleCloudPlatform/healthcare-imaging-performance-test", "path": "src/main/java/com/google/chcapi/perfdiag/benchmark/RetrieveStudyBenchmark.java", "license": "apache-2.0", "size": 9824 }
[ "com.fasterxml.jackson.databind.DeserializationFeature", "com.fasterxml.jackson.databind.ObjectMapper" ]
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
2,666,496
private void updateActionMap(UIDL uidl) { final Iterator<?> it = uidl.getChildIterator(); while (it.hasNext()) { final UIDL action = (UIDL) it.next(); final String key = action.getStringAttribute("key"); final String caption = action .getString...
void function(UIDL uidl) { final Iterator<?> it = uidl.getChildIterator(); while (it.hasNext()) { final UIDL action = (UIDL) it.next(); final String key = action.getStringAttribute("key"); final String caption = action .getStringAttribute(TreeConstants.ATTRIBUTE_ACTION_CAPTION); String iconUrl = null; if (action.hasAtt...
/** * Registers action for the root and also for individual nodes * * @param uidl */
Registers action for the root and also for individual nodes
updateActionMap
{ "repo_name": "jdahlstrom/vaadin.react", "path": "client/src/main/java/com/vaadin/client/ui/tree/TreeConnector.java", "license": "apache-2.0", "size": 14379 }
[ "com.vaadin.shared.ui.tree.TreeConstants", "java.util.Iterator" ]
import com.vaadin.shared.ui.tree.TreeConstants; import java.util.Iterator;
import com.vaadin.shared.ui.tree.*; import java.util.*;
[ "com.vaadin.shared", "java.util" ]
com.vaadin.shared; java.util;
2,176,130
List<Object> commandInfo(CommandType... commands);
List<Object> commandInfo(CommandType... commands);
/** * Returns an array reply of details about the requested commands. * * @param commands the commands to query for. * @return List&lt;Object&gt; array-reply. */
Returns an array reply of details about the requested commands
commandInfo
{ "repo_name": "lettuce-io/lettuce-core", "path": "src/main/templates/io/lettuce/core/api/RedisServerCommands.java", "license": "apache-2.0", "size": 12183 }
[ "io.lettuce.core.protocol.CommandType", "java.util.List" ]
import io.lettuce.core.protocol.CommandType; import java.util.List;
import io.lettuce.core.protocol.*; import java.util.*;
[ "io.lettuce.core", "java.util" ]
io.lettuce.core; java.util;
776,804
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync( String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage, Context context) { if (this.client.getEndpoint() =...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.c...
/** * Update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. * @param galleryImageName The name of the gallery Image Definition to be updated. The a...
Update a gallery Image Definition
updateWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesClientImpl.java", "license": "mit", "size": 76471 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.compute.models.GalleryImageUpdate", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.compute.models.GalleryImageUpdate; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
2,179,805
public static URI fromNormalizedSchemeAuthorityAndPathQuery( final String schemeAuthority, final byte[] normalizedPathQuery ) { final char[] array = new char[ schemeAuthority.length() + normalizedPathQuery.length ]; schemeAuthority.getChars( 0, schemeAuthority.length(), array, 0 ); for( int i = array.length, j...
static URI function( final String schemeAuthority, final byte[] normalizedPathQuery ) { final char[] array = new char[ schemeAuthority.length() + normalizedPathQuery.length ]; schemeAuthority.getChars( 0, schemeAuthority.length(), array, 0 ); for( int i = array.length, j = normalizedPathQuery.length; j-- != 0; ) array[...
/** Creates a new BUbiNG URL from a normalized ASCII string representing scheme and * authority and a byte-array representation of a normalized ASCII path and query. * * <p>This method is intended to combine the results of {@link #schemeAndAuthority(URI)}/ * {@link #schemeAndAuthority(byte[])} and {@link #path...
Creates a new BUbiNG URL from a normalized ASCII string representing scheme and authority and a byte-array representation of a normalized ASCII path and query. This method is intended to combine the results of <code>#schemeAndAuthority(URI)</code> <code>#schemeAndAuthority(byte[])</code> and <code>#pathAndQueryAsByteAr...
fromNormalizedSchemeAuthorityAndPathQuery
{ "repo_name": "iskoda/Bubing-crawler-BUT", "path": "src/it/unimi/di/law/bubing/util/BURL.java", "license": "lgpl-3.0", "size": 22718 }
[ "java.net.URI" ]
import java.net.URI;
import java.net.*;
[ "java.net" ]
java.net;
2,101,327
@SuppressWarnings("deprecation") private Set<String> findAllTopics() throws IOException { Set<String> topics = Sets.newHashSet(); List<Pattern> blacklist = getBlacklist(); List<Pattern> whitelist = getWhitelist(); for (FileStatus status : this.fs.listStatus(new Path(this.inputDir))) { if (stat...
@SuppressWarnings(STR) Set<String> function() throws IOException { Set<String> topics = Sets.newHashSet(); List<Pattern> blacklist = getBlacklist(); List<Pattern> whitelist = getWhitelist(); for (FileStatus status : this.fs.listStatus(new Path(this.inputDir))) { if (status.isDir()) { String topic = status.getPath().get...
/** * Each subdir name in this.inputDir is considered a topic, if it satisfies * blacklist and whitelist. */
Each subdir name in this.inputDir is considered a topic, if it satisfies blacklist and whitelist
findAllTopics
{ "repo_name": "slietz/gobblin", "path": "gobblin-compaction/src/main/java/gobblin/compaction/mapreduce/MRCompactor.java", "license": "apache-2.0", "size": 12451 }
[ "com.google.common.collect.Sets", "java.io.IOException", "java.util.List", "java.util.Set", "java.util.regex.Pattern", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.Path" ]
import com.google.common.collect.Sets; import java.io.IOException; import java.util.List; import java.util.Set; import java.util.regex.Pattern; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path;
import com.google.common.collect.*; import java.io.*; import java.util.*; import java.util.regex.*; import org.apache.hadoop.fs.*;
[ "com.google.common", "java.io", "java.util", "org.apache.hadoop" ]
com.google.common; java.io; java.util; org.apache.hadoop;
2,006,184
@Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater li = (LayoutInflater) this.context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = li.inflate(this.resource, null); return convertView; }
View function(int position, View convertView, ViewGroup parent) { LayoutInflater li = (LayoutInflater) this.context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = li.inflate(this.resource, null); return convertView; }
/** * Questa funzione effettua l'override della preesistente lato Android. * Tuttavia le sottoclassi dovranno ora richiamare sempre questa funzione. */
Questa funzione effettua l'override della preesistente lato Android. Tuttavia le sottoclassi dovranno ora richiamare sempre questa funzione
getView
{ "repo_name": "jackbergus/Amppercent7", "path": "src/my/amppercent/adapters/AdapterElems.java", "license": "gpl-3.0", "size": 2851 }
[ "android.content.Context", "android.view.LayoutInflater", "android.view.View", "android.view.ViewGroup" ]
import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
1,098,094
public static <T> T unmarshall(Properties properties, T defaultValues, Adapter<?, ?>... adapters) throws IOException { HierarchicProperties<T> p = new HierarchicProperties<T>(defaultValues, adapters); properties.forEach((k, v) -> p.put(k, v)); return p.properties; } ...
static <T> T function(Properties properties, T defaultValues, Adapter<?, ?>... adapters) throws IOException { HierarchicProperties<T> p = new HierarchicProperties<T>(defaultValues, adapters); properties.forEach((k, v) -> p.put(k, v)); return p.properties; } @SuppressWarnings(STR) static class HierarchicProperties<T> ex...
/** * Unmarshall existing properties to a tree of objects. * * @param properties The existing properties. * @param defaultValues The target object (tree root) for receiving values. * @param adapters Optionally, allow to map string values to items or list of items for specific classes or keys. ...
Unmarshall existing properties to a tree of objects
unmarshall
{ "repo_name": "alternet/alternet.ml", "path": "tools/src/main/java/ml/alternet/properties/Binder.java", "license": "mit", "size": 31962 }
[ "java.io.IOException", "java.util.Hashtable", "java.util.Properties", "java.util.function.Function", "java.util.logging.Logger", "java.util.regex.Pattern", "ml.alternet.misc.Thrower" ]
import java.io.IOException; import java.util.Hashtable; import java.util.Properties; import java.util.function.Function; import java.util.logging.Logger; import java.util.regex.Pattern; import ml.alternet.misc.Thrower;
import java.io.*; import java.util.*; import java.util.function.*; import java.util.logging.*; import java.util.regex.*; import ml.alternet.misc.*;
[ "java.io", "java.util", "ml.alternet.misc" ]
java.io; java.util; ml.alternet.misc;
1,034,626
@Test public void wrongDataLengthTest() { final double[] xValues = new double[] {1, 2, 3}; final double[] yValues = new double[] {2, 3, 4, 5}; CubicSplineInterpolator interp = new CubicSplineInterpolator(); assertThatIllegalArgumentException() .isThrownBy(() -> interp.interpolate(xValues, ...
void function() { final double[] xValues = new double[] {1, 2, 3}; final double[] yValues = new double[] {2, 3, 4, 5}; CubicSplineInterpolator interp = new CubicSplineInterpolator(); assertThatIllegalArgumentException() .isThrownBy(() -> interp.interpolate(xValues, yValues)); }
/** * (yValues length) == (xValues length) + 2 or (yValues length) == (xValues length) should be satisfied */
(yValues length) == (xValues length) + 2 or (yValues length) == (xValues length) should be satisfied
wrongDataLengthTest
{ "repo_name": "OpenGamma/Strata", "path": "modules/math/src/test/java/com/opengamma/strata/math/impl/interpolation/CubicSplineInterpolatorTest.java", "license": "apache-2.0", "size": 34658 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
977,003
private static List<Feed> getFeeds(AdWordsServices adWordsServices, AdWordsSession session) throws Exception { FeedServiceInterface feedService = adWordsServices.get(session, FeedServiceInterface.class); String query = "SELECT Id, Name, Attributes WHERE Origin = 'USER' AND FeedStatus = 'ENABLED'"; ...
static List<Feed> function(AdWordsServices adWordsServices, AdWordsSession session) throws Exception { FeedServiceInterface feedService = adWordsServices.get(session, FeedServiceInterface.class); String query = STR; List<Feed> feeds = Lists.newArrayList(); int offset = 0; FeedPage feedPage; do { String pageQuery = Stri...
/** * Returns a list of all enabled feeds. */
Returns a list of all enabled feeds
getFeeds
{ "repo_name": "raja15792/googleads-java-lib", "path": "examples/adwords_axis/src/main/java/adwords/axis/v201506/migration/MigrateToExtensionSettings.java", "license": "apache-2.0", "size": 23090 }
[ "com.google.api.ads.adwords.axis.factory.AdWordsServices", "com.google.api.ads.adwords.axis.v201506.cm.Feed", "com.google.api.ads.adwords.axis.v201506.cm.FeedPage", "com.google.api.ads.adwords.axis.v201506.cm.FeedServiceInterface", "com.google.api.ads.adwords.lib.client.AdWordsSession", "com.google.common...
import com.google.api.ads.adwords.axis.factory.AdWordsServices; import com.google.api.ads.adwords.axis.v201506.cm.Feed; import com.google.api.ads.adwords.axis.v201506.cm.FeedPage; import com.google.api.ads.adwords.axis.v201506.cm.FeedServiceInterface; import com.google.api.ads.adwords.lib.client.AdWordsSession; import ...
import com.google.api.ads.adwords.axis.factory.*; import com.google.api.ads.adwords.axis.v201506.cm.*; import com.google.api.ads.adwords.lib.client.*; import com.google.common.collect.*; import java.util.*;
[ "com.google.api", "com.google.common", "java.util" ]
com.google.api; com.google.common; java.util;
2,087,059
void _processDont(int option) throws IOException { if (debugoptions) { System.err.println("RECEIVED DONT: " + TelnetOption.getOption(option)); } if (__notifhand != null) { __notifhand.receivedNegotiation( TelnetNotif...
void _processDont(int option) throws IOException { if (debugoptions) { System.err.println(STR + TelnetOption.getOption(option)); } if (__notifhand != null) { __notifhand.receivedNegotiation( TelnetNotificationHandler.RECEIVED_DONT, option); } if (_willResponse[option] > 0) { --_willResponse[option]; if (_willResponse[o...
/** * Processes a DONT request. * * @param option - option code to be set. * @throws IOException - Exception in I/O. **/
Processes a DONT request
_processDont
{ "repo_name": "chenxiwen/CommonShellUtils", "path": "src/main/java/org/apache/commons/net/telnet/Telnet.java", "license": "apache-2.0", "size": 33916 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,302,344
private void ordinalRecognizer(List<CoreLabel> tokenSequence) { for (CoreLabel crt : tokenSequence) { if ((crt.get(CoreAnnotations.AnswerAnnotation.class).equals(flags.backgroundSymbol) || crt.get(CoreAnnotations.AnswerAnnotation.class).equals("NUMBER")) && ORDINAL_PATTERN.matche...
void function(List<CoreLabel> tokenSequence) { for (CoreLabel crt : tokenSequence) { if ((crt.get(CoreAnnotations.AnswerAnnotation.class).equals(flags.backgroundSymbol) crt.get(CoreAnnotations.AnswerAnnotation.class).equals(STR)) && ORDINAL_PATTERN.matcher(crt.word()).matches()) { crt.set(CoreAnnotations.AnswerAnnotati...
/** * Recognizes ordinal numbers * @param tokenSequence */
Recognizes ordinal numbers
ordinalRecognizer
{ "repo_name": "rssr25/CoreNLP", "path": "src/edu/stanford/nlp/ie/regexp/NumberSequenceClassifier.java", "license": "gpl-2.0", "size": 38668 }
[ "edu.stanford.nlp.ling.CoreAnnotations", "edu.stanford.nlp.ling.CoreLabel", "java.util.List" ]
import edu.stanford.nlp.ling.CoreAnnotations; import edu.stanford.nlp.ling.CoreLabel; import java.util.List;
import edu.stanford.nlp.ling.*; import java.util.*;
[ "edu.stanford.nlp", "java.util" ]
edu.stanford.nlp; java.util;
837,819
private void setCurrentFile(AbstractFile file) { this.currentFile = file; // Update current file information returned by getCurrentFilename() this.currentFilename = "'" + file.getName() + "'"; }
void function(AbstractFile file) { this.currentFile = file; this.currentFilename = "'" + file.getName() + "'"; }
/** * Sets the file currently being processed. * @param file the file currently being processed. */
Sets the file currently being processed
setCurrentFile
{ "repo_name": "Keltek/mucommander", "path": "src/main/com/mucommander/job/FileJob.java", "license": "gpl-3.0", "size": 33807 }
[ "com.mucommander.commons.file.AbstractFile" ]
import com.mucommander.commons.file.AbstractFile;
import com.mucommander.commons.file.*;
[ "com.mucommander.commons" ]
com.mucommander.commons;
1,963,166
public @Nullable SslOptions getSsl() { return ssl; }
@Nullable SslOptions function() { return ssl; }
/** * SSL options. * * @return SSL options. */
SSL options
getSsl
{ "repo_name": "jooby-project/jooby", "path": "jooby/src/main/java/io/jooby/ServerOptions.java", "license": "apache-2.0", "size": 17341 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,834,303
View getView();
View getView();
/** * Returns the View that represents this infobar. This should have no background or borders; * a background and shadow will be added by a wrapper view. */
Returns the View that represents this infobar. This should have no background or borders; a background and shadow will be added by a wrapper view
getView
{ "repo_name": "js0701/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainerLayout.java", "license": "bsd-3-clause", "size": 23144 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
775,554
InputStream inStream = null; try { inStream = new FileInputStream(filename); final Yaml yaml = new Yaml(); yaml.load(inStream); // TODO parse given Object to CompilationUnit inStream.close(); } catch (final FileNotFoundException e) { // TODO Auto-generated catch block Conso...
InputStream inStream = null; try { inStream = new FileInputStream(filename); final Yaml yaml = new Yaml(); yaml.load(inStream); inStream.close(); } catch (final FileNotFoundException e) { ConsoleUtils.displayError(e); } catch (final IOException e) { ConsoleUtils.displayError(e); } }
/** * Load the entities in the Yaml file <filename>. * @param filename The filename to load. */
Load the entities in the Yaml file
loadEntities
{ "repo_name": "TACTfactory/harmony-core", "path": "src/com/tactfactory/harmony/parser/yml/YamlModelParser.java", "license": "mit", "size": 1236 }
[ "com.tactfactory.harmony.utils.ConsoleUtils", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.io.InputStream", "org.yaml.snakeyaml.Yaml" ]
import com.tactfactory.harmony.utils.ConsoleUtils; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import org.yaml.snakeyaml.Yaml;
import com.tactfactory.harmony.utils.*; import java.io.*; import org.yaml.snakeyaml.*;
[ "com.tactfactory.harmony", "java.io", "org.yaml.snakeyaml" ]
com.tactfactory.harmony; java.io; org.yaml.snakeyaml;
788,943
@Adjacency(label = GLOBAL_JNDI, direction = Direction.OUT) JNDIResourceModel getGlobalJndiReference();
@Adjacency(label = GLOBAL_JNDI, direction = Direction.OUT) JNDIResourceModel getGlobalJndiReference();
/** * Contains the global jndi location for this resource. */
Contains the global jndi location for this resource
getGlobalJndiReference
{ "repo_name": "mareknovotny/windup", "path": "rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/model/EjbSessionBeanModel.java", "license": "epl-1.0", "size": 4745 }
[ "com.tinkerpop.blueprints.Direction", "com.tinkerpop.frames.Adjacency" ]
import com.tinkerpop.blueprints.Direction; import com.tinkerpop.frames.Adjacency;
import com.tinkerpop.blueprints.*; import com.tinkerpop.frames.*;
[ "com.tinkerpop.blueprints", "com.tinkerpop.frames" ]
com.tinkerpop.blueprints; com.tinkerpop.frames;
1,234,040
return startDate; } /** * Sets the value of the startDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar }
return startDate; } /** * Sets the value of the startDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar }
/** * Gets the value of the startDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */
Gets the value of the startDate property
getStartDate
{ "repo_name": "simokhov/schemas44", "path": "src/main/java/ru/gov/zakupki/oos/types/_1/ZfcsPurchaseProcedureCollectingType.java", "license": "mit", "size": 4111 }
[ "javax.xml.datatype.XMLGregorianCalendar" ]
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.datatype.*;
[ "javax.xml" ]
javax.xml;
196,967
public void addDomainCrosshair(Crosshair crosshair) { Args.nullNotPermitted(crosshair, "crosshair"); this.xCrosshairs.add(crosshair); crosshair.addPropertyChangeListener(this); fireOverlayChanged(); } /** * Removes a domain axis crosshair and sends an {@link OverlayChan...
void function(Crosshair crosshair) { Args.nullNotPermitted(crosshair, STR); this.xCrosshairs.add(crosshair); crosshair.addPropertyChangeListener(this); fireOverlayChanged(); } /** * Removes a domain axis crosshair and sends an {@link OverlayChangeEvent}
/** * Adds a crosshair against the domain axis (x-axis) and sends an * {@link OverlayChangeEvent} to all registered listeners. * * @param crosshair the crosshair ({@code null} not permitted). * * @see #removeDomainCrosshair(org.jfree.chart.plot.Crosshair) * @see #addRangeCrosshair(or...
Adds a crosshair against the domain axis (x-axis) and sends an <code>OverlayChangeEvent</code> to all registered listeners
addDomainCrosshair
{ "repo_name": "jfree/jfreechart", "path": "src/main/java/org/jfree/chart/swing/CrosshairOverlay.java", "license": "lgpl-2.1", "size": 22416 }
[ "org.jfree.chart.internal.Args", "org.jfree.chart.plot.Crosshair" ]
import org.jfree.chart.internal.Args; import org.jfree.chart.plot.Crosshair;
import org.jfree.chart.internal.*; import org.jfree.chart.plot.*;
[ "org.jfree.chart" ]
org.jfree.chart;
656,660
public Vector3 getUp() { return up; }
Vector3 function() { return up; }
/** * Returns the up vector (the up vector of the camera). * * @return Vector3 */
Returns the up vector (the up vector of the camera)
getUp
{ "repo_name": "miviclin/droidengine2d", "path": "src/com/miviclin/droidengine2d/graphics/cameras/Camera.java", "license": "apache-2.0", "size": 5344 }
[ "com.miviclin.droidengine2d.util.math.Vector3" ]
import com.miviclin.droidengine2d.util.math.Vector3;
import com.miviclin.droidengine2d.util.math.*;
[ "com.miviclin.droidengine2d" ]
com.miviclin.droidengine2d;
2,688,512
String location = scriptLocation + name + ".sql"; BufferedReader in = new BufferedReader(new FileReader(location)); String line; StringBuffer buff = new StringBuffer(); while ((line = in.readLine()) != null) { // Only append if not a commented line. if ((line.length() > 0) && !line.substring(0,1).equals...
String location = scriptLocation + name + ".sql"; BufferedReader in = new BufferedReader(new FileReader(location)); String line; StringBuffer buff = new StringBuffer(); while ((line = in.readLine()) != null) { if ((line.length() > 0) && !line.substring(0,1).equals("#")) { buff.append(line + " "); } } return buff.toStri...
/** * Load the specified sql script for running on the database. * @param name The name of the script. The filename to be loaded is * constructed from this by prepending location and appending the suffix. * @return The script. */
Load the specified sql script for running on the database
loadScript
{ "repo_name": "ahunt/simplerowlog", "path": "src/org/ahunt/simpleRowLog/db/simpleDB/Util.java", "license": "gpl-3.0", "size": 1814 }
[ "java.io.BufferedReader", "java.io.FileReader" ]
import java.io.BufferedReader; import java.io.FileReader;
import java.io.*;
[ "java.io" ]
java.io;
311,346
protected boolean resolveEnumConstant(AbstractPathExpression expression) { String fullPath = expression.toParsedText(); Class<?> enumType = queryContext.getEnumType(fullPath); if (enumType != null) { // Make sure we keep track of the enum type ...
boolean function(AbstractPathExpression expression) { String fullPath = expression.toParsedText(); Class<?> enumType = queryContext.getEnumType(fullPath); if (enumType != null) { type[0] = enumType; String path = expression.getPath(expression.pathSize() - 1); Enum<?> enumConstant = retrieveEnumConstant(enumType, path);...
/** * Attempts to resolve the path expression as a fully qualified enum constant. * * @param expression The {@link AbstractPathExpression} that might represent an enum constant * @return <code>true</code> if the path was a fully qualified enum constant; <code>false</code> * ...
Attempts to resolve the path expression as a fully qualified enum constant
resolveEnumConstant
{ "repo_name": "gameduell/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/jpa/jpql/ExpressionBuilderVisitor.java", "license": "epl-1.0", "size": 92503 }
[ "org.eclipse.persistence.expressions.ExpressionBuilder", "org.eclipse.persistence.internal.expressions.ConstantExpression", "org.eclipse.persistence.jpa.jpql.parser.AbstractPathExpression" ]
import org.eclipse.persistence.expressions.ExpressionBuilder; import org.eclipse.persistence.internal.expressions.ConstantExpression; import org.eclipse.persistence.jpa.jpql.parser.AbstractPathExpression;
import org.eclipse.persistence.expressions.*; import org.eclipse.persistence.internal.expressions.*; import org.eclipse.persistence.jpa.jpql.parser.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,721,970
public boolean equals(Object o) { return ReferentUuids.compare(this,o); }
boolean function(Object o) { return ReferentUuids.compare(this,o); }
/** * Proxies for servers with the same <code>proxyID</code> are * considered equal. */
Proxies for servers with the same <code>proxyID</code> are considered equal
equals
{ "repo_name": "pfirmstone/river-internet", "path": "JGDMS/services/mahalo/mahalo-dl/src/main/java/org/apache/river/mahalo/proxy/TxnMgrProxy.java", "license": "apache-2.0", "size": 12222 }
[ "net.jini.id.ReferentUuids" ]
import net.jini.id.ReferentUuids;
import net.jini.id.*;
[ "net.jini.id" ]
net.jini.id;
6,088
public Color getHeaderBackground(){ return Color.DARK_GRAY; }
Color function(){ return Color.DARK_GRAY; }
/** * retorna el color del fondo del header. * @return */
retorna el color del fondo del header
getHeaderBackground
{ "repo_name": "iriber/miGestionSwing", "path": "src/main/java/com/migestion/swing/view/dialogs/DialogFindObject.java", "license": "gpl-2.0", "size": 23048 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
449,085
public double calculate(List<Double> list) { if(list.size() == 0) { return 0; } double sum = 0; for(double value : list) { sum += 1 / value; } return sum / list.size(); }
double function(List<Double> list) { if(list.size() == 0) { return 0; } double sum = 0; for(double value : list) { sum += 1 / value; } return sum / list.size(); }
/** * Calculates the harmonic mean. * @param List<Double> the list * @return the result */
Calculates the harmonic mean
calculate
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/integerflex/stat/HarmonicMeanInteger.java", "license": "apache-2.0", "size": 7476 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
498,685
public static String mandatoryAttributeValue(Map<Object, Object> attributeMap, String name) { Object value = attributeMap.get(name); if (value != null) { String text = value.toString(); if (!Strings.isBlank(text)) { return text; } } ...
static String function(Map<Object, Object> attributeMap, String name) { Object value = attributeMap.get(name); if (value != null) { String text = value.toString(); if (!Strings.isBlank(text)) { return text; } } throw new IllegalArgumentException(STR + name + STR); }
/** * Returns the mandatory String value of the given name * * @throws IllegalArgumentException if the value is not available in the given attribute map */
Returns the mandatory String value of the given name
mandatoryAttributeValue
{ "repo_name": "mwringe/fabric8", "path": "forge/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/ConfigureEndpointPropertiesStep.java", "license": "apache-2.0", "size": 20109 }
[ "java.util.Map", "org.jboss.forge.roaster.model.util.Strings" ]
import java.util.Map; import org.jboss.forge.roaster.model.util.Strings;
import java.util.*; import org.jboss.forge.roaster.model.util.*;
[ "java.util", "org.jboss.forge" ]
java.util; org.jboss.forge;
2,049,456
void initialize() throws HBaseIOException;
void initialize() throws HBaseIOException;
/** * Initialize the load balancer. Must be called after setters. * @throws HBaseIOException */
Initialize the load balancer. Must be called after setters
initialize
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/LoadBalancer.java", "license": "apache-2.0", "size": 7151 }
[ "org.apache.hadoop.hbase.HBaseIOException" ]
import org.apache.hadoop.hbase.HBaseIOException;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
736,805
protected void populateSalesTax(AccountingLine line) { SalesTax salesTax = line.getSalesTax(); if (ObjectUtils.isNotNull(salesTax)) { salesTax.setDocumentNumber(line.getDocumentNumber()); salesTax.setFinancialDocumentLineTypeCode(line.getFinancialDocumentLineTypeCode()); ...
void function(AccountingLine line) { SalesTax salesTax = line.getSalesTax(); if (ObjectUtils.isNotNull(salesTax)) { salesTax.setDocumentNumber(line.getDocumentNumber()); salesTax.setFinancialDocumentLineTypeCode(line.getFinancialDocumentLineTypeCode()); salesTax.setFinancialDocumentLineNumber(line.getSequenceNumber());...
/** * This method populates the sales tax for a given accounting line with the appropriate primary key fields from the accounting * line since OJB won't do it automatically for us * * @param line */
This method populates the sales tax for a given accounting line with the appropriate primary key fields from the accounting line since OJB won't do it automatically for us
populateSalesTax
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/sys/web/struts/KualiAccountingDocumentActionBase.java", "license": "agpl-3.0", "size": 49844 }
[ "org.kuali.kfs.fp.businessobject.SalesTax", "org.kuali.kfs.krad.util.ObjectUtils", "org.kuali.kfs.sys.businessobject.AccountingLine" ]
import org.kuali.kfs.fp.businessobject.SalesTax; import org.kuali.kfs.krad.util.ObjectUtils; import org.kuali.kfs.sys.businessobject.AccountingLine;
import org.kuali.kfs.fp.businessobject.*; import org.kuali.kfs.krad.util.*; import org.kuali.kfs.sys.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,082,075
public boolean isContentClassRegistered(QName aspectQName) { return registeredContentClasses.contains(aspectQName); } public static class SelfRegisteringClassName { private final String contentClassName; private RenditionPreventionRegistry registry; ...
boolean function(QName aspectQName) { return registeredContentClasses.contains(aspectQName); } public static class SelfRegisteringClassName { private final String contentClassName; private RenditionPreventionRegistry registry; public SelfRegisteringClassName(String className) { this.contentClassName = className; }
/** * Checks if the specified type/aspect is registered as a marker for rendition prevention. * @param aspectQName aspect name. * @return <code>true</code> if this aspect will prevent renditions, else <code>false</code> */
Checks if the specified type/aspect is registered as a marker for rendition prevention
isContentClassRegistered
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/rendition/RenditionPreventionRegistry.java", "license": "lgpl-3.0", "size": 3423 }
[ "org.alfresco.service.namespace.QName" ]
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.*;
[ "org.alfresco.service" ]
org.alfresco.service;
1,795,848
EAttribute getCustomerBillingInfo_DueDate();
EAttribute getCustomerBillingInfo_DueDate();
/** * Returns the meta object for the attribute '{@link gluemodel.CIM.IEC61970.Informative.InfCustomers.CustomerBillingInfo#getDueDate <em>Due Date</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Due Date</em>'. * @see gluemodel.CIM.IEC61970.Informati...
Returns the meta object for the attribute '<code>gluemodel.CIM.IEC61970.Informative.InfCustomers.CustomerBillingInfo#getDueDate Due Date</code>'.
getCustomerBillingInfo_DueDate
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/InfCustomers/InfCustomersPackage.java", "license": "mit", "size": 116381 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,133,590
ServiceFuture<StorageAccount> getPropertiesAsync(String resourceGroupName, String accountName, final ServiceCallback<StorageAccount> serviceCallback);
ServiceFuture<StorageAccount> getPropertiesAsync(String resourceGroupName, String accountName, final ServiceCallback<StorageAccount> serviceCallback);
/** * Returns the properties for the specified storage account including but not limited to name, account type, location, and account status. The ListKeys operation should be used to retrieve storage keys. * * @param resourceGroupName The name of the resource group within the user's subscription. * ...
Returns the properties for the specified storage account including but not limited to name, account type, location, and account status. The ListKeys operation should be used to retrieve storage keys
getPropertiesAsync
{ "repo_name": "anudeepsharma/autorest", "path": "Samples/azure-storage/Azure.Java/StorageAccounts.java", "license": "mit", "size": 29892 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,762,154
private long resolveVersionDefaults() { if (opType == OpType.CREATE && version == Versions.MATCH_ANY) { return Versions.MATCH_DELETED; } else { return version; } }
long function() { if (opType == OpType.CREATE && version == Versions.MATCH_ANY) { return Versions.MATCH_DELETED; } else { return version; } }
/** * Resolves the version based on operation type {@link #opType()}. */
Resolves the version based on operation type <code>#opType()</code>
resolveVersionDefaults
{ "repo_name": "nezirus/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/index/IndexRequest.java", "license": "apache-2.0", "size": 23243 }
[ "org.elasticsearch.common.lucene.uid.Versions" ]
import org.elasticsearch.common.lucene.uid.Versions;
import org.elasticsearch.common.lucene.uid.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
425,062
private void validateEol(DetailAST brace, String braceLine) { if (CommonUtils.hasWhitespaceBefore(brace.getColumnNo(), braceLine)) { log(brace, MSG_KEY_LINE_PREVIOUS, OPEN_CURLY_BRACE, brace.getColumnNo() + 1); } if (!hasLineBreakAfter(brace)) { log(brace, MSG_KEY_LIN...
void function(DetailAST brace, String braceLine) { if (CommonUtils.hasWhitespaceBefore(brace.getColumnNo(), braceLine)) { log(brace, MSG_KEY_LINE_PREVIOUS, OPEN_CURLY_BRACE, brace.getColumnNo() + 1); } if (!hasLineBreakAfter(brace)) { log(brace, MSG_KEY_LINE_BREAK_AFTER, OPEN_CURLY_BRACE, brace.getColumnNo() + 1); } }
/** * Validate EOL case. * @param brace brace AST * @param braceLine line content */
Validate EOL case
validateEol
{ "repo_name": "attatrol/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheck.java", "license": "lgpl-2.1", "size": 14073 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.utils.CommonUtils" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.utils.CommonUtils;
import com.puppycrawl.tools.checkstyle.api.*; import com.puppycrawl.tools.checkstyle.utils.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
2,675,413
public void removeBookmarkedConference(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException { retrieveBookmarks(); Iterator<BookmarkedConference> it = bookmarks.getBookmarkedConferences().iterator(); while(it.hasNext()) { BookmarkedConference conferen...
void function(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException { retrieveBookmarks(); Iterator<BookmarkedConference> it = bookmarks.getBookmarkedConferences().iterator(); while(it.hasNext()) { BookmarkedConference conference = it.next(); if(conference.getJid().equalsIgnoreCase(jid)) { i...
/** * Removes a conference from the bookmarks. * * @param jid the jid of the conference to be removed. * @throws XMPPErrorException thrown when there is a problem with the connection attempting to * retrieve the bookmarks or persist the bookmarks. * @throws NoResponseException if there was...
Removes a conference from the bookmarks
removeBookmarkedConference
{ "repo_name": "Soo000/SooChat", "path": "src/org/jivesoftware/smackx/bookmarks/BookmarkManager.java", "license": "apache-2.0", "size": 10135 }
[ "java.util.Iterator", "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPException" ]
import java.util.Iterator; import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException;
import java.util.*; import org.jivesoftware.smack.*;
[ "java.util", "org.jivesoftware.smack" ]
java.util; org.jivesoftware.smack;
2,877,900
private static void put_uid( Map<Integer, Fida.Item> map, Fida.Item item ) { // Check that the item has a xid. if (item.item_xid == null) { throw new RuntimeException("xid missing! Cant tell exactly where :("); } // get uid from xid ...
static void function( Map<Integer, Fida.Item> map, Fida.Item item ) { if (item.item_xid == null) { throw new RuntimeException(STR); } int uid = get_uid(item.item_xid.id); put_uid(map, uid, item); }
/** * Creates a mapping between the Fida.Item's internal xid's uid * and the item itself. */
Creates a mapping between the Fida.Item's internal xid's uid and the item itself
put_uid
{ "repo_name": "jani-hautamaki/xml-snippets", "path": "src/xmlsnippets/fida/FidaXML.java", "license": "gpl-3.0", "size": 46947 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,036,099
protected String build_instructor_grade_submission_context(VelocityPortlet portlet, Context context, RunData data, SessionState state) { String submissionId=""; int gradeType = -1; // need to show the alert for grading drafts? boolean addGradeDraftAlert = false; // assignment String assignmentId ...
String function(VelocityPortlet portlet, Context context, RunData data, SessionState state) { String submissionId=STRbuild_instructor_grade_submission_contextSTRassignmentSTRorg.sakaiproject.service.gradebook.GradebookServiceSTRnotAllowedToGradeWarningSTRnot_allowed_to_grade_in_gradebookSTRallowToGradeSTRbuild_instruct...
/** * build the instructor view to grade an submission */
build the instructor view to grade an submission
build_instructor_grade_submission_context
{ "repo_name": "udayg/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 672322 }
[ "org.sakaiproject.cheftool.Context", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.cheftool.VelocityPortlet", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
org.sakaiproject.cheftool; org.sakaiproject.event;
1,838,588
public final T peek() { if (!hasNext()) { throw new NoSuchElementException(); } return next; }
final T function() { if (!hasNext()) { throw new NoSuchElementException(); } return next; }
/** * Returns the next element in the iteration without advancing the iteration, * according to the contract of {@link PeekingIterator#peek()}. * * <p>Implementations of {@code AbstractIterator} that wish to expose this * functionality should implement {@code PeekingIterator}. */
Returns the next element in the iteration without advancing the iteration, according to the contract of <code>PeekingIterator#peek()</code>. Implementations of AbstractIterator that wish to expose this functionality should implement PeekingIterator
peek
{ "repo_name": "bpow/varitas", "path": "src/main/java/org/drpowell/util/AbstractPeekableIterator.java", "license": "mit", "size": 5751 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,282,390
public void deleteGlobalCodeNodeComment(final IComment comment) throws CouldntDeleteException { if (m_parentFunction != null) { CommentManager.get(m_provider).deleteGlobalCodeNodeComment(m_codeNode, comment); } }
void function(final IComment comment) throws CouldntDeleteException { if (m_parentFunction != null) { CommentManager.get(m_provider).deleteGlobalCodeNodeComment(m_codeNode, comment); } }
/** * Forwarder function to delete a global code node comment. The actual code for this function is * in the global comment manager. * * @param comment The comment to be deleted. * @throws CouldntDeleteException if the comment could not be deleted from the database. */
Forwarder function to delete a global code node comment. The actual code for this function is in the global comment manager
deleteGlobalCodeNodeComment
{ "repo_name": "AmesianX/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/CCodeNodeComments.java", "license": "apache-2.0", "size": 17598 }
[ "com.google.security.zynamics.binnavi.Database", "com.google.security.zynamics.binnavi.Gui" ]
import com.google.security.zynamics.binnavi.Database; import com.google.security.zynamics.binnavi.Gui;
import com.google.security.zynamics.binnavi.*;
[ "com.google.security" ]
com.google.security;
1,457,735
public int getwarning_count(Env env) { return warning_count(env); }
int function(Env env) { return warning_count(env); }
/** * Quercus function to get the field 'warning_count'. */
Quercus function to get the field 'warning_count'
getwarning_count
{ "repo_name": "dlitz/resin", "path": "modules/quercus/src/com/caucho/quercus/lib/db/Mysqli.java", "license": "gpl-2.0", "size": 42236 }
[ "com.caucho.quercus.env.Env" ]
import com.caucho.quercus.env.Env;
import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
451,541
private void blur(byte[] inPixels, byte[] outPixels, int width, int height) { int subCol = 0; int index = 0, index2 = 0; float sum = 0; int k = kernel.length-1; for(int row=0; row<height; row++) { int c = 0; index = row; for(int col=0; ...
void function(byte[] inPixels, byte[] outPixels, int width, int height) { int subCol = 0; int index = 0, index2 = 0; float sum = 0; int k = kernel.length-1; for(int row=0; row<height; row++) { int c = 0; index = row; for(int col=0; col<width; col++) { sum = 0; for(int m = -k; m< kernel.length; m++) { subCol = col + m; ...
/** * <p> here is 1D Gaussian , </p> * * @param inPixels * @param outPixels * @param width * @param height */
here is 1D Gaussian ,
blur
{ "repo_name": "imageprocessor/cv4j-desktop", "path": "desktop/src/main/java/com/cv4j/core/filters/GaussianBlurFilter.java", "license": "apache-2.0", "size": 4371 }
[ "com.cv4j.image.util.Tools" ]
import com.cv4j.image.util.Tools;
import com.cv4j.image.util.*;
[ "com.cv4j.image" ]
com.cv4j.image;
579,574
private void bringDeparturePolylineToFront(Marker marker) { if (marker.getSnippet().contains("min to")) { for (Departure departure : mBusMarkerByDeparture.keySet()) { if (departure.getHeadsign().equalsIgnoreCase(marker.getTitle())) { Polyline line = mPolylines...
void function(Marker marker) { if (marker.getSnippet().contains(STR)) { for (Departure departure : mBusMarkerByDeparture.keySet()) { if (departure.getHeadsign().equalsIgnoreCase(marker.getTitle())) { Polyline line = mPolylinesByShapeId.get(departure.getTrip() .getShape_id()); if (line != null) { mZIndex++; line.setZInd...
/** * If the marker belongs to a departure, this method brings the polyline * associated with that departure to the foreground. * * @param marker */
If the marker belongs to a departure, this method brings the polyline associated with that departure to the foreground
bringDeparturePolylineToFront
{ "repo_name": "parkin/CU-Bus-Guide", "path": "main/src/main/java/com/teamparkin/mtdapp/fragments/MapV2Fragment.java", "license": "apache-2.0", "size": 57705 }
[ "com.google.android.gms.maps.model.Marker", "com.google.android.gms.maps.model.Polyline", "com.teamparkin.mtdapp.dataclasses.Departure" ]
import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.Polyline; import com.teamparkin.mtdapp.dataclasses.Departure;
import com.google.android.gms.maps.model.*; import com.teamparkin.mtdapp.dataclasses.*;
[ "com.google.android", "com.teamparkin.mtdapp" ]
com.google.android; com.teamparkin.mtdapp;
21,730
EAttribute getAnonymous_constantDeclaration_1__Type_1();
EAttribute getAnonymous_constantDeclaration_1__Type_1();
/** * Returns the meta object for the attribute '{@link cruise.umple.umple.Anonymous_constantDeclaration_1_#getType_1 <em>Type 1</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Type 1</em>'. * @see cruise.umple.umple.Anonymous_constantDeclaration...
Returns the meta object for the attribute '<code>cruise.umple.umple.Anonymous_constantDeclaration_1_#getType_1 Type 1</code>'.
getAnonymous_constantDeclaration_1__Type_1
{ "repo_name": "ahmedvc/umple", "path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java", "license": "mit", "size": 485842 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
392,051
public void draw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view) { // work out the anchor point Rectangle2D f = DialPlot.rectangleByRadius(frame, this.radius, this.radius); Arc2D arc = new Arc2D.Double(f, this.angle, 0.0, Arc2D.OPEN); P...
void function(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view) { Rectangle2D f = DialPlot.rectangleByRadius(frame, this.radius, this.radius); Arc2D arc = new Arc2D.Double(f, this.angle, 0.0, Arc2D.OPEN); Point2D pt = arc.getStartPoint(); g2.setPaint(this.paint); g2.setFont(this.font); TextUtilities.dr...
/** * Draws the background to the specified graphics device. If the dial * frame specifies a window, the clipping region will already have been * set to this window before this method is called. * * @param g2 the graphics device (<code>null</code> not permitted). * @param plot the plot ...
Draws the background to the specified graphics device. If the dial frame specifies a window, the clipping region will already have been set to this window before this method is called
draw
{ "repo_name": "JSansalone/JFreeChart", "path": "source/org/jfree/chart/plot/dial/DialTextAnnotation.java", "license": "lgpl-2.1", "size": 12099 }
[ "java.awt.Graphics2D", "java.awt.geom.Arc2D", "java.awt.geom.Point2D", "java.awt.geom.Rectangle2D", "org.jfree.text.TextUtilities" ]
import java.awt.Graphics2D; import java.awt.geom.Arc2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import org.jfree.text.TextUtilities;
import java.awt.*; import java.awt.geom.*; import org.jfree.text.*;
[ "java.awt", "org.jfree.text" ]
java.awt; org.jfree.text;
2,435,954
public void setCheckTotalAmount(KualiDecimal disbVchrCheckTotalAmount) { this.checkTotalAmount = disbVchrCheckTotalAmount; }
void function(KualiDecimal disbVchrCheckTotalAmount) { this.checkTotalAmount = disbVchrCheckTotalAmount; }
/** * Sets the total payment of the check generated by the associated document * @param checkTotalAmount a check amount */
Sets the total payment of the check generated by the associated document
setCheckTotalAmount
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/tem/businessobject/TravelPayment.java", "license": "agpl-3.0", "size": 17371 }
[ "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,698,145
public void writeReportMergeScenarioResponse(Context context, ObjectId ours, ObjectId theirs, PagedMergeScenarioConsumer consumer) throws StreamWriterException { out.writeStartElement("Merge"); // start the Feature array out.writeStartArray("Feature"); writeGeometryChange...
void function(Context context, ObjectId ours, ObjectId theirs, PagedMergeScenarioConsumer consumer) throws StreamWriterException { out.writeStartElement("Merge"); out.writeStartArray(STR); writeGeometryChanges(context, consumer.getUnconflicted(), 0, 0, true); writeConflicts(context, consumer.getConflicted(), ours, thei...
/** * Writes a page of features from a merge scenario. * * @param context the context that the merge scenario was run on * @param ours our commit id * @param theirs their commit id * @param consumer the page of features * @throws StreamWriterException */
Writes a page of features from a merge scenario
writeReportMergeScenarioResponse
{ "repo_name": "jdgarrett/geogig", "path": "src/web/api/src/main/java/org/locationtech/geogig/web/api/ResponseWriter.java", "license": "bsd-3-clause", "size": 62609 }
[ "org.locationtech.geogig.model.ObjectId", "org.locationtech.geogig.repository.Context" ]
import org.locationtech.geogig.model.ObjectId; import org.locationtech.geogig.repository.Context;
import org.locationtech.geogig.model.*; import org.locationtech.geogig.repository.*;
[ "org.locationtech.geogig" ]
org.locationtech.geogig;
1,773,296
public static SslContext createAutoRefreshSslContextForClient(boolean allowInsecureConnection, String trustCertsFilePath, String certFilePath, String keyFilePath, String sslContextAlgorithm, int refreshDurationSec, ScheduledExecutorService executor) throws GeneralSecurityExceptio...
static SslContext function(boolean allowInsecureConnection, String trustCertsFilePath, String certFilePath, String keyFilePath, String sslContextAlgorithm, int refreshDurationSec, ScheduledExecutorService executor) throws GeneralSecurityException, SSLException, FileNotFoundException, IOException { KeyManagerProxy keyMa...
/** * Creates {@link SslContext} with capability to do auto-cert refresh. * @param allowInsecureConnection * @param trustCertsFilePath * @param certFilePath * @param keyFilePath * @param sslContextAlgorithm * @param refreshDurationSec * @param executor * @return * @thro...
Creates <code>SslContext</code> with capability to do auto-cert refresh
createAutoRefreshSslContextForClient
{ "repo_name": "massakam/pulsar", "path": "pulsar-common/src/main/java/org/apache/pulsar/common/util/SecurityUtility.java", "license": "apache-2.0", "size": 26400 }
[ "io.netty.handler.ssl.SslContext", "io.netty.handler.ssl.SslContextBuilder", "io.netty.handler.ssl.util.InsecureTrustManagerFactory", "java.io.FileNotFoundException", "java.io.IOException", "java.security.GeneralSecurityException", "java.util.concurrent.ScheduledExecutorService", "javax.net.ssl.SSLExc...
import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; import io.netty.handler.ssl.util.InsecureTrustManagerFactory; import java.io.FileNotFoundException; import java.io.IOException; import java.security.GeneralSecurityException; import java.util.concurrent.ScheduledExecutorService; impo...
import io.netty.handler.ssl.*; import io.netty.handler.ssl.util.*; import java.io.*; import java.security.*; import java.util.concurrent.*; import javax.net.ssl.*;
[ "io.netty.handler", "java.io", "java.security", "java.util", "javax.net" ]
io.netty.handler; java.io; java.security; java.util; javax.net;
54,570
public Shape getOutline(float x, float y) { validate(); Shape outline; if (cleanOutline == null) { GeneralPath path = new GeneralPath(); int len = glyphs.length; for (int i = 0; i < len; i++) { GeneralPath p = new GeneralPath(getGlyphOutline(i)); ...
Shape function(float x, float y) { validate(); Shape outline; if (cleanOutline == null) { GeneralPath path = new GeneralPath(); int len = glyphs.length; for (int i = 0; i < len; i++) { GeneralPath p = new GeneralPath(getGlyphOutline(i)); path.append(p, false); } cleanOutline = new ShapeWrapper(path); outline = cleanOut...
/** * Returns the shape of this GlyphVector, translated to the * specified position. * * @param x the horizontal position for rendering this vector. * @param y the vertical position for rendering this vector. */
Returns the shape of this GlyphVector, translated to the specified position
getOutline
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/gnu/java/awt/font/GNUGlyphVector.java", "license": "gpl-2.0", "size": 19411 }
[ "gnu.java.awt.java2d.ShapeWrapper", "java.awt.Shape", "java.awt.geom.AffineTransform", "java.awt.geom.GeneralPath" ]
import gnu.java.awt.java2d.ShapeWrapper; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.GeneralPath;
import gnu.java.awt.java2d.*; import java.awt.*; import java.awt.geom.*;
[ "gnu.java.awt", "java.awt" ]
gnu.java.awt; java.awt;
472,998
private SchedulerEntity createEntity(Class<? extends SchedulerAction> actionClass, String actionName, SchedulerConfiguration config, SchedulerContext context) { SchedulerEntity entity = schedulerStore.getOrCreateEntityForIdentifier(config.getIdentifier()); entity.setType(config.getType()); // set action ...
SchedulerEntity function(Class<? extends SchedulerAction> actionClass, String actionName, SchedulerConfiguration config, SchedulerContext context) { SchedulerEntity entity = schedulerStore.getOrCreateEntityForIdentifier(config.getIdentifier()); entity.setType(config.getType()); setActionName(actionClass, entity, action...
/** * Creates the entity from the given arguments. The method does not throw an exception but at least one of the * arguments should be present: action class or action name! * * @param actionClass * the action class * @param actionName * the action name * @param config * ...
Creates the entity from the given arguments. The method does not throw an exception but at least one of the arguments should be present: action class or action name
createEntity
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/platform/seip-parent/extensions/task-schedule/task-schedule-core/src/main/java/com/sirma/itt/seip/tasks/SchedulerServiceImpl.java", "license": "lgpl-3.0", "size": 26066 }
[ "com.sirma.itt.seip.tasks.entity.EventTriggerEntity", "com.sirma.itt.seip.tasks.entity.SchedulerEntity", "java.util.Date" ]
import com.sirma.itt.seip.tasks.entity.EventTriggerEntity; import com.sirma.itt.seip.tasks.entity.SchedulerEntity; import java.util.Date;
import com.sirma.itt.seip.tasks.entity.*; import java.util.*;
[ "com.sirma.itt", "java.util" ]
com.sirma.itt; java.util;
747,068
protected int getNumberOfExecutionsForTask(NativeTask t) { return DEFAULT_MAX_NB_OF_EXECUTION_PER_TASK; } /** * Returns the class name which manages the result preview for a specific * task. * <p/> * By default this method calls {@link #getDefaultResultPreviewClassName()}
int function(NativeTask t) { return DEFAULT_MAX_NB_OF_EXECUTION_PER_TASK; } /** * Returns the class name which manages the result preview for a specific * task. * <p/> * By default this method calls {@link #getDefaultResultPreviewClassName()}
/** * Returns the max number of executions of a task (in case of error) * Override this method to define specific number of executions for each task * * @param t * @return */
Returns the max number of executions of a task (in case of error) Override this method to define specific number of executions for each task
getNumberOfExecutionsForTask
{ "repo_name": "acontes/scheduling", "path": "src/scheduler/src/org/ow2/proactive/scheduler/ext/filessplitmerge/JobCreator.java", "license": "agpl-3.0", "size": 32840 }
[ "org.ow2.proactive.scheduler.common.task.NativeTask" ]
import org.ow2.proactive.scheduler.common.task.NativeTask;
import org.ow2.proactive.scheduler.common.task.*;
[ "org.ow2.proactive" ]
org.ow2.proactive;
2,076,300
@Override public boolean add(@Nullable final Map.Entry<K, V> pEntry) { throw new UnsupportedOperationException(); }
boolean function(@Nullable final Map.Entry<K, V> pEntry) { throw new UnsupportedOperationException(); }
/** * This operation is not supported by the unmodifiable collection. * * @param pEntry ignored parameter * @return never * * @throws UnsupportedOperationException always thrown */
This operation is not supported by the unmodifiable collection
add
{ "repo_name": "tsjensen/sercoll", "path": "src/main/java/com/thomasjensen/sercoll/SerializableUnmodifiableEntrySet.java", "license": "apache-2.0", "size": 6027 }
[ "java.util.Map", "javax.annotation.Nullable" ]
import java.util.Map; import javax.annotation.Nullable;
import java.util.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
1,260,231
public static String keyStoreToCertificatePem(KeyStore keyStore) { StringWriter writer = new StringWriter(); writeCertAsPem(keyStore, writer); return writer.toString(); }
static String function(KeyStore keyStore) { StringWriter writer = new StringWriter(); writeCertAsPem(keyStore, writer); return writer.toString(); }
/** * Converts the certificate contained in the given {@code KeyStore} into a pem. * * @param keyStore the {@code KeyStore}. * @return the string containing the certificate as pem. */
Converts the certificate contained in the given KeyStore into a pem
keyStoreToCertificatePem
{ "repo_name": "kingthorin/zap-extensions", "path": "addOns/network/src/main/java/org/zaproxy/addon/network/internal/cert/CertificateUtils.java", "license": "apache-2.0", "size": 23291 }
[ "java.io.StringWriter", "java.security.KeyStore" ]
import java.io.StringWriter; import java.security.KeyStore;
import java.io.*; import java.security.*;
[ "java.io", "java.security" ]
java.io; java.security;
1,750,181
public byte[] generate(final String ruleName) throws IOException { return generate(ruleName, Collections.<String>emptySet()); }
byte[] function(final String ruleName) throws IOException { return generate(ruleName, Collections.<String>emptySet()); }
/** * Generate a random sequence of bytes which matches a named ABNF rule. The * output will be suitable for use in a fuzz test. * * @param ruleName ABNF rule name * @return random sequence which matches the specified rule * @throws IOException shouldn't happen * @throws IllegalArgumen...
Generate a random sequence of bytes which matches a named ABNF rule. The output will be suitable for use in a fuzz test
generate
{ "repo_name": "nradov/abnffuzzer", "path": "src/main/java/com/github/nradov/abnffuzzer/Fuzzer.java", "license": "lgpl-2.1", "size": 17075 }
[ "java.io.IOException", "java.util.Collections" ]
import java.io.IOException; import java.util.Collections;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,499,254
public static void disableCertificateValidation() { // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
static void function() { TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
/** * Disables https certificate validation */
Disables https certificate validation
disableCertificateValidation
{ "repo_name": "yonishi/AirPlanSupport2016-1479667638008", "path": "src/main/java/com/ibm/app/mgr/AppLabClientMgr.java", "license": "apache-2.0", "size": 12370 }
[ "javax.net.ssl.TrustManager", "javax.net.ssl.X509TrustManager" ]
import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
2,072,605
public void setModelProcessors(List<ModelProcessor> modelProcessors) { this.modelProcessors = modelProcessors; }
void function(List<ModelProcessor> modelProcessors) { this.modelProcessors = modelProcessors; }
/** * Sets the current set of model processors. * @param modelProcessors List of model processors to use. */
Sets the current set of model processors
setModelProcessors
{ "repo_name": "tp81/openmicroscopy", "path": "components/blitz/src/ome/formats/OMEROMetadataStoreClient.java", "license": "gpl-2.0", "size": 307206 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,731,475
public List<InstanceViewStatus> statuses() { return this.statuses; }
List<InstanceViewStatus> function() { return this.statuses; }
/** * Get the statuses property: The resource status information. * * @return the statuses value. */
Get the statuses property: The resource status information
statuses
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetProperties.java", "license": "mit", "size": 4989 }
[ "com.azure.resourcemanager.compute.models.InstanceViewStatus", "java.util.List" ]
import com.azure.resourcemanager.compute.models.InstanceViewStatus; import java.util.List;
import com.azure.resourcemanager.compute.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
2,764,264
private void runSideBySide(SpatialPooler sp, Connections c, int[][] inputs, int numRecords, SpatialPoolerCompatibilityActives actives, SpatialPoolerCompatibilityPermanences perms) { UniversalRandom univ = new UniversalRandom(42); int[] activeArray = new int[...
void function(SpatialPooler sp, Connections c, int[][] inputs, int numRecords, SpatialPoolerCompatibilityActives actives, SpatialPoolerCompatibilityPermanences perms) { UniversalRandom univ = new UniversalRandom(42); int[] activeArray = new int[c.getNumColumns()]; for(int i = 0;i < numRecords;i++) { boolean learn = uni...
/** * Main loop of the test which calls compute and then compares the {@link SpatialPooler}'s * state to the stored test from the Python version of the same test. * @param sp the SpatialPooler * @param c The {@link Connections} object * @param inputs th...
Main loop of the test which calls compute and then compares the <code>SpatialPooler</code>'s state to the stored test from the Python version of the same test
runSideBySide
{ "repo_name": "sambitgaan/htm.java", "path": "src/test/java/org/numenta/nupic/algorithms/SpatialPoolerCompatibilityTest.java", "license": "agpl-3.0", "size": 24534 }
[ "java.util.Arrays", "org.junit.Assert", "org.numenta.nupic.model.Connections", "org.numenta.nupic.util.UniversalRandom" ]
import java.util.Arrays; import org.junit.Assert; import org.numenta.nupic.model.Connections; import org.numenta.nupic.util.UniversalRandom;
import java.util.*; import org.junit.*; import org.numenta.nupic.model.*; import org.numenta.nupic.util.*;
[ "java.util", "org.junit", "org.numenta.nupic" ]
java.util; org.junit; org.numenta.nupic;
310,580
public EvalGroup getGroupByGroupId(String groupId);
EvalGroup function(String groupId);
/** * Return a group object (which represents a collection of users, a course or * group or collection in this case) based on the unique group id, this allows the * system to obtain the title and other meta data related to a group using the * unique id of the group * * @param groupId the unique id of an e...
Return a group object (which represents a collection of users, a course or group or collection in this case) based on the unique group id, this allows the system to obtain the title and other meta data related to a group using the unique id of the group
getGroupByGroupId
{ "repo_name": "csev/evaluation", "path": "api/src/java/org/sakaiproject/evaluation/providers/EvalGroupsProvider.java", "license": "apache-2.0", "size": 6745 }
[ "org.sakaiproject.evaluation.logic.model.EvalGroup" ]
import org.sakaiproject.evaluation.logic.model.EvalGroup;
import org.sakaiproject.evaluation.logic.model.*;
[ "org.sakaiproject.evaluation" ]
org.sakaiproject.evaluation;
389,716
return TopLevelModule.class.getAnnotation(SkylarkModule.class); }
return TopLevelModule.class.getAnnotation(SkylarkModule.class); }
/** * Returns the SkylarkModule annotation for the top-level Skylark module. */
Returns the SkylarkModule annotation for the top-level Skylark module
getTopLevelModule
{ "repo_name": "juhalindfors/bazel-patches", "path": "src/main/java/com/google/devtools/build/docgen/SkylarkDocumentationCollector.java", "license": "apache-2.0", "size": 7188 }
[ "com.google.devtools.build.lib.skylarkinterface.SkylarkModule" ]
import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
import com.google.devtools.build.lib.skylarkinterface.*;
[ "com.google.devtools" ]
com.google.devtools;
2,503,378
public void unsetVizServiceFactory(IVizServiceFactory input) { if (input == factory) { factory = null; } return; }
void function(IVizServiceFactory input) { if (input == factory) { factory = null; } return; }
/** * Remove the given VizServiceFactory if it is held by the * VizServiceFactoryHolder. * * @input A VizServiceFactory to remove. */
Remove the given VizServiceFactory if it is held by the VizServiceFactoryHolder
unsetVizServiceFactory
{ "repo_name": "eclipse/ice", "path": "org.eclipse.ice.nek5000/src/org/eclipse/ice/nek5000/internal/VizServiceFactoryHolder.java", "license": "epl-1.0", "size": 2183 }
[ "org.eclipse.eavp.viz.service.IVizServiceFactory" ]
import org.eclipse.eavp.viz.service.IVizServiceFactory;
import org.eclipse.eavp.viz.service.*;
[ "org.eclipse.eavp" ]
org.eclipse.eavp;
675,318
protected SEPersistenceUnitInfo findPersistenceUnitInfoInArchive(String puName, Archive archive, Map m){ Iterator<SEPersistenceUnitInfo> persistenceUnits = PersistenceUnitProcessor.getPersistenceUnits(archive, initializationClassloader).iterator(); while (persistenceUnits.hasNext()) { SE...
SEPersistenceUnitInfo function(String puName, Archive archive, Map m){ Iterator<SEPersistenceUnitInfo> persistenceUnits = PersistenceUnitProcessor.getPersistenceUnits(archive, initializationClassloader).iterator(); while (persistenceUnits.hasNext()) { SEPersistenceUnitInfo persistenceUnitInfo = persistenceUnits.next();...
/** * Find PersistenceUnitInfo corresponding to the persistence unit name in the archive. * Returns null if either persistence unit either not found or provider is not supported. */
Find PersistenceUnitInfo corresponding to the persistence unit name in the archive. Returns null if either persistence unit either not found or provider is not supported
findPersistenceUnitInfoInArchive
{ "repo_name": "gameduell/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/deployment/JPAInitializer.java", "license": "epl-1.0", "size": 15751 }
[ "java.util.Iterator", "java.util.Map", "org.eclipse.persistence.jpa.Archive" ]
import java.util.Iterator; import java.util.Map; import org.eclipse.persistence.jpa.Archive;
import java.util.*; import org.eclipse.persistence.jpa.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
1,880,368
private SelectionListener getSelectionListener() { if (selectionListener == null) { createSelectionListener(); } return selectionListener; }
SelectionListener function() { if (selectionListener == null) { createSelectionListener(); } return selectionListener; }
/** * Returns this field editor's selection listener. The listener is created * if necessary. * * @return the selection listener */
Returns this field editor's selection listener. The listener is created if necessary
getSelectionListener
{ "repo_name": "adbrucker/SecureBPMN", "path": "designer/src/org.activiti.designer.gui/src/main/java/org/activiti/designer/security/property/PropertySodBodSection.java", "license": "apache-2.0", "size": 25192 }
[ "org.eclipse.swt.events.SelectionListener" ]
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.events.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
960,757
protected void notifyOnKill(Set<Long> hsIds, Map<Long,Long> decision) { SiteFailureMessage.Builder sfmb = SiteFailureMessage. builder() .decisions(decision.keySet()) .failures(decision.keySet()); Set<Long> dests = Sets.filter(m_seeker.getSurvivors(),...
void function(Set<Long> hsIds, Map<Long,Long> decision) { SiteFailureMessage.Builder sfmb = SiteFailureMessage. builder() .decisions(decision.keySet()) .failures(decision.keySet()); Set<Long> dests = Sets.filter(m_seeker.getSurvivors(),not(equalTo(m_hsId))); if (dests.isEmpty()) return; sfmb.survivors(Sets.difference(m...
/** * Notify all survivors when you are closing links to nodes * @param decision map where the keys contain the kill sites * and its values are their last known safe transaction ids */
Notify all survivors when you are closing links to nodes
notifyOnKill
{ "repo_name": "kumarrus/voltdb", "path": "src/frontend/org/voltcore/agreement/MeshArbiter.java", "license": "agpl-3.0", "size": 23139 }
[ "com.google_voltpatches.common.collect.Sets", "com.google_voltpatches.common.primitives.Longs", "java.util.Map", "java.util.Set", "org.voltcore.messaging.SiteFailureMessage", "org.voltcore.utils.CoreUtils" ]
import com.google_voltpatches.common.collect.Sets; import com.google_voltpatches.common.primitives.Longs; import java.util.Map; import java.util.Set; import org.voltcore.messaging.SiteFailureMessage; import org.voltcore.utils.CoreUtils;
import com.google_voltpatches.common.collect.*; import com.google_voltpatches.common.primitives.*; import java.util.*; import org.voltcore.messaging.*; import org.voltcore.utils.*;
[ "com.google_voltpatches.common", "java.util", "org.voltcore.messaging", "org.voltcore.utils" ]
com.google_voltpatches.common; java.util; org.voltcore.messaging; org.voltcore.utils;
2,855,764
public static Status.FieldInfoStatus testFieldInfos(CodecReader reader, PrintStream infoStream, boolean failFast) throws IOException { long startNS = System.nanoTime(); final Status.FieldInfoStatus status = new Status.FieldInfoStatus(); try { // Test Field Infos if (infoStream != null) { ...
static Status.FieldInfoStatus function(CodecReader reader, PrintStream infoStream, boolean failFast) throws IOException { long startNS = System.nanoTime(); final Status.FieldInfoStatus status = new Status.FieldInfoStatus(); try { if (infoStream != null) { infoStream.print(STR); } FieldInfos fieldInfos = reader.getField...
/** * Test field infos. * @lucene.experimental */
Test field infos
testFieldInfos
{ "repo_name": "yida-lxw/solr-5.3.1", "path": "lucene/core/src/java/org/apache/lucene/index/CheckIndex.java", "license": "apache-2.0", "size": 94447 }
[ "java.io.IOException", "java.io.PrintStream", "java.util.Locale", "org.apache.lucene.util.IOUtils" ]
import java.io.IOException; import java.io.PrintStream; import java.util.Locale; import org.apache.lucene.util.IOUtils;
import java.io.*; import java.util.*; import org.apache.lucene.util.*;
[ "java.io", "java.util", "org.apache.lucene" ]
java.io; java.util; org.apache.lucene;
269,424
private void setupFirebaseAuth(){ Log.d(TAG, "setupFirebaseAuth: setting up firebase auth"); mAuth = FirebaseAuth.getInstance(); mFirebaseDatabase = FirebaseDatabase.getInstance(); myRef = mFirebaseDatabase.getReference();
void function(){ Log.d(TAG, STR); mAuth = FirebaseAuth.getInstance(); mFirebaseDatabase = FirebaseDatabase.getInstance(); myRef = mFirebaseDatabase.getReference();
/** * Setup the firebase auth object */
Setup the firebase auth object
setupFirebaseAuth
{ "repo_name": "joshmarion777/Socialnetwork", "path": "app/src/main/java/com/example/josh/socialnetwork/Utils/ViewPostFragment.java", "license": "mit", "size": 26223 }
[ "android.util.Log", "com.google.firebase.auth.FirebaseAuth", "com.google.firebase.database.FirebaseDatabase" ]
import android.util.Log; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.database.FirebaseDatabase;
import android.util.*; import com.google.firebase.auth.*; import com.google.firebase.database.*;
[ "android.util", "com.google.firebase" ]
android.util; com.google.firebase;
283,655
public Matrix getMatrixTouch() { return mMatrixTouch; }
Matrix function() { return mMatrixTouch; }
/** * Returns the charts-touch matrix used for translation and scale on touch. * * @return */
Returns the charts-touch matrix used for translation and scale on touch
getMatrixTouch
{ "repo_name": "muyoumumumu/QuShuChe", "path": "MPChartLib/src/com/github/mikephil/charting/utils/ViewPortHandler.java", "license": "apache-2.0", "size": 15705 }
[ "android.graphics.Matrix" ]
import android.graphics.Matrix;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,718,045
public void dismissFragment() { try { JSONObject newImageMeta = extractMetaDataFromFields(new JSONObject()); for (int i = 0; i < newImageMeta.names().length(); i++) { String name = newImageMeta.names().getString(i); if (!newImageMeta.getString(name).e...
void function() { try { JSONObject newImageMeta = extractMetaDataFromFields(new JSONObject()); for (int i = 0; i < newImageMeta.names().length(); i++) { String name = newImageMeta.names().getString(i); if (!newImageMeta.getString(name).equals(mImageMeta.getString(name))) { showDiscardChangesDialog(); return; } } if (mF...
/** * To be called when the fragment is being dismissed, either by ActionBar navigation or by pressing back in the * navigation bar. * Displays a confirmation dialog if there are unsaved changes, otherwise undoes the fragment's modifications to * the ActionBar and restores the last visible fragment....
To be called when the fragment is being dismissed, either by ActionBar navigation or by pressing back in the navigation bar. Displays a confirmation dialog if there are unsaved changes, otherwise undoes the fragment's modifications to the ActionBar and restores the last visible fragment
dismissFragment
{ "repo_name": "mzorz/WordPress-Android", "path": "libs/editor/WordPressEditor/src/main/java/org/wordpress/android/editor/ImageSettingsDialogFragment.java", "license": "gpl-2.0", "size": 16292 }
[ "org.json.JSONException", "org.json.JSONObject", "org.wordpress.android.util.AppLog" ]
import org.json.JSONException; import org.json.JSONObject; import org.wordpress.android.util.AppLog;
import org.json.*; import org.wordpress.android.util.*;
[ "org.json", "org.wordpress.android" ]
org.json; org.wordpress.android;
2,094,762
public Cursor getCursor() throws Exception { return(null); }
Cursor function() throws Exception { return(null); }
/** * Not applicable for Postgres backend. * FIXME: is there a way to get rid of this? * * @return a {@link com.sleepycat.db.Cursor} object. * @throws java.lang.Exception if any. */
Not applicable for Postgres backend
getCursor
{ "repo_name": "SeqWare/queryengine", "path": "seqware-queryengine-legacy/src/main/java/net/sourceforge/seqware/queryengine/backend/util/iterators/PostgresTagModelIterator.java", "license": "gpl-3.0", "size": 3093 }
[ "com.sleepycat.db.Cursor" ]
import com.sleepycat.db.Cursor;
import com.sleepycat.db.*;
[ "com.sleepycat.db" ]
com.sleepycat.db;
2,525,416
@ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux<PollResult<Void>, Void> beginInitiateScanAsync( String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { Mono<...
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<Void>, Void> function( String resourceGroupName, String managedInstanceName, String databaseName, VulnerabilityAssessmentName vulnerabilityAssessmentName, String scanId) { Mono<Response<Flux<ByteBuffer>>> mono = initiateScanWithResponseAsync( resourceGro...
/** * Executes a Vulnerability Assessment database scan. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. ...
Executes a Vulnerability Assessment database scan
beginInitiateScanAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedDatabaseVulnerabilityAssessmentScansClientImpl.java", "license": "mit", "size": 63912 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.PollerFlux", "com.azure.resourcemanager.sql.models.VulnerabilityAssessmentNa...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.resourcemanager.sql.models.Vulne...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.sql.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
2,261,072
public static DetailAST parse(FileContents contents) throws RecognitionException, TokenStreamException { final String fullText = contents.getText().getFullText().toString(); final Reader reader = new StringReader(fullText); final GeneratedJavaLexer lexer = new GeneratedJavaLexer(...
static DetailAST function(FileContents contents) throws RecognitionException, TokenStreamException { final String fullText = contents.getText().getFullText().toString(); final Reader reader = new StringReader(fullText); final GeneratedJavaLexer lexer = new GeneratedJavaLexer(reader); lexer.setCommentListener(contents);...
/** * Static helper method to parses a Java source file. * * @param contents * contains the contents of the file * @return the root of the AST * @throws TokenStreamException * if lexing failed * @throws RecognitionException * if...
Static helper method to parses a Java source file
parse
{ "repo_name": "jochenvdv/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java", "license": "lgpl-2.1", "size": 27138 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.FileContents", "com.puppycrawl.tools.checkstyle.api.TokenTypes", "com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaLexer", "com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaRecognizer", "java.io.Reader", "jav...
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.FileContents; import com.puppycrawl.tools.checkstyle.api.TokenTypes; import com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaLexer; import com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaRecognizer; import java.i...
import com.puppycrawl.tools.checkstyle.api.*; import com.puppycrawl.tools.checkstyle.grammars.*; import java.io.*;
[ "com.puppycrawl.tools", "java.io" ]
com.puppycrawl.tools; java.io;
1,028,527
protected void postProcessData(MapData map) { // assemble a tilde-delimited search string for each location // from the list of search keys, the location name, and the address for (Location location : map.getLocations()) { final StringBuffer searchString = new StringBuffer(); ...
void function(MapData map) { for (Location location : map.getLocations()) { final StringBuffer searchString = new StringBuffer(); searchString.append(location.getName().toLowerCase()); searchString.append("~"); searchString.append(location.getAbbreviation().toLowerCase()); searchString.append("~"); searchString.append(...
/** * Perform data post-processing to set a search string for each location. * * @param map */
Perform data post-processing to set a search string for each location
postProcessData
{ "repo_name": "Jasig/MapPortlet", "path": "src/main/java/org/jasig/portlet/maps/dao/RestfulJsonMapDaoImpl.java", "license": "apache-2.0", "size": 3101 }
[ "org.apache.commons.lang.StringUtils", "org.jasig.portlet.maps.model.xml.Location", "org.jasig.portlet.maps.model.xml.MapData" ]
import org.apache.commons.lang.StringUtils; import org.jasig.portlet.maps.model.xml.Location; import org.jasig.portlet.maps.model.xml.MapData;
import org.apache.commons.lang.*; import org.jasig.portlet.maps.model.xml.*;
[ "org.apache.commons", "org.jasig.portlet" ]
org.apache.commons; org.jasig.portlet;
606,763
private Map<String,File> fetchPrevArtifacts(String pkg) { Package p = prev.packages().get(pkg); if (p != null) { return p.artifacts(); } return new HashMap<>(); }
Map<String,File> function(String pkg) { Package p = prev.packages().get(pkg); if (p != null) { return p.artifacts(); } return new HashMap<>(); }
/** * Lookup the artifacts generated for this package in the previous build. */
Lookup the artifacts generated for this package in the previous build
fetchPrevArtifacts
{ "repo_name": "universsky/openjdk", "path": "langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/JavacState.java", "license": "gpl-2.0", "size": 41872 }
[ "java.io.File", "java.util.HashMap", "java.util.Map" ]
import java.io.File; import java.util.HashMap; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,385,629
public void updateBytes(String columnName, byte[] x) throws SQLException { updateBytes(findColumn(columnName), x); }
void function(String columnName, byte[] x) throws SQLException { updateBytes(findColumn(columnName), x); }
/** * JDBC 2.0 Update a column with a byte array value. The updateXXX() methods * are used to update column values in the current row, or the insert row. * The updateXXX() methods do not update the underlying database, instead * the updateRow() or insertRow() methods are called to update the databas...
JDBC 2.0 Update a column with a byte array value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database
updateBytes
{ "repo_name": "martingh15/TPJava", "path": "TPJavaNotebook/mysql-connector-java-5.1.39/src/com/mysql/jdbc/ResultSetImpl.java", "license": "mpl-2.0", "size": 288777 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
695,253
private static Image createImage(final String filename) { final URL url = Images.class.getResource("/de/ailis/microblinks/l/ltray/images/" + filename); if (url != null) { try { return ImageIO.read(url); } catch (final IOExce...
static Image function(final String filename) { final URL url = Images.class.getResource(STR + filename); if (url != null) { try { return ImageIO.read(url); } catch (final IOException e) { throw new ResourceException(STR + filename + STR + e, e); } } else throw new ResourceException(STR + filename); }
/** * Creates the icon for the specified filename and returns it. * * @param filename * The icon name (just the filename without extension) * @return The icon */
Creates the icon for the specified filename and returns it
createImage
{ "repo_name": "microblinks/ltray", "path": "src/main/java/de/ailis/microblinks/l/ltray/resources/Images.java", "license": "gpl-3.0", "size": 2171 }
[ "de.ailis.microblinks.l.ltray.exceptions.ResourceException", "java.awt.Image", "java.io.IOException", "javax.imageio.ImageIO" ]
import de.ailis.microblinks.l.ltray.exceptions.ResourceException; import java.awt.Image; import java.io.IOException; import javax.imageio.ImageIO;
import de.ailis.microblinks.l.ltray.exceptions.*; import java.awt.*; import java.io.*; import javax.imageio.*;
[ "de.ailis.microblinks", "java.awt", "java.io", "javax.imageio" ]
de.ailis.microblinks; java.awt; java.io; javax.imageio;
112,162
void enterGenericInterfaceMethodDeclaration(@NotNull JavaParser.GenericInterfaceMethodDeclarationContext ctx); void exitGenericInterfaceMethodDeclaration(@NotNull JavaParser.GenericInterfaceMethodDeclarationContext ctx);
void enterGenericInterfaceMethodDeclaration(@NotNull JavaParser.GenericInterfaceMethodDeclarationContext ctx); void exitGenericInterfaceMethodDeclaration(@NotNull JavaParser.GenericInterfaceMethodDeclarationContext ctx);
/** * Exit a parse tree produced by {@link JavaParser#genericInterfaceMethodDeclaration}. * @param ctx the parse tree */
Exit a parse tree produced by <code>JavaParser#genericInterfaceMethodDeclaration</code>
exitGenericInterfaceMethodDeclaration
{ "repo_name": "zmughal/oop-analysis", "path": "src/generated-sources/JavaListener.java", "license": "apache-2.0", "size": 38949 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
798,734
EReference getCapabilitiesBaseType_ServiceProvider();
EReference getCapabilitiesBaseType_ServiceProvider();
/** * Returns the meta object for the containment reference '{@link net.opengis.ows20.CapabilitiesBaseType#getServiceProvider <em>Service Provider</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Service Provider</em>'. * @see net.op...
Returns the meta object for the containment reference '<code>net.opengis.ows20.CapabilitiesBaseType#getServiceProvider Service Provider</code>'.
getCapabilitiesBaseType_ServiceProvider
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.ows/src/net/opengis/ows20/Ows20Package.java", "license": "lgpl-2.1", "size": 356067 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,706,235
public ArrayList<Location> possibleMoves(int row, int column){ //this arraylist will hold all of the validmoves ArrayList<Location> validMoves = new ArrayList<Location>(); //Each location has up to eight possible valid moves: //can either move up or down two spots and left or right one spot //...
ArrayList<Location> function(int row, int column){ ArrayList<Location> validMoves = new ArrayList<Location>(); if( isValidMove(new Location(row+2, column +1)) ){ validMoves.add(new Location(row+2, column +1)); } if( isValidMove(new Location(row+2, column-1)) ){ validMoves.add(new Location(row+2, column-1)); } if( isVal...
/** * Given a row and column, this method will return all possible * next moves. * * @param row The row to check * @param column the column to check * @return All possible next moves from location: row,column */
Given a row and column, this method will return all possible next moves
possibleMoves
{ "repo_name": "PaulVaroutsos/Scripts-Algorithms-and-Other-Projects", "path": "Knights Tour/KnightsTour.java", "license": "mit", "size": 7114 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,123,469
private void init(){ mY = DensityUtil.applyDimensionOffset(mContext, TypedValue.COMPLEX_UNIT_DIP,64); mGravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM; }
void function(){ mY = DensityUtil.applyDimensionOffset(mContext, TypedValue.COMPLEX_UNIT_DIP,64); mGravity = Gravity.CENTER_HORIZONTAL Gravity.BOTTOM; }
/** * set the default toast position */
set the default toast position
init
{ "repo_name": "snowdream/SnowdreamFramework", "path": "modules/core/src/main/java/com/github/snowdream/android/widget/Toast.java", "license": "apache-2.0", "size": 15455 }
[ "android.util.TypedValue", "android.view.Gravity", "com.github.snowdream.android.util.DensityUtil" ]
import android.util.TypedValue; import android.view.Gravity; import com.github.snowdream.android.util.DensityUtil;
import android.util.*; import android.view.*; import com.github.snowdream.android.util.*;
[ "android.util", "android.view", "com.github.snowdream" ]
android.util; android.view; com.github.snowdream;
2,266,282
public List<EndpointRule> resolve(Api api) { HealthCheckService rootHealthCheck = api.getServices().get(HealthCheckService.class); boolean hcEnabled = (rootHealthCheck != null && rootHealthCheck.isEnabled()); // Filter to check only HTTP endpoints Stream<HttpEndpoint> httpEndpoints ...
List<EndpointRule> function(Api api) { HealthCheckService rootHealthCheck = api.getServices().get(HealthCheckService.class); boolean hcEnabled = (rootHealthCheck != null && rootHealthCheck.isEnabled()); Stream<HttpEndpoint> httpEndpoints = api .getProxy() .getGroups() .stream() .filter(group -> group.getEndpoints() != ...
/** * Returns a {@link Stream} of {@link Endpoint} which have to be health-checked. * * @param api * @return */
Returns a <code>Stream</code> of <code>Endpoint</code> which have to be health-checked
resolve
{ "repo_name": "gravitee-io/gravitee-gateway", "path": "gravitee-gateway-services/gravitee-gateway-services-healthcheck/src/main/java/io/gravitee/gateway/services/healthcheck/EndpointHealthcheckResolver.java", "license": "apache-2.0", "size": 9214 }
[ "io.gravitee.definition.model.Api", "io.gravitee.definition.model.endpoint.HttpEndpoint", "io.gravitee.definition.model.services.healthcheck.HealthCheckService", "io.gravitee.gateway.services.healthcheck.grpc.GrpcEndpointRule", "io.gravitee.gateway.services.healthcheck.http.HttpEndpointRule", "java.util.L...
import io.gravitee.definition.model.Api; import io.gravitee.definition.model.endpoint.HttpEndpoint; import io.gravitee.definition.model.services.healthcheck.HealthCheckService; import io.gravitee.gateway.services.healthcheck.grpc.GrpcEndpointRule; import io.gravitee.gateway.services.healthcheck.http.HttpEndpointRule; i...
import io.gravitee.definition.model.*; import io.gravitee.definition.model.endpoint.*; import io.gravitee.definition.model.services.healthcheck.*; import io.gravitee.gateway.services.healthcheck.grpc.*; import io.gravitee.gateway.services.healthcheck.http.*; import java.util.*; import java.util.function.*; import java....
[ "io.gravitee.definition", "io.gravitee.gateway", "java.util" ]
io.gravitee.definition; io.gravitee.gateway; java.util;
2,720,874
public static void unregisterHooks(ODatabaseInternal<?> db, List<Class<? extends ORecordHook>> candidates) { Set<ORecordHook> hooksToUnregister = getHooksToUnregister(db, candidates); hooksToUnregister.forEach(db::unregisterHook); }
static void function(ODatabaseInternal<?> db, List<Class<? extends ORecordHook>> candidates) { Set<ORecordHook> hooksToUnregister = getHooksToUnregister(db, candidates); hooksToUnregister.forEach(db::unregisterHook); }
/** * Unregister hooks from database * @param db database * @param candidates hooks for unregister */
Unregister hooks from database
unregisterHooks
{ "repo_name": "OrienteerBAP/wicket-orientdb", "path": "wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/utils/ODbUtils.java", "license": "apache-2.0", "size": 4586 }
[ "com.orientechnologies.orient.core.db.ODatabaseInternal", "com.orientechnologies.orient.core.hook.ORecordHook", "java.util.List", "java.util.Set" ]
import com.orientechnologies.orient.core.db.ODatabaseInternal; import com.orientechnologies.orient.core.hook.ORecordHook; import java.util.List; import java.util.Set;
import com.orientechnologies.orient.core.db.*; import com.orientechnologies.orient.core.hook.*; import java.util.*;
[ "com.orientechnologies.orient", "java.util" ]
com.orientechnologies.orient; java.util;
2,659,007
public static Builder builder(PinInfo pinInfo, int debounceTimeMs) { return new Builder(pinInfo, debounceTimeMs); } private Integer gpio; private PinInfo pinInfo; private GpioPullUpDown pud = GpioPullUpDown.NONE; private int debounceTimeMs; private GpioDeviceFactoryInterface deviceFactory; publi...
static Builder function(PinInfo pinInfo, int debounceTimeMs) { return new Builder(pinInfo, debounceTimeMs); } private Integer gpio; private PinInfo pinInfo; private GpioPullUpDown pud = GpioPullUpDown.NONE; private int debounceTimeMs; private GpioDeviceFactoryInterface deviceFactory; public Builder(int gpio, int deboun...
/** * Create a new DebouncedDigitalInputDevice builder instance * * @param pinInfo The pin to be used for the new * DebouncedDigitalInputDevice * @param debounceTimeMs Specifies the length of time (in seconds) that the * component will ignore changes ...
Create a new DebouncedDigitalInputDevice builder instance
builder
{ "repo_name": "mattjlewis/diozero", "path": "diozero-core/src/main/java/com/diozero/api/DebouncedDigitalInputDevice.java", "license": "mit", "size": 11969 }
[ "com.diozero.internal.spi.GpioDeviceFactoryInterface" ]
import com.diozero.internal.spi.GpioDeviceFactoryInterface;
import com.diozero.internal.spi.*;
[ "com.diozero.internal" ]
com.diozero.internal;
1,073,919
public com.google.protobuf.Empty deleteInstance(com.google.bigtable.admin.v2.DeleteInstanceRequest request) { return blockingUnaryCall( getChannel(), getDeleteInstanceMethodHelper(), getCallOptions(), request); }
com.google.protobuf.Empty function(com.google.bigtable.admin.v2.DeleteInstanceRequest request) { return blockingUnaryCall( getChannel(), getDeleteInstanceMethodHelper(), getCallOptions(), request); }
/** * <pre> * Delete an instance from a project. * </pre> */
<code> Delete an instance from a project. </code>
deleteInstance
{ "repo_name": "pongad/api-client-staging", "path": "generated/java/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableInstanceAdminGrpc.java", "license": "bsd-3-clause", "size": 106367 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
278,340