method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static <T> boolean isSubset ( Set<T> set, Set<T> subset) throws Exception { if (subset != null && set == null) { return false; } if (subset == null || set == null) { return true; } if (subset.isEmpty() == false && set.isEmpty() == true) { ...
static <T> boolean function ( Set<T> set, Set<T> subset) throws Exception { if (subset != null && set == null) { return false; } if (subset == null set == null) { return true; } if (subset.isEmpty() == false && set.isEmpty() == true) { return false; } if (subset.isEmpty() == true set.isEmpty() == true) { return true; }...
/** * isSubset * checks if a Set is a subset of another Set * @param set: main Set * @param subset: check is is Set is a subset of "set" * @return true if subset is a sub-set of set and false otherwise * @throws Exception */
isSubset checks if a Set is a subset of another Set
isSubset
{ "repo_name": "vangav/vos_backend", "path": "src/com/vangav/backend/data_structures_and_algorithms/algorithms/SubsetInl.java", "license": "mit", "size": 2827 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
701,434
public void startEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException { // keep track of the entity depth fEntityDepth++; // must reset entity scanner fEntityScanner = fEntityManager.getEntityS...
void function(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException { fEntityDepth++; fEntityScanner = fEntityManager.getEntityScanner(); fEntityStore = fEntityManager.getEntityStore() ; }
/** * This method notifies of the start of an entity. The document entity * has the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]" * parameter entity names start with '%'; and general entities are just * specified by their name. * * @param name The name of the entity. ...
This method notifies of the start of an entity. The document entity has the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name
startEntity
{ "repo_name": "PrincetonUniversity/NVJVM", "path": "build/linux-amd64/jaxp/drop/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java", "license": "gpl-2.0", "size": 56304 }
[ "com.sun.org.apache.xerces.internal.xni.Augmentations", "com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier", "com.sun.org.apache.xerces.internal.xni.XNIException" ]
import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier; import com.sun.org.apache.xerces.internal.xni.XNIException;
import com.sun.org.apache.xerces.internal.xni.*;
[ "com.sun.org" ]
com.sun.org;
218,000
public String getBase64UUID(Random random) { final byte[] randomBytes = new byte[16]; random.nextBytes(randomBytes); randomBytes[6] &= 0x0f; randomBytes[6] |= 0x40; randomBytes[8] &= 0x3f; randomBytes[8] |= 0x80; return Base6...
String function(Random random) { final byte[] randomBytes = new byte[16]; random.nextBytes(randomBytes); randomBytes[6] &= 0x0f; randomBytes[6] = 0x40; randomBytes[8] &= 0x3f; randomBytes[8] = 0x80; return Base64.getUrlEncoder().withoutPadding().encodeToString(randomBytes); }
/** * Returns a Base64 encoded version of a Version 4.0 compatible UUID * randomly initialized by the given {@link java.util.Random} instance * as defined here: http://www.ietf.org/rfc/rfc4122.txt */
Returns a Base64 encoded version of a Version 4.0 compatible UUID randomly initialized by the given <code>java.util.Random</code> instance as defined here: HREF
getBase64UUID
{ "repo_name": "EvilMcJerkface/crate", "path": "server/src/main/java/org/elasticsearch/common/RandomBasedUUIDGenerator.java", "license": "apache-2.0", "size": 2409 }
[ "java.util.Base64", "java.util.Random" ]
import java.util.Base64; import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,344,518
public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException { contentHandler.startElement(FormsConstants.INSTANCE_NS, WIDGETS_EL, FormsConstants.INSTANCE_PREFIX_COLON + WIDGETS_EL, XMLUtils.EMPTY_ATTRIBUTES); Iterator widgetIt = widgets.iterator(); while...
void function(ContentHandler contentHandler, Locale locale) throws SAXException { contentHandler.startElement(FormsConstants.INSTANCE_NS, WIDGETS_EL, FormsConstants.INSTANCE_PREFIX_COLON + WIDGETS_EL, XMLUtils.EMPTY_ATTRIBUTES); Iterator widgetIt = widgets.iterator(); while (widgetIt.hasNext()) { Widget widget = (Widge...
/** * Generates the SAXfragments of the contained widgets * * @param contentHandler * @param locale * @throws SAXException * * @see Widget#generateSaxFragment(ContentHandler, Locale) */
Generates the SAXfragments of the contained widgets
generateSaxFragment
{ "repo_name": "apache/cocoon", "path": "blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/WidgetList.java", "license": "apache-2.0", "size": 5762 }
[ "java.util.Iterator", "java.util.Locale", "org.apache.cocoon.forms.FormsConstants", "org.apache.cocoon.xml.XMLUtils", "org.xml.sax.ContentHandler", "org.xml.sax.SAXException" ]
import java.util.Iterator; import java.util.Locale; import org.apache.cocoon.forms.FormsConstants; import org.apache.cocoon.xml.XMLUtils; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException;
import java.util.*; import org.apache.cocoon.forms.*; import org.apache.cocoon.xml.*; import org.xml.sax.*;
[ "java.util", "org.apache.cocoon", "org.xml.sax" ]
java.util; org.apache.cocoon; org.xml.sax;
156,028
public static String[][] decodeStringDoubleArray(String value) { ArrayList<ArrayList<String>> newList = new ArrayList<ArrayList<String>>(); StringBuilder sb = new StringBuilder(); ArrayList<String> thisEntry = new ArrayList<String>(); boolean escaped = false; for (int i = 0; ...
static String[][] function(String value) { ArrayList<ArrayList<String>> newList = new ArrayList<ArrayList<String>>(); StringBuilder sb = new StringBuilder(); ArrayList<String> thisEntry = new ArrayList<String>(); boolean escaped = false; for (int i = 0; i < value.length(); i++) { char c = value.charAt(i); if (!escaped ...
/** * Decodes an encoded double String array back into array form. The array * is assumed to be square, and delimited by the characters ';' (first dim) and * ':' (second dim). * @param value The encoded String to be decoded. * @return The decoded String array. */
Decodes an encoded double String array back into array form. The array is assumed to be square, and delimited by the characters ';' (first dim) and ':' (second dim)
decodeStringDoubleArray
{ "repo_name": "robymus/jabref", "path": "src/main/java/net/sf/jabref/logic/util/strings/StringUtil.java", "license": "gpl-2.0", "size": 21429 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
255,844
@Override public void paintComponent(final Graphics g) { final Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); final Dimension size = getSize(); final Insets insets = getInsets(); ...
void function(final Graphics g) { final Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); final Dimension size = getSize(); final Insets insets = getInsets(); final double xx = insets.left; final double yy = insets.top; final double ww = size.getWid...
/** * Draws a line using the sample stroke. * * @param g the graphics device. */
Draws a line using the sample stroke
paintComponent
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/main/java/org/jfree/chart/ui/StrokeSample.java", "license": "lgpl-2.1", "size": 5852 }
[ "java.awt.Dimension", "java.awt.Graphics", "java.awt.Graphics2D", "java.awt.Insets", "java.awt.RenderingHints", "java.awt.geom.Ellipse2D", "java.awt.geom.Line2D", "java.awt.geom.Point2D" ]
import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Insets; import java.awt.RenderingHints; import java.awt.geom.Ellipse2D; import java.awt.geom.Line2D; import java.awt.geom.Point2D;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
29,705
@Test(expected = IllegalArgumentException.class) public void createDuplicatePort() { target.createPort(PORT); target.createPort(PORT); }
@Test(expected = IllegalArgumentException.class) void function() { target.createPort(PORT); target.createPort(PORT); }
/** * Tests if creating a duplicate port fails with an exception. */
Tests if creating a duplicate port fails with an exception
createDuplicatePort
{ "repo_name": "oplinkoms/onos", "path": "apps/openstacknetworking/app/src/test/java/org/onosproject/openstacknetworking/impl/OpenstackNetworkManagerTest.java", "license": "apache-2.0", "size": 25526 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
834,663
public void columnReorder(ColumnReorderEvent event); } public static class ColumnCollapseEvent extends Component.Event { public static final Method METHOD = ReflectTools.findMethod( ColumnCollapseListener.class, "columnCollapseStateChange", ColumnCollapseEv...
void function(ColumnReorderEvent event); } public static class ColumnCollapseEvent extends Component.Event { public static final Method METHOD = ReflectTools.findMethod( ColumnCollapseListener.class, STR, ColumnCollapseEvent.class); private Object propertyId; public ColumnCollapseEvent(Component source, Object property...
/** * This method is triggered when the column has been reordered * * @param event */
This method is triggered when the column has been reordered
columnReorder
{ "repo_name": "oalles/vaadin", "path": "server/src/com/vaadin/ui/Table.java", "license": "apache-2.0", "size": 221060 }
[ "com.vaadin.util.ReflectTools", "java.lang.reflect.Method" ]
import com.vaadin.util.ReflectTools; import java.lang.reflect.Method;
import com.vaadin.util.*; import java.lang.reflect.*;
[ "com.vaadin.util", "java.lang" ]
com.vaadin.util; java.lang;
1,659,470
@SuppressWarnings({"unchecked"}) public static <T> IgniteClosure<T, T> identity() { return IDENTITY; }
@SuppressWarnings({STR}) static <T> IgniteClosure<T, T> function() { return IDENTITY; }
/** * Gets identity closure, i.e. the closure that returns its variable value. * * @param <T> Type of the variable and return value for the closure. * @return Identity closure, i.e. the closure that returns its variable value. */
Gets identity closure, i.e. the closure that returns its variable value
identity
{ "repo_name": "f7753/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java", "license": "apache-2.0", "size": 159864 }
[ "org.apache.ignite.lang.IgniteClosure" ]
import org.apache.ignite.lang.IgniteClosure;
import org.apache.ignite.lang.*;
[ "org.apache.ignite" ]
org.apache.ignite;
607,182
public ApplicationContext getReadOnlyApplicationContext() { return this.applicationContext; }
ApplicationContext function() { return this.applicationContext; }
/** * Gets the application context. Will not start a subsystem. * * @return the application context or null */
Gets the application context. Will not start a subsystem
getReadOnlyApplicationContext
{ "repo_name": "Tybion/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/management/subsystems/ChildApplicationContextFactory.java", "license": "lgpl-3.0", "size": 36909 }
[ "org.springframework.context.ApplicationContext" ]
import org.springframework.context.ApplicationContext;
import org.springframework.context.*;
[ "org.springframework.context" ]
org.springframework.context;
2,164,321
public static String hexEncode(final ClassID classID) { return hexEncode(classID.getBytes()); }
static String function(final ClassID classID) { return hexEncode(classID.getBytes()); }
/** * <p>Converts a class ID into its hexadecimal notation.</p> */
Converts a class ID into its hexadecimal notation
hexEncode
{ "repo_name": "srnsw/xena", "path": "plugins/project/ext/src/poi-3.2-FINAL/src/contrib/src/org/apache/poi/contrib/poibrowser/Codec.java", "license": "gpl-3.0", "size": 7218 }
[ "org.apache.poi.hpsf.ClassID" ]
import org.apache.poi.hpsf.ClassID;
import org.apache.poi.hpsf.*;
[ "org.apache.poi" ]
org.apache.poi;
235,659
@Generated @Selector("ABRecordWithAddressBook:") public native ConstVoidPtr ABRecordWithAddressBook(ConstVoidPtr addressBook);
@Selector(STR) native ConstVoidPtr function(ConstVoidPtr addressBook);
/** * ABRecordWithAddressBook * <p> * Returns the ABRecordRef that represents this participant. * <p> * This method returns the ABRecordRef that represents this participant, * if a match can be found based on email address in the address book * passed. If we cannot find the participan...
ABRecordWithAddressBook Returns the ABRecordRef that represents this participant. This method returns the ABRecordRef that represents this participant, if a match can be found based on email address in the address book passed. If we cannot find the participant, nil is returned
ABRecordWithAddressBook
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/eventkit/EKParticipant.java", "license": "apache-2.0", "size": 7577 }
[ "org.moe.natj.general.ptr.ConstVoidPtr", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ptr.ConstVoidPtr; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ptr.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,409,926
@Override public void flush() throws IOException { super.flush(); // Flush the current buffer if (useSocketBuffer) { socketBuffer.flushBuffer(); } }
void function() throws IOException { super.flush(); if (useSocketBuffer) { socketBuffer.flushBuffer(); } }
/** * Flush the response. * * @throws IOException an underlying I/O error occurred */
Flush the response
flush
{ "repo_name": "mayonghui2112/helloWorld", "path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/coyote/http11/InternalOutputBuffer.java", "license": "apache-2.0", "size": 6541 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,446,354
@Entrypoint static void checkcast(Object object, int id) throws ClassCastException, NoClassDefFoundError { if (object == null) { return; // null may be cast to any type } TypeReference tRef = TypeReference.getTypeRef(id); RVMType lhsType = tRef.peekType(); if (lhsType == null) { lhs...
static void checkcast(Object object, int id) throws ClassCastException, NoClassDefFoundError { if (object == null) { return; } TypeReference tRef = TypeReference.getTypeRef(id); RVMType lhsType = tRef.peekType(); if (lhsType == null) { lhsType = tRef.resolve(); } RVMType rhsType = ObjectModel.getObjectType(object); if ...
/** * Throw exception unless object is instance of target * class/array or implements target interface. * @param object object to be tested * @param id of type reference corresponding to target class/array/interface */
Throw exception unless object is instance of target class/array or implements target interface
checkcast
{ "repo_name": "ut-osa/laminar", "path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/runtime/RuntimeEntrypoints.java", "license": "bsd-3-clause", "size": 41085 }
[ "org.jikesrvm.classloader.RVMType", "org.jikesrvm.classloader.TypeReference", "org.jikesrvm.objectmodel.ObjectModel" ]
import org.jikesrvm.classloader.RVMType; import org.jikesrvm.classloader.TypeReference; import org.jikesrvm.objectmodel.ObjectModel;
import org.jikesrvm.classloader.*; import org.jikesrvm.objectmodel.*;
[ "org.jikesrvm.classloader", "org.jikesrvm.objectmodel" ]
org.jikesrvm.classloader; org.jikesrvm.objectmodel;
196,136
private KeelResponse getKeelResultList(String model, String listName, long userUniqueId, String searchCondition, String listSearchCategory) { KeelResponse res = null; ModelRequest req = null; try { req = ModelTools.createModelRequest(); Model listingModel = (Model) req.getService(Model.ROLE, mo...
KeelResponse function(String model, String listName, long userUniqueId, String searchCondition, String listSearchCategory) { KeelResponse res = null; ModelRequest req = null; try { req = ModelTools.createModelRequest(); Model listingModel = (Model) req.getService(Model.ROLE, model, (Context) keelIritgoAuthMap.get(new L...
/** * Return a keel response from the given model. * * @param String The model name. * @param String The name from the List. * @param long User unique id. * @return KeelResponse object */
Return a keel response from the given model
getKeelResultList
{ "repo_name": "iritgo/iritgo-aktera", "path": "aktera-aktario-aktario/src/main/java/de/iritgo/aktera/aktario/akteraconnector/ConnectorServerManager.java", "license": "apache-2.0", "size": 31210 }
[ "de.iritgo.aktario.core.logger.Log", "de.iritgo.aktera.context.KeelContextualizable", "de.iritgo.aktera.model.KeelResponse", "de.iritgo.aktera.model.Model", "de.iritgo.aktera.model.ModelRequest", "de.iritgo.aktera.tools.ModelTools", "org.apache.avalon.framework.context.Context" ]
import de.iritgo.aktario.core.logger.Log; import de.iritgo.aktera.context.KeelContextualizable; import de.iritgo.aktera.model.KeelResponse; import de.iritgo.aktera.model.Model; import de.iritgo.aktera.model.ModelRequest; import de.iritgo.aktera.tools.ModelTools; import org.apache.avalon.framework.context.Context;
import de.iritgo.aktario.core.logger.*; import de.iritgo.aktera.context.*; import de.iritgo.aktera.model.*; import de.iritgo.aktera.tools.*; import org.apache.avalon.framework.context.*;
[ "de.iritgo.aktario", "de.iritgo.aktera", "org.apache.avalon" ]
de.iritgo.aktario; de.iritgo.aktera; org.apache.avalon;
225,652
public UpdateResult processFast(Object[] args) throws IgniteCheckedException { if (fastUpdate != null) return fastUpdate.execute(cacheContext().cache(), args); return null; }
UpdateResult function(Object[] args) throws IgniteCheckedException { if (fastUpdate != null) return fastUpdate.execute(cacheContext().cache(), args); return null; }
/** * Process fast DML operation if possible. * * @param args QUery arguments. * @return Update result or {@code null} if fast update is not applicable for plan. * @throws IgniteCheckedException If failed. */
Process fast DML operation if possible
processFast
{ "repo_name": "NSAmelchev/ignite", "path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/dml/UpdatePlan.java", "license": "apache-2.0", "size": 23354 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.query.h2.UpdateResult" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.query.h2.UpdateResult;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.query.h2.*;
[ "org.apache.ignite" ]
org.apache.ignite;
979,585
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<NetworkInterfaceIpConfigurationInner>> getVirtualMachineScaleSetIpConfigurationWithResponseAsync( String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<NetworkInterfaceIpConfigurationInner>> getVirtualMachineScaleSetIpConfigurationWithResponseAsync( String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand);
/** * Get the specified network interface ip configuration in a virtual machine scale set. * * @param resourceGroupName The name of the resource group. * @param virtualMachineScaleSetName The name of the virtual machine scale set. * @param virtualmachineIndex The virtual machine index. * @...
Get the specified network interface ip configuration in a virtual machine scale set
getVirtualMachineScaleSetIpConfigurationWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java", "license": "mit", "size": 71039 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.network.fluent.models.NetworkInterfaceIpConfigurationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.network.fluent.models.NetworkInterfaceIpConfigurationInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,862,004
private void parseRules(File grammarFile) throws FileNotFoundException { nameToSymbol.put("EPSILON", epsilon); Scanner data = new Scanner(grammarFile); int code = 1; int ruleNumber = 0; while (data.hasNext()) { StringTokenizer t = new StringTokenizer(data.nextLine()); String symbolName = t.nextToken...
void function(File grammarFile) throws FileNotFoundException { nameToSymbol.put(STR, epsilon); Scanner data = new Scanner(grammarFile); int code = 1; int ruleNumber = 0; while (data.hasNext()) { StringTokenizer t = new StringTokenizer(data.nextLine()); String symbolName = t.nextToken(); if (!nameToSymbol.containsKey(sy...
/** * Constructs grammar rules from file * * @param grammarFile * file with grammar rules * @throws FileNotFoundException * if file with the specified pathname does not exist */
Constructs grammar rules from file
parseRules
{ "repo_name": "OpenSoftwareSolutions/scriptplayground", "path": "modules/cfg-parser/src/org/oss/cfg/parser/Parser.java", "license": "unlicense", "size": 14713 }
[ "java.io.File", "java.io.FileNotFoundException", "java.util.ArrayList", "java.util.List", "java.util.Scanner", "java.util.StringTokenizer" ]
import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import java.util.StringTokenizer;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
206,616
public List<String> getExtensions() { return extensions; } /** * {@inheritDoc}
List<String> function() { return extensions; } /** * {@inheritDoc}
/** * Gets the managed extensions. * * @return the list of extensions. */
Gets the managed extensions
getExtensions
{ "repo_name": "ow2-chameleon/core", "path": "src/main/java/org/ow2/chameleon/core/services/ExtensionBasedDeployer.java", "license": "apache-2.0", "size": 2253 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,512,141
public void testRetrieve() throws Exception { List<String> fields = Arrays.asList(new String[] {"name", "ownerId"}); IdName newAccountIdName = createAccount(); RestResponse response = restClient.sendSync(RestRequest.getRequestForRetrieve(TestCredentials.API_VERSION, "account", newAccountIdNa...
void function() throws Exception { List<String> fields = Arrays.asList(new String[] {"name", STR}); IdName newAccountIdName = createAccount(); RestResponse response = restClient.sendSync(RestRequest.getRequestForRetrieve(TestCredentials.API_VERSION, STR, newAccountIdName.id, fields)); checkResponse(response, HttpStatus...
/** * Testing a retrieve call to the server. * Create new account then retrieve it. * @throws Exception */
Testing a retrieve call to the server. Create new account then retrieve it
testRetrieve
{ "repo_name": "kchitalia/SalesforceMobileSDK-Android", "path": "libs/test/SalesforceSDKTest/src/com/salesforce/androidsdk/rest/RestClientTest.java", "license": "apache-2.0", "size": 31647 }
[ "com.salesforce.androidsdk.TestCredentials", "java.util.Arrays", "java.util.List", "org.apache.http.HttpStatus", "org.json.JSONObject" ]
import com.salesforce.androidsdk.TestCredentials; import java.util.Arrays; import java.util.List; import org.apache.http.HttpStatus; import org.json.JSONObject;
import com.salesforce.androidsdk.*; import java.util.*; import org.apache.http.*; import org.json.*;
[ "com.salesforce.androidsdk", "java.util", "org.apache.http", "org.json" ]
com.salesforce.androidsdk; java.util; org.apache.http; org.json;
1,170,503
public static void createInputFile(final FileSystem fs, final Path path, final Set<Path> toCompactDirs) throws IOException { // Extract the list of store dirs List<Path> storeDirs = new LinkedList<Path>(); for (Path compactDir: toCompactDirs) { if (isFamilyDir(fs, compactDir)) { ...
static void function(final FileSystem fs, final Path path, final Set<Path> toCompactDirs) throws IOException { List<Path> storeDirs = new LinkedList<Path>(); for (Path compactDir: toCompactDirs) { if (isFamilyDir(fs, compactDir)) { storeDirs.add(compactDir); } else if (isRegionDir(fs, compactDir)) { for (Path familyDir...
/** * Create the input file for the given directories to compact. * The file is a TextFile with each line corrisponding to a * store files directory to compact. */
Create the input file for the given directories to compact. The file is a TextFile with each line corrisponding to a store files directory to compact
createInputFile
{ "repo_name": "zqxjjj/NobidaBase", "path": "target/hbase-0.94.9/hbase-0.94.9/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java", "license": "apache-2.0", "size": 18499 }
[ "java.io.IOException", "java.util.LinkedList", "java.util.List", "java.util.Set", "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.util.Bytes", "org.apache.hadoop.hbase.util.FSUtils" ]
import java.io.IOException; import java.util.LinkedList; import java.util.List; import java.util.Set; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.FSUtils;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
863,387
@Override public void storeAll(Map<Long, T> map) { for (Map.Entry<Long, T> entry : map.entrySet()) { store(entry.getKey(), entry.getValue()); } }
void function(Map<Long, T> map) { for (Map.Entry<Long, T> entry : map.entrySet()) { store(entry.getKey(), entry.getValue()); } }
/** * Stores multiple entries. Implementation of this method can optimize the * store operation by storing all entries in one database connection for instance. * * @param map map of entries to store */
Stores multiple entries. Implementation of this method can optimize the store operation by storing all entries in one database connection for instance
storeAll
{ "repo_name": "emre-aydin/hazelcast", "path": "hazelcast/src/test/java/com/hazelcast/collection/impl/queue/QueueStoreTest.java", "license": "apache-2.0", "size": 24872 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,508,933
@return A Mixer that is considered appropriate, or null if none is found. */ private static Mixer getFirstMixer(MixerProvider provider, Line.Info info, boolean isMixingRequired) { Mixer.Info[] infos = provider.getMixe...
@return A Mixer that is considered appropriate, or null if none is found. */ static Mixer function(MixerProvider provider, Line.Info info, boolean isMixingRequired) { Mixer.Info[] infos = provider.getMixerInfo(); for (int j = 0; j < infos.length; j++) { Mixer mixer = provider.getMixer(infos[j]); if (isAppropriateMixer(...
/** From a given MixerProvider, return the first appropriate Mixer. @param provider The MixerProvider to check for Mixers. @param info The type of line the returned Mixer is required to support. @param isMixingRequired If true, only Mixers that support mixing are returned for lin...
From a given MixerProvider, return the first appropriate Mixer
getFirstMixer
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/javax/sound/sampled/AudioSystem.java", "license": "apache-2.0", "size": 63644 }
[ "javax.sound.sampled.spi.MixerProvider" ]
import javax.sound.sampled.spi.MixerProvider;
import javax.sound.sampled.spi.*;
[ "javax.sound" ]
javax.sound;
380,751
public void setBaseLinesVisible(boolean flag) { this.baseLinesVisible = flag; notifyListeners(new RendererChangeEvent(this)); }
void function(boolean flag) { this.baseLinesVisible = flag; notifyListeners(new RendererChangeEvent(this)); }
/** * Sets the base 'lines visible' flag and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param flag the flag. * * @see #getBaseLinesVisible() */
Sets the base 'lines visible' flag and sends a <code>RendererChangeEvent</code> to all registered listeners
setBaseLinesVisible
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/jfreechart-1.0.5/source/org/jfree/chart/renderer/xy/XYLineAndShapeRenderer.java", "license": "lgpl-3.0", "size": 44950 }
[ "org.jfree.chart.event.RendererChangeEvent" ]
import org.jfree.chart.event.RendererChangeEvent;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
501,314
public void waitForState(ApplicationAttemptId attemptId, RMAppAttemptState finalState, int timeoutMsecs) throws InterruptedException { drainEventsImplicitly(); RMApp app = getRMContext().getRMApps().get(attemptId.getApplicationId()); Assert.assertNotNull("app shouldn't be null", app); RMAp...
void function(ApplicationAttemptId attemptId, RMAppAttemptState finalState, int timeoutMsecs) throws InterruptedException { drainEventsImplicitly(); RMApp app = getRMContext().getRMApps().get(attemptId.getApplicationId()); Assert.assertNotNull(STR, app); RMAppAttempt attempt = app.getRMAppAttempt(attemptId); MockRM.wai...
/** * Wait until an attempt has reached a specified state. * The timeout can be specified by the parameter. * @param attemptId the id of an attempt * @param finalState the attempt state waited * @param timeoutMsecs the length of timeout in milliseconds * @throws InterruptedException * if in...
Wait until an attempt has reached a specified state. The timeout can be specified by the parameter
waitForState
{ "repo_name": "WIgor/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/MockRM.java", "license": "apache-2.0", "size": 50169 }
[ "org.apache.hadoop.yarn.api.records.ApplicationAttemptId", "org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp", "org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt", "org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptState", "org.junit.Assert" ]
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptState; import org.junit.Assert...
import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
1,132,947
public static <K, V> Map<K, V> of(Map<K, V> map) { return new MRUMapCache<>(map); }
static <K, V> Map<K, V> function(Map<K, V> map) { return new MRUMapCache<>(map); }
/** * Wraps the specified map with a most recently used cache * * @param map * @param <K> * @param <V> * @return */
Wraps the specified map with a most recently used cache
of
{ "repo_name": "JBYoshi/SpongeCommon", "path": "src/main/java/co/aikar/util/MRUMapCache.java", "license": "mit", "size": 3678 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,403,880
public Charset getCharacterSet() { return (Charset) getParameter(CHARACTER_SET); }
Charset function() { return (Charset) getParameter(CHARACTER_SET); }
/** * Get the charset of the page being tracked * * @return the charset */
Get the charset of the page being tracked
getCharacterSet
{ "repo_name": "BCsorba/piwik-java-tracking-api", "path": "src/main/java/org/piwik/java/tracking/PiwikRequest.java", "license": "bsd-3-clause", "size": 65386 }
[ "java.nio.charset.Charset" ]
import java.nio.charset.Charset;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,058,505
private static String humanHelper(int flags, int mask, int what) { StringBuffer sb = new StringBuffer(80); int extra = flags & ~mask; flags &= mask; if ((flags & ACC_PUBLIC) != 0) { sb.append("|public"); } if ((flags & ACC_PRIVATE) != 0) { sb...
static String function(int flags, int mask, int what) { StringBuffer sb = new StringBuffer(80); int extra = flags & ~mask; flags &= mask; if ((flags & ACC_PUBLIC) != 0) { sb.append(STR); } if ((flags & ACC_PRIVATE) != 0) { sb.append(STR); } if ((flags & ACC_PROTECTED) != 0) { sb.append(STR); } if ((flags & ACC_STATIC) ...
/** * Helper to return a human-oriented string representing the given * access flags. * * @param flags the defined flags * @param mask mask for the "defined" bits * @param what what the flags represent (one of {@code CONV_*}) * @return {@code non-null;} human-oriented string */
Helper to return a human-oriented string representing the given access flags
humanHelper
{ "repo_name": "geekboxzone/lollipop_external_dexmaker", "path": "src/dx/java/com/android/dx/rop/code/AccessFlags.java", "license": "apache-2.0", "size": 11450 }
[ "com.android.dx.util.Hex" ]
import com.android.dx.util.Hex;
import com.android.dx.util.*;
[ "com.android.dx" ]
com.android.dx;
1,376,286
public Properties getCurrentProperties() throws Exception { return serverImpl.getCurrentProperties(); }
Properties function() throws Exception { return serverImpl.getCurrentProperties(); }
/** * Get current Network server properties * * @return Properties object containing Network server properties * @exception Exception throws an exception if an error occurs */
Get current Network server properties
getCurrentProperties
{ "repo_name": "xuzhikethinker/t4f-data", "path": "sql/jpa/datanucleus/src/main/java/aos/server/db/DatabaseServerControlRunnable.java", "license": "apache-2.0", "size": 24039 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,856,623
protected boolean adjustVertical() { if (mLabelHorizontalHeight == null) { return false; } double minY = mGraphView.getViewport().getMinY(false); double maxY = mGraphView.getViewport().getMaxY(false); if (minY == maxY) { return false; } ...
boolean function() { if (mLabelHorizontalHeight == null) { return false; } double minY = mGraphView.getViewport().getMinY(false); double maxY = mGraphView.getViewport().getMaxY(false); if (minY == maxY) { return false; } int numVerticalLabels = mNumVerticalLabels; double newMinY; double exactSteps; if (mGraphView.getVi...
/** * calculates the vertical steps. This will * automatically change the bounds to nice * human-readable min/max. * * @return true if it is ready */
calculates the vertical steps. This will automatically change the bounds to nice human-readable min/max
adjustVertical
{ "repo_name": "nartex/GraphView", "path": "library/src/main/java/com/jjoe64/graphview/GridLabelRenderer.java", "license": "gpl-2.0", "size": 47157 }
[ "java.util.LinkedHashMap" ]
import java.util.LinkedHashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,864,924
private boolean updateName(FileAwareInputStream fileAwareInputStream, boolean firstEntrySeen, String newFileName) { if (!firstEntrySeen) { fileAwareInputStream.getFile().setDestination( new Path(fileAwareInputStream.getFile().getDestination().getParent(), newFileName)); fileAwareInputStream....
boolean function(FileAwareInputStream fileAwareInputStream, boolean firstEntrySeen, String newFileName) { if (!firstEntrySeen) { fileAwareInputStream.getFile().setDestination( new Path(fileAwareInputStream.getFile().getDestination().getParent(), newFileName)); fileAwareInputStream.getFile().setRelativeDestination( new ...
/** * If this is the first entry in the tar, reset the destination file name to the name of the first entry in the tar. * It is required to change the name of the destination file because the untarred file/dir name is NOT known to the * source */
If this is the first entry in the tar, reset the destination file name to the name of the first entry in the tar. It is required to change the name of the destination file because the untarred file/dir name is NOT known to the source
updateName
{ "repo_name": "Hanmourang/Gobblin", "path": "gobblin-data-management/src/main/java/gobblin/data/management/copy/writer/TarArchiveInputStreamDataWriter.java", "license": "apache-2.0", "size": 4710 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
718,089
public void writeByte(byte b) throws IOException { out.write(Type.BYTE.code); out.write(b); }
void function(byte b) throws IOException { out.write(Type.BYTE.code); out.write(b); }
/** * Writes a byte as a typed bytes sequence. * * @param b * the byte to be written * @throws IOException */
Writes a byte as a typed bytes sequence
writeByte
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesOutput.java", "license": "apache-2.0", "size": 8487 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,130,705
Module with(Iterable<? extends Module> overrides); } private static final class RealOverriddenModuleBuilder implements OverriddenModuleBuilder { private final ImmutableSet<Module> baseModules; private RealOverriddenModuleBuilder(Iterable<? extends Module> baseModules) { // ...
Module with(Iterable<? extends Module> overrides); } private static final class RealOverriddenModuleBuilder implements OverriddenModuleBuilder { private final ImmutableSet<Module> baseModules; private RealOverriddenModuleBuilder(Iterable<? extends Module> baseModules) { this.baseModules = ImmutableSet.<Module>copyOf(ba...
/** * See the EDSL example at {@link Modules#override(Module[]) override()}. */
See the EDSL example at <code>Modules#override(Module[]) override()</code>
with
{ "repo_name": "vingupta3/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/inject/util/Modules.java", "license": "apache-2.0", "size": 12005 }
[ "com.google.common.collect.ImmutableSet", "org.elasticsearch.common.inject.Module" ]
import com.google.common.collect.ImmutableSet; import org.elasticsearch.common.inject.Module;
import com.google.common.collect.*; import org.elasticsearch.common.inject.*;
[ "com.google.common", "org.elasticsearch.common" ]
com.google.common; org.elasticsearch.common;
717,273
public final void setBook(Book book) { this.book = book; }
final void function(Book book) { this.book = book; }
/** * Set the book to fill. * * @param book The book to fill. */
Set the book to fill
setBook
{ "repo_name": "wichtounet/jtheque-books-module", "path": "src/main/java/org/jtheque/books/services/impl/utils/web/analyzers/AbstractBookAnalyzer.java", "license": "apache-2.0", "size": 8183 }
[ "org.jtheque.books.persistence.od.able.Book" ]
import org.jtheque.books.persistence.od.able.Book;
import org.jtheque.books.persistence.od.able.*;
[ "org.jtheque.books" ]
org.jtheque.books;
2,664,438
public static void save(PApplet papp, MStyledString ss, String fname){ OutputStream os; ObjectOutputStream oos; try { os = papp.createOutput(fname); oos = new ObjectOutputStream(os); oos.writeObject(ss); os.close(); oos.close(); } catch (IOException e) { e.printStackTrace(); } }
static void function(PApplet papp, MStyledString ss, String fname){ OutputStream os; ObjectOutputStream oos; try { os = papp.createOutput(fname); oos = new ObjectOutputStream(os); oos.writeObject(ss); os.close(); oos.close(); } catch (IOException e) { e.printStackTrace(); } }
/** * Save the named StyleString in the named file. * * @param papp * @param ss the styled string * @param fname */
Save the named StyleString in the named file
save
{ "repo_name": "chcbaram/Processing_RokitDrone", "path": "libraries/GameControlPlus/src/org/gamecontrolplus/gui/MStyledString.java", "license": "mit", "size": 34027 }
[ "java.io.IOException", "java.io.ObjectOutputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.ObjectOutputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,879,872
public List<ZKListener> getListeners() { return new ArrayList<>(listeners); }
List<ZKListener> function() { return new ArrayList<>(listeners); }
/** * Get a copy of current registered listeners */
Get a copy of current registered listeners
getListeners
{ "repo_name": "HubSpot/hbase", "path": "hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java", "license": "apache-2.0", "size": 26565 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
444,288
public void synchronize(List<QueryControllerEntity> queryEntities) { if (queryEntities.size() > 0) { for (QueryControllerEntity queryEntity : queryEntities) { if (queryEntity instanceof QueryControllerGroup) { QueryControllerGroup group = (QueryControllerGroup) queryEntity; QueryGroupTreeElement ...
void function(List<QueryControllerEntity> queryEntities) { if (queryEntities.size() > 0) { for (QueryControllerEntity queryEntity : queryEntities) { if (queryEntity instanceof QueryControllerGroup) { QueryControllerGroup group = (QueryControllerGroup) queryEntity; QueryGroupTreeElement queryGroupEle = new QueryGroupTre...
/** * Takes all the existing nodes and constructs the tree. */
Takes all the existing nodes and constructs the tree
synchronize
{ "repo_name": "srapisarda/ontop", "path": "ontop-protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java", "license": "apache-2.0", "size": 9821 }
[ "it.unibz.inf.ontop.querymanager.QueryControllerEntity", "it.unibz.inf.ontop.querymanager.QueryControllerGroup", "it.unibz.inf.ontop.querymanager.QueryControllerQuery", "java.util.List", "java.util.Vector", "javax.swing.tree.DefaultMutableTreeNode" ]
import it.unibz.inf.ontop.querymanager.QueryControllerEntity; import it.unibz.inf.ontop.querymanager.QueryControllerGroup; import it.unibz.inf.ontop.querymanager.QueryControllerQuery; import java.util.List; import java.util.Vector; import javax.swing.tree.DefaultMutableTreeNode;
import it.unibz.inf.ontop.querymanager.*; import java.util.*; import javax.swing.tree.*;
[ "it.unibz.inf", "java.util", "javax.swing" ]
it.unibz.inf; java.util; javax.swing;
2,221,892
protected RegionConfiguration createRegionConfiguration() { RegionConfiguration configuration = new RegionConfiguration(); configuration.setRegionName((String) properties.get(CacheProperty.REGION_NAME)); configuration .setRegionAttributesId((String) properties.get(CacheProperty.REGION_ATTRIBUTES_...
RegionConfiguration function() { RegionConfiguration configuration = new RegionConfiguration(); configuration.setRegionName((String) properties.get(CacheProperty.REGION_NAME)); configuration .setRegionAttributesId((String) properties.get(CacheProperty.REGION_ATTRIBUTES_ID)); configuration.setEnableGatewayDeltaReplicati...
/** * Build up a {@code RegionConfiguraton} object from parameters originally passed in as filter * initialization parameters. * * @return a {@code RegionConfiguration} object */
Build up a RegionConfiguraton object from parameters originally passed in as filter initialization parameters
createRegionConfiguration
{ "repo_name": "pivotal-amurmann/geode", "path": "extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/common/AbstractSessionCache.java", "license": "apache-2.0", "size": 3629 }
[ "org.apache.geode.modules.util.RegionConfiguration", "org.apache.geode.modules.util.SessionCustomExpiry" ]
import org.apache.geode.modules.util.RegionConfiguration; import org.apache.geode.modules.util.SessionCustomExpiry;
import org.apache.geode.modules.util.*;
[ "org.apache.geode" ]
org.apache.geode;
1,553,006
@Test @Category({ ValidatesRunner.class, UsesTimersInParDo.class, DataflowPortabilityApiUnsupported.class }) public void testEventTimeTimerMultipleKeys() throws Exception { final String timerId = "foo"; final String stateId = "sizzle"; final int offset = 5000; ...
@Category({ ValidatesRunner.class, UsesTimersInParDo.class, DataflowPortabilityApiUnsupported.class }) void function() throws Exception { final String timerId = "foo"; final String stateId = STR; final int offset = 5000; final int timerOutput = 4093; DoFn<KV<String, Integer>, KV<String, Integer>> fn = new DoFn<KV<Strin...
/** * Tests that event time timers for multiple keys both fire. This particularly exercises * implementations that may GC in ways not simply governed by the watermark. */
Tests that event time timers for multiple keys both fire. This particularly exercises implementations that may GC in ways not simply governed by the watermark
testEventTimeTimerMultipleKeys
{ "repo_name": "markflyhigh/incubator-beam", "path": "sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java", "license": "apache-2.0", "size": 144563 }
[ "org.apache.beam.sdk.coders.Coder", "org.apache.beam.sdk.coders.StringUtf8Coder", "org.apache.beam.sdk.state.StateSpec", "org.apache.beam.sdk.state.StateSpecs", "org.apache.beam.sdk.state.TimeDomain", "org.apache.beam.sdk.state.TimerSpec", "org.apache.beam.sdk.state.TimerSpecs", "org.apache.beam.sdk.s...
import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.StringUtf8Coder; import org.apache.beam.sdk.state.StateSpec; import org.apache.beam.sdk.state.StateSpecs; import org.apache.beam.sdk.state.TimeDomain; import org.apache.beam.sdk.state.TimerSpec; import org.apache.beam.sdk.state.TimerSpecs; impor...
import org.apache.beam.sdk.coders.*; import org.apache.beam.sdk.state.*; import org.apache.beam.sdk.testing.*; import org.junit.experimental.categories.*;
[ "org.apache.beam", "org.junit.experimental" ]
org.apache.beam; org.junit.experimental;
601,717
@Override public final String format(final Date date) { if (date == null) return ""; if (Math.abs(date.getTime() - last_time) < 1000) return last_format; synchronized (FORMAT_ISO8601) { last_format = FORMAT_ISO8601.format(date); last_time = date.getTime(); ...
final String function(final Date date) { if (date == null) return ""; if (Math.abs(date.getTime() - last_time) < 1000) return last_format; synchronized (FORMAT_ISO8601) { last_format = FORMAT_ISO8601.format(date); last_time = date.getTime(); } return last_format; }
/** * Creates a String representation of a Date using the format defined * in ISO8601/W3C datetime * The result will be in UTC/GMT, e.g. "2007-12-19T10:20:30Z". * * @param date The Date instance to transform. * @return A fixed width (20 chars) ISO8601 date String. */
Creates a String representation of a Date using the format defined in ISO8601/W3C datetime The result will be in UTC/GMT, e.g. "2007-12-19T10:20:30Z"
format
{ "repo_name": "automenta/kelondro", "path": "src/main/java/yacy/cora/date/ISO8601Formatter.java", "license": "lgpl-2.1", "size": 8492 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,002,387
public void oneShot(View emiter, int numParticles) { oneShot(emiter, numParticles, new LinearInterpolator()); }
void function(View emiter, int numParticles) { oneShot(emiter, numParticles, new LinearInterpolator()); }
/** * Launches particles in one Shot * * @param emiter View from which center the particles will be emited * @param numParticles number of particles launched on the one shot */
Launches particles in one Shot
oneShot
{ "repo_name": "DanDits/WhatsThat", "path": "leonidlib/src/main/java/com/plattysoft/leonids/ParticleSystem.java", "license": "apache-2.0", "size": 25060 }
[ "android.view.View", "android.view.animation.LinearInterpolator" ]
import android.view.View; import android.view.animation.LinearInterpolator;
import android.view.*; import android.view.animation.*;
[ "android.view" ]
android.view;
1,221,704
public String getTimeStamp() throws ArrayIndexOutOfBoundsException { String timeStamp = this.quotesTimeStamp; if (!this.widget.showShortTime()) { String date = new SimpleDateFormat("dd MMM").format(new Date()).toUpperCase(); // Check if we should use yesterdays date or today...
String function() throws ArrayIndexOutOfBoundsException { String timeStamp = this.quotesTimeStamp; if (!this.widget.showShortTime()) { String date = new SimpleDateFormat(STR).format(new Date()).toUpperCase(); String[] parts = timeStamp.split(" "); String fullDate = parts[0] + " " + parts[1]; if (fullDate.equals(date)) ...
/** * Returns the current date and time as String * * @return the current date */
Returns the current date and time as String
getTimeStamp
{ "repo_name": "Skrittles/SPMinistocks", "path": "src/nitezh/ministock/activities/widget/WidgetView.java", "license": "mit", "size": 41794 }
[ "java.text.SimpleDateFormat", "java.util.Date" ]
import java.text.SimpleDateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,866,123
public Map<String, Set<IAchievement>> getAllAchievementByEvent() { return controller.getAllByEvents(); }
Map<String, Set<IAchievement>> function() { return controller.getAllByEvents(); }
/** * Returns all defined achievements sorted by event subsciprions. * * @return {@link Map} of event name and {@link IAchievement} pairs. */
Returns all defined achievements sorted by event subsciprions
getAllAchievementByEvent
{ "repo_name": "csongradyp/BadgeR", "path": "badger.integration/src/main/java/net/csongradyp/badger/Badger.java", "license": "mit", "size": 8108 }
[ "java.util.Map", "java.util.Set", "net.csongradyp.badger.domain.IAchievement" ]
import java.util.Map; import java.util.Set; import net.csongradyp.badger.domain.IAchievement;
import java.util.*; import net.csongradyp.badger.domain.*;
[ "java.util", "net.csongradyp.badger" ]
java.util; net.csongradyp.badger;
2,756,337
public List<CorporationKillmailsResponse> getCorporationsCorporationIdKillmailsRecent(Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'corporationId' is set ...
List<CorporationKillmailsResponse> function(Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token) throws ApiException { Object localVarPostBody = null; if (corporationId == null) { throw new ApiException(400, STR); } String localVarPath = STR.replaceAll(STR, "json") .replaceAll("\\{"...
/** * Get a corporation&#39;s recent kills and losses Get a list of a * corporation&#39;s kills and losses going back 90 days --- This route is * cached for up to 300 seconds --- Requires one of the following EVE * corporation role(s): Director SSO Scope: * esi-killmails.read_corporation_killma...
Get a corporation&#39;s recent kills and losses Get a list of a corporation&#39;s kills and losses going back 90 days --- This route is cached for up to 300 seconds --- Requires one of the following EVE corporation role(s): Director SSO Scope: esi-killmails.read_corporation_killmails.v1
getCorporationsCorporationIdKillmailsRecent
{ "repo_name": "GoldenGnu/eve-esi", "path": "src/main/java/net/troja/eve/esi/api/KillmailsApi.java", "license": "apache-2.0", "size": 10332 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "net.troja.eve.esi.ApiException", "net.troja.eve.esi.Pair", "net.troja.eve.esi.model.CorporationKillmailsResponse" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import net.troja.eve.esi.ApiException; import net.troja.eve.esi.Pair; import net.troja.eve.esi.model.CorporationKillmailsResponse;
import java.util.*; import net.troja.eve.esi.*; import net.troja.eve.esi.model.*;
[ "java.util", "net.troja.eve" ]
java.util; net.troja.eve;
2,115,927
protected ResolvedValue createResult(final ValueSpecification valueSpecification, final ParameterizedFunction parameterizedFunction, final Set<ValueSpecification> functionInputs, final Set<ValueSpecification> functionOutputs) { return new ResolvedValue(valueSpecification, parameterizedFunction, functi...
ResolvedValue function(final ValueSpecification valueSpecification, final ParameterizedFunction parameterizedFunction, final Set<ValueSpecification> functionInputs, final Set<ValueSpecification> functionOutputs) { return new ResolvedValue(valueSpecification, parameterizedFunction, functionInputs, functionOutputs); }
/** * Creates a result instance. * <p> * The {@code valueSpecification} specification must be a normalized/canonical form. * * @param valueSpecification * the resolved value specification, as it will appear in the dependency graph, not null * @param parameterizedFunction ...
Creates a result instance. The valueSpecification specification must be a normalized/canonical form
createResult
{ "repo_name": "McLeodMoores/starling", "path": "projects/engine/src/main/java/com/opengamma/engine/depgraph/ResolveTask.java", "license": "apache-2.0", "size": 12035 }
[ "com.opengamma.engine.function.ParameterizedFunction", "com.opengamma.engine.value.ValueSpecification", "java.util.Set" ]
import com.opengamma.engine.function.ParameterizedFunction; import com.opengamma.engine.value.ValueSpecification; import java.util.Set;
import com.opengamma.engine.function.*; import com.opengamma.engine.value.*; import java.util.*;
[ "com.opengamma.engine", "java.util" ]
com.opengamma.engine; java.util;
2,457,684
public static Object invokeMethod(Method method, Object target) { return invokeMethod(method, target, null); }
static Object function(Method method, Object target) { return invokeMethod(method, target, null); }
/** * Invoke the specified {@link Method} against the supplied target object * with no arguments. The target object can be <code>null</code> when * invoking a static {@link Method}. * <p>Thrown exceptions are handled via a call to {@link #handleReflectionException}. * @param method the method to invoke * @p...
Invoke the specified <code>Method</code> against the supplied target object with no arguments. The target object can be <code>null</code> when invoking a static <code>Method</code>. Thrown exceptions are handled via a call to <code>#handleReflectionException</code>
invokeMethod
{ "repo_name": "qiuhd2015/Hpgsc-RPC", "path": "hpgsc-rpc/src/main/java/org/hdl/hggsc/rpc/utils/ReflectionUtils.java", "license": "mit", "size": 22350 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
106,987
protected String getUploadUri() { return CmsCoreProvider.get().link(I_CmsUploadConstants.UPLOAD_ACTION_JSP_URI); }
String function() { return CmsCoreProvider.get().link(I_CmsUploadConstants.UPLOAD_ACTION_JSP_URI); }
/** * Returns the upload JSP uri.<p> * * @return the upload JSP uri */
Returns the upload JSP uri
getUploadUri
{ "repo_name": "serrapos/opencms-core", "path": "src-gwt/org/opencms/ade/upload/client/ui/A_CmsUploadDialog.java", "license": "lgpl-2.1", "size": 47638 }
[ "org.opencms.gwt.client.CmsCoreProvider" ]
import org.opencms.gwt.client.CmsCoreProvider;
import org.opencms.gwt.client.*;
[ "org.opencms.gwt" ]
org.opencms.gwt;
2,373,802
public Verb getMethod() { return method; }
Verb function() { return method; }
/** * Get request method. * * @return Request HTTP method */
Get request method
getMethod
{ "repo_name": "rockihack/Stud.IP-FileSync", "path": "src/de/uni/hannover/studip/sync/models/JacksonRequest.java", "license": "gpl-3.0", "size": 2908 }
[ "org.scribe.model.Verb" ]
import org.scribe.model.Verb;
import org.scribe.model.*;
[ "org.scribe.model" ]
org.scribe.model;
2,169,588
protected void parseSYNCCTL() throws DRDAProtocolException { reader.markCollection(); int codePoint = reader.getCodePoint(CodePoint.SYNCTYPE); int syncType = parseSYNCTYPE(); int xaflags = 0; boolean readXAFlags = false; Xid xid = null; ...
void function() throws DRDAProtocolException { reader.markCollection(); int codePoint = reader.getCodePoint(CodePoint.SYNCTYPE); int syncType = parseSYNCTYPE(); int xaflags = 0; boolean readXAFlags = false; Xid xid = null; long xaTimeout = -1; boolean readXATimeout = false; codePoint = reader.getCodePoint(); while (cod...
/** * Parse SYNCCTL - Parse SYNCCTL command for XAMGR lvl 7 * */
Parse SYNCCTL - Parse SYNCCTL command for XAMGR lvl 7
parseSYNCCTL
{ "repo_name": "scnakandala/derby", "path": "java/drda/org/apache/derby/impl/drda/DRDAXAProtocol.java", "license": "apache-2.0", "size": 24371 }
[ "javax.transaction.xa.Xid", "org.apache.derby.shared.common.sanity.SanityManager" ]
import javax.transaction.xa.Xid; import org.apache.derby.shared.common.sanity.SanityManager;
import javax.transaction.xa.*; import org.apache.derby.shared.common.sanity.*;
[ "javax.transaction", "org.apache.derby" ]
javax.transaction; org.apache.derby;
2,639,363
public short addTo(final long k, final short incr) { // The starting point. int pos = (int)it.unimi.dsi.fastutil.HashCommon.murmurHash3(k) & mask; // There's always an unused entry. while( used[ pos ] ) { if ( ( (key[ pos ]) == (k) ) ) { final short oldValue = value[ pos ]; value[ pos ] += incr; ...
short function(final long k, final short incr) { int pos = (int)it.unimi.dsi.fastutil.HashCommon.murmurHash3(k) & mask; while( used[ pos ] ) { if ( ( (key[ pos ]) == (k) ) ) { final short oldValue = value[ pos ]; value[ pos ] += incr; return oldValue; } pos = ( pos + 1 ) & mask; } used[ pos ] = true; key[ pos ] = k; va...
/** Adds an increment to value currently associated with a key. * * <P>Note that this method respects the {@linkplain #defaultReturnValue() default return value} semantics: when * called with a key that does not currently appears in the map, the key * will be associated with the default return value plus * th...
Adds an increment to value currently associated with a key. Note that this method respects the #defaultReturnValue() default return value semantics: when called with a key that does not currently appears in the map, the key will be associated with the default return value plus the given increment
addTo
{ "repo_name": "karussell/fastutil", "path": "src/it/unimi/dsi/fastutil/longs/Long2ShortLinkedOpenHashMap.java", "license": "apache-2.0", "size": 48445 }
[ "it.unimi.dsi.fastutil.HashCommon" ]
import it.unimi.dsi.fastutil.HashCommon;
import it.unimi.dsi.fastutil.*;
[ "it.unimi.dsi" ]
it.unimi.dsi;
1,231,416
public boolean checkSweDataArrayObservationsFor(String offeringIdentifier, Session session) { return checkObservationFor(SweDataArrayObservation.class, offeringIdentifier, session); }
boolean function(String offeringIdentifier, Session session) { return checkObservationFor(SweDataArrayObservation.class, offeringIdentifier, session); }
/** * Check if there are geometry observations for the offering * * @param offeringIdentifier * Offering identifier * @param session * Hibernate session * @return If there are observations or not */
Check if there are geometry observations for the offering
checkSweDataArrayObservationsFor
{ "repo_name": "geomatico/52n-sos-4.0", "path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/ObservationDAO.java", "license": "gpl-2.0", "size": 26233 }
[ "org.hibernate.Session", "org.n52.sos.ds.hibernate.entities.SweDataArrayObservation" ]
import org.hibernate.Session; import org.n52.sos.ds.hibernate.entities.SweDataArrayObservation;
import org.hibernate.*; import org.n52.sos.ds.hibernate.entities.*;
[ "org.hibernate", "org.n52.sos" ]
org.hibernate; org.n52.sos;
2,771,046
public Person getLeadResearcher() { return getStartingPerson(); }
Person function() { return getStartingPerson(); }
/** * Gets the lead researcher for the mission. * * @return the researcher. */
Gets the lead researcher for the mission
getLeadResearcher
{ "repo_name": "mars-sim/mars-sim", "path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/FieldStudyMission.java", "license": "gpl-3.0", "size": 14589 }
[ "org.mars_sim.msp.core.person.Person" ]
import org.mars_sim.msp.core.person.Person;
import org.mars_sim.msp.core.person.*;
[ "org.mars_sim.msp" ]
org.mars_sim.msp;
1,497,657
@NonNull public CachedEngineFragmentBuilder handleDeeplinking(@NonNull Boolean handleDeeplinking) { this.handleDeeplinking = handleDeeplinking; return this; } /** * Whether or not this {@code FlutterFragment} should automatically attach its {@code Activity}
CachedEngineFragmentBuilder function(@NonNull Boolean handleDeeplinking) { this.handleDeeplinking = handleDeeplinking; return this; } /** * Whether or not this {@code FlutterFragment} should automatically attach its {@code Activity}
/** * Whether to handle the deeplinking from the {@code Intent} automatically if the {@code * getInitialRoute} returns null. */
Whether to handle the deeplinking from the Intent automatically if the getInitialRoute returns null
handleDeeplinking
{ "repo_name": "flutter/engine", "path": "shell/platform/android/io/flutter/embedding/android/FlutterFragment.java", "license": "bsd-3-clause", "size": 57179 }
[ "android.app.Activity", "androidx.annotation.NonNull" ]
import android.app.Activity; import androidx.annotation.NonNull;
import android.app.*; import androidx.annotation.*;
[ "android.app", "androidx.annotation" ]
android.app; androidx.annotation;
2,209,201
try (Socket socket = new Socket(hostname, port)) { return true; } catch (IOException e) { return false; } }
try (Socket socket = new Socket(hostname, port)) { return true; } catch (IOException e) { return false; } }
/** * Validates whether a network address is reachable. * * @param hostname host name of the network address * @param port port of the network address * @return whether the network address is reachable */
Validates whether a network address is reachable
isAddressReachable
{ "repo_name": "riversand963/alluxio", "path": "core/server/common/src/main/java/alluxio/cli/validation/Utils.java", "license": "apache-2.0", "size": 6621 }
[ "java.io.IOException", "java.net.Socket" ]
import java.io.IOException; import java.net.Socket;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,528,534
private Object getValue(final String key, final Object value) { if (value instanceof BigDecimal) { switch (fieldMap.get(key).type().typeId()) { case LONG: return ((BigDecimal) value).longValue(); case INTEGER: return ((BigDe...
Object function(final String key, final Object value) { if (value instanceof BigDecimal) { switch (fieldMap.get(key).type().typeId()) { case LONG: return ((BigDecimal) value).longValue(); case INTEGER: return ((BigDecimal) value).intValue(); case DOUBLE: return ((BigDecimal) value).doubleValue(); case FLOAT: return ((B...
/** * Transform the value type to iceberg type. * * @param key the input filter key * @param value the input filter value * @return iceberg type */
Transform the value type to iceberg type
getValue
{ "repo_name": "Netflix/metacat", "path": "metacat-connector-hive/src/main/java/com/netflix/metacat/connector/hive/util/IcebergFilterGenerator.java", "license": "apache-2.0", "size": 9559 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,319,175
public Collection<KickstartCommand> getCommands() { return this.commands; }
Collection<KickstartCommand> function() { return this.commands; }
/** * Getter for commands * @return Returns commands */
Getter for commands
getCommands
{ "repo_name": "renner/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java", "license": "gpl-2.0", "size": 48300 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,804,505
private boolean verifySetCssNameMapping(NodeTraversal t, Node methodName, Node firstArg) { DiagnosticType diagnostic = null; if (firstArg == null) { diagnostic = NULL_ARGUMENT_ERROR; } else if (!firstArg.isObjectLit()) { diagnostic = EXPECTED_OBJECTLIT_ERROR; } else if (firstArg.getN...
boolean function(NodeTraversal t, Node methodName, Node firstArg) { DiagnosticType diagnostic = null; if (firstArg == null) { diagnostic = NULL_ARGUMENT_ERROR; } else if (!firstArg.isObjectLit()) { diagnostic = EXPECTED_OBJECTLIT_ERROR; } else if (firstArg.getNext() != null) { Node secondArg = firstArg.getNext(); if (!...
/** * Verifies that setCssNameMapping is called with the correct methods. * * @return Whether the arguments checked out okay */
Verifies that setCssNameMapping is called with the correct methods
verifySetCssNameMapping
{ "repo_name": "superkonduktr/closure-compiler", "path": "src/com/google/javascript/jscomp/ProcessClosurePrimitives.java", "license": "apache-2.0", "size": 54718 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
249,234
public SpringApplicationBuilder child(Class<?>... sources) { SpringApplicationBuilder child = new SpringApplicationBuilder(); child.sources(sources); // Copy environment stuff from parent to child child.properties(this.defaultProperties).environment(this.environment) .additionalProfiles(this.additionalP...
SpringApplicationBuilder function(Class<?>... sources) { SpringApplicationBuilder child = new SpringApplicationBuilder(); child.sources(sources); child.properties(this.defaultProperties).environment(this.environment) .additionalProfiles(this.additionalProfiles); child.parent = this; web(WebApplicationType.NONE); banner...
/** * Create a child application with the provided sources. Default args and environment * are copied down into the child, but everything else is a clean sheet. * @param sources the sources for the application (Spring configuration) * @return the child application builder */
Create a child application with the provided sources. Default args and environment are copied down into the child, but everything else is a clean sheet
child
{ "repo_name": "bclozel/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java", "license": "apache-2.0", "size": 17359 }
[ "org.springframework.boot.Banner", "org.springframework.boot.WebApplicationType" ]
import org.springframework.boot.Banner; import org.springframework.boot.WebApplicationType;
import org.springframework.boot.*;
[ "org.springframework.boot" ]
org.springframework.boot;
929,084
Collections.sort(input, new Comparator<Shape>() {
Collections.sort(input, new Comparator<Shape>() {
/** * RWordle-L algorithm. * * @param input * List of shapes to be layouted. * @return List of layouted shapes. */
RWordle-L algorithm
generateLayoutLinear
{ "repo_name": "HendrikStrobelt/ditop_server", "path": "src/main/java/de/hs8/graphics/RWordle.java", "license": "bsd-3-clause", "size": 6183 }
[ "java.awt.Shape", "java.util.Collections", "java.util.Comparator" ]
import java.awt.Shape; import java.util.Collections; import java.util.Comparator;
import java.awt.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
1,860,906
@ServiceMethod(returns = ReturnType.SINGLE) Response<ApplicationSecurityGroupInner> getByResourceGroupWithResponse( String resourceGroupName, String applicationSecurityGroupName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<ApplicationSecurityGroupInner> getByResourceGroupWithResponse( String resourceGroupName, String applicationSecurityGroupName, Context context);
/** * Gets information about the specified application security group. * * @param resourceGroupName The name of the resource group. * @param applicationSecurityGroupName The name of the application security group. * @param context The context to associate with this operation. * @throws Ill...
Gets information about the specified application security group
getByResourceGroupWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ApplicationSecurityGroupsClient.java", "license": "mit", "size": 25248 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.ApplicationSecurityGroupInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.ApplicationSecurityGroupInner;
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,594,524
public List<GlobalProperty> getGlobalPropertiesBySuffix(String suffix);
List<GlobalProperty> function(String suffix);
/** * Gets all global properties that end with <code>suffix</code>. * * @param prefix The end of the property name to match. * @return a <code>List</code> of <code>GlobalProperty</code>s that match <code>.*suffix</code> * @since 1.6 * @should return all relevant global properties in the database */
Gets all global properties that end with <code>suffix</code>
getGlobalPropertiesBySuffix
{ "repo_name": "Winbobob/openmrs-core", "path": "api/src/main/java/org/openmrs/api/AdministrationService.java", "license": "mpl-2.0", "size": 24849 }
[ "java.util.List", "org.openmrs.GlobalProperty" ]
import java.util.List; import org.openmrs.GlobalProperty;
import java.util.*; import org.openmrs.*;
[ "java.util", "org.openmrs" ]
java.util; org.openmrs;
670,754
private Character findMismatches(String s) { Deque<Character> state = new ArrayDeque<Character>(); for (Character c : s.toCharArray()) { if (NESTING_OPENINGS.contains(c)) { state.push(NESTING_PAIRS.get(c)); } else if (NESTING_CLOSINGS.contains(c)) { if (state.isEmpty() || !state.pe...
Character function(String s) { Deque<Character> state = new ArrayDeque<Character>(); for (Character c : s.toCharArray()) { if (NESTING_OPENINGS.contains(c)) { state.push(NESTING_PAIRS.get(c)); } else if (NESTING_CLOSINGS.contains(c)) { if (state.isEmpty() !state.peek().equals(c)) { return c; } state.pop(); } } if (!sta...
/** * looks for mismatched ()s, []s, and {}s * * @reurn Character representing the mismatched item, or null if there * are no mismatches */
looks for mismatched ()s, []s, and {}s
findMismatches
{ "repo_name": "xenomachina/gxp", "path": "java/src/com/google/gxp/compiler/codegen/OutputLanguageUtil.java", "license": "apache-2.0", "size": 7318 }
[ "java.util.ArrayDeque", "java.util.Deque" ]
import java.util.ArrayDeque; import java.util.Deque;
import java.util.*;
[ "java.util" ]
java.util;
356,610
public DateHolder setBeginOfMonth() { calendar.set(Calendar.DAY_OF_MONTH, 1); setBeginOfDay(); return this; }
DateHolder function() { calendar.set(Calendar.DAY_OF_MONTH, 1); setBeginOfDay(); return this; }
/** * Sets the date to the beginning of the month (first day of month) and calls setBeginOfDay. * @see #setBeginOfDay() */
Sets the date to the beginning of the month (first day of month) and calls setBeginOfDay
setBeginOfMonth
{ "repo_name": "micromata/projectforge-webapp", "path": "src/main/java/org/projectforge/common/DateHolder.java", "license": "gpl-3.0", "size": 21653 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
655,287
void fillListsOfExecutions(List<AuthenticationExecutionModel> executionsToProcess, List<AuthenticationExecutionModel> requiredList, List<AuthenticationExecutionModel> alternativeList) { for (AuthenticationExecutionModel execution : executionsToProcess) { if (isConditionalAuthenticator(execution)...
void fillListsOfExecutions(List<AuthenticationExecutionModel> executionsToProcess, List<AuthenticationExecutionModel> requiredList, List<AuthenticationExecutionModel> alternativeList) { for (AuthenticationExecutionModel execution : executionsToProcess) { if (isConditionalAuthenticator(execution)) { continue; } else if ...
/** * Just iterates over executionsToProcess and fill "requiredList" and "alternativeList" according to it */
Just iterates over executionsToProcess and fill "requiredList" and "alternativeList" according to it
fillListsOfExecutions
{ "repo_name": "mhajas/keycloak", "path": "services/src/main/java/org/keycloak/authentication/DefaultAuthenticationFlow.java", "license": "apache-2.0", "size": 29088 }
[ "java.util.List", "java.util.stream.Collectors", "org.keycloak.models.AuthenticationExecutionModel" ]
import java.util.List; import java.util.stream.Collectors; import org.keycloak.models.AuthenticationExecutionModel;
import java.util.*; import java.util.stream.*; import org.keycloak.models.*;
[ "java.util", "org.keycloak.models" ]
java.util; org.keycloak.models;
2,008,379
public static boolean addLastCause(@Nullable Throwable e, @Nullable Throwable cause, IgniteLogger log) { if (e == null || cause == null) return false; for (Throwable t = e; t != null; t = t.getCause()) { if (t == cause) return false; if (t.getCau...
static boolean function(@Nullable Throwable e, @Nullable Throwable cause, IgniteLogger log) { if (e == null cause == null) return false; for (Throwable t = e; t != null; t = t.getCause()) { if (t == cause) return false; if (t.getCause() == null t.getCause() == t) { try { t.initCause(cause); } catch (IllegalStateExcepti...
/** * Adds cause to the end of cause chain. * * @param e Error to add cause to. * @param cause Cause to add. * @param log Logger to log failure when cause can not be added. * @return {@code True} if cause was added. */
Adds cause to the end of cause chain
addLastCause
{ "repo_name": "SomeFire/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 374177 }
[ "org.apache.ignite.IgniteLogger", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.IgniteLogger; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
211,430
private BlogTO createTopicTO(EditTopicMessage message, Blog existingTopic) { Topic topic = message.getTopic(); BlogTO topicTO = new BlogTO(); topicTO.setCreatorUserId(securityHelper.assertCurrentUserId()); String description = message.isUpdateDescription() ? topic ...
BlogTO function(EditTopicMessage message, Blog existingTopic) { Topic topic = message.getTopic(); BlogTO topicTO = new BlogTO(); topicTO.setCreatorUserId(securityHelper.assertCurrentUserId()); String description = message.isUpdateDescription() ? topic .getDescription() : existingTopic.getDescription(); String title = m...
/** * * creates topic TO * * @param message * edit topic message * @param existingTopic * existing topic * @return topic TO */
creates topic TO
createTopicTO
{ "repo_name": "Communote/communote-server", "path": "communote/plugins/communote-message-queue/communote-plugins-mq-message-core/src/main/java/com/communote/plugins/mq/message/core/handler/EditTopicMessageHandler.java", "license": "apache-2.0", "size": 14097 }
[ "com.communote.plugins.mq.message.core.data.property.StringProperty", "com.communote.plugins.mq.message.core.data.tag.Tag", "com.communote.plugins.mq.message.core.data.topic.Topic", "com.communote.plugins.mq.message.core.message.topic.EditTopicMessage", "com.communote.server.api.core.blog.BlogTO", "com.co...
import com.communote.plugins.mq.message.core.data.property.StringProperty; import com.communote.plugins.mq.message.core.data.tag.Tag; import com.communote.plugins.mq.message.core.data.topic.Topic; import com.communote.plugins.mq.message.core.message.topic.EditTopicMessage; import com.communote.server.api.core.blog.Blog...
import com.communote.plugins.mq.message.core.data.property.*; import com.communote.plugins.mq.message.core.data.tag.*; import com.communote.plugins.mq.message.core.data.topic.*; import com.communote.plugins.mq.message.core.message.topic.*; import com.communote.server.api.core.blog.*; import com.communote.server.model.b...
[ "com.communote.plugins", "com.communote.server", "java.util" ]
com.communote.plugins; com.communote.server; java.util;
611,097
public List<MessageCommand> poll() throws FaultException, IOException;
List<MessageCommand> function() throws FaultException, IOException;
/** * Polls the corus server to which this instance connects. * * @return A {@link List} of {@link MessageCommand}s returned by the Corus server. * @throws FaultException if the Corus server a generated a SOAP fault. * @throws IOException if a problem occurs while internally sending the request to * t...
Polls the corus server to which this instance connects
poll
{ "repo_name": "sapia-oss/corus_iop", "path": "modules/client/src/main/java/org/sapia/corus/interop/client/InteropProtocol.java", "license": "apache-2.0", "size": 3355 }
[ "java.io.IOException", "java.util.List", "org.sapia.corus.interop.api.message.MessageCommand" ]
import java.io.IOException; import java.util.List; import org.sapia.corus.interop.api.message.MessageCommand;
import java.io.*; import java.util.*; import org.sapia.corus.interop.api.message.*;
[ "java.io", "java.util", "org.sapia.corus" ]
java.io; java.util; org.sapia.corus;
1,507,508
public static JustifyContent getThis(final String cssValue) { final String enumString = TagStringUtil.toUpperCase(cssValue).replace('-', '_'); JustifyContent correspondingObject = null; try { correspondingObject = valueOf(enumString); } catch (final IllegalArgumentExcept...
static JustifyContent function(final String cssValue) { final String enumString = TagStringUtil.toUpperCase(cssValue).replace('-', '_'); JustifyContent correspondingObject = null; try { correspondingObject = valueOf(enumString); } catch (final IllegalArgumentException e) { } return correspondingObject; }
/** * gets the corresponding object for the given {@code cssValue} or null for * invalid cssValue. * * @param cssValue the css property value without including * <code>!important</code> in it. * @return the corresponding object for the given {@code cssValue} or null for ...
gets the corresponding object for the given cssValue or null for invalid cssValue
getThis
{ "repo_name": "webfirmframework/wff", "path": "wffweb/src/main/java/com/webfirmframework/wffweb/css/css3/JustifyContent.java", "license": "apache-2.0", "size": 4103 }
[ "com.webfirmframework.wffweb.util.TagStringUtil" ]
import com.webfirmframework.wffweb.util.TagStringUtil;
import com.webfirmframework.wffweb.util.*;
[ "com.webfirmframework.wffweb" ]
com.webfirmframework.wffweb;
380,442
private void removeCalendar(String calName, Jedis jedis) throws JobPersistenceException { String calendarHashKey = createCalendarHashKey(calName); // checking if there are triggers pointing to this calendar String calendarTriggersSetkey = createCalendarTriggersSetKey(calName); if (jedis.scard(calendarT...
void function(String calName, Jedis jedis) throws JobPersistenceException { String calendarHashKey = createCalendarHashKey(calName); String calendarTriggersSetkey = createCalendarTriggersSetKey(calName); if (jedis.scard(calendarTriggersSetkey) > 0) throw new JobPersistenceException(STR + calendarHashKey + STR); jedis.d...
/** * Removes the calendar from redis. * * @param calName the calendar name * @param jedis thread-safe redis connection * @throws JobPersistenceException */
Removes the calendar from redis
removeCalendar
{ "repo_name": "RedisLabs/redis-quartz", "path": "src/main/java/com/redislabs/quartz/RedisJobStore.java", "license": "mit", "size": 83014 }
[ "org.quartz.JobPersistenceException", "redis.clients.jedis.Jedis" ]
import org.quartz.JobPersistenceException; import redis.clients.jedis.Jedis;
import org.quartz.*; import redis.clients.jedis.*;
[ "org.quartz", "redis.clients.jedis" ]
org.quartz; redis.clients.jedis;
1,401,901
public List<UserId> getUserIds() { return this.userIds; }
List<UserId> function() { return this.userIds; }
/** * Gets the user ids. <value>The user ids.</value> * * @return the user ids */
Gets the user ids. The user ids
getUserIds
{ "repo_name": "govind487/pa-ewsapi-3.0", "path": "src/main/java/microsoft/exchange/webservices/data/GetDelegateRequest.java", "license": "mit", "size": 4199 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,689,959
public URL getOpenWeatherMapUrl(int cityId) { OpenWeatherMapUrl openWeatherMapUrl = new OpenWeatherMapUrl(); switch (this) { case CURRENT_WEATHER: return openWeatherMapUrl.generateCurrentWeatherByCityIdUrl(cityId); case DAILY_WEATHER_FORECAST: return openWeatherMapUrl.generateDailyWeatherForecastUrl(ci...
URL function(int cityId) { OpenWeatherMapUrl openWeatherMapUrl = new OpenWeatherMapUrl(); switch (this) { case CURRENT_WEATHER: return openWeatherMapUrl.generateCurrentWeatherByCityIdUrl(cityId); case DAILY_WEATHER_FORECAST: return openWeatherMapUrl.generateDailyWeatherForecastUrl(cityId, DEFAULT_DAYS_COUNT_FOR_DAILY_F...
/** * Obtains an Open Weather Map url for this weather info type. * * @param cityId * an Open Weather Map city ID * @return a url containing the weather information for the specified city */
Obtains an Open Weather Map url for this weather info type
getOpenWeatherMapUrl
{ "repo_name": "Kestutis-Z/UK-Weather-repo", "path": "UKWeather/src/com/haringeymobile/ukweather/WeatherInfoType.java", "license": "apache-2.0", "size": 4997 }
[ "android.os.Parcelable", "com.haringeymobile.ukweather.data.OpenWeatherMapUrl" ]
import android.os.Parcelable; import com.haringeymobile.ukweather.data.OpenWeatherMapUrl;
import android.os.*; import com.haringeymobile.ukweather.data.*;
[ "android.os", "com.haringeymobile.ukweather" ]
android.os; com.haringeymobile.ukweather;
2,388,698
@Nonnull public java.util.concurrent.CompletableFuture<UserConsentRequest> postAsync(@Nonnull final UserConsentRequest newUserConsentRequest) { final String requestUrl = getBaseRequest().getRequestUrl().toString(); return new UserConsentRequestRequestBuilder(requestUrl, getBaseRequest().getClien...
java.util.concurrent.CompletableFuture<UserConsentRequest> function(@Nonnull final UserConsentRequest newUserConsentRequest) { final String requestUrl = getBaseRequest().getRequestUrl().toString(); return new UserConsentRequestRequestBuilder(requestUrl, getBaseRequest().getClient(), null) .buildRequest(getBaseRequest()...
/** * Creates a new UserConsentRequest * @param newUserConsentRequest the UserConsentRequest to create * @return a future with the created object */
Creates a new UserConsentRequest
postAsync
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/UserConsentRequestCollectionRequest.java", "license": "mit", "size": 6071 }
[ "com.microsoft.graph.models.UserConsentRequest", "javax.annotation.Nonnull" ]
import com.microsoft.graph.models.UserConsentRequest; import javax.annotation.Nonnull;
import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
1,136,558
@FIXVersion(introduced = "4.1", retired = "4.3") @TagNumRef(tagNum = TagNum.StrikePrice) public void setStrikePrice(Double strikePrice) { getSafeInstrument().setStrikePrice(strikePrice); }
@FIXVersion(introduced = "4.1", retired = "4.3") @TagNumRef(tagNum = TagNum.StrikePrice) void function(Double strikePrice) { getSafeInstrument().setStrikePrice(strikePrice); }
/** * Message field setter. * @param strikePrice field value */
Message field setter
setStrikePrice
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/OrderModificationRequestMsg.java", "license": "gpl-3.0", "size": 149491 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,390,165
public void updateUser(final String userId, final JSONObject user) throws ServiceException { final Transaction transaction = userRepository.beginTransaction(); try { userRepository.update(userId, user); transaction.commit(); archiveMgmtService.refreshTeams(Syst...
void function(final String userId, final JSONObject user) throws ServiceException { final Transaction transaction = userRepository.beginTransaction(); try { userRepository.update(userId, user); transaction.commit(); archiveMgmtService.refreshTeams(System.currentTimeMillis()); } catch (final RepositoryException e) { if ...
/** * Updates the specified user by the given user id. * * @param userId the given user id * @param user the specified user * @throws ServiceException service exception */
Updates the specified user by the given user id
updateUser
{ "repo_name": "FangStarNet/symphonyx", "path": "src/main/java/org/b3log/symphony/service/UserMgmtService.java", "license": "apache-2.0", "size": 33888 }
[ "org.b3log.latke.logging.Level", "org.b3log.latke.repository.RepositoryException", "org.b3log.latke.repository.Transaction", "org.b3log.latke.service.ServiceException", "org.json.JSONObject" ]
import org.b3log.latke.logging.Level; import org.b3log.latke.repository.RepositoryException; import org.b3log.latke.repository.Transaction; import org.b3log.latke.service.ServiceException; import org.json.JSONObject;
import org.b3log.latke.logging.*; import org.b3log.latke.repository.*; import org.b3log.latke.service.*; import org.json.*;
[ "org.b3log.latke", "org.json" ]
org.b3log.latke; org.json;
542,540
public void testUnsupportedMethods() { ListView subView = new ListView(mActivity); try { mAdapterView.addView(subView); fail("addView(View) is not supported in AdapterView."); } catch (UnsupportedOperationException e) { //expected } try {...
void function() { ListView subView = new ListView(mActivity); try { mAdapterView.addView(subView); fail(STR); } catch (UnsupportedOperationException e) { } try { mAdapterView.addView(subView, 0); fail(STR); } catch (UnsupportedOperationException e) { } try { mAdapterView.addView(subView, (ViewGroup.LayoutParams) null);...
/** * test not supported methods, all should throw UnsupportedOperationException */
test not supported methods, all should throw UnsupportedOperationException
testUnsupportedMethods
{ "repo_name": "wiki2014/Learning-Summary", "path": "alps/cts/tests/tests/widget/src/android/widget/cts/AdapterViewTest.java", "license": "gpl-3.0", "size": 18951 }
[ "android.view.ViewGroup", "android.widget.ListView" ]
import android.view.ViewGroup; import android.widget.ListView;
import android.view.*; import android.widget.*;
[ "android.view", "android.widget" ]
android.view; android.widget;
1,438,460
// fredt@users 20020130 - comment by fredt // to remove this deprecated method we need to rewrite the Grid class as a // ScrollPane component // sqlbob: I believe that changing to the JDK1.1 event handler // would require browsers to use the Java plugin. public boolean handleEvent(Event e) { ...
boolean function(Event e) { switch (e.id) { case Event.SCROLL_LINE_UP : case Event.SCROLL_LINE_DOWN : case Event.SCROLL_PAGE_UP : case Event.SCROLL_PAGE_DOWN : case Event.SCROLL_ABSOLUTE : iX = sbHoriz.getValue(); iY = iRowHeight * sbVert.getValue(); repaint(); return true; } return super.handleEvent(e); }
/** * Method declaration * * * @param e */
Method declaration
handleEvent
{ "repo_name": "Julien35/dev-courses", "path": "tutoriel-spring-mvc/lib/hsqldb/src/org/hsqldb/util/Grid.java", "license": "mit", "size": 14907 }
[ "java.awt.Event" ]
import java.awt.Event;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,144,627
ListSelectionListener getInterfaceListener();
ListSelectionListener getInterfaceListener();
/** * Provides a ListSelectionListener for the interface list. * * @return ListSelectionListener for the interface list */
Provides a ListSelectionListener for the interface list
getInterfaceListener
{ "repo_name": "s13372/SORCER", "path": "sos/sos-cataloger/src/main/java/sorcer/core/provider/cataloger/ui/SignatureDispatchment.java", "license": "apache-2.0", "size": 4549 }
[ "javax.swing.event.ListSelectionListener" ]
import javax.swing.event.ListSelectionListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
2,286,295
public List<UserItemsProvider> getUserItemsProviders() { List<UserItemsProvider> answer = new ArrayList<UserItemsProvider>(); for (Module module : modules.values()) { if (module instanceof UserItemsProvider) { answer.add((UserItemsProvider) module); } ...
List<UserItemsProvider> function() { List<UserItemsProvider> answer = new ArrayList<UserItemsProvider>(); for (Module module : modules.values()) { if (module instanceof UserItemsProvider) { answer.add((UserItemsProvider) module); } } return answer; }
/** * Returns a list with all the modules that provide "discoverable" items associated with * users. * * @return a list with all the modules that provide "discoverable" items associated with * users. */
Returns a list with all the modules that provide "discoverable" items associated with users
getUserItemsProviders
{ "repo_name": "coodeer/g3server", "path": "src/java/org/jivesoftware/openfire/XMPPServer.java", "license": "apache-2.0", "size": 58703 }
[ "java.util.ArrayList", "java.util.List", "org.jivesoftware.openfire.container.Module", "org.jivesoftware.openfire.disco.UserItemsProvider" ]
import java.util.ArrayList; import java.util.List; import org.jivesoftware.openfire.container.Module; import org.jivesoftware.openfire.disco.UserItemsProvider;
import java.util.*; import org.jivesoftware.openfire.container.*; import org.jivesoftware.openfire.disco.*;
[ "java.util", "org.jivesoftware.openfire" ]
java.util; org.jivesoftware.openfire;
1,307,419
public Rcli<CLIENT> client(String apiVersion) throws CadiException { Rcli<CLIENT> client = clients.get(apiVersion); if(client==null) { client = rclient(initURI(),ss); client.apiVersion(apiVersion) .readTimeout(connTimeout); clients.put(apiVersion, client); } return client; }
Rcli<CLIENT> function(String apiVersion) throws CadiException { Rcli<CLIENT> client = clients.get(apiVersion); if(client==null) { client = rclient(initURI(),ss); client.apiVersion(apiVersion) .readTimeout(connTimeout); clients.put(apiVersion, client); } return client; }
/** * Use this call to get the appropriate client based on configuration (DME2, HTTP, future) * * @param apiVersion * @return * @throws CadiException */
Use this call to get the appropriate client based on configuration (DME2, HTTP, future)
client
{ "repo_name": "att/AAF", "path": "cadi/aaf/src/main/java/com/att/cadi/aaf/v2_0/AAFCon.java", "license": "bsd-3-clause", "size": 10693 }
[ "com.att.cadi.CadiException", "com.att.cadi.client.Rcli" ]
import com.att.cadi.CadiException; import com.att.cadi.client.Rcli;
import com.att.cadi.*; import com.att.cadi.client.*;
[ "com.att.cadi" ]
com.att.cadi;
986,668
public int aggregateUsages() throws DAOException;
int function() throws DAOException;
/** * Aggregates usages per day/user - inserting into the daily table * @return the number of rows added to the aggregate data table */
Aggregates usages per day/user - inserting into the daily table
aggregateUsages
{ "repo_name": "openmrs/openmrs-module-usagestatistics", "path": "api/src/main/java/org/openmrs/module/usagestatistics/db/UsageStatisticsDAO.java", "license": "mpl-2.0", "size": 7382 }
[ "org.openmrs.api.db.DAOException" ]
import org.openmrs.api.db.DAOException;
import org.openmrs.api.db.*;
[ "org.openmrs.api" ]
org.openmrs.api;
2,648,090
public boolean createValueFile(byte[] payload) { byte[] apdu = new byte[23]; apdu[0] = (byte) 0x90; apdu[1] = (byte) 0xCC; apdu[2] = 0x00; apdu[3] = 0x00; apdu[4] = 0x11; System.arraycopy(payload, 0, apdu, 5, 17); apdu[22] = 0x00; preprocess(apdu, CommunicationSetting.PLAIN); CommandAPDU command...
boolean function(byte[] payload) { byte[] apdu = new byte[23]; apdu[0] = (byte) 0x90; apdu[1] = (byte) 0xCC; apdu[2] = 0x00; apdu[3] = 0x00; apdu[4] = 0x11; System.arraycopy(payload, 0, apdu, 5, 17); apdu[22] = 0x00; preprocess(apdu, CommunicationSetting.PLAIN); CommandAPDU command = new CommandAPDU(apdu); ResponseAPDU...
/** * Create a value file, used for the storage and * manipulation of a 32-bit signed integer value. * * @param payload 17-byte byte array, with the following contents: * <br>file number (1 byte), * <br>communication settings (1 byte), * <br>access rights (2 bytes), * <br>lower limi...
Create a value file, used for the storage and manipulation of a 32-bit signed integer value
createValueFile
{ "repo_name": "Andrade/nfcjlib", "path": "src/nfcjlib/core/DESFireEV1.java", "license": "bsd-3-clause", "size": 79050 }
[ "javax.smartcardio.CommandAPDU", "javax.smartcardio.ResponseAPDU" ]
import javax.smartcardio.CommandAPDU; import javax.smartcardio.ResponseAPDU;
import javax.smartcardio.*;
[ "javax.smartcardio" ]
javax.smartcardio;
1,732,566
@RequestMapping(value = "/company/{name}", method = RequestMethod.GET) public ResponseEntity<List<CompanyInfo>> getCompanies(@PathVariable("name") final String name) { logger.debug("QuoteController.getCompanies: retrieving companies for: " + name); List<CompanyInfo> companies = service.getCompanyInfo(name); l...
@RequestMapping(value = STR, method = RequestMethod.GET) ResponseEntity<List<CompanyInfo>> function(@PathVariable("name") final String name) { logger.debug(STR + name); List<CompanyInfo> companies = service.getCompanyInfo(name); logger.info(String.format(STR, name), companies); return new ResponseEntity<List<CompanyInf...
/** * Searches for companies that have a name or symbol matching the parameter. * * @param name * The name or symbol to search for. * @return The list of companies that match the search parameter. */
Searches for companies that have a name or symbol matching the parameter
getCompanies
{ "repo_name": "stayup-io/cf-SpringBootTrader", "path": "springboottrades-quotes/src/main/java/io/pivotal/quotes/controller/QuoteV1Controller.java", "license": "apache-2.0", "size": 5143 }
[ "io.pivotal.quotes.domain.CompanyInfo", "java.util.List", "org.springframework.http.HttpStatus", "org.springframework.http.ResponseEntity", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMe...
import io.pivotal.quotes.domain.CompanyInfo; import java.util.List; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind....
import io.pivotal.quotes.domain.*; import java.util.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "io.pivotal.quotes", "java.util", "org.springframework.http", "org.springframework.web" ]
io.pivotal.quotes; java.util; org.springframework.http; org.springframework.web;
1,660,358
public void setTemProfileService(TemProfileService temProfileService) { this.temProfileService = temProfileService; }
void function(TemProfileService temProfileService) { this.temProfileService = temProfileService; }
/** * Sets the temProfileService attribute value. * @param temProfileService The temProfileService to set. */
Sets the temProfileService attribute value
setTemProfileService
{ "repo_name": "kuali/kfs", "path": "kfs-tem/src/main/java/org/kuali/kfs/module/tem/batch/service/impl/ExpenseImportByTravelerServiceImpl.java", "license": "agpl-3.0", "size": 27957 }
[ "org.kuali.kfs.module.tem.service.TemProfileService" ]
import org.kuali.kfs.module.tem.service.TemProfileService;
import org.kuali.kfs.module.tem.service.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,305,697
public void testKeySetOrder() { ConcurrentSkipListMap map = map5(); Set s = map.keySet(); Iterator i = s.iterator(); Integer last = (Integer)i.next(); assertEquals(last, one); int count = 1; while (i.hasNext()) { Integer k = (Integer)i.next(); ...
void function() { ConcurrentSkipListMap map = map5(); Set s = map.keySet(); Iterator i = s.iterator(); Integer last = (Integer)i.next(); assertEquals(last, one); int count = 1; while (i.hasNext()) { Integer k = (Integer)i.next(); assertTrue(last.compareTo(k) < 0); last = k; ++count; } assertEquals(5, count); }
/** * keySet is ordered */
keySet is ordered
testKeySetOrder
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/ConcurrentSkipListMapTest.java", "license": "gpl-2.0", "size": 41793 }
[ "java.util.Iterator", "java.util.Set", "java.util.concurrent.ConcurrentSkipListMap" ]
import java.util.Iterator; import java.util.Set; import java.util.concurrent.ConcurrentSkipListMap;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,977,494
return taxationElsewhereBox1IncomeWageAndPensionCountryCode; } /** * Sets the value of the taxationElsewhereBox1IncomeWageAndPensionCountryCode property. * * @param value * allowed object is * {@link IsoCountryCodes3CharactersItemType }
return taxationElsewhereBox1IncomeWageAndPensionCountryCode; } /** * Sets the value of the taxationElsewhereBox1IncomeWageAndPensionCountryCode property. * * @param value * allowed object is * {@link IsoCountryCodes3CharactersItemType }
/** * Gets the value of the taxationElsewhereBox1IncomeWageAndPensionCountryCode property. * * @return * possible object is * {@link IsoCountryCodes3CharactersItemType } * */
Gets the value of the taxationElsewhereBox1IncomeWageAndPensionCountryCode property
getTaxationElsewhereBox1IncomeWageAndPensionCountryCode
{ "repo_name": "beemsoft/techytax", "path": "techytax-xbrl/src/main/java/nl/nltaxonomie/nt13/bd/_20181212/dictionary/bd_tuples/TaxationElsewhereBox1IncomeWageAndPensionSpecification.java", "license": "gpl-2.0", "size": 6812 }
[ "nl.nltaxonomie.nt13.sbr._20180301.dictionary.iso3166_countrycodes_2017_11_23.IsoCountryCodes3CharactersItemType" ]
import nl.nltaxonomie.nt13.sbr._20180301.dictionary.iso3166_countrycodes_2017_11_23.IsoCountryCodes3CharactersItemType;
import nl.nltaxonomie.nt13.sbr.*;
[ "nl.nltaxonomie.nt13" ]
nl.nltaxonomie.nt13;
2,247,198
String tempString = schemaString.replace(".", "_"); tempString = tempString.substring(1, tempString.length() - 1); Schema temp = org.apache.pig.impl.util.Utils.getSchemaFromString(tempString); return processSchema(Util.translateSchema(temp)); }
String tempString = schemaString.replace(".", "_"); tempString = tempString.substring(1, tempString.length() - 1); Schema temp = org.apache.pig.impl.util.Utils.getSchemaFromString(tempString); return processSchema(Util.translateSchema(temp)); }
/** * Produces a list of Lipstick SchemaElements from a string representation of a schema. * * @param schemaString the schema string * @return a list of schema elements * @throws ParserException the parser exception */
Produces a list of Lipstick SchemaElements from a string representation of a schema
processSchema
{ "repo_name": "Peilong/Lipstick", "path": "lipstick-console/src/main/java/com/netflix/lipstick/model/Utils.java", "license": "apache-2.0", "size": 2884 }
[ "org.apache.pig.impl.logicalLayer.schema.Schema", "org.apache.pig.newplan.logical.Util" ]
import org.apache.pig.impl.logicalLayer.schema.Schema; import org.apache.pig.newplan.logical.Util;
import org.apache.pig.impl.*; import org.apache.pig.newplan.logical.*;
[ "org.apache.pig" ]
org.apache.pig;
497,663
public void updateButtons() { m_ButtonApprove.setEnabled((m_TextExpression.getText().length() > 0) && (m_ComboBoxType.getSelectedIndex() != -1)); m_ButtonCancel.setEnabled(true); } } public enum ExpressionType { VARIABLE, BOOLEAN, NUMERIC, STRING } ...
void function() { m_ButtonApprove.setEnabled((m_TextExpression.getText().length() > 0) && (m_ComboBoxType.getSelectedIndex() != -1)); m_ButtonCancel.setEnabled(true); } } public enum ExpressionType { VARIABLE, BOOLEAN, NUMERIC, STRING } protected TableModel m_ExpressionsModel; protected BaseTableWithButtons m_Table; pr...
/** * Updates the status of the buttons. */
Updates the status of the buttons
updateButtons
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/gui/tools/ExpressionWatchPanel.java", "license": "gpl-3.0", "size": 19645 }
[ "javax.swing.JButton" ]
import javax.swing.JButton;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
715,741
public InterMineObject getObject() { return obj; }
InterMineObject function() { return obj; }
/** * Returns the InterMineObject of the constraint. * * @return the InterMineObject */
Returns the InterMineObject of the constraint
getObject
{ "repo_name": "julie-sullivan/phytomine", "path": "intermine/objectstore/main/src/org/intermine/objectstore/query/ContainsConstraint.java", "license": "lgpl-2.1", "size": 6476 }
[ "org.intermine.model.InterMineObject" ]
import org.intermine.model.InterMineObject;
import org.intermine.model.*;
[ "org.intermine.model" ]
org.intermine.model;
958,222
public Container getContainer() { return (container); }
Container function() { return (container); }
/** * Return the Container with which this Logger has been associated. */
Return the Container with which this Logger has been associated
getContainer
{ "repo_name": "plumer/codana", "path": "tomcat_files/6.0.43/WebappLoader.java", "license": "mit", "size": 39913 }
[ "org.apache.catalina.Container" ]
import org.apache.catalina.Container;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
578,051
public void setSet(Set<PropertyValue> set) { setObject(set); } //---------------------------------------------------------------------------- // Util //----------------------------------------------------------------------------
void function(Set<PropertyValue> set) { setObject(set); }
/** * Sets the wrapped value as {@code Set} value. * * @param set value */
Sets the wrapped value as Set value
setSet
{ "repo_name": "dbs-leipzig/gradoop", "path": "gradoop-common/src/main/java/org/gradoop/common/model/impl/properties/PropertyValue.java", "license": "apache-2.0", "size": 18472 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,441,579
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) public void activation(DraftKnowledgesEntity entity) { activation(entity.getDraftId()); }
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) void function(DraftKnowledgesEntity entity) { activation(entity.getDraftId()); }
/** * Ativation. * if delete flag is exists and delete flag is true, delete flug is false to activate. * @param entity entity */
Ativation. if delete flag is exists and delete flag is true, delete flug is false to activate
activation
{ "repo_name": "support-project/knowledge", "path": "src/main/java/org/support/project/knowledge/dao/gen/GenDraftKnowledgesDao.java", "license": "apache-2.0", "size": 17829 }
[ "org.support.project.aop.Aspect", "org.support.project.knowledge.entity.DraftKnowledgesEntity" ]
import org.support.project.aop.Aspect; import org.support.project.knowledge.entity.DraftKnowledgesEntity;
import org.support.project.aop.*; import org.support.project.knowledge.entity.*;
[ "org.support.project" ]
org.support.project;
452,124
private double getCountAllDim(final String sbKu, final Integer from, final Integer till) { final List<SbPartObjGeschl> gemList = gemPartMap.get(sbKu); int count = 0; for (final SbPartObjGeschl tmp : gemList) { if (!tmp.getArt().equals("p") && valueBetween(tmp.getDim(), from, til...
double function(final String sbKu, final Integer from, final Integer till) { final List<SbPartObjGeschl> gemList = gemPartMap.get(sbKu); int count = 0; for (final SbPartObjGeschl tmp : gemList) { if (!tmp.getArt().equals("p") && valueBetween(tmp.getDim(), from, till)) { ++count; } } return count; }
/** * DOCUMENT ME! * * @param sbKu DOCUMENT ME! * @param from DOCUMENT ME! * @param till DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getCountAllDim
{ "repo_name": "cismet/watergis-client", "path": "src/main/java/de/cismet/watergis/reports/GerinneGSbReport.java", "license": "lgpl-3.0", "size": 87145 }
[ "de.cismet.watergis.reports.types.SbPartObjGeschl", "java.util.List" ]
import de.cismet.watergis.reports.types.SbPartObjGeschl; import java.util.List;
import de.cismet.watergis.reports.types.*; import java.util.*;
[ "de.cismet.watergis", "java.util" ]
de.cismet.watergis; java.util;
2,254,498
protected boolean isBrowser(String userAgentHeader) { if (userAgentHeader == null) return false; if (patterns != null) { for (int i = 0; i < patterns.length; i++) { Matcher m = patterns[i].matcher(userAgentHeader); if (m.matches()) { return "1".equals(match[i]); } } return true; }...
boolean function(String userAgentHeader) { if (userAgentHeader == null) return false; if (patterns != null) { for (int i = 0; i < patterns.length; i++) { Matcher m = patterns[i].matcher(userAgentHeader); if (m.matches()) { return "1".equals(match[i]); } } return true; } return true; }
/** * If this method returns true, the user agent is a browser * * @param header * @return */
If this method returns true, the user agent is a browser
isBrowser
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "kernel/kernel-util/src/main/java/org/sakaiproject/util/BasicAuth.java", "license": "apache-2.0", "size": 7963 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
350,764
private boolean checkIfIgnored(final GraphRewrite event, FileModel file, List<String> patterns) { boolean ignored = false; if (patterns != null && !patterns.isEmpty()) { for (String pattern : patterns) { if (file.getFilePath().matches(pattern)) ...
boolean function(final GraphRewrite event, FileModel file, List<String> patterns) { boolean ignored = false; if (patterns != null && !patterns.isEmpty()) { for (String pattern : patterns) { if (file.getFilePath().matches(pattern)) { IgnoredFileModel ignoredFileModel = GraphService.addTypeToModel(event.getGraphContext()...
/** * Checks if the {@link FileModel#getFilePath()} + {@link FileModel#getFileName()} is ignored by any of the specified regular expressions. */
Checks if the <code>FileModel#getFilePath()</code> + <code>FileModel#getFileName()</code> is ignored by any of the specified regular expressions
checkIfIgnored
{ "repo_name": "OndraZizka/windup", "path": "rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/operation/UnzipArchiveToOutputFolder.java", "license": "epl-1.0", "size": 12969 }
[ "java.util.List", "org.jboss.windup.config.GraphRewrite", "org.jboss.windup.graph.model.resource.FileModel", "org.jboss.windup.graph.model.resource.IgnoredFileModel", "org.jboss.windup.graph.service.GraphService" ]
import java.util.List; import org.jboss.windup.config.GraphRewrite; import org.jboss.windup.graph.model.resource.FileModel; import org.jboss.windup.graph.model.resource.IgnoredFileModel; import org.jboss.windup.graph.service.GraphService;
import java.util.*; import org.jboss.windup.config.*; import org.jboss.windup.graph.model.resource.*; import org.jboss.windup.graph.service.*;
[ "java.util", "org.jboss.windup" ]
java.util; org.jboss.windup;
1,404,365
private boolean isCritical(final X509Certificate certificate, final String extensionOid) { final Set<String> criticalOids = certificate.getCriticalExtensionOIDs(); if (criticalOids == null || criticalOids.isEmpty()) { return false; } return criticalOids.contains(extensi...
boolean function(final X509Certificate certificate, final String extensionOid) { final Set<String> criticalOids = certificate.getCriticalExtensionOIDs(); if (criticalOids == null criticalOids.isEmpty()) { return false; } return criticalOids.contains(extensionOid); }
/** * Checks if critical extension oids contain the extension oid. * * @param certificate the certificate * @param extensionOid the extension oid * @return true, if critical */
Checks if critical extension oids contain the extension oid
isCritical
{ "repo_name": "icanfly/cas", "path": "cas-server-support-x509/src/main/java/org/jasig/cas/adaptors/x509/authentication/handler/support/X509CredentialsAuthenticationHandler.java", "license": "apache-2.0", "size": 12405 }
[ "java.security.cert.X509Certificate", "java.util.Set" ]
import java.security.cert.X509Certificate; import java.util.Set;
import java.security.cert.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
826,293
public AnnotationGraphics getAnnotationgraphics(){ return item.getAnnotationgraphics(); }
AnnotationGraphics function(){ return item.getAnnotationgraphics(); }
/** * Return the encapsulate Low Level API object. */
Return the encapsulate Low Level API object
getAnnotationgraphics
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/hlcorestructure/hlapi/DeclarationHLAPI.java", "license": "epl-1.0", "size": 11245 }
[ "fr.lip6.move.pnml.symmetricnet.hlcorestructure.AnnotationGraphics" ]
import fr.lip6.move.pnml.symmetricnet.hlcorestructure.AnnotationGraphics;
import fr.lip6.move.pnml.symmetricnet.hlcorestructure.*;
[ "fr.lip6.move" ]
fr.lip6.move;
2,501,533
private boolean intersectsPixelClosure(Coordinate p0, Coordinate p1) { li.computeIntersection(p0, p1, corner[0], corner[1]); if (li.hasIntersection()) return true; li.computeIntersection(p0, p1, corner[1], corner[2]); if (li.hasIntersection()) return true; li.computeIntersect...
boolean function(Coordinate p0, Coordinate p1) { li.computeIntersection(p0, p1, corner[0], corner[1]); if (li.hasIntersection()) return true; li.computeIntersection(p0, p1, corner[1], corner[2]); if (li.hasIntersection()) return true; li.computeIntersection(p0, p1, corner[2], corner[3]); if (li.hasIntersection()) retur...
/** * Test whether the given segment intersects * the closure of this hot pixel. * This is NOT the test used in the standard snap-rounding * algorithm, which uses the partially closed tolerance square * instead. * This routine is provided for testing purposes only. * * @param p0 ...
Test whether the given segment intersects the closure of this hot pixel. This is NOT the test used in the standard snap-rounding algorithm, which uses the partially closed tolerance square instead. This routine is provided for testing purposes only
intersectsPixelClosure
{ "repo_name": "Semantive/jts", "path": "src/main/java/com/vividsolutions/jts/noding/snapround/HotPixel.java", "license": "lgpl-3.0", "size": 10453 }
[ "com.vividsolutions.jts.geom.Coordinate" ]
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.*;
[ "com.vividsolutions.jts" ]
com.vividsolutions.jts;
2,627,447
public Channel<SpecificConnectorSendInterceptor> getSpecificChannel();
Channel<SpecificConnectorSendInterceptor> function();
/** * Returns the {@link Channel} which delivers {@link Event}s to a specific {@link BridgeConnector}. * It is invoked by the last interceptor of the global connector send channel ({@link #getGlobalChannel()}). * * @return The channel which delivers events to a specific bridge connector. */
Returns the <code>Channel</code> which delivers <code>Event</code>s to a specific <code>BridgeConnector</code>. It is invoked by the last interceptor of the global connector send channel (<code>#getGlobalChannel()</code>)
getSpecificChannel
{ "repo_name": "QuarterCode/EventBridge", "path": "src/main/java/com/quartercode/eventbridge/bridge/module/ConnectorSenderModule.java", "license": "lgpl-3.0", "size": 4613 }
[ "com.quartercode.eventbridge.channel.Channel" ]
import com.quartercode.eventbridge.channel.Channel;
import com.quartercode.eventbridge.channel.*;
[ "com.quartercode.eventbridge" ]
com.quartercode.eventbridge;
2,523,589
public void addConfiguration(Configuration configuration) { Preconditions.checkNotNull(configuration); this.configuration.addAll(configuration); }
void function(Configuration configuration) { Preconditions.checkNotNull(configuration); this.configuration.addAll(configuration); }
/** * Adds the given key-value configuration to the underlying configuration. It overwrites * existing keys. * * @param configuration key-value configuration to be added */
Adds the given key-value configuration to the underlying configuration. It overwrites existing keys
addConfiguration
{ "repo_name": "tzulitai/flink", "path": "flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableConfig.java", "license": "apache-2.0", "size": 11949 }
[ "org.apache.flink.configuration.Configuration", "org.apache.flink.util.Preconditions" ]
import org.apache.flink.configuration.Configuration; import org.apache.flink.util.Preconditions;
import org.apache.flink.configuration.*; import org.apache.flink.util.*;
[ "org.apache.flink" ]
org.apache.flink;
1,532,345
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> deleteAsync(String resourceGroupName, String lockName);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> deleteAsync(String resourceGroupName, String lockName);
/** * To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* * actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. * * @param resourceGroupName The name of the resource group containing the lock...
To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions
deleteAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ManagementLocksClient.java", "license": "mit", "size": 66646 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
231,828