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
List<String> getUserList();
List<String> getUserList();
/** * Users of this group * * @return the list of user */
Users of this group
getUserList
{ "repo_name": "jusabatier/georchestra", "path": "ldapadmin/src/main/java/org/georchestra/ldapadmin/dto/Group.java", "license": "gpl-3.0", "size": 1420 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,864,809
static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println("IO exception reading the log properties file '" + LOCAL_LOG_PROPERTIES_FILE + "': ...
static List<PatternLevel> readLevelResourceFile(InputStream stream) { List<PatternLevel> levels = null; if (stream != null) { try { levels = configureClassLevels(stream); } catch (IOException e) { System.err.println(STR + LOCAL_LOG_PROPERTIES_FILE + STR + e); } finally { try { stream.close(); } catch (IOException e) { ...
/** * Read in our levels from our configuration file. */
Read in our levels from our configuration file
readLevelResourceFile
{ "repo_name": "yswang0927/simplemagic", "path": "src/main/java/com/j256/simplemagic/logger/LocalLog.java", "license": "isc", "size": 6262 }
[ "java.io.IOException", "java.io.InputStream", "java.util.List" ]
import java.io.IOException; import java.io.InputStream; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,308,120
public String idOrCreate(NodeIdFactory factory) { if (id == null) { setGeneratedId(factory.createId(this)); } return id; }
String function(NodeIdFactory factory) { if (id == null) { setGeneratedId(factory.createId(this)); } return id; }
/** * Gets the node id, creating one if not already set. */
Gets the node id, creating one if not already set
idOrCreate
{ "repo_name": "nikhilvibhav/camel", "path": "core/camel-core-model/src/main/java/org/apache/camel/model/OptionalIdentifiedDefinition.java", "license": "apache-2.0", "size": 5461 }
[ "org.apache.camel.spi.NodeIdFactory" ]
import org.apache.camel.spi.NodeIdFactory;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
125,769
public void testCloning() { StandardXYZToolTipGenerator g1 = new StandardXYZToolTipGenerator(); StandardXYZToolTipGenerator g2 = null; try { g2 = (StandardXYZToolTipGenerator) g1.clone(); } catch (CloneNotSupportedException e) { System.err.println("Fai...
void function() { StandardXYZToolTipGenerator g1 = new StandardXYZToolTipGenerator(); StandardXYZToolTipGenerator g2 = null; try { g2 = (StandardXYZToolTipGenerator) g1.clone(); } catch (CloneNotSupportedException e) { System.err.println(STR); } assertTrue(g1 != g2); assertTrue(g1.getClass() == g2.getClass()); assertTr...
/** * Confirm that cloning works. */
Confirm that cloning works
testCloning
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/labels/junit/StandardXYZToolTipGeneratorTests.java", "license": "lgpl-2.1", "size": 7061 }
[ "org.jfree.chart.labels.StandardXYZToolTipGenerator" ]
import org.jfree.chart.labels.StandardXYZToolTipGenerator;
import org.jfree.chart.labels.*;
[ "org.jfree.chart" ]
org.jfree.chart;
419,034
public static GLXOffScreenSurfaceData createData(GLXGraphicsConfig gc, int width, int height, ColorModel cm, Image image, int type) { return new ...
static GLXOffScreenSurfaceData function(GLXGraphicsConfig gc, int width, int height, ColorModel cm, Image image, int type) { return new GLXOffScreenSurfaceData(null, gc, width, height, image, cm, type); }
/** * Creates a SurfaceData object representing an off-screen buffer (either * a Pbuffer or Texture). */
Creates a SurfaceData object representing an off-screen buffer (either a Pbuffer or Texture)
createData
{ "repo_name": "JetBrains/jdk8u_jdk", "path": "src/solaris/classes/sun/java2d/opengl/GLXSurfaceData.java", "license": "gpl-2.0", "size": 7949 }
[ "java.awt.Image", "java.awt.image.ColorModel" ]
import java.awt.Image; import java.awt.image.ColorModel;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
1,345,334
@Test public void testFunctionCalls() throws Exception { Expression e = buildExpression("or(true, false)"); assertTrue("Operator could not be accessed as function call", e.evaluate(null)); e = buildExpression("and(false, true)"); assertFalse("Operator could not be accessed as fun...
void function() throws Exception { Expression e = buildExpression(STR); assertTrue(STR, e.evaluate(null)); e = buildExpression(STR); assertFalse(STR, e.evaluate(null)); e = buildExpression(STR); assertEquals(STR, 24 + 23525, e.evaluate(null)); e = buildExpression(STR); assertEquals(STR, 24.0 - (63 + 23525), e.evaluate(...
/** * Operators may be accessed as function calls and may be nested. */
Operators may be accessed as function calls and may be nested
testFunctionCalls
{ "repo_name": "madmax983/aura", "path": "aura-impl-expression/src/test/java/org/auraframework/impl/expression/parser/ExpressionParserTest.java", "license": "apache-2.0", "size": 26528 }
[ "org.auraframework.expression.Expression" ]
import org.auraframework.expression.Expression;
import org.auraframework.expression.*;
[ "org.auraframework.expression" ]
org.auraframework.expression;
1,638,882
public static Account getSyncAccount(Context context) { // Get an instance of the Android account manager AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); // Create the account type and default account Account newAcc...
static Account function(Context context) { AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); Account newAccount = new Account( context.getString(R.string.app_name), context.getString(R.string.sync_account_type)); if ( null == accountManager.getPassword(newAccount) ) { i...
/** * Helper method to get the fake account to be used with SyncAdapter, or make a new one * if the fake account doesn't exist yet. If we make a new account, we call the * onAccountCreated method so we can initialize things. * * @param context The context used to access the account service ...
Helper method to get the fake account to be used with SyncAdapter, or make a new one if the fake account doesn't exist yet. If we make a new account, we call the onAccountCreated method so we can initialize things
getSyncAccount
{ "repo_name": "KumarVelu/Sunshine-Version-2", "path": "app/src/main/java/com/example/android/sunshine/app/sync/SunshineSyncAdapter.java", "license": "apache-2.0", "size": 24155 }
[ "android.accounts.Account", "android.accounts.AccountManager", "android.content.Context" ]
import android.accounts.Account; import android.accounts.AccountManager; import android.content.Context;
import android.accounts.*; import android.content.*;
[ "android.accounts", "android.content" ]
android.accounts; android.content;
2,615,512
public static JMenuBar waitJMenuBar(Container cont) { return (JMenuBar) waitComponent(cont, new JMenuBarFinder()); }
static JMenuBar function(Container cont) { return (JMenuBar) waitComponent(cont, new JMenuBarFinder()); }
/** * Searches JMenuBar in container. * * @param cont a container * @return found JMenuBar * @throws TimeoutExpiredException */
Searches JMenuBar in container
waitJMenuBar
{ "repo_name": "md-5/jdk10", "path": "test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/JMenuBarOperator.java", "license": "gpl-2.0", "size": 32317 }
[ "java.awt.Container", "javax.swing.JMenuBar" ]
import java.awt.Container; import javax.swing.JMenuBar;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,839,973
public AuthorEntity toEntity() { AuthorEntity entity = new AuthorEntity(); entity.setId(this.getId()); entity.setName(this.getName()); entity.setBirthDate(this.getBirthDate()); return entity; }
AuthorEntity function() { AuthorEntity entity = new AuthorEntity(); entity.setId(this.getId()); entity.setName(this.getName()); entity.setBirthDate(this.getBirthDate()); return entity; }
/** * Convierte un objeto AuthorDTO a AuthorEntity. * * @return Nueva objeto AuthorEntity. * @generated */
Convierte un objeto AuthorDTO a AuthorEntity
toEntity
{ "repo_name": "Uniandes-isis2603/book201710", "path": "book-web/src/main/java/co/edu/uniandes/csw/book/dtos/AuthorDTO.java", "license": "mit", "size": 1541 }
[ "co.edu.uniandes.csw.book.entities.AuthorEntity" ]
import co.edu.uniandes.csw.book.entities.AuthorEntity;
import co.edu.uniandes.csw.book.entities.*;
[ "co.edu.uniandes" ]
co.edu.uniandes;
2,153,929
@Override public DjReleaseStates rename(String name) { return new DjReleaseStates(DSL.name(name), null); }
DjReleaseStates function(String name) { return new DjReleaseStates(DSL.name(name), null); }
/** * Rename this table */
Rename this table
rename
{ "repo_name": "oneops/OneOps", "path": "crawler/src/generated-sources/java/com/oneops/crawler/jooq/cms/tables/DjReleaseStates.java", "license": "apache-2.0", "size": 4006 }
[ "org.jooq.impl.DSL" ]
import org.jooq.impl.DSL;
import org.jooq.impl.*;
[ "org.jooq.impl" ]
org.jooq.impl;
803,968
public static ParboiledIpProtocolSpecifier parse(String input) { ParsingResult<AstNode> result = new ReportingParseRunner<AstNode>( Parser.instance().getInputRule(Grammar.IP_PROTOCOL_SPECIFIER)) .run(input); if (!result.parseErrors.isEmpty()) { throw new IllegalArgum...
static ParboiledIpProtocolSpecifier function(String input) { ParsingResult<AstNode> result = new ReportingParseRunner<AstNode>( Parser.instance().getInputRule(Grammar.IP_PROTOCOL_SPECIFIER)) .run(input); if (!result.parseErrors.isEmpty()) { throw new IllegalArgumentException( ParserUtils.getErrorString( input, Grammar....
/** * Returns an {@link IpProtocolSpecifier} based on {@code input} which is parsed as {@link * Grammar#IP_PROTOCOL_SPECIFIER}. * * @throws IllegalArgumentException if the parsing fails or does not produce the expected AST */
Returns an <code>IpProtocolSpecifier</code> based on input which is parsed as <code>Grammar#IP_PROTOCOL_SPECIFIER</code>
parse
{ "repo_name": "arifogel/batfish", "path": "projects/batfish-common-protocol/src/main/java/org/batfish/specifier/parboiled/ParboiledIpProtocolSpecifier.java", "license": "apache-2.0", "size": 4636 }
[ "com.google.common.base.Preconditions", "org.parboiled.errors.InvalidInputError", "org.parboiled.parserunners.ReportingParseRunner", "org.parboiled.support.ParsingResult" ]
import com.google.common.base.Preconditions; import org.parboiled.errors.InvalidInputError; import org.parboiled.parserunners.ReportingParseRunner; import org.parboiled.support.ParsingResult;
import com.google.common.base.*; import org.parboiled.errors.*; import org.parboiled.parserunners.*; import org.parboiled.support.*;
[ "com.google.common", "org.parboiled.errors", "org.parboiled.parserunners", "org.parboiled.support" ]
com.google.common; org.parboiled.errors; org.parboiled.parserunners; org.parboiled.support;
235,920
protected void addSysIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SystemVariable_sysId_feature"), getString("_UI_PropertyDescriptor_des...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), WTSpecPackage.Literals.SYSTEM_VARIABLE__SYS_ID, true, false, false, ItemPropertyDescriptor.GENERI...
/** * This adds a property descriptor for the Sys Id feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Sys Id feature.
addSysIdPropertyDescriptor
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/mondo-access-control/CollaborationIncQuery/WTSpec.edit/src/WTSpec/provider/SystemVariableItemProvider.java", "license": "epl-1.0", "size": 3745 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,547,659
try { byte[] decodedKey = Base64.decode(encodedPublicKey); KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); } catch (NoSuchAlgorithmException e) { // This won't happen in ...
try { byte[] decodedKey = Base64.decode(encodedPublicKey); KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } catch (Base64DecoderException e) { Log.e(TAG, ST...
/** * Generates a PublicKey instance from a string containing the * Base64-encoded public key. * * @param encodedPublicKey Base64-encoded public key * @throws IllegalArgumentException if encodedPublicKey is invalid */
Generates a PublicKey instance from a string containing the Base64-encoded public key
generatePublicKey
{ "repo_name": "lvillani/droidkit", "path": "src/main/java/com/google/android/vending/licensing/LicenseChecker.java", "license": "apache-2.0", "size": 14166 }
[ "android.util.Log", "com.google.android.vending.licensing.util.Base64", "com.google.android.vending.licensing.util.Base64DecoderException", "java.security.KeyFactory", "java.security.NoSuchAlgorithmException", "java.security.spec.InvalidKeySpecException", "java.security.spec.X509EncodedKeySpec" ]
import android.util.Log; import com.google.android.vending.licensing.util.Base64; import com.google.android.vending.licensing.util.Base64DecoderException; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import java.security.spec.X509Enco...
import android.util.*; import com.google.android.vending.licensing.util.*; import java.security.*; import java.security.spec.*;
[ "android.util", "com.google.android", "java.security" ]
android.util; com.google.android; java.security;
2,903,465
public int countNumOfPages(String fileName) {// count number of pages in a // local pdf file int numOfPage = 0; String docdownload = oscar.OscarProperties.getInstance().getProperty("DOCUMENT_DIR"); String filePath = docdownload + fileName; try { PdfReader reader = new PdfReader(filePath); ...
int function(String fileName) { int numOfPage = 0; String docdownload = oscar.OscarProperties.getInstance().getProperty(STR); String filePath = docdownload + fileName; try { PdfReader reader = new PdfReader(filePath); numOfPage = reader.getNumberOfPages(); reader.close(); } catch (IOException e) { logger.debug(e.toStri...
/** * Counts the number of pages in a local pdf file. * @param fileName the name of the file * @return the number of pages in the file */
Counts the number of pages in a local pdf file
countNumOfPages
{ "repo_name": "hexbinary/landing", "path": "src/main/java/oscar/dms/actions/DocumentUploadAction.java", "license": "gpl-2.0", "size": 10318 }
[ "com.lowagie.text.pdf.PdfReader", "java.io.IOException" ]
import com.lowagie.text.pdf.PdfReader; import java.io.IOException;
import com.lowagie.text.pdf.*; import java.io.*;
[ "com.lowagie.text", "java.io" ]
com.lowagie.text; java.io;
2,005,740
public T3dVector transform(T3dVector pnt);
T3dVector function(T3dVector pnt);
/** * transforms visualization coordinates. * * @param pnt Coordinates referring to the source coordinate-system * @return Coordinates referring to the target coordinate-system */
transforms visualization coordinates
transform
{ "repo_name": "nuest/worldviz", "path": "src/main/java/org/n52/v3d/worldviz/projections/CoordinateTransform.java", "license": "apache-2.0", "size": 1551 }
[ "org.n52.v3d.triturus.t3dutil.T3dVector" ]
import org.n52.v3d.triturus.t3dutil.T3dVector;
import org.n52.v3d.triturus.t3dutil.*;
[ "org.n52.v3d" ]
org.n52.v3d;
645,497
private synchronized void resendPackages() { for (MQTTMessage msg : mMqttIdentifierHelper.getSentPackages().values()) { if (msg instanceof MQTTPublish) { ((MQTTPublish) msg).setDup(); } sendMessage(msg); } for (MQTTMessage msg : mMqttIdentifierHelper.getReceivedPackages().values...
synchronized void function() { for (MQTTMessage msg : mMqttIdentifierHelper.getSentPackages().values()) { if (msg instanceof MQTTPublish) { ((MQTTPublish) msg).setDup(); } sendMessage(msg); } for (MQTTMessage msg : mMqttIdentifierHelper.getReceivedPackages().values()) { if (msg instanceof MQTTPublish) { ((MQTTPublish) ...
/** * Make sure to resend packages that haven't been successfully sent. */
Make sure to resend packages that haven't been successfully sent
resendPackages
{ "repo_name": "Qatja/android", "path": "qatja-android/src/main/java/se/wetcat/qatja/android/QatjaService.java", "license": "apache-2.0", "size": 35522 }
[ "se.wetcat.qatja.messages.MQTTMessage", "se.wetcat.qatja.messages.MQTTPublish" ]
import se.wetcat.qatja.messages.MQTTMessage; import se.wetcat.qatja.messages.MQTTPublish;
import se.wetcat.qatja.messages.*;
[ "se.wetcat.qatja" ]
se.wetcat.qatja;
550,175
List<RichDestination> getAllRichDestinations(PerunSession perunSession, Facility facility);
List<RichDestination> getAllRichDestinations(PerunSession perunSession, Facility facility);
/** * Get list of all rich destinations defined for the facility. * * @param perunSession * @param facility * @return list of rich destinations defined for the facility * @throws InternalErrorException */
Get list of all rich destinations defined for the facility
getAllRichDestinations
{ "repo_name": "zlamalp/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/ServicesManagerBl.java", "license": "bsd-2-clause", "size": 31710 }
[ "cz.metacentrum.perun.core.api.Facility", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.RichDestination", "java.util.List" ]
import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.RichDestination; import java.util.List;
import cz.metacentrum.perun.core.api.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
2,269,786
public interface SearchableModelObject extends ModelObject, SearchItem { Search getSearch();
interface SearchableModelObject extends ModelObject, SearchItem { Search function();
/** * This binds {@link Search} object to the URL hierarchy. */
This binds <code>Search</code> object to the URL hierarchy
getSearch
{ "repo_name": "MarkEWaite/jenkins", "path": "core/src/main/java/hudson/search/SearchableModelObject.java", "license": "mit", "size": 1752 }
[ "hudson.model.ModelObject" ]
import hudson.model.ModelObject;
import hudson.model.*;
[ "hudson.model" ]
hudson.model;
550,706
public void fillLeaves ( final Branch branch ) throws IllegalArgumentException, UnknownHostException, JIException { moveToBranch ( branch ); browse ( branch, true, false, false ); }
void function ( final Branch branch ) throws IllegalArgumentException, UnknownHostException, JIException { moveToBranch ( branch ); browse ( branch, true, false, false ); }
/** * Fill the leaf list of the provided branch. * @param branch The branch to fill. * @throws IllegalArgumentException * @throws UnknownHostException * @throws JIException */
Fill the leaf list of the provided branch
fillLeaves
{ "repo_name": "luoyan35714/OPC_Client", "path": "org.openscada.opc.lib/src/org/openscada/opc/lib/da/browser/TreeBrowser.java", "license": "apache-2.0", "size": 8301 }
[ "java.net.UnknownHostException", "org.jinterop.dcom.common.JIException" ]
import java.net.UnknownHostException; import org.jinterop.dcom.common.JIException;
import java.net.*; import org.jinterop.dcom.common.*;
[ "java.net", "org.jinterop.dcom" ]
java.net; org.jinterop.dcom;
1,229,414
private static void assertPoFileContainsTranslations(String poFileContents, String... translations) { if (translations.length % 2 != 0) { throw new AssertionError( "Translation parameters should be given in pairs."); } MessageStreamParser messageP...
static void function(String poFileContents, String... translations) { if (translations.length % 2 != 0) { throw new AssertionError( STR); } MessageStreamParser messageParser = new MessageStreamParser(new StringReader(poFileContents)); List<String> found = new ArrayList<String>(translations.length); while (messageParser...
/** * Validates that the po files contains the appropriate translations. * * @param poFileContents * The contents of the PO file as a string * @param translations * The translations in (msgid, msgstr) pairs. E.g. mssgid1, * trans1, mssgid2, trans2, ......
Validates that the po files contains the appropriate translations
assertPoFileContainsTranslations
{ "repo_name": "Halcom/zanata-server", "path": "zanata-war/src/test/java/org/zanata/rest/service/raw/FileRawRestITCase.java", "license": "gpl-2.0", "size": 8914 }
[ "java.io.StringReader", "java.util.ArrayList", "java.util.List", "org.fedorahosted.tennera.jgettext.Message", "org.fedorahosted.tennera.jgettext.catalog.parse.MessageStreamParser" ]
import java.io.StringReader; import java.util.ArrayList; import java.util.List; import org.fedorahosted.tennera.jgettext.Message; import org.fedorahosted.tennera.jgettext.catalog.parse.MessageStreamParser;
import java.io.*; import java.util.*; import org.fedorahosted.tennera.jgettext.*; import org.fedorahosted.tennera.jgettext.catalog.parse.*;
[ "java.io", "java.util", "org.fedorahosted.tennera" ]
java.io; java.util; org.fedorahosted.tennera;
1,811,421
private static MavenDependency newInstance(final MavenCoordinate coordinate, final ScopeType scope, final boolean optional, final MavenDependencyExclusion... exclusions) { assert coordinate != null : "coordinate must be specified"; assert exclusions != null : "exclusions must be specified"; ...
static MavenDependency function(final MavenCoordinate coordinate, final ScopeType scope, final boolean optional, final MavenDependencyExclusion... exclusions) { assert coordinate != null : STR; assert exclusions != null : STR; try { return ctor.newInstance(coordinate, scope, optional, exclusions); } catch (final Except...
/** * Creates a new {@link MavenDependency} instance * * @param coordinate * @param scope * @param optional * @param exclusions * @return */
Creates a new <code>MavenDependency</code> instance
newInstance
{ "repo_name": "oliveti/resolver", "path": "api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/coordinate/MavenDependencies.java", "license": "apache-2.0", "size": 7635 }
[ "org.jboss.shrinkwrap.resolver.api.maven.ScopeType" ]
import org.jboss.shrinkwrap.resolver.api.maven.ScopeType;
import org.jboss.shrinkwrap.resolver.api.maven.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
1,938,216
interface AwsKinesisFirehoseComponentBuilder extends ComponentBuilder<KinesisFirehoseComponent> { default AwsKinesisFirehoseComponentBuilder amazonKinesisFirehoseClient( com.amazonaws.services.kinesisfirehose.AmazonKinesisFirehose amazonKinesisFirehoseCli...
interface AwsKinesisFirehoseComponentBuilder extends ComponentBuilder<KinesisFirehoseComponent> { default AwsKinesisFirehoseComponentBuilder amazonKinesisFirehoseClient( com.amazonaws.services.kinesisfirehose.AmazonKinesisFirehose amazonKinesisFirehoseClient) { doSetProperty(STR, amazonKinesisFirehoseClient); return th...
/** * Amazon Kinesis Firehose client to use for all requests for this * endpoint. * * The option is a: * <code>com.amazonaws.services.kinesisfirehose.AmazonKinesisFirehose</code> type. * * Group: producer */
Amazon Kinesis Firehose client to use for all requests for this endpoint. The option is a: <code>com.amazonaws.services.kinesisfirehose.AmazonKinesisFirehose</code> type. Group: producer
amazonKinesisFirehoseClient
{ "repo_name": "nicolaferraro/camel", "path": "core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsKinesisFirehoseComponentBuilderFactory.java", "license": "apache-2.0", "size": 10898 }
[ "org.apache.camel.builder.component.ComponentBuilder", "org.apache.camel.component.aws.firehose.KinesisFirehoseComponent" ]
import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.aws.firehose.KinesisFirehoseComponent;
import org.apache.camel.builder.component.*; import org.apache.camel.component.aws.firehose.*;
[ "org.apache.camel" ]
org.apache.camel;
250,610
public Observable<ServiceResponse<Page<Product>>> getSinglePagesFailureNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<Product>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * A paging operation that receives a 400 on the first call. * ServiceResponse<PageImpl<Product>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;Prod...
A paging operation that receives a 400 on the first call
getSinglePagesFailureNextSinglePageAsync
{ "repo_name": "hovsepm/AutoRest", "path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/paging/implementation/PagingsInner.java", "license": "mit", "size": 189205 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,056,471
//----------------------------------------------------------------------- public MetaProperty<String> snapshotName() { return _snapshotName; }
MetaProperty<String> function() { return _snapshotName; }
/** * The meta-property for the {@code snapshotName} property. * @return the meta-property, not null */
The meta-property for the snapshotName property
snapshotName
{ "repo_name": "McLeodMoores/starling", "path": "projects/integration/src/main/java/com/opengamma/integration/regression/GoldenCopy.java", "license": "apache-2.0", "size": 14894 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
2,776,573
public String createSnapshot(String snapshotRoot, String snapshotName) throws IOException { checkOpen(); try { return namenode.createSnapshot(snapshotRoot, snapshotName); } catch(RemoteException re) { throw re.unwrapRemoteException(); } }
String function(String snapshotRoot, String snapshotName) throws IOException { checkOpen(); try { return namenode.createSnapshot(snapshotRoot, snapshotName); } catch(RemoteException re) { throw re.unwrapRemoteException(); } }
/** * Create one snapshot. * * @param snapshotRoot The directory where the snapshot is to be taken * @param snapshotName Name of the snapshot * @return the snapshot path. * @see ClientProtocol#createSnapshot(String, String) */
Create one snapshot
createSnapshot
{ "repo_name": "jonathangizmo/HadoopDistJ", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java", "license": "mit", "size": 117695 }
[ "java.io.IOException", "org.apache.hadoop.ipc.RemoteException" ]
import java.io.IOException; import org.apache.hadoop.ipc.RemoteException;
import java.io.*; import org.apache.hadoop.ipc.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
586,840
@Override public RDFFormat getRDFFormat() { return RDFFormat.TURTLE; }
RDFFormat function() { return RDFFormat.TURTLE; }
/** * Gets the RDF format that this RDFWriter uses. */
Gets the RDF format that this RDFWriter uses
getRDFFormat
{ "repo_name": "edmcouncil/rdf-toolkit", "path": "src/main/java/org/edmcouncil/rdf_toolkit/writer/SortedRdfWriter.java", "license": "mit", "size": 28941 }
[ "org.eclipse.rdf4j.rio.RDFFormat" ]
import org.eclipse.rdf4j.rio.RDFFormat;
import org.eclipse.rdf4j.rio.*;
[ "org.eclipse.rdf4j" ]
org.eclipse.rdf4j;
935,107
public Adapter createThoroughfareNumberTypeAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link org.oasis.xAL.ThoroughfareNumberType <em>Thoroughfare Number Type</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases a...
Creates a new adapter for an object of class '<code>org.oasis.xAL.ThoroughfareNumberType Thoroughfare Number Type</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createThoroughfareNumberTypeAdapter
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore/src/org/oasis/xAL/util/XALAdapterFactory.java", "license": "apache-2.0", "size": 61937 }
[ "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;
1,353,585
Role getGrantsRestriction(SecurableResourceId resourceId, IAuthorizationContext authCtx) throws UnauthorizedAccessAttemptException, EntityNotFoundException;
Role getGrantsRestriction(SecurableResourceId resourceId, IAuthorizationContext authCtx) throws UnauthorizedAccessAttemptException, EntityNotFoundException;
/** * Gets the grants restriction which is the upper limit of privileges * obtainable via extra grants on the particular resource. * * @param resourceId The id of the resource. * @param authCtx The <code>IAuthorizationContext</code> used to authorize * this operation * * @return The max obtainab...
Gets the grants restriction which is the upper limit of privileges obtainable via extra grants on the particular resource
getGrantsRestriction
{ "repo_name": "kit-data-manager/base", "path": "Authorization/src/main/java/edu/kit/dama/authorization/services/administration/IResourceService.java", "license": "apache-2.0", "size": 18423 }
[ "edu.kit.dama.authorization.entities.IAuthorizationContext", "edu.kit.dama.authorization.entities.Role", "edu.kit.dama.authorization.entities.SecurableResourceId", "edu.kit.dama.authorization.exceptions.EntityNotFoundException", "edu.kit.dama.authorization.exceptions.UnauthorizedAccessAttemptException" ]
import edu.kit.dama.authorization.entities.IAuthorizationContext; import edu.kit.dama.authorization.entities.Role; import edu.kit.dama.authorization.entities.SecurableResourceId; import edu.kit.dama.authorization.exceptions.EntityNotFoundException; import edu.kit.dama.authorization.exceptions.UnauthorizedAccessAttemptE...
import edu.kit.dama.authorization.entities.*; import edu.kit.dama.authorization.exceptions.*;
[ "edu.kit.dama" ]
edu.kit.dama;
629,484
@Nonnull public UserConsentRequestFilterByCurrentUserCollectionRequest expand(@Nonnull final String value) { addExpandOption(value); return this; }
UserConsentRequestFilterByCurrentUserCollectionRequest function(@Nonnull final String value) { addExpandOption(value); return this; }
/** * Sets the expand clause for the request * * @param value the expand clause * @return the updated request */
Sets the expand clause for the request
expand
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/UserConsentRequestFilterByCurrentUserCollectionRequest.java", "license": "mit", "size": 5141 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,794,908
private static Github github() throws Exception { final String key = System.getProperty("failsafe.github.key"); Assume.assumeThat(key, Matchers.notNullValue()); return new RtGithub(key); }
static Github function() throws Exception { final String key = System.getProperty(STR); Assume.assumeThat(key, Matchers.notNullValue()); return new RtGithub(key); }
/** * Create and return github to test. * @return Github * @throws Exception If some problem inside */
Create and return github to test
github
{ "repo_name": "cvrebert/typed-github", "path": "src/test/java/com/jcabi/github/RtOrganizationsITCase.java", "license": "bsd-3-clause", "size": 2670 }
[ "org.hamcrest.Matchers", "org.junit.Assume" ]
import org.hamcrest.Matchers; import org.junit.Assume;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
1,242,101
public PDPSimple getPDP() { return m_PDP; }
PDPSimple function() { return m_PDP; }
/** * Get the {@link PDPSimple} reference * * @return The {@link PDPSimple} reference */
Get the <code>PDPSimple</code> reference
getPDP
{ "repo_name": "Fiware/i2nd.KIARA", "path": "src/main/java/org/fiware/kiara/ps/rtps/builtin/discovery/participant/timedevent/RemoteParticipantLeaseDuration.java", "license": "lgpl-3.0", "size": 3442 }
[ "org.fiware.kiara.ps.rtps.builtin.discovery.participant.PDPSimple" ]
import org.fiware.kiara.ps.rtps.builtin.discovery.participant.PDPSimple;
import org.fiware.kiara.ps.rtps.builtin.discovery.participant.*;
[ "org.fiware.kiara" ]
org.fiware.kiara;
417,721
@Override public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { Object cf = new JmsConnectionFactoryImpl(this, cxManager); if (log.isTraceEnabled()) { log.trace("Created connection factory: " + cf + ", using connection manager: " + cxManager);...
Object function(ConnectionManager cxManager) throws ResourceException { Object cf = new JmsConnectionFactoryImpl(this, cxManager); if (log.isTraceEnabled()) { log.trace(STR + cf + STR + cxManager); } return cf; }
/** * Create a ConnectionFactory with appserver hook */
Create a ConnectionFactory with appserver hook
createConnectionFactory
{ "repo_name": "benjamin-cartereau/generic-jms-ra", "path": "generic-jms-ra-jar/src/main/java/org/jboss/resource/adapter/jms/JmsManagedConnectionFactory.java", "license": "lgpl-2.1", "size": 10114 }
[ "javax.resource.ResourceException", "javax.resource.spi.ConnectionManager" ]
import javax.resource.ResourceException; import javax.resource.spi.ConnectionManager;
import javax.resource.*; import javax.resource.spi.*;
[ "javax.resource" ]
javax.resource;
956,008
public String handleRequest(ComponentSessionController componentSC, HttpServletRequest request) throws SILVERMAILException { try { SILVERMAILSessionController silvermailScc = (SILVERMAILSessionController) componentSC; silvermailScc.deleteAllSentNotif(); List<SentNotificationDetail> sentNot...
String function(ComponentSessionController componentSC, HttpServletRequest request) throws SILVERMAILException { try { SILVERMAILSessionController silvermailScc = (SILVERMAILSessionController) componentSC; silvermailScc.deleteAllSentNotif(); List<SentNotificationDetail> sentNotifs = silvermailScc.getUserMessageList(); ...
/** * Method declaration * @param componentSC * @param request * @return * @throws SILVERMAILException * @see */
Method declaration
handleRequest
{ "repo_name": "CecileBONIN/Silverpeas-Core", "path": "war-core/src/main/java/com/stratelia/silverpeas/notificationserver/channel/silvermail/requesthandlers/DeleteAllSentNotifications.java", "license": "agpl-3.0", "size": 2699 }
[ "com.stratelia.silverpeas.notificationManager.NotificationManagerException", "com.stratelia.silverpeas.notificationManager.model.SentNotificationDetail", "com.stratelia.silverpeas.notificationserver.channel.silvermail.SILVERMAILException", "com.stratelia.silverpeas.notificationserver.channel.silvermail.SILVER...
import com.stratelia.silverpeas.notificationManager.NotificationManagerException; import com.stratelia.silverpeas.notificationManager.model.SentNotificationDetail; import com.stratelia.silverpeas.notificationserver.channel.silvermail.SILVERMAILException; import com.stratelia.silverpeas.notificationserver.channel.silver...
import com.stratelia.silverpeas.*; import com.stratelia.silverpeas.notificationserver.channel.silvermail.*; import java.util.*; import javax.servlet.http.*;
[ "com.stratelia.silverpeas", "java.util", "javax.servlet" ]
com.stratelia.silverpeas; java.util; javax.servlet;
1,827,302
protected String getSqlForSumDistinct(Function function) { return "SUM(DISTINCT " + getSqlFrom(function.getArguments().get(0)) + ")"; }
String function(Function function) { return STR + getSqlFrom(function.getArguments().get(0)) + ")"; }
/** * Converts the sum function into SQL. * * @param function the function details * @return a string representation of the SQL */
Converts the sum function into SQL
getSqlForSumDistinct
{ "repo_name": "alfasoftware/morf", "path": "morf-core/src/main/java/org/alfasoftware/morf/jdbc/SqlDialect.java", "license": "apache-2.0", "size": 144949 }
[ "org.alfasoftware.morf.sql.element.Function" ]
import org.alfasoftware.morf.sql.element.Function;
import org.alfasoftware.morf.sql.element.*;
[ "org.alfasoftware.morf" ]
org.alfasoftware.morf;
1,483,869
public Cell[] getCells() { return cells; }
Cell[] function() { return cells; }
/** * Returns an array containing all of the {@link Cell}s. * @return */
Returns an array containing all of the <code>Cell</code>s
getCells
{ "repo_name": "hgulcan/badr_htm", "path": "src/main/java/org/numenta/nupic/Connections.java", "license": "agpl-3.0", "size": 51299 }
[ "org.numenta.nupic.model.Cell" ]
import org.numenta.nupic.model.Cell;
import org.numenta.nupic.model.*;
[ "org.numenta.nupic" ]
org.numenta.nupic;
2,106,842
@Test public void testBlobNotFoundCase() throws Exception { NonBlockingRouter.currentOperationsCount.incrementAndGet(); GetBlobInfoOperation op = new GetBlobInfoOperation(routerConfig, routerMetrics, mockClusterMap, responseHandler, blobIdStr, options, null, time); ArrayList<RequestI...
void function() throws Exception { NonBlockingRouter.currentOperationsCount.incrementAndGet(); GetBlobInfoOperation op = new GetBlobInfoOperation(routerConfig, routerMetrics, mockClusterMap, responseHandler, blobIdStr, options, null, time); ArrayList<RequestInfo> requestListToFill = new ArrayList<>(); requestRegistrati...
/** * Test the case where every server returns Blob_Not_Found. All servers must have been contacted, * due to cross-colo proxying. * @throws Exception */
Test the case where every server returns Blob_Not_Found. All servers must have been contacted, due to cross-colo proxying
testBlobNotFoundCase
{ "repo_name": "nsivabalan/ambry", "path": "ambry-router/src/test/java/com.github.ambry.router/GetBlobInfoOperationTest.java", "license": "apache-2.0", "size": 21589 }
[ "com.github.ambry.commons.ServerErrorCode", "com.github.ambry.network.RequestInfo", "com.github.ambry.network.ResponseInfo", "com.github.ambry.protocol.GetResponse", "com.github.ambry.utils.ByteBufferInputStream", "java.io.DataInputStream", "java.util.ArrayList", "java.util.List", "org.junit.Assert"...
import com.github.ambry.commons.ServerErrorCode; import com.github.ambry.network.RequestInfo; import com.github.ambry.network.ResponseInfo; import com.github.ambry.protocol.GetResponse; import com.github.ambry.utils.ByteBufferInputStream; import java.io.DataInputStream; import java.util.ArrayList; import java.util.List...
import com.github.ambry.commons.*; import com.github.ambry.network.*; import com.github.ambry.protocol.*; import com.github.ambry.utils.*; import java.io.*; import java.util.*; import org.junit.*;
[ "com.github.ambry", "java.io", "java.util", "org.junit" ]
com.github.ambry; java.io; java.util; org.junit;
1,092,699
public List<String> getAllDescription();
List<String> function();
/** * Returns all <code>description</code> elements * @return list of <code>description</code> */
Returns all <code>description</code> elements
getAllDescription
{ "repo_name": "forge/javaee-descriptors", "path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/facesconfig22/FacesConfigNavigationCaseType.java", "license": "epl-1.0", "size": 11854 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,366,199
public void addParser(Parser parser) { if (parser!=null && !parsers.contains(parser)) { if (running) { timer.stop(); } parsers.add(parser); if (parsers.size()==1) { // Okay to call more than once. ToolTipManager.sharedInstance().registerComponent(textArea); } if (running) { ...
void function(Parser parser) { if (parser!=null && !parsers.contains(parser)) { if (running) { timer.stop(); } parsers.add(parser); if (parsers.size()==1) { ToolTipManager.sharedInstance().registerComponent(textArea); } if (running) { timer.restart(); } } }
/** * Adds a parser for the text area. * * @param parser The new parser. If this is <code>null</code>, nothing * happens. * @see #getParser(int) * @see #removeParser(Parser) */
Adds a parser for the text area
addParser
{ "repo_name": "curiosag/ftc", "path": "RSyntaxTextArea/src/main/java/org/fife/ui/rsyntaxtextarea/ParserManager.java", "license": "gpl-3.0", "size": 22568 }
[ "javax.swing.ToolTipManager", "org.fife.ui.rsyntaxtextarea.parser.Parser" ]
import javax.swing.ToolTipManager; import org.fife.ui.rsyntaxtextarea.parser.Parser;
import javax.swing.*; import org.fife.ui.rsyntaxtextarea.parser.*;
[ "javax.swing", "org.fife.ui" ]
javax.swing; org.fife.ui;
1,451,623
protected void sequence_SingleContainmentReferenceChild2(ISerializationContext context, SingleContainmentReferenceChild2 semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, SequencertestPackage.Literals.SINGLE_CONTAINMENT_REFERENCE_CHILD2__VAL) == ValueTransient.Y...
void function(ISerializationContext context, SingleContainmentReferenceChild2 semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, SequencertestPackage.Literals.SINGLE_CONTAINMENT_REFERENCE_CHILD2__VAL) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createF...
/** * Contexts: * SingleContainmentReferenceChild2 returns SingleContainmentReferenceChild2 * * Constraint: * val='kw2' */
Contexts: SingleContainmentReferenceChild2 returns SingleContainmentReferenceChild2 Constraint: val='kw2'
sequence_SingleContainmentReferenceChild2
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/serializer/serializer/SequencerTestLanguageSemanticSequencer.java", "license": "epl-1.0", "size": 39304 }
[ "org.eclipse.xtext.serializer.ISerializationContext", "org.eclipse.xtext.serializer.acceptor.SequenceFeeder", "org.eclipse.xtext.serializer.sequencer.ITransientValueService", "org.eclipse.xtext.serializer.sequencertest.SequencertestPackage", "org.eclipse.xtext.serializer.sequencertest.SingleContainmentRefer...
import org.eclipse.xtext.serializer.ISerializationContext; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ITransientValueService; import org.eclipse.xtext.serializer.sequencertest.SequencertestPackage; import org.eclipse.xtext.serializer.sequencertest.SingleCo...
import org.eclipse.xtext.serializer.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; import org.eclipse.xtext.serializer.sequencertest.*;
[ "org.eclipse.xtext" ]
org.eclipse.xtext;
1,688,698
public static boolean sendHttpResponse( boolean isSuccess, HttpExchange exchange, byte[] response) { int returnCode = isSuccess ? HttpURLConnection.HTTP_OK : HttpURLConnection.HTTP_UNAVAILABLE; try { exchange.sendResponseHeaders(returnCode, response.length); } catch (IOException e)...
static boolean function( boolean isSuccess, HttpExchange exchange, byte[] response) { int returnCode = isSuccess ? HttpURLConnection.HTTP_OK : HttpURLConnection.HTTP_UNAVAILABLE; try { exchange.sendResponseHeaders(returnCode, response.length); } catch (IOException e) { LOG.log(Level.SEVERE, STR, e); return false; } Out...
/** * Send a http response with HTTP_OK return code and response body * * @param isSuccess send back HTTP_OK if it is true, otherwise send back HTTP_UNAVAILABLE * @param exchange the HttpExchange to send response * @param response the response the sent back in response body * @return true if we send t...
Send a http response with HTTP_OK return code and response body
sendHttpResponse
{ "repo_name": "lucperkins/heron", "path": "heron/spi/src/java/com/twitter/heron/spi/utils/NetworkUtils.java", "license": "apache-2.0", "size": 18064 }
[ "com.sun.net.httpserver.HttpExchange", "java.io.IOException", "java.io.OutputStream", "java.net.HttpURLConnection", "java.util.logging.Level" ]
import com.sun.net.httpserver.HttpExchange; import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; import java.util.logging.Level;
import com.sun.net.httpserver.*; import java.io.*; import java.net.*; import java.util.logging.*;
[ "com.sun.net", "java.io", "java.net", "java.util" ]
com.sun.net; java.io; java.net; java.util;
702,232
@SuppressWarnings("unchecked") private void initComboBox() { // Lesson List<LessonDto> lessonDtoList = LessonService.searchLesson(null); for (LessonDto lessonDto : lessonDtoList) { ComboItem item = new ComboItem( lessonDto.getLessonId(), lessonDto.getLessonName()); cbxLesson.addItem(item); }...
@SuppressWarnings(STR) void function() { List<LessonDto> lessonDtoList = LessonService.searchLesson(null); for (LessonDto lessonDto : lessonDtoList) { ComboItem item = new ComboItem( lessonDto.getLessonId(), lessonDto.getLessonName()); cbxLesson.addItem(item); } for (QuestionType questionType : QuestionType.values()) {...
/** * Initialize combobox */
Initialize combobox
initComboBox
{ "repo_name": "ttlpolo2008/JapStu", "path": "SRC/LearnLanguage_Master/src/screen/S_ExerciseMaster.java", "license": "mit", "size": 32203 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,058,922
public void saveRequest(HttpServletRequest request, HttpServletResponse response) { if (!justUseSavedRequestOnGet || "GET".equals(request.getMethod())) { DefaultSavedRequest savedRequest = new DefaultSavedRequest(request, portResolver); if (createSessionAllowed || request.getSession...
void function(HttpServletRequest request, HttpServletResponse response) { if (!justUseSavedRequestOnGet "GET".equals(request.getMethod())) { DefaultSavedRequest savedRequest = new DefaultSavedRequest(request, portResolver); if (createSessionAllowed request.getSession(false) != null) { request.getSession().setAttribute(...
/** * Stores the current request, provided the configuration properties allow it. */
Stores the current request, provided the configuration properties allow it
saveRequest
{ "repo_name": "mrjabba/spring-security", "path": "web/src/main/java/org/springframework/security/web/savedrequest/HttpSessionRequestCache.java", "license": "apache-2.0", "size": 4090 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
639,831
public long offer(final Publication publication, final DirectBuffer buffer, final int offset, final int length) { return publication.offer(headerBuffer, 0, HEADER_LENGTH, buffer, offset, length, null); }
long function(final Publication publication, final DirectBuffer buffer, final int offset, final int length) { return publication.offer(headerBuffer, 0, HEADER_LENGTH, buffer, offset, length, null); }
/** * Non-blocking publish of a partial buffer containing a message plus session header to a cluster. * <p> * This version of the method will set the timestamp value in the header to {@link Aeron#NULL_VALUE}. * * @param publication to be offer to. * @param buffer containing message. ...
Non-blocking publish of a partial buffer containing a message plus session header to a cluster. This version of the method will set the timestamp value in the header to <code>Aeron#NULL_VALUE</code>
offer
{ "repo_name": "galderz/Aeron", "path": "aeron-cluster/src/main/java/io/aeron/cluster/client/IngressSessionDecorator.java", "license": "apache-2.0", "size": 3974 }
[ "io.aeron.Publication", "org.agrona.DirectBuffer" ]
import io.aeron.Publication; import org.agrona.DirectBuffer;
import io.aeron.*; import org.agrona.*;
[ "io.aeron", "org.agrona" ]
io.aeron; org.agrona;
2,335,917
void onLinkAttach(ProtonConnection connection, ProtonSender sender, ResourceIdentifier sourceAddress);
void onLinkAttach(ProtonConnection connection, ProtonSender sender, ResourceIdentifier sourceAddress);
/** * Handles a client's request to establish a link with Hono for receiving messages from a given address. * * @param connection The AMQP connection that the link is part of. * @param sender The link to be established. * @param sourceAddress The (remote) source address from the client's AMQP <...
Handles a client's request to establish a link with Hono for receiving messages from a given address
onLinkAttach
{ "repo_name": "kinbod/hono", "path": "service-base/src/main/java/org/eclipse/hono/service/amqp/AmqpEndpoint.java", "license": "epl-1.0", "size": 1755 }
[ "io.vertx.proton.ProtonConnection", "io.vertx.proton.ProtonSender", "org.eclipse.hono.util.ResourceIdentifier" ]
import io.vertx.proton.ProtonConnection; import io.vertx.proton.ProtonSender; import org.eclipse.hono.util.ResourceIdentifier;
import io.vertx.proton.*; import org.eclipse.hono.util.*;
[ "io.vertx.proton", "org.eclipse.hono" ]
io.vertx.proton; org.eclipse.hono;
111,949
RESULT_TYPE visitFederalFundsFutureTransactionDefinition(FederalFundsFutureTransactionDefinition future, DATA_TYPE data);
RESULT_TYPE visitFederalFundsFutureTransactionDefinition(FederalFundsFutureTransactionDefinition future, DATA_TYPE data);
/** * Federal funds future transaction method that takes data. * @param future A Federal funds future transaction * @param data The data * @return The result */
Federal funds future transaction method that takes data
visitFederalFundsFutureTransactionDefinition
{ "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.instrument.future.FederalFundsFutureTransactionDefinition" ]
import com.opengamma.analytics.financial.instrument.future.FederalFundsFutureTransactionDefinition;
import com.opengamma.analytics.financial.instrument.future.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
2,216,787
@Test public void addNonexistentPropertiesFile() { Configuration config = new ConfigurationBuilder() .withCommandlineOptions(ServerFactory.CLI_OPTIONS) .addPropertiesFile("/config/nonexistent.properties") .build(); assertNull(config.getString(Conf...
void function() { Configuration config = new ConfigurationBuilder() .withCommandlineOptions(ServerFactory.CLI_OPTIONS) .addPropertiesFile(STR) .build(); assertNull(config.getString(Config.HOST.getKey())); assertNull(config.getString(Config.PORT.getKey())); assertNull(config.getString(Config.WORKING_DIR.getKey())); asse...
/** * Assert that we can add a nonexistent properties file. */
Assert that we can add a nonexistent properties file
addNonexistentPropertiesFile
{ "repo_name": "kangaroo-server/kangaroo", "path": "kangaroo-common/src/test/java/net/krotscheck/kangaroo/server/ConfigurationBuilderTest.java", "license": "apache-2.0", "size": 9872 }
[ "org.apache.commons.configuration.Configuration", "org.junit.Assert" ]
import org.apache.commons.configuration.Configuration; import org.junit.Assert;
import org.apache.commons.configuration.*; import org.junit.*;
[ "org.apache.commons", "org.junit" ]
org.apache.commons; org.junit;
2,304,627
RemoteProcessGroupEntity getRemoteProcessGroup(String remoteProcessGroupId);
RemoteProcessGroupEntity getRemoteProcessGroup(String remoteProcessGroupId);
/** * Gets a remote process group. * * @param remoteProcessGroupId The id of the remote process group * @return group */
Gets a remote process group
getRemoteProcessGroup
{ "repo_name": "PuspenduBanerjee/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 53497 }
[ "org.apache.nifi.web.api.entity.RemoteProcessGroupEntity" ]
import org.apache.nifi.web.api.entity.RemoteProcessGroupEntity;
import org.apache.nifi.web.api.entity.*;
[ "org.apache.nifi" ]
org.apache.nifi;
1,078,293
private void maybeVisit(MappingVisitor v, Mapping m) throws IOException { int nextLine = getAdjustedLine(m.endPosition); int nextCol = getAdjustedCol(m.endPosition); // If this anything remaining in this mapping beyond the // current line and column position, write it out now. if (line...
void function(MappingVisitor v, Mapping m) throws IOException { int nextLine = getAdjustedLine(m.endPosition); int nextCol = getAdjustedCol(m.endPosition); if (line < nextLine (line == nextLine && col < nextCol)) { visit(v, m, nextLine, nextCol); } }
/** * Write any needed entries from the current position to the end of the * provided mapping. */
Write any needed entries from the current position to the end of the provided mapping
maybeVisit
{ "repo_name": "GoogleChromeLabs/chromeos_smart_card_connector", "path": "third_party/closure-compiler/src/src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java", "license": "apache-2.0", "size": 31449 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,861,618
long sweepInternal(GarbageCollectableBlobStore blobStore, List<String> ids, ArrayDeque<String> exceptionQueue, long maxModified) { long totalDeleted = 0; LOG.trace("Blob ids to be deleted {}", ids); for (String id : ids) { try { ...
long sweepInternal(GarbageCollectableBlobStore blobStore, List<String> ids, ArrayDeque<String> exceptionQueue, long maxModified) { long totalDeleted = 0; LOG.trace(STR, ids); for (String id : ids) { try { long deleted = blobStore.countDeleteChunks(newArrayList(id), maxModified); if (deleted != 1) { LOG.debug(STR, id); ...
/** * Deletes the given batch by deleting individually to exactly know the actual deletes. */
Deletes the given batch by deleting individually to exactly know the actual deletes
sweepInternal
{ "repo_name": "mreutegg/jackrabbit-oak", "path": "oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/MarkSweepGarbageCollector.java", "license": "apache-2.0", "size": 54961 }
[ "java.util.ArrayDeque", "java.util.List", "org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore" ]
import java.util.ArrayDeque; import java.util.List; import org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore;
import java.util.*; import org.apache.jackrabbit.oak.spi.blob.*;
[ "java.util", "org.apache.jackrabbit" ]
java.util; org.apache.jackrabbit;
2,779,602
public static KeyStoreType[] getAvailableTypes() { // TODO: populate only once KeyStoreType[] known = KeyStoreType.values(); ArrayList<KeyStoreType> available = new ArrayList<>(); for (KeyStoreType type : known) { if (isAvailable(type)) { available.add(type); } } return available.toArray(...
static KeyStoreType[] function() { KeyStoreType[] known = KeyStoreType.values(); ArrayList<KeyStoreType> available = new ArrayList<>(); for (KeyStoreType type : known) { if (isAvailable(type)) { available.add(type); } } return available.toArray(new KeyStoreType[available.size()]); }
/** * Get available keystore types. * * @return available keystore types */
Get available keystore types
getAvailableTypes
{ "repo_name": "venator85/portecle", "path": "src/main/net/sf/portecle/crypto/KeyStoreUtil.java", "license": "gpl-2.0", "size": 13055 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
94,485
public List<IsColor> getPointHoverBorderColor() { return ColorBuilder.parse(getPointHoverBorderColorAsString()); }
List<IsColor> function() { return ColorBuilder.parse(getPointHoverBorderColorAsString()); }
/** * Returns the point border color when hovered. If property is missing or not a color, returns the default border color. * * @return list of the point border color when hovered. If property is missing or not a color, returns the default border color. */
Returns the point border color when hovered. If property is missing or not a color, returns the default border color
getPointHoverBorderColor
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/data/LiningDataset.java", "license": "apache-2.0", "size": 98572 }
[ "java.util.List", "org.pepstock.charba.client.colors.ColorBuilder", "org.pepstock.charba.client.colors.IsColor" ]
import java.util.List; import org.pepstock.charba.client.colors.ColorBuilder; import org.pepstock.charba.client.colors.IsColor;
import java.util.*; import org.pepstock.charba.client.colors.*;
[ "java.util", "org.pepstock.charba" ]
java.util; org.pepstock.charba;
1,511,961
public Builder fixings(IborAveragedFixing... fixings) { return fixings(ImmutableList.copyOf(fixings)); }
Builder function(IborAveragedFixing... fixings) { return fixings(ImmutableList.copyOf(fixings)); }
/** * Sets the {@code fixings} property in the builder * from an array of objects. * @param fixings the new value, not empty * @return this, for chaining, not null */
Sets the fixings property in the builder from an array of objects
fixings
{ "repo_name": "nssales/Strata", "path": "modules/finance/src/main/java/com/opengamma/strata/finance/rate/IborAveragedRateObservation.java", "license": "apache-2.0", "size": 14047 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,313,931
Future<OperationStatusResponse> deleteRouteAsync(String routeTableName, String routeName);
Future<OperationStatusResponse> deleteRouteAsync(String routeTableName, String routeName);
/** * Set the specified route for the provided table in this subscription. * * @param routeTableName Required. The name of the route table where the * provided route will be set. * @param routeName Required. The name of the route that will be set on the * provided route table. * @return The ...
Set the specified route for the provided table in this subscription
deleteRouteAsync
{ "repo_name": "flydream2046/azure-sdk-for-java", "path": "service-management/azure-svc-mgmt-network/src/main/java/com/microsoft/windowsazure/management/network/RouteOperations.java", "license": "apache-2.0", "size": 37653 }
[ "com.microsoft.windowsazure.core.OperationStatusResponse", "java.util.concurrent.Future" ]
import com.microsoft.windowsazure.core.OperationStatusResponse; import java.util.concurrent.Future;
import com.microsoft.windowsazure.core.*; import java.util.concurrent.*;
[ "com.microsoft.windowsazure", "java.util" ]
com.microsoft.windowsazure; java.util;
1,324,661
Authenticator getAuthenticator() { return _webApp.getAuthenticator(); }
Authenticator getAuthenticator() { return _webApp.getAuthenticator(); }
/** * Returns the SessionManager's authenticator */
Returns the SessionManager's authenticator
getAuthenticator
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/server/session/SessionManager.java", "license": "gpl-2.0", "size": 48368 }
[ "com.caucho.security.Authenticator" ]
import com.caucho.security.Authenticator;
import com.caucho.security.*;
[ "com.caucho.security" ]
com.caucho.security;
770,601
public synchronized void registerEntityClasses(final Collection<String> iClassNames, final ClassLoader iClassLoader) { OLogManager.instance().debug(this, "Discovering entity classes for class names: %s", iClassNames); try { registerEntityClasses(OReflectionHelper.getClassesFor(iClassNames, iClassLo...
synchronized void function(final Collection<String> iClassNames, final ClassLoader iClassLoader) { OLogManager.instance().debug(this, STR, iClassNames); try { registerEntityClasses(OReflectionHelper.getClassesFor(iClassNames, iClassLoader)); } catch (ClassNotFoundException e) { throw new OException(e); } }
/** * Registers provided classes * * @param iClassNames * to be registered * @param iClassLoader */
Registers provided classes
registerEntityClasses
{ "repo_name": "DiceHoldingsInc/orientdb", "path": "core/src/main/java/com/orientechnologies/orient/core/entity/OEntityManager.java", "license": "apache-2.0", "size": 8203 }
[ "com.orientechnologies.common.exception.OException", "com.orientechnologies.common.log.OLogManager", "com.orientechnologies.common.reflection.OReflectionHelper", "java.util.Collection" ]
import com.orientechnologies.common.exception.OException; import com.orientechnologies.common.log.OLogManager; import com.orientechnologies.common.reflection.OReflectionHelper; import java.util.Collection;
import com.orientechnologies.common.exception.*; import com.orientechnologies.common.log.*; import com.orientechnologies.common.reflection.*; import java.util.*;
[ "com.orientechnologies.common", "java.util" ]
com.orientechnologies.common; java.util;
993,145
public void readHeader(HttpHeader header) throws IOException { // Recycling check if (header.nameEnd != 0) header.recycle(); // Checking for a blank line int chr = read(); if ((chr == CR) || (chr == LF)) { // Skipping CR if (chr == CR) read(); // Skipping LF heade...
void function(HttpHeader header) throws IOException { if (header.nameEnd != 0) header.recycle(); int chr = read(); if ((chr == CR) (chr == LF)) { if (chr == CR) read(); header.nameEnd = 0; header.valueEnd = 0; return; } else { pos--; } int maxRead = header.name.length; int readStart = pos; int readCount = 0; boolean co...
/** * Read a header, and copies it to the given buffer. This * function is meant to be used during the HTTP request header parsing. * Do NOT attempt to read the request body using it. * * @param requestLine Request line object * @throws IOException If an exception occurs during the underlying socket ...
Read a header, and copies it to the given buffer. This function is meant to be used during the HTTP request header parsing. Do NOT attempt to read the request body using it
readHeader
{ "repo_name": "NorthFacing/step-by-Java", "path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/connector/http/SocketInputStream.java", "license": "gpl-2.0", "size": 12733 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
109,662
protected static void printDiagnostic(Diagnostic diagnostic, String indent) { System.out.print(indent); System.out.println(diagnostic.getMessage()); for (Diagnostic child : diagnostic.getChildren()) { printDiagnostic(child, indent + " "); } }
static void function(Diagnostic diagnostic, String indent) { System.out.print(indent); System.out.println(diagnostic.getMessage()); for (Diagnostic child : diagnostic.getChildren()) { printDiagnostic(child, indent + " "); } }
/** * <!-- begin-user-doc --> * Prints diagnostics with indentation. * <!-- end-user-doc --> * @param diagnostic the diagnostic to print. * @param indent the indentation for printing. * @generated */
Prints diagnostics with indentation.
printDiagnostic
{ "repo_name": "unicesi/QD-SPL", "path": "ToolSupport/co.edu.icesi.shift.qaconfig.tests/src/qasvariabilitymodel/tests/QasvariabilitymodelExample.java", "license": "lgpl-3.0", "size": 3673 }
[ "org.eclipse.emf.common.util.Diagnostic" ]
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
378,199
protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; }
EnumSyntax[] function() { return myEnumValueTable; }
/** * Returns the enumeration value table for class Sides. */
Returns the enumeration value table for class Sides
getEnumValueTable
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/javax/print/attribute/standard/Sides.java", "license": "gpl-2.0", "size": 8898 }
[ "javax.print.attribute.EnumSyntax" ]
import javax.print.attribute.EnumSyntax;
import javax.print.attribute.*;
[ "javax.print" ]
javax.print;
1,403,960
@SuppressWarnings("unchecked") public Path getACopy() { Path newPath = new Path(); newPath.root = this.root; newPath.edgePath = (Stack<Edge>) edgePath.clone(); newPath.nodePath = (Stack<Node>) nodePath.clone(); return newPath; }
@SuppressWarnings(STR) Path function() { Path newPath = new Path(); newPath.root = this.root; newPath.edgePath = (Stack<Edge>) edgePath.clone(); newPath.nodePath = (Stack<Node>) nodePath.clone(); return newPath; }
/** * Get a copy of this path * * @return A copy of this path. */
Get a copy of this path
getACopy
{ "repo_name": "margaritis/gs-core", "path": "src/org/graphstream/graph/Path.java", "license": "lgpl-3.0", "size": 11889 }
[ "java.util.Stack" ]
import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
1,979,650
public JpqlSelectClause createSelectClause(Path selectedPath) { JpqlSelectExpression expression = createSelectExpression(createPath(selectedPath)); JpqlSelectExpressions expressions = new JpqlSelectExpressions(JpqlParserTreeConstants.JJTSELECTEXPRESSIONS); expressions = appendChildren(expres...
JpqlSelectClause function(Path selectedPath) { JpqlSelectExpression expression = createSelectExpression(createPath(selectedPath)); JpqlSelectExpressions expressions = new JpqlSelectExpressions(JpqlParserTreeConstants.JJTSELECTEXPRESSIONS); expressions = appendChildren(expressions, expression); return appendChildren(new...
/** * Creates a <tt>JpqlSelectClause</tt> node to select the specified path. */
Creates a JpqlSelectClause node to select the specified path
createSelectClause
{ "repo_name": "ArneLimburg/jpasecurity", "path": "src/main/java/org/jpasecurity/jpql/compiler/QueryPreparator.java", "license": "apache-2.0", "size": 22348 }
[ "org.jpasecurity.Path", "org.jpasecurity.jpql.parser.JpqlParserTreeConstants", "org.jpasecurity.jpql.parser.JpqlSelectClause", "org.jpasecurity.jpql.parser.JpqlSelectExpression", "org.jpasecurity.jpql.parser.JpqlSelectExpressions" ]
import org.jpasecurity.Path; import org.jpasecurity.jpql.parser.JpqlParserTreeConstants; import org.jpasecurity.jpql.parser.JpqlSelectClause; import org.jpasecurity.jpql.parser.JpqlSelectExpression; import org.jpasecurity.jpql.parser.JpqlSelectExpressions;
import org.jpasecurity.*; import org.jpasecurity.jpql.parser.*;
[ "org.jpasecurity", "org.jpasecurity.jpql" ]
org.jpasecurity; org.jpasecurity.jpql;
1,283,275
public void createPanel(Layer[] inLayers) { logger.fine("creating panel"); Layer[] layers = inLayers; if (layers == null) { layers = new Layer[0]; } if (panesPanel == null) { panesPanel = new JPanel(); panelGridbag = new GridBagLayout(); ...
void function(Layer[] inLayers) { logger.fine(STR); Layer[] layers = inLayers; if (layers == null) { layers = new Layer[0]; } if (panesPanel == null) { panesPanel = new JPanel(); panelGridbag = new GridBagLayout(); pgbc = new GridBagConstraints(); panesPanel.setLayout(panelGridbag); pgbc.gridwidth = GridBagConstraints....
/** * Create the panel that shows the LayerPanes. This method creates the * on/off buttons, palette buttons, and layer labels, and adds them to the * scrollPane used to display all the layers. * * @param inLayers the Layer[] that reflects all possible layers that can be * added to ...
Create the panel that shows the LayerPanes. This method creates the on/off buttons, palette buttons, and layer labels, and adds them to the scrollPane used to display all the layers
createPanel
{ "repo_name": "d2fn/passage", "path": "src/main/java/com/bbn/openmap/gui/LayersPanel.java", "license": "mit", "size": 40181 }
[ "com.bbn.openmap.Layer", "java.awt.GridBagConstraints", "java.awt.GridBagLayout", "javax.swing.JPanel" ]
import com.bbn.openmap.Layer; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.JPanel;
import com.bbn.openmap.*; import java.awt.*; import javax.swing.*;
[ "com.bbn.openmap", "java.awt", "javax.swing" ]
com.bbn.openmap; java.awt; javax.swing;
1,348,480
boolean isTagged(CTag tag);
boolean isTagged(CTag tag);
/** * Determines whether this view is tagged with parameter tag. * * @param tag * * @return True, if the view is tagged. False, otherwise. */
Determines whether this view is tagged with parameter tag
isTagged
{ "repo_name": "chubbymaggie/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/IViewConfiguration.java", "license": "apache-2.0", "size": 4659 }
[ "com.google.security.zynamics.binnavi.Tagging" ]
import com.google.security.zynamics.binnavi.Tagging;
import com.google.security.zynamics.binnavi.*;
[ "com.google.security" ]
com.google.security;
289,711
public static ConstructorInvoker getConstructor(Class<?> clazz, Class<?>... params) { for (final Constructor<?> constructor : clazz.getDeclaredConstructors()) { if (Arrays.equals(constructor.getParameterTypes(), params)) {
static ConstructorInvoker function(Class<?> clazz, Class<?>... params) { for (final Constructor<?> constructor : clazz.getDeclaredConstructors()) { if (Arrays.equals(constructor.getParameterTypes(), params)) {
/** * Search for the first publically and privately defined constructor of the given name and parameter count. * @param clazz - a class to start with. * @param params - the expected parameters. * @return An object that invokes this constructor. * @throws IllegalStateException If we cannot find ...
Search for the first publically and privately defined constructor of the given name and parameter count
getConstructor
{ "repo_name": "pgmann/TabListHide", "path": "src/com/pgmann/tablisthide/Reflection.java", "license": "gpl-3.0", "size": 14427 }
[ "java.lang.reflect.Constructor", "java.util.Arrays" ]
import java.lang.reflect.Constructor; import java.util.Arrays;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
489,560
public void addPackage(PackageDto pkgDto) { try { BufferedWriter out = new BufferedWriter(new FileWriter( filenamePackages, true)); out.write("Package: "); out.write(pkgDto.getName()); out.newLine(); out.write("Version: "); ...
void function(PackageDto pkgDto) { try { BufferedWriter out = new BufferedWriter(new FileWriter( filenamePackages, true)); out.write(STR); out.write(pkgDto.getName()); out.newLine(); out.write(STR); out.write(pkgDto.getVersion()); String release = pkgDto.getRelease(); if (!release.equalsIgnoreCase("XSTR-" + release); }...
/** * add package info to Packages file in repository * * @param pkgDto package object */
add package info to Packages file in repository
addPackage
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/taskomatic/task/repomd/DebPackageWriter.java", "license": "gpl-2.0", "size": 7997 }
[ "com.redhat.rhn.frontend.dto.PackageDto", "java.io.BufferedWriter", "java.io.FileWriter" ]
import com.redhat.rhn.frontend.dto.PackageDto; import java.io.BufferedWriter; import java.io.FileWriter;
import com.redhat.rhn.frontend.dto.*; import java.io.*;
[ "com.redhat.rhn", "java.io" ]
com.redhat.rhn; java.io;
2,213,671
public CharTrieIndex index(int maxLevels, int minWeight) { AtomicInteger numberSplit = new AtomicInteger(0); int depth = -1; do { numberSplit.set(0); if (0 == ++depth) { numberSplit.incrementAndGet(); root().split(); } else { root().streamDecendents(dep...
CharTrieIndex function(int maxLevels, int minWeight) { AtomicInteger numberSplit = new AtomicInteger(0); int depth = -1; do { numberSplit.set(0); if (0 == ++depth) { numberSplit.incrementAndGet(); root().split(); } else { root().streamDecendents(depth).forEach(node -> { TrieNode godparent = node.godparent(); if (node.g...
/** * Creates the index tree using the accumulated documents * * @param maxLevels - Maximum depth of the tree to build * @param minWeight - Minimum number of cursors for a node to be index using, exclusive bound * @return this char trie index */
Creates the index tree using the accumulated documents
index
{ "repo_name": "SimiaCryptus/utilities", "path": "java-util/src/main/java/com/simiacryptus/text/CharTrieIndex.java", "license": "apache-2.0", "size": 7449 }
[ "java.util.concurrent.atomic.AtomicInteger" ]
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
1,157,783
public boolean incrementTurn() throws IOException, TPException;
boolean function() throws IOException, TPException;
/** * Updates game-world, using a {@link Client}. * To be summoned at the start of turn. * * @throws IOException * @throws TPException */
Updates game-world, using a <code>Client</code>. To be summoned at the start of turn
incrementTurn
{ "repo_name": "thousandparsec-obsolete/gencon-rfts-ai", "path": "gencon/gamelib/FullGameStatus.java", "license": "gpl-2.0", "size": 652 }
[ "java.io.IOException", "net.thousandparsec.netlib.TPException" ]
import java.io.IOException; import net.thousandparsec.netlib.TPException;
import java.io.*; import net.thousandparsec.netlib.*;
[ "java.io", "net.thousandparsec.netlib" ]
java.io; net.thousandparsec.netlib;
2,017,103
void feedIntoMessageDigests(FileChannel channel, MessageDigest[] mds, long offset, int size) throws IOException; } private static final class MemoryMappedFileDataSource implements DataSource { // private static final Os OS = Libcore.os; //TODO hardy 这里临时替换为一个比较大的值 // private ...
void feedIntoMessageDigests(FileChannel channel, MessageDigest[] mds, long offset, int size) throws IOException; } private static final class MemoryMappedFileDataSource implements DataSource { private static final long MEMORY_PAGE_SIZE_BYTES = 10 * 1024 *1024; private final FileDescriptor mFd; private final long mFileP...
/** * Feeds the specified region of this source's data into the provided digests. Each digest * instance gets the same data. * * @param offset offset of the region inside this data source. * @param size size (in bytes) of the region. */
Feeds the specified region of this source's data into the provided digests. Each digest instance gets the same data
feedIntoMessageDigests
{ "repo_name": "bihe0832/AndroidGetAPKInfo", "path": "CheckAndroidV2Signature/src/main/java/com/bihe0832/checksignature/ApkSignatureSchemeV2Verifier.java", "license": "apache-2.0", "size": 52600 }
[ "java.io.FileDescriptor", "java.io.IOException", "java.nio.channels.FileChannel", "java.security.MessageDigest" ]
import java.io.FileDescriptor; import java.io.IOException; import java.nio.channels.FileChannel; import java.security.MessageDigest;
import java.io.*; import java.nio.channels.*; import java.security.*;
[ "java.io", "java.nio", "java.security" ]
java.io; java.nio; java.security;
1,543,297
EReference getMessageViewReference_References();
EReference getMessageViewReference_References();
/** * Returns the meta object for the reference '{@link ca.mcgill.cs.sel.ram.MessageViewReference#getReferences <em>References</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>References</em>'. * @see ca.mcgill.cs.sel.ram.MessageViewRefe...
Returns the meta object for the reference '<code>ca.mcgill.cs.sel.ram.MessageViewReference#getReferences References</code>'.
getMessageViewReference_References
{ "repo_name": "mjorod/textram", "path": "tool/ca.mcgill.sel.ram/src/ca/mcgill/cs/sel/ram/RamPackage.java", "license": "mit", "size": 271132 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,065,311
Cancellable announce(String serviceName, int port, byte[] payload);
Cancellable announce(String serviceName, int port, byte[] payload);
/** * Registers an endpoint that could be discovered by external party with a payload. * @param serviceName Name of the endpoint * @param port Port of the endpoint * @param payload byte array payload */
Registers an endpoint that could be discovered by external party with a payload
announce
{ "repo_name": "cdapio/twill", "path": "twill-api/src/main/java/org/apache/twill/api/ServiceAnnouncer.java", "license": "apache-2.0", "size": 1516 }
[ "org.apache.twill.common.Cancellable" ]
import org.apache.twill.common.Cancellable;
import org.apache.twill.common.*;
[ "org.apache.twill" ]
org.apache.twill;
813,358
public Builder constraints(List<Constraint> constraints) { this.constraints = ImmutableList.copyOf(constraints); return this; } }
Builder function(List<Constraint> constraints) { this.constraints = ImmutableList.copyOf(constraints); return this; } }
/** * Sets the constraints for the intent that will be built. * * @param constraints constraints to use for built intent * @return this builder */
Sets the constraints for the intent that will be built
constraints
{ "repo_name": "opennetworkinglab/onos", "path": "core/api/src/main/java/org/onosproject/net/domain/DomainIntent.java", "license": "apache-2.0", "size": 6197 }
[ "com.google.common.collect.ImmutableList", "java.util.List", "org.onosproject.net.intent.Constraint" ]
import com.google.common.collect.ImmutableList; import java.util.List; import org.onosproject.net.intent.Constraint;
import com.google.common.collect.*; import java.util.*; import org.onosproject.net.intent.*;
[ "com.google.common", "java.util", "org.onosproject.net" ]
com.google.common; java.util; org.onosproject.net;
2,683,054
private void initContagious() { Item item = getSprite(); StateAbility ability = item.getAbility(StateAbilityName.ITEM_CONTAGION_MODE); float mode = ability.getStrength(); contagious = mode!=StateAbilityName.ITEM_CONTAGION_NONE; }
void function() { Item item = getSprite(); StateAbility ability = item.getAbility(StateAbilityName.ITEM_CONTAGION_MODE); float mode = ability.getStrength(); contagious = mode!=StateAbilityName.ITEM_CONTAGION_NONE; }
/** * Initialise l'indicateur de contagion. */
Initialise l'indicateur de contagion
initContagious
{ "repo_name": "vlabatut/totalboumboum", "path": "src/org/totalboumboum/ai/v201314/adapter/data/internal/AiDataItem.java", "license": "gpl-2.0", "size": 12283 }
[ "org.totalboumboum.engine.content.feature.ability.StateAbility", "org.totalboumboum.engine.content.feature.ability.StateAbilityName", "org.totalboumboum.engine.content.sprite.item.Item" ]
import org.totalboumboum.engine.content.feature.ability.StateAbility; import org.totalboumboum.engine.content.feature.ability.StateAbilityName; import org.totalboumboum.engine.content.sprite.item.Item;
import org.totalboumboum.engine.content.feature.ability.*; import org.totalboumboum.engine.content.sprite.item.*;
[ "org.totalboumboum.engine" ]
org.totalboumboum.engine;
421,153
@Override public void notifyChanged(Notification notification) { updateChildren(notification); super.notifyChanged(notification); }
void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); }
/** * 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": "FTSRG/mondo-collab-framework", "path": "archive/workspaceTracker/VA/ikerlanEMF.edit/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/provider/CtrlUnit30ItemProvider.java", "license": "epl-1.0", "size": 4964 }
[ "org.eclipse.emf.common.notify.Notification" ]
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,525,208
@Test public void testArrayListWriteMethod() throws Exception { final PropertyDescriptor descriptor = propertyUtilsBean.getPropertyDescriptor(bean, "arrayList"); assertNotNull("No ArrayList Write Method", descriptor.getWriteMethod()); }
void function() throws Exception { final PropertyDescriptor descriptor = propertyUtilsBean.getPropertyDescriptor(bean, STR); assertNotNull(STR, descriptor.getWriteMethod()); }
/** * Test Write Method for an ArrayList */
Test Write Method for an ArrayList
testArrayListWriteMethod
{ "repo_name": "apache/commons-beanutils", "path": "src/test/java/org/apache/commons/beanutils2/IndexedPropertyTestCase.java", "license": "apache-2.0", "size": 15948 }
[ "java.beans.PropertyDescriptor", "org.junit.Assert" ]
import java.beans.PropertyDescriptor; import org.junit.Assert;
import java.beans.*; import org.junit.*;
[ "java.beans", "org.junit" ]
java.beans; org.junit;
739,316
@Test public void testRunTimeAsXML() throws Exception { final byte[] bplist = FileUtil.readBytes("Tests/Data/Apple_RunTime.plist"); final String xml = BplistReader.parse(bplist).toXML(); assertTrue(xml.contains("<plist version=\"1.0\"><dict>")); }
void function() throws Exception { final byte[] bplist = FileUtil.readBytes(STR); final String xml = BplistReader.parse(bplist).toXML(); assertTrue(xml.contains(STR1.0\STR)); }
/** * When presented as XML, the RUN_TIME tag will be contained within a <tt>dict</tt> XML element. * * @throws Exception */
When presented as XML, the RUN_TIME tag will be contained within a dict XML element
testRunTimeAsXML
{ "repo_name": "drewnoakes/metadata-extractor", "path": "Tests/com/drew/metadata/plist/BplistReaderTest.java", "license": "apache-2.0", "size": 637 }
[ "com.drew.tools.FileUtil", "org.junit.Assert" ]
import com.drew.tools.FileUtil; import org.junit.Assert;
import com.drew.tools.*; import org.junit.*;
[ "com.drew.tools", "org.junit" ]
com.drew.tools; org.junit;
2,309,772
private void displayNextQuestion() { //get the next question from the quiz manager currentQuestion = quizManager.getNextQuestion(); //build the string that states what library the question is from and what groups the library is contained by. lblQuestionFrom.setText("Question from li...
void function() { currentQuestion = quizManager.getNextQuestion(); lblQuestionFrom.setText(STR + IOManager.getLibraryName(currentQuestion.getParentLibrary()) + STR); String[] groups = IOManager.getGroupsThatContain(currentQuestion.getParentLibrary()); if (groups.length > 1) { String txtAppend = STR; for (int i = 0; i <...
/** * Asks the QuizManager for the next question to display, and sets the data * to the question area and answer areas. */
Asks the QuizManager for the next question to display, and sets the data to the question area and answer areas
displayNextQuestion
{ "repo_name": "edesiocs/ingatan", "path": "src/org/ingatan/component/quiztime/QuizWindow.java", "license": "gpl-3.0", "size": 59522 }
[ "java.util.ArrayList", "org.ingatan.component.answerfield.IAnswerField", "org.ingatan.data.FlexiQuestion", "org.ingatan.data.TableQuestion", "org.ingatan.io.IOManager" ]
import java.util.ArrayList; import org.ingatan.component.answerfield.IAnswerField; import org.ingatan.data.FlexiQuestion; import org.ingatan.data.TableQuestion; import org.ingatan.io.IOManager;
import java.util.*; import org.ingatan.component.answerfield.*; import org.ingatan.data.*; import org.ingatan.io.*;
[ "java.util", "org.ingatan.component", "org.ingatan.data", "org.ingatan.io" ]
java.util; org.ingatan.component; org.ingatan.data; org.ingatan.io;
1,886,256
private String getAttribute(Node n, String s) { return n.getAttributes().getNamedItem(s).getNodeValue(); }
String function(Node n, String s) { return n.getAttributes().getNamedItem(s).getNodeValue(); }
/** * Gets the value of the attribute associated with the node and string * *@param n Node in the xml file *@param s String representing the attribute of interest *@return String representing the value associated with attribute s */
Gets the value of the attribute associated with the node and string
getAttribute
{ "repo_name": "Chase-M/Cellular-Automaton", "path": "src/cellsociety_team02/XMLParser.java", "license": "mit", "size": 7726 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,203,417
protected void initPrototype(Scriptable scope) { Scriptable arrayProto = ScriptableObject.getClassPrototype(scope, "Array"); if (arrayProto != null) { this.setPrototype(arrayProto); } }
void function(Scriptable scope) { Scriptable arrayProto = ScriptableObject.getClassPrototype(scope, "Array"); if (arrayProto != null) { this.setPrototype(arrayProto); } }
/** * Set the prototype to the Array prototype so we can use array methds such as * push, pop, shift, slice etc. * @param scope the global scope for looking up the Array constructor */
Set the prototype to the Array prototype so we can use array methds such as push, pop, shift, slice etc
initPrototype
{ "repo_name": "avdata99/SIAT", "path": "siat-1.0-SOURCE/src/tools/grs/src/org/ringojs/wrappers/ScriptableList.java", "license": "gpl-3.0", "size": 7643 }
[ "org.mozilla.javascript.Scriptable", "org.mozilla.javascript.ScriptableObject" ]
import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject;
import org.mozilla.javascript.*;
[ "org.mozilla.javascript" ]
org.mozilla.javascript;
2,842,770
@Test public void echoGroups() { RestAssured.given().auth() .oauth2(token) .get("/endp/echo") .then().assertThat().statusCode(200) .body(equalTo("User")); }
void function() { RestAssured.given().auth() .oauth2(token) .get(STR) .then().assertThat().statusCode(200) .body(equalTo("User")); }
/** * Validate a request with MP-JWT without a 'groups' claim is successful * due to the default value being provided in the configuration * */
Validate a request with MP-JWT without a 'groups' claim is successful due to the default value being provided in the configuration
echoGroups
{ "repo_name": "quarkusio/quarkus", "path": "extensions/smallrye-jwt/deployment/src/test/java/io/quarkus/jwt/test/DefaultGroupsUnitTest.java", "license": "apache-2.0", "size": 2142 }
[ "io.restassured.RestAssured" ]
import io.restassured.RestAssured;
import io.restassured.*;
[ "io.restassured" ]
io.restassured;
2,449,113
@BeforeClass public static void initialiseStore() throws Exception { TestPropertiesProvider provider = new TestPropertiesProvider(); Client c = new TransportClient(); if (HOST.equals("embedded")) { _node = (ElasticsearchNodeImpl)ServiceRegistryUtil.getSingleService(Elasticsea...
static void function() throws Exception { TestPropertiesProvider provider = new TestPropertiesProvider(); Client c = new TransportClient(); if (HOST.equals(STR)) { _node = (ElasticsearchNodeImpl)ServiceRegistryUtil.getSingleService(ElasticsearchNode.class); _node.init(); c = _node.getClient(); } else { c = new Transpor...
/** * tear down after test.^ * @throws Exception */
tear down after test.^
initialiseStore
{ "repo_name": "jorgemoralespou/rtgov", "path": "modules/activity-analysis/situation-store-elasticsearch/src/test/java/org/overlord/rtgov/analytics/situation/store/elasticsearch/ElasticsearchSituationStoreTest.java", "license": "apache-2.0", "size": 46391 }
[ "org.elasticsearch.client.Client", "org.elasticsearch.client.transport.TransportClient", "org.elasticsearch.common.transport.InetSocketTransportAddress", "org.overlord.commons.services.ServiceRegistryUtil", "org.overlord.rtgov.common.elasticsearch.ElasticsearchNode", "org.overlord.rtgov.common.util.RTGovP...
import org.elasticsearch.client.Client; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.common.transport.InetSocketTransportAddress; import org.overlord.commons.services.ServiceRegistryUtil; import org.overlord.rtgov.common.elasticsearch.ElasticsearchNode; import org.overlord.rtgov.c...
import org.elasticsearch.client.*; import org.elasticsearch.client.transport.*; import org.elasticsearch.common.transport.*; import org.overlord.commons.services.*; import org.overlord.rtgov.common.elasticsearch.*; import org.overlord.rtgov.common.util.*; import org.overlord.rtgov.internal.common.elasticsearch.*;
[ "org.elasticsearch.client", "org.elasticsearch.common", "org.overlord.commons", "org.overlord.rtgov" ]
org.elasticsearch.client; org.elasticsearch.common; org.overlord.commons; org.overlord.rtgov;
2,672,145
private JFreeChart createChart(XYDataset dataset, long lastentry) { JFreeChart chart = ChartFactory.createTimeSeriesChart( name, // title "time", // x-axis label "temperature", // y-axis label dataset, // data true, // create legend? true, // generate too...
JFreeChart function(XYDataset dataset, long lastentry) { JFreeChart chart = ChartFactory.createTimeSeriesChart( name, "time", STR, dataset, true, true, false ); chart.setBackgroundPaint(Color.white); XYPlot plot = (XYPlot) chart.getPlot(); NumberAxis axis1 = new NumberAxis(getAxisName()); axis1.setAutoRangeIncludesZero...
/** * Creates a chart. * * @param dataset1 a dataset. * * @return A chart. */
Creates a chart
createChart
{ "repo_name": "organicsmarthome/OSHv4", "path": "source/osh_comdriver_gui/src/osh/comdriver/simulation/cruisecontrol/AbstractDrawer.java", "license": "gpl-3.0", "size": 4926 }
[ "java.awt.Color", "java.util.TimeZone", "org.jfree.chart.ChartFactory", "org.jfree.chart.JFreeChart", "org.jfree.chart.axis.DateAxis", "org.jfree.chart.axis.NumberAxis", "org.jfree.chart.plot.XYPlot", "org.jfree.chart.renderer.xy.StandardXYItemRenderer", "org.jfree.data.xy.XYDataset", "org.jfree.u...
import java.awt.Color; import java.util.TimeZone; import org.jfree.chart.ChartFactory; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.DateAxis; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.renderer.xy.StandardXYItemRenderer; import org.jfree.data.xy....
import java.awt.*; import java.util.*; import org.jfree.chart.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.renderer.xy.*; import org.jfree.data.xy.*; import org.jfree.ui.*;
[ "java.awt", "java.util", "org.jfree.chart", "org.jfree.data", "org.jfree.ui" ]
java.awt; java.util; org.jfree.chart; org.jfree.data; org.jfree.ui;
2,737,981
public List<VolumeInfo> describeVolumes(List<String> volumeIds) throws EC2Exception { return describeVolumes(volumeIds, null); }
List<VolumeInfo> function(List<String> volumeIds) throws EC2Exception { return describeVolumes(volumeIds, null); }
/** * Gets a list of EBS volumes for this account. * <p> * If the list of volume IDs is empty then a list of all volumes owned * by the caller will be returned. Otherwise the list will contain * information for the requested volumes only. * * @param volumeIds A list of volumes ({@link com.xerox.amazonws....
Gets a list of EBS volumes for this account. If the list of volume IDs is empty then a list of all volumes owned by the caller will be returned. Otherwise the list will contain information for the requested volumes only
describeVolumes
{ "repo_name": "canwe/typica", "path": "java/com/xerox/amazonws/ec2/Jec2.java", "license": "apache-2.0", "size": 117983 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,090,703
@Test @SmallTest @MinWebLayerVersion(89) public void testExternalIntentAfterRedirectInBackgroundTabLaunchedWhenBackgroundLaunchesAllowed() throws Throwable { InstrumentationActivity activity = mActivityTestRule.launchShellWithUrl(ABOUT_BLANK_URL); IntentInterceptor intent...
@MinWebLayerVersion(89) void function() throws Throwable { InstrumentationActivity activity = mActivityTestRule.launchShellWithUrl(ABOUT_BLANK_URL); IntentInterceptor intentInterceptor = new IntentInterceptor(); activity.setIntentInterceptor(intentInterceptor); Tab backgroundTab = TestThreadUtils.runOnUiThreadBlocking(...
/** * Tests that a redirect to an external intent in a background tab is launched when * intent launches are allowed in the background for this navigation. */
Tests that a redirect to an external intent in a background tab is launched when intent launches are allowed in the background for this navigation
testExternalIntentAfterRedirectInBackgroundTabLaunchedWhenBackgroundLaunchesAllowed
{ "repo_name": "chromium/chromium", "path": "weblayer/browser/android/javatests/src/org/chromium/weblayer/test/ExternalNavigationTest.java", "license": "bsd-3-clause", "size": 76069 }
[ "android.content.Intent", "android.net.Uri", "org.chromium.content_public.browser.test.util.TestThreadUtils", "org.chromium.weblayer.NavigateParams", "org.chromium.weblayer.Tab", "org.chromium.weblayer.shell.InstrumentationActivity", "org.junit.Assert" ]
import android.content.Intent; import android.net.Uri; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.weblayer.NavigateParams; import org.chromium.weblayer.Tab; import org.chromium.weblayer.shell.InstrumentationActivity; import org.junit.Assert;
import android.content.*; import android.net.*; import org.chromium.content_public.browser.test.util.*; import org.chromium.weblayer.*; import org.chromium.weblayer.shell.*; import org.junit.*;
[ "android.content", "android.net", "org.chromium.content_public", "org.chromium.weblayer", "org.junit" ]
android.content; android.net; org.chromium.content_public; org.chromium.weblayer; org.junit;
1,489,562
protected JvmRTInputArgsTableMeta createJvmRTInputArgsTableMetaNode(String tableName, String groupName, SnmpMib mib, MBeanServer server) { return new JvmRTInputArgsTableMetaImpl(mib, objectserver); }
JvmRTInputArgsTableMeta function(String tableName, String groupName, SnmpMib mib, MBeanServer server) { return new JvmRTInputArgsTableMetaImpl(mib, objectserver); }
/** * Factory method for "JvmRTInputArgsTable" table metadata class. * * You can redefine this method if you need to replace the default * generated metadata class with your own customized class. * * @param tableName Name of the table object ("JvmRTInputArgsTable") * @param groupName ...
Factory method for "JvmRTInputArgsTable" table metadata class. You can redefine this method if you need to replace the default generated metadata class with your own customized class
createJvmRTInputArgsTableMetaNode
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRuntimeMetaImpl.java", "license": "mit", "size": 7027 }
[ "com.sun.jmx.snmp.agent.SnmpMib", "javax.management.MBeanServer" ]
import com.sun.jmx.snmp.agent.SnmpMib; import javax.management.MBeanServer;
import com.sun.jmx.snmp.agent.*; import javax.management.*;
[ "com.sun.jmx", "javax.management" ]
com.sun.jmx; javax.management;
1,928,469
@WebMethod(operationName = "GetSolutions") @WebResult(targetNamespace = "urn:sbmappservices72") @RequestWrapper(localName = "GetSolutions", targetNamespace = "urn:sbmappservices72", className = "com.prisch.sbm.stubs.GetSolutions") @ResponseWrapper(localName = "GetSolutionsResponse", targetNamespace = "u...
@WebMethod(operationName = STR) @WebResult(targetNamespace = STR) @RequestWrapper(localName = STR, targetNamespace = STR, className = STR) @ResponseWrapper(localName = STR, targetNamespace = STR, className = STR) List<SolutionData> function( @WebParam(name = "auth", targetNamespace = STR) Auth auth, @WebParam(name = ST...
/** * Gets the list of available solutions. * * @param auth * @param options * @return * returns java.util.List<com.prisch.sbm.stubs.SolutionData> * @throws AEWebservicesFaultFault */
Gets the list of available solutions
getSolutions
{ "repo_name": "PriscH/SlackAgent", "path": "client/src/main/java/com/prisch/sbm/stubs/Sbmappservices72PortType.java", "license": "gpl-3.0", "size": 42158 }
[ "java.util.List", "javax.jws.WebMethod", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.RequestWrapper", "javax.xml.ws.ResponseWrapper" ]
import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper;
import java.util.*; import javax.jws.*; import javax.xml.ws.*;
[ "java.util", "javax.jws", "javax.xml" ]
java.util; javax.jws; javax.xml;
425,997
@Update(sql="INSERT INTO " + Tables.CAMERAS + " (" + CamerasColumns.CAMERA_ID + ", " + CamerasColumns.CAMERA_TITLE + ", " + CamerasColumns.CAMERA_ROAD_NAME + ", " + CamerasColumns.CAMERA_URL + ", " + CamerasColumns.CAMERA_LATITUDE + ", " + CamerasColumns.CAMERA_LONGITUDE + ", " + CamerasColumns....
@Update(sql=STR + Tables.CAMERAS + STR + CamerasColumns.CAMERA_ID + STR + CamerasColumns.CAMERA_TITLE + STR + CamerasColumns.CAMERA_ROAD_NAME + STR + CamerasColumns.CAMERA_URL + STR + CamerasColumns.CAMERA_LATITUDE + STR + CamerasColumns.CAMERA_LONGITUDE + STR + CamerasColumns.CAMERA_HAS_VIDEO + STR + CamerasColumns.CA...
/** * Insert cameras into table. * * @param cameraItems * @param callback */
Insert cameras into table
insertCameras
{ "repo_name": "chrxn/wsdot-mobile-app", "path": "src/main/java/gov/wa/wsdot/mobile/client/service/WSDOTDataService.java", "license": "gpl-3.0", "size": 26789 }
[ "com.google.code.gwt.database.client.service.RowIdListCallback", "com.google.code.gwt.database.client.service.Update", "gov.wa.wsdot.mobile.client.service.WSDOTContract", "gov.wa.wsdot.mobile.shared.CameraItem", "java.util.List" ]
import com.google.code.gwt.database.client.service.RowIdListCallback; import com.google.code.gwt.database.client.service.Update; import gov.wa.wsdot.mobile.client.service.WSDOTContract; import gov.wa.wsdot.mobile.shared.CameraItem; import java.util.List;
import com.google.code.gwt.database.client.service.*; import gov.wa.wsdot.mobile.client.service.*; import gov.wa.wsdot.mobile.shared.*; import java.util.*;
[ "com.google.code", "gov.wa.wsdot", "java.util" ]
com.google.code; gov.wa.wsdot; java.util;
993,970
private void ensureDeleted(Path path) throws IOException { long startTime = System.currentTimeMillis(); do { // Note: Files.notExists is not the same as !Files.exists if (Files.notExists(path)) { return; } System.gc(); // allow finalize...
void function(Path path) throws IOException { long startTime = System.currentTimeMillis(); do { if (Files.notExists(path)) { return; } System.gc(); try { Thread.sleep(RETRY_DELETE_MILLIS); } catch (InterruptedException e) { throw new IOException(STR + path, e); } } while ((System.currentTimeMillis() - startTime) <= MAX...
/** * Wait until it is confirmed that a file has been deleted. * @param path the path for the file to be deleted * @throws IOException if problems occur while deleting the file */
Wait until it is confirmed that a file has been deleted
ensureDeleted
{ "repo_name": "md-5/jdk10", "path": "test/langtools/tools/lib/toolbox/ToolBox.java", "license": "gpl-2.0", "size": 33890 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,049,873
protected void validateAuthzServices(PDPDescriptor pdpDescriptor) throws ValidationException { if (pdpDescriptor.getAuthzServices() == null || pdpDescriptor.getAuthzServices().size() == 0) { throw new ValidationException("Must have one or more AuthzServices."); } }
void function(PDPDescriptor pdpDescriptor) throws ValidationException { if (pdpDescriptor.getAuthzServices() == null pdpDescriptor.getAuthzServices().size() == 0) { throw new ValidationException(STR); } }
/** * Checks that one or more Authz Services are present. * * @param pdpDescriptor * @throws ValidationException */
Checks that one or more Authz Services are present
validateAuthzServices
{ "repo_name": "Safewhere/kombit-web-java", "path": "kombit-opensaml-2.5.1/src/org/opensaml/saml2/metadata/validator/PDPDescriptorSchemaValidator.java", "license": "mit", "size": 1927 }
[ "org.opensaml.saml2.metadata.PDPDescriptor", "org.opensaml.xml.validation.ValidationException" ]
import org.opensaml.saml2.metadata.PDPDescriptor; import org.opensaml.xml.validation.ValidationException;
import org.opensaml.saml2.metadata.*; import org.opensaml.xml.validation.*;
[ "org.opensaml.saml2", "org.opensaml.xml" ]
org.opensaml.saml2; org.opensaml.xml;
797,210
public SubReportBuilder setDataSource(String expression) { return setDataSource(DJConstants.DATA_SOURCE_ORIGIN_PARAMETER, DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE, expression); }
SubReportBuilder function(String expression) { return setDataSource(DJConstants.DATA_SOURCE_ORIGIN_PARAMETER, DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE, expression); }
/** * like addDataSource(int origin, String expression) but the origin will be from a Parameter * @param expression * @return */
like addDataSource(int origin, String expression) but the origin will be from a Parameter
setDataSource
{ "repo_name": "FDVSolutions/DynamicJasper", "path": "src/main/java/ar/com/fdvs/dj/domain/builders/SubReportBuilder.java", "license": "lgpl-3.0", "size": 7743 }
[ "ar.com.fdvs.dj.core.DJConstants" ]
import ar.com.fdvs.dj.core.DJConstants;
import ar.com.fdvs.dj.core.*;
[ "ar.com.fdvs" ]
ar.com.fdvs;
14,307
public List getPoolIdsByItem(String itemId) { try { QuestionPoolService service = new QuestionPoolService(); return service.getPoolIdsByItem(itemId); } catch (Exception ex) { throw new QuestionPoolServiceException(ex); } }
List function(String itemId) { try { QuestionPoolService service = new QuestionPoolService(); return service.getPoolIdsByItem(itemId); } catch (Exception ex) { throw new QuestionPoolServiceException(ex); } }
/** * Get a list of pools that have a specific Agent */
Get a list of pools that have a specific Agent
getPoolIdsByItem
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/shared/impl/questionpool/QuestionPoolServiceImpl.java", "license": "apache-2.0", "size": 9756 }
[ "java.util.List", "org.sakaiproject.tool.assessment.services.QuestionPoolService", "org.sakaiproject.tool.assessment.services.QuestionPoolServiceException" ]
import java.util.List; import org.sakaiproject.tool.assessment.services.QuestionPoolService; import org.sakaiproject.tool.assessment.services.QuestionPoolServiceException;
import java.util.*; import org.sakaiproject.tool.assessment.services.*;
[ "java.util", "org.sakaiproject.tool" ]
java.util; org.sakaiproject.tool;
2,876,509
protected void rewritePersistentReadsAndWrites() { LocalVariableMap symbolTable = script.getSymbolTable(); if (symbolTable != null) { String[] inputs = (script.getInputVariables() == null) ? new String[0] : script.getInputVariables() .toArray(new String[0]); String[] outputs = (script.getOutputVariabl...
void function() { LocalVariableMap symbolTable = script.getSymbolTable(); if (symbolTable != null) { String[] inputs = (script.getInputVariables() == null) ? new String[0] : script.getInputVariables() .toArray(new String[0]); String[] outputs = (script.getOutputVariables() == null) ? new String[0] : script.getOutputVar...
/** * Replace persistent reads and writes with transient reads and writes in * the symbol table. */
Replace persistent reads and writes with transient reads and writes in the symbol table
rewritePersistentReadsAndWrites
{ "repo_name": "iyounus/incubator-systemml", "path": "src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java", "license": "apache-2.0", "size": 23151 }
[ "org.apache.sysml.hops.HopsException", "org.apache.sysml.hops.rewrite.ProgramRewriter", "org.apache.sysml.hops.rewrite.RewriteRemovePersistentReadWrite", "org.apache.sysml.parser.LanguageException", "org.apache.sysml.runtime.controlprogram.LocalVariableMap" ]
import org.apache.sysml.hops.HopsException; import org.apache.sysml.hops.rewrite.ProgramRewriter; import org.apache.sysml.hops.rewrite.RewriteRemovePersistentReadWrite; import org.apache.sysml.parser.LanguageException; import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
import org.apache.sysml.hops.*; import org.apache.sysml.hops.rewrite.*; import org.apache.sysml.parser.*; import org.apache.sysml.runtime.controlprogram.*;
[ "org.apache.sysml" ]
org.apache.sysml;
1,283,557
private boolean unroll(ByteBuffer b, Map<String, Integer> manifest) throws KevaDBException { long time = b.getLong(); // Check if there are any sstables that are older than // this WAL entry. If so, we can safely skip this entry since // we know the results have already been persisted. if(manifest ...
boolean function(ByteBuffer b, Map<String, Integer> manifest) throws KevaDBException { long time = b.getLong(); if(manifest != null) { for(String uuid : manifest.keySet()) { SSTable table = db.getDiskService().getSSTable(db, uuid, manifest.get(uuid)); if(table.getModificationTime() <= time) { return true; } } } short m...
/** * Parse the command from the byte buffer. **/
Parse the command from the byte buffer
unroll
{ "repo_name": "jhorey/KevaDB", "path": "src/gov/ornl/keva/node/WriteAheadLog.java", "license": "apache-2.0", "size": 15134 }
[ "gov.ornl.keva.core.KevaDBException", "gov.ornl.keva.core.OptionsSerializer", "gov.ornl.keva.core.WriteOptions", "gov.ornl.keva.sstable.SSTable", "gov.ornl.keva.table.TableKey", "gov.ornl.keva.table.TableValue", "gov.ornl.keva.table.TableValueFactory", "java.nio.ByteBuffer", "java.util.Map" ]
import gov.ornl.keva.core.KevaDBException; import gov.ornl.keva.core.OptionsSerializer; import gov.ornl.keva.core.WriteOptions; import gov.ornl.keva.sstable.SSTable; import gov.ornl.keva.table.TableKey; import gov.ornl.keva.table.TableValue; import gov.ornl.keva.table.TableValueFactory; import java.nio.ByteBuffer; impo...
import gov.ornl.keva.core.*; import gov.ornl.keva.sstable.*; import gov.ornl.keva.table.*; import java.nio.*; import java.util.*;
[ "gov.ornl.keva", "java.nio", "java.util" ]
gov.ornl.keva; java.nio; java.util;
986,537
private void parseCommandLine(Config cfg) { try { Options opts = new Options(); opts.addOption("h", false, "show this help"); opts.addOption("n", false, "dry run"); opts.addOption("e", false, "encrypt password"); opts.addOption("v", false, "verbose output"); opts.addOption("c", true, "config...
void function(Config cfg) { try { Options opts = new Options(); opts.addOption("h", false, STR); opts.addOption("n", false, STR); opts.addOption("e", false, STR); opts.addOption("v", false, STR); opts.addOption("c", true, STR); CommandLineParser parser = new GnuParser(); CommandLine cmd = parser.parse(opts, this.args);...
/** * Parses the command line. * * @param cfg * The config */
Parses the command line
parseCommandLine
{ "repo_name": "fbernitt/imapfilter", "path": "src/main/java/org/bernitt/imapfilter/ImapFilter.java", "license": "gpl-3.0", "size": 4749 }
[ "java.io.File", "org.apache.commons.cli.CommandLine", "org.apache.commons.cli.CommandLineParser", "org.apache.commons.cli.GnuParser", "org.apache.commons.cli.Options", "org.apache.commons.cli.ParseException", "org.bernitt.imapfilter.config.Config" ]
import java.io.File; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.GnuParser; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.bernitt.imapfilter.config.Config;
import java.io.*; import org.apache.commons.cli.*; import org.bernitt.imapfilter.config.*;
[ "java.io", "org.apache.commons", "org.bernitt.imapfilter" ]
java.io; org.apache.commons; org.bernitt.imapfilter;
838,428
public ITableSortingState getSortingState() { return m_objSortingState; }
ITableSortingState function() { return m_objSortingState; }
/** * Returns the sortingState. * @return ITableSortingState */
Returns the sortingState
getSortingState
{ "repo_name": "apache/tapestry4", "path": "contrib/src/java/org/apache/tapestry/contrib/table/model/simple/SimpleTableState.java", "license": "apache-2.0", "size": 1938 }
[ "org.apache.tapestry.contrib.table.model.ITableSortingState" ]
import org.apache.tapestry.contrib.table.model.ITableSortingState;
import org.apache.tapestry.contrib.table.model.*;
[ "org.apache.tapestry" ]
org.apache.tapestry;
657,230
private int unlockTable(Hive db, UnlockTableDesc unlockTbl) throws HiveException { Context ctx = driverContext.getCtx(); HiveTxnManager txnManager = ctx.getHiveTxnManager(); return txnManager.unlockTable(db, unlockTbl); }
int function(Hive db, UnlockTableDesc unlockTbl) throws HiveException { Context ctx = driverContext.getCtx(); HiveTxnManager txnManager = ctx.getHiveTxnManager(); return txnManager.unlockTable(db, unlockTbl); }
/** * Unlock the table/partition specified * @param db * * @param unlockTbl * the table/partition to be unlocked * @return Returns 0 when execution succeeds and above 0 if it fails. * @throws HiveException * Throws this exception if an unexpected error occurs. */
Unlock the table/partition specified
unlockTable
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java", "license": "apache-2.0", "size": 173241 }
[ "org.apache.hadoop.hive.ql.Context", "org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager", "org.apache.hadoop.hive.ql.metadata.Hive", "org.apache.hadoop.hive.ql.metadata.HiveException", "org.apache.hadoop.hive.ql.plan.UnlockTableDesc" ]
import org.apache.hadoop.hive.ql.Context; import org.apache.hadoop.hive.ql.lockmgr.HiveTxnManager; import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.plan.UnlockTableDesc;
import org.apache.hadoop.hive.ql.*; import org.apache.hadoop.hive.ql.lockmgr.*; import org.apache.hadoop.hive.ql.metadata.*; import org.apache.hadoop.hive.ql.plan.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,392,737
static ScoreDocComparator comparatorShort(final IndexReader reader, final String fieldname, final FieldCache.ShortParser parser) throws IOException { final String field = fieldname.intern(); final short[] fieldOrder = FieldCache.DEFAULT.getShorts(reader, field, parser); return new ScoreDocComparator() {
static ScoreDocComparator comparatorShort(final IndexReader reader, final String fieldname, final FieldCache.ShortParser parser) throws IOException { final String field = fieldname.intern(); final short[] fieldOrder = FieldCache.DEFAULT.getShorts(reader, field, parser); return new ScoreDocComparator() {
/** * Returns a comparator for sorting hits according to a field containing shorts. * @param reader Index to use. * @param fieldname Fieldable containing integer values. * @return Comparator for sorting hits. * @throws IOException If an error occurs reading the index. */
Returns a comparator for sorting hits according to a field containing shorts
comparatorShort
{ "repo_name": "Photobucket/Solbase-Lucene", "path": "src/java/org/apache/lucene/search/FieldSortedHitQueue.java", "license": "apache-2.0", "size": 18582 }
[ "java.io.IOException", "org.apache.lucene.index.IndexReader" ]
import java.io.IOException; import org.apache.lucene.index.IndexReader;
import java.io.*; import org.apache.lucene.index.*;
[ "java.io", "org.apache.lucene" ]
java.io; org.apache.lucene;
672,113
public static MeasureResponseTime fromPerAligned(byte[] encodedBytes) { MeasureResponseTime result = new MeasureResponseTime(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
static MeasureResponseTime function(byte[] encodedBytes) { MeasureResponseTime result = new MeasureResponseTime(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new MeasureResponseTime from encoded stream. */
Creates a new MeasureResponseTime from encoded stream
fromPerAligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components/MeasureResponseTime.java", "license": "apache-2.0", "size": 3054 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
2,485,425
@Override protected void shutDownInternal() throws RepositoryException { }
void function() throws RepositoryException { }
/** * deprecated * implemented to honor Repository interface * * @throws RepositoryException */
deprecated implemented to honor Repository interface
shutDownInternal
{ "repo_name": "supriyantomaftuh/marklogic-sesame", "path": "marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/MarkLogicRepository.java", "license": "apache-2.0", "size": 5908 }
[ "org.openrdf.repository.RepositoryException" ]
import org.openrdf.repository.RepositoryException;
import org.openrdf.repository.*;
[ "org.openrdf.repository" ]
org.openrdf.repository;
965,049
public Text getDisplay() { return display; }
Text function() { return display; }
/** * Get the text to be sent to the player */
Get the text to be sent to the player
getDisplay
{ "repo_name": "Wundero/Ray", "path": "src/main/java/me/Wundero/Ray/conversation/Option.java", "license": "mit", "size": 2484 }
[ "org.spongepowered.api.text.Text" ]
import org.spongepowered.api.text.Text;
import org.spongepowered.api.text.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
2,774,689
public Output<T> output() { return output; }
Output<T> function() { return output; }
/** * Gets output. * * @return output. */
Gets output
output
{ "repo_name": "tensorflow/java", "path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/GuaranteeConst.java", "license": "apache-2.0", "size": 3496 }
[ "org.tensorflow.Output" ]
import org.tensorflow.Output;
import org.tensorflow.*;
[ "org.tensorflow" ]
org.tensorflow;
505,462
public RealVector getCoefficients() { return coefficients; }
RealVector function() { return coefficients; }
/** * Get the coefficients of the constraint (left hand side). * @return coefficients of the constraint (left hand side) */
Get the coefficients of the constraint (left hand side)
getCoefficients
{ "repo_name": "happyjack27/autoredistrict", "path": "src/org/apache/commons/math3/optimization/linear/LinearConstraint.java", "license": "gpl-3.0", "size": 10343 }
[ "org.apache.commons.math3.linear.RealVector" ]
import org.apache.commons.math3.linear.RealVector;
import org.apache.commons.math3.linear.*;
[ "org.apache.commons" ]
org.apache.commons;
1,327,230