method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void updateContentViewViewportSize(ContentViewCore viewCore) { if (viewCore == null) return; if (mInGesture || mContentViewScrolling) return; // Update content viewport size only when the top controls are not animating. int contentOffset = (int) rendererContentOffset(); ...
void function(ContentViewCore viewCore) { if (viewCore == null) return; if (mInGesture mContentViewScrolling) return; int contentOffset = (int) rendererContentOffset(); if (contentOffset != 0 && contentOffset != mControlContainerHeight) return; viewCore.setTopControlsHeight(mControlContainerHeight, contentOffset > 0); ...
/** * Updates the content view's viewport size to have it render the content correctly. * * @param viewCore The ContentViewCore to update. */
Updates the content view's viewport size to have it render the content correctly
updateContentViewViewportSize
{ "repo_name": "Pluto-tv/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java", "license": "bsd-3-clause", "size": 29319 }
[ "org.chromium.content.browser.ContentViewCore" ]
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.*;
[ "org.chromium.content" ]
org.chromium.content;
588,680
T next() throws IOException;
T next() throws IOException;
/** * Read the next row and block until a row is available. Will return null on end-of-stream. * * @return a T object. * @throws java.io.IOException if any. */
Read the next row and block until a row is available. Will return null on end-of-stream
next
{ "repo_name": "sduskis/cloud-bigtable-client", "path": "bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/scanner/ResultScanner.java", "license": "apache-2.0", "size": 1647 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,516,795
protected void createContents() { shell = new Shell(); shell.setSize(1200, 409); shell.setText("Floodlight Firewall");
void function() { shell = new Shell(); shell.setSize(1200, 409); shell.setText(STR);
/** * Create contents of the window. */
Create contents of the window
createContents
{ "repo_name": "Sovietaced/Avior", "path": "src/view/tools/firewall/Firewall.java", "license": "mit", "size": 20812 }
[ "org.eclipse.swt.widgets.Shell" ]
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,548,753
public void setMessageSender(WebServiceMessageSender messageSender) { this.messageSender = messageSender; }
void function(WebServiceMessageSender messageSender) { this.messageSender = messageSender; }
/** * Option to provide a custom WebServiceMessageSender. For example to perform authentication or use alternative transports */
Option to provide a custom WebServiceMessageSender. For example to perform authentication or use alternative transports
setMessageSender
{ "repo_name": "CandleCandle/camel", "path": "components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConfiguration.java", "license": "apache-2.0", "size": 13151 }
[ "org.springframework.ws.transport.WebServiceMessageSender" ]
import org.springframework.ws.transport.WebServiceMessageSender;
import org.springframework.ws.transport.*;
[ "org.springframework.ws" ]
org.springframework.ws;
1,411,276
public void setNodeMeta(List<String> nodeMeta) { this.nodeMeta = nodeMeta; }
void function(List<String> nodeMeta) { this.nodeMeta = nodeMeta; }
/** * The note meta-data to use for queries. */
The note meta-data to use for queries
setNodeMeta
{ "repo_name": "objectiser/camel", "path": "components/camel-consul/src/main/java/org/apache/camel/component/consul/ConsulClientConfiguration.java", "license": "apache-2.0", "size": 9400 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,832,953
public void setRightStyle(String style) { if(StringHelper.isNotEmpty(style)) { rightContainer.addStyleName(style); } }
void function(String style) { if(StringHelper.isNotEmpty(style)) { rightContainer.addStyleName(style); } }
/** * Sets right container style */
Sets right container style
setRightStyle
{ "repo_name": "deefactorial/omlets", "path": "omlets/src/org/openmoney/omlets/mobile/client/ui/widgets/AccountRow.java", "license": "gpl-2.0", "size": 10751 }
[ "org.openmoney.omlets.mobile.client.utils.StringHelper" ]
import org.openmoney.omlets.mobile.client.utils.StringHelper;
import org.openmoney.omlets.mobile.client.utils.*;
[ "org.openmoney.omlets" ]
org.openmoney.omlets;
1,093,531
public SliceDto getData() throws MloInputDataException{ SliceDto sliceDto= new SliceDto(); sliceDto.name = slicePropsDispTable.getData().get(SLICE_PARAM_KEY_NAME); List<FlowDto> flowList = new ArrayList<FlowDto>(); // Checks for each flow. for (Node node : sliceFlowsDispVBox.getChildren()) { flowList...
SliceDto function() throws MloInputDataException{ SliceDto sliceDto= new SliceDto(); sliceDto.name = slicePropsDispTable.getData().get(SLICE_PARAM_KEY_NAME); List<FlowDto> flowList = new ArrayList<FlowDto>(); for (Node node : sliceFlowsDispVBox.getChildren()) { flowList.add(((FlowPanel) node).getCreateFlowDto()); } sli...
/** * Creates a slice DTO instance from user input. * @return the instance. * @throws MloInputDataException Input failure. */
Creates a slice DTO instance from user input
getData
{ "repo_name": "o3project/mlo-gui", "path": "mlo-client/src/main/java/org/o3project/mlo/client/impl/control/MloCreateViewController.java", "license": "apache-2.0", "size": 5191 }
[ "java.util.ArrayList", "java.util.List", "org.o3project.mlo.client.control.MloInputDataException", "org.o3project.mlo.client.view.FlowPanel", "org.o3project.mlo.server.dto.FlowDto", "org.o3project.mlo.server.dto.SliceDto" ]
import java.util.ArrayList; import java.util.List; import org.o3project.mlo.client.control.MloInputDataException; import org.o3project.mlo.client.view.FlowPanel; import org.o3project.mlo.server.dto.FlowDto; import org.o3project.mlo.server.dto.SliceDto;
import java.util.*; import org.o3project.mlo.client.control.*; import org.o3project.mlo.client.view.*; import org.o3project.mlo.server.dto.*;
[ "java.util", "org.o3project.mlo" ]
java.util; org.o3project.mlo;
812,674
public Object eval(Node node, ExprEnvironment env, AbstractPattern pattern, ArrayList args) { return new Boolean(false); }
Object function(Node node, ExprEnvironment env, AbstractPattern pattern, ArrayList args) { return new Boolean(false); }
/** * Evaluate the function. * * @param pattern The context pattern. * @param args The evaluated arguments */
Evaluate the function
eval
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/xsl/fun/ExtensionElementFun.java", "license": "gpl-2.0", "size": 1561 }
[ "com.caucho.xpath.ExprEnvironment", "com.caucho.xpath.pattern.AbstractPattern", "java.util.ArrayList", "org.w3c.dom.Node" ]
import com.caucho.xpath.ExprEnvironment; import com.caucho.xpath.pattern.AbstractPattern; import java.util.ArrayList; import org.w3c.dom.Node;
import com.caucho.xpath.*; import com.caucho.xpath.pattern.*; import java.util.*; import org.w3c.dom.*;
[ "com.caucho.xpath", "java.util", "org.w3c.dom" ]
com.caucho.xpath; java.util; org.w3c.dom;
1,524,682
public BasePanel getPanel() { return panel; }
BasePanel function() { return panel; }
/** * We include a getter for the BasePanel this component refers to, because this * component needs to be closed if the BasePanel is closed. * @return the base panel this component refers to. */
We include a getter for the BasePanel this component refers to, because this component needs to be closed if the BasePanel is closed
getPanel
{ "repo_name": "RodrigoRubino/DC-UFSCar-ES2-201601-Grupo-Brainstorm", "path": "src/main/java/net/sf/jabref/collab/FileUpdatePanel.java", "license": "gpl-2.0", "size": 4043 }
[ "net.sf.jabref.gui.BasePanel" ]
import net.sf.jabref.gui.BasePanel;
import net.sf.jabref.gui.*;
[ "net.sf.jabref" ]
net.sf.jabref;
2,109,845
public Map[] bannerZoneStatistics(Integer id, Date startDate, Date endDate, Boolean useLocalTimeZone) throws XmlRpcException { return objectToArrayMaps( execute(BANNER_ZONE_STATISTICS_METHOD, id, startDate, endDate, useLocalTimeZone)); }
Map[] function(Integer id, Date startDate, Date endDate, Boolean useLocalTimeZone) throws XmlRpcException { return objectToArrayMaps( execute(BANNER_ZONE_STATISTICS_METHOD, id, startDate, endDate, useLocalTimeZone)); }
/** * Banner zone statistics. * * @param id the id * @param startDate the start date * @param endDate the end date * @param useLocalTimeZone * * @return the Map[] * * @throws XmlRpcException the xml rpc exception */
Banner zone statistics
bannerZoneStatistics
{ "repo_name": "xvip87/a45435345345", "path": "lib/xmlrpc/java/openx-api-v2/ApacheLib3/org/openads/proxy/BannerService.java", "license": "gpl-2.0", "size": 9071 }
[ "java.util.Date", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import java.util.Date; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import java.util.*; import org.apache.xmlrpc.*;
[ "java.util", "org.apache.xmlrpc" ]
java.util; org.apache.xmlrpc;
1,510,817
@Override public Principal authenticate(String username, String credentials) { // No user or no credentials // Can't possibly authenticate, don't bother the database then if (username == null || credentials == null) { if (log.isDebugEnabled()) log.debug(sm.ge...
Principal function(String username, String credentials) { if (username == null credentials == null) { if (log.isDebugEnabled()) log.debug(sm.getString(STR, username)); return null; } GenericPrincipal principal = principals.get(username); if(principal == null principal.getPassword() == null) { getCredentialHandler().mut...
/** * Return the Principal associated with the specified username and * credentials, if there is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username ...
Return the Principal associated with the specified username and credentials, if there is one; otherwise return <code>null</code>
authenticate
{ "repo_name": "Nickname0806/Test_Q4", "path": "java/org/apache/catalina/realm/MemoryRealm.java", "license": "apache-2.0", "size": 8685 }
[ "java.security.Principal" ]
import java.security.Principal;
import java.security.*;
[ "java.security" ]
java.security;
2,720,560
public ServiceFuture<NameAvailabilityResponseInner> checkNameAvailabilityAsync(String location, NameAvailabilityRequest parameters, final ServiceCallback<NameAvailabilityResponseInner> serviceCallback) { return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, parameters), s...
ServiceFuture<NameAvailabilityResponseInner> function(String location, NameAvailabilityRequest parameters, final ServiceCallback<NameAvailabilityResponseInner> serviceCallback) { return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, parameters), serviceCallback); }
/** * Check name validity and availability. * This method checks whether a proposed top-level resource name is valid and available. * * @param location The Azure region of the operation * @param parameters Requested name to validate * @param serviceCallback the async ServiceCallback to han...
Check name validity and availability. This method checks whether a proposed top-level resource name is valid and available
checkNameAvailabilityAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/datamigration/mgmt-v2018_07_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_07_15_preview/implementation/ServicesInner.java", "license": "mit", "size": 143763 }
[ "com.microsoft.azure.management.datamigration.v2018_07_15_preview.NameAvailabilityRequest", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.datamigration.v2018_07_15_preview.NameAvailabilityRequest; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.datamigration.v2018_07_15_preview.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,832,515
public Color getColor() { return color; }
Color function() { return color; }
/** * Returns the color of the item. * * @see #setColor(Color) * @return The color of the item. */
Returns the color of the item
getColor
{ "repo_name": "bpupadhyaya/dashboard-demo-1", "path": "src/main/java/com/vaadin/addon/charts/model/AbstractSeriesItem.java", "license": "apache-2.0", "size": 5511 }
[ "com.vaadin.addon.charts.model.style.Color" ]
import com.vaadin.addon.charts.model.style.Color;
import com.vaadin.addon.charts.model.style.*;
[ "com.vaadin.addon" ]
com.vaadin.addon;
303,091
public List<String> getMultiplexersList() { return SynergyNetCluster.get().getPresenceManager().getDeviceNamesOnline("multiplexers"); }
List<String> function() { return SynergyNetCluster.get().getPresenceManager().getDeviceNamesOnline(STR); }
/** * Gets the multiplexers list. * * @return the multiplexers list */
Gets the multiplexers list
getMultiplexersList
{ "repo_name": "synergynet/synergynet3.1", "path": "synergynet3-tracking/synergynet3-tracking-table/src/main/java/synergynet3/tracking/network/core/TrackingControlComms.java", "license": "bsd-3-clause", "size": 7932 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,801,757
public static void sendPasswordResetConfirmationEmail(User user, String email, String namespace, String login, String subject, String content) { String instanceName = BeansUtils.getCoreConfig().getInstanceName(); String defaultSubject = "["+instanceName+"] Password reset in namespace: "+namespace; String defa...
static void function(User user, String email, String namespace, String login, String subject, String content) { String instanceName = BeansUtils.getCoreConfig().getInstanceName(); String defaultSubject = "["+instanceName+STR+namespace; String defaultText = STR+user.getDisplayName()+STRSTR\STR+ STR+instanceName+STR + ST...
/** * Sends email to user confirming his password was changed. * * @param user user to send notification for * @param email user's email to send notification to * @param namespace namespace the password was re-set * @param login login of user * @param subject Subject from template or null * @param conte...
Sends email to user confirming his password was changed
sendPasswordResetConfirmationEmail
{ "repo_name": "CESNET/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/impl/Utils.java", "license": "bsd-2-clause", "size": 109042 }
[ "cz.metacentrum.perun.core.api.BeansUtils", "cz.metacentrum.perun.core.api.User", "java.util.HashMap", "java.util.Map" ]
import cz.metacentrum.perun.core.api.BeansUtils; import cz.metacentrum.perun.core.api.User; import java.util.HashMap; import java.util.Map;
import cz.metacentrum.perun.core.api.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,312,325
public DeviceId locationDevice() { return locDevice; }
DeviceId function() { return locDevice; }
/** * Returns the identifier of the device to which the host is connected. * * @return device identifier */
Returns the identifier of the device to which the host is connected
locationDevice
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "core/api/src/main/java/org/onosproject/ui/model/topo/UiHost.java", "license": "apache-2.0", "size": 3716 }
[ "org.onosproject.net.DeviceId" ]
import org.onosproject.net.DeviceId;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
2,409,574
@Override @SuppressLint("MissingSuperCall") // Called in doOnCreate. public void onCreate(Bundle savedInstanceState) { // Third-party code adds disk access to Activity.onCreate. http://crbug.com/619824 StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); TraceEvent....
@SuppressLint(STR) void function(Bundle savedInstanceState) { StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); TraceEvent.begin(STR); TraceEvent.begin(STR); try { doOnCreate(savedInstanceState); } finally { StrictMode.setThreadPolicy(oldPolicy); TraceEvent.end(STR); } }
/** * Figure out how to route the Intent. Because this is on the critical path to startup, please * avoid making the pathway any more complicated than it already is. Make sure that anything * you add _absolutely has_ to be here. */
Figure out how to route the Intent. Because this is on the critical path to startup, please avoid making the pathway any more complicated than it already is. Make sure that anything you add _absolutely has_ to be here
onCreate
{ "repo_name": "danakj/chromium", "path": "chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java", "license": "bsd-3-clause", "size": 23063 }
[ "android.annotation.SuppressLint", "android.os.Bundle", "android.os.StrictMode", "org.chromium.base.TraceEvent" ]
import android.annotation.SuppressLint; import android.os.Bundle; import android.os.StrictMode; import org.chromium.base.TraceEvent;
import android.annotation.*; import android.os.*; import org.chromium.base.*;
[ "android.annotation", "android.os", "org.chromium.base" ]
android.annotation; android.os; org.chromium.base;
2,478,825
public ToStringHelper addValue(@Nullable Object value) { return addHolder(value); }
ToStringHelper function(@Nullable Object value) { return addHolder(value); }
/** * Adds an unnamed value to the formatted output. * * <p>It is strongly encouraged to use {@link #add(String, Object)} instead * and give value a readable name. */
Adds an unnamed value to the formatted output. It is strongly encouraged to use <code>#add(String, Object)</code> instead and give value a readable name
addValue
{ "repo_name": "npvincent/guava", "path": "guava/src/com/google/common/base/Objects.java", "license": "apache-2.0", "size": 13874 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
241,549
public byte[] mock() throws IOException { final File outdir = Files.createTempDir(); final File input = File.createTempFile("input", ".java"); FileUtils.writeStringToFile(input, this.source); final ProcessBuilder builder = new ProcessBuilder( "javac", "-d", ...
byte[] function() throws IOException { final File outdir = Files.createTempDir(); final File input = File.createTempFile("input", ".java"); FileUtils.writeStringToFile(input, this.source); final ProcessBuilder builder = new ProcessBuilder( "javac", "-d", outdir.getPath(), input.getPath() ); final Process process = buil...
/** * Create bytecode and return it. * @return The bytecode * @throws IOException If some problem */
Create bytecode and return it
mock
{ "repo_name": "vkuchyn/qulice", "path": "qulice-findbugs/src/mock/java/com/qulice/findbugs/BytecodeMocker.java", "license": "bsd-3-clause", "size": 4369 }
[ "com.google.common.io.Files", "com.jcabi.log.Logger", "java.io.File", "java.io.IOException", "org.apache.commons.io.FileUtils", "org.apache.commons.io.IOUtils" ]
import com.google.common.io.Files; import com.jcabi.log.Logger; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils;
import com.google.common.io.*; import com.jcabi.log.*; import java.io.*; import org.apache.commons.io.*;
[ "com.google.common", "com.jcabi.log", "java.io", "org.apache.commons" ]
com.google.common; com.jcabi.log; java.io; org.apache.commons;
1,840,774
public static synchronized void addBundleToCache(String baseName, Locale locale, I_CmsResourceBundle bundle) { String key = baseName; if (locale != null) { key += "_" + locale; } m_permanentCache.put(key, bundle); }
static synchronized void function(String baseName, Locale locale, I_CmsResourceBundle bundle) { String key = baseName; if (locale != null) { key += "_" + locale; } m_permanentCache.put(key, bundle); }
/** * Adds the specified resource bundle to the permanent cache.<p> * * @param baseName the raw bundle name, without locale qualifiers * @param locale the locale * @param bundle the bundle to cache */
Adds the specified resource bundle to the permanent cache
addBundleToCache
{ "repo_name": "mediaworx/opencms-core", "path": "src/org/opencms/i18n/CmsResourceBundleLoader.java", "license": "lgpl-2.1", "size": 18145 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,300,649
private void prepareCopyNotTemplate() { getParameters().setAddImageDomainMapping(false); Guid newImageId = Guid.newGuid(); Guid newId = Guid.newGuid(); DiskImage image = getImage(); image.setId(newId); image.setImageId(newImageId); image.setDiskAlias(getDis...
void function() { getParameters().setAddImageDomainMapping(false); Guid newImageId = Guid.newGuid(); Guid newId = Guid.newGuid(); DiskImage image = getImage(); image.setId(newId); image.setImageId(newImageId); image.setDiskAlias(getDiskAlias()); image.setStorageIds(new ArrayList<Guid>()); image.getStorageIds().add(getP...
/** * Prepares the copy of the VM disks and floating disks */
Prepares the copy of the VM disks and floating disks
prepareCopyNotTemplate
{ "repo_name": "jtux270/translate", "path": "ovirt/3.6_source/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java", "license": "gpl-3.0", "size": 21593 }
[ "java.util.ArrayList", "org.ovirt.engine.core.common.businessentities.storage.DiskImage", "org.ovirt.engine.core.compat.Guid" ]
import java.util.ArrayList; import org.ovirt.engine.core.common.businessentities.storage.DiskImage; import org.ovirt.engine.core.compat.Guid;
import java.util.*; import org.ovirt.engine.core.common.businessentities.storage.*; import org.ovirt.engine.core.compat.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
1,836,869
public void reloadBeans() throws Exception { final List<CidsBean> aenderungsanfrageBeans = getAenderungsanfrageBeans(); aenderungsanfrageBeans.clear(); aenderungsanfrageBeans.addAll(searchAll()); getChangeListenerHandler().aenderungsanfrageBeansChanged(aenderungsanfrageBeans); }
void function() throws Exception { final List<CidsBean> aenderungsanfrageBeans = getAenderungsanfrageBeans(); aenderungsanfrageBeans.clear(); aenderungsanfrageBeans.addAll(searchAll()); getChangeListenerHandler().aenderungsanfrageBeansChanged(aenderungsanfrageBeans); }
/** * DOCUMENT ME! * * @throws Exception DOCUMENT ME! */
DOCUMENT ME
reloadBeans
{ "repo_name": "cismet/verdis", "path": "src/main/java/de/cismet/verdis/gui/aenderungsanfrage/AenderungsanfrageHandler.java", "license": "gpl-3.0", "size": 29972 }
[ "de.cismet.cids.dynamics.CidsBean", "java.util.List" ]
import de.cismet.cids.dynamics.CidsBean; import java.util.List;
import de.cismet.cids.dynamics.*; import java.util.*;
[ "de.cismet.cids", "java.util" ]
de.cismet.cids; java.util;
1,228,257
public User setProfile(String name, String url, String location, String description) { Map<String, String> vars = InternalUtils.asMap("name", name, "url", url, "location", location, "description", description); String apiUrl = jtwit.TWITTER_URL + "/account/update_profile.json"; String json = jtwit.getHt...
User function(String name, String url, String location, String description) { Map<String, String> vars = InternalUtils.asMap("name", name, "url", url, STR, location, STR, description); String apiUrl = jtwit.TWITTER_URL + STR; String json = jtwit.getHttpClient().post(apiUrl, vars, true); return InternalUtils.user(json);...
/** * Update profile. * * @param name * Can be null for no change. Full name associated with the * profile. Maximum of 20 characters. * @param url * Can be null for no change. URL associated with the profile. * Will be prepended with "http://" if not present....
Update profile
setProfile
{ "repo_name": "dolphin19303/PhotoBox", "path": "DPPhotoSDK/src/winterwell/jtwitter/Twitter_Account.java", "license": "gpl-2.0", "size": 7581 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,800,820
public FirebaseResponse patch(Map<String, Object> data) throws FirebaseException, JacksonUtilityException, UnsupportedEncodingException { return this.patch(null, data); }
FirebaseResponse function(Map<String, Object> data) throws FirebaseException, JacksonUtilityException, UnsupportedEncodingException { return this.patch(null, data); }
/** * PATCHs data to the base-url * * @param data -- can be null/empty * @return * @throws {@link FirebaseException} * @throws {@link JacksonUtilityException} * @throws UnsupportedEncodingException */
PATCHs data to the base-url
patch
{ "repo_name": "wmarquesr/NoSQLProject", "path": "src/net/thegreshams/firebase4j/service/Firebase.java", "license": "gpl-3.0", "size": 19648 }
[ "java.io.UnsupportedEncodingException", "java.util.Map", "net.thegreshams.firebase4j.error.FirebaseException", "net.thegreshams.firebase4j.error.JacksonUtilityException", "net.thegreshams.firebase4j.model.FirebaseResponse" ]
import java.io.UnsupportedEncodingException; import java.util.Map; import net.thegreshams.firebase4j.error.FirebaseException; import net.thegreshams.firebase4j.error.JacksonUtilityException; import net.thegreshams.firebase4j.model.FirebaseResponse;
import java.io.*; import java.util.*; import net.thegreshams.firebase4j.error.*; import net.thegreshams.firebase4j.model.*;
[ "java.io", "java.util", "net.thegreshams.firebase4j" ]
java.io; java.util; net.thegreshams.firebase4j;
872,323
private void addObjectsToSession(final Map<String, Object> unwrappedInputParams, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap) { for (Map.Entry<String, Object> entry : unwrappedInputParams.entrySet()) { if (!fieldTypeMap.containsKey(entry.getKey())) { throw ne...
void function(final Map<String, Object> unwrappedInputParams, final Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap) { for (Map.Entry<String, Object> entry : unwrappedInputParams.entrySet()) { if (!fieldTypeMap.containsKey(entry.getKey())) { throw new KiePMMLModelException(String.format(STR, entry.getKey()))...
/** * Add <code>Object</code>s to the underlying <code>KieSession</code>. * Such <code>Object</code>s are retrieved/instantiated from the given <code>Map</code>s and the content of the current kieSession' <code>KieBase</code> * @param unwrappedInputParams * @param fieldTypeMap */
Add <code>Object</code>s to the underlying <code>KieSession</code>. Such <code>Object</code>s are retrieved/instantiated from the given <code>Map</code>s and the content of the current kieSession' <code>KieBase</code>
addObjectsToSession
{ "repo_name": "droolsjbpm/drools", "path": "kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/utils/KiePMMLSessionUtils.java", "license": "apache-2.0", "size": 7168 }
[ "java.util.Map", "org.kie.api.KieBase", "org.kie.api.definition.type.FactType", "org.kie.api.pmml.PMML4Result", "org.kie.pmml.evaluator.api.exceptions.KiePMMLModelException", "org.kie.pmml.models.drools.tuples.KiePMMLOriginalTypeGeneratedType" ]
import java.util.Map; import org.kie.api.KieBase; import org.kie.api.definition.type.FactType; import org.kie.api.pmml.PMML4Result; import org.kie.pmml.evaluator.api.exceptions.KiePMMLModelException; import org.kie.pmml.models.drools.tuples.KiePMMLOriginalTypeGeneratedType;
import java.util.*; import org.kie.api.*; import org.kie.api.definition.type.*; import org.kie.api.pmml.*; import org.kie.pmml.evaluator.api.exceptions.*; import org.kie.pmml.models.drools.tuples.*;
[ "java.util", "org.kie.api", "org.kie.pmml" ]
java.util; org.kie.api; org.kie.pmml;
2,888,723
@Nullable PsiReference getReferenceAtCaretPosition(@TestDataFile @NonNls String... filePaths);
PsiReference getReferenceAtCaretPosition(@TestDataFile @NonNls String... filePaths);
/** * Finds the reference in position marked by {@link #CARET_MARKER}. * * @return null if no reference found. * * @see #getReferenceAtCaretPositionWithAssertion(String...) */
Finds the reference in position marked by <code>#CARET_MARKER</code>
getReferenceAtCaretPosition
{ "repo_name": "ernestp/consulo", "path": "platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestFixture.java", "license": "apache-2.0", "size": 19215 }
[ "com.intellij.psi.PsiReference", "com.intellij.testFramework.TestDataFile", "org.jetbrains.annotations.NonNls" ]
import com.intellij.psi.PsiReference; import com.intellij.testFramework.TestDataFile; import org.jetbrains.annotations.NonNls;
import com.intellij.*; import com.intellij.psi.*; import org.jetbrains.annotations.*;
[ "com.intellij", "com.intellij.psi", "org.jetbrains.annotations" ]
com.intellij; com.intellij.psi; org.jetbrains.annotations;
480,956
public void setColumns(Object... propertyIds) { Set<?> removePids = new HashSet<Object>(columns.keySet()); removePids.removeAll(Arrays.asList(propertyIds)); for (Object removePid : removePids) { removeColumn(removePid); } Set<?> addPids = new HashSet<Object>(Array...
void function(Object... propertyIds) { Set<?> removePids = new HashSet<Object>(columns.keySet()); removePids.removeAll(Arrays.asList(propertyIds)); for (Object removePid : removePids) { removeColumn(removePid); } Set<?> addPids = new HashSet<Object>(Arrays.asList(propertyIds)); addPids.removeAll(columns.keySet()); for ...
/** * Sets the columns and their order for the grid. Current columns whose * property id is not in propertyIds are removed. Similarly, a column is * added for any property id in propertyIds that has no corresponding column * in this Grid. * * @since 7.5.0 * * @param propertyIds...
Sets the columns and their order for the grid. Current columns whose property id is not in propertyIds are removed. Similarly, a column is added for any property id in propertyIds that has no corresponding column in this Grid
setColumns
{ "repo_name": "udayinfy/vaadin", "path": "server/src/com/vaadin/ui/Grid.java", "license": "apache-2.0", "size": 241007 }
[ "java.util.Arrays", "java.util.HashSet", "java.util.Set" ]
import java.util.Arrays; import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,312,456
public UTF8Buffer getSelector() { return selector; }
UTF8Buffer function() { return selector; }
/** * The JMS selector used to filter out messages that this consumer is * interested in. * * @openwire:property version=1 */
The JMS selector used to filter out messages that this consumer is interested in
getSelector
{ "repo_name": "jludvice/fabric8", "path": "gateway/gateway-core/src/main/java/io/fabric8/gateway/handlers/detecting/protocol/openwire/command/ConsumerInfo.java", "license": "apache-2.0", "size": 13993 }
[ "org.fusesource.hawtbuf.UTF8Buffer" ]
import org.fusesource.hawtbuf.UTF8Buffer;
import org.fusesource.hawtbuf.*;
[ "org.fusesource.hawtbuf" ]
org.fusesource.hawtbuf;
493,357
public void testAddressHostAndPort() throws Exception { check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999"), true); // Shouldn't fit into range. check(new OdbcConfiguration().setEndpointAddress("127.0.0.1:9999"), false); }
void function() throws Exception { check(new OdbcConfiguration().setEndpointAddress(STR), true); check(new OdbcConfiguration().setEndpointAddress(STR), false); }
/** * Test address with both host and port. * * @throws Exception If failed. */
Test address with both host and port
testAddressHostAndPort
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java", "license": "apache-2.0", "size": 6816 }
[ "org.apache.ignite.configuration.OdbcConfiguration" ]
import org.apache.ignite.configuration.OdbcConfiguration;
import org.apache.ignite.configuration.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,051,854
public byte[] compressRawData(byte[] raw) { Deflater compresser = new Deflater(); compresser.setLevel(Deflater.BEST_COMPRESSION); compresser.setInput(raw); compresser.finish(); int size; byte[] buffer = new byte[1024]; byte[] compressed = null; ByteArrayOutputStream stream = new ByteArrayOutputStream...
byte[] function(byte[] raw) { Deflater compresser = new Deflater(); compresser.setLevel(Deflater.BEST_COMPRESSION); compresser.setInput(raw); compresser.finish(); int size; byte[] buffer = new byte[1024]; byte[] compressed = null; ByteArrayOutputStream stream = new ByteArrayOutputStream(); while (true) { size = compres...
/** * Compress raw data of spatial image in 1D array. * * @param raw the raw data of spatial image in 1D array * @return byte[] the byte array */
Compress raw data of spatial image in 1D array
compressRawData
{ "repo_name": "spatialsimulator/XitoSBML", "path": "src/main/java/jp/ac/keio/bio/fun/xitosbml/xitosbml/SpatialSBMLExporter.java", "license": "apache-2.0", "size": 24303 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.util.zip.Deflater" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.Deflater;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,627,803
public static File getFrameworkFile(Context context, Location location) { File base = context.getTesterContext().getFrameworkHome(); File file = new File(base, location.toPath(File.separatorChar)); return file; }
static File function(Context context, Location location) { File base = context.getTesterContext().getFrameworkHome(); File file = new File(base, location.toPath(File.separatorChar)); return file; }
/** * Returns a framework file. * @param context the current task execution context * @param location the relative location from the framework installation root * @return the framework file path */
Returns a framework file
getFrameworkFile
{ "repo_name": "akirakw/asakusafw-compiler", "path": "compiler-project/tester/src/main/java/com/asakusafw/lang/compiler/tester/executor/TaskExecutors.java", "license": "apache-2.0", "size": 8506 }
[ "com.asakusafw.lang.compiler.common.Location", "com.asakusafw.lang.compiler.tester.executor.TaskExecutor", "java.io.File" ]
import com.asakusafw.lang.compiler.common.Location; import com.asakusafw.lang.compiler.tester.executor.TaskExecutor; import java.io.File;
import com.asakusafw.lang.compiler.common.*; import com.asakusafw.lang.compiler.tester.executor.*; import java.io.*;
[ "com.asakusafw.lang", "java.io" ]
com.asakusafw.lang; java.io;
532,830
public Integer setDetails(User loggedInUser, Integer serverId, Map<String, Object> details) { // confirm that the user only provided valid keys in the map Set<String> validKeys = new HashSet<String>(); validKeys.add("profile_name"); validKeys.add("base_entitlement"); ...
Integer function(User loggedInUser, Integer serverId, Map<String, Object> details) { Set<String> validKeys = new HashSet<String>(); validKeys.add(STR); validKeys.add(STR); validKeys.add(STR); validKeys.add(STR); validKeys.add(STR); validKeys.add("city"); validKeys.add("state"); validKeys.add(STR); validKeys.add(STR); v...
/** * Set server details. * * @param loggedInUser The current user * @param serverId ID of server to lookup details for. * @param details Map of (optional) system details to be set. * @return 1 on success, exception thrown otherwise. * * @xmlrpc.doc Set server details. All argume...
Set server details
setDetails
{ "repo_name": "jdobes/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java", "license": "gpl-2.0", "size": 240801 }
[ "com.redhat.rhn.common.hibernate.LookupException", "com.redhat.rhn.common.localization.LocalizationService", "com.redhat.rhn.domain.entitlement.Entitlement", "com.redhat.rhn.domain.role.RoleFactory", "com.redhat.rhn.domain.server.Location", "com.redhat.rhn.domain.server.Server", "com.redhat.rhn.domain.u...
import com.redhat.rhn.common.hibernate.LookupException; import com.redhat.rhn.common.localization.LocalizationService; import com.redhat.rhn.domain.entitlement.Entitlement; import com.redhat.rhn.domain.role.RoleFactory; import com.redhat.rhn.domain.server.Location; import com.redhat.rhn.domain.server.Server; import com...
import com.redhat.rhn.common.hibernate.*; import com.redhat.rhn.common.localization.*; import com.redhat.rhn.domain.entitlement.*; import com.redhat.rhn.domain.role.*; import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.*; import com.redhat.rhn.manager.actio...
[ "com.redhat.rhn", "java.util", "org.apache.commons" ]
com.redhat.rhn; java.util; org.apache.commons;
2,280,056
@Override public String toString() { String dev = "LEYENDA: Estado: input -> estado siguiente"; dev += "\n------------------------------------------------------"; // java.util.Collection<String> claves = (java.util.TreeSet)tablaTransicionFromEstadoInput.keySet(); java.util...
String function() { String dev = STR; dev += STR; java.util.Iterator claves = ((java.util.TreeSet)tablaTransicionFromEstadoInput.keySet()).iterator(); String input = STRSTRSTR\nSTR: Transicion : estado : STR accion : STR -> STR\nSTR: Transicion : null"; } return dev += STR; }
/** * Expresa la tabla en texto * *@return Texto con la tabla de estados */
Expresa la tabla en texto
toString
{ "repo_name": "palomagc/MovieChatter", "path": "src/icaro/infraestructura/entidadesBasicas/componentesBasicos/automatas/automataEFconGesAcciones/estadosyTransiciones/TablaEstadosAutomataEFinputObjts.java", "license": "gpl-2.0", "size": 12781 }
[ "java.util.TreeSet" ]
import java.util.TreeSet;
import java.util.*;
[ "java.util" ]
java.util;
2,274,720
public static Collection<Artifact> collectNativeLibraries( Iterable<? extends TransitiveInfoCollection> deps) { NestedSet<LinkerInput> linkerInputs = new NativeLibraryNestedSetBuilder() .addJavaTargets(deps) .build(); ImmutableList.Builder<Artifact> result = ImmutableList.builder(); ...
static Collection<Artifact> function( Iterable<? extends TransitiveInfoCollection> deps) { NestedSet<LinkerInput> linkerInputs = new NativeLibraryNestedSetBuilder() .addJavaTargets(deps) .build(); ImmutableList.Builder<Artifact> result = ImmutableList.builder(); for (LinkerInput linkerInput : linkerInputs) { result.add...
/** * Collects the native libraries in the transitive closure of the deps. * * @param deps the dependencies to be included as roots of the transitive closure. * @return the native libraries found in the transitive closure of the deps. */
Collects the native libraries in the transitive closure of the deps
collectNativeLibraries
{ "repo_name": "mrdomino/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java", "license": "apache-2.0", "size": 25494 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.TransitiveInfoCollection", "com.google.devtools.build.lib.collect.nestedset.NestedSet", "com.google.devtools.build.lib.rules.cpp.LinkerInput", "java.util.Collection" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.rules.cpp.LinkerInput; import java.util.Co...
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.rules.cpp.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
1,714,066
MerchantStore merchantStore = (MerchantStore)request.getAttribute(Constants.MERCHANT_STORE); if(merchantStore!=null) { if(!merchantStore.getCode().equals(store)) { merchantStore = null; } } if(merchantStore== null) { merchantStore = merchantStoreService.getByCode(store); } if(m...
MerchantStore merchantStore = (MerchantStore)request.getAttribute(Constants.MERCHANT_STORE); if(merchantStore!=null) { if(!merchantStore.getCode().equals(store)) { merchantStore = null; } } if(merchantStore== null) { merchantStore = merchantStoreService.getByCode(store); } if(merchantStore==null) { LOGGER.error(STR + s...
/** * Returns a single customer for a given MerchantStore */
Returns a single customer for a given MerchantStore
getCustomer
{ "repo_name": "xyz2410/shopizer", "path": "sm-shop/src/main/java/com/salesmanager/web/services/controller/customer/CustomerRESTController.java", "license": "gpl-2.0", "size": 13885 }
[ "com.salesmanager.core.business.customer.model.Customer", "com.salesmanager.core.business.merchant.model.MerchantStore", "com.salesmanager.web.constants.Constants", "com.salesmanager.web.entity.customer.ReadableCustomer", "com.salesmanager.web.populator.customer.ReadableCustomerPopulator" ]
import com.salesmanager.core.business.customer.model.Customer; import com.salesmanager.core.business.merchant.model.MerchantStore; import com.salesmanager.web.constants.Constants; import com.salesmanager.web.entity.customer.ReadableCustomer; import com.salesmanager.web.populator.customer.ReadableCustomerPopulator;
import com.salesmanager.core.business.customer.model.*; import com.salesmanager.core.business.merchant.model.*; import com.salesmanager.web.constants.*; import com.salesmanager.web.entity.customer.*; import com.salesmanager.web.populator.customer.*;
[ "com.salesmanager.core", "com.salesmanager.web" ]
com.salesmanager.core; com.salesmanager.web;
2,015,897
@SmallTest public void testVibrator() { Vibrator vibrator = (Vibrator)getContext().getSystemService(Context.VIBRATOR_SERVICE); try { vibrator.cancel(); fail("Vibrator.cancel() did not throw SecurityException as expected."); } catch (SecurityException e) { ...
void function() { Vibrator vibrator = (Vibrator)getContext().getSystemService(Context.VIBRATOR_SERVICE); try { vibrator.cancel(); fail(STR); } catch (SecurityException e) { } try { vibrator.vibrate(1); fail(STR); } catch (SecurityException e) { } long[] testPattern = {1, 1, 1, 1, 1}; try { vibrator.vibrate(testPattern,...
/** * Verify that Vibrator's vibrating related methods requires permissions. * <p>Requires Permission: * {@link android.Manifest.permission#VIBRATE}. */
Verify that Vibrator's vibrating related methods requires permissions. Requires Permission: <code>android.Manifest.permission#VIBRATE</code>
testVibrator
{ "repo_name": "rex-xxx/mt6572_x201", "path": "cts/tests/tests/permission/src/android/permission/cts/NoSystemFunctionPermissionTest.java", "license": "gpl-2.0", "size": 5147 }
[ "android.content.Context", "android.os.Vibrator" ]
import android.content.Context; import android.os.Vibrator;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
2,365,100
public static boolean isAjax(final HttpServletRequest request) { String ajaxHeaderName = (String)ReflectionUtils.getConfigProperty("ajaxHeader"); String xmlHttpRequest = "XMLHttpRequest"; // check the current request's headers if (xmlHttpRequest.equals(request.getHeader(ajaxHeaderName))) { return true;...
static boolean function(final HttpServletRequest request) { String ajaxHeaderName = (String)ReflectionUtils.getConfigProperty(STR); String xmlHttpRequest = STR; if (xmlHttpRequest.equals(request.getHeader(ajaxHeaderName))) { return true; } Object ajaxCheckClosure = ReflectionUtils.getConfigProperty(STR); if (ajaxCheckC...
/** * Check if the request was triggered by an Ajax call. * @param request the request * @return <code>true</code> if Ajax */
Check if the request was triggered by an Ajax call
isAjax
{ "repo_name": "pergravgaard/grails-spring-security-core", "path": "src/java/grails/plugin/springsecurity/SpringSecurityUtils.java", "license": "apache-2.0", "size": 27034 }
[ "groovy.lang.Closure", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpSession", "org.springframework.security.web.savedrequest.SavedRequest", "org.springframework.web.multipart.MultipartHttpServletRequest" ]
import groovy.lang.Closure; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.security.web.savedrequest.SavedRequest; import org.springframework.web.multipart.MultipartHttpServletRequest;
import groovy.lang.*; import javax.servlet.http.*; import org.springframework.security.web.savedrequest.*; import org.springframework.web.multipart.*;
[ "groovy.lang", "javax.servlet", "org.springframework.security", "org.springframework.web" ]
groovy.lang; javax.servlet; org.springframework.security; org.springframework.web;
255,304
public void removeEmptyAttributes() { Enumeration atts = getAll(); while (atts.hasMoreElements()) { Attribute att = (Attribute)atts.nextElement(); if (att.size() == 0) { remove(att.getID()); } } }
void function() { Enumeration atts = getAll(); while (atts.hasMoreElements()) { Attribute att = (Attribute)atts.nextElement(); if (att.size() == 0) { remove(att.getID()); } } }
/** * This method trims all empty attributes (attributes without values) from * the DXAttributes object. */
This method trims all empty attributes (attributes without values) from the DXAttributes object
removeEmptyAttributes
{ "repo_name": "idega/platform2", "path": "src/com/idega/core/ldap/client/naming/DXAttributes.java", "license": "gpl-3.0", "size": 51405 }
[ "java.util.Enumeration", "javax.naming.directory.Attribute" ]
import java.util.Enumeration; import javax.naming.directory.Attribute;
import java.util.*; import javax.naming.directory.*;
[ "java.util", "javax.naming" ]
java.util; javax.naming;
2,645,690
EAttribute getMappedStructure_TopElementType();
EAttribute getMappedStructure_TopElementType();
/** * Returns the meta object for the attribute '{@link com.openMap1.mapper.MappedStructure#getTopElementType <em>Top Element Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Top Element Type</em>'. * @see com.openMap1.mapper.MappedStructure#...
Returns the meta object for the attribute '<code>com.openMap1.mapper.MappedStructure#getTopElementType Top Element Type</code>'.
getMappedStructure_TopElementType
{ "repo_name": "openmapsoftware/mappingtools", "path": "openmap-mapper-lib/src/main/java/com/openMap1/mapper/MapperPackage.java", "license": "epl-1.0", "size": 172715 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,184,734
@Test public void testFlowBasedObject() { final DefaultFlowEntry entry = new DefaultFlowEntry(new IntentTestsMocks.MockFlowRule(1)); assertThat(entry.priority(), is(1)); assertThat(entry.appId(), is((short) 0)); assertThat(entry.lastSeen(), greater...
void function() { final DefaultFlowEntry entry = new DefaultFlowEntry(new IntentTestsMocks.MockFlowRule(1)); assertThat(entry.priority(), is(1)); assertThat(entry.appId(), is((short) 0)); assertThat(entry.lastSeen(), greaterThan(System.currentTimeMillis() - TimeUnit.MILLISECONDS.convert(1, TimeUnit.SECONDS))); }
/** * Tests a default flow entry constructed from a flow rule. */
Tests a default flow entry constructed from a flow rule
testFlowBasedObject
{ "repo_name": "VinodKumarS-Huawei/ietf96yang", "path": "core/api/src/test/java/org/onosproject/net/flow/DefaultFlowEntryTest.java", "license": "apache-2.0", "size": 6197 }
[ "java.util.concurrent.TimeUnit", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.onosproject.net.intent.IntentTestsMocks" ]
import java.util.concurrent.TimeUnit; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.onosproject.net.intent.IntentTestsMocks;
import java.util.concurrent.*; import org.hamcrest.*; import org.onosproject.net.intent.*;
[ "java.util", "org.hamcrest", "org.onosproject.net" ]
java.util; org.hamcrest; org.onosproject.net;
1,319,577
Thread search = new Thread(() -> { synchronized (this) { Path startPath = Paths.get(root); try { Files.walkFileTree(startPath, new SearchFileVisitor(exts, files)); } catch (IOException e) { e.printStackTrace(); ...
Thread search = new Thread(() -> { synchronized (this) { Path startPath = Paths.get(root); try { Files.walkFileTree(startPath, new SearchFileVisitor(exts, files)); } catch (IOException e) { e.printStackTrace(); } this.finish = true; notifyAll(); } }); Thread read = new Thread(() -> { synchronized (this) { while (!finis...
/** * Init method. * Satreted two threads. One of them search paths, second search text in founding files. * * @throws InterruptedException - ie. */
Init method. Satreted two threads. One of them search paths, second search text in founding files
init
{ "repo_name": "KDanila/KDanila", "path": "chapter_005/src/main/java/ru/job4j/multithreads/ParallelSearch.java", "license": "apache-2.0", "size": 3488 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path", "java.nio.file.Paths", "java.util.List" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List;
import java.io.*; import java.nio.file.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
1,501,111
@Deprecated default T getLatestValue() throws NotAvailableException { return getValue(); }
default T getLatestValue() throws NotAvailableException { return getValue(); }
/** * Method returns the latest observable value. * * @return * * @throws NotAvailableException * @deprecated since v2.0 and will be removed in v3.0. Please use {@link #getValue()} instead. */
Method returns the latest observable value
getLatestValue
{ "repo_name": "openbase/jul", "path": "pattern/default/src/main/java/org/openbase/jul/pattern/Observable.java", "license": "lgpl-3.0", "size": 4189 }
[ "org.openbase.jul.exception.NotAvailableException" ]
import org.openbase.jul.exception.NotAvailableException;
import org.openbase.jul.exception.*;
[ "org.openbase.jul" ]
org.openbase.jul;
79,259
@GuardedBy("monitor") private void refreshActiveBuffer() { Preconditions.checkState(activeBuffer == null); activeBuffer = inactiveBuffers.remove(); activeBuffer.reset(); }
@GuardedBy(STR) void function() { Preconditions.checkState(activeBuffer == null); activeBuffer = inactiveBuffers.remove(); activeBuffer.reset(); }
/** * Refreshes the active buffer. This should only be called after a * {@link #flush()} when the active buffer is {@code null}, there is an * inactive buffer available (see {@link #inactiveBufferAvailable()}, and * {@link #monitor} is locked. */
Refreshes the active buffer. This should only be called after a <code>#flush()</code> when the active buffer is null, there is an inactive buffer available (see <code>#inactiveBufferAvailable()</code>, and <code>#monitor</code> is locked
refreshActiveBuffer
{ "repo_name": "InspurUSA/kudu", "path": "java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduSession.java", "license": "apache-2.0", "size": 38894 }
[ "com.google.common.base.Preconditions", "javax.annotation.concurrent.GuardedBy" ]
import com.google.common.base.Preconditions; import javax.annotation.concurrent.GuardedBy;
import com.google.common.base.*; import javax.annotation.concurrent.*;
[ "com.google.common", "javax.annotation" ]
com.google.common; javax.annotation;
1,770,057
public static String toStringFromAscii(byte[] bytes) { try { byte[] ret = new byte[bytes.length]; for (int x = 0; x < bytes.length; x++) { if (bytes[x] < 32 && bytes[x] >= 0) { ret[x] = '.'; } else { ret[x] = byt...
static String function(byte[] bytes) { try { byte[] ret = new byte[bytes.length]; for (int x = 0; x < bytes.length; x++) { if (bytes[x] < 32 && bytes[x] >= 0) { ret[x] = '.'; } else { ret[x] = bytes[x]; } } String encode = "gbk"; String str = new String(ret, encode); return str; } catch (UnsupportedEncodingException ex...
/** * Turns an array of bytes into a ASCII string. Any non-printable characters * are replaced by a period (<code>.</code>) * * @param bytes The bytes to convert. * @return The ASCII hexadecimal representation of <code>bytes</code> */
Turns an array of bytes into a ASCII string. Any non-printable characters are replaced by a period (<code>.</code>)
toStringFromAscii
{ "repo_name": "316181444/GameServerFramework", "path": "src/main/java/org/server/core/io/tools/HexTool.java", "license": "apache-2.0", "size": 6141 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,790,715
private void calculateMinMax() { min = Float.POSITIVE_INFINITY; max = Float.NEGATIVE_INFINITY; int counter = -1; for (float current : container) { counter++; if (Float.isNaN(current)) { continue; } if (Float.isInfinite(current)) { Logger.log(new Status(IStatus.WARNING, this.toString(), ...
void function() { min = Float.POSITIVE_INFINITY; max = Float.NEGATIVE_INFINITY; int counter = -1; for (float current : container) { counter++; if (Float.isNaN(current)) { continue; } if (Float.isInfinite(current)) { Logger.log(new Status(IStatus.WARNING, this.toString(), STR + counter + STR + current)); continue; } if ...
/** * Calculates the min and max of the container and sets them to the min and max class variables */
Calculates the min and max of the container and sets them to the min and max class variables
calculateMinMax
{ "repo_name": "Caleydo/caleydo", "path": "org.caleydo.core/src/org/caleydo/core/data/collection/column/container/FloatContainer.java", "license": "bsd-3-clause", "size": 4974 }
[ "org.caleydo.core.util.logging.Logger", "org.eclipse.core.runtime.IStatus", "org.eclipse.core.runtime.Status" ]
import org.caleydo.core.util.logging.Logger; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status;
import org.caleydo.core.util.logging.*; import org.eclipse.core.runtime.*;
[ "org.caleydo.core", "org.eclipse.core" ]
org.caleydo.core; org.eclipse.core;
2,558,088
public Column findColumn(String name) { for(CTEColumn col : _table._columns) { if(col.getColumnNameSQL().equals(name)) { return col; } } return null; }
Column function(String name) { for(CTEColumn col : _table._columns) { if(col.getColumnNameSQL().equals(name)) { return col; } } return null; }
/** * Returns a previously defined pseudo Column from this CTE definition with * the given name, or {@code null} if one cannot be found. */
Returns a previously defined pseudo Column from this CTE definition with the given name, or null if one cannot be found
findColumn
{ "repo_name": "jahlborn/sqlbuilder", "path": "src/main/java/com/healthmarketscience/sqlbuilder/CommonTableExpression.java", "license": "apache-2.0", "size": 7206 }
[ "com.healthmarketscience.sqlbuilder.dbspec.Column" ]
import com.healthmarketscience.sqlbuilder.dbspec.Column;
import com.healthmarketscience.sqlbuilder.dbspec.*;
[ "com.healthmarketscience.sqlbuilder" ]
com.healthmarketscience.sqlbuilder;
1,650,095
public String toHexString() { return ByteUtils.toHexString(toByteArray()); }
String function() { return ByteUtils.toHexString(toByteArray()); }
/** * Returns the bytes of the APDU as a hex encoded string. * * @return Hex encoded string of the APDU */
Returns the bytes of the APDU as a hex encoded string
toHexString
{ "repo_name": "adelapie/open-ecard-IRMA", "path": "common/src/main/java/org/openecard/common/apdu/common/CardCommandAPDU.java", "license": "apache-2.0", "size": 17433 }
[ "org.openecard.common.util.ByteUtils" ]
import org.openecard.common.util.ByteUtils;
import org.openecard.common.util.*;
[ "org.openecard.common" ]
org.openecard.common;
2,020,718
public Builder callbackExecutor(Executor callbackExecutor) { this.callbackExecutor = checkNotNull(callbackExecutor, "callbackExecutor == null"); return this; }
Builder function(Executor callbackExecutor) { this.callbackExecutor = checkNotNull(callbackExecutor, STR); return this; }
/** * The executor on which {@link Callback} methods are invoked when returning {@link Call} from * your service method. */
The executor on which <code>Callback</code> methods are invoked when returning <code>Call</code> from your service method
callbackExecutor
{ "repo_name": "zero21ke/retrofit", "path": "retrofit/src/main/java/retrofit/Retrofit.java", "license": "apache-2.0", "size": 12132 }
[ "java.util.concurrent.Executor" ]
import java.util.concurrent.Executor;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,665,691
Extent getExtentView(DiscreteTransform3 transform);
Extent getExtentView(DiscreteTransform3 transform);
/** * Returns a new extent that is viewed through some transformation. * This does not copy the data, it only provides a new view of the * extent. * * @param transform The transformation to be applied * @return The new extent with the transform */
Returns a new extent that is viewed through some transformation. This does not copy the data, it only provides a new view of the extent
getExtentView
{ "repo_name": "jonk1993/SpongeAPI", "path": "src/main/java/org/spongepowered/api/world/extent/Extent.java", "license": "mit", "size": 19459 }
[ "org.spongepowered.api.util.DiscreteTransform3" ]
import org.spongepowered.api.util.DiscreteTransform3;
import org.spongepowered.api.util.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
999,866
@Sticky @Update public void error(Ex1 model) { throw new IllegalStateException(); }
void function(Ex1 model) { throw new IllegalStateException(); }
/** * sticky (raise error). * @param model target object */
sticky (raise error)
error
{ "repo_name": "asakusafw/asakusafw-legacy", "path": "legacy-project/asakusa-fileio-plugin/src/test/java/com/asakusafw/compiler/fileio/operator/ExOperator.java", "license": "apache-2.0", "size": 4226 }
[ "com.asakusafw.compiler.fileio.model.Ex1" ]
import com.asakusafw.compiler.fileio.model.Ex1;
import com.asakusafw.compiler.fileio.model.*;
[ "com.asakusafw.compiler" ]
com.asakusafw.compiler;
2,121,116
public DescriptionId getNameAsDescriptionId() { // Get Skill id, item, count and target defined for each artifact. ArtifactActivation activation = getTemplate().getActivation(); int skillId = activation.getSkillId(); SkillTemplate skillTemplate = DataManager.SKILL_DATA.getSkillTe...
DescriptionId function() { ArtifactActivation activation = getTemplate().getActivation(); int skillId = activation.getSkillId(); SkillTemplate skillTemplate = DataManager.SKILL_DATA.getSkillTemplate(skillId); return new DescriptionId(skillTemplate.getNameId()); }
/** * Returns DescriptionId that describes name of this artifact.<br> * * @return DescriptionId with name */
Returns DescriptionId that describes name of this artifact
getNameAsDescriptionId
{ "repo_name": "GiGatR00n/Aion-Core-v4.7.5", "path": "AC-Game/src/com/aionemu/gameserver/model/siege/ArtifactLocation.java", "license": "gpl-2.0", "size": 3766 }
[ "com.aionemu.gameserver.dataholders.DataManager", "com.aionemu.gameserver.model.DescriptionId", "com.aionemu.gameserver.model.templates.siegelocation.ArtifactActivation", "com.aionemu.gameserver.skillengine.model.SkillTemplate" ]
import com.aionemu.gameserver.dataholders.DataManager; import com.aionemu.gameserver.model.DescriptionId; import com.aionemu.gameserver.model.templates.siegelocation.ArtifactActivation; import com.aionemu.gameserver.skillengine.model.SkillTemplate;
import com.aionemu.gameserver.dataholders.*; import com.aionemu.gameserver.model.*; import com.aionemu.gameserver.model.templates.siegelocation.*; import com.aionemu.gameserver.skillengine.model.*;
[ "com.aionemu.gameserver" ]
com.aionemu.gameserver;
586,882
public PageReadStore readNextRowGroup() throws IOException { if (currentBlock == blocks.size()) { return null; } BlockMetaData block = blocks.get(currentBlock); if (block.getRowCount() == 0) { throw new RuntimeException("Illegal row group of 0 rows"); } ColumnChunkPageReadStore col...
PageReadStore function() throws IOException { if (currentBlock == blocks.size()) { return null; } BlockMetaData block = blocks.get(currentBlock); if (block.getRowCount() == 0) { throw new RuntimeException(STR); } ColumnChunkPageReadStore columnChunkPageReadStore = new ColumnChunkPageReadStore(block.getRowCount()); List...
/** * Reads all the columns requested from the row group at the current file position. * @throws IOException if an error occurs while reading * @return the PageReadStore which can provide PageReaders for each column. */
Reads all the columns requested from the row group at the current file position
readNextRowGroup
{ "repo_name": "snorden/parquet-mr-apache-parquet-1.7.0", "path": "parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java", "license": "apache-2.0", "size": 31093 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.apache.parquet.column.ColumnDescriptor", "org.apache.parquet.column.page.PageReadStore", "org.apache.parquet.hadoop.metadata.BlockMetaData", "org.apache.parquet.hadoop.metadata.ColumnChunkMetaData", "org.apache.parquet.hadoop.metadat...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.column.page.PageReadStore; import org.apache.parquet.hadoop.metadata.BlockMetaData; import org.apache.parquet.hadoop.metadata.ColumnChunkMetaData; import org.apache...
import java.io.*; import java.util.*; import org.apache.parquet.column.*; import org.apache.parquet.column.page.*; import org.apache.parquet.hadoop.metadata.*; import org.apache.parquet.hadoop.util.counters.*;
[ "java.io", "java.util", "org.apache.parquet" ]
java.io; java.util; org.apache.parquet;
2,784,163
public static InterpolatedDoublesSurface blackSurfaceExpiryLogMoneyness(final double shift) { final double[] shiftedVol = VOL_EXP_LOGMONEY.clone(); for (int loopvol = 0; loopvol < shiftedVol.length; loopvol++) { shiftedVol[loopvol] += shift; } return InterpolatedDoublesSurface.from(EXPIRY2, LOGM...
static InterpolatedDoublesSurface function(final double shift) { final double[] shiftedVol = VOL_EXP_LOGMONEY.clone(); for (int loopvol = 0; loopvol < shiftedVol.length; loopvol++) { shiftedVol[loopvol] += shift; } return InterpolatedDoublesSurface.from(EXPIRY2, LOGMONEY, shiftedVol, INTERPOLATOR_TIMESQUARE_LINEAR_2D);...
/** * Returns an interpolated surface (time-square on expiration / linear on log moneyness interpolation, flat extrapolation) * @return The surface. */
Returns an interpolated surface (time-square on expiration / linear on log moneyness interpolation, flat extrapolation)
blackSurfaceExpiryLogMoneyness
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Analytics/src/test/java/com/opengamma/analytics/financial/provider/description/StandardDataSetsBlack.java", "license": "apache-2.0", "size": 4856 }
[ "com.opengamma.analytics.math.surface.InterpolatedDoublesSurface" ]
import com.opengamma.analytics.math.surface.InterpolatedDoublesSurface;
import com.opengamma.analytics.math.surface.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
41,017
private IPortletDefinition savePortletDefinition( IPortletDefinition definition, IPerson publisher, List<PortletCategory> categories, Map<ExternalPermissionDefinition, Set<IGroupMember>> permissionMap) { boolean newChannel = (definition.getPortletDefinitionId(...
IPortletDefinition function( IPortletDefinition definition, IPerson publisher, List<PortletCategory> categories, Map<ExternalPermissionDefinition, Set<IGroupMember>> permissionMap) { boolean newChannel = (definition.getPortletDefinitionId() == null); definition = portletDefinitionDao.savePortletDefinition(definition); ...
/** * Save a portlet definition. * * @param definition the portlet definition * @param publisher the person publishing the portlet * @param categories the list of categories for the portlet * @param permissionMap a map of permission name -> list of groups who are granted that * pe...
Save a portlet definition
savePortletDefinition
{ "repo_name": "jhelmer-unicon/uPortal", "path": "uportal-war/src/main/java/org/apereo/portal/io/xml/portlet/PortletDefinitionImporterExporter.java", "license": "apache-2.0", "size": 37454 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "java.util.Map", "java.util.Set", "org.apereo.portal.groups.IEntity", "org.apereo.portal.groups.IEntityGroup", "org.apereo.portal.groups.IGroupMember", "org.apereo.portal.io.xml.portlettype.ExternalPermissionDefinition", "org.apereo....
import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set; import org.apereo.portal.groups.IEntity; import org.apereo.portal.groups.IEntityGroup; import org.apereo.portal.groups.IGroupMember; import org.apereo.portal.io.xml.portlettype.ExternalPermissionD...
import java.util.*; import org.apereo.portal.groups.*; import org.apereo.portal.io.xml.portlettype.*; import org.apereo.portal.portlet.om.*; import org.apereo.portal.security.*; import org.apereo.portal.services.*;
[ "java.util", "org.apereo.portal" ]
java.util; org.apereo.portal;
2,506,629
public PDStream getPDStream() { return stream; }
PDStream function() { return stream; }
/** * Get the underlying ICC profile stream. * @return the underlying ICC profile stream */
Get the underlying ICC profile stream
getPDStream
{ "repo_name": "kalaspuffar/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDICCBased.java", "license": "apache-2.0", "size": 19583 }
[ "org.apache.pdfbox.pdmodel.common.PDStream" ]
import org.apache.pdfbox.pdmodel.common.PDStream;
import org.apache.pdfbox.pdmodel.common.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
1,527,067
private SaplingType getSmallSaplingType(int data) { switch (data % 8) { // % 8 makes it ignore growth stage case 0: return SaplingType.Oak; case 1: return SaplingType.Redwood; case 2: ...
SaplingType function(int data) { switch (data % 8) { case 0: return SaplingType.Oak; case 1: return SaplingType.Redwood; case 2: return SaplingType.Birch; case 3: return SaplingType.SmallJungle; case 4: return SaplingType.Acacia; } return null; }
/** * Gets the sapling type, based on the assumption that the sapling is * not placed in a 2x2 pattern. * * @param data * The block data of the sapling block. * @return The sapling type, or null if not found. */
Gets the sapling type, based on the assumption that the sapling is not placed in a 2x2 pattern
getSmallSaplingType
{ "repo_name": "MCTCP/TerrainControl", "path": "platforms/forge/src/main/java/com/khorn/terraincontrol/forge/events/SaplingListener.java", "license": "mit", "size": 10889 }
[ "com.khorn.terraincontrol.generator.resource.SaplingType" ]
import com.khorn.terraincontrol.generator.resource.SaplingType;
import com.khorn.terraincontrol.generator.resource.*;
[ "com.khorn.terraincontrol" ]
com.khorn.terraincontrol;
2,438,657
public BufferedImage createImage(BufferedImage source, int type) { BufferedImage copy = new BufferedImage(source.getWidth(), source.getHeight(), type); while (!copy.createGraphics().drawImage(source, 0, 0, null)) { SimpleLogger.d(getClass(), "waiting"); } return copy; ...
BufferedImage function(BufferedImage source, int type) { BufferedImage copy = new BufferedImage(source.getWidth(), source.getHeight(), type); while (!copy.createGraphics().drawImage(source, 0, 0, null)) { SimpleLogger.d(getClass(), STR); } return copy; }
/** * Creates an image of specified type from the source, use this when the source type is not as desired. * * @param source The source image * @param type destination image type * @return Copy of source image of specified type */
Creates an image of specified type from the source, use this when the source type is not as desired
createImage
{ "repo_name": "rsahlin/graphics-by-opengl", "path": "graphics-by-opengl-j2se/src/main/java/com/nucleus/texturing/AWTImageFactory.java", "license": "apache-2.0", "size": 6677 }
[ "com.nucleus.SimpleLogger", "java.awt.image.BufferedImage" ]
import com.nucleus.SimpleLogger; import java.awt.image.BufferedImage;
import com.nucleus.*; import java.awt.image.*;
[ "com.nucleus", "java.awt" ]
com.nucleus; java.awt;
1,082,287
EClass getpropertyInterface();
EClass getpropertyInterface();
/** * Returns the meta object for class '{@link org.xtext.example.delphi.delphi.propertyInterface <em>property Interface</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>property Interface</em>'. * @see org.xtext.example.delphi.delphi.propertyInterface * @g...
Returns the meta object for class '<code>org.xtext.example.delphi.delphi.propertyInterface property Interface</code>'.
getpropertyInterface
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/src-gen/org/xtext/example/delphi/delphi/DelphiPackage.java", "license": "epl-1.0", "size": 434880 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
416,355
public Path moveSelectedFile(Path to) { final Path newFilePath = this.currentPath.getParent().resolve(to); LOGGER.log(Level.INFO, "Moving {0} to {1}", new Object[]{this.currentPath, newFilePath}); try { this.currentPath = Files.move(curre...
Path function(Path to) { final Path newFilePath = this.currentPath.getParent().resolve(to); LOGGER.log(Level.INFO, STR, new Object[]{this.currentPath, newFilePath}); try { this.currentPath = Files.move(currentPath, newFilePath, REPLACE_EXISTING); } catch (IOException ex) { LOGGER.log(Level.SEVERE, STR, ex); } return ne...
/** * Moves the selected file to the {@code Path}. * * @param to * @return */
Moves the selected file to the Path
moveSelectedFile
{ "repo_name": "AntoCuc/Publo", "path": "navigator/src/main/java/org/publo/filebrowser/utils/FileTreeView.java", "license": "mit", "size": 6891 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path", "java.util.logging.Level" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.logging.Level;
import java.io.*; import java.nio.file.*; import java.util.logging.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
1,032,160
@Test public void testDestroy() { door.destroy(); player.removeDoor(0.0); player.removeDoor(5.0); verify(l1).destroy(); verify(l2).destroy(); verify(l3).destroy(); verify(l4).destroy(); verify(gameObjects).removeObject(door); }
void function() { door.destroy(); player.removeDoor(0.0); player.removeDoor(5.0); verify(l1).destroy(); verify(l2).destroy(); verify(l3).destroy(); verify(l4).destroy(); verify(gameObjects).removeObject(door); }
/** * Tests if everything is correctly removed when the door is destroyed */
Tests if everything is correctly removed when the door is destroyed
testDestroy
{ "repo_name": "JoshCode/SEM", "path": "src/test/java/nl/joshuaslik/tudelft/SEM/control/gameObjects/BubbleDoorTest.java", "license": "apache-2.0", "size": 3526 }
[ "org.mockito.Mockito" ]
import org.mockito.Mockito;
import org.mockito.*;
[ "org.mockito" ]
org.mockito;
960,461
Object visitLiteral(LiteralExpression literal, EdmLiteral edmLiteral);
Object visitLiteral(LiteralExpression literal, EdmLiteral edmLiteral);
/** * Visits a literal expression * @param literal * The visited literal expression node * @param edmLiteral * The detected EDM literal (value and type) * @return * The value of the literal */
Visits a literal expression
visitLiteral
{ "repo_name": "SAP/cloud-odata-java", "path": "odata-api/src/main/java/com/sap/core/odata/api/uri/expression/ExpressionVisitor.java", "license": "apache-2.0", "size": 5709 }
[ "com.sap.core.odata.api.edm.EdmLiteral" ]
import com.sap.core.odata.api.edm.EdmLiteral;
import com.sap.core.odata.api.edm.*;
[ "com.sap.core" ]
com.sap.core;
1,832,773
@ObjectiveCName("trackActionSuccess:") public void trackActionSuccess(String action) { modules.getAnalytics().trackActionSuccess(action); }
@ObjectiveCName(STR) void function(String action) { modules.getAnalytics().trackActionSuccess(action); }
/** * Track sync action success * * @param action action key */
Track sync action success
trackActionSuccess
{ "repo_name": "boneyao/actor-platform", "path": "actor-apps/core/src/main/java/im/actor/model/Messenger.java", "license": "mit", "size": 50580 }
[ "com.google.j2objc.annotations.ObjectiveCName" ]
import com.google.j2objc.annotations.ObjectiveCName;
import com.google.j2objc.annotations.*;
[ "com.google.j2objc" ]
com.google.j2objc;
851,485
protected void sequence_CostEntry(ISerializationContext context, CostEntry semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, ApplicationConfigurationPackage.Literals.COST_ENTRY__PATTERN_ELEMENT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvid...
void function(ISerializationContext context, CostEntry semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, ApplicationConfigurationPackage.Literals.COST_ENTRY__PATTERN_ELEMENT) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semant...
/** * Contexts: * CostEntry returns CostEntry * * Constraint: * (patternElement=PatternElement weight=INTLiteral) */
Contexts: CostEntry returns CostEntry Constraint: (patternElement=PatternElement weight=INTLiteral)
sequence_CostEntry
{ "repo_name": "viatra/VIATRA-Generator", "path": "Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/serializer/ApplicationConfigurationSemanticSequencer.java", "license": "epl-1.0", "size": 55568 }
[ "hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage", "hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CostEntry", "org.eclipse.xtext.serializer.ISerializationContext", "org.eclipse.xtext.serializer.acceptor.SequenceFeeder", "org.eclipse.xtext.ser...
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage; import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CostEntry; import org.eclipse.xtext.serializer.ISerializationContext; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.ecl...
import hu.bme.mit.inf.dslreasoner.application.*; import org.eclipse.xtext.serializer.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*;
[ "hu.bme.mit", "org.eclipse.xtext" ]
hu.bme.mit; org.eclipse.xtext;
374,609
@Override public void exitOverlapsWith(@NotNull PQLParser.OverlapsWithContext ctx) { }
@Override public void exitOverlapsWith(@NotNull PQLParser.OverlapsWithContext ctx) { }
/** * {@inheritDoc} * <p/> * The default implementation does nothing. */
The default implementation does nothing
enterOverlapsWith
{ "repo_name": "processquerying/PQL", "path": "src/org/pql/antlr/PQLBaseListener.java", "license": "lgpl-3.0", "size": 23062 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,651,876
public AuthMethodPickerLayout.Builder setTwitterButtonId(@IdRes int twitterBtn) { providersMapping.put(TwitterAuthProvider.PROVIDER_ID, twitterBtn); return this; }
AuthMethodPickerLayout.Builder function(@IdRes int twitterBtn) { providersMapping.put(TwitterAuthProvider.PROVIDER_ID, twitterBtn); return this; }
/** * Set the ID of the Twitter sign in button in the custom layout. */
Set the ID of the Twitter sign in button in the custom layout
setTwitterButtonId
{ "repo_name": "firebase/FirebaseUI-Android", "path": "auth/src/main/java/com/firebase/ui/auth/AuthMethodPickerLayout.java", "license": "apache-2.0", "size": 6789 }
[ "androidx.annotation.IdRes", "com.google.firebase.auth.TwitterAuthProvider" ]
import androidx.annotation.IdRes; import com.google.firebase.auth.TwitterAuthProvider;
import androidx.annotation.*; import com.google.firebase.auth.*;
[ "androidx.annotation", "com.google.firebase" ]
androidx.annotation; com.google.firebase;
736,653
CommandLineConfig setOutputWrapper(String outputWrapper) { this.outputWrapper = outputWrapper; return this; } private final List<String> moduleWrapper = Lists.newArrayList();
CommandLineConfig setOutputWrapper(String outputWrapper) { this.outputWrapper = outputWrapper; return this; } private final List<String> moduleWrapper = Lists.newArrayList();
/** * Interpolate output into this string at the place denoted * by the marker token %output%. See --output_wrapper_marker */
Interpolate output into this string at the place denoted by the marker token %output%. See --output_wrapper_marker
setOutputWrapper
{ "repo_name": "arcadoss/js-invulnerable", "path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java", "license": "apache-2.0", "size": 51527 }
[ "com.google.common.collect.Lists", "java.util.List" ]
import com.google.common.collect.Lists; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,283,182
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<ServiceObjectiveInner>> listByServerSinglePageAsync( String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgum...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ServiceObjectiveInner>> function( String resourceGroupName, String serverName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new Illeg...
/** * Returns database service objectives. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @throws IllegalArgumentExcepti...
Returns database service objectives
listByServerSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServiceObjectivesClientImpl.java", "license": "mit", "size": 21288 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.sql.fluent.models.ServiceObjectiveInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.sql.fluent.models.ServiceObjectiveInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.sql.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
375,823
if (isInited) return (XmldsigPackage)EPackage.Registry.INSTANCE.getEPackage(XmldsigPackage.eNS_URI); // Obtain or create and register package XmldsigPackageImpl theXmldsigPackage = (XmldsigPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XmldsigPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)...
if (isInited) return (XmldsigPackage)EPackage.Registry.INSTANCE.getEPackage(XmldsigPackage.eNS_URI); XmldsigPackageImpl theXmldsigPackage = (XmldsigPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XmldsigPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XmldsigPackageImpl()); isInited = true; X...
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link XmldsigPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to...
Creates, registers, and initializes the Package for this model, and for any others upon which it depends. This method is used to initialize <code>XmldsigPackage#eINSTANCE</code> when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
init
{ "repo_name": "GRA-UML/tool", "path": "plugins/org.ijis.gra.ebxml.cpp-cpa/src/main/java/org/w3/_2000/_09/xmldsig/impl/XmldsigPackageImpl.java", "license": "epl-1.0", "size": 93969 }
[ "org.ebxml.namespaces.trade.partner.PartnerPackage", "org.ebxml.namespaces.trade.partner.impl.PartnerPackageImpl", "org.eclipse.emf.ecore.EPackage", "org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage", "org.eclipse.emf.ecore.xml.type.XMLTypePackage", "org.w3._1999.xlink.XlinkPackage", "org.w3._199...
import org.ebxml.namespaces.trade.partner.PartnerPackage; import org.ebxml.namespaces.trade.partner.impl.PartnerPackageImpl; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.xml.namespace.XMLNamespacePackage; import org.eclipse.emf.ecore.xml.type.XMLTypePackage; import org.w3._1999.xlink.XlinkPackage...
import org.ebxml.namespaces.trade.partner.*; import org.ebxml.namespaces.trade.partner.impl.*; import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.xml.namespace.*; import org.eclipse.emf.ecore.xml.type.*; import org.w3.*;
[ "org.ebxml.namespaces", "org.eclipse.emf", "org.w3" ]
org.ebxml.namespaces; org.eclipse.emf; org.w3;
1,371,600
public boolean caption(AccessibilityNodeInfoCompat node) { @Nullable ImageNode savedResult = imageCaptionStorage.getCaptionResults(node); if (savedResult != null) { LogUtils.v(TAG, "perform() caption result exists " + savedResult); return true; } screenshotRequests.addRequest( new...
boolean function(AccessibilityNodeInfoCompat node) { @Nullable ImageNode savedResult = imageCaptionStorage.getCaptionResults(node); if (savedResult != null) { LogUtils.v(TAG, STR + savedResult); return true; } screenshotRequests.addRequest( new ScreenshotCaptureRequest( service, node, (nodeForCaption, screenCapture) ->...
/** * Creates a {@link CaptionRequest} to perform corresponding image caption or reads out the result * if it exists in the cache. */
Creates a <code>CaptionRequest</code> to perform corresponding image caption or reads out the result if it exists in the cache
caption
{ "repo_name": "google/talkback", "path": "talkback/src/main/java/com/google/android/accessibility/talkback/actor/ImageCaptioner.java", "license": "apache-2.0", "size": 7078 }
[ "androidx.annotation.Nullable", "androidx.core.view.accessibility.AccessibilityNodeInfoCompat", "com.google.android.accessibility.talkback.imagecaption.ScreenshotCaptureRequest", "com.google.android.accessibility.utils.caption.ImageNode", "com.google.android.libraries.accessibility.utils.log.LogUtils" ]
import androidx.annotation.Nullable; import androidx.core.view.accessibility.AccessibilityNodeInfoCompat; import com.google.android.accessibility.talkback.imagecaption.ScreenshotCaptureRequest; import com.google.android.accessibility.utils.caption.ImageNode; import com.google.android.libraries.accessibility.utils.log.L...
import androidx.annotation.*; import androidx.core.view.accessibility.*; import com.google.android.accessibility.talkback.imagecaption.*; import com.google.android.accessibility.utils.caption.*; import com.google.android.libraries.accessibility.utils.log.*;
[ "androidx.annotation", "androidx.core", "com.google.android" ]
androidx.annotation; androidx.core; com.google.android;
1,597,777
public Observable<ServiceResponse<IssuerBundle>> deleteCertificateIssuerWithServiceResponseAsync(String vaultBaseUrl, String issuerName) { if (vaultBaseUrl == null) { throw new IllegalArgumentException("Parameter vaultBaseUrl is required and cannot be null."); } if (issuerName ==...
Observable<ServiceResponse<IssuerBundle>> function(String vaultBaseUrl, String issuerName) { if (vaultBaseUrl == null) { throw new IllegalArgumentException(STR); } if (issuerName == null) { throw new IllegalArgumentException(STR); } if (this.apiVersion() == null) { throw new IllegalArgumentException(STR); }
/** * Deletes the specified certificate issuer. * The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from the vault. This operation requires the certificates/manageissuers/deleteissuers permission. * * @param vaultBaseUrl The vault name, for example https://my...
Deletes the specified certificate issuer. The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from the vault. This operation requires the certificates/manageissuers/deleteissuers permission
deleteCertificateIssuerWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java", "license": "mit", "size": 884227 }
[ "com.microsoft.azure.keyvault.models.IssuerBundle", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.keyvault.models.IssuerBundle; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,553,108
public whp_site_danger_list[] findBysite_id_PrevAndNext( long whp_site_danger_list_id, long site_id, OrderByComparator orderByComparator) throws NoSuch_site_danger_listException, SystemException { whp_site_danger_list whp_site_danger_list = findByPrimaryKey(whp_site_danger_list_id); Session session = null...
whp_site_danger_list[] function( long whp_site_danger_list_id, long site_id, OrderByComparator orderByComparator) throws NoSuch_site_danger_listException, SystemException { whp_site_danger_list whp_site_danger_list = findByPrimaryKey(whp_site_danger_list_id); Session session = null; try { session = openSession(); whp_s...
/** * Returns the whp_site_danger_lists before and after the current whp_site_danger_list in the ordered set where site_id = &#63;. * * @param whp_site_danger_list_id the primary key of the current whp_site_danger_list * @param site_id the site_id * @param orderByComparator the comparator to order the set by ...
Returns the whp_site_danger_lists before and after the current whp_site_danger_list in the ordered set where site_id = &#63;
findBysite_id_PrevAndNext
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/persistence/whp_site_danger_listPersistenceImpl.java", "license": "gpl-2.0", "size": 59667 }
[ "com.liferay.portal.kernel.dao.orm.Session", "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.util.OrderByComparator" ]
import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*;
[ "com.liferay.portal" ]
com.liferay.portal;
633,250
public List<FeedbackResponseAttributes> getFeedbackResponsesFromStudentOrTeamForQuestion( FeedbackQuestionAttributes question, StudentAttributes student) { if (question.giverType == FeedbackParticipantType.TEAMS) { return getFeedbackResponsesFromTeamForQuestion( q...
List<FeedbackResponseAttributes> function( FeedbackQuestionAttributes question, StudentAttributes student) { if (question.giverType == FeedbackParticipantType.TEAMS) { return getFeedbackResponsesFromTeamForQuestion( question.getId(), question.courseId, student.team, null); } return frDb.getFeedbackResponsesFromGiverFor...
/** * Get existing feedback responses from student or his team for the given * question. */
Get existing feedback responses from student or his team for the given question
getFeedbackResponsesFromStudentOrTeamForQuestion
{ "repo_name": "amarlearning/teammates", "path": "src/main/java/teammates/logic/core/FeedbackResponsesLogic.java", "license": "gpl-2.0", "size": 27647 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
802,613
return new ArrayList<>(list); }
return new ArrayList<>(list); }
/** * This function is used for iterating from a jsp with a getter that modifies a property such as calling sort. * You should use this to wrap the call to the getter in the for loop. */
This function is used for iterating from a jsp with a getter that modifies a property such as calling sort. You should use this to wrap the call to the getter in the for loop
copy
{ "repo_name": "kuali/kc", "path": "coeus-impl/src/main/java/org/kuali/coeus/sys/framework/view/JstlFunctions.java", "license": "agpl-3.0", "size": 9824 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,370,976
FeatureMap getAnyAttribute();
FeatureMap getAnyAttribute();
/** * Returns the value of the '<em><b>Any Attribute</b></em>' attribute list. * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Any Attribute</em>' attribute list isn't clear, * there really should be more of a ...
Returns the value of the 'Any Attribute' attribute list. The list contents are of type <code>org.eclipse.emf.ecore.util.FeatureMap.Entry</code>. If the meaning of the 'Any Attribute' attribute list isn't clear, there really should be more of a description here...
getAnyAttribute
{ "repo_name": "dzonekl/LiquibaseEditor", "path": "plugins/org.liquidbase.model/src/org/liquibase/xml/ns/dbchangelog/ChangeSetType.java", "license": "mit", "size": 64498 }
[ "org.eclipse.emf.ecore.util.FeatureMap" ]
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,136,469
public static Scheduler getMasterScheduler() { return masterScheduler; }
static Scheduler function() { return masterScheduler; }
/** * Retrieves the current master scheduler. This scheduler is always used by the main * {@link android.os.Looper Looper}, and if the global scheduler option is set it is also used for * the background scheduler and for all other {@link android.os.Looper Looper}s * @return The current master scheduler. ...
Retrieves the current master scheduler. This scheduler is always used by the main <code>android.os.Looper Looper</code>, and if the global scheduler option is set it is also used for the background scheduler and for all other <code>android.os.Looper Looper</code>s
getMasterScheduler
{ "repo_name": "ocadotechnology/robolectric", "path": "shadows/framework/src/main/java/org/robolectric/RuntimeEnvironment.java", "license": "mit", "size": 5680 }
[ "org.robolectric.util.Scheduler" ]
import org.robolectric.util.Scheduler;
import org.robolectric.util.*;
[ "org.robolectric.util" ]
org.robolectric.util;
2,784,924
public static Authentication token(Supplier<String> tokenSupplier) { return new AuthenticationToken(tokenSupplier); }
static Authentication function(Supplier<String> tokenSupplier) { return new AuthenticationToken(tokenSupplier); }
/** * Create an authentication provider for token based authentication. * * @param tokenSupplier * a supplier of the client auth token */
Create an authentication provider for token based authentication
token
{ "repo_name": "ArvinDevel/incubator-pulsar", "path": "pulsar-client/src/main/java/org/apache/pulsar/client/api/AuthenticationFactory.java", "license": "apache-2.0", "size": 4890 }
[ "java.util.function.Supplier", "org.apache.pulsar.client.impl.auth.AuthenticationToken" ]
import java.util.function.Supplier; import org.apache.pulsar.client.impl.auth.AuthenticationToken;
import java.util.function.*; import org.apache.pulsar.client.impl.auth.*;
[ "java.util", "org.apache.pulsar" ]
java.util; org.apache.pulsar;
908,411
private SapEccResourceDatasetTypeProperties innerTypeProperties() { return this.innerTypeProperties; }
SapEccResourceDatasetTypeProperties function() { return this.innerTypeProperties; }
/** * Get the innerTypeProperties property: SAP ECC OData resource dataset properties. * * @return the innerTypeProperties value. */
Get the innerTypeProperties property: SAP ECC OData resource dataset properties
innerTypeProperties
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/SapEccResourceDataset.java", "license": "mit", "size": 4188 }
[ "com.azure.resourcemanager.datafactory.fluent.models.SapEccResourceDatasetTypeProperties" ]
import com.azure.resourcemanager.datafactory.fluent.models.SapEccResourceDatasetTypeProperties;
import com.azure.resourcemanager.datafactory.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
826,657
public static List<String> getEssentialClaims(String essentialClaims, String claimType) { JSONObject jsonObjectClaims = new JSONObject(essentialClaims); List<String> essentialClaimsList = new ArrayList<>(); if (jsonObjectClaims.toString().contains(claimType)) { JSONObject newJSO...
static List<String> function(String essentialClaims, String claimType) { JSONObject jsonObjectClaims = new JSONObject(essentialClaims); List<String> essentialClaimsList = new ArrayList<>(); if (jsonObjectClaims.toString().contains(claimType)) { JSONObject newJSON = jsonObjectClaims.getJSONObject(claimType); if (newJSON...
/** * Returns essential claims according to claim type: id_token/userinfo . * * @param essentialClaims * @param claimType * @return essential claims list */
Returns essential claims according to claim type: id_token/userinfo
getEssentialClaims
{ "repo_name": "darshanasbg/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/OAuth2Util.java", "license": "apache-2.0", "size": 193919 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.json.JSONObject", "org.wso2.carbon.identity.oauth.common.OAuthConstants" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.json.JSONObject; import org.wso2.carbon.identity.oauth.common.OAuthConstants;
import java.util.*; import org.json.*; import org.wso2.carbon.identity.oauth.common.*;
[ "java.util", "org.json", "org.wso2.carbon" ]
java.util; org.json; org.wso2.carbon;
2,718,023
@Deprecated Collection<String> listMetaAttributes();
Collection<String> listMetaAttributes();
/** * This method is deprecated. Please use {@link Query#getMetaAttributes()} instead. * * @return a collection with all the meta attribute keys associated with this Query. * @deprecated */
This method is deprecated. Please use <code>Query#getMetaAttributes()</code> instead
listMetaAttributes
{ "repo_name": "mswiderski/droolsjbpm-knowledge", "path": "knowledge-api/src/main/java/org/drools/definition/rule/Query.java", "license": "apache-2.0", "size": 2303 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
413,128
public String getDefaultAppearance() { return getCOSObject().getString(COSName.DA); }
String function() { return getCOSObject().getString(COSName.DA); }
/** * Get the default appearance. * * @return a string describing the default appearance. */
Get the default appearance
getDefaultAppearance
{ "repo_name": "kalaspuffar/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationFreeText.java", "license": "apache-2.0", "size": 10373 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
1,389,206
public void close(long timeout, TimeUnit unit);
void function(long timeout, TimeUnit unit);
/** * Tries to close the producer cleanly within the specified timeout. If the close does not complete within the * timeout, fail any pending send requests and force close the producer. */
Tries to close the producer cleanly within the specified timeout. If the close does not complete within the timeout, fail any pending send requests and force close the producer
close
{ "repo_name": "ijuma/kafka", "path": "clients/src/main/java/org/apache/kafka/clients/producer/Producer.java", "license": "apache-2.0", "size": 2662 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,979,698
@Deprecated public final void onModule(ClusterModule module) {}
final void function(ClusterModule module) {}
/** * Old-style snapshot/restore extension point. {@code @Deprecated} and {@code final} to act as a signpost for plugin authors upgrading * from 2.x. * * @deprecated implement {@link RepositoryPlugin} instead */
Old-style snapshot/restore extension point. @Deprecated and final to act as a signpost for plugin authors upgrading from 2.x
onModule
{ "repo_name": "strapdata/elassandra", "path": "server/src/main/java/org/elasticsearch/plugins/Plugin.java", "license": "apache-2.0", "size": 14570 }
[ "org.elasticsearch.cluster.ClusterModule" ]
import org.elasticsearch.cluster.ClusterModule;
import org.elasticsearch.cluster.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
2,454,487
@ApiMethod(name = "getProfile", path = "profile", httpMethod = HttpMethod.GET) public Profile getProfile(final User user) throws UnauthorizedException { if (user == null) { throw new UnauthorizedException("Authorization required"); } // TODO // load the Profile Entit...
@ApiMethod(name = STR, path = STR, httpMethod = HttpMethod.GET) Profile function(final User user) throws UnauthorizedException { if (user == null) { throw new UnauthorizedException(STR); } String userId = user.getUserId(); Key key = Key.create(Profile.class, userId); Profile profile = (Profile) ofy().load().key(key).no...
/** * Returns a Profile object associated with the given user object. The cloud * endpoints system automatically inject the User object. * * @param user * A User object injected by the cloud endpoints. * @return Profile object. * @throws UnauthorizedException * ...
Returns a Profile object associated with the given user object. The cloud endpoints system automatically inject the User object
getProfile
{ "repo_name": "pytlyk/pr6", "path": "src/main/java/com/google/devrel/training/conference/spi/ConferenceApi.java", "license": "apache-2.0", "size": 21979 }
[ "com.google.api.server.spi.config.ApiMethod", "com.google.api.server.spi.response.UnauthorizedException", "com.google.appengine.api.users.User", "com.google.devrel.training.conference.domain.Profile", "com.google.devrel.training.conference.service.OfyService", "com.googlecode.objectify.Key" ]
import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.response.UnauthorizedException; import com.google.appengine.api.users.User; import com.google.devrel.training.conference.domain.Profile; import com.google.devrel.training.conference.service.OfyService; import com.googlecode.objectify.Ke...
import com.google.api.server.spi.config.*; import com.google.api.server.spi.response.*; import com.google.appengine.api.users.*; import com.google.devrel.training.conference.domain.*; import com.google.devrel.training.conference.service.*; import com.googlecode.objectify.*;
[ "com.google.api", "com.google.appengine", "com.google.devrel", "com.googlecode.objectify" ]
com.google.api; com.google.appengine; com.google.devrel; com.googlecode.objectify;
1,982,715
@SuppressWarnings("unchecked") public static Class<Log> getLogClass(String name) { if (logClass == null) { try { final Object className = VarraProperties.getAppProperty(LOG_CLASS_FQ_NAME); if (ObjectUtils.isNotNull(className)) { logClass = (Class<Log>) Class.forName(className.toString())...
@SuppressWarnings(STR) static Class<Log> function(String name) { if (logClass == null) { try { final Object className = VarraProperties.getAppProperty(LOG_CLASS_FQ_NAME); if (ObjectUtils.isNotNull(className)) { logClass = (Class<Log>) Class.forName(className.toString()); } else if (isFirstTime()) { System.err.println(S...
/** * Gets the log class. * * @param name * the name * @return the logClass */
Gets the log class
getLogClass
{ "repo_name": "varra4u/utils4j", "path": "src/main/java/com/varra/log/LogManager.java", "license": "apache-2.0", "size": 4379 }
[ "com.varra.props.VarraProperties", "com.varra.util.ObjectUtils" ]
import com.varra.props.VarraProperties; import com.varra.util.ObjectUtils;
import com.varra.props.*; import com.varra.util.*;
[ "com.varra.props", "com.varra.util" ]
com.varra.props; com.varra.util;
1,561,958
public synchronized void addBean(Object obj) { LOG.debug("addBean {}",obj); try { if (obj == null || _beans.containsKey(obj)) return; Object mbean = ObjectMBean.mbeanFor(obj); if (mbean == null) return; Obj...
synchronized void function(Object obj) { LOG.debug(STR,obj); try { if (obj == null _beans.containsKey(obj)) return; Object mbean = ObjectMBean.mbeanFor(obj); if (mbean == null) return; ObjectName oname = null; if (mbean instanceof ObjectMBean) { ((ObjectMBean)mbean).setMBeanContainer(this); oname = ((ObjectMBean)mbean)...
/** * Implementation of Container.Listener interface * * @see org.eclipse.jetty.util.component.Container.Listener#addBean(java.lang.Object) */
Implementation of Container.Listener interface
addBean
{ "repo_name": "thomasbecker/jetty-spdy", "path": "jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java", "license": "apache-2.0", "size": 11143 }
[ "javax.management.ObjectName" ]
import javax.management.ObjectName;
import javax.management.*;
[ "javax.management" ]
javax.management;
129,983
public Iterator<?> iterator();
Iterator<?> function();
/** * Gets an iterator over the entries in the database. * * @return An iterator over the database. */
Gets an iterator over the entries in the database
iterator
{ "repo_name": "0nirvana0/grib2reader", "path": "src/ucar/units/PrefixDB.java", "license": "apache-2.0", "size": 4363 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,623,271
public void setRangeWithMargins(Range range, boolean turnOffAutoRange, boolean notify) { ParamChecks.nullNotPermitted(range, "range"); setRange(Range.expand(range, getLowerMargin(), getUpperMargin()), turnOffAutoRange, notify); }
void function(Range range, boolean turnOffAutoRange, boolean notify) { ParamChecks.nullNotPermitted(range, "range"); setRange(Range.expand(range, getLowerMargin(), getUpperMargin()), turnOffAutoRange, notify); }
/** * Sets the range for the axis after first adding the current margins to * the range and, if requested, sends an {@link AxisChangeEvent} to all * registered listeners. As a side-effect, the auto-range flag is set to * <code>false</code> (optional). * * @param range the range (ex...
Sets the range for the axis after first adding the current margins to the range and, if requested, sends an <code>AxisChangeEvent</code> to all registered listeners. As a side-effect, the auto-range flag is set to <code>false</code> (optional)
setRangeWithMargins
{ "repo_name": "sebkur/JFreeChart", "path": "src/main/java/org/jfree/chart/axis/ValueAxis.java", "license": "lgpl-3.0", "size": 62910 }
[ "org.jfree.chart.util.ParamChecks", "org.jfree.data.Range" ]
import org.jfree.chart.util.ParamChecks; import org.jfree.data.Range;
import org.jfree.chart.util.*; import org.jfree.data.*;
[ "org.jfree.chart", "org.jfree.data" ]
org.jfree.chart; org.jfree.data;
570,934
protected ServerThread getServerThread() throws IOException { synchronized (this) { if (this.serverThread == null) { ByteChannel channel = this.serverConnection.open(this.longPollTimeout); this.serverThread = new ServerThread(channel); this.serverThread.start(); } return this.serverThread; }...
ServerThread function() throws IOException { synchronized (this) { if (this.serverThread == null) { ByteChannel channel = this.serverConnection.open(this.longPollTimeout); this.serverThread = new ServerThread(channel); this.serverThread.start(); } return this.serverThread; } }
/** * Returns the active server thread, creating and starting it if necessary. * @return the {@code ServerThread} (never {@code null}) * @throws IOException in case of I/O errors */
Returns the active server thread, creating and starting it if necessary
getServerThread
{ "repo_name": "forestqqqq/spring-boot", "path": "spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/server/HttpTunnelServer.java", "license": "apache-2.0", "size": 14332 }
[ "java.io.IOException", "java.nio.channels.ByteChannel" ]
import java.io.IOException; import java.nio.channels.ByteChannel;
import java.io.*; import java.nio.channels.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,055,226
public List<FeedMapping> insertFeedMappings(List<FeedMapping> feedMappings) throws RemoteException { return delegateLocator.getFeedMappingDelegate().insert(feedMappings); }
List<FeedMapping> function(List<FeedMapping> feedMappings) throws RemoteException { return delegateLocator.getFeedMappingDelegate().insert(feedMappings); }
/** * Inserts the FeedMapping into the ExtendedManagedCustomer's ManagedCustomer. * * @param feedMappings the FeedMappings to insert * @return the updated FeedMapping * @throws RemoteException for communication-related exceptions */
Inserts the FeedMapping into the ExtendedManagedCustomer's ManagedCustomer
insertFeedMappings
{ "repo_name": "andyj24/googleads-java-lib", "path": "modules/adwords_axis_utility_extension/src/main/java/com/google/api/ads/adwords/axis/utility/extension/ExtendedManagedCustomer.java", "license": "apache-2.0", "size": 39892 }
[ "com.google.api.ads.adwords.axis.v201506.cm.FeedMapping", "java.rmi.RemoteException", "java.util.List" ]
import com.google.api.ads.adwords.axis.v201506.cm.FeedMapping; import java.rmi.RemoteException; import java.util.List;
import com.google.api.ads.adwords.axis.v201506.cm.*; import java.rmi.*; import java.util.*;
[ "com.google.api", "java.rmi", "java.util" ]
com.google.api; java.rmi; java.util;
2,758,807
protected List<Pair<VM, VmDevice>> getVmsWithVmDeviceInfoForDiskId() { if (cachedVmsDeviceInfo == null) { cachedVmsDeviceInfo = getVmDao().getVmsWithPlugInfo(getImage().getId()); } return cachedVmsDeviceInfo; }
List<Pair<VM, VmDevice>> function() { if (cachedVmsDeviceInfo == null) { cachedVmsDeviceInfo = getVmDao().getVmsWithPlugInfo(getImage().getId()); } return cachedVmsDeviceInfo; }
/** * Cache method to retrieve all the VMs with the device info related to the image */
Cache method to retrieve all the VMs with the device info related to the image
getVmsWithVmDeviceInfoForDiskId
{ "repo_name": "yingyun001/ovirt-engine", "path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java", "license": "apache-2.0", "size": 22410 }
[ "java.util.List", "org.ovirt.engine.core.common.businessentities.VmDevice", "org.ovirt.engine.core.common.utils.Pair" ]
import java.util.List; import org.ovirt.engine.core.common.businessentities.VmDevice; import org.ovirt.engine.core.common.utils.Pair;
import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.common.utils.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
1,353,419
public static IOFileFilter ageFileFilter(Date cutoffDate, boolean acceptOlder) { return new AgeFileFilter(cutoffDate, acceptOlder); }
static IOFileFilter function(Date cutoffDate, boolean acceptOlder) { return new AgeFileFilter(cutoffDate, acceptOlder); }
/** * Returns a filter that filters files based on a cutoff date. * * @param cutoffDate the time threshold * @param acceptOlder if true, older files get accepted, if false, newer * @return an appropriately configured age file filter * @see AgeFileFilter * @since Commons IO 1.2 ...
Returns a filter that filters files based on a cutoff date
ageFileFilter
{ "repo_name": "sebastiansemmle/acio", "path": "src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java", "license": "apache-2.0", "size": 28777 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,439,408
void cleanUser(String user) throws AccumuloSecurityException;
void cleanUser(String user) throws AccumuloSecurityException;
/** * Deletes a user */
Deletes a user
cleanUser
{ "repo_name": "joshelser/accumulo", "path": "server/base/src/main/java/org/apache/accumulo/server/security/handler/PermissionHandler.java", "license": "apache-2.0", "size": 5634 }
[ "org.apache.accumulo.core.client.AccumuloSecurityException" ]
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.*;
[ "org.apache.accumulo" ]
org.apache.accumulo;
313,960
public void setDisplayNameOrNull(String displayName) throws IOException { setDisplayName(displayName); }
void function(String displayName) throws IOException { setDisplayName(displayName); }
/** * This method exists so that the Job configuration pages can use * getDisplayNameOrNull so that nothing is shown in the display name text * box if the display name is not set. * @param displayName * @throws IOException */
This method exists so that the Job configuration pages can use getDisplayNameOrNull so that nothing is shown in the display name text box if the display name is not set
setDisplayNameOrNull
{ "repo_name": "bkmeneguello/jenkins", "path": "core/src/main/java/hudson/model/AbstractItem.java", "license": "mit", "size": 38901 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,519,250
@LogMessage(level = Level.ERROR) @Message(id = 24, value = "Could not read target definition!") void cannotReadTargetDefinition(@Cause Throwable cause); // // @LogMessage(level = Level.ERROR) // @Message(id = 25, value = "Could not transform") // void cannotTransform(@Cause Throwable cause); /...
@LogMessage(level = Level.ERROR) @Message(id = 24, value = STR) void cannotReadTargetDefinition(@Cause Throwable cause);
/** * Logs an error message indicating the target definition could not be read. * * @param cause the cause of the error. */
Logs an error message indicating the target definition could not be read
cannotReadTargetDefinition
{ "repo_name": "aloubyansky/wildfly-core", "path": "controller/src/main/java/org/jboss/as/controller/logging/ControllerLogger.java", "license": "lgpl-2.1", "size": 164970 }
[ "org.jboss.logging.Logger", "org.jboss.logging.annotations.Cause", "org.jboss.logging.annotations.LogMessage", "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.Logger; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.LogMessage; import org.jboss.logging.annotations.Message;
import org.jboss.logging.*; import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
79,041
public void setPropertyContent(Node topLevelNode, String propertyName, String content) { if(getDocBuilder() != null && getDocument() != null) { NodeList properties = getDocument().getElementsByTagName("Property"); for(int i=0; i<properties.getLength(); i++) { if(properties.item(i).getParentNode().get...
void function(Node topLevelNode, String propertyName, String content) { if(getDocBuilder() != null && getDocument() != null) { NodeList properties = getDocument().getElementsByTagName(STR); for(int i=0; i<properties.getLength(); i++) { if(properties.item(i).getParentNode().getParentNode() == topLevelNode) { if(properti...
/** * Set the content of a property. Note that a file should be open before calling this function * * @param propertyName * @param content */
Set the content of a property. Note that a file should be open before calling this function
setPropertyContent
{ "repo_name": "sherzig/SyMo", "path": "src/edu/gatech/mbse/plugins/mdmc/controller/ModelCenterFileManipulator.java", "license": "mit", "size": 16323 }
[ "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
872,050
protected ThreadState findLargestNonPendingWriter( DocumentsWriterFlushControl control, ThreadState perThreadState) { assert perThreadState.dwpt.getNumDocsInRAM() > 0; long maxRamSoFar = perThreadState.bytesUsed; // the dwpt which needs to be flushed eventually ThreadState maxRamUsingThreadState...
ThreadState function( DocumentsWriterFlushControl control, ThreadState perThreadState) { assert perThreadState.dwpt.getNumDocsInRAM() > 0; long maxRamSoFar = perThreadState.bytesUsed; ThreadState maxRamUsingThreadState = perThreadState; assert !perThreadState.flushPending : STR; Iterator<ThreadState> activePerThreadsIt...
/** * Returns the current most RAM consuming non-pending {@link ThreadState} with * at least one indexed document. * <p> * This method will never return <code>null</code> */
Returns the current most RAM consuming non-pending <code>ThreadState</code> with at least one indexed document. This method will never return <code>null</code>
findLargestNonPendingWriter
{ "repo_name": "yintaoxue/read-open-source-code", "path": "solr-4.7.2/src/org/apache/lucene/index/FlushPolicy.java", "license": "apache-2.0", "size": 5734 }
[ "java.util.Iterator", "org.apache.lucene.index.DocumentsWriterPerThreadPool" ]
import java.util.Iterator; import org.apache.lucene.index.DocumentsWriterPerThreadPool;
import java.util.*; import org.apache.lucene.index.*;
[ "java.util", "org.apache.lucene" ]
java.util; org.apache.lucene;
2,745,475
ChildStatsResponse getChildernStats(ChildStatsRequest request);
ChildStatsResponse getChildernStats(ChildStatsRequest request);
/** * Get the statistics about the given parentID and types. * * @param request * @return */
Get the statistics about the given parentID and types
getChildernStats
{ "repo_name": "zimingd/Synapse-Repository-Services", "path": "lib/models/src/main/java/org/sagebionetworks/repo/model/NodeDAO.java", "license": "apache-2.0", "size": 20217 }
[ "org.sagebionetworks.repo.model.file.ChildStatsRequest", "org.sagebionetworks.repo.model.file.ChildStatsResponse" ]
import org.sagebionetworks.repo.model.file.ChildStatsRequest; import org.sagebionetworks.repo.model.file.ChildStatsResponse;
import org.sagebionetworks.repo.model.file.*;
[ "org.sagebionetworks.repo" ]
org.sagebionetworks.repo;
1,595,307
private void addPeerAndWait(final String peerId, final ReplicationPeerConfig peerConfig, final boolean waitForSource) throws Exception { final ReplicationPeers rp = manager.getReplicationPeers(); rp.getPeerStorage().addPeer(peerId, peerConfig, true, SyncReplicationState.NONE); try { manager.ad...
void function(final String peerId, final ReplicationPeerConfig peerConfig, final boolean waitForSource) throws Exception { final ReplicationPeers rp = manager.getReplicationPeers(); rp.getPeerStorage().addPeer(peerId, peerConfig, true, SyncReplicationState.NONE); try { manager.addPeer(peerId); } catch (Exception e) { }...
/** * Add a peer and wait for it to initialize * @param waitForSource Whether to wait for replication source to initialize */
Add a peer and wait for it to initialize
addPeerAndWait
{ "repo_name": "francisliu/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSourceManager.java", "license": "apache-2.0", "size": 34807 }
[ "org.apache.hadoop.hbase.replication.ReplicationPeerConfig", "org.apache.hadoop.hbase.replication.ReplicationPeers", "org.apache.hadoop.hbase.replication.SyncReplicationState" ]
import org.apache.hadoop.hbase.replication.ReplicationPeerConfig; import org.apache.hadoop.hbase.replication.ReplicationPeers; import org.apache.hadoop.hbase.replication.SyncReplicationState;
import org.apache.hadoop.hbase.replication.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,218,975
public void setStartDate (Timestamp StartDate) { set_Value (COLUMNNAME_StartDate, StartDate); }
void function (Timestamp StartDate) { set_Value (COLUMNNAME_StartDate, StartDate); }
/** Set Start Date. @param StartDate First effective day (inclusive) */
Set Start Date
setStartDate
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/X_R_RequestAction.java", "license": "gpl-2.0", "size": 27521 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,678,803
@Override public void exitExpr400(@NotNull ErlangParser.Expr400Context ctx) { }
@Override public void exitExpr400(@NotNull ErlangParser.Expr400Context ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterExpr400
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/ErlangBaseListener.java", "license": "gpl-3.0", "size": 35359 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
559,255