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
@Override protected Process createProcess() { Process aProcess = new Process(get(NAME)); int nMax = aSteps.size() - 1; assert nMax >= 0 : "Empty process definition"; ObjectRelations.copyRelations(this, aProcess, true); for (int i = 0; i <= nMax; i++) { StepListEntry rEntry = aSteps.get...
Process function() { Process aProcess = new Process(get(NAME)); int nMax = aSteps.size() - 1; assert nMax >= 0 : STR; ObjectRelations.copyRelations(this, aProcess, true); for (int i = 0; i <= nMax; i++) { StepListEntry rEntry = aSteps.get(i); ProcessStep aStep = rEntry.createStep(); String sNextStep = rEntry.sNextStep;...
/*************************************** * Creates a new process instance that contains the process steps defined in * the process step list of this process definition. * * @return The new process instance * * @throws ProcessException If creating the process fails */
Creates a new process instance that contains the process steps defined in the process step list of this process definition
createProcess
{ "repo_name": "esoco/esoco-business", "path": "src/main/java/de/esoco/process/StepListProcessDefinition.java", "license": "apache-2.0", "size": 44932 }
[ "org.obrel.core.ObjectRelations" ]
import org.obrel.core.ObjectRelations;
import org.obrel.core.*;
[ "org.obrel.core" ]
org.obrel.core;
56,268
private Optional<String> parseDocumentation() { this.scanner.acceptWhitespace(); // TODO: documentation return empty(); }
Optional<String> function() { this.scanner.acceptWhitespace(); return empty(); }
/** * Parses a documentation comment. * * @return the documentation parsed. */
Parses a documentation comment
parseDocumentation
{ "repo_name": "martin-nordberg/steamflake", "path": "steamflake-templates/domain/steamflake-template-parser/src/main/java/org/steamflake/templates/domain/parser/impl/SteamflakeTmTemplateParser.java", "license": "apache-2.0", "size": 14508 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
1,054,334
public static String[] registryGetKeys(HKEY root, String keyPath) { HKEYByReference phkKey = new HKEYByReference(); int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Excep...
static String[] function(HKEY root, String keyPath) { HKEYByReference phkKey = new HKEYByReference(); int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } try { return registryGetKeys(phkKey.getValue...
/** * Get names of the registry key's sub-keys. * * @param root Root key. * @param keyPath Path to a registry key. * @return Array of registry key names. */
Get names of the registry key's sub-keys
registryGetKeys
{ "repo_name": "realmaster42/jpexs-decompiler", "path": "src/com/sun/jna/platform/win32/Advapi32Util.java", "license": "gpl-3.0", "size": 36138 }
[ "com.sun.jna.platform.win32.WinReg" ]
import com.sun.jna.platform.win32.WinReg;
import com.sun.jna.platform.win32.*;
[ "com.sun.jna" ]
com.sun.jna;
2,394,496
public Map<Good, Integer> getSellLoad() { if (sellLoad != null) { return new HashMap<>(sellLoad); } else { return Collections.emptyMap(); } }
Map<Good, Integer> function() { if (sellLoad != null) { return new HashMap<>(sellLoad); } else { return Collections.emptyMap(); } }
/** * Gets the load that is being sold in the trade. * * @return sell load. */
Gets the load that is being sold in the trade
getSellLoad
{ "repo_name": "mars-sim/mars-sim", "path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/Delivery.java", "license": "gpl-3.0", "size": 20125 }
[ "java.util.Collections", "java.util.HashMap", "java.util.Map", "org.mars_sim.msp.core.structure.goods.Good" ]
import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.mars_sim.msp.core.structure.goods.Good;
import java.util.*; import org.mars_sim.msp.core.structure.goods.*;
[ "java.util", "org.mars_sim.msp" ]
java.util; org.mars_sim.msp;
1,917,444
public static void closeStream(Closeable stream) { if (stream != null) { try { stream.close(); } catch (IOException e) { Log.e(TAG, "Error closing stream!", e); } } }
static void function(Closeable stream) { if (stream != null) { try { stream.close(); } catch (IOException e) { Log.e(TAG, STR, e); } } }
/** * Util method to close a stream */
Util method to close a stream
closeStream
{ "repo_name": "ProgDan/IBMorumbi", "path": "Android/IBMorumbiTV/src/com/progdan/ibmorumbitv/asbuilibrary/util/Utils.java", "license": "gpl-3.0", "size": 1944 }
[ "android.util.Log", "java.io.Closeable", "java.io.IOException" ]
import android.util.Log; import java.io.Closeable; import java.io.IOException;
import android.util.*; import java.io.*;
[ "android.util", "java.io" ]
android.util; java.io;
1,153,189
private IgniteFuture<Void> dotnetDeployAsync(BinaryRawReaderEx reader, IgniteServices services) { ServiceConfiguration cfg = dotnetConfiguration(reader); return services.deployAsync(cfg); }
IgniteFuture<Void> function(BinaryRawReaderEx reader, IgniteServices services) { ServiceConfiguration cfg = dotnetConfiguration(reader); return services.deployAsync(cfg); }
/** * Deploys dotnet service asynchronously. * * @param reader Binary reader. * @param services Services. * @return Future of the operation. */
Deploys dotnet service asynchronously
dotnetDeployAsync
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformServices.java", "license": "apache-2.0", "size": 26239 }
[ "org.apache.ignite.IgniteServices", "org.apache.ignite.internal.binary.BinaryRawReaderEx", "org.apache.ignite.lang.IgniteFuture", "org.apache.ignite.services.ServiceConfiguration" ]
import org.apache.ignite.IgniteServices; import org.apache.ignite.internal.binary.BinaryRawReaderEx; import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.services.ServiceConfiguration;
import org.apache.ignite.*; import org.apache.ignite.internal.binary.*; import org.apache.ignite.lang.*; import org.apache.ignite.services.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,488,857
public TableGenerator<T> name(String name) { childNode.attribute("name", name); return this; }
TableGenerator<T> function(String name) { childNode.attribute("name", name); return this; }
/** * Sets the <code>name</code> attribute * @param name the value for the attribute <code>name</code> * @return the current instance of <code>TableGenerator<T></code> */
Sets the <code>name</code> attribute
name
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/orm20/TableGeneratorImpl.java", "license": "epl-1.0", "size": 16673 }
[ "org.jboss.shrinkwrap.descriptor.api.orm20.TableGenerator" ]
import org.jboss.shrinkwrap.descriptor.api.orm20.TableGenerator;
import org.jboss.shrinkwrap.descriptor.api.orm20.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
1,275,500
protected QueryTransformer exclude(String ... texts) { this.m_exclude.addAll(Arrays.asList(texts)); return this; }
QueryTransformer function(String ... texts) { this.m_exclude.addAll(Arrays.asList(texts)); return this; }
/** Specifies one or more strings whose appearance in the group means * that this group should not be changed (e.g. "TRUNC", so as not to * wrap TRUNC around the same group twice); default is an empty list * of strings, in which case it is ignored. */
Specifies one or more strings whose appearance in the group means that this group should not be changed (e.g. "TRUNC", so as not to wrap TRUNC around the same group twice); default is an empty list
exclude
{ "repo_name": "deerwalk/voltdb", "path": "src/frontend/org/voltdb/NonVoltDBBackend.java", "license": "agpl-3.0", "size": 49004 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,708,664
setXhtmlDoc(doc); feedKeyList = new ArrayList<String>(); attrValueCache.put(Analyzer.ATTR_NAME_TITLE, feedKeyList); }
setXhtmlDoc(doc); feedKeyList = new ArrayList<String>(); attrValueCache.put(Analyzer.ATTR_NAME_TITLE, feedKeyList); }
/** * Sets document and creates the NodeIterator for the given XHTML DOM document.<br> * @param doc The document to be analyzed */
Sets document and creates the NodeIterator for the given XHTML DOM document
init
{ "repo_name": "andreacastello/netbeans-hatom-plugin", "path": "src/it/pronetics/madstore/hatom/netbeans/validator/engine/HfeedAnalyzer.java", "license": "apache-2.0", "size": 10096 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,741,917
public void updateNodeResource(RMNode nm, ResourceOption resourceOption) { try { writeLock.lock(); SchedulerNode node = getSchedulerNode(nm.getNodeID()); Resource newResource = resourceOption.getResource(); Resource oldResource = node.getTotalResource(); if (!oldResource.equals...
void function(RMNode nm, ResourceOption resourceOption) { try { writeLock.lock(); SchedulerNode node = getSchedulerNode(nm.getNodeID()); Resource newResource = resourceOption.getResource(); Resource oldResource = node.getTotalResource(); if (!oldResource.equals(newResource)) { rmContext.getNodeLabelManager().updateNode...
/** * Process resource update on a node. */
Process resource update on a node
updateNodeResource
{ "repo_name": "WIgor/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/AbstractYarnScheduler.java", "license": "apache-2.0", "size": 48661 }
[ "org.apache.hadoop.yarn.api.records.Resource", "org.apache.hadoop.yarn.api.records.ResourceOption", "org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode" ]
import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.api.records.ResourceOption; import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.rmnode.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,390,840
public HttpURLConnection addAuthenticationHeaders(HttpURLConnection connection);
HttpURLConnection function(HttpURLConnection connection);
/** * Adds authorisation headers to the given request. Typically this will involve adding a * key-value pair to the headers with the "Authorization" key. Returns the given request with * the authorisation headers added. */
Adds authorisation headers to the given request. Typically this will involve adding a key-value pair to the headers with the "Authorization" key. Returns the given request with the authorisation headers added
addAuthenticationHeaders
{ "repo_name": "tmccarthy/ANewReader", "path": "ANewReader/src/main/java/au/id/tmm/anewreader/utility/network/AuthenticationHelper.java", "license": "gpl-3.0", "size": 1505 }
[ "java.net.HttpURLConnection" ]
import java.net.HttpURLConnection;
import java.net.*;
[ "java.net" ]
java.net;
2,043,264
public static String getTimeFormat() { final IEclipsePreferences preferenceNode = DefaultScope.INSTANCE.getNode("org.csstudio.java"); String format = preferenceNode.get("custom_datetime_formatter_pattern", "yyyy-MM-dd'T'HH:mmX"); final IPreferencesService service = Platform.getPreferencesSe...
static String function() { final IEclipsePreferences preferenceNode = DefaultScope.INSTANCE.getNode(STR); String format = preferenceNode.get(STR, STR); final IPreferencesService service = Platform.getPreferencesService(); if (service != null) format = service.getString(Activator.ID, Preferences.TIME_FORMAT, format, nul...
/** * Gets the default time format. * * @return default time format. */
Gets the default time format
getTimeFormat
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "applications/alarm/alarm-plugins/org.csstudio.alarm.beast.msghist/src/org/csstudio/alarm/beast/msghist/Preferences.java", "license": "epl-1.0", "size": 6096 }
[ "org.eclipse.core.runtime.Platform", "org.eclipse.core.runtime.preferences.DefaultScope", "org.eclipse.core.runtime.preferences.IEclipsePreferences", "org.eclipse.core.runtime.preferences.IPreferencesService" ]
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.DefaultScope; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.IPreferencesService;
import org.eclipse.core.runtime.*; import org.eclipse.core.runtime.preferences.*;
[ "org.eclipse.core" ]
org.eclipse.core;
219,557
public void testParsePort() throws Exception { CookieSpec cookiespec = new RFC2965Spec(); Header header = new Header("Set-Cookie2", "name=value;Port=\"80,800,8000\";Version=1;Port=nonsense"); Cookie[] parsed = cookiespec.parse("www.domain.com", 80, "/", false, header); assertNotNull(...
void function() throws Exception { CookieSpec cookiespec = new RFC2965Spec(); Header header = new Header(STR, STR80,800,8000\STR); Cookie[] parsed = cookiespec.parse(STR, 80, "/", false, header); assertNotNull(parsed); assertEquals(1, parsed.length); Cookie2 cookie = (Cookie2) parsed[0]; int[] ports = cookie.getPorts()...
/** * Test parsing cookie <tt>"Port"</tt> attribute. */
Test parsing cookie "Port" attribute
testParsePort
{ "repo_name": "huainiu/commons-httpclient-3.1", "path": "src/test/org/apache/commons/httpclient/cookie/TestCookieRFC2965Spec.java", "license": "apache-2.0", "size": 37113 }
[ "org.apache.commons.httpclient.Cookie", "org.apache.commons.httpclient.Header" ]
import org.apache.commons.httpclient.Cookie; import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.*;
[ "org.apache.commons" ]
org.apache.commons;
1,728,667
int updateByExample(@Param("record") MonitorItem record, @Param("example") MonitorItemExample example);
int updateByExample(@Param(STR) MonitorItem record, @Param(STR) MonitorItemExample example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_monitor_item * * @mbg.generated Sat Feb 09 11:42:26 CST 2019 */
This method was generated by MyBatis Generator. This method corresponds to the database table m_monitor_item
updateByExample
{ "repo_name": "esofthead/mycollab", "path": "mycollab-services/src/main/java/com/mycollab/common/dao/MonitorItemMapper.java", "license": "agpl-3.0", "size": 4064 }
[ "com.mycollab.common.domain.MonitorItem", "com.mycollab.common.domain.MonitorItemExample", "org.apache.ibatis.annotations.Param" ]
import com.mycollab.common.domain.MonitorItem; import com.mycollab.common.domain.MonitorItemExample; import org.apache.ibatis.annotations.Param;
import com.mycollab.common.domain.*; import org.apache.ibatis.annotations.*;
[ "com.mycollab.common", "org.apache.ibatis" ]
com.mycollab.common; org.apache.ibatis;
2,148,926
private PieData getEmptyData() { PieDataSet dataSet = new PieDataSet(null, getResources().getString(R.string.label_chart_no_data)); dataSet.addEntry(new Entry(1, 0)); dataSet.setColor(PieChartFragment.NO_DATA_COLOR); dataSet.setDrawValues(false); return new PieData(Collection...
PieData function() { PieDataSet dataSet = new PieDataSet(null, getResources().getString(R.string.label_chart_no_data)); dataSet.addEntry(new Entry(1, 0)); dataSet.setColor(PieChartFragment.NO_DATA_COLOR); dataSet.setDrawValues(false); return new PieData(Collections.singletonList(""), dataSet); }
/** * Returns a data object that represents situation when no user data available * @return a {@code PieData} instance for situation when no user data available */
Returns a data object that represents situation when no user data available
getEmptyData
{ "repo_name": "codinguser/gnucash-android", "path": "app/src/main/java/org/gnucash/android/ui/report/ReportsOverviewFragment.java", "license": "apache-2.0", "size": 10667 }
[ "com.github.mikephil.charting.data.Entry", "com.github.mikephil.charting.data.PieData", "com.github.mikephil.charting.data.PieDataSet", "java.util.Collections", "org.gnucash.android.ui.report.piechart.PieChartFragment" ]
import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.PieData; import com.github.mikephil.charting.data.PieDataSet; import java.util.Collections; import org.gnucash.android.ui.report.piechart.PieChartFragment;
import com.github.mikephil.charting.data.*; import java.util.*; import org.gnucash.android.ui.report.piechart.*;
[ "com.github.mikephil", "java.util", "org.gnucash.android" ]
com.github.mikephil; java.util; org.gnucash.android;
618,471
private static BufferedInputStream getBufferedReadContentStream(AbstractFile file) { return new BufferedInputStream(new ReadContentInputStream(file)); }
static BufferedInputStream function(AbstractFile file) { return new BufferedInputStream(new ReadContentInputStream(file)); }
/** * Get a BufferedInputStream wrapped around a ReadContentStream for the * given AbstractFile. * * @param file The AbstractFile to get a stream for. * * @return A BufferedInputStream wrapped around a ReadContentStream for the * given AbstractFile */
Get a BufferedInputStream wrapped around a ReadContentStream for the given AbstractFile
getBufferedReadContentStream
{ "repo_name": "APriestman/autopsy", "path": "Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java", "license": "apache-2.0", "size": 42008 }
[ "java.io.BufferedInputStream", "org.sleuthkit.datamodel.AbstractFile", "org.sleuthkit.datamodel.ReadContentInputStream" ]
import java.io.BufferedInputStream; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.ReadContentInputStream;
import java.io.*; import org.sleuthkit.datamodel.*;
[ "java.io", "org.sleuthkit.datamodel" ]
java.io; org.sleuthkit.datamodel;
631,519
@Test public void whenUpdateItem() { Tracker tracker = new Tracker(); Item previous = tracker.addItem( new Item("1", "Alec", "desc", 25L, new String[]{"aaaaa", "bbbbb"})); tracker.update( new Item(previous.getId(), "Anna", "desc", 21L, new String[]{"ccccc"...
void function() { Tracker tracker = new Tracker(); Item previous = tracker.addItem( new Item("1", "Alec", "desc", 25L, new String[]{"aaaaa", "bbbbb"})); tracker.update( new Item(previous.getId(), "Anna", "desc", 21L, new String[]{"ccccc", STR})); assertThat(tracker.findById(previous.getId()).getName(), is("Anna")); }
/** * Test for Method update(). */
Test for Method update()
whenUpdateItem
{ "repo_name": "AlSidorenko/Junior", "path": "chapter_003/src/test/java/ru/job4j/changetracker/encapsulation/TrackerTest.java", "license": "apache-2.0", "size": 2701 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
2,836,502
public static NativeObject init(ScriptableObject scope) { Context context = Context.getCurrentContext(); if (context == null) { throw ScriptRuntime.constructError("Error", "No context associated with current thread"); } NativeObject wkt = (Na...
static NativeObject function(ScriptableObject scope) { Context context = Context.getCurrentContext(); if (context == null) { throw ScriptRuntime.constructError("Error", STR); } NativeObject wkt = (NativeObject) context.newObject(scope); wkt.defineFunctionProperties(new String[] { "read", "write" }, WKT.class, Scriptabl...
/** * Create object with read/write methods. * @param scope * @return */
Create object with read/write methods
init
{ "repo_name": "jericks/geoscript-js", "path": "src/main/java/org/geoscript/js/io/WKT.java", "license": "mit", "size": 3125 }
[ "org.mozilla.javascript.Context", "org.mozilla.javascript.NativeObject", "org.mozilla.javascript.ScriptRuntime", "org.mozilla.javascript.ScriptableObject" ]
import org.mozilla.javascript.Context; import org.mozilla.javascript.NativeObject; import org.mozilla.javascript.ScriptRuntime; import org.mozilla.javascript.ScriptableObject;
import org.mozilla.javascript.*;
[ "org.mozilla.javascript" ]
org.mozilla.javascript;
2,062,527
public Set<C> getConditions(P place);
Set<C> function(P place);
/** * Get conditions of this branching process that correspond to a given place in the originative net system. * * @return Conditions of this branching process that correspond to the given place. */
Get conditions of this branching process that correspond to a given place in the originative net system
getConditions
{ "repo_name": "jbpt/codebase", "path": "jbpt-petri/src/main/java/org/jbpt/petri/unfolding/IBranchingProcess.java", "license": "lgpl-3.0", "size": 7152 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
329,332
public double getAverageLoad() { int totalLoad = 0; int numServers = 0; double averageLoad = 0.0; synchronized (serversToLoad) { numServers = serversToLoad.size(); for (HServerLoad load : serversToLoad.values()) { totalLoad += load.getNumberOfRegions(); } averageLoad = ...
double function() { int totalLoad = 0; int numServers = 0; double averageLoad = 0.0; synchronized (serversToLoad) { numServers = serversToLoad.size(); for (HServerLoad load : serversToLoad.values()) { totalLoad += load.getNumberOfRegions(); } averageLoad = (double)totalLoad / (double)numServers; } return averageLoad; }
/** * Compute the average load across all region servers. * Currently, this uses a very naive computation - just uses the number of * regions being served, ignoring stats about number of requests. * @return the average load */
Compute the average load across all region servers. Currently, this uses a very naive computation - just uses the number of regions being served, ignoring stats about number of requests
getAverageLoad
{ "repo_name": "lichongxin/hbase-snapshot", "path": "src/main/java/org/apache/hadoop/hbase/master/ServerManager.java", "license": "apache-2.0", "size": 34872 }
[ "org.apache.hadoop.hbase.HServerLoad" ]
import org.apache.hadoop.hbase.HServerLoad;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
566,931
@GET @Path("/{roleName}/config") public ApiConfigList readRoleConfig( @PathParam(ROLE_NAME) String roleName, @QueryParam(DATA_VIEW) @DefaultValue(DATA_VIEW_DEFAULT) DataView dataView);
@Path(STR) ApiConfigList function( @PathParam(ROLE_NAME) String roleName, @QueryParam(DATA_VIEW) @DefaultValue(DATA_VIEW_DEFAULT) DataView dataView);
/** * Retrieve the configuration of a specific Cloudera Management Services role. * * @param roleName The role to look up. * @param dataView The view of the data to materialize, * either "summary" or "full". * @return List with configured and available configuration options. */
Retrieve the configuration of a specific Cloudera Management Services role
readRoleConfig
{ "repo_name": "justinhayes/cm_api", "path": "java/src/main/java/com/cloudera/api/v1/MgmtRolesResource.java", "license": "apache-2.0", "size": 4432 }
[ "com.cloudera.api.DataView", "com.cloudera.api.model.ApiConfigList", "javax.ws.rs.DefaultValue", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.QueryParam" ]
import com.cloudera.api.DataView; import com.cloudera.api.model.ApiConfigList; import javax.ws.rs.DefaultValue; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.QueryParam;
import com.cloudera.api.*; import com.cloudera.api.model.*; import javax.ws.rs.*;
[ "com.cloudera.api", "javax.ws" ]
com.cloudera.api; javax.ws;
884,980
private List getHeaders(List<PublicationPK> pubPKs) { PublicationDetail pubDetail = null; List<PublicationDetail> headers = new ArrayList<PublicationDetail>(); try { List<PublicationDetail> publicationDetails = new ArrayList<PublicationDetail>(getPublicationBm().getPublications(pubPKs)); ...
List function(List<PublicationPK> pubPKs) { PublicationDetail pubDetail = null; List<PublicationDetail> headers = new ArrayList<PublicationDetail>(); try { List<PublicationDetail> publicationDetails = new ArrayList<PublicationDetail>(getPublicationBm().getPublications(pubPKs)); for (int i = 0; i < publicationDetails.si...
/** * return a list of silverContent according to a list of publicationPK * @param pubPKs a list of publicationPK * @return a list of publicationDetail */
return a list of silverContent according to a list of publicationPK
getHeaders
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Components", "path": "quickinfo/quickinfo-jar/src/main/java/com/stratelia/webactiv/quickinfo/QuickInfoContentManager.java", "license": "agpl-3.0", "size": 8980 }
[ "com.stratelia.webactiv.util.publication.model.PublicationDetail", "com.stratelia.webactiv.util.publication.model.PublicationPK", "java.rmi.RemoteException", "java.util.ArrayList", "java.util.List" ]
import com.stratelia.webactiv.util.publication.model.PublicationDetail; import com.stratelia.webactiv.util.publication.model.PublicationPK; import java.rmi.RemoteException; import java.util.ArrayList; import java.util.List;
import com.stratelia.webactiv.util.publication.model.*; import java.rmi.*; import java.util.*;
[ "com.stratelia.webactiv", "java.rmi", "java.util" ]
com.stratelia.webactiv; java.rmi; java.util;
1,443,132
@IntRange(from = 0) public int getRunAttemptCount() { return mRunAttemptCount; }
@IntRange(from = 0) int function() { return mRunAttemptCount; }
/** * Gets the current run attempt count for this work. Note that for periodic work, this value * gets reset between periods. * * @return The current run attempt count for this work. */
Gets the current run attempt count for this work. Note that for periodic work, this value gets reset between periods
getRunAttemptCount
{ "repo_name": "AndroidX/androidx", "path": "work/work-runtime/src/main/java/androidx/work/WorkerParameters.java", "license": "apache-2.0", "size": 6802 }
[ "androidx.annotation.IntRange" ]
import androidx.annotation.IntRange;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,120,477
public ColumnType type() { return column.type(); }//End Method
ColumnType function() { return column.type(); }
/** * Access to the {@link Column#type()}. * @return the {@link ColumnType}. */
Access to the <code>Column#type()</code>
type
{ "repo_name": "DanGrew/JttWs", "path": "JttWs/src/main/java/uk/dangrew/jttws/core/jobtable/web/PageColumn.java", "license": "apache-2.0", "size": 3396 }
[ "uk.dangrew.jttws.core.jobtable.structure.ColumnType" ]
import uk.dangrew.jttws.core.jobtable.structure.ColumnType;
import uk.dangrew.jttws.core.jobtable.structure.*;
[ "uk.dangrew.jttws" ]
uk.dangrew.jttws;
1,950,296
protected ContextualStorage getContextualStorage(boolean createIfNotExist, String clientWindowFlowId) { //FacesContext facesContext = FacesContext.getCurrentInstance(); //String clientWindowFlowId = getCurrentClientWindowFlowId(facesContext); if (clientWindowFlowId == null) { ...
ContextualStorage function(boolean createIfNotExist, String clientWindowFlowId) { if (clientWindowFlowId == null) { throw new ContextNotActiveException(STR); } if (createIfNotExist) { return getFlowScopeBeanHolder().getContextualStorage(beanManager, clientWindowFlowId); } else { return getFlowScopeBeanHolder().getConte...
/** * An implementation has to return the underlying storage which * contains the items held in the Context. * @param createIfNotExist whether a ContextualStorage shall get created if it doesn't yet exist. * @return the underlying storage */
An implementation has to return the underlying storage which contains the items held in the Context
getContextualStorage
{ "repo_name": "kulinski/myfaces", "path": "impl/src/main/java/org/apache/myfaces/flow/cdi/FlowScopedContextImpl.java", "license": "apache-2.0", "size": 15629 }
[ "javax.enterprise.context.ContextNotActiveException", "org.apache.myfaces.cdi.util.ContextualStorage" ]
import javax.enterprise.context.ContextNotActiveException; import org.apache.myfaces.cdi.util.ContextualStorage;
import javax.enterprise.context.*; import org.apache.myfaces.cdi.util.*;
[ "javax.enterprise", "org.apache.myfaces" ]
javax.enterprise; org.apache.myfaces;
1,493,710
public double MSE() { ImageProcessor ip1Temp = ip1.duplicate(); ip1Temp.copyBits(ip2, 0, 0, ShortBlitter.SUBTRACT); return LibUtilities.sumOfSquares( ip1Temp ) / LibUtilities.area( ip1 ); }
double function() { ImageProcessor ip1Temp = ip1.duplicate(); ip1Temp.copyBits(ip2, 0, 0, ShortBlitter.SUBTRACT); return LibUtilities.sumOfSquares( ip1Temp ) / LibUtilities.area( ip1 ); }
/** * The MSE (= Mean Square Error) is defined as * MSE(X,Y) = sum_i(Yi-Xi)^2 / N * * @return Mean Square Error */
The MSE (= Mean Square Error) is defined as MSE(X,Y) = sum_i(Yi-Xi)^2 / N
MSE
{ "repo_name": "mbarbie1/region-selection", "path": "src/be/ua/mbarbier/rese/error/LibError.java", "license": "mit", "size": 6281 }
[ "be.ua.mbarbier.rese.image.LibUtilities" ]
import be.ua.mbarbier.rese.image.LibUtilities;
import be.ua.mbarbier.rese.image.*;
[ "be.ua.mbarbier" ]
be.ua.mbarbier;
2,817,508
public Topology getTopology() { if (!PAResourceManagerProperties.RM_TOPOLOGY_ENABLED.getValueAsBoolean()) { throw new TopologyException("Topology is disabled"); } try { rwLock.readLock().lock(); return (Topology) ((TopologyImpl) topology).clone(); ...
Topology function() { if (!PAResourceManagerProperties.RM_TOPOLOGY_ENABLED.getValueAsBoolean()) { throw new TopologyException(STR); } try { rwLock.readLock().lock(); return (Topology) ((TopologyImpl) topology).clone(); } finally { rwLock.readLock().unlock(); } }
/** * Returns the topology representation. As the Topology is not a thread-safe class * and all synchronization happens on TopologyManager level, the topology is cloned. */
Returns the topology representation. As the Topology is not a thread-safe class and all synchronization happens on TopologyManager level, the topology is cloned
getTopology
{ "repo_name": "marcocast/scheduling", "path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/selection/topology/TopologyManager.java", "license": "agpl-3.0", "size": 29862 }
[ "org.ow2.proactive.resourcemanager.core.properties.PAResourceManagerProperties", "org.ow2.proactive.resourcemanager.frontend.topology.Topology", "org.ow2.proactive.resourcemanager.frontend.topology.TopologyException", "org.ow2.proactive.resourcemanager.frontend.topology.TopologyImpl" ]
import org.ow2.proactive.resourcemanager.core.properties.PAResourceManagerProperties; import org.ow2.proactive.resourcemanager.frontend.topology.Topology; import org.ow2.proactive.resourcemanager.frontend.topology.TopologyException; import org.ow2.proactive.resourcemanager.frontend.topology.TopologyImpl;
import org.ow2.proactive.resourcemanager.core.properties.*; import org.ow2.proactive.resourcemanager.frontend.topology.*;
[ "org.ow2.proactive" ]
org.ow2.proactive;
777,988
public Database getDatabase() { return chadoDBConverter.getDatabase(); }
Database function() { return chadoDBConverter.getDatabase(); }
/** * Return the database to read from * @return the database */
Return the database to read from
getDatabase
{ "repo_name": "LegumeFederation/intermine_legfed", "path": "legfed-chado-db/main/src/org/intermine/bio/dataconversion/ChadoProcessor.java", "license": "lgpl-3.0", "size": 2826 }
[ "org.intermine.sql.Database" ]
import org.intermine.sql.Database;
import org.intermine.sql.*;
[ "org.intermine.sql" ]
org.intermine.sql;
2,466,380
EAttribute getElkEdgeSection_StartX();
EAttribute getElkEdgeSection_StartX();
/** * Returns the meta object for the attribute '{@link org.eclipse.elk.graph.ElkEdgeSection#getStartX <em>Start X</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Start X</em>'. * @see org.eclipse.elk.graph.ElkEdgeSection#getStartX() ...
Returns the meta object for the attribute '<code>org.eclipse.elk.graph.ElkEdgeSection#getStartX Start X</code>'.
getElkEdgeSection_StartX
{ "repo_name": "eNBeWe/elk", "path": "plugins/org.eclipse.elk.graph/src/org/eclipse/elk/graph/ElkGraphPackage.java", "license": "epl-1.0", "size": 70514 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,907,228
public void read(InputStream is) throws IOException { // Buffered input stream for reading manifest data FastInputStream fis = new FastInputStream(is); // Line buffer byte[] lbuf = new byte[512]; // Read the main attributes for the manifest attr.read(fis, lbuf); ...
void function(InputStream is) throws IOException { FastInputStream fis = new FastInputStream(is); byte[] lbuf = new byte[512]; attr.read(fis, lbuf); int ecount = 0, acount = 0; int asize = 2; int len; String name = null; boolean skipEmptyLines = true; byte[] lastline = null; while ((len = fis.readLine(lbuf)) != -1) { i...
/** * Reads the Manifest from the specified InputStream. The entry * names and attributes read will be merged in with the current * manifest entries. * * @param is the input stream * @exception IOException if an I/O error has occurred */
Reads the Manifest from the specified InputStream. The entry names and attributes read will be merged in with the current manifest entries
read
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "ojluni/src/main/java/java/util/jar/Manifest.java", "license": "gpl-2.0", "size": 14325 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,642,427
protected Optional<Resource> getPropertyAsResource(String propertyUri) { return getPropertyAsResource(new PropertyImpl(propertyUri)); }
Optional<Resource> function(String propertyUri) { return getPropertyAsResource(new PropertyImpl(propertyUri)); }
/** * Returns the property as a resource. * * @param propertyUri * @return */
Returns the property as a resource
getPropertyAsResource
{ "repo_name": "yevster/spdxtra", "path": "src/main/java/com/yevster/spdxtra/RdfResourceRepresentation.java", "license": "apache-2.0", "size": 2821 }
[ "java.util.Optional", "org.apache.jena.rdf.model.Resource", "org.apache.jena.rdf.model.impl.PropertyImpl" ]
import java.util.Optional; import org.apache.jena.rdf.model.Resource; import org.apache.jena.rdf.model.impl.PropertyImpl;
import java.util.*; import org.apache.jena.rdf.model.*; import org.apache.jena.rdf.model.impl.*;
[ "java.util", "org.apache.jena" ]
java.util; org.apache.jena;
2,127,974
public Map<String, Object> getExtras();
Map<String, Object> function();
/** * Get the extra public parameters in the license. * @return the parameters */
Get the extra public parameters in the license
getExtras
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/service/license/LicenseDescriptor.java", "license": "lgpl-3.0", "size": 4316 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,218,831
public URL getDemoDescriptionSource() { return ObjectUtilities.getResourceRelative("bookstore.html", BookstoreDemo.class); }
URL function() { return ObjectUtilities.getResourceRelative(STR, BookstoreDemo.class); }
/** * Returns the URL of the HTML document describing this demo. * * @return the demo description. */
Returns the URL of the HTML document describing this demo
getDemoDescriptionSource
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "engine/demo/src/main/java/org/pentaho/reporting/engine/classic/demo/ancient/demo/bookstore/BookstoreDemo.java", "license": "lgpl-2.1", "size": 4513 }
[ "org.pentaho.reporting.libraries.base.util.ObjectUtilities" ]
import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
import org.pentaho.reporting.libraries.base.util.*;
[ "org.pentaho.reporting" ]
org.pentaho.reporting;
1,672,884
protected void addLine(RrdGraphDef graphDef, Item item, int counter) { Color color = LINECOLORS[counter%LINECOLORS.length]; String label = itemUIRegistry.getLabel(item.getName()); if(label!=null && label.contains("[") && label.contains("]")) { label = label.substring(0, label.indexOf('[')); } if(item in...
void function(RrdGraphDef graphDef, Item item, int counter) { Color color = LINECOLORS[counter%LINECOLORS.length]; String label = itemUIRegistry.getLabel(item.getName()); if(label!=null && label.contains("[") && label.contains("]")) { label = label.substring(0, label.indexOf('[')); } if(item instanceof NumberItem) { gr...
/** * Adds a line for the item to the graph definition. * The color of the line is determined by the counter, it simply picks the according index from LINECOLORS (and rolls over if necessary). * * @param graphDef the graph definition to fill * @param item the item to add a line for * @param counter defines...
Adds a line for the item to the graph definition. The color of the line is determined by the counter, it simply picks the according index from LINECOLORS (and rolls over if necessary)
addLine
{ "repo_name": "gregfinley/openhab", "path": "bundles/persistence/org.openhab.persistence.rrd4j/src/main/java/org/openhab/persistence/rrd4j/internal/charts/RRD4jChartServlet.java", "license": "epl-1.0", "size": 9607 }
[ "java.awt.Color", "org.openhab.core.items.Item", "org.openhab.core.library.items.NumberItem", "org.openhab.io.net.http.SecureHttpContext", "org.openhab.persistence.rrd4j.internal.RRD4jService", "org.rrd4j.graph.RrdGraphDef" ]
import java.awt.Color; import org.openhab.core.items.Item; import org.openhab.core.library.items.NumberItem; import org.openhab.io.net.http.SecureHttpContext; import org.openhab.persistence.rrd4j.internal.RRD4jService; import org.rrd4j.graph.RrdGraphDef;
import java.awt.*; import org.openhab.core.items.*; import org.openhab.core.library.items.*; import org.openhab.io.net.http.*; import org.openhab.persistence.rrd4j.internal.*; import org.rrd4j.graph.*;
[ "java.awt", "org.openhab.core", "org.openhab.io", "org.openhab.persistence", "org.rrd4j.graph" ]
java.awt; org.openhab.core; org.openhab.io; org.openhab.persistence; org.rrd4j.graph;
799,825
@Override public void setState(RawContactDelta state, AccountType type, ViewIdGenerator vig, boolean isProfile) { mState = state; // Remove any existing sections mFields.removeAllViews(); // Bail if invalid state or account type if (state == null || type ==...
void function(RawContactDelta state, AccountType type, ViewIdGenerator vig, boolean isProfile) { mState = state; mFields.removeAllViews(); if (state == null type == null) return; setId(vig.getId(state, null, null, ViewIdGenerator.NO_VIEW_INDEX)); RawContactModifier.ensureKindExists(state, type, StructuredName.CONTENT_I...
/** * Set the internal state for this view, given a current * {@link RawContactDelta} state and the {@link AccountType} that * apply to that state. */
Set the internal state for this view, given a current <code>RawContactDelta</code> state and the <code>AccountType</code> that apply to that state
setState
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/Contacts/src/com/android/contacts/editor/RawContactEditorView.java", "license": "gpl-3.0", "size": 16545 }
[ "android.provider.ContactsContract", "android.text.TextUtils", "android.view.View", "com.android.contacts.common.model.RawContactDelta", "com.android.contacts.common.model.RawContactModifier", "com.android.contacts.common.model.ValuesDelta", "com.android.contacts.common.model.account.AccountType", "co...
import android.provider.ContactsContract; import android.text.TextUtils; import android.view.View; import com.android.contacts.common.model.RawContactDelta; import com.android.contacts.common.model.RawContactModifier; import com.android.contacts.common.model.ValuesDelta; import com.android.contacts.common.model.account...
import android.provider.*; import android.text.*; import android.view.*; import com.android.contacts.common.model.*; import com.android.contacts.common.model.account.*; import com.android.contacts.common.model.dataitem.*;
[ "android.provider", "android.text", "android.view", "com.android.contacts" ]
android.provider; android.text; android.view; com.android.contacts;
2,540,956
public static long sizeOnHeapOf(ByteBuffer[] array) { long allElementsSize = 0; for (int i = 0; i < array.length; i++) if (array[i] != null) allElementsSize += sizeOnHeapOf(array[i]); return allElementsSize + sizeOfArray(array); }
static long function(ByteBuffer[] array) { long allElementsSize = 0; for (int i = 0; i < array.length; i++) if (array[i] != null) allElementsSize += sizeOnHeapOf(array[i]); return allElementsSize + sizeOfArray(array); }
/** * Memory a ByteBuffer array consumes. */
Memory a ByteBuffer array consumes
sizeOnHeapOf
{ "repo_name": "carlyeks/cassandra", "path": "src/java/org/apache/cassandra/utils/ObjectSizes.java", "license": "apache-2.0", "size": 5288 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,687,710
public IndexTask createIndex( Policy policy, String namespace, String setName, String indexName, String binName, IndexType indexType ) throws AerospikeException;
IndexTask function( Policy policy, String namespace, String setName, String indexName, String binName, IndexType indexType ) throws AerospikeException;
/** * Create scalar secondary index. * This asynchronous server call will return before command is complete. * The user can optionally wait for command completion by using the returned * IndexTask instance. * <p> * This method is only supported by Aerospike 3 servers. * * @param policy generic confi...
Create scalar secondary index. This asynchronous server call will return before command is complete. The user can optionally wait for command completion by using the returned IndexTask instance. This method is only supported by Aerospike 3 servers
createIndex
{ "repo_name": "wgpshashank/aerospike-client-java", "path": "client/src/com/aerospike/client/IAerospikeClient.java", "license": "apache-2.0", "size": 41552 }
[ "com.aerospike.client.policy.Policy", "com.aerospike.client.query.IndexType", "com.aerospike.client.task.IndexTask" ]
import com.aerospike.client.policy.Policy; import com.aerospike.client.query.IndexType; import com.aerospike.client.task.IndexTask;
import com.aerospike.client.policy.*; import com.aerospike.client.query.*; import com.aerospike.client.task.*;
[ "com.aerospike.client" ]
com.aerospike.client;
1,984,758
private void prepareDatabase() throws SQLException { this.oDBConnection.prepareCall(SQL_CREATE_TABLE).execute(); // Create the table if it does not exist. this.oDBConnection.prepareCall(SQL_CLEAR_ALL).execute(); this.oDBConnection.commit(); }
void function() throws SQLException { this.oDBConnection.prepareCall(SQL_CREATE_TABLE).execute(); this.oDBConnection.prepareCall(SQL_CLEAR_ALL).execute(); this.oDBConnection.commit(); }
/** * This method prepares the database for updating. If the table that is used does not exist, it will create it. * If it exists, it will clear out the contents so the new information can be loaded. * * @throws SQLException */
This method prepares the database for updating. If the table that is used does not exist, it will create it. If it exists, it will clear out the contents so the new information can be loaded
prepareDatabase
{ "repo_name": "KRMAssociatesInc/eHMP", "path": "ehmp/product/production/soap-handler/src/main/java/us/vistacore/vxsync/term/load/jlv/JLVH2VitalsLoadUtil.java", "license": "apache-2.0", "size": 9925 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,141,133
@Test public void testUnmodifiableHierarchicalConfiguration() { HierarchicalConfiguration<?> conf = new BaseHierarchicalConfiguration(); String key = "test"; conf.addProperty(key, Boolean.TRUE); ImmutableHierarchicalConfiguration ihc = ConfigurationUtils.unmod...
void function() { HierarchicalConfiguration<?> conf = new BaseHierarchicalConfiguration(); String key = "test"; conf.addProperty(key, Boolean.TRUE); ImmutableHierarchicalConfiguration ihc = ConfigurationUtils.unmodifiableConfiguration(conf); assertTrue(STR, ihc.getBoolean(key)); assertEquals(STR, 0, ihc.getMaxIndex(key...
/** * Tests whether an unmodifiable hierarchical configuration can be created. */
Tests whether an unmodifiable hierarchical configuration can be created
testUnmodifiableHierarchicalConfiguration
{ "repo_name": "mohanaraosv/commons-configuration", "path": "src/test/java/org/apache/commons/configuration2/TestImmutableConfiguration.java", "license": "apache-2.0", "size": 7523 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,219,371
void handleAgentCalledEvent(AgentCalledEvent event) { AsteriskAgentImpl agent = getAgentByAgentId(event.getAgentCalled()); if (agent == null) { logger.error("Ignored AgentCalledEvent for unknown agent " + event.getAgentCalled()); return; } updateRi...
void handleAgentCalledEvent(AgentCalledEvent event) { AsteriskAgentImpl agent = getAgentByAgentId(event.getAgentCalled()); if (agent == null) { logger.error(STR + event.getAgentCalled()); return; } updateRingingAgents(event.getChannelCalling(), agent); updateAgentState(agent, AgentState.AGENT_RINGING); }
/** * Update state if agent was called. * * @param event */
Update state if agent was called
handleAgentCalledEvent
{ "repo_name": "milesje/asterisk-java", "path": "src/main/java/org/asteriskjava/live/internal/AgentManager.java", "license": "apache-2.0", "size": 9522 }
[ "org.asteriskjava.live.AgentState", "org.asteriskjava.manager.event.AgentCalledEvent" ]
import org.asteriskjava.live.AgentState; import org.asteriskjava.manager.event.AgentCalledEvent;
import org.asteriskjava.live.*; import org.asteriskjava.manager.event.*;
[ "org.asteriskjava.live", "org.asteriskjava.manager" ]
org.asteriskjava.live; org.asteriskjava.manager;
1,192,378
@Post @AnonymousAllowed public GadgetRepresentation deleteOrMoveGadgetViaPost() { Request request = getRequest(); Response response = getResponse(); Form form = request.getEntityAsForm(); String method = form.getFirstValue("method"); if (method.equalsIgnoreCase("delete")) { log.debug("GadgetResource: ...
GadgetRepresentation function() { Request request = getRequest(); Response response = getResponse(); Form form = request.getEntityAsForm(); String method = form.getFirstValue(STR); if (method.equalsIgnoreCase(STR)) { log.debug(STR); deleteGadget(); } else if (method.equalsIgnoreCase("put")) { log.debug(STR); return mov...
/** * Deletes or moves the specified gadget from the specified dashboard when * invoked as a POST request. * * @param method * the HTTP method to forward to ("delete" does a delete, "put" * does a move) * @param dashboardId * ID of the dashboard hosting the gadget * @...
Deletes or moves the specified gadget from the specified dashboard when invoked as a POST request
deleteOrMoveGadgetViaPost
{ "repo_name": "devacfr/spring-restlet", "path": "restlet.ext.shindig/src/main/java/org/cfr/restlet/ext/shindig/dashboard/resource/impl/GadgetResource.java", "license": "unlicense", "size": 9483 }
[ "com.pmi.restlet.gadgets.representations.GadgetRepresentation", "org.restlet.Request", "org.restlet.Response", "org.restlet.data.Form", "org.restlet.data.Status" ]
import com.pmi.restlet.gadgets.representations.GadgetRepresentation; import org.restlet.Request; import org.restlet.Response; import org.restlet.data.Form; import org.restlet.data.Status;
import com.pmi.restlet.gadgets.representations.*; import org.restlet.*; import org.restlet.data.*;
[ "com.pmi.restlet", "org.restlet", "org.restlet.data" ]
com.pmi.restlet; org.restlet; org.restlet.data;
868,416
// 2. Method will be invoked with URL http://localhost:8080/inventory/rs/item/all // 3. Method will produce content of MIME type "application/xml" // See slide 6-15 @GET @Path("/all") public List<Item> doGet() { // TODO: Implement this method by calling the DAO getItems() method ...
@Path("/all") List<Item> function() { return dao.getItems(); }
/** * Handles HTTP GET. Sends the complete inventory. * Request URL will be http://localhost:8080/inventory/rs/item/all */
Handles HTTP GET. Sends the complete inventory. Request URL will be HREF
doGet
{ "repo_name": "IanDarwin/crs577add", "path": "crs577add-Ex06-jaxrs/src/main/java/com/rf/inventory/webapps/InventoryEndpointImpl.java", "license": "bsd-2-clause", "size": 6644 }
[ "com.rf.inventory.backend.Item", "java.util.List", "javax.ws.rs.Path" ]
import com.rf.inventory.backend.Item; import java.util.List; import javax.ws.rs.Path;
import com.rf.inventory.backend.*; import java.util.*; import javax.ws.rs.*;
[ "com.rf.inventory", "java.util", "javax.ws" ]
com.rf.inventory; java.util; javax.ws;
648,005
public static AnalysisEntry toModel(AnalysisEntrySoap soapModel) { if (soapModel == null) { return null; } AnalysisEntry model = new AnalysisEntryImpl(); model.setUuid(soapModel.getUuid()); model.setAnalysisEntryId(soapModel.getAnalysisEntryId()); model.setCompanyId(soapModel.getCompanyId()); mode...
static AnalysisEntry function(AnalysisEntrySoap soapModel) { if (soapModel == null) { return null; } AnalysisEntry model = new AnalysisEntryImpl(); model.setUuid(soapModel.getUuid()); model.setAnalysisEntryId(soapModel.getAnalysisEntryId()); model.setCompanyId(soapModel.getCompanyId()); model.setUserId(soapModel.getUse...
/** * Converts the soap model instance into a normal model instance. * * @param soapModel the soap model instance to convert * @return the normal model instance */
Converts the soap model instance into a normal model instance
toModel
{ "repo_name": "moltam89/OWXP", "path": "modules/micro-maintainance-analysis/micro-maintainance-analysis-service/src/main/java/com/liferay/micro/maintainance/analysis/model/impl/AnalysisEntryModelImpl.java", "license": "gpl-3.0", "size": 21641 }
[ "com.liferay.micro.maintainance.analysis.model.AnalysisEntry", "com.liferay.micro.maintainance.analysis.model.AnalysisEntrySoap" ]
import com.liferay.micro.maintainance.analysis.model.AnalysisEntry; import com.liferay.micro.maintainance.analysis.model.AnalysisEntrySoap;
import com.liferay.micro.maintainance.analysis.model.*;
[ "com.liferay.micro" ]
com.liferay.micro;
1,661,290
@Override public CylindricalCS createCylindricalCS(final String code) throws FactoryException { final CoordinateSystem cs = createCoordinateSystem(code); try { return (CylindricalCS) cs; } catch (ClassCastException exception) { throw noSuchAuthorityCode(Cylindrica...
CylindricalCS function(final String code) throws FactoryException { final CoordinateSystem cs = createCoordinateSystem(code); try { return (CylindricalCS) cs; } catch (ClassCastException exception) { throw noSuchAuthorityCode(CylindricalCS.class, code, exception); } }
/** * The default implementation invokes <code> * {@linkplain #createCoordinateSystem createCoordinateSystem}(code)</code>. * * @param code Value allocated by authority. * @throws NoSuchAuthorityCodeException if the specified {@code code} was not found. * @throws FactoryException if the ob...
The default implementation invokes <code> #createCoordinateSystem createCoordinateSystem(code)</code>
createCylindricalCS
{ "repo_name": "geotools/geotools", "path": "modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractCachedAuthorityFactory.java", "license": "lgpl-2.1", "size": 30333 }
[ "org.opengis.referencing.FactoryException", "org.opengis.referencing.cs.CoordinateSystem", "org.opengis.referencing.cs.CylindricalCS" ]
import org.opengis.referencing.FactoryException; import org.opengis.referencing.cs.CoordinateSystem; import org.opengis.referencing.cs.CylindricalCS;
import org.opengis.referencing.*; import org.opengis.referencing.cs.*;
[ "org.opengis.referencing" ]
org.opengis.referencing;
245,781
@Test public void testGetBasePathToAliasMap() throws InterruptedException, IOException, NoSuchBuildTargetException { Reader reader1 = new StringReader( Joiner.on('\n') .join( "[alias]", "fb4a = //java/com/example:fbandroid", ...
void function() throws InterruptedException, IOException, NoSuchBuildTargetException { Reader reader1 = new StringReader( Joiner.on('\n') .join( STR, STRkatana = BuckConfig config1 = BuckConfigTestUtils.createWithDefaultFilesystem(temporaryFolder, reader1); assertEquals( ImmutableMap.of(Paths.get(STR), "fb4a"), config1...
/** * Ensure that whichever alias is listed first in the file is the one used in the reverse map if * the value appears multiple times. */
Ensure that whichever alias is listed first in the file is the one used in the reverse map if the value appears multiple times
testGetBasePathToAliasMap
{ "repo_name": "marcinkwiatkowski/buck", "path": "test/com/facebook/buck/cli/BuckConfigTest.java", "license": "apache-2.0", "size": 25900 }
[ "com.facebook.buck.parser.NoSuchBuildTargetException", "com.google.common.base.Joiner", "com.google.common.collect.ImmutableMap", "java.io.IOException", "java.io.Reader", "java.io.StringReader", "java.nio.file.Paths", "org.junit.Assert" ]
import com.facebook.buck.parser.NoSuchBuildTargetException; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableMap; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.nio.file.Paths; import org.junit.Assert;
import com.facebook.buck.parser.*; import com.google.common.base.*; import com.google.common.collect.*; import java.io.*; import java.nio.file.*; import org.junit.*;
[ "com.facebook.buck", "com.google.common", "java.io", "java.nio", "org.junit" ]
com.facebook.buck; com.google.common; java.io; java.nio; org.junit;
1,459,637
private void promptForNonFileModelSourceRootDirectory(MWProject project) { String description = resourceRepository().getString("MODEL_SOURCE_ROOT_DIRECTORY_DIALOG_CHOSEN_DIRECTORY_IS_A_FILE.message", new Object[] {project.absoluteModelSourceDirectory()}); promptForDirectory(project, descripti...
void function(MWProject project) { String description = resourceRepository().getString(STR, new Object[] {project.absoluteModelSourceDirectory()}); promptForDirectory(project, description); }
/** * used when the chosen directory is not actually a directory */
used when the chosen directory is not actually a directory
promptForNonFileModelSourceRootDirectory
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/sourcegen/ModelSourceGenerationCoordinator.java", "license": "epl-1.0", "size": 10941 }
[ "org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject" ]
import org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject;
import org.eclipse.persistence.tools.workbench.mappingsmodel.project.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
143,169
static IoBuffer copy(ByteBuffer src) { IoBuffer copy = IoBuffer.allocate(src.remaining()); copy.put(src); copy.flip(); return copy; }
static IoBuffer copy(ByteBuffer src) { IoBuffer copy = IoBuffer.allocate(src.remaining()); copy.put(src); copy.flip(); return copy; }
/** * Creates a new MINA buffer that is a deep copy of the remaining bytes in * the given buffer (between index buf.position() and buf.limit()) * * @param src * the buffer to copy * @return the new buffer, ready to read from */
Creates a new MINA buffer that is a deep copy of the remaining bytes in the given buffer (between index buf.position() and buf.limit())
copy
{ "repo_name": "zuoyebushiwo/apache-mina-2.0.9", "path": "src/mina-core/src/main/java/org/apache/mina/filter/ssl/SslHandler.java", "license": "apache-2.0", "size": 28593 }
[ "java.nio.ByteBuffer", "org.apache.mina.core.buffer.IoBuffer" ]
import java.nio.ByteBuffer; import org.apache.mina.core.buffer.IoBuffer;
import java.nio.*; import org.apache.mina.core.buffer.*;
[ "java.nio", "org.apache.mina" ]
java.nio; org.apache.mina;
1,634,713
public void doTest(){ int pointer,pointer2; if(!dataReady){ System.out.println("Data is not ready"); return; } combined= new double[sample1.length+sample2.length]; Arrays.sort(sample1); Arrays.sort(sample2); System.arraycopy(sample1, 0, combined, 0, sample1.length); ...
void function(){ int pointer,pointer2; if(!dataReady){ System.out.println(STR); return; } combined= new double[sample1.length+sample2.length]; Arrays.sort(sample1); Arrays.sort(sample2); System.arraycopy(sample1, 0, combined, 0, sample1.length); System.arraycopy(sample2, 0, combined, sample1.length, sample2.length); Ar...
/** * Performs the test */
Performs the test
doTest
{ "repo_name": "codeurjc/optsicom-framework", "path": "es.optsicom.lib.npst/src/main/java/javanpst/tests/scale/siegel_TukeyTest/Siegel_TukeyTest.java", "license": "epl-1.0", "size": 12370 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,255,935
public static SessionStrategyBuilder using(PersistenceStrategy ps) { return new PersistenceServiceBuilderImpl(ps, persistenceModuleVisitor); } /** * A utility for testing if a given method is a dynamic finder. * * @param method A method you suspect is a Dynamic Finder. ...
static SessionStrategyBuilder function(PersistenceStrategy ps) { return new PersistenceServiceBuilderImpl(ps, persistenceModuleVisitor); } /** * A utility for testing if a given method is a dynamic finder. * * @param method A method you suspect is a Dynamic Finder. * @return Returns true if the method is annotated {@co...
/** * Configure a given {@link PersistenceStrategy}, either * because it is not part of Warp Persist, or because you need support for multiple * persistence modules (bound to an annotation). * * @param ps the {@code PersistenceService} to configure * @return the next step in the conf...
Configure a given <code>PersistenceStrategy</code>, either because it is not part of Warp Persist, or because you need support for multiple persistence modules (bound to an annotation)
using
{ "repo_name": "tbaum/warp-persist", "path": "src/com/wideplay/warp/persist/PersistenceService.java", "license": "apache-2.0", "size": 5069 }
[ "com.wideplay.warp.persist.PersistenceStrategy", "com.wideplay.warp.persist.dao.Finder", "com.wideplay.warp.persist.internal.PersistenceServiceBuilderImpl" ]
import com.wideplay.warp.persist.PersistenceStrategy; import com.wideplay.warp.persist.dao.Finder; import com.wideplay.warp.persist.internal.PersistenceServiceBuilderImpl;
import com.wideplay.warp.persist.*; import com.wideplay.warp.persist.dao.*; import com.wideplay.warp.persist.internal.*;
[ "com.wideplay.warp" ]
com.wideplay.warp;
1,637,356
private String detectBackupDriverForUrl(String url) { if (url.startsWith(MYSQL_JDBC_URL_PREFIX)) { if (ClassUtils.isPresent(MYSQL_5_JDBC_DRIVER, classLoader)) { return MYSQL_5_JDBC_DRIVER; } return MARIADB_JDBC_DRIVER; } if (url.startsWit...
String function(String url) { if (url.startsWith(MYSQL_JDBC_URL_PREFIX)) { if (ClassUtils.isPresent(MYSQL_5_JDBC_DRIVER, classLoader)) { return MYSQL_5_JDBC_DRIVER; } return MARIADB_JDBC_DRIVER; } if (url.startsWith(STR)) { return STR; } return null; }
/** * Retrieves a second choice backup driver for a jdbc url, in case the primary driver is not available. * * @param url The Jdbc url. * @return The Jdbc driver. {@code null} if none. */
Retrieves a second choice backup driver for a jdbc url, in case the primary driver is not available
detectBackupDriverForUrl
{ "repo_name": "cdedie/flyway", "path": "flyway-core/src/main/java/org/flywaydb/core/internal/util/jdbc/DriverDataSource.java", "license": "apache-2.0", "size": 14334 }
[ "org.flywaydb.core.internal.util.ClassUtils" ]
import org.flywaydb.core.internal.util.ClassUtils;
import org.flywaydb.core.internal.util.*;
[ "org.flywaydb.core" ]
org.flywaydb.core;
2,264,690
private native void setExpandEditorEventHandler() ; @Override public void actionPerformed(ActionEvent e) {}
native void function() ; public void actionPerformed(ActionEvent e) {}
/** * Using native functions helps us to bind different components of IDE each other. */
Using native functions helps us to bind different components of IDE each other
setExpandEditorEventHandler
{ "repo_name": "codenvy/che-core", "path": "ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/ExpandEditorAction.java", "license": "epl-1.0", "size": 5229 }
[ "org.eclipse.che.ide.api.action.ActionEvent" ]
import org.eclipse.che.ide.api.action.ActionEvent;
import org.eclipse.che.ide.api.action.*;
[ "org.eclipse.che" ]
org.eclipse.che;
658,594
public String format(String input) { // Remove any rogue \r input = input.replaceAll("\r", ""); // Pull out blocks that should not be formatted input = removeCodeRegions(input); // pull out any sub sones ro be formatted in their own div tags input = removeSub...
String function(String input) { input = input.replaceAll("\r", ""); input = removeCodeRegions(input); input = removeSubZones(input); List<String> zones = splitZones(input); Iterator<String> iterator = zones.iterator(); StringBuffer formattedHtml = new StringBuffer(); while (iterator.hasNext()) { String zone = iterator....
/** * Formats Wiki text into HTML * * @param input * @return */
Formats Wiki text into HTML
format
{ "repo_name": "0x006EA1E5/oo6", "path": "src/main/java/org/otherobjects/cms/tools/WikiFormatter.java", "license": "gpl-3.0", "size": 24622 }
[ "java.util.Iterator", "java.util.List" ]
import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
286,150
public Rectangle2D getBounds2D (BufferedImage src);
Rectangle2D function (BufferedImage src);
/** * Returns the bounding box of the filtered destination image. * An <CODE>IllegalArgumentException</CODE> may be thrown if the source * image is incompatible with the types of images allowed * by the class implementing this filter. * * @param src The <CODE>BufferedImage</CODE> to be fil...
Returns the bounding box of the filtered destination image. An <code>IllegalArgumentException</code> may be thrown if the source image is incompatible with the types of images allowed by the class implementing this filter
getBounds2D
{ "repo_name": "flyzsd/java-code-snippets", "path": "ibm.jdk8/src/java/awt/image/BufferedImageOp.java", "license": "mit", "size": 5110 }
[ "java.awt.geom.Rectangle2D" ]
import java.awt.geom.Rectangle2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,009,643
public Symbol getSymbol() { return security.getSymbol(); }
Symbol function() { return security.getSymbol(); }
/** * Symbol identifier of the underlying security. */
Symbol identifier of the underlying security
getSymbol
{ "repo_name": "aricooperman/jLean", "path": "src/main/java/com/quantconnect/lean/securities/SecurityHolding.java", "license": "apache-2.0", "size": 9240 }
[ "com.quantconnect.lean.Symbol" ]
import com.quantconnect.lean.Symbol;
import com.quantconnect.lean.*;
[ "com.quantconnect.lean" ]
com.quantconnect.lean;
1,437,141
AppUpdater setTitleOnUpdateAvailable(@StringRes int textResource);
AppUpdater setTitleOnUpdateAvailable(@StringRes int textResource);
/** * Set a custom title for the dialog when an update is available. * * @param textResource resource from the strings xml file for the dialog * @return this */
Set a custom title for the dialog when an update is available
setTitleOnUpdateAvailable
{ "repo_name": "morogoku/MTweaks-KernelAdiutorMOD", "path": "app/src/main/java/com/github/javiersantos/appupdater/IAppUpdater.java", "license": "gpl-3.0", "size": 12835 }
[ "androidx.annotation.StringRes" ]
import androidx.annotation.StringRes;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
184,598
public static PlatformUser copyPlatformUser(PlatformUser platformUser) { PlatformUser u = new PlatformUser(); u.setUserId(platformUser.getUserId()); u.setStatus(platformUser.getStatus()); u.setFirstName(platformUser.getFirstName()); u.setAdditionalName(platformUser.getAdditio...
static PlatformUser function(PlatformUser platformUser) { PlatformUser u = new PlatformUser(); u.setUserId(platformUser.getUserId()); u.setStatus(platformUser.getStatus()); u.setFirstName(platformUser.getFirstName()); u.setAdditionalName(platformUser.getAdditionalName()); u.setLastName(platformUser.getLastName()); u.se...
/** * Copies all user detailed attributes from one platform user to another * platform user. * * @param platformUser * source instance * @return Platform user copy */
Copies all user detailed attributes from one platform user to another platform user
copyPlatformUser
{ "repo_name": "opetrovski/development", "path": "oscm-identitymgmt-intsvc/javasrc/org/oscm/identityservice/assembler/UserDataAssembler.java", "license": "apache-2.0", "size": 15587 }
[ "org.oscm.domobjects.PlatformUser" ]
import org.oscm.domobjects.PlatformUser;
import org.oscm.domobjects.*;
[ "org.oscm.domobjects" ]
org.oscm.domobjects;
518,927
@Override public IKnowledge parseKnowledge(char[] chars) { CharArrayReader reader = new CharArrayReader(chars); Lineizer lineizer = new Lineizer(reader, commentMarker); IKnowledge knowledge = parseKnowledge(lineizer, delimiterType.getPattern()); this.logger.reset(); retur...
IKnowledge function(char[] chars) { CharArrayReader reader = new CharArrayReader(chars); Lineizer lineizer = new Lineizer(reader, commentMarker); IKnowledge knowledge = parseKnowledge(lineizer, delimiterType.getPattern()); this.logger.reset(); return knowledge; }
/** * Parses knowledge from the char array, assuming that's all there is in the * char array. */
Parses knowledge from the char array, assuming that's all there is in the char array
parseKnowledge
{ "repo_name": "amurrayw/tetrad", "path": "tetrad-lib/src/main/java/edu/cmu/tetrad/data/DataReader.java", "license": "gpl-2.0", "size": 45245 }
[ "java.io.CharArrayReader" ]
import java.io.CharArrayReader;
import java.io.*;
[ "java.io" ]
java.io;
115,799
public void addModel(AbstractModel model);
void function(AbstractModel model);
/** * Adds a model to the listModel. * * @param model * The model to add to the list. Does not add if model already exists in the list. */
Adds a model to the listModel
addModel
{ "repo_name": "aidGer/aidGer", "path": "src/de/aidger/view/models/GenericListModel.java", "license": "gpl-3.0", "size": 1606 }
[ "de.aidger.model.AbstractModel" ]
import de.aidger.model.AbstractModel;
import de.aidger.model.*;
[ "de.aidger.model" ]
de.aidger.model;
2,491,866
void setSeatType(SeatType value);
void setSeatType(SeatType value);
/** * Sets the value of the '{@link com.paxelerate.model.monuments.Seat#getSeatType <em>Seat Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Seat Type</em>' attribute. * @see com.paxelerate.model.enums.SeatType * @see #getSeatType() * @gene...
Sets the value of the '<code>com.paxelerate.model.monuments.Seat#getSeatType Seat Type</code>' attribute.
setSeatType
{ "repo_name": "BauhausLuftfahrt/PAXelerate", "path": "com.paxelerate.model/src/com/paxelerate/model/monuments/Seat.java", "license": "epl-1.0", "size": 3958 }
[ "com.paxelerate.model.enums.SeatType" ]
import com.paxelerate.model.enums.SeatType;
import com.paxelerate.model.enums.*;
[ "com.paxelerate.model" ]
com.paxelerate.model;
1,878,020
public static int guessPaddingDistanceFromEndOfSampletext(String sampletext) { PolledValue<Character> paddingSymbol = new PolledValue<Character>(); for (char c : sampletext.toCharArray()) { paddingSymbol.addChoice(c); } // Make special starting possibilities for frequent padding characters // like '0',...
static int function(String sampletext) { PolledValue<Character> paddingSymbol = new PolledValue<Character>(); for (char c : sampletext.toCharArray()) { paddingSymbol.addChoice(c); } PolledValue<Character> specialPaddingSymbols = paddingSymbol.cloneWithDefaultPossibilities(); specialPaddingSymbols.addChoice('0', PolledV...
/** * Recognition of very simple paddings - Returns the distance of the first * recognized padding symbol to the end of the sample text.<br /> * This only a rough estimation, and should not be taken directly into an * autmatic analysis. * * @param sampletext a sample text where a sampletext occurs. Should ...
Recognition of very simple paddings - Returns the distance of the first recognized padding symbol to the end of the sample text. This only a rough estimation, and should not be taken directly into an autmatic analysis
guessPaddingDistanceFromEndOfSampletext
{ "repo_name": "jcryptool/crypto", "path": "org.jcryptool.analysis.transpositionanalysis/src/org/jcryptool/analysis/transpositionanalysis/calc/transpositionanalysis/TranspositionAnalysisPadding.java", "license": "epl-1.0", "size": 5757 }
[ "org.jcryptool.analysis.transpositionanalysis.calc.PolledValue" ]
import org.jcryptool.analysis.transpositionanalysis.calc.PolledValue;
import org.jcryptool.analysis.transpositionanalysis.calc.*;
[ "org.jcryptool.analysis" ]
org.jcryptool.analysis;
754,153
public static int eq(int value) { reportMatcher(new Equals(value)); return 0; }
static int function(int value) { reportMatcher(new Equals(value)); return 0; }
/** * <code>int</code> argument that is equal to the given value. * * <p> * See examples in javadoc for {@link ArgumentMatchers} class * </p> * * @param value the given value. * @return <code>0</code>. */
<code>int</code> argument that is equal to the given value. See examples in javadoc for <code>ArgumentMatchers</code> class
eq
{ "repo_name": "ze-pequeno/mockito", "path": "src/main/java/org/mockito/ArgumentMatchers.java", "license": "mit", "size": 43459 }
[ "org.mockito.internal.matchers.Equals" ]
import org.mockito.internal.matchers.Equals;
import org.mockito.internal.matchers.*;
[ "org.mockito.internal" ]
org.mockito.internal;
1,060,231
public void setImage(Image newImage, int classIndex, int imageIndex) { image = newImage.getScaledInstance((int) (80 * 0.8), (int) (80 * 0.8), Image.SCALE_DEFAULT); this.classIndex = classIndex; this.imageIndex = imageIndex; validate(); repaint(); }
void function(Image newImage, int classIndex, int imageIndex) { image = newImage.getScaledInstance((int) (80 * 0.8), (int) (80 * 0.8), Image.SCALE_DEFAULT); this.classIndex = classIndex; this.imageIndex = imageIndex; validate(); repaint(); }
/** * Sets the image to be shown. * * @param newImage Image object that is to be shown. * @param classIndex Integer that is the class index. * @param imageIndex Integer that is the image index. */
Sets the image to be shown
setImage
{ "repo_name": "datapoet/hubminer", "path": "src/main/java/gui/images/ImagePanelWithClass.java", "license": "gpl-3.0", "size": 4706 }
[ "java.awt.Image" ]
import java.awt.Image;
import java.awt.*;
[ "java.awt" ]
java.awt;
11,857
public void startZeroSuggest(Profile profile, String omniboxText, String url, boolean isQueryInOmnibox, boolean focusedFromFakebox) { if (profile == null || TextUtils.isEmpty(url)) return; mNativeAutocompleteControllerAndroid = nativeInit(profile); if (mNativeAutocompleteControll...
void function(Profile profile, String omniboxText, String url, boolean isQueryInOmnibox, boolean focusedFromFakebox) { if (profile == null TextUtils.isEmpty(url)) return; mNativeAutocompleteControllerAndroid = nativeInit(profile); if (mNativeAutocompleteControllerAndroid != 0) { nativeOnOmniboxFocused(mNativeAutocomple...
/** * Starts a query for suggestions before any input is available from the user. * * @param profile The profile to use for starting the AutocompleteController. * @param omniboxText The text displayed in the omnibox. * @param url The url of the currently loaded web page. * @param isQueryIn...
Starts a query for suggestions before any input is available from the user
startZeroSuggest
{ "repo_name": "guorendong/iridium-browser-ubuntu", "path": "chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java", "license": "bsd-3-clause", "size": 15035 }
[ "android.text.TextUtils", "org.chromium.chrome.browser.profiles.Profile" ]
import android.text.TextUtils; import org.chromium.chrome.browser.profiles.Profile;
import android.text.*; import org.chromium.chrome.browser.profiles.*;
[ "android.text", "org.chromium.chrome" ]
android.text; org.chromium.chrome;
2,075,515
private MqttPublish createPublish(MqttMessage message) { return new MqttPublish(this.getName(), message); }
MqttPublish function(MqttMessage message) { return new MqttPublish(this.getName(), message); }
/** * Create a PUBLISH packet from the specified message. */
Create a PUBLISH packet from the specified message
createPublish
{ "repo_name": "xueshuihuale/YVPushPlugin", "path": "src/android/MqttTopic.java", "license": "apache-2.0", "size": 8476 }
[ "org.eclipse.paho.client.mqttv3.internal.wire.MqttPublish" ]
import org.eclipse.paho.client.mqttv3.internal.wire.MqttPublish;
import org.eclipse.paho.client.mqttv3.internal.wire.*;
[ "org.eclipse.paho" ]
org.eclipse.paho;
461,690
public static MozuClient<com.mozu.api.contracts.location.Location> getLocationClient(String locationCode) throws Exception { return getLocationClient( locationCode, null); }
static MozuClient<com.mozu.api.contracts.location.Location> function(String locationCode) throws Exception { return getLocationClient( locationCode, null); }
/** * * <p><pre><code> * MozuClient<com.mozu.api.contracts.location.Location> mozuClient=GetLocationClient( locationCode); * client.setBaseAddress(url); * client.executeRequest(); * Location location = client.Result(); * </code></pre></p> * @param locationCode The unique, user-defined code that...
<code><code> MozuClient mozuClient=GetLocationClient( locationCode); client.setBaseAddress(url); client.executeRequest(); Location location = client.Result(); </code></code>
getLocationClient
{ "repo_name": "Mozu/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/admin/LocationClient.java", "license": "mit", "size": 11864 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
263,638
private NotificationBo parseNotificationRequestMessage(byte[] bytes) throws IOException, XmlException { Document doc; try { doc = Util.parseWithNotificationEntityResolver(new InputSource(new ByteArrayInputStream(bytes)), true, true, notificationContentTypeService); } cat...
NotificationBo function(byte[] bytes) throws IOException, XmlException { Document doc; try { doc = Util.parseWithNotificationEntityResolver(new InputSource(new ByteArrayInputStream(bytes)), true, true, notificationContentTypeService); } catch (ParserConfigurationException pce) { throw new XmlException(STR, pce); } catc...
/** * This method is the meat of the notification message parsing. It uses DOM to parse out the notification * message XML and into a Notification BO. It handles lookup of reference objects' primary keys so that it * can properly populate the notification object. * @param bytes * @return Noti...
This method is the meat of the notification message parsing. It uses DOM to parse out the notification message XML and into a Notification BO. It handles lookup of reference objects' primary keys so that it can properly populate the notification object
parseNotificationRequestMessage
{ "repo_name": "mztaylor/rice-git", "path": "rice-middleware/impl/src/main/java/org/kuali/rice/ken/service/impl/NotificationMessageContentServiceImpl.java", "license": "apache-2.0", "size": 31071 }
[ "java.io.ByteArrayInputStream", "java.io.IOException", "java.sql.Timestamp", "java.text.ParseException", "java.util.ArrayList", "java.util.Date", "java.util.HashMap", "java.util.List", "java.util.Map", "javax.xml.parsers.ParserConfigurationException", "javax.xml.xpath.XPath", "javax.xml.xpath....
import java.io.ByteArrayInputStream; import java.io.IOException; import java.sql.Timestamp; import java.text.ParseException; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; import javax.xml.x...
import java.io.*; import java.sql.*; import java.text.*; import java.util.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.apache.commons.lang.*; import org.kuali.rice.core.api.util.xml.*; import org.kuali.rice.ken.bo.*; import org.kuali.rice.ken.util.*; import org.kuali.rice.kew.util.*; import org.k...
[ "java.io", "java.sql", "java.text", "java.util", "javax.xml", "org.apache.commons", "org.kuali.rice", "org.w3c.dom", "org.xml.sax" ]
java.io; java.sql; java.text; java.util; javax.xml; org.apache.commons; org.kuali.rice; org.w3c.dom; org.xml.sax;
2,538,090
private void loadHolidays() { LOGGER.warn("Creating holiday data"); final TestHolidaysLoader loader = new TestHolidaysLoader(); loader.run(getToolContext()); }
void function() { LOGGER.warn(STR); final TestHolidaysLoader loader = new TestHolidaysLoader(); loader.run(getToolContext()); }
/** * Loads holidays. */
Loads holidays
loadHolidays
{ "repo_name": "McLeodMoores/starling", "path": "projects/finmath/src/test/java/com/mcleodmoores/integration/simulatedexamples/TestFinmathDatabasePopulator.java", "license": "apache-2.0", "size": 6618 }
[ "com.mcleodmoores.integration.simulatedexamples.populator.TestHolidaysLoader" ]
import com.mcleodmoores.integration.simulatedexamples.populator.TestHolidaysLoader;
import com.mcleodmoores.integration.simulatedexamples.populator.*;
[ "com.mcleodmoores.integration" ]
com.mcleodmoores.integration;
755,672
public void getExecuteScript(String script) { RequestContext.getCurrentInstance().execute(script); }
void function(String script) { RequestContext.getCurrentInstance().execute(script); }
/** * Executar script's * * @param script */
Executar script's
getExecuteScript
{ "repo_name": "williamrodrigues/JCadApplication", "path": "web/src/main/java/br/cad/controller/AppController.java", "license": "apache-2.0", "size": 12068 }
[ "org.primefaces.context.RequestContext" ]
import org.primefaces.context.RequestContext;
import org.primefaces.context.*;
[ "org.primefaces.context" ]
org.primefaces.context;
266,606
private void myMoveCamera(final CameraUpdate cameraUpdate, final CallbackContext callbackContext) { map.moveCamera(cameraUpdate); callbackContext.success(); }
void function(final CameraUpdate cameraUpdate, final CallbackContext callbackContext) { map.moveCamera(cameraUpdate); callbackContext.success(); }
/** * Move the camera of the map * @param cameraUpdate * @param callbackContext */
Move the camera of the map
myMoveCamera
{ "repo_name": "bFlood/phonegap-googlemaps-plugin-1.1.5", "path": "src/android/plugin/google/maps/PluginMap.java", "license": "apache-2.0", "size": 16676 }
[ "com.google.android.gms.maps.CameraUpdate", "org.apache.cordova.CallbackContext" ]
import com.google.android.gms.maps.CameraUpdate; import org.apache.cordova.CallbackContext;
import com.google.android.gms.maps.*; import org.apache.cordova.*;
[ "com.google.android", "org.apache.cordova" ]
com.google.android; org.apache.cordova;
129,437
public Builder proxy(Proxy proxy) { this.proxy = proxy; return this; }
Builder function(Proxy proxy) { this.proxy = proxy; return this; }
/** * Sets the HTTP proxy that will be used by connections created by this client. This takes * precedence over {@link #proxySelector}, which is only honored when this proxy is null (which * it is by default). To disable proxy use completely, call {@code setProxy(Proxy.NO_PROXY)}. */
Sets the HTTP proxy that will be used by connections created by this client. This takes precedence over <code>#proxySelector</code>, which is only honored when this proxy is null (which it is by default). To disable proxy use completely, call setProxy(Proxy.NO_PROXY)
proxy
{ "repo_name": "why168/AndroidProjects", "path": "OkHttpStudy/okhttp3/src/main/java/okhttp3/OkHttpClient.java", "license": "mit", "size": 37168 }
[ "java.net.Proxy" ]
import java.net.Proxy;
import java.net.*;
[ "java.net" ]
java.net;
2,895,364
Task get();
Task get();
/** * Get the task passed into this flow. * If you, for example, just created a task this method will return the fully populated Task object, * (along with owner and creation dates information etc). * * @return the previously created Task (used by this flow) */
Get the task passed into this flow. If you, for example, just created a task this method will return the fully populated Task object, (along with owner and creation dates information etc)
get
{ "repo_name": "ktoso/janbanery", "path": "janbanery-core/src/main/java/pl/project13/janbanery/core/flow/TaskFlow.java", "license": "apache-2.0", "size": 1609 }
[ "pl.project13.janbanery.resources.Task" ]
import pl.project13.janbanery.resources.Task;
import pl.project13.janbanery.resources.*;
[ "pl.project13.janbanery" ]
pl.project13.janbanery;
375,233
public BlackBerryLocation getLastKnownLocation(){ log("Acquiring last known location.."); if(location==null){ log("No location available. Returning null."); } else if(location.isValid() && (location.getQualifiedCoordinates().getLatitude()!=0 && location.getQualifiedCoordinates().getLongitude()!=0)){ lo...
BlackBerryLocation function(){ log(STR); if(location==null){ log(STR); } else if(location.isValid() && (location.getQualifiedCoordinates().getLatitude()!=0 && location.getQualifiedCoordinates().getLongitude()!=0)){ log(STR + location.getQualifiedCoordinates().getLatitude() + STR + location.getQualifiedCoordinates().get...
/** * Returns the last known location. * @return the last known location of this SimpleLocationProvider or null if no location is computed so far. */
Returns the last known location
getLastKnownLocation
{ "repo_name": "russelldavies/mobileminder-blackberry", "path": "src/rimx/location/simplelocation/SimpleLocationProvider.java", "license": "apache-2.0", "size": 41232 }
[ "net.rim.device.api.gps.BlackBerryLocation" ]
import net.rim.device.api.gps.BlackBerryLocation;
import net.rim.device.api.gps.*;
[ "net.rim.device" ]
net.rim.device;
1,912,695
private double delta(Rating player, List<Result> results) { return v(player, results) * outcomeBasedRating(player, results); }
double function(Rating player, List<Result> results) { return v(player, results) * outcomeBasedRating(player, results); }
/** * This is a formula as per step 4 of Glickman's paper. * * @param player * @param results * @return delta */
This is a formula as per step 4 of Glickman's paper
delta
{ "repo_name": "luanlv/lila", "path": "modules/rating/src/main/java/glicko2/RatingCalculator.java", "license": "mit", "size": 12288 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,526,593
public static IntValuedEnum<RTresult> rtVariableSet2ui(RTvariable v, int u1, int u2) { return FlagSet.fromValue(rtVariableSet2ui(Pointer.getPeer(v), u1, u2), RTresult.class); }
static IntValuedEnum<RTresult> function(RTvariable v, int u1, int u2) { return FlagSet.fromValue(rtVariableSet2ui(Pointer.getPeer(v), u1, u2), RTresult.class); }
/** * Original signature : <code>RTresult rtVariableSet2ui(RTvariable, unsigned int, unsigned int)</code><br> * <i>native declaration : include\optix_host.h:403</i> */
Original signature : <code>RTresult rtVariableSet2ui(RTvariable, unsigned int, unsigned int)</code> native declaration : include\optix_host.h:403
rtVariableSet2ui
{ "repo_name": "fetox74/optix-wrapper", "path": "src/main/java/com/fetoxdevelopments/optix/api/RT.java", "license": "mit", "size": 162970 }
[ "com.fetoxdevelopments.optix.api.enumeration.RTresult", "com.fetoxdevelopments.optix.api.struct.RTvariable", "org.bridj.FlagSet", "org.bridj.IntValuedEnum", "org.bridj.Pointer" ]
import com.fetoxdevelopments.optix.api.enumeration.RTresult; import com.fetoxdevelopments.optix.api.struct.RTvariable; import org.bridj.FlagSet; import org.bridj.IntValuedEnum; import org.bridj.Pointer;
import com.fetoxdevelopments.optix.api.enumeration.*; import com.fetoxdevelopments.optix.api.struct.*; import org.bridj.*;
[ "com.fetoxdevelopments.optix", "org.bridj" ]
com.fetoxdevelopments.optix; org.bridj;
861,030
private File stating(File f) { filterNonNull().stat(f); return f; }
File function(File f) { filterNonNull().stat(f); return f; }
/** * Pass through 'f' after ensuring that we can access the file attributes. */
Pass through 'f' after ensuring that we can access the file attributes
stating
{ "repo_name": "recena/jenkins", "path": "core/src/main/java/hudson/FilePath.java", "license": "mit", "size": 134702 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
556,379
Collection<ProcessDefinition> getProcesses(QueryContext queryContext);
Collection<ProcessDefinition> getProcesses(QueryContext queryContext);
/** * Returns all process definitions available * @param queryContext control parameters for the result e.g. sorting, paging * @return A list of all available processes, in the form a of a list of {@link ProcessAssetDesc} instances. */
Returns all process definitions available
getProcesses
{ "repo_name": "DuncanDoyle/jbpm", "path": "jbpm-services/jbpm-services-api/src/main/java/org/jbpm/services/api/RuntimeDataService.java", "license": "apache-2.0", "size": 26170 }
[ "java.util.Collection", "org.jbpm.services.api.model.ProcessDefinition", "org.kie.api.runtime.query.QueryContext" ]
import java.util.Collection; import org.jbpm.services.api.model.ProcessDefinition; import org.kie.api.runtime.query.QueryContext;
import java.util.*; import org.jbpm.services.api.model.*; import org.kie.api.runtime.query.*;
[ "java.util", "org.jbpm.services", "org.kie.api" ]
java.util; org.jbpm.services; org.kie.api;
312,564
@Nonnegative public long unshuffle(@Nonnegative long m) { check(m, "input"); long c = unfe(rounds, a, b, m, seed); while (c >= range) c = unfe(rounds, a, b, c, seed); if (c < 0) throw new IllegalStateException(this + " generated " + c + " for input " + m);...
long function(@Nonnegative long m) { check(m, "input"); long c = unfe(rounds, a, b, m, seed); while (c >= range) c = unfe(rounds, a, b, c, seed); if (c < 0) throw new IllegalStateException(this + STR + c + STR + m); return c; }
/** * Un-permutes a value, that is, returns the index of the value m in the permuted finite domain. * * @param m The permuted value. * @return The original index of the permuted value. */
Un-permutes a value, that is, returns the index of the value m in the permuted finite domain
unshuffle
{ "repo_name": "shevek/jallocator", "path": "src/main/java/org/anarres/jallocator/PermutationGenerator.java", "license": "apache-2.0", "size": 10762 }
[ "javax.annotation.Nonnegative" ]
import javax.annotation.Nonnegative;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
232,646
public void addFalsePositive(List<Key> keys){ if(keys == null) { throw new NullPointerException("ArrayList<Key> can not be null"); } for(Key k: keys) { addFalsePositive(k); } }//end addFalsePositive()
void function(List<Key> keys){ if(keys == null) { throw new NullPointerException(STR); } for(Key k: keys) { addFalsePositive(k); } }
/** * Adds a list of false positive information to <i>this</i> retouched Bloom filter. * @param keys The list of false positive. */
Adds a list of false positive information to this retouched Bloom filter
addFalsePositive
{ "repo_name": "ALEXGUOQ/hbase", "path": "src/java/org/onelab/filter/RetouchedBloomFilter.java", "license": "apache-2.0", "size": 13056 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,567,225
protected Message validatePayrollEndFiscalYear(LaborOriginEntry laborOriginEntry, LaborOriginEntry laborWorkingEntry, UniversityDate universityRunDate, LaborAccountingCycleCachingService laborAccountingCycleCachingService) { LOG.debug("validatePayrollEndFiscalYear() started"); SystemOptions scrubbed...
Message function(LaborOriginEntry laborOriginEntry, LaborOriginEntry laborWorkingEntry, UniversityDate universityRunDate, LaborAccountingCycleCachingService laborAccountingCycleCachingService) { LOG.debug(STR); SystemOptions scrubbedEntryOption = null; if (laborOriginEntry.getPayrollEndDateFiscalYear() != null){ scrubb...
/** * This method is for validation of payrollEndFiscalYear */
This method is for validation of payrollEndFiscalYear
validatePayrollEndFiscalYear
{ "repo_name": "bhutchinson/kfs", "path": "kfs-ld/src/main/java/org/kuali/kfs/module/ld/batch/service/impl/ScrubberValidatorImpl.java", "license": "agpl-3.0", "size": 32563 }
[ "org.kuali.kfs.module.ld.batch.service.LaborAccountingCycleCachingService", "org.kuali.kfs.module.ld.businessobject.LaborOriginEntry", "org.kuali.kfs.sys.KFSKeyConstants", "org.kuali.kfs.sys.Message", "org.kuali.kfs.sys.MessageBuilder", "org.kuali.kfs.sys.businessobject.SystemOptions", "org.kuali.kfs.sy...
import org.kuali.kfs.module.ld.batch.service.LaborAccountingCycleCachingService; import org.kuali.kfs.module.ld.businessobject.LaborOriginEntry; import org.kuali.kfs.sys.KFSKeyConstants; import org.kuali.kfs.sys.Message; import org.kuali.kfs.sys.MessageBuilder; import org.kuali.kfs.sys.businessobject.SystemOptions; imp...
import org.kuali.kfs.module.ld.batch.service.*; import org.kuali.kfs.module.ld.businessobject.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,842,000
@Inject public void setPojoDescriptorBuilderFactory(PojoDescriptorBuilderFactory pojoDescriptorBuilderFactory) { getInitializationState().requireNotInitilized(); this.pojoDescriptorBuilderFactory = pojoDescriptorBuilderFactory; }
void function(PojoDescriptorBuilderFactory pojoDescriptorBuilderFactory) { getInitializationState().requireNotInitilized(); this.pojoDescriptorBuilderFactory = pojoDescriptorBuilderFactory; }
/** * This method sets the {@link PojoDescriptorBuilderFactory} instance to use. * * @param pojoDescriptorBuilderFactory is the pojoDescriptorBuilderFactory to set */
This method sets the <code>PojoDescriptorBuilderFactory</code> instance to use
setPojoDescriptorBuilderFactory
{ "repo_name": "m-m-m/util", "path": "value/src/main/java/net/sf/mmm/util/value/impl/AbstractValueConverterToCompatiblePojo.java", "license": "apache-2.0", "size": 7062 }
[ "net.sf.mmm.util.pojo.descriptor.api.PojoDescriptorBuilderFactory" ]
import net.sf.mmm.util.pojo.descriptor.api.PojoDescriptorBuilderFactory;
import net.sf.mmm.util.pojo.descriptor.api.*;
[ "net.sf.mmm" ]
net.sf.mmm;
1,659,756
List<KeyValue> keyValues = new ArrayList<KeyValue>(); keyValues.add(new ConcreteKeyValue("FirstState","First Account DD Attribute State")); keyValues.add(new ConcreteKeyValue("SecondState","Second Account DD Attribute State")); keyValues.add(new ConcreteKeyValue("ThirdState","Third Account DD Attribute State...
List<KeyValue> keyValues = new ArrayList<KeyValue>(); keyValues.add(new ConcreteKeyValue(STR,STR)); keyValues.add(new ConcreteKeyValue(STR,STR)); keyValues.add(new ConcreteKeyValue(STR,STR)); keyValues.add(new ConcreteKeyValue(STR,STR)); return keyValues; }
/** * Constructs a hard-coded list of valid key-label pairs. * * @see org.kuali.rice.krad.keyvalues.KeyValuesFinder#getKeyValues() */
Constructs a hard-coded list of valid key-label pairs
getKeyValues
{ "repo_name": "ua-eas/ua-rice-2.1.9", "path": "it/krad/src/test/java/org/kuali/rice/krad/test/document/AccountStateKeyValues.java", "license": "apache-2.0", "size": 1733 }
[ "java.util.ArrayList", "java.util.List", "org.kuali.rice.core.api.util.ConcreteKeyValue", "org.kuali.rice.core.api.util.KeyValue" ]
import java.util.ArrayList; import java.util.List; import org.kuali.rice.core.api.util.ConcreteKeyValue; import org.kuali.rice.core.api.util.KeyValue;
import java.util.*; import org.kuali.rice.core.api.util.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
776,647
private static void setDefaultThrottlePolicyDetailsPreparedStmt(Limit limit, PreparedStatement statement) throws SQLException { limit.populateDataInPreparedStatement(statement); }
static void function(Limit limit, PreparedStatement statement) throws SQLException { limit.populateDataInPreparedStatement(statement); }
/** * sets the default throttling policy related information to the DB query * * @param limit {@link Limit} instance * @param statement DB query related {@link PreparedStatement} instance * @throws SQLException if any error occurs while setting default throttle policy related information ...
sets the default throttling policy related information to the DB query
setDefaultThrottlePolicyDetailsPreparedStmt
{ "repo_name": "lakmali/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/dao/impl/PolicyDAOImpl.java", "license": "apache-2.0", "size": 109019 }
[ "java.sql.PreparedStatement", "java.sql.SQLException", "org.wso2.carbon.apimgt.core.models.policy.Limit" ]
import java.sql.PreparedStatement; import java.sql.SQLException; import org.wso2.carbon.apimgt.core.models.policy.Limit;
import java.sql.*; import org.wso2.carbon.apimgt.core.models.policy.*;
[ "java.sql", "org.wso2.carbon" ]
java.sql; org.wso2.carbon;
1,241,590
LocalizableString getDescription();
LocalizableString getDescription();
/** * A description of the connector implementation. This String is localized. It is recommended to use * {@link org.openengsb.core.api.l10n.BundleStrings} and bundle-properties to achieve this. */
A description of the connector implementation. This String is localized. It is recommended to use <code>org.openengsb.core.api.l10n.BundleStrings</code> and bundle-properties to achieve this
getDescription
{ "repo_name": "openengsb-attic/openengsb-api", "path": "src/main/java/org/openengsb/core/api/ConnectorProvider.java", "license": "apache-2.0", "size": 1987 }
[ "org.openengsb.core.api.l10n.LocalizableString" ]
import org.openengsb.core.api.l10n.LocalizableString;
import org.openengsb.core.api.l10n.*;
[ "org.openengsb.core" ]
org.openengsb.core;
1,208,211
private Document buildPrimaryProjectDocumentAdapter() { return new DocumentAdapter(buildPrimaryProjectNameHolder()); }
Document function() { return new DocumentAdapter(buildPrimaryProjectNameHolder()); }
/** * Creates the <code>DocumentAdapter</code> that keeps the value from the * text field in sync with the Primary Project value in the model and vice * versa. * * @return A new <code>DocumentAdapter</code> */
Creates the <code>DocumentAdapter</code> that keeps the value from the text field in sync with the Primary Project value in the model and vice versa
buildPrimaryProjectDocumentAdapter
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/session/basic/AbstractSessionProjectlPane.java", "license": "epl-1.0", "size": 7329 }
[ "javax.swing.text.Document", "org.eclipse.persistence.tools.workbench.uitools.app.swing.DocumentAdapter" ]
import javax.swing.text.Document; import org.eclipse.persistence.tools.workbench.uitools.app.swing.DocumentAdapter;
import javax.swing.text.*; import org.eclipse.persistence.tools.workbench.uitools.app.swing.*;
[ "javax.swing", "org.eclipse.persistence" ]
javax.swing; org.eclipse.persistence;
2,913,493
public DataStream<T> forward() { return setConnectionType(new ForwardPartitioner<T>()); }
DataStream<T> function() { return setConnectionType(new ForwardPartitioner<T>()); }
/** * Sets the partitioning of the {@link DataStream} so that the output elements * are forwarded to the local subtask of the next operation. * * @return The DataStream with forward partitioning set. */
Sets the partitioning of the <code>DataStream</code> so that the output elements are forwarded to the local subtask of the next operation
forward
{ "repo_name": "darionyaphet/flink", "path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java", "license": "apache-2.0", "size": 51499 }
[ "org.apache.flink.streaming.runtime.partitioner.ForwardPartitioner" ]
import org.apache.flink.streaming.runtime.partitioner.ForwardPartitioner;
import org.apache.flink.streaming.runtime.partitioner.*;
[ "org.apache.flink" ]
org.apache.flink;
2,783,798
private void openEditDialog() { PageFormatDialog dlg = new PageFormatDialog(Display.getCurrent().getActiveShell(), report); if (dlg.open() == Window.OK) { getEditDomain().getCommandStack().execute(dlg.getCommand()); setPreviewWidgetData(); } }
void function() { PageFormatDialog dlg = new PageFormatDialog(Display.getCurrent().getActiveShell(), report); if (dlg.open() == Window.OK) { getEditDomain().getCommandStack().execute(dlg.getCommand()); setPreviewWidgetData(); } }
/** * Open the dialog to edit the page format, the if closed with the Ok button the preview will be refreshed */
Open the dialog to edit the page format, the if closed with the Ok button the preview will be refreshed
openEditDialog
{ "repo_name": "OpenSoftwareSolutions/PDFReporter-Studio", "path": "com.jaspersoft.studio/src/com/jaspersoft/studio/property/section/report/PageFormatSection.java", "license": "lgpl-3.0", "size": 8271 }
[ "org.eclipse.jface.window.Window", "org.eclipse.swt.widgets.Display" ]
import org.eclipse.jface.window.Window; import org.eclipse.swt.widgets.Display;
import org.eclipse.jface.window.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.jface", "org.eclipse.swt" ]
org.eclipse.jface; org.eclipse.swt;
2,282,890
@Override public boolean recordScore(String id, int score, long time, String bus) throws Exception { //We need a player id and a vin number. if(id == null || bus == null){ return false; } //Make request. BufferedReader in = RetrieveReader.get( ...
boolean function(String id, int score, long time, String bus) throws Exception { if(id == null bus == null){ return false; } BufferedReader in = RetrieveReader.get( Constants.SERVER_URL+STR + "id="+ id + STR + score + STR + Long.toString(time) + "&bus=" + bus ); return parseInsertFromReader(in); }
/** * Record a score in the database, yet unclear when a score should be recorded. * * @param id The id, not the name, of the player * @param bus the vin-number of the bus. * @return True if score was recorded correctly, false if it failed. */
Record a score in the database, yet unclear when a score should be recorded
recordScore
{ "repo_name": "BeikeElectricity/ProjectX", "path": "App/app/src/main/java/eic/beike/projectx/network/projectXServer/Database.java", "license": "apache-2.0", "size": 4472 }
[ "java.io.BufferedReader" ]
import java.io.BufferedReader;
import java.io.*;
[ "java.io" ]
java.io;
2,656,099
public static String[] generateStringKeys(int keyCount, int keyLength, KeyLocality keyLocality, HazelcastInstance hz) { return generateStringKeys("", keyCount, keyLength, keyLocality, hz); }
static String[] function(int keyCount, int keyLength, KeyLocality keyLocality, HazelcastInstance hz) { return generateStringKeys("", keyCount, keyLength, keyLocality, hz); }
/** * Generates an array of string keys with a configurable keyLocality. * * If the instance is a client, keyLocality is ignored. * * @param keyCount the number of keys in the array * @param keyLength the length of each string key * @param keyLocality if the key is local/remote/r...
Generates an array of string keys with a configurable keyLocality. If the instance is a client, keyLocality is ignored
generateStringKeys
{ "repo_name": "hazelcast/hazelcast-simulator", "path": "drivers/driver-hazelcast4plus/src/main/java/com/hazelcast/simulator/tests/helpers/KeyUtils.java", "license": "apache-2.0", "size": 15219 }
[ "com.hazelcast.core.HazelcastInstance" ]
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.*;
[ "com.hazelcast.core" ]
com.hazelcast.core;
29,490
public void setLog( LogChannelInterface log ) { this.log = log; }
void function( LogChannelInterface log ) { this.log = log; }
/** * Sets the log channel interface for the transformation. * * @param log * the new log channel interface */
Sets the log channel interface for the transformation
setLog
{ "repo_name": "alina-ipatina/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 197880 }
[ "org.pentaho.di.core.logging.LogChannelInterface" ]
import org.pentaho.di.core.logging.LogChannelInterface;
import org.pentaho.di.core.logging.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,578,050
protected final SocketWrapper<S> getSocketWrapper() { return socketWrapper; }
final SocketWrapper<S> function() { return socketWrapper; }
/** * Get the socket wrapper being used. */
Get the socket wrapper being used
getSocketWrapper
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-7.0.63-sourcecode/target/classes/org/apache/coyote/AbstractProcessor.java", "license": "apache-2.0", "size": 6366 }
[ "org.apache.tomcat.util.net.SocketWrapper" ]
import org.apache.tomcat.util.net.SocketWrapper;
import org.apache.tomcat.util.net.*;
[ "org.apache.tomcat" ]
org.apache.tomcat;
694,872
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String networkVirtualApplianceName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkVirtualApplianceName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String networkVirtualApplianceName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkVirtualApplianceName), serviceCallback); }
/** * Deletes the specified Network Virtual Appliance. * * @param resourceGroupName The name of the resource group. * @param networkVirtualApplianceName The name of Network Virtual Appliance. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @t...
Deletes the specified Network Virtual Appliance
deleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/NetworkVirtualAppliancesInner.java", "license": "mit", "size": 73632 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,069,749
public static JsonObject convertMapToJson( final Map<String, String[]> queryStringMap, final JsonObject serviceRequest) throws VtnServiceWebAPIException { LOG.trace("Start DataConverter#convertMapToJson()"); JsonObject mapJson = null; final Set<String> queryStringKeySet = queryStringMap.keySet(); JSONO...
static JsonObject function( final Map<String, String[]> queryStringMap, final JsonObject serviceRequest) throws VtnServiceWebAPIException { LOG.trace(STR); JsonObject mapJson = null; final Set<String> queryStringKeySet = queryStringMap.keySet(); JSONObject json = null; try { json = new JSONObject(serviceRequest.toStrin...
/** * Convert map to json. * * @param queryStringMap * the query string map * @return the json object * @throws VtnServiceWebAPIException */
Convert map to json
convertMapToJson
{ "repo_name": "opendaylight/vtn", "path": "coordinator/java/vtn-webapi/src/org/opendaylight/vtn/webapi/utils/DataConverter.java", "license": "epl-1.0", "size": 8917 }
[ "com.google.gson.JsonObject", "com.google.gson.JsonParser", "java.util.Arrays", "java.util.Map", "java.util.Set", "org.json.JSONException", "org.json.JSONObject", "org.opendaylight.vtn.webapi.constants.ApplicationConstants", "org.opendaylight.vtn.webapi.enums.HttpErrorCodeEnum", "org.opendaylight....
import com.google.gson.JsonObject; import com.google.gson.JsonParser; import java.util.Arrays; import java.util.Map; import java.util.Set; import org.json.JSONException; import org.json.JSONObject; import org.opendaylight.vtn.webapi.constants.ApplicationConstants; import org.opendaylight.vtn.webapi.enums.HttpErrorCodeE...
import com.google.gson.*; import java.util.*; import org.json.*; import org.opendaylight.vtn.webapi.constants.*; import org.opendaylight.vtn.webapi.enums.*; import org.opendaylight.vtn.webapi.exception.*;
[ "com.google.gson", "java.util", "org.json", "org.opendaylight.vtn" ]
com.google.gson; java.util; org.json; org.opendaylight.vtn;
2,147,444
public Item createItem(GrammarPattern grammar) throws RelaxException { return TextItem.TEXT; }
Item function(GrammarPattern grammar) throws RelaxException { return TextItem.TEXT; }
/** * Creates the program (somewhat bogus) */
Creates the program (somewhat bogus)
createItem
{ "repo_name": "dlitz/resin", "path": "modules/kernel/src/com/caucho/relaxng/pattern/TextPattern.java", "license": "gpl-2.0", "size": 1836 }
[ "com.caucho.relaxng.RelaxException", "com.caucho.relaxng.program.Item", "com.caucho.relaxng.program.TextItem" ]
import com.caucho.relaxng.RelaxException; import com.caucho.relaxng.program.Item; import com.caucho.relaxng.program.TextItem;
import com.caucho.relaxng.*; import com.caucho.relaxng.program.*;
[ "com.caucho.relaxng" ]
com.caucho.relaxng;
610,477
public int toShortMarshalCost() { return Marshal.COST_INCOMPATIBLE; }
int function() { return Marshal.COST_INCOMPATIBLE; }
/** * Cost to convert to a short */
Cost to convert to a short
toShortMarshalCost
{ "repo_name": "headius/quercus", "path": "src/main/java/com/caucho/quercus/env/Value.java", "license": "gpl-2.0", "size": 57879 }
[ "com.caucho.quercus.marshal.Marshal" ]
import com.caucho.quercus.marshal.Marshal;
import com.caucho.quercus.marshal.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
2,209,949
if (list.size() < 1) { throw new TemplateModelException("The prefix method must have a namespace as a parameter."); } String namespace = (String) list.get(0); String prefix = lookupPrefix(namespace); if (prefix == null) { throw new TemplateModelException("No prefix specified for {" + namesp...
if (list.size() < 1) { throw new TemplateModelException(STR); } String namespace = (String) list.get(0); String prefix = lookupPrefix(namespace); if (prefix == null) { throw new TemplateModelException(STR + namespace + "}"); } return prefix; }
/** * Returns the qname of the element that has the first parameter as the namespace, the second as the element. * * @param list The arguments. * @return The qname. */
Returns the qname of the element that has the first parameter as the namespace, the second as the element
exec
{ "repo_name": "garyhodgson/enunciate", "path": "php/src/main/java/org/codehaus/enunciate/modules/php/PrefixMethod.java", "license": "apache-2.0", "size": 2415 }
[ "freemarker.template.TemplateModelException" ]
import freemarker.template.TemplateModelException;
import freemarker.template.*;
[ "freemarker.template" ]
freemarker.template;
1,593,532
@Override public void refreshArea(OspfInterface ospfInterface) { OspfInterfaceImpl ospfInterfaceImpl = (OspfInterfaceImpl) ospfInterface; log.debug("Inside refreshArea...!!!"); //If interface state is DR build network LSA. if (ospfInterfaceImpl.state() == OspfInterfaceState.DR) {...
void function(OspfInterface ospfInterface) { OspfInterfaceImpl ospfInterfaceImpl = (OspfInterfaceImpl) ospfInterface; log.debug(STR); if (ospfInterfaceImpl.state() == OspfInterfaceState.DR) { if (ospfInterface.listOfNeighbors().size() > 0) { NetworkLsa networkLsa = null; try { networkLsa = buildNetworkLsa(ospfInterface...
/** * Refreshes the OSPF area information . * Gets called as soon as the interface is down or neighbor full Router LSA is updated. * * @param ospfInterface OSPF interface instance */
Refreshes the OSPF area information . Gets called as soon as the interface is down or neighbor full Router LSA is updated
refreshArea
{ "repo_name": "Shashikanth-Huawei/bmp", "path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaImpl.java", "license": "apache-2.0", "size": 27712 }
[ "org.onosproject.ospf.controller.OspfInterface", "org.onosproject.ospf.protocol.lsa.types.NetworkLsa", "org.onosproject.ospf.protocol.lsa.types.RouterLsa", "org.onosproject.ospf.protocol.util.OspfInterfaceState" ]
import org.onosproject.ospf.controller.OspfInterface; import org.onosproject.ospf.protocol.lsa.types.NetworkLsa; import org.onosproject.ospf.protocol.lsa.types.RouterLsa; import org.onosproject.ospf.protocol.util.OspfInterfaceState;
import org.onosproject.ospf.controller.*; import org.onosproject.ospf.protocol.lsa.types.*; import org.onosproject.ospf.protocol.util.*;
[ "org.onosproject.ospf" ]
org.onosproject.ospf;
1,941,539
public MultipleCurrencyAmount presentValue(final BondTotalReturnSwap trs, final IssuerProviderInterface issuerMulticurves) { ArgumentChecker.notNull(trs, "bond TRS"); ArgumentChecker.notNull(issuerMulticurves, "issuer and multi-curve provider"); final MultipleCurrencyAmount fundingLegPV = trs.getFundingLe...
MultipleCurrencyAmount function(final BondTotalReturnSwap trs, final IssuerProviderInterface issuerMulticurves) { ArgumentChecker.notNull(trs, STR); ArgumentChecker.notNull(issuerMulticurves, STR); final MultipleCurrencyAmount fundingLegPV = trs.getFundingLeg().accept(PVIC, issuerMulticurves); final MultipleCurrencyAmo...
/** * Computes the present value of a bond TRS. * @param trs The bond total return swap. * @param issuerMulticurves The issuer and multi-curves provider. * @return The present value. */
Computes the present value of a bond TRS
presentValue
{ "repo_name": "DevStreet/FinanceAnalytics", "path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/bond/provider/BondTotalReturnSwapDiscountingMethod.java", "license": "apache-2.0", "size": 6167 }
[ "com.opengamma.analytics.financial.interestrate.bond.definition.BondTotalReturnSwap", "com.opengamma.analytics.financial.provider.description.interestrate.IssuerProviderInterface", "com.opengamma.util.ArgumentChecker", "com.opengamma.util.money.MultipleCurrencyAmount" ]
import com.opengamma.analytics.financial.interestrate.bond.definition.BondTotalReturnSwap; import com.opengamma.analytics.financial.provider.description.interestrate.IssuerProviderInterface; import com.opengamma.util.ArgumentChecker; import com.opengamma.util.money.MultipleCurrencyAmount;
import com.opengamma.analytics.financial.interestrate.bond.definition.*; import com.opengamma.analytics.financial.provider.description.interestrate.*; import com.opengamma.util.*; import com.opengamma.util.money.*;
[ "com.opengamma.analytics", "com.opengamma.util" ]
com.opengamma.analytics; com.opengamma.util;
2,188,863
public Collection<TomcatConnectorCustomizer> getTomcatConnectorCustomizers() { return this.tomcatConnectorCustomizers; }
Collection<TomcatConnectorCustomizer> function() { return this.tomcatConnectorCustomizers; }
/** * Returns a mutable collection of the {@link TomcatConnectorCustomizer}s that will be * applied to the Tomcat {@link Context} . * @return the listeners that will be applied */
Returns a mutable collection of the <code>TomcatConnectorCustomizer</code>s that will be applied to the Tomcat <code>Context</code>
getTomcatConnectorCustomizers
{ "repo_name": "jvz/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java", "license": "apache-2.0", "size": 30815 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
70,033
public void deleteFile(File file) throws UnSupportedRuleImplementationException { String[] array = (file.toString().split("\\.(?=[^\\.]+$)")); String actualExtension; if (array.length >= 2) { actualExtension = array[1]; if (listOfFileExtensions != null && listOfFileEx...
void function(File file) throws UnSupportedRuleImplementationException { String[] array = (file.toString().split(STR)); String actualExtension; if (array.length >= 2) { actualExtension = array[1]; if (listOfFileExtensions != null && listOfFileExtensions.contains(actualExtension)) { logger.debug(STR + file + STR); clean...
/** * <p> * Deletes the files by invoking the specific classes for the corresponding * files. No conditions are considered for files with no configuration from * setting.xml. They are simply deleted. * <p/> * </p> * * @param file a <code>File</code> which has to be deleted. ...
Deletes the files by invoking the specific classes for the corresponding files. No conditions are considered for files with no configuration from setting.xml. They are simply deleted.
deleteFile
{ "repo_name": "helicalinsight/helicalinsight", "path": "core/src/main/java/com/helicalinsight/efw/io/delete/DeleteOperationUtility.java", "license": "apache-2.0", "size": 12470 }
[ "com.helicalinsight.efw.exceptions.UnSupportedRuleImplementationException", "java.io.File" ]
import com.helicalinsight.efw.exceptions.UnSupportedRuleImplementationException; import java.io.File;
import com.helicalinsight.efw.exceptions.*; import java.io.*;
[ "com.helicalinsight.efw", "java.io" ]
com.helicalinsight.efw; java.io;
2,537,170
@Test public void testParseSendEventPlDate() throws ParseException { EventConstants.FORMATTER_CUSTOM.get().parse("Tuesday, 17 March 2015 14:44:39 o'clock GMT"); }
void function() throws ParseException { EventConstants.FORMATTER_CUSTOM.get().parse(STR); }
/** * Make sure that we can parse a datestamp from send-event.pl. The script always sends * datestamps as English strings, for example: "Tuesday, 17 March 2015 14:44:39 o'clock GMT". * @throws ParseException */
Make sure that we can parse a datestamp from send-event.pl. The script always sends datestamps as English strings, for example: "Tuesday, 17 March 2015 14:44:39 o'clock GMT"
testParseSendEventPlDate
{ "repo_name": "aihua/opennms", "path": "opennms-model/src/test/java/org/opennms/netmgt/model/events/EventConstantsTest.java", "license": "agpl-3.0", "size": 9652 }
[ "java.text.ParseException", "org.opennms.netmgt.events.api.EventConstants" ]
import java.text.ParseException; import org.opennms.netmgt.events.api.EventConstants;
import java.text.*; import org.opennms.netmgt.events.api.*;
[ "java.text", "org.opennms.netmgt" ]
java.text; org.opennms.netmgt;
521,651