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
Observable<UserAccessList> listAsync(UUID appId);
Observable<UserAccessList> listAsync(UUID appId);
/** * Gets the list of user emails that have permissions to access your application. * * @param appId The application ID. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the UserAccessList object */
Gets the list of user emails that have permissions to access your application
listAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/Permissions.java", "license": "mit", "size": 11885 }
[ "com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UserAccessList" ]
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UserAccessList;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,382,406
//Initilize variables to negilable values InputStream is = null; JSONObject jObj = null; String json = ""; // Making HTTP request try { // defaultHttpClient DefaultHttpClient httpClient = new DefaultHttpClient(); //Post the question to the url //Gets the answer from the url //...
InputStream is = null; JSONObject jObj = null; String json = STRiso-8859-1STR\nSTRBuffer ErrorSTRError converting result STRJSON ParserSTRError parsing data " + e.toString()); } return jObj; }
/** * The Singular method in the class * it gets a json object from a url * @author Ross Hoyer * @param URL * THe url at where the object resides */
The Singular method in the class it gets a json object from a url
getJSONFromUrl
{ "repo_name": "SDSMT-CSC/CS492-FA13", "path": "FinalPresentations/LocalizationAccessibility/src/edu/sdsmt/mobile/rosshoyer/weatherapp/util/JSONReader.java", "license": "unlicense", "size": 2585 }
[ "java.io.InputStream", "org.json.JSONObject" ]
import java.io.InputStream; import org.json.JSONObject;
import java.io.*; import org.json.*;
[ "java.io", "org.json" ]
java.io; org.json;
1,954,414
public void addWord(String word, IToken token) { Assert.isNotNull(word); Assert.isNotNull(token); fWords.put(word, token); }
void function(String word, IToken token) { Assert.isNotNull(word); Assert.isNotNull(token); fWords.put(word, token); }
/** * Adds a word and the token to be returned if it is detected. * * @param word the word this rule will search for, may not be <code>null</code> * @param token the token to be returned if the word has been found, may not be <code>null</code> */
Adds a word and the token to be returned if it is detected
addWord
{ "repo_name": "akurtakov/Pydev", "path": "plugins/org.python.pydev/src/org/python/pydev/editor/PyWordRule.java", "license": "epl-1.0", "size": 6494 }
[ "org.eclipse.core.runtime.Assert", "org.python.pydev.shared_core.partitioner.IToken" ]
import org.eclipse.core.runtime.Assert; import org.python.pydev.shared_core.partitioner.IToken;
import org.eclipse.core.runtime.*; import org.python.pydev.shared_core.partitioner.*;
[ "org.eclipse.core", "org.python.pydev" ]
org.eclipse.core; org.python.pydev;
2,897,774
public void endElement(QName element, Augmentations augs) throws XNIException { } // endElement(QName)
void function(QName element, Augmentations augs) throws XNIException { }
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @throws XNIException Thrown by handler to signal an error. */
The end of an element
endElement
{ "repo_name": "AaronZhangL/SplitCharater", "path": "xerces-2_11_0/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java", "license": "gpl-2.0", "size": 31977 }
[ "org.apache.xerces.xni.Augmentations", "org.apache.xerces.xni.QName", "org.apache.xerces.xni.XNIException" ]
import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.QName; import org.apache.xerces.xni.XNIException;
import org.apache.xerces.xni.*;
[ "org.apache.xerces" ]
org.apache.xerces;
1,225,602
public static ims.medical.domain.objects.MskSpineExamFinding extractMskSpineExamFinding(ims.domain.ILightweightDomainFactory domainFactory, ims.generalmedical.vo.MskSpineExamFindingVo valueObject) { return extractMskSpineExamFinding(domainFactory, valueObject, new HashMap()); }
static ims.medical.domain.objects.MskSpineExamFinding function(ims.domain.ILightweightDomainFactory domainFactory, ims.generalmedical.vo.MskSpineExamFindingVo valueObject) { return extractMskSpineExamFinding(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractMskSpineExamFinding
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/generalmedical/vo/domain/MskSpineExamFindingVoAssembler.java", "license": "agpl-3.0", "size": 20200 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,245,925
private static boolean isSimplePreferences(Context context) { return ALWAYS_SIMPLE_PREFS || Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB || !isXLargeTablet(context); } /** * {@inheritDoc}
static boolean function(Context context) { return ALWAYS_SIMPLE_PREFS Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB !isXLargeTablet(context); } /** * {@inheritDoc}
/** * Determines whether the simplified settings UI should be shown. This is * true if this is forced via {@link #ALWAYS_SIMPLE_PREFS}, or the device * doesn't have newer APIs like {@link PreferenceFragment}, or the device * doesn't have an extra-large screen. In these cases, a single-pane * "s...
Determines whether the simplified settings UI should be shown. This is true if this is forced via <code>#ALWAYS_SIMPLE_PREFS</code>, or the device doesn't have newer APIs like <code>PreferenceFragment</code>, or the device doesn't have an extra-large screen. In these cases, a single-pane "simplified" settings UI should...
isSimplePreferences
{ "repo_name": "dudeofawesome/BikeBuds", "path": "Android/BikeBuds/app/src/main/java/com/dudeofawesome/bikebuds/SettingsActivity.java", "license": "gpl-2.0", "size": 10730 }
[ "android.content.Context", "android.os.Build" ]
import android.content.Context; import android.os.Build;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
2,521,003
public Map<ValidationUtils.State, List<ValidationTaskResult>> getResult() { return mResult; }
Map<ValidationUtils.State, List<ValidationTaskResult>> function() { return mResult; }
/** * Get Validation Result. * * @return validation result */
Get Validation Result
getResult
{ "repo_name": "bf8086/alluxio", "path": "core/common/src/main/java/alluxio/cli/ValidationResults.java", "license": "apache-2.0", "size": 1126 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,299,010
void blueTextChanged(String text) throws DOMException;
void blueTextChanged(String text) throws DOMException;
/** * Called when the blue value text has changed. */
Called when the blue value text has changed
blueTextChanged
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/css/dom/CSSOMValue.java", "license": "apache-2.0", "size": 46308 }
[ "org.w3c.dom.DOMException" ]
import org.w3c.dom.DOMException;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
271,651
private static ReduceSinkOperator createReduceSink(Operator<?> parentOp, NullOrdering nullOrder) throws SemanticException { List<ExprNodeDesc> valueCols = new ArrayList<>(); RowSchema parentSchema = parentOp.getSchema(); List<String> outColNames = new ArrayList<>(); for (int i = 0; i < parentSch...
static ReduceSinkOperator function(Operator<?> parentOp, NullOrdering nullOrder) throws SemanticException { List<ExprNodeDesc> valueCols = new ArrayList<>(); RowSchema parentSchema = parentOp.getSchema(); List<String> outColNames = new ArrayList<>(); for (int i = 0; i < parentSchema.getSignature().size(); i++) { Column...
/** * Creates a reduce sink operator that emits all columns of the parent as values. */
Creates a reduce sink operator that emits all columns of the parent as values
createReduceSink
{ "repo_name": "sankarh/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/SemiJoinReductionMerge.java", "license": "apache-2.0", "size": 23599 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.apache.hadoop.hive.ql.exec.ColumnInfo", "org.apache.hadoop.hive.ql.exec.Operator", "org.apache.hadoop.hive.ql.exec.OperatorFactory", "org.apache.hadoop.hive.ql.exec.ReduceSinkOperator", "org.apache.hadoop.hive.ql.exec.RowSchema", ...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.hadoop.hive.ql.exec.ColumnInfo; import org.apache.hadoop.hive.ql.exec.Operator; import org.apache.hadoop.hive.ql.exec.OperatorFactory; import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator; import org.apache.hadoop.hiv...
import java.util.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.io.*; import org.apache.hadoop.hive.ql.parse.*; import org.apache.hadoop.hive.ql.plan.*; import org.apache.hadoop.hive.ql.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
882,718
public static int getIntAttribute(HttpServletRequest request, String name, int defaultNum) { String temp = (String) request.getAttribute(name); if (temp != null && !temp.equals("")) { int num = defaultNum; try { num = Integer.parseInt(temp); } catch (Exception ignored) { } return num; } else...
static int function(HttpServletRequest request, String name, int defaultNum) { String temp = (String) request.getAttribute(name); if (temp != null && !temp.equals("")) { int num = defaultNum; try { num = Integer.parseInt(temp); } catch (Exception ignored) { } return num; } else { return defaultNum; } }
/** * Gets an attribute as a int. * * @param request * The HttpServletRequest object, known as "request" in a JSP * page. * @param name * The name of the attribute you want to get * @return The int value of the attribute or the default value if the * attribute...
Gets an attribute as a int
getIntAttribute
{ "repo_name": "lhebj/weather", "path": "src/com/weather/util/ParamUtils.java", "license": "gpl-3.0", "size": 11287 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
439,302
public void setParameterService(ParameterService parameterService) { this.parameterService = parameterService; }
void function(ParameterService parameterService) { this.parameterService = parameterService; }
/** * Sets the ParameterService. * @param parameterService the parameter service. */
Sets the ParameterService
setParameterService
{ "repo_name": "rashikpolus/MIT_KC", "path": "coeus-impl/src/main/java/org/kuali/coeus/common/budget/impl/distribution/BudgetDistributionServiceImpl.java", "license": "agpl-3.0", "size": 8182 }
[ "org.kuali.rice.coreservice.framework.parameter.ParameterService" ]
import org.kuali.rice.coreservice.framework.parameter.ParameterService;
import org.kuali.rice.coreservice.framework.parameter.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,231,915
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<ProductsGetResponse> getWithResponseAsync( String resourceGroupName, String serviceName, String productId) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentEx...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<ProductsGetResponse> function( String resourceGroupName, String serviceName, String productId) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentExc...
/** * Gets the details of the product specified by its identifier. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param productId Product identifier. Must be unique in the current API Management service instance. ...
Gets the details of the product specified by its identifier
getWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/ProductsClientImpl.java", "license": "mit", "size": 97306 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.apimanagement.models.ProductsGetResponse" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.apimanagement.models.ProductsGetResponse;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.apimanagement.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,319,747
public V getVar(String name) { for (AbstractScope<S, V> scope = thisScope(); scope != null; scope = scope.getParent()) { @Nullable V var = scope.getOwnSlot(name); if (var != null) { return var; } } return null; }
V function(String name) { for (AbstractScope<S, V> scope = thisScope(); scope != null; scope = scope.getParent()) { @Nullable V var = scope.getOwnSlot(name); if (var != null) { return var; } } return null; }
/** * Returns the variable, may be null * * <p>Non-final for {@link TypedScope} which needs to handle qualified names. */
Returns the variable, may be null Non-final for <code>TypedScope</code> which needs to handle qualified names
getVar
{ "repo_name": "Yannic/closure-compiler", "path": "src/com/google/javascript/jscomp/AbstractScope.java", "license": "apache-2.0", "size": 16565 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,790,381
public Camera get(String id) { return (Camera) this.cameras.get(id); }
Camera function(String id) { return (Camera) this.cameras.get(id); }
/** * Returns camera with that id * * @param id Camera id * @return Camera with that id */
Returns camera with that id
get
{ "repo_name": "Col-E/LastTry", "path": "core/src/org/egordorichev/lasttry/entity/engine/system/systems/CameraSystem.java", "license": "mit", "size": 4501 }
[ "org.egordorichev.lasttry.entity.entities.camera.Camera" ]
import org.egordorichev.lasttry.entity.entities.camera.Camera;
import org.egordorichev.lasttry.entity.entities.camera.*;
[ "org.egordorichev.lasttry" ]
org.egordorichev.lasttry;
2,344,569
public String convertToXml(String yamlstring) throws ConverterException;
String function(String yamlstring) throws ConverterException;
/** * Converts Tosca YAML to Tosca XML. * * @param yamlstring A Tosca YAML in a String * @return A Tosca XML in a String * @throws ConverterException */
Converts Tosca YAML to Tosca XML
convertToXml
{ "repo_name": "CloudCycle2/YAML_Transformer", "path": "org.opentosca.yamlconverter.main/src/main/java/org/opentosca/yamlconverter/main/interfaces/IToscaYaml2XmlConverter.java", "license": "apache-2.0", "size": 823 }
[ "org.opentosca.yamlconverter.main.exceptions.ConverterException" ]
import org.opentosca.yamlconverter.main.exceptions.ConverterException;
import org.opentosca.yamlconverter.main.exceptions.*;
[ "org.opentosca.yamlconverter" ]
org.opentosca.yamlconverter;
2,767,159
@Override public void info(final Object message) { log(Level.INFO, message); }
void function(final Object message) { log(Level.INFO, message); }
/** * Logs a message object with the INFO level. * * @param message the message object to log. */
Logs a message object with the INFO level
info
{ "repo_name": "apache/commons-jcs", "path": "commons-jcs-core/src/main/java/org/apache/commons/jcs3/log/JulLogAdapter.java", "license": "apache-2.0", "size": 16168 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
177,943
protected long getRandomBaseLoadAddress() { // nativeGetRandomBaseLoadAddress() returns an address at which it has previously // successfully mapped an area larger than the largest library we expect to load, // on the basis that we will be able, with high probability, to map our library ...
long function() { final long address = nativeGetRandomBaseLoadAddress(); if (DEBUG) { Log.i(TAG, String.format(Locale.US, STR, address)); } return address; }
/** * Obtain a random base load address at which to place loaded libraries. * * @return new base load address */
Obtain a random base load address at which to place loaded libraries
getRandomBaseLoadAddress
{ "repo_name": "Passw/gn_GFW", "path": "base/android/java/src/org/chromium/base/library_loader/Linker.java", "license": "gpl-3.0", "size": 32397 }
[ "java.util.Locale", "org.chromium.base.Log" ]
import java.util.Locale; import org.chromium.base.Log;
import java.util.*; import org.chromium.base.*;
[ "java.util", "org.chromium.base" ]
java.util; org.chromium.base;
1,239,254
public synchronized void compile( Map replacements, boolean scalar) throws QueryException, MappingException { if ( !compiled ) { this.tokenReplacements = replacements; this.shallowQuery = scalar; compile(); } }
synchronized void function( Map replacements, boolean scalar) throws QueryException, MappingException { if ( !compiled ) { this.tokenReplacements = replacements; this.shallowQuery = scalar; compile(); } }
/** * Compile a "normal" query. This method may be called multiple * times. Subsequent invocations are no-ops. */
Compile a "normal" query. This method may be called multiple times. Subsequent invocations are no-ops
compile
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/QueryTranslatorImpl.java", "license": "lgpl-2.1", "size": 36123 }
[ "java.util.Map", "org.hibernate.MappingException", "org.hibernate.QueryException" ]
import java.util.Map; import org.hibernate.MappingException; import org.hibernate.QueryException;
import java.util.*; import org.hibernate.*;
[ "java.util", "org.hibernate" ]
java.util; org.hibernate;
2,668,405
BehaviorBuilder b = newBehaviorBuilder( snapshotState.orElse(new FrameworkVotingState(ImmutableList.of()))); b.setCommandHandler(FrameworkVotingCommand.AddFrameworkVote.class, (cmd, ctx) -> // In response to this command, we want to first persist it as a Framew...
BehaviorBuilder b = newBehaviorBuilder( snapshotState.orElse(new FrameworkVotingState(ImmutableList.of()))); b.setCommandHandler(FrameworkVotingCommand.AddFrameworkVote.class, (cmd, ctx) -> ctx.thenPersist(new FrameworkVotedEvent.FrameworkVotedAddition(entityId(), cmd.score, cmd.comment), evt -> ctx.reply(Done.getInsta...
/** * An entity can define different behaviours for different states, but it will * always start with an initial behaviour. This entity only has one behaviour. */
An entity can define different behaviours for different states, but it will always start with an initial behaviour. This entity only has one behaviour
initialBehavior
{ "repo_name": "mdonkers/lagom-cqrs-es-demo", "path": "framework-voter/framework-voter-impl/src/main/java/nl/codecentric/lagom/voter/impl/FrameworkVotingEntity.java", "license": "mit", "size": 2980 }
[ "com.google.common.collect.ImmutableList", "java.util.List" ]
import com.google.common.collect.ImmutableList; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,503,688
public ScienceAppManagerPersistence getScienceAppManagerPersistence() { return scienceAppManagerPersistence; }
ScienceAppManagerPersistence function() { return scienceAppManagerPersistence; }
/** * Returns the science app manager persistence. * * @return the science app manager persistence */
Returns the science app manager persistence
getScienceAppManagerPersistence
{ "repo_name": "queza85/edison", "path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/src/org/kisti/edison/science/service/base/AppTestHistoryLocalServiceBaseImpl.java", "license": "gpl-3.0", "size": 53177 }
[ "org.kisti.edison.science.service.persistence.ScienceAppManagerPersistence" ]
import org.kisti.edison.science.service.persistence.ScienceAppManagerPersistence;
import org.kisti.edison.science.service.persistence.*;
[ "org.kisti.edison" ]
org.kisti.edison;
948,818
public GlobalHeader getGlobalHeader() { return globalHeader; }
GlobalHeader function() { return globalHeader; }
/** * Gets the global header. * * * @return the global header */
Gets the global header
getGlobalHeader
{ "repo_name": "JonZeolla/metron", "path": "metron-platform/metron-pcap/src/main/java/org/apache/metron/pcap/PcapByteInputStream.java", "license": "apache-2.0", "size": 6020 }
[ "org.krakenapps.pcap.file.GlobalHeader" ]
import org.krakenapps.pcap.file.GlobalHeader;
import org.krakenapps.pcap.file.*;
[ "org.krakenapps.pcap" ]
org.krakenapps.pcap;
1,891,581
protected String setConfigAdminInitialConfiguration(Properties props) { return null; }
String function(Properties props) { return null; }
/** * Override this method as an alternative to {@link #loadConfigAdminConfigurationFile()} if there's a need * to set initial ConfigAdmin configuration without using files. * * @param props always non-null. Tests may initialize ConfigAdmin configuration by returning PID. * @return persistence-...
Override this method as an alternative to <code>#loadConfigAdminConfigurationFile()</code> if there's a need to set initial ConfigAdmin configuration without using files
setConfigAdminInitialConfiguration
{ "repo_name": "jonmcewen/camel", "path": "components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java", "license": "apache-2.0", "size": 23086 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
351,415
@RequestMapping(value = "/admin/projects/create", method = RequestMethod.GET) public String create(Model model) { model.addAttribute("form", new ProjectCreateBean()); return "projects/admin/create"; }
@RequestMapping(value = STR, method = RequestMethod.GET) String function(Model model) { model.addAttribute("form", new ProjectCreateBean()); return STR; }
/** * Prepare form create a new project. * * @param model spring model * @return view name */
Prepare form create a new project
create
{ "repo_name": "abachar/collab", "path": "src/main/java/fr/abachar/collab/web/projects/ProjectController.java", "license": "mit", "size": 6847 }
[ "fr.abachar.collab.web.projects.beans.ProjectCreateBean", "org.springframework.ui.Model", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod" ]
import fr.abachar.collab.web.projects.beans.ProjectCreateBean; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod;
import fr.abachar.collab.web.projects.beans.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*;
[ "fr.abachar.collab", "org.springframework.ui", "org.springframework.web" ]
fr.abachar.collab; org.springframework.ui; org.springframework.web;
1,757,083
public static DataResult<ErrataOverview> relevantErrata(User user, Long sid) { SelectMode m = ModeFactory.getMode("Errata_queries", "relevant_to_system"); Map<String, Object> params = new HashMap<String, Object>(); params.put("user_id", user.getId()); params.put("sid", sid); ...
static DataResult<ErrataOverview> function(User user, Long sid) { SelectMode m = ModeFactory.getMode(STR, STR); Map<String, Object> params = new HashMap<String, Object>(); params.put(STR, user.getId()); params.put("sid", sid); Map<String, Object> elabParams = new HashMap<String, Object>(); elabParams.put("sid", sid); e...
/** * Returns a list of errata relevant to a system * @param user The user * @param sid System Id * @return a list of ErrataOverviews */
Returns a list of errata relevant to a system
relevantErrata
{ "repo_name": "mcalmer/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/system/SystemManager.java", "license": "gpl-2.0", "size": 134651 }
[ "com.redhat.rhn.common.db.datasource.DataResult", "com.redhat.rhn.common.db.datasource.ModeFactory", "com.redhat.rhn.common.db.datasource.SelectMode", "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.dto.ErrataOverview", "java.util.HashMap", "java.util.Map" ]
import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.dto.ErrataOverview; import java.util.HashMap; import java.util.Map;
import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.dto.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
1,043,616
public static RunfilesSupplier of(RunfilesSupplier supplier1, RunfilesSupplier supplier2) { return fromSuppliers(ImmutableList.of(supplier1, supplier2)); } private CompositeRunfilesSupplier(ImmutableList<RunfilesSupplier> suppliers) { this.suppliers = suppliers; }
static RunfilesSupplier function(RunfilesSupplier supplier1, RunfilesSupplier supplier2) { return fromSuppliers(ImmutableList.of(supplier1, supplier2)); } private CompositeRunfilesSupplier(ImmutableList<RunfilesSupplier> suppliers) { this.suppliers = suppliers; }
/** * Convenience method for creating a composite {@link RunfilesSupplier} from two other suppliers. */
Convenience method for creating a composite <code>RunfilesSupplier</code> from two other suppliers
of
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/actions/CompositeRunfilesSupplier.java", "license": "apache-2.0", "size": 4666 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
265,290
@Override protected void tearDown() throws Exception { super.tearDown(); validator = null; Locale.setDefault(origDefault); TimeZone.setDefault(defaultZone); }
void function() throws Exception { super.tearDown(); validator = null; Locale.setDefault(origDefault); TimeZone.setDefault(defaultZone); }
/** * Tear down * @throws Exception */
Tear down
tearDown
{ "repo_name": "apache/commons-validator", "path": "src/test/java/org/apache/commons/validator/routines/TimeValidatorTest.java", "license": "apache-2.0", "size": 14513 }
[ "java.util.Locale", "java.util.TimeZone" ]
import java.util.Locale; import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
406,762
public com.ionosenterprise.rest.domain.Server updateServer(String dataCenterId, String serverId, Object server) throws RestClientException, IOException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { return client.update(getResou...
com.ionosenterprise.rest.domain.Server function(String dataCenterId, String serverId, Object server) throws RestClientException, IOException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { return client.update(getResourcePathBuilder().withPathParams(dataCenterId).ap...
/** * Update the properties of a server within an existing data center. * * @param dataCenterId The unique ID of the data center * @param serverId The unique ID of the server * @param server object has the following properties: * <br> * ...
Update the properties of a server within an existing data center
updateServer
{ "repo_name": "profitbricks/profitbricks-sdk-java", "path": "src/main/java/com/ionosenterprise/sdk/ServerApi.java", "license": "apache-2.0", "size": 13748 }
[ "com.ionosenterprise.rest.client.RestClientException", "java.io.IOException", "java.lang.reflect.InvocationTargetException", "org.apache.http.HttpStatus" ]
import com.ionosenterprise.rest.client.RestClientException; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import org.apache.http.HttpStatus;
import com.ionosenterprise.rest.client.*; import java.io.*; import java.lang.reflect.*; import org.apache.http.*;
[ "com.ionosenterprise.rest", "java.io", "java.lang", "org.apache.http" ]
com.ionosenterprise.rest; java.io; java.lang; org.apache.http;
2,439,180
@Deprecated protected void addRoutes(RoutesBuilder routes) throws Exception { includeRoutes(routes); }
void function(RoutesBuilder routes) throws Exception { includeRoutes(routes); }
/** * Adds a collection of routes to this context * * @param routes the routes * @throws Exception if the routes could not be created for whatever reason * @deprecated use {@link #includeRoutes(org.apache.camel.RoutesBuilder) includeRoutes} instead. */
Adds a collection of routes to this context
addRoutes
{ "repo_name": "everttigchelaar/camel-svn", "path": "camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java", "license": "apache-2.0", "size": 14062 }
[ "org.apache.camel.RoutesBuilder" ]
import org.apache.camel.RoutesBuilder;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
431,244
private static String genCacheString(CacheMaxAge cma) { return (cma.private_cache() ? private_cache : "") + "max-age: " + cma.unit().toSeconds(cma.time()); }
static String function(CacheMaxAge cma) { return (cma.private_cache() ? private_cache : STRmax-age: " + cma.unit().toSeconds(cma.time()); }
/** * Compute cache-control string based on annotations. * * @param cma * @return */
Compute cache-control string based on annotations
genCacheString
{ "repo_name": "gdomingos/Wegas", "path": "wegas-core/src/main/java/com/wegas/core/rest/util/CacheFilterFactory.java", "license": "mit", "size": 2267 }
[ "com.wegas.core.rest.util.annotations.CacheMaxAge" ]
import com.wegas.core.rest.util.annotations.CacheMaxAge;
import com.wegas.core.rest.util.annotations.*;
[ "com.wegas.core" ]
com.wegas.core;
2,169,126
public Serializable getConsistentId() { return consistentId; }
Serializable function() { return consistentId; }
/** * Gets consistent globally unique node ID which survives node restarts. * * @return Node consistent ID. */
Gets consistent globally unique node ID which survives node restarts
getConsistentId
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java", "license": "apache-2.0", "size": 127983 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
924,874
public Builder setBackgroundColorRes(@ColorRes int backgroundColor) { return setBackgroundColor(resources.getColor(backgroundColor)); } /** * Sets the apps to be used for a share intent. This is not a public facing method.<p> * See {@link BottomSheet#createShareBot...
Builder function(@ColorRes int backgroundColor) { return setBackgroundColor(resources.getColor(backgroundColor)); } /** * Sets the apps to be used for a share intent. This is not a public facing method.<p> * See {@link BottomSheet#createShareBottomSheet(Context, Intent, String, boolean)} for creating a share intent {@l...
/** * Sets the color resource id of the background * * @param backgroundColor * @return */
Sets the color resource id of the background
setBackgroundColorRes
{ "repo_name": "bensonX/BottomSheet-1", "path": "library/src/main/java/com/kennyc/bottomsheet/BottomSheet.java", "license": "apache-2.0", "size": 31210 }
[ "android.content.Context", "android.content.Intent", "android.support.annotation.ColorRes" ]
import android.content.Context; import android.content.Intent; import android.support.annotation.ColorRes;
import android.content.*; import android.support.annotation.*;
[ "android.content", "android.support" ]
android.content; android.support;
1,079,855
private Ctx findContext( String text ) { // Are we inside a comment? Ctx ctx = new Ctx(); int n; for( n = text.length() - 1; n >= 0; n-- ) { char c = text.charAt( n ); if( isLineBreak( c )) break; if( c == '#' ) { ctx.kind = CtxKind.COMMENT; return ctx; } } // Simplify the sear...
Ctx function( String text ) { Ctx ctx = new Ctx(); int n; for( n = text.length() - 1; n >= 0; n-- ) { char c = text.charAt( n ); if( isLineBreak( c )) break; if( c == '#' ) { ctx.kind = CtxKind.COMMENT; return ctx; } } text = TextUtils.removeComments( text ); int before = -1; int after = -2; while( before != after ) { ...
/** * Finds the context from the given text. * @param text * @return a context */
Finds the context from the given text
findContext
{ "repo_name": "diarraa/roboconf-platform", "path": "miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/GraphsCompletionProposer.java", "license": "apache-2.0", "size": 10577 }
[ "net.roboconf.tooling.core.TextUtils" ]
import net.roboconf.tooling.core.TextUtils;
import net.roboconf.tooling.core.*;
[ "net.roboconf.tooling" ]
net.roboconf.tooling;
2,823,613
public static void writeCompactBlockArray( Block[] blocks, DataOutputStream out) throws IOException { WritableUtils.writeVInt(out, blocks.length); Block prev = null; for (Block b : blocks) { long szDelta = b.getNumBytes() - (prev != null ? prev.getNumBytes() : 0); long gsDelta ...
static void function( Block[] blocks, DataOutputStream out) throws IOException { WritableUtils.writeVInt(out, blocks.length); Block prev = null; for (Block b : blocks) { long szDelta = b.getNumBytes() - (prev != null ? prev.getNumBytes() : 0); long gsDelta = b.getGenerationStamp() - (prev != null ? prev.getGenerationSt...
/** * Write an array of blocks as compactly as possible. This uses * delta-encoding for the generation stamp and size, following * the principle that genstamp increases relatively slowly, * and size is equal for all but the last block of a file. */
Write an array of blocks as compactly as possible. This uses delta-encoding for the generation stamp and size, following the principle that genstamp increases relatively slowly, and size is equal for all but the last block of a file
writeCompactBlockArray
{ "repo_name": "apurtell/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageSerialization.java", "license": "apache-2.0", "size": 27164 }
[ "java.io.DataOutputStream", "java.io.IOException", "org.apache.hadoop.hdfs.protocol.Block", "org.apache.hadoop.io.WritableUtils" ]
import java.io.DataOutputStream; import java.io.IOException; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.io.WritableUtils;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.io.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,541,487
protected Collection getParentGroupsLegacy() { try { return this.getListOfAllGroupsContaining(this.getID()); } catch (SQLException e) { throw new IDORuntimeException(e, this); } }
Collection function() { try { return this.getListOfAllGroupsContaining(this.getID()); } catch (SQLException e) { throw new IDORuntimeException(e, this); } }
/** * Gets the groups that are direct parents of this group * The old implementation. Uses IC_GROUP_TREE to find parent groups. **/
Gets the groups that are direct parents of this group The old implementation. Uses IC_GROUP_TREE to find parent groups
getParentGroupsLegacy
{ "repo_name": "idega/com.idega.core", "path": "src/java/com/idega/core/data/GenericGroupBMPBean.java", "license": "gpl-3.0", "size": 16037 }
[ "com.idega.data.IDORuntimeException", "java.sql.SQLException", "java.util.Collection" ]
import com.idega.data.IDORuntimeException; import java.sql.SQLException; import java.util.Collection;
import com.idega.data.*; import java.sql.*; import java.util.*;
[ "com.idega.data", "java.sql", "java.util" ]
com.idega.data; java.sql; java.util;
968,094
public InetAddress getInitiatorAddress() { return initAddr; }
InetAddress function() { return initAddr; }
/** * Returns the initiator's address for this channel binding. * <code>null</code> is returned if the address has not been set. * * @return The initiator's address, or <code>null</code>. */
Returns the initiator's address for this channel binding. <code>null</code> is returned if the address has not been set
getInitiatorAddress
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/org/ietf/jgss/ChannelBinding.java", "license": "gpl-2.0", "size": 8310 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
2,683,410
public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { try { // The CompareResponse Tag buffer.put( LdapConstants.COMPARE_RESPONSE_TAG ); buffer.put( TLV.getBytes( getCompareResponseLength() ) ); // The LdapResult ...
ByteBuffer function( ByteBuffer buffer ) throws EncoderException { try { buffer.put( LdapConstants.COMPARE_RESPONSE_TAG ); buffer.put( TLV.getBytes( getCompareResponseLength() ) ); ( ( LdapResultDecorator ) getLdapResult() ).encode( buffer ); } catch ( BufferOverflowException boe ) { throw new EncoderException( I18n.er...
/** * Encode the CompareResponse message to a PDU. * * @param buffer The buffer where to put the PDU */
Encode the CompareResponse message to a PDU
encode
{ "repo_name": "darranl/directory-shared", "path": "ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/CompareResponseDecorator.java", "license": "apache-2.0", "size": 4108 }
[ "java.nio.BufferOverflowException", "java.nio.ByteBuffer", "org.apache.directory.api.asn1.EncoderException", "org.apache.directory.api.asn1.ber.tlv.TLV", "org.apache.directory.api.i18n.I18n", "org.apache.directory.api.ldap.codec.api.LdapConstants" ]
import java.nio.BufferOverflowException; import java.nio.ByteBuffer; import org.apache.directory.api.asn1.EncoderException; import org.apache.directory.api.asn1.ber.tlv.TLV; import org.apache.directory.api.i18n.I18n; import org.apache.directory.api.ldap.codec.api.LdapConstants;
import java.nio.*; import org.apache.directory.api.asn1.*; import org.apache.directory.api.asn1.ber.tlv.*; import org.apache.directory.api.i18n.*; import org.apache.directory.api.ldap.codec.api.*;
[ "java.nio", "org.apache.directory" ]
java.nio; org.apache.directory;
784,469
public Long getCount(InstitutionalCollection collection);
Long function(InstitutionalCollection collection);
/** * Get a count of all sponsors in the specified collection * THIS INCLUDES sponsor names in child collections * * @param institutional collection - parent collection * @return count of sponsors found */
Get a count of all sponsors in the specified collection THIS INCLUDES sponsor names in child collections
getCount
{ "repo_name": "nate-rcl/irplus", "path": "ir_core/src/edu/ur/ir/item/SponsorService.java", "license": "apache-2.0", "size": 7716 }
[ "edu.ur.ir.institution.InstitutionalCollection" ]
import edu.ur.ir.institution.InstitutionalCollection;
import edu.ur.ir.institution.*;
[ "edu.ur.ir" ]
edu.ur.ir;
2,555,789
@Bean(destroyMethod = "close") public DataSource dataSource() { BasicDataSource retVal = new BasicDataSource(); retVal.setDriver(new org.apache.derby.jdbc.EmbeddedDriver()); retVal.setUrl("jdbc:derby:directory:target/jpaserver_derby_files;create=true"); retVal.setUsername(""); retVal.setPassword(""); re...
@Bean(destroyMethod = "close") DataSource function() { BasicDataSource retVal = new BasicDataSource(); retVal.setDriver(new org.apache.derby.jdbc.EmbeddedDriver()); retVal.setUrl(STR); retVal.setUsername(STR"); return retVal; }
/** * The following bean configures the database connection. The 'url' property value of "jdbc:derby:directory:jpaserver_derby_files;create=true" indicates that the server should save resources in a * directory called "jpaserver_derby_files". * * A URL to a remote database could also be placed here, along with...
The following bean configures the database connection. The 'url' property value of "jdbc:derby:directory:jpaserver_derby_files;create=true" indicates that the server should save resources in a directory called "jpaserver_derby_files". A URL to a remote database could also be placed here, along with login credentials an...
dataSource
{ "repo_name": "eug48/hapi-fhir", "path": "hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfigDstu2.java", "license": "apache-2.0", "size": 5423 }
[ "javax.sql.DataSource", "org.apache.commons.dbcp2.BasicDataSource", "org.springframework.context.annotation.Bean" ]
import javax.sql.DataSource; import org.apache.commons.dbcp2.BasicDataSource; import org.springframework.context.annotation.Bean;
import javax.sql.*; import org.apache.commons.dbcp2.*; import org.springframework.context.annotation.*;
[ "javax.sql", "org.apache.commons", "org.springframework.context" ]
javax.sql; org.apache.commons; org.springframework.context;
581,123
public static void main(String[] args) { try { // Create a ping producer overriding its defaults with all options passed on the command line. Properties options = CommandLineParser.processCommandLine(args, new CommandLineParser(new String[][] {}), System.getProperties());...
static void function(String[] args) { try { Properties options = CommandLineParser.processCommandLine(args, new CommandLineParser(new String[][] {}), System.getProperties()); PingSendOnlyClient pingProducer = new PingSendOnlyClient(options); Runtime.getRuntime().addShutdownHook(pingProducer.getShutdownHook()); pingProd...
/** * Starts the ping/wait/receive process. * * @param args The command line arguments. */
Starts the ping/wait/receive process
main
{ "repo_name": "hastef88/andes", "path": "modules/andes-core/perftests/src/main/java/org/wso2/andes/client/ping/PingSendOnlyClient.java", "license": "apache-2.0", "size": 3141 }
[ "java.util.Properties", "org.wso2.andes.util.CommandLineParser" ]
import java.util.Properties; import org.wso2.andes.util.CommandLineParser;
import java.util.*; import org.wso2.andes.util.*;
[ "java.util", "org.wso2.andes" ]
java.util; org.wso2.andes;
236,112
@TargetApi(VERSION_CODES.LOLLIPOP) public static void unReveal(final View view, int cx, int cy) { if (!hasLollipop()) { view.setVisibility(View.GONE); return; } //Get the initial radius for the clipping circle int initialRadius = view.getWidth(); //Create the animation (the final radius is zero) ...
@TargetApi(VERSION_CODES.LOLLIPOP) static void function(final View view, int cx, int cy) { if (!hasLollipop()) { view.setVisibility(View.GONE); return; } int initialRadius = view.getWidth(); Animator animator = ViewAnimationUtils.createCircularReveal(view, cx, cy, initialRadius, 0);
/** * Create the un-reveal effect animation * @param view the View to hide * @param cx coordinate X * @param cy coordinate Y */
Create the un-reveal effect animation
unReveal
{ "repo_name": "mkodekar/FlexibleAdapter", "path": "flexibleAdapter/src/main/java/eu/davidea/utils/Utils.java", "license": "apache-2.0", "size": 5891 }
[ "android.animation.Animator", "android.annotation.TargetApi", "android.view.View", "android.view.ViewAnimationUtils" ]
import android.animation.Animator; import android.annotation.TargetApi; import android.view.View; import android.view.ViewAnimationUtils;
import android.animation.*; import android.annotation.*; import android.view.*;
[ "android.animation", "android.annotation", "android.view" ]
android.animation; android.annotation; android.view;
1,069,338
public void removeUpdate(DocumentEvent e) { if (dialogType == COMMENT_TYPE) { String text = commentArea.getText(); sendButton.setEnabled(text != null && text.trim().length() > 0); } } public void changedUpdate(DocumentEvent e) {}
void function(DocumentEvent e) { if (dialogType == COMMENT_TYPE) { String text = commentArea.getText(); sendButton.setEnabled(text != null && text.trim().length() > 0); } } public void changedUpdate(DocumentEvent e) {}
/** * Sets the enabled flag of the {@link #sendButton} depending on the * type of dialog we handle. * @see DocumentListener#removeUpdate(DocumentEvent) */
Sets the enabled flag of the <code>#sendButton</code> depending on the type of dialog we handle
removeUpdate
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/MessengerDialog.java", "license": "gpl-2.0", "size": 25904 }
[ "javax.swing.event.DocumentEvent" ]
import javax.swing.event.DocumentEvent;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
927,919
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); }
KeyNamePair function() { return new KeyNamePair(get_ID(), getName()); }
/** Get Record ID/ColumnName @return ID/ColumnName pair */
Get Record ID/ColumnName
getKeyNamePair
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_C_ProjectType.java", "license": "gpl-2.0", "size": 5187 }
[ "org.compiere.util.KeyNamePair" ]
import org.compiere.util.KeyNamePair;
import org.compiere.util.*;
[ "org.compiere.util" ]
org.compiere.util;
653,946
public static boolean areAllPotionsAmbient(Collection<PotionEffect> potionEffects) { for (PotionEffect potioneffect : potionEffects) { if (!potioneffect.getIsAmbient()) { return false; } } return true; }
static boolean function(Collection<PotionEffect> potionEffects) { for (PotionEffect potioneffect : potionEffects) { if (!potioneffect.getIsAmbient()) { return false; } } return true; }
/** * Returns true if all of the potion effects in the specified collection are ambient. */
Returns true if all of the potion effects in the specified collection are ambient
areAllPotionsAmbient
{ "repo_name": "Severed-Infinity/technium", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/EntityLivingBase.java", "license": "gpl-3.0", "size": 111956 }
[ "java.util.Collection", "net.minecraft.potion.PotionEffect" ]
import java.util.Collection; import net.minecraft.potion.PotionEffect;
import java.util.*; import net.minecraft.potion.*;
[ "java.util", "net.minecraft.potion" ]
java.util; net.minecraft.potion;
2,508,534
public Map<String, Highlighter> getHighlighters() { return highlighters; }
Map<String, Highlighter> function() { return highlighters; }
/** * Returns the {@link Highlighter} registry */
Returns the <code>Highlighter</code> registry
getHighlighters
{ "repo_name": "Helen-Zhao/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/SearchModule.java", "license": "apache-2.0", "size": 54220 }
[ "java.util.Map", "org.elasticsearch.search.fetch.subphase.highlight.Highlighter" ]
import java.util.Map; import org.elasticsearch.search.fetch.subphase.highlight.Highlighter;
import java.util.*; import org.elasticsearch.search.fetch.subphase.highlight.*;
[ "java.util", "org.elasticsearch.search" ]
java.util; org.elasticsearch.search;
2,637,671
void unregister(final ObjectName name);
void unregister(final ObjectName name);
/** * Unregisters the MBean. * * @param name the object name of the MBean to be unregistered. */
Unregisters the MBean
unregister
{ "repo_name": "ribeirux/jalphanode", "path": "core/src/main/java/org/jalphanode/jmx/MBeanRegistry.java", "license": "apache-2.0", "size": 1453 }
[ "javax.management.ObjectName" ]
import javax.management.ObjectName;
import javax.management.*;
[ "javax.management" ]
javax.management;
2,692,883
public void run(Entity entity, Entity lock) { AttackInfo info = getAttackInfo(entity, lock); if (info == null || !start(entity, lock, info)) { return; } if (info.getAnimation() != null) { entity.getBlockQueue().animate(info.getAnimation()); } if (info.getStartGraphic() != null) { entity...
void function(Entity entity, Entity lock) { AttackInfo info = getAttackInfo(entity, lock); if (info == null !start(entity, lock, info)) { return; } if (info.getAnimation() != null) { entity.getBlockQueue().animate(info.getAnimation()); } if (info.getStartGraphic() != null) { entity.queueUpdateBlock(info.getStartGraphic...
/** * Runs the attack event. * @param entity The attacking entity. * @param lock The victim entity. */
Runs the attack event
run
{ "repo_name": "itsgreco/VirtueRS3", "path": "src/org/virtue/game/entity/combat/AttackEvent.java", "license": "mit", "size": 5852 }
[ "org.virtue.game.entity.Entity", "org.virtue.game.entity.combat.impl.ImpactInfo" ]
import org.virtue.game.entity.Entity; import org.virtue.game.entity.combat.impl.ImpactInfo;
import org.virtue.game.entity.*; import org.virtue.game.entity.combat.impl.*;
[ "org.virtue.game" ]
org.virtue.game;
778,563
@Test(expected=OperationNotSupportedException.class) public void testSendSMSAsyncFromRemoteDevices() throws TimeoutException, XBeeException { // Return that the XBee device is remote when asked. Mockito.when(cellularDevice.isRemote()).thenReturn(true); cellularDevice.sendSMSAsync(PHONE, DATA); }
@Test(expected=OperationNotSupportedException.class) void function() throws TimeoutException, XBeeException { Mockito.when(cellularDevice.isRemote()).thenReturn(true); cellularDevice.sendSMSAsync(PHONE, DATA); }
/** * Test method for {@link com.digi.xbee.api.CellularDevice#sendSMSAsync(String, String)}. * * <p>Verify that async. SMS cannot be sent if the sender is a remote XBee device.</p> * * @throws XBeeException * @throws TimeoutException */
Test method for <code>com.digi.xbee.api.CellularDevice#sendSMSAsync(String, String)</code>. Verify that async. SMS cannot be sent if the sender is a remote XBee device
testSendSMSAsyncFromRemoteDevices
{ "repo_name": "digidotcom/XBeeJavaLibrary", "path": "library/src/test/java/com/digi/xbee/api/SendSMSAsyncTest.java", "license": "mpl-2.0", "size": 7940 }
[ "com.digi.xbee.api.exceptions.OperationNotSupportedException", "com.digi.xbee.api.exceptions.TimeoutException", "com.digi.xbee.api.exceptions.XBeeException", "org.junit.Test", "org.mockito.Mockito" ]
import com.digi.xbee.api.exceptions.OperationNotSupportedException; import com.digi.xbee.api.exceptions.TimeoutException; import com.digi.xbee.api.exceptions.XBeeException; import org.junit.Test; import org.mockito.Mockito;
import com.digi.xbee.api.exceptions.*; import org.junit.*; import org.mockito.*;
[ "com.digi.xbee", "org.junit", "org.mockito" ]
com.digi.xbee; org.junit; org.mockito;
1,752,400
public List<GuidedAction> getActions() { return mActions; }
List<GuidedAction> function() { return mActions; }
/** * Returns the list of GuidedActions that the user may take in this fragment. * @return The list of GuidedActions for this fragment. */
Returns the list of GuidedActions that the user may take in this fragment
getActions
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "leanback/src/main/java/androidx/leanback/app/GuidedStepSupportFragment.java", "license": "apache-2.0", "size": 63727 }
[ "androidx.leanback.widget.GuidedAction", "java.util.List" ]
import androidx.leanback.widget.GuidedAction; import java.util.List;
import androidx.leanback.widget.*; import java.util.*;
[ "androidx.leanback", "java.util" ]
androidx.leanback; java.util;
1,576,567
List<VmDynamic> getAllRunningForVds(Guid vds);
List<VmDynamic> getAllRunningForVds(Guid vds);
/** * Retrieves all running dynamic VMs for the given VDS instance. * * @param vds * the VDS id * @return the list of dynamic vms */
Retrieves all running dynamic VMs for the given VDS instance
getAllRunningForVds
{ "repo_name": "OpenUniversity/ovirt-engine", "path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDynamicDao.java", "license": "apache-2.0", "size": 2470 }
[ "java.util.List", "org.ovirt.engine.core.common.businessentities.VmDynamic", "org.ovirt.engine.core.compat.Guid" ]
import java.util.List; import org.ovirt.engine.core.common.businessentities.VmDynamic; import org.ovirt.engine.core.compat.Guid;
import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
1,351,795
@Nullable public static EUBL23DocumentType getDocumentTypeOfNamespace (@Nullable final String sNamespace) { return s_aNamespace2DocType.get (sNamespace); }
static EUBL23DocumentType function (@Nullable final String sNamespace) { return s_aNamespace2DocType.get (sNamespace); }
/** * Get the document type matching the passed namespace. * * @param sNamespace * The namespace URI of any UBL 2.3 document type. May be * <code>null</code>. * @return <code>null</code> if no UBL 2.3 document type matching the * specified namespace URI exists. */
Get the document type matching the passed namespace
getDocumentTypeOfNamespace
{ "repo_name": "phax/ph-ubl", "path": "ph-ubl23/src/main/java/com/helger/ubl23/UBL23DocumentTypes.java", "license": "apache-2.0", "size": 7591 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
915,895
public static DERVisibleString getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERVisibleString) { return getInstance(o); } else { return new D...
static DERVisibleString function( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit o instanceof DERVisibleString) { return getInstance(o); } else { return new DERVisibleString(ASN1OctetString.getInstance(o).getOctets()); } } DERVisibleString( byte[] string) { this.string = strin...
/** * Return a Visible String from a tagged object. * * @param obj the tagged object holding the object we want * @param explicit true if the object is meant to be explicitly * tagged false otherwise. * @exception IllegalArgumentException if the tagged object cannot * ...
Return a Visible String from a tagged object
getInstance
{ "repo_name": "Skywalker-11/spongycastle", "path": "core/src/main/java/org/spongycastle/asn1/DERVisibleString.java", "license": "mit", "size": 3445 }
[ "org.spongycastle.util.Strings" ]
import org.spongycastle.util.Strings;
import org.spongycastle.util.*;
[ "org.spongycastle.util" ]
org.spongycastle.util;
1,338,142
public InterceptFromDefinition interceptFrom(String uri) { if (!getRouteCollection().getRoutes().isEmpty()) { throw new IllegalArgumentException("interceptFrom must be defined before any routes in the RouteBuilder"); } getRouteCollection().setCamelContext(getContext()); r...
InterceptFromDefinition function(String uri) { if (!getRouteCollection().getRoutes().isEmpty()) { throw new IllegalArgumentException(STR); } getRouteCollection().setCamelContext(getContext()); return getRouteCollection().interceptFrom(uri); }
/** * Adds a route for an interceptor that intercepts incoming messages on the given endpoint. * * @param uri endpoint uri * @return the builder */
Adds a route for an interceptor that intercepts incoming messages on the given endpoint
interceptFrom
{ "repo_name": "punkhorn/camel-upstream", "path": "core/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java", "license": "apache-2.0", "size": 19978 }
[ "org.apache.camel.model.InterceptFromDefinition" ]
import org.apache.camel.model.InterceptFromDefinition;
import org.apache.camel.model.*;
[ "org.apache.camel" ]
org.apache.camel;
1,711,547
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { if (applicationContext.containsBean(GrailsApplication.APPLICATION_ID)) { this.grailsApplication = applicationContext.getBean(GrailsApplication.APPLICATION_ID, GrailsApplication.class); } ...
void function(ApplicationContext applicationContext) throws BeansException { if (applicationContext.containsBean(GrailsApplication.APPLICATION_ID)) { this.grailsApplication = applicationContext.getBean(GrailsApplication.APPLICATION_ID, GrailsApplication.class); } }
/** * Sets the ResourceLoader from the ApplicationContext * * @param applicationContext The ApplicationContext * @throws BeansException Thrown when an error occurs with the ApplicationContext */
Sets the ResourceLoader from the ApplicationContext
setApplicationContext
{ "repo_name": "erdi/grails-core", "path": "grails-web/src/main/groovy/org/codehaus/groovy/grails/web/pages/GroovyPagesTemplateEngine.java", "license": "apache-2.0", "size": 33532 }
[ "org.codehaus.groovy.grails.commons.GrailsApplication", "org.springframework.beans.BeansException", "org.springframework.context.ApplicationContext" ]
import org.codehaus.groovy.grails.commons.GrailsApplication; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext;
import org.codehaus.groovy.grails.commons.*; import org.springframework.beans.*; import org.springframework.context.*;
[ "org.codehaus.groovy", "org.springframework.beans", "org.springframework.context" ]
org.codehaus.groovy; org.springframework.beans; org.springframework.context;
1,247,931
public Ping ping() throws IOException { Ping ping = new Ping(); int pingId; synchronized (this) { if (shutdown) { throw new IOException("shutdown"); } pingId = nextPingId; nextPingId += 2; if (pings == null) pings = new HashMap<>(); pings.put(pingId, ping); ...
Ping function() throws IOException { Ping ping = new Ping(); int pingId; synchronized (this) { if (shutdown) { throw new IOException(STR); } pingId = nextPingId; nextPingId += 2; if (pings == null) pings = new HashMap<>(); pings.put(pingId, ping); } writePing(false, pingId, 0x4f4b6f6b , ping); return ping; }
/** * Sends a ping frame to the peer. Use the returned object to await the ping's response and * observe its round trip time. */
Sends a ping frame to the peer. Use the returned object to await the ping's response and observe its round trip time
ping
{ "repo_name": "twonde/NUll_logging-interceptor_set-deadline_to_okio-", "path": "okhttp3/internal/framed/FramedConnection.java", "license": "apache-2.0", "size": 32971 }
[ "java.io.IOException", "java.util.HashMap" ]
import java.io.IOException; import java.util.HashMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
472,325
public static InputStream getUrlAsStream(URL url, String acceptValue) throws IOException { HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod(HttpMethod.GET); if (acceptValue != null && !acceptValue.trim().isEmpty()) { connection....
static InputStream function(URL url, String acceptValue) throws IOException { HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod(HttpMethod.GET); if (acceptValue != null && !acceptValue.trim().isEmpty()) { connection.setRequestProperty(HttpHeaders.ACCEPT, acceptValue); ...
/** * Get the resource at the specified URL as an InputStream * * @param url - resource location * @param acceptValue - Request property for 'Accept' header */
Get the resource at the specified URL as an InputStream
getUrlAsStream
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/io.openliberty.microprofile.openapi.2.0.internal/src/io/openliberty/microprofile/openapi20/internal/utils/CloudUtils.java", "license": "epl-1.0", "size": 3652 }
[ "com.ibm.websphere.ras.Tr", "java.io.IOException", "java.io.InputStream", "java.net.HttpURLConnection", "javax.ws.rs.HttpMethod", "javax.ws.rs.core.HttpHeaders" ]
import com.ibm.websphere.ras.Tr; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import javax.ws.rs.HttpMethod; import javax.ws.rs.core.HttpHeaders;
import com.ibm.websphere.ras.*; import java.io.*; import java.net.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "com.ibm.websphere", "java.io", "java.net", "javax.ws" ]
com.ibm.websphere; java.io; java.net; javax.ws;
1,380,959
public void deletePropertyDefinition(CmsDbContext dbc, String name) throws CmsException { CmsPropertyDefinition propertyDefinition = null; try { // first read and then delete the metadefinition. propertyDefinition = readPropertyDefinition(dbc, name); getVfsDrive...
void function(CmsDbContext dbc, String name) throws CmsException { CmsPropertyDefinition propertyDefinition = null; try { propertyDefinition = readPropertyDefinition(dbc, name); getVfsDriver(dbc).deletePropertyDefinition(dbc, propertyDefinition); getHistoryDriver(dbc).deletePropertyDefinition(dbc, propertyDefinition); ...
/** * Deletes a property definition.<p> * * @param dbc the current database context * @param name the name of the property definition to delete * * @throws CmsException if something goes wrong */
Deletes a property definition
deletePropertyDefinition
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/db/CmsDriverManager.java", "license": "lgpl-2.1", "size": 494693 }
[ "java.util.Collections", "org.opencms.file.CmsPropertyDefinition", "org.opencms.main.CmsEvent", "org.opencms.main.CmsException", "org.opencms.main.OpenCms" ]
import java.util.Collections; import org.opencms.file.CmsPropertyDefinition; import org.opencms.main.CmsEvent; import org.opencms.main.CmsException; import org.opencms.main.OpenCms;
import java.util.*; import org.opencms.file.*; import org.opencms.main.*;
[ "java.util", "org.opencms.file", "org.opencms.main" ]
java.util; org.opencms.file; org.opencms.main;
2,877,345
protected List<InetAddress> getInetAddrs(DhcpLink clientLink, byte[] duid, byte iatype, long iaid, List<InetAddress> requestAddrs, DhcpMessage requestMsg) { List<InetAddress> inetAddrs = new ArrayList<InetAddress>(); if ((requestAddrs != null) && !requestAddrs.isEmpty() ) { for (InetAddress reqAddr : r...
List<InetAddress> function(DhcpLink clientLink, byte[] duid, byte iatype, long iaid, List<InetAddress> requestAddrs, DhcpMessage requestMsg) { List<InetAddress> inetAddrs = new ArrayList<InetAddress>(); if ((requestAddrs != null) && !requestAddrs.isEmpty() ) { for (InetAddress reqAddr : requestAddrs) { if (!reqAddr.equ...
/** * Get list of IP addresses for the given client IA request. * * @param clientLink the link for the client request message * @param duid the DUID of the client * @param iatype the IA type of the client request * @param iaid the IAID of the client request * @param requestAddrs the list of requested IP ...
Get list of IP addresses for the given client IA request
getInetAddrs
{ "repo_name": "jagornet/dhcp", "path": "Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/request/binding/BaseBindingManager.java", "license": "gpl-3.0", "size": 36999 }
[ "com.jagornet.dhcp.core.message.DhcpMessage", "com.jagornet.dhcp.core.util.DhcpConstants", "com.jagornet.dhcp.server.config.DhcpLink", "com.jagornet.dhcp.server.db.IdentityAssoc", "java.net.InetAddress", "java.util.ArrayList", "java.util.List" ]
import com.jagornet.dhcp.core.message.DhcpMessage; import com.jagornet.dhcp.core.util.DhcpConstants; import com.jagornet.dhcp.server.config.DhcpLink; import com.jagornet.dhcp.server.db.IdentityAssoc; import java.net.InetAddress; import java.util.ArrayList; import java.util.List;
import com.jagornet.dhcp.core.message.*; import com.jagornet.dhcp.core.util.*; import com.jagornet.dhcp.server.config.*; import com.jagornet.dhcp.server.db.*; import java.net.*; import java.util.*;
[ "com.jagornet.dhcp", "java.net", "java.util" ]
com.jagornet.dhcp; java.net; java.util;
279,622
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<GeoRegionInner> listGeoRegions( SkuName sku, Boolean linuxWorkersEnabled, Boolean xenonWorkersEnabled, Boolean linuxDynamicWorkersEnabled, Context context);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<GeoRegionInner> listGeoRegions( SkuName sku, Boolean linuxWorkersEnabled, Boolean xenonWorkersEnabled, Boolean linuxDynamicWorkersEnabled, Context context);
/** * Description for Get a list of available geographical regions. * * @param sku Name of SKU used to filter the regions. * @param linuxWorkersEnabled Specify &lt;code&gt;true&lt;/code&gt; if you want to filter to only regions that * support Linux workers. * @param xenonWorkersEnabled...
Description for Get a list of available geographical regions
listGeoRegions
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java", "license": "mit", "size": 46577 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.appservice.fluent.models.GeoRegionInner", "com.azure.resourcemanager.appservice.models.SkuName" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.GeoRegionInner; import com.azure.resourcemanager.appservice.models.SkuName;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; import com.azure.resourcemanager.appservice.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,824,555
@Test public void checkNotifications() { // Create a BoundaryCondition and register a test listener with it. BoundaryCondition condition = new BoundaryCondition(); TestComponentListener listener = new TestComponentListener(); condition.register(listener); // Check that setting the type fires a notifi...
void function() { BoundaryCondition condition = new BoundaryCondition(); TestComponentListener listener = new TestComponentListener(); condition.register(listener); condition.setType(BoundaryConditionType.Flux); assertTrue(listener.wasNotified()); listener.reset(); ArrayList<Float> values = new ArrayList<Float>(); valu...
/** * <p> * This operation ensures that the BoundaryCondition properly notifies * registered listeners when its properties are set. * </p> * */
This operation ensures that the BoundaryCondition properly notifies registered listeners when its properties are set.
checkNotifications
{ "repo_name": "SmithRWORNL/ice", "path": "tests/org.eclipse.ice.datastructures.test/src/org/eclipse/ice/datastructures/test/BoundaryConditionTester.java", "license": "epl-1.0", "size": 11720 }
[ "java.util.ArrayList", "org.eclipse.ice.datastructures.form.mesh.BoundaryCondition", "org.eclipse.ice.datastructures.form.mesh.BoundaryConditionType", "org.junit.Assert" ]
import java.util.ArrayList; import org.eclipse.ice.datastructures.form.mesh.BoundaryCondition; import org.eclipse.ice.datastructures.form.mesh.BoundaryConditionType; import org.junit.Assert;
import java.util.*; import org.eclipse.ice.datastructures.form.mesh.*; import org.junit.*;
[ "java.util", "org.eclipse.ice", "org.junit" ]
java.util; org.eclipse.ice; org.junit;
2,851,694
public static String concat(String[] elements) { StringBuffer result = new StringBuffer(); int size = elements.length; if (DbConnectionFactory.isMySql()) { result.append("CONCAT("); for (int i = 0; i < size; i++) { result.append(elements[i]); ...
static String function(String[] elements) { StringBuffer result = new StringBuffer(); int size = elements.length; if (DbConnectionFactory.isMySql()) { result.append(STR); for (int i = 0; i < size; i++) { result.append(elements[i]); if (i + 1 < size) result.append(","); } result.append(")"); } else if (DbConnectionFacto...
/** * Returns the correct Concatenation SQL syntax for a particular RDBMS * * @param elements * @return result */
Returns the correct Concatenation SQL syntax for a particular RDBMS
concat
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/dotmarketing/common/db/DotConnect.java", "license": "gpl-3.0", "size": 43436 }
[ "com.dotmarketing.db.DbConnectionFactory" ]
import com.dotmarketing.db.DbConnectionFactory;
import com.dotmarketing.db.*;
[ "com.dotmarketing.db" ]
com.dotmarketing.db;
955,924
public boolean getJobResult(String jobId) throws Exception { // retry in case of intermittent failure m_result_png = null; m_result_xml = null; for (int i=0; i<4; i++) { try { if (isFirstJob()) { WsResultType[] types = get_proxy().getResultTypes(jobId); ...
boolean function(String jobId) throws Exception { m_result_png = null; m_result_xml = null; for (int i=0; i<4; i++) { try { if (isFirstJob()) { WsResultType[] types = get_proxy().getResultTypes(jobId); setHasPNG(false); setHasXML(false); setHasText(false); for (WsResultType t : types) { String id = t.getIdentifier(); i...
/** * Returns true if the result format of the hits is XML, false if its text * * @param jobId * @return * @throws Exception */
Returns true if the result format of the hits is XML, false if its text
getJobResult
{ "repo_name": "acas-zz/bioknime", "path": "WU-BLAST (EBI)/src/au/com/acpfg/misc/blast/wublast/WUBlastNodeModel.java", "license": "lgpl-3.0", "size": 35826 }
[ "java.io.IOException", "org.knime.core.data.DataType", "org.knime.core.data.image.png.PNGImageContent", "uk.ac.ebi.webservices.axis1.stubs.wublast.WsResultType" ]
import java.io.IOException; import org.knime.core.data.DataType; import org.knime.core.data.image.png.PNGImageContent; import uk.ac.ebi.webservices.axis1.stubs.wublast.WsResultType;
import java.io.*; import org.knime.core.data.*; import org.knime.core.data.image.png.*; import uk.ac.ebi.webservices.axis1.stubs.wublast.*;
[ "java.io", "org.knime.core", "uk.ac.ebi" ]
java.io; org.knime.core; uk.ac.ebi;
405,639
@Test public void testFindFirstWithEmptyPathMatchingType() { final ArrayElement element = new ArrayElement("foo", new BooleanElement("1", false)); final Element found = element.findFirst(Element.class); assertNotNull(found); assertSame(element, found); ...
void function() { final ArrayElement element = new ArrayElement("foo", new BooleanElement("1", false)); final Element found = element.findFirst(Element.class); assertNotNull(found); assertSame(element, found); final ArrayElement arrayFound = element.findFirst(ArrayElement.class); assertNotNull(arrayFound); assertSame(e...
/** * Test method for {@link ArrayElement#findFirst}. */
Test method for <code>ArrayElement#findFirst</code>
testFindFirstWithEmptyPathMatchingType
{ "repo_name": "allanbank/mongodb-async-driver", "path": "src/test/java/com/allanbank/mongodb/bson/element/ArrayElementTest.java", "license": "apache-2.0", "size": 21886 }
[ "com.allanbank.mongodb.bson.Element", "org.junit.Assert" ]
import com.allanbank.mongodb.bson.Element; import org.junit.Assert;
import com.allanbank.mongodb.bson.*; import org.junit.*;
[ "com.allanbank.mongodb", "org.junit" ]
com.allanbank.mongodb; org.junit;
1,876,379
protected void generateFile(File file) throws IOException, NabuccoGeneratorException { NabuccoFile nabuccoFile = new NabuccoFile(file); NabuccoGenerator generator = new NabuccoGenerator(nabuccoFile, NabuccoCompilerOptions.getDefaultOptions()); generator.generate(); }
void function(File file) throws IOException, NabuccoGeneratorException { NabuccoFile nabuccoFile = new NabuccoFile(file); NabuccoGenerator generator = new NabuccoGenerator(nabuccoFile, NabuccoCompilerOptions.getDefaultOptions()); generator.generate(); }
/** * Generates a single file. * * @param file * the file * * @throws IOException * @throws NabuccoGeneratorException */
Generates a single file
generateFile
{ "repo_name": "NABUCCO/org.nabucco.framework.generator", "path": "org.nabucco.framework.generator/src/test/org/nabucco/framework/generator/AbstractNabuccoGeneratorTest.java", "license": "epl-1.0", "size": 3149 }
[ "java.io.File", "java.io.IOException", "org.nabucco.framework.generator.compiler.NabuccoCompilerOptions", "org.nabucco.framework.generator.parser.file.NabuccoFile" ]
import java.io.File; import java.io.IOException; import org.nabucco.framework.generator.compiler.NabuccoCompilerOptions; import org.nabucco.framework.generator.parser.file.NabuccoFile;
import java.io.*; import org.nabucco.framework.generator.compiler.*; import org.nabucco.framework.generator.parser.file.*;
[ "java.io", "org.nabucco.framework" ]
java.io; org.nabucco.framework;
1,171,884
public ContinuousFunction getHEF7_h() { return this.hef7_h; }
ContinuousFunction function() { return this.hef7_h; }
/** * Sets the f1 function that is used in the HEF7 problem without specifying * the problem. * @return hef7_h ContinuousFunction used for the h function. */
Sets the f1 function that is used in the HEF7 problem without specifying the problem
getHEF7_h
{ "repo_name": "filinep/cilib", "path": "library/src/main/java/net/sourceforge/cilib/functions/continuous/dynamic/moo/hef7/HEF7_f2.java", "license": "gpl-3.0", "size": 3928 }
[ "net.sourceforge.cilib.functions.ContinuousFunction" ]
import net.sourceforge.cilib.functions.ContinuousFunction;
import net.sourceforge.cilib.functions.*;
[ "net.sourceforge.cilib" ]
net.sourceforge.cilib;
1,474,143
protected HttpRequestBase createMethod(Exchange exchange) throws Exception { if (defaultUri == null || defaultUrl == null) { throw new IllegalArgumentException("Producer must be started"); } String url = defaultUrl; URI uri = defaultUri; // the exchange can have ...
HttpRequestBase function(Exchange exchange) throws Exception { if (defaultUri == null defaultUrl == null) { throw new IllegalArgumentException(STR); } String url = defaultUrl; URI uri = defaultUri; boolean create = false; Message in = exchange.getIn(); if (in.getHeader(Exchange.REST_HTTP_URI) != null) { create = true; ...
/** * Creates the HttpMethod to use to call the remote server, either its GET or POST. * * @param exchange the exchange * @return the created method as either GET or POST * @throws URISyntaxException is thrown if the URI is invalid * @throws Exception ...
Creates the HttpMethod to use to call the remote server, either its GET or POST
createMethod
{ "repo_name": "pax95/camel", "path": "components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java", "license": "apache-2.0", "size": 36277 }
[ "org.apache.camel.Exchange", "org.apache.camel.Message", "org.apache.camel.component.http.helper.HttpMethodHelper", "org.apache.camel.http.common.HttpHelper", "org.apache.http.HttpEntity", "org.apache.http.client.methods.HttpEntityEnclosingRequestBase", "org.apache.http.client.methods.HttpRequestBase" ]
import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.component.http.helper.HttpMethodHelper; import org.apache.camel.http.common.HttpHelper; import org.apache.http.HttpEntity; import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; import org.apache.http.client.method...
import org.apache.camel.*; import org.apache.camel.component.http.helper.*; import org.apache.camel.http.common.*; import org.apache.http.*; import org.apache.http.client.methods.*;
[ "org.apache.camel", "org.apache.http" ]
org.apache.camel; org.apache.http;
2,673,544
public JComponent createSetupUI(AudioServer server, AudioServerConfiguration p) { return null; }
JComponent function(AudioServer server, AudioServerConfiguration p) { return null; }
/** * Create the UI that is used prior to use of the server. * Typically it might allow sample rate to be changed. * @param server the AudioServer to provide the UI for. * @return JComponent the UI, null representing no UI. */
Create the UI that is used prior to use of the server. Typically it might allow sample rate to be changed
createSetupUI
{ "repo_name": "petersalomonsen/frinika", "path": "src/uk/org/toot/swingui/audioui/serverui/spi/AudioServerUIServiceProvider.java", "license": "gpl-2.0", "size": 1737 }
[ "javax.swing.JComponent", "uk.org.toot.audio.server.AudioServer", "uk.org.toot.audio.server.AudioServerConfiguration" ]
import javax.swing.JComponent; import uk.org.toot.audio.server.AudioServer; import uk.org.toot.audio.server.AudioServerConfiguration;
import javax.swing.*; import uk.org.toot.audio.server.*;
[ "javax.swing", "uk.org.toot" ]
javax.swing; uk.org.toot;
816,096
// TODO this function is very similar to a function in the // MockWebResourceFetcher. Sharing this code in some way would be more // convenient. public void setWebResourceFromPath(Map<String, String> parameters, Class<?> resourceClass, String path, CompressionType compressionType) throws IOException { thi...
void function(Map<String, String> parameters, Class<?> resourceClass, String path, CompressionType compressionType) throws IOException { this.webResources.put(parameters.hashCode(), MockStringContentFactory .getStringFromUrl(resourceClass.getResource(path)).getBytes()); }
/** * Defines the contents of a new web resource (result for an API request) by * taking a list of parameters and the string from a given (Java) resource. * * @param parameters * paramerter setting of the query string for an API request. * @param resourceClass * the Class relative to...
Defines the contents of a new web resource (result for an API request) by taking a list of parameters and the string from a given (Java) resource
setWebResourceFromPath
{ "repo_name": "notconfusing/Wikidata-Toolkit", "path": "wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/MockApiConnection.java", "license": "apache-2.0", "size": 3645 }
[ "java.io.IOException", "java.util.Map", "org.wikidata.wdtk.testing.MockStringContentFactory", "org.wikidata.wdtk.util.CompressionType" ]
import java.io.IOException; import java.util.Map; import org.wikidata.wdtk.testing.MockStringContentFactory; import org.wikidata.wdtk.util.CompressionType;
import java.io.*; import java.util.*; import org.wikidata.wdtk.testing.*; import org.wikidata.wdtk.util.*;
[ "java.io", "java.util", "org.wikidata.wdtk" ]
java.io; java.util; org.wikidata.wdtk;
1,768,161
public void incrementWater(View view) { if (mToast != null) mToast.cancel(); mToast = Toast.makeText(this, R.string.water_chug_toast, Toast.LENGTH_SHORT); mToast.show(); Intent incrementWaterCountIntent = new Intent(this, WaterReminderIntentService.class); incrementWaterCoun...
void function(View view) { if (mToast != null) mToast.cancel(); mToast = Toast.makeText(this, R.string.water_chug_toast, Toast.LENGTH_SHORT); mToast.show(); Intent incrementWaterCountIntent = new Intent(this, WaterReminderIntentService.class); incrementWaterCountIntent.setAction(ReminderTasks.ACTION_INCREMENT_WATER_COU...
/** * Adds one to the water count and shows a toast */
Adds one to the water count and shows a toast
incrementWater
{ "repo_name": "pearqueros/FastTrackAndroid", "path": "Lesson10-Hydration-Reminder/T10.02-Exercise-CreateNotification/app/src/main/java/com/example/android/background/MainActivity.java", "license": "apache-2.0", "size": 4354 }
[ "android.content.Intent", "android.view.View", "android.widget.Toast", "com.example.android.background.sync.ReminderTasks", "com.example.android.background.sync.WaterReminderIntentService" ]
import android.content.Intent; import android.view.View; import android.widget.Toast; import com.example.android.background.sync.ReminderTasks; import com.example.android.background.sync.WaterReminderIntentService;
import android.content.*; import android.view.*; import android.widget.*; import com.example.android.background.sync.*;
[ "android.content", "android.view", "android.widget", "com.example.android" ]
android.content; android.view; android.widget; com.example.android;
2,382,583
public String getAttributeNamespace(int index) { //State should be either START_ELEMENT or ATTRIBUTE if( fEventType == XMLEvent.START_ELEMENT || fEventType == XMLEvent.ATTRIBUTE) { return fScanner.getAttributeIterator().getURI(index); } else{ throw new java.lang.Illeg...
String function(int index) { if( fEventType == XMLEvent.START_ELEMENT fEventType == XMLEvent.ATTRIBUTE) { return fScanner.getAttributeIterator().getURI(index); } else{ throw new java.lang.IllegalStateException(STR + getEventTypeString(XMLEvent.START_ELEMENT) + STR + getEventTypeString(XMLEvent.ATTRIBUTE) + STR) ; } }
/** Returns the namespace of the attribute at the provided * index * @param index the position of the attribute * @return the namespace URI (can be null) * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE */
Returns the namespace of the attribute at the provided index
getAttributeNamespace
{ "repo_name": "PrincetonUniversity/NVJVM", "path": "build/linux-amd64/jaxp/drop/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java", "license": "gpl-2.0", "size": 58364 }
[ "javax.xml.stream.events.XMLEvent" ]
import javax.xml.stream.events.XMLEvent;
import javax.xml.stream.events.*;
[ "javax.xml" ]
javax.xml;
650,339
public void process(ProxymaResource aResource) { Date now = new Date(); aResource.addAttibute(timestampAttribute, now); log.fine("Added the timestamp to the resource attributes."); }
void function(ProxymaResource aResource) { Date now = new Date(); aResource.addAttibute(timestampAttribute, now); log.fine(STR); }
/** * This adds a resource attribute to the current resource in order to * memorize the instant when the new request has come to the server. * It can be used to verfy the performances of the server. * @param aResource any ProxymaResource * @see PerformanceTestSerializer */
This adds a resource attribute to the current resource in order to memorize the instant when the new request has come to the server. It can be used to verfy the performances of the server
process
{ "repo_name": "dpoldrugo/proxyma", "path": "proxyma-core/src/main/java/m/c/m/proxyma/plugins/preprocessors/StoreTimestampPreprocessor.java", "license": "lgpl-2.1", "size": 3230 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,912,644
public DataSet getApprovalDataSet() { List<DataSet> list = new ArrayList<>( dataSets ); Collections.sort( list, DataSetApprovalFrequencyComparator.INSTANCE ); return !list.isEmpty() ? list.get( 0 ) : null; }
DataSet function() { List<DataSet> list = new ArrayList<>( dataSets ); Collections.sort( list, DataSetApprovalFrequencyComparator.INSTANCE ); return !list.isEmpty() ? list.get( 0 ) : null; }
/** * Returns the data set of this data element. If this data element has * multiple data sets, the data set with approval enabled, then the highest * collection frequency, is returned. */
Returns the data set of this data element. If this data element has multiple data sets, the data set with approval enabled, then the highest collection frequency, is returned
getApprovalDataSet
{ "repo_name": "mortenoh/dhis2-core", "path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java", "license": "bsd-3-clause", "size": 22198 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.hisp.dhis.dataset.DataSet", "org.hisp.dhis.dataset.comparator.DataSetApprovalFrequencyComparator" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.dataset.comparator.DataSetApprovalFrequencyComparator;
import java.util.*; import org.hisp.dhis.dataset.*; import org.hisp.dhis.dataset.comparator.*;
[ "java.util", "org.hisp.dhis" ]
java.util; org.hisp.dhis;
634,138
public static MozuClient<com.mozu.api.contracts.core.User> getUserClient(String userId) throws Exception { return getUserClient( userId, null); }
static MozuClient<com.mozu.api.contracts.core.User> function(String userId) throws Exception { return getUserClient( userId, null); }
/** * Retrieves the details of the specified administrator user account. * <p><pre><code> * MozuClient<com.mozu.api.contracts.core.User> mozuClient=GetUserClient( userId); * client.setBaseAddress(url); * client.executeRequest(); * User user = client.Result(); * </code></pre></p> * @param userId Unique i...
Retrieves the details of the specified administrator user account. <code><code> MozuClient mozuClient=GetUserClient( userId); client.setBaseAddress(url); client.executeRequest(); User user = client.Result(); </code></code>
getUserClient
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/platform/adminuser/AdminUserClient.java", "license": "mit", "size": 4828 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
363,842
public boolean isValid() { if (ui == null) { return false; } try { J2EEServiceLocator loc = Lookup.getDefault().lookup(J2EEServiceLocator.class); ManageInventoryFacade manageInv = loc.getStateless(ManageInventoryFacade.class); if (this.wiza...
boolean function() { if (ui == null) { return false; } try { J2EEServiceLocator loc = Lookup.getDefault().lookup(J2EEServiceLocator.class); ManageInventoryFacade manageInv = loc.getStateless(ManageInventoryFacade.class); if (this.wizard.getSu() == null) { throw new WizardValidationException(getPanelUI(), STR, NbBundle....
/** Test whether the panel is finished and it is safe to proceed to the next one. * If the panel is valid, the "Next" (or "Finish") button will be enabled. * @return <code>true</code> if the user has entered satisfactory information */
Test whether the panel is finished and it is safe to proceed to the next one. If the panel is valid, the "Next" (or "Finish") button will be enabled
isValid
{ "repo_name": "Jacksson/mywms", "path": "rich.client/los.clientsuite/LOS Processes/src/de/linogistix/wmsprocesses/stockunittransfer/BOStockUnitTransferPanelChoose.java", "license": "gpl-2.0", "size": 12735 }
[ "de.linogistix.common.services.J2EEServiceLocator", "de.linogistix.common.util.ExceptionAnnotator", "de.linogistix.los.inventory.exception.InventoryException", "de.linogistix.los.inventory.exception.InventoryExceptionKey", "de.linogistix.los.inventory.facade.ManageInventoryFacade", "de.linogistix.wmsproce...
import de.linogistix.common.services.J2EEServiceLocator; import de.linogistix.common.util.ExceptionAnnotator; import de.linogistix.los.inventory.exception.InventoryException; import de.linogistix.los.inventory.exception.InventoryExceptionKey; import de.linogistix.los.inventory.facade.ManageInventoryFacade; import de.li...
import de.linogistix.common.services.*; import de.linogistix.common.util.*; import de.linogistix.los.inventory.exception.*; import de.linogistix.los.inventory.facade.*; import de.linogistix.wmsprocesses.res.*; import org.mywms.facade.*; import org.openide.*; import org.openide.util.*;
[ "de.linogistix.common", "de.linogistix.los", "de.linogistix.wmsprocesses", "org.mywms.facade", "org.openide", "org.openide.util" ]
de.linogistix.common; de.linogistix.los; de.linogistix.wmsprocesses; org.mywms.facade; org.openide; org.openide.util;
1,848,842
private void logEnhancements(ContentItem ci){ if(LOG.isDebugEnabled()){ ByteArrayOutputStream bout = new ByteArrayOutputStream(); serializer.serialize(bout, ci.getMetadata(), SupportedFormat.TURTLE); LOG.debug("Enhancements of {}",ci.getUri().getUnicodeString()); ...
void function(ContentItem ci){ if(LOG.isDebugEnabled()){ ByteArrayOutputStream bout = new ByteArrayOutputStream(); serializer.serialize(bout, ci.getMetadata(), SupportedFormat.TURTLE); LOG.debug(STR,ci.getUri().getUnicodeString()); LOG.debug(new String(bout.toByteArray(),Charset.forName("UTF8"))); } }
/** * Logs the enhancements as TURTLE on DEBUG level * @param ci the contentItem */
Logs the enhancements as TURTLE on DEBUG level
logEnhancements
{ "repo_name": "michelemostarda/machinelinking-stanbol-enhancement-engine", "path": "src/test/java/com/machinelinking/stanbol/enhancer/engines/machinelinking/impl/MLLanguageIdentifierEnhancementEngineTest.java", "license": "apache-2.0", "size": 5795 }
[ "java.io.ByteArrayOutputStream", "java.nio.charset.Charset", "org.apache.clerezza.rdf.core.serializedform.SupportedFormat", "org.apache.stanbol.enhancer.servicesapi.ContentItem" ]
import java.io.ByteArrayOutputStream; import java.nio.charset.Charset; import org.apache.clerezza.rdf.core.serializedform.SupportedFormat; import org.apache.stanbol.enhancer.servicesapi.ContentItem;
import java.io.*; import java.nio.charset.*; import org.apache.clerezza.rdf.core.serializedform.*; import org.apache.stanbol.enhancer.servicesapi.*;
[ "java.io", "java.nio", "org.apache.clerezza", "org.apache.stanbol" ]
java.io; java.nio; org.apache.clerezza; org.apache.stanbol;
1,174,608
setTitle("Logic Puzzle Engine"); if(dimensions==null) System.exit(1); this.logicPuzzle = new LogicPuzzle(dimensions); BorderLayout borderLayout = new BorderLayout(); setLayout(borderLayout); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize()...
setTitle(STR); if(dimensions==null) System.exit(1); this.logicPuzzle = new LogicPuzzle(dimensions); BorderLayout borderLayout = new BorderLayout(); setLayout(borderLayout); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); JPanel board = createBoard(); board.setBorder(BorderFactory.createBevelBorder(B...
/** * Initialize GridBag constraints, main layout manager, backend and main panels. * @param dimensions Array of {@link LogicDimension} grabbed from user input */
Initialize GridBag constraints, main layout manager, backend and main panels
initialize
{ "repo_name": "dsalamancad/KM_RBS_2014", "path": "src/main/java/co/uniandes/KM/logicPuzzles/UI/Tablero.java", "license": "apache-2.0", "size": 15292 }
[ "co.uniandes.KM", "java.awt.BorderLayout", "java.awt.Dimension", "java.awt.Toolkit", "javax.swing.BorderFactory", "javax.swing.JFrame", "javax.swing.JPanel", "javax.swing.border.BevelBorder" ]
import co.uniandes.KM; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Toolkit; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.BevelBorder;
import co.uniandes.*; import java.awt.*; import javax.swing.*; import javax.swing.border.*;
[ "co.uniandes", "java.awt", "javax.swing" ]
co.uniandes; java.awt; javax.swing;
1,514,888
public static Predicate<Object[]> getLessOrEqualLength(int target) { return array -> array.length <= target; }
static Predicate<Object[]> function(int target) { return array -> array.length <= target; }
/** * Gets less or equal length. * * @param target the target * @return the less or equal length */
Gets less or equal length
getLessOrEqualLength
{ "repo_name": "JM-Lab/utils-java8", "path": "src/main/java/kr/jm/utils/helper/JMPredicate.java", "license": "apache-2.0", "size": 8357 }
[ "java.util.function.Predicate" ]
import java.util.function.Predicate;
import java.util.function.*;
[ "java.util" ]
java.util;
266,831
public List<String> getIndexNames() { List<String> indexNames = new ArrayList<String>(requests.size()); for (IndexRequest request : requests) { if (request.getName() != null) { indexNames.add(request.getName()); } else { indexNames.add(IndexHel...
List<String> function() { List<String> indexNames = new ArrayList<String>(requests.size()); for (IndexRequest request : requests) { if (request.getName() != null) { indexNames.add(request.getName()); } else { indexNames.add(IndexHelper.generateIndexName(request.getKeys())); } } return indexNames; }
/** * Gets the index names. * * @return a list of index names */
Gets the index names
getIndexNames
{ "repo_name": "jsonking/mongo-java-driver", "path": "driver-core/src/main/com/mongodb/operation/CreateIndexesOperation.java", "license": "apache-2.0", "size": 13497 }
[ "com.mongodb.bulk.IndexRequest", "com.mongodb.operation.IndexHelper", "java.util.ArrayList", "java.util.List" ]
import com.mongodb.bulk.IndexRequest; import com.mongodb.operation.IndexHelper; import java.util.ArrayList; import java.util.List;
import com.mongodb.bulk.*; import com.mongodb.operation.*; import java.util.*;
[ "com.mongodb.bulk", "com.mongodb.operation", "java.util" ]
com.mongodb.bulk; com.mongodb.operation; java.util;
1,185,485
public void setShadowPaint(Paint paint) { ParamChecks.nullNotPermitted(paint, "paint"); this.shadowPaint = paint; }
void function(Paint paint) { ParamChecks.nullNotPermitted(paint, "paint"); this.shadowPaint = paint; }
/** * Sets the shadow paint. * * @param paint the paint (<code>null</code> not permitted). * * @see #getShadowPaint() */
Sets the shadow paint
setShadowPaint
{ "repo_name": "sebkur/JFreeChart", "path": "src/main/java/org/jfree/chart/StandardChartTheme.java", "license": "lgpl-3.0", "size": 60532 }
[ "java.awt.Paint", "org.jfree.chart.util.ParamChecks" ]
import java.awt.Paint; import org.jfree.chart.util.ParamChecks;
import java.awt.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
2,796,913
public void addPersistenceUnitMetadata(Map<String, PersistenceUnitMetadata> metadata) { getPersistenceUnitMetadataMap().putAll(metadata); }
void function(Map<String, PersistenceUnitMetadata> metadata) { getPersistenceUnitMetadataMap().putAll(metadata); }
/** * Adds the persistence unit metadata. * * @param persistenceUnit * the persistence unit * @param persistenceUnitMetadata * the persistence unit metadata */
Adds the persistence unit metadata
addPersistenceUnitMetadata
{ "repo_name": "ravisund/Kundera", "path": "src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/ApplicationMetadata.java", "license": "apache-2.0", "size": 13000 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
760,503
@Adjacency(label = EXTENDS, direction = Direction.OUT) JavaClassModel getExtends();
@Adjacency(label = EXTENDS, direction = Direction.OUT) JavaClassModel getExtends();
/** * Lists classes extended by this class */
Lists classes extended by this class
getExtends
{ "repo_name": "d-s/windup", "path": "rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/model/JavaClassModel.java", "license": "epl-1.0", "size": 8033 }
[ "com.tinkerpop.blueprints.Direction", "com.tinkerpop.frames.Adjacency" ]
import com.tinkerpop.blueprints.Direction; import com.tinkerpop.frames.Adjacency;
import com.tinkerpop.blueprints.*; import com.tinkerpop.frames.*;
[ "com.tinkerpop.blueprints", "com.tinkerpop.frames" ]
com.tinkerpop.blueprints; com.tinkerpop.frames;
2,731,296
@VisibleForTesting protected Path getThriftCompilerOutputDir(BuildTarget target, String name) { Preconditions.checkArgument(target.isFlavored()); BuildTarget flavoredTarget = createThriftCompilerBuildTarget(target, name); return BuildTargets.getGenPath(flavoredTarget, "%s/sources"); }
Path function(BuildTarget target, String name) { Preconditions.checkArgument(target.isFlavored()); BuildTarget flavoredTarget = createThriftCompilerBuildTarget(target, name); return BuildTargets.getGenPath(flavoredTarget, STR); }
/** * Get the output directory for the generated sources used when compiling the given * thrift source for the given language. */
Get the output directory for the generated sources used when compiling the given thrift source for the given language
getThriftCompilerOutputDir
{ "repo_name": "Dominator008/buck", "path": "src/com/facebook/buck/thrift/ThriftLibraryDescription.java", "license": "apache-2.0", "size": 18248 }
[ "com.facebook.buck.model.BuildTarget", "com.facebook.buck.model.BuildTargets", "com.google.common.base.Preconditions", "java.nio.file.Path" ]
import com.facebook.buck.model.BuildTarget; import com.facebook.buck.model.BuildTargets; import com.google.common.base.Preconditions; import java.nio.file.Path;
import com.facebook.buck.model.*; import com.google.common.base.*; import java.nio.file.*;
[ "com.facebook.buck", "com.google.common", "java.nio" ]
com.facebook.buck; com.google.common; java.nio;
2,832,631
private static List<GeneralParameterDescriptor> asList(final GeneralParameterDescriptor[] parameters) { switch (parameters.length) { case 0: return Collections.emptyList(); case 1: return Collections.singletonList(parameters[0]); case 2: // fall through cas...
static List<GeneralParameterDescriptor> function(final GeneralParameterDescriptor[] parameters) { switch (parameters.length) { case 0: return Collections.emptyList(); case 1: return Collections.singletonList(parameters[0]); case 2: case 3: return UnmodifiableArrayList.wrap(parameters); default: return new AsList(parame...
/** * Returns the given array of parameters as an unmodifiable list. */
Returns the given array of parameters as an unmodifiable list
asList
{ "repo_name": "desruisseaux/sis", "path": "core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java", "license": "apache-2.0", "size": 23776 }
[ "java.util.Collections", "java.util.List", "java.util.Set", "org.apache.sis.internal.util.UnmodifiableArrayList", "org.opengis.parameter.GeneralParameterDescriptor" ]
import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.sis.internal.util.UnmodifiableArrayList; import org.opengis.parameter.GeneralParameterDescriptor;
import java.util.*; import org.apache.sis.internal.util.*; import org.opengis.parameter.*;
[ "java.util", "org.apache.sis", "org.opengis.parameter" ]
java.util; org.apache.sis; org.opengis.parameter;
896,047
private void selectorClosed() { for (RamSelectorListener<T> listener : listeners) { listener.closeSelector(this); } }
void function() { for (RamSelectorListener<T> listener : listeners) { listener.closeSelector(this); } }
/** * Call the action to do when the delete button is closed. */
Call the action to do when the delete button is closed
selectorClosed
{ "repo_name": "sacooper/ECSE-429-Project-Group1", "path": "ca.mcgill.sel.ram.gui/src/ca/mcgill/sel/ram/ui/components/RamSelectorComponent.java", "license": "gpl-2.0", "size": 16425 }
[ "ca.mcgill.sel.ram.ui.components.listeners.RamSelectorListener" ]
import ca.mcgill.sel.ram.ui.components.listeners.RamSelectorListener;
import ca.mcgill.sel.ram.ui.components.listeners.*;
[ "ca.mcgill.sel" ]
ca.mcgill.sel;
1,493,867
public static void showAbout() { if ((IJ.altKeyDown() || IJ.shiftKeyDown() || Boolean.parseBoolean(System.getProperty("about-install", "false"))) // Try and install the plugins && installPlugins()) { return; } // Locate the README.txt file and load that into the dialog. Incl...
static void function() { if ((IJ.altKeyDown() IJ.shiftKeyDown() Boolean.parseBoolean(System.getProperty(STR, "false"))) && installPlugins()) { return; } final Class<About_PlugIn> resourceClass = About_PlugIn.class; final InputStream readmeStream = resourceClass.getResourceAsStream(STR); StringBuilder msg = new StringBu...
/** * Show about dialog. */
Show about dialog
showAbout
{ "repo_name": "aherbert/GDSC", "path": "src/main/java/uk/ac/sussex/gdsc/About_PlugIn.java", "license": "gpl-3.0", "size": 7800 }
[ "java.io.BufferedReader", "java.io.InputStream", "java.io.InputStreamReader", "java.nio.charset.StandardCharsets" ]
import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
933,468
public void addPropertyChangeListener(PropertyChangeListener listener) { this.propertyChangeSupport.addPropertyChangeListener(listener); }
void function(PropertyChangeListener listener) { this.propertyChangeSupport.addPropertyChangeListener(listener); }
/** * Adds a property change listener to the series. * * @param listener the listener. */
Adds a property change listener to the series
addPropertyChangeListener
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/data/general/Series.java", "license": "lgpl-2.1", "size": 10297 }
[ "java.beans.PropertyChangeListener" ]
import java.beans.PropertyChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
2,273,255
public void setDomainTickBandPaint(Paint paint) { this.domainTickBandPaint = paint; notifyListeners(new PlotChangeEvent(this)); }
void function(Paint paint) { this.domainTickBandPaint = paint; notifyListeners(new PlotChangeEvent(this)); }
/** * Sets the paint for the domain tick bands. * * @param paint the paint (<code>null</code> permitted). */
Sets the paint for the domain tick bands
setDomainTickBandPaint
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/plot/XYPlot.java", "license": "lgpl-2.1", "size": 137931 }
[ "java.awt.Paint", "org.jfree.chart.event.PlotChangeEvent" ]
import java.awt.Paint; import org.jfree.chart.event.PlotChangeEvent;
import java.awt.*; import org.jfree.chart.event.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
2,480,580
@Override public Property getProperty() { return (Property) getSource(); } }
Property function() { return (Property) getSource(); } }
/** * Gets the Property whose read-only state has changed. * * @return source Property of the event. */
Gets the Property whose read-only state has changed
getProperty
{ "repo_name": "Legioth/vaadin", "path": "compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java", "license": "apache-2.0", "size": 8257 }
[ "com.vaadin.v7.data.Property" ]
import com.vaadin.v7.data.Property;
import com.vaadin.v7.data.*;
[ "com.vaadin.v7" ]
com.vaadin.v7;
358,090
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "drbgfc/mdht", "path": "cts2/plugins/org.openhealthtools.mdht.cts2.core.edit/src/org/openhealthtools/mdht/cts2/core/provider/NamedEntityReferenceItemProvider.java", "license": "epl-1.0", "size": 3737 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
605,406
public ServiceCall putDurationValidAsync(Map<String, Period> arrayBody, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } if (arrayBod...
ServiceCall function(Map<String, Period> arrayBody, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } if (arrayBody == null) { serviceCallback.failure(new IllegalArgumentException(STR)); return null; }
/** * Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. * * @param arrayBody the Map&lt;String, Period&gt; value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null ...
Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}
putDurationValidAsync
{ "repo_name": "stankovski/AutoRest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodydictionary/DictionaryOperationsImpl.java", "license": "mit", "size": 167988 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback", "java.util.Map", "org.joda.time.Period" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map; import org.joda.time.Period;
import com.microsoft.rest.*; import java.util.*; import org.joda.time.*;
[ "com.microsoft.rest", "java.util", "org.joda.time" ]
com.microsoft.rest; java.util; org.joda.time;
2,032,369
public OutputStream openOutputStream() throws VlException { return getStaticVFSClient().openOutputStream(getAbsoluteVRL()); }
OutputStream function() throws VlException { return getStaticVFSClient().openOutputStream(getAbsoluteVRL()); }
/** * Convenience method to directly create an OutputStream using the static * VFS. * * @throws VlException */
Convenience method to directly create an OutputStream using the static VFS
openOutputStream
{ "repo_name": "skoulouzis/vlet-1.5.0", "path": "source/core/nl.uva.vlet.vrs.core/source/main/nl/uva/vlet/io/javafile/File.java", "license": "apache-2.0", "size": 32655 }
[ "java.io.OutputStream", "nl.uva.vlet.exception.VlException" ]
import java.io.OutputStream; import nl.uva.vlet.exception.VlException;
import java.io.*; import nl.uva.vlet.exception.*;
[ "java.io", "nl.uva.vlet" ]
java.io; nl.uva.vlet;
1,293,700
EAttribute getRelationType_Description();
EAttribute getRelationType_Description();
/** * Returns the meta object for the attribute '{@link relations.RelationType#getDescription <em>Description</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Description</em>'. * @see relations.RelationType#getDescription() * @see #getRelationType()...
Returns the meta object for the attribute '<code>relations.RelationType#getDescription Description</code>'.
getRelationType_Description
{ "repo_name": "KAMP-Research/KAMP", "path": "bundles/Toometa/toometa.relations/src/relations/RelationsPackage.java", "license": "apache-2.0", "size": 51988 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,806,326
protected void log(String aLevel, Object obj, Throwable t) { buffer.append(BRAKE_OPEN).append(getName()).append(BRAKE_CLOSE).append(aLevel); if (obj != null && obj instanceof Throwable) { try { buffer.append(((Throwable) obj).getMessage()).a...
void function(String aLevel, Object obj, Throwable t) { buffer.append(BRAKE_OPEN).append(getName()).append(BRAKE_CLOSE).append(aLevel); if (obj != null && obj instanceof Throwable) { try { buffer.append(((Throwable) obj).getMessage()).append(EOL); ((Throwable) obj).printStackTrace(); } catch (Throwable ignored) { } } e...
/** * Log all statements in a {@link StringBuffer}. */
Log all statements in a <code>StringBuffer</code>
log
{ "repo_name": "CU-CommunityApps/cu-db-ojb", "path": "src/java/org/apache/ojb/broker/util/logging/StringBufferLoggerImpl.java", "license": "apache-2.0", "size": 3245 }
[ "org.apache.commons.lang.exception.ExceptionUtils" ]
import org.apache.commons.lang.exception.ExceptionUtils;
import org.apache.commons.lang.exception.*;
[ "org.apache.commons" ]
org.apache.commons;
1,563,173
public static Tuple parseLazyArrayToPigArray(LazyArray arr) { List<Object> list = new ArrayList<Object>(); // each item inside the LazyArray must be converted to its java // primitive type List<Object> hivedataList = arr.getList(); for (Object item : hivedataList) { list.add(extractPigTypeFromHiveType(i...
static Tuple function(LazyArray arr) { List<Object> list = new ArrayList<Object>(); List<Object> hivedataList = arr.getList(); for (Object item : hivedataList) { list.add(extractPigTypeFromHiveType(item)); } return tupleFactory.newTuple(list); }
/** * Converts the LazyArray to a Tuple.<br/> * * @param arr * LazyArray * @return Tuple */
Converts the LazyArray to a Tuple
parseLazyArrayToPigArray
{ "repo_name": "simplegeo/hadoop-pig", "path": "contrib/piggybank/java/src/main/java/org/apache/pig/piggybank/storage/hiverc/HiveRCSchemaUtil.java", "license": "apache-2.0", "size": 8560 }
[ "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hive.serde2.lazy.LazyArray", "org.apache.pig.data.Tuple" ]
import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hive.serde2.lazy.LazyArray; import org.apache.pig.data.Tuple;
import java.util.*; import org.apache.hadoop.hive.serde2.lazy.*; import org.apache.pig.data.*;
[ "java.util", "org.apache.hadoop", "org.apache.pig" ]
java.util; org.apache.hadoop; org.apache.pig;
2,449,927
public JFrame getUI();
JFrame function();
/** * Returns the {@link TreeViewer} view. * * @return See above. */
Returns the <code>TreeViewer</code> view
getUI
{ "repo_name": "emilroz/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewer.java", "license": "gpl-2.0", "size": 36185 }
[ "javax.swing.JFrame" ]
import javax.swing.JFrame;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,580,508
EReference getDemand_Responsibility();
EReference getDemand_Responsibility();
/** * Returns the meta object for the container reference '{@link ucm.performance.Demand#getResponsibility <em>Responsibility</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the container reference '<em>Responsibility</em>'. * @see ucm.performance.Demand#getResponsib...
Returns the meta object for the container reference '<code>ucm.performance.Demand#getResponsibility Responsibility</code>'.
getDemand_Responsibility
{ "repo_name": "McGill-DP-Group/seg.jUCMNav", "path": "src/ucm/performance/PerformancePackage.java", "license": "epl-1.0", "size": 47378 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
277,439
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<AzureFirewallInner> listAsync(Context context) { return new PagedFlux<>( () -> listSinglePageAsync(context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<AzureFirewallInner> function(Context context) { return new PagedFlux<>( () -> listSinglePageAsync(context), nextLink -> listAllNextSinglePageAsync(nextLink, context)); }
/** * Gets all the Azure Firewalls in a subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeEx...
Gets all the Azure Firewalls in a subscription
listAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallsClientImpl.java", "license": "mit", "size": 77256 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.AzureFirewallInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.AzureFirewallInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,759,050
public void selectionChanged(IAction action, ISelection selection) { }
void function(IAction action, ISelection selection) { }
/** * Notifies this action delegate that the selection in the workbench has * changed. * * @param action * the action proxy that handles presentation portion of the * action * @param selection * the current selection, or null if there is no selection. */
Notifies this action delegate that the selection in the workbench has changed
selectionChanged
{ "repo_name": "kuriking/testdc2", "path": "net.dependableos.dcase.diagram.editor/src/net/dependableos/dcase/diagram/editor/parameter/ShowParameterAction.java", "license": "epl-1.0", "size": 1903 }
[ "org.eclipse.jface.action.IAction", "org.eclipse.jface.viewers.ISelection" ]
import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.action.*; import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,229,716
@Override public void println(char x[]) throws IOException { print(x); println(); }
void function(char x[]) throws IOException { print(x); println(); }
/** * Print an array of characters and then terminate the line. This method * behaves as though it invokes <code>{@link #print(char[])}</code> and then * <code>{@link #println()}</code>. */
Print an array of characters and then terminate the line. This method behaves as though it invokes <code><code>#print(char[])</code></code> and then <code><code>#println()</code></code>
println
{ "repo_name": "barreiro/jastow", "path": "src/main/java/org/apache/jasper/runtime/JspWriterImpl.java", "license": "apache-2.0", "size": 17429 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
241,545
public static CommandResponse runCommand(String cmdName, ZooKeeperServer zkServer, Map<String, String> kwargs) { if (!commands.containsKey(cmdName)) { return new CommandResponse(cmdName, "Unknown command: " + cmdName); } if (zkServer == null) { return new CommandRespo...
static CommandResponse function(String cmdName, ZooKeeperServer zkServer, Map<String, String> kwargs) { if (!commands.containsKey(cmdName)) { return new CommandResponse(cmdName, STR + cmdName); } if (zkServer == null) { return new CommandResponse(cmdName, STR); } return commands.get(cmdName).run(zkServer, kwargs); }
/** * Run the registered command with name cmdName. Commands should not produce * any exceptions; any (anticipated) errors should be reported in the * "error" entry of the returned map. Likewise, if no command with the given * name is registered, this will be noted in the "error" entry. * ...
Run the registered command with name cmdName. Commands should not produce any exceptions; any (anticipated) errors should be reported in the "error" entry of the returned map. Likewise, if no command with the given name is registered, this will be noted in the "error" entry
runCommand
{ "repo_name": "ervinyang/tutorial_zookeeper", "path": "zookeeper-trunk/src/java/main/org/apache/zookeeper/server/admin/Commands.java", "license": "mit", "size": 19060 }
[ "java.util.Map", "org.apache.zookeeper.server.ZooKeeperServer" ]
import java.util.Map; import org.apache.zookeeper.server.ZooKeeperServer;
import java.util.*; import org.apache.zookeeper.server.*;
[ "java.util", "org.apache.zookeeper" ]
java.util; org.apache.zookeeper;
1,587,364
public Iterable<PatternRelationship> getAllRelationships() { LinkedList<PatternRelationship> allRelationships = new LinkedList<PatternRelationship>(); allRelationships.addAll( relationships ); allRelationships.addAll( optionalRelationships ); return allRelationships; }
Iterable<PatternRelationship> function() { LinkedList<PatternRelationship> allRelationships = new LinkedList<PatternRelationship>(); allRelationships.addAll( relationships ); allRelationships.addAll( optionalRelationships ); return allRelationships; }
/** * Get all {@link PatternRelationship}s associated with this pattern node. * This includes both the required and the optional * {@link PatternRelationship}s. * * @return the {@link PatternRelationship}s associated with this pattern * node. */
Get all <code>PatternRelationship</code>s associated with this pattern node. This includes both the required and the optional <code>PatternRelationship</code>s
getAllRelationships
{ "repo_name": "HuangLS/neo4j", "path": "community/graph-matching/src/main/java/org/neo4j/graphmatching/PatternNode.java", "license": "apache-2.0", "size": 11752 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
680,236