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 public void readHeader(ByteBuffer buffer) { super.readHeader(buffer); this.dirCapacity = buffer.getInt(); this.leafCapacity = buffer.getInt(); this.dirMinimum = buffer.getInt(); this.leafMinimum = buffer.getInt(); this.emptyPagesSize = buffer.getInt(); this.largestPageID = buff...
void function(ByteBuffer buffer) { super.readHeader(buffer); this.dirCapacity = buffer.getInt(); this.leafCapacity = buffer.getInt(); this.dirMinimum = buffer.getInt(); this.leafMinimum = buffer.getInt(); this.emptyPagesSize = buffer.getInt(); this.largestPageID = buffer.getInt(); }
/** * Initializes this header from the specified file. Calls * {@link elki.persistent.DefaultPageHeader#readHeader(FileChannel) * DefaultPageHeader#readHeader(file)} and reads the integer values of * {@link #dirCapacity}, {@link #leafCapacity}, {@link #dirMinimum}, * {@link #leafMinimum} and {@link #empt...
Initializes this header from the specified file. Calls <code>elki.persistent.DefaultPageHeader#readHeader(FileChannel) DefaultPageHeader#readHeader(file)</code> and reads the integer values of <code>#dirCapacity</code>, <code>#leafCapacity</code>, <code>#dirMinimum</code>, <code>#leafMinimum</code> and <code>#emptyPage...
readHeader
{ "repo_name": "elki-project/elki", "path": "elki-index/src/main/java/elki/index/tree/TreeIndexHeader.java", "license": "agpl-3.0", "size": 7779 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,919,713
public static int getMaxUses() { return BetterStorageConfig.COMMON.cardboardBoxUses.get(); }
static int function() { return BetterStorageConfig.COMMON.cardboardBoxUses.get(); }
/** * Returns how many times cardboard boxes can be reused. * * @return Total number of uses. */
Returns how many times cardboard boxes can be reused
getMaxUses
{ "repo_name": "TehStoneMan/BetterStorageToo", "path": "src/main/java/io/github/tehstoneman/betterstorage/common/item/cardboard/ItemBlockCardboardBox.java", "license": "mit", "size": 3870 }
[ "io.github.tehstoneman.betterstorage.config.BetterStorageConfig" ]
import io.github.tehstoneman.betterstorage.config.BetterStorageConfig;
import io.github.tehstoneman.betterstorage.config.*;
[ "io.github.tehstoneman" ]
io.github.tehstoneman;
2,267,977
public static void setStaticObjectField(final Class<?> clazz, final String fieldName, final Object value) { try { findField(clazz, fieldName).set(null, value); } catch (final IllegalAccessException e) { // should not happen Log.w(LOGTAG, e); throw new ...
static void function(final Class<?> clazz, final String fieldName, final Object value) { try { findField(clazz, fieldName).set(null, value); } catch (final IllegalAccessException e) { Log.w(LOGTAG, e); throw new IllegalAccessError(e.getMessage()); } catch (final IllegalArgumentException e) { throw e; } }
/** * Sets the value of a static object field in the given class. See also {@link #findField}. */
Sets the value of a static object field in the given class. See also <code>#findField</code>
setStaticObjectField
{ "repo_name": "rrrfff/AndHook", "path": "lib/src/main/java/andhook/lib/xposed/XposedHelpers.java", "license": "mit", "size": 77038 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,687,840
public void unpack(final InputStream in, final JarOutputStream out) throws IOException, Pack200Exception { unpackRead(in); unpackProcess(); unpackWrite(out); }
void function(final InputStream in, final JarOutputStream out) throws IOException, Pack200Exception { unpackRead(in); unpackProcess(); unpackWrite(out); }
/** * Unpacks a packed stream (either .pack. or .pack.gz) into a corresponding JarOuputStream. * * @param in a packed stream. * @param out output stream. * @throws Pack200Exception if there is a problem unpacking * @throws IOException if there is a problem with I/O during unpacking */
Unpacks a packed stream (either .pack. or .pack.gz) into a corresponding JarOuputStream
unpack
{ "repo_name": "apache/commons-compress", "path": "src/main/java/org/apache/commons/compress/harmony/unpack200/Segment.java", "license": "apache-2.0", "size": 24428 }
[ "java.io.IOException", "java.io.InputStream", "java.util.jar.JarOutputStream", "org.apache.commons.compress.harmony.pack200.Pack200Exception" ]
import java.io.IOException; import java.io.InputStream; import java.util.jar.JarOutputStream; import org.apache.commons.compress.harmony.pack200.Pack200Exception;
import java.io.*; import java.util.jar.*; import org.apache.commons.compress.harmony.pack200.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
2,615,865
Coach findByEmail(String email);
Coach findByEmail(String email);
/** * Finds a coach with given email * * @param email email of coach * @return coach with given ID */
Finds a coach with given email
findByEmail
{ "repo_name": "HonzaCech/PA165-SportClub", "path": "persistence/src/main/java/cz/muni/fi/pa165/sportsclub/dao/CoachDao.java", "license": "apache-2.0", "size": 1017 }
[ "cz.muni.fi.pa165.sportsclub.entity.Coach" ]
import cz.muni.fi.pa165.sportsclub.entity.Coach;
import cz.muni.fi.pa165.sportsclub.entity.*;
[ "cz.muni.fi" ]
cz.muni.fi;
1,996,829
private Optional<OOBibStyle> getSelectedStyle() { if (!selectionModel.getSelected().isEmpty()) { return Optional.of(selectionModel.getSelected().get(0)); } return Optional.empty(); } static class StyleTableFormat implements TableFormat<OOBibStyle> {
Optional<OOBibStyle> function() { if (!selectionModel.getSelected().isEmpty()) { return Optional.of(selectionModel.getSelected().get(0)); } return Optional.empty(); } static class StyleTableFormat implements TableFormat<OOBibStyle> {
/** * Get the currently selected style. * @return the selected style, or empty if no style is selected. */
Get the currently selected style
getSelectedStyle
{ "repo_name": "mairdl/jabref", "path": "src/main/java/net/sf/jabref/gui/openoffice/StyleSelectDialog.java", "license": "mit", "size": 20368 }
[ "ca.odell.glazedlists.gui.TableFormat", "java.util.Optional", "net.sf.jabref.logic.openoffice.OOBibStyle" ]
import ca.odell.glazedlists.gui.TableFormat; import java.util.Optional; import net.sf.jabref.logic.openoffice.OOBibStyle;
import ca.odell.glazedlists.gui.*; import java.util.*; import net.sf.jabref.logic.openoffice.*;
[ "ca.odell.glazedlists", "java.util", "net.sf.jabref" ]
ca.odell.glazedlists; java.util; net.sf.jabref;
2,408,169
void changeSpinnerUnits() { if (firstGeoType == GEOMETRY_TYPE.polyline) { resId = R.array.DistanceUnits; } else { resId = R.array.AreaUnits; } // Create a spinner with the drop down values specified in // values->queryparameters.xml Spinner measureUnits = (Spinner) getActivity().findViewById( ...
void changeSpinnerUnits() { if (firstGeoType == GEOMETRY_TYPE.polyline) { resId = R.array.DistanceUnits; } else { resId = R.array.AreaUnits; } Spinner measureUnits = (Spinner) getActivity().findViewById( R.id.spinner1); ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource( getActivity(), resId, android....
/** * Changes the unit types for spinner values on selecting distance vs area * * @param measuretype */
Changes the unit types for spinner values on selecting distance vs area
changeSpinnerUnits
{ "repo_name": "btomaszewski/Iwacu", "path": "app/src/main/java/gis/iwacu_new/rit/edu/main/MeasureFragment.java", "license": "mit", "size": 14238 }
[ "android.widget.ArrayAdapter", "android.widget.Spinner" ]
import android.widget.ArrayAdapter; import android.widget.Spinner;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,759,004
@Test public void testGetExtension() throws Exception { Account account = new Account(); Object extension = account.getExtension(); assertNotNull(extension); assertTrue(extension instanceof AccountExtension); extension = legacyDataAdapter.getExtension(Account.class); ...
void function() throws Exception { Account account = new Account(); Object extension = account.getExtension(); assertNotNull(extension); assertTrue(extension instanceof AccountExtension); extension = legacyDataAdapter.getExtension(Account.class); assertNotNull(extension); assertTrue(extension instanceof AccountExtensio...
/** * Verifies that new instances of the extension object are created properly when using KRAD. * The {@link org.kuali.rice.krad.test.document.bo.Account} object has it's extension mapped both using the * legacy KNS and non-Legacy KRAD approaches and it extends from PersistableBusinessObjectBase. */
Verifies that new instances of the extension object are created properly when using KRAD. The <code>org.kuali.rice.krad.test.document.bo.Account</code> object has it's extension mapped both using the legacy KNS and non-Legacy KRAD approaches and it extends from PersistableBusinessObjectBase
testGetExtension
{ "repo_name": "bhutchinson/rice", "path": "rice-framework/krad-it/src/test/java/org/kuali/rice/krad/jpa/LegacyDataAdapterTest.java", "license": "apache-2.0", "size": 3523 }
[ "org.junit.Assert", "org.kuali.rice.krad.test.document.bo.Account", "org.kuali.rice.krad.test.document.bo.AccountExtension" ]
import org.junit.Assert; import org.kuali.rice.krad.test.document.bo.Account; import org.kuali.rice.krad.test.document.bo.AccountExtension;
import org.junit.*; import org.kuali.rice.krad.test.document.bo.*;
[ "org.junit", "org.kuali.rice" ]
org.junit; org.kuali.rice;
1,900,832
public HtmlHelper appendAncorOnClickSubmitEventStartTag(final StringBuffer buf, final String method, final String... params) { Validate.notNull(params); final HtmlTagBuilder tag = new HtmlTagBuilder(buf, "a"); tag.addAttribute("href", "#"); if (params.length == 1) { // Standard code in over 90...
HtmlHelper function(final StringBuffer buf, final String method, final String... params) { Validate.notNull(params); final HtmlTagBuilder tag = new HtmlTagBuilder(buf, "a"); tag.addAttribute("href", "#"); if (params.length == 1) { tag.addAttribute(STR, STR + method + "('" + params[0] + "')"); } else { final StringBuffe...
/** * Creates anchor: &lt;a href="#" onclick='javascript:${method}("${params}")'&gt; * @param buf * @param params * @return */
Creates anchor: &lt;a href="#" onclick='javascript:${method}("${params}")'&gt
appendAncorOnClickSubmitEventStartTag
{ "repo_name": "developerleo/ProjectForge-2nd", "path": "src/main/java/org/projectforge/web/HtmlHelper.java", "license": "gpl-3.0", "size": 9712 }
[ "org.apache.commons.lang.Validate" ]
import org.apache.commons.lang.Validate;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
974,334
void onFileSuccessfulWrite(File file);
void onFileSuccessfulWrite(File file);
/** * Called, when file is successfully written. * * @param file file, that data has been saved into. */
Called, when file is successfully written
onFileSuccessfulWrite
{ "repo_name": "googlesamples/glass-enterprise-samples", "path": "WebRTCSample/app/src/org/appspot/apprtcstandalone/FileDataSaver.java", "license": "apache-2.0", "size": 3111 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
554,460
public void setResources(Map<CmsUUID, String> resources) { m_resources = resources; }
void function(Map<CmsUUID, String> resources) { m_resources = resources; }
/** * Sets the map of resources for which the properties should be uploaded.<p> * * @param resources the map of resources for which the properties should be uploaded */
Sets the map of resources for which the properties should be uploaded
setResources
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/ade/postupload/shared/CmsPostUploadDialogBean.java", "license": "lgpl-2.1", "size": 3378 }
[ "java.util.Map", "org.opencms.util.CmsUUID" ]
import java.util.Map; import org.opencms.util.CmsUUID;
import java.util.*; import org.opencms.util.*;
[ "java.util", "org.opencms.util" ]
java.util; org.opencms.util;
2,696,004
public long totalSize() { return totalSize; } static final class Fields { static final XContentBuilderString NAME = new XContentBuilderString("name"); static final XContentBuilderString INDEX_VERSION = new XContentBuilderString("index_version"); static final XContentBuilderS...
long function() { return totalSize; } static final class Fields { static final XContentBuilderString NAME = new XContentBuilderString("name"); static final XContentBuilderString INDEX_VERSION = new XContentBuilderString(STR); static final XContentBuilderString START_TIME = new XContentBuilderString(STR); static final X...
/** * Returns total size of all files that where snapshotted */
Returns total size of all files that where snapshotted
totalSize
{ "repo_name": "KimTaehee/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java", "license": "apache-2.0", "size": 19837 }
[ "org.elasticsearch.common.ParseField", "org.elasticsearch.common.xcontent.XContentBuilderString" ]
import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.XContentBuilderString;
import org.elasticsearch.common.*; import org.elasticsearch.common.xcontent.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
710,473
public static String toHTML(final String markdownText) { if (Strings.isEmptyOrNull(markdownText)) { return ""; } final PegDownProcessor pegDownProcessor = new PegDownProcessor(Extensions.ALL, 5000); String ret = pegDownProcessor.markdownToHtml(markdownText); if ...
static String function(final String markdownText) { if (Strings.isEmptyOrNull(markdownText)) { return STR<p>STR<p>STR</p>"; } return ret; } private Markdowns() { }
/** * Converts the specified markdown text to HTML. * * @param markdownText the specified markdown text * @return converted HTML, returns an empty string "" if the specified markdown text is "" or {@code null}, returns * 'markdownErrorLabel' if exception */
Converts the specified markdown text to HTML
toHTML
{ "repo_name": "qiangber/symphony", "path": "src/main/java/org/b3log/symphony/util/Markdowns.java", "license": "apache-2.0", "size": 4455 }
[ "org.b3log.latke.util.Strings" ]
import org.b3log.latke.util.Strings;
import org.b3log.latke.util.*;
[ "org.b3log.latke" ]
org.b3log.latke;
143,783
protected void defineUnitChartRoles(OrganizationalPerson person, String function, OrganizationChartConfiguration config) { // Priority to avoid conflicted syntaxes : right, left and then central boolean roleDefined = false; // right for (OrganizationalRole role : config.getUnitsChartRightL...
void function(OrganizationalPerson person, String function, OrganizationChartConfiguration config) { boolean roleDefined = false; for (OrganizationalRole role : config.getUnitsChartRightLabel()) { if (isFunctionMatchingRole(function, role)) { person.setVisibleOnRight(true); person.setVisibleRightRole(role); roleDefined...
/** * Determine if person has a specific Role in organization Chart. * @param person person * @param function person's function */
Determine if person has a specific Role in organization Chart
defineUnitChartRoles
{ "repo_name": "CecileBONIN/Silverpeas-Components", "path": "organizationchart/organizationchart-jar/src/main/java/com/silverpeas/components/organizationchart/service/AbstractOrganizationChartServiceImpl.java", "license": "agpl-3.0", "size": 5599 }
[ "com.silverpeas.components.organizationchart.model.OrganizationalPerson", "com.silverpeas.components.organizationchart.model.OrganizationalRole" ]
import com.silverpeas.components.organizationchart.model.OrganizationalPerson; import com.silverpeas.components.organizationchart.model.OrganizationalRole;
import com.silverpeas.components.organizationchart.model.*;
[ "com.silverpeas.components" ]
com.silverpeas.components;
1,155,615
@Override public void surfaceDestroyed(SurfaceHolder holder) { // stop preview and release camera try{ camera.stopPreview(); camera.release(); camera = null; } catch (Exception e){ e.printStackTrace(); } }
void function(SurfaceHolder holder) { try{ camera.stopPreview(); camera.release(); camera = null; } catch (Exception e){ e.printStackTrace(); } }
/** * Override method - called when surface is destroyed. * @param holder is the SurfaceView's holder. */
Override method - called when surface is destroyed
surfaceDestroyed
{ "repo_name": "Minitour/crofis-android-uikit", "path": "ui/src/main/java/net/crofis/ui/camera/CameraActivity.java", "license": "apache-2.0", "size": 86098 }
[ "android.view.SurfaceHolder" ]
import android.view.SurfaceHolder;
import android.view.*;
[ "android.view" ]
android.view;
617,778
@Property(EJB_ID) String getEjbId();
@Property(EJB_ID) String getEjbId();
/** * Contains the bean's ejb id */
Contains the bean's ejb id
getEjbId
{ "repo_name": "OndraZizka/windup", "path": "rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/model/EjbBeanBaseModel.java", "license": "epl-1.0", "size": 3722 }
[ "com.tinkerpop.frames.Property" ]
import com.tinkerpop.frames.Property;
import com.tinkerpop.frames.*;
[ "com.tinkerpop.frames" ]
com.tinkerpop.frames;
2,668,043
Observable<ConnectionSharedKey> setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters);
Observable<ConnectionSharedKey> setSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters);
/** * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * * @param resourceGroupName The name of the resource group. * @par...
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider
setSharedKeyAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/VirtualNetworkGatewayConnections.java", "license": "mit", "size": 3705 }
[ "com.microsoft.azure.management.network.v2018_06_01.implementation.ConnectionSharedKeyInner" ]
import com.microsoft.azure.management.network.v2018_06_01.implementation.ConnectionSharedKeyInner;
import com.microsoft.azure.management.network.v2018_06_01.implementation.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,977,463
public static void mergeDefaults(Map<String, Object> content, Map<String, Object> defaults) { for (Map.Entry<String, Object> defaultEntry : defaults.entrySet()) { if (content.containsKey(defaultEntry.getKey()) == false) { // copy it over, it does not exists in the content ...
static void function(Map<String, Object> content, Map<String, Object> defaults) { for (Map.Entry<String, Object> defaultEntry : defaults.entrySet()) { if (content.containsKey(defaultEntry.getKey()) == false) { content.put(defaultEntry.getKey(), defaultEntry.getValue()); } else { if (content.get(defaultEntry.getKey()) i...
/** * Merges the defaults provided as the second parameter into the content of the first. Only does recursive merge * for inner maps. */
Merges the defaults provided as the second parameter into the content of the first. Only does recursive merge for inner maps
mergeDefaults
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/xcontent/XContentHelper.java", "license": "apache-2.0", "size": 23767 }
[ "java.util.ArrayList", "java.util.LinkedHashMap", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,087,446
public List<LocatedBlock> getFileBlocks(Path filepath, int sizeKB) throws IOException { // Return the blocks we just wrote DFSClient dfsclient = getDFSClient(); return dfsclient.getNamenode() .getBlockLocations(filepath.toString(), 0, sizeKB * 1024) .getLocatedBlocks(); }
List<LocatedBlock> function(Path filepath, int sizeKB) throws IOException { DFSClient dfsclient = getDFSClient(); return dfsclient.getNamenode() .getBlockLocations(filepath.toString(), 0, sizeKB * 1024) .getLocatedBlocks(); }
/** * Get the list of Blocks for a file. */
Get the list of Blocks for a file
getFileBlocks
{ "repo_name": "robzor92/hops", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/BlockReaderTestUtil.java", "license": "apache-2.0", "size": 5333 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.protocol.LocatedBlock" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.protocol.LocatedBlock;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,345,700
public final Property<ExternalId> priceIndexId() { return metaBean().priceIndexId().createProperty(this); }
final Property<ExternalId> function() { return metaBean().priceIndexId().createProperty(this); }
/** * Gets the the {@code priceIndexId} property. * @return the property, not null */
Gets the the priceIndexId property
priceIndexId
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/convention/PriceIndexConvention.java", "license": "apache-2.0", "size": 11585 }
[ "com.opengamma.id.ExternalId", "org.joda.beans.Property" ]
import com.opengamma.id.ExternalId; import org.joda.beans.Property;
import com.opengamma.id.*; import org.joda.beans.*;
[ "com.opengamma.id", "org.joda.beans" ]
com.opengamma.id; org.joda.beans;
795,323
public ProxiedPlayer toProxiedPlayer() { for(ProxiedPlayer pp : ProxyServer.getInstance().getPlayers()) { if(pp.getAddress().getHostName().equalsIgnoreCase(this.address)) { return pp; } } return null; }
ProxiedPlayer function() { for(ProxiedPlayer pp : ProxyServer.getInstance().getPlayers()) { if(pp.getAddress().getHostName().equalsIgnoreCase(this.address)) { return pp; } } return null; }
/** * Converts the ip address to the online proxied player * connected to the server with it * @return proxied player with ip */
Converts the ip address to the online proxied player connected to the server with it
toProxiedPlayer
{ "repo_name": "lucavinci/bungeeban", "path": "src/main/java/de/lucavinci/bungeeban/util/IP.java", "license": "gpl-3.0", "size": 3890 }
[ "net.md_5.bungee.api.ProxyServer", "net.md_5.bungee.api.connection.ProxiedPlayer" ]
import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.*; import net.md_5.bungee.api.connection.*;
[ "net.md_5.bungee" ]
net.md_5.bungee;
2,390,519
public void update(Graphics g, JComponent c) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); ui.update(g, c); } }
void function(Graphics g, JComponent c) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); ui.update(g, c); } }
/** * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all * the UI delegates managed by this <code>MultiPanelUI</code>. * * @param g the graphics device. * @param c the component. */
Calls the <code>ComponentUI#update(Graphics, JComponent)</code> method for all the UI delegates managed by this <code>MultiPanelUI</code>
update
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/plaf/multi/MultiPanelUI.java", "license": "bsd-3-clause", "size": 11148 }
[ "java.awt.Graphics", "java.util.Iterator", "javax.swing.JComponent", "javax.swing.plaf.ComponentUI" ]
import java.awt.Graphics; import java.util.Iterator; import javax.swing.JComponent; import javax.swing.plaf.ComponentUI;
import java.awt.*; import java.util.*; import javax.swing.*; import javax.swing.plaf.*;
[ "java.awt", "java.util", "javax.swing" ]
java.awt; java.util; javax.swing;
2,308,094
boolean updateTunnelInfo(TunnelId tunnelId, ResourceConsumer tunnelConsumerId);
boolean updateTunnelInfo(TunnelId tunnelId, ResourceConsumer tunnelConsumerId);
/** * Updates tunnel info map with tunnel consumer id. * * @param tunnelId tunnel id * @param tunnelConsumerId tunnel consumer id * @return success or failure */
Updates tunnel info map with tunnel consumer id
updateTunnelInfo
{ "repo_name": "Phaneendra-Huawei/demo", "path": "apps/pce/app/src/main/java/org/onosproject/pce/pcestore/api/PceStore.java", "license": "apache-2.0", "size": 6537 }
[ "org.onosproject.incubator.net.tunnel.TunnelId", "org.onosproject.net.resource.ResourceConsumer" ]
import org.onosproject.incubator.net.tunnel.TunnelId; import org.onosproject.net.resource.ResourceConsumer;
import org.onosproject.incubator.net.tunnel.*; import org.onosproject.net.resource.*;
[ "org.onosproject.incubator", "org.onosproject.net" ]
org.onosproject.incubator; org.onosproject.net;
896,577
public int getPhonebookAccessPermission() { if (sService == null) { return ACCESS_UNKNOWN; } try { return sService.getPhonebookAccessPermission(this); } catch (RemoteException e) { Log.e(TAG, "", e); } return ACCESS_UNKNOWN; }
int function() { if (sService == null) { return ACCESS_UNKNOWN; } try { return sService.getPhonebookAccessPermission(this); } catch (RemoteException e) { Log.e(TAG, "", e); } return ACCESS_UNKNOWN; }
/** * Requires {@link android.Manifest.permission#BLUETOOTH}. * @return Whether the phonebook access is allowed to this device. Can be * {@link #ACCESS_UNKNOWN}, {@link #ACCESS_ALLOWED} or {@link #ACCESS_REJECTED}. * @hide */
Requires <code>android.Manifest.permission#BLUETOOTH</code>
getPhonebookAccessPermission
{ "repo_name": "daiqiquan/framework-base", "path": "core/java/android/bluetooth/BluetoothDevice.java", "license": "apache-2.0", "size": 61148 }
[ "android.os.RemoteException", "android.util.Log" ]
import android.os.RemoteException; import android.util.Log;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
549,658
@Override public OdfName getOdfName() { return ATTRIBUTE_NAME; }
OdfName function() { return ATTRIBUTE_NAME; }
/** * Returns the attribute name. * * @return the <code>OdfName</code> for {@odf.attribute db:is-autoincrement}. */
Returns the attribute name
getOdfName
{ "repo_name": "jbjonesjr/geoproponis", "path": "external/odfdom-java-0.8.10-incubating-sources/org/odftoolkit/odfdom/dom/attribute/db/DbIsAutoincrementAttribute.java", "license": "gpl-2.0", "size": 3464 }
[ "org.odftoolkit.odfdom.pkg.OdfName" ]
import org.odftoolkit.odfdom.pkg.OdfName;
import org.odftoolkit.odfdom.pkg.*;
[ "org.odftoolkit.odfdom" ]
org.odftoolkit.odfdom;
2,676,177
EReference getDocumentRoot_DataOutputAssociation();
EReference getDocumentRoot_DataOutputAssociation();
/** * Returns the meta object for the containment reference '{@link org.eclipse.bpmn2.DocumentRoot#getDataOutputAssociation <em>Data Output Association</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Data Output Association</em>'...
Returns the meta object for the containment reference '<code>org.eclipse.bpmn2.DocumentRoot#getDataOutputAssociation Data Output Association</code>'.
getDocumentRoot_DataOutputAssociation
{ "repo_name": "lqjack/fixflow", "path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 1014933 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,407,838
public void changeCursor(Cursor cursor) { Cursor old = swapCursor(cursor); if (old != null) { old.close(); } }
void function(Cursor cursor) { Cursor old = swapCursor(cursor); if (old != null) { old.close(); } }
/** * Change the underlying cursor to a new cursor. If there is an existing cursor it will be * closed. */
Change the underlying cursor to a new cursor. If there is an existing cursor it will be closed
changeCursor
{ "repo_name": "denisura/mordor", "path": "app/src/main/java/com/github/denisura/mordor/CursorRecyclerViewAdapter.java", "license": "apache-2.0", "size": 4834 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
1,505,442
@Basic @Column(name = "FIXTURE_FACTORY_ARGS", nullable = true, length=255) public String getFixtureFactoryArgs() { return fixtureFactoryArgs; }
@Column(name = STR, nullable = true, length=255) String function() { return fixtureFactoryArgs; }
/** * <p>Getter for the field <code>fixtureFactoryArgs</code>.</p> * * @return a {@link java.lang.String} object. */
Getter for the field <code>fixtureFactoryArgs</code>
getFixtureFactoryArgs
{ "repo_name": "strator-dev/greenpepper", "path": "greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/domain/SystemUnderTest.java", "license": "apache-2.0", "size": 11806 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
447,083
public Stream<InstanceRule> listActiveRules() { return ruleMapping.values().stream().filter(ActivatingInstanceRule::isActive); }
Stream<InstanceRule> function() { return ruleMapping.values().stream().filter(ActivatingInstanceRule::isActive); }
/** * List active rules. * * @return the collection */
List active rules
listActiveRules
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/platform/seip-parent/extensions/rules/rules-core/src/main/java/com/sirma/itt/seip/rule/RuleStore.java", "license": "lgpl-3.0", "size": 16544 }
[ "com.sirma.itt.emf.rule.InstanceRule", "java.util.stream.Stream" ]
import com.sirma.itt.emf.rule.InstanceRule; import java.util.stream.Stream;
import com.sirma.itt.emf.rule.*; import java.util.stream.*;
[ "com.sirma.itt", "java.util" ]
com.sirma.itt; java.util;
2,185,066
static public HistoricItem maximumSince(Item item, AbstractInstant timestamp) { if(isDefaultServiceAvailable()) { return maximumSince(item, timestamp, defaultService); } else { return null; } }
static HistoricItem function(Item item, AbstractInstant timestamp) { if(isDefaultServiceAvailable()) { return maximumSince(item, timestamp, defaultService); } else { return null; } }
/** * Gets the historic item with the maximum value of the state of a given <code>item</code> since * a certain point in time. * The default persistence service is used. * * @param item the item to get the maximum state value for * @param the point in time to start the check * @return a historic item ...
Gets the historic item with the maximum value of the state of a given <code>item</code> since a certain point in time. The default persistence service is used
maximumSince
{ "repo_name": "paulianttila/openhab", "path": "bundles/core/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java", "license": "epl-1.0", "size": 22064 }
[ "org.joda.time.base.AbstractInstant", "org.openhab.core.items.Item", "org.openhab.core.persistence.HistoricItem" ]
import org.joda.time.base.AbstractInstant; import org.openhab.core.items.Item; import org.openhab.core.persistence.HistoricItem;
import org.joda.time.base.*; import org.openhab.core.items.*; import org.openhab.core.persistence.*;
[ "org.joda.time", "org.openhab.core" ]
org.joda.time; org.openhab.core;
299,577
public boolean startProcess(String processName, boolean waitToStart) throws SupervisordException { return (Boolean) new SimpleXMLRPC().call(buildFullMethodCall(Constants._START_PROCESS), processName, waitToStart); }
boolean function(String processName, boolean waitToStart) throws SupervisordException { return (Boolean) new SimpleXMLRPC().call(buildFullMethodCall(Constants._START_PROCESS), processName, waitToStart); }
/** * Start a process * * @param processName name Process name (or group:name, or group:*) * @param waitToStart wait Wait for process to be fully started * @return boolean result Always true unless error */
Start a process
startProcess
{ "repo_name": "satifanie/supervisord4j", "path": "src/main/java/com/satikey/tools/supervisord/Supervisord.java", "license": "apache-2.0", "size": 21019 }
[ "com.satikey.tools.supervisord.exceptions.SupervisordException" ]
import com.satikey.tools.supervisord.exceptions.SupervisordException;
import com.satikey.tools.supervisord.exceptions.*;
[ "com.satikey.tools" ]
com.satikey.tools;
2,753,338
public void setAccountingLineForValidation(AccountingLine accountingLineForValidation) { this.accountingLineForValidation = accountingLineForValidation; }
void function(AccountingLine accountingLineForValidation) { this.accountingLineForValidation = accountingLineForValidation; }
/** * Sets the accountingLineForValidation attribute value. * @param accountingLineForValidation The accountingLineForValidation to set. */
Sets the accountingLineForValidation attribute value
setAccountingLineForValidation
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/fp/document/validation/impl/GeneralErrorCorrectionRequiredReferenceFieldValidation.java", "license": "apache-2.0", "size": 4966 }
[ "org.kuali.kfs.sys.businessobject.AccountingLine" ]
import org.kuali.kfs.sys.businessobject.AccountingLine;
import org.kuali.kfs.sys.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,772,384
public static String convertResultSetToXMLString(ResultSetRewindable resultSet) { String retVal = ResultSetFormatter.asXMLString(resultSet); resultSet.reset(); return retVal; }
static String function(ResultSetRewindable resultSet) { String retVal = ResultSetFormatter.asXMLString(resultSet); resultSet.reset(); return retVal; }
/** * Converts Jena result set to XML. To make a ResultSet rewindable use: * ResultSetRewindable rsRewind = * ResultSetFactory.makeRewindable(resultSet); * * @param resultSet * The result set to transform, must be rewindable to prevent * errors. * @return String xml */
Converts Jena result set to XML. To make a ResultSet rewindable use: ResultSetRewindable rsRewind = ResultSetFactory.makeRewindable(resultSet)
convertResultSetToXMLString
{ "repo_name": "eschwert/DL-Learner", "path": "components-core/src/main/java/org/dllearner/kb/sparql/SparqlQuery.java", "license": "gpl-3.0", "size": 8563 }
[ "com.hp.hpl.jena.query.ResultSetFormatter", "com.hp.hpl.jena.query.ResultSetRewindable" ]
import com.hp.hpl.jena.query.ResultSetFormatter; import com.hp.hpl.jena.query.ResultSetRewindable;
import com.hp.hpl.jena.query.*;
[ "com.hp.hpl" ]
com.hp.hpl;
2,649,764
public void clear() { for (int i = 0; i < items.size(); ++i) { items.set(i, new ItemStack(Material.AIR)); } helmet = null; chestplate = null; leggings = null; boots = null; }
void function() { for (int i = 0; i < items.size(); ++i) { items.set(i, new ItemStack(Material.AIR)); } helmet = null; chestplate = null; leggings = null; boots = null; }
/** * Clear out the inventory */
Clear out the inventory
clear
{ "repo_name": "hdt80/BossFight", "path": "src/main/java/me/hpt/ItemStorage/ItemInventory.java", "license": "mit", "size": 7838 }
[ "org.bukkit.Material", "org.bukkit.inventory.ItemStack" ]
import org.bukkit.Material; import org.bukkit.inventory.ItemStack;
import org.bukkit.*; import org.bukkit.inventory.*;
[ "org.bukkit", "org.bukkit.inventory" ]
org.bukkit; org.bukkit.inventory;
2,189,187
public JsStatement show() { return new JsQuery(this).$().chain("datepicker", "'show'"); }
JsStatement function() { return new JsQuery(this).$().chain(STR, STR); }
/** * Method to show the datepicker * * @return the associated JsStatement */
Method to show the datepicker
show
{ "repo_name": "jijopaulose/wiquery", "path": "wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/datepicker/InlineDatePicker.java", "license": "mit", "size": 33795 }
[ "org.odlabs.wiquery.core.javascript.JsQuery", "org.odlabs.wiquery.core.javascript.JsStatement" ]
import org.odlabs.wiquery.core.javascript.JsQuery; import org.odlabs.wiquery.core.javascript.JsStatement;
import org.odlabs.wiquery.core.javascript.*;
[ "org.odlabs.wiquery" ]
org.odlabs.wiquery;
1,685,950
@GetMapping("/users/{login}") public ResponseEntity<UserDTO> getUser(@PathVariable String login) { log.debug("REST request to get User : {}", login); return ResponseUtil.wrapOrNotFound( userService.getUserWithAuthoritiesByLogin(login) .map(UserDTO::new)); }
@GetMapping(STR) ResponseEntity<UserDTO> function(@PathVariable String login) { log.debug(STR, login); return ResponseUtil.wrapOrNotFound( userService.getUserWithAuthoritiesByLogin(login) .map(UserDTO::new)); }
/** * GET /users/:login : get the "login" user. * * @param login the login of the user to find * @return the ResponseEntity with status 200 (OK) and with body the "login" user, or with status 404 (Not Found) */
GET /users/:login : get the "login" user
getUser
{ "repo_name": "bahrmichael/the-buyback", "path": "src/main/java/com/thebuyback/eve/web/rest/UserResource.java", "license": "mit", "size": 6436 }
[ "com.thebuyback.eve.service.dto.UserDTO", "io.github.jhipster.web.util.ResponseUtil", "org.springframework.http.ResponseEntity", "org.springframework.web.bind.annotation.GetMapping", "org.springframework.web.bind.annotation.PathVariable" ]
import com.thebuyback.eve.service.dto.UserDTO; import io.github.jhipster.web.util.ResponseUtil; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable;
import com.thebuyback.eve.service.dto.*; import io.github.jhipster.web.util.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "com.thebuyback.eve", "io.github.jhipster", "org.springframework.http", "org.springframework.web" ]
com.thebuyback.eve; io.github.jhipster; org.springframework.http; org.springframework.web;
1,348,434
protected LinkedList<DiffAction> diff_map(String text1, String text2) { long ms_end = System.currentTimeMillis() + (long) (Diff_Timeout * 1000); // Cache the text lengths to prevent multiple calls. int text1_length = text1.length(); int text2_length = text2.length(); int max_...
LinkedList<DiffAction> function(String text1, String text2) { long ms_end = System.currentTimeMillis() + (long) (Diff_Timeout * 1000); int text1_length = text1.length(); int text2_length = text2.length(); int max_d = text1_length + text2_length - 1; boolean doubleEnd = Diff_DualThreshold * 2 < max_d; List<Set<Long>> v_...
/** * Explore the intersection points between the two texts. * * @param text1 Old string to be diffed. * @param text2 New string to be diffed. * @return LinkedList of Diff objects or null if no diff available. */
Explore the intersection points between the two texts
diff_map
{ "repo_name": "vstabile/chinese-flashcards-android", "path": "src/com/hichinaschool/flashcards/utils/DiffEngine.java", "license": "gpl-3.0", "size": 49777 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.HashSet", "java.util.LinkedList", "java.util.List", "java.util.Map", "java.util.Set" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,970,858
@Test() public void testSetCharacterArrayEmpty() throws Exception { ByteStringBuffer buffer = new ByteStringBuffer().append("foo"); assertFalse(buffer.isEmpty()); assertEquals(buffer.length(), 3); assertEquals(buffer.toString(), "foo"); buffer.set(new char[0]); assertTrue(buffer....
@Test() void function() throws Exception { ByteStringBuffer buffer = new ByteStringBuffer().append("foo"); assertFalse(buffer.isEmpty()); assertEquals(buffer.length(), 3); assertEquals(buffer.toString(), "foo"); buffer.set(new char[0]); assertTrue(buffer.isEmpty()); assertEquals(buffer.length(), 0); assertEquals(buffer...
/** * Provides test coverage for the {@code set} method variant that takes a * character array with an empty array. * * @throws Exception If an unexpected problem occurs. */
Provides test coverage for the set method variant that takes a character array with an empty array
testSetCharacterArrayEmpty
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/util/ByteStringBufferTestCase.java", "license": "gpl-2.0", "size": 141047 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
2,813,237
List<Element> get();
List<Element> get();
/** * Get an the set of matched elements */
Get an the set of matched elements
get
{ "repo_name": "jOOQ/jOOX", "path": "jOOX/src/main/java/org/joox/Match.java", "license": "apache-2.0", "size": 83723 }
[ "java.util.List", "org.w3c.dom.Element" ]
import java.util.List; import org.w3c.dom.Element;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
1,181,829
@ApiModelProperty(value = "Unique name used in url and references. Uppercase, lowercase, numbers and hyphens only. Max 50 characters. Cannot be altered once created. Default: random UUID") public String getUniqueName() { return uniqueName; }
@ApiModelProperty(value = STR) String function() { return uniqueName; }
/** * Unique name used in url and references. Uppercase, lowercase, numbers and hyphens only. Max 50 characters. Cannot be altered once created. Default: random UUID * @return uniqueName **/
Unique name used in url and references. Uppercase, lowercase, numbers and hyphens only. Max 50 characters. Cannot be altered once created. Default: random UUID
getUniqueName
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/main/java/com/knetikcloud/model/SimpleGroupResource.java", "license": "apache-2.0", "size": 3175 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,010,686
public InputStream downloadMineralOccurrenceGml(String serviceURL, String commodityName, String measureType, String minOreAmount, String minOreAmountUOM, String minCommodityAmount, String minCommodityAmountUOM, int maxFeatures, ...
InputStream function(String serviceURL, String commodityName, String measureType, String minOreAmount, String minOreAmountUOM, String minCommodityAmount, String minCommodityAmountUOM, int maxFeatures, FilterBoundingBox bbox, String startIndex) throws PortalServiceException, URISyntaxException { MineralOccurrenceFilter ...
/** * Given a list of parameters, call a service and get the Mineral Occurrence GML * * @param serviceURL * @param commodityName * @param measureType * @param minOreAmount * @param minOreAmountUOM * @param minCommodityAmount * @param minCommodityAmountUOM * @param cutOf...
Given a list of parameters, call a service and get the Mineral Occurrence GML
downloadMineralOccurrenceGml
{ "repo_name": "victortey/AuScope-Portal", "path": "src/main/java/org/auscope/portal/server/web/service/download/MineralOccurrenceDownloadService.java", "license": "lgpl-3.0", "size": 7217 }
[ "java.io.InputStream", "java.net.URISyntaxException", "org.apache.http.client.methods.HttpRequestBase", "org.auscope.portal.core.services.PortalServiceException", "org.auscope.portal.core.services.methodmakers.WFSGetFeatureMethodMaker", "org.auscope.portal.core.services.methodmakers.filter.FilterBoundingB...
import java.io.InputStream; import java.net.URISyntaxException; import org.apache.http.client.methods.HttpRequestBase; import org.auscope.portal.core.services.PortalServiceException; import org.auscope.portal.core.services.methodmakers.WFSGetFeatureMethodMaker; import org.auscope.portal.core.services.methodmakers.filte...
import java.io.*; import java.net.*; import org.apache.http.client.methods.*; import org.auscope.portal.core.services.*; import org.auscope.portal.core.services.methodmakers.*; import org.auscope.portal.core.services.methodmakers.filter.*; import org.auscope.portal.mineraloccurrence.*;
[ "java.io", "java.net", "org.apache.http", "org.auscope.portal" ]
java.io; java.net; org.apache.http; org.auscope.portal;
35,363
@CheckReturnValue public UnsignedLong plus(UnsignedLong val) { return fromLongBits(this.value + checkNotNull(val).value); }
UnsignedLong function(UnsignedLong val) { return fromLongBits(this.value + checkNotNull(val).value); }
/** * Returns the result of adding this and {@code val}. If the result would have more than 64 bits, * returns the low 64 bits of the result. * * @since 14.0 */
Returns the result of adding this and val. If the result would have more than 64 bits, returns the low 64 bits of the result
plus
{ "repo_name": "ben-manes/guava", "path": "guava/src/com/google/common/primitives/UnsignedLong.java", "license": "apache-2.0", "size": 8497 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,723,703
public static boolean isSavedSessionExists(Context context) { Preferences preferences = new Preferences(context); // Check if the user name exists in the Shared preferences String username = preferences.getUsername(); if (username == null || username.equals(Preferences.DEFAULT_USERN...
static boolean function(Context context) { Preferences preferences = new Preferences(context); String username = preferences.getUsername(); if (username == null username.equals(Preferences.DEFAULT_USERNAME)) { return false; } if (AccountUtils.getUserAccount(context, username) == null) { return false; } return true; }
/** * Check if there is any saved session * @param context The context used * @return true if there is any saved session * false otherwise */
Check if there is any saved session
isSavedSessionExists
{ "repo_name": "sathiamour/Android-Acoount-Manager", "path": "src/ankit/account/manager/model/Session.java", "license": "apache-2.0", "size": 7875 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,777,413
public static final SourceModel.Expr quickCheck(SourceModel.Expr testItem) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.quickCheck), testItem}); } public static final QualifiedName quickCheck = QualifiedName.make(CAL_QuickCh...
static final SourceModel.Expr function(SourceModel.Expr testItem) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.quickCheck), testItem}); } static final QualifiedName function = QualifiedName.make(CAL_QuickCheck.MODULE_NAME, STR);
/** * Verifies a property using default configuration. * @param testItem (CAL type: <code>Cal.Utilities.QuickCheck.Testable t => t</code>) * the item to test * @return (CAL type: <code>Cal.Core.Prelude.Boolean</code>) * true iff all tests pass */
Verifies a property using default configuration
quickCheck
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/module/Cal/Utilities/CAL_QuickCheck.java", "license": "bsd-3-clause", "size": 46821 }
[ "org.openquark.cal.compiler.QualifiedName", "org.openquark.cal.compiler.SourceModel" ]
import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel;
import org.openquark.cal.compiler.*;
[ "org.openquark.cal" ]
org.openquark.cal;
579,356
public void setClientRegistry(IClientRegistry clientRegistry) { this.clientRegistry = clientRegistry; }
void function(IClientRegistry clientRegistry) { this.clientRegistry = clientRegistry; }
/** * Setter for client registry * * @param clientRegistry Client registry */
Setter for client registry
setClientRegistry
{ "repo_name": "wakashige/red5-server", "path": "src/main/java/org/red5/server/Context.java", "license": "apache-2.0", "size": 11744 }
[ "org.red5.server.api.IClientRegistry" ]
import org.red5.server.api.IClientRegistry;
import org.red5.server.api.*;
[ "org.red5.server" ]
org.red5.server;
2,034,386
public IPAllocationMethod privateIPAllocationMethod() { return this.privateIPAllocationMethod; }
IPAllocationMethod function() { return this.privateIPAllocationMethod; }
/** * Get the privateIPAllocationMethod value. * * @return the privateIPAllocationMethod value */
Get the privateIPAllocationMethod value
privateIPAllocationMethod
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayFrontendIPConfigurationInner.java", "license": "mit", "size": 5829 }
[ "com.microsoft.azure.management.network.IPAllocationMethod" ]
import com.microsoft.azure.management.network.IPAllocationMethod;
import com.microsoft.azure.management.network.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,302,946
public void setProjectDir(@Nullable File projectDir) { if (projectDir == null) { setCurrentDir(null); this.projectDir = null; } else { File canonicalFile = FileUtils.canonicalize(projectDir); currentDir = canonicalFile; this.projectDir = ca...
void function(@Nullable File projectDir) { if (projectDir == null) { setCurrentDir(null); this.projectDir = null; } else { File canonicalFile = FileUtils.canonicalize(projectDir); currentDir = canonicalFile; this.projectDir = canonicalFile; } }
/** * Sets the project directory to use to select the default project. Use null to use the default criteria for selecting the default project. * * @param projectDir The project directory. May be null. */
Sets the project directory to use to select the default project. Use null to use the default criteria for selecting the default project
setProjectDir
{ "repo_name": "gradle/gradle", "path": "subprojects/core-api/src/main/java/org/gradle/StartParameter.java", "license": "apache-2.0", "size": 31012 }
[ "java.io.File", "javax.annotation.Nullable", "org.gradle.internal.FileUtils" ]
import java.io.File; import javax.annotation.Nullable; import org.gradle.internal.FileUtils;
import java.io.*; import javax.annotation.*; import org.gradle.internal.*;
[ "java.io", "javax.annotation", "org.gradle.internal" ]
java.io; javax.annotation; org.gradle.internal;
973,346
@Override public Comparator<? super E> comparator() { return comparator; }
Comparator<? super E> function() { return comparator; }
/** * Returns the comparator that orders the elements, which is * {@link Ordering#natural()} when the natural ordering of the * elements is used. Note that its behavior is not consistent with * {@link SortedSet#comparator()}, which returns {@code null} to indicate * natural ordering. */
Returns the comparator that orders the elements, which is <code>Ordering#natural()</code> when the natural ordering of the elements is used. Note that its behavior is not consistent with <code>SortedSet#comparator()</code>, which returns null to indicate natural ordering
comparator
{ "repo_name": "sensui/guava-libraries", "path": "guava/src/com/google/common/collect/ImmutableSortedSet.java", "license": "apache-2.0", "size": 30867 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
2,288,348
private void sendRecordFailedNotify(String reason) { Status failedStatus = new Status(StatusCodes.NS_RECORD_FAILED); failedStatus.setLevel(Status.ERROR); failedStatus.setClientid(getStreamId()); failedStatus.setDetails(getPublishedName()); failedStatus.setDesciption(reas...
void function(String reason) { Status failedStatus = new Status(StatusCodes.NS_RECORD_FAILED); failedStatus.setLevel(Status.ERROR); failedStatus.setClientid(getStreamId()); failedStatus.setDetails(getPublishedName()); failedStatus.setDesciption(reason); StatusMessage failedMsg = new StatusMessage(); failedMsg.setBody(f...
/** * Sends record failed notifications */
Sends record failed notifications
sendRecordFailedNotify
{ "repo_name": "solomax/red5-server-common", "path": "src/main/java/org/red5/server/stream/ClientBroadcastStream.java", "license": "apache-2.0", "size": 39246 }
[ "org.red5.server.net.rtmp.status.Status", "org.red5.server.net.rtmp.status.StatusCodes", "org.red5.server.stream.message.StatusMessage" ]
import org.red5.server.net.rtmp.status.Status; import org.red5.server.net.rtmp.status.StatusCodes; import org.red5.server.stream.message.StatusMessage;
import org.red5.server.net.rtmp.status.*; import org.red5.server.stream.message.*;
[ "org.red5.server" ]
org.red5.server;
1,669,656
public static IModuleInfo getInstance() { if (instance == null) instance = new ModuleInfo(); return instance; }
static IModuleInfo function() { if (instance == null) instance = new ModuleInfo(); return instance; }
/** * Retrieves the singleton instance of <code>IModuleInfo</code>. * * @return the singleton instance */
Retrieves the singleton instance of <code>IModuleInfo</code>
getInstance
{ "repo_name": "jurkov/j-algo-mod", "path": "src/org/jalgo/module/em/ModuleInfo.java", "license": "gpl-2.0", "size": 1428 }
[ "org.jalgo.main.IModuleInfo" ]
import org.jalgo.main.IModuleInfo;
import org.jalgo.main.*;
[ "org.jalgo.main" ]
org.jalgo.main;
1,928,863
TypeConverterExists getTypeConverterExists();
TypeConverterExists getTypeConverterExists();
/** * What should happen when attempting to add a duplicate type converter. * <p/> * The default behavior is to override the existing. */
What should happen when attempting to add a duplicate type converter. The default behavior is to override the existing
getTypeConverterExists
{ "repo_name": "curso007/camel", "path": "camel-core/src/main/java/org/apache/camel/spi/TypeConverterRegistry.java", "license": "apache-2.0", "size": 6226 }
[ "org.apache.camel.TypeConverterExists" ]
import org.apache.camel.TypeConverterExists;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
15,688
void saveOnClose(SaveData evt) { } public int getState() { return model.getState(); }
void saveOnClose(SaveData evt) { } public int getState() { return model.getState(); }
/** * Saves the data before closing. * * @param evt The event to handle. */
Saves the data before closing
saveOnClose
{ "repo_name": "dominikl/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java", "license": "gpl-2.0", "size": 162310 }
[ "org.openmicroscopy.shoola.agents.events.SaveData" ]
import org.openmicroscopy.shoola.agents.events.SaveData;
import org.openmicroscopy.shoola.agents.events.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
310,660
public static ByteBuf wrappedBuffer(ByteBuffer buffer) { if (!buffer.hasRemaining()) { return EMPTY_BUFFER; } if (buffer.hasArray()) { return wrappedBuffer( buffer.array(), buffer.arrayOffset() + buffer.position(), ...
static ByteBuf function(ByteBuffer buffer) { if (!buffer.hasRemaining()) { return EMPTY_BUFFER; } if (buffer.hasArray()) { return wrappedBuffer( buffer.array(), buffer.arrayOffset() + buffer.position(), buffer.remaining()).order(buffer.order()); } else if (PlatformDependent.hasUnsafe()) { if (buffer.isReadOnly()) { if ...
/** * Creates a new buffer which wraps the specified NIO buffer's current * slice. A modification on the specified buffer's content will be * visible to the returned buffer. */
Creates a new buffer which wraps the specified NIO buffer's current slice. A modification on the specified buffer's content will be visible to the returned buffer
wrappedBuffer
{ "repo_name": "iloveyou416068/CookNIOServer", "path": "netty_source_4_0_25/buffer/src/main/java/io/netty/buffer/Unpooled.java", "license": "apache-2.0", "size": 29073 }
[ "io.netty.util.internal.PlatformDependent", "java.nio.ByteBuffer" ]
import io.netty.util.internal.PlatformDependent; import java.nio.ByteBuffer;
import io.netty.util.internal.*; import java.nio.*;
[ "io.netty.util", "java.nio" ]
io.netty.util; java.nio;
1,138,022
public List<String> getByXPath(final String xPath) { return xPathGetable.getByXPath(xPath); }
List<String> function(final String xPath) { return xPathGetable.getByXPath(xPath); }
/** * See {@link XPathGetable}. * * @param xPath * a XPath pattern * @return list of all the found nodes in 'String' representation. */
See <code>XPathGetable</code>
getByXPath
{ "repo_name": "matthiasware/testsuite-nocoding", "path": "src/com/xceptance/xlt/common/util/action/validation/URLActionDataExecutableResult.java", "license": "gpl-2.0", "size": 7146 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
987,971
private void updateFavPointBox() { // Favorite counts final int favCount = cache.getFavoritePoints(); if (favCount >= 0 && !cache.isEventCache()) { favoriteLine.left.setVisibility(View.VISIBLE); final int findsCount = cache.getFindsCount(); ...
void function() { final int favCount = cache.getFavoritePoints(); if (favCount >= 0 && !cache.isEventCache()) { favoriteLine.left.setVisibility(View.VISIBLE); final int findsCount = cache.getFindsCount(); if (findsCount > 0) { favoriteLine.right.setText(res.getString(R.string.favorite_count_percent, favCount, (float) (...
/** * Show/hide buttons, set text in favorite line and box */
Show/hide buttons, set text in favorite line and box
updateFavPointBox
{ "repo_name": "S-Bartfast/cgeo", "path": "main/src/cgeo/geocaching/CacheDetailActivity.java", "license": "apache-2.0", "size": 123572 }
[ "android.view.View", "android.widget.ImageButton", "android.widget.LinearLayout", "android.widget.TextView" ]
import android.view.View; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView;
import android.view.*; import android.widget.*;
[ "android.view", "android.widget" ]
android.view; android.widget;
2,514,722
void remove(ConfigEntity configVariable);
void remove(ConfigEntity configVariable);
/** * removes ConfigEntity * @param configVariable */
removes ConfigEntity
remove
{ "repo_name": "MUNDO-platform/srccode", "path": "mundo-java-backend/src/main/java/pl/orange/labs/db/dao/ConfigDao.java", "license": "lgpl-2.1", "size": 3189 }
[ "pl.orange.labs.db.entities.ConfigEntity" ]
import pl.orange.labs.db.entities.ConfigEntity;
import pl.orange.labs.db.entities.*;
[ "pl.orange.labs" ]
pl.orange.labs;
2,392,451
public void setRule(Rule rule) { this.rule = rule; }
void function(Rule rule) { this.rule = rule; }
/** * Set the rule * * @param rule the rule to set */
Set the rule
setRule
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/remote-api/source/java/org/alfresco/repo/web/scripts/rule/ruleset/RuleRef.java", "license": "lgpl-3.0", "size": 2126 }
[ "org.alfresco.service.cmr.rule.Rule" ]
import org.alfresco.service.cmr.rule.Rule;
import org.alfresco.service.cmr.rule.*;
[ "org.alfresco.service" ]
org.alfresco.service;
2,285,158
@Override public int getRisk() { return Alert.RISK_HIGH; }
int function() { return Alert.RISK_HIGH; }
/** * Give back the risk associated to this vulnerability (high) * @return the risk according to the Alert enum */
Give back the risk associated to this vulnerability (high)
getRisk
{ "repo_name": "brunoqc/zap-extensions", "path": "src/org/zaproxy/zap/extension/ascanrules/CommandInjectionPlugin.java", "license": "apache-2.0", "size": 19527 }
[ "org.parosproxy.paros.core.scanner.Alert" ]
import org.parosproxy.paros.core.scanner.Alert;
import org.parosproxy.paros.core.scanner.*;
[ "org.parosproxy.paros" ]
org.parosproxy.paros;
2,384,578
LOG.info("Rolling master-key for container-tokens, got key with id " + masterKeyRecord.getKeyId()); if (super.currentMasterKey == null) { super.currentMasterKey = new MasterKeyData(masterKeyRecord, createSecretKey(masterKeyRecord .getBytes().array())); } else { if (supe...
LOG.info(STR + masterKeyRecord.getKeyId()); if (super.currentMasterKey == null) { super.currentMasterKey = new MasterKeyData(masterKeyRecord, createSecretKey(masterKeyRecord .getBytes().array())); } else { if (super.currentMasterKey.getMasterKey().getKeyId() != masterKeyRecord .getKeyId()) { this.previousMasterKey = su...
/** * Used by NodeManagers to create a token-secret-manager with the key obtained * from the RM. This can happen during registration or when the RM rolls the * master-key and signals the NM. * * @param masterKeyRecord */
Used by NodeManagers to create a token-secret-manager with the key obtained from the RM. This can happen during registration or when the RM rolls the master-key and signals the NM
setMasterKey
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/security/NMContainerTokenSecretManager.java", "license": "apache-2.0", "size": 7170 }
[ "org.apache.hadoop.yarn.server.security.MasterKeyData" ]
import org.apache.hadoop.yarn.server.security.MasterKeyData;
import org.apache.hadoop.yarn.server.security.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,733,568
public static List<File> getContainerLogDirs(ContainerId containerId, String remoteUser, Context context) throws YarnException { Container container = context.getContainers().get(containerId); Application application = getApplicationForContainer(containerId, context); checkAccess(remoteUser, applic...
static List<File> function(ContainerId containerId, String remoteUser, Context context) throws YarnException { Container container = context.getContainers().get(containerId); Application application = getApplicationForContainer(containerId, context); checkAccess(remoteUser, application, context); if (container != null)...
/** * Finds the local directories that logs for the given container are stored * on. */
Finds the local directories that logs for the given container are stored on
getContainerLogDirs
{ "repo_name": "bruthe/hadoop-2.6.0r", "path": "src/yarn/server/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsUtils.java", "license": "apache-2.0", "size": 7864 }
[ "java.io.File", "java.util.List", "org.apache.hadoop.yarn.api.records.ContainerId", "org.apache.hadoop.yarn.exceptions.YarnException", "org.apache.hadoop.yarn.server.nodemanager.Context", "org.apache.hadoop.yarn.server.nodemanager.containermanager.application.Application", "org.apache.hadoop.yarn.server...
import java.io.File; import java.util.List; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.server.nodemanager.Context; import org.apache.hadoop.yarn.server.nodemanager.containermanager.application.Application; import org.apach...
import java.io.*; import java.util.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.exceptions.*; import org.apache.hadoop.yarn.server.nodemanager.*; import org.apache.hadoop.yarn.server.nodemanager.containermanager.application.*; import org.apache.hadoop.yarn.server.nodemanager.containerma...
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
674,874
public Map<String, List<String>> toFormParams() { Map<String, List<String>> formParams = new HashMap<String, List<String>>(); addFormParam(formParams, GRANT_TYPE_FORM, getGrantType()); addFormParam(formParams, EXPIRES_IN_FORM, getExpiresIn()); addFormParam(formParams, SCOPE_FORM, get...
Map<String, List<String>> function() { Map<String, List<String>> formParams = new HashMap<String, List<String>>(); addFormParam(formParams, GRANT_TYPE_FORM, getGrantType()); addFormParam(formParams, EXPIRES_IN_FORM, getExpiresIn()); addFormParam(formParams, SCOPE_FORM, getScope()); return formParams; }
/** * Converts this request, to its formParams Map representation. * * @return the formParams, for use with application/x-www-form-urlencoded bodies. */
Converts this request, to its formParams Map representation
toFormParams
{ "repo_name": "heremaps/here-aaa-java-sdk", "path": "here-oauth-client/src/main/java/com/here/account/oauth2/AccessTokenRequest.java", "license": "apache-2.0", "size": 7920 }
[ "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
421,945
ArgChecker.notNull(uniqueName, "uniqueName"); return extendedEnum().lookup(uniqueName); }
ArgChecker.notNull(uniqueName, STR); return extendedEnum().lookup(uniqueName); }
/** * Obtains an instance from the specified unique name. * * @param uniqueName the unique name * @return the convention * @throws IllegalArgumentException if the name is not known */
Obtains an instance from the specified unique name
of
{ "repo_name": "ChinaQuants/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/swap/type/FixedOvernightSwapConvention.java", "license": "apache-2.0", "size": 8874 }
[ "com.opengamma.strata.collect.ArgChecker" ]
import com.opengamma.strata.collect.ArgChecker;
import com.opengamma.strata.collect.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
42,901
@Test public void testMethodAttributeWithDifferentObjects() throws PebbleException, IOException { Loader stringLoader = new StringLoader(); PebbleEngine pebble = new PebbleEngine(stringLoader); pebble.setStrictVariables(true); PebbleTemplate template = pebble.getTemplate("hello {...
void function() throws PebbleException, IOException { Loader stringLoader = new StringLoader(); PebbleEngine pebble = new PebbleEngine(stringLoader); pebble.setStrictVariables(true); PebbleTemplate template = pebble.getTemplate(STR); Map<String, Object> context1 = new HashMap<>(); context1.put(STR, new CustomizableObje...
/** * The GetAttribute expression involves caching, we test with different * objects to make sure that the caching doesnt have any negative side * effects. * * @throws PebbleException * @throws IOException */
The GetAttribute expression involves caching, we test with different objects to make sure that the caching doesnt have any negative side effects
testMethodAttributeWithDifferentObjects
{ "repo_name": "chambas/pebble", "path": "src/test/java/com/mitchellbosecke/pebble/GetAttributeTest.java", "license": "bsd-3-clause", "size": 18846 }
[ "com.mitchellbosecke.pebble.error.PebbleException", "com.mitchellbosecke.pebble.loader.Loader", "com.mitchellbosecke.pebble.loader.StringLoader", "com.mitchellbosecke.pebble.template.PebbleTemplate", "java.io.IOException", "java.io.StringWriter", "java.io.Writer", "java.util.HashMap", "java.util.Map...
import com.mitchellbosecke.pebble.error.PebbleException; import com.mitchellbosecke.pebble.loader.Loader; import com.mitchellbosecke.pebble.loader.StringLoader; import com.mitchellbosecke.pebble.template.PebbleTemplate; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.util.Has...
import com.mitchellbosecke.pebble.error.*; import com.mitchellbosecke.pebble.loader.*; import com.mitchellbosecke.pebble.template.*; import java.io.*; import java.util.*; import org.junit.*;
[ "com.mitchellbosecke.pebble", "java.io", "java.util", "org.junit" ]
com.mitchellbosecke.pebble; java.io; java.util; org.junit;
2,031,367
public static void addScaledVertexWithUV(Tessellator tessellator, float x, float y, float z, float u, float v) { tessellator.addVertexWithUV(x*Constants.UNIT, y*Constants.UNIT, z*Constants.UNIT, u*Constants.UNIT, v*Constants.UNIT); }
static void function(Tessellator tessellator, float x, float y, float z, float u, float v) { tessellator.addVertexWithUV(x*Constants.UNIT, y*Constants.UNIT, z*Constants.UNIT, u*Constants.UNIT, v*Constants.UNIT); }
/** * Adds a vertex to the tessellator scaled to the unit size of a block. * * @param tessellator * @param x the x position, from 0 to {@value Constants.WHOLE}. * @param y the y position, from 0 to {@value Constants.WHOLE}. * @param z the z position, from 0 to {@value Constants.WHOLE}. ...
Adds a vertex to the tessellator scaled to the unit size of a block
addScaledVertexWithUV
{ "repo_name": "InfinityRaider/SteamPowerAdditions", "path": "src/main/java/com/InfinityRaider/SteamPowerAdditions/utility/RenderHelper.java", "license": "mit", "size": 11643 }
[ "net.minecraft.client.renderer.Tessellator" ]
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.*;
[ "net.minecraft.client" ]
net.minecraft.client;
2,014,345
@Override public void setId(int id) { // Call ICEObject::setId super.setId(id); // Notify listeners notifyListeners(); } public GeometryComponent() { // Create a new Geometry and register as its listener. // ShapeComponent model = new ShapeComponent(); // TODO Get the right factory from a ser...
void function(int id) { super.setId(id); notifyListeners(); } public GeometryComponent() { listeners = new ArrayList<IUpdateableListener>(); geometry = GeometryFactory.eINSTANCE.createGeometry(); }
/** * <p> * This operation overrides the ICEObject.setId() operation and provides an * update notification in addition to setting the id. * </p> * * @param id * <p> * The new ICEObject ID * </p> */
This operation overrides the ICEObject.setId() operation and provides an update notification in addition to setting the id.
setId
{ "repo_name": "eclipse/ice", "path": "org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/form/GeometryComponent.java", "license": "epl-1.0", "size": 10133 }
[ "java.util.ArrayList", "org.eclipse.ice.datastructures.ICEObject", "org.eclipse.january.geometry.GeometryFactory" ]
import java.util.ArrayList; import org.eclipse.ice.datastructures.ICEObject; import org.eclipse.january.geometry.GeometryFactory;
import java.util.*; import org.eclipse.ice.datastructures.*; import org.eclipse.january.geometry.*;
[ "java.util", "org.eclipse.ice", "org.eclipse.january" ]
java.util; org.eclipse.ice; org.eclipse.january;
2,133,820
public AlgorithmParameterSpec getParameterSpec() { return parameterSpec; }
AlgorithmParameterSpec function() { return parameterSpec; }
/** * Return the algorithm parameter spec to be applied with the private key when the encapsulation is decrypted. * * @return the algorithm parameter spec to be used with the private key. */
Return the algorithm parameter spec to be applied with the private key when the encapsulation is decrypted
getParameterSpec
{ "repo_name": "Skywalker-11/spongycastle", "path": "prov/src/main/java/org/spongycastle/jcajce/spec/KTSParameterSpec.java", "license": "mit", "size": 4994 }
[ "java.security.spec.AlgorithmParameterSpec" ]
import java.security.spec.AlgorithmParameterSpec;
import java.security.spec.*;
[ "java.security" ]
java.security;
289,643
@Test public void testSerializeAndDeserialize() throws Exception { System.out.print("MessageSerializer : Testing serialization and deserialization of object..."); String sTest = "Hello World"; byte[] baSerialized = MessageSerializer.serialize(sTest); String sOther = (String) MessageSerializer.de...
void function() throws Exception { System.out.print(STR); String sTest = STR; byte[] baSerialized = MessageSerializer.serialize(sTest); String sOther = (String) MessageSerializer.deserialize(baSerialized); assertEquals(STR, sTest, sOther); System.out.println("done."); }
/** * Test serialization and deserialization of objects * * @throws Exception * reason of failure given by the test. */
Test serialization and deserialization of objects
testSerializeAndDeserialize
{ "repo_name": "MaxxtonGroup/async-amqp-messaging", "path": "src/test/java/com/maxxton/test/communication/MessageSerializerTest.java", "license": "apache-2.0", "size": 1441 }
[ "com.maxxton.aam.communication.MessageSerializer", "org.junit.Assert" ]
import com.maxxton.aam.communication.MessageSerializer; import org.junit.Assert;
import com.maxxton.aam.communication.*; import org.junit.*;
[ "com.maxxton.aam", "org.junit" ]
com.maxxton.aam; org.junit;
250,566
@JsonProperty("mixtures") public int getNMixtures() { return mMixtures; }
@JsonProperty(STR) int function() { return mMixtures; }
/** * Returns the number of gaussians this loss function * will attempt to find. * @return Number of gaussians to find. */
Returns the number of gaussians this loss function will attempt to find
getNMixtures
{ "repo_name": "RobAltena/deeplearning4j", "path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/lossfunctions/impl/LossMixtureDensity.java", "license": "apache-2.0", "size": 20610 }
[ "org.nd4j.shade.jackson.annotation.JsonProperty" ]
import org.nd4j.shade.jackson.annotation.JsonProperty;
import org.nd4j.shade.jackson.annotation.*;
[ "org.nd4j.shade" ]
org.nd4j.shade;
1,842,355
@Deprecated public Document getDocument(CmsUUID structureId) { return getDocument(CmsGallerySearchFieldMapping.FIELD_RESOURCE_STRUCTURE_ID, structureId.toString()); }
Document function(CmsUUID structureId) { return getDocument(CmsGallerySearchFieldMapping.FIELD_RESOURCE_STRUCTURE_ID, structureId.toString()); }
/** * Returns the Lucene document with the given structure id from the index.<p> * * @param structureId the structure id of the document to retrieve * * @return the Lucene document with the given root path from the index * * @deprecated Use {@link #getDocument(String, String)} in...
Returns the Lucene document with the given structure id from the index
getDocument
{ "repo_name": "serrapos/opencms-core", "path": "src/org/opencms/search/galleries/CmsGallerySearchIndex.java", "license": "lgpl-2.1", "size": 24654 }
[ "org.apache.lucene.document.Document", "org.opencms.util.CmsUUID" ]
import org.apache.lucene.document.Document; import org.opencms.util.CmsUUID;
import org.apache.lucene.document.*; import org.opencms.util.*;
[ "org.apache.lucene", "org.opencms.util" ]
org.apache.lucene; org.opencms.util;
2,112,960
@Override public void setProfileUrl(boolean isProfileUrl) { SharedPreferences.Editor editor = mPrefs.edit(); editor.putBoolean(SharedPreferenceConsts.USERNAME, isProfileUrl); editor.apply(); }
void function(boolean isProfileUrl) { SharedPreferences.Editor editor = mPrefs.edit(); editor.putBoolean(SharedPreferenceConsts.USERNAME, isProfileUrl); editor.apply(); }
/** * Stores whether the user's URL is a custom profile in application settings * * @param isProfileUrl whether the user has a custom profile URL or not */
Stores whether the user's URL is a custom profile in application settings
setProfileUrl
{ "repo_name": "Flozzo/Trade-Notifications-for-Steam", "path": "app/src/main/java/com/oxapps/tradenotifications/model/ApplicationSettingsImpl.java", "license": "apache-2.0", "size": 5297 }
[ "android.content.SharedPreferences" ]
import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
1,744,477
@Nonnull public java.util.concurrent.CompletableFuture<ManagedEBookAssignment> patchAsync(@Nonnull final ManagedEBookAssignment sourceManagedEBookAssignment) { return sendAsync(HttpMethod.PATCH, sourceManagedEBookAssignment); }
java.util.concurrent.CompletableFuture<ManagedEBookAssignment> function(@Nonnull final ManagedEBookAssignment sourceManagedEBookAssignment) { return sendAsync(HttpMethod.PATCH, sourceManagedEBookAssignment); }
/** * Patches this ManagedEBookAssignment with a source * * @param sourceManagedEBookAssignment the source object with updates * @return a future with the result */
Patches this ManagedEBookAssignment with a source
patchAsync
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/ManagedEBookAssignmentRequest.java", "license": "mit", "size": 6989 }
[ "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.ManagedEBookAssignment", "javax.annotation.Nonnull" ]
import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.ManagedEBookAssignment; import javax.annotation.Nonnull;
import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
1,573,528
@Transient public Boolean getEmbargoed() { if (embargoed == null) { embargoed = false; boolean passed = getEmbargoDatePassed(); Date embargoDate = getEmbargoDate(); if (embargoDate != null) { Date now = new Date(); if (embargoDate.compareTo(now) > 0) { embargoed = true; } } } r...
Boolean function() { if (embargoed == null) { embargoed = false; boolean passed = getEmbargoDatePassed(); Date embargoDate = getEmbargoDate(); if (embargoDate != null) { Date now = new Date(); if (embargoDate.compareTo(now) > 0) { embargoed = true; } } } return embargoed; }
/** * Get whether the record is embargoed * * @return Whether the item is embargoed */
Get whether the record is embargoed
getEmbargoed
{ "repo_name": "anu-doi/anudc", "path": "DataCommons/src/main/java/au/edu/anu/datacommons/data/db/model/FedoraObject.java", "license": "gpl-3.0", "size": 11147 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,242,708
public static void outgoingSessionChanged(final Iterable<OtrEngineListener> listeners, final SessionID sessionID) { for (final OtrEngineListener l : listeners) { try { // Calling the listeners in order to inform of events. As a // service to the user we log any pr...
static void function(final Iterable<OtrEngineListener> listeners, final SessionID sessionID) { for (final OtrEngineListener l : listeners) { try { l.outgoingSessionChanged(sessionID); } catch (final RuntimeException e) { LOGGER.log(Level.WARNING, STR + l.getClass().getCanonicalName() + STR + sessionID, e); } } }
/** * Safely call outgoingSessionChanged on all listeners in provided iterable. * * @param listeners All listeners to be called. * @param sessionID the session ID */
Safely call outgoingSessionChanged on all listeners in provided iterable
outgoingSessionChanged
{ "repo_name": "otr4j/otr4j", "path": "src/main/java/net/java/otr4j/api/OtrEngineListeners.java", "license": "lgpl-3.0", "size": 4330 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,305,105
public static HRegionInfo getHRegionInfo(Result data) { return HRegionInfo.getHRegionInfo(data); }
static HRegionInfo function(Result data) { return HRegionInfo.getHRegionInfo(data); }
/** * Returns HRegionInfo object from the column * HConstants.CATALOG_FAMILY:HConstants.REGIONINFO_QUALIFIER of the catalog * table Result. * @param data a Result object from the catalog table scan * @return HRegionInfo or null */
Returns HRegionInfo object from the column table Result
getHRegionInfo
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java", "license": "apache-2.0", "size": 13568 }
[ "org.apache.hadoop.hbase.HRegionInfo" ]
import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,644,113
Drawable pressed = images[0]; Drawable notPressed = images[1]; StateListDrawable states = new StateListDrawable(); states.addState(new int[] {android.R.attr.state_pressed}, pressed); states.addState(new int[] {android.R.attr.state_focused}, pressed); states.addState(new int[] {a...
Drawable pressed = images[0]; Drawable notPressed = images[1]; StateListDrawable states = new StateListDrawable(); states.addState(new int[] {android.R.attr.state_pressed}, pressed); states.addState(new int[] {android.R.attr.state_focused}, pressed); states.addState(new int[] {android.R.attr.state_selected}, pressed); ...
/** * images {pressed, not pressed} ø * @param images */
images {pressed, not pressed}
getStateDrawableForImageImages
{ "repo_name": "zivilan/magik-app", "path": "magikApp/src/main/java/com/kaltura/magikapp/magikapp/asset_page/RoundButtonUtils.java", "license": "agpl-3.0", "size": 845 }
[ "android.graphics.drawable.Drawable", "android.graphics.drawable.StateListDrawable" ]
import android.graphics.drawable.Drawable; import android.graphics.drawable.StateListDrawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
322,302
public void event(Event event) { if (event instanceof PublishEvent) { PublishEvent pe = (PublishEvent) event; //FIXME: LD: temporary introduced the (pe.getCommand() == PublishEvent.EVENT_IDENTIFIER) to filter the events from the same VM if (pe.getState() == PublishEvent.PRE_PUBLISH && pe.getEventIdentifie...
void function(Event event) { if (event instanceof PublishEvent) { PublishEvent pe = (PublishEvent) event; if (pe.getState() == PublishEvent.PRE_PUBLISH && pe.getEventIdentifier() == PublishEvent.EVENT_IDENTIFIER) { addToUpcomingWork(pe); return; } else if (pe.getState() == PublishEvent.PUBLISH && pe.getEventIdentifier(...
/** * Called at course publish. * @see org.olat.core.util.event.GenericEventListener#event(org.olat.core.gui.control.Event) */
Called at course publish
event
{ "repo_name": "stevenhva/InfoLearn_OpenOLAT", "path": "src/main/java/org/olat/course/assessment/AssessmentModule.java", "license": "apache-2.0", "size": 6451 }
[ "org.olat.core.gui.control.Event", "org.olat.course.editor.PublishEvent" ]
import org.olat.core.gui.control.Event; import org.olat.course.editor.PublishEvent;
import org.olat.core.gui.control.*; import org.olat.course.editor.*;
[ "org.olat.core", "org.olat.course" ]
org.olat.core; org.olat.course;
2,239,188
@ServiceMethod(returns = ReturnType.SINGLE) Response<GenericResourceInner> getByIdWithResponse(String resourceId, String apiVersion, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<GenericResourceInner> getByIdWithResponse(String resourceId, String apiVersion, Context context);
/** * Gets a resource by ID. * * @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the * format, * /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}. * ...
Gets a resource by ID
getByIdWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourcesClient.java", "license": "mit", "size": 91824 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.resources.fluent.models.GenericResourceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.resources.fluent.models.GenericResourceInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.resources.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,296,295
public List<ClassRefOrTypeVariableSignature> getThrowsSignatures() { return throwsSignatures; } // -------------------------------------------------------------------------------------------------------------
List<ClassRefOrTypeVariableSignature> function() { return throwsSignatures; }
/** * Get the throws type(s) for the method. * * @return The throws types for the method, as {@link TypeSignature} parsed type objects. */
Get the throws type(s) for the method
getThrowsSignatures
{ "repo_name": "lukehutch/fast-classpath-scanner", "path": "src/main/java/io/github/classgraph/MethodTypeSignature.java", "license": "mit", "size": 14429 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
675,251
public PanelDefinition getDefinition();
PanelDefinition function();
/** * Returns a {@code @Portable} description of the current state of this panel. */
Returns a @Portable description of the current state of this panel
getDefinition
{ "repo_name": "karreiro/uberfire", "path": "uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/panels/WorkbenchPanelPresenter.java", "license": "apache-2.0", "size": 7585 }
[ "org.uberfire.workbench.model.PanelDefinition" ]
import org.uberfire.workbench.model.PanelDefinition;
import org.uberfire.workbench.model.*;
[ "org.uberfire.workbench" ]
org.uberfire.workbench;
2,513,077
protected void executeQueryPlan(String region, Date date, Timestamp timestamp) throws SQLException { Log.getLogWriter().info("Getting query plan for " + queryName + " with region=" + region + ", date=" + date + ", timestamp=" + timestamp); if (preparedQueryPlanStmt == null) { preparedQueryPlanStmt = thi...
void function(String region, Date date, Timestamp timestamp) throws SQLException { Log.getLogWriter().info(STR + queryName + STR + region + STR + date + STR + timestamp); if (preparedQueryPlanStmt == null) { preparedQueryPlanStmt = this.connection.prepareStatement(STR + query); } preparedQueryPlanStmt.setString(1, regi...
/** Execute a query to obtain a query plan with the given query argument * * @throws SQLException Thrown if any exceptions are encountered while executing this query. */
Execute a query to obtain a query plan with the given query argument
executeQueryPlan
{ "repo_name": "papicella/snappy-store", "path": "tests/sql/src/main/java/gfxdperf/tpch/AbstractQ5.java", "license": "apache-2.0", "size": 6466 }
[ "java.math.BigDecimal", "java.sql.Date", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Timestamp" ]
import java.math.BigDecimal; import java.sql.Date; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp;
import java.math.*; import java.sql.*;
[ "java.math", "java.sql" ]
java.math; java.sql;
1,263,692
public void initVerify(PublicKey key) throws InvalidKeyException { if (!(key instanceof MerkleOTSPublicKey)) { throw new InvalidKeyException("unsupported type"); } MerkleOTSPublicKey pubKey = (MerkleOTSPublicKey) key; // check if OID stored in the key matches algorithm OID if (!pubKey.getOIDString().equa...
void function(PublicKey key) throws InvalidKeyException { if (!(key instanceof MerkleOTSPublicKey)) { throw new InvalidKeyException(STR); } MerkleOTSPublicKey pubKey = (MerkleOTSPublicKey) key; if (!pubKey.getOIDString().equals(oid)) { throw new InvalidKeyException( STR); } pubKeyBytes = pubKey.getKeyBytes(); initValue...
/** * Initialize the signature algorithm for verifying a signature. * * @param key * the public key of the signer. * @throws InvalidKeyException * if the public key is not an instance of * MerkleOTSPublicKey. */
Initialize the signature algorithm for verifying a signature
initVerify
{ "repo_name": "besom/bbossgroups-mvn", "path": "bboss_security/src/main/java/de/flexiprovider/pqc/ots/merkle/MerkleOTSSignature.java", "license": "apache-2.0", "size": 11733 }
[ "de.flexiprovider.api.exceptions.InvalidKeyException", "de.flexiprovider.api.keys.PublicKey" ]
import de.flexiprovider.api.exceptions.InvalidKeyException; import de.flexiprovider.api.keys.PublicKey;
import de.flexiprovider.api.exceptions.*; import de.flexiprovider.api.keys.*;
[ "de.flexiprovider.api" ]
de.flexiprovider.api;
2,101,482
public ComponentInstLight getComponentInst(String componentId) { ComponentInstLight resultComp = null; ComponentInstLight cachedComp = componentsMap.get(componentId); if (cachedComp != null) { resultComp = cachedComp; } else { resultComp = getOrganizationController().getComponentInstLight(...
ComponentInstLight function(String componentId) { ComponentInstLight resultComp = null; ComponentInstLight cachedComp = componentsMap.get(componentId); if (cachedComp != null) { resultComp = cachedComp; } else { resultComp = getOrganizationController().getComponentInstLight(componentId); componentsMap.put(componentId, ...
/** * ComponentInst cache mechanism * @param componentId * @return */
ComponentInst cache mechanism
getComponentInst
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "war-core/src/main/java/com/stratelia/webactiv/todo/control/ToDoSessionController.java", "license": "agpl-3.0", "size": 21603 }
[ "com.stratelia.webactiv.beans.admin.ComponentInstLight" ]
import com.stratelia.webactiv.beans.admin.ComponentInstLight;
import com.stratelia.webactiv.beans.admin.*;
[ "com.stratelia.webactiv" ]
com.stratelia.webactiv;
1,322,812
public static DateOnly firstDayOfYear(DateOnly date) { Calendar calendar = new GregorianCalendar(); calendar.setTime(date); calendar.setLenient(false); // NB clear() does not work in JDK 1.3.1 calendar.set(Calendar.MILLISECOND, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MINUTE, 0); ...
static DateOnly function(DateOnly date) { Calendar calendar = new GregorianCalendar(); calendar.setTime(date); calendar.setLenient(false); calendar.set(Calendar.MILLISECOND, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MONTH, 0); ca...
/** * Returns the date of the first day of the year in which the specified date * occurs. * * @param date * - the specified date * @return - the date of the first day of that year */
Returns the date of the first day of the year in which the specified date occurs
firstDayOfYear
{ "repo_name": "skyvers/skyve", "path": "skyve-ejb/src/main/java/modules/admin/ModulesUtil.java", "license": "lgpl-2.1", "size": 34372 }
[ "java.util.Calendar", "java.util.GregorianCalendar", "org.skyve.domain.types.DateOnly" ]
import java.util.Calendar; import java.util.GregorianCalendar; import org.skyve.domain.types.DateOnly;
import java.util.*; import org.skyve.domain.types.*;
[ "java.util", "org.skyve.domain" ]
java.util; org.skyve.domain;
1,885,523
StringBuffer format(Date date, StringBuffer buf);
StringBuffer format(Date date, StringBuffer buf);
/** * <p>Formats a {@code Date} object into the * supplied {@code StringBuffer} using a {@code GregorianCalendar}.</p> * * @param date the date to format * @param buf the buffer to format into * @return the specified string buffer */
Formats a Date object into the supplied StringBuffer using a GregorianCalendar
format
{ "repo_name": "Puja-Mishra/Android_FreeChat", "path": "Telegram-master/TMessagesProj/src/main/java/org/telegram/messenger/time/DatePrinter.java", "license": "gpl-2.0", "size": 3829 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,118,943
public void testEmpty() { NavigableSet q = set0(); assertTrue(q.isEmpty()); assertTrue(q.add(new Integer(1))); assertFalse(q.isEmpty()); assertTrue(q.add(new Integer(2))); q.pollFirst(); q.pollFirst(); assertTrue(q.isEmpty()); }
void function() { NavigableSet q = set0(); assertTrue(q.isEmpty()); assertTrue(q.add(new Integer(1))); assertFalse(q.isEmpty()); assertTrue(q.add(new Integer(2))); q.pollFirst(); q.pollFirst(); assertTrue(q.isEmpty()); }
/** * isEmpty is true before add, false after */
isEmpty is true before add, false after
testEmpty
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/ojluni/src/test/java/util/concurrent/tck/TreeSubSetTest.java", "license": "gpl-2.0", "size": 31878 }
[ "java.util.NavigableSet" ]
import java.util.NavigableSet;
import java.util.*;
[ "java.util" ]
java.util;
1,730,409
void updateCheckpoints() { if (agent.exit == null) // TODO: added this check to fix // NullPointerException -- // m. return; Point2D.Double exit_pos = agent.board.getExitClosestPoint(agent.exit, agent.position); if (!checkpoints.isEmpty()) checkpoints.set(0, exit_pos); else checkpoin...
void updateCheckpoints() { if (agent.exit == null) return; Point2D.Double exit_pos = agent.board.getExitClosestPoint(agent.exit, agent.position); if (!checkpoints.isEmpty()) checkpoints.set(0, exit_pos); else checkpoints.add(exit_pos); trimCheckpoints(agent.position); }
/** * Analyzes the list of checkpoints, accounting for Agent's current position. * If it is closer to the exit than any of the points in the list, then * this point is removed. Coordinate of chosen exit is always first on the * list. */
Analyzes the list of checkpoints, accounting for Agent's current position. If it is closer to the exit than any of the points in the list, then this point is removed. Coordinate of chosen exit is always first on the list
updateCheckpoints
{ "repo_name": "michalrus/agh-tunev", "path": "src/edu/agh/tunev/model/jrakoczy/Motion.java", "license": "apache-2.0", "size": 8942 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
171,294
public void resetFlags() { CommandLine commandLine = CommandLine.getInstance(); mEnableTabletTabStack = commandLine.hasSwitch(ChromeSwitches.ENABLE_TABLET_TAB_STACK) && DeviceFormFactor.isTablet(getContext()); }
void function() { CommandLine commandLine = CommandLine.getInstance(); mEnableTabletTabStack = commandLine.hasSwitch(ChromeSwitches.ENABLE_TABLET_TAB_STACK) && DeviceFormFactor.isTablet(getContext()); }
/** * Reset the commandline flags. This gets called after we switch over to the * native command line. */
Reset the commandline flags. This gets called after we switch over to the native command line
resetFlags
{ "repo_name": "ds-hwang/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java", "license": "bsd-3-clause", "size": 20155 }
[ "org.chromium.base.CommandLine", "org.chromium.chrome.browser.ChromeSwitches", "org.chromium.ui.base.DeviceFormFactor" ]
import org.chromium.base.CommandLine; import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.ui.base.DeviceFormFactor;
import org.chromium.base.*; import org.chromium.chrome.browser.*; import org.chromium.ui.base.*;
[ "org.chromium.base", "org.chromium.chrome", "org.chromium.ui" ]
org.chromium.base; org.chromium.chrome; org.chromium.ui;
1,873,052
public Integer[] getUsersByStatus(Integer statusId, Integer entityId, boolean in) throws SessionInternalError;
Integer[] function(Integer statusId, Integer entityId, boolean in) throws SessionInternalError;
/** * Retrieves an array of users in the required status */
Retrieves an array of users in the required status
getUsersByStatus
{ "repo_name": "othmanelmoulat/jbilling-2.2-Extentions", "path": "src/classes/com/sapienter/jbilling/server/util/IWebServicesSessionBean.java", "license": "agpl-3.0", "size": 13750 }
[ "com.sapienter.jbilling.common.SessionInternalError" ]
import com.sapienter.jbilling.common.SessionInternalError;
import com.sapienter.jbilling.common.*;
[ "com.sapienter.jbilling" ]
com.sapienter.jbilling;
626,523
@Test public void getAllStringsWithPrefix_validPrefix_allStringsWithPrefixReturned() { setUpData(); ArrayList<String> result = tree.getAllStringsWithPrefix("cra"); assertEquals(3, result.size()); assertTrue(result.contains("crab")); assertTrue(result.contains("crabby")); ...
void function() { setUpData(); ArrayList<String> result = tree.getAllStringsWithPrefix("cra"); assertEquals(3, result.size()); assertTrue(result.contains("crab")); assertTrue(result.contains(STR)); assertTrue(result.contains("crack")); }
/** * Test that search for prefix is correct */
Test that search for prefix is correct
getAllStringsWithPrefix_validPrefix_allStringsWithPrefixReturned
{ "repo_name": "CS2103AUG2016-W11-C1/main", "path": "src/test/java/linenux/util/TernarySearchTreeTest.java", "license": "mit", "size": 2234 }
[ "java.util.ArrayList", "org.junit.Assert" ]
import java.util.ArrayList; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
404,831
public DistinctOperator<T> distinct(int... fields) { return new DistinctOperator<>(this, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName()); } /** * Returns a distinct set of a {@link DataSet} using expression keys. * * <p>The field expression keys specify the fields of a {@link or...
DistinctOperator<T> function(int... fields) { return new DistinctOperator<>(this, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName()); } /** * Returns a distinct set of a {@link DataSet} using expression keys. * * <p>The field expression keys specify the fields of a {@link org.apache.flink.api.co...
/** * Returns a distinct set of a {@link Tuple} {@link DataSet} using field position keys. * * <p>The field position keys specify the fields of Tuples on which the decision is made if two Tuples are distinct or * not. * * <p>Note: Field position keys can only be specified for Tuple DataSets. * * @param ...
Returns a distinct set of a <code>Tuple</code> <code>DataSet</code> using field position keys. The field position keys specify the fields of Tuples on which the decision is made if two Tuples are distinct or not. Note: Field position keys can only be specified for Tuple DataSets
distinct
{ "repo_name": "xiaokuangkuang/kuangjingxiangmu", "path": "flink-java/src/main/java/org/apache/flink/api/java/DataSet.java", "license": "apache-2.0", "size": 80579 }
[ "org.apache.flink.api.common.operators.Keys", "org.apache.flink.api.java.operators.DistinctOperator" ]
import org.apache.flink.api.common.operators.Keys; import org.apache.flink.api.java.operators.DistinctOperator;
import org.apache.flink.api.common.operators.*; import org.apache.flink.api.java.operators.*;
[ "org.apache.flink" ]
org.apache.flink;
442,109
public static void combinesElementsPerSession( GroupAlsoByWindowsDoFnFactory<String, Long, Long> gabwFactory, CombineFn<Long, ?, Long> combineFn) throws Exception { WindowingStrategy<?, IntervalWindow> windowingStrategy = WindowingStrategy.of(Sessions.withGapDuration(Duration.millis...
static void function( GroupAlsoByWindowsDoFnFactory<String, Long, Long> gabwFactory, CombineFn<Long, ?, Long> combineFn) throws Exception { WindowingStrategy<?, IntervalWindow> windowingStrategy = WindowingStrategy.of(Sessions.withGapDuration(Duration.millis(10))); DoFnTester<KV<String, Iterable<WindowedValue<Long>>>, ...
/** * Tests that the given {@link GroupAlsoByWindowsDoFn} implementation combines elements per * session window correctly according to the provided {@link CombineFn}. */
Tests that the given <code>GroupAlsoByWindowsDoFn</code> implementation combines elements per session window correctly according to the provided <code>CombineFn</code>
combinesElementsPerSession
{ "repo_name": "shakamunyi/beam", "path": "sdks/java/core/src/test/java/org/apache/beam/sdk/util/GroupAlsoByWindowsProperties.java", "license": "apache-2.0", "size": 26402 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.Iterables", "java.util.Arrays", "org.apache.beam.sdk.transforms.Combine", "org.apache.beam.sdk.transforms.DoFnTester", "org.apache.beam.sdk.transforms.windowing.IntervalWindow", "org.apache.beam.sdk.transforms.windowing.PaneInfo", "...
import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import java.util.Arrays; import org.apache.beam.sdk.transforms.Combine; import org.apache.beam.sdk.transforms.DoFnTester; import org.apache.beam.sdk.transforms.windowing.IntervalWindow; import org.apache.beam.sdk.transforms.wind...
import com.google.common.collect.*; import java.util.*; import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.transforms.windowing.*; import org.apache.beam.sdk.values.*; import org.hamcrest.*; import org.joda.time.*; import org.junit.*;
[ "com.google.common", "java.util", "org.apache.beam", "org.hamcrest", "org.joda.time", "org.junit" ]
com.google.common; java.util; org.apache.beam; org.hamcrest; org.joda.time; org.junit;
2,276,740
public String cache(TransportMessage message) throws TransportException { String id = getNextQueueIdentifier(); message.setCacheIdentifier(id); message.setStatus(TransportMessageStatus.QUEUED); try { storage(Q_STORENAME).write(message); } catch (StorageFullExcepti...
String function(TransportMessage message) throws TransportException { String id = getNextQueueIdentifier(); message.setCacheIdentifier(id); message.setStatus(TransportMessageStatus.QUEUED); try { storage(Q_STORENAME).write(message); } catch (StorageFullException e) { throw new TransportException(e); } updateCachedCount...
/** * * Add a new message to the send queue * * @param message * @throws IOException */
Add a new message to the send queue
cache
{ "repo_name": "dimagi/javarosa", "path": "javarosa/j2me/communication/src/org/javarosa/services/transport/impl/TransportMessageStore.java", "license": "apache-2.0", "size": 10107 }
[ "org.javarosa.core.services.storage.StorageFullException", "org.javarosa.services.transport.TransportMessage" ]
import org.javarosa.core.services.storage.StorageFullException; import org.javarosa.services.transport.TransportMessage;
import org.javarosa.core.services.storage.*; import org.javarosa.services.transport.*;
[ "org.javarosa.core", "org.javarosa.services" ]
org.javarosa.core; org.javarosa.services;
1,969,150
protected void setMeasurements() { currThresholdExceededOverAll = Integer.valueOf(myLoadAgent.loadThresholdExceededOverAll); currContainerLoactions = new Hashtable<String, Location>(myLoadAgent.getLoadContainerLoactions()) ; currContainerBenchmarkResults = new Hashtable<String, Float>(myLoadAgent.loadConta...
void function() { currThresholdExceededOverAll = Integer.valueOf(myLoadAgent.loadThresholdExceededOverAll); currContainerLoactions = new Hashtable<String, Location>(myLoadAgent.getLoadContainerLoactions()) ; currContainerBenchmarkResults = new Hashtable<String, Float>(myLoadAgent.loadContainerBenchmarkResults); loadMac...
/** * This method transfers the measurement data from the loadAgent * to this class. Do NOT override!! */
This method transfers the measurement data from the loadAgent to this class. Do NOT override!
setMeasurements
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/simulationService/balancing/DynamicLoadBalancingBase.java", "license": "lgpl-2.1", "size": 9229 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,703,674
public static int getCurrentUserTenantId() throws DataServiceFault { RealmService realmService = DataServicesDSComponent.getRealmService(); String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); int tenantId = PrivilegedCarbonContext.getThreadLocalCarb...
static int function() throws DataServiceFault { RealmService realmService = DataServicesDSComponent.getRealmService(); String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); try { if (tenantId < M...
/** * This method is to get current user tenant ID, This will be only called when creating data service with * role based filtering. So a user will invoke this method hence there should be active session when this is * called. * * @return tenantId * @throws DataServiceFault */
This method is to get current user tenant ID, This will be only called when creating data service with role based filtering. So a user will invoke this method hence there should be active session when this is called
getCurrentUserTenantId
{ "repo_name": "madhawa-gunasekara/carbon-data", "path": "components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/DBUtils.java", "license": "apache-2.0", "size": 54182 }
[ "org.wso2.carbon.context.PrivilegedCarbonContext", "org.wso2.carbon.dataservices.core.internal.DataServicesDSComponent", "org.wso2.carbon.user.core.service.RealmService", "org.wso2.carbon.utils.multitenancy.MultitenantConstants" ]
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.dataservices.core.internal.DataServicesDSComponent; import org.wso2.carbon.user.core.service.RealmService; import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import org.wso2.carbon.context.*; import org.wso2.carbon.dataservices.core.internal.*; import org.wso2.carbon.user.core.service.*; import org.wso2.carbon.utils.multitenancy.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,535,197
@Nonnull public java.util.concurrent.CompletableFuture<LinkedResource> getAsync() { return sendAsync(HttpMethod.GET, null); }
java.util.concurrent.CompletableFuture<LinkedResource> function() { return sendAsync(HttpMethod.GET, null); }
/** * Gets the LinkedResource from the service * * @return a future with the result */
Gets the LinkedResource from the service
getAsync
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/LinkedResourceRequest.java", "license": "mit", "size": 5882 }
[ "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.LinkedResource" ]
import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.LinkedResource;
import com.microsoft.graph.http.*; import com.microsoft.graph.models.*;
[ "com.microsoft.graph" ]
com.microsoft.graph;
997,775
@RequestMapping(params = "methodToCall=cancel") public ModelAndView cancel(@ModelAttribute("KualiForm") UifFormBase form, BindingResult result, HttpServletRequest request, HttpServletResponse response) { return close(form, result, request, response); }
@RequestMapping(params = STR) ModelAndView function(@ModelAttribute(STR) UifFormBase form, BindingResult result, HttpServletRequest request, HttpServletResponse response) { return close(form, result, request, response); }
/** * Just returns as if return with no value was selected. */
Just returns as if return with no value was selected
cancel
{ "repo_name": "sbower/kuali-rice-1", "path": "krad/krad-web-framework/src/main/java/org/kuali/rice/krad/web/controller/UifControllerBase.java", "license": "apache-2.0", "size": 32434 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.kuali.rice.krad.web.form.UifFormBase", "org.springframework.validation.BindingResult", "org.springframework.web.bind.annotation.ModelAttribute", "org.springframework.web.bind.annotation.RequestMapping", "org.springfr...
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.kuali.rice.krad.web.form.UifFormBase; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping;...
import javax.servlet.http.*; import org.kuali.rice.krad.web.form.*; import org.springframework.validation.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*;
[ "javax.servlet", "org.kuali.rice", "org.springframework.validation", "org.springframework.web" ]
javax.servlet; org.kuali.rice; org.springframework.validation; org.springframework.web;
2,111,332
private Vector<Point2D> getAllDiffractionSources(Vector<Line2D> allVisibleLines) { Vector<Point2D> allDiffractionSources = new Vector<Point2D>(); Enumeration<Line2D> allVisibleLinesEnum = allVisibleLines.elements(); while (allVisibleLinesEnum.hasMoreElements()) { Line2D visibleLine = allVisibleLine...
Vector<Point2D> function(Vector<Line2D> allVisibleLines) { Vector<Point2D> allDiffractionSources = new Vector<Point2D>(); Enumeration<Line2D> allVisibleLinesEnum = allVisibleLines.elements(); while (allVisibleLinesEnum.hasMoreElements()) { Line2D visibleLine = allVisibleLinesEnum.nextElement(); if (myObstacleWorld.poin...
/** * Returns all possible diffraction sources, by checking which * of the endpoints of the given visible lines that are on a corner * of a obstacle structure. * * @param allVisibleLines Lines which may hold diffraction sources * @return All diffraction sources */
Returns all possible diffraction sources, by checking which of the endpoints of the given visible lines that are on a corner of a obstacle structure
getAllDiffractionSources
{ "repo_name": "mfer/udgo", "path": "src/contiki/tools/cooja/apps/udgo/java/org/contikios/udgo/ChannelModel.java", "license": "gpl-3.0", "size": 75623 }
[ "java.awt.geom.Line2D", "java.awt.geom.Point2D", "java.util.Enumeration", "java.util.Vector" ]
import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.util.Enumeration; import java.util.Vector;
import java.awt.geom.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
1,741,009
public static void response(ServerConnection c,String stmt,int type) { String showSchema = SchemaUtil.parseShowTableSchema(stmt); if (showSchema == null) { showSchema = c.getSchema(); } SchemaConfig schema = MycatServer.getInstance().getConfig().getSchemas().get(showSchem...
static void function(ServerConnection c,String stmt,int type) { String showSchema = SchemaUtil.parseShowTableSchema(stmt); if (showSchema == null) { showSchema = c.getSchema(); } SchemaConfig schema = MycatServer.getInstance().getConfig().getSchemas().get(showSchema); if(schema != null) { String node = schema.getDataNo...
/** * response method. * @param c */
response method
response
{ "repo_name": "MyCATApache/Mycat-Server", "path": "src/main/java/io/mycat/server/response/ShowFullTables.java", "license": "gpl-2.0", "size": 6156 }
[ "com.google.common.base.Strings", "io.mycat.MycatServer", "io.mycat.config.ErrorCode", "io.mycat.config.model.SchemaConfig", "io.mycat.server.ServerConnection", "io.mycat.server.parser.ServerParse", "io.mycat.server.util.SchemaUtil" ]
import com.google.common.base.Strings; import io.mycat.MycatServer; import io.mycat.config.ErrorCode; import io.mycat.config.model.SchemaConfig; import io.mycat.server.ServerConnection; import io.mycat.server.parser.ServerParse; import io.mycat.server.util.SchemaUtil;
import com.google.common.base.*; import io.mycat.*; import io.mycat.config.*; import io.mycat.config.model.*; import io.mycat.server.*; import io.mycat.server.parser.*; import io.mycat.server.util.*;
[ "com.google.common", "io.mycat", "io.mycat.config", "io.mycat.server" ]
com.google.common; io.mycat; io.mycat.config; io.mycat.server;
220,448
super.postInitModule(); // validate required param: GSEARCH_REST_URL _gSearchRESTURL = getParameter(GSEARCH_REST_URL); if (_gSearchRESTURL == null) { throw new ModuleInitializationException("Required parameter, " + GSEARCH_REST_URL + " was not specified",...
super.postInitModule(); _gSearchRESTURL = getParameter(GSEARCH_REST_URL); if (_gSearchRESTURL == null) { throw new ModuleInitializationException(STR + GSEARCH_REST_URL + STR, getRole()); } else { try { new URL(_gSearchRESTURL); logger.debug(STR + _gSearchRESTURL); } catch (MalformedURLException e) { throw new ModuleIni...
/** * Performs superclass post-initialization, then completes initialization * using GSearch-specific parameters. */
Performs superclass post-initialization, then completes initialization using GSearch-specific parameters
postInitModule
{ "repo_name": "fcrepo3/fcrepo", "path": "fcrepo-server/src/main/java/org/fcrepo/server/storage/GSearchDOManager.java", "license": "apache-2.0", "size": 8547 }
[ "java.net.MalformedURLException", "org.apache.http.auth.UsernamePasswordCredentials", "org.fcrepo.common.http.WebClient", "org.fcrepo.server.errors.ModuleInitializationException" ]
import java.net.MalformedURLException; import org.apache.http.auth.UsernamePasswordCredentials; import org.fcrepo.common.http.WebClient; import org.fcrepo.server.errors.ModuleInitializationException;
import java.net.*; import org.apache.http.auth.*; import org.fcrepo.common.http.*; import org.fcrepo.server.errors.*;
[ "java.net", "org.apache.http", "org.fcrepo.common", "org.fcrepo.server" ]
java.net; org.apache.http; org.fcrepo.common; org.fcrepo.server;
1,543,031
public RoleDescriptor getRoleGrantDescriptor(String roleName, String grantee, String grantor) throws StandardException { RoleDescriptor rd = locateRoleGrantRow(roleName, grantee, grantor); return rd; }
RoleDescriptor function(String roleName, String grantee, String grantor) throws StandardException { RoleDescriptor rd = locateRoleGrantRow(roleName, grantee, grantor); return rd; }
/** * Get a role descriptor for a role grant * * @param roleName The name of the role whose definition we seek * @param grantee The grantee * @param grantor The grantor * * @throws StandardException error */
Get a role descriptor for a role grant
getRoleGrantDescriptor
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/catalog/DataDictionaryImpl.java", "license": "apache-2.0", "size": 403048 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.sql.dictionary.RoleDescriptor" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.RoleDescriptor;
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
1,057,470