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
@ServiceRef(referenceId = "failingReference", optional = true) public void setFailingReference(final String failingReference) { if (CONF_FAIL_REFERENCE.equals(failingReference)) { throw new ConfigurationException(CONF_FAIL_REFERENCE); } }
@ServiceRef(referenceId = STR, optional = true) void function(final String failingReference) { if (CONF_FAIL_REFERENCE.equals(failingReference)) { throw new ConfigurationException(CONF_FAIL_REFERENCE); } }
/** * Setter for reference that causes failing this component. * * @param failingReference * if the value of the reference is 'fail_reference', the setter will throw an exception. */
Setter for reference that causes failing this component
setFailingReference
{ "repo_name": "zsigmond-czine-everit/ecm-component", "path": "tests/src/main/java/org/everit/osgi/ecm/component/tests/FailingComponent.java", "license": "apache-2.0", "size": 4087 }
[ "org.everit.osgi.ecm.annotation.ServiceRef", "org.everit.osgi.ecm.component.ConfigurationException" ]
import org.everit.osgi.ecm.annotation.ServiceRef; import org.everit.osgi.ecm.component.ConfigurationException;
import org.everit.osgi.ecm.annotation.*; import org.everit.osgi.ecm.component.*;
[ "org.everit.osgi" ]
org.everit.osgi;
28,725
@Override protected ArchivePath getClassesPath() { throw new UnsupportedOperationException("ResourceAdapterArchive does not support classes"); } // -------------------------------------------------------------------------------------|| // Class Members // -------------------------------...
ArchivePath function() { throw new UnsupportedOperationException(STR); } @SuppressWarnings(STR) private static final Logger log = Logger.getLogger(RARArchiveImpl.class.getName()); private static final ArchivePath PATH_MANIFEST = new BasicPath(STR); private static final ArchivePath PATH_RESOURCE = new BasicPath("/"); pr...
/** * Classes are not supported by ResourceAdapterArchive. * * @throws UnsupportedOperationException ResourceAdapterArchive does not support classes */
Classes are not supported by ResourceAdapterArchive
getClassesPath
{ "repo_name": "swarmsandbox/wildfly-swarm", "path": "fractions/javaee/resource-adapters/src/main/java/org/wildfly/swarm/resource/adapters/internal/RARArchiveImpl.java", "license": "apache-2.0", "size": 4989 }
[ "java.util.logging.Logger", "org.jboss.shrinkwrap.api.ArchivePath", "org.jboss.shrinkwrap.impl.base.path.BasicPath" ]
import java.util.logging.Logger; import org.jboss.shrinkwrap.api.ArchivePath; import org.jboss.shrinkwrap.impl.base.path.BasicPath;
import java.util.logging.*; import org.jboss.shrinkwrap.api.*; import org.jboss.shrinkwrap.impl.base.path.*;
[ "java.util", "org.jboss.shrinkwrap" ]
java.util; org.jboss.shrinkwrap;
853,994
public Image getLabelImage();
Image function();
/** * Returns the image used to present this node in a preference dialog. * * @return the image for this node, or <code>null</code> * if there is no image for this node */
Returns the image used to present this node in a preference dialog
getLabelImage
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/jface/preference/IPreferenceNode.java", "license": "epl-1.0", "size": 3620 }
[ "org.eclipse.swt.graphics.Image" ]
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
992,982
public static Map<Integer, String> getPrettyMap() { return Collections.unmodifiableMap(prettyMap); }
static Map<Integer, String> function() { return Collections.unmodifiableMap(prettyMap); }
/** * Returns a unmodifiable map. * * @return unmodifiable map */
Returns a unmodifiable map
getPrettyMap
{ "repo_name": "infiniteautomation/BACnet4J", "path": "src/main/java/com/serotonin/bacnet4j/type/enumerated/ProtocolLevel.java", "license": "gpl-3.0", "size": 3558 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
972,018
public void addPlayedRole(org.hl7.rim.Role playedRole) { throw new UnsupportedOperationException(); }
public void addPlayedRole(org.hl7.rim.Role playedRole) { throw new UnsupportedOperationException(); }
/** Property mutator, does nothing if not overloaded.playedRole. @see org.hl7.rim.Entity#setPlayedRole */
Property mutator, does nothing if not overloaded.playedRole
setPlayedRole
{ "repo_name": "markusgumbel/dshl7", "path": "hl7-javasig/gencode/org/hl7/rim/decorators/EntityDecorator.java", "license": "apache-2.0", "size": 10386 }
[ "org.hl7.rim.Role" ]
import org.hl7.rim.Role;
import org.hl7.rim.*;
[ "org.hl7.rim" ]
org.hl7.rim;
1,281,218
public static void assertHttpHeader(HttpResponse resp, String headerName, String expectedVal) { final Header[] authnHeaders = resp.getHeaders(headerName); assertTrue("Header " + headerName + " should be present in the HTTP response", authnHeaders != null && authnHeaders.length > 0); ...
static void function(HttpResponse resp, String headerName, String expectedVal) { final Header[] authnHeaders = resp.getHeaders(headerName); assertTrue(STR + headerName + STR, authnHeaders != null && authnHeaders.length > 0); for (final Header header : authnHeaders) { if (expectedVal.equals(header.getValue())) { return;...
/** * Asserts that the given HttpResponse contains header with given name and value. * * @param resp HttpResponse (from Apache HttpClient) * @param headerName name of HTTP header * @param expectedVal expected HTTP header value */
Asserts that the given HttpResponse contains header with given name and value
assertHttpHeader
{ "repo_name": "tomazzupan/wildfly", "path": "testsuite/shared/src/main/java/org/jboss/as/test/integration/security/common/Utils.java", "license": "lgpl-2.1", "size": 52307 }
[ "org.apache.http.Header", "org.apache.http.HttpResponse", "org.junit.Assert" ]
import org.apache.http.Header; import org.apache.http.HttpResponse; import org.junit.Assert;
import org.apache.http.*; import org.junit.*;
[ "org.apache.http", "org.junit" ]
org.apache.http; org.junit;
1,463,198
public void addPublicShare(@Nonnull String providerImageId) throws CloudException, InternalException;
void function(@Nonnull String providerImageId) throws CloudException, InternalException;
/** * Shares the specified image with the public. * @param providerImageId the unique ID of the image to be made public * @throws CloudException an error occurred with the cloud provider * @throws InternalException a local error occurred in the Dasein Cloud implementation * @throws OperationNot...
Shares the specified image with the public
addPublicShare
{ "repo_name": "maksimov/dasein-cloud-core", "path": "src/main/java/org/dasein/cloud/compute/MachineImageSupport.java", "license": "apache-2.0", "size": 38481 }
[ "javax.annotation.Nonnull", "org.dasein.cloud.CloudException", "org.dasein.cloud.InternalException" ]
import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException;
import javax.annotation.*; import org.dasein.cloud.*;
[ "javax.annotation", "org.dasein.cloud" ]
javax.annotation; org.dasein.cloud;
11,078
@Test public void testModelCollectionCopy() throws Exception { Logger.getLogger(getClass()).debug("TEST testModelCollectionCopy"); CopyConstructorTester tester = new CopyConstructorTester(object); tester.proxy(List.class, 1, l1); tester.proxy(List.class, 2, l2); tester.proxy(Project.class, 1, p...
void function() throws Exception { Logger.getLogger(getClass()).debug(STR); CopyConstructorTester tester = new CopyConstructorTester(object); tester.proxy(List.class, 1, l1); tester.proxy(List.class, 2, l2); tester.proxy(Project.class, 1, p1); tester.proxy(Project.class, 2, p1); assertTrue(tester.testCopyConstructor(Wo...
/** * Test deep copy constructor. * * @throws Exception the exception */
Test deep copy constructor
testModelCollectionCopy
{ "repo_name": "WestCoastInformatics/UMLS-Terminology-Server", "path": "jpa-model/src/test/java/com/wci/umls/server/jpa/test/workflow/WorkflowConfigJpaUnitTest.java", "license": "apache-2.0", "size": 6468 }
[ "com.wci.umls.server.Project", "com.wci.umls.server.helpers.CopyConstructorTester", "com.wci.umls.server.model.workflow.WorkflowConfig", "java.util.List", "org.apache.log4j.Logger", "org.junit.Assert" ]
import com.wci.umls.server.Project; import com.wci.umls.server.helpers.CopyConstructorTester; import com.wci.umls.server.model.workflow.WorkflowConfig; import java.util.List; import org.apache.log4j.Logger; import org.junit.Assert;
import com.wci.umls.server.*; import com.wci.umls.server.helpers.*; import com.wci.umls.server.model.workflow.*; import java.util.*; import org.apache.log4j.*; import org.junit.*;
[ "com.wci.umls", "java.util", "org.apache.log4j", "org.junit" ]
com.wci.umls; java.util; org.apache.log4j; org.junit;
2,883,624
private static PolygonOptions createPolygonOptions (PolygonOptions originalPolygonOption, boolean isFill, boolean isOutline) { PolygonOptions polygonOptions = new PolygonOptions(); if (isFill) { polygonOptions.fillColor(originalPolygonOption.getFillColor()); } ...
static PolygonOptions function (PolygonOptions originalPolygonOption, boolean isFill, boolean isOutline) { PolygonOptions polygonOptions = new PolygonOptions(); if (isFill) { polygonOptions.fillColor(originalPolygonOption.getFillColor()); } if (isOutline) { polygonOptions.strokeColor(originalPolygonOption.getStrokeColo...
/** *Creates a new PolygonOption from given properties of an existing PolygonOption * @param originalPolygonOption An existing PolygonOption instance * @param isFill Whether the fill for a polygon is set * @param isOutline Whether the outline for a polygon is set * @return A new PolygonOption ...
Creates a new PolygonOption from given properties of an existing PolygonOption
createPolygonOptions
{ "repo_name": "josegury/AndroidMarkerClusteringMaps", "path": "MarkerClusteringMaps/app/src/main/java/joseangelpardo/markerclusteringmaps/libreryMaps/kml/KmlStyle.java", "license": "apache-2.0", "size": 14806 }
[ "com.google.android.gms.maps.model.PolygonOptions" ]
import com.google.android.gms.maps.model.PolygonOptions;
import com.google.android.gms.maps.model.*;
[ "com.google.android" ]
com.google.android;
1,182,153
public Builder supportedFeatures(final Set<GraphFeature> asupportedFeatures) { this.supportedFeatures = asupportedFeatures; return this; }
Builder function(final Set<GraphFeature> asupportedFeatures) { this.supportedFeatures = asupportedFeatures; return this; }
/** * Configure the {@link LayoutAlgorithmData#getSupportedFeatures() supportedFeatures}. */
Configure the <code>LayoutAlgorithmData#getSupportedFeatures() supportedFeatures</code>
supportedFeatures
{ "repo_name": "eNBeWe/elk", "path": "plugins/org.eclipse.elk.core/src/org/eclipse/elk/core/data/LayoutAlgorithmData.java", "license": "epl-1.0", "size": 11648 }
[ "java.util.Set", "org.eclipse.elk.graph.properties.GraphFeature" ]
import java.util.Set; import org.eclipse.elk.graph.properties.GraphFeature;
import java.util.*; import org.eclipse.elk.graph.properties.*;
[ "java.util", "org.eclipse.elk" ]
java.util; org.eclipse.elk;
985,582
protected Map<String, String> getParameters() { return this.params; }
Map<String, String> function() { return this.params; }
/** * Returns authentication parameters map. Keys in the map are lower-cased. * * @return the map of authentication parameters */
Returns authentication parameters map. Keys in the map are lower-cased
getParameters
{ "repo_name": "0x90sled/droidtowers", "path": "main/source/org/apach3/http/impl/auth/RFC2617Scheme.java", "license": "mit", "size": 4083 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
219,231
Object fromStyleConstants(StyleConstants key, Object value) { ColorValue colorValue = new ColorValue(); colorValue.c = (Color)value; colorValue.svalue = colorToHex(colorValue.c); return colorValue; }
Object fromStyleConstants(StyleConstants key, Object value) { ColorValue colorValue = new ColorValue(); colorValue.c = (Color)value; colorValue.svalue = colorToHex(colorValue.c); return colorValue; }
/** * Converts a <code>StyleConstants</code> attribute value to * a CSS attribute value. If there is no conversion * returns <code>null</code>. By default, there is no conversion. * * @param key the <code>StyleConstants</code> attribute * @param value the value of...
Converts a <code>StyleConstants</code> attribute value to a CSS attribute value. If there is no conversion returns <code>null</code>. By default, there is no conversion
fromStyleConstants
{ "repo_name": "md-5/jdk10", "path": "src/java.desktop/share/classes/javax/swing/text/html/CSS.java", "license": "gpl-2.0", "size": 136569 }
[ "java.awt.Color", "javax.swing.text.StyleConstants" ]
import java.awt.Color; import javax.swing.text.StyleConstants;
import java.awt.*; import javax.swing.text.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
233,032
private static Pair<IFile, IRegion> findIdDefinition(IProject project, String id) { // FIRST look in the same file as the originating request, that's where you usually // want to jump IFile self = AdtUtils.getActiveFile(); if (self != null && EXT_XML.equals(self.getFileExtension())) ...
static Pair<IFile, IRegion> function(IProject project, String id) { IFile self = AdtUtils.getActiveFile(); if (self != null && EXT_XML.equals(self.getFileExtension())) { Pair<IFile, IRegion> target = findIdInXml(id, self); if (target != null) { return target; } } ResourceRepository resources = getResources(project, fal...
/** * Finds a definition of an id attribute in layouts. (Ids can also be defined as * resources; use {@link #findValueInXml} or {@link #findValueInDocument} to locate it there.) */
Finds a definition of an id attribute in layouts. (Ids can also be defined as resources; use <code>#findValueInXml</code> or <code>#findValueInDocument</code> to locate it there.)
findIdDefinition
{ "repo_name": "rex-xxx/mt6572_x201", "path": "sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/Hyperlinks.java", "license": "gpl-2.0", "size": 77348 }
[ "com.android.ide.common.resources.ResourceFolder", "com.android.ide.common.resources.ResourceRepository", "com.android.ide.common.resources.configuration.FolderConfiguration", "com.android.ide.eclipse.adt.AdtUtils", "com.android.ide.eclipse.adt.io.IFolderWrapper", "com.android.io.IAbstractFolder", "com....
import com.android.ide.common.resources.ResourceFolder; import com.android.ide.common.resources.ResourceRepository; import com.android.ide.common.resources.configuration.FolderConfiguration; import com.android.ide.eclipse.adt.AdtUtils; import com.android.ide.eclipse.adt.io.IFolderWrapper; import com.android.io.IAbstrac...
import com.android.ide.common.resources.*; import com.android.ide.common.resources.configuration.*; import com.android.ide.eclipse.adt.*; import com.android.ide.eclipse.adt.io.*; import com.android.io.*; import com.android.resources.*; import com.android.utils.*; import java.util.*; import org.eclipse.core.resources.*;...
[ "com.android.ide", "com.android.io", "com.android.resources", "com.android.utils", "java.util", "org.eclipse.core", "org.eclipse.jface" ]
com.android.ide; com.android.io; com.android.resources; com.android.utils; java.util; org.eclipse.core; org.eclipse.jface;
62,038
public UIPoint getOverlayLocation(int row, boolean top) { UIRectangle rect = listComponent.getRowBounds(row, row); UIPoint p = getDataComponent().getLocationOnScreen(); p.x += rect.x; p.y = (int) rect.y; return p; }
UIPoint function(int row, boolean top) { UIRectangle rect = listComponent.getRowBounds(row, row); UIPoint p = getDataComponent().getLocationOnScreen(); p.x += rect.x; p.y = (int) rect.y; return p; }
/** * Gets the location for a component overlay. The location is calculated to be * left aligned * * @param row * the row to get the overlay location for * @param top * true for the overlay to be at the top of the component; false for * at the bottom * * @return ...
Gets the location for a component overlay. The location is calculated to be left aligned
getOverlayLocation
{ "repo_name": "appnativa/rare", "path": "source/rare/core/com/appnativa/rare/viewer/aListViewer.java", "license": "gpl-3.0", "size": 56463 }
[ "com.appnativa.rare.ui.UIPoint", "com.appnativa.rare.ui.UIRectangle" ]
import com.appnativa.rare.ui.UIPoint; import com.appnativa.rare.ui.UIRectangle;
import com.appnativa.rare.ui.*;
[ "com.appnativa.rare" ]
com.appnativa.rare;
53,262
int requestFloatingBuffers(int numRequired) throws IOException { int numRequestedBuffers = 0; synchronized (bufferQueue) { // Similar to notifyBufferAvailable(), make sure that we never add a buffer after channel // released all buffers via releaseAllResources(). if (inputChannel.isReleased()) { ret...
int requestFloatingBuffers(int numRequired) throws IOException { int numRequestedBuffers = 0; synchronized (bufferQueue) { if (inputChannel.isReleased()) { return numRequestedBuffers; } numRequiredBuffers = numRequired; while (bufferQueue.getAvailableBufferSize() < numRequiredBuffers && !isWaitingForFloatingBuffers) { ...
/** * Requests floating buffers from the buffer pool based on the given required amount, and returns the actual * requested amount. If the required amount is not fully satisfied, it will register as a listener. */
Requests floating buffers from the buffer pool based on the given required amount, and returns the actual requested amount. If the required amount is not fully satisfied, it will register as a listener
requestFloatingBuffers
{ "repo_name": "hequn8128/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/BufferManager.java", "license": "apache-2.0", "size": 13679 }
[ "java.io.IOException", "org.apache.flink.runtime.io.network.buffer.Buffer", "org.apache.flink.runtime.io.network.buffer.BufferPool" ]
import java.io.IOException; import org.apache.flink.runtime.io.network.buffer.Buffer; import org.apache.flink.runtime.io.network.buffer.BufferPool;
import java.io.*; import org.apache.flink.runtime.io.network.buffer.*;
[ "java.io", "org.apache.flink" ]
java.io; org.apache.flink;
788,318
@RequestMapping(value = "/{name}", method = RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) public void deploy(@PathVariable("name") String name, @RequestParam(required = false) String properties) { StreamDefinition stream = this.repository.findOne(name); if (stream == null) { throw new NoSuchStr...
@RequestMapping(value = STR, method = RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) void function(@PathVariable("name") String name, @RequestParam(required = false) String properties) { StreamDefinition stream = this.repository.findOne(name); if (stream == null) { throw new NoSuchStreamDefinitionException(nam...
/** * Request deployment of an existing stream definition. * @param name the name of an existing stream definition (required) * @param properties the deployment properties for the stream as a comma-delimited list of key=value pairs */
Request deployment of an existing stream definition
deploy
{ "repo_name": "sabbyanandan/spring-cloud-dataflow", "path": "spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/StreamDeploymentController.java", "license": "apache-2.0", "size": 20811 }
[ "org.springframework.cloud.dataflow.core.StreamDefinition", "org.springframework.cloud.dataflow.rest.util.DeploymentPropertiesUtils", "org.springframework.cloud.dataflow.server.repository.NoSuchStreamDefinitionException", "org.springframework.cloud.deployer.spi.app.DeploymentState", "org.springframework.htt...
import org.springframework.cloud.dataflow.core.StreamDefinition; import org.springframework.cloud.dataflow.rest.util.DeploymentPropertiesUtils; import org.springframework.cloud.dataflow.server.repository.NoSuchStreamDefinitionException; import org.springframework.cloud.deployer.spi.app.DeploymentState; import org.sprin...
import org.springframework.cloud.dataflow.core.*; import org.springframework.cloud.dataflow.rest.util.*; import org.springframework.cloud.dataflow.server.repository.*; import org.springframework.cloud.deployer.spi.app.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "org.springframework.cloud", "org.springframework.http", "org.springframework.web" ]
org.springframework.cloud; org.springframework.http; org.springframework.web;
1,049,217
public synchronized Job loadJob() throws IOException { return new CompletedJob(conf, jobIndexInfo.getJobId(), historyFile, false, jobIndexInfo.getUser(), this, aclsMgr); }
synchronized Job function() throws IOException { return new CompletedJob(conf, jobIndexInfo.getJobId(), historyFile, false, jobIndexInfo.getUser(), this, aclsMgr); }
/** * Parse a job from the JobHistoryFile, if the underlying file is not going * to be deleted. * * @return the Job or null if the underlying file was deleted. * @throws IOException * if there is an error trying to read the file. */
Parse a job from the JobHistoryFile, if the underlying file is not going to be deleted
loadJob
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java", "license": "apache-2.0", "size": 38015 }
[ "java.io.IOException", "org.apache.hadoop.mapreduce.v2.app.job.Job" ]
import java.io.IOException; import org.apache.hadoop.mapreduce.v2.app.job.Job;
import java.io.*; import org.apache.hadoop.mapreduce.v2.app.job.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
887,474
@DataProvider(name = "createData") public Object[][] createData() throws Exception { List<TestParam> testParams = new ArrayList<TestParam>(); Object[][] data = null; for (int i = 0; i < testUserNames.length; i++) { omero.client client = new omero.client(); Service...
@DataProvider(name = STR) Object[][] function() throws Exception { List<TestParam> testParams = new ArrayList<TestParam>(); Object[][] data = null; for (int i = 0; i < testUserNames.length; i++) { omero.client client = new omero.client(); ServiceFactoryPrx session = client.createSession(testUserNames[i], PASSWORD); Exp...
/** * Generates data for each user. * @return Object[][] data. */
Generates data for each user
createData
{ "repo_name": "simleo/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/PermissionsTestAll.java", "license": "gpl-2.0", "size": 22734 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.testng.annotations.DataProvider" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.testng.annotations.DataProvider;
import java.util.*; import org.testng.annotations.*;
[ "java.util", "org.testng.annotations" ]
java.util; org.testng.annotations;
2,722,049
public Expression getInnerExpression() { return m_expr; }
Expression function() { return m_expr; }
/** * Get the inner contained expression of this filter. */
Get the inner contained expression of this filter
getInnerExpression
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java", "license": "mit", "size": 9925 }
[ "com.sun.org.apache.xpath.internal.Expression" ]
import com.sun.org.apache.xpath.internal.Expression;
import com.sun.org.apache.xpath.internal.*;
[ "com.sun.org" ]
com.sun.org;
737,754
public WhenResourceMissingTypeEnum getWhenResourceMissingTypeValue();
WhenResourceMissingTypeEnum function();
/** * Returns the resource missing handling type. */
Returns the resource missing handling type
getWhenResourceMissingTypeValue
{ "repo_name": "MHTaleb/Encologim", "path": "lib/JasperReport/src/net/sf/jasperreports/engine/JRReport.java", "license": "gpl-3.0", "size": 22538 }
[ "net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum" ]
import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum;
import net.sf.jasperreports.engine.type.*;
[ "net.sf.jasperreports" ]
net.sf.jasperreports;
656,602
public Point getParkingLocation() { return parkingLocation; }
Point function() { return parkingLocation; }
/** * Returns the location of this Structure's "Parking Garage" * @return A Point representing this Structure's parking garage entrance */
Returns the location of this Structure's "Parking Garage"
getParkingLocation
{ "repo_name": "brandonsbarber/CS201-Course-Work", "path": "src/cs201/structures/Structure.java", "license": "mit", "size": 6849 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
483,771
public synchronized void write(String str) throws IOException { write(str.getBytes("UTF-8")); }
synchronized void function(String str) throws IOException { write(str.getBytes("UTF-8")); }
/** * Write the UTF-8 encoding of a String to the underlying ByteBuffer * via this OutputStream. * * @param str String to be written. * @throws java.io.IOException */
Write the UTF-8 encoding of a String to the underlying ByteBuffer via this OutputStream
write
{ "repo_name": "lukasz-skalski/WebSocketsClient", "path": "app/src/main/java/com/skalski/websocketsclient/SecureWebSocktes/ByteBufferOutputStream.java", "license": "gpl-3.0", "size": 4951 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
145,963
protected String getWord() throws IOException { int tok = st.nextToken(); if (tok != StreamTokenizer.TT_WORD) parseError("expecting a word, " + gotWhat(tok)); return st.sval; }
String function() throws IOException { int tok = st.nextToken(); if (tok != StreamTokenizer.TT_WORD) parseError(STR + gotWhat(tok)); return st.sval; }
/** * Read a word or generate a parse error. */
Read a word or generate a parse error
getWord
{ "repo_name": "margaritis/gs-core", "path": "src/org/graphstream/stream/file/FileSourceBase.java", "license": "lgpl-3.0", "size": 32992 }
[ "java.io.IOException", "java.io.StreamTokenizer" ]
import java.io.IOException; import java.io.StreamTokenizer;
import java.io.*;
[ "java.io" ]
java.io;
2,597,191
private String createPublication(PublicationDetail pubDetail) { pubDetail.getPK().setSpace(spaceId); pubDetail.getPK().setComponentName(componentId); pubDetail.setCreatorId(userId); if (pubDetail.getCreationDate() == null) { pubDetail.setCreationDate(new Date()); } NodePK nodePK = new N...
String function(PublicationDetail pubDetail) { pubDetail.getPK().setSpace(spaceId); pubDetail.getPK().setComponentName(componentId); pubDetail.setCreatorId(userId); if (pubDetail.getCreationDate() == null) { pubDetail.setCreationDate(new Date()); } NodePK nodePK = new NodePK(topicId, spaceId, componentId); String resul...
/** * Creates the publication described by the detail given as a parameter. * * @param pubDetail The publication detail. * @return The id of the newly created publication. */
Creates the publication described by the detail given as a parameter
createPublication
{ "repo_name": "auroreallibe/Silverpeas-Components", "path": "kmelia/kmelia-library/src/main/java/org/silverpeas/components/kmelia/PublicationImport.java", "license": "agpl-3.0", "size": 19625 }
[ "java.util.Date", "org.silverpeas.core.contribution.publication.model.PublicationDetail", "org.silverpeas.core.node.model.NodePK" ]
import java.util.Date; import org.silverpeas.core.contribution.publication.model.PublicationDetail; import org.silverpeas.core.node.model.NodePK;
import java.util.*; import org.silverpeas.core.contribution.publication.model.*; import org.silverpeas.core.node.model.*;
[ "java.util", "org.silverpeas.core" ]
java.util; org.silverpeas.core;
228,192
public JSONObject put(String key, Map value) throws JSONException { this.put(key, new JSONObject(value)); return this; }
JSONObject function(String key, Map value) throws JSONException { this.put(key, new JSONObject(value)); return this; }
/** * Put a key/value pair in the JSONObject, where the value will be a * JSONObject which is produced from a Map. * * @param key A key string. * @param value A Map value. * @return this. * @throws JSONException */
Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map
put
{ "repo_name": "yaronyg/thali", "path": "Prototype/YaronG/LiveConnectPrototype/LiveConnectPrototype/src/com/codeplex/peerly/org/json/JSONObject.java", "license": "apache-2.0", "size": 54548 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,899,342
public String getClientInfo(String name) throws SQLException { try { checkForNullPhysicalConnection(); return physicalConnection_.getClientInfo(name); } catch (SQLException sqle) { notifyException(sqle); throw sqle; } }
String function(String name) throws SQLException { try { checkForNullPhysicalConnection(); return physicalConnection_.getClientInfo(name); } catch (SQLException sqle) { notifyException(sqle); throw sqle; } }
/** * <code>getClientInfo</code> forwards to * <code>physicalConnection_</code>. Always returns a <code>null * String</code> since Derby does not support * ClientInfoProperties. * * @param name a property key to get <code>String</code> * @return a property value <code>String</code> ...
<code>getClientInfo</code> forwards to <code>physicalConnection_</code>. Always returns a <code>null String</code> since Derby does not support ClientInfoProperties
getClientInfo
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/client/src/main/java/com/pivotal/gemfirexd/internal/client/am/LogicalConnection40.java", "license": "apache-2.0", "size": 10889 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,471,589
public void setPoolable(boolean poolable) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "setPoolable", poolable); } // Assert the statement has not bee...
void function(boolean poolable) throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, STR, poolable); } checkForClosedStatement(); isPoolable = poolable; } } catch (SqlException se) { throw se.getSQLException(); } }
/** * Requests that a Statement be pooled or not. * * @param poolable requests that the Statement be pooled if true * and not be pooled if false. * @throws SQLException if the Statement has been closed. */
Requests that a Statement be pooled or not
setPoolable
{ "repo_name": "splicemachine/spliceengine", "path": "db-client/src/main/java/com/splicemachine/db/client/am/Statement.java", "license": "agpl-3.0", "size": 126061 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
128,698
public static boolean isMidnight(final Object source, final boolean compareMilliseconds) { final Calendar cal = Dates.getCalendar(source); if (null != cal) { final boolean result = ((cal.get(Calendar.HOUR_OF_DAY) == 0) && (cal.get(Calendar.MINUTE) == 0) && (cal.get(Calendar.SECOND) == 0)); if (result...
static boolean function(final Object source, final boolean compareMilliseconds) { final Calendar cal = Dates.getCalendar(source); if (null != cal) { final boolean result = ((cal.get(Calendar.HOUR_OF_DAY) == 0) && (cal.get(Calendar.MINUTE) == 0) && (cal.get(Calendar.SECOND) == 0)); if (result) { return (compareMilliseco...
/** * Determines if a date has a time value of Midnight (12:00:00 AM) * * @param source * Date to check. * * @param compareMilliseconds * Flag indicating if milliseconds should be checked. If FALSE, then source will only be checked to the SECONDS level. * * @return Fl...
Determines if a date has a time value of Midnight (12:00:00 AM)
isMidnight
{ "repo_name": "OpenNTF/org.openntf.domino", "path": "domino/core/src/main/java/org/openntf/domino/utils/Dates.java", "license": "apache-2.0", "size": 47487 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
280,242
public MetaProperty<Double> spread() { return spread; }
MetaProperty<Double> function() { return spread; }
/** * The meta-property for the {@code spread} property. * @return the meta-property, not null */
The meta-property for the spread property
spread
{ "repo_name": "OpenGamma/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/GenericDoubleShifts.java", "license": "apache-2.0", "size": 12557 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
230,715
public static void build_externals( Fida.Repository r ) { // Maps user namespace xid to the corresponding Fida.Node Map<Xid, Fida.Node> map = new HashMap<Xid, Fida.Node>(); // traverse whole repository for (Fida.Commit fc : r.commits) { for (Fida.Node f...
static void function( Fida.Repository r ) { Map<Xid, Fida.Node> map = new HashMap<Xid, Fida.Node>(); for (Fida.Commit fc : r.commits) { for (Fida.Node fn : fc.nodes) { if (map.get(fn.payload_xid) != null) { throw new RuntimeException(String.format( STR%s\STR, XidString.serialize(fn.payload_xid))); } map.put(fn.payload_...
/** * Creates a map from each user-defined xid appearing the payload * elements to the repository's correspoding {@code Fida.Node} object. */
Creates a map from each user-defined xid appearing the payload elements to the repository's correspoding Fida.Node object
build_externals
{ "repo_name": "jani-hautamaki/xml-snippets", "path": "src/xmlsnippets/fida/FidaXML.java", "license": "gpl-3.0", "size": 46947 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,036,095
public Object clone(){ try { CharacterIteratorWrapper result = (CharacterIteratorWrapper) super.clone(); result.iterator = (CharacterIterator)this.iterator.clone(); return result; } catch (CloneNotSupportedException e) { return null; // only invo...
Object function(){ try { CharacterIteratorWrapper result = (CharacterIteratorWrapper) super.clone(); result.iterator = (CharacterIterator)this.iterator.clone(); return result; } catch (CloneNotSupportedException e) { return null; } }
/** * Creates a clone of this iterator. Clones the underlying character iterator. * @see UCharacterIterator#clone() */
Creates a clone of this iterator. Clones the underlying character iterator
clone
{ "repo_name": "Miracle121/quickdic-dictionary.dictionary", "path": "jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/impl/CharacterIteratorWrapper.java", "license": "apache-2.0", "size": 3881 }
[ "java.text.CharacterIterator" ]
import java.text.CharacterIterator;
import java.text.*;
[ "java.text" ]
java.text;
41,142
@Deprecated protected void primitiveMkdir(Path f, FsPermission absolutePermission, boolean createParent) throws IOException { if (!createParent) { // parent must exist. // since the this.mkdirs makes parent dirs automatically // we must throw exception if parent does no...
void function(Path f, FsPermission absolutePermission, boolean createParent) throws IOException { if (!createParent) { final FileStatus stat = getFileStatus(f.getParent()); if (stat == null) { throw new FileNotFoundException(STR + f); } if (!stat.isDirectory()) { throw new ParentNotDirectoryException(STR); } } if (!thi...
/** * This version of the mkdirs method assumes that the permission is absolute. * It has been added to support the FileContext that processes the permission * with umask before calling this method. * This a temporary method added to support the transition from FileSystem * to FileContext for user applic...
This version of the mkdirs method assumes that the permission is absolute. It has been added to support the FileContext that processes the permission with umask before calling this method. This a temporary method added to support the transition from FileSystem to FileContext for user applications
primitiveMkdir
{ "repo_name": "wankunde/cloudera_hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java", "license": "apache-2.0", "size": 111812 }
[ "java.io.FileNotFoundException", "java.io.IOException", "org.apache.hadoop.fs.permission.FsPermission" ]
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.fs.permission.FsPermission;
import java.io.*; import org.apache.hadoop.fs.permission.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
900,810
@Override public void exitPhrase(@NotNull LuceneSqlParser.PhraseContext ctx) { }
@Override public void exitPhrase(@NotNull LuceneSqlParser.PhraseContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterPhrase
{ "repo_name": "bbejeck/nosql-jdbc-driver", "path": "src/main/java/bbejeck/nosql/antlr/generated/LuceneSqlBaseListener.java", "license": "apache-2.0", "size": 18266 }
[ "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;
2,893,733
public final void refresh() { Map<MockComponent, LayoutInfo> layoutInfoMap = new HashMap<MockComponent, LayoutInfo>(); collectLayoutInfos(layoutInfoMap, this); LayoutInfo formLayoutInfo = layoutInfoMap.get(this); layout.layoutChildren(formLayoutInfo); rootPanel.setPixelSize(formLayoutInfo.width,...
final void function() { Map<MockComponent, LayoutInfo> layoutInfoMap = new HashMap<MockComponent, LayoutInfo>(); collectLayoutInfos(layoutInfoMap, this); LayoutInfo formLayoutInfo = layoutInfoMap.get(this); layout.layoutChildren(formLayoutInfo); rootPanel.setPixelSize(formLayoutInfo.width, Math.max(formLayoutInfo.heigh...
/** * Forces a re-layout of the child components of the container. */
Forces a re-layout of the child components of the container
refresh
{ "repo_name": "cjessica/aifoo", "path": "appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockForm.java", "license": "mit", "size": 23817 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,022,687
void setDefaultLocalAddresses(List<? extends SocketAddress> localAddresses);
void setDefaultLocalAddresses(List<? extends SocketAddress> localAddresses);
/** * Sets the default local addresses to bind when no argument is specified * in {@link #bind()} method. Please note that the default will not be * used if any local address is specified. */
Sets the default local addresses to bind when no argument is specified in <code>#bind()</code> method. Please note that the default will not be used if any local address is specified
setDefaultLocalAddresses
{ "repo_name": "adrian-galbenus/gateway", "path": "mina.core/core/src/main/java/org/apache/mina/core/service/IoAcceptor.java", "license": "apache-2.0", "size": 7905 }
[ "java.net.SocketAddress", "java.util.List" ]
import java.net.SocketAddress; import java.util.List;
import java.net.*; import java.util.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,277,296
private void performDelete() { I18n i = I18n.getInstance(); int state = JOptionPane.showConfirmDialog(this, i.getString("deleteConfirm"), i.getString("deleteConfirmTitle"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (state != JOptionPane.YES_OPTION) { return; } registerThre...
void function() { I18n i = I18n.getInstance(); int state = JOptionPane.showConfirmDialog(this, i.getString(STR), i.getString(STR), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (state != JOptionPane.YES_OPTION) { return; } registerThread(true); new DownloadDeleteWorker(this.clickedCloudFile).execute(); }
/** * Performs the actual deletion of a {@link CloudFile}; */
Performs the actual deletion of a <code>CloudFile</code>
performDelete
{ "repo_name": "fbausch/CloudRAID-Client", "path": "gui/src/de/dhbw_mannheim/cloudraid/client/gui/MainWindow.java", "license": "apache-2.0", "size": 20362 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,759,912
visitor.preVisitDirectory(directory); File[] files = directory.listFiles(); if (files != null) { for (File file : files) { if (file.isDirectory()) { walkFileTree(file, visitor); } else { visitor.visitFile(file); } } } visitor.postVisitDirectory(dir...
visitor.preVisitDirectory(directory); File[] files = directory.listFiles(); if (files != null) { for (File file : files) { if (file.isDirectory()) { walkFileTree(file, visitor); } else { visitor.visitFile(file); } } } visitor.postVisitDirectory(directory); }
/** * Iterates over the file tree of a directory. It receives a visitor and will call its methods for * each file in the directory. preVisitDirectory (directory) visitFile (file) - recursively the * same for every subdirectory postVisitDirectory (directory) * * @param directory the directory to iterate ...
Iterates over the file tree of a directory. It receives a visitor and will call its methods for each file in the directory. preVisitDirectory (directory) visitFile (file) - recursively the same for every subdirectory postVisitDirectory (directory)
walkFileTree
{ "repo_name": "facebook/fresco", "path": "fbcore/src/main/java/com/facebook/common/file/FileTree.java", "license": "mit", "size": 2242 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
482,438
public void put(byte b) { try { file.write(b); } catch (IOException e) { throw new MapFailedException("could not write byte to mdr tmp file"); } }
void function(byte b) { try { file.write(b); } catch (IOException e) { throw new MapFailedException(STR); } }
/** * Write out a single byte. * * @param b The byte to write. */
Write out a single byte
put
{ "repo_name": "openstreetmap/mkgmap", "path": "src/uk/me/parabola/imgfmt/app/FileBackedImgFileWriter.java", "license": "gpl-2.0", "size": 8006 }
[ "java.io.IOException", "uk.me.parabola.imgfmt.MapFailedException" ]
import java.io.IOException; import uk.me.parabola.imgfmt.MapFailedException;
import java.io.*; import uk.me.parabola.imgfmt.*;
[ "java.io", "uk.me.parabola" ]
java.io; uk.me.parabola;
2,782,897
@Test public void generateActionsQueen() { // Setup. final HexChessEnvironment environment = new HexChessEnvironment(); final HexChessPosition fromPosition = HexChessPosition.f6; final Agent agent = new DefaultAgent("White", "agent white", HexChessTeam.WHITE); environ...
void function() { final HexChessEnvironment environment = new HexChessEnvironment(); final HexChessPosition fromPosition = HexChessPosition.f6; final Agent agent = new DefaultAgent("White", STR, HexChessTeam.WHITE); environment.placeToken(fromPosition, HexChessToken.WHITE_QUEEN.withAgent(agent)); final HexChessAdjudica...
/** * Test the <code>generateActions()</code> method. */
Test the <code>generateActions()</code> method
generateActionsQueen
{ "repo_name": "jmthompson2015/vizzini", "path": "example/src/test/java/org/vizzini/example/boardgame/hexchess/HexChessActionGeneratorTest.java", "license": "mit", "size": 10439 }
[ "java.util.List", "org.hamcrest.CoreMatchers", "org.junit.Assert", "org.vizzini.core.game.Action", "org.vizzini.core.game.Agent", "org.vizzini.core.game.DefaultAgent" ]
import java.util.List; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.vizzini.core.game.Action; import org.vizzini.core.game.Agent; import org.vizzini.core.game.DefaultAgent;
import java.util.*; import org.hamcrest.*; import org.junit.*; import org.vizzini.core.game.*;
[ "java.util", "org.hamcrest", "org.junit", "org.vizzini.core" ]
java.util; org.hamcrest; org.junit; org.vizzini.core;
2,242,483
public void testGetFieldNames() throws Exception { Directory d = newDirectory(); // set up writer IndexWriter writer = new IndexWriter( d, newIndexWriterConfig(new MockAnalyzer(random())) ); Document doc = new Document(); FieldType customType3 = new FieldType(...
void function() throws Exception { Directory d = newDirectory(); IndexWriter writer = new IndexWriter( d, newIndexWriterConfig(new MockAnalyzer(random())) ); Document doc = new Document(); FieldType customType3 = new FieldType(); customType3.setStored(true); doc.add(new StringField(STR, "test1", Field.Store.YES)); doc....
/** * Tests the IndexReader.getFieldNames implementation * @throws Exception on error */
Tests the IndexReader.getFieldNames implementation
testGetFieldNames
{ "repo_name": "smartan/lucene", "path": "src/test/java/org/apache/lucene/index/TestDirectoryReader.java", "license": "apache-2.0", "size": 44906 }
[ "java.util.Collection", "java.util.HashSet", "org.apache.lucene.analysis.MockAnalyzer", "org.apache.lucene.document.Document", "org.apache.lucene.document.Field", "org.apache.lucene.document.FieldType", "org.apache.lucene.document.StringField", "org.apache.lucene.document.TextField", "org.apache.luc...
import java.util.Collection; import java.util.HashSet; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; import org.apache.lucene.document.StringField; import org.apache.lucene.document.TextFi...
import java.util.*; import org.apache.lucene.analysis.*; import org.apache.lucene.document.*; import org.apache.lucene.index.*; import org.apache.lucene.store.*;
[ "java.util", "org.apache.lucene" ]
java.util; org.apache.lucene;
2,800,652
public List<Widget> buildWidgets() { Widget column = createWidget(COLUMN); column.setPropertyValue(DOMAIN_ATTRIBUTE, modelElement.getName()); Widget header = createWidget(COLUMN_HEADER); header.setID(modelElement.getName()); header.setPropertyValue(COLUMN_NAME, modelElement.getName()); header.s...
List<Widget> function() { Widget column = createWidget(COLUMN); column.setPropertyValue(DOMAIN_ATTRIBUTE, modelElement.getName()); Widget header = createWidget(COLUMN_HEADER); header.setID(modelElement.getName()); header.setPropertyValue(COLUMN_NAME, modelElement.getName()); header.setPropertyValue(DOMAIN_ATTRIBUTE, mo...
/** * Creates the Widgets. These Widgets may contain child Widgets. * * @return List The newly created Widgets. These Widgets may contain child Widgets */
Creates the Widgets. These Widgets may contain child Widgets
buildWidgets
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/page/ui/com.odcgroup.page.transformmodel.ui/src/main/java/com/odcgroup/page/transformmodel/ui/builder/AbstractWidgetBuilder.java", "license": "epl-1.0", "size": 22676 }
[ "com.odcgroup.mdf.metamodel.MdfAttribute", "com.odcgroup.mdf.metamodel.MdfDatasetProperty", "com.odcgroup.mdf.metamodel.MdfEntity", "com.odcgroup.page.model.Widget", "java.util.ArrayList", "java.util.List" ]
import com.odcgroup.mdf.metamodel.MdfAttribute; import com.odcgroup.mdf.metamodel.MdfDatasetProperty; import com.odcgroup.mdf.metamodel.MdfEntity; import com.odcgroup.page.model.Widget; import java.util.ArrayList; import java.util.List;
import com.odcgroup.mdf.metamodel.*; import com.odcgroup.page.model.*; import java.util.*;
[ "com.odcgroup.mdf", "com.odcgroup.page", "java.util" ]
com.odcgroup.mdf; com.odcgroup.page; java.util;
715,391
public PactDslJsonArray id() { body.put(100L); generators.addGenerator(Category.BODY, rootPath + appendArrayIndex(0), new RandomIntGenerator(0, Integer.MAX_VALUE)); matchers.addRule(rootPath + appendArrayIndex(0), TypeMatcher.INSTANCE); return this; }
PactDslJsonArray function() { body.put(100L); generators.addGenerator(Category.BODY, rootPath + appendArrayIndex(0), new RandomIntGenerator(0, Integer.MAX_VALUE)); matchers.addRule(rootPath + appendArrayIndex(0), TypeMatcher.INSTANCE); return this; }
/** * Element that must be a numeric identifier */
Element that must be a numeric identifier
id
{ "repo_name": "Fitzoh/pact-jvm", "path": "pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java", "license": "apache-2.0", "size": 35404 }
[ "au.com.dius.pact.model.generators.Category", "au.com.dius.pact.model.generators.RandomIntGenerator", "au.com.dius.pact.model.matchingrules.TypeMatcher" ]
import au.com.dius.pact.model.generators.Category; import au.com.dius.pact.model.generators.RandomIntGenerator; import au.com.dius.pact.model.matchingrules.TypeMatcher;
import au.com.dius.pact.model.generators.*; import au.com.dius.pact.model.matchingrules.*;
[ "au.com.dius" ]
au.com.dius;
1,111,054
@Test public void testEditorFindMatch() { JXEditorPane editor = new JXEditorPane(); editor.setText("fou four"); int foIndex = editor.getSearchable().search("fo", -1); assertEquals("selected text must be equals to input", "fo", editor.getSelectedText()); try { ...
void function() { JXEditorPane editor = new JXEditorPane(); editor.setText(STR); int foIndex = editor.getSearchable().search("fo", -1); assertEquals(STR, "fo", editor.getSelectedText()); try { String textAt = editor.getText(foIndex, 2); assertEquals("fo", textAt); } catch (BadLocationException e) { e.printStackTrace();...
/** * testing Searchable assumption along the lines of: * found = searchable.search(text) * searchable.getValueAt(found).startsWith(text) or * searchable.getValueAt(found).contains(text) * */
testing Searchable assumption along the lines of: found = searchable.search(text) searchable.getValueAt(found).startsWith(text) or searchable.getValueAt(found).contains(text)
testEditorFindMatch
{ "repo_name": "syncer/swingx", "path": "swingx-core/src/test/java/org/jdesktop/swingx/search/FindTest.java", "license": "lgpl-2.1", "size": 31517 }
[ "javax.swing.text.BadLocationException", "org.jdesktop.swingx.JXEditorPane" ]
import javax.swing.text.BadLocationException; import org.jdesktop.swingx.JXEditorPane;
import javax.swing.text.*; import org.jdesktop.swingx.*;
[ "javax.swing", "org.jdesktop.swingx" ]
javax.swing; org.jdesktop.swingx;
1,729,702
@Generated @StructureField(order = 0, isGetter = true) public native int gsr_interface();
@StructureField(order = 0, isGetter = true) native int function();
/** * interface index */
interface index
gsr_interface
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/struct/group_source_req.java", "license": "apache-2.0", "size": 2503 }
[ "org.moe.natj.c.ann.StructureField" ]
import org.moe.natj.c.ann.StructureField;
import org.moe.natj.c.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,052,829
public static Get toGet( final ClientProtos.Get proto) throws IOException { if (proto == null) return null; byte[] row = proto.getRow().toByteArray(); Get get = new Get(row); if (proto.hasCacheBlocks()) { get.setCacheBlocks(proto.getCacheBlocks()); } if (proto.hasMaxVersions()) { ...
static Get function( final ClientProtos.Get proto) throws IOException { if (proto == null) return null; byte[] row = proto.getRow().toByteArray(); Get get = new Get(row); if (proto.hasCacheBlocks()) { get.setCacheBlocks(proto.getCacheBlocks()); } if (proto.hasMaxVersions()) { get.setMaxVersions(proto.getMaxVersions());...
/** * Convert a protocol buffer Get to a client Get * * @param proto the protocol buffer Get to convert * @return the converted client Get * @throws IOException */
Convert a protocol buffer Get to a client Get
toGet
{ "repo_name": "francisliu/hbase_namespace", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java", "license": "apache-2.0", "size": 79991 }
[ "com.google.protobuf.ByteString", "java.io.IOException", "org.apache.hadoop.hbase.client.Get", "org.apache.hadoop.hbase.filter.Filter", "org.apache.hadoop.hbase.io.TimeRange", "org.apache.hadoop.hbase.protobuf.generated.ClientProtos", "org.apache.hadoop.hbase.protobuf.generated.HBaseProtos" ]
import com.google.protobuf.ByteString; import java.io.IOException; import org.apache.hadoop.hbase.client.Get; import org.apache.hadoop.hbase.filter.Filter; import org.apache.hadoop.hbase.io.TimeRange; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; import org.apache.hadoop.hbase.protobuf.generated.HBase...
import com.google.protobuf.*; import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.filter.*; import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.hbase.protobuf.generated.*;
[ "com.google.protobuf", "java.io", "org.apache.hadoop" ]
com.google.protobuf; java.io; org.apache.hadoop;
62,710
@Test @Order(1) void entryNameWithURLSpecialCharacters(TestReference testReference, TestUtils testUtils) { // Fixture testUtils.loginAsSuperAdmin(); testUtils.deletePage(testReference); Map<String, String> editQueryStringParameters = new HashMap<>(); editQuerySt...
@Order(1) void entryNameWithURLSpecialCharacters(TestReference testReference, TestUtils testUtils) { testUtils.loginAsSuperAdmin(); testUtils.deletePage(testReference); Map<String, String> editQueryStringParameters = new HashMap<>(); editQueryStringParameters.put(STR, STR); editQueryStringParameters.put(STR, STR); edit...
/** * Tests that entry name is URL encoded. */
Tests that entry name is URL encoded
entryNameWithURLSpecialCharacters
{ "repo_name": "xwiki/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/AddEntryIT.java", "license": "lgpl-2.1", "size": 3764 }
[ "java.util.HashMap", "java.util.Map", "org.apache.commons.lang3.RandomStringUtils", "org.junit.jupiter.api.Assertions", "org.junit.jupiter.api.Order", "org.xwiki.appwithinminutes.test.po.ApplicationHomeEditPage", "org.xwiki.appwithinminutes.test.po.ApplicationHomePage", "org.xwiki.appwithinminutes.tes...
import java.util.HashMap; import java.util.Map; import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Order; import org.xwiki.appwithinminutes.test.po.ApplicationHomeEditPage; import org.xwiki.appwithinminutes.test.po.ApplicationHomePage; import org.xwi...
import java.util.*; import org.apache.commons.lang3.*; import org.junit.jupiter.api.*; import org.xwiki.appwithinminutes.test.po.*; import org.xwiki.test.docker.junit5.*; import org.xwiki.test.ui.*; import org.xwiki.test.ui.po.*;
[ "java.util", "org.apache.commons", "org.junit.jupiter", "org.xwiki.appwithinminutes", "org.xwiki.test" ]
java.util; org.apache.commons; org.junit.jupiter; org.xwiki.appwithinminutes; org.xwiki.test;
1,387,942
public final GridLayoutManager.SpanSizeLookup getSpanSizeLookup() { return spanSizeLookup; }
final GridLayoutManager.SpanSizeLookup function() { return spanSizeLookup; }
/** * Returns the current {@link GridLayoutManager.SpanSizeLookup} used by the {@link * RecyclerAdapter}.<p> Default implementation sets each item to occupy exactly 1 span.</p> * * @return The {@link GridLayoutManager.SpanSizeLookup} used by the {@link RecyclerAdapter}. */
Returns the current <code>GridLayoutManager.SpanSizeLookup</code> used by the <code>RecyclerAdapter</code>. Default implementation sets each item to occupy exactly 1 span
getSpanSizeLookup
{ "repo_name": "weiwenqiang/GitHub", "path": "ListView/MultiViewAdapter-master/multi-view-adapter/src/main/java/com/ahamed/multiviewadapter/RecyclerAdapter.java", "license": "apache-2.0", "size": 5925 }
[ "android.support.v7.widget.GridLayoutManager" ]
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.*;
[ "android.support" ]
android.support;
567,100
public static <E> Iterable<Ord<E>> reverse(E... elements) { return reverse(ImmutableList.copyOf(elements)); }
static <E> Iterable<Ord<E>> function(E... elements) { return reverse(ImmutableList.copyOf(elements)); }
/** * Iterates over an array in reverse order. * * <p>Given the array ["a", "b", "c"], returns (2, "c") then (1, "b") then * (0, "a"). */
Iterates over an array in reverse order. Given the array ["a", "b", "c"], returns (2, "c") then (1, "b") then (0, "a")
reverse
{ "repo_name": "minji-kim/calcite", "path": "linq4j/src/main/java/org/apache/calcite/linq4j/Ord.java", "license": "apache-2.0", "size": 4990 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
2,628,540
protected void configurePropertiesFromAction(Action a) { AbstractAction.setEnabledFromAction(this, a); AbstractAction.setToolTipTextFromAction(this, a); setActionCommandFromAction(a); } /** * Creates and returns a <code>PropertyChangeListener</code> that is * responsible f...
void function(Action a) { AbstractAction.setEnabledFromAction(this, a); AbstractAction.setToolTipTextFromAction(this, a); setActionCommandFromAction(a); } /** * Creates and returns a <code>PropertyChangeListener</code> that is * responsible for listening for changes from the specified * <code>Action</code> and updating...
/** * Sets the properties on this combobox to match those in the specified * <code>Action</code>. Refer to <a href="Action.html#buttonActions"> * Swing Components Supporting <code>Action</code></a> for more * details as to which properties this sets. * * @param a the <code>Action</code> f...
Sets the properties on this combobox to match those in the specified <code>Action</code>. Refer to Swing Components Supporting <code>Action</code> for more details as to which properties this sets
configurePropertiesFromAction
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JComboBox.java", "license": "apache-2.0", "size": 92256 }
[ "java.beans.PropertyChangeListener" ]
import java.beans.PropertyChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
2,587,652
@SuppressWarnings("unchecked") private static Hashtable<String, Object> convertRealmConfigs(Hashtable<String, ?> configs) { Hashtable<String, Object> realmsTable = new Hashtable<String, Object>(); for (String realm : configs.keySet()) { // get the kdc Hashtable<String, C...
@SuppressWarnings(STR) static Hashtable<String, Object> function(Hashtable<String, ?> configs) { Hashtable<String, Object> realmsTable = new Hashtable<String, Object>(); for (String realm : configs.keySet()) { Hashtable<String, Collection<?>> map = (Hashtable<String, Collection<?>>) configs.get(realm); Collection<Hasht...
/** * convertRealmConfigs: Maps the Object graph that we get from JNI to the * object graph that Config expects. Also the items inside the kdc array * are wrapped inside Hashtables */
convertRealmConfigs: Maps the Object graph that we get from JNI to the object graph that Config expects. Also the items inside the kdc array are wrapped inside Hashtables
convertRealmConfigs
{ "repo_name": "greghaskins/openjdk-jdk7u-jdk", "path": "src/share/classes/sun/security/krb5/SCDynamicStoreConfig.java", "license": "gpl-2.0", "size": 4363 }
[ "java.util.Collection", "java.util.Hashtable", "java.util.Vector" ]
import java.util.Collection; import java.util.Hashtable; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
832,902
public void setClassifier(String classifier) { JodaBeanUtils.notNull(classifier, "classifier"); this._classifier = classifier; }
void function(String classifier) { JodaBeanUtils.notNull(classifier, STR); this._classifier = classifier; }
/** * Sets the classifier under which to publish. * @param classifier the new value of the property, not null */
Sets the classifier under which to publish
setClassifier
{ "repo_name": "McLeodMoores/starling", "path": "projects/component/src/main/java/com/opengamma/component/factory/tool/DbToolContextComponentFactory.java", "license": "apache-2.0", "size": 18643 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
2,843,297
public static void setUserDsLcdData(byte[] bytes, int length, int timeOut) { Pointer textPtr = new Pointer(bytes.length); textPtr.setBytes(0, bytes, 0, bytes.length); setUserDsLcdDataFn.call3(textPtr, length, timeOut); textPtr.free(); }
static void function(byte[] bytes, int length, int timeOut) { Pointer textPtr = new Pointer(bytes.length); textPtr.setBytes(0, bytes, 0, bytes.length); setUserDsLcdDataFn.call3(textPtr, length, timeOut); textPtr.free(); }
/** * Send data to the driver station's user panel * @param bytes the byte array containing the properly formatted information for the display * @param length the length of the byte array * @param timeOut the maximum time to wait */
Send data to the driver station's user panel
setUserDsLcdData
{ "repo_name": "quantumsamurai/wpilibj.project", "path": "src/edu/wpi/first/wpilibj/communication/FRCControl.java", "license": "bsd-3-clause", "size": 12792 }
[ "com.sun.cldc.jna.Pointer" ]
import com.sun.cldc.jna.Pointer;
import com.sun.cldc.jna.*;
[ "com.sun.cldc" ]
com.sun.cldc;
1,843,559
public static void assertNodeTestPasses(InputSource xml, NodeTester tester, short nodeType) throws SAXException, IOException { NodeTest test = new NodeTest(xml); assertNodeTestPasses(test, tester, new short[] {nodeType}, true); }
static void function(InputSource xml, NodeTester tester, short nodeType) throws SAXException, IOException { NodeTest test = new NodeTest(xml); assertNodeTestPasses(test, tester, new short[] {nodeType}, true); }
/** * Execute a <code>NodeTest</code> for a single node type * and assert that it passes * @param xml XML to be tested * @param tester The test strategy * @param nodeType The node type to be tested: constants defined * in {@link Node org.w3c.dom.Node} e.g. <code>Node.ELEMENT_NODE</code> ...
Execute a <code>NodeTest</code> for a single node type and assert that it passes
assertNodeTestPasses
{ "repo_name": "xmlunit/xmlunit", "path": "xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLAssert.java", "license": "apache-2.0", "size": 47140 }
[ "java.io.IOException", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import org.xml.sax.*;
[ "java.io", "org.xml.sax" ]
java.io; org.xml.sax;
314,483
public void testHexCharTest() throws KettleValueException { Value vs1 = new Value( "Name1", Value.VALUE_TYPE_INTEGER ); vs1.setValue( "009B" ); vs1.hexToCharDecode(); vs1.charToHexEncode(); assertEquals( "009B", vs1.getString() ); vs1.setValue( "007400790021002100C200A7" ); vs1.hexToChar...
void function() throws KettleValueException { Value vs1 = new Value( "Name1", Value.VALUE_TYPE_INTEGER ); vs1.setValue( "009B" ); vs1.hexToCharDecode(); vs1.charToHexEncode(); assertEquals( "009B", vs1.getString() ); vs1.setValue( STR ); vs1.hexToCharDecode(); vs1.charToHexEncode(); assertEquals( STR, vs1.getString() )...
/** * Test for Hex to Char decoding and vica versa. */
Test for Hex to Char decoding and vica versa
testHexCharTest
{ "repo_name": "apratkin/pentaho-kettle", "path": "core/test-src/org/pentaho/di/compatibility/ValueTest.java", "license": "apache-2.0", "size": 40564 }
[ "org.pentaho.di.core.exception.KettleValueException" ]
import org.pentaho.di.core.exception.KettleValueException;
import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,489,714
public AmqpReceiver createMulticastReceiver(Source source, String receiverId, String receiveName) throws Exception { checkClosed(); final ClientFuture request = new ClientFuture(); final AmqpReceiver receiver = new AmqpReceiver(AmqpSession.this, source, receiverId); receiver.setSubscriptionN...
AmqpReceiver function(Source source, String receiverId, String receiveName) throws Exception { checkClosed(); final ClientFuture request = new ClientFuture(); final AmqpReceiver receiver = new AmqpReceiver(AmqpSession.this, source, receiverId); receiver.setSubscriptionName(receiveName); connection.getScheduler().execut...
/** * Create a receiver instance using the given Source * * @param source the caller created and configured Source used to create the receiver link. * @return a newly created receiver that is ready for use. * @throws Exception if an error occurs while creating the receiver. */
Create a receiver instance using the given Source
createMulticastReceiver
{ "repo_name": "kjniemi/activemq-artemis", "path": "tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/AmqpSession.java", "license": "apache-2.0", "size": 27319 }
[ "org.apache.activemq.transport.amqp.client.util.ClientFuture", "org.apache.qpid.proton.amqp.messaging.Source" ]
import org.apache.activemq.transport.amqp.client.util.ClientFuture; import org.apache.qpid.proton.amqp.messaging.Source;
import org.apache.activemq.transport.amqp.client.util.*; import org.apache.qpid.proton.amqp.messaging.*;
[ "org.apache.activemq", "org.apache.qpid" ]
org.apache.activemq; org.apache.qpid;
1,526,315
private Object load( final LoadEvent event, final EntityPersister persister, final EntityKey keyToLoad, final LoadEventListener.LoadType options) { if ( event.getInstanceToLoad() != null ) { if ( event.getSession().getPersistenceContext().getEntry( event.getInstanceToLoad() ) != null ) { throw ...
Object function( final LoadEvent event, final EntityPersister persister, final EntityKey keyToLoad, final LoadEventListener.LoadType options) { if ( event.getInstanceToLoad() != null ) { if ( event.getSession().getPersistenceContext().getEntry( event.getInstanceToLoad() ) != null ) { throw new PersistentObjectException...
/** * Performs the load of an entity. * * @param event The initiating load request event * @param persister The persister corresponding to the entity to be loaded * @param keyToLoad The key of the entity to be loaded * @param options The defined load options * * @return The loaded entity. * * @throw...
Performs the load of an entity
load
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultLoadEventListener.java", "license": "lgpl-2.1", "size": 29710 }
[ "org.hibernate.NonUniqueObjectException", "org.hibernate.PersistentObjectException", "org.hibernate.engine.spi.EntityKey", "org.hibernate.event.spi.LoadEvent", "org.hibernate.event.spi.LoadEventListener", "org.hibernate.persister.entity.EntityPersister", "org.hibernate.pretty.MessageHelper" ]
import org.hibernate.NonUniqueObjectException; import org.hibernate.PersistentObjectException; import org.hibernate.engine.spi.EntityKey; import org.hibernate.event.spi.LoadEvent; import org.hibernate.event.spi.LoadEventListener; import org.hibernate.persister.entity.EntityPersister; import org.hibernate.pretty.Message...
import org.hibernate.*; import org.hibernate.engine.spi.*; import org.hibernate.event.spi.*; import org.hibernate.persister.entity.*; import org.hibernate.pretty.*;
[ "org.hibernate", "org.hibernate.engine", "org.hibernate.event", "org.hibernate.persister", "org.hibernate.pretty" ]
org.hibernate; org.hibernate.engine; org.hibernate.event; org.hibernate.persister; org.hibernate.pretty;
487,431
private void stopCache() { logWriter.fine("Entered JmxStatResourcesCleanupDUnitTest.stopCache"); Host host = Host.getHost(0); VM cacheVM = host.getVM(CACHE_VM); cacheVM.invoke(new CacheSerializableRunnable(getName()+"-stopCache") { private static final long serialVersionUID = 1L;
void function() { logWriter.fine(STR); Host host = Host.getHost(0); VM cacheVM = host.getVM(CACHE_VM); cacheVM.invoke(new CacheSerializableRunnable(getName()+STR) { private static final long serialVersionUID = 1L;
/** * Stops the cache in the cache VM & disconnects the cache VM from the DS. */
Stops the cache in the cache VM & disconnects the cache VM from the DS
stopCache
{ "repo_name": "papicella/snappy-store", "path": "tests/core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/JmxStatResourcesCleanupDUnitTest.java", "license": "apache-2.0", "size": 9398 }
[ "com.gemstone.gemfire.cache30.CacheSerializableRunnable" ]
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
207,804
public synchronized void co_exit_to(Object arg_object,int thisCoroutine,int toCoroutine) throws java.lang.NoSuchMethodException { if(!m_activeIDs.get(toCoroutine)) throw new java.lang.NoSuchMethodException(XMLMessages.createXMLMessage(XMLErrorResources.ER_COROUTINE_NOT_AVAIL, new Object[]{Integer.toString...
synchronized void function(Object arg_object,int thisCoroutine,int toCoroutine) throws java.lang.NoSuchMethodException { if(!m_activeIDs.get(toCoroutine)) throw new java.lang.NoSuchMethodException(XMLMessages.createXMLMessage(XMLErrorResources.ER_COROUTINE_NOT_AVAIL, new Object[]{Integer.toString(toCoroutine)})); m_yie...
/** Make the ID available for reuse and terminate this coroutine, * transferring control to the specified coroutine. Note that this * returns immediately rather than waiting for any further coroutine * traffic, so the thread can proceed with other shutdown activities. * * @param arg_object A value to ...
Make the ID available for reuse and terminate this coroutine, transferring control to the specified coroutine. Note that this returns immediately rather than waiting for any further coroutine traffic, so the thread can proceed with other shutdown activities
co_exit_to
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/org/apache/xml/internal/dtm/ref/CoroutineManager.java", "license": "apache-2.0", "size": 14934 }
[ "com.sun.org.apache.xml.internal.res.XMLErrorResources", "com.sun.org.apache.xml.internal.res.XMLMessages" ]
import com.sun.org.apache.xml.internal.res.XMLErrorResources; import com.sun.org.apache.xml.internal.res.XMLMessages;
import com.sun.org.apache.xml.internal.res.*;
[ "com.sun.org" ]
com.sun.org;
471,636
@Test public void getDepth() { TestCase.assertEquals(4, tree.getHeight()); BinarySearchTree<Integer>.Node node = tree.get(-3); TestCase.assertEquals(2, tree.getHeight(node)); }
void function() { TestCase.assertEquals(4, tree.getHeight()); BinarySearchTree<Integer>.Node node = tree.get(-3); TestCase.assertEquals(2, tree.getHeight(node)); }
/** * Tests the getDepth methods. */
Tests the getDepth methods
getDepth
{ "repo_name": "satishbabusee/dyn4j", "path": "junit/org/dyn4j/BalancedBinarySearchTreeTest.java", "license": "bsd-3-clause", "size": 8526 }
[ "junit.framework.TestCase", "org.dyn4j.BinarySearchTree" ]
import junit.framework.TestCase; import org.dyn4j.BinarySearchTree;
import junit.framework.*; import org.dyn4j.*;
[ "junit.framework", "org.dyn4j" ]
junit.framework; org.dyn4j;
1,180,368
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ComputePolicyInner>> listByAccountNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ComputePolicyInner>> function(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final Strin...
/** * Get the next page of items. * * @param nextLink The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by serve...
Get the next page of items
listByAccountNextSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/src/main/java/com/azure/resourcemanager/datalakeanalytics/implementation/ComputePoliciesClientImpl.java", "license": "mit", "size": 57622 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.datalakeanalytics.fluent.models.ComputePolicyInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.datalakeanalytics.fluent.models.ComputePolicyInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.datalakeanalytics.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
890,480
public List<ChangeWithSignalName> getList() { return list_ro; }
List<ChangeWithSignalName> function() { return list_ro; }
/** * Getter method for a read-only list of ChangeWithSignalName. * * @return a read-only list of ChangeWithSignalName. */
Getter method for a read-only list of ChangeWithSignalName
getList
{ "repo_name": "mbezjak/vhdllab", "path": "vhdllab-server/src/main/java/hr/fer/zemris/vhdllab/service/extractor/testbench/TestbenchMetadataExtractor.java", "license": "apache-2.0", "size": 21259 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
184,117
public static InputStream getClassAsStream(Class clazz) throws IOException { return getResourceAsStream(getClassFileName(clazz), clazz.getClassLoader()); }
static InputStream function(Class clazz) throws IOException { return getResourceAsStream(getClassFileName(clazz), clazz.getClassLoader()); }
/** * Opens a class of the specified name for reading using class classloader. * @see #getResourceAsStream(String, ClassLoader) */
Opens a class of the specified name for reading using class classloader
getClassAsStream
{ "repo_name": "mohanaraosv/jodd", "path": "jodd-core/src/main/java/jodd/util/ClassLoaderUtil.java", "license": "bsd-2-clause", "size": 17922 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,003,683
@Override() public java.lang.Class<?> getJavaClass( ) { return com.netxforge.oss2.config.rancid.adapter.Filter.class; }
@Override() java.lang.Class<?> function( ) { return com.netxforge.oss2.config.rancid.adapter.Filter.class; }
/** * Method getJavaClass. * * @return the Java class represented by this descriptor. */
Method getJavaClass
getJavaClass
{ "repo_name": "dzonekl/oss2nms", "path": "plugins/com.netxforge.oss2.config.model/src/com/netxforge/oss2/config/rancid/adapter/descriptors/FilterDescriptor.java", "license": "gpl-3.0", "size": 5530 }
[ "com.netxforge.oss2.config.rancid.adapter.Filter" ]
import com.netxforge.oss2.config.rancid.adapter.Filter;
import com.netxforge.oss2.config.rancid.adapter.*;
[ "com.netxforge.oss2" ]
com.netxforge.oss2;
2,270,650
interface WithTags { WithCreate withTags(Map<String, String> tags); }
interface WithTags { WithCreate withTags(Map<String, String> tags); }
/** * Specifies tags. * @param tags The tags of the resource * @return the next definition stage */
Specifies tags
withTags
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/devtestlabs/mgmt-v2018_09_15/src/main/java/com/microsoft/azure/management/devtestlabs/v2018_09_15/UserLabSchedule.java", "license": "mit", "size": 13232 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,482,459
public void testSetEnabledCipherSuites() throws Exception { SSLServerSocket ssocket = createSSLServerSocket(); String[] enabled = ssocket.getEnabledCipherSuites(); assertNotNull(enabled); String[] supported = ssocket.getSupportedCipherSuites(); for (int i = 0; i < enabled.len...
void function() throws Exception { SSLServerSocket ssocket = createSSLServerSocket(); String[] enabled = ssocket.getEnabledCipherSuites(); assertNotNull(enabled); String[] supported = ssocket.getSupportedCipherSuites(); for (int i = 0; i < enabled.length; i++) { found: { for (int j = 0; j < supported.length; j++) { if ...
/** * setEnabledCipherSuites(String[] suites) method testing. */
setEnabledCipherSuites(String[] suites) method testing
testSetEnabledCipherSuites
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "external/apache-harmony/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLServerSocketImplTest.java", "license": "gpl-3.0", "size": 23716 }
[ "javax.net.ssl.SSLServerSocket" ]
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
2,340,204
public FasePersistence getFasePersistence() { return fasePersistence; }
FasePersistence function() { return fasePersistence; }
/** * Returns the fase persistence. * * @return the fase persistence */
Returns the fase persistence
getFasePersistence
{ "repo_name": "camaradosdeputadosoficial/edemocracia", "path": "cd-guiadiscussao-portlet/src/main/java/br/gov/camara/edemocracia/portlets/guiadiscussao/service/base/ConfiguracaoLocalServiceBaseImpl.java", "license": "lgpl-2.1", "size": 21581 }
[ "br.gov.camara.edemocracia.portlets.guiadiscussao.service.persistence.FasePersistence" ]
import br.gov.camara.edemocracia.portlets.guiadiscussao.service.persistence.FasePersistence;
import br.gov.camara.edemocracia.portlets.guiadiscussao.service.persistence.*;
[ "br.gov.camara" ]
br.gov.camara;
2,078,557
@SuppressWarnings({ "unchecked", "rawtypes" }) public static final <T> Factory<T> getFactory(Class<T> type) { Strategy strategy = type.getAnnotation(Strategy.class); if (strategy != null) { Class<? extends Factory> factoryClass = strategy.factory(); if (!UndefinedFactory....
@SuppressWarnings({ STR, STR }) static final <T> Factory<T> function(Class<T> type) { Strategy strategy = type.getAnnotation(Strategy.class); if (strategy != null) { Class<? extends Factory> factoryClass = strategy.factory(); if (!UndefinedFactory.class.equals(factoryClass)) { return Construction.construct(factoryClass...
/** * Gets the factory for the specified type. * @param <T> the factory type * @param type the type * @return the factory */
Gets the factory for the specified type
getFactory
{ "repo_name": "cunningt/switchyard", "path": "core/serial/base/src/main/java/org/switchyard/serial/graph/Factory.java", "license": "apache-2.0", "size": 2723 }
[ "org.switchyard.common.type.reflect.Construction" ]
import org.switchyard.common.type.reflect.Construction;
import org.switchyard.common.type.reflect.*;
[ "org.switchyard.common" ]
org.switchyard.common;
2,382,355
public void stop() throws Exception { Method method = catalinaDaemon.getClass().getMethod("stop", (Class[]) null); method.invoke(catalinaDaemon, (Object[]) null); }
void function() throws Exception { Method method = catalinaDaemon.getClass().getMethod("stop", (Class[]) null); method.invoke(catalinaDaemon, (Object[]) null); }
/** * Stop the Catalina Daemon. * * @throws Exception * Fatal stop error */
Stop the Catalina Daemon
stop
{ "repo_name": "emacslisp/Java", "path": "TomcatReading/src/org/apache/catalina/startup/Bootstrap.java", "license": "mit", "size": 16357 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,388,115
public static void prop(JavaScriptObject o, Object id, Object val) { if (o != null) { o.<JsCache> cast().put(id, val); } }
static void function(JavaScriptObject o, Object id, Object val) { if (o != null) { o.<JsCache> cast().put(id, val); } }
/** * Set a property to a javascript object. */
Set a property to a javascript object
prop
{ "repo_name": "ArcBees/gwtquery", "path": "gwtquery-core/src/main/java/com/google/gwt/query/client/js/JsUtils.java", "license": "mit", "size": 20852 }
[ "com.google.gwt.core.client.JavaScriptObject" ]
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.*;
[ "com.google.gwt" ]
com.google.gwt;
404,413
String errorStreamCaptureLine(String pattern) { String log = this.errorStreamCapture.toString().trim(); Matcher matcher = java.util.regex.Pattern.compile(pattern).matcher(log); if (matcher.find() && matcher.groupCount() > 0) return matcher.group(1...
String errorStreamCaptureLine(String pattern) { String log = this.errorStreamCapture.toString().trim(); Matcher matcher = java.util.regex.Pattern.compile(pattern).matcher(log); if (matcher.find() && matcher.groupCount() > 0) return matcher.group(1); return null; }
/** * Finds a line in the error log for a pattern. * @param pattern * @return to the pattern determined line, otherwise {@code null}. */
Finds a line in the error log for a pattern
errorStreamCaptureLine
{ "repo_name": "seanox/devwex-test", "path": "test/com/seanox/devwex/AbstractTest.java", "license": "gpl-2.0", "size": 14032 }
[ "com.seanox.test.utils.Pattern", "java.util.regex.Matcher" ]
import com.seanox.test.utils.Pattern; import java.util.regex.Matcher;
import com.seanox.test.utils.*; import java.util.regex.*;
[ "com.seanox.test", "java.util" ]
com.seanox.test; java.util;
2,443,605
void readFromParcel(Parcel in, MovieInfo obj) { obj.posterPath = in.readString(); obj.backdropPath = in.readString(); obj.overview = in.readString(); obj.originalTitle = in.readString(); obj.originalLanguage = in.readString(); obj.title = in.readString(); obj....
void readFromParcel(Parcel in, MovieInfo obj) { obj.posterPath = in.readString(); obj.backdropPath = in.readString(); obj.overview = in.readString(); obj.originalTitle = in.readString(); obj.originalLanguage = in.readString(); obj.title = in.readString(); obj.id = in.readInt(); obj.adult = readBooleanFromParcel(in); ob...
/** * Populate the specified object from the specified Parcel * @param in Parcel to read * @param obj Object to populate */
Populate the specified object from the specified Parcel
readFromParcel
{ "repo_name": "ibuttimer/moviequest", "path": "app/src/main/java/ie/ianbuttimer/moviequest/tmdb/MovieInfo.java", "license": "gpl-3.0", "size": 19354 }
[ "android.os.Parcel", "ie.ianbuttimer.moviequest.utils.Utils", "java.util.Date" ]
import android.os.Parcel; import ie.ianbuttimer.moviequest.utils.Utils; import java.util.Date;
import android.os.*; import ie.ianbuttimer.moviequest.utils.*; import java.util.*;
[ "android.os", "ie.ianbuttimer.moviequest", "java.util" ]
android.os; ie.ianbuttimer.moviequest; java.util;
592,279
try { TypeDescriptor<?> fDesc = getRegistry().getType(FileArtifact.class.getSimpleName()); Assert.assertNotNull("FileArtifact descriptor must exist", fDesc); ConstructorCallExpression constructor = new ConstructorCallExpression(fDesc, new CallArgument[0]); Assert.assertNo...
try { TypeDescriptor<?> fDesc = getRegistry().getType(FileArtifact.class.getSimpleName()); Assert.assertNotNull(STR, fDesc); ConstructorCallExpression constructor = new ConstructorCallExpression(fDesc, new CallArgument[0]); Assert.assertNotNull(STR, constructor.inferType()); Assert.assertNotNull(STR, constructor.getRes...
/** * Tests a simple constructor call. */
Tests a simple constructor call
testConstructor
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Instantiation/de.uni-hildesheim.sse.easy.instantiatorCore.tests/src/net/ssehub/easy/instantiation/core/model/expressions/ConstructorCallExpressionTest.java", "license": "apache-2.0", "size": 1380 }
[ "net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact", "net.ssehub.easy.instantiation.core.model.common.VilException", "net.ssehub.easy.instantiation.core.model.vilTypes.TypeDescriptor", "org.junit.Assert" ]
import net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact; import net.ssehub.easy.instantiation.core.model.common.VilException; import net.ssehub.easy.instantiation.core.model.vilTypes.TypeDescriptor; import org.junit.Assert;
import net.ssehub.easy.instantiation.core.model.*; import net.ssehub.easy.instantiation.core.model.common.*; import org.junit.*;
[ "net.ssehub.easy", "org.junit" ]
net.ssehub.easy; org.junit;
1,739,043
public void start() throws CoreException { this.runTomcatBootsrap(getStartCommand(), true, RUN, false); }
void function() throws CoreException { this.runTomcatBootsrap(getStartCommand(), true, RUN, false); }
/** * See %TOMCAT_HOME%/bin/startup.bat */
See %TOMCAT_HOME%/bin/startup.bat
start
{ "repo_name": "utluiz/com.sysdeo.eclipse.tomcat", "path": "src/com/sysdeo/eclipse/tomcat/TomcatBootstrap.java", "license": "mit", "size": 12379 }
[ "org.eclipse.core.runtime.CoreException" ]
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
2,177,609
public ParticleManager withDuration(String tag, int duration) { ParticleView p = getParticleView(tag); return withDuration(p, duration); }
ParticleManager function(String tag, int duration) { ParticleView p = getParticleView(tag); return withDuration(p, duration); }
/** * Add Duration * @param tag * @param duration * @return */
Add Duration
withDuration
{ "repo_name": "ffournier/animations", "path": "app/src/main/java/com/animations/animations/lib/ParticleManager.java", "license": "apache-2.0", "size": 17090 }
[ "com.animations.animations.lib.view.ParticleView" ]
import com.animations.animations.lib.view.ParticleView;
import com.animations.animations.lib.view.*;
[ "com.animations.animations" ]
com.animations.animations;
1,077,533
public void testInitReporters() throws Exception { report.step("Set Active scenario"); agentSysObj.client.setActiveScenario("scenarios/agentScenarioDefault"); report.report("Start running scenario"); agentSysObj.client.run(); //check that the folder 'test_1' is exist. String folderLocation=(agentDir ...
void function() throws Exception { report.step(STR); agentSysObj.client.setActiveScenario(STR); report.report(STR); agentSysObj.client.run(); String folderLocation=(agentDir + File.separator+"log"+File.separator+STR+File.separator+STR+File.separator); File file1 = new File(folderLocation); if(file1.exists()){ report.re...
/** * Test initializing reports on the agent */
Test initializing reports on the agent
testInitReporters
{ "repo_name": "Top-Q/jsystem", "path": "jsystem-core-projects/jsystemAgent/src/test/java/jsystem/agent/client/LocalAgentTest.java", "license": "apache-2.0", "size": 29304 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,381,476
EnvironmentInformation.logEnvironmentInfo(LOG, "Mesos AppMaster", args); SignalHandler.register(LOG); JvmShutdownSafeguard.installAsShutdownHook(LOG); // run and exit with the proper return code int returnCode = new MesosApplicationMasterRunner().run(args); System.exit(returnCode); }
EnvironmentInformation.logEnvironmentInfo(LOG, STR, args); SignalHandler.register(LOG); JvmShutdownSafeguard.installAsShutdownHook(LOG); int returnCode = new MesosApplicationMasterRunner().run(args); System.exit(returnCode); }
/** * The entry point for the Mesos AppMaster. * * @param args The command line arguments. */
The entry point for the Mesos AppMaster
main
{ "repo_name": "PangZhi/flink", "path": "flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosApplicationMasterRunner.java", "license": "apache-2.0", "size": 16579 }
[ "org.apache.flink.runtime.util.EnvironmentInformation", "org.apache.flink.runtime.util.JvmShutdownSafeguard", "org.apache.flink.runtime.util.SignalHandler" ]
import org.apache.flink.runtime.util.EnvironmentInformation; import org.apache.flink.runtime.util.JvmShutdownSafeguard; import org.apache.flink.runtime.util.SignalHandler;
import org.apache.flink.runtime.util.*;
[ "org.apache.flink" ]
org.apache.flink;
659,492
@Override public String getAsText() { return Collections3.extractToString((List) getValue(), "id", ","); }
String function() { return Collections3.extractToString((List) getValue(), "id", ","); }
/** * Set to page */
Set to page
getAsText
{ "repo_name": "shangyantao/dmapp", "path": "data-app/src/main/java/com/sap/data/app/web/account/GroupListEditor.java", "license": "mit", "size": 1127 }
[ "com.sap.data.core.utils.Collections3", "java.util.List" ]
import com.sap.data.core.utils.Collections3; import java.util.List;
import com.sap.data.core.utils.*; import java.util.*;
[ "com.sap.data", "java.util" ]
com.sap.data; java.util;
156,771
ModuleVersionIdentifier getModuleVersionId() throws ModuleVersionResolveException;
ModuleVersionIdentifier getModuleVersionId() throws ModuleVersionResolveException;
/** * Returns the module version id of the component. * * @throws org.gradle.internal.resolve.ModuleVersionResolveException If resolution was unsuccessful and the id is unknown. */
Returns the module version id of the component
getModuleVersionId
{ "repo_name": "gradle/gradle", "path": "subprojects/dependency-management/src/main/java/org/gradle/internal/resolve/result/ComponentResolveResult.java", "license": "apache-2.0", "size": 2022 }
[ "org.gradle.api.artifacts.ModuleVersionIdentifier", "org.gradle.internal.resolve.ModuleVersionResolveException" ]
import org.gradle.api.artifacts.ModuleVersionIdentifier; import org.gradle.internal.resolve.ModuleVersionResolveException;
import org.gradle.api.artifacts.*; import org.gradle.internal.resolve.*;
[ "org.gradle.api", "org.gradle.internal" ]
org.gradle.api; org.gradle.internal;
2,522,683
public static CompoundTag parseCompound(String mojangson) throws MojangsonParseException { final int parseCompoundStart = 0; // Parsing context magic value final int parseCompoundPairKey = 1; // Parsing context magic value final int parseCompoundPairValue = 2; // Parsing context magic...
static CompoundTag function(String mojangson) throws MojangsonParseException { final int parseCompoundStart = 0; final int parseCompoundPairKey = 1; final int parseCompoundPairValue = 2; int context = parseCompoundStart; String tmpkey = STRSTRIndex: STR, symbol: \'STR\'STR"; continue; } tmpval += character; } } return ...
/** * Parses a Compound from a Mojangson string as an NBT CompoundTag. * * @param mojangson The Mojangson string * @return the parsed CompoundTag NBT value * @throws MojangsonParseException if the Mojangson string could not be parsed as a * Compound value. ...
Parses a Compound from a Mojangson string as an NBT CompoundTag
parseCompound
{ "repo_name": "GlowstonePlusPlus/GlowstonePlusPlus", "path": "src/main/java/net/glowstone/util/mojangson/Mojangson.java", "license": "mit", "size": 24726 }
[ "net.glowstone.util.mojangson.ex.MojangsonParseException", "net.glowstone.util.nbt.CompoundTag" ]
import net.glowstone.util.mojangson.ex.MojangsonParseException; import net.glowstone.util.nbt.CompoundTag;
import net.glowstone.util.mojangson.ex.*; import net.glowstone.util.nbt.*;
[ "net.glowstone.util" ]
net.glowstone.util;
375,850
@Override public Set<AndesSubscription> getMatchingWildCardSubscriptions(String destination) { Set<AndesSubscription> subscriptions = new HashSet<AndesSubscription>(); if (StringUtils.isNotEmpty(destination)) { // constituentDelimiter is quoted to avoid making the delimiter a regex...
Set<AndesSubscription> function(String destination) { Set<AndesSubscription> subscriptions = new HashSet<AndesSubscription>(); if (StringUtils.isNotEmpty(destination)) { String[] constituents = destination.split(Pattern.quote(constituentsDelimiter)); int noOfCurrentMaxConstituents = constituentTables.size(); if (consti...
/** * Get matching subscribers for a given non-wildcard destination. * * @param destination The destination without wildcard * @return Set of matching subscriptions */
Get matching subscribers for a given non-wildcard destination
getMatchingWildCardSubscriptions
{ "repo_name": "chanakaudaya/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/subscription/ClusterSubscriptionBitMapHandler.java", "license": "apache-2.0", "size": 23176 }
[ "java.util.BitSet", "java.util.HashSet", "java.util.Map", "java.util.Set", "java.util.regex.Pattern", "org.apache.commons.lang.StringUtils", "org.wso2.andes.kernel.AndesSubscription" ]
import java.util.BitSet; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; import org.wso2.andes.kernel.AndesSubscription;
import java.util.*; import java.util.regex.*; import org.apache.commons.lang.*; import org.wso2.andes.kernel.*;
[ "java.util", "org.apache.commons", "org.wso2.andes" ]
java.util; org.apache.commons; org.wso2.andes;
1,728,651
public EEPIdentifier getEEP() { return eep; }
EEPIdentifier function() { return eep; }
/** * Gets the EnOcean Equipment Profile of the device who has sent this teach * in packet. * * @return The associated EEP identifier */
Gets the EnOcean Equipment Profile of the device who has sent this teach in packet
getEEP
{ "repo_name": "steveohara/enocean4j", "path": "src/main/java/uk/co/_4ng/enocean/eep/eep26/telegram/UTETeachInTelegram.java", "license": "apache-2.0", "size": 9892 }
[ "uk.co._4ng.enocean.eep.EEPIdentifier" ]
import uk.co._4ng.enocean.eep.EEPIdentifier;
import uk.co._4ng.enocean.eep.*;
[ "uk.co._4ng" ]
uk.co._4ng;
2,874,636
@Override @Transactional public Map<Long, Double> getLoiCharges(final Long applicationId, final Long serviceId, final Long orgId) { List<WaterRateMaster> requiredCharges = new ArrayList<>(); final WSRequestDTO requestDTO = new WSRequestDTO(); final List<WaterRateMaster> charge...
Map<Long, Double> function(final Long applicationId, final Long serviceId, final Long orgId) { List<WaterRateMaster> requiredCharges = new ArrayList<>(); final WSRequestDTO requestDTO = new WSRequestDTO(); final List<WaterRateMaster> chargeModelList = new ArrayList<>(); final Organisation org = new Organisation(); org....
/** * This method used for get Scrutiny level LOI charges */
This method used for get Scrutiny level LOI charges
getLoiCharges
{ "repo_name": "abmindiarepomanager/ABMOpenMainet", "path": "Mainet1.1/MainetServiceParent/MainetServiceWater/src/main/java/com/abm/mainet/water/service/PlumberLicenseServiceImpl.java", "license": "gpl-3.0", "size": 24657 }
[ "com.abm.mainet.common.constant.MainetConstants", "com.abm.mainet.common.constant.PrefixConstants", "com.abm.mainet.common.constant.ServiceEndpoints", "com.abm.mainet.common.domain.Organisation", "com.abm.mainet.common.integration.dto.WSRequestDTO", "com.abm.mainet.common.integration.dto.WSResponseDTO", ...
import com.abm.mainet.common.constant.MainetConstants; import com.abm.mainet.common.constant.PrefixConstants; import com.abm.mainet.common.constant.ServiceEndpoints; import com.abm.mainet.common.domain.Organisation; import com.abm.mainet.common.integration.dto.WSRequestDTO; import com.abm.mainet.common.integration.dto....
import com.abm.mainet.common.constant.*; import com.abm.mainet.common.domain.*; import com.abm.mainet.common.integration.dto.*; import com.abm.mainet.common.utility.*; import com.abm.mainet.water.datamodel.*; import com.abm.mainet.water.utility.*; import java.util.*;
[ "com.abm.mainet", "java.util" ]
com.abm.mainet; java.util;
2,887,218
public static UUID checkFeatureSupportedByCluster( GridClient client, IgniteFeatures feature, boolean validateClientNodes, boolean failIfUnsupportedFound ) throws GridClientException { Collection<GridClientNode> nodes = validateClientNodes ? client.compute().n...
static UUID function( GridClient client, IgniteFeatures feature, boolean validateClientNodes, boolean failIfUnsupportedFound ) throws GridClientException { Collection<GridClientNode> nodes = validateClientNodes ? client.compute().nodes() : client.compute().nodes(GridClientNode::connectable); for (GridClientNode node : ...
/** * Checks that all cluster nodes support specified feature. * * @param client Client. * @param feature Feature. * @param validateClientNodes Whether client nodes should be checked as well. * @param failIfUnsupportedFound If {@code true}, fails when found a node unsupporting {@code featu...
Checks that all cluster nodes support specified feature
checkFeatureSupportedByCluster
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientUtils.java", "license": "apache-2.0", "size": 7454 }
[ "java.util.Collection", "org.apache.ignite.internal.IgniteFeatures", "org.apache.ignite.internal.IgniteNodeAttributes", "org.apache.ignite.internal.client.GridClient", "org.apache.ignite.internal.client.GridClientException", "org.apache.ignite.internal.client.GridClientNode" ]
import java.util.Collection; import org.apache.ignite.internal.IgniteFeatures; import org.apache.ignite.internal.IgniteNodeAttributes; import org.apache.ignite.internal.client.GridClient; import org.apache.ignite.internal.client.GridClientException; import org.apache.ignite.internal.client.GridClientNode;
import java.util.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.client.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
923,240
//------------------------------------------------------------------------- public MultiCurrencyAmount currencyExposure(ResolvedSwap swap, RatesProvider provider) { MultiCurrencyAmount ce = MultiCurrencyAmount.empty(); for (ResolvedSwapLeg leg : swap.getLegs()) { ce = ce.plus(legPricer.currencyExposu...
MultiCurrencyAmount function(ResolvedSwap swap, RatesProvider provider) { MultiCurrencyAmount ce = MultiCurrencyAmount.empty(); for (ResolvedSwapLeg leg : swap.getLegs()) { ce = ce.plus(legPricer.currencyExposure(leg, provider)); } return ce; }
/** * Calculates the currency exposure of the swap product. * * @param swap the product * @param provider the rates provider * @return the currency exposure of the swap product */
Calculates the currency exposure of the swap product
currencyExposure
{ "repo_name": "jmptrader/Strata", "path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/swap/DiscountingSwapProductPricer.java", "license": "apache-2.0", "size": 24580 }
[ "com.opengamma.strata.basics.currency.MultiCurrencyAmount", "com.opengamma.strata.pricer.rate.RatesProvider", "com.opengamma.strata.product.swap.ResolvedSwap", "com.opengamma.strata.product.swap.ResolvedSwapLeg" ]
import com.opengamma.strata.basics.currency.MultiCurrencyAmount; import com.opengamma.strata.pricer.rate.RatesProvider; import com.opengamma.strata.product.swap.ResolvedSwap; import com.opengamma.strata.product.swap.ResolvedSwapLeg;
import com.opengamma.strata.basics.currency.*; import com.opengamma.strata.pricer.rate.*; import com.opengamma.strata.product.swap.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
83,489
public JsonContentAssert isEqualToJson(Resource expected, JSONComparator comparator) { String expectedJson = this.loader.getJson(expected); return assertNotFailed(compare(expectedJson, comparator)); }
JsonContentAssert function(Resource expected, JSONComparator comparator) { String expectedJson = this.loader.getJson(expected); return assertNotFailed(compare(expectedJson, comparator)); }
/** * Verifies that the actual value is equal to the specified JSON resource. * @param expected a resource containing the expected JSON * @param comparator the comparator used when checking * @return {@code this} assertion object * @throws AssertionError if the actual JSON value is not equal to the given one ...
Verifies that the actual value is equal to the specified JSON resource
isEqualToJson
{ "repo_name": "ptahchiev/spring-boot", "path": "spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/JsonContentAssert.java", "license": "apache-2.0", "size": 46401 }
[ "org.skyscreamer.jsonassert.comparator.JSONComparator", "org.springframework.core.io.Resource" ]
import org.skyscreamer.jsonassert.comparator.JSONComparator; import org.springframework.core.io.Resource;
import org.skyscreamer.jsonassert.comparator.*; import org.springframework.core.io.*;
[ "org.skyscreamer.jsonassert", "org.springframework.core" ]
org.skyscreamer.jsonassert; org.springframework.core;
1,948,737
@Override Rectangle getModelRect() { Rectangle mRect = super.getModelRect(); if (noHorizontalScroll()) { return mRect; } int xSpan = (int) rootViewContext.getView().getPreferredSpan(View.X_AXIS); mRect.width = Math.max(xSpan, mRect.width); ...
Rectangle getModelRect() { Rectangle mRect = super.getModelRect(); if (noHorizontalScroll()) { return mRect; } int xSpan = (int) rootViewContext.getView().getPreferredSpan(View.X_AXIS); mRect.width = Math.max(xSpan, mRect.width); return mRect; }
/** * Returns the rectangle required to contain all the text, not only * visible part(which is component's bounds), * relative to TextArea origin */
Returns the rectangle required to contain all the text, not only visible part(which is component's bounds), relative to TextArea origin
getModelRect
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/awt/src/main/java/common/java/awt/TextArea.java", "license": "apache-2.0", "size": 24088 }
[ "javax.swing.text.View" ]
import javax.swing.text.View;
import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
187,490
protected boolean parseUnknownField( final CodedInputStreamMicro input, final int tag) throws IOException { return input.skipField(tag); }
boolean function( final CodedInputStreamMicro input, final int tag) throws IOException { return input.skipField(tag); }
/** * Called by subclasses to parse an unknown field. * * @return {@code true} unless the tag is an end-group tag. */
Called by subclasses to parse an unknown field
parseUnknownField
{ "repo_name": "costinm/dmesh", "path": "android/lib-util/src/main/java/com/google/protobuf/micro/MessageMicro.java", "license": "apache-2.0", "size": 5417 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,566,308
public static void executeSerial(Runnable runnable, long delayMillis) { final Message msg = sHandler.obtainMessage(MESSAGE_DELAY_SERIAL_RUNNABLE, runnable); sHandler.sendMessageDelayed(msg, delayMillis); }
static void function(Runnable runnable, long delayMillis) { final Message msg = sHandler.obtainMessage(MESSAGE_DELAY_SERIAL_RUNNABLE, runnable); sHandler.sendMessageDelayed(msg, delayMillis); }
/** * Execute the runnable in serial order with delayed time milliseconds. * <em>For simple use, use * {@link AsyncHandler#postDelayed(Runnable, long)} instead. </em> * * @param runnable A {@link Runnable} to be executed. * @param delayMillis Time in milliseconds before the runnab...
Execute the runnable in serial order with delayed time milliseconds. For simple use, use <code>AsyncHandler#postDelayed(Runnable, long)</code> instead.
executeSerial
{ "repo_name": "george-zhang-work/dove", "path": "Dove/common/src/main/java/com/dove/common/content/DoveAsyncTask.java", "license": "apache-2.0", "size": 14706 }
[ "android.os.Message" ]
import android.os.Message;
import android.os.*;
[ "android.os" ]
android.os;
711,573
public List<NetworkInterfaceInner> networkInterfaces() { return this.networkInterfaces; }
List<NetworkInterfaceInner> function() { return this.networkInterfaces; }
/** * Get a collection of references to network interfaces. * * @return the networkInterfaces value */
Get a collection of references to network interfaces
networkInterfaces
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_12_01/src/main/java/com/microsoft/azure/management/network/v2018_12_01/implementation/NetworkSecurityGroupInner.java", "license": "mit", "size": 6011 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
67,884
public List<String> getAnswerAsList() { return answer.getAnswerList(); }
List<String> function() { return answer.getAnswerList(); }
/** * Getter for answers as a List. * * @return list of answers */
Getter for answers as a List
getAnswerAsList
{ "repo_name": "loop/SurveySystem", "path": "androidclient/src/main/java/com/yogeshn/fyp/androidclient/backend/model/question/Question.java", "license": "mit", "size": 6205 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,397,046
// // // actions // // @RequirePOST public synchronized void doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException { checkPermission(CONFIGURE); description = req.getParameter("description"); JSONObj...
synchronized void function(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException { checkPermission(CONFIGURE); description = req.getParameter(STR); JSONObject json = req.getSubmittedForm(); try { try (BulkChange bc = new BulkChange(this)) { setDisplayName(json.optString(STR)); log...
/** * Accepts submission from the configuration page. */
Accepts submission from the configuration page
doConfigSubmit
{ "repo_name": "ndeloof/jenkins", "path": "core/src/main/java/hudson/model/Job.java", "license": "mit", "size": 56342 }
[ "hudson.model.Descriptor", "hudson.model.listeners.ItemListener", "hudson.util.DescribableList", "hudson.util.FormApply", "hudson.util.QuotedStringTokenizer", "java.io.IOException", "java.net.URLEncoder", "java.util.logging.Level", "javax.servlet.ServletException", "net.sf.json.JSONException", "...
import hudson.model.Descriptor; import hudson.model.listeners.ItemListener; import hudson.util.DescribableList; import hudson.util.FormApply; import hudson.util.QuotedStringTokenizer; import java.io.IOException; import java.net.URLEncoder; import java.util.logging.Level; import javax.servlet.ServletException; import ne...
import hudson.model.*; import hudson.model.listeners.*; import hudson.util.*; import java.io.*; import java.net.*; import java.util.logging.*; import javax.servlet.*; import net.sf.json.*; import org.kohsuke.stapler.*;
[ "hudson.model", "hudson.model.listeners", "hudson.util", "java.io", "java.net", "java.util", "javax.servlet", "net.sf.json", "org.kohsuke.stapler" ]
hudson.model; hudson.model.listeners; hudson.util; java.io; java.net; java.util; javax.servlet; net.sf.json; org.kohsuke.stapler;
462,734
public Map<String, ? extends IRecordStoreInfo> getRecordStores();
Map<String, ? extends IRecordStoreInfo> function();
/** * Gets the list of available record types in this storage * @return map of name to data store instance */
Gets the list of available record types in this storage
getRecordStores
{ "repo_name": "Shimejing/sensorhub", "path": "sensorhub-core/src/main/java/org/sensorhub/api/persistence/IBasicStorage.java", "license": "mpl-2.0", "size": 7241 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
174,287
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux<PollResult<WorkloadNetworkDnsZoneInner>, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadN...
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<WorkloadNetworkDnsZoneInner>, WorkloadNetworkDnsZoneInner> function( String resourceGroupName, String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { Mono<Response<Flux<ByteBuffer>>> mono = create...
/** * Create a DNS zone by id in a private cloud workload network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's dis...
Create a DNS zone by id in a private cloud workload network
beginCreateDnsZoneAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java", "license": "mit", "size": 538828 }
[ "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.avs.fluent.models.WorkloadNetworkDns...
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.avs.fluent.model...
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.avs.fluent.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
1,416,556
Index getIndexForColumns(boolean[] columnCheck) { Index indexChoice = null; int colCount = 0; for (int i = 0; i < indexList.length; i++) { Index index = indexList[i]; boolean result = ArrayUtil.containsAllTrueElements(columnCheck, index.colCheck...
Index getIndexForColumns(boolean[] columnCheck) { Index indexChoice = null; int colCount = 0; for (int i = 0; i < indexList.length; i++) { Index index = indexList[i]; boolean result = ArrayUtil.containsAllTrueElements(columnCheck, index.colCheck); if (result && index.getVisibleColumns() > colCount) { colCount = index.g...
/** * Used for TableFilter to get an index for the columns */
Used for TableFilter to get an index for the columns
getIndexForColumns
{ "repo_name": "Yashi100/rhodes3.3.2", "path": "platform/bb/Hsqldb/src/org/hsqldb/Table.java", "license": "mit", "size": 110377 }
[ "org.hsqldb.lib.ArrayUtil" ]
import org.hsqldb.lib.ArrayUtil;
import org.hsqldb.lib.*;
[ "org.hsqldb.lib" ]
org.hsqldb.lib;
980,008
private void setControlsEnabled(Composite root, boolean enabled) { Control[] children = root.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; if (!(child instanceof CTabFolder) && !(child instanceof TabFolder) && !(child instanceof PageBook)) child.setEnabled(enab...
void function(Composite root, boolean enabled) { Control[] children = root.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; if (!(child instanceof CTabFolder) && !(child instanceof TabFolder) && !(child instanceof PageBook)) child.setEnabled(enabled); if (child instanceof Composit...
/** * Enables or disables a tree of controls starting at the specified root. We spare tabbed notebooks and pagebooks to * allow for user navigation. * * @param root * - the root composite * @param enabled * - true if controls shall be enabled */
Enables or disables a tree of controls starting at the specified root. We spare tabbed notebooks and pagebooks to allow for user navigation
setControlsEnabled
{ "repo_name": "OpenSoftwareSolutions/PDFReporter-Studio", "path": "com.jaspersoft.studio/src/com/jaspersoft/studio/preferences/util/OverlayPage.java", "license": "lgpl-3.0", "size": 9148 }
[ "org.eclipse.swt.custom.CTabFolder", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Control", "org.eclipse.swt.widgets.TabFolder", "org.eclipse.ui.part.PageBook" ]
import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.TabFolder; import org.eclipse.ui.part.PageBook;
import org.eclipse.swt.custom.*; import org.eclipse.swt.widgets.*; import org.eclipse.ui.part.*;
[ "org.eclipse.swt", "org.eclipse.ui" ]
org.eclipse.swt; org.eclipse.ui;
2,684,096
public static String relativePath(String input, String mainurl) { Path inputPath = Paths.get(input); Path rootPath = Paths.get(mainurl); Path relativize = rootPath.getParent().relativize(inputPath.getParent()); return relativize.toString(); }
static String function(String input, String mainurl) { Path inputPath = Paths.get(input); Path rootPath = Paths.get(mainurl); Path relativize = rootPath.getParent().relativize(inputPath.getParent()); return relativize.toString(); }
/** * Compute sub directory of given input, relative to main module. * @param input * @param mainurl * @return a relative path */
Compute sub directory of given input, relative to main module
relativePath
{ "repo_name": "crsx/crsx4", "path": "targets/java/runtime/org/transscript/tool/Utils.java", "license": "epl-1.0", "size": 11424 }
[ "java.nio.file.Path", "java.nio.file.Paths" ]
import java.nio.file.Path; import java.nio.file.Paths;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
1,517,540
protected Event checkError(String packageName, String ruleName, String expectedErrorMessage, String... lines) throws Exception { eventCollector.clear(); reporter.removeHandler(failFastHandler); // expect errors Configur...
Event function(String packageName, String ruleName, String expectedErrorMessage, String... lines) throws Exception { eventCollector.clear(); reporter.removeHandler(failFastHandler); ConfiguredTarget target = scratchConfiguredTarget(packageName, ruleName, lines); if (target != null) { assertTrue(STR + " view.hasErrors(t...
/** * Check that configuration of the target named 'ruleName' in the * specified BUILD file fails with an error message ending in * 'expectedErrorMessage'. * * @param packageName the package name of the generated BUILD file * @param ruleName the rule name for the rule in the generated BUILD file * ...
Check that configuration of the target named 'ruleName' in the specified BUILD file fails with an error message ending in 'expectedErrorMessage'
checkError
{ "repo_name": "hhclam/bazel", "path": "src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java", "license": "apache-2.0", "size": 70580 }
[ "com.google.devtools.build.lib.analysis.ConfiguredTarget", "com.google.devtools.build.lib.events.Event", "org.junit.Assert" ]
import com.google.devtools.build.lib.analysis.ConfiguredTarget; import com.google.devtools.build.lib.events.Event; import org.junit.Assert;
import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.events.*; import org.junit.*;
[ "com.google.devtools", "org.junit" ]
com.google.devtools; org.junit;
14,828
public Code newCode(CfgContext context, Node node) { if (node != null) { Code component = new Code(); component.configure(context,node,node.getAttributes()); return component; } return null; }
Code function(CfgContext context, Node node) { if (node != null) { Code component = new Code(); component.configure(context,node,node.getAttributes()); return component; } return null; }
/** * Instantiates and configures a new Code component. * <br/>The node argument can be null, if so then return a null value. * @param context the configuration context * @param node the configuration node associated with the component * @return the new Code component (null if the node was invalid) ...
Instantiates and configures a new Code component. The node argument can be null, if so then return a null value
newCode
{ "repo_name": "usgin/usgin-geoportal", "path": "src/com/esri/gpt/catalog/schema/SchemaFactory.java", "license": "apache-2.0", "size": 12665 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
824,736
public boolean onBackPressed() { if (!mIsInitialized || !mSearchPanel.isShowing()) return false; hideContextualSearch(StateChangeReason.BACK_PRESS); return true; }
boolean function() { if (!mIsInitialized !mSearchPanel.isShowing()) return false; hideContextualSearch(StateChangeReason.BACK_PRESS); return true; }
/** * Called when the system back button is pressed. Will hide the layout. */
Called when the system back button is pressed. Will hide the layout
onBackPressed
{ "repo_name": "Bysmyyr/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java", "license": "bsd-3-clause", "size": 58014 }
[ "org.chromium.chrome.browser.compositor.bottombar.OverlayPanel" ]
import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel;
import org.chromium.chrome.browser.compositor.bottombar.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
284,741
public static boolean isReady() { return isSupported() && isInitialized() && Placement.isReady(); }
static boolean function() { return isSupported() && isInitialized() && Placement.isReady(); }
/** * Check if default placement is ready to show ads * * @return If true, default placement is ready to show ads */
Check if default placement is ready to show ads
isReady
{ "repo_name": "bradgearon/unity-ads-android", "path": "lib/src/main/java/com/unity3d/ads/UnityAds.java", "license": "apache-2.0", "size": 12116 }
[ "com.unity3d.ads.placement.Placement" ]
import com.unity3d.ads.placement.Placement;
import com.unity3d.ads.placement.*;
[ "com.unity3d.ads" ]
com.unity3d.ads;
1,027,685