method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void setExceptions(Vector<Exception> e) { exceptions = null; exceptions = e; }
void function(Vector<Exception> e) { exceptions = null; exceptions = e; }
/** * Sets the exceptions object * * @param e * The Vector of exceptions */
Sets the exceptions object
setExceptions
{ "repo_name": "hungyao/context-toolkit", "path": "src/main/java/context/arch/comm/clients/IndependentCommunication.java", "license": "gpl-3.0", "size": 7344 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,559,291
protected SecurityConstraint findConstraint(HttpRequest request) { // Are there any defined security constraints? SecurityConstraint constraints[] = context.findConstraints(); if ((constraints == null) || (constraints.length == 0)) { if (debug >= 2) log(" No app...
SecurityConstraint function(HttpRequest request) { SecurityConstraint constraints[] = context.findConstraints(); if ((constraints == null) (constraints.length == 0)) { if (debug >= 2) log(STR); return (null); } HttpServletRequest hreq = (HttpServletRequest) request.getRequest(); String uri = request.getDecodedRequestUR...
/** * Return the SecurityConstraint configured to guard the request URI for * this request, or <code>null</code> if there is no such constraint. * * @param request Request we are processing */
Return the SecurityConstraint configured to guard the request URI for this request, or <code>null</code> if there is no such constraint
findConstraint
{ "repo_name": "jasonleaster/TheWayToJava", "path": "HowTomcatWorks/src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java", "license": "gpl-3.0", "size": 37619 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.catalina.HttpRequest", "org.apache.catalina.deploy.SecurityConstraint" ]
import javax.servlet.http.HttpServletRequest; import org.apache.catalina.HttpRequest; import org.apache.catalina.deploy.SecurityConstraint;
import javax.servlet.http.*; import org.apache.catalina.*; import org.apache.catalina.deploy.*;
[ "javax.servlet", "org.apache.catalina" ]
javax.servlet; org.apache.catalina;
573,936
public void testProcessUpdateCounts3() throws SQLException { Statement stmt = con.createStatement(); assertFalse(stmt.execute("CREATE TABLE #testProcessUpdateCounts3 (val INT)")); assertFalse(stmt.execute("CREATE PROCEDURE #procTestProcessUpdateCounts3" + " @res INT OUT AS" ...
void function() throws SQLException { Statement stmt = con.createStatement(); assertFalse(stmt.execute(STR)); assertFalse(stmt.execute(STR + STR + STR + STR + STR + STR + STR + STR + STR)); stmt.close(); CallableStatement cstmt = con.prepareCall( STR); cstmt.registerOutParameter(1, Types.INTEGER); cstmt.registerOutPara...
/** * Test that procedure outputs are available immediately after processing * the last ResultSet returned by the procedure (i.e that update counts * are cached) even if getMoreResults() is not called. */
Test that procedure outputs are available immediately after processing the last ResultSet returned by the procedure (i.e that update counts are cached) even if getMoreResults() is not called
testProcessUpdateCounts3
{ "repo_name": "TRITON-DLP/jtds-patch", "path": "src/test/net/sourceforge/jtds/jdbc/CallableStatementTest.java", "license": "gpl-2.0", "size": 44294 }
[ "java.sql.CallableStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement", "java.sql.Types" ]
import java.sql.CallableStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,657,688
@org.junit.jupiter.api.Test public void test_coreFeatures_signatures_manifestSignature_core() throws Exception { String filename = gregorsDir + "coreFeatures/signatures/manifestSignature.xml"; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean ...
@org.junit.jupiter.api.Test void function() throws Exception { String filename = gregorsDir + STR; ResourceResolverSpi resolver = null; boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { LOG.error(STR + filename); thr...
/** * Method test_coreFeatures_signatures_manifestSignature * * @throws Exception */
Method test_coreFeatures_signatures_manifestSignature
test_coreFeatures_signatures_manifestSignature_core
{ "repo_name": "apache/santuario-java", "path": "src/test/java/org/apache/xml/security/test/dom/interop/IAIKTest.java", "license": "apache-2.0", "size": 12567 }
[ "org.apache.xml.security.utils.resolver.ResourceResolverSpi", "org.junit.jupiter.api.Assertions" ]
import org.apache.xml.security.utils.resolver.ResourceResolverSpi; import org.junit.jupiter.api.Assertions;
import org.apache.xml.security.utils.resolver.*; import org.junit.jupiter.api.*;
[ "org.apache.xml", "org.junit.jupiter" ]
org.apache.xml; org.junit.jupiter;
1,936,307
protected void addInput__iLockingOrderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CtrlUnit12_Input__iLockingOrder_feature"), getString("...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), WTSpecPackage.Literals.CTRL_UNIT12__INPUT_ILOCKING_ORDER, true, false, true, null, null, null)); ...
/** * This adds a property descriptor for the Input iLocking Order feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Input iLocking Order feature.
addInput__iLockingOrderPropertyDescriptor
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/mondo-access-control/CollaborationIncQuery/WTSpec.edit/src/WTSpec/provider/CtrlUnit12ItemProvider.java", "license": "epl-1.0", "size": 10413 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,136,616
private List<Integer> toList (JSONArray ary) { ArrayList<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < ary.length(); i++) { list.add(ary.optInt(i)); } return list; }
List<Integer> function (JSONArray ary) { ArrayList<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < ary.length(); i++) { list.add(ary.optInt(i)); } return list; }
/** * Convert JSON array of integers to List. * * @param ary * Array of integers */
Convert JSON array of integers to List
toList
{ "repo_name": "nozelrosario/Dcare", "path": "plugins/de.appplant.cordova.plugin.local-notification/src/android/LocalNotification.java", "license": "apache-2.0", "size": 19462 }
[ "java.util.ArrayList", "java.util.List", "org.json.JSONArray" ]
import java.util.ArrayList; import java.util.List; import org.json.JSONArray;
import java.util.*; import org.json.*;
[ "java.util", "org.json" ]
java.util; org.json;
1,678,157
protected Object readResolve() throws ObjectStreamException { if (this.intValue() == STDOUT.intValue()) return STDOUT; if (this.intValue() == STDERR.intValue()) return STDERR; throw new InvalidObjectException("Unknown instance :" + this); }
Object function() throws ObjectStreamException { if (this.intValue() == STDOUT.intValue()) return STDOUT; if (this.intValue() == STDERR.intValue()) return STDERR; throw new InvalidObjectException(STR + this); }
/** * Method to avoid creating duplicate instances when deserializing the * object. * * @return the singleton instance of this <code>Level</code> value in this * classloader * @throws ObjectStreamException * If unable to deserialize */
Method to avoid creating duplicate instances when deserializing the object
readResolve
{ "repo_name": "TOMIGalway/cmoct-sourcecode", "path": "src/com/joey/software/DivertSystemOut/StdOutErrLevel.java", "license": "gpl-2.0", "size": 1867 }
[ "java.io.InvalidObjectException", "java.io.ObjectStreamException" ]
import java.io.InvalidObjectException; import java.io.ObjectStreamException;
import java.io.*;
[ "java.io" ]
java.io;
695,783
protected int getItemIndex(TreeItem[] items, TreeItem item) { for (int i = 0; i < items.length; i++) { if (items[i] == item) { return i; } } return -1; }
int function(TreeItem[] items, TreeItem item) { for (int i = 0; i < items.length; i++) { if (items[i] == item) { return i; } } return -1; }
/** * Gets the item index. * * @param items * the items * @param item * the item * @return the item index */
Gets the item index
getItemIndex
{ "repo_name": "apache/uima-uimaj", "path": "uimaj-ep-configurator/src/main/java/org/apache/uima/taeconfigurator/editors/ui/AbstractSection.java", "license": "apache-2.0", "size": 79829 }
[ "org.eclipse.swt.widgets.TreeItem" ]
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,088,120
public BufferedImage getImage() { try { return ImageIO.read(image); } catch (Exception e) { throw new GooglePlacesException(e); } }
BufferedImage function() { try { return ImageIO.read(image); } catch (Exception e) { throw new GooglePlacesException(e); } }
/** * Returns an Image from the specified photo reference. * * @return image */
Returns an Image from the specified photo reference
getImage
{ "repo_name": "windy1/google-places-api-java", "path": "src/main/java/se/walkercrou/places/Photo.java", "license": "mit", "size": 2369 }
[ "java.awt.image.BufferedImage", "javax.imageio.ImageIO", "se.walkercrou.places.exception.GooglePlacesException" ]
import java.awt.image.BufferedImage; import javax.imageio.ImageIO; import se.walkercrou.places.exception.GooglePlacesException;
import java.awt.image.*; import javax.imageio.*; import se.walkercrou.places.exception.*;
[ "java.awt", "javax.imageio", "se.walkercrou.places" ]
java.awt; javax.imageio; se.walkercrou.places;
493,402
ServiceResponse<Void> put201() throws ErrorException, IOException;
ServiceResponse<Void> put201() throws ErrorException, IOException;
/** * Put true Boolean value in request returns 201. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the {@link ServiceResponse} object if successful. */
Put true Boolean value in request returns 201
put201
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/HttpSuccess.java", "license": "mit", "size": 28862 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
378,970
switch (channel) { case 0: return US.GET4(base + 0x240 + 4) >> 4; // XADC channel 1 case 1: return US.GET4(base + 0x240 + 8) >> 4; // XADC channel 2 case 2: return US.GET4(base + 0x240 + 12) >> 4; // XADC channel 3 case 3: return US.GET4(base + 0x240 + 32) >> 4; // XADC channel 8 default: ret...
switch (channel) { case 0: return US.GET4(base + 0x240 + 4) >> 4; case 1: return US.GET4(base + 0x240 + 8) >> 4; case 2: return US.GET4(base + 0x240 + 12) >> 4; case 3: return US.GET4(base + 0x240 + 32) >> 4; default: return 0; } }
/** * Read the value of the given channel number * * @param channel channel number * @return converted value */
Read the value of the given channel number
read
{ "repo_name": "deepjava/runtime-library", "path": "src/org/deepjava/runtime/zynq7000/driver/XADC.java", "license": "apache-2.0", "size": 1727 }
[ "org.deepjava.unsafe.US" ]
import org.deepjava.unsafe.US;
import org.deepjava.unsafe.*;
[ "org.deepjava.unsafe" ]
org.deepjava.unsafe;
1,669,215
@SuppressWarnings("static-method") protected String _signature(SarlSkill skill, boolean typeAtEnd) { return skill.getName(); }
@SuppressWarnings(STR) String function(SarlSkill skill, boolean typeAtEnd) { return skill.getName(); }
/** Replies the signature for a SARL skill. * * @param skill the SARL element. * @param typeAtEnd ignored * @return the signature */
Replies the signature for a SARL skill
_signature
{ "repo_name": "jgfoster/sarl", "path": "main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/hover/SARLHoverSignatureProvider.java", "license": "apache-2.0", "size": 7568 }
[ "io.sarl.lang.sarl.SarlSkill" ]
import io.sarl.lang.sarl.SarlSkill;
import io.sarl.lang.sarl.*;
[ "io.sarl.lang" ]
io.sarl.lang;
2,299,905
@Auditable(parameters = {"nodeRef", "properties"}) public void addProperties(NodeRef nodeRef, Map<QName, Serializable> properties) throws InvalidNodeRefException;
@Auditable(parameters = {STR, STR}) void function(NodeRef nodeRef, Map<QName, Serializable> properties) throws InvalidNodeRefException;
/** * Add all given properties to the node. * <p> * <b>NOTE:</b> Null values <u>are</u> allowed and will replace the existing value. * * @param nodeRef the node to change * @param properties the properties to change, keyed by their qualified names * @throws In...
Add all given properties to the node.
addProperties
{ "repo_name": "Alfresco/community-edition", "path": "projects/data-model/source/java/org/alfresco/service/cmr/repository/NodeService.java", "license": "lgpl-3.0", "size": 44566 }
[ "java.io.Serializable", "java.util.Map", "org.alfresco.service.Auditable", "org.alfresco.service.namespace.QName" ]
import java.io.Serializable; import java.util.Map; import org.alfresco.service.Auditable; import org.alfresco.service.namespace.QName;
import java.io.*; import java.util.*; import org.alfresco.service.*; import org.alfresco.service.namespace.*;
[ "java.io", "java.util", "org.alfresco.service" ]
java.io; java.util; org.alfresco.service;
1,473,956
public void addListener(IScopeListener listener);
void function(IScopeListener listener);
/** * Add listener to get notified about scope events. * * @param listener * the listener to add */
Add listener to get notified about scope events
addListener
{ "repo_name": "bigbluebutton/red5-server-common", "path": "src/main/java/org/red5/server/api/IServer.java", "license": "apache-2.0", "size": 4484 }
[ "org.red5.server.api.listeners.IScopeListener" ]
import org.red5.server.api.listeners.IScopeListener;
import org.red5.server.api.listeners.*;
[ "org.red5.server" ]
org.red5.server;
1,644,134
ClassLoader classloader = org.apache.poi.poifs.filesystem.POIFSFileSystem.class.getClassLoader(); URL res = classloader.getResource("org/apache/poi/poifs/filesystem/POIFSFileSystem.class"); String path = res.getPath(); System.out.println("Core POI came from " + path); // open an...
ClassLoader classloader = org.apache.poi.poifs.filesystem.POIFSFileSystem.class.getClassLoader(); URL res = classloader.getResource(STR); String path = res.getPath(); System.out.println(STR + path); @SuppressWarnings(STR) InputStream in = getClass().getClassLoader().getResourceAsStream(STR); I_CmsExtractionResult extra...
/** * Tests the PowerPoint text extraction for old OLE2 documents.<p> * * Also checks special chars like "&auml; &ouml; &uuml; &Auml; &Ouml; &Uuml; &szlig;"<p> * * @throws Exception if the test fails */
Tests the PowerPoint text extraction for old OLE2 documents. Also checks special chars like "&auml; &ouml; &uuml; &Auml; &Ouml; &Uuml; &szlig;"
testPPtExtractionOLE2
{ "repo_name": "gallardo/opencms-core", "path": "test/org/opencms/search/extractors/TestMsPowerPointExtraction.java", "license": "lgpl-2.1", "size": 7746 }
[ "java.io.InputStream", "java.util.Iterator", "java.util.Map" ]
import java.io.InputStream; import java.util.Iterator; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
956,977
@Override public Adapter createSwitchMediatorOutputConnectorAdapter() { if (switchMediatorOutputConnectorItemProvider == null) { switchMediatorOutputConnectorItemProvider = new SwitchMediatorOutputConnectorItemProvider(this); } return switchMediatorOutputConnectorItemProvider; } protected SwitchMedia...
Adapter function() { if (switchMediatorOutputConnectorItemProvider == null) { switchMediatorOutputConnectorItemProvider = new SwitchMediatorOutputConnectorItemProvider(this); } return switchMediatorOutputConnectorItemProvider; } protected SwitchMediatorContainerItemProvider switchMediatorContainerItemProvider;
/** * This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.SwitchMediatorOutputConnector}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.SwitchMediatorOutputConnector</code>.
createSwitchMediatorOutputConnectorAdapter
{ "repo_name": "nwnpallewela/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 304469 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,044,693
public final void sendDiscontinuitySeperator() throws AdeException { sendSeparator(m_sep); }
final void function() throws AdeException { sendSeparator(m_sep); }
/** * Send the {@link TimeSeparator}. */
Send the <code>TimeSeparator</code>
sendDiscontinuitySeperator
{ "repo_name": "openmainframeproject/ade", "path": "ade-core/src/main/java/org/openmainframe/ade/impl/flow/modules/AdeInputStreamHandler.java", "license": "gpl-3.0", "size": 5079 }
[ "org.openmainframe.ade.exceptions.AdeException" ]
import org.openmainframe.ade.exceptions.AdeException;
import org.openmainframe.ade.exceptions.*;
[ "org.openmainframe.ade" ]
org.openmainframe.ade;
2,690,274
public Object getModelFromRequest(@Nonnull SlingHttpServletRequest request) throws MissingElementsException, InvalidAdaptableException, ModelClassException, PostConstructException, ValidationException, InvalidModelException;
Object function(@Nonnull SlingHttpServletRequest request) throws MissingElementsException, InvalidAdaptableException, ModelClassException, PostConstructException, ValidationException, InvalidModelException;
/** * Obtain an adapted model class based on the resource type of the request's resource. * * @param request a request * @return an adapted model object * @throws MissingElementsException in case no injector was able to inject some required values with the given types * @throws InvalidAdap...
Obtain an adapted model class based on the resource type of the request's resource
getModelFromRequest
{ "repo_name": "roele/sling", "path": "bundles/extensions/models/api/src/main/java/org/apache/sling/models/factory/ModelFactory.java", "license": "apache-2.0", "size": 11599 }
[ "javax.annotation.Nonnull", "org.apache.sling.api.SlingHttpServletRequest" ]
import javax.annotation.Nonnull; import org.apache.sling.api.SlingHttpServletRequest;
import javax.annotation.*; import org.apache.sling.api.*;
[ "javax.annotation", "org.apache.sling" ]
javax.annotation; org.apache.sling;
1,289,971
@Deprecated @Override public List<DatabaseReportDescription> getAllOnline() { List<DatabaseReportDescription> onlineReports = new ArrayList<>(); for (ReportRepository m_repo : m_globalReportRepository.getRepositoryList()) { for (BasicReportDefinition report : m_repo.getOnlineRep...
List<DatabaseReportDescription> function() { List<DatabaseReportDescription> onlineReports = new ArrayList<>(); for (ReportRepository m_repo : m_globalReportRepository.getRepositoryList()) { for (BasicReportDefinition report : m_repo.getOnlineReports()) { DatabaseReportDescription summary = new DatabaseReportDescriptio...
/** * <p> * getAll Reports from all Repositories * </p> * * @return a {@link java.util.List} object. */
getAll Reports from all Repositories
getAllOnline
{ "repo_name": "aihua/opennms", "path": "opennms-web-api/src/main/java/org/opennms/web/svclayer/support/DefaultDatabaseReportListService.java", "license": "agpl-3.0", "size": 7067 }
[ "java.util.ArrayList", "java.util.List", "org.opennms.features.reporting.model.basicreport.BasicReportDefinition", "org.opennms.features.reporting.repository.ReportRepository", "org.opennms.web.svclayer.model.DatabaseReportDescription" ]
import java.util.ArrayList; import java.util.List; import org.opennms.features.reporting.model.basicreport.BasicReportDefinition; import org.opennms.features.reporting.repository.ReportRepository; import org.opennms.web.svclayer.model.DatabaseReportDescription;
import java.util.*; import org.opennms.features.reporting.model.basicreport.*; import org.opennms.features.reporting.repository.*; import org.opennms.web.svclayer.model.*;
[ "java.util", "org.opennms.features", "org.opennms.web" ]
java.util; org.opennms.features; org.opennms.web;
2,442,902
private IPermission[] primGetPermissionsForPrincipal(IAuthorizationPrincipal principal) throws AuthorizationException { if ( ! this.cachePermissions ) { return getUncachedPermissionsForPrincipal(principal, null, null, null);} IPermissionSet ps = null; // Check the caching service for the Permission...
IPermission[] function(IAuthorizationPrincipal principal) throws AuthorizationException { if ( ! this.cachePermissions ) { return getUncachedPermissionsForPrincipal(principal, null, null, null);} IPermissionSet ps = null; ps = cacheGet(principal); if ( ps == null ) synchronized ( principal ) { ps = cacheGet(principal);...
/** * Returns permissions for a principal. First check the entity caching * service, and if the permissions have not been cached, retrieve and * cache them. * @return IPermission[] * @param principal org.jasig.portal.security.IAuthorizationPrincipal */
Returns permissions for a principal. First check the entity caching service, and if the permissions have not been cached, retrieve and cache them
primGetPermissionsForPrincipal
{ "repo_name": "pspaude/uPortal", "path": "uportal-war/src/main/java/org/jasig/portal/security/provider/AuthorizationImpl.java", "license": "apache-2.0", "size": 38152 }
[ "org.jasig.portal.AuthorizationException", "org.jasig.portal.security.IAuthorizationPrincipal", "org.jasig.portal.security.IPermission", "org.jasig.portal.security.IPermissionSet" ]
import org.jasig.portal.AuthorizationException; import org.jasig.portal.security.IAuthorizationPrincipal; import org.jasig.portal.security.IPermission; import org.jasig.portal.security.IPermissionSet;
import org.jasig.portal.*; import org.jasig.portal.security.*;
[ "org.jasig.portal" ]
org.jasig.portal;
1,298,953
private static void assertDrillbitsOk() { final SingleRowListener listener = new SingleRowListener() { private final BufferAllocator bufferAllocator = RootAllocatorFactory.newRoot(zkHelper.getConfig()); private final RecordBatchLoader loader = new RecordBatchLoader(bufferAllocator);
static void function() { final SingleRowListener listener = new SingleRowListener() { private final BufferAllocator bufferAllocator = RootAllocatorFactory.newRoot(zkHelper.getConfig()); private final RecordBatchLoader loader = new RecordBatchLoader(bufferAllocator);
/** * Check that all the drillbits are ok. * <p/> * <p>The current implementation does this by counting the number of drillbits using a query. */
Check that all the drillbits are ok. The current implementation does this by counting the number of drillbits using a query
assertDrillbitsOk
{ "repo_name": "amithadke/drill", "path": "exec/java-exec/src/test/java/org/apache/drill/exec/server/TestDrillbitResilience.java", "license": "apache-2.0", "size": 37725 }
[ "org.apache.drill.SingleRowListener", "org.apache.drill.exec.memory.BufferAllocator", "org.apache.drill.exec.memory.RootAllocatorFactory", "org.apache.drill.exec.record.RecordBatchLoader" ]
import org.apache.drill.SingleRowListener; import org.apache.drill.exec.memory.BufferAllocator; import org.apache.drill.exec.memory.RootAllocatorFactory; import org.apache.drill.exec.record.RecordBatchLoader;
import org.apache.drill.*; import org.apache.drill.exec.memory.*; import org.apache.drill.exec.record.*;
[ "org.apache.drill" ]
org.apache.drill;
725,852
private static <R> R withTemporaryTracer(Function<Tracer, R> handler) { try { OpenTelemetrySdk sdk = setupTraceExporter(); try { Tracer tracer = sdk.getTracer(Constants.INSTRUMENTING_MODULE_NAME); return handler.apply(tracer); } finally { sdk.getSdkTracerProvider().shutdo...
static <R> R function(Function<Tracer, R> handler) { try { OpenTelemetrySdk sdk = setupTraceExporter(); try { Tracer tracer = sdk.getTracer(Constants.INSTRUMENTING_MODULE_NAME); return handler.apply(tracer); } finally { sdk.getSdkTracerProvider().shutdown(); } } catch (IOException e) { throw new RuntimeException(e); } ...
/** * Helper to configure an OTel SDK exporting to cloud trace within the context of a function call. */
Helper to configure an OTel SDK exporting to cloud trace within the context of a function call
withTemporaryTracer
{ "repo_name": "GoogleCloudPlatform/opentelemetry-operations-java", "path": "e2e-test-server/src/main/java/com/google/cloud/opentelemetry/endtoend/ScenarioHandlerManager.java", "license": "apache-2.0", "size": 4197 }
[ "io.opentelemetry.api.trace.Tracer", "io.opentelemetry.sdk.OpenTelemetrySdk", "java.io.IOException", "java.util.function.Function" ]
import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.sdk.OpenTelemetrySdk; import java.io.IOException; import java.util.function.Function;
import io.opentelemetry.api.trace.*; import io.opentelemetry.sdk.*; import java.io.*; import java.util.function.*;
[ "io.opentelemetry.api", "io.opentelemetry.sdk", "java.io", "java.util" ]
io.opentelemetry.api; io.opentelemetry.sdk; java.io; java.util;
353,883
public static String makeLabel(final Context context, final int pluralInt, final int number) { return context.getResources().getQuantityString(pluralInt, number, number); }
static String function(final Context context, final int pluralInt, final int number) { return context.getResources().getQuantityString(pluralInt, number, number); }
/** * Used to make number of labels for the number of artists, albums, songs, * genres, and playlists. * * @param context The {@link Context} to use. * @param pluralInt The ID of the plural string to use. * @param number The number of artists, albums, songs, genres, or playlists. * @r...
Used to make number of labels for the number of artists, albums, songs, genres, and playlists
makeLabel
{ "repo_name": "JavierNicolas/JadaMusic", "path": "app3/src/main/java/org/opensilk/music/ui3/common/UtilsCommon.java", "license": "gpl-3.0", "size": 6891 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
500,346
private void overrideDatabaseTerminationToken(Map<Object, Object> props) { String overrideTermToken = null; String platformClassName = _dbMgr.getDatabasePlatformClassName(_pui); if (platformClassName != null) { overrideTermToken = platformTerminationToken.get(platformClassName);...
void function(Map<Object, Object> props) { String overrideTermToken = null; String platformClassName = _dbMgr.getDatabasePlatformClassName(_pui); if (platformClassName != null) { overrideTermToken = platformTerminationToken.get(platformClassName); } if (overrideTermToken != null) { String existing = (String) props.get(...
/** * Helper method that will override the termination token if the database detected is in our * platformTerminationToken list. * */
Helper method that will override the termination token if the database detected is in our platformTerminationToken list
overrideDatabaseTerminationToken
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.persistence/src/com/ibm/wsspi/persistence/internal/SchemaManager.java", "license": "epl-1.0", "size": 10131 }
[ "java.util.Map", "org.eclipse.persistence.config.PersistenceUnitProperties" ]
import java.util.Map; import org.eclipse.persistence.config.PersistenceUnitProperties;
import java.util.*; import org.eclipse.persistence.config.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
1,567,982
public void setValue(Comparable key, Number value) { this.data = new DefaultKeyedValue(key, value); notifyListeners(new DatasetChangeEvent(this, this)); }
void function(Comparable key, Number value) { this.data = new DefaultKeyedValue(key, value); notifyListeners(new DatasetChangeEvent(this, this)); }
/** * Sets the value for the dataset and sends a {@link DatasetChangeEvent} to * all registered listeners. * * @param key the key. * @param value the value (<code>null</code> permitted). */
Sets the value for the dataset and sends a <code>DatasetChangeEvent</code> to all registered listeners
setValue
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/main/java/org/jfree/data/general/DefaultKeyedValueDataset.java", "license": "lgpl-2.1", "size": 5938 }
[ "org.jfree.data.DefaultKeyedValue" ]
import org.jfree.data.DefaultKeyedValue;
import org.jfree.data.*;
[ "org.jfree.data" ]
org.jfree.data;
1,779,500
public void testCharacterByCharacter() throws IOException { InterleavedReader reader = new InterleavedReader("////", charByCharReader("abc" + "////{\"z\":0}\n" + "///def///ghi/j/k////{\"y\":0}\n" + "///")); assertEquals("a", reader.read()); assertEquals("b", reader.read()); ass...
void function() throws IOException { InterleavedReader reader = new InterleavedReader(STR + STR assertEquals("aSTRbSTRc", reader.read()); assertEqualsJson("{\"z\":0}", reader.read()); assertEquals(STReSTRf", reader.read()); assertEquals(STRhSTRiSTR/jSTR/k", reader.read()); assertEqualsJson("{\"y\":0}STR }
/** * This test demonstrates that when the underlying stream only returns one * character at a time, the reader will read until the prefix is unambiguous. */
This test demonstrates that when the underlying stream only returns one character at a time, the reader will read until the prefix is unambiguous
testCharacterByCharacter
{ "repo_name": "antigremlin/caliper-fork", "path": "test/com/google/caliper/InterleavedReaderTest.java", "license": "apache-2.0", "size": 3981 }
[ "com.google.caliper.InterleavedReader", "java.io.IOException" ]
import com.google.caliper.InterleavedReader; import java.io.IOException;
import com.google.caliper.*; import java.io.*;
[ "com.google.caliper", "java.io" ]
com.google.caliper; java.io;
528,026
private SharedLinkMetadata getSharedLinkMetadata(GetSharedLinkMetadataArg arg) throws GetSharedLinkMetadataException, DbxException { try { return client.rpcStyle(client.getHost().api, "2/sharing/get_shared_link_metadata", ...
SharedLinkMetadata function(GetSharedLinkMetadataArg arg) throws GetSharedLinkMetadataException, DbxException { try { return client.rpcStyle(client.getHost().api, STR, arg, false, GetSharedLinkMetadataArg._writer, SharedLinkMetadata._reader, SharedLinkError._reader); } catch (DbxRequestUtil.ErrorWrapper ew) { throw new...
/** * Get the shared link's metadata. */
Get the shared link's metadata
getSharedLinkMetadata
{ "repo_name": "hunchee/dropbox-sdk-java", "path": "src/com/dropbox/core/v2/DbxSharing.java", "license": "mit", "size": 808400 }
[ "com.dropbox.core.DbxException", "com.dropbox.core.DbxRequestUtil" ]
import com.dropbox.core.DbxException; import com.dropbox.core.DbxRequestUtil;
import com.dropbox.core.*;
[ "com.dropbox.core" ]
com.dropbox.core;
2,703,127
public String getNodeName(){ return MessageService.getTextMessage(SQLState.RTS_UNION); }
String function(){ return MessageService.getTextMessage(SQLState.RTS_UNION); }
/** * Format for display, a name for this node. * */
Format for display, a name for this node
getNodeName
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/execute/rts/RealUnionResultSetStatistics.java", "license": "apache-2.0", "size": 5005 }
[ "com.pivotal.gemfirexd.internal.iapi.reference.SQLState", "com.pivotal.gemfirexd.internal.iapi.services.i18n.MessageService" ]
import com.pivotal.gemfirexd.internal.iapi.reference.SQLState; import com.pivotal.gemfirexd.internal.iapi.services.i18n.MessageService;
import com.pivotal.gemfirexd.internal.iapi.reference.*; import com.pivotal.gemfirexd.internal.iapi.services.i18n.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
934,697
@Test public void intoDateModeDefaultUnused() { final Date date = new Date(); final long unix = date.getTime() / 1000; final Date somewhen = new Date(date.getTime() / 2); Asserts.assertNotEquals(somewhen, Convert.intoDate(date, DateMode.UNIXTIME, somewhen)); Asserts.asser...
void function() { final Date date = new Date(); final long unix = date.getTime() / 1000; final Date somewhen = new Date(date.getTime() / 2); Asserts.assertNotEquals(somewhen, Convert.intoDate(date, DateMode.UNIXTIME, somewhen)); Asserts.assertNotEquals(somewhen, Convert.intoDate(unix, DateMode.UNIXTIME, somewhen)); Ass...
/** * Tests {@link Convert#intoDate(Object, DateMode, Date)} with valid attributes. */
Tests <code>Convert#intoDate(Object, DateMode, Date)</code> with valid attributes
intoDateModeDefaultUnused
{ "repo_name": "cosmocode/cosmocode-commons", "path": "src/test/java/de/cosmocode/collections/utility/convert/ConvertDateTest.java", "license": "apache-2.0", "size": 7435 }
[ "de.cosmocode.collections.utility.Convert", "de.cosmocode.commons.DateMode", "de.cosmocode.junit.Asserts", "java.util.Date" ]
import de.cosmocode.collections.utility.Convert; import de.cosmocode.commons.DateMode; import de.cosmocode.junit.Asserts; import java.util.Date;
import de.cosmocode.collections.utility.*; import de.cosmocode.commons.*; import de.cosmocode.junit.*; import java.util.*;
[ "de.cosmocode.collections", "de.cosmocode.commons", "de.cosmocode.junit", "java.util" ]
de.cosmocode.collections; de.cosmocode.commons; de.cosmocode.junit; java.util;
1,671,263
public void testRemoveParent() throws Exception { CmsObject cms = getCmsObject(); echo("Testing removing the parent node of a broken link"); CmsXmlEntityResolver resolver = new CmsXmlEntityResolver(cms); // now read the XML content String content = CmsFileUtil.readFile("or...
void function() throws Exception { CmsObject cms = getCmsObject(); echo(STR); CmsXmlEntityResolver resolver = new CmsXmlEntityResolver(cms); String content = CmsFileUtil.readFile(STR, CmsEncoder.ENCODING_UTF_8); CmsXmlContent xmlcontent = CmsXmlContentFactory.unmarshal(cms, content, CmsEncoder.ENCODING_UTF_8, resolver)...
/** * Test removing the parent node of a broken link.<p> * * @throws Exception in case something goes wrong */
Test removing the parent node of a broken link
testRemoveParent
{ "repo_name": "it-tavis/opencms-core", "path": "test/org/opencms/xml/content/TestCmsXmlContentLinks.java", "license": "lgpl-2.1", "size": 45931 }
[ "java.util.Locale", "java.util.Map", "org.opencms.file.CmsObject", "org.opencms.file.CmsProject", "org.opencms.file.CmsResource", "org.opencms.file.types.CmsResourceTypePlain", "org.opencms.i18n.CmsEncoder", "org.opencms.main.OpenCms", "org.opencms.relations.CmsLink", "org.opencms.util.CmsFileUtil...
import java.util.Locale; import java.util.Map; import org.opencms.file.CmsObject; import org.opencms.file.CmsProject; import org.opencms.file.CmsResource; import org.opencms.file.types.CmsResourceTypePlain; import org.opencms.i18n.CmsEncoder; import org.opencms.main.OpenCms; import org.opencms.relations.CmsLink; import...
import java.util.*; import org.opencms.file.*; import org.opencms.file.types.*; import org.opencms.i18n.*; import org.opencms.main.*; import org.opencms.relations.*; import org.opencms.util.*; import org.opencms.xml.*;
[ "java.util", "org.opencms.file", "org.opencms.i18n", "org.opencms.main", "org.opencms.relations", "org.opencms.util", "org.opencms.xml" ]
java.util; org.opencms.file; org.opencms.i18n; org.opencms.main; org.opencms.relations; org.opencms.util; org.opencms.xml;
555,919
private void getBandSubreports(HashMap<String, Element> hm, Band band) { int elementCount = band.getElementCount(); for (int i = 0; i < elementCount; i++) { Element e = band.getElement(i); if (e instanceof SubReport) { hm.put(e.getName(), e); // If report footer is not null check f...
void function(HashMap<String, Element> hm, Band band) { int elementCount = band.getElementCount(); for (int i = 0; i < elementCount; i++) { Element e = band.getElement(i); if (e instanceof SubReport) { hm.put(e.getName(), e); if (((SubReport) e).getReportFooter().getElementCount() != 0) { this.getFooterSubreports(hm, (...
/** * Get all subreports in the band. * If it encounters a band, search subreports in the band * * @param hm * @param band */
Get all subreports in the band. If it encounters a band, search subreports in the band
getBandSubreports
{ "repo_name": "CCAFS/MARLO", "path": "marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/center/summaries/OutcomesContributionsSummaryAction.java", "license": "gpl-3.0", "size": 19518 }
[ "java.util.HashMap", "org.pentaho.reporting.engine.classic.core.Band", "org.pentaho.reporting.engine.classic.core.Element", "org.pentaho.reporting.engine.classic.core.SubReport" ]
import java.util.HashMap; import org.pentaho.reporting.engine.classic.core.Band; import org.pentaho.reporting.engine.classic.core.Element; import org.pentaho.reporting.engine.classic.core.SubReport;
import java.util.*; import org.pentaho.reporting.engine.classic.core.*;
[ "java.util", "org.pentaho.reporting" ]
java.util; org.pentaho.reporting;
1,191,262
CheckNameAvailabilityResponseInner innerModel();
CheckNameAvailabilityResponseInner innerModel();
/** * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner object. * * @return the inner object. */
Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner object
innerModel
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CheckNameAvailabilityResponse.java", "license": "mit", "size": 1193 }
[ "com.azure.resourcemanager.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner" ]
import com.azure.resourcemanager.videoanalyzer.fluent.models.CheckNameAvailabilityResponseInner;
import com.azure.resourcemanager.videoanalyzer.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,912,178
@Deprecated String displayIdentifier(FrameSlot slot);
String displayIdentifier(FrameSlot slot);
/** * Converts a slot identifier in the guest language to a display string. * * @since 0.8 or earlier */
Converts a slot identifier in the guest language to a display string
displayIdentifier
{ "repo_name": "mlvdv/truffle", "path": "truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Visualizer.java", "license": "gpl-2.0", "size": 3134 }
[ "com.oracle.truffle.api.frame.FrameSlot" ]
import com.oracle.truffle.api.frame.FrameSlot;
import com.oracle.truffle.api.frame.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
1,052,938
private final DateFormat getShortDateFormat() { return DateFormat.getDateInstance(DateFormat.SHORT, locale); }
final DateFormat function() { return DateFormat.getDateInstance(DateFormat.SHORT, locale); }
/** * Get the format for short date * * @return the format */
Get the format for short date
getShortDateFormat
{ "repo_name": "acheype/cantharella", "path": "cantharella.web/src/main/java/nc/ird/cantharella/web/utils/models/DisplayShortDatePropertyModel.java", "license": "agpl-3.0", "size": 2548 }
[ "java.text.DateFormat" ]
import java.text.DateFormat;
import java.text.*;
[ "java.text" ]
java.text;
2,194,077
public void setLocalNode(Node localNode) { this.localNode = localNode; }
void function(Node localNode) { this.localNode = localNode; }
/** * Sets the local node. * * @param localNode the new local node */
Sets the local node
setLocalNode
{ "repo_name": "da-nrw/DNSCore", "path": "ContentBroker/src/main/java/de/uzk/hki/da/action/ActionFactory.java", "license": "gpl-3.0", "size": 17270 }
[ "de.uzk.hki.da.model.Node" ]
import de.uzk.hki.da.model.Node;
import de.uzk.hki.da.model.*;
[ "de.uzk.hki" ]
de.uzk.hki;
123,759
@POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Path("subscribe") public Response subscribe(InputStream input) { EventSubscriptionService service = get(EventSubscriptionService.class); try { EventSubscriber sub = parseSubscriptionData(...
@Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Path(STR) Response function(InputStream input) { EventSubscriptionService service = get(EventSubscriptionService.class); try { EventSubscriber sub = parseSubscriptionData(input); service.subscribe(sub); } catch (Exception e) { log.error(e.getM...
/** * Creates subscription to a specific ONOS event. * * @param input Subscription Data in JSON format * @return 200 OK if successful or 400 BAD REQUEST * @onos.rsModel KafkaSubscription */
Creates subscription to a specific ONOS event
subscribe
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "apps/kafka-integration/web/src/main/java/org/onosproject/kafkaintegration/rest/EventExporterWebResource.java", "license": "apache-2.0", "size": 6147 }
[ "java.io.InputStream", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.onosproject.kafkaintegration.api.EventSubscriptionService", "org.onosproject.kafkaintegration.api.dto.EventSubscriber" ]
import java.io.InputStream; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onosproject.kafkaintegration.api.EventSubscriptionService; import org.onosproject.kafkaintegration.api.dto.EventSubscriber;
import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.kafkaintegration.api.*; import org.onosproject.kafkaintegration.api.dto.*;
[ "java.io", "javax.ws", "org.onosproject.kafkaintegration" ]
java.io; javax.ws; org.onosproject.kafkaintegration;
682,844
public void refreshProperties() throws ControlPanelException { Log.d(TAG, "Retreive the " + elementType + " properties, object path: '" + objectPath + "'"); Map<String, Variant> props; try { props = properties.GetAll(ifName); } catch (BusException be) { throw new ControlPanelException("Failed to ret...
void function() throws ControlPanelException { Log.d(TAG, STR + elementType + STR + objectPath + "'"); Map<String, Variant> props; try { props = properties.GetAll(ifName); } catch (BusException be) { throw new ControlPanelException(STR + ifName + STR + be.getMessage() + "'"); } catch (Exception e) { throw new ControlPa...
/** * Retrieve and set all the widget properties from the remote device * @throws ControlPanelException if failed to retrieve a property data from the remote device */
Retrieve and set all the widget properties from the remote device
refreshProperties
{ "repo_name": "ADVANTECH-Corp/node-alljoyn", "path": "alljoyn/services/controlpanel/java/ControlPanelService/src/org/alljoyn/ioe/controlpanelservice/ui/UIElement.java", "license": "apache-2.0", "size": 7886 }
[ "android.util.Log", "java.util.Map", "org.alljoyn.bus.BusException", "org.alljoyn.bus.Variant", "org.alljoyn.ioe.controlpanelservice.ControlPanelException" ]
import android.util.Log; import java.util.Map; import org.alljoyn.bus.BusException; import org.alljoyn.bus.Variant; import org.alljoyn.ioe.controlpanelservice.ControlPanelException;
import android.util.*; import java.util.*; import org.alljoyn.bus.*; import org.alljoyn.ioe.controlpanelservice.*;
[ "android.util", "java.util", "org.alljoyn.bus", "org.alljoyn.ioe" ]
android.util; java.util; org.alljoyn.bus; org.alljoyn.ioe;
2,165,416
String getFactInfo(final String name) { String query = "SELECT * FROM `" + butt.getYamlConfigurationFile().getSqlTablePrefix() + "_knowledge` WHERE item=?"; try (PreparedStatement ps = butt.getSqlManager().getPreparedStatement(query)) { if (ps != null) { p...
String getFactInfo(final String name) { String query = STR + butt.getYamlConfigurationFile().getSqlTablePrefix() + STR; try (PreparedStatement ps = butt.getSqlManager().getPreparedStatement(query)) { if (ps != null) { ps.setString(1, name); ResultSet rs = ps.executeQuery(); if (rs.next()) { int id = rs.getInt("id"); St...
/** * Retrieves the info for a fact from the database. This information consists of the fact's ID number, * the name of the fact, the person who added the fact, and the date it was added on. * @param name The name of the fact to get information for (can be an integer). * @return A String containing...
Retrieves the info for a fact from the database. This information consists of the fact's ID number, the name of the fact, the person who added the fact, and the date it was added on
getFactInfo
{ "repo_name": "proxa/IRCbutt", "path": "src/main/java/net/alureon/ircbutt/command/commands/fact/FactTable.java", "license": "gpl-3.0", "size": 11907 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
840,852
LatticeElementType combine(List<LatticeElementType> inputs);
LatticeElementType combine(List<LatticeElementType> inputs);
/** * Combines a List of inputs into a single entity. * * @param inputs The list of inputs. * * @return The combined entity. */
Combines a List of inputs into a single entity
combine
{ "repo_name": "google/binnavi", "path": "src/main/java/com/google/security/zynamics/reil/algorithms/mono2/common/interfaces/ILattice.java", "license": "apache-2.0", "size": 1342 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,387,320
AccountName myAccount = new AccountName("dez1337"); assertThat("Expect that the accountName object has the given byte representation.", CryptoUtils.HEX.encode(myAccount.toByteArray()), equalTo(EXPECTED_BYTE_REPRESENTATION)); }
AccountName myAccount = new AccountName(STR); assertThat(STR, CryptoUtils.HEX.encode(myAccount.toByteArray()), equalTo(EXPECTED_BYTE_REPRESENTATION)); }
/** * Test the * {@link eu.bittrade.libs.steemj.protocol.AccountName#toByteArray() * toByteArray()} method. * * @throws Exception * In case of a problem. */
Test the <code>eu.bittrade.libs.steemj.protocol.AccountName#toByteArray() toByteArray()</code> method
testAccountNameToByteArray
{ "repo_name": "marvin-we/steem-java-api-wrapper", "path": "core/src/test/java/eu/bittrade/libs/steemj/base/models/AccountNameTest.java", "license": "gpl-3.0", "size": 3755 }
[ "eu.bittrade.crypto.core.CryptoUtils", "eu.bittrade.libs.steemj.protocol.AccountName", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import eu.bittrade.crypto.core.CryptoUtils; import eu.bittrade.libs.steemj.protocol.AccountName; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import eu.bittrade.crypto.core.*; import eu.bittrade.libs.steemj.protocol.*; import org.hamcrest.*;
[ "eu.bittrade.crypto", "eu.bittrade.libs", "org.hamcrest" ]
eu.bittrade.crypto; eu.bittrade.libs; org.hamcrest;
1,456,527
public Date getNextValidTimeAfter(Date date) { return getTimeAfter(date); }
Date function(Date date) { return getTimeAfter(date); }
/** * Returns the next date/time <I>after</I> the given date/time which * satisfies the cron expression. * * @param date the date/time at which to begin the search for the next valid * date/time * @return the next valid date/time */
Returns the next date/time after the given date/time which satisfies the cron expression
getNextValidTimeAfter
{ "repo_name": "amckee23/drools", "path": "drools-core/src/main/java/org/drools/core/time/impl/CronExpression.java", "license": "apache-2.0", "size": 59008 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,626,727
@Test public void testPostRawResponseSimpleAction() throws Exception { Map<String, Object> actionParams = new HashMap<>(); actionParams.put("param", "some string"); ServerAction a = new ServerAction( "java://org.auraframework.components.test.java.controller.JavaTestContro...
void function() throws Exception { Map<String, Object> actionParams = new HashMap<>(); actionParams.put("param", STR); ServerAction a = new ServerAction( STRactionsSTRcontext"); assertTrue(posActions < posContex); }
/** * Test for W-2063110 this test is to verify the order of actions and context in the response we used to have * context before actions, now it's the opposite */
Test for W-2063110 this test is to verify the order of actions and context in the response we used to have context before actions, now it's the opposite
testPostRawResponseSimpleAction
{ "repo_name": "forcedotcom/aura", "path": "aura-integration-test/src/test/java/org/auraframework/integration/test/http/AuraServletHttpTest.java", "license": "apache-2.0", "size": 33269 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,468,215
protected final int getElementDepth(HTMLElements.Element element) { final boolean container = element.isContainer(); int depth = -1; for (int i = fElementStack.top - 1; i >=fragmentContextStackSize_; i--) { Info info = fElementStack.data[i]; if (info.element.code == e...
final int function(HTMLElements.Element element) { final boolean container = element.isContainer(); int depth = -1; for (int i = fElementStack.top - 1; i >=fragmentContextStackSize_; i--) { Info info = fElementStack.data[i]; if (info.element.code == element.code) { depth = fElementStack.top - i; break; } if (!container...
/** * Returns the depth of the open tag associated with the specified * element name or -1 if no matching element is found. * * @param element The element. */
Returns the depth of the open tag associated with the specified element name or -1 if no matching element is found
getElementDepth
{ "repo_name": "spinn3r/boilerpipe-failed-fork", "path": "src/main/java/org/cyberneko/html/HTMLTagBalancer.java", "license": "apache-2.0", "size": 48644 }
[ "org.cyberneko.html.HTMLElements" ]
import org.cyberneko.html.HTMLElements;
import org.cyberneko.html.*;
[ "org.cyberneko.html" ]
org.cyberneko.html;
2,749,189
public static final InetAddress long2InetAddress(long val) { if ((val < 0) || (val > 0xFFFFFFFFL)) { // TODO exception ??? } return int2InetAddress((int) val); }
static final InetAddress function(long val) { if ((val < 0) (val > 0xFFFFFFFFL)) { } return int2InetAddress((int) val); }
/** * Converts 32 bits int packaged into a 64bits long to IPv4 <tt>InetAddress</tt>. * * @param val int representation of IPv4 address * @return the address object */
Converts 32 bits int packaged into a 64bits long to IPv4 InetAddress
long2InetAddress
{ "repo_name": "bubblecloud/dhcp4java", "path": "src/main/java/org/dhcp4java/Util.java", "license": "gpl-3.0", "size": 3364 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
2,453,014
RESULT_TYPE visitEquityOptionDefinition(EquityOptionDefinition option);
RESULT_TYPE visitEquityOptionDefinition(EquityOptionDefinition option);
/** * Equity option method. * @param option An equity option * @return The result */
Equity option method
visitEquityOptionDefinition
{ "repo_name": "jerome79/OG-Platform", "path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/InstrumentDefinitionVisitor.java", "license": "apache-2.0", "size": 78879 }
[ "com.opengamma.analytics.financial.equity.option.EquityOptionDefinition" ]
import com.opengamma.analytics.financial.equity.option.EquityOptionDefinition;
import com.opengamma.analytics.financial.equity.option.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
2,216,984
public OutputStream createBinaryFile(String typename) throws IOException { if (verbose) System.err.println("created binary: " + typename); // KHK: for now the typename will already be a relative filename for the binary //String filename = typename.replace('.', File.separatorC...
OutputStream function(String typename) throws IOException { if (verbose) System.err.println(STR + typename); File source = new File(classdir, typename); source.getParentFile().mkdirs(); return new FileOutputStream( source ); }
/** * Creates a new schema binary file (.xsb) and returns a stream for writing to it. * * @param typename fully qualified type name * @return a stream to write the type to * @throws java.io.IOException */
Creates a new schema binary file (.xsb) and returns a stream for writing to it
createBinaryFile
{ "repo_name": "crow-misia/xmlbeans", "path": "src/typeimpl/org/apache/xmlbeans/impl/util/FilerImpl.java", "license": "apache-2.0", "size": 6880 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStream" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,004,928
public CrossingSchemeDescriptor extendBoundsUponCrossing(CrossingSchemeDescriptor curBounds, CrossingScheme scheme){ return curBounds; }
CrossingSchemeDescriptor function(CrossingSchemeDescriptor curBounds, CrossingScheme scheme){ return curBounds; }
/** * Heuristically extend computed bounds when combining the given scheme with any arbitrary other scheme. * * @param curBounds currently computed bounds * @param scheme scheme to be extended by combining it with any other scheme * @return heuristically extended bounds */
Heuristically extend computed bounds when combining the given scheme with any arbitrary other scheme
extendBoundsUponCrossing
{ "repo_name": "hdbeukel/genestacker", "path": "Genestacker/Genestacker-lib/src/main/java/org/ugent/caagt/genestacker/search/bb/heuristics/Heuristic.java", "license": "apache-2.0", "size": 6459 }
[ "org.ugent.caagt.genestacker.search.CrossingScheme", "org.ugent.caagt.genestacker.search.CrossingSchemeDescriptor" ]
import org.ugent.caagt.genestacker.search.CrossingScheme; import org.ugent.caagt.genestacker.search.CrossingSchemeDescriptor;
import org.ugent.caagt.genestacker.search.*;
[ "org.ugent.caagt" ]
org.ugent.caagt;
2,836,632
public void setDestdir(File destDir) { this.destDir = destDir; }
void function(File destDir) { this.destDir = destDir; }
/** * Set the destination directory into which the Java source * files should be compiled. * * @param destDir the destination director */
Set the destination directory into which the Java source files should be compiled
setDestdir
{ "repo_name": "avafanasiev/groovy", "path": "subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java", "license": "apache-2.0", "size": 46635 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,559,950
protected void actionPerformed(GuiButton button) throws IOException { if (button.enabled) { GuiListExtended.IGuiListEntry guilistextended$iguilistentry = this.serverListSelector.getSelected() < 0 ? null : this.serverListSelector.getListEntry(this.serverListSelector.getSelected()); ...
void function(GuiButton button) throws IOException { if (button.enabled) { GuiListExtended.IGuiListEntry guilistextended$iguilistentry = this.serverListSelector.getSelected() < 0 ? null : this.serverListSelector.getListEntry(this.serverListSelector.getSelected()); if (button.id == 2 && guilistextended$iguilistentry ins...
/** * Called by the controls from the buttonList when activated. (Mouse pressed for buttons) */
Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
actionPerformed
{ "repo_name": "Severed-Infinity/technium", "path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/GuiMultiplayer.java", "license": "gpl-3.0", "size": 19446 }
[ "java.io.IOException", "net.minecraft.client.multiplayer.ServerData", "net.minecraft.client.resources.I18n" ]
import java.io.IOException; import net.minecraft.client.multiplayer.ServerData; import net.minecraft.client.resources.I18n;
import java.io.*; import net.minecraft.client.multiplayer.*; import net.minecraft.client.resources.*;
[ "java.io", "net.minecraft.client" ]
java.io; net.minecraft.client;
2,781,982
@Message(id = 179, value = " Could not lookup jndi name: %s") RuntimeException failToLookupJNDI(String name, @Cause Throwable e);
@Message(id = 179, value = STR) RuntimeException failToLookupJNDI(String name, @Cause Throwable e);
/** * Creates an exception indicating the NamespaceContextSelector was not set * * @param name the jndi name * @param e cause of the exception * @return a {@link RuntimeException} for the error. */
Creates an exception indicating the NamespaceContextSelector was not set
failToLookupJNDI
{ "repo_name": "golovnin/wildfly", "path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java", "license": "lgpl-2.1", "size": 147179 }
[ "org.jboss.logging.annotations.Cause", "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
1,150,589
private void validateRuleDependency(ConfiguredTarget prerequisite, Attribute attribute) { Set<String> unfulfilledRequirements = new LinkedHashSet<>(); if (checkRuleDependencyClass(prerequisite, attribute, unfulfilledRequirements)) { return; } if (checkRuleDependencyClassWarnings(pr...
void function(ConfiguredTarget prerequisite, Attribute attribute) { Set<String> unfulfilledRequirements = new LinkedHashSet<>(); if (checkRuleDependencyClass(prerequisite, attribute, unfulfilledRequirements)) { return; } if (checkRuleDependencyClassWarnings(prerequisite, attribute)) { return; } if (checkRuleDependencyM...
/** * Because some rules still have to use allowedRuleClasses to do rule dependency validation. A * dependency is valid if it is from a rule in allowedRuledClasses, OR if all of the providers * in requiredProviders are provided by the target. */
Because some rules still have to use allowedRuleClasses to do rule dependency validation. A dependency is valid if it is from a rule in allowedRuledClasses, OR if all of the providers in requiredProviders are provided by the target
validateRuleDependency
{ "repo_name": "damienmg/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java", "license": "apache-2.0", "size": 78605 }
[ "com.google.devtools.build.lib.packages.Attribute", "com.google.devtools.build.lib.util.StringUtil", "java.util.LinkedHashSet", "java.util.Set" ]
import com.google.devtools.build.lib.packages.Attribute; import com.google.devtools.build.lib.util.StringUtil; import java.util.LinkedHashSet; import java.util.Set;
import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.util.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
542,094
@Override public String toString() { StringBuilder result = new StringBuilder(1000) // .append(super.toString()) // .append("\nCoverage: ").append(coverage) // .append("\nUnits: \n"); for(CLIQUEUnit denseUnit : denseUnits) { result.append(" ").append(denseUnit.toString()) // ...
String function() { StringBuilder result = new StringBuilder(1000) .append(STR).append(coverage) for(CLIQUEUnit denseUnit : denseUnits) { result.append(" ").append(denseUnit.toString()) } return result.toString(); } public static final Comparator<CLIQUESubspace> BY_COVERAGE = (s1, s2) -> Integer.compare(s2.getCoverage(...
/** * Calls the super method and adds additionally the coverage, and the dense * units of this subspace. */
Calls the super method and adds additionally the coverage, and the dense units of this subspace
toString
{ "repo_name": "elki-project/elki", "path": "elki-clustering/src/main/java/elki/clustering/subspace/clique/CLIQUESubspace.java", "license": "agpl-3.0", "size": 7938 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
2,411,811
public T beanio(String mapping, String streamName) { BeanioDataFormat dataFormat = new BeanioDataFormat(); dataFormat.setMapping(mapping); dataFormat.setStreamName(streamName); return dataFormat(dataFormat); }
T function(String mapping, String streamName) { BeanioDataFormat dataFormat = new BeanioDataFormat(); dataFormat.setMapping(mapping); dataFormat.setStreamName(streamName); return dataFormat(dataFormat); }
/** * Uses the beanio data format */
Uses the beanio data format
beanio
{ "repo_name": "jarst/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 39484 }
[ "org.apache.camel.model.dataformat.BeanioDataFormat" ]
import org.apache.camel.model.dataformat.BeanioDataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
332,886
@Test public void typeReturnsCorrectValues() { assertThat(type.getNum(), is(num)); assertThat(type.getResId(), is(resId)); assertThat(type.getName(), is(name)); }
void function() { assertThat(type.getNum(), is(num)); assertThat(type.getResId(), is(resId)); assertThat(type.getName(), is(name)); }
/** * Tests that the current {@link #type}'s getters will returns the correct values. */
Tests that the current <code>#type</code>'s getters will returns the correct values
typeReturnsCorrectValues
{ "repo_name": "bkromhout/Minerva", "path": "app/src/test/java/com/bkromhout/minerva/enums/BookCardTypeTest.java", "license": "apache-2.0", "size": 2667 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
2,187,775
private Set<String> getVariablesManagedByForLoop(DetailAST ast) { final Set<String> initializedVariables = getForInitVariables(ast); final Set<String> iteratingVariables = getForIteratorVariables(ast); return Sets.intersection(initializedVariables, iteratingVariables); }
Set<String> function(DetailAST ast) { final Set<String> initializedVariables = getForInitVariables(ast); final Set<String> iteratingVariables = getForIteratorVariables(ast); return Sets.intersection(initializedVariables, iteratingVariables); }
/** * Determines which variable are specific to for loop and should not be * change by inner loop body. * @param ast For Loop * @return Set of Variable Name which are managed by for */
Determines which variable are specific to for loop and should not be change by inner loop body
getVariablesManagedByForLoop
{ "repo_name": "naver/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ModifiedControlVariableCheck.java", "license": "lgpl-2.1", "size": 14454 }
[ "com.google.common.collect.Sets", "com.puppycrawl.tools.checkstyle.api.DetailAST", "java.util.Set" ]
import com.google.common.collect.Sets; import com.puppycrawl.tools.checkstyle.api.DetailAST; import java.util.Set;
import com.google.common.collect.*; import com.puppycrawl.tools.checkstyle.api.*; import java.util.*;
[ "com.google.common", "com.puppycrawl.tools", "java.util" ]
com.google.common; com.puppycrawl.tools; java.util;
1,166,197
private void sendDemoReminder() { if (this.demoEndedReminder > 100) { this.thisPlayerMP.addChatMessage(new TextComponentTranslation("demo.reminder", new Object[0])); this.demoEndedReminder = 0; } }
void function() { if (this.demoEndedReminder > 100) { this.thisPlayerMP.addChatMessage(new TextComponentTranslation(STR, new Object[0])); this.demoEndedReminder = 0; } }
/** * Sends a message to the player reminding them that this is the demo version */
Sends a message to the player reminding them that this is the demo version
sendDemoReminder
{ "repo_name": "boredherobrine13/morefuelsmod-1.10", "path": "build/tmp/recompileMc/sources/net/minecraft/world/demo/DemoWorldManager.java", "license": "lgpl-2.1", "size": 4240 }
[ "net.minecraft.util.text.TextComponentTranslation" ]
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.*;
[ "net.minecraft.util" ]
net.minecraft.util;
1,615,058
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) { // 'requiredFeatures', 'requiredExtensions' and 'systemLanguage' if (!SVGUtilities.matchUserAgent(e, ctx.getUserAgent())) { return null; } CompositeGraphicsNode cgn = new CompositeGraphicsNode(); ...
GraphicsNode function(BridgeContext ctx, Element e) { if (!SVGUtilities.matchUserAgent(e, ctx.getUserAgent())) { return null; } CompositeGraphicsNode cgn = new CompositeGraphicsNode(); String s = e.getAttributeNS(null, SVG_TRANSFORM_ATTRIBUTE); if (s.length() != 0) { cgn.setTransform (SVGUtilities.convertTransform(e, S...
/** * Creates a <tt>GraphicsNode</tt> according to the specified parameters. * * @param ctx the bridge context to use * @param e the element that describes the graphics node to build * @return a graphics node that represents the specified element */
Creates a GraphicsNode according to the specified parameters
createGraphicsNode
{ "repo_name": "iconfinder/batik", "path": "sources/org/apache/batik/bridge/svg12/SVGFlowRootElementBridge.java", "license": "apache-2.0", "size": 36996 }
[ "java.awt.RenderingHints", "org.apache.batik.bridge.BridgeContext", "org.apache.batik.bridge.CSSUtilities", "org.apache.batik.bridge.SVGUtilities", "org.apache.batik.gvt.CompositeGraphicsNode", "org.apache.batik.gvt.GraphicsNode", "org.apache.batik.gvt.flow.FlowTextNode", "org.w3c.dom.Element", "org...
import java.awt.RenderingHints; import org.apache.batik.bridge.BridgeContext; import org.apache.batik.bridge.CSSUtilities; import org.apache.batik.bridge.SVGUtilities; import org.apache.batik.gvt.CompositeGraphicsNode; import org.apache.batik.gvt.GraphicsNode; import org.apache.batik.gvt.flow.FlowTextNode; import org.w...
import java.awt.*; import org.apache.batik.bridge.*; import org.apache.batik.gvt.*; import org.apache.batik.gvt.flow.*; import org.w3c.dom.*;
[ "java.awt", "org.apache.batik", "org.w3c.dom" ]
java.awt; org.apache.batik; org.w3c.dom;
380,779
//------------------------------------------------------------------------- public MultiCurrencyAmount currencyExposure( ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities) { CurrencyAmount ceCapFloorLeg = capFloorLegPricer.present...
MultiCurrencyAmount function( ResolvedIborCapFloor capFloor, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities) { CurrencyAmount ceCapFloorLeg = capFloorLegPricer.presentValue(capFloor.getCapFloorLeg(), ratesProvider, volatilities); if (!capFloor.getPayLeg().isPresent()) { return MultiCurrencyAmo...
/** * Calculates the currency exposure of the Ibor cap/floor product. * * @param capFloor the Ibor cap/floor product * @param ratesProvider the rates provider * @param volatilities the volatilities * @return the currency exposure */
Calculates the currency exposure of the Ibor cap/floor product
currencyExposure
{ "repo_name": "OpenGamma/Strata", "path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/capfloor/VolatilityIborCapFloorProductPricer.java", "license": "apache-2.0", "size": 12155 }
[ "com.opengamma.strata.basics.currency.CurrencyAmount", "com.opengamma.strata.basics.currency.MultiCurrencyAmount", "com.opengamma.strata.pricer.rate.RatesProvider", "com.opengamma.strata.product.capfloor.ResolvedIborCapFloor" ]
import com.opengamma.strata.basics.currency.CurrencyAmount; import com.opengamma.strata.basics.currency.MultiCurrencyAmount; import com.opengamma.strata.pricer.rate.RatesProvider; import com.opengamma.strata.product.capfloor.ResolvedIborCapFloor;
import com.opengamma.strata.basics.currency.*; import com.opengamma.strata.pricer.rate.*; import com.opengamma.strata.product.capfloor.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
2,492,043
public boolean areBiomesViable(int x, int z, int radius, List<Biome> allowed) { IntCache.resetIntCache(); int i = x - radius >> 2; int j = z - radius >> 2; int k = x + radius >> 2; int l = z + radius >> 2; int i1 = k - i + 1; int j1 = l - j + 1; ...
boolean function(int x, int z, int radius, List<Biome> allowed) { IntCache.resetIntCache(); int i = x - radius >> 2; int j = z - radius >> 2; int k = x + radius >> 2; int l = z + radius >> 2; int i1 = k - i + 1; int j1 = l - j + 1; int[] aint = this.genBiomes.getInts(i, j, i1, j1); try { for (int k1 = 0; k1 < i1 * j1; ...
/** * checks given Chunk's Biomes against List of allowed ones */
checks given Chunk's Biomes against List of allowed ones
areBiomesViable
{ "repo_name": "lucemans/ShapeClient-SRC", "path": "net/minecraft/world/biome/BiomeProvider.java", "license": "mpl-2.0", "size": 8072 }
[ "java.util.List", "net.minecraft.crash.CrashReport", "net.minecraft.crash.CrashReportCategory", "net.minecraft.util.ReportedException", "net.minecraft.world.gen.layer.IntCache" ]
import java.util.List; import net.minecraft.crash.CrashReport; import net.minecraft.crash.CrashReportCategory; import net.minecraft.util.ReportedException; import net.minecraft.world.gen.layer.IntCache;
import java.util.*; import net.minecraft.crash.*; import net.minecraft.util.*; import net.minecraft.world.gen.layer.*;
[ "java.util", "net.minecraft.crash", "net.minecraft.util", "net.minecraft.world" ]
java.util; net.minecraft.crash; net.minecraft.util; net.minecraft.world;
1,794,378
public boolean closeWindow () { // avoid repeated calls to "dispose" if already closed if (isClosed()) return false; final Window w=getWindow(); if (null == w) return false; w.dispose(); setClosed(true); return true; }
boolean function () { if (isClosed()) return false; final Window w=getWindow(); if (null == w) return false; w.dispose(); setClosed(true); return true; }
/** * Closes the tracked {@link Window} if available and not already closed. * @return TRUE if called {@link Window#dispose()}. If so, the it also calls * {@link #setClosed(boolean)} with TRUE to avoid re-closing the window. */
Closes the tracked <code>Window</code> if available and not already closed
closeWindow
{ "repo_name": "lgoldstein/communitychest", "path": "chest/gui/awt/src/main/java/net/community/chest/awt/window/EscapeKeyWindowCloser.java", "license": "apache-2.0", "size": 2254 }
[ "java.awt.Window" ]
import java.awt.Window;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,690,961
void init(Map<String, String> writerOptions);
void init(Map<String, String> writerOptions);
/** * Initialize the writer. * * @param writerOptions Contains key, value pair of settings. * @throws IOException */
Initialize the writer
init
{ "repo_name": "apache/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/StatisticsRecordWriter.java", "license": "apache-2.0", "size": 1963 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,294,139
@Override public boolean answerSplitNodeQuestion(String nodeName) throws UnsupportedOperationException { if (NODE_ASSOCIATED_WITH_ELECTRONIC_PAYMENT.equals(nodeName)) { if (ArConstants.PaymentMediumCode.WIRE_TRANSFER.equals(getCustomerPaymentMediumCode())) { return true; ...
boolean function(String nodeName) throws UnsupportedOperationException { if (NODE_ASSOCIATED_WITH_ELECTRONIC_PAYMENT.equals(nodeName)) { if (ArConstants.PaymentMediumCode.WIRE_TRANSFER.equals(getCustomerPaymentMediumCode())) { return true; } else { return false; } } return super.answerSplitNodeQuestion(nodeName); }
/** * Answers true when document payment medium is WIRE transfer * * @see org.kuali.kfs.sys.document.FinancialSystemTransactionalDocumentBase#answerSplitNodeQuestion(java.lang.String) */
Answers true when document payment medium is WIRE transfer
answerSplitNodeQuestion
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/ar/document/CashControlDocument.java", "license": "apache-2.0", "size": 27714 }
[ "org.kuali.kfs.module.ar.ArConstants" ]
import org.kuali.kfs.module.ar.ArConstants;
import org.kuali.kfs.module.ar.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
119,022
private static File getRootDir() { return new File(Hudson.getInstance().getRootDir(), "users"); }
static File function() { return new File(Hudson.getInstance().getRootDir(), "users"); }
/** * Gets the directory where Hudson stores user information. */
Gets the directory where Hudson stores user information
getRootDir
{ "repo_name": "fujibee/hudson", "path": "core/src/main/java/hudson/model/User.java", "license": "mit", "size": 16778 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
315,124
public CommunityGalleryImageVersionProperties withPublishedDate(OffsetDateTime publishedDate) { this.publishedDate = publishedDate; return this; }
CommunityGalleryImageVersionProperties function(OffsetDateTime publishedDate) { this.publishedDate = publishedDate; return this; }
/** * Set the publishedDate property: The published date of the gallery image version Definition. This property can be * used for decommissioning purposes. This property is updatable. * * @param publishedDate the publishedDate value to set. * @return the CommunityGalleryImageVersionProperties o...
Set the publishedDate property: The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable
withPublishedDate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageVersionProperties.java", "license": "mit", "size": 2892 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,597,839
public void drawDomainLine(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value, Paint paint, Stroke stroke) { Range range = axis.getRange(); if (!range.contains(value)) { return; } PlotOrientation orientation = plot.getOrie...
void function(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value, Paint paint, Stroke stroke) { Range range = axis.getRange(); if (!range.contains(value)) { return; } PlotOrientation orientation = plot.getOrientation(); Line2D line = null; double v = axis.valueToJava2D(value, dataArea, plot....
/** * Draws a line perpendicular to the domain axis. * * @param g2 the graphics device. * @param plot the plot. * @param axis the value axis. * @param dataArea the area for plotting data (not yet adjusted for any 3D * effect). * @param value the valu...
Draws a line perpendicular to the domain axis
drawDomainLine
{ "repo_name": "SOCR/HTML5_WebSite", "path": "SOCR2.8/src/jfreechart/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java", "license": "lgpl-3.0", "size": 70354 }
[ "java.awt.Graphics2D", "java.awt.Paint", "java.awt.Stroke", "java.awt.geom.Line2D", "java.awt.geom.Rectangle2D", "org.jfree.chart.axis.ValueAxis", "org.jfree.chart.plot.PlotOrientation", "org.jfree.chart.plot.XYPlot", "org.jfree.data.Range" ]
import java.awt.Graphics2D; import java.awt.Paint; import java.awt.Stroke; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; import org.jfree.data.Range;
import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.data.*;
[ "java.awt", "org.jfree.chart", "org.jfree.data" ]
java.awt; org.jfree.chart; org.jfree.data;
2,662,268
public synchronized void removeActiveStatement(IntermediateStatement statement) { if (activeStatementsMap.get(this.connectionId) == statement) { activeStatementsMap.remove(this.connectionId); } }
synchronized void function(IntermediateStatement statement) { if (activeStatementsMap.get(this.connectionId) == statement) { activeStatementsMap.remove(this.connectionId); } }
/** * Remove a statement from the buffer if it is currently executing. For more information on this * use-case, read addActiveStatement comment. * * @param statement The statement to be removed. */
Remove a statement from the buffer if it is currently executing. For more information on this use-case, read addActiveStatement comment
removeActiveStatement
{ "repo_name": "cloudspannerecosystem/pgadapter", "path": "src/main/java/com/google/cloud/spanner/pgadapter/ConnectionHandler.java", "license": "apache-2.0", "size": 12762 }
[ "com.google.cloud.spanner.pgadapter.statements.IntermediateStatement" ]
import com.google.cloud.spanner.pgadapter.statements.IntermediateStatement;
import com.google.cloud.spanner.pgadapter.statements.*;
[ "com.google.cloud" ]
com.google.cloud;
2,061,960
private ActionEnvironment setupTestEnvironment() { // We make a copy first to remove duplicate entries; last one wins. Map<String, String> testEnv = new HashMap<>(); for (Map.Entry<String, String> entry : options.testEnvironment) { testEnv.put(entry.getKey(), entry.getValue()); } return Acti...
ActionEnvironment function() { Map<String, String> testEnv = new HashMap<>(); for (Map.Entry<String, String> entry : options.testEnvironment) { testEnv.put(entry.getKey(), entry.getValue()); } return ActionEnvironment.split(testEnv); }
/** * Compute the test environment, which, at configuration level, is a pair consisting of the * statically set environment variables with their values and the set of environment variables to * be inherited from the client environment. */
Compute the test environment, which, at configuration level, is a pair consisting of the statically set environment variables with their values and the set of environment variables to be inherited from the client environment
setupTestEnvironment
{ "repo_name": "davidzchen/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java", "license": "apache-2.0", "size": 34056 }
[ "com.google.devtools.build.lib.actions.ActionEnvironment", "java.util.HashMap", "java.util.Map" ]
import com.google.devtools.build.lib.actions.ActionEnvironment; import java.util.HashMap; import java.util.Map;
import com.google.devtools.build.lib.actions.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
1,014,751
@Nullable private ScanQuery toScanQuery(final QueryFeatureInspector queryFeatureInspector) { if (grouping != null) { // Scan cannot GROUP BY. return null; } if (outputRowSignature.size() == 0) { // Should never do a scan query without any columns that we're interested in. This is pr...
ScanQuery function(final QueryFeatureInspector queryFeatureInspector) { if (grouping != null) { return null; } if (outputRowSignature.size() == 0) { throw new ISE(STR); } final Pair<DataSource, Filtration> dataSourceFiltrationPair = getFiltration( dataSource, filter, virtualColumnRegistry ); final DataSource newDataSou...
/** * Return this query as a Scan query, or null if this query is not compatible with Scan. * * @return query or null */
Return this query as a Scan query, or null if this query is not compatible with Scan
toScanQuery
{ "repo_name": "nishantmonu51/druid", "path": "sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java", "license": "apache-2.0", "size": 44500 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableSortedMap", "java.util.Collections", "java.util.List", "java.util.SortedSet", "java.util.TreeSet", "java.util.stream.Collectors", "org.apache.druid.java.util.common.Pair", "org.apache.druid.query.DataSource", "org.apach...
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSortedMap; import java.util.Collections; import java.util.List; import java.util.SortedSet; import java.util.TreeSet; import java.util.stream.Collectors; import org.apache.druid.java.util.common.Pair; import org.apache.druid.query...
import com.google.common.collect.*; import java.util.*; import java.util.stream.*; import org.apache.druid.java.util.common.*; import org.apache.druid.query.*; import org.apache.druid.query.groupby.orderby.*; import org.apache.druid.query.scan.*; import org.apache.druid.segment.column.*; import org.apache.druid.sql.cal...
[ "com.google.common", "java.util", "org.apache.druid" ]
com.google.common; java.util; org.apache.druid;
1,017,209
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, JSONException { JSONObject jsonResponse = new JSONObject(); Answer ans = new Answer(); PolicyFactory policy = Sanitizers.FORMATTING.and(Sanitizers.LINKS);...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, JSONException { JSONObject jsonResponse = new JSONObject(); Answer ans = new Answer(); PolicyFactory policy = Sanitizers.FORMATTING.and(Sanitizers.LINKS); response.setContentType(STR); ServletUtil.servletStart(...
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "cerberustesting/cerberus-source", "path": "source/src/main/java/org/cerberus/servlet/crud/test/DeleteTest.java", "license": "gpl-3.0", "size": 12082 }
[ "java.io.IOException", "java.util.Collection", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.cerberus.crud.entity.Test", "org.cerberus.crud.entity.TestCaseStep", "org.cerberus.crud.service.IParameterService", "org.cerberus.c...
import java.io.IOException; import java.util.Collection; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.cerberus.crud.entity.Test; import org.cerberus.crud.entity.TestCaseStep; import org.cerberus.crud.service.IParameterServ...
import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.cerberus.crud.entity.*; import org.cerberus.crud.service.*; import org.cerberus.engine.entity.*; import org.cerberus.enums.*; import org.cerberus.util.*; import org.cerberus.util.answer.*; import org.cerberus.util.serv...
[ "java.io", "java.util", "javax.servlet", "org.cerberus.crud", "org.cerberus.engine", "org.cerberus.enums", "org.cerberus.util", "org.json", "org.owasp.html", "org.springframework.context", "org.springframework.web" ]
java.io; java.util; javax.servlet; org.cerberus.crud; org.cerberus.engine; org.cerberus.enums; org.cerberus.util; org.json; org.owasp.html; org.springframework.context; org.springframework.web;
261,861
public Expectation not() { return new Expectation(Predicate::negate); }
Expectation function() { return new Expectation(Predicate::negate); }
/** * Creates a new Expectation that will negates the given predicates. * * @return a new Expectation that negates every given predicate */
Creates a new Expectation that will negates the given predicates
not
{ "repo_name": "devnull-tools/kodo", "path": "src/main/java/io/backpackcloud/kodo/Expectation.java", "license": "mit", "size": 7370 }
[ "java.util.function.Predicate" ]
import java.util.function.Predicate;
import java.util.function.*;
[ "java.util" ]
java.util;
1,566,698
public void readout(final Marker marker, final String message, final Object p0, final Object p1, final Object p2, final Object p3) { logger.logIfEnabled(FQCN, READOUT, marker, message, p0, p1, p2, p3); }
void function(final Marker marker, final String message, final Object p0, final Object p1, final Object p2, final Object p3) { logger.logIfEnabled(FQCN, READOUT, marker, message, p0, p1, p2, p3); }
/** * Logs a message with parameters at the {@code READOUT} level. * * @param marker the marker data specific to this log statement * @param message the message to log; the format depends on the message factory. * @param p0 parameter to the message. * @param p1 parameter to the message. ...
Logs a message with parameters at the READOUT level
readout
{ "repo_name": "Betalord/BHBot", "path": "src/main/java/BHBotLogger.java", "license": "gpl-3.0", "size": 177002 }
[ "org.apache.logging.log4j.Marker" ]
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.*;
[ "org.apache.logging" ]
org.apache.logging;
1,153,294
public SolrQuery addHighlightField(String f) { this.add(HighlightParams.FIELDS, f); this.set(HighlightParams.HIGHLIGHT, true); return this; }
SolrQuery function(String f) { this.add(HighlightParams.FIELDS, f); this.set(HighlightParams.HIGHLIGHT, true); return this; }
/** add highlight field * * @param f field to enable for highlighting */
add highlight field
addHighlightField
{ "repo_name": "q474818917/solr-5.2.0", "path": "solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java", "license": "apache-2.0", "size": 31331 }
[ "org.apache.solr.common.params.HighlightParams" ]
import org.apache.solr.common.params.HighlightParams;
import org.apache.solr.common.params.*;
[ "org.apache.solr" ]
org.apache.solr;
909,580
public boolean getXmlSpace() { return m_defaultSpace; } private List m_declaredPrefixes;
boolean function() { return m_defaultSpace; } private List m_declaredPrefixes;
/** * Get the "xml:space" attribute. * A text node is preserved if an ancestor element of the text node * has an xml:space attribute with a value of preserve, and * no closer ancestor element has xml:space with a value of default. * @see <a href="http://www.w3.org/TR/xslt#strip">strip in XSLT Specificati...
Get the "xml:space" attribute. A text node is preserved if an ancestor element of the text node has an xml:space attribute with a value of preserve, and no closer ancestor element has xml:space with a value of default
getXmlSpace
{ "repo_name": "mirego/j2objc", "path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java", "license": "apache-2.0", "size": 44686 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,484,589
public void setProgressBarIndeterminate(final boolean value) { if (SwingUtilities.isEventDispatchThread()) { progressBar.setIndeterminate(value); } else { SwingUtilities.invokeLater(() -> progressBar.setIndeterminate(value)); } }
void function(final boolean value) { if (SwingUtilities.isEventDispatchThread()) { progressBar.setIndeterminate(value); } else { SwingUtilities.invokeLater(() -> progressBar.setIndeterminate(value)); } }
/** * Sets the indeterminate status of the progress bar. * <p> * If not called on the event dispatch thread, this method uses * SwingUtilities.invokeLater() to do the actual operation on the EDT. */
Sets the indeterminate status of the progress bar. If not called on the event dispatch thread, this method uses SwingUtilities.invokeLater() to do the actual operation on the EDT
setProgressBarIndeterminate
{ "repo_name": "alanbrandini/DC-UFSCar-ES2-201701-Grupo01", "path": "src/main/java/org/jabref/gui/JabRefFrame.java", "license": "mit", "size": 104361 }
[ "javax.swing.SwingUtilities" ]
import javax.swing.SwingUtilities;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
907,695
@Override public PointF getCenterOffsets() { return mViewPortHandler.getContentCenter(); }
PointF function() { return mViewPortHandler.getContentCenter(); }
/** * Returns the center of the chart taking offsets under consideration. * (returns the center of the content rectangle) * * @return */
Returns the center of the chart taking offsets under consideration. (returns the center of the content rectangle)
getCenterOffsets
{ "repo_name": "CarpOrange/CarpDoctor", "path": "MPChartLib/src/com/github/mikephil/charting/charts/Chart.java", "license": "apache-2.0", "size": 47412 }
[ "android.graphics.PointF" ]
import android.graphics.PointF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
273,464
public static String getResourceString(final String key) { final ResourceBundle bundle = DebriefPlugin.getDefault() .getResourceBundle(); try { return (bundle != null) ? bundle.getString(key) : key; } catch (final MissingResourceException e) { return key; } }
static String function(final String key) { final ResourceBundle bundle = DebriefPlugin.getDefault() .getResourceBundle(); try { return (bundle != null) ? bundle.getString(key) : key; } catch (final MissingResourceException e) { return key; } }
/** * Returns the string from the plugin's resource bundle, or 'key' if not * found. */
Returns the string from the plugin's resource bundle, or 'key' if not found
getResourceString
{ "repo_name": "pecko/debrief", "path": "org.mwc.debrief.core/src/org/mwc/debrief/core/DebriefPlugin.java", "license": "epl-1.0", "size": 11215 }
[ "java.util.MissingResourceException", "java.util.ResourceBundle" ]
import java.util.MissingResourceException; import java.util.ResourceBundle;
import java.util.*;
[ "java.util" ]
java.util;
259,311
EClass getForStatement();
EClass getForStatement();
/** * Returns the meta object for class '{@link org.xtext.example.delphi.astm.ForStatement <em>For Statement</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>For Statement</em>'. * @see org.xtext.example.delphi.astm.ForStatement * @generated */
Returns the meta object for class '<code>org.xtext.example.delphi.astm.ForStatement For Statement</code>'.
getForStatement
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/emf-gen/org/xtext/example/delphi/astm/AstmPackage.java", "license": "epl-1.0", "size": 670467 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,037,354
public Map<String, Map<String, Object>> getEventTypesNestableMapEvents();
Map<String, Map<String, Object>> function();
/** * Returns a map keyed by event type name, and values being the definition for the * event type of the property names and types that make up the event, * for nestable, strongly-typed Map-based event representations. * @return map of event type name and definition of event properties */
Returns a map keyed by event type name, and values being the definition for the event type of the property names and types that make up the event, for nestable, strongly-typed Map-based event representations
getEventTypesNestableMapEvents
{ "repo_name": "intelie/esper", "path": "esper/src/main/java/com/espertech/esper/client/ConfigurationInformation.java", "license": "gpl-2.0", "size": 7775 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,215,867
public List<Customer> findAll( );
List<Customer> function( );
/** * Get all the Customers from the store. * * @return A list with all the customers from the store. */
Get all the Customers from the store
findAll
{ "repo_name": "Seiferxx/e-commerce-rest-api", "path": "java/src/main/java/org/juanitodread/ecommercerest/model/dao/CustomerDao.java", "license": "apache-2.0", "size": 2210 }
[ "java.util.List", "org.juanitodread.ecommercerest.model.domain.Customer" ]
import java.util.List; import org.juanitodread.ecommercerest.model.domain.Customer;
import java.util.*; import org.juanitodread.ecommercerest.model.domain.*;
[ "java.util", "org.juanitodread.ecommercerest" ]
java.util; org.juanitodread.ecommercerest;
570,457
public Enumeration getLocales() { synchronized (locales) { if (locales.size() > 0) return (new Enumerator(locales)); } ArrayList results = new ArrayList(); results.add(defaultLocale); return (new Enumerator(results)); }
Enumeration function() { synchronized (locales) { if (locales.size() > 0) return (new Enumerator(locales)); } ArrayList results = new ArrayList(); results.add(defaultLocale); return (new Enumerator(results)); }
/** * Return the set of preferred Locales that the client will accept * content in, based on the values for any <code>Accept-Language</code> * headers that were encountered. If the request did not specify a * preferred language, the server's default Locale is returned. */
Return the set of preferred Locales that the client will accept content in, based on the values for any <code>Accept-Language</code> headers that were encountered. If the request did not specify a preferred language, the server's default Locale is returned
getLocales
{ "repo_name": "NorthFacing/step-by-Java", "path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/connector/RequestBase.java", "license": "gpl-2.0", "size": 21873 }
[ "java.util.ArrayList", "java.util.Enumeration", "org.apache.catalina.util.Enumerator" ]
import java.util.ArrayList; import java.util.Enumeration; import org.apache.catalina.util.Enumerator;
import java.util.*; import org.apache.catalina.util.*;
[ "java.util", "org.apache.catalina" ]
java.util; org.apache.catalina;
11,827
@Override protected void executeMojoSpec() throws MojoExecutionException, MojoFailureException { if(outputDirectory.exists()) { try { FileUtils.cleanDirectory(outputDirectory); } catch (IOException e) { throw new MojoExecutionException("Can't clean outputDirectory:" + outputDirectory); } } else {...
void function() throws MojoExecutionException, MojoFailureException { if(outputDirectory.exists()) { try { FileUtils.cleanDirectory(outputDirectory); } catch (IOException e) { throw new MojoExecutionException(STR + outputDirectory); } } else { try { FileUtils.forceMkdir(outputDirectory); } catch (IOException e) { throw...
/** * Generate DDL. * * @throws MojoExecutionException 例外 * @throws MojoFailureException 例外 */
Generate DDL
executeMojoSpec
{ "repo_name": "coastland/gsp-dba-maven-plugin", "path": "src/main/java/jp/co/tis/gsp/tools/dba/mojo/GenerateDdlMojo.java", "license": "apache-2.0", "size": 3233 }
[ "java.io.IOException", "jp.co.tis.gsp.tools.db.ObjectBrowserErParser", "jp.co.tis.gsp.tools.dba.dialect.Dialect", "jp.co.tis.gsp.tools.dba.dialect.DialectFactory", "org.apache.commons.io.FileUtils", "org.apache.maven.plugin.MojoExecutionException", "org.apache.maven.plugin.MojoFailureException" ]
import java.io.IOException; import jp.co.tis.gsp.tools.db.ObjectBrowserErParser; import jp.co.tis.gsp.tools.dba.dialect.Dialect; import jp.co.tis.gsp.tools.dba.dialect.DialectFactory; import org.apache.commons.io.FileUtils; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailur...
import java.io.*; import jp.co.tis.gsp.tools.db.*; import jp.co.tis.gsp.tools.dba.dialect.*; import org.apache.commons.io.*; import org.apache.maven.plugin.*;
[ "java.io", "jp.co.tis", "org.apache.commons", "org.apache.maven" ]
java.io; jp.co.tis; org.apache.commons; org.apache.maven;
2,239,246
public KualiInteger getSourceBaseBudgetTotal() { KualiInteger baseBudgetTotal = KualiInteger.ZERO; for (Iterator iter = sourceAccountingLines.iterator(); iter.hasNext();) { BudgetAdjustmentAccountingLine line = (BudgetAdjustmentAccountingLine) iter.next(); baseBudgetTotal = ...
KualiInteger function() { KualiInteger baseBudgetTotal = KualiInteger.ZERO; for (Iterator iter = sourceAccountingLines.iterator(); iter.hasNext();) { BudgetAdjustmentAccountingLine line = (BudgetAdjustmentAccountingLine) iter.next(); baseBudgetTotal = baseBudgetTotal.add(line.getBaseBudgetAdjustmentAmount()); } return ...
/** * Returns the total base budget amount from the source lines. * * @return KualiDecimal */
Returns the total base budget amount from the source lines
getSourceBaseBudgetTotal
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/fp/document/BudgetAdjustmentDocument.java", "license": "apache-2.0", "size": 49607 }
[ "java.util.Iterator", "org.kuali.kfs.fp.businessobject.BudgetAdjustmentAccountingLine", "org.kuali.rice.core.api.util.type.KualiInteger" ]
import java.util.Iterator; import org.kuali.kfs.fp.businessobject.BudgetAdjustmentAccountingLine; import org.kuali.rice.core.api.util.type.KualiInteger;
import java.util.*; import org.kuali.kfs.fp.businessobject.*; import org.kuali.rice.core.api.util.type.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
2,052,780
public void waitPasswordField(int timeoutDefinedByUser) { new WebDriverWait(seleniumWebDriver, timeoutDefinedByUser).until(visibilityOf(passwordInput)); }
void function(int timeoutDefinedByUser) { new WebDriverWait(seleniumWebDriver, timeoutDefinedByUser).until(visibilityOf(passwordInput)); }
/** * wait password field on Microsoft Sign in page * * @param timeoutDefinedByUser */
wait password field on Microsoft Sign in page
waitPasswordField
{ "repo_name": "codenvy/codenvy", "path": "selenium/codenvy-selenium-test/src/main/java/com/codenvy/selenium/pageobject/site/LoginVSTS.java", "license": "epl-1.0", "size": 4588 }
[ "org.openqa.selenium.support.ui.WebDriverWait" ]
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.support.ui.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,731,315
public void rollFsImage(CheckpointSignature newImageSignature) throws IOException;
void function(CheckpointSignature newImageSignature) throws IOException;
/** * Rolls the fsImage log. It removes the old fsImage, copies the * new image to fsImage, removes the old edits and renames edits.new * to edits. The call fails if any of the four files are missing. * * @param newImageSignature the signature of the new fsimage * @throws IOException */
Rolls the fsImage log. It removes the old fsImage, copies the new image to fsImage, removes the old edits and renames edits.new to edits. The call fails if any of the four files are missing
rollFsImage
{ "repo_name": "rhli/hadoop-EAR", "path": "src/hdfs/org/apache/hadoop/hdfs/server/protocol/NamenodeProtocol.java", "license": "apache-2.0", "size": 4455 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.server.namenode.CheckpointSignature" ]
import java.io.IOException; import org.apache.hadoop.hdfs.server.namenode.CheckpointSignature;
import java.io.*; import org.apache.hadoop.hdfs.server.namenode.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,642,577
public static String[] removeFromArray( String[] target, String s ) { ArrayList<String> vec = new ArrayList<String>( target.length ); for ( int i = 0; i < target.length; i++ ) { if ( !target[i].equals( s ) ) { vec.add( target[i] ); } } ...
static String[] function( String[] target, String s ) { ArrayList<String> vec = new ArrayList<String>( target.length ); for ( int i = 0; i < target.length; i++ ) { if ( !target[i].equals( s ) ) { vec.add( target[i] ); } } return vec.toArray( new String[vec.size()] ); }
/** * removes all fields from the array that equals <code>s</code> * * @param target * array where to remove the submitted string * @param s * string to remove * @return the String array with all exact occurrences of given String removed. */
removes all fields from the array that equals <code>s</code>
removeFromArray
{ "repo_name": "lat-lon/deegree2-base", "path": "deegree2-core/src/main/java/org/deegree/framework/util/StringTools.java", "license": "lgpl-2.1", "size": 28738 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,545,032
public void endGroup(Augmentations augs) throws XNIException { } // endGroup(Augmentations)
void function(Augmentations augs) throws XNIException { }
/** * The end of a group for mixed or children content models. * * @param augs Additional information that may include infoset * augmentations. * * @throws XNIException Thrown by handler to signal an error. */
The end of a group for mixed or children content models
endGroup
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/xerces/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java", "license": "gpl-2.0", "size": 30995 }
[ "org.apache.xerces.xni.Augmentations", "org.apache.xerces.xni.XNIException" ]
import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.XNIException;
import org.apache.xerces.xni.*;
[ "org.apache.xerces" ]
org.apache.xerces;
288,211
public static void recoverLocalWriteAheadLogs(FileSystem fs, ServerConfiguration serverConf) throws IOException { if (Accumulo.getAccumuloPersistentVersion(fs) == Constants.PREV_DATA_VERSION) { // If the Master has not yet signaled a finish to upgrading, we need to make sure we can rollback in the // ...
static void function(FileSystem fs, ServerConfiguration serverConf) throws IOException { if (Accumulo.getAccumuloPersistentVersion(fs) == Constants.PREV_DATA_VERSION) { Accumulo.abortIfFateTransactions(); } FileSystem localfs = FileSystem.getLocal(fs.getConf()).getRawFileSystem(); AccumuloConfiguration conf = serverCon...
/** * Copy local walogs into HDFS on an upgrade * */
Copy local walogs into HDFS on an upgrade
recoverLocalWriteAheadLogs
{ "repo_name": "phrocker/accumulo", "path": "server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java", "license": "apache-2.0", "size": 135734 }
[ "java.io.EOFException", "java.io.FileNotFoundException", "java.io.IOException", "java.util.UUID", "org.apache.accumulo.core.Constants", "org.apache.accumulo.core.conf.AccumuloConfiguration", "org.apache.accumulo.core.conf.Property", "org.apache.accumulo.server.Accumulo", "org.apache.accumulo.server....
import java.io.EOFException; import java.io.FileNotFoundException; import java.io.IOException; import java.util.UUID; import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.conf.AccumuloConfiguration; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.server.Accumulo; import o...
import java.io.*; import java.util.*; import org.apache.accumulo.core.*; import org.apache.accumulo.core.conf.*; import org.apache.accumulo.server.*; import org.apache.accumulo.server.conf.*; import org.apache.accumulo.server.logger.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*;
[ "java.io", "java.util", "org.apache.accumulo", "org.apache.hadoop" ]
java.io; java.util; org.apache.accumulo; org.apache.hadoop;
1,677,877
EReference getExpressionNode_Expression();
EReference getExpressionNode_Expression();
/** * Returns the meta object for the containment reference '{@link orgomg.cwm.foundation.expressions.ExpressionNode#getExpression <em>Expression</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Expression</em>'. * @see orgomg.cwm.foun...
Returns the meta object for the containment reference '<code>orgomg.cwm.foundation.expressions.ExpressionNode#getExpression Expression</code>'.
getExpressionNode_Expression
{ "repo_name": "dresden-ocl/dresdenocl", "path": "plugins/org.dresdenocl.tools.CWM/src/orgomg/cwm/foundation/expressions/ExpressionsPackage.java", "license": "lgpl-3.0", "size": 19417 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,865,380
List<ApplicationLogEntry> getLogEntries(ApplicationLogEntryFilter filter, Page page);
List<ApplicationLogEntry> getLogEntries(ApplicationLogEntryFilter filter, Page page);
/** * List of messages * * @param filter Filter to use * @param page Pagination instructions * @return List of entries for the filter and the page */
List of messages
getLogEntries
{ "repo_name": "nemerosa/ontrack", "path": "ontrack-model/src/main/java/net/nemerosa/ontrack/model/support/ApplicationLogService.java", "license": "mit", "size": 1118 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
433,513
protected void installListeners() { super.installListeners(); ((JMenu) menuItem).addMenuListener(menuListener); }
void function() { super.installListeners(); ((JMenu) menuItem).addMenuListener(menuListener); }
/** * Creates and registers all the listeners for this UI delegate. */
Creates and registers all the listeners for this UI delegate
installListeners
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/plaf/basic/BasicMenuUI.java", "license": "bsd-3-clause", "size": 15898 }
[ "javax.swing.JMenu" ]
import javax.swing.JMenu;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,520,520
public void sendWindowPane(int pane) { OutBuffer buffer = new OutBuffer().setOpCode(207); buffer.addLEShortA(pane); player.getChannel().write(buffer.asInput()); }
void function(int pane) { OutBuffer buffer = new OutBuffer().setOpCode(207); buffer.addLEShortA(pane); player.getChannel().write(buffer.asInput()); }
/** * Sends a window pane. * @param pane The window pane identification number. */
Sends a window pane
sendWindowPane
{ "repo_name": "instaware/Instaware", "path": "src/org/instaware/network/nexus/output/PacketSender.java", "license": "gpl-2.0", "size": 3887 }
[ "org.instaware.network.nexus.OutBuffer" ]
import org.instaware.network.nexus.OutBuffer;
import org.instaware.network.nexus.*;
[ "org.instaware.network" ]
org.instaware.network;
1,987,451
public static void saveUserToken(Context context, String username, String token) { SharedPreferences sharedPref = context.getSharedPreferences(MainActivity.PREFS_NAME, Context.MODE_PRIVATE); Editor edit = sharedPref.edit(); // Key = User ID // Value = Encrypted User Token edit.putString(PSWD.getUserId(use...
static void function(Context context, String username, String token) { SharedPreferences sharedPref = context.getSharedPreferences(MainActivity.PREFS_NAME, Context.MODE_PRIVATE); Editor edit = sharedPref.edit(); edit.putString(PSWD.getUserId(username), PSWD.encrypt(token)); edit.commit(); }
/** * Save the specified User Token for the given User * The tokens are stored in the SharedPreferences of the app (PSWD_PREFS.xml) * The key is the User ID (SHA256 hash of the User Name) * The value is the AES encrypted & base 64 encoded value of the User Token * @param context the Context of the Activity ma...
Save the specified User Token for the given User The tokens are stored in the SharedPreferences of the app (PSWD_PREFS.xml) The key is the User ID (SHA256 hash of the User Name) The value is the AES encrypted & base 64 encoded value of the User Token
saveUserToken
{ "repo_name": "dwaring87/pswd", "path": "android/app/src/main/java/com/waring/pswd/PSWD.java", "license": "mit", "size": 14617 }
[ "android.content.Context", "android.content.SharedPreferences" ]
import android.content.Context; import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
1,341,377
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); jScrollPane1 = new ja...
@SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); jScrollPane1 = new javax.swing.JScrollPane(); txaRainevent = new javax.swing.JTextArea(); lblName = new javax.swing.JLabel(); txtName = new javax.swing.JTextField(); lblG...
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The * content of this method is always regenerated by the Form Editor. */
content of this method is always regenerated by the Form Editor
initComponents
{ "repo_name": "switchonproject/cids-custom-switchon", "path": "src/main/java/de/cismet/cids/custom/switchon/objecteditors/RaineventEditor.java", "license": "lgpl-3.0", "size": 11350 }
[ "org.openide.util.NbBundle" ]
import org.openide.util.NbBundle;
import org.openide.util.*;
[ "org.openide.util" ]
org.openide.util;
254,948
void onPublicationSuccess(PublicationSuccessEvent event);
void onPublicationSuccess(PublicationSuccessEvent event);
/** * Notified when a publication completes. * * @param event the event */
Notified when a publication completes
onPublicationSuccess
{ "repo_name": "pushtechnology/diffusion-rest-adapter", "path": "metrics/metric-reporting/src/main/java/com/pushtechnology/adapters/rest/metrics/event/listeners/PublicationEventListener.java", "license": "apache-2.0", "size": 1674 }
[ "com.pushtechnology.adapters.rest.metrics.PublicationSuccessEvent" ]
import com.pushtechnology.adapters.rest.metrics.PublicationSuccessEvent;
import com.pushtechnology.adapters.rest.metrics.*;
[ "com.pushtechnology.adapters" ]
com.pushtechnology.adapters;
2,893,953
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Lab.class)) { case VMDistributionPackage.LAB__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; ca...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Lab.class)) { case VMDistributionPackage.LAB__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case VMDistributionPackage.LAB__COMPUTERCONFIGS: fireNo...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "cvswarrior/vmdistribution", "path": "hu.bme.mit.vmdistribution.model.edit/src/hu/bme/mit/vmdistribution/model/provider/LabItemProvider.java", "license": "unlicense", "size": 6185 }
[ "hu.bme.mit.vmdistribution.model.Lab", "hu.bme.mit.vmdistribution.model.VMDistributionPackage", "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import hu.bme.mit.vmdistribution.model.Lab; import hu.bme.mit.vmdistribution.model.VMDistributionPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import hu.bme.mit.vmdistribution.model.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "hu.bme.mit", "org.eclipse.emf" ]
hu.bme.mit; org.eclipse.emf;
1,832,185
public T1 caseESummaryResourceDef(ESummaryResourceDef object) { return null; }
T1 function(ESummaryResourceDef object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>ESummary Resource Def</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the res...
Returns the result of interpreting the object as an instance of 'ESummary Resource Def'. This implementation returns null; returning a non-null result will terminate the switch.
caseESummaryResourceDef
{ "repo_name": "nasa/OpenSPIFe", "path": "gov.nasa.ensemble.dictionary/src/gov/nasa/ensemble/dictionary/util/DictionarySwitch.java", "license": "apache-2.0", "size": 46564 }
[ "gov.nasa.ensemble.dictionary.ESummaryResourceDef" ]
import gov.nasa.ensemble.dictionary.ESummaryResourceDef;
import gov.nasa.ensemble.dictionary.*;
[ "gov.nasa.ensemble" ]
gov.nasa.ensemble;
2,612,994
public static SelectionDialog createPackageDialog(Shell parent, IRunnableContext context, IJavaSearchScope scope, boolean multipleSelection, boolean removeDuplicates, String filter) { int flag= removeDuplicates ? PackageSelectionDialog.F_REMOVE_DUPLICATES : 0; PackageSelectionDialog dialog= new PackageSelect...
static SelectionDialog function(Shell parent, IRunnableContext context, IJavaSearchScope scope, boolean multipleSelection, boolean removeDuplicates, String filter) { int flag= removeDuplicates ? PackageSelectionDialog.F_REMOVE_DUPLICATES : 0; PackageSelectionDialog dialog= new PackageSelectionDialog(parent, context, fl...
/** * Creates a selection dialog that lists all packages of the given Java search scope. * The caller is responsible for opening the dialog with <code>Window.open</code>, * and subsequently extracting the selected package (of type * <code>IPackageFragment</code>) via <code>SelectionDialog.getResult</code>. * ...
Creates a selection dialog that lists all packages of the given Java search scope. The caller is responsible for opening the dialog with <code>Window.open</code>, and subsequently extracting the selected package (of type <code>IPackageFragment</code>) via <code>SelectionDialog.getResult</code>
createPackageDialog
{ "repo_name": "trylimits/Eclipse-Postfix-Code-Completion", "path": "luna/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java", "license": "epl-1.0", "size": 45169 }
[ "org.eclipse.jdt.core.search.IJavaSearchScope", "org.eclipse.jdt.internal.ui.dialogs.PackageSelectionDialog", "org.eclipse.jface.operation.IRunnableContext", "org.eclipse.swt.widgets.Shell", "org.eclipse.ui.dialogs.SelectionDialog" ]
import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.internal.ui.dialogs.PackageSelectionDialog; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.jdt.core.search.*; import org.eclipse.jdt.internal.ui.dialogs.*; import org.eclipse.jface.operation.*; import org.eclipse.swt.widgets.*; import org.eclipse.ui.dialogs.*;
[ "org.eclipse.jdt", "org.eclipse.jface", "org.eclipse.swt", "org.eclipse.ui" ]
org.eclipse.jdt; org.eclipse.jface; org.eclipse.swt; org.eclipse.ui;
1,614,866
private DisseminatedDataStatistics getDataStatistics() { if (dataStatistics == null) { try { dataStatistics = ManagementServiceBeans.getInstance().getDisseminatedDataStatistics(); } catch (NamingException e) { dataStatistics = null; } } retu...
DisseminatedDataStatistics function() { if (dataStatistics == null) { try { dataStatistics = ManagementServiceBeans.getInstance().getDisseminatedDataStatistics(); } catch (NamingException e) { dataStatistics = null; } } return dataStatistics; } /** * {@inheritDoc}
/** * Gets the data statistics. * * @return the data statistics */
Gets the data statistics
getDataStatistics
{ "repo_name": "dimipapadeas/openwis", "path": "openwis-dataservice/openwis-dataservice-server/openwis-dataservice-server-ejb/src/main/java/org/openwis/datasource/server/service/impl/BlacklistServiceImpl.java", "license": "gpl-3.0", "size": 17208 }
[ "javax.naming.NamingException", "org.openwis.management.ManagementServiceBeans", "org.openwis.management.service.DisseminatedDataStatistics" ]
import javax.naming.NamingException; import org.openwis.management.ManagementServiceBeans; import org.openwis.management.service.DisseminatedDataStatistics;
import javax.naming.*; import org.openwis.management.*; import org.openwis.management.service.*;
[ "javax.naming", "org.openwis.management" ]
javax.naming; org.openwis.management;
1,611,172
@Test public void testNoServer() { context.refresh(); assertFalse(context.containsBean("initH2TCPServer")); }
void function() { context.refresh(); assertFalse(context.containsBean(STR)); }
/** * Verify that the embedded server is not started if h2 string is not specified. */
Verify that the embedded server is not started if h2 string is not specified
testNoServer
{ "repo_name": "cppwfs/spring-cloud-dataflow", "path": "spring-cloud-dataflow-server-core/src/test/java/org/springframework/cloud/dataflow/server/config/DataFlowServerConfigurationTests.java", "license": "apache-2.0", "size": 7998 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
718,950
@SuppressWarnings("deprecation") public void setGameMode(GameMode value) { handle.getIntegers().write(1, value.getValue()); }
@SuppressWarnings(STR) void function(GameMode value) { handle.getIntegers().write(1, value.getValue()); }
/** * Set the new game mode. * <p> * Only used when reason is 3. * @param value - new value. */
Set the new game mode. Only used when reason is 3
setGameMode
{ "repo_name": "codebucketdev/HoloAPI", "path": "src/com/comphenix/packetwrapper/WrapperPlayServerGameStateChange.java", "license": "gpl-3.0", "size": 3649 }
[ "org.bukkit.GameMode" ]
import org.bukkit.GameMode;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
1,031,175