method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void uploadProcedureInBackground() { storeCurrentProcedure(true); // First check to make sure procedure has not already been uploaded if (MDSInterface.isProcedureAlreadyUploaded(uEncounter, getActivity() .getBaseContext())) { getActivity().showDialog(Proced...
void function() { storeCurrentProcedure(true); if (MDSInterface.isProcedureAlreadyUploaded(uEncounter, getActivity() .getBaseContext())) { getActivity().showDialog(ProcedureRunner.DIALOG_ALREADY_UPLOADED); } else { Log.i(TAG, STR); if (mUploadService != null) { mUploadService.addProcedureToQueue(uEncounter); } logEvent...
/** * Adds current procedure to queue for upload. */
Adds current procedure to queue for upload
uploadProcedureInBackground
{ "repo_name": "SanaMobile/sana.mobile", "path": "app/src/main/java/org/sana/android/fragment/BaseRunnerFragment.java", "license": "bsd-3-clause", "size": 51641 }
[ "android.util.Log", "org.sana.android.activity.ProcedureRunner", "org.sana.android.net.MDSInterface", "org.sana.android.provider.Events" ]
import android.util.Log; import org.sana.android.activity.ProcedureRunner; import org.sana.android.net.MDSInterface; import org.sana.android.provider.Events;
import android.util.*; import org.sana.android.activity.*; import org.sana.android.net.*; import org.sana.android.provider.*;
[ "android.util", "org.sana.android" ]
android.util; org.sana.android;
2,424,200
@Deprecated byte[] fastpathCall(int fnid, ParameterList params, boolean suppressBegin) throws SQLException;
byte[] fastpathCall(int fnid, ParameterList params, boolean suppressBegin) throws SQLException;
/** * Invoke a backend function via the fastpath interface. * * @param fnid the OID of the backend function to invoke * @param params a ParameterList returned from {@link #createFastpathParameters} containing the * parameters to pass to the backend function * @param suppressBegin if begin shoul...
Invoke a backend function via the fastpath interface
fastpathCall
{ "repo_name": "lordnelson/pgjdbc", "path": "pgjdbc/src/main/java/org/postgresql/core/QueryExecutor.java", "license": "bsd-2-clause", "size": 17081 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,938,432
public HttpServletRequest getRequest() { if (facade == null) { facade = new RequestFacade(this); } return facade; } protected org.apache.catalina.connector.Response response = null;
HttpServletRequest function() { if (facade == null) { facade = new RequestFacade(this); } return facade; } protected org.apache.catalina.connector.Response response = null;
/** * Return the <code>ServletRequest</code> for which this object * is the facade. This method must be implemented by a subclass. */
Return the <code>ServletRequest</code> for which this object is the facade. This method must be implemented by a subclass
getRequest
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.0/Request (2).java", "license": "mit", "size": 86130 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,519,820
public boolean correlationNameWithAlphaNumericCharacters() { if (verifyCorrelationName(correlationNameAlphaNumeric)) { log.debug("Skipping test case as {} already exists", correlationNameAlphaNumeric); throw new SkipException("Skipping test case as " + correlationNameAlphaNumeric + " already exists"); } ...
boolean function() { if (verifyCorrelationName(correlationNameAlphaNumeric)) { log.debug(STR, correlationNameAlphaNumeric); throw new SkipException(STR + correlationNameAlphaNumeric + STR); } try { fillData(); Thread.sleep(1000); sendKeys(correlationName, LoginAndSelectModule.testData.get(CorrelationCommonConstants.COR...
/** * Checks whether correlation name having alphanumeric characters string is * getting saved or not * * @return true if saved successfully o/w false * @throws InterruptedException */
Checks whether correlation name having alphanumeric characters string is getting saved or not
correlationNameWithAlphaNumericCharacters
{ "repo_name": "CognizantOneDevOps/Insights", "path": "PlatformRegressionTest/src/main/java/com/cognizant/devops/platformregressiontest/test/ui/correlationbuilder/CorrelationBuilderConfiguration.java", "license": "apache-2.0", "size": 23588 }
[ "com.cognizant.devops.platformregressiontest.test.common.LoginAndSelectModule", "org.openqa.selenium.By", "org.testng.SkipException" ]
import com.cognizant.devops.platformregressiontest.test.common.LoginAndSelectModule; import org.openqa.selenium.By; import org.testng.SkipException;
import com.cognizant.devops.platformregressiontest.test.common.*; import org.openqa.selenium.*; import org.testng.*;
[ "com.cognizant.devops", "org.openqa.selenium", "org.testng" ]
com.cognizant.devops; org.openqa.selenium; org.testng;
255,059
public Map<Optional<String>, ? extends List<? extends TransitiveInfoCollection>> getSplitPrerequisites(String attributeName) { return Maps.transformValues( getSplitPrerequisiteConfiguredTargetAndTargets(attributeName), (ctatList) -> Lists.transform(ctatList, ConfiguredTargetAndData::getConfi...
Map<Optional<String>, ? extends List<? extends TransitiveInfoCollection>> function(String attributeName) { return Maps.transformValues( getSplitPrerequisiteConfiguredTargetAndTargets(attributeName), (ctatList) -> Lists.transform(ctatList, ConfiguredTargetAndData::getConfiguredTarget)); }
/** * Returns the prerequisites keyed by their configuration transition keys. If the split transition * is not active (e.g. split() returned an empty list), the key is an empty Optional. */
Returns the prerequisites keyed by their configuration transition keys. If the split transition is not active (e.g. split() returned an empty list), the key is an empty Optional
getSplitPrerequisites
{ "repo_name": "meteorcloudy/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java", "license": "apache-2.0", "size": 99413 }
[ "com.google.common.base.Optional", "com.google.common.collect.Lists", "com.google.common.collect.Maps", "com.google.devtools.build.lib.skyframe.ConfiguredTargetAndData", "java.util.List", "java.util.Map" ]
import com.google.common.base.Optional; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.devtools.build.lib.skyframe.ConfiguredTargetAndData; import java.util.List; import java.util.Map;
import com.google.common.base.*; import com.google.common.collect.*; import com.google.devtools.build.lib.skyframe.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,888,025
@Override public int hashCode() { return Objects.hash(arrowClosed, arrowColor, arrowLocation, arrowOpen, arrowSize, arrowStyle, containerStyle, labelStyle, onlyArrowIsClickable, outerLabelAndArrowStyle); }
int function() { return Objects.hash(arrowClosed, arrowColor, arrowLocation, arrowOpen, arrowSize, arrowStyle, containerStyle, labelStyle, onlyArrowIsClickable, outerLabelAndArrowStyle); }
/** * Returns the HashCode. */
Returns the HashCode
hashCode
{ "repo_name": "docusign/docusign-java-client", "path": "src/main/java/com/docusign/esign/model/DocumentHtmlCollapsibleDisplaySettings.java", "license": "mit", "size": 9499 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
1,573,464
private void initEditor() { try { FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("/view/Editor.fxml")); painel = (BorderPane) loader.load(); Scene scene = new Scene(painel); primaryStage.setScene(scene); ...
void function() { try { FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource(STR)); painel = (BorderPane) loader.load(); Scene scene = new Scene(painel); primaryStage.setScene(scene); editorController = loader.getController(); editorController.setPrincipal(this); primaryStage.show(); } catch ...
/** * Instancia o editor */
Instancia o editor
initEditor
{ "repo_name": "hfcipriano/AFND_por_AFD", "path": "src/main/java/cipriano/Principal.java", "license": "apache-2.0", "size": 2550 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,843,421
void removeExecution(ExecutionContext context, int exeId) throws ExecutorException;
void removeExecution(ExecutionContext context, int exeId) throws ExecutorException;
/** * Removing an ongoing execution shall result in an error. Stop it first. * * @param context The ExecutionContext at the time of the call * @param exeId Execution ID. * @throws ExecutorException if the Executor encounters an error. */
Removing an ongoing execution shall result in an error. Stop it first
removeExecution
{ "repo_name": "prateekm/samza", "path": "samza-sql-shell/src/main/java/org/apache/samza/sql/client/interfaces/SqlExecutor.java", "license": "apache-2.0", "size": 7804 }
[ "org.apache.samza.sql.client.exceptions.ExecutorException" ]
import org.apache.samza.sql.client.exceptions.ExecutorException;
import org.apache.samza.sql.client.exceptions.*;
[ "org.apache.samza" ]
org.apache.samza;
1,360,027
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<KqlScriptResource>> getByNameWithResponseAsync(String kqlScriptName, Context context) { final String apiVersion = "2021-11-01-preview"; final String accept = "application/json"; return service.getByName(this.client.getEndpo...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<KqlScriptResource>> function(String kqlScriptName, Context context) { final String apiVersion = STR; final String accept = STR; return service.getByName(this.client.getEndpoint(), kqlScriptName, apiVersion, accept, context); }
/** * Get KQL script by name. * * @param kqlScriptName KQL script name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorContractException thrown if the request is rejected by server. ...
Get KQL script by name
getByNameWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-analytics-synapse-artifacts/src/main/java/com/azure/analytics/synapse/artifacts/implementation/KqlScriptsOperationsImpl.java", "license": "mit", "size": 24856 }
[ "com.azure.analytics.synapse.artifacts.models.KqlScriptResource", "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context" ]
import com.azure.analytics.synapse.artifacts.models.KqlScriptResource; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context;
import com.azure.analytics.synapse.artifacts.models.*; import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.analytics", "com.azure.core" ]
com.azure.analytics; com.azure.core;
1,962,904
@Generated @CVariable() public static native float NINearbyObjectDistanceNotAvailable();
@CVariable() static native float function();
/** * A sentinel value indicating that a distance measurement could not be produced */
A sentinel value indicating that a distance measurement could not be produced
NINearbyObjectDistanceNotAvailable
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/nearbyinteraction/c/NearbyInteraction.java", "license": "apache-2.0", "size": 892 }
[ "org.moe.natj.c.ann.CVariable" ]
import org.moe.natj.c.ann.CVariable;
import org.moe.natj.c.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,397,818
public NamingEnumeration getAllNonNull() { DXNamingEnumeration returnEnumeration = new DXNamingEnumeration (); Enumeration allatts = getAll(); while (allatts.hasMoreElements()) { Attribute fnord = (Attribute) allatts.nextElement(); if (fnord != null) // s...
NamingEnumeration function() { DXNamingEnumeration returnEnumeration = new DXNamingEnumeration (); Enumeration allatts = getAll(); while (allatts.hasMoreElements()) { Attribute fnord = (Attribute) allatts.nextElement(); if (fnord != null) { try { if (fnord.get() != null) { returnEnumeration.add(fnord); } } catch (NoSuc...
/** * returns all the Attribute(s) that have non-null values * in this DXAttributes object. * - the NamingEnumeration is (evily) pre-sorted alphabetically...<p> * * Warning: whether an attribute is added is undefined if the * attribute is multi-valued and contains one or mor...
returns all the Attribute(s) that have non-null values in this DXAttributes object. - the NamingEnumeration is (evily) pre-sorted alphabetically... Warning: whether an attribute is added is undefined if the attribute is multi-valued and contains one or more null values in addition to other non-null values
getAllNonNull
{ "repo_name": "idega/platform2", "path": "src/com/idega/core/ldap/client/naming/DXAttributes.java", "license": "gpl-3.0", "size": 51405 }
[ "com.idega.core.ldap.client.cbutil.CBUtility", "java.util.Enumeration", "java.util.NoSuchElementException", "javax.naming.NamingEnumeration", "javax.naming.NamingException", "javax.naming.directory.Attribute" ]
import com.idega.core.ldap.client.cbutil.CBUtility; import java.util.Enumeration; import java.util.NoSuchElementException; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.Attribute;
import com.idega.core.ldap.client.cbutil.*; import java.util.*; import javax.naming.*; import javax.naming.directory.*;
[ "com.idega.core", "java.util", "javax.naming" ]
com.idega.core; java.util; javax.naming;
2,645,677
public final void decrementStickyCounter() { Assert.isTrue(fStickyCounter > 0, "stickyCounter must not be negative"); //$NON-NLS-1$ --fStickyCounter; }
final void function() { Assert.isTrue(fStickyCounter > 0, STR); --fStickyCounter; }
/** * Decrement the value of *sticky* News contained in the feed. */
Decrement the value of *sticky* News contained in the feed
decrementStickyCounter
{ "repo_name": "rssowl/RSSOwl", "path": "org.rssowl.core/src/org/rssowl/core/persist/NewsCounterItem.java", "license": "epl-1.0", "size": 4624 }
[ "org.eclipse.core.runtime.Assert" ]
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
2,841,706
public void closeConnection() { try { conn.close(); } catch (SQLException exception) { LOGGER.error(MessageCatalog._00024_DATA_ACCESS_FAILURE, exception); } }
void function() { try { conn.close(); } catch (SQLException exception) { LOGGER.error(MessageCatalog._00024_DATA_ACCESS_FAILURE, exception); } }
/** * Closes the DDBB connection. * * @since 2.0 */
Closes the DDBB connection
closeConnection
{ "repo_name": "agazzarini/aliada-tool", "path": "aliada/aliada-ckan-datahub-page-creation/src/main/java/eu/aliada/ckancreation/rdbms/DBConnectionManager.java", "license": "gpl-3.0", "size": 13431 }
[ "eu.aliada.ckancreation.log.MessageCatalog", "java.sql.SQLException" ]
import eu.aliada.ckancreation.log.MessageCatalog; import java.sql.SQLException;
import eu.aliada.ckancreation.log.*; import java.sql.*;
[ "eu.aliada.ckancreation", "java.sql" ]
eu.aliada.ckancreation; java.sql;
2,877,260
@GET("tv/{tv_id}/season/{season_number}/episode/{episode_number}") Call<TvEpisode> episode( @Path("tv_id") int tvShowId, @Path("season_number") int tvShowSeasonNumber, @Path("episode_number") int tvShowEpisodeNumber );
@GET(STR) Call<TvEpisode> episode( @Path("tv_id") int tvShowId, @Path(STR) int tvShowSeasonNumber, @Path(STR) int tvShowEpisodeNumber );
/** * Get the primary information about a TV episode by combination of a season and episode number. * * @param tvShowId A Tv Show TMDb id. * @param tvShowSeasonNumber TvSeason Number. * @param tvShowEpisodeNumber TvEpisode Number. */
Get the primary information about a TV episode by combination of a season and episode number
episode
{ "repo_name": "ProIcons/tmdb-java", "path": "src/main/java/com/uwetrottmann/tmdb2/services/TvEpisodesService.java", "license": "unlicense", "size": 12899 }
[ "com.uwetrottmann.tmdb2.entities.TvEpisode" ]
import com.uwetrottmann.tmdb2.entities.TvEpisode;
import com.uwetrottmann.tmdb2.entities.*;
[ "com.uwetrottmann.tmdb2" ]
com.uwetrottmann.tmdb2;
1,502,853
@Override protected void prepareBeforeAsyncDirtyOperation(TransactionJob job) throws SearchEngineException { try { getOrCreateIndexWriter(job.getSubIndex()); } catch (IOException e) { throw new SearchEngineException("Failed to open index writer for sub index [" + job.getS...
void function(TransactionJob job) throws SearchEngineException { try { getOrCreateIndexWriter(job.getSubIndex()); } catch (IOException e) { throw new SearchEngineException(STR + job.getSubIndex() + "]", e); } }
/** * Just open an index writer here on the same calling thread so we maintain ordering of operations as well * as no need for double check if we created it or not using expensive global locking. */
Just open an index writer here on the same calling thread so we maintain ordering of operations as well as no need for double check if we created it or not using expensive global locking
prepareBeforeAsyncDirtyOperation
{ "repo_name": "baboune/compass", "path": "src/main/src/org/compass/core/lucene/engine/transaction/lucene/LuceneTransactionProcessor.java", "license": "apache-2.0", "size": 9484 }
[ "java.io.IOException", "org.compass.core.engine.SearchEngineException", "org.compass.core.lucene.engine.transaction.support.job.TransactionJob" ]
import java.io.IOException; import org.compass.core.engine.SearchEngineException; import org.compass.core.lucene.engine.transaction.support.job.TransactionJob;
import java.io.*; import org.compass.core.engine.*; import org.compass.core.lucene.engine.transaction.support.job.*;
[ "java.io", "org.compass.core" ]
java.io; org.compass.core;
1,429,014
Gson gson = new Gson(); Config config = null; try { BufferedReader br = new BufferedReader( new FileReader(path)); //convert the json string back to object config = gson.fromJson(br, Config.class); if (br != null) { ...
Gson gson = new Gson(); Config config = null; try { BufferedReader br = new BufferedReader( new FileReader(path)); config = gson.fromJson(br, Config.class); if (br != null) { br.close(); } } catch (FileNotFoundException f) { if (allowConfig) if (retry) { return read(path, false, false); } else { System.out.println(STR ...
/** * Reads the duclient configuration and prompts a request to generate one if necessary * * @param path The path of where to find the config file or generate one * @param retry Should we retry if an error is thrown * @param allowConfig Allows for configuration of the config...
Reads the duclient configuration and prompts a request to generate one if necessary
read
{ "repo_name": "PimDeWitte/DynamicUpdateClient", "path": "src/control/config/ReadConfigs.java", "license": "apache-2.0", "size": 1634 }
[ "com.google.gson.Gson", "java.io.BufferedReader", "java.io.FileNotFoundException", "java.io.FileReader", "java.io.IOException" ]
import com.google.gson.Gson; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException;
import com.google.gson.*; import java.io.*;
[ "com.google.gson", "java.io" ]
com.google.gson; java.io;
1,129,128
public static HObject getDataLink(HObject set, HierarchicalDataFile original) { try { // To make things faster, we only check for Datasets if (!(set instanceof Dataset)) return null; List<?> attributes = set.getMetadata(); // Appears in stack traces of VM exists if (attributes==null || attributes.isE...
static HObject function(HObject set, HierarchicalDataFile original) { try { if (!(set instanceof Dataset)) return null; List<?> attributes = set.getMetadata(); if (attributes==null attributes.isEmpty()) return null; for (Object attribute : attributes) { if (attribute instanceof Attribute) { Attribute a = (Attribute)att...
/** * Returns the link in another file if this is a linked file. * @param set * @param original - may be null * @return * @throws OutOfMemoryError * @throws Exception */
Returns the link in another file if this is a linked file
getDataLink
{ "repo_name": "xen-0/dawnsci", "path": "org.eclipse.dawnsci.hdf5/src/org/eclipse/dawnsci/hdf/object/HierarchicalDataUtils.java", "license": "epl-1.0", "size": 11768 }
[ "java.util.List", "java.util.regex.Pattern" ]
import java.util.List; import java.util.regex.Pattern;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
1,316,725
public static <T> LinkedHashSet<T> newLinkedHashSet(int expSize) { return new LinkedHashSet<>(capacity(expSize)); }
static <T> LinkedHashSet<T> function(int expSize) { return new LinkedHashSet<>(capacity(expSize)); }
/** * Creates new {@link LinkedHashSet} with expected size. * * @param expSize Expected size of created map. * @param <T> Type of elements. * @return New set. */
Creates new <code>LinkedHashSet</code> with expected size
newLinkedHashSet
{ "repo_name": "SomeFire/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 374177 }
[ "java.util.LinkedHashSet" ]
import java.util.LinkedHashSet;
import java.util.*;
[ "java.util" ]
java.util;
211,477
public void addComponentToLeftSideMenu(Component cmp, Command cmd) { checkIfInitialized(); if (permanentSideMenu) { constructPermanentSideMenu(); Container cnt = new Container(new BorderLayout()); cnt.addComponent(BorderLayout.CENTER, cmp); Butto...
void function(Component cmp, Command cmd) { checkIfInitialized(); if (permanentSideMenu) { constructPermanentSideMenu(); Container cnt = new Container(new BorderLayout()); cnt.addComponent(BorderLayout.CENTER, cmp); Button btn = new Button(cmd); btn.setParent(cnt); cnt.setLeadComponent(btn); addComponentToSideMenu(perm...
/** * Adds a Component to the left side navigation menu. The Component is added * to the navigation menu and the command gets the events once the Component * is being pressed. * * @param cmp c Component to be added to the menu * @param cmd a Command to handle the events */
Adds a Component to the left side navigation menu. The Component is added to the navigation menu and the command gets the events once the Component is being pressed
addComponentToLeftSideMenu
{ "repo_name": "diamonddevgroup/CodenameOne", "path": "CodenameOne/src/com/codename1/ui/Toolbar.java", "license": "gpl-2.0", "size": 113924 }
[ "com.codename1.ui.layouts.BorderLayout" ]
import com.codename1.ui.layouts.BorderLayout;
import com.codename1.ui.layouts.*;
[ "com.codename1.ui" ]
com.codename1.ui;
2,489,374
public org.hibernate.classic.Session openSession( final Connection connection, final boolean flushBeforeCompletionEnabled, final boolean autoCloseSessionEnabled, final ConnectionReleaseMode connectionReleaseMode) throws HibernateException;
org.hibernate.classic.Session function( final Connection connection, final boolean flushBeforeCompletionEnabled, final boolean autoCloseSessionEnabled, final ConnectionReleaseMode connectionReleaseMode) throws HibernateException;
/** * Open a session conforming to the given parameters. Used mainly by * {@link org.hibernate.context.JTASessionContext} for current session processing. * * @param connection The external jdbc connection to use, if one (i.e., optional). * @param flushBeforeCompletionEnabled Should the session be auto-flushe...
Open a session conforming to the given parameters. Used mainly by <code>org.hibernate.context.JTASessionContext</code> for current session processing
openSession
{ "repo_name": "raedle/univis", "path": "lib/hibernate-3.1.3/src/org/hibernate/engine/SessionFactoryImplementor.java", "license": "lgpl-2.1", "size": 5315 }
[ "java.sql.Connection", "org.hibernate.ConnectionReleaseMode", "org.hibernate.HibernateException" ]
import java.sql.Connection; import org.hibernate.ConnectionReleaseMode; import org.hibernate.HibernateException;
import java.sql.*; import org.hibernate.*;
[ "java.sql", "org.hibernate" ]
java.sql; org.hibernate;
1,286,596
public ServiceFuture<Void> postOptionalArrayParameterAsync(final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(postOptionalArrayParameterWithServiceResponseAsync(), serviceCallback); }
ServiceFuture<Void> function(final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(postOptionalArrayParameterWithServiceResponseAsync(), serviceCallback); }
/** * Test explicitly optional array. Please put null. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
Test explicitly optional array. Please put null
postOptionalArrayParameterAsync
{ "repo_name": "lmazuel/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/requiredoptional/implementation/ExplicitsImpl.java", "license": "mit", "size": 119470 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
254,295
public boolean apply(User user, String input, String templateKey) { if (StringUtils.isEmpty(input)) { chat.whisper(user, commandUsageMessage); return false; } Template template = templateDao.getByKey(templateKey); if (templateDisabledMessage == null) { ...
boolean function(User user, String input, String templateKey) { if (StringUtils.isEmpty(input)) { chat.whisper(user, commandUsageMessage); return false; } Template template = templateDao.getByKey(templateKey); if (templateDisabledMessage == null) { updateTemplate(user, template, input); } else { OnOff onOff = EnumUtils...
/** * Apply this factory to a template * * @param user The caller's (used to send whispers) * @param input The caller's input * @param templateKey The template key of the template to update * @return True on command success else False */
Apply this factory to a template
apply
{ "repo_name": "Juraji/Biliomi", "path": "core/src/main/java/nl/juraji/biliomi/components/shared/TemplateSetup.java", "license": "gpl-3.0", "size": 3341 }
[ "nl.juraji.biliomi.model.core.Template", "nl.juraji.biliomi.model.core.User", "nl.juraji.biliomi.utility.calculate.EnumUtils", "nl.juraji.biliomi.utility.types.enums.OnOff", "org.apache.commons.lang3.StringUtils" ]
import nl.juraji.biliomi.model.core.Template; import nl.juraji.biliomi.model.core.User; import nl.juraji.biliomi.utility.calculate.EnumUtils; import nl.juraji.biliomi.utility.types.enums.OnOff; import org.apache.commons.lang3.StringUtils;
import nl.juraji.biliomi.model.core.*; import nl.juraji.biliomi.utility.calculate.*; import nl.juraji.biliomi.utility.types.enums.*; import org.apache.commons.lang3.*;
[ "nl.juraji.biliomi", "org.apache.commons" ]
nl.juraji.biliomi; org.apache.commons;
742,404
private void endTask() { lock.lock(); try { runningTasks--; if (isTerminated()) { termination.signalAll(); } } finally { lock.unlock(); } } } /** * Creates an {@link ExecutorService} whose {@code submit} and {@code * invokeAll} methods...
void function() { lock.lock(); try { runningTasks--; if (isTerminated()) { termination.signalAll(); } } finally { lock.unlock(); } } } /** * Creates an {@link ExecutorService} whose {@code submit} and { * invokeAll} methods submit {@link ListenableFutureTask} instances to the * given delegate executor. Those methods, a...
/** * Decrements the running task count. */
Decrements the running task count
endTask
{ "repo_name": "lshain-android-source/external-guava", "path": "guava/src/com/google/common/util/concurrent/MoreExecutors.java", "license": "apache-2.0", "size": 16929 }
[ "java.util.concurrent.ExecutorService" ]
import java.util.concurrent.ExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,659,467
//-------------------// // getStickyDistance // //-------------------// public static int getStickyDistance () { return constants.stickyDistance.getValue(); } //~ Inner Classes ------------------------------------------------------------------------------ //-----------...
static int function () { return constants.stickyDistance.getValue(); } private static class Constants extends ConstantSet { private final Constant.Integer colinearDistance = new Constant.Integer( STR, 2, STR); private final Constant.Integer stickyDistance = new Constant.Integer( STR, 5, STR); private final Constant.Int...
/** * Report the maximum distance (from a point, from a segment). * * @return the maximum distance, specified in pixels */
Report the maximum distance (from a point, from a segment)
getStickyDistance
{ "repo_name": "Audiveris/audiveris", "path": "src/main/org/audiveris/omr/util/BrokenLine.java", "license": "agpl-3.0", "size": 14129 }
[ "org.audiveris.omr.constant.Constant", "org.audiveris.omr.constant.ConstantSet" ]
import org.audiveris.omr.constant.Constant; import org.audiveris.omr.constant.ConstantSet;
import org.audiveris.omr.constant.*;
[ "org.audiveris.omr" ]
org.audiveris.omr;
195,280
public List getManageableUsers(CmsObject cms, String ouFqn, boolean includeSubOus, boolean includeWebusers) throws CmsException { List users = new ArrayList(); Iterator it = getOrgUnitsForRole(cms, CmsRole.ACCOUNT_MANAGER.forOrgUnit(ouFqn), includeSubOus).iterator(); while (it.hasNext()...
List function(CmsObject cms, String ouFqn, boolean includeSubOus, boolean includeWebusers) throws CmsException { List users = new ArrayList(); Iterator it = getOrgUnitsForRole(cms, CmsRole.ACCOUNT_MANAGER.forOrgUnit(ouFqn), includeSubOus).iterator(); while (it.hasNext()) { CmsOrganizationalUnit orgUnit = (CmsOrganizati...
/** * Returns all users of organizational units for which the current user has * the {@link CmsRole#ACCOUNT_MANAGER} role.<p> * * @param cms the current cms context * @param ouFqn the fully qualified name of the organizational unit * @param includeSubOus if sub organizational units...
Returns all users of organizational units for which the current user has the <code>CmsRole#ACCOUNT_MANAGER</code> role
getManageableUsers
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/security/CmsRoleManager.java", "license": "lgpl-2.1", "size": 17554 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.opencms.file.CmsObject", "org.opencms.main.CmsException", "org.opencms.main.OpenCms" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.opencms.file.CmsObject; import org.opencms.main.CmsException; import org.opencms.main.OpenCms;
import java.util.*; import org.opencms.file.*; import org.opencms.main.*;
[ "java.util", "org.opencms.file", "org.opencms.main" ]
java.util; org.opencms.file; org.opencms.main;
2,090,651
public void revokeOwnership(Collection<String> jids) throws XMPPException { changeAffiliationByAdmin(jids, "admin"); }
void function(Collection<String> jids) throws XMPPException { changeAffiliationByAdmin(jids, "admin"); }
/** * Revokes ownership privileges from other users. The occupant that loses ownership * privileges will become an administrator. Room owners may revoke ownership privileges. * Some room implementations will not allow to grant ownership privileges to other users. * * @param jids the bare XMPP u...
Revokes ownership privileges from other users. The occupant that loses ownership privileges will become an administrator. Room owners may revoke ownership privileges. Some room implementations will not allow to grant ownership privileges to other users
revokeOwnership
{ "repo_name": "masach/FaceWhat", "path": "FacewhatDroid/asmack/org/jivesoftware/smackx/muc/MultiUserChat.java", "license": "gpl-3.0", "size": 122766 }
[ "java.util.Collection", "org.jivesoftware.smack.XMPPException" ]
import java.util.Collection; import org.jivesoftware.smack.XMPPException;
import java.util.*; import org.jivesoftware.smack.*;
[ "java.util", "org.jivesoftware.smack" ]
java.util; org.jivesoftware.smack;
2,805,512
private boolean checkTypeIsInDataDictionary(NodeRef nodeRef) { QName type = protectedNodeService.getType(nodeRef); if (dictionaryService.getType(type) == null) { if (logger.isWarnEnabled()) logger.warn("Found invalid object in database: id = " + nodeRef + ", t...
boolean function(NodeRef nodeRef) { QName type = protectedNodeService.getType(nodeRef); if (dictionaryService.getType(type) == null) { if (logger.isWarnEnabled()) logger.warn(STR + nodeRef + STR + type); return false; } return true; }
/** * Gets teh type of the nodeRef and checks that the type exists in the data * dcitionary. If the type is not in the data dictionary then the method * logs a warning and returns false. Otherwise it returns true. * * @param nodeRef * @return True if the nodeRef type is in the data dictio...
Gets teh type of the nodeRef and checks that the type exists in the data dcitionary. If the type is not in the data dictionary then the method logs a warning and returns false. Otherwise it returns true
checkTypeIsInDataDictionary
{ "repo_name": "daniel-he/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/workflow/WorkflowServiceImpl.java", "license": "lgpl-3.0", "size": 52714 }
[ "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.namespace.QName" ]
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName;
import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*;
[ "org.alfresco.service" ]
org.alfresco.service;
2,625,041
void makeComponentDragScrollable( JComponent component );
void makeComponentDragScrollable( JComponent component );
/** * Makes a component drag-scrollable. * * <p> * If a component is drag-scrollable and the user tries to drag the component, it will be scrolled if it is added to a scroll pane. Also changes the mouse * cursor to "MOVE" over this component. * </p> * * @param component component to be made dr...
Makes a component drag-scrollable. If a component is drag-scrollable and the user tries to drag the component, it will be scrolled if it is added to a scroll pane. Also changes the mouse cursor to "MOVE" over this component.
makeComponentDragScrollable
{ "repo_name": "icza/scelight", "path": "src-ext-mod-api/hu/scelightapi/util/gui/IGuiUtils.java", "license": "apache-2.0", "size": 10504 }
[ "javax.swing.JComponent" ]
import javax.swing.JComponent;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,113,767
public Researcher getResearcher() { return researcher; }
Researcher function() { return researcher; }
/** * Get the researcher * * @return researcher */
Get the researcher
getResearcher
{ "repo_name": "nate-rcl/irplus", "path": "ir_web/src/edu/ur/ir/web/action/researcher/ViewResearcherPublication.java", "license": "apache-2.0", "size": 4396 }
[ "edu.ur.ir.researcher.Researcher" ]
import edu.ur.ir.researcher.Researcher;
import edu.ur.ir.researcher.*;
[ "edu.ur.ir" ]
edu.ur.ir;
1,121,976
public static CharSequence getAt(CharSequence self, Collection indices) { StringBuilder answer = new StringBuilder(); for (Object value : indices) { if (value instanceof Range) { answer.append(getAt(self, (Range) value)); } else if (value instanceof Collection...
static CharSequence function(CharSequence self, Collection indices) { StringBuilder answer = new StringBuilder(); for (Object value : indices) { if (value instanceof Range) { answer.append(getAt(self, (Range) value)); } else if (value instanceof Collection) { answer.append(getAt(self, (Collection) value)); } else { int...
/** * Select a List of characters from a CharSequence using a Collection * to identify the indices to be selected. * * @param self a CharSequence * @param indices a Collection of indices * @return a CharSequence consisting of the characters at the given indices * @since 1.0 */
Select a List of characters from a CharSequence using a Collection to identify the indices to be selected
getAt
{ "repo_name": "xien777/yajsw", "path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "lgpl-2.1", "size": 704150 }
[ "groovy.lang.Range", "java.util.Collection", "org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation" ]
import groovy.lang.Range; import java.util.Collection; import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
import groovy.lang.*; import java.util.*; import org.codehaus.groovy.runtime.typehandling.*;
[ "groovy.lang", "java.util", "org.codehaus.groovy" ]
groovy.lang; java.util; org.codehaus.groovy;
2,415,793
private boolean listenerReplace0(Object topic, GridMessageListener exp, GridMessageListener newVal) { if (topic instanceof GridTopic) { synchronized (sysLsnrsMux) { return systemListenerChange(topic, exp, newVal); } } else return lsnrMap.re...
boolean function(Object topic, GridMessageListener exp, GridMessageListener newVal) { if (topic instanceof GridTopic) { synchronized (sysLsnrsMux) { return systemListenerChange(topic, exp, newVal); } } else return lsnrMap.replace(topic, exp, newVal); }
/** * Replace listener. * * @param topic Topic. * @param exp Old value. * @param newVal New value. * @return Result. */
Replace listener
listenerReplace0
{ "repo_name": "andrey-kuznetsov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java", "license": "apache-2.0", "size": 147310 }
[ "org.apache.ignite.internal.GridTopic" ]
import org.apache.ignite.internal.GridTopic;
import org.apache.ignite.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,997,450
@Named("Disks:list") @GET @Consumes(MediaType.APPLICATION_JSON) @Path("/zones/{zone}/disks") @OAuthScopes(COMPUTE_READONLY_SCOPE) @ResponseParser(ParseDisks.class) @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class) ListPage<Disk> listAtMarkerInZone(@PathParam("zone") String zone, @QueryPara...
@Named(STR) @Consumes(MediaType.APPLICATION_JSON) @Path(STR) @OAuthScopes(COMPUTE_READONLY_SCOPE) @ResponseParser(ParseDisks.class) @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class) ListPage<Disk> listAtMarkerInZone(@PathParam("zone") String zone, @QueryParam(STR) @Nullable String marker, ListOptions listOptions)...
/** * Retrieves the listPage of persistent disk resources contained within the specified project and zone. * By default the listPage as a maximum size of 100, if no options are provided or ListOptions#getMaxResults() has * not been set. * * @param zone the zone to search in * @param marke...
Retrieves the listPage of persistent disk resources contained within the specified project and zone. By default the listPage as a maximum size of 100, if no options are provided or ListOptions#getMaxResults() has not been set
listAtMarkerInZone
{ "repo_name": "agentmilindu/stratos", "path": "dependencies/jclouds/apis/gce/1.8.1-stratos/src/main/java/org/jclouds/googlecomputeengine/features/DiskApi.java", "license": "apache-2.0", "size": 10509 }
[ "javax.inject.Named", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.QueryParam", "javax.ws.rs.core.MediaType", "org.jclouds.Fallbacks", "org.jclouds.googlecomputeengine.domain.Disk", "org.jclouds.googlecomputeengine.domain.ListPage", "org.jclouds.googlecomputeen...
import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import org.jclouds.Fallbacks; import org.jclouds.googlecomputeengine.domain.Disk; import org.jclouds.googlecomputeengine.domain.ListPage; impor...
import javax.inject.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jclouds.*; import org.jclouds.googlecomputeengine.domain.*; import org.jclouds.googlecomputeengine.functions.internal.*; import org.jclouds.googlecomputeengine.options.*; import org.jclouds.javax.annotation.*; import org.jclouds.oauth.v2...
[ "javax.inject", "javax.ws", "org.jclouds", "org.jclouds.googlecomputeengine", "org.jclouds.javax", "org.jclouds.oauth", "org.jclouds.rest" ]
javax.inject; javax.ws; org.jclouds; org.jclouds.googlecomputeengine; org.jclouds.javax; org.jclouds.oauth; org.jclouds.rest;
154,183
public void setRangeStart(Date startDate) { if (startDate != null && getState().rangeEnd != null && startDate.after(getState().rangeEnd)) { throw new IllegalStateException( "startDate cannot be later than endDate"); } // Create a defensive cop...
void function(Date startDate) { if (startDate != null && getState().rangeEnd != null && startDate.after(getState().rangeEnd)) { throw new IllegalStateException( STR); } getState().rangeStart = startDate != null ? new Date(startDate.getTime()) : null; updateRangeValidator(); }
/** * Sets the start range for this component. If the value is set before this * date (taking the resolution into account), the component will not * validate. If <code>startDate</code> is set to <code>null</code>, any * value before <code>endDate</code> will be accepted by the range * * @p...
Sets the start range for this component. If the value is set before this date (taking the resolution into account), the component will not validate. If <code>startDate</code> is set to <code>null</code>, any value before <code>endDate</code> will be accepted by the range
setRangeStart
{ "repo_name": "Darsstar/framework", "path": "compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java", "license": "apache-2.0", "size": 37856 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
575,378
@Override public Task.Result run() { List<String> args = new ArrayList<>(); args.add(toolBox.getJDKTool("java").toString()); if (includeStandardOptions) { args.addAll(toolBox.split(System.getProperty("test.vm.opts"), " +")); args.addAll(toolBox.split(System.getPro...
Task.Result function() { List<String> args = new ArrayList<>(); args.add(toolBox.getJDKTool("java").toString()); if (includeStandardOptions) { args.addAll(toolBox.split(System.getProperty(STR), STR)); args.addAll(toolBox.split(System.getProperty(STR), STR)); } if (classpath != null) { args.add(STR); args.add(classpath)...
/** * Calls the Java launcher with the arguments as currently configured. * @return a Result object indicating the outcome of the task * and the content of any output written to stdout or stderr. * @throws TaskError if the outcome of the task is not as expected. */
Calls the Java launcher with the arguments as currently configured
run
{ "repo_name": "google/error-prone-javac", "path": "test/tools/lib/toolbox/JavaTask.java", "license": "gpl-2.0", "size": 5187 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,389,598
if(str == null){ return null; } str = StringUtils.replace(str,"'", "''"); //avoid to be escaped by an ending backslash if(str.endsWith("\\")){ Matcher m = ENDING_BACKSLASH_PATTERN.matcher(str); if(m.find()){ String backslahes = m.group(); int index = str.lastIndexOf(backslahes); //double ...
if(str == null){ return null; } str = StringUtils.replace(str,"'", "''"); if(str.endsWith("\\")){ Matcher m = ENDING_BACKSLASH_PATTERN.matcher(str); if(m.find()){ String backslahes = m.group(); int index = str.lastIndexOf(backslahes); String replacementStr = backslahes+backslahes; StringBuilder sb = new StringBuilder(s...
/** * Escapes the characters in a String to be suitable for a SQL query. * This is NOT a solution to SQL injection. * The function only handles apostrophes and strings that end with a backslash. * TODO use canadensys jar instead of custom method * @param str * @return */
Escapes the characters in a String to be suitable for a SQL query. This is NOT a solution to SQL injection. The function only handles apostrophes and strings that end with a backslash. TODO use canadensys jar instead of custom method
escapeSql
{ "repo_name": "Canadensys/dwca2sql", "path": "src/main/java/net/canadensys/dwca2sql/SimpleSQLFormatHelper.java", "license": "mit", "size": 2683 }
[ "java.util.regex.Matcher", "org.apache.commons.lang3.StringUtils" ]
import java.util.regex.Matcher; import org.apache.commons.lang3.StringUtils;
import java.util.regex.*; import org.apache.commons.lang3.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
1,020,365
public static View createLayout(Context context, Object obj, ViewGroup parent) { Layout layout = obj.getClass().getAnnotation(Layout.class); if (layout == null) { Class<?>[] superClasses = getNonAndroidSuperClasses(obj); for (Class<?> superClass : superClasses) { ...
static View function(Context context, Object obj, ViewGroup parent) { Layout layout = obj.getClass().getAnnotation(Layout.class); if (layout == null) { Class<?>[] superClasses = getNonAndroidSuperClasses(obj); for (Class<?> superClass : superClasses) { layout = superClass.getAnnotation(Layout.class); if (layout != null...
/** * Helper method to create a layout within an Object annotated with the <code>@Layout</code> annotation. * * @param context an Activity Context * @param obj the Object with the <code>@Layout</code> annotation * @param parent The view's parent, used for inflating layout attributes *...
Helper method to create a layout within an Object annotated with the <code>@Layout</code> annotation
createLayout
{ "repo_name": "davidargylethacker/Slim", "path": "src/main/java/com/metova/slim/Slim.java", "license": "apache-2.0", "size": 9765 }
[ "android.content.Context", "android.view.LayoutInflater", "android.view.View", "android.view.ViewGroup", "com.metova.slim.annotation.Layout" ]
import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.metova.slim.annotation.Layout;
import android.content.*; import android.view.*; import com.metova.slim.annotation.*;
[ "android.content", "android.view", "com.metova.slim" ]
android.content; android.view; com.metova.slim;
2,390,822
public void unregister(byte[] clientId, Iterable<ObjectId> objectIds) { Preconditions.checkNotNull(clientId); Preconditions.checkNotNull(objectIds); Context context = getApplicationContext(); context.startService(createUnregisterIntent(context, clientId, objectIds)); }
void function(byte[] clientId, Iterable<ObjectId> objectIds) { Preconditions.checkNotNull(clientId); Preconditions.checkNotNull(objectIds); Context context = getApplicationContext(); context.startService(createUnregisterIntent(context, clientId, objectIds)); }
/** * See specs for {@link InvalidationClient#unregister}. * * @param clientId identifier for the client service for which we are registering * @param objectIds the object ids being unregistered */
See specs for <code>InvalidationClient#unregister</code>
unregister
{ "repo_name": "Teamxrtc/webrtc-streaming-node", "path": "third_party/webrtc/src/chromium/src/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/contrib/AndroidListener.java", "license": "mit", "size": 27081 }
[ "android.content.Context", "com.google.ipc.invalidation.external.client.types.ObjectId", "com.google.ipc.invalidation.util.Preconditions" ]
import android.content.Context; import com.google.ipc.invalidation.external.client.types.ObjectId; import com.google.ipc.invalidation.util.Preconditions;
import android.content.*; import com.google.ipc.invalidation.external.client.types.*; import com.google.ipc.invalidation.util.*;
[ "android.content", "com.google.ipc" ]
android.content; com.google.ipc;
1,587,348
protected SocialProfile parseProfile(Map<String, Object> props) { if (!props.containsKey("id")) { throw new IllegalArgumentException("No id in profile"); } SocialProfile profile = SocialProfile.with(props) .displayName("name") .first("first_name") .last("last_name") ....
SocialProfile function(Map<String, Object> props) { if (!props.containsKey("id")) { throw new IllegalArgumentException(STR); } SocialProfile profile = SocialProfile.with(props) .displayName("name") .first(STR) .last(STR) .id("id") .username(STR) .profileUrl("link") .build(); profile.setThumbnailUrl(getBaseUrl() + "/" +...
/** * Property names for Facebook - Override to customize * * @param props * @return */
Property names for Facebook - Override to customize
parseProfile
{ "repo_name": "jiekebo/guja", "path": "guja-core/src/main/java/com/wadpam/guja/oauth2/social/SocialTemplate.java", "license": "gpl-3.0", "size": 3999 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,445,162
public Operator getOperator() { return opr; }
Operator function() { return opr; }
/** * Get the operator of this expression * * @return the operator of this expression */
Get the operator of this expression
getOperator
{ "repo_name": "shaolinwu/uimaster", "path": "modules/persistence/src/main/java/org/shaolin/bmdp/persistence/query/generator/QueryExpression.java", "license": "apache-2.0", "size": 5786 }
[ "org.shaolin.bmdp.persistence.query.operator.Operator" ]
import org.shaolin.bmdp.persistence.query.operator.Operator;
import org.shaolin.bmdp.persistence.query.operator.*;
[ "org.shaolin.bmdp" ]
org.shaolin.bmdp;
784,817
public static PushButton createPushButtonWithImageStates(Image upImage, String styleName, ClickHandler handler) { final PushButton button = new PushButton(upImage, handler); button.setStyleName(styleName); return button; }
static PushButton function(Image upImage, String styleName, ClickHandler handler) { final PushButton button = new PushButton(upImage, handler); button.setStyleName(styleName); return button; }
/** * Creates a {@link PushButton} with the specified face images and stylename. * * @param upImage * the image to be used on the up face * @param styleName * the stylename to use for the widget * @param handler * a click handler to which to bind the button * @retur...
Creates a <code>PushButton</code> with the specified face images and stylename
createPushButtonWithImageStates
{ "repo_name": "dougkoellmer/swarm", "path": "tools/appengine-java-sdk/demos/sticky/src/com/google/appengine/demos/sticky/client/Buttons.java", "license": "mit", "size": 5355 }
[ "com.google.gwt.event.dom.client.ClickHandler", "com.google.gwt.user.client.ui.Image", "com.google.gwt.user.client.ui.PushButton" ]
import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.event.dom.client.*; import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
534,253
public static byte[] toByteArray(List<Byte> list) { byte[] result = new byte[list.size()]; for (int pos = 0; pos < list.size(); pos++) { result[pos] = list.get(pos); } return result; }
static byte[] function(List<Byte> list) { byte[] result = new byte[list.size()]; for (int pos = 0; pos < list.size(); pos++) { result[pos] = list.get(pos); } return result; }
/** * Creates a byte array from a list of Byte * * @param list of Bytes * @return byte array */
Creates a byte array from a list of Byte
toByteArray
{ "repo_name": "jowiho/openhab", "path": "bundles/binding/org.openhab.binding.plcbus/src/main/java/org/openhab/binding/plcbus/internal/protocol/Convert.java", "license": "epl-1.0", "size": 1431 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,246,793
@GremlinGroovy("it.out('" + JAVA_METHOD + "').has('" + JavaMethodModel.METHOD_NAME + "', methodName)") Iterable<JavaMethodModel> getMethod(@GremlinParam("methodName") String methodName); /** * Adds a {@link JavaMethodModel} to this {@link JavaClassModel}
@GremlinGroovy(STR + JAVA_METHOD + STR + JavaMethodModel.METHOD_NAME + STR) Iterable<JavaMethodModel> getMethod(@GremlinParam(STR) String methodName); /** * Adds a {@link JavaMethodModel} to this {@link JavaClassModel}
/** * Gets the {@link JavaMethodModel} by name */
Gets the <code>JavaMethodModel</code> by name
getMethod
{ "repo_name": "OndraZizka/windup", "path": "rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/model/JavaClassModel.java", "license": "epl-1.0", "size": 8509 }
[ "com.tinkerpop.frames.annotations.gremlin.GremlinGroovy", "com.tinkerpop.frames.annotations.gremlin.GremlinParam" ]
import com.tinkerpop.frames.annotations.gremlin.GremlinGroovy; import com.tinkerpop.frames.annotations.gremlin.GremlinParam;
import com.tinkerpop.frames.annotations.gremlin.*;
[ "com.tinkerpop.frames" ]
com.tinkerpop.frames;
807,072
private AbstractExpressionHandler createMethodCallHandler(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) { AbstractExpressionHandler theParent = parent; DetailAST astNode = ast.getFirstChild(); while (astNode.getType() == TokenTypes.DOT) { ...
AbstractExpressionHandler function(IndentationCheck indentCheck, DetailAST ast, AbstractExpressionHandler parent) { AbstractExpressionHandler theParent = parent; DetailAST astNode = ast.getFirstChild(); while (astNode.getType() == TokenTypes.DOT) { astNode = astNode.getFirstChild(); } if (isHandledType(astNode.getType(...
/** * Create new instance of handler for METHOD_CALL. * * @param indentCheck the indentation check * @param ast ast to handle * @param parent the handler parent of this AST * * @return new instance. */
Create new instance of handler for METHOD_CALL
createMethodCallHandler
{ "repo_name": "HubSpot/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/indentation/HandlerFactory.java", "license": "lgpl-2.1", "size": 7212 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
416,838
public boolean hasBanActive(UUID player) { for (Punishment punishment : getPunishments(player)) { if ((punishment.getType() == PunishmentType.PERMANENT_BAN || punishment.getType() == PunishmentType.TEMPORARY_BAN) && punishment.isActive()) { return true; } } ...
boolean function(UUID player) { for (Punishment punishment : getPunishments(player)) { if ((punishment.getType() == PunishmentType.PERMANENT_BAN punishment.getType() == PunishmentType.TEMPORARY_BAN) && punishment.isActive()) { return true; } } return false; }
/** * Check if a player has an active ban * * @param player UUID of player * @return true if player has a ban active */
Check if a player has an active ban
hasBanActive
{ "repo_name": "ModernDayPlayer/Punishment", "path": "Bungee/src/main/java/me/legitmodern/Punishment/Utils/SQL/DatabaseManager.java", "license": "mit", "size": 7195 }
[ "me.legitmodern.Punishment" ]
import me.legitmodern.Punishment;
import me.legitmodern.*;
[ "me.legitmodern" ]
me.legitmodern;
128,147
public void setMediaManagers(List<JingleMediaManager> jingleMediaManagers) { this.jingleMediaManagers = jingleMediaManagers; }
void function(List<JingleMediaManager> jingleMediaManagers) { this.jingleMediaManagers = jingleMediaManagers; }
/** * Set the Media Managers of this Jingle Manager * * @param jingleMediaManager JingleMediaManager to be used for open, close, start and stop jmf streamings */
Set the Media Managers of this Jingle Manager
setMediaManagers
{ "repo_name": "UzxMx/java-bells", "path": "lib-src/smack_src_3_3_0/jingle/extension/source/org/jivesoftware/smackx/jingle/JingleManager.java", "license": "bsd-3-clause", "size": 25845 }
[ "java.util.List", "org.jivesoftware.smackx.jingle.media.JingleMediaManager" ]
import java.util.List; import org.jivesoftware.smackx.jingle.media.JingleMediaManager;
import java.util.*; import org.jivesoftware.smackx.jingle.media.*;
[ "java.util", "org.jivesoftware.smackx" ]
java.util; org.jivesoftware.smackx;
2,348,662
public DConfigBeanRoot restoreDConfigBean(InputStream inputArchive, DDBeanRoot bean) throws ConfigurationException;
DConfigBeanRoot function(InputStream inputArchive, DDBeanRoot bean) throws ConfigurationException;
/** * Restore from disk to instantated objects all the DConfigBeans associated with a * specific deployment descriptor. The beans may be fully or partially configured. * * @param inputArchive The input stream for the file from which the DConfigBeans * should be restored. ...
Restore from disk to instantated objects all the DConfigBeans associated with a specific deployment descriptor. The beans may be fully or partially configured
restoreDConfigBean
{ "repo_name": "salyh/javamailspec", "path": "geronimo-javaee-deployment_1.1MR3_spec/src/main/java/javax/enterprise/deploy/spi/DeploymentConfiguration.java", "license": "apache-2.0", "size": 4960 }
[ "java.io.InputStream", "javax.enterprise.deploy.model.DDBeanRoot", "javax.enterprise.deploy.spi.exceptions.ConfigurationException" ]
import java.io.InputStream; import javax.enterprise.deploy.model.DDBeanRoot; import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
import java.io.*; import javax.enterprise.deploy.model.*; import javax.enterprise.deploy.spi.exceptions.*;
[ "java.io", "javax.enterprise" ]
java.io; javax.enterprise;
342,322
public void setTrustedRpkStore(TrustedRpkStore trustedRpkStore) { this.trustedRpkStore = trustedRpkStore; }
void function(TrustedRpkStore trustedRpkStore) { this.trustedRpkStore = trustedRpkStore; }
/** * Set the TrustedRpkStore to use to determine trust in raw public keys. */
Set the TrustedRpkStore to use to determine trust in raw public keys
setTrustedRpkStore
{ "repo_name": "DariusX/camel", "path": "components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java", "license": "apache-2.0", "size": 16113 }
[ "org.eclipse.californium.scandium.dtls.rpkstore.TrustedRpkStore" ]
import org.eclipse.californium.scandium.dtls.rpkstore.TrustedRpkStore;
import org.eclipse.californium.scandium.dtls.rpkstore.*;
[ "org.eclipse.californium" ]
org.eclipse.californium;
1,290,713
@Override public String hmset(final String key, final Map<String, String> hash) { checkIsInMultiOrPipeline(); client.hmset(key, hash); return client.getStatusCodeReply(); }
String function(final String key, final Map<String, String> hash) { checkIsInMultiOrPipeline(); client.hmset(key, hash); return client.getStatusCodeReply(); }
/** * Set the respective fields to the respective values. HMSET replaces old values with new values. * <p> * If key does not exist, a new key holding a hash is created. * <p> * <b>Time complexity:</b> O(N) (with N being the number of fields) * @param key * @param hash * @return Return OK or Exce...
Set the respective fields to the respective values. HMSET replaces old values with new values. If key does not exist, a new key holding a hash is created. Time complexity: O(N) (with N being the number of fields)
hmset
{ "repo_name": "yapei123/jedis", "path": "src/main/java/redis/clients/jedis/Jedis.java", "license": "mit", "size": 127680 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,780,394
private void handleInheritedAbstractMethodImplementation( MethodDeclaration node, IMethodBinding methodBinding, List<MethodPathItem> inhMethods) { // currently deactivated, see Bug #74 // // add check for method name // checks.add(new MethodImplementationNameCheck(file, jdtTypingProvider, // brid...
void function( MethodDeclaration node, IMethodBinding methodBinding, List<MethodPathItem> inhMethods) { }
/** * generate checks accordingly. * * @param node * @param binding * @param declTypeBinding */
generate checks accordingly
handleInheritedAbstractMethodImplementation
{ "repo_name": "ckaestne/CIDE", "path": "CIDE_Language_JDT/src/de/ovgu/cide/typing/jdt/JDTCheckGenerator.java", "license": "gpl-3.0", "size": 16470 }
[ "de.ovgu.cide.typing.jdt.checks.util.MethodPathItem", "java.util.List", "org.eclipse.jdt.core.dom.IMethodBinding", "org.eclipse.jdt.core.dom.MethodDeclaration" ]
import de.ovgu.cide.typing.jdt.checks.util.MethodPathItem; import java.util.List; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.MethodDeclaration;
import de.ovgu.cide.typing.jdt.checks.util.*; import java.util.*; import org.eclipse.jdt.core.dom.*;
[ "de.ovgu.cide", "java.util", "org.eclipse.jdt" ]
de.ovgu.cide; java.util; org.eclipse.jdt;
1,567,029
final List<Tag> taskTags = new ArrayList<>(); for (XmlAdaptedTag tag : tagged) { taskTags.add(tag.toModelType()); } final Name name = new Name(this.name); final Start start = new Start(this.start); final Deadline deadline = new Deadline(this.deadline); final P...
final List<Tag> taskTags = new ArrayList<>(); for (XmlAdaptedTag tag : tagged) { taskTags.add(tag.toModelType()); } final Name name = new Name(this.name); final Start start = new Start(this.start); final Deadline deadline = new Deadline(this.deadline); final Priority priority = new Priority(this.priority); final Unique...
/** * Converts this jaxb-friendly adapted person object into the model's Task object. * * @throws IllegalValueException if there were any data constraints violated in the adapted person */
Converts this jaxb-friendly adapted person object into the model's Task object
toModelType
{ "repo_name": "CS2103JAN2017-F12-B2/main", "path": "src/main/java/seedu/todoapp/storage/XmlAdaptedTask.java", "license": "mit", "size": 2956 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,809,706
protected void drawHorizontalItem(final Graphics2D g2, final CategoryItemRendererState state, final Rectangle2D dataArea, final CategoryPlot plot, final CategoryAxis domainAxis, final ValueAxis rangeAxis, final StatisticalCategoryDataset dataset, final int row, final int column) { // nothing is drawn for nu...
void function(final Graphics2D g2, final CategoryItemRendererState state, final Rectangle2D dataArea, final CategoryPlot plot, final CategoryAxis domainAxis, final ValueAxis rangeAxis, final StatisticalCategoryDataset dataset, final int row, final int column) { final Number v = dataset.getValue(row, column); if (v == n...
/** * Draws an item for a plot with a horizontal orientation. * * @param g2 the graphics device. * @param state the renderer state. * @param dataArea the data area. * @param plot the plot. * @param domainAxis the domain axis. * @param rangeAxis the range axis. * @param data...
Draws an item for a plot with a horizontal orientation
drawHorizontalItem
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/utils/jfreeAsymmetric/AsymmetricStatisticalBarRenderer.java", "license": "gpl-2.0", "size": 17317 }
[ "java.awt.Graphics2D", "java.awt.Paint", "java.awt.geom.Line2D", "java.awt.geom.Rectangle2D", "org.jfree.chart.axis.CategoryAxis", "org.jfree.chart.axis.ValueAxis", "org.jfree.chart.entity.EntityCollection", "org.jfree.chart.labels.CategoryItemLabelGenerator", "org.jfree.chart.plot.CategoryPlot", ...
import java.awt.Graphics2D; import java.awt.Paint; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.entity.EntityCollection; import org.jfree.chart.labels.CategoryItemLabelGenerator; import org.jfree.ch...
import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.entity.*; import org.jfree.chart.labels.*; import org.jfree.chart.plot.*; import org.jfree.chart.renderer.category.*; import org.jfree.data.statistics.*; import org.jfree.ui.*;
[ "java.awt", "org.jfree.chart", "org.jfree.data", "org.jfree.ui" ]
java.awt; org.jfree.chart; org.jfree.data; org.jfree.ui;
634,828
public XAResource[] getXAResources(ActivationSpec[] specs) throws ResourceException { log.finest("getXAResources()"); return null; }
XAResource[] function(ActivationSpec[] specs) throws ResourceException { log.finest(STR); return null; }
/** * This method is called by the application server during crash recovery. * * @param specs An array of ActivationSpec JavaBeans * @throws ResourceException generic exception * @return An array of XAResource objects */
This method is called by the application server during crash recovery
getXAResources
{ "repo_name": "ironjacamar/ironjacamar", "path": "validator/tests/src/test/java/org/jboss/jca/validator/rules/anno/AnnoResourceAdapter2.java", "license": "lgpl-2.1", "size": 5733 }
[ "javax.resource.ResourceException", "javax.resource.spi.ActivationSpec", "javax.transaction.xa.XAResource" ]
import javax.resource.ResourceException; import javax.resource.spi.ActivationSpec; import javax.transaction.xa.XAResource;
import javax.resource.*; import javax.resource.spi.*; import javax.transaction.xa.*;
[ "javax.resource", "javax.transaction" ]
javax.resource; javax.transaction;
1,356,278
public boolean performFinish() { final String containerName = page.getContainerName(); final String baseName = page.getFileName(); final String[] locales = page.getLocaleStrings(); if (!folderExists(containerName)) { // show choosedialog String message = Messa...
boolean function() { final String containerName = page.getContainerName(); final String baseName = page.getFileName(); final String[] locales = page.getLocaleStrings(); if (!folderExists(containerName)) { String message = Messages.editor_wiz_createfolder; message = String.format(message, containerName); if (!MessageDia...
/** * This method is called when 'Finish' button is pressed in the wizard. We * will create an operation and run it using wizard as execution context. */
This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using wizard as execution context
performFinish
{ "repo_name": "OpenSoftwareSolutions/PDFReporter-Studio", "path": "com.jaspersoft.studio.babel.editor/src/org/eclipse/babel/editor/wizards/internal/ResourceBundleWizard.java", "license": "lgpl-3.0", "size": 11907 }
[ "org.eclipse.babel.messages.Messages", "org.eclipse.jface.dialogs.MessageDialog" ]
import org.eclipse.babel.messages.Messages; import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.babel.messages.*; import org.eclipse.jface.dialogs.*;
[ "org.eclipse.babel", "org.eclipse.jface" ]
org.eclipse.babel; org.eclipse.jface;
155,215
public static com.iucn.whp.dbservice.model.whp_sites_iucn_recommendation findBysiteId_First( long site_id, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.iucn.whp.dbservice.NoSuch_sites_iucn_recommendationException, com.liferay.portal.kernel.exception.SystemException { retu...
static com.iucn.whp.dbservice.model.whp_sites_iucn_recommendation function( long site_id, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.iucn.whp.dbservice.NoSuch_sites_iucn_recommendationException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findBysiteI...
/** * Returns the first whp_sites_iucn_recommendation in the ordered set where site_id = &#63;. * * @param site_id the site_id * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching whp_sites_iucn_recommendation * @throws com.iucn.whp.dbservice.No...
Returns the first whp_sites_iucn_recommendation in the ordered set where site_id = &#63;
findBysiteId_First
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/persistence/whp_sites_iucn_recommendationUtil.java", "license": "gpl-2.0", "size": 23883 }
[ "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.util.OrderByComparator" ]
import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*;
[ "com.liferay.portal" ]
com.liferay.portal;
172,805
public void post202NonRetry400(ProductInner product) throws CloudException, IOException, InterruptedException { post202NonRetry400WithServiceResponseAsync(product).toBlocking().last().getBody(); }
void function(ProductInner product) throws CloudException, IOException, InterruptedException { post202NonRetry400WithServiceResponseAsync(product).toBlocking().last().getBody(); }
/** * Long running post request, service returns a 202 with a location header. * * @param product Product to put * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws InterruptedException exception throw...
Long running post request, service returns a 202 with a location header
post202NonRetry400
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROSADsInner.java", "license": "mit", "size": 293065 }
[ "com.microsoft.azure.CloudException", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import java.io.IOException;
import com.microsoft.azure.*; import java.io.*;
[ "com.microsoft.azure", "java.io" ]
com.microsoft.azure; java.io;
2,083,074
@SuppressLint("HardwareIds") public static String getDeviceId(Context context) { try { return ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); } catch (Exception e) { return ""; } }
@SuppressLint(STR) static String function(Context context) { try { return ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); } catch (Exception e) { return ""; } }
/** * Get TelephonyManager DeviceId * This Need READ_PHONE_STATE permission * * @param context Context * @return DeviceId */
Get TelephonyManager DeviceId This Need READ_PHONE_STATE permission
getDeviceId
{ "repo_name": "qiujuer/UPMiss", "path": "common/src/main/java/net/qiujuer/tips/common/tools/SysTool.java", "license": "gpl-3.0", "size": 2689 }
[ "android.annotation.SuppressLint", "android.content.Context", "android.telephony.TelephonyManager" ]
import android.annotation.SuppressLint; import android.content.Context; import android.telephony.TelephonyManager;
import android.annotation.*; import android.content.*; import android.telephony.*;
[ "android.annotation", "android.content", "android.telephony" ]
android.annotation; android.content; android.telephony;
2,419,103
protected String getActionIconHtml() { return FontAwesome.PLUS.getHtml(); }
String function() { return FontAwesome.PLUS.getHtml(); }
/** * Gets the HTML for the action buttons the type info boxes.<p> * * @return the HTML for the buttons */
Gets the HTML for the action buttons the type info boxes
getActionIconHtml
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/ui/dialogs/CmsNewDialog.java", "license": "lgpl-2.1", "size": 19690 }
[ "com.vaadin.server.FontAwesome" ]
import com.vaadin.server.FontAwesome;
import com.vaadin.server.*;
[ "com.vaadin.server" ]
com.vaadin.server;
891,913
@Generated @Selector("setBorderStyle:") public native void setBorderStyle(@NInt long value);
@Selector(STR) native void function(@NInt long value);
/** * default is UITextBorderStyleNone. If set to UITextBorderStyleRoundedRect, custom background images are ignored. */
default is UITextBorderStyleNone. If set to UITextBorderStyleRoundedRect, custom background images are ignored
setBorderStyle
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UITextField.java", "license": "apache-2.0", "size": 46138 }
[ "org.moe.natj.general.ann.NInt", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.NInt; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,335,799
public String runJavaScriptCodeInCurrentTab(String code) throws TimeoutException { return JavaScriptUtils.executeJavaScriptAndWaitForResult( getActivity().getCurrentWebContents(), code); }
String function(String code) throws TimeoutException { return JavaScriptUtils.executeJavaScriptAndWaitForResult( getActivity().getCurrentWebContents(), code); }
/** * Executes the given snippet of JavaScript code within the current tab. Returns the result of * its execution in JSON format. */
Executes the given snippet of JavaScript code within the current tab. Returns the result of its execution in JSON format
runJavaScriptCodeInCurrentTab
{ "repo_name": "scheib/chromium", "path": "chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java", "license": "bsd-3-clause", "size": 21266 }
[ "java.util.concurrent.TimeoutException", "org.chromium.content_public.browser.test.util.JavaScriptUtils" ]
import java.util.concurrent.TimeoutException; import org.chromium.content_public.browser.test.util.JavaScriptUtils;
import java.util.concurrent.*; import org.chromium.content_public.browser.test.util.*;
[ "java.util", "org.chromium.content_public" ]
java.util; org.chromium.content_public;
1,476,048
protected void setUp() { // Create a new game. game = new GameImpl(); // Create a new board. board = new BitBoardImpl(); // Create a engine instance. engine = new ChessEngineImpl(game, null, board, false); // Set the pieces on their initial positions. board.initialPosition(); ...
void function() { game = new GameImpl(); board = new BitBoardImpl(); engine = new ChessEngineImpl(game, null, board, false); board.initialPosition(); doPly(new PlyImpl(new PositionImpl(12), new PositionImpl(12 + 16), false)); doPly(new PlyImpl(new PositionImpl(62), new PositionImpl(62 - 17), false)); doPly(new PlyImpl(...
/** * Prepare the test(s). */
Prepare the test(s)
setUp
{ "repo_name": "warpwe/java-chess", "path": "src/com/github/warpwe/javachess/test/engine/MinimaxTest1.java", "license": "gpl-2.0", "size": 3466 }
[ "com.github.warpwe.javachess.bitboard.BitBoardImpl", "com.github.warpwe.javachess.engine.ChessEngineImpl", "com.github.warpwe.javachess.game.GameImpl", "com.github.warpwe.javachess.ply.PlyImpl", "com.github.warpwe.javachess.position.PositionImpl" ]
import com.github.warpwe.javachess.bitboard.BitBoardImpl; import com.github.warpwe.javachess.engine.ChessEngineImpl; import com.github.warpwe.javachess.game.GameImpl; import com.github.warpwe.javachess.ply.PlyImpl; import com.github.warpwe.javachess.position.PositionImpl;
import com.github.warpwe.javachess.bitboard.*; import com.github.warpwe.javachess.engine.*; import com.github.warpwe.javachess.game.*; import com.github.warpwe.javachess.ply.*; import com.github.warpwe.javachess.position.*;
[ "com.github.warpwe" ]
com.github.warpwe;
55,530
void handleSetFromGlobal(JSModule module, Scope scope, Node n, Node parent, String name, boolean isPropAssign, Name.Type type) { if (maybeHandlePrototypePrefix(module, scope, n, parent, name)) { return; } Name nameObj = getOrCreateName(name); nameObj.type = type; ...
void handleSetFromGlobal(JSModule module, Scope scope, Node n, Node parent, String name, boolean isPropAssign, Name.Type type) { if (maybeHandlePrototypePrefix(module, scope, n, parent, name)) { return; } Name nameObj = getOrCreateName(name); nameObj.type = type; Ref set = new Ref(module, scope, n, nameObj, Ref.Type.SE...
/** * Updates our representation of the global namespace to reflect an * assignment to a global name in global scope. * * @param module the current module * @param scope the current scope * @param n The node currently being visited * @param parent {@code n}'s parent * @param name...
Updates our representation of the global namespace to reflect an assignment to a global name in global scope
handleSetFromGlobal
{ "repo_name": "robbert/closure-compiler", "path": "src/com/google/javascript/jscomp/GlobalNamespace.java", "license": "apache-2.0", "size": 41903 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,374,023
public final Property<FlexiBean> data() { return metaBean().data().createProperty(this); }
final Property<FlexiBean> function() { return metaBean().data().createProperty(this); }
/** * Gets the the {@code data} property. * @return the property, not null */
Gets the the data property
data
{ "repo_name": "McLeodMoores/starling", "path": "projects/master/src/main/java/com/opengamma/master/region/ManageableRegion.java", "license": "apache-2.0", "size": 23188 }
[ "org.joda.beans.Property", "org.joda.beans.impl.flexi.FlexiBean" ]
import org.joda.beans.Property; import org.joda.beans.impl.flexi.FlexiBean;
import org.joda.beans.*; import org.joda.beans.impl.flexi.*;
[ "org.joda.beans" ]
org.joda.beans;
1,897,331
public OrganisationUnit getDataViewOrganisationUnitWithFallback() { return hasDataViewOrganisationUnit() ? getDataViewOrganisationUnit() : getOrganisationUnit(); }
OrganisationUnit function() { return hasDataViewOrganisationUnit() ? getDataViewOrganisationUnit() : getOrganisationUnit(); }
/** * Returns the first of the data view organisation units associated with the * user. If none, returns the first of the data capture organisation units. * If none, return nulls. */
Returns the first of the data view organisation units associated with the user. If none, returns the first of the data capture organisation units. If none, return nulls
getDataViewOrganisationUnitWithFallback
{ "repo_name": "steffeli/inf5750-tracker-capture", "path": "dhis-api/src/main/java/org/hisp/dhis/user/User.java", "license": "bsd-3-clause", "size": 23300 }
[ "org.hisp.dhis.organisationunit.OrganisationUnit" ]
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.*;
[ "org.hisp.dhis" ]
org.hisp.dhis;
1,343,050
private static void checkForValidSizeAndTimeoutValues(Rule rule, EventHandler eventHandler) { if (rule.getRuleClassObject().hasAttr("size", Type.STRING)) { String size = NonconfigurableAttributeMapper.of(rule).get("size", Type.STRING); if (TestSize.getTestSize(size) == null) { rule.reportError...
static void function(Rule rule, EventHandler eventHandler) { if (rule.getRuleClassObject().hasAttr("size", Type.STRING)) { String size = NonconfigurableAttributeMapper.of(rule).get("size", Type.STRING); if (TestSize.getTestSize(size) == null) { rule.reportError( String.format(STR, rule.getName(), size), eventHandler); ...
/** * Report an error if the rule has a timeout or size attribute that is not a * legal value. These attributes appear on all tests. * * @param rule the rule to check * @param eventHandler the eventHandler to use to report the duplicated deps */
Report an error if the rule has a timeout or size attribute that is not a legal value. These attributes appear on all tests
checkForValidSizeAndTimeoutValues
{ "repo_name": "kchodorow/bazel-1", "path": "src/main/java/com/google/devtools/build/lib/packages/RuleClass.java", "license": "apache-2.0", "size": 76983 }
[ "com.google.devtools.build.lib.events.EventHandler", "com.google.devtools.build.lib.syntax.Type" ]
import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.syntax.Type;
import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.syntax.*;
[ "com.google.devtools" ]
com.google.devtools;
207,521
@Override public Parcelable onSaveInstanceState() { Bundle bundle = new Bundle(); bundle.putParcelable("instanceState", super.onSaveInstanceState()); saveSettings(); bundle.putParcelable("stateSettings", mPinViewSettings); //save everything bundle.putString("stat...
Parcelable function() { Bundle bundle = new Bundle(); bundle.putParcelable(STR, super.onSaveInstanceState()); saveSettings(); bundle.putParcelable(STR, mPinViewSettings); bundle.putString(STR, getPinResults()); return bundle; } /** * Save current attributes in {@link PinView#mPinViewSettings}
/** * Save the state of {@link PinView} when orientation screen changed. */
Save the state of <code>PinView</code> when orientation screen changed
onSaveInstanceState
{ "repo_name": "jiyuren/PinView", "path": "library/src/main/java/com/dpizarro/pinview/library/PinView.java", "license": "apache-2.0", "size": 16072 }
[ "android.os.Bundle", "android.os.Parcelable" ]
import android.os.Bundle; import android.os.Parcelable;
import android.os.*;
[ "android.os" ]
android.os;
335,850
void setHeight(BigInteger value);
void setHeight(BigInteger value);
/** * Sets the value of the '{@link net.opengis.wmts.v_1.LegendURLType#getHeight <em>Height</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Height</em>' attribute. * @see #getHeight() * @generated */
Sets the value of the '<code>net.opengis.wmts.v_1.LegendURLType#getHeight Height</code>' attribute.
setHeight
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wmts/src/net/opengis/wmts/v_1/LegendURLType.java", "license": "lgpl-2.1", "size": 8319 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,138,853
public static int screenWidthPixel(Context context) { WindowManager windowManager = (WindowManager) context .getSystemService(Context.WINDOW_SERVICE); Display display = windowManager.getDefaultDisplay(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { ...
static int function(Context context) { WindowManager windowManager = (WindowManager) context .getSystemService(Context.WINDOW_SERVICE); Display display = windowManager.getDefaultDisplay(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { Point outPoint = new Point(); display.getRealSize(outPoint); sSc...
/** * Gets the width of the display, in pixels. * * @param context * @return */
Gets the width of the display, in pixels
screenWidthPixel
{ "repo_name": "huyongli/TigerVideo", "path": "TigerVideo/src/main/java/cn/ittiger/video/util/DisplayManager.java", "license": "apache-2.0", "size": 15254 }
[ "android.content.Context", "android.graphics.Point", "android.os.Build", "android.view.Display", "android.view.WindowManager" ]
import android.content.Context; import android.graphics.Point; import android.os.Build; import android.view.Display; import android.view.WindowManager;
import android.content.*; import android.graphics.*; import android.os.*; import android.view.*;
[ "android.content", "android.graphics", "android.os", "android.view" ]
android.content; android.graphics; android.os; android.view;
2,490,667
public void generateFiles(ProgressCallback callback, List<GeneratedJavaFile> generatedJavaFiles, List<GeneratedXmlFile> generatedXmlFiles, List<String> warnings) throws InterruptedException { pluginAggregator = new PluginAggregator(); ...
void function(ProgressCallback callback, List<GeneratedJavaFile> generatedJavaFiles, List<GeneratedXmlFile> generatedXmlFiles, List<String> warnings) throws InterruptedException { pluginAggregator = new PluginAggregator(); for (PluginConfiguration pluginConfiguration : pluginConfigurations) { Plugin plugin = ObjectFact...
/** * Generate files. * * @param callback * the callback * @param generatedJavaFiles * the generated java files * @param generatedXmlFiles * the generated xml files * @param warnings * the warnings * @throws InterruptedEx...
Generate files
generateFiles
{ "repo_name": "victzero/ezjs-generator", "path": "generator/src/main/java/me/ezjs/generator/mybatis/config/Context.java", "license": "apache-2.0", "size": 25193 }
[ "java.util.List", "me.ezjs.generator.mybatis.api.GeneratedJavaFile", "me.ezjs.generator.mybatis.api.GeneratedXmlFile", "me.ezjs.generator.mybatis.api.IntrospectedTable", "me.ezjs.generator.mybatis.api.Plugin", "me.ezjs.generator.mybatis.api.ProgressCallback", "me.ezjs.generator.mybatis.internal.ObjectFa...
import java.util.List; import me.ezjs.generator.mybatis.api.GeneratedJavaFile; import me.ezjs.generator.mybatis.api.GeneratedXmlFile; import me.ezjs.generator.mybatis.api.IntrospectedTable; import me.ezjs.generator.mybatis.api.Plugin; import me.ezjs.generator.mybatis.api.ProgressCallback; import me.ezjs.generator.mybat...
import java.util.*; import me.ezjs.generator.mybatis.api.*; import me.ezjs.generator.mybatis.internal.*;
[ "java.util", "me.ezjs.generator" ]
java.util; me.ezjs.generator;
386,752
public SafeHtml getMenuItemTooltip();
SafeHtml function();
/** * Returns the tooltip for the context menu item representing this action button. */
Returns the tooltip for the context menu item representing this action button
getMenuItemTooltip
{ "repo_name": "OpenUniversity/ovirt-engine", "path": "frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/action/ActionButtonDefinition.java", "license": "apache-2.0", "size": 2255 }
[ "com.google.gwt.safehtml.shared.SafeHtml" ]
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.*;
[ "com.google.gwt" ]
com.google.gwt;
313,862
public void readBands(InputStream in, int count) throws IOException, Pack200Exception;
void function(InputStream in, int count) throws IOException, Pack200Exception;
/** * Read the bands associated with this part of the layout * * @param in * @param count * @throws Pack200Exception * @throws IOException */
Read the bands associated with this part of the layout
readBands
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/pack200/src/main/java/org/apache/harmony/unpack200/NewAttributeBands.java", "license": "apache-2.0", "size": 36689 }
[ "java.io.IOException", "java.io.InputStream", "org.apache.harmony.pack200.Pack200Exception" ]
import java.io.IOException; import java.io.InputStream; import org.apache.harmony.pack200.Pack200Exception;
import java.io.*; import org.apache.harmony.pack200.*;
[ "java.io", "org.apache.harmony" ]
java.io; org.apache.harmony;
1,667,131
public static Map<Artifact, ImmutableList<Artifact>> resolveLinkstamps(RuleErrorConsumer listener, CcLinkParams linkParams) { Map<Artifact, ImmutableList<Artifact>> result = new LinkedHashMap<>(); for (Linkstamp pair : linkParams.getLinkstamps()) { Artifact artifact = pair.getArtifact(); if ...
static Map<Artifact, ImmutableList<Artifact>> function(RuleErrorConsumer listener, CcLinkParams linkParams) { Map<Artifact, ImmutableList<Artifact>> result = new LinkedHashMap<>(); for (Linkstamp pair : linkParams.getLinkstamps()) { Artifact artifact = pair.getArtifact(); if (result.containsKey(artifact)) { listener.ru...
/** * Resolves the linkstamp collection from the {@code CcLinkParams} into a map. * * <p>Emits a warning on the rule if there are identical linkstamp artifacts with different * compilation contexts. */
Resolves the linkstamp collection from the CcLinkParams into a map. Emits a warning on the rule if there are identical linkstamp artifacts with different compilation contexts
resolveLinkstamps
{ "repo_name": "anupcshan/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java", "license": "apache-2.0", "size": 25049 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.packages.RuleErrorConsumer", "com.google.devtools.build.lib.rules.cpp.CcLinkParams", "java.util.LinkedHashMap", "java.util.Map" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.packages.RuleErrorConsumer; import com.google.devtools.build.lib.rules.cpp.CcLinkParams; import java.util.LinkedHashMap; import java.util.Map;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.rules.cpp.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
1,872,237
private static Method findSetterForAttribute(Class<?> clazz, String attribute) { resolveSupportedAttributes(clazz); return cache.get(clazz).getSetter(attribute); }
static Method function(Class<?> clazz, String attribute) { resolveSupportedAttributes(clazz); return cache.get(clazz).getSetter(attribute); }
/** * Returns a setter that can be used for assigning the given design * attribute to the class * * @param clazz * the class that is scanned for setters * @param attribute * the design attribute to find setter for * @return the setter method or null if not ...
Returns a setter that can be used for assigning the given design attribute to the class
findSetterForAttribute
{ "repo_name": "carrchang/vaadin", "path": "server/src/com/vaadin/ui/declarative/DesignAttributeHandler.java", "license": "apache-2.0", "size": 16893 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,548,639
public Point transformDatabasePoint2DValueToJTSPoint(String pointAsString) throws com.vividsolutions.jts.io.ParseException { Point point = null; WKTReader wktReader = new WKTReader(); Geometry geometry = wktReader.read(pointAsString); if (geometry instanceof Point) { point = (Point) geometry; } el...
Point function(String pointAsString) throws com.vividsolutions.jts.io.ParseException { Point point = null; WKTReader wktReader = new WKTReader(); Geometry geometry = wktReader.read(pointAsString); if (geometry instanceof Point) { point = (Point) geometry; } else { throw new IncorrectGeometryReturnedForDatatype(geometry...
/** * From the database's representation of a Point2D create a JTS Point. * * <p> * This is the inverse of {@link #transformPoint2DIntoDatabaseFormat(com.vividsolutions.jts.geom.Point) * }. * * @param pointAsString a point2d value * <p style="color: #F90;">Support DBvolution at * <a href="http...
From the database's representation of a Point2D create a JTS Point. This is the inverse of <code>#transformPoint2DIntoDatabaseFormat(com.vividsolutions.jts.geom.Point) </code>
transformDatabasePoint2DValueToJTSPoint
{ "repo_name": "gregorydgraham/DBvolution", "path": "src/main/java/nz/co/gregs/dbvolution/databases/definitions/DBDefinition.java", "license": "apache-2.0", "size": 191012 }
[ "com.vividsolutions.jts.geom.Geometry", "com.vividsolutions.jts.geom.Point", "com.vividsolutions.jts.io.WKTReader", "java.text.ParseException", "nz.co.gregs.dbvolution.exceptions.IncorrectGeometryReturnedForDatatype" ]
import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.Point; import com.vividsolutions.jts.io.WKTReader; import java.text.ParseException; import nz.co.gregs.dbvolution.exceptions.IncorrectGeometryReturnedForDatatype;
import com.vividsolutions.jts.geom.*; import com.vividsolutions.jts.io.*; import java.text.*; import nz.co.gregs.dbvolution.exceptions.*;
[ "com.vividsolutions.jts", "java.text", "nz.co.gregs" ]
com.vividsolutions.jts; java.text; nz.co.gregs;
1,295,345
public void saveCodeFoldingStateFile(String uriString) { IDocument document = sourceViewer.getDocument(); if (document == null) { return; } XMLMemento codeFoldingMemento = XMLMemento.createWriteRoot(MODEL); codeFoldingMemento.putString(VERIFY_KEY, makeMD5(document.get())); saveCodeFolding(codeFoldingM...
void function(String uriString) { IDocument document = sourceViewer.getDocument(); if (document == null) { return; } XMLMemento codeFoldingMemento = XMLMemento.createWriteRoot(MODEL); codeFoldingMemento.putString(VERIFY_KEY, makeMD5(document.get())); saveCodeFolding(codeFoldingMemento); File stateFile = getCodeFoldingS...
/** * <p> * Saves the code folding state to a XML file in the state location. * </p> * * @param uriString the key to determine the file to save to */
Saves the code folding state to a XML file in the state location.
saveCodeFoldingStateFile
{ "repo_name": "HyVar/DarwinSPL", "path": "plugins/eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui/src-gen/eu/hyvar/context/contextValidity/resource/hyvalidityformula/ui/HyvalidityformulaCodeFoldingManager.java", "license": "apache-2.0", "size": 16990 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStreamWriter", "org.eclipse.jface.dialogs.MessageDialog", "org.eclipse.jface.text.IDocument", "org.eclipse.swt.widgets.Shell", "org.eclipse.ui.XMLMemento" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.text.IDocument; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.XMLMemento;
import java.io.*; import org.eclipse.jface.dialogs.*; import org.eclipse.jface.text.*; import org.eclipse.swt.widgets.*; import org.eclipse.ui.*;
[ "java.io", "org.eclipse.jface", "org.eclipse.swt", "org.eclipse.ui" ]
java.io; org.eclipse.jface; org.eclipse.swt; org.eclipse.ui;
1,593,813
public DateTime lastGeoFailoverTime() { return this.lastGeoFailoverTime; }
DateTime function() { return this.lastGeoFailoverTime; }
/** * Get the lastGeoFailoverTime value. * * @return the lastGeoFailoverTime value */
Get the lastGeoFailoverTime value
lastGeoFailoverTime
{ "repo_name": "balajikris/autorest", "path": "Samples/azure-storage/Azure.Java.Fluent/StorageAccountProperties.java", "license": "mit", "size": 9097 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,539,897
private static void streamCopy(InputStream inStream, OutputStream outStream) throws IOException { byte[] temp = new byte[4096]; int bytesRead = inStream.read(temp); while (bytesRead >= 0) { outStream.write(temp, 0, bytesRead); bytesR...
static void function(InputStream inStream, OutputStream outStream) throws IOException { byte[] temp = new byte[4096]; int bytesRead = inStream.read(temp); while (bytesRead >= 0) { outStream.write(temp, 0, bytesRead); bytesRead = inStream.read(temp); } inStream.close(); outStream.close(); }
/** * Copies all available data from |inStream| to |outStream|. Closes both * streams when done. * * @param inStream the stream to read * @param outStream the stream to write to * @throws IOException */
Copies all available data from |inStream| to |outStream|. Closes both streams when done
streamCopy
{ "repo_name": "was4444/chromium.src", "path": "chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadCallable.java", "license": "bsd-3-clause", "size": 12728 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
924,424
ImmutableList<String> getDxJvmArguments();
ImmutableList<String> getDxJvmArguments();
/** * JVM arguments to be passed to the command line of dx. */
JVM arguments to be passed to the command line of dx
getDxJvmArguments
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/android/AndroidSemantics.java", "license": "apache-2.0", "size": 3851 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,770,855
public static int hashCode(TimeValue o) { int result; result = new Long(o.getYear()).hashCode(); result = prime * result + o.getMonth(); result = prime * result + o.getDay(); result = prime * result + o.getHour(); result = prime * result + o.getMinute(); result = prime * result + o.getSecond(); resul...
static int function(TimeValue o) { int result; result = new Long(o.getYear()).hashCode(); result = prime * result + o.getMonth(); result = prime * result + o.getDay(); result = prime * result + o.getHour(); result = prime * result + o.getMinute(); result = prime * result + o.getSecond(); result = prime * result + o.get...
/** * Returns a hash code for the given object. * * @see java.lang.Object#hashCode() * @param o * the object to create a hash for * @return the hash code of the object */
Returns a hash code for the given object
hashCode
{ "repo_name": "GlorimarCastro/glorimar-wikidata-toolkit", "path": "wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/helpers/Hash.java", "license": "apache-2.0", "size": 10121 }
[ "org.wikidata.wdtk.datamodel.interfaces.TimeValue" ]
import org.wikidata.wdtk.datamodel.interfaces.TimeValue;
import org.wikidata.wdtk.datamodel.interfaces.*;
[ "org.wikidata.wdtk" ]
org.wikidata.wdtk;
2,135,291
@Test @Deployment(resources = { "org/flowable/rest/service/api/runtime/ExecutionResourceTest.process-with-signal.bpmn20.xml" }) public void testSignalExecution() throws Exception { runtimeService.startProcessInstanceByKey("processOne"); Execution signalExecution = runtimeService.createExecu...
@Deployment(resources = { STR }) void function() throws Exception { runtimeService.startProcessInstanceByKey(STR); Execution signalExecution = runtimeService.createExecutionQuery().activityId(STR).singleResult(); assertThat(signalExecution).isNotNull(); assertThat(signalExecution.getActivityId()).isEqualTo(STR); Object...
/** * Test signalling a single execution, without signal name. */
Test signalling a single execution, without signal name
testSignalExecution
{ "repo_name": "dbmalkovsky/flowable-engine", "path": "modules/flowable-rest/src/test/java/org/flowable/rest/service/api/runtime/ExecutionResourceTest.java", "license": "apache-2.0", "size": 15257 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.node.ObjectNode", "net.javacrumbs.jsonunit.assertj.JsonAssertions", "net.javacrumbs.jsonunit.core.Option", "org.apache.http.HttpStatus", "org.apache.http.client.methods.CloseableHttpResponse", "org.apache.http.client.methods.Http...
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import net.javacrumbs.jsonunit.assertj.JsonAssertions; import net.javacrumbs.jsonunit.core.Option; import org.apache.http.HttpStatus; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http...
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import net.javacrumbs.jsonunit.assertj.*; import net.javacrumbs.jsonunit.core.*; import org.apache.http.*; import org.apache.http.client.methods.*; import org.apache.http.entity.*; import org.assertj.core.api.*; import org.flowable.e...
[ "com.fasterxml.jackson", "net.javacrumbs.jsonunit", "org.apache.http", "org.assertj.core", "org.flowable.engine", "org.flowable.rest" ]
com.fasterxml.jackson; net.javacrumbs.jsonunit; org.apache.http; org.assertj.core; org.flowable.engine; org.flowable.rest;
618,386
private Collection<DocWeight> keepHighGrades( Collection<DocWeight> values, float minLimit, float maxLimit) { if ( OutpipeLog.l.isInfoEnabled()) OutpipeLog.l.info( "Static Ranking Range Min/Max: " + minLimit + "/" + maxLimit ); if ( minLimit == maxLimit) return values; float diff = (maxLimit ...
Collection<DocWeight> function( Collection<DocWeight> values, float minLimit, float maxLimit) { if ( OutpipeLog.l.isInfoEnabled()) OutpipeLog.l.info( STR + minLimit + "/" + maxLimit ); if ( minLimit == maxLimit) return values; float diff = (maxLimit - minLimit) / 10; float[] gradesRanges = new float[] {minLimit, minLim...
/** * Grade to 0-10 based on weight ranges computed based on max and min value * @param values DocWeight collections * @param minLimit Maximum Weight * @param maxLimit Minimum Weight * @return */
Grade to 0-10 based on weight ranges computed based on max and min value
keepHighGrades
{ "repo_name": "bizosys/hsearch-obsolete", "path": "src/java/com/bizosys/hsearch/outpipe/ComputeStaticRanking.java", "license": "apache-2.0", "size": 7971 }
[ "com.bizosys.hsearch.query.DocWeight", "java.util.Collection", "java.util.Iterator" ]
import com.bizosys.hsearch.query.DocWeight; import java.util.Collection; import java.util.Iterator;
import com.bizosys.hsearch.query.*; import java.util.*;
[ "com.bizosys.hsearch", "java.util" ]
com.bizosys.hsearch; java.util;
2,311,277
public final double getDistanceFromLine(PointF p1, PointF p2, PointF in) { double d12x = p2.x - p1.x; double d12y = p2.y - p1.y; double d1ix = in.x - p1.x; double d1iy = in.y - p1.y; double distSq = d12x * d12x + d12y * d12y; if (distSq < 0.00000000001) return (Math.sqrt(d1ix * d1ix + d1iy * d1iy)); ...
final double function(PointF p1, PointF p2, PointF in) { double d12x = p2.x - p1.x; double d12y = p2.y - p1.y; double d1ix = in.x - p1.x; double d1iy = in.y - p1.y; double distSq = d12x * d12x + d12y * d12y; if (distSq < 0.00000000001) return (Math.sqrt(d1ix * d1ix + d1iy * d1iy)); double dist = Math.sqrt(distSq); doub...
/** * Gets the distance of "in" from the line extending through "p1" and "p2". */
Gets the distance of "in" from the line extending through "p1" and "p2"
getDistanceFromLine
{ "repo_name": "viridian1138/VectorVictor", "path": "VectorVictor/VectorVictor/src/geomdir/DrawObj.java", "license": "gpl-3.0", "size": 67536 }
[ "android.graphics.PointF" ]
import android.graphics.PointF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,373,652
public HighlightOptions addHighlightParameter(HighlightParameter parameter) { Assert.notNull(parameter); this.parameterHolder.add(parameter); return this; }
HighlightOptions function(HighlightParameter parameter) { Assert.notNull(parameter); this.parameterHolder.add(parameter); return this; }
/** * Add parameter * * @param parameter * must not be null * @return */
Add parameter
addHighlightParameter
{ "repo_name": "learningtcc/dubbox", "path": "dubbo-solr/dubbo-solr-server/src/main/java/com/frank/search/solr/core/query/HighlightOptions.java", "license": "apache-2.0", "size": 9395 }
[ "org.springframework.util.Assert" ]
import org.springframework.util.Assert;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
2,814,017
@ApiModelProperty(value = "The date/time this resource was created in seconds since unix epoch") public Long getCreatedDate() { return createdDate; }
@ApiModelProperty(value = STR) Long function() { return createdDate; }
/** * The date/time this resource was created in seconds since unix epoch * @return createdDate **/
The date/time this resource was created in seconds since unix epoch
getCreatedDate
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/main/java/com/knetikcloud/model/ChallengeResource.java", "license": "apache-2.0", "size": 14967 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,682,342
public static void startShareIntentChooser(Activity activity, String message, @StringRes int titleResId) { IntentBuilder ib = ShareCompat.IntentBuilder.from(activity); ib.setText(message); ib.setChooserTitle(titleResId); ib.setType("text/plain"); try { ...
static void function(Activity activity, String message, @StringRes int titleResId) { IntentBuilder ib = ShareCompat.IntentBuilder.from(activity); ib.setText(message); ib.setChooserTitle(titleResId); ib.setType(STR); try { ib.startChooser(); } catch (ActivityNotFoundException e) { Toast.makeText(activity, R.string.app_n...
/** * Share a text snippet. Displays a share intent chooser with the given title, share type is * text/plain. */
Share a text snippet. Displays a share intent chooser with the given title, share type is text/plain
startShareIntentChooser
{ "repo_name": "UweTrottmann/SeriesGuide", "path": "app/src/main/java/com/battlelancer/seriesguide/util/ShareUtils.java", "license": "apache-2.0", "size": 3439 }
[ "android.app.Activity", "android.content.ActivityNotFoundException", "android.widget.Toast", "androidx.annotation.StringRes", "androidx.core.app.ShareCompat" ]
import android.app.Activity; import android.content.ActivityNotFoundException; import android.widget.Toast; import androidx.annotation.StringRes; import androidx.core.app.ShareCompat;
import android.app.*; import android.content.*; import android.widget.*; import androidx.annotation.*; import androidx.core.app.*;
[ "android.app", "android.content", "android.widget", "androidx.annotation", "androidx.core" ]
android.app; android.content; android.widget; androidx.annotation; androidx.core;
2,512,076
public static BigDecimal getAppointmentRequestedStandardHoursTotal(List<PendingBudgetConstructionAppointmentFunding> AppointmentFundings) { return getStandarHours(getAppointmentRequestedTimePercentTotal(AppointmentFundings)); }
static BigDecimal function(List<PendingBudgetConstructionAppointmentFunding> AppointmentFundings) { return getStandarHours(getAppointmentRequestedTimePercentTotal(AppointmentFundings)); }
/** * calcaulte the total requested standard hours for the given appointment funding lines * * @param AppointmentFundings the given appointment funding lines * @return the total requested standard hours for the given appointment funding lines */
calcaulte the total requested standard hours for the given appointment funding lines
getAppointmentRequestedStandardHoursTotal
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/bc/util/SalarySettingCalculator.java", "license": "apache-2.0", "size": 14317 }
[ "java.math.BigDecimal", "java.util.List", "org.kuali.kfs.module.bc.businessobject.PendingBudgetConstructionAppointmentFunding" ]
import java.math.BigDecimal; import java.util.List; import org.kuali.kfs.module.bc.businessobject.PendingBudgetConstructionAppointmentFunding;
import java.math.*; import java.util.*; import org.kuali.kfs.module.bc.businessobject.*;
[ "java.math", "java.util", "org.kuali.kfs" ]
java.math; java.util; org.kuali.kfs;
232,835
public void setDefaultFailureUrl(String defaultFailureUrl) { Assert.isTrue(UrlUtils.isValidRedirectUrl(defaultFailureUrl), "'" + defaultFailureUrl + "' is not a valid redirect URL"); this.defaultFailureUrl = defaultFailureUrl; }
void function(String defaultFailureUrl) { Assert.isTrue(UrlUtils.isValidRedirectUrl(defaultFailureUrl), "'" + defaultFailureUrl + STR); this.defaultFailureUrl = defaultFailureUrl; }
/** * The URL which will be used as the failure destination. * * @param defaultFailureUrl the failure URL, for example "/loginFailed.jsp". */
The URL which will be used as the failure destination
setDefaultFailureUrl
{ "repo_name": "drdamour/spring-security", "path": "web/src/main/java/org/springframework/security/web/authentication/SimpleUrlAuthenticationFailureHandler.java", "license": "apache-2.0", "size": 5263 }
[ "org.springframework.security.web.util.UrlUtils", "org.springframework.util.Assert" ]
import org.springframework.security.web.util.UrlUtils; import org.springframework.util.Assert;
import org.springframework.security.web.util.*; import org.springframework.util.*;
[ "org.springframework.security", "org.springframework.util" ]
org.springframework.security; org.springframework.util;
1,118,779
List<Noticia> findNoticiasByUsuario(Usuario usuario);
List<Noticia> findNoticiasByUsuario(Usuario usuario);
/** * Metodo que consulta las noticias creadas por un usuario * * @author <a href="elmerdiazlazo@gmail.com">Elmer Jose Diaz Lazo</a> * @date 24/11/2013 * @param usuario * @return */
Metodo que consulta las noticias creadas por un usuario
findNoticiasByUsuario
{ "repo_name": "kaisenlean/troca.co", "path": "src/main/java/co/icesi/troca/services/noticia/NoticiaService.java", "license": "gpl-2.0", "size": 1169 }
[ "co.icesi.troca.model.noticia.Noticia", "co.icesi.troca.model.usuario.Usuario", "java.util.List" ]
import co.icesi.troca.model.noticia.Noticia; import co.icesi.troca.model.usuario.Usuario; import java.util.List;
import co.icesi.troca.model.noticia.*; import co.icesi.troca.model.usuario.*; import java.util.*;
[ "co.icesi.troca", "java.util" ]
co.icesi.troca; java.util;
210,617
private static String varReplace(String originalVarStr, HttpServletRequest hsRequest) { // get the sub name if any ie for headers etc header:user-agent String varSubName = null; String varType; int colonIdx = originalVarStr.indexOf(":"); if (colonIdx != -1 && colonIdx + ...
static String function(String originalVarStr, HttpServletRequest hsRequest) { String varSubName = null; String varType; int colonIdx = originalVarStr.indexOf(":"); if (colonIdx != -1 && colonIdx + 1 < originalVarStr.length()) { varSubName = originalVarStr.substring(colonIdx + 1); varType = originalVarStr.substring(0, c...
/** * Handles the fetching of the variable value from the request. */
Handles the fetching of the variable value from the request
varReplace
{ "repo_name": "jamiewildehk/urlrewritefilter", "path": "src/main/java/org/tuckey/web/filters/urlrewrite/substitution/VariableReplacer.java", "license": "bsd-3-clause", "size": 13971 }
[ "java.util.Calendar", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpSession", "org.tuckey.web.filters.urlrewrite.TypeConverter", "org.tuckey.web.filters.urlrewrite.utils.StringUtils" ]
import java.util.Calendar; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.tuckey.web.filters.urlrewrite.TypeConverter; import org.tuckey.web.filters.urlrewrite.utils.StringUtils;
import java.util.*; import javax.servlet.http.*; import org.tuckey.web.filters.urlrewrite.*; import org.tuckey.web.filters.urlrewrite.utils.*;
[ "java.util", "javax.servlet", "org.tuckey.web" ]
java.util; javax.servlet; org.tuckey.web;
909,769
private Space fillSpaceSimpleFromEntity(SpaceEntity entity, Space space) { space.setApp(StringUtils.join(entity.getApp(), ",")); space.setId(String.valueOf(entity.getId())); space.setDisplayName(entity.getDisplayName()); space.setPrettyName(entity.getPrettyName()); if (entity.getRegistration() != ...
Space function(SpaceEntity entity, Space space) { space.setApp(StringUtils.join(entity.getApp(), ",")); space.setId(String.valueOf(entity.getId())); space.setDisplayName(entity.getDisplayName()); space.setPrettyName(entity.getPrettyName()); if (entity.getRegistration() != null) { space.setRegistration(entity.getRegistr...
/** * Fills {@link Space}'s properties to {@link SpaceEntity}'s. * * @param entity the space entity from chromattic * @param space the space pojo for services */
Fills <code>Space</code>'s properties to <code>SpaceEntity</code>'s
fillSpaceSimpleFromEntity
{ "repo_name": "exo-addons/social-rdbms", "path": "lib/src/main/java/org/exoplatform/social/addons/storage/RDBMSSpaceStorageImpl.java", "license": "lgpl-3.0", "size": 22981 }
[ "org.apache.commons.lang.StringUtils", "org.exoplatform.social.addons.rest.IdentityAvatarRestService", "org.exoplatform.social.addons.storage.entity.SpaceEntity", "org.exoplatform.social.core.identity.provider.SpaceIdentityProvider", "org.exoplatform.social.core.space.impl.DefaultSpaceApplicationHandler", ...
import org.apache.commons.lang.StringUtils; import org.exoplatform.social.addons.rest.IdentityAvatarRestService; import org.exoplatform.social.addons.storage.entity.SpaceEntity; import org.exoplatform.social.core.identity.provider.SpaceIdentityProvider; import org.exoplatform.social.core.space.impl.DefaultSpaceApplicat...
import org.apache.commons.lang.*; import org.exoplatform.social.addons.rest.*; import org.exoplatform.social.addons.storage.entity.*; import org.exoplatform.social.core.identity.provider.*; import org.exoplatform.social.core.space.impl.*; import org.exoplatform.social.core.space.model.*;
[ "org.apache.commons", "org.exoplatform.social" ]
org.apache.commons; org.exoplatform.social;
118,931
public YangString getRefEntityTagValue() throws JNCException { return (YangString)getValue("ref-entity-tag"); }
YangString function() throws JNCException { return (YangString)getValue(STR); }
/** * Gets the value for child leaf "ref-entity-tag". * @return The value of the leaf. */
Gets the value for child leaf "ref-entity-tag"
getRefEntityTagValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/statistics/gprsSm/PriActGgsnFail.java", "license": "apache-2.0", "size": 11425 }
[ "com.tailf.jnc.YangString" ]
import com.tailf.jnc.YangString;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
58,375
protected void setStudyLastModifiedByCurrentUser(TimeStampable timeStampedStudyObject, String systemLogEntry) { getStudyManagementService().setStudyLastModifiedByCurrentUser(getStudyConfiguration(), getWorkspace(), timeStampedStudyObject, systemLogEntry); } /** * {@inheritDoc}
void function(TimeStampable timeStampedStudyObject, String systemLogEntry) { getStudyManagementService().setStudyLastModifiedByCurrentUser(getStudyConfiguration(), getWorkspace(), timeStampedStudyObject, systemLogEntry); } /** * {@inheritDoc}
/** * Sets the lastModifiedBy attribute of a StudyConfiguration to the current user's workspace. The * timeStampedStudyObject is the specific object that is being changed, if null then it will only * set the timestamp on the current study configuration. Otherwise it updates the timestamp of both *...
Sets the lastModifiedBy attribute of a StudyConfiguration to the current user's workspace. The timeStampedStudyObject is the specific object that is being changed, if null then it will only set the timestamp on the current study configuration. Otherwise it updates the timestamp of both objects
setStudyLastModifiedByCurrentUser
{ "repo_name": "NCIP/caintegrator", "path": "caintegrator-war/src/gov/nih/nci/caintegrator/web/action/study/management/AbstractStudyAction.java", "license": "bsd-3-clause", "size": 4407 }
[ "gov.nih.nci.caintegrator.domain.application.TimeStampable" ]
import gov.nih.nci.caintegrator.domain.application.TimeStampable;
import gov.nih.nci.caintegrator.domain.application.*;
[ "gov.nih.nci" ]
gov.nih.nci;
1,581,613
public static <TItem> Bson in(final String fieldName, final Iterable<TItem> values) { return new SimpleEncodingFilter<Bson>(fieldName , new IterableOperatorFilter<TItem>("$in", values)); }
static <TItem> Bson function(final String fieldName, final Iterable<TItem> values) { return new SimpleEncodingFilter<Bson>(fieldName , new IterableOperatorFilter<TItem>("$in", values)); }
/** * Creates a filter that matches all documents where the value of a field equals any value in the list of specified values. * * @param fieldName the field name * @param values the list of values * @param <TItem> the value type * @return the filter * @mongodb.driver.manual refe...
Creates a filter that matches all documents where the value of a field equals any value in the list of specified values
in
{ "repo_name": "kay-kim/mongo-java-driver", "path": "driver-core/src/main/com/mongodb/client/model/Filters.java", "license": "apache-2.0", "size": 42464 }
[ "org.bson.conversions.Bson" ]
import org.bson.conversions.Bson;
import org.bson.conversions.*;
[ "org.bson.conversions" ]
org.bson.conversions;
1,849,933
@Bean public TilesConfigurer tilesConfigurer() { TilesConfigurer configurer = new TilesConfigurer(); configurer.setDefinitions(new String[] { "/WEB-INF/layouts/tiles.xml", "/WEB-INF/views/**/tiles.xml" }); configurer.setCheckRefresh(true); return configurer; }
TilesConfigurer function() { TilesConfigurer configurer = new TilesConfigurer(); configurer.setDefinitions(new String[] { STR, STR }); configurer.setCheckRefresh(true); return configurer; }
/** * Configures Tiles at application startup. */
Configures Tiles at application startup
tilesConfigurer
{ "repo_name": "azhagiripanneerselvam/jenkins-demo", "path": "target/greenhouse-1.0.0.BUILD-SNAPSHOT/WEB-INF/classes/com/springsource/greenhouse/config/WebConfig.java", "license": "apache-2.0", "size": 8373 }
[ "org.springframework.web.servlet.view.tiles2.TilesConfigurer" ]
import org.springframework.web.servlet.view.tiles2.TilesConfigurer;
import org.springframework.web.servlet.view.tiles2.*;
[ "org.springframework.web" ]
org.springframework.web;
2,886,823
private Sequence retrieveAttribute( XQueryContext context, String key ) { Sequence attribute = Sequence.EMPTY_SEQUENCE; synchronized( context ) { // get the existing attributes map from the context HashMap<String, Sequence> attributes = (HashMap<String, Sequence>)context.getXQueryContextVar( ATTRI...
Sequence function( XQueryContext context, String key ) { Sequence attribute = Sequence.EMPTY_SEQUENCE; synchronized( context ) { HashMap<String, Sequence> attributes = (HashMap<String, Sequence>)context.getXQueryContextVar( ATTRIBUTES_CONTEXTVAR ); if( attributes != null ) { Sequence value = attributes.get( key ); if( ...
/** * Retrieves a previously stored Attribute from the Context of an XQuery * * @param context The Context of the XQuery containing the attribute * @param key The key of the attribute to retrieve from the Context of the XQuery */
Retrieves a previously stored Attribute from the Context of an XQuery
retrieveAttribute
{ "repo_name": "shabanovd/exist", "path": "extensions/modules/src/org/exist/xquery/modules/context/ContextAttributes.java", "license": "lgpl-2.1", "size": 10040 }
[ "java.util.HashMap", "org.exist.xquery.XQueryContext", "org.exist.xquery.value.Sequence" ]
import java.util.HashMap; import org.exist.xquery.XQueryContext; import org.exist.xquery.value.Sequence;
import java.util.*; import org.exist.xquery.*; import org.exist.xquery.value.*;
[ "java.util", "org.exist.xquery" ]
java.util; org.exist.xquery;
2,740,631
public LinearRange getRange() { return range; }
LinearRange function() { return range; }
/** * Return the range of the query. * * @return the range */
Return the range of the query
getRange
{ "repo_name": "sleshchenko/che", "path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/annotation/QueryAnnotationsEvent.java", "license": "epl-1.0", "size": 4406 }
[ "org.eclipse.che.ide.api.editor.text.LinearRange" ]
import org.eclipse.che.ide.api.editor.text.LinearRange;
import org.eclipse.che.ide.api.editor.text.*;
[ "org.eclipse.che" ]
org.eclipse.che;
2,659,655
protected DateFieldMapper.DateFieldType dateField(String name, DateFieldMapper.Resolution resolution) { return new DateFieldMapper.DateFieldType(name, resolution); }
DateFieldMapper.DateFieldType function(String name, DateFieldMapper.Resolution resolution) { return new DateFieldMapper.DateFieldType(name, resolution); }
/** * Make a {@linkplain DateFieldMapper.DateFieldType} for a {@code date}. */
Make a DateFieldMapper.DateFieldType for a date
dateField
{ "repo_name": "jmluy/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java", "license": "apache-2.0", "size": 62014 }
[ "org.elasticsearch.index.mapper.DateFieldMapper" ]
import org.elasticsearch.index.mapper.DateFieldMapper;
import org.elasticsearch.index.mapper.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
36,326
public HttpServletRequest getRequest() { return this.request; }
HttpServletRequest function() { return this.request; }
/** * Returns the HTTP Servlet request. * * @return The HTTP Servlet request. */
Returns the HTTP Servlet request
getRequest
{ "repo_name": "OpenNTF/WorkflowForXPages", "path": "source/com.ibm.activiti/src/org/restlet/ext/servlet/internal/ServletCall.java", "license": "apache-2.0", "size": 13675 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,291,649
public BaseDao setCacheFactory(ICacheFactory cacheFactory) { this.cacheFactory = cacheFactory; return this; }
BaseDao function(ICacheFactory cacheFactory) { this.cacheFactory = cacheFactory; return this; }
/** * Cache factory used to cache DAO data. * * @param cacheFactory * @return */
Cache factory used to cache DAO data
setCacheFactory
{ "repo_name": "DDTH/ddth-dao", "path": "ddth-dao-core/src/main/java/com/github/ddth/dao/BaseDao.java", "license": "mit", "size": 6275 }
[ "com.github.ddth.cacheadapter.ICacheFactory" ]
import com.github.ddth.cacheadapter.ICacheFactory;
import com.github.ddth.cacheadapter.*;
[ "com.github.ddth" ]
com.github.ddth;
242,925
public Errors getErrors() { return getDataBinder().getBindingResult(); }
Errors function() { return getDataBinder().getBindingResult(); }
/** * Convenience method to get the BindingResult (errors) from the current DataBinder. * * @return Errors object */
Convenience method to get the BindingResult (errors) from the current DataBinder
getErrors
{ "repo_name": "OpenAMEE/amee.platform.api", "path": "amee-platform-base/src/main/java/com/amee/base/validation/BaseValidator.java", "license": "mit", "size": 9554 }
[ "org.springframework.validation.Errors" ]
import org.springframework.validation.Errors;
import org.springframework.validation.*;
[ "org.springframework.validation" ]
org.springframework.validation;
728,924
protected File getDir() { return hasSubdirs ? DatanodeUtil.idToBlockDir(baseDir, getBlockId()) : baseDir; }
File function() { return hasSubdirs ? DatanodeUtil.idToBlockDir(baseDir, getBlockId()) : baseDir; }
/** * Return the parent directory path where this replica is located. * @return the parent directory path where this replica is located */
Return the parent directory path where this replica is located
getDir
{ "repo_name": "WIgor/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/LocalReplica.java", "license": "apache-2.0", "size": 16703 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,031,789