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
CashEventStatistics cashEventStatistics();
CashEventStatistics cashEventStatistics();
/** * Retrieves the recorded cash event statistics. * * @return cash events recorded to date. */
Retrieves the recorded cash event statistics
cashEventStatistics
{ "repo_name": "CjHare/systematic-trading", "path": "systematic-trading-simulation-model/src/main/java/com/systematic/trading/simulation/analysis/statistics/EventStatistics.java", "license": "mit", "size": 3159 }
[ "com.systematic.trading.simulation.analysis.statistics.event.CashEventStatistics" ]
import com.systematic.trading.simulation.analysis.statistics.event.CashEventStatistics;
import com.systematic.trading.simulation.analysis.statistics.event.*;
[ "com.systematic.trading" ]
com.systematic.trading;
1,585,085
public OAUTH_TOKENTYPE getAccessTokenType() { if(mRep == null) { return null; } try { if (mRep.hasAttribute(ESConstants.OC_RSRVD_ES_ACCESSTOKEN_TYPE)) return OAUTH_TOKENTYPE.fromInt((int)mRep.getValue(ESConstants.OC_RSRVD_ES_ACCESS...
OAUTH_TOKENTYPE function() { if(mRep == null) { return null; } try { if (mRep.hasAttribute(ESConstants.OC_RSRVD_ES_ACCESSTOKEN_TYPE)) return OAUTH_TOKENTYPE.fromInt((int)mRep.getValue(ESConstants.OC_RSRVD_ES_ACCESSTOKEN_TYPE)); } catch (OcException e) { Log.e(TAG, STR); } return OAUTH_TOKENTYPE.NONE_OAUTH_TOKENTYPE; }
/** * This method returns an access token type * @return tokenType of access token */
This method returns an access token type
getAccessTokenType
{ "repo_name": "lssgood/TizenRT", "path": "external/iotivity/iotivity_1.2-rel/service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/CloudProp.java", "license": "apache-2.0", "size": 6452 }
[ "android.util.Log", "org.iotivity.base.OcException" ]
import android.util.Log; import org.iotivity.base.OcException;
import android.util.*; import org.iotivity.base.*;
[ "android.util", "org.iotivity.base" ]
android.util; org.iotivity.base;
2,745,499
public String toQueryString() { StringBuffer result = new StringBuffer(128); result.append("?action=search"); if (getParsedQuery() != null) { result.append("&parsedQuery="); result.append(CmsEncoder.encodeParameter(getParsedQuery())); } else { res...
String function() { StringBuffer result = new StringBuffer(128); result.append(STR); if (getParsedQuery() != null) { result.append(STR); result.append(CmsEncoder.encodeParameter(getParsedQuery())); } else { result.append(STR); result.append(CmsEncoder.encodeParameter(getQuery())); } result.append(STR); result.append(ge...
/** * Creates a query String build from this search parameters for HTML links.<p> * * @return a query String build from this search parameters for HTML links */
Creates a query String build from this search parameters for HTML links
toQueryString
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/search/CmsSearchParameters.java", "license": "lgpl-2.1", "size": 41924 }
[ "java.util.Iterator", "org.apache.lucene.search.Sort", "org.opencms.i18n.CmsEncoder" ]
import java.util.Iterator; import org.apache.lucene.search.Sort; import org.opencms.i18n.CmsEncoder;
import java.util.*; import org.apache.lucene.search.*; import org.opencms.i18n.*;
[ "java.util", "org.apache.lucene", "org.opencms.i18n" ]
java.util; org.apache.lucene; org.opencms.i18n;
1,227,242
public void updateScannedFlag(String filePath) { String selection = SONG_FILE_PATH + "=" + "'" + filePath.replace("'", "''") + "'"; ContentValues values = new ContentValues(); values.put(SONG_SCANNED, "TRUE"); getDatabase().update(MUSIC_LIBRARY_TABLE, values, select...
void function(String filePath) { String selection = SONG_FILE_PATH + "=" + "'" + filePath.replace("'", "''") + "'"; ContentValues values = new ContentValues(); values.put(SONG_SCANNED, "TRUE"); getDatabase().update(MUSIC_LIBRARY_TABLE, values, selection, null); }
/** * Updates a song's "scanned" flag during the scanning process. */
Updates a song's "scanned" flag during the scanning process
updateScannedFlag
{ "repo_name": "yongjiliu/MusicPlayer", "path": "ACEMusicPlayer/src/main/java/com/aniruddhc/acemusic/player/DBHelpers/DBAccessHelper.java", "license": "gpl-2.0", "size": 72380 }
[ "android.content.ContentValues" ]
import android.content.ContentValues;
import android.content.*;
[ "android.content" ]
android.content;
1,180,997
public void allOffersToString() { Set<String> demandSet = demand.keySet(); if (demandSet.size() == 0) { System.out.println("\nNo Demand"); } else { System.out.println("\nDemand:"); for (String date : demandSet) { System.out.println(date); ArrayList<Offer> offersAtDate = demand.get(date); f...
void function() { Set<String> demandSet = demand.keySet(); if (demandSet.size() == 0) { System.out.println(STR); } else { System.out.println(STR); for (String date : demandSet) { System.out.println(date); ArrayList<Offer> offersAtDate = demand.get(date); for (Offer offer : offersAtDate) { double[] values = offer.getAgg...
/** * Gibt alle aktuell auf dem Marktplatz vorhandenen Angebote sortiert nach * Demand und Supply auf der Console aus. */
Gibt alle aktuell auf dem Marktplatz vorhandenen Angebote sortiert nach Demand und Supply auf der Console aus
allOffersToString
{ "repo_name": "rubytobi/fim-ba", "path": "src/main/java/Entity/Marketplace.java", "license": "gpl-2.0", "size": 62801 }
[ "java.util.ArrayList", "java.util.Set" ]
import java.util.ArrayList; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,968,280
public static <RTN> RTN run(ScripName name, File src, ScripUtilsAdapter adapter) throws IOException, ScriptException, NoSuchMethodException { return run(name, FileUtils.readFile(src, "UTF-8"), adapter); }
static <RTN> RTN function(ScripName name, File src, ScripUtilsAdapter adapter) throws IOException, ScriptException, NoSuchMethodException { return run(name, FileUtils.readFile(src, "UTF-8"), adapter); }
/** * Run rtn. * * @param <RTN> the type parameter * @param name the name * @param src the src * @param adapter the adapter * @return the rtn * @throws IOException the io exception * @throws ScriptException the script exception * @throws NoSuchM...
Run rtn
run
{ "repo_name": "forsrc/MyStudy", "path": "src/main/java/com/forsrc/utils/ScripUtils.java", "license": "apache-2.0", "size": 5325 }
[ "java.io.File", "java.io.IOException", "javax.script.ScriptException", "org.stathissideris.ascii2image.core.FileUtils" ]
import java.io.File; import java.io.IOException; import javax.script.ScriptException; import org.stathissideris.ascii2image.core.FileUtils;
import java.io.*; import javax.script.*; import org.stathissideris.ascii2image.core.*;
[ "java.io", "javax.script", "org.stathissideris.ascii2image" ]
java.io; javax.script; org.stathissideris.ascii2image;
1,512,166
if (Platform.isRunning()) { // find default load option providers IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry(); IConfigurationElement configurationElements[] = extensionRegistry.getConfigurationElementsFor(eu.hyvar.context.contextValidity.resource.hyvalidityformula.mopp.Hyvalidityfo...
if (Platform.isRunning()) { IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry(); IConfigurationElement configurationElements[] = extensionRegistry.getConfigurationElementsFor(eu.hyvar.context.contextValidity.resource.hyvalidityformula.mopp.HyvalidityformulaPlugin.EP_DEFAULT_LOAD_OPTIONS_ID); for (ICo...
/** * Adds all registered load option provider extension to the given map. Load * option providers can be used to set default options for loading resources (e.g. * input stream pre-processors). */
Adds all registered load option provider extension to the given map. Load option providers can be used to set default options for loading resources (e.g. input stream pre-processors)
getDefaultLoadOptionProviderExtensions
{ "repo_name": "HyVar/DarwinSPL", "path": "plugins/eu.hyvar.context.contextValidity.resource.hyvalidityformula/src-gen/eu/hyvar/context/contextValidity/resource/hyvalidityformula/util/HyvalidityformulaEclipseProxy.java", "license": "apache-2.0", "size": 11747 }
[ "java.util.Collection", "java.util.Map", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.IConfigurationElement", "org.eclipse.core.runtime.IExtensionRegistry", "org.eclipse.core.runtime.Platform" ]
import java.util.Collection; import java.util.Map; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.Platform;
import java.util.*; import org.eclipse.core.runtime.*;
[ "java.util", "org.eclipse.core" ]
java.util; org.eclipse.core;
1,572,694
if (records == null) { records = new ArrayList<Record>(); } super.addRecord(r); records.add(r); }
if (records == null) { records = new ArrayList<Record>(); } super.addRecord(r); records.add(r); }
/** * Adds a Record to the Zone. * @param r The record to be added * @see Record */
Adds a Record to the Zone
addRecord
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/SecureableZone.java", "license": "apache-2.0", "size": 4618 }
[ "java.util.ArrayList", "org.xbill.DNS" ]
import java.util.ArrayList; import org.xbill.DNS;
import java.util.*; import org.xbill.*;
[ "java.util", "org.xbill" ]
java.util; org.xbill;
640,230
public SyncSourceErrorDescriptor getSyncSourceError() { return syncSourceError; } private String sourceUri = null;
SyncSourceErrorDescriptor function() { return syncSourceError; } private String sourceUri = null;
/** * Returns property syncSourceError */
Returns property syncSourceError
getSyncSourceError
{ "repo_name": "accesstest3/cfunambol", "path": "admin-suite/admin/src/com/funambol/admin/module/nodes/SyncSourceExceptionNode.java", "license": "agpl-3.0", "size": 9173 }
[ "com.funambol.framework.engine.source.SyncSourceErrorDescriptor" ]
import com.funambol.framework.engine.source.SyncSourceErrorDescriptor;
import com.funambol.framework.engine.source.*;
[ "com.funambol.framework" ]
com.funambol.framework;
2,321,524
public static GroupElementHandle getGroupElementHandle( List modelList ) { ModuleHandle handle = SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ); if ( handle == null ) { return GroupElementFactory.newGroupElement( handle, Collections.EMPTY_LIST ); } return GroupElementFactory.ne...
static GroupElementHandle function( List modelList ) { ModuleHandle handle = SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ); if ( handle == null ) { return GroupElementFactory.newGroupElement( handle, Collections.EMPTY_LIST ); } return GroupElementFactory.newGroupElement( handle, modelList ); }
/** * Generates GroupElementHandle for given model list. * * @param modelList * @return */
Generates GroupElementHandle for given model list
getGroupElementHandle
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DEUtil.java", "license": "epl-1.0", "size": 91152 }
[ "java.util.Collections", "java.util.List", "org.eclipse.birt.report.designer.core.model.SessionHandleAdapter", "org.eclipse.birt.report.model.api.GroupElementFactory", "org.eclipse.birt.report.model.api.GroupElementHandle", "org.eclipse.birt.report.model.api.ModuleHandle" ]
import java.util.Collections; import java.util.List; import org.eclipse.birt.report.designer.core.model.SessionHandleAdapter; import org.eclipse.birt.report.model.api.GroupElementFactory; import org.eclipse.birt.report.model.api.GroupElementHandle; import org.eclipse.birt.report.model.api.ModuleHandle;
import java.util.*; import org.eclipse.birt.report.designer.core.model.*; import org.eclipse.birt.report.model.api.*;
[ "java.util", "org.eclipse.birt" ]
java.util; org.eclipse.birt;
1,870,420
public static HttpServer2.Builder httpServerTemplateForRM(Configuration conf, final InetSocketAddress httpAddr, final InetSocketAddress httpsAddr, String name) throws IOException { HttpServer2.Builder builder = new HttpServer2.Builder().setName(name) .setConf(conf).setSecurityEnabled(false); ...
static HttpServer2.Builder function(Configuration conf, final InetSocketAddress httpAddr, final InetSocketAddress httpsAddr, String name) throws IOException { HttpServer2.Builder builder = new HttpServer2.Builder().setName(name) .setConf(conf).setSecurityEnabled(false); if (httpAddr.getPort() == 0) { builder.setFindPor...
/** * Return a HttpServer.Builder that the journalnode / namenode / secondary * namenode can use to initialize their HTTP / HTTPS server. * * @param conf configuration object * @param httpAddr HTTP address * @param httpsAddr HTTPS address * @param name Name of the server * @throws IOException f...
Return a HttpServer.Builder that the journalnode / namenode / secondary namenode can use to initialize their HTTP / HTTPS server
httpServerTemplateForRM
{ "repo_name": "dierobotsdie/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java", "license": "apache-2.0", "size": 60370 }
[ "java.io.IOException", "java.net.InetSocketAddress", "java.net.URI", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.http.HttpServer2", "org.apache.hadoop.yarn.webapp.WebApps" ]
import java.io.IOException; import java.net.InetSocketAddress; import java.net.URI; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.http.HttpServer2; import org.apache.hadoop.yarn.webapp.WebApps;
import java.io.*; import java.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.http.*; import org.apache.hadoop.yarn.webapp.*;
[ "java.io", "java.net", "org.apache.hadoop" ]
java.io; java.net; org.apache.hadoop;
1,557,916
@SuppressWarnings("unchecked") public Iterator<Channel> iteratorByName() { return (Iterator<Channel>)channelsName.values().iterator(); }
@SuppressWarnings(STR) Iterator<Channel> function() { return (Iterator<Channel>)channelsName.values().iterator(); }
/** * Fetches an iterator with all channels in the EPG, sorted by channel name. * @return An iterator with all channels in the EPG. */
Fetches an iterator with all channels in the EPG, sorted by channel name
iteratorByName
{ "repo_name": "Z-app/zmote", "path": "src/se/z_app/stb/EPG.java", "license": "bsd-2-clause", "size": 2664 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,352,439
public Query parse(final String query) throws ParseException { return parse(query, true); }
Query function(final String query) throws ParseException { return parse(query, true); }
/** * as {@link #parse(String, boolean)} by providing {@code true} to the initialisation flag. * * @param query * @return the parsed query * @throws ParseException */
as <code>#parse(String, boolean)</code> by providing true to the initialisation flag
parse
{ "repo_name": "joansmith/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/query/SQL2Parser.java", "license": "apache-2.0", "size": 51827 }
[ "java.text.ParseException" ]
import java.text.ParseException;
import java.text.*;
[ "java.text" ]
java.text;
282,575
EventRegistration notiFy(Template tmpl, int transitions, RemoteEventListener listener, MarshalledInstance handback, long leaseDuration) throws RemoteException;
EventRegistration notiFy(Template tmpl, int transitions, RemoteEventListener listener, MarshalledInstance handback, long leaseDuration) throws RemoteException;
/** * Registers for event notification. * @see net.jini.core.lookup.ServiceRegistrar#notify */
Registers for event notification
notiFy
{ "repo_name": "pfirmstone/JGDMS", "path": "JGDMS/services/reggie/reggie-dl/src/main/java/org/apache/river/reggie/proxy/Registrar.java", "license": "apache-2.0", "size": 9527 }
[ "java.rmi.RemoteException", "net.jini.core.event.EventRegistration", "net.jini.core.event.RemoteEventListener", "net.jini.io.MarshalledInstance" ]
import java.rmi.RemoteException; import net.jini.core.event.EventRegistration; import net.jini.core.event.RemoteEventListener; import net.jini.io.MarshalledInstance;
import java.rmi.*; import net.jini.core.event.*; import net.jini.io.*;
[ "java.rmi", "net.jini.core", "net.jini.io" ]
java.rmi; net.jini.core; net.jini.io;
698,544
public String executeRequest(String request, String sCmd) throws RWESmarthomeSessionExpiredException { return executeRequest(request, sCmd, false); }
String function(String request, String sCmd) throws RWESmarthomeSessionExpiredException { return executeRequest(request, sCmd, false); }
/** * Executes a request with the given command. * * @param request * @param sCmd * @return * @throws RWESmarthomeSessionExpiredException */
Executes a request with the given command
executeRequest
{ "repo_name": "watou/openhab", "path": "bundles/binding/org.openhab.binding.rwesmarthome/src/main/java/org/openhab/binding/rwesmarthome/internal/communicator/RWESmarthomeSession.java", "license": "epl-1.0", "size": 10779 }
[ "org.openhab.binding.rwesmarthome.internal.communicator.exceptions.RWESmarthomeSessionExpiredException" ]
import org.openhab.binding.rwesmarthome.internal.communicator.exceptions.RWESmarthomeSessionExpiredException;
import org.openhab.binding.rwesmarthome.internal.communicator.exceptions.*;
[ "org.openhab.binding" ]
org.openhab.binding;
389,936
public DataInputStream getKeyStream() { keyDataInputStream.reset(keyBuffer, klen); return keyDataInputStream; }
DataInputStream function() { keyDataInputStream.reset(keyBuffer, klen); return keyDataInputStream; }
/** * Streaming access to the key. Useful for desrializing the key into * user objects. * * @return The input stream. */
Streaming access to the key. Useful for desrializing the key into user objects
getKeyStream
{ "repo_name": "dotunolafunmiloye/hadoop-common", "path": "src/java/org/apache/hadoop/io/file/tfile/TFile.java", "license": "apache-2.0", "size": 79204 }
[ "java.io.DataInputStream" ]
import java.io.DataInputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,609,187
public void setWriteConcern(String writeConcern) { this.writeConcern = WriteConcern.valueOf(writeConcern); }
void function(String writeConcern) { this.writeConcern = WriteConcern.valueOf(writeConcern); }
/** * Set the {@link WriteConcern} for write operations on MongoDB using the standard ones. * Resolved from the fields of the WriteConcern class by calling the {@link WriteConcern#valueOf(String)} method. * * @param writeConcern the standard name of the WriteConcern * @see <a href="http://api....
Set the <code>WriteConcern</code> for write operations on MongoDB using the standard ones. Resolved from the fields of the WriteConcern class by calling the <code>WriteConcern#valueOf(String)</code> method
setWriteConcern
{ "repo_name": "w4tson/camel", "path": "components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java", "license": "apache-2.0", "size": 12525 }
[ "com.mongodb.WriteConcern" ]
import com.mongodb.WriteConcern;
import com.mongodb.*;
[ "com.mongodb" ]
com.mongodb;
325,674
public void setCommandMap(final HashMap<String, Command> commandMap) { this.commandMap = commandMap; }
void function(final HashMap<String, Command> commandMap) { this.commandMap = commandMap; }
/** * Set command map. * * @param commandMap command map. */
Set command map
setCommandMap
{ "repo_name": "denkarz/JavaChat", "path": "src/main/java/com/denkarz/jchat/clients/cli/controller/ConsoleUIController.java", "license": "gpl-2.0", "size": 9065 }
[ "com.denkarz.jchat.clients.core.commandPattern.Command", "java.util.HashMap" ]
import com.denkarz.jchat.clients.core.commandPattern.Command; import java.util.HashMap;
import com.denkarz.jchat.clients.core.*; import java.util.*;
[ "com.denkarz.jchat", "java.util" ]
com.denkarz.jchat; java.util;
1,084,382
private final boolean isResolvable(Object base) { return base instanceof ResourceBundle; }
final boolean function(Object base) { return base instanceof ResourceBundle; }
/** * Test whether the given base should be resolved by this ELResolver. * * @param base * The bean to analyze. * @param property * The name of the property to analyze. Will be coerced to a String. * @return base instanceof ResourceBundle */
Test whether the given base should be resolved by this ELResolver
isResolvable
{ "repo_name": "lsmall/flowable-engine", "path": "modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/ResourceBundleELResolver.java", "license": "apache-2.0", "size": 9229 }
[ "java.util.ResourceBundle" ]
import java.util.ResourceBundle;
import java.util.*;
[ "java.util" ]
java.util;
1,877,087
public void setOutputFile ( String filename ) throws FileNotFoundException { if ( printer != null ) throw new IllegalStateException("alread set an output stream!"); printer = new PrintStream ( new FileOutputStream ( filename, true ) ); printHeader(); printer.print(pending); pending = null; }
void function ( String filename ) throws FileNotFoundException { if ( printer != null ) throw new IllegalStateException(STR); printer = new PrintStream ( new FileOutputStream ( filename, true ) ); printHeader(); printer.print(pending); pending = null; }
/** * If no logfile or outputstream was given at constructor phase, every log message will be logged * to a stringbuffer. This method may be used to specify a log file afterwards. * * All buffered log entries will be written directly to this file. * * @param filename * @throws FileNotFoundException ...
If no logfile or outputstream was given at constructor phase, every log message will be logged to a stringbuffer. This method may be used to specify a log file afterwards. All buffered log entries will be written directly to this file
setOutputFile
{ "repo_name": "AlexRuppert/las2peer_project", "path": "java/i5/las2peer/logging/NodeStreamLogger.java", "license": "mit", "size": 4784 }
[ "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.PrintStream" ]
import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
1,424,400
@SuppressWarnings("unchecked") @Test public void testCommandCanReportOnContainers() throws Exception { // setup context context.put(ReportOnContainersCommand.EXECUTIONRESULT_KEY, executionResult); context.put(ReportOnContainersCommand.SESSION_KEY, session); // execute command reportOnContainersC...
@SuppressWarnings(STR) void function() throws Exception { context.put(ReportOnContainersCommand.EXECUTIONRESULT_KEY, executionResult); context.put(ReportOnContainersCommand.SESSION_KEY, session); reportOnContainersCommand.execute(context); assertTrue(executionResult.isSuccess()); }
/** * Test that command can report on containers. */
Test that command can report on containers
testCommandCanReportOnContainers
{ "repo_name": "athrane/pineapple", "path": "support/pineapple-docker-support/src/test/java/com/alpha/pineapple/docker/command/ReportOnContainersCommandSystemTest.java", "license": "gpl-3.0", "size": 3587 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,633,738
@Test public void testRandomDeletions() throws Throwable { createTable("CREATE TABLE %s (k int PRIMARY KEY, v int,)"); int nb_keys = 30; int nb_deletes = 5; List<Integer> deletions = new ArrayList<>(nb_keys); for (int i = 0; i < nb_keys; i++) { e...
void function() throws Throwable { createTable(STR); int nb_keys = 30; int nb_deletes = 5; List<Integer> deletions = new ArrayList<>(nb_keys); for (int i = 0; i < nb_keys; i++) { execute(STR, i, i); deletions.add(i); } Collections.shuffle(deletions); for (int i = 0; i < nb_deletes; i++) execute(STR, deletions.get(i)); ...
/** * Migrated from cql_tests.py:TestCQL.range_with_deletes_test() */
Migrated from cql_tests.py:TestCQL.range_with_deletes_test()
testRandomDeletions
{ "repo_name": "carlyeks/cassandra", "path": "test/unit/org/apache/cassandra/cql3/validation/operations/DeleteTest.java", "license": "apache-2.0", "size": 56669 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,705,446
public Node asNode(final Resource r) { return r.asNode(); }
Node function(final Resource r) { return r.asNode(); }
/** * Convert an RDF resource to an RDF node * * @param r * @return */
Convert an RDF resource to an RDF node
asNode
{ "repo_name": "barmintor/fcrepo4", "path": "fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/responses/ViewHelpers.java", "license": "apache-2.0", "size": 9113 }
[ "com.hp.hpl.jena.graph.Node", "com.hp.hpl.jena.rdf.model.Resource" ]
import com.hp.hpl.jena.graph.Node; import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.graph.*; import com.hp.hpl.jena.rdf.model.*;
[ "com.hp.hpl" ]
com.hp.hpl;
2,451,603
private String detectResponseDataEncoding() { String regex; if (contentType == null) { Log.w(TAG, "Could not detect charset, no content type specified.", Log.DEBUG_MODE); return null; } else if (contentType.contains("xml")) { regex = XML_DECLARATION_TAG_REGEX; } else if (contentType.contains("html...
String function() { String regex; if (contentType == null) { Log.w(TAG, STR, Log.DEBUG_MODE); return null; } else if (contentType.contains("xml")) { regex = XML_DECLARATION_TAG_REGEX; } else if (contentType.contains("html")) { regex = HTML_META_TAG_REGEX; } else { Log.w(TAG, STR + contentType, Log.DEBUG_MODE); return n...
/** * Attempts to scan the response data to determine the encoding of the text. * Looks for meta information usually found in HTML or XML documents. * * @return The name of the encoding if detected, otherwise null if no encoding could be determined. */
Attempts to scan the response data to determine the encoding of the text. Looks for meta information usually found in HTML or XML documents
detectResponseDataEncoding
{ "repo_name": "falkolab/titanium_mobile", "path": "android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java", "license": "apache-2.0", "size": 44592 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern", "org.appcelerator.kroll.common.Log" ]
import java.util.regex.Matcher; import java.util.regex.Pattern; import org.appcelerator.kroll.common.Log;
import java.util.regex.*; import org.appcelerator.kroll.common.*;
[ "java.util", "org.appcelerator.kroll" ]
java.util; org.appcelerator.kroll;
472,440
void setApplication(GrailsApplication application);
void setApplication(GrailsApplication application);
/** * Sets the GrailsApplication used be this plugin manager * @param application The GrailsApplication instance */
Sets the GrailsApplication used be this plugin manager
setApplication
{ "repo_name": "erdi/grails-core", "path": "grails-core/src/main/groovy/org/codehaus/groovy/grails/plugins/GrailsPluginManager.java", "license": "apache-2.0", "size": 10658 }
[ "org.codehaus.groovy.grails.commons.GrailsApplication" ]
import org.codehaus.groovy.grails.commons.GrailsApplication;
import org.codehaus.groovy.grails.commons.*;
[ "org.codehaus.groovy" ]
org.codehaus.groovy;
2,226,416
public static long readLong(ByteBuffer in, final int fitInBytes) { long tmpLength = 0; for (int i = 0; i < fitInBytes; ++i) { tmpLength |= (in.get() & 0xffl) << (8l * i); } return tmpLength; }
static long function(ByteBuffer in, final int fitInBytes) { long tmpLength = 0; for (int i = 0; i < fitInBytes; ++i) { tmpLength = (in.get() & 0xffl) << (8l * i); } return tmpLength; }
/** * Read long which was written to fitInBytes bytes and increment position. * @param fitInBytes In how many bytes given long is stored. * @return The value of parsed long. */
Read long which was written to fitInBytes bytes and increment position
readLong
{ "repo_name": "tobegit3hub/hbase", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java", "license": "apache-2.0", "size": 13483 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,355,991
public static PublicKey generatePublicKey(String encodedPublicKey) { try { byte[] decodedKey = Base64.decode(encodedPublicKey, Base64.DEFAULT); KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(d...
static PublicKey function(String encodedPublicKey) { try { byte[] decodedKey = Base64.decode(encodedPublicKey, Base64.DEFAULT); KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); } catch (NoSuchAlgorithmException e) { throw new Ru...
/** * Generates a PublicKey instance from a string containing the * Base64-encoded public key. * * @param encodedPublicKey Base64-encoded public key * @throws IllegalArgumentException if encodedPublicKey is invalid */
Generates a PublicKey instance from a string containing the Base64-encoded public key
generatePublicKey
{ "repo_name": "anselm94/Torchie-Android", "path": "app/src/main/java/in/blogspot/anselmbros/torchie/utils/IabUtils/Security.java", "license": "gpl-2.0", "size": 5266 }
[ "android.util.Base64", "android.util.Log", "java.security.KeyFactory", "java.security.NoSuchAlgorithmException", "java.security.PublicKey", "java.security.spec.InvalidKeySpecException", "java.security.spec.X509EncodedKeySpec" ]
import android.util.Base64; import android.util.Log; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.security.spec.X509EncodedKeySpec;
import android.util.*; import java.security.*; import java.security.spec.*;
[ "android.util", "java.security" ]
android.util; java.security;
1,449,466
int insert(Grade record);
int insert(Grade record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table grade * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table grade
insert
{ "repo_name": "heqing90/myschool", "path": "src/main/java/com/fangyuan/myschool/mapper/GradeMapper.java", "license": "gpl-3.0", "size": 2857 }
[ "com.fangyuan.myschool.model.Grade" ]
import com.fangyuan.myschool.model.Grade;
import com.fangyuan.myschool.model.*;
[ "com.fangyuan.myschool" ]
com.fangyuan.myschool;
204,149
@Generated @Selector("setAdditionalLeadingNavigationBarButtonItems:") public native void setAdditionalLeadingNavigationBarButtonItems(NSArray<? extends UIBarButtonItem> value);
@Selector(STR) native void function(NSArray<? extends UIBarButtonItem> value);
/** * An array of buttons that will be added to the existing buttons in the UIDocumentBrowserViewController navigation bar */
An array of buttons that will be added to the existing buttons in the UIDocumentBrowserViewController navigation bar
setAdditionalLeadingNavigationBarButtonItems
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UIDocumentBrowserViewController.java", "license": "apache-2.0", "size": 14992 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,072,302
public Expr call(Expr... args) { return ExprCall.make(null, null, this, Util.asList(args), 0); }
public Expr call(Expr... args) { return ExprCall.make(null, null, this, Util.asList(args), 0); }
/** Return the body of this predicate/function. * <br> If the user has not called setBody() to set the body, * <br> then the default body is "false" (if this is a predicate), * <br> or the empty set/relation of the appropriate arity (if this is a function). */
Return the body of this predicate/function. If the user has not called setBody() to set the body, then the default body is "false" (if this is a predicate), or the empty set/relation of the appropriate arity (if this is a function)
getBody
{ "repo_name": "ModelWriter/WP3", "path": "Source/eu.modelwriter.alloyanalyzer/src/edu/mit/csail/sdg/alloy4compiler/ast/Func.java", "license": "epl-1.0", "size": 10698 }
[ "edu.mit.csail.sdg.alloy4.Util" ]
import edu.mit.csail.sdg.alloy4.Util;
import edu.mit.csail.sdg.alloy4.*;
[ "edu.mit.csail" ]
edu.mit.csail;
1,920,717
public void setterClass(JCExpression setterClass) { this.setterClass = setterClass; }
void function(JCExpression setterClass) { this.setterClass = setterClass; }
/** * Makes a reference to the setter class for this setter */
Makes a reference to the setter class for this setter
setterClass
{ "repo_name": "gijsleussink/ceylon", "path": "compiler-java/src/com/redhat/ceylon/compiler/java/codegen/AttributeDefinitionBuilder.java", "license": "apache-2.0", "size": 30950 }
[ "com.redhat.ceylon.langtools.tools.javac.tree.JCTree" ]
import com.redhat.ceylon.langtools.tools.javac.tree.JCTree;
import com.redhat.ceylon.langtools.tools.javac.tree.*;
[ "com.redhat.ceylon" ]
com.redhat.ceylon;
702,343
public void onActivityResult(int requestCode, int responseCode, Intent intent) { debugLog("onActivityResult: req=" + (requestCode == RC_RESOLVE ? "RC_RESOLVE" : String .valueOf(requestCode)) + ", resp=" + GameHelperUtils.activi...
void function(int requestCode, int responseCode, Intent intent) { debugLog(STR + (requestCode == RC_RESOLVE ? STR : String .valueOf(requestCode)) + STR + GameHelperUtils.activityResponseCodeToString(responseCode)); if (requestCode != RC_RESOLVE) { debugLog(STR); return; } mExpectingResolution = false; if (!mConnecting)...
/** * Handle activity result. Call this method from your Activity's * onActivityResult callback. If the activity result pertains to the sign-in * process, processes it appropriately. */
Handle activity result. Call this method from your Activity's onActivityResult callback. If the activity result pertains to the sign-in process, processes it appropriately
onActivityResult
{ "repo_name": "Corbichon/2017", "path": "app/src/main/java/com/corbel/pierre/p2017/lib/GameHelper.java", "license": "gpl-3.0", "size": 39112 }
[ "android.app.Activity", "android.content.Intent", "com.google.android.gms.games.GamesActivityResultCodes" ]
import android.app.Activity; import android.content.Intent; import com.google.android.gms.games.GamesActivityResultCodes;
import android.app.*; import android.content.*; import com.google.android.gms.games.*;
[ "android.app", "android.content", "com.google.android" ]
android.app; android.content; com.google.android;
2,414,322
public FilterConfig getFilterConfig() { return (this.filterConfig); }
FilterConfig function() { return (this.filterConfig); }
/** * Return the filter configuration object for this filter. */
Return the filter configuration object for this filter
getFilterConfig
{ "repo_name": "engcardso/TinyAgenda", "path": "src/java/com/tinyagenda/filters/SavingEvt.java", "license": "gpl-3.0", "size": 7092 }
[ "javax.servlet.FilterConfig" ]
import javax.servlet.FilterConfig;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
1,894,417
public void save(String name) { save(new File(name)); }
void function(String name) { save(new File(name)); }
/** * Saves the picture to a file in a standard image format. * The filetype must be .png or .jpg. */
Saves the picture to a file in a standard image format. The filetype must be .png or .jpg
save
{ "repo_name": "wwsun/algorithm-book", "path": "src/main/java/stdlib/Picture.java", "license": "mit", "size": 11178 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,594,563
public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info) { // adjust for insets... RectangleInsets insets = getInsets(); insets.trim(area); if (info != null) { info.setP...
void function(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info) { RectangleInsets insets = getInsets(); insets.trim(area); if (info != null) { info.setPlotArea(area); info.setDataArea(area); } drawBackground(g2, area); drawOutline(g2, area); Shape savedClip = g2.getClip(); ...
/** * Draws the plot on a Java 2D graphics device (such as the screen or a * printer). * * @param g2 the graphics device. * @param area the area within which the plot should be drawn. * @param anchor the anchor point (<code>null</code> permitted). * @param parentState the state f...
Draws the plot on a Java 2D graphics device (such as the screen or a printer)
draw
{ "repo_name": "opensim-org/opensim-gui", "path": "Gui/opensim/jfreechart/src/org/jfree/chart/plot/SpiderWebPlot.java", "license": "apache-2.0", "size": 54845 }
[ "java.awt.AlphaComposite", "java.awt.Composite", "java.awt.Graphics2D", "java.awt.Shape", "java.awt.geom.Line2D", "java.awt.geom.Point2D", "java.awt.geom.Rectangle2D", "org.jfree.data.general.DatasetUtilities", "org.jfree.ui.RectangleInsets", "org.jfree.util.TableOrder" ]
import java.awt.AlphaComposite; import java.awt.Composite; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import org.jfree.data.general.DatasetUtilities; import org.jfree.ui.RectangleInsets; import org.jfree.util.TableOrder...
import java.awt.*; import java.awt.geom.*; import org.jfree.data.general.*; import org.jfree.ui.*; import org.jfree.util.*;
[ "java.awt", "org.jfree.data", "org.jfree.ui", "org.jfree.util" ]
java.awt; org.jfree.data; org.jfree.ui; org.jfree.util;
1,659,870
void onCommit(Consumer<UnitOfWork<T>> handler);
void onCommit(Consumer<UnitOfWork<T>> handler);
/** * Register given {@code handler} with the Unit of Work. The handler will be notified when the phase of the * Unit of Work changes to {@link Phase#COMMIT}. * * @param handler the handler to register with the Unit of Work */
Register given handler with the Unit of Work. The handler will be notified when the phase of the Unit of Work changes to <code>Phase#COMMIT</code>
onCommit
{ "repo_name": "krosenvold/AxonFramework", "path": "messaging/src/main/java/org/axonframework/messaging/unitofwork/UnitOfWork.java", "license": "apache-2.0", "size": 20131 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
1,625,206
public Element tagName(String tagName) { Validate.notEmpty(tagName, "Tag name must not be empty."); tag = Tag.valueOf(tagName, ParseSettings.preserveCase); // preserve the requested tag case return this; }
Element function(String tagName) { Validate.notEmpty(tagName, STR); tag = Tag.valueOf(tagName, ParseSettings.preserveCase); return this; }
/** * Change the tag of this element. For example, convert a {@code <span>} to a {@code <div>} with * {@code el.tagName("div");}. * * @param tagName new tag name for this element * @return this element, for chaining */
Change the tag of this element. For example, convert a to a with el.tagName("div");
tagName
{ "repo_name": "SpoonLabs/astor", "path": "examples/librepair-experiments-jhy-jsoup-285353482-20171009-062400_bugonly_with_package_info/src/main/java/org/jsoup/nodes/Element.java", "license": "gpl-2.0", "size": 50843 }
[ "org.jsoup.helper.Validate", "org.jsoup.parser.ParseSettings", "org.jsoup.parser.Tag" ]
import org.jsoup.helper.Validate; import org.jsoup.parser.ParseSettings; import org.jsoup.parser.Tag;
import org.jsoup.helper.*; import org.jsoup.parser.*;
[ "org.jsoup.helper", "org.jsoup.parser" ]
org.jsoup.helper; org.jsoup.parser;
1,260,917
private ArrayList<IDrawerItem> getDrawerItems() { return mDrawer.getOriginalDrawerItems() != null ? mDrawer.getOriginalDrawerItems() : mDrawer.getDrawerItems(); }
ArrayList<IDrawerItem> function() { return mDrawer.getOriginalDrawerItems() != null ? mDrawer.getOriginalDrawerItems() : mDrawer.getDrawerItems(); }
/** * returns always the original drawerItems and not the switched content * * @return */
returns always the original drawerItems and not the switched content
getDrawerItems
{ "repo_name": "jokeog/ProjectCalendae", "path": "library/src/main/java/com/mikepenz/materialdrawer/MiniDrawer.java", "license": "apache-2.0", "size": 15483 }
[ "com.mikepenz.materialdrawer.model.interfaces.IDrawerItem", "java.util.ArrayList" ]
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem; import java.util.ArrayList;
import com.mikepenz.materialdrawer.model.interfaces.*; import java.util.*;
[ "com.mikepenz.materialdrawer", "java.util" ]
com.mikepenz.materialdrawer; java.util;
642,149
public static OWLOntologyManager createManager() { return OWLManager.createOWLOntologyManager(); }
static OWLOntologyManager function() { return OWLManager.createOWLOntologyManager(); }
/** * Creates and returns a new {@link OWLOntologyManager}, used * to have short names. */
Creates and returns a new <code>OWLOntologyManager</code>, used to have short names
createManager
{ "repo_name": "sotty/OntoMaven", "path": "OntoMaven-OWL/src/main/java/de/csw/ontomaven/util/Util.java", "license": "apache-2.0", "size": 18383 }
[ "org.semanticweb.owlapi.apibinding.OWLManager", "org.semanticweb.owlapi.model.OWLOntologyManager" ]
import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.semanticweb.owlapi.apibinding.*; import org.semanticweb.owlapi.model.*;
[ "org.semanticweb.owlapi" ]
org.semanticweb.owlapi;
2,357,174
private void createSynthesizedExternVar(String varName) { Node nameNode = IR.name(varName); // Mark the variable as constant if it matches the coding convention // for constant vars. // NOTE(nicksantos): honestly, I'm not sure how much this matters. // AFAIK, all people who use the CONST coding c...
void function(String varName) { Node nameNode = IR.name(varName); if (compiler.getCodingConvention().isConstant(varName)) { nameNode.putBooleanProp(Node.IS_CONSTANT_NAME, true); } getSynthesizedExternsRoot().addChildToBack( IR.var(nameNode)); varsToDeclareInExterns.remove(varName); compiler.reportCodeChange(); }
/** * Create a new variable in a synthetic script. This will prevent * subsequent compiler passes from crashing. */
Create a new variable in a synthetic script. This will prevent subsequent compiler passes from crashing
createSynthesizedExternVar
{ "repo_name": "robbert/closure-compiler", "path": "src/com/google/javascript/jscomp/VarCheck.java", "license": "apache-2.0", "size": 14102 }
[ "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,062,394
@Override public AvailabilitySetCreateOrUpdateResponse createOrUpdate(String resourceGroupName, AvailabilitySet parameters) throws IOException, ServiceException, InterruptedException, ExecutionException { // Validate if (resourceGroupName == null) { throw new NullPointerException("re...
AvailabilitySetCreateOrUpdateResponse function(String resourceGroupName, AvailabilitySet parameters) throws IOException, ServiceException, InterruptedException, ExecutionException { if (resourceGroupName == null) { throw new NullPointerException(STR); } if (parameters == null) { throw new NullPointerException(STR); } i...
/** * The operation to create or update the availability set. * * @param resourceGroupName Required. The name of the resource group. * @param parameters Required. Parameters supplied to the Create * Availability Set operation. * @throws IOException Signals that an I/O exception of some sort has ...
The operation to create or update the availability set
createOrUpdate
{ "repo_name": "southworkscom/azure-sdk-for-java", "path": "resource-management/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetOperationsImpl.java", "license": "apache-2.0", "size": 68078 }
[ "com.microsoft.azure.management.compute.models.AvailabilitySet", "com.microsoft.azure.management.compute.models.AvailabilitySetCreateOrUpdateResponse", "com.microsoft.windowsazure.exception.ServiceException", "com.microsoft.windowsazure.tracing.CloudTracing", "java.io.IOException", "java.util.HashMap", ...
import com.microsoft.azure.management.compute.models.AvailabilitySet; import com.microsoft.azure.management.compute.models.AvailabilitySetCreateOrUpdateResponse; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java....
import com.microsoft.azure.management.compute.models.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; import java.util.concurrent.*;
[ "com.microsoft.azure", "com.microsoft.windowsazure", "java.io", "java.util" ]
com.microsoft.azure; com.microsoft.windowsazure; java.io; java.util;
864,788
private BufferedImage renderProjectedCompressed(int startZ, int endZ, int stepping, int type) throws RenderingServiceException, DSOutOfServiceException { try { byte[] values = servant.renderProjectedCompressed( ProjectionParam.convertType(type), getDefaultT(), st...
BufferedImage function(int startZ, int endZ, int stepping, int type) throws RenderingServiceException, DSOutOfServiceException { try { byte[] values = servant.renderProjectedCompressed( ProjectionParam.convertType(type), getDefaultT(), stepping, startZ, endZ); return WriterImage.bytesToImage(values); } catch (Throwable...
/** * Projects the selected section of the optical sections * and renders a compressed image. * * @param startZ The first optical section. * @param endZ The last optical section. * @param stepping The stepping of the projection. * @param type The projection type. * @return See above. * @thr...
Projects the selected section of the optical sections and renders a compressed image
renderProjectedCompressed
{ "repo_name": "rleigh-dundee/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/rnd/RenderingControlProxy.java", "license": "gpl-2.0", "size": 64159 }
[ "java.awt.image.BufferedImage", "org.openmicroscopy.shoola.env.data.DSOutOfServiceException", "org.openmicroscopy.shoola.env.data.model.ProjectionParam", "org.openmicroscopy.shoola.util.image.io.WriterImage" ]
import java.awt.image.BufferedImage; import org.openmicroscopy.shoola.env.data.DSOutOfServiceException; import org.openmicroscopy.shoola.env.data.model.ProjectionParam; import org.openmicroscopy.shoola.util.image.io.WriterImage;
import java.awt.image.*; import org.openmicroscopy.shoola.env.data.*; import org.openmicroscopy.shoola.env.data.model.*; import org.openmicroscopy.shoola.util.image.io.*;
[ "java.awt", "org.openmicroscopy.shoola" ]
java.awt; org.openmicroscopy.shoola;
779,904
void getRegisteredServers(AsyncRequestCallback<List<BuilderDescriptor>> callback);
void getRegisteredServers(AsyncRequestCallback<List<BuilderDescriptor>> callback);
/** * Get build result. * * @param callback * callback */
Get build result
getRegisteredServers
{ "repo_name": "codenvy/che-core", "path": "platform-api-client-gwt/che-core-client-gwt-builder/src/main/java/org/eclipse/che/api/builder/gwt/client/BuilderServiceClient.java", "license": "epl-1.0", "size": 2609 }
[ "java.util.List", "org.eclipse.che.api.builder.dto.BuilderDescriptor", "org.eclipse.che.ide.rest.AsyncRequestCallback" ]
import java.util.List; import org.eclipse.che.api.builder.dto.BuilderDescriptor; import org.eclipse.che.ide.rest.AsyncRequestCallback;
import java.util.*; import org.eclipse.che.api.builder.dto.*; import org.eclipse.che.ide.rest.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
48,519
public ITransformedCode caseOperationCallExp( OperationCallExp anOperationCallExp) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("caseOperationCallExp(OperationCallExp) - start"); } // no else. ITransformedCode result = new TransformedCodeImpl(); OclExpression sourceExp = anOperationC...
ITransformedCode function( OperationCallExp anOperationCallExp) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(STR); } ITransformedCode result = new TransformedCodeImpl(); OclExpression sourceExp = anOperationCallExp.getSource(); Operation referredOperation = anOperationCallExp.getReferredOperation(); List<Type> paramet...
/** * <p> * Generates the code for a binary {@link Operation} of an * {@link OperationCallExp}. * </p> * * @param anOperationCallExp * The {@link OperationCallExp} the code shall be transformed * for. * @param anOperation * The {@link Operation} which shal...
Generates the code for a binary <code>Operation</code> of an <code>OperationCallExp</code>.
caseOperationCallExp
{ "repo_name": "hammadirshad46/dresdenocl", "path": "plugins/org.dresdenocl.tools.codegen.ocl2java/src/org/dresdenocl/tools/codegen/ocl2java/internal/Ocl2Java.java", "license": "lgpl-3.0", "size": 123304 }
[ "java.util.ArrayList", "java.util.List", "org.dresdenocl.essentialocl.EssentialOclPlugin", "org.dresdenocl.essentialocl.expressions.OclExpression", "org.dresdenocl.essentialocl.expressions.OperationCallExp", "org.dresdenocl.essentialocl.expressions.TypeLiteralExp", "org.dresdenocl.essentialocl.types.Bag...
import java.util.ArrayList; import java.util.List; import org.dresdenocl.essentialocl.EssentialOclPlugin; import org.dresdenocl.essentialocl.expressions.OclExpression; import org.dresdenocl.essentialocl.expressions.OperationCallExp; import org.dresdenocl.essentialocl.expressions.TypeLiteralExp; import org.dresdenocl.es...
import java.util.*; import org.dresdenocl.essentialocl.*; import org.dresdenocl.essentialocl.expressions.*; import org.dresdenocl.essentialocl.types.*; import org.dresdenocl.pivotmodel.*; import org.dresdenocl.tools.codegen.code.*; import org.dresdenocl.tools.codegen.code.impl.*; import org.dresdenocl.tools.template.*;
[ "java.util", "org.dresdenocl.essentialocl", "org.dresdenocl.pivotmodel", "org.dresdenocl.tools" ]
java.util; org.dresdenocl.essentialocl; org.dresdenocl.pivotmodel; org.dresdenocl.tools;
2,710,626
@SuppressWarnings("static-access") private Options createCommandLineOptions() { final Options options = new Options(); addStandardOptions(options); addAdvancedOptions(options); addDeprecatedOptions(options); return options; }
@SuppressWarnings(STR) Options function() { final Options options = new Options(); addStandardOptions(options); addAdvancedOptions(options); addDeprecatedOptions(options); return options; }
/** * Generates an Options collection that is used to parse the command line * and to display the help message. * * @return the command line options used for parsing the command line */
Generates an Options collection that is used to parse the command line and to display the help message
createCommandLineOptions
{ "repo_name": "hansjoachim/DependencyCheck", "path": "cli/src/main/java/org/owasp/dependencycheck/CliParser.java", "license": "apache-2.0", "size": 59816 }
[ "org.apache.commons.cli.Options" ]
import org.apache.commons.cli.Options;
import org.apache.commons.cli.*;
[ "org.apache.commons" ]
org.apache.commons;
2,502,464
public static TCostBean prepareCostBean(TCostBean costBean, Integer personID, Integer workItemID) { if (costBean != null) { if (costBean.getPerson() == null) { // leave the original person: for example the project manager // may change // the value but the person remains who created the expense ...
static TCostBean function(TCostBean costBean, Integer personID, Integer workItemID) { if (costBean != null) { if (costBean.getPerson() == null) { costBean.setPerson(personID); } Date now = new Date(); costBean.setLastEdit(now); Date effortDate = costBean.getEffortdate(); if (effortDate == null) { costBean.setEffortdate...
/** * Prepares a costBean for save * @param costBean * @param personID * @param workItemID * @return */
Prepares a costBean for save
prepareCostBean
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/item/budgetCost/ExpenseBL.java", "license": "gpl-3.0", "size": 19222 }
[ "com.aurel.track.beans.TCostBean", "java.util.Date" ]
import com.aurel.track.beans.TCostBean; import java.util.Date;
import com.aurel.track.beans.*; import java.util.*;
[ "com.aurel.track", "java.util" ]
com.aurel.track; java.util;
717,704
final void updateDelayInMillisecondsFrom(HttpResponse httpPollResponse) { final Long parsedDelayInMilliseconds = delayInMillisecondsFrom(httpPollResponse); if (parsedDelayInMilliseconds != null) { delayInMilliseconds = parsedDelayInMilliseconds; } }
final void updateDelayInMillisecondsFrom(HttpResponse httpPollResponse) { final Long parsedDelayInMilliseconds = delayInMillisecondsFrom(httpPollResponse); if (parsedDelayInMilliseconds != null) { delayInMilliseconds = parsedDelayInMilliseconds; } }
/** * Update the delay in milliseconds from the provided HTTP poll response. * @param httpPollResponse The HTTP poll response to update the delay in milliseconds from. */
Update the delay in milliseconds from the provided HTTP poll response
updateDelayInMillisecondsFrom
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/core/azure-core-management/src/main/java/com/azure/core/management/implementation/PollStrategy.java", "license": "mit", "size": 8177 }
[ "com.azure.core.http.HttpResponse" ]
import com.azure.core.http.HttpResponse;
import com.azure.core.http.*;
[ "com.azure.core" ]
com.azure.core;
1,798,360
public static Number power(Integer self, Integer exponent) { if (exponent >= 0) { BigInteger answer = BigInteger.valueOf(self).pow(exponent); if (answer.compareTo(BI_INT_MIN) >= 0 && answer.compareTo(BI_INT_MAX) <= 0) { return answer.intValue(); } else { ...
static Number function(Integer self, Integer exponent) { if (exponent >= 0) { BigInteger answer = BigInteger.valueOf(self).pow(exponent); if (answer.compareTo(BI_INT_MIN) >= 0 && answer.compareTo(BI_INT_MAX) <= 0) { return answer.intValue(); } else { return answer; } } else { return power(self, (double) exponent); } }
/** * Power of an integer to an integer certain exponent. If the * exponent is positive, convert to a BigInteger and call * BigInteger.pow(int) method to maintain precision. Called by the * '**' operator. * * @param self an Integer * @param exponent an Integer exponent * ...
Power of an integer to an integer certain exponent. If the exponent is positive, convert to a BigInteger and call BigInteger.pow(int) method to maintain precision. Called by the '**' operator
power
{ "repo_name": "xien777/yajsw", "path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "lgpl-2.1", "size": 704150 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,415,999
public ScheduledExecutorService getFederationSheduler() { return singleThreadFederationScheduler; }
ScheduledExecutorService function() { return singleThreadFederationScheduler; }
/** *For internal Use only */
For internal Use only
getFederationSheduler
{ "repo_name": "sshcherbakov/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/LocalManager.java", "license": "apache-2.0", "size": 16096 }
[ "java.util.concurrent.ScheduledExecutorService" ]
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,182,623
@Nonnull public WindowsAutopilotDeviceIdentityRequest select(@Nonnull final String value) { addSelectOption(value); return this; }
WindowsAutopilotDeviceIdentityRequest function(@Nonnull final String value) { addSelectOption(value); return this; }
/** * Sets the select clause for the request * * @param value the select clause * @return the updated request */
Sets the select clause for the request
select
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/WindowsAutopilotDeviceIdentityRequest.java", "license": "mit", "size": 6764 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
506,528
private View getChildClosestToStart() { return getChildAt(mShouldReverseLayout ? getChildCount() - 1 : 0); }
View function() { return getChildAt(mShouldReverseLayout ? getChildCount() - 1 : 0); }
/** * Convenience method to find the child closes to start. Caller should check it has enough * children. * * @return The child closes to start of the layout from user's perspective. */
Convenience method to find the child closes to start. Caller should check it has enough children
getChildClosestToStart
{ "repo_name": "huangwm1984/android-parallax-recyclerview", "path": "library/src/main/java/com/poliveira/parallaxrecyclerview/HeaderLayoutManagerFixed.java", "license": "apache-2.0", "size": 67770 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,265,422
EList<MDevice<?>> getMdevices();
EList<MDevice<?>> getMdevices();
/** * Returns the value of the '<em><b>Mdevices</b></em>' containment reference list. * The list contents are of type {@link org.openhab.binding.tinkerforge.internal.model.MDevice}&lt;?>. * It is bidirectional and its opposite is '{@link org.openhab.binding.tinkerforge.internal.model.MDevice#getBrickd ...
Returns the value of the 'Mdevices' containment reference list. The list contents are of type <code>org.openhab.binding.tinkerforge.internal.model.MDevice</code>&lt;?>. It is bidirectional and its opposite is '<code>org.openhab.binding.tinkerforge.internal.model.MDevice#getBrickd Brickd</code>'. If the meaning of the '...
getMdevices
{ "repo_name": "mvolaart/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/MBrickd.java", "license": "epl-1.0", "size": 15721 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
245,049
void writeToBlock(DataOutput out) throws IOException; } // Block readers and writers public interface BlockIterator {
void writeToBlock(DataOutput out) throws IOException; } public interface BlockIterator {
/** * Writes the block to the provided stream. Must not write any magic * records. * * @param out a stream to write uncompressed data into */
Writes the block to the provided stream. Must not write any magic records
writeToBlock
{ "repo_name": "bcopeland/hbase-thrift", "path": "src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java", "license": "apache-2.0", "size": 57156 }
[ "java.io.DataOutput", "java.io.IOException" ]
import java.io.DataOutput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,240,998
@Action(name = "Complex Action Class action4") public void action4() throws Exception { }
@Action(name = STR) void function() throws Exception { }
/** * comment for action4 */
comment for action4
action4
{ "repo_name": "Axway/ats-framework", "path": "agent/core/src/test/java/com/axway/ats/agent/core/ant/needed_in_acgen_tests/ComplexActionClass.java", "license": "apache-2.0", "size": 7244 }
[ "com.axway.ats.agent.core.model.Action" ]
import com.axway.ats.agent.core.model.Action;
import com.axway.ats.agent.core.model.*;
[ "com.axway.ats" ]
com.axway.ats;
2,525,853
private void disAllowedConnect(Connection conn, String databaseName, String userName) throws SQLException, RSSManagerException { RSSManagerUtil.checkIfParameterSecured(databaseName); RSSManagerUtil.check...
void function(Connection conn, String databaseName, String userName) throws SQLException, RSSManagerException { RSSManagerUtil.checkIfParameterSecured(databaseName); RSSManagerUtil.checkIfParameterSecured(userName); PreparedStatement statement = conn.prepareStatement(STR + databaseName + STR + userName); statement.exec...
/** * Revoke connection to the users * * @param conn the connection * @param databaseName name of the database * @param userName of database user * @throws SQLException if error occurred while execution database operation * @throws RSSManagerException if parameter i...
Revoke connection to the users
disAllowedConnect
{ "repo_name": "maheshika/carbon-storage-management", "path": "components/rss-manager/org.wso2.carbon.rssmanager.core/src/main/java/org/wso2/carbon/rssmanager/core/manager/impl/postgres/PostgresSystemRSSManager.java", "license": "apache-2.0", "size": 32154 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "org.wso2.carbon.rssmanager.core.exception.RSSManagerException", "org.wso2.carbon.rssmanager.core.util.RSSManagerUtil" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.wso2.carbon.rssmanager.core.exception.RSSManagerException; import org.wso2.carbon.rssmanager.core.util.RSSManagerUtil;
import java.sql.*; import org.wso2.carbon.rssmanager.core.exception.*; import org.wso2.carbon.rssmanager.core.util.*;
[ "java.sql", "org.wso2.carbon" ]
java.sql; org.wso2.carbon;
733,764
protected void addAttribute(String attr, String value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(attr, value); }
void function(String attr, String value) { if (attributes == null) { attributes = new HashMap<>(); } attributes.put(attr, value); }
/** * Adds a new attribute to this node. An attribute has a name and a value. * Attributes are stored in a HashMap which is initialized in here if it was * previously null. * * @param attr - the name of the attribute. * @param value - the value of the attribute. */
Adds a new attribute to this node. An attribute has a name and a value. Attributes are stored in a HashMap which is initialized in here if it was previously null
addAttribute
{ "repo_name": "andresoviedo/android-3D-model-viewer", "path": "engine/src/main/java/org/andresoviedo/util/xml/XmlNode.java", "license": "lgpl-3.0", "size": 4575 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,332,574
protected void setPropertiesFromFields(Properties props, StorageDirectory sd) throws IOException { props.setProperty("layoutVersion", String.valueOf(layoutVersion)); props.setProperty("storageType", storageType.toString()); props.setProperty("namespaceID", S...
void function(Properties props, StorageDirectory sd) throws IOException { props.setProperty(STR, String.valueOf(layoutVersion)); props.setProperty(STR, storageType.toString()); props.setProperty(STR, String.valueOf(namespaceID)); if (versionSupportsFederation()) { props.setProperty(STR, clusterID); } props.setProperty(...
/** * Set common storage fields into the given properties object. * Should be overloaded if additional fields need to be set. * * @param props the Properties object to write into */
Set common storage fields into the given properties object. Should be overloaded if additional fields need to be set
setPropertiesFromFields
{ "repo_name": "moreus/hadoop", "path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java", "license": "apache-2.0", "size": 33976 }
[ "java.io.IOException", "java.util.Properties" ]
import java.io.IOException; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,521,795
@Nonnull public InputStream getResponseEntityAsStream() throws IOException;
InputStream function() throws IOException;
/** * Gets the response entity (body) as an input stream. * * @return The entity input stream. * @throws IOException if there's a transport error. */
Gets the response entity (body) as an input stream
getResponseEntityAsStream
{ "repo_name": "joesoc/plexi", "path": "src/com/google/enterprise/adaptor/secmgr/http/HttpExchange.java", "license": "apache-2.0", "size": 5544 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
45,445
public void writeElement(String s) throws IOException { this.writePrimitiveElementTag(MatlabDataType.UINT16, s.length()); this.stream().write(s.getBytes("UTF-16BE")); }
void function(String s) throws IOException { this.writePrimitiveElementTag(MatlabDataType.UINT16, s.length()); this.stream().write(s.getBytes(STR)); }
/** * Writes a character array MATLAB element to the underlying stream. * @param s The <code>String</code> to write. * @throws IOException if writing to the underlying stream fails. */
Writes a character array MATLAB element to the underlying stream
writeElement
{ "repo_name": "bwkimmel/jmist", "path": "jmist-core/src/main/java/ca/eandb/jmist/util/matlab/MatlabOutputStream.java", "license": "mit", "size": 59813 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,253,774
if (exception instanceof CaptchaException) { getRedirectStrategy().sendRedirect(request, response, CODE_ERROR_URL); } else { getRedirectStrategy().sendRedirect(request, response, PASS_ERROR_URL); } }
if (exception instanceof CaptchaException) { getRedirectStrategy().sendRedirect(request, response, CODE_ERROR_URL); } else { getRedirectStrategy().sendRedirect(request, response, PASS_ERROR_URL); } }
/** * Called when an authentication attempt fails. * * @param request the request during which the authentication attempt occurred. * @param response the response. * @param exception the exception which was thrown to reject the authentication */
Called when an authentication attempt fails
onAuthenticationFailure
{ "repo_name": "wayneliquan/Sparrow", "path": "src/main/java/com/wayne/sparrow/app/configuration/security/LoginAuthenticationFailureHandler.java", "license": "gpl-3.0", "size": 1842 }
[ "com.wayne.sparrow.app.exception.CaptchaException" ]
import com.wayne.sparrow.app.exception.CaptchaException;
import com.wayne.sparrow.app.exception.*;
[ "com.wayne.sparrow" ]
com.wayne.sparrow;
1,960,617
private void attemptLogin() { if (mAuthTask != null) { return; } // Reset errors. mEmailView.setError(null); mPasswordView.setError(null); // Store values at the time of the login attempt. String email = mEmailView.getText().toString(); S...
void function() { if (mAuthTask != null) { return; } mEmailView.setError(null); mPasswordView.setError(null); String email = mEmailView.getText().toString(); String password = mPasswordView.getText().toString(); boolean cancel = false; View focusView = null; if (!TextUtils.isEmpty(password) && !isPasswordValid(password...
/** * Attempts to sign in or register the account specified by the login form. * If there are form errors (invalid email, missing fields, etc.), the * errors are presented and no actual login attempt is made. */
Attempts to sign in or register the account specified by the login form. If there are form errors (invalid email, missing fields, etc.), the errors are presented and no actual login attempt is made
attemptLogin
{ "repo_name": "Tadelhanataris/RMS", "path": "RMS/T-Android/app/src/main/java/com/lalalla/t/biyesheji/LoginActivity.java", "license": "mit", "size": 14880 }
[ "android.text.TextUtils", "android.view.View" ]
import android.text.TextUtils; import android.view.View;
import android.text.*; import android.view.*;
[ "android.text", "android.view" ]
android.text; android.view;
2,754,337
@Override public int doEndTag() throws JspException { return super.doEndTag(); } // Actions related to body evaluation
int function() throws JspException { return super.doEndTag(); }
/** * Default processing of the end tag returning EVAL_PAGE. * * @return EVAL_PAGE * @throws JspException * if an error occurred while processing this tag * @see Tag#doEndTag */
Default processing of the end tag returning EVAL_PAGE
doEndTag
{ "repo_name": "apache/tomcat", "path": "java/jakarta/servlet/jsp/tagext/BodyTagSupport.java", "license": "apache-2.0", "size": 4365 }
[ "jakarta.servlet.jsp.JspException" ]
import jakarta.servlet.jsp.JspException;
import jakarta.servlet.jsp.*;
[ "jakarta.servlet.jsp" ]
jakarta.servlet.jsp;
1,505,936
public static OCConnector getInstance(ConnectInfo connectInfo) throws MalformedURLException, ParserConfigurationException, DatatypeConfigurationException { return getInstance(connectInfo, false, false); }
static OCConnector function(ConnectInfo connectInfo) throws MalformedURLException, ParserConfigurationException, DatatypeConfigurationException { return getInstance(connectInfo, false, false); }
/** * get current instance or create new if not yes instantiated. * @param connectInfo OpenClinica connection info and credentials. * @return returns OCConnector instance * @throws MalformedURLException * @throws ParserConfigurationException * @throws DatatypeConfigurationException */
get current instance or create new if not yes instantiated
getInstance
{ "repo_name": "ddRPB/rpb", "path": "radplanbio-core/src/main/java/de/dktk/dd/rpb/core/ocsoap/connect/OCConnector.java", "license": "gpl-3.0", "size": 14208 }
[ "java.net.MalformedURLException", "javax.xml.datatype.DatatypeConfigurationException", "javax.xml.parsers.ParserConfigurationException" ]
import java.net.MalformedURLException; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import java.net.*; import javax.xml.datatype.*; import javax.xml.parsers.*;
[ "java.net", "javax.xml" ]
java.net; javax.xml;
1,822,479
public static HostDescription combine(BasicHostConfig cfg, HostDescription descr) { if (cfg == null || descr == null) { return descr; } Set<HostLocation> locations = descr.locations(); Set<HostLocation> cfgLocations = cfg.locatio...
static HostDescription function(BasicHostConfig cfg, HostDescription descr) { if (cfg == null descr == null) { return descr; } Set<HostLocation> locations = descr.locations(); Set<HostLocation> cfgLocations = cfg.locations(); if (cfgLocations != null) { locations = cfgLocations.stream() .map(hostLocation -> new HostLoc...
/** * Generates a HostDescription containing fields from a HostDescription and * a HostConfig. * * @param cfg the host config entity from network config * @param descr a HostDescription * @return HostDescription based on both sources */
Generates a HostDescription containing fields from a HostDescription and a HostConfig
combine
{ "repo_name": "osinstom/onos", "path": "core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java", "license": "apache-2.0", "size": 3864 }
[ "java.util.Set", "java.util.stream.Collectors", "org.onlab.packet.IpAddress", "org.onosproject.net.HostLocation", "org.onosproject.net.SparseAnnotations", "org.onosproject.net.config.basics.BasicHostConfig", "org.onosproject.net.host.DefaultHostDescription", "org.onosproject.net.host.HostDescription" ...
import java.util.Set; import java.util.stream.Collectors; import org.onlab.packet.IpAddress; import org.onosproject.net.HostLocation; import org.onosproject.net.SparseAnnotations; import org.onosproject.net.config.basics.BasicHostConfig; import org.onosproject.net.host.DefaultHostDescription; import org.onosproject.net...
import java.util.*; import java.util.stream.*; import org.onlab.packet.*; import org.onosproject.net.*; import org.onosproject.net.config.basics.*; import org.onosproject.net.host.*;
[ "java.util", "org.onlab.packet", "org.onosproject.net" ]
java.util; org.onlab.packet; org.onosproject.net;
437,621
public CountDownLatch refreshUserAuthTicketAsync(String refreshToken, String responseFields, AsyncCallback<com.mozu.api.contracts.customer.CustomerAuthTicket> callback) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> client = com.mozu.api.clients.commerce.customer.CustomerAuthTic...
CountDownLatch function(String refreshToken, String responseFields, AsyncCallback<com.mozu.api.contracts.customer.CustomerAuthTicket> callback) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> client = com.mozu.api.clients.commerce.customer.CustomerAuthTicketClient.refreshUserAuthTicket...
/** * Refreshes an existing authentication ticket for a customer account by providing the refresh token string. * <p><pre><code> * CustomerAuthTicket customerauthticket = new CustomerAuthTicket(); * CountDownLatch latch = customerauthticket.refreshUserAuthTicket( refreshToken, responseFields, callback ); * l...
Refreshes an existing authentication ticket for a customer account by providing the refresh token string. <code><code> CustomerAuthTicket customerauthticket = new CustomerAuthTicket(); CountDownLatch latch = customerauthticket.refreshUserAuthTicket( refreshToken, responseFields, callback ); latch.await() * </code></cod...
refreshUserAuthTicketAsync
{ "repo_name": "bhewett/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/customer/CustomerAuthTicketResource.java", "license": "mit", "size": 13490 }
[ "com.mozu.api.AsyncCallback", "com.mozu.api.MozuClient", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import com.mozu.api.MozuClient; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
2,135,628
public static OFGroup createMPLSTunnelLabel2(U32 index) { //9 return OFGroup.of(0 | (index.getRaw() & 0x00ffFFff) | (MPLSSubType.MPLS_TUNNEL_LABEL_2 << 24) | (OFDPAGroupType.MPLS_LABEL << 28)); }
static OFGroup function(U32 index) { return OFGroup.of(0 (index.getRaw() & 0x00ffFFff) (MPLSSubType.MPLS_TUNNEL_LABEL_2 << 24) (OFDPAGroupType.MPLS_LABEL << 28)); }
/** * Only bits 0-23 of index are used. Bits 24-31 are ignored. * @param index * @return */
Only bits 0-23 of index are used. Bits 24-31 are ignored
createMPLSTunnelLabel2
{ "repo_name": "chinhnc/floodlight", "path": "src/main/java/net/floodlightcontroller/util/OFDPAUtils.java", "license": "apache-2.0", "size": 32338 }
[ "org.projectfloodlight.openflow.types.OFGroup" ]
import org.projectfloodlight.openflow.types.OFGroup;
import org.projectfloodlight.openflow.types.*;
[ "org.projectfloodlight.openflow" ]
org.projectfloodlight.openflow;
2,003,115
public int getRow() throws SQLServerException { loggerExternal.entering(getClassNameLogging(), "getRow"); if (logger.isLoggable(java.util.logging.Level.FINER)) logger.finer(toString() + logCursorState()); checkClosed(); // DYNAMIC (scrollable) cursors do not support get...
int function() throws SQLServerException { loggerExternal.entering(getClassNameLogging(), STR); if (logger.isLoggable(java.util.logging.Level.FINER)) logger.finer(toString() + logCursorState()); checkClosed(); if (isDynamic() && !isForwardOnly()) throwUnsupportedCursorOp(); if (!hasCurrentRow() isOnInsertRow) return 0;...
/** * Retrieves the number of the current row in this ResultSet object. The first row is number 1, the second is 2, and so on. * * @return the number of the current row; 0 if there is no current row */
Retrieves the number of the current row in this ResultSet object. The first row is number 1, the second is 2, and so on
getRow
{ "repo_name": "pierresouchay/mssql-jdbc", "path": "src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResultSet.java", "license": "mit", "size": 285441 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
892,754
private SimpleResponse handleStop() { String meta = getStatus(); computer.stopTheThread(); String data = getStatus(); return SimpleResponse.ok(data, meta); }
SimpleResponse function() { String meta = getStatus(); computer.stopTheThread(); String data = getStatus(); return SimpleResponse.ok(data, meta); }
/** * Handles stop of computing. * * @return */
Handles stop of computing
handleStop
{ "repo_name": "martlin2cz/JRest", "path": "src/test/java/cz/martlin/jrest/examples/pi/calcApp/PiComputerHandler.java", "license": "gpl-3.0", "size": 4385 }
[ "cz.martlin.jrest.impl.simple.reqresps.SimpleResponse" ]
import cz.martlin.jrest.impl.simple.reqresps.SimpleResponse;
import cz.martlin.jrest.impl.simple.reqresps.*;
[ "cz.martlin.jrest" ]
cz.martlin.jrest;
2,411,728
public void unregisterApplicationMaster(FinalApplicationStatus appStatus, String appMessage, String appTrackingUrl) throws YarnException, IOException { synchronized (unregisterHeartbeatLock) { keepRunning = false; client.unregisterApplicationMaster(appStatus, appMessage, appTrackingUrl); ...
void function(FinalApplicationStatus appStatus, String appMessage, String appTrackingUrl) throws YarnException, IOException { synchronized (unregisterHeartbeatLock) { keepRunning = false; client.unregisterApplicationMaster(appStatus, appMessage, appTrackingUrl); } }
/** * Unregister the application master. This must be called in the end. * @param appStatus Success/Failure status of the master * @param appMessage Diagnostics message on failure * @param appTrackingUrl New URL to get master info * @throws YarnException * @throws IOException */
Unregister the application master. This must be called in the end
unregisterApplicationMaster
{ "repo_name": "robzor92/hops", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/impl/AMRMClientAsyncImpl.java", "license": "apache-2.0", "size": 12655 }
[ "java.io.IOException", "org.apache.hadoop.yarn.api.records.FinalApplicationStatus", "org.apache.hadoop.yarn.exceptions.YarnException" ]
import java.io.IOException; import org.apache.hadoop.yarn.api.records.FinalApplicationStatus; import org.apache.hadoop.yarn.exceptions.YarnException;
import java.io.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.exceptions.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
415,576
String getComment() { return currentComment; } private class CentralRepoCommentLengthFilter extends DocumentFilter { private final Integer MAX_CHARACTERS = 500; private Integer remainingCharacters = MAX_CHARACTERS; public CentralRepoCommentLengthFilter() { ...
String getComment() { return currentComment; } private class CentralRepoCommentLengthFilter extends DocumentFilter { private final Integer MAX_CHARACTERS = 500; private Integer remainingCharacters = MAX_CHARACTERS; public CentralRepoCommentLengthFilter() { updateLabel(); }
/** * Get the current comment. If the user hit OK, this will be the new * comment. If the user canceled, this will be the original comment. * * @return the comment */
Get the current comment. If the user hit OK, this will be the new comment. If the user canceled, this will be the original comment
getComment
{ "repo_name": "millmanorama/autopsy", "path": "Core/src/org/sleuthkit/autopsy/centralrepository/CentralRepoCommentDialog.java", "license": "apache-2.0", "size": 13441 }
[ "javax.swing.text.DocumentFilter" ]
import javax.swing.text.DocumentFilter;
import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
2,906,675
public interface ODocumentFieldVisitor { Object visitField(OType type, OType linkedType, Object value);
interface ODocumentFieldVisitor { Object function(OType type, OType linkedType, Object value);
/** * Visits currently processed field. * * @param type * Filed type. May be null if absent in DB schema. * @param linkedType * Linked type in case collection is processed. May be null if absent in DB schema. * @param value * Field value. * @return New value of thi...
Visits currently processed field
visitField
{ "repo_name": "delebash/orientdb-parent", "path": "core/src/main/java/com/orientechnologies/orient/core/db/document/ODocumentFieldVisitor.java", "license": "apache-2.0", "size": 2885 }
[ "com.orientechnologies.orient.core.metadata.schema.OType" ]
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.metadata.schema.*;
[ "com.orientechnologies.orient" ]
com.orientechnologies.orient;
2,241,202
public Credentials getCredentials(final String column, final String value) throws DatastoreException { final Wrapper<Credentials> retval = new Wrapper<>(); Operator.<Credentials>perform((dao) -> { for (Credentials creds : dao.queryForEq(column,value)) { retval.item = creds; break; // get first cre...
Credentials function(final String column, final String value) throws DatastoreException { final Wrapper<Credentials> retval = new Wrapper<>(); Operator.<Credentials>perform((dao) -> { for (Credentials creds : dao.queryForEq(column,value)) { retval.item = creds; break; } }, Credentials.class); return(retval.item); }
/** * Retrieve the user Credentials from the database. * * @param column - The user as represented by given column name. * @param value - The user as represented by the column value. * @return Credentials - The user as credentials. */
Retrieve the user Credentials from the database
getCredentials
{ "repo_name": "harkwell/khallware", "path": "src/main/java/com/khallware/api/Datastore.java", "license": "gpl-3.0", "size": 46629 }
[ "com.khallware.api.domain.Credentials", "com.khallware.api.dstore.Operator" ]
import com.khallware.api.domain.Credentials; import com.khallware.api.dstore.Operator;
import com.khallware.api.domain.*; import com.khallware.api.dstore.*;
[ "com.khallware.api" ]
com.khallware.api;
1,719,891
public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof AssociationRefKey)) { return false; } AssociationRefKey other = (AssociationRefKey) o; ret...
boolean function(Object o) { if (this == o) { return true; } if (!(o instanceof AssociationRefKey)) { return false; } AssociationRefKey other = (AssociationRefKey) o; return EqualsHelper.nullSafeEquals(this.sourceRef, other.sourceRef) && EqualsHelper.nullSafeEquals(this.assocTypeQName, other.assocTypeQName) && EqualsHe...
/** * Compares: * <ul> * <li>{@link #sourceRef}</li> * <li>{@link #targetRef}</li> * <li>{@link #assocTypeQName}</li> * </ul> */
Compares: <code>#sourceRef</code> <code>#targetRef</code> <code>#assocTypeQName</code>
equals
{ "repo_name": "Tybion/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/transfer/RepoSecondaryManifestProcessorImpl.java", "license": "lgpl-3.0", "size": 14026 }
[ "org.alfresco.util.EqualsHelper" ]
import org.alfresco.util.EqualsHelper;
import org.alfresco.util.*;
[ "org.alfresco.util" ]
org.alfresco.util;
2,454,290
protected void updateOfficialAccountParticipant(String officialAccount, User u, String eidsForAllMatches) { if (u != null && !eidsForAllMatches.contains(u.getEid())) { eidsForAllMatches = u.getEid() + "\n" + eidsForAllMatches; } // replace the original official account entry with eids from all matc...
void function(String officialAccount, User u, String eidsForAllMatches) { if (u != null && !eidsForAllMatches.contains(u.getEid())) { eidsForAllMatches = u.getEid() + "\n" + eidsForAllMatches; } officialAccountParticipant = officialAccountParticipant.replaceAll(officialAccount, eidsForAllMatches); }
/** * This is to update the handler's officialAccountParticipant attribute when encountering multiple users with same email address. * The visual result is that the official account list will be expanded to include eids from all matches * * @param officialAccount * @param u * @param eidsForAllMatches */
This is to update the handler's officialAccountParticipant attribute when encountering multiple users with same email address. The visual result is that the official account list will be expanded to include eids from all matches
updateOfficialAccountParticipant
{ "repo_name": "rodriguezdevera/sakai", "path": "site-manage/site-manage-participant-helper/src/java/org/sakaiproject/site/tool/helper/participant/impl/SiteAddParticipantHandler.java", "license": "apache-2.0", "size": 43191 }
[ "org.sakaiproject.user.api.User" ]
import org.sakaiproject.user.api.User;
import org.sakaiproject.user.api.*;
[ "org.sakaiproject.user" ]
org.sakaiproject.user;
2,672,316
EReference getUiRawBindablePathSegment_RawBindable();
EReference getUiRawBindablePathSegment_RawBindable();
/** * Returns the meta object for the reference '{@link org.lunifera.ecview.semantic.uimodel.UiRawBindablePathSegment#getRawBindable <em>Raw Bindable</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Raw Bindable</em>'. * @see org.lunifera.ecview.semant...
Returns the meta object for the reference '<code>org.lunifera.ecview.semantic.uimodel.UiRawBindablePathSegment#getRawBindable Raw Bindable</code>'.
getUiRawBindablePathSegment_RawBindable
{ "repo_name": "lunifera/lunifera-ecview-addons", "path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java", "license": "epl-1.0", "size": 498897 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,419,446
public void addResults(RaytraceResult finalResult){ finalResult.addResults(result); }
void function(RaytraceResult finalResult){ finalResult.addResults(result); }
/** * Combine the results of this worker with the finalresult * @param finalResult The combined result */
Combine the results of this worker with the finalresult
addResults
{ "repo_name": "YixingHuang/CONRAD", "path": "src/edu/stanford/rsl/tutorial/physics/XRayWorker.java", "license": "gpl-3.0", "size": 11030 }
[ "edu.stanford.rsl.tutorial.physics.XRayTracer" ]
import edu.stanford.rsl.tutorial.physics.XRayTracer;
import edu.stanford.rsl.tutorial.physics.*;
[ "edu.stanford.rsl" ]
edu.stanford.rsl;
2,757,068
void doModifyResourceAddOn( HttpServletRequest request, String strResourceType, int nResourceId );
void doModifyResourceAddOn( HttpServletRequest request, String strResourceType, int nResourceId );
/** * Perform actions associated to the document modification * * @param request * The HTTP request * @param strResourceType * the resource type * @param nResourceId * the resource id */
Perform actions associated to the document modification
doModifyResourceAddOn
{ "repo_name": "lutece-platform/lutece-core", "path": "src/java/fr/paris/lutece/portal/business/resourceenhancer/IResourceManager.java", "license": "bsd-3-clause", "size": 3939 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,861,383
public Set<Object> keySet() { return map.keySet(); }
Set<Object> function() { return map.keySet(); }
/** * Returns a Set view of the attribute names (keys) contained in this Map. */
Returns a Set view of the attribute names (keys) contained in this Map
keySet
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.base/share/classes/java/util/jar/Attributes.java", "license": "gpl-2.0", "size": 23012 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,916,390
public static <VALUE> OptionalShouldContain shouldContainSame(Optional<VALUE> optional, VALUE expectedValue) { return optional.isPresent() ? new OptionalShouldContain(EXPECTING_TO_CONTAIN_SAME, optional, expectedValue) : shouldContain(expectedValue); }
static <VALUE> OptionalShouldContain function(Optional<VALUE> optional, VALUE expectedValue) { return optional.isPresent() ? new OptionalShouldContain(EXPECTING_TO_CONTAIN_SAME, optional, expectedValue) : shouldContain(expectedValue); }
/** * Indicates that the provided {@link java.util.Optional} does not contain the provided argument (judging by reference * equality). * * @param optional the {@link java.util.Optional} which contains a value. * @param expectedValue the value we expect to be in the provided {@link java.util.Optional}. ...
Indicates that the provided <code>java.util.Optional</code> does not contain the provided argument (judging by reference equality)
shouldContainSame
{ "repo_name": "xasx/assertj-core", "path": "src/main/java/org/assertj/core/error/OptionalShouldContain.java", "license": "apache-2.0", "size": 5193 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
716,800
public void onGuidedActionClicked(GuidedAction action) { }
void function(GuidedAction action) { }
/** * Callback invoked when an action is taken by the user. Subclasses should override in * order to act on the user's decisions. * @param action The chosen action. */
Callback invoked when an action is taken by the user. Subclasses should override in order to act on the user's decisions
onGuidedActionClicked
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "leanback/src/main/java/androidx/leanback/app/GuidedStepFragment.java", "license": "apache-2.0", "size": 63362 }
[ "androidx.leanback.widget.GuidedAction" ]
import androidx.leanback.widget.GuidedAction;
import androidx.leanback.widget.*;
[ "androidx.leanback" ]
androidx.leanback;
1,126,751
protected static synchronized void init(JHOVE2 jhove2) throws JHOVE2Exception { if (points == null) { points = new TreeSet<PeakPoint>(); Properties props = jhove2.getConfigInfo().getProperties("PeakPoints"); if (props != null) { ...
static synchronized void function(JHOVE2 jhove2) throws JHOVE2Exception { if (points == null) { points = new TreeSet<PeakPoint>(); Properties props = jhove2.getConfigInfo().getProperties(STR); if (props != null) { Set<String> set = props.stringPropertyNames(); Iterator<String> iter = set.iterator(); while (iter.hasNext...
/** Initialize the points. * @param jhove2 JHOVE2 framework * @throws JHOVE2Exception */
Initialize the points
init
{ "repo_name": "opf-labs/jhove2", "path": "src/main/java/org/jhove2/module/format/wave/bwf/field/PeakPoint.java", "license": "bsd-2-clause", "size": 5802 }
[ "java.util.Iterator", "java.util.Properties", "java.util.Set", "java.util.TreeSet", "org.jhove2.core.JHOVE2Exception" ]
import java.util.Iterator; import java.util.Properties; import java.util.Set; import java.util.TreeSet; import org.jhove2.core.JHOVE2Exception;
import java.util.*; import org.jhove2.core.*;
[ "java.util", "org.jhove2.core" ]
java.util; org.jhove2.core;
1,925,236
private void receiveMultiAction(List<Action<Row>> initialActions, MultiAction<Row> multiAction, HRegionLocation location, MultiResponse responses, int numAttempt, HConnectionManager.ServerErrorTracker errorsByServer)...
void function(List<Action<Row>> initialActions, MultiAction<Row> multiAction, HRegionLocation location, MultiResponse responses, int numAttempt, HConnectionManager.ServerErrorTracker errorsByServer) { assert responses != null; List<Action<Row>> toReplay = new ArrayList<Action<Row>>(); Throwable throwable = null; int fa...
/** * Called when we receive the result of a server query. * * @param initialActions - the whole action list * @param multiAction - the multiAction we sent * @param location - the location. It's used as a server name. * @param responses - the response, if any * @param numAttempt -...
Called when we receive the result of a server query
receiveMultiAction
{ "repo_name": "throughsky/lywebank", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java", "license": "apache-2.0", "size": 39014 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.HRegionLocation", "org.apache.hadoop.hbase.util.Pair" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HRegionLocation; import org.apache.hadoop.hbase.util.Pair;
import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,496,631
public boolean isConnectionValid(Connection conn) { try { return conn.isValid(5); } catch (Exception e) { return false; } }
boolean function(Connection conn) { try { return conn.isValid(5); } catch (Exception e) { return false; } }
/** * Checks if the given connection is still valid. * * @param conn * @return Returns true if the connection is valid. False, otherwise. */
Checks if the given connection is still valid
isConnectionValid
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.session.db/src/com/ibm/ws/session/store/db/DatabaseHandler.java", "license": "epl-1.0", "size": 1495 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,229,361
private void updateLocation() { if (collectLocation && locationListener != null) { Location lastLocation = locationListener.getLastLocation(); if (lastLocation != null) { params.setLocation(lastLocation); } } }
void function() { if (collectLocation && locationListener != null) { Location lastLocation = locationListener.getLastLocation(); if (lastLocation != null) { params.setLocation(lastLocation); } } }
/** * Update Location if autocollect is enabled. * If location autocollect is enabled, tries to get latest location from TuneLocationListener, * triggering an update if needed */
Update Location if autocollect is enabled. If location autocollect is enabled, tries to get latest location from TuneLocationListener, triggering an update if needed
updateLocation
{ "repo_name": "MobileAppTracking/sdk-release", "path": "sdk-android/TuneMarketingConsoleSDK/src/main/java/com/tune/TuneInternal.java", "license": "gpl-3.0", "size": 38933 }
[ "android.location.Location" ]
import android.location.Location;
import android.location.*;
[ "android.location" ]
android.location;
2,329,832
@Nonnull default IMPLTYPE setAttribute (@Nonnull final IMicroQName aAttrName, final boolean bAttrValue) { return setAttribute (aAttrName, Boolean.toString (bAttrValue)); }
default IMPLTYPE setAttribute (@Nonnull final IMicroQName aAttrName, final boolean bAttrValue) { return setAttribute (aAttrName, Boolean.toString (bAttrValue)); }
/** * Set an attribute value of this element. This is a shortcut for * <code>setAttribute(aAttrName, Boolean.toString (nValue))</code>. That * means, that the serialized value of the attribute is either * <code>true</code> or <code>false</code>. If you need something else (like * "yes" or "no") don't use...
Set an attribute value of this element. This is a shortcut for <code>setAttribute(aAttrName, Boolean.toString (nValue))</code>. That means, that the serialized value of the attribute is either <code>true</code> or <code>false</code>. If you need something else (like "yes" or "no") don't use this method
setAttribute
{ "repo_name": "phax/ph-commons", "path": "ph-xml/src/main/java/com/helger/xml/microdom/IMicroAttributeContainer.java", "license": "apache-2.0", "size": 33909 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,132,333
public void logMkDir(String path, INode newNode) { PermissionStatus permissions = newNode.getPermissionStatus(); MkdirOp op = MkdirOp.getInstance(cache.get()) .setInodeId(newNode.getId()) .setPath(path) .setTimestamp(newNode.getModificationTime()) .setPermissionStatus(permissions); ...
void function(String path, INode newNode) { PermissionStatus permissions = newNode.getPermissionStatus(); MkdirOp op = MkdirOp.getInstance(cache.get()) .setInodeId(newNode.getId()) .setPath(path) .setTimestamp(newNode.getModificationTime()) .setPermissionStatus(permissions); AclFeature f = newNode.getAclFeature(); if (...
/** * Add create directory record to edit log */
Add create directory record to edit log
logMkDir
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java", "license": "apache-2.0", "size": 50974 }
[ "org.apache.hadoop.fs.permission.PermissionStatus", "org.apache.hadoop.hdfs.server.namenode.FSEditLogOp" ]
import org.apache.hadoop.fs.permission.PermissionStatus; import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp;
import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hdfs.server.namenode.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,375,993
@ServiceMethod(returns = ReturnType.SINGLE) public Response<ApplicationGroupInner> getByResourceGroupWithResponse( String resourceGroupName, String applicationGroupName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) Response<ApplicationGroupInner> function( String resourceGroupName, String applicationGroupName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); }
/** * Get an application group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thro...
Get an application group
getByResourceGroupWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsClientImpl.java", "license": "mit", "size": 63975 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupInner" ]
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.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.desktopvirtualization.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,158,548
public List<BlogDto> list(Long blogId) { log.info("list, blogId: '{}' ", blogId); BlogExample blogExample = new BlogExample(); blogExample.setOrderByClause("name asc"); if(blogId != null) { blogExample .or() ....
List<BlogDto> function(Long blogId) { log.info(STR, blogId); BlogExample blogExample = new BlogExample(); blogExample.setOrderByClause(STR); if(blogId != null) { blogExample .or() .andBlogIdEqualTo(blogId); } List<Blog> blogs = blogMapper.selectByExample(blogExample); return mapperFacade.mapAsList(blogs, BlogDto.class)...
/** * list blogs, if blogId is not null, show the specific blog * @param blogId * @return */
list blogs, if blogId is not null, show the specific blog
list
{ "repo_name": "alphatan/workspace_java", "path": "spring-boot-web-mybatis-mariadb4j-demo/src/main/java/com/at/springboot/web/svr/BlogService.java", "license": "apache-2.0", "size": 3358 }
[ "com.at.springboot.mybatis.dto.BlogDto", "com.at.springboot.mybatis.po.Blog", "com.at.springboot.mybatis.po.BlogExample", "java.util.List" ]
import com.at.springboot.mybatis.dto.BlogDto; import com.at.springboot.mybatis.po.Blog; import com.at.springboot.mybatis.po.BlogExample; import java.util.List;
import com.at.springboot.mybatis.dto.*; import com.at.springboot.mybatis.po.*; import java.util.*;
[ "com.at.springboot", "java.util" ]
com.at.springboot; java.util;
2,160,543
public MediaHttpUploader setMetadata(HttpContent metadata) { this.metadata = metadata; return this; }
MediaHttpUploader function(HttpContent metadata) { this.metadata = metadata; return this; }
/** * Sets HTTP content metadata for the media request or {@code null} for * none. */
Sets HTTP content metadata for the media request or null for none
setMetadata
{ "repo_name": "roikku/drive-uploader", "path": "src/main/java/io/uploader/drive/drive/media/MediaHttpUploader.java", "license": "apache-2.0", "size": 35711 }
[ "com.google.api.client.http.HttpContent" ]
import com.google.api.client.http.HttpContent;
import com.google.api.client.http.*;
[ "com.google.api" ]
com.google.api;
1,755,735
@Test public void testPagedSearchtest29() throws Exception { getLdapServer().setMaxSizeLimit( 5 ); DirContext ctx = getWiredContext( getLdapServer(), "cn=user,ou=system", "secret" ); SearchControls controls = createSearchControls( ctx, 4, 3 ); doLoop( ctx, controls, 3, 2, 4,...
void function() throws Exception { getLdapServer().setMaxSizeLimit( 5 ); DirContext ctx = getWiredContext( getLdapServer(), STR, STR ); SearchControls controls = createSearchControls( ctx, 4, 3 ); doLoop( ctx, controls, 3, 2, 4, true ); }
/** * Admin = no <br> * SL = 5<br> * RL = 4<br> * PL = 3<br> * expected exception : yes<br> * expected number of entries returned : 4 ( 3 + 1 )<br> */
Admin = no SL = 5 RL = 4 PL = 3 expected exception : yes expected number of entries returned : 4 ( 3 + 1 )
testPagedSearchtest29
{ "repo_name": "drankye/directory-server", "path": "server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java", "license": "apache-2.0", "size": 36622 }
[ "javax.naming.directory.DirContext", "javax.naming.directory.SearchControls", "org.apache.directory.server.integ.ServerIntegrationUtils" ]
import javax.naming.directory.DirContext; import javax.naming.directory.SearchControls; import org.apache.directory.server.integ.ServerIntegrationUtils;
import javax.naming.directory.*; import org.apache.directory.server.integ.*;
[ "javax.naming", "org.apache.directory" ]
javax.naming; org.apache.directory;
1,248,159
public T caseIBeXEdge(IBeXEdge object) { return null; }
T function(IBeXEdge object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>IBe XEdge</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result o...
Returns the result of interpreting the object as an instance of 'IBe XEdge'. This implementation returns null; returning a non-null result will terminate the switch.
caseIBeXEdge
{ "repo_name": "eMoflon/emoflon-ibex", "path": "org.emoflon.ibex.patternmodel/src-gen/org/emoflon/ibex/patternmodel/IBeXPatternModel/util/IBeXPatternModelSwitch.java", "license": "gpl-3.0", "size": 43736 }
[ "org.emoflon.ibex.patternmodel.IBeXPatternModel" ]
import org.emoflon.ibex.patternmodel.IBeXPatternModel;
import org.emoflon.ibex.patternmodel.*;
[ "org.emoflon.ibex" ]
org.emoflon.ibex;
81,169
public static void showNoNetworkDialog(Activity activity) { showAlertDialog(activity, R.string.network_na); }
static void function(Activity activity) { showAlertDialog(activity, R.string.network_na); }
/** * Display a network unavailable dialog * @param activity The current activity */
Display a network unavailable dialog
showNoNetworkDialog
{ "repo_name": "ibuttimer/moviequest", "path": "app/src/main/java/ie/ianbuttimer/moviequest/utils/Dialog.java", "license": "gpl-3.0", "size": 10271 }
[ "android.app.Activity" ]
import android.app.Activity;
import android.app.*;
[ "android.app" ]
android.app;
2,142,812
public boolean isIgnored() { NodeMonitor m = ComputerSet.getMonitors().get(this); return m == null || m.isIgnored(); }
boolean function() { NodeMonitor m = ComputerSet.getMonitors().get(this); return m == null m.isIgnored(); }
/** * Is this monitor currently ignored? */
Is this monitor currently ignored
isIgnored
{ "repo_name": "sap-production/hudson-3.x", "path": "hudson-core/src/main/java/hudson/node_monitors/AbstractNodeMonitorDescriptor.java", "license": "apache-2.0", "size": 7122 }
[ "hudson.model.ComputerSet" ]
import hudson.model.ComputerSet;
import hudson.model.*;
[ "hudson.model" ]
hudson.model;
1,019,820
public boolean matches(String aString, String patternString) throws MalformedPatternException { return this.matches(aString, patternString, true); }
boolean function(String aString, String patternString) throws MalformedPatternException { return this.matches(aString, patternString, true); }
/** * Returns true if the compiled version of the patternString regular * expression argument matches the aString argument. * Case sensitive * * @param aString a string * @param patternString a string pattern * @return returns true if the compiled version of the patternString r...
Returns true if the compiled version of the patternString regular expression argument matches the aString argument. Case sensitive
matches
{ "repo_name": "nomakaFr/ofbiz_ynh", "path": "sources/framework/base/src/org/ofbiz/base/util/CompilerMatcher.java", "license": "apache-2.0", "size": 6310 }
[ "org.apache.oro.text.regex.MalformedPatternException" ]
import org.apache.oro.text.regex.MalformedPatternException;
import org.apache.oro.text.regex.*;
[ "org.apache.oro" ]
org.apache.oro;
1,719,166
void closeIterator(Iterator it) throws DataAccessException;
void closeIterator(Iterator it) throws DataAccessException;
/** * Immediately close an {@link Iterator} created by any of the various * <code>iterate(..)</code> operations, instead of waiting until the * session is closed or disconnected. * @param it the <code>Iterator</code> to close * @throws DataAccessException if the <code>Iterator</code> could not be closed * @...
Immediately close an <code>Iterator</code> created by any of the various <code>iterate(..)</code> operations, instead of waiting until the session is closed or disconnected
closeIterator
{ "repo_name": "cbeams-archive/spring-framework-2.5.x", "path": "src/org/springframework/orm/hibernate3/HibernateOperations.java", "license": "apache-2.0", "size": 44752 }
[ "java.util.Iterator", "org.springframework.dao.DataAccessException" ]
import java.util.Iterator; import org.springframework.dao.DataAccessException;
import java.util.*; import org.springframework.dao.*;
[ "java.util", "org.springframework.dao" ]
java.util; org.springframework.dao;
122,156
@ApiModelProperty( value = "The text displayed on the Pay Now button in Xero Online Invoicing. If this is not set" + " it will default to Pay by credit card") public String getPayNowText() { return payNowText; }
@ApiModelProperty( value = STR + STR) String function() { return payNowText; }
/** * The text displayed on the Pay Now button in Xero Online Invoicing. If this is not set it will * default to Pay by credit card * * @return payNowText */
The text displayed on the Pay Now button in Xero Online Invoicing. If this is not set it will default to Pay by credit card
getPayNowText
{ "repo_name": "SidneyAllen/Xero-Java", "path": "src/main/java/com/xero/models/accounting/PaymentService.java", "license": "mit", "size": 6604 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
603,342
public void consumeAsync(List<Purchase> purchases, OnConsumeMultiFinishedListener listener) { checkNotDisposed(); checkSetupDone("consume"); consumeAsyncInternal(purchases, null, listener); }
void function(List<Purchase> purchases, OnConsumeMultiFinishedListener listener) { checkNotDisposed(); checkSetupDone(STR); consumeAsyncInternal(purchases, null, listener); }
/** * Same as {@link consumeAsync}, but for multiple items at once. * @param purchases The list of PurchaseInfo objects representing the purchases to consume. * @param listener The listener to notify when the consumption operation finishes. */
Same as <code>consumeAsync</code>, but for multiple items at once
consumeAsync
{ "repo_name": "sssemil/Advanced-Settings-for-Android-Wear", "path": "mobile/src/main/java/com/sssemil/advancedsettings/util/IabHelper.java", "license": "gpl-3.0", "size": 44372 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,630,047
public static double[] getOLSRegression(XYDataset data, int series) { int n = data.getItemCount(series); if (n < 2) { throw new IllegalArgumentException("Not enough data."); } double sumX = 0; double sumY = 0; double sumXX = 0; double sumXY = 0; ...
static double[] function(XYDataset data, int series) { int n = data.getItemCount(series); if (n < 2) { throw new IllegalArgumentException(STR); } double sumX = 0; double sumY = 0; double sumXX = 0; double sumXY = 0; for (int i = 0; i < n; i++) { double x = data.getXValue(series, i); double y = data.getYValue(series, i)...
/** * Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to * the data using ordinary least squares regression. The result is returned * as a double[], where result[0] --> a, and result[1] --> b. * * @param data the data. * @param series the series (zero-based index). ...
Returns the parameters 'a' and 'b' for an equation y = a + bx, fitted to the data using ordinary least squares regression. The result is returned as a double[], where result[0] --> a, and result[1] --> b
getOLSRegression
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-chart/jfreechat.src/org/jfree/data/statistics/Regression.java", "license": "lgpl-3.0", "size": 12808 }
[ "org.jfree.data.xy.XYDataset" ]
import org.jfree.data.xy.XYDataset;
import org.jfree.data.xy.*;
[ "org.jfree.data" ]
org.jfree.data;
1,315,740
public static Set<Entitlement> getBaseEntitlements() { return Collections.unmodifiableSet(BASE_ENTITLEMENTS); }
static Set<Entitlement> function() { return Collections.unmodifiableSet(BASE_ENTITLEMENTS); }
/** * Returns the static set of base entitlements. * @return Unmodifiable set. */
Returns the static set of base entitlements
getBaseEntitlements
{ "repo_name": "davidhrbac/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/entitlement/EntitlementManager.java", "license": "gpl-2.0", "size": 6500 }
[ "com.redhat.rhn.domain.entitlement.Entitlement", "java.util.Collections", "java.util.Set" ]
import com.redhat.rhn.domain.entitlement.Entitlement; import java.util.Collections; import java.util.Set;
import com.redhat.rhn.domain.entitlement.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
839,459
public static Charset defaultCharset() { String encoding; try { encoding = SystemProperties.getProperty("file.encoding"); } catch(SecurityException e) { // Use fallback. encoding = "ISO-8859-1"; } catch(IllegalArgumentException e) { // U...
static Charset function() { String encoding; try { encoding = SystemProperties.getProperty(STR); } catch(SecurityException e) { encoding = STR; } catch(IllegalArgumentException e) { encoding = STR; } try { return forName(encoding); } catch(UnsupportedCharsetException e) { } catch(IllegalCharsetNameException e) { } catc...
/** * Returns the system default charset. * * This may be set by the user or VM with the file.encoding * property. * * @since 1.5 */
Returns the system default charset. This may be set by the user or VM with the file.encoding property
defaultCharset
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/nio/charset/Charset.java", "license": "gpl-2.0", "size": 11028 }
[ "gnu.classpath.SystemProperties" ]
import gnu.classpath.SystemProperties;
import gnu.classpath.*;
[ "gnu.classpath" ]
gnu.classpath;
2,807,277