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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
default void addDocumentListener(@NotNull DocumentListener listener) {
} | default void addDocumentListener(@NotNull DocumentListener listener) { } | /**
* Adds a listener for receiving notifications about changes in the document content.
*
* @param listener the listener instance.
*/ | Adds a listener for receiving notifications about changes in the document content | addDocumentListener | {
"repo_name": "goodwinnk/intellij-community",
"path": "platform/core-api/src/com/intellij/openapi/editor/Document.java",
"license": "apache-2.0",
"size": 13277
} | [
"com.intellij.openapi.editor.event.DocumentListener",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.editor.event.DocumentListener; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.editor.event.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"org.jetbrains.annotations"
] | com.intellij.openapi; org.jetbrains.annotations; | 106,618 |
public void dataWipe(StatusTag status, SyncmlDocument syncmlDocument, DeviceIdentifier deviceIdentifier)
throws OperationManagementException {
List<? extends Operation> pendingDataOperations;
if ((Constants.SyncMLResponseCodes.ACCEPTED.equals(status.getData()))) {
try {
... | void function(StatusTag status, SyncmlDocument syncmlDocument, DeviceIdentifier deviceIdentifier) throws OperationManagementException { List<? extends Operation> pendingDataOperations; if ((Constants.SyncMLResponseCodes.ACCEPTED.equals(status.getData()))) { try { pendingDataOperations = WindowsAPIUtils.getPendingOperat... | /***
* Update the status of the DataWipe operation.
*
* @param status Status of the data wipe.
* @param syncmlDocument Parsed syncml payload from the syncml engine.
* @param deviceIdentifier specific device id to be wiped.
* @throws OperationManagementException
*/ | Update the status of the DataWipe operation | dataWipe | {
"repo_name": "laki88/product-mdm",
"path": "modules/mobile-agents/windows/jax-rs/src/main/java/org/wso2/carbon/mdm/mobileservices/windows/operations/util/OperationHandler.java",
"license": "apache-2.0",
"size": 26934
} | [
"java.util.List",
"org.wso2.carbon.device.mgt.common.DeviceIdentifier",
"org.wso2.carbon.device.mgt.common.DeviceManagementException",
"org.wso2.carbon.device.mgt.common.operation.mgt.Operation",
"org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException",
"org.wso2.carbon.mdm.mobileser... | import java.util.List; import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; import org.wso2.car... | import java.util.*; import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.operation.mgt.*; import org.wso2.carbon.mdm.mobileservices.windows.common.util.*; import org.wso2.carbon.mdm.mobileservices.windows.operations.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 2,705,037 |
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_VERTICAL_ALIGNMENT,
defaultValue = ComponentConstants.VERTICAL_ALIGNMENT_DEFAULT + "")
@SimpleProperty
public void AlignVertical(int alignment) {
try {
// notice that the throw will prevent the alignment from being changed
//... | @DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_VERTICAL_ALIGNMENT, defaultValue = ComponentConstants.VERTICAL_ALIGNMENT_DEFAULT + STRVerticalAlignment", ErrorMessages.ERROR_BAD_VALUE_FOR_VERTICAL_ALIGNMENT, alignment); } } | /**
* Sets the vertical alignment for contents of the arrangement
*
* @param alignment
*/ | Sets the vertical alignment for contents of the arrangement | AlignVertical | {
"repo_name": "kpjs4s/AppInventorJavaBridgeCodeGen",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/HVArrangement.java",
"license": "apache-2.0",
"size": 8308
} | [
"com.google.appinventor.components.annotations.DesignerProperty",
"com.google.appinventor.components.common.ComponentConstants",
"com.google.appinventor.components.common.PropertyTypeConstants",
"com.google.appinventor.components.runtime.util.ErrorMessages"
] | import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.common.ComponentConstants; import com.google.appinventor.components.common.PropertyTypeConstants; import com.google.appinventor.components.runtime.util.ErrorMessages; | import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*; import com.google.appinventor.components.runtime.util.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 1,053,053 |
public static boolean checkForDuplicatedVertexIds(BrowsableNetwork network) {
Set<Integer> ids = new HashSet<Integer>();
for(Vertex vertex : network.getVertices() ) {
if(ids.contains(vertex.getId())) {
return true;
}
ids.add(vertex.getId());
}
return false;
}
| static boolean function(BrowsableNetwork network) { Set<Integer> ids = new HashSet<Integer>(); for(Vertex vertex : network.getVertices() ) { if(ids.contains(vertex.getId())) { return true; } ids.add(vertex.getId()); } return false; } | /**
* This method checks if there are duplicated vertices with the
* same ID. If there are duplicated IDs then we cannot save the
* network before reassigning unique IDs
* @return true if there are duplicated IDs, false otherwise.
*/ | This method checks if there are duplicated vertices with the same ID. If there are duplicated IDs then we cannot save the network before reassigning unique IDs | checkForDuplicatedVertexIds | {
"repo_name": "dev-cuttlefish/cuttlefish",
"path": "src-old/ch/ethz/sg/cuttlefish/misc/Utils.java",
"license": "gpl-2.0",
"size": 5723
} | [
"ch.ethz.sg.cuttlefish.networks.BrowsableNetwork",
"java.util.HashSet",
"java.util.Set"
] | import ch.ethz.sg.cuttlefish.networks.BrowsableNetwork; import java.util.HashSet; import java.util.Set; | import ch.ethz.sg.cuttlefish.networks.*; import java.util.*; | [
"ch.ethz.sg",
"java.util"
] | ch.ethz.sg; java.util; | 1,209,157 |
public PartitionedRegion getPartitionedRegion(); | PartitionedRegion function(); | /**
* Returns the parent {@link PartitionedRegion} of this bucket.
*/ | Returns the parent <code>PartitionedRegion</code> of this bucket | getPartitionedRegion | {
"repo_name": "gemxd/gemfirexd-oss",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/Bucket.java",
"license": "apache-2.0",
"size": 2806
} | [
"com.gemstone.gemfire.internal.cache.PartitionedRegion"
] | import com.gemstone.gemfire.internal.cache.PartitionedRegion; | import com.gemstone.gemfire.internal.cache.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 415,350 |
public Number getWindDirection(int series, int item) {
List oneSeriesData = (List) this.allSeriesData.get(series);
WindDataItem windItem = (WindDataItem) oneSeriesData.get(item);
return windItem.getWindDirection();
} | Number function(int series, int item) { List oneSeriesData = (List) this.allSeriesData.get(series); WindDataItem windItem = (WindDataItem) oneSeriesData.get(item); return windItem.getWindDirection(); } | /**
* Returns the wind direction for one item within a series. This is a
* number between 0 and 12, like the numbers on a clock face.
*
* @param series the series (zero-based index).
* @param item the item (zero-based index).
*
* @return The wind direction for the item within the... | Returns the wind direction for one item within a series. This is a number between 0 and 12, like the numbers on a clock face | getWindDirection | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/data/xy/DefaultWindDataset.java",
"license": "lgpl-2.1",
"size": 10692
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,145,386 |
if (maxSizePolicy == null) {
throw new IllegalArgumentException("Max-Size policy cannot be null");
}
if (maxSizePolicy != MaxSizePolicy.ENTRY_COUNT) {
throw new IllegalArgumentException("Invalid max-size policy "
+ '(' + maxSizePolicy + ") for " + getClass().... | if (maxSizePolicy == null) { throw new IllegalArgumentException(STR); } if (maxSizePolicy != MaxSizePolicy.ENTRY_COUNT) { throw new IllegalArgumentException(STR + '(' + maxSizePolicy + STR + getClass().getName() + STR + MaxSizePolicy.ENTRY_COUNT + STR); } else { return super.createCacheMaxSizeChecker(size, maxSizePolic... | /**
* Creates an instance for checking if the maximum cache size has been reached. Supports only the
* {@link MaxSizePolicy#ENTRY_COUNT} policy. Throws an {@link IllegalArgumentException} if other {@code maxSizePolicy} is
* used.
*
* @param size the maximum number of entries
* @pa... | Creates an instance for checking if the maximum cache size has been reached. Supports only the <code>MaxSizePolicy#ENTRY_COUNT</code> policy. Throws an <code>IllegalArgumentException</code> if other maxSizePolicy is used | createCacheMaxSizeChecker | {
"repo_name": "lmjacksoniii/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/cache/impl/CacheRecordStore.java",
"license": "apache-2.0",
"size": 11082
} | [
"com.hazelcast.config.EvictionConfig"
] | import com.hazelcast.config.EvictionConfig; | import com.hazelcast.config.*; | [
"com.hazelcast.config"
] | com.hazelcast.config; | 280,436 |
public void drawEPS(PlotToEPS eps) {
synchronized (eps) {
eps.printLineWidth(lineWidth);
eps.printColor(color);
PrintStream p = eps.getStream();
drawEPS(p, obj, eps.getBox());
}
}
| void function(PlotToEPS eps) { synchronized (eps) { eps.printLineWidth(lineWidth); eps.printColor(color); PrintStream p = eps.getStream(); drawEPS(p, obj, eps.getBox()); } } | /**
* Draws this object to an EPS image file using a
* <code>PlotToEPS</code> plot class.
*
* @param eps the <code>PlotToEPS</code> plot object
*/ | Draws this object to an EPS image file using a <code>PlotToEPS</code> plot class | drawEPS | {
"repo_name": "stochastics-ulm-university/GeoLing",
"path": "src/geoling/util/sim/util/plot/DrawableRandomSetElement2D.java",
"license": "gpl-3.0",
"size": 8289
} | [
"java.io.PrintStream"
] | import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,901,446 |
public BinaryObjectBuilder builder(BinaryObject binaryObj) throws BinaryObjectException; | BinaryObjectBuilder function(BinaryObject binaryObj) throws BinaryObjectException; | /**
* Creates binary builder initialized by existing binary object.
*
* @param binaryObj Binary object to initialize builder.
* @return Binary builder.
*/ | Creates binary builder initialized by existing binary object | builder | {
"repo_name": "tkpanther/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/IgniteBinary.java",
"license": "apache-2.0",
"size": 16208
} | [
"org.apache.ignite.binary.BinaryObject",
"org.apache.ignite.binary.BinaryObjectBuilder",
"org.apache.ignite.binary.BinaryObjectException"
] | import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.binary.BinaryObjectBuilder; import org.apache.ignite.binary.BinaryObjectException; | import org.apache.ignite.binary.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,799,673 |
public OrganisationUnit getTeiSearchOrganisationUnitWithFallback()
{
return hasTeiSearchOrganisationUnit() ? getTeiSearchOrganisationUnit() : getOrganisationUnit();
}
| OrganisationUnit function() { return hasTeiSearchOrganisationUnit() ? getTeiSearchOrganisationUnit() : getOrganisationUnit(); } | /**
* Returns the first of the tei search organisation units associated with the
* user. If none, returns the first of the data capture organisation units.
* If none, return nulls.
*/ | Returns the first of the tei search organisation units associated with the user. If none, returns the first of the data capture organisation units. If none, return nulls | getTeiSearchOrganisationUnitWithFallback | {
"repo_name": "troyel/dhis2-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java",
"license": "bsd-3-clause",
"size": 20889
} | [
"org.hisp.dhis.organisationunit.OrganisationUnit"
] | import org.hisp.dhis.organisationunit.OrganisationUnit; | import org.hisp.dhis.organisationunit.*; | [
"org.hisp.dhis"
] | org.hisp.dhis; | 1,698,021 |
private void
focusOutNotify (
int detail,
int mode
) {
if (!_isMapped)
return;
Vector<Client> sc;
if ((sc = getSelectingClients (EventCode.MaskFocusChange)) == null)
return;
for (Client c: sc) {
try {
EventCode.sendFocusOut (c, _xServer.getTimestamp (), detail,
this... | void function ( int detail, int mode ) { if (!_isMapped) return; Vector<Client> sc; if ((sc = getSelectingClients (EventCode.MaskFocusChange)) == null) return; for (Client c: sc) { try { EventCode.sendFocusOut (c, _xServer.getTimestamp (), detail, this, mode); } catch (IOException e) { removeSelectingClient (c); } } } | /**
* Notify that this window has lost keyboard focus.
*
* @param detail 0=Ancestor, 1=Virtual, 2=Inferior, 3=Nonlinear,
* 4=NonlinearVirtual, 5=Pointer, 6=PointerRoot, 7=None.
* @param mode 0=Normal, 1=Grab, 2=Ungrab, 3=WhileGrabbed.
*/ | Notify that this window has lost keyboard focus | focusOutNotify | {
"repo_name": "SumiTomohiko/android-nexec-client",
"path": "app/src/main/java/au/com/darkside/XServer/Window.java",
"license": "mit",
"size": 78410
} | [
"java.io.IOException",
"java.util.Vector"
] | import java.io.IOException; import java.util.Vector; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,911,673 |
@SuppressWarnings("unchecked")
protected void bindHeadersFromSubresourceLocators(Exchange cxfExchange, org.apache.camel.Exchange camelExchange) {
MultivaluedMap<String, String> pathParams = (MultivaluedMap<String, String>)
cxfExchange.getInMessage().get(URITemplate.TEMPLATE_PARAMETERS);... | @SuppressWarnings(STR) void function(Exchange cxfExchange, org.apache.camel.Exchange camelExchange) { MultivaluedMap<String, String> pathParams = (MultivaluedMap<String, String>) cxfExchange.getInMessage().get(URITemplate.TEMPLATE_PARAMETERS); if (pathParams == null (pathParams.size() == 1 && pathParams.containsKey(URI... | /**
* Transfers path parameters from the full path (including ancestor subresource locators) into Camel IN Message Headers.
*/ | Transfers path parameters from the full path (including ancestor subresource locators) into Camel IN Message Headers | bindHeadersFromSubresourceLocators | {
"repo_name": "jmandawg/camel",
"path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/SimpleCxfRsBinding.java",
"license": "apache-2.0",
"size": 16310
} | [
"java.util.List",
"java.util.Map",
"javax.ws.rs.core.MultivaluedMap",
"org.apache.camel.Message",
"org.apache.cxf.jaxrs.model.URITemplate",
"org.apache.cxf.message.Exchange"
] | import java.util.List; import java.util.Map; import javax.ws.rs.core.MultivaluedMap; import org.apache.camel.Message; import org.apache.cxf.jaxrs.model.URITemplate; import org.apache.cxf.message.Exchange; | import java.util.*; import javax.ws.rs.core.*; import org.apache.camel.*; import org.apache.cxf.jaxrs.model.*; import org.apache.cxf.message.*; | [
"java.util",
"javax.ws",
"org.apache.camel",
"org.apache.cxf"
] | java.util; javax.ws; org.apache.camel; org.apache.cxf; | 684,308 |
public void addOrOverrideAttribute(Attribute attribute) {
String name = attribute.getName();
// Attributes may be overridden in the future.
Preconditions.checkArgument(!attributes.containsKey(name),
"There is already a built-in attribute '%s' which cannot be overridden", name);
add... | void function(Attribute attribute) { String name = attribute.getName(); Preconditions.checkArgument(!attributes.containsKey(name), STR, name); addAttribute(attribute); } | /**
* Adds or overrides the attribute in the rule class. Meant for Starlark usage.
*
* @throws IllegalArgumentException if the attribute overrides an existing attribute (will be
* legal in the future).
*/ | Adds or overrides the attribute in the rule class. Meant for Starlark usage | addOrOverrideAttribute | {
"repo_name": "meteorcloudy/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/RuleClass.java",
"license": "apache-2.0",
"size": 114353
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 764,611 |
public static Event[] getEventsForNode(int nodeId, SortStyle sortStyle, AcknowledgeType ackType, ServletContext servletContext) throws SQLException {
return getEventsForNode(nodeId, sortStyle, ackType, -1, -1, servletContext);
} | static Event[] function(int nodeId, SortStyle sortStyle, AcknowledgeType ackType, ServletContext servletContext) throws SQLException { return getEventsForNode(nodeId, sortStyle, ackType, -1, -1, servletContext); } | /**
* Return all events (optionally only unacknowledged events) sorted by the
* given sort style for the given node.
*
* @param nodeId a int.
* @param sortStyle a {@link org.opennms.web.event.SortStyle} object.
* @param ackType a {@link org.opennms.web.event.AcknowledgeType} object.
*... | Return all events (optionally only unacknowledged events) sorted by the given sort style for the given node | getEventsForNode | {
"repo_name": "rfdrake/opennms",
"path": "opennms-webapp/src/main/java/org/opennms/web/event/EventFactory.java",
"license": "gpl-2.0",
"size": 52155
} | [
"java.sql.SQLException",
"javax.servlet.ServletContext"
] | import java.sql.SQLException; import javax.servlet.ServletContext; | import java.sql.*; import javax.servlet.*; | [
"java.sql",
"javax.servlet"
] | java.sql; javax.servlet; | 1,354,275 |
synchronized void checkpointNoSIS() throws IOException {
changeCount++;
deleter.checkpoint(segmentInfos, false);
} | synchronized void checkpointNoSIS() throws IOException { changeCount++; deleter.checkpoint(segmentInfos, false); } | /** Checkpoints with IndexFileDeleter, so it's aware of
* new files, and increments changeCount, so on
* close/commit we will write a new segments file, but
* does NOT bump segmentInfos.version. */ | Checkpoints with IndexFileDeleter, so it's aware of new files, and increments changeCount, so on close/commit we will write a new segments file, but | checkpointNoSIS | {
"repo_name": "zhangdian/solr4.6.0",
"path": "lucene/core/src/java/org/apache/lucene/index/IndexWriter.java",
"license": "apache-2.0",
"size": 173047
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,201,272 |
private static String[] askOptionGraph() throws SecurityException,
NoSuchMethodException {
Method m = JRSTOption.class.getMethod("getOutType");
Option a = m.getAnnotation(Option.class);
JRSTInterface graph = new JRSTInterface(a.pattern());
// String[] result=gra... | static String[] function() throws SecurityException, NoSuchMethodException { Method m = JRSTOption.class.getMethod(STR); Option a = m.getAnnotation(Option.class); JRSTInterface graph = new JRSTInterface(a.pattern()); return graph.getCmd(); } | /**
* interface graphique
*
* @return
* @throws SecurityException
* @throws NoSuchMethodException
*/ | interface graphique | askOptionGraph | {
"repo_name": "vorburger/JRst",
"path": "jrst/src/main/java/org/nuiton/jrst/JRST.java",
"license": "lgpl-3.0",
"size": 21640
} | [
"java.lang.reflect.Method",
"uk.co.flamingpenguin.jewel.cli.Option"
] | import java.lang.reflect.Method; import uk.co.flamingpenguin.jewel.cli.Option; | import java.lang.reflect.*; import uk.co.flamingpenguin.jewel.cli.*; | [
"java.lang",
"uk.co.flamingpenguin"
] | java.lang; uk.co.flamingpenguin; | 379,864 |
private void checkCoverageROI(GridCoverage2D coverage) {
ROI roi = CoverageUtilities.getROIProperty(coverage);
assertNotNull(roi);
// Ensure has the same size of the input image
checkROI(coverage, roi);
// make sure the ROI is also present at the image level
Object im... | void function(GridCoverage2D coverage) { ROI roi = CoverageUtilities.getROIProperty(coverage); assertNotNull(roi); checkROI(coverage, roi); Object imageRoi = coverage.getRenderedImage().getProperty("ROI"); assertTrue(imageRoi instanceof ROI); checkROI(coverage, (ROI) imageRoi); } | /**
* Private method for checking if ROI size and image size are equals
*
* @param coverage Input {@link GridCoverage2D} to test
*/ | Private method for checking if ROI size and image size are equals | checkCoverageROI | {
"repo_name": "geotools/geotools",
"path": "modules/plugin/geotiff/src/test/java/org/geotools/gce/geotiff/GeoTiffReaderTest.java",
"license": "lgpl-2.1",
"size": 59961
} | [
"org.geotools.coverage.grid.GridCoverage2D",
"org.geotools.coverage.util.CoverageUtilities",
"org.junit.Assert"
] | import org.geotools.coverage.grid.GridCoverage2D; import org.geotools.coverage.util.CoverageUtilities; import org.junit.Assert; | import org.geotools.coverage.grid.*; import org.geotools.coverage.util.*; import org.junit.*; | [
"org.geotools.coverage",
"org.junit"
] | org.geotools.coverage; org.junit; | 541,973 |
BuildRule createBuildRule(
BuildRuleCreationContextWithTargetGraph context,
BuildTarget buildTarget,
BuildRuleParams params,
T args);
/**
* Whether or not the build rule subgraph produced by this {@code Description} is safe to cache in
* {@link com.facebook.buck.core.model.actiongraph... | BuildRule createBuildRule( BuildRuleCreationContextWithTargetGraph context, BuildTarget buildTarget, BuildRuleParams params, T args); /** * Whether or not the build rule subgraph produced by this {@code Description} is safe to cache in * {@link com.facebook.buck.core.model.actiongraph.computation.IncrementalActionGraph... | /**
* Create a {@link BuildRule} for the given {@link BuildRuleParams}. Note that the {@link
* BuildTarget} referred to in the {@code params} contains the {@link Flavor} to create.
*
* @param buildTarget
* @param args A constructor argument, of type as returned by {@link #getConstructorArgType()}.
* @... | Create a <code>BuildRule</code> for the given <code>BuildRuleParams</code>. Note that the <code>BuildTarget</code> referred to in the params contains the <code>Flavor</code> to create | createBuildRule | {
"repo_name": "LegNeato/buck",
"path": "src/com/facebook/buck/core/model/targetgraph/DescriptionWithTargetGraph.java",
"license": "apache-2.0",
"size": 2404
} | [
"com.facebook.buck.core.description.BuildRuleParams",
"com.facebook.buck.core.description.Description",
"com.facebook.buck.core.model.BuildTarget",
"com.facebook.buck.core.rules.BuildRule"
] | import com.facebook.buck.core.description.BuildRuleParams; import com.facebook.buck.core.description.Description; import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.rules.BuildRule; | import com.facebook.buck.core.description.*; import com.facebook.buck.core.model.*; import com.facebook.buck.core.rules.*; | [
"com.facebook.buck"
] | com.facebook.buck; | 1,770,184 |
@Test
public void testNotConnectedLoad_RepByName() throws Exception {
JobEntryJob jej = spy( new JobEntryJob( JOB_ENTRY_JOB_NAME ) );
jej.setSpecificationMethod( ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME );
jej.setJobName( JOB_ENTRY_FILE_NAME );
jej.setDirectory( JOB_ENTRY_FILE_DIRECTORY ... | void function() throws Exception { JobEntryJob jej = spy( new JobEntryJob( JOB_ENTRY_JOB_NAME ) ); jej.setSpecificationMethod( ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME ); jej.setJobName( JOB_ENTRY_FILE_NAME ); jej.setDirectory( JOB_ENTRY_FILE_DIRECTORY ); jej.loadXML( getNode( jej ), databases, servers, nul... | /**
* When disconnected from the repository and {@link JobEntryJob} references a child job by name,
* this reference will be invalid to run such job.
* Default to {@link ObjectLocationSpecificationMethod}.{@code FILENAME} with a {@code null} file path.
*/ | When disconnected from the repository and <code>JobEntryJob</code> references a child job by name, this reference will be invalid to run such job. Default to <code>ObjectLocationSpecificationMethod</code>.FILENAME with a null file path | testNotConnectedLoad_RepByName | {
"repo_name": "emartin-pentaho/pentaho-kettle",
"path": "engine/src/test/java/org/pentaho/di/job/entries/job/JobEntryJobTest.java",
"license": "apache-2.0",
"size": 27102
} | [
"org.junit.Assert",
"org.mockito.Mockito",
"org.pentaho.di.core.ObjectLocationSpecificationMethod",
"org.pentaho.di.job.JobMeta",
"org.powermock.api.mockito.PowerMockito"
] | import org.junit.Assert; import org.mockito.Mockito; import org.pentaho.di.core.ObjectLocationSpecificationMethod; import org.pentaho.di.job.JobMeta; import org.powermock.api.mockito.PowerMockito; | import org.junit.*; import org.mockito.*; import org.pentaho.di.core.*; import org.pentaho.di.job.*; import org.powermock.api.mockito.*; | [
"org.junit",
"org.mockito",
"org.pentaho.di",
"org.powermock.api"
] | org.junit; org.mockito; org.pentaho.di; org.powermock.api; | 2,463,504 |
public static void logCurrent(String msg) {
EGLDisplay display;
EGLContext context;
EGLSurface surface;
display = EGL14.eglGetCurrentDisplay();
context = EGL14.eglGetCurrentContext();
surface = EGL14.eglGetCurrentSurface(EGL14.EGL_DRAW);
Log.i(TAG, "Current E... | static void function(String msg) { EGLDisplay display; EGLContext context; EGLSurface surface; display = EGL14.eglGetCurrentDisplay(); context = EGL14.eglGetCurrentContext(); surface = EGL14.eglGetCurrentSurface(EGL14.EGL_DRAW); Log.i(TAG, STR + msg + STR + display + STR + context + STR + surface); } | /**
* Writes the current display, context, and surface to the log.
*/ | Writes the current display, context, and surface to the log | logCurrent | {
"repo_name": "Piasy/AndroidPlayground",
"path": "try/MediaCodecDemo/app/src/main/java/com/github/piasy/mediacodecdemo/gles/EglCore.java",
"license": "mit",
"size": 13282
} | [
"android.opengl.EGLContext",
"android.opengl.EGLDisplay",
"android.opengl.EGLSurface",
"android.util.Log"
] | import android.opengl.EGLContext; import android.opengl.EGLDisplay; import android.opengl.EGLSurface; import android.util.Log; | import android.opengl.*; import android.util.*; | [
"android.opengl",
"android.util"
] | android.opengl; android.util; | 371,797 |
public Player getEntity() throws IllegalStateException;
| Player function() throws IllegalStateException; | /**
* Gets the {@link org.bukkit.entity.Player} who is to be teleported.
* @return The {@code Player} who is to be teleported after the delay.
* @exception java.lang.IllegalStateException Thrown if the teleportation is cancelled when this method is called.
*/ | Gets the <code>org.bukkit.entity.Player</code> who is to be teleported | getEntity | {
"repo_name": "glen3b/BukkitLib",
"path": "src/main/java/me/pagekite/glen3b/library/bukkit/teleport/QueuedTeleport.java",
"license": "gpl-3.0",
"size": 2341
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 2,712,608 |
private boolean checkAllPiles(
Card card, CardView cardView, CardPile activePile,
CardPileView activePileView) {
// check the standard piles
if (checkPiles(card, cardView, activePile,
activePileView, gameArea.getStandardPileViews()))
return true;
// check the foundation piles
... | boolean function( Card card, CardView cardView, CardPile activePile, CardPileView activePileView) { if (checkPiles(card, cardView, activePile, activePileView, gameArea.getStandardPileViews())) return true; return checkPiles(card, cardView, activePile, activePileView, gameArea.getFoundationPileViews()); } | /**
* Check if the actual card is intersecting with any of the piles.
*
* @param card The card to check.
* @param cardView The view of the card.
* @param activePile The pile the card is currently in.
* @param activePileView The view for the pile.
* @return true if intersects wit... | Check if the actual card is intersecting with any of the piles | checkAllPiles | {
"repo_name": "ZoltanDalmadi/JCardGamesFX",
"path": "src/main/java/hu/unideb/inf/JCardGamesFX/klondike/KlondikeMouseUtil.java",
"license": "mit",
"size": 16531
} | [
"hu.unideb.inf.JCardGamesFX"
] | import hu.unideb.inf.JCardGamesFX; | import hu.unideb.inf.*; | [
"hu.unideb.inf"
] | hu.unideb.inf; | 742,060 |
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setViewportView(getTxtLicense());
jScrollPane.setName("jScrollPane");
jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
}
return jScrollPane;... | JScrollPane function() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getTxtLicense()); jScrollPane.setName(STR); jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); } return jScrollPane; } | /**
* This method initializes jScrollPane
*
* @return javax.swing.JScrollPane
*/ | This method initializes jScrollPane | getJScrollPane | {
"repo_name": "JordanGS/zaproxy",
"path": "src/org/zaproxy/zap/view/LicenseFrame.java",
"license": "apache-2.0",
"size": 7552
} | [
"javax.swing.JScrollPane",
"javax.swing.ScrollPaneConstants"
] | import javax.swing.JScrollPane; import javax.swing.ScrollPaneConstants; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,370,474 |
protected void addDefaultCommands(Bootstrap<T> bootstrap) {
bootstrap.addCommand(new ServerCommand<>(this));
bootstrap.addCommand(new CheckCommand<>(this));
} | void function(Bootstrap<T> bootstrap) { bootstrap.addCommand(new ServerCommand<>(this)); bootstrap.addCommand(new CheckCommand<>(this)); } | /**
* Called by {@link #run(String...)} to add the standard "server" and "check" commands
*
* @param bootstrap the bootstrap instance
*/ | Called by <code>#run(String...)</code> to add the standard "server" and "check" commands | addDefaultCommands | {
"repo_name": "dotCipher/dropwizard",
"path": "dropwizard-core/src/main/java/io/dropwizard/Application.java",
"license": "apache-2.0",
"size": 3827
} | [
"io.dropwizard.cli.CheckCommand",
"io.dropwizard.cli.ServerCommand",
"io.dropwizard.setup.Bootstrap"
] | import io.dropwizard.cli.CheckCommand; import io.dropwizard.cli.ServerCommand; import io.dropwizard.setup.Bootstrap; | import io.dropwizard.cli.*; import io.dropwizard.setup.*; | [
"io.dropwizard.cli",
"io.dropwizard.setup"
] | io.dropwizard.cli; io.dropwizard.setup; | 1,281,573 |
private FlinkAsciiGraphLoader getNewLoader() {
return new FlinkAsciiGraphLoader(getConfig());
}
//----------------------------------------------------------------------------
// Test helper
//---------------------------------------------------------------------------- | FlinkAsciiGraphLoader function() { return new FlinkAsciiGraphLoader(getConfig()); } | /**
* Returns an uninitialized loader with the test config.
*
* @return uninitialized Flink Ascii graph loader
*/ | Returns an uninitialized loader with the test config | getNewLoader | {
"repo_name": "niklasteichmann/gradoop",
"path": "gradoop-flink/src/test/java/org/gradoop/flink/model/GradoopFlinkTestBase.java",
"license": "apache-2.0",
"size": 8622
} | [
"org.gradoop.flink.util.FlinkAsciiGraphLoader"
] | import org.gradoop.flink.util.FlinkAsciiGraphLoader; | import org.gradoop.flink.util.*; | [
"org.gradoop.flink"
] | org.gradoop.flink; | 343,789 |
@Test
public void getRealm_onlyUniqueId() {
assertNull("An incomplete accessId will return null",
AccessIdUtil.getRealm("uniqueId"));
} | void function() { assertNull(STR, AccessIdUtil.getRealm(STR)); } | /**
* Test method for {@link com.ibm.ws.security.AccessIdUtil#getRealm(java.lang.String)}.
*/ | Test method for <code>com.ibm.ws.security.AccessIdUtil#getRealm(java.lang.String)</code> | getRealm_onlyUniqueId | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security/test/com/ibm/ws/security/AccessIdUtilTest.java",
"license": "epl-1.0",
"size": 26900
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,318,963 |
public Collection<String> getInformationURLs() {
if (this.uiInfo != null) {
return getStringValues(this.uiInfo.getInformationURLs());
}
return new ArrayList<>();
} | Collection<String> function() { if (this.uiInfo != null) { return getStringValues(this.uiInfo.getInformationURLs()); } return new ArrayList<>(); } | /**
* Gets information uR ls.
*
* @return the information uR ls
*/ | Gets information uR ls | getInformationURLs | {
"repo_name": "yisiqi/cas",
"path": "cas-server-support-saml-mdui/src/main/java/org/apereo/cas/support/saml/web/flow/mdui/SimpleMetadataUIInfo.java",
"license": "apache-2.0",
"size": 5459
} | [
"java.util.ArrayList",
"java.util.Collection"
] | import java.util.ArrayList; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,116,715 |
public final void layout(Scale scale, Rectangle bounds) {
Insets insets = scale.scale(mInsets);
bounds.x += insets.left;
bounds.y += insets.top;
bounds.width -= insets.left + insets.right;
bounds.height -= insets.top + insets.bottom;
layoutSelf(scale, bounds);
} | final void function(Scale scale, Rectangle bounds) { Insets insets = scale.scale(mInsets); bounds.x += insets.left; bounds.y += insets.top; bounds.width -= insets.left + insets.right; bounds.height -= insets.top + insets.bottom; layoutSelf(scale, bounds); } | /**
* Layout the cell and its children.
*
* @param scale The {@link Scale} to use.
* @param bounds The bounds to use for the cell.
*/ | Layout the cell and its children | layout | {
"repo_name": "richardwilkes/gcs",
"path": "com.trollworks.gcs/src/com/trollworks/gcs/ui/layout/FlexCell.java",
"license": "mpl-2.0",
"size": 3809
} | [
"com.trollworks.gcs.ui.scale.Scale",
"java.awt.Insets",
"java.awt.Rectangle"
] | import com.trollworks.gcs.ui.scale.Scale; import java.awt.Insets; import java.awt.Rectangle; | import com.trollworks.gcs.ui.scale.*; import java.awt.*; | [
"com.trollworks.gcs",
"java.awt"
] | com.trollworks.gcs; java.awt; | 243,429 |
static HiveAuthzSessionContext applyTestSettings(HiveAuthzSessionContext ctx, HiveConf conf) {
if (conf.getBoolVar(ConfVars.HIVE_TEST_AUTHORIZATION_SQLSTD_HS2_MODE)
&& ctx.getClientType() == CLIENT_TYPE.HIVECLI) {
// create new session ctx object with HS2 as client type
HiveAuthzSessionContext... | static HiveAuthzSessionContext applyTestSettings(HiveAuthzSessionContext ctx, HiveConf conf) { if (conf.getBoolVar(ConfVars.HIVE_TEST_AUTHORIZATION_SQLSTD_HS2_MODE) && ctx.getClientType() == CLIENT_TYPE.HIVECLI) { HiveAuthzSessionContext.Builder ctxBuilder = new HiveAuthzSessionContext.Builder(ctx); ctxBuilder.setClien... | /**
* Change the session context based on configuration to aid in testing of sql
* std auth
*
* @param ctx
* @param conf
* @return
*/ | Change the session context based on configuration to aid in testing of sql std auth | applyTestSettings | {
"repo_name": "vineetgarg02/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLAuthorizationUtils.java",
"license": "apache-2.0",
"size": 21789
} | [
"org.apache.hadoop.hive.conf.HiveConf",
"org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzSessionContext"
] | import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzSessionContext; | import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.ql.security.authorization.plugin.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 662,860 |
protected byte[] pbkdf2(char[] password, byte[] salt, int iterations, int bytes) {
PBEKeySpec spec = new PBEKeySpec(password, salt, iterations, bytes * 8);
try {
return SecretKeyFactory.getInstance(PBKDF2_ALGORITHM).generateSecret(spec).getEncoded();
}
catch (InvalidKeySpecException e) {
throw new Runt... | byte[] function(char[] password, byte[] salt, int iterations, int bytes) { PBEKeySpec spec = new PBEKeySpec(password, salt, iterations, bytes * 8); try { return SecretKeyFactory.getInstance(PBKDF2_ALGORITHM).generateSecret(spec).getEncoded(); } catch (InvalidKeySpecException e) { throw new RuntimeException(e); } catch ... | /**
* Computes the PBKDF2 hash of a password.
*
* @param password the password to hash.
* @param salt the salt
* @param iterations the iteration count (slowness factor)
* @param bytes the length of the hash to compute in bytes
* @return the PBDKF2 hash of the password... | Computes the PBKDF2 hash of a password | pbkdf2 | {
"repo_name": "arunabhdas/pizzashop",
"path": "target/work/plugins/spring-security-core-2.0-RC4/src/java/grails/plugin/springsecurity/authentication/encoding/PBKDF2PasswordEncoder.java",
"license": "mit",
"size": 4975
} | [
"java.security.NoSuchAlgorithmException",
"java.security.spec.InvalidKeySpecException",
"javax.crypto.SecretKeyFactory",
"javax.crypto.spec.PBEKeySpec"
] | import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec; | import java.security.*; import java.security.spec.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 229,469 |
public synchronized void initializeModules() {
// sort by subsystems and dependency
PackageSorter.sort(this.modules);
for (int i = 0; i < this.modules.size(); i++) {
final PackageState mod = (PackageState) this.modules.get(i);
if (mod.configure(this.booter)) {
... | synchronized void function() { PackageSorter.sort(this.modules); for (int i = 0; i < this.modules.size(); i++) { final PackageState mod = (PackageState) this.modules.get(i); if (mod.configure(this.booter)) { Log.debug(new Log.SimpleMessage(STR, new PadMessage(mod.getModule().getModuleClass(), 70), STR, mod.getModule().... | /**
* Initializes all previously uninitialized modules. Once a module is initialized,
* it is not re-initialized a second time.
*/ | Initializes all previously uninitialized modules. Once a module is initialized, it is not re-initialized a second time | initializeModules | {
"repo_name": "jfree/jcommon",
"path": "src/main/java/org/jfree/base/modules/PackageManager.java",
"license": "lgpl-2.1",
"size": 23762
} | [
"org.jfree.base.log.PadMessage",
"org.jfree.util.Log"
] | import org.jfree.base.log.PadMessage; import org.jfree.util.Log; | import org.jfree.base.log.*; import org.jfree.util.*; | [
"org.jfree.base",
"org.jfree.util"
] | org.jfree.base; org.jfree.util; | 1,298,779 |
public void deleteCustomer(Customer customer) {
customerDao.deleteCustomer(customer);
} | void function(Customer customer) { customerDao.deleteCustomer(customer); } | /**
* Deletes an existing customer
*
* @param customer
*/ | Deletes an existing customer | deleteCustomer | {
"repo_name": "butfriendly/friendly-dam",
"path": "src/main/java/de/soulworks/dam/webservice/service/CustomerService.java",
"license": "isc",
"size": 3606
} | [
"de.soulworks.dam.domain.Customer"
] | import de.soulworks.dam.domain.Customer; | import de.soulworks.dam.domain.*; | [
"de.soulworks.dam"
] | de.soulworks.dam; | 2,604,226 |
public boolean owns(Element element) {
return (m_widget != null) && m_widget.owns(element);
}
| boolean function(Element element) { return (m_widget != null) && m_widget.owns(element); } | /**
* Checks if the attribute value view's widget "owns" the given element.<p>
*
* @param element the element to check
* @return true if the widget owns the element
*/ | Checks if the attribute value view's widget "owns" the given element | owns | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-gwt/org/opencms/acacia/client/ui/CmsAttributeValueView.java",
"license": "lgpl-2.1",
"size": 37316
} | [
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,723,214 |
public static void runMainLooperUntil(Supplier<Boolean> condition) throws TimeoutException {
runMainLooperUntil(condition, DEFAULT_TIMEOUT_MS, Clock.DEFAULT);
} | static void function(Supplier<Boolean> condition) throws TimeoutException { runMainLooperUntil(condition, DEFAULT_TIMEOUT_MS, Clock.DEFAULT); } | /**
* Runs tasks of the main Robolectric {@link Looper} until the {@code condition} returns {@code
* true}.
*
* <p>Must be called on the main test thread.
*
* @param condition The condition.
* @throws TimeoutException If the {@link #DEFAULT_TIMEOUT_MS} is exceeded.
*/ | Runs tasks of the main Robolectric <code>Looper</code> until the condition returns true. Must be called on the main test thread | runMainLooperUntil | {
"repo_name": "stari4ek/ExoPlayer",
"path": "testutils/src/main/java/com/google/android/exoplayer2/testutil/TestUtil.java",
"license": "apache-2.0",
"size": 23150
} | [
"com.google.android.exoplayer2.util.Clock",
"com.google.android.exoplayer2.util.Supplier",
"java.util.concurrent.TimeoutException"
] | import com.google.android.exoplayer2.util.Clock; import com.google.android.exoplayer2.util.Supplier; import java.util.concurrent.TimeoutException; | import com.google.android.exoplayer2.util.*; import java.util.concurrent.*; | [
"com.google.android",
"java.util"
] | com.google.android; java.util; | 1,629,649 |
public DeviceId getDeviceId(int sid) {
for (Map.Entry<DeviceId, SegmentRouterInfo> entry:
deviceConfigMap.entrySet()) {
if (entry.getValue().ipv4NodeSid == sid ||
entry.getValue().ipv6NodeSid == sid) {
return entry.getValue().deviceId;
... | DeviceId function(int sid) { for (Map.Entry<DeviceId, SegmentRouterInfo> entry: deviceConfigMap.entrySet()) { if (entry.getValue().ipv4NodeSid == sid entry.getValue().ipv6NodeSid == sid) { return entry.getValue().deviceId; } } return null; } | /**
* Returns the device identifier or data plane identifier (dpid)
* of a segment router given its segment id.
*
* @param sid segment id
* @return deviceId device identifier
*/ | Returns the device identifier or data plane identifier (dpid) of a segment router given its segment id | getDeviceId | {
"repo_name": "sdnwiselab/onos",
"path": "apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java",
"license": "apache-2.0",
"size": 24240
} | [
"java.util.Map",
"org.onosproject.net.DeviceId"
] | import java.util.Map; import org.onosproject.net.DeviceId; | import java.util.*; import org.onosproject.net.*; | [
"java.util",
"org.onosproject.net"
] | java.util; org.onosproject.net; | 1,207,729 |
public void setMessage(int number, String variant, Locale locale)
{
setMessage(number, variant, locale, null);
} | void function(int number, String variant, Locale locale) { setMessage(number, variant, locale, null); } | /**
* Sets the message property to a localized string based on error number, variant
* and target locale.
*
* @param number The error number for this exception instance.
* @param variant The variant of the error message for this instance.
* @param locale The target locale for error message... | Sets the message property to a localized string based on error number, variant and target locale | setMessage | {
"repo_name": "designreuse/flex-blazeds",
"path": "modules/common/src/flex/messaging/LocalizedException.java",
"license": "apache-2.0",
"size": 12461
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 548,346 |
public RealmResults<Upload> getManualUploadList(){
try {
RealmResults<Upload> uploads = getDBEntry().getManualUploads();
Log.d(TAG, "retrived manual uploads for user " + this.username +", count : " + uploads.size());
return uploads;
}catch(NullPointerException e){... | RealmResults<Upload> function(){ try { RealmResults<Upload> uploads = getDBEntry().getManualUploads(); Log.d(TAG, STR + this.username +STR + uploads.size()); return uploads; }catch(NullPointerException e){ Log.d(TAG, STR + this.username +STR); return null; } } | /**
* Get all the uploads for a user
* This methods returns the whole upload list
* @return All the uploads for a user
*/ | Get all the uploads for a user This methods returns the whole upload list | getManualUploadList | {
"repo_name": "phpnetfrance/drivinCloudOpen",
"path": "app/src/main/java/org/phpnet/openDrivinCloudAndroid/Common/CurrentUser.java",
"license": "apache-2.0",
"size": 9893
} | [
"android.util.Log",
"io.realm.RealmResults",
"org.phpnet.openDrivinCloudAndroid.Model"
] | import android.util.Log; import io.realm.RealmResults; import org.phpnet.openDrivinCloudAndroid.Model; | import android.util.*; import io.realm.*; import org.phpnet.*; | [
"android.util",
"io.realm",
"org.phpnet"
] | android.util; io.realm; org.phpnet; | 903,351 |
public ProtectableContainerResourceInner withProperties(ProtectableContainer properties) {
this.properties = properties;
return this;
} | ProtectableContainerResourceInner function(ProtectableContainer properties) { this.properties = properties; return this; } | /**
* Set the properties property: ProtectableContainerResource properties.
*
* @param properties the properties value to set.
* @return the ProtectableContainerResourceInner object itself.
*/ | Set the properties property: ProtectableContainerResource properties | withProperties | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/ProtectableContainerResourceInner.java",
"license": "mit",
"size": 2728
} | [
"com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainer"
] | import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainer; | import com.azure.resourcemanager.recoveryservicesbackup.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 374,530 |
public static double[][] createParticipantDamageLinePlotData(EventCollection ec, EventCollectionOptimizedAccess p, double updateInterval, int unitType) {
int k;
// f.getEndTime() - f.getStartTime() is different than f.getDuration() because
// merged fights have a duration that is the sum of ... | static double[][] function(EventCollection ec, EventCollectionOptimizedAccess p, double updateInterval, int unitType) { int k; double duration = ec.getEndTime() - ec.getStartTime(); int numVals = (int)Math.round(duration/updateInterval); if (numVals < 2) { numVals = 2; if (duration == 0) { duration = 0.1; } } List<Doub... | /**
* Create damage plot data for a participant that is present in for example a fight.
* @param ec All events from a fight.
* @param p The participant to make the plot for.
* @param updateInterval The update interval for the plot.
* @param unitType The unit type to include
* @return A cha... | Create damage plot data for a participant that is present in for example a fight | createParticipantDamageLinePlotData | {
"repo_name": "setjmp2013/WowLogParser",
"path": "src/wowlogparserbase/WlpPlotFactory.java",
"license": "gpl-2.0",
"size": 35835
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 301,670 |
private TreeMap<byte[], StoreFile> processResults() throws IOException {
TreeMap<byte[], StoreFile> newStripes = null;
for (StoreFile sf : this.results) {
byte[] startRow = startOf(sf), endRow = endOf(sf);
if (isInvalid(endRow) || isInvalid(startRow)) {
if (!isFlush) {
... | TreeMap<byte[], StoreFile> function() throws IOException { TreeMap<byte[], StoreFile> newStripes = null; for (StoreFile sf : this.results) { byte[] startRow = startOf(sf), endRow = endOf(sf); if (isInvalid(endRow) isInvalid(startRow)) { if (!isFlush) { LOG.warn(STR + sf.getPath()); } insertFileIntoStripe(getLevel0Copy(... | /**
* Process new files, and add them either to the structure of existing stripes,
* or to the list of new candidate stripes.
* @return New candidate stripes.
*/ | Process new files, and add them either to the structure of existing stripes, or to the list of new candidate stripes | processResults | {
"repo_name": "mapr/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java",
"license": "apache-2.0",
"size": 39127
} | [
"java.io.IOException",
"java.util.TreeMap",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import java.util.TreeMap; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,191,793 |
@Override
public void handleHttpResponse(HttpResponse httpResponse) {
try {
Gdx.app.debug(TAG , httpResponse.toString());
Gdx.app.debug(TAG , String.valueOf(httpResponse.getStatus().getStatusCode()));
if (httpResponse.getStatus().getStatusCode() == 200) {
deleteFile();
Gdx.app.debug(TAG, "Stacktr... | void function(HttpResponse httpResponse) { try { Gdx.app.debug(TAG , httpResponse.toString()); Gdx.app.debug(TAG , String.valueOf(httpResponse.getStatus().getStatusCode())); if (httpResponse.getStatus().getStatusCode() == 200) { deleteFile(); Gdx.app.debug(TAG, STR); } forwardException(); } catch (Exception e) { Gdx.ap... | /**
* Handles a successful httpresponse.
* Deletes the file of the successfully sent
* stack trace and resets the exception handler
* to the given uncaught exception handler.
*/ | Handles a successful httpresponse. Deletes the file of the successfully sent stack trace and resets the exception handler to the given uncaught exception handler | handleHttpResponse | {
"repo_name": "SimonPae/libgdx-stacktrace",
"path": "src/de/paeusch/stacktrace/GdxStackTraceSender.java",
"license": "mit",
"size": 7382
} | [
"com.badlogic.gdx.Gdx",
"com.badlogic.gdx.Net"
] | import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Net; | import com.badlogic.gdx.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 2,637,874 |
@SuppressWarnings("unchecked")
public static <K, T extends Persistent> DataStore<K, T> getDataStore(
Class<K> keyClass, Class<T> persistent, Configuration conf) throws GoraException {
Properties createProps = createProps();
Class<? extends DataStore<K, T>> c;
try {
c = (Class<? extends DataS... | @SuppressWarnings(STR) static <K, T extends Persistent> DataStore<K, T> function( Class<K> keyClass, Class<T> persistent, Configuration conf) throws GoraException { Properties createProps = createProps(); Class<? extends DataStore<K, T>> c; try { c = (Class<? extends DataStore<K, T>>) Class.forName(getDefaultDataStore(... | /**
* Instantiate <i>the default</i> {@link DataStore}. Uses default properties. Uses 'null' schema.
*
* Note:
* consider that default dataStore is always visible
*
* @param keyClass The key class.
* @param persistent The value class.
* @param conf {@link Configuration} to be used be the sto... | Instantiate the default <code>DataStore</code>. Uses default properties. Uses 'null' schema. Note: consider that default dataStore is always visible | getDataStore | {
"repo_name": "renato2099/gora",
"path": "gora-core/src/main/java/org/apache/gora/store/DataStoreFactory.java",
"license": "apache-2.0",
"size": 17090
} | [
"java.util.Properties",
"org.apache.gora.persistency.Persistent",
"org.apache.gora.util.GoraException",
"org.apache.hadoop.conf.Configuration"
] | import java.util.Properties; import org.apache.gora.persistency.Persistent; import org.apache.gora.util.GoraException; import org.apache.hadoop.conf.Configuration; | import java.util.*; import org.apache.gora.persistency.*; import org.apache.gora.util.*; import org.apache.hadoop.conf.*; | [
"java.util",
"org.apache.gora",
"org.apache.hadoop"
] | java.util; org.apache.gora; org.apache.hadoop; | 881,636 |
public java.util.List<fr.lip6.move.pnml.pthlpng.booleans.hlapi.BooleanConstantHLAPI> getSubterm_booleans_BooleanConstantHLAPI() {
java.util.List<fr.lip6.move.pnml.pthlpng.booleans.hlapi.BooleanConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.booleans.hlapi.BooleanConstantHLAPI>();
for (Term elemnt... | java.util.List<fr.lip6.move.pnml.pthlpng.booleans.hlapi.BooleanConstantHLAPI> function() { java.util.List<fr.lip6.move.pnml.pthlpng.booleans.hlapi.BooleanConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.booleans.hlapi.BooleanConstantHLAPI>(); for (Term elemnt : getSubterm()) { if (elemnt.getClass().equal... | /**
* This accessor return a list of encapsulated subelement, only of
* BooleanConstantHLAPI kind. WARNING : this method can creates a lot of new
* object in memory.
*/ | This accessor return a list of encapsulated subelement, only of BooleanConstantHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_booleans_BooleanConstantHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/integers/hlapi/ModuloHLAPI.java",
"license": "epl-1.0",
"size": 69704
} | [
"fr.lip6.move.pnml.pthlpng.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.pthlpng.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.pthlpng.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 78,686 |
private static void addCompilationBeanInfo(HashMap<String, MBeanInfo> result) {
// Attributes
MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[3];
attributes[0] = new MBeanAttributeInfo("Name", String.class.getName(),
"Name", true, false, false);
attributes[1]... | static void function(HashMap<String, MBeanInfo> result) { MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[3]; attributes[0] = new MBeanAttributeInfo("Name", String.class.getName(), "Name", true, false, false); attributes[1] = new MBeanAttributeInfo(STR, Long.TYPE.getName(), STR, true, false, false); attributes... | /**
* Creates the metadata for the
* {@link java.lang.management.CompilationMXBean}. For this type of
* platform bean the metadata covers :
* <ul>
* <li>3 attributes
* <li>0 constructors
* <li>0 operations
* <li>0 notifications
* </ul>
*
* @param result
*/ | Creates the metadata for the <code>java.lang.management.CompilationMXBean</code>. For this type of platform bean the metadata covers : 3 attributes 0 constructors 0 operations 0 notifications | addCompilationBeanInfo | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/java/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ManagementUtils.java",
"license": "apache-2.0",
"size": 64134
} | [
"java.lang.management.CompilationMXBean",
"java.util.HashMap",
"javax.management.MBeanAttributeInfo",
"javax.management.MBeanInfo"
] | import java.lang.management.CompilationMXBean; import java.util.HashMap; import javax.management.MBeanAttributeInfo; import javax.management.MBeanInfo; | import java.lang.management.*; import java.util.*; import javax.management.*; | [
"java.lang",
"java.util",
"javax.management"
] | java.lang; java.util; javax.management; | 659,991 |
@FIXVersion(introduced="4.3")
@TagNumRef(tagNum=TagNum.OrderRestrictions)
public void setOrderRestrictions(String orderRestrictions) {
this.orderRestrictions = orderRestrictions;
} | @FIXVersion(introduced="4.3") @TagNumRef(tagNum=TagNum.OrderRestrictions) void function(String orderRestrictions) { this.orderRestrictions = orderRestrictions; } | /**
* Message field setter.
* @param orderRestrictions field value
*/ | Message field setter | setOrderRestrictions | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/OrderModificationRequestMsg.java",
"license": "gpl-3.0",
"size": 149491
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,390,268 |
public void writeToFile(String filePath, byte[] fileData)
throws IOException {
writeToFile(filePath, fileData, false);
} | void function(String filePath, byte[] fileData) throws IOException { writeToFile(filePath, fileData, false); } | /**
* Write the contents of the given file data to the file at the given path.
* This will replace any existing data.
*
* @param filePath The path to the file to write to
* @param fileData The data to write to the given file
*
* @throws IOException if an error occurs writing the dat... | Write the contents of the given file data to the file at the given path. This will replace any existing data | writeToFile | {
"repo_name": "teatrove/teatrove",
"path": "teaapps/src/main/java/org/teatrove/teaapps/contexts/FileSystemContext.java",
"license": "apache-2.0",
"size": 13886
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,425,824 |
public static LinkedHashMap<String, ProteinSequence> readGenbankProteinSequence(
File file) throws Exception {
FileInputStream inStream = new FileInputStream(file);
LinkedHashMap<String, ProteinSequence> proteinSequences = readGenbankProteinSequence(inStream);
inStream.close();
... | static LinkedHashMap<String, ProteinSequence> function( File file) throws Exception { FileInputStream inStream = new FileInputStream(file); LinkedHashMap<String, ProteinSequence> proteinSequences = readGenbankProteinSequence(inStream); inStream.close(); return proteinSequences; } | /**
* Read a Genbank file containing amino acids with setup that would handle most
* cases.
*
* @param file
* @return
* @throws Exception
*/ | Read a Genbank file containing amino acids with setup that would handle most cases | readGenbankProteinSequence | {
"repo_name": "kumar-physics/BioJava",
"path": "biojava3-core/src/main/java/org/biojava3/core/sequence/io/GenbankReaderHelper.java",
"license": "lgpl-2.1",
"size": 6726
} | [
"java.io.File",
"java.io.FileInputStream",
"java.util.LinkedHashMap",
"org.biojava3.core.sequence.ProteinSequence"
] | import java.io.File; import java.io.FileInputStream; import java.util.LinkedHashMap; import org.biojava3.core.sequence.ProteinSequence; | import java.io.*; import java.util.*; import org.biojava3.core.sequence.*; | [
"java.io",
"java.util",
"org.biojava3.core"
] | java.io; java.util; org.biojava3.core; | 2,359,007 |
public void setBalanceType(BalanceType balanceType); | void function(BalanceType balanceType); | /**
* Sets the balanceType attribute value.
*
* @param balanceType The balanceType to set.
*/ | Sets the balanceType attribute value | setBalanceType | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/main/java/org/kuali/kfs/integration/ld/LaborLedgerBalance.java",
"license": "agpl-3.0",
"size": 16145
} | [
"org.kuali.kfs.coa.businessobject.BalanceType"
] | import org.kuali.kfs.coa.businessobject.BalanceType; | import org.kuali.kfs.coa.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,417,095 |
public void zoomToBounds(ClusterPoint clusterPoint) {
AMap map = mapRef.get();
if (map != null && clusterPoint != null) {
innerCallbackListener.clusteringOnCameraChangeListener.setDirty(System.currentTimeMillis());
CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngBounds(clusterPoint.getBoundsOfInpu... | void function(ClusterPoint clusterPoint) { AMap map = mapRef.get(); if (map != null && clusterPoint != null) { innerCallbackListener.clusteringOnCameraChangeListener.setDirty(System.currentTimeMillis()); CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngBounds(clusterPoint.getBoundsOfInputPoints(), options.getZo... | /**
* Animate the camera so all of the InputPoint objects represented by the
* passed ClusterPoint are in view
*
* @param clusterPoint
*/ | Animate the camera so all of the InputPoint objects represented by the passed ClusterPoint are in view | zoomToBounds | {
"repo_name": "mikezit/cluster-amap",
"path": "library/src/com/twotoasters/clusterkraf/Clusterkraf.java",
"license": "apache-2.0",
"size": 18539
} | [
"com.amap.api.maps.AMap",
"com.amap.api.maps.CameraUpdate",
"com.amap.api.maps.CameraUpdateFactory"
] | import com.amap.api.maps.AMap; import com.amap.api.maps.CameraUpdate; import com.amap.api.maps.CameraUpdateFactory; | import com.amap.api.maps.*; | [
"com.amap.api"
] | com.amap.api; | 112,305 |
public Enumeration listOptions() {
Vector newVector = new Vector(3);
newVector.addElement(new Option(
"\tSets the attribute index (default last).",
"C", 1, "-C <col>"));
newVector.addElement(new Option(
"\tSets the first value's index (default first).",
... | Enumeration function() { Vector newVector = new Vector(3); newVector.addElement(new Option( STR, "C", 1, STR)); newVector.addElement(new Option( STR, "F", 1, STR)); newVector.addElement(new Option( STR, "S", 1, STR)); return newVector.elements(); } | /**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/ | Returns an enumeration describing the available options | listOptions | {
"repo_name": "williamClanton/jbossBA",
"path": "weka/src/main/java/weka/filters/unsupervised/attribute/SwapValues.java",
"license": "gpl-2.0",
"size": 11938
} | [
"java.util.Enumeration",
"java.util.Vector"
] | import java.util.Enumeration; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,244,334 |
protected void createChooseCheckBox() {
final int INDEX_BOOKMARKS = 0;
final int INDEX_HISTORY = 1;
final int INDEX_TABS = 2;
final int INDEX_PASSWORDS = 3;
final int INDEX_READING_LIST = 4; // Only valid if reading list is enabled.
final int NUMBER_OF_ENGINES;
if (AppConstants.MOZ_ANDROID... | void function() { final int INDEX_BOOKMARKS = 0; final int INDEX_HISTORY = 1; final int INDEX_TABS = 2; final int INDEX_PASSWORDS = 3; final int INDEX_READING_LIST = 4; final int NUMBER_OF_ENGINES; if (AppConstants.MOZ_ANDROID_READING_LIST_SERVICE) { NUMBER_OF_ENGINES = 5; } else { NUMBER_OF_ENGINES = 4; } final String... | /**
* The "Choose what to sync" checkbox pops up a multi-choice dialog when it is
* unchecked. It toggles to unchecked from checked.
*/ | The "Choose what to sync" checkbox pops up a multi-choice dialog when it is unchecked. It toggles to unchecked from checked | createChooseCheckBox | {
"repo_name": "mkodekar/Fennece-Browser",
"path": "base/fxa/activities/FxAccountCreateAccountActivity.java",
"license": "mpl-2.0",
"size": 21219
} | [
"org.mozilla.gecko.AppConstants"
] | import org.mozilla.gecko.AppConstants; | import org.mozilla.gecko.*; | [
"org.mozilla.gecko"
] | org.mozilla.gecko; | 878,975 |
@Operation(desc = "Add address settings for addresses matching the addressMatch", impact = MBeanOperationInfo.ACTION)
void addAddressSettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch,
@Parameter(desc = "the dead letter address setting", name = "DL... | @Operation(desc = STR, impact = MBeanOperationInfo.ACTION) void addAddressSettings(@Parameter(desc = STR, name = STR) String addressMatch, @Parameter(desc = STR, name = "DLA") String DLA, @Parameter(desc = STR, name = STR) String expiryAddress, @Parameter(desc = STR, name = STR) long expiryDelay, @Parameter(desc = STR,... | /**
* adds a new address setting for a specific address
*/ | adds a new address setting for a specific address | addAddressSettings | {
"repo_name": "ryanemerson/activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java",
"license": "apache-2.0",
"size": 27268
} | [
"javax.management.MBeanOperationInfo"
] | import javax.management.MBeanOperationInfo; | import javax.management.*; | [
"javax.management"
] | javax.management; | 348,181 |
@Override public void start(GridKernalContext ctx, GridSpinBusyLock busyLock) throws IgniteCheckedException {
super.start(ctx, busyLock); | @Override void function(GridKernalContext ctx, GridSpinBusyLock busyLock) throws IgniteCheckedException { super.start(ctx, busyLock); | /**
* Setups mock objects into this indexing, just after super initialization is done.
*/ | Setups mock objects into this indexing, just after super initialization is done | start | {
"repo_name": "SomeFire/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/KillQueryTest.java",
"license": "apache-2.0",
"size": 56085
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.GridKernalContext",
"org.apache.ignite.internal.util.GridSpinBusyLock"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.util.GridSpinBusyLock; | import org.apache.ignite.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 792,417 |
@Test (timeout=180000)
public void testDupeStartKey() throws Exception {
TableName table =
TableName.valueOf("tableDupeStartKey");
try {
setupTable(table);
assertNoErrors(doFsck(conf, false));
assertEquals(ROWKEYS.length, countRows());
// Now let's mess it up, by adding a re... | @Test (timeout=180000) void function() throws Exception { TableName table = TableName.valueOf(STR); try { setupTable(table); assertNoErrors(doFsck(conf, false)); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriDupe = createRegion(tbl.getTableDescriptor(), Bytes.toBytes("A"), Bytes.toBytes("A2")); TEST_UTIL.ge... | /**
* This create and fixes a bad table with regions that have a duplicate
* start key
*/ | This create and fixes a bad table with regions that have a duplicate start key | testDupeStartKey | {
"repo_name": "SeekerResource/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java",
"license": "apache-2.0",
"size": 103756
} | [
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.ServerName",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.util.hbck.HbckTestingUtil",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.util.hbck.HbckTestingUtil; import org.junit.Assert; import org.junit.Test; | import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.hbck.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 1,788,108 |
private static StripCode createLoggerInstance(Compiler compiler) {
Set<String> stripTypes = Sets.newHashSet(
"goog.debug.DebugWindow",
"goog.debug.FancyWindow",
"goog.debug.Formatter",
"goog.debug.HtmlFormatter",
"goog.debug.TextFormatter",
"goog.debug.Logger",
... | static StripCode function(Compiler compiler) { Set<String> stripTypes = Sets.newHashSet( STR, STR, STR, STR, STR, STR, STR, STR, STR); Set<String> stripNames = Sets.newHashSet( STR, STR, STR, STR, STR, STR); Set<String> stripNamePrefixes = Sets.newHashSet("trace"); Set<String> stripTypePrefixes = Sets.newHashSet(STR); ... | /**
* Creates an instance for removing logging code.
*
* @param compiler The Compiler
* @return A new {@link StripCode} instance
*/ | Creates an instance for removing logging code | createLoggerInstance | {
"repo_name": "johan/closure-compiler",
"path": "test/com/google/javascript/jscomp/StripCodeTest.java",
"license": "apache-2.0",
"size": 10066
} | [
"com.google.common.collect.Sets",
"java.util.Set"
] | import com.google.common.collect.Sets; import java.util.Set; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 320,570 |
public static List<Receiver> getParametersOfEnclosingMethod(
AnnotationProvider annotationProvider, TreePath path) {
MethodTree methodTree = TreeUtils.enclosingMethod(path);
if (methodTree == null) {
return null;
}
List<Receiver> internalArguments = new ArrayL... | static List<Receiver> function( AnnotationProvider annotationProvider, TreePath path) { MethodTree methodTree = TreeUtils.enclosingMethod(path); if (methodTree == null) { return null; } List<Receiver> internalArguments = new ArrayList<>(); for (VariableTree arg : methodTree.getParameters()) { internalArguments.add(inte... | /**
* Returns Receiver objects for the formal parameters of the method in which path is enclosed.
*
* @param annotationProvider annotationProvider
* @param path TreePath that is enclosed by the method
* @return list of Receiver objects for the formal parameters of the method in which path is
... | Returns Receiver objects for the formal parameters of the method in which path is enclosed | getParametersOfEnclosingMethod | {
"repo_name": "damienmg/bazel",
"path": "third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/analysis/FlowExpressions.java",
"license": "apache-2.0",
"size": 41769
} | [
"com.sun.source.tree.MethodTree",
"com.sun.source.tree.VariableTree",
"com.sun.source.util.TreePath",
"java.util.ArrayList",
"java.util.List",
"javax.lang.model.type.TypeMirror",
"org.checkerframework.dataflow.cfg.node.LocalVariableNode",
"org.checkerframework.javacutil.AnnotationProvider",
"org.che... | import com.sun.source.tree.MethodTree; import com.sun.source.tree.VariableTree; import com.sun.source.util.TreePath; import java.util.ArrayList; import java.util.List; import javax.lang.model.type.TypeMirror; import org.checkerframework.dataflow.cfg.node.LocalVariableNode; import org.checkerframework.javacutil.Annotati... | import com.sun.source.tree.*; import com.sun.source.util.*; import java.util.*; import javax.lang.model.type.*; import org.checkerframework.dataflow.cfg.node.*; import org.checkerframework.javacutil.*; | [
"com.sun.source",
"java.util",
"javax.lang",
"org.checkerframework.dataflow",
"org.checkerframework.javacutil"
] | com.sun.source; java.util; javax.lang; org.checkerframework.dataflow; org.checkerframework.javacutil; | 1,413,365 |
@XmlElement(name = "init-timeout")
public Integer getJaxbInitTimeout() {
return encode(initTimeout);
} | @XmlElement(name = STR) Integer function() { return encode(initTimeout); } | /**
* Return an {@link Integer} instance which represents the current value
* of "init-timeout".
*
* @return An {@link Integer} value or {@code null}.
* @deprecated
* Only for JAXB. Use {@link #getInitTimeout()} instead.
*/ | Return an <code>Integer</code> instance which represents the current value of "init-timeout" | getJaxbInitTimeout | {
"repo_name": "opendaylight/vtn",
"path": "manager/implementation/src/main/java/org/opendaylight/vtn/manager/internal/config/VTNConfigImpl.java",
"license": "epl-1.0",
"size": 24643
} | [
"javax.xml.bind.annotation.XmlElement"
] | import javax.xml.bind.annotation.XmlElement; | import javax.xml.bind.annotation.*; | [
"javax.xml"
] | javax.xml; | 482,665 |
@Override
public void setParameterValue( String key, String value ) throws UnknownParamException {
namedParams.setParameterValue( key, value );
} | void function( String key, String value ) throws UnknownParamException { namedParams.setParameterValue( key, value ); } | /**
* Sets the value for the specified parameter.
*
* @param key the name of the parameter
* @param value the name of the value
* @throws UnknownParamException if the parameter does not exist
* @see org.pentaho.di.core.parameters.NamedParams#setParameterValue(java.lang.String, java.lang.String)
*... | Sets the value for the specified parameter | setParameterValue | {
"repo_name": "flbrino/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 198588
} | [
"org.pentaho.di.core.parameters.UnknownParamException"
] | import org.pentaho.di.core.parameters.UnknownParamException; | import org.pentaho.di.core.parameters.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,439,817 |
public void setResourceBundle(ResourceBundle bundle) {
checkPermission();
// Will throw NPE if bundle is null.
final String baseName = bundle.getBaseBundleName();
// bundle must have a name
if (baseName == null || baseName.isEmpty()) {
throw new IllegalArgumentE... | void function(ResourceBundle bundle) { checkPermission(); final String baseName = bundle.getBaseBundleName(); if (baseName == null baseName.isEmpty()) { throw new IllegalArgumentException(STR); } synchronized (this) { LoggerBundle lb = loggerBundle; final boolean canReplaceResourceBundle = lb.resourceBundleName == null... | /**
* Sets a resource bundle on this logger.
* All messages will be logged using the given resource bundle for its
* specific {@linkplain ResourceBundle#getLocale locale}.
* @param bundle The resource bundle that this logger shall use.
* @throws NullPointerException if the given bundle is {@cod... | Sets a resource bundle on this logger. All messages will be logged using the given resource bundle for its specific ResourceBundle#getLocale locale | setResourceBundle | {
"repo_name": "evanman/Java-Source",
"path": "util/logging/Logger.java",
"license": "lgpl-2.1",
"size": 90413
} | [
"java.util.ResourceBundle"
] | import java.util.ResourceBundle; | import java.util.*; | [
"java.util"
] | java.util; | 828,510 |
public File[] dataWithClusterFiles() {
return dataWithClusterFiles;
} | File[] function() { return dataWithClusterFiles; } | /**
* The data location with the cluster name as a sub directory.
*/ | The data location with the cluster name as a sub directory | dataWithClusterFiles | {
"repo_name": "moriartyy/elasticsearch160",
"path": "src/main/java/org/elasticsearch/env/Environment.java",
"license": "apache-2.0",
"size": 8277
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 798,679 |
private void handleConfigurationSkip(ITestNGMethod tm,
ITestResult testResult,
IConfigurationAnnotation annotation,
ITestNGMethod currentTestMethod,
Object instan... | void function(ITestNGMethod tm, ITestResult testResult, IConfigurationAnnotation annotation, ITestNGMethod currentTestMethod, Object instance, XmlSuite suite) { recordConfigurationInvocationFailed(tm, testResult.getTestClass(), annotation, currentTestMethod, instance, suite); testResult.setStatus(ITestResult.SKIP); run... | /**
* Marks the current <code>TestResult</code> as skipped and invokes the listeners.
*/ | Marks the current <code>TestResult</code> as skipped and invokes the listeners | handleConfigurationSkip | {
"repo_name": "raindev/testng",
"path": "src/main/java/org/testng/internal/Invoker.java",
"license": "apache-2.0",
"size": 66294
} | [
"org.testng.ITestNGMethod",
"org.testng.ITestResult",
"org.testng.annotations.IConfigurationAnnotation",
"org.testng.xml.XmlSuite"
] | import org.testng.ITestNGMethod; import org.testng.ITestResult; import org.testng.annotations.IConfigurationAnnotation; import org.testng.xml.XmlSuite; | import org.testng.*; import org.testng.annotations.*; import org.testng.xml.*; | [
"org.testng",
"org.testng.annotations",
"org.testng.xml"
] | org.testng; org.testng.annotations; org.testng.xml; | 1,532,884 |
public TreeSet getAclHandlerNames() {
return new TreeSet(handlers.keySet());
} | TreeSet function() { return new TreeSet(handlers.keySet()); } | /** Returns the set of registered ACL handler names.
* @return set of handler names usable in an ACL string
* */ | Returns the set of registered ACL handler names | getAclHandlerNames | {
"repo_name": "lhellebr/spacewalk",
"path": "java/code/src/com/redhat/rhn/common/security/acl/Acl.java",
"license": "gpl-2.0",
"size": 19679
} | [
"java.util.TreeSet"
] | import java.util.TreeSet; | import java.util.*; | [
"java.util"
] | java.util; | 441,270 |
@InterfaceAudience.Private
@InterfaceStability.Unstable
public synchronized long remainingInCurrentRequest() {
return this.contentRangeFinish - this.pos;
} | @InterfaceAudience.Private @InterfaceStability.Unstable synchronized long function() { return this.contentRangeFinish - this.pos; } | /**
* Bytes left in the current request.
* Only valid if there is an active request.
* @return how many bytes are left to read in the current GET.
*/ | Bytes left in the current request. Only valid if there is an active request | remainingInCurrentRequest | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AInputStream.java",
"license": "apache-2.0",
"size": 29442
} | [
"org.apache.hadoop.classification.InterfaceAudience",
"org.apache.hadoop.classification.InterfaceStability"
] | import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; | import org.apache.hadoop.classification.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 310,618 |
public Collection getAllPages()
throws ProviderException
{
log.debug("Getting all pages...");
ArrayList set = new ArrayList();
File wikipagedir = new File(m_pageDirectory);
File [] wikipages = wikipagedir.listFiles(new WikiFileFilter());
if (wikipages == n... | Collection function() throws ProviderException { log.debug(STR); ArrayList set = new ArrayList(); File wikipagedir = new File(m_pageDirectory); File [] wikipages = wikipagedir.listFiles(new WikiFileFilter()); if (wikipages == null) { throw new InternalWikiException(STR); } for (int i = 0; i < wikipages.length; i++) { S... | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*
* @throws ProviderException DOCUMENT ME!
* @throws InternalWikiException DOCUMENT ME!
*/ | DOCUMENT ME | getAllPages | {
"repo_name": "hgschmie/EyeWiki",
"path": "src/java/de/softwareforge/eyewiki/providers/AbstractFileProvider.java",
"license": "lgpl-2.1",
"size": 14173
} | [
"de.softwareforge.eyewiki.WikiPage",
"de.softwareforge.eyewiki.exception.InternalWikiException",
"java.io.File",
"java.util.ArrayList",
"java.util.Collection"
] | import de.softwareforge.eyewiki.WikiPage; import de.softwareforge.eyewiki.exception.InternalWikiException; import java.io.File; import java.util.ArrayList; import java.util.Collection; | import de.softwareforge.eyewiki.*; import de.softwareforge.eyewiki.exception.*; import java.io.*; import java.util.*; | [
"de.softwareforge.eyewiki",
"java.io",
"java.util"
] | de.softwareforge.eyewiki; java.io; java.util; | 2,394,619 |
public IndexMetaData getIndexMetaData() {
return indexMetaData;
}
public int getNumberOfShards() { return numberOfShards; } | IndexMetaData function() { return indexMetaData; } public int getNumberOfShards() { return numberOfShards; } | /**
* Returns the current IndexMetaData for this index
*/ | Returns the current IndexMetaData for this index | getIndexMetaData | {
"repo_name": "dpursehouse/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/IndexSettings.java",
"license": "apache-2.0",
"size": 24829
} | [
"org.elasticsearch.cluster.metadata.IndexMetaData"
] | import org.elasticsearch.cluster.metadata.IndexMetaData; | import org.elasticsearch.cluster.metadata.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 2,603,272 |
@Override
public boolean addParticipatesTo(Conversation conversation) {
return sam.setObjectProperty(kbNode, PROPERTY_PARTICIPATESTO_URI, conversation);
}
| boolean function(Conversation conversation) { return sam.setObjectProperty(kbNode, PROPERTY_PARTICIPATESTO_URI, conversation); } | /**
* Creates a "participatesto" edge between this group and conversation
*
* @param conversation
* the Conversation
*
* @return true if all went well, false otherwise
*/ | Creates a "participatesto" edge between this group and conversation | addParticipatesTo | {
"repo_name": "grosca/yarta",
"path": "mselib/libapps/android/YartaLibrary/src/fr/inria/arles/yarta/android/library/resources/GroupImpl.java",
"license": "lgpl-3.0",
"size": 13876
} | [
"fr.inria.arles.yarta.resources.Conversation"
] | import fr.inria.arles.yarta.resources.Conversation; | import fr.inria.arles.yarta.resources.*; | [
"fr.inria.arles"
] | fr.inria.arles; | 1,500,446 |
@JsonProperty("data")
public void setData(FloatMatrix2D data) {
this.data = data;
} | @JsonProperty("data") void function(FloatMatrix2D data) { this.data = data; } | /**
* <p>Original spec-file type: FloatMatrix2D</p>
*
*
*/ | Original spec-file type: FloatMatrix2D | setData | {
"repo_name": "kkellerlbl/transform",
"path": "src/us/kbase/kbaseenigmametals/ChromatographyMatrix.java",
"license": "mit",
"size": 3634
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 515,398 |
void removePermissionFromUser(String username, Permission... permission) throws UserNotFoundException; | void removePermissionFromUser(String username, Permission... permission) throws UserNotFoundException; | /**
* Removes the given permissions to the given user.
*
* If the user did not have a permission in the first place, nothing happens.
*
* @throws UserNotFoundException if the user does not exist
*/ | Removes the given permissions to the given user. If the user did not have a permission in the first place, nothing happens | removePermissionFromUser | {
"repo_name": "openengsb-attic/openengsb-api",
"path": "src/main/java/org/openengsb/core/api/security/service/UserDataManager.java",
"license": "apache-2.0",
"size": 11880
} | [
"org.openengsb.core.api.security.model.Permission"
] | import org.openengsb.core.api.security.model.Permission; | import org.openengsb.core.api.security.model.*; | [
"org.openengsb.core"
] | org.openengsb.core; | 32,129 |
public List<PlanboardMessage> findPlanboardMessages(DocumentType type, LocalDate period, DocumentStatus documentStatus) {
return planboardMessageRepository.findPlanboardMessages(type, period, documentStatus);
} | List<PlanboardMessage> function(DocumentType type, LocalDate period, DocumentStatus documentStatus) { return planboardMessageRepository.findPlanboardMessages(type, period, documentStatus); } | /**
* Find plan board messages.
*
* @param type document type of the message
* @param period period
* @param documentStatus document status
* @return plan board message list
*/ | Find plan board messages | findPlanboardMessages | {
"repo_name": "USEF-Foundation/ri.usef.energy",
"path": "usef-build/usef-core/usef-core-planboard/src/main/java/energy/usef/core/service/business/CorePlanboardBusinessService.java",
"license": "apache-2.0",
"size": 67130
} | [
"energy.usef.core.model.DocumentStatus",
"energy.usef.core.model.DocumentType",
"energy.usef.core.model.PlanboardMessage",
"java.util.List",
"org.joda.time.LocalDate"
] | import energy.usef.core.model.DocumentStatus; import energy.usef.core.model.DocumentType; import energy.usef.core.model.PlanboardMessage; import java.util.List; import org.joda.time.LocalDate; | import energy.usef.core.model.*; import java.util.*; import org.joda.time.*; | [
"energy.usef.core",
"java.util",
"org.joda.time"
] | energy.usef.core; java.util; org.joda.time; | 1,019,520 |
public VKAccessToken copyWithToken(@NonNull VKAccessToken token) {
Map<String, String> newTokenParams = tokenParams();
newTokenParams.putAll(token.tokenParams());
return VKAccessToken.tokenFromParameters(newTokenParams);
} | VKAccessToken function(@NonNull VKAccessToken token) { Map<String, String> newTokenParams = tokenParams(); newTokenParams.putAll(token.tokenParams()); return VKAccessToken.tokenFromParameters(newTokenParams); } | /**
* Creates copy of current token, with params from passed token
* @param token Usually this is partly filled access token, made after validation
* @return New access token with updated fields
*/ | Creates copy of current token, with params from passed token | copyWithToken | {
"repo_name": "DrMoriarty/cordova-social-vk",
"path": "src/android/vksdk_library/src/com/vk/sdk/VKAccessToken.java",
"license": "apache-2.0",
"size": 10931
} | [
"com.android.annotations.NonNull",
"java.util.Map"
] | import com.android.annotations.NonNull; import java.util.Map; | import com.android.annotations.*; import java.util.*; | [
"com.android.annotations",
"java.util"
] | com.android.annotations; java.util; | 747,244 |
private void testExportFileSystemState(final FullyQualifiedTableName tableName, final byte[] snapshotName,
int filesExpected) throws Exception {
Path copyDir = TEST_UTIL.getDataTestDir("export-" + System.currentTimeMillis());
URI hdfsUri = FileSystem.get(TEST_UTIL.getConfiguration()).getUri();
FileS... | void function(final FullyQualifiedTableName tableName, final byte[] snapshotName, int filesExpected) throws Exception { Path copyDir = TEST_UTIL.getDataTestDir(STR + System.currentTimeMillis()); URI hdfsUri = FileSystem.get(TEST_UTIL.getConfiguration()).getUri(); FileSystem fs = FileSystem.get(copyDir.toUri(), new Conf... | /**
* Test ExportSnapshot
*/ | Test ExportSnapshot | testExportFileSystemState | {
"repo_name": "francisliu/hbase_namespace",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java",
"license": "apache-2.0",
"size": 13486
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.FullyQualifiedTableName",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.snapshot.ExportSnapshot",
"org.apache.hadoop.hbas... | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.FullyQualifiedTableName; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.snapshot.ExportSnapshot; import... | import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.snapshot.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 2,330,112 |
public ServiceCall getDictionaryNullAsync(final ServiceCallback<Map<String, Map<String, String>>> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
} | ServiceCall function(final ServiceCallback<Map<String, Map<String, String>>> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } | /**
* Get an dictionaries of dictionaries with value null.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link Call} object
*/ | Get an dictionaries of dictionaries with value null | getDictionaryNullAsync | {
"repo_name": "stankovski/AutoRest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodydictionary/DictionaryOperationsImpl.java",
"license": "mit",
"size": 167988
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"java.util.Map"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,032,401 |
// Instantiate a client that will be used to call the service.
FormRecognizerClient client = new FormRecognizerClientBuilder()
.credential(new AzureKeyCredential("{key}"))
.endpoint("https://{endpoint}.cognitiveservices.azure.com/")
.buildClient();
String formUrl = "... | FormRecognizerClient client = new FormRecognizerClientBuilder() .credential(new AzureKeyCredential("{key}")) .endpoint(STR{form_url}STR{custom_trained_model_id}STR----------- Recognized custom form info for page %d -----------%nSTRForm type: %s%nSTRField '%s' has label '%s' with a confidence STRscore of %.2f.%n", label... | /**
* Main method to invoke this demo.
*
* @param args Unused arguments to the program.
*
*/ | Main method to invoke this demo | main | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsFromUrl.java",
"license": "mit",
"size": 2210
} | [
"com.azure.core.credential.AzureKeyCredential"
] | import com.azure.core.credential.AzureKeyCredential; | import com.azure.core.credential.*; | [
"com.azure.core"
] | com.azure.core; | 878,637 |
public void clear(long startIndex, long endIndex) {
if (endIndex <= startIndex) return;
int startWord = (int)(startIndex>>6);
if (startWord >= wlen) return;
// since endIndex is one past the end, this is index of the last
// word to be changed.
int endWord = (int)((endIndex-1)>>6);
lo... | void function(long startIndex, long endIndex) { if (endIndex <= startIndex) return; int startWord = (int)(startIndex>>6); if (startWord >= wlen) return; int endWord = (int)((endIndex-1)>>6); long startmask = -1L << startIndex; long endmask = -1L >>> -endIndex; startmask = ~startmask; endmask = ~endmask; if (startWord =... | /** Clears a range of bits. Clearing past the end does not change the size of the set.
*
* @param startIndex lower index
* @param endIndex one-past the last bit to clear
*/ | Clears a range of bits. Clearing past the end does not change the size of the set | clear | {
"repo_name": "tadeegan/eiger-application-aware",
"path": "src/java/org/apache/cassandra/utils/obs/OpenBitSet.java",
"license": "apache-2.0",
"size": 16564
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,526,144 |
private void testActualCostSegments(ResourceAssignment assignment, Date startDate, TimescaleUnits units, double[] expected)
{
testCostSegments(assignment, assignment.getTimephasedActualCost(), startDate, units, expected);
} | void function(ResourceAssignment assignment, Date startDate, TimescaleUnits units, double[] expected) { testCostSegments(assignment, assignment.getTimephasedActualCost(), startDate, units, expected); } | /**
* Common method used to test timephased assignment segments against expected data.
*
* @param assignment parent resource assignment
* @param startDate start date for segments
* @param units units of duration for each segment
* @param expected array of expected durations for each segment
... | Common method used to test timephased assignment segments against expected data | testActualCostSegments | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/junit/TimephasedSegmentTest2.java",
"license": "lgpl-2.1",
"size": 21926
} | [
"java.util.Date",
"net.sf.mpxj.ResourceAssignment",
"net.sf.mpxj.mpp.TimescaleUnits"
] | import java.util.Date; import net.sf.mpxj.ResourceAssignment; import net.sf.mpxj.mpp.TimescaleUnits; | import java.util.*; import net.sf.mpxj.*; import net.sf.mpxj.mpp.*; | [
"java.util",
"net.sf.mpxj"
] | java.util; net.sf.mpxj; | 1,829,693 |
public void addInputChangeListener(IInputChangedListener inputChangeListener) {
Assert.isNotNull(inputChangeListener);
fInputChangeListeners.add(inputChangeListener);
}
| void function(IInputChangedListener inputChangeListener) { Assert.isNotNull(inputChangeListener); fInputChangeListeners.add(inputChangeListener); } | /**
* <p>
* Adds a listener for input changes to this input change provider. Has no effect
* if an identical listener is already registered.
* </p>
*
* @param inputChangeListener the listener to add
*
* @since 3.4
*/ | Adds a listener for input changes to this input change provider. Has no effect if an identical listener is already registered. | addInputChangeListener | {
"repo_name": "DarwinSPL/DarwinSPL",
"path": "plugins/eu.hyvar.dataValues.resource.hydatavalue.ui/src-gen/eu/hyvar/dataValues/resource/hydatavalue/ui/HydatavalueBrowserInformationControl.java",
"license": "apache-2.0",
"size": 18014
} | [
"org.eclipse.core.runtime.Assert",
"org.eclipse.jface.text.IInputChangedListener"
] | import org.eclipse.core.runtime.Assert; import org.eclipse.jface.text.IInputChangedListener; | import org.eclipse.core.runtime.*; import org.eclipse.jface.text.*; | [
"org.eclipse.core",
"org.eclipse.jface"
] | org.eclipse.core; org.eclipse.jface; | 2,576,348 |
@Test
public void testHashCode() {
PeriodAxis a1 = new PeriodAxis("Test");
PeriodAxis a2 = new PeriodAxis("Test");
assertTrue(a1.equals(a2));
int h1 = a1.hashCode();
int h2 = a2.hashCode();
assertEquals(h1, h2);
} | void function() { PeriodAxis a1 = new PeriodAxis("Test"); PeriodAxis a2 = new PeriodAxis("Test"); assertTrue(a1.equals(a2)); int h1 = a1.hashCode(); int h2 = a2.hashCode(); assertEquals(h1, h2); } | /**
* Two objects that are equal are required to return the same hashCode.
*/ | Two objects that are equal are required to return the same hashCode | testHashCode | {
"repo_name": "Mr-Steve/LTSpice_Library_Manager",
"path": "libs/jfreechart-1.0.16/tests/org/jfree/chart/axis/PeriodAxisTest.java",
"license": "gpl-2.0",
"size": 10054
} | [
"org.junit.Assert",
"org.junit.Test"
] | import org.junit.Assert; import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,342,992 |
@SuppressWarnings("rawtypes")
public static boolean isElementLoaded(Class clazz, OrasiDriver oDriver, Element obj, int timeout) {
int count = 0;
int driverTimeout = oDriver.getElementTimeout();
// set the timeout for looking for an element to 1 second as we are
// doing a loop and then refreshing the elemen... | @SuppressWarnings(STR) static boolean function(Class clazz, OrasiDriver oDriver, Element obj, int timeout) { int count = 0; int driverTimeout = oDriver.getElementTimeout(); oDriver.setElementTimeout(1, TimeUnit.MILLISECONDS); try { while (!obj.elementWired()) { if (count == timeout) { break; } else { count++; initializ... | /**
* Overloaded method where you can specify the timeout This waits for a
* specified element on the page to be found on the page by the driver
*
*
* @param clazz
* the class calling this method - used so can initialize the
* page class repeatedly
* @para... | Overloaded method where you can specify the timeout This waits for a specified element on the page to be found on the page by the driver | isElementLoaded | {
"repo_name": "Orasi/java-automation-bs",
"path": "src/main/java/com/orasi/utils/PageLoaded.java",
"license": "bsd-3-clause",
"size": 51798
} | [
"com.orasi.core.interfaces.Element",
"com.orasi.exception.automation.PageInitialization",
"java.util.concurrent.TimeUnit",
"org.openqa.selenium.NoSuchElementException",
"org.openqa.selenium.StaleElementReferenceException"
] | import com.orasi.core.interfaces.Element; import com.orasi.exception.automation.PageInitialization; import java.util.concurrent.TimeUnit; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.StaleElementReferenceException; | import com.orasi.core.interfaces.*; import com.orasi.exception.automation.*; import java.util.concurrent.*; import org.openqa.selenium.*; | [
"com.orasi.core",
"com.orasi.exception",
"java.util",
"org.openqa.selenium"
] | com.orasi.core; com.orasi.exception; java.util; org.openqa.selenium; | 2,741,941 |
static boolean isBlockScopedDeclaration(Node n) {
if (n.isName()) {
switch (n.getParent().getType()) {
case Token.LET:
case Token.CONST:
case Token.CATCH:
return true;
case Token.CLASS:
return n.getParent().getFirstChild() == n;
case Token.FUNCTION... | static boolean isBlockScopedDeclaration(Node n) { if (n.isName()) { switch (n.getParent().getType()) { case Token.LET: case Token.CONST: case Token.CATCH: return true; case Token.CLASS: return n.getParent().getFirstChild() == n; case Token.FUNCTION: return isBlockScopedFunctionDeclaration(n.getParent()); } } return fal... | /**
* Is this node the name of a block-scoped declaration?
* Checks for let, const, class, or block-scoped function declarations.
*
* @param n The node
* @return True if {@code n} is the NAME of a block-scoped declaration.
*/ | Is this node the name of a block-scoped declaration? Checks for let, const, class, or block-scoped function declarations | isBlockScopedDeclaration | {
"repo_name": "selkhateeb/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 128800
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 433,309 |
public static @Nonnull Matcher<HeaderSpace> hasSrcOrDstPorts(
@Nonnull Matcher<? super SortedSet<SubRange>> subMatcher) {
return new HasSrcOrDstPorts(subMatcher);
} | static @Nonnull Matcher<HeaderSpace> function( @Nonnull Matcher<? super SortedSet<SubRange>> subMatcher) { return new HasSrcOrDstPorts(subMatcher); } | /**
* Provides a matcher that matches if the provided {@code subMatcher} matches the HeaderSpace's
* srcOrDstPorts.
*/ | Provides a matcher that matches if the provided subMatcher matches the HeaderSpace's srcOrDstPorts | hasSrcOrDstPorts | {
"repo_name": "arifogel/batfish",
"path": "projects/batfish-common-protocol/src/test/java/org/batfish/datamodel/matchers/DataModelMatchers.java",
"license": "apache-2.0",
"size": 17325
} | [
"java.util.SortedSet",
"javax.annotation.Nonnull",
"org.batfish.datamodel.HeaderSpace",
"org.batfish.datamodel.SubRange",
"org.batfish.datamodel.matchers.HeaderSpaceMatchersImpl",
"org.hamcrest.Matcher"
] | import java.util.SortedSet; import javax.annotation.Nonnull; import org.batfish.datamodel.HeaderSpace; import org.batfish.datamodel.SubRange; import org.batfish.datamodel.matchers.HeaderSpaceMatchersImpl; import org.hamcrest.Matcher; | import java.util.*; import javax.annotation.*; import org.batfish.datamodel.*; import org.batfish.datamodel.matchers.*; import org.hamcrest.*; | [
"java.util",
"javax.annotation",
"org.batfish.datamodel",
"org.hamcrest"
] | java.util; javax.annotation; org.batfish.datamodel; org.hamcrest; | 2,696,138 |
public Object getValue(
UIXRenderingContext context
)
{
UIXRenderingContext parentContext = context.getParentContext();
if (parentContext != null)
{
// Get the target value - using the ORIGINAL context,
// not the parent context.
Object targetValue = _target.getValue(conte... | Object function( UIXRenderingContext context ) { UIXRenderingContext parentContext = context.getParentContext(); if (parentContext != null) { Object targetValue = _target.getValue(context); if (targetValue != null) { return ((UINode)targetValue).getAttributeValue(parentContext, _attrKey); } } return null; } private Bou... | /**
* Called to retrieve a value based on the current rendering
* context.
* @param context the rendering context
*/ | Called to retrieve a value based on the current rendering context | getValue | {
"repo_name": "adamrduffy/trinidad-1.0.x",
"path": "trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/composite/PoppedAttributeBoundValue.java",
"license": "apache-2.0",
"size": 2590
} | [
"org.apache.myfaces.trinidadinternal.ui.AttributeKey",
"org.apache.myfaces.trinidadinternal.ui.UINode",
"org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext",
"org.apache.myfaces.trinidadinternal.ui.data.BoundValue"
] | import org.apache.myfaces.trinidadinternal.ui.AttributeKey; import org.apache.myfaces.trinidadinternal.ui.UINode; import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext; import org.apache.myfaces.trinidadinternal.ui.data.BoundValue; | import org.apache.myfaces.trinidadinternal.ui.*; import org.apache.myfaces.trinidadinternal.ui.data.*; | [
"org.apache.myfaces"
] | org.apache.myfaces; | 1,207,719 |
private static MetaClassImpl getMetaClassImpl(MetaClass mc, boolean includeEMC) {
Class mcc = mc.getClass();
boolean valid = mcc == MetaClassImpl.class ||
mcc == AdaptingMetaClass.class ||
mcc == ClosureMetaClass.class ||
(in... | static MetaClassImpl function(MetaClass mc, boolean includeEMC) { Class mcc = mc.getClass(); boolean valid = mcc == MetaClassImpl.class mcc == AdaptingMetaClass.class mcc == ClosureMetaClass.class (includeEMC && mcc == ExpandoMetaClass.class); if (!valid) { if (LOG_ENABLED) LOG.info(STR); return null; } if (LOG_ENABLED... | /**
* Returns the MetaClassImpl if the given MetaClass is one of
* MetaClassImpl, AdaptingMetaClass or ClosureMetaClass. If
* none of these cases matches, this method returns null.
*/ | Returns the MetaClassImpl if the given MetaClass is one of MetaClassImpl, AdaptingMetaClass or ClosureMetaClass. If none of these cases matches, this method returns null | getMetaClassImpl | {
"repo_name": "avafanasiev/groovy",
"path": "src/main/org/codehaus/groovy/vmplugin/v7/Selector.java",
"license": "apache-2.0",
"size": 50283
} | [
"groovy.lang.AdaptingMetaClass",
"groovy.lang.ExpandoMetaClass",
"groovy.lang.MetaClass",
"groovy.lang.MetaClassImpl",
"org.codehaus.groovy.runtime.metaclass.ClosureMetaClass",
"org.codehaus.groovy.vmplugin.v7.IndyInterface"
] | import groovy.lang.AdaptingMetaClass; import groovy.lang.ExpandoMetaClass; import groovy.lang.MetaClass; import groovy.lang.MetaClassImpl; import org.codehaus.groovy.runtime.metaclass.ClosureMetaClass; import org.codehaus.groovy.vmplugin.v7.IndyInterface; | import groovy.lang.*; import org.codehaus.groovy.runtime.metaclass.*; import org.codehaus.groovy.vmplugin.v7.*; | [
"groovy.lang",
"org.codehaus.groovy"
] | groovy.lang; org.codehaus.groovy; | 289,003 |
public static List<Long> toLongList(@Nullable long[] arr) {
if (arr == null || arr.length == 0)
return Collections.emptyList();
List<Long> ret = new ArrayList<>(arr.length);
for (long l : arr)
ret.add(l);
return ret;
}
/**
* Copies all element... | static List<Long> function(@Nullable long[] arr) { if (arr == null arr.length == 0) return Collections.emptyList(); List<Long> ret = new ArrayList<>(arr.length); for (long l : arr) ret.add(l); return ret; } /** * Copies all elements from collection to array and asserts that * array is big enough to hold the collection.... | /**
* Converts array of longs into list.
*
* @param arr Array of longs.
* @return List of longs.
*/ | Converts array of longs into list | toLongList | {
"repo_name": "shurun19851206/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 289056
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.List",
"org.jetbrains.annotations.Nullable"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.jetbrains.annotations"
] | java.util; org.jetbrains.annotations; | 1,743,061 |
protected void processElement(String defaultNamespace,
Properties namespaces)
throws Exception
{
String fullName = XMLUtil.scanIdentifier(this.reader);
String name = fullName;
XMLUtil.skipWhitespace(this.reader, null);
String prefix = null;
... | void function(String defaultNamespace, Properties namespaces) throws Exception { String fullName = XMLUtil.scanIdentifier(this.reader); String name = fullName; XMLUtil.skipWhitespace(this.reader, null); String prefix = null; int colonIndex = name.indexOf(':'); if (colonIndex > 0) { prefix = name.substring(0, colonIndex... | /**
* Processes a regular element.
*
* @param defaultNamespace the default namespace URI (or null)
* @param namespaces list of defined namespaces
*
* @throws java.lang.Exception
* if something went wrong
*/ | Processes a regular element | processElement | {
"repo_name": "the-im/enhanced-vnc-thumbnail-viewer",
"path": "src/net/n3/nanoxml/StdXMLParser.java",
"license": "gpl-2.0",
"size": 20251
} | [
"java.io.Reader",
"java.util.Enumeration",
"java.util.Properties",
"java.util.Vector"
] | import java.io.Reader; import java.util.Enumeration; import java.util.Properties; import java.util.Vector; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,315,434 |
List<RowLock> collectRowLocks(BranchSession branchSession); | List<RowLock> collectRowLocks(BranchSession branchSession); | /**
* Collect row locks list.`
*
* @param branchSession the branch session
* @return the list
*/ | Collect row locks list.` | collectRowLocks | {
"repo_name": "seata/seata",
"path": "server/src/main/java/io/seata/server/lock/LockManager.java",
"license": "apache-2.0",
"size": 3194
} | [
"io.seata.core.lock.RowLock",
"io.seata.server.session.BranchSession",
"java.util.List"
] | import io.seata.core.lock.RowLock; import io.seata.server.session.BranchSession; import java.util.List; | import io.seata.core.lock.*; import io.seata.server.session.*; import java.util.*; | [
"io.seata.core",
"io.seata.server",
"java.util"
] | io.seata.core; io.seata.server; java.util; | 2,563,979 |
public RollingPolicy createRollingPolicy(LoggerContext context) {
getFileNamePatternValidator(context).validate();
return instantiatePolicy(context);
} | RollingPolicy function(LoggerContext context) { getFileNamePatternValidator(context).validate(); return instantiatePolicy(context); } | /**
* Creates rolling policy for rotation. This method validates rolling policy
* properties before creation policy.
*
* @param context
* a logger context
* @return a rolling policy for rotation
* @throws IllegalStateException
* if rolling policy properties are incorrect
*/ | Creates rolling policy for rotation. This method validates rolling policy properties before creation policy | createRollingPolicy | {
"repo_name": "nhl/bootique-logback",
"path": "bootique-logback/src/main/java/io/bootique/logback/policy/RollingPolicyFactory.java",
"license": "apache-2.0",
"size": 4406
} | [
"ch.qos.logback.classic.LoggerContext",
"ch.qos.logback.core.rolling.RollingPolicy"
] | import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.core.rolling.RollingPolicy; | import ch.qos.logback.classic.*; import ch.qos.logback.core.rolling.*; | [
"ch.qos.logback"
] | ch.qos.logback; | 122,517 |
protected void showTabs() {
if (getPageCount() > 1) {
setPageText(0, getString("_UI_SelectionPage_label"));
if (getContainer() instanceof CTabFolder) {
((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y - 6... | void function() { if (getPageCount() > 1) { setPageText(0, getString(STR)); if (getContainer() instanceof CTabFolder) { ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); Point point = getContainer().getSize(); getContainer().setSize(point.x, point.y - 6); } } } | /**
* If there is more than one page in the multi-page editor part,
* this shows the tabs at the bottom.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | If there is more than one page in the multi-page editor part, this shows the tabs at the bottom. | showTabs | {
"repo_name": "tht-krisztian/EMF-IncQuery-Examples",
"path": "query-driven-soft-interconnections/derivedModels.editor/src/system/presentation/SystemEditor.java",
"license": "epl-1.0",
"size": 54898
} | [
"org.eclipse.swt.custom.CTabFolder",
"org.eclipse.swt.graphics.Point"
] | import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.graphics.Point; | import org.eclipse.swt.custom.*; import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 63,552 |
public static <T> T fromByteArray(byte[] serialized, Coder<T> coder) {
ByteArrayInputStream bais = new ByteArrayInputStream(serialized);
try {
return coder.decode(bais, new Coder.Context(true));
} catch (IOException e) {
throw new IllegalStateException("Error decoding bytes for coder: " + code... | static <T> T function(byte[] serialized, Coder<T> coder) { ByteArrayInputStream bais = new ByteArrayInputStream(serialized); try { return coder.decode(bais, new Coder.Context(true)); } catch (IOException e) { throw new IllegalStateException(STR + coder, e); } } | /**
* Utility method for deserializing a byte array using the specified coder.
*
* @param serialized bytearray to be deserialized.
* @param coder Coder to deserialize with.
* @param <T> Type of object to be returned.
* @return Deserialized object.
*/ | Utility method for deserializing a byte array using the specified coder | fromByteArray | {
"repo_name": "rangadi/beam",
"path": "runners/spark/src/main/java/org/apache/beam/runners/spark/coders/CoderHelpers.java",
"license": "apache-2.0",
"size": 6913
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"org.apache.beam.sdk.coders.Coder"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import org.apache.beam.sdk.coders.Coder; | import java.io.*; import org.apache.beam.sdk.coders.*; | [
"java.io",
"org.apache.beam"
] | java.io; org.apache.beam; | 950,366 |
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
private ParallelException exceptions(
final Collection<Throwable> failures) {
ParallelException current = null;
for (final Throwable failure : failures) {
current = new ParallelException(failure, current);
}
... | @SuppressWarnings(STR) ParallelException function( final Collection<Throwable> failures) { ParallelException current = null; for (final Throwable failure : failures) { current = new ParallelException(failure, current); } return current; } | /**
* Create parallel exception.
* @param failures List of exceptions from threads.
* @return Aggregated exceptions.
*/ | Create parallel exception | exceptions | {
"repo_name": "54uso/jcabi-aspects",
"path": "src/main/java/com/jcabi/aspects/aj/Parallelizer.java",
"license": "bsd-3-clause",
"size": 6970
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,926,365 |
public NodeRemovedCommand createNodeRemovedCommand(Node oldParent,
Node oldSibling,
Node contextNode) {
return new NodeRemovedCommand
(NODE_REMOVED_COMMAND + getBracketedNodeName(context... | NodeRemovedCommand function(Node oldParent, Node oldSibling, Node contextNode) { return new NodeRemovedCommand (NODE_REMOVED_COMMAND + getBracketedNodeName(contextNode), oldParent, oldSibling, contextNode); } public static class NodeRemovedCommand extends AbstractUndoableCommand { protected Node oldSibling; protected N... | /**
* Creates the NodeRemoved command.
*
* @param oldParent
* The node's old parent
* @param oldSibling
* The node's old next sibling
* @param contextNode
* The node to be removed
*/ | Creates the NodeRemoved command | createNodeRemovedCommand | {
"repo_name": "git-moss/Push2Display",
"path": "lib/batik-1.8/sources/org/apache/batik/apps/svgbrowser/HistoryBrowserInterface.java",
"license": "lgpl-3.0",
"size": 42497
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 401,811 |
StringBuilder prefix = new StringBuilder(SUBSYSTEM_NAME);
for (String kp : keyPrefix) {
prefix.append('.').append(kp);
}
return new StandardResourceDescriptionResolver(prefix.toString(), RESOURCE_NAME, SwitchYardExtension.class.getClassLoader(), true, false);
} | StringBuilder prefix = new StringBuilder(SUBSYSTEM_NAME); for (String kp : keyPrefix) { prefix.append('.').append(kp); } return new StandardResourceDescriptionResolver(prefix.toString(), RESOURCE_NAME, SwitchYardExtension.class.getClassLoader(), true, false); } | /**
* Create description resolver.
* @param keyPrefix a list of prefixes
* @return the decscription resolver
*/ | Create description resolver | getResourceDescriptionResolver | {
"repo_name": "tadayosi/switchyard",
"path": "release/jboss-as7/wildfly/extension/src/main/java/org/switchyard/as7/extension/SwitchYardExtension.java",
"license": "apache-2.0",
"size": 10310
} | [
"org.jboss.as.controller.descriptions.StandardResourceDescriptionResolver"
] | import org.jboss.as.controller.descriptions.StandardResourceDescriptionResolver; | import org.jboss.as.controller.descriptions.*; | [
"org.jboss.as"
] | org.jboss.as; | 1,568,476 |
private void addTrueTypeCollection(File ttcFile) throws IOException
{
TrueTypeCollection ttc = null;
try
{
ttc = new TrueTypeCollection(ttcFile);
for (TrueTypeFont ttf : ttc.getFonts())
{
addTrueTypeFontImpl(ttf, ttcFile);
}... | void function(File ttcFile) throws IOException { TrueTypeCollection ttc = null; try { ttc = new TrueTypeCollection(ttcFile); for (TrueTypeFont ttf : ttc.getFonts()) { addTrueTypeFontImpl(ttf, ttcFile); } } catch (NullPointerException e) { LOG.error(STR + ttcFile, e); } catch (IOException e) { LOG.error(STR + ttcFile, e... | /**
* Adds a TTC or OTC to the file cache. To reduce memory, the parsed font is not cached.
*/ | Adds a TTC or OTC to the file cache. To reduce memory, the parsed font is not cached | addTrueTypeCollection | {
"repo_name": "ZhenyaM/veraPDF-pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/FileSystemFontProvider.java",
"license": "apache-2.0",
"size": 13686
} | [
"java.io.File",
"java.io.IOException",
"org.apache.fontbox.ttf.TrueTypeCollection",
"org.apache.fontbox.ttf.TrueTypeFont"
] | import java.io.File; import java.io.IOException; import org.apache.fontbox.ttf.TrueTypeCollection; import org.apache.fontbox.ttf.TrueTypeFont; | import java.io.*; import org.apache.fontbox.ttf.*; | [
"java.io",
"org.apache.fontbox"
] | java.io; org.apache.fontbox; | 2,355,435 |
public ServiceCall getByteValidAsync(final ServiceCallback<Map<String, byte[]>> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
} | ServiceCall function(final ServiceCallback<Map<String, byte[]>> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } | /**
* Get byte dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} with each item encoded in base64.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @r... | Get byte dictionary value {"0": hex(FF FF FF FA), "1": hex(01 02 03), "2": hex (25, 29, 43)} with each item encoded in base64 | getByteValidAsync | {
"repo_name": "stankovski/AutoRest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodydictionary/DictionaryOperationsImpl.java",
"license": "mit",
"size": 167988
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"java.util.Map"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,032,371 |
public static JTextPane buildTextPane(String text, Color foreground)
{
if (text == null) text = "";
StyleContext context = new StyleContext();
StyledDocument document = new DefaultStyledDocument(context);
Style style = context.getStyle(StyleContext.DEFAULT_STYLE);
StyleConstan... | static JTextPane function(String text, Color foreground) { if (text == null) text = ""; StyleContext context = new StyleContext(); StyledDocument document = new DefaultStyledDocument(context); Style style = context.getStyle(StyleContext.DEFAULT_STYLE); StyleConstants.setAlignment(style, StyleConstants.ALIGN_LEFT); if (... | /**
* Formats the text and displays it in a {@link JTextPane}.
*
* @param text The text to display.
* @param foreground The foreground color.
* @return See above.
*/ | Formats the text and displays it in a <code>JTextPane</code> | buildTextPane | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/UIUtilities.java",
"license": "gpl-2.0",
"size": 90682
} | [
"java.awt.Color",
"javax.swing.JTextPane",
"javax.swing.text.BadLocationException",
"javax.swing.text.DefaultStyledDocument",
"javax.swing.text.Style",
"javax.swing.text.StyleConstants",
"javax.swing.text.StyleContext",
"javax.swing.text.StyledDocument"
] | import java.awt.Color; import javax.swing.JTextPane; import javax.swing.text.BadLocationException; import javax.swing.text.DefaultStyledDocument; import javax.swing.text.Style; import javax.swing.text.StyleConstants; import javax.swing.text.StyleContext; import javax.swing.text.StyledDocument; | import java.awt.*; import javax.swing.*; import javax.swing.text.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 389,389 |
public static boolean isEventPublisherMethod(@Nonnull Method method) {
return isEventPublisherMethod(method, false);
} | static boolean function(@Nonnull Method method) { return isEventPublisherMethod(method, false); } | /**
* Finds out if the given {@code Method} belongs to the set of
* predefined event publisher methods by convention.
* <p>
* <pre>
* // assuming getMethod() returns an appropriate Method reference
* isEventPublisherMethod(getMethod("addEventPublisher")) = true
* isEventPublisherMeth... | Finds out if the given Method belongs to the set of predefined event publisher methods by convention. <code> assuming getMethod() returns an appropriate Method reference isEventPublisherMethod(getMethod("addEventPublisher")) = true isEventPublisherMethod(getMethod("publishEvent")) = true isEventPublisherMethod(getMetho... | isEventPublisherMethod | {
"repo_name": "levymoreira/griffon",
"path": "subprojects/griffon-core/src/main/java/griffon/util/GriffonClassUtils.java",
"license": "apache-2.0",
"size": 129659
} | [
"java.lang.reflect.Method",
"javax.annotation.Nonnull"
] | import java.lang.reflect.Method; import javax.annotation.Nonnull; | import java.lang.reflect.*; import javax.annotation.*; | [
"java.lang",
"javax.annotation"
] | java.lang; javax.annotation; | 235,152 |
private void validateNumberFiles(final int expected) {
assertThat(numberOfFiles(this.dir)).as("Unexpected files: " + listFiles(this.dir))
.isEqualTo(expected);
} | void function(final int expected) { assertThat(numberOfFiles(this.dir)).as(STR + listFiles(this.dir)) .isEqualTo(expected); } | /**
* Validates number of files under this.dir while ignoring this.dirOfDeletedFiles.
*/ | Validates number of files under this.dir while ignoring this.dirOfDeletedFiles | validateNumberFiles | {
"repo_name": "deepakddixit/incubator-geode",
"path": "geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/DiskSpaceLimitIntegrationTest.java",
"license": "apache-2.0",
"size": 15611
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 562,741 |
private static String formatSize(int byteSize) {
return FormatUtils.formatDataSize(byteSize);
}
// This wrapper ensures that the input stream of the wrapped request is not read past the given maximum.
private static class LimitedContentLengthRequest extends HttpServletRequestWrapper {
p... | static String function(int byteSize) { return FormatUtils.formatDataSize(byteSize); } private static class LimitedContentLengthRequest extends HttpServletRequestWrapper { private int maxRequestLength; public LimitedContentLengthRequest(HttpServletRequest request, int maxLength) { super(request); maxRequestLength = maxL... | /**
* Formats a value like {@code 1048576} to {@code 1 MB} for easier human consumption.
*
* @param byteSize the size in bytes
* @return a String representing the size in the most appropriate unit, with the units
*/ | Formats a value like 1048576 to 1 MB for easier human consumption | formatSize | {
"repo_name": "YolandaMDavis/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/main/java/org/apache/nifi/web/security/requests/ContentLengthFilter.java",
"license": "apache-2.0",
"size": 6698
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletRequestWrapper",
"org.apache.nifi.util.FormatUtils"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import org.apache.nifi.util.FormatUtils; | import javax.servlet.http.*; import org.apache.nifi.util.*; | [
"javax.servlet",
"org.apache.nifi"
] | javax.servlet; org.apache.nifi; | 2,253,630 |
public static int activeCount() {
RVMThread.dumpStack();
throw new Error("TODO");
} | static int function() { RVMThread.dumpStack(); throw new Error("TODO"); } | /**
* Returns the number of active threads in the running thread's ThreadGroup
*
* @return Number of Threads
*/ | Returns the number of active threads in the running thread's ThreadGroup | activeCount | {
"repo_name": "CodeOffloading/JikesRVM-CCO",
"path": "jikesrvm-3.1.3/libraryInterface/Harmony/ASF/src/java/lang/Thread.java",
"license": "epl-1.0",
"size": 31758
} | [
"org.jikesrvm.scheduler.RVMThread"
] | import org.jikesrvm.scheduler.RVMThread; | import org.jikesrvm.scheduler.*; | [
"org.jikesrvm.scheduler"
] | org.jikesrvm.scheduler; | 1,518,257 |
public Collection<String> getOutgoingServers() {
return routingTable.getServerHostnames();
}
| Collection<String> function() { return routingTable.getServerHostnames(); } | /**
* Returns a collection with the hostnames of the remote servers that currently may receive
* packets sent from this server.
*
* @return a collection with the hostnames of the remote servers that currently may receive
* packets sent from this server.
*/ | Returns a collection with the hostnames of the remote servers that currently may receive packets sent from this server | getOutgoingServers | {
"repo_name": "surevine/openfire-bespoke",
"path": "src/java/org/jivesoftware/openfire/SessionManager.java",
"license": "gpl-2.0",
"size": 68316
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,378,248 |
private void onRemove(AssetKey __, NewAssetFolderInfo info) {
final Path localPath = info.getAssetFolder();
if (localPath != null) {
final Path vfsPath = vPaths.root.resolve(localPath).get();
if (Files.isRegularFile(vfsPath)) {
try {
deleteFileAndEmptyFolders(vfsPath);
} catch (final IOExcepti... | void function(AssetKey __, NewAssetFolderInfo info) { final Path localPath = info.getAssetFolder(); if (localPath != null) { final Path vfsPath = vPaths.root.resolve(localPath).get(); if (Files.isRegularFile(vfsPath)) { try { deleteFileAndEmptyFolders(vfsPath); } catch (final IOException e) { throw new UncheckedIOExcep... | /**
* Removed asset folder (which is represented as file) from VFS.
*/ | Removed asset folder (which is represented as file) from VFS | onRemove | {
"repo_name": "Katharsas/GMM",
"path": "src/main/java/gmm/service/assets/NewAssetFolderVfs.java",
"license": "gpl-3.0",
"size": 3876
} | [
"java.io.IOException",
"java.io.UncheckedIOException",
"java.nio.file.Files",
"java.nio.file.Path"
] | import java.io.IOException; import java.io.UncheckedIOException; import java.nio.file.Files; import java.nio.file.Path; | import java.io.*; import java.nio.file.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,354,044 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.