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 Email getDestination() {
return destination;
} | Email function() { return destination; } | /**
* Gets the <code>destination</code>
*/ | Gets the <code>destination</code> | getDestination | {
"repo_name": "aoindustries/aoserv-client",
"path": "src/main/java/com/aoindustries/aoserv/client/email/Forwarding.java",
"license": "lgpl-3.0",
"size": 4607
} | [
"com.aoapps.net.Email"
] | import com.aoapps.net.Email; | import com.aoapps.net.*; | [
"com.aoapps.net"
] | com.aoapps.net; | 1,167,844 |
protected static Artifact createIjarAction(
RuleContext ruleContext,
JavaToolchainProvider javaToolchain,
Artifact inputJar, boolean addPrefix) {
Artifact interfaceJar = getIjarArtifact(ruleContext, inputJar, addPrefix);
FilesToRunProvider ijarTarget = javaToolchain.getIjar();
if (!ruleC... | static Artifact function( RuleContext ruleContext, JavaToolchainProvider javaToolchain, Artifact inputJar, boolean addPrefix) { Artifact interfaceJar = getIjarArtifact(ruleContext, inputJar, addPrefix); FilesToRunProvider ijarTarget = javaToolchain.getIjar(); if (!ruleContext.hasErrors()) { ruleContext.registerAction(n... | /**
* Creates the Action that creates ijars from Jar files.
*
* @param inputJar the Jar to create the ijar for
* @param addPrefix whether to prefix the path of the generated ijar with the package and
* name of the current rule
* @return the Artifact to create with the Action
*/ | Creates the Action that creates ijars from Jar files | createIjarAction | {
"repo_name": "juhalindfors/bazel-patches",
"path": "src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java",
"license": "apache-2.0",
"size": 34504
} | [
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.analysis.FilesToRunProvider",
"com.google.devtools.build.lib.analysis.RuleContext",
"com.google.devtools.build.lib.analysis.actions.SpawnAction"
] | import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.FilesToRunProvider; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.actions.SpawnAction; | import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.analysis.actions.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,539,294 |
public void setSignupDeadline(Date signupDeadLine) {
this.signupDeadline = truncateSeconds(signupDeadLine);
}
| void function(Date signupDeadLine) { this.signupDeadline = truncateSeconds(signupDeadLine); } | /**
* special setter
*
* @param signupDeadLine
* the time when signup process stops
*/ | special setter | setSignupDeadline | {
"repo_name": "harfalm/Sakai-10.1",
"path": "signup/api/src/java/org/sakaiproject/signup/model/SignupMeeting.java",
"license": "apache-2.0",
"size": 8471
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,479,313 |
public OvhOrder xdsl_spare_new_GET(String brand, String mondialRelayId, Long quantity, Long shippingContactId) throws IOException {
String qPath = "/order/xdsl/spare/new";
StringBuilder sb = path(qPath);
query(sb, "brand", brand);
query(sb, "mondialRelayId", mondialRelayId);
query(sb, "quantity", quantity)... | OvhOrder function(String brand, String mondialRelayId, Long quantity, Long shippingContactId) throws IOException { String qPath = STR; StringBuilder sb = path(qPath); query(sb, "brand", brand); query(sb, STR, mondialRelayId); query(sb, STR, quantity); query(sb, STR, shippingContactId); String resp = exec(qPath, "GET", ... | /**
* Get prices and contracts information
*
* REST: GET /order/xdsl/spare/new
* @param mondialRelayId [required] Use /supply/mondialRelay entry point to specify a relay point and ignore shipping contact address information entry.
* @param shippingContactId [required] Shipping contact information id from /me ... | Get prices and contracts information | xdsl_spare_new_GET | {
"repo_name": "UrielCh/ovh-java-sdk",
"path": "ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java",
"license": "bsd-3-clause",
"size": 511080
} | [
"java.io.IOException",
"net.minidev.ovh.api.order.OvhOrder"
] | import java.io.IOException; import net.minidev.ovh.api.order.OvhOrder; | import java.io.*; import net.minidev.ovh.api.order.*; | [
"java.io",
"net.minidev.ovh"
] | java.io; net.minidev.ovh; | 1,423,452 |
public static void warmUp(Context context) {
synchronized (ChildProcessLauncher.class) {
assert !ThreadUtils.runningOnUiThread();
if (sSpareSandboxedConnection == null) {
sSpareSandboxedConnection = allocateBoundConnection(context, null, true, false);
}
... | static void function(Context context) { synchronized (ChildProcessLauncher.class) { assert !ThreadUtils.runningOnUiThread(); if (sSpareSandboxedConnection == null) { sSpareSandboxedConnection = allocateBoundConnection(context, null, true, false); } } } | /**
* Should be called early in startup so the work needed to spawn the child process can be done
* in parallel to other startup work. Must not be called on the UI thread. Spare connection is
* created in sandboxed child process.
* @param context the application context used for the connection.
... | Should be called early in startup so the work needed to spawn the child process can be done in parallel to other startup work. Must not be called on the UI thread. Spare connection is created in sandboxed child process | warmUp | {
"repo_name": "Chilledheart/chromium",
"path": "content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java",
"license": "bsd-3-clause",
"size": 34588
} | [
"android.content.Context",
"org.chromium.base.ThreadUtils"
] | import android.content.Context; import org.chromium.base.ThreadUtils; | import android.content.*; import org.chromium.base.*; | [
"android.content",
"org.chromium.base"
] | android.content; org.chromium.base; | 448,231 |
private void mergeStoreFiles(
Map<byte[], List<StoreFile>> hstoreFilesOfRegionA,
Map<byte[], List<StoreFile>> hstoreFilesOfRegionB)
throws IOException {
// Create reference file(s) of region A in mergdir
HRegionFileSystem fs_a = this.region_a.getRegionFileSystem();
for (Map.Entry<byte[],... | void function( Map<byte[], List<StoreFile>> hstoreFilesOfRegionA, Map<byte[], List<StoreFile>> hstoreFilesOfRegionB) throws IOException { HRegionFileSystem fs_a = this.region_a.getRegionFileSystem(); for (Map.Entry<byte[], List<StoreFile>> entry : hstoreFilesOfRegionA .entrySet()) { String familyName = Bytes.toString(e... | /**
* Create reference file(s) of merging regions under the region_a merges dir
* @param hstoreFilesOfRegionA
* @param hstoreFilesOfRegionB
* @throws IOException
*/ | Create reference file(s) of merging regions under the region_a merges dir | mergeStoreFiles | {
"repo_name": "francisliu/hbase_namespace",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionMergeTransaction.java",
"license": "apache-2.0",
"size": 30596
} | [
"java.io.IOException",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import java.util.List; import java.util.Map; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,511,689 |
public void initiate(AjaxRequestTarget target)
{
CharSequence url = getCallbackUrl();
target.appendJavascript("window.location.href='" + url + "'");
} | void function(AjaxRequestTarget target) { CharSequence url = getCallbackUrl(); target.appendJavascript(STR + url + "'"); } | /**
* Call this method to initiate the download.
*/ | Call this method to initiate the download | initiate | {
"repo_name": "BassJel/Jouve-Project",
"path": "source/java/com/doculibre/constellio/wicket/components/links/AJAXDownload.java",
"license": "lgpl-3.0",
"size": 1920
} | [
"org.apache.wicket.ajax.AjaxRequestTarget"
] | import org.apache.wicket.ajax.AjaxRequestTarget; | import org.apache.wicket.ajax.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 965,679 |
public FriendsDeleteListQuery deleteList(UserActor actor, int listId) {
return new FriendsDeleteListQuery(getClient(), actor, listId);
} | FriendsDeleteListQuery function(UserActor actor, int listId) { return new FriendsDeleteListQuery(getClient(), actor, listId); } | /**
* Deletes a friend list of the current user.
*
* @param actor vk actor
* @param listId ID of the friend list to delete.
* @return query
*/ | Deletes a friend list of the current user | deleteList | {
"repo_name": "VKCOM/vk-java-sdk",
"path": "sdk/src/main/java/com/vk/api/sdk/actions/Friends.java",
"license": "mit",
"size": 11957
} | [
"com.vk.api.sdk.client.actors.UserActor",
"com.vk.api.sdk.queries.friends.FriendsDeleteListQuery"
] | import com.vk.api.sdk.client.actors.UserActor; import com.vk.api.sdk.queries.friends.FriendsDeleteListQuery; | import com.vk.api.sdk.client.actors.*; import com.vk.api.sdk.queries.friends.*; | [
"com.vk.api"
] | com.vk.api; | 1,504,482 |
EAttribute getPropertyType_Any(); | EAttribute getPropertyType_Any(); | /**
* Returns the meta object for the attribute list '{@link org.eclipse.bpel.apache.ode.deploy.model.dd.PropertyType#getAny <em>Any</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any</em>'.
* @see org.eclipse.bpel.apache.ode.deploy.model.dd.Pro... | Returns the meta object for the attribute list '<code>org.eclipse.bpel.apache.ode.deploy.model.dd.PropertyType#getAny Any</code>'. | getPropertyType_Any | {
"repo_name": "Drifftr/devstudio-tooling-bps",
"path": "plugins/org.eclipse.bpel.apache.ode.deploy.model/src/org/eclipse/bpel/apache/ode/deploy/model/dd/ddPackage.java",
"license": "apache-2.0",
"size": 68076
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,518,216 |
public List<ColoredSystem<C>> determine(List<GenPolynomial<GenPolynomial<C>>> H) {
if (H == null || H.size() == 0) {
List<ColoredSystem<C>> CS = new ArrayList<ColoredSystem<C>>();
return CS;
}
//System.out.println("of determine = " + H);
Collections.revers... | List<ColoredSystem<C>> function(List<GenPolynomial<GenPolynomial<C>>> H) { if (H == null H.size() == 0) { List<ColoredSystem<C>> CS = new ArrayList<ColoredSystem<C>>(); return CS; } Collections.reverse(H); List<Condition<C>> cd = caseDistinction(H); return determine(cd, H); } | /**
* Determine polynomial list.
* @param H polynomial list.
* @return new determined list of colored systems.
*/ | Determine polynomial list | determine | {
"repo_name": "breandan/java-algebra-system",
"path": "src/edu/jas/application/CReductionSeq.java",
"license": "gpl-2.0",
"size": 17573
} | [
"edu.jas.poly.GenPolynomial",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import edu.jas.poly.GenPolynomial; import java.util.ArrayList; import java.util.Collections; import java.util.List; | import edu.jas.poly.*; import java.util.*; | [
"edu.jas.poly",
"java.util"
] | edu.jas.poly; java.util; | 1,684,153 |
public Collection getImagesPeriod(SecurityContext ctx, Timestamp startTime,
Timestamp endTime, long userID, boolean asDataObject)
throws DSOutOfServiceException, DSAccessException
{
if (startTime == null && endTime == null)
throw new NullPointerException("Time not specified.");
ParametersI po = new Par... | Collection function(SecurityContext ctx, Timestamp startTime, Timestamp endTime, long userID, boolean asDataObject) throws DSOutOfServiceException, DSAccessException { if (startTime == null && endTime == null) throw new NullPointerException(STR); ParametersI po = new ParametersI(); po.leaves(); if (userID >= 0) po.exp(... | /**
* Implemented as specified by {@link OmeroDataService}.
* @see OmeroDataService#getImagesPeriod(SecurityContext, Timestamp, Timestamp, long, boolean)
*/ | Implemented as specified by <code>OmeroDataService</code> | getImagesPeriod | {
"repo_name": "emilroz/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OmeroDataServiceImpl.java",
"license": "gpl-2.0",
"size": 45383
} | [
"java.sql.Timestamp",
"java.util.Collection",
"org.openmicroscopy.shoola.env.data.util.SecurityContext"
] | import java.sql.Timestamp; import java.util.Collection; import org.openmicroscopy.shoola.env.data.util.SecurityContext; | import java.sql.*; import java.util.*; import org.openmicroscopy.shoola.env.data.util.*; | [
"java.sql",
"java.util",
"org.openmicroscopy.shoola"
] | java.sql; java.util; org.openmicroscopy.shoola; | 1,186,623 |
public static final String printWorkGroup(WorkGroup value)
{
return (Integer.toString(value == null ? WorkGroup.DEFAULT.getValue() : value.getValue()));
}
| static final String function(WorkGroup value) { return (Integer.toString(value == null ? WorkGroup.DEFAULT.getValue() : value.getValue())); } | /**
* Print a work group.
*
* @param value WorkGroup instance
* @return work group value
*/ | Print a work group | printWorkGroup | {
"repo_name": "srnsw/xena",
"path": "plugins/project/ext/src/mpxj/src/net/sf/mpxj/mspdi/DatatypeConverter.java",
"license": "gpl-3.0",
"size": 42142
} | [
"net.sf.mpxj.WorkGroup"
] | import net.sf.mpxj.WorkGroup; | import net.sf.mpxj.*; | [
"net.sf.mpxj"
] | net.sf.mpxj; | 2,203,122 |
List<Store> getAllStores(); | List<Store> getAllStores(); | /**
* Returns all of the {@linkplain Store Stores} saved in the Repository;
*
* @return
*/ | Returns all of the Store Stores saved in the Repository | getAllStores | {
"repo_name": "BlackSourceLabs/BlackNectar-Service",
"path": "src/main/java/tech/blacksource/blacknectar/service/stores/StoreDataSource.java",
"license": "apache-2.0",
"size": 1699
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,814,186 |
public Observable<ServiceResponse<FormulaInner>> getWithServiceResponseAsync(String resourceGroupName, String labName, String name, String expand) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be nu... | Observable<ServiceResponse<FormulaInner>> function(String resourceGroupName, String labName, String name, String expand) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (labName == null) { throw new I... | /**
* Get formula.
*
* @param resourceGroupName The name of the resource group.
* @param labName The name of the lab.
* @param name The name of the formula.
* @param expand Specify the $expand query. Example: 'properties($select=description)'
* @throws IllegalArgumentException thrown ... | Get formula | getWithServiceResponseAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/devtestlabs/mgmt-v2018_09_15/src/main/java/com/microsoft/azure/management/devtestlabs/v2018_09_15/implementation/FormulasInner.java",
"license": "mit",
"size": 58117
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,758,365 |
public static <T> Comparator<T> nullsHigh(Comparator<T> comparator) {
return new NullSafeComparator<T>(comparator, false);
} | static <T> Comparator<T> function(Comparator<T> comparator) { return new NullSafeComparator<T>(comparator, false); } | /**
* Return a decorator for the given comparator which accepts
* null values and sorts them higher than non-null values.
* @see NullSafeComparator#NullSafeComparator(boolean)
*/ | Return a decorator for the given comparator which accepts null values and sorts them higher than non-null values | nullsHigh | {
"repo_name": "lingcreative/play-dbx",
"path": "src/main/java/dbx/util/comparator/Comparators.java",
"license": "apache-2.0",
"size": 2304
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 2,287,496 |
public static void generateRPClass() {
final RPClass rpclass = new RPClass(Events.GROUP_CHANGE);
rpclass.add(DefinitionClass.ATTRIBUTE, "leader", Type.STRING);
rpclass.add(DefinitionClass.ATTRIBUTE, "members", Type.STRING);
rpclass.add(DefinitionClass.ATTRIBUTE, "lootmode", Type.STRING);
}
public GroupC... | static void function() { final RPClass rpclass = new RPClass(Events.GROUP_CHANGE); rpclass.add(DefinitionClass.ATTRIBUTE, STR, Type.STRING); rpclass.add(DefinitionClass.ATTRIBUTE, STR, Type.STRING); rpclass.add(DefinitionClass.ATTRIBUTE, STR, Type.STRING); } public GroupChangeEvent() { super(Events.GROUP_CHANGE); } pub... | /**
* Creates the rpclass.
*/ | Creates the rpclass | generateRPClass | {
"repo_name": "sourceress-project/archestica",
"path": "src/games/stendhal/server/events/GroupChangeEvent.java",
"license": "gpl-2.0",
"size": 2186
} | [
"games.stendhal.common.constants.Events",
"java.util.List"
] | import games.stendhal.common.constants.Events; import java.util.List; | import games.stendhal.common.constants.*; import java.util.*; | [
"games.stendhal.common",
"java.util"
] | games.stendhal.common; java.util; | 2,600,382 |
public void resizeCluster(@Nonnull String clusterId, @Nonnegative int nodeCount) throws CloudException, InternalException; | void function(@Nonnull String clusterId, @Nonnegative int nodeCount) throws CloudException, InternalException; | /**
* Resizes the cluster to the specified number of nodes.
* @param clusterId the cluster to resize
* @param nodeCount the number of nodes to which the cluster should be resized
* @throws CloudException an error occurred in the cloud provider while performing the operation
* @throws InternalEx... | Resizes the cluster to the specified number of nodes | resizeCluster | {
"repo_name": "maksimov/dasein-cloud-core",
"path": "src/main/java/org/dasein/cloud/platform/bigdata/DataWarehouseSupport.java",
"license": "apache-2.0",
"size": 28767
} | [
"javax.annotation.Nonnegative",
"javax.annotation.Nonnull",
"org.dasein.cloud.CloudException",
"org.dasein.cloud.InternalException"
] | import javax.annotation.Nonnegative; import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException; | import javax.annotation.*; import org.dasein.cloud.*; | [
"javax.annotation",
"org.dasein.cloud"
] | javax.annotation; org.dasein.cloud; | 101,257 |
public static JobExecution create(EntityManager em, JobExecutionCreator jobExecutionCreator)
throws KapuaException {
JobExecutionImpl jobExecutionImpl = new JobExecutionImpl(jobExecutionCreator.getScopeId());
jobExecutionImpl.setJobId(jobExecutionCreator.getJobId());
jobExecutio... | static JobExecution function(EntityManager em, JobExecutionCreator jobExecutionCreator) throws KapuaException { JobExecutionImpl jobExecutionImpl = new JobExecutionImpl(jobExecutionCreator.getScopeId()); jobExecutionImpl.setJobId(jobExecutionCreator.getJobId()); jobExecutionImpl.setStartedOn(jobExecutionCreator.getStar... | /**
* Creates and return new JobExecution
*
* @param em
* @param jobExecutionCreator
* @return
* @throws KapuaException
* @since 1.0.0
*/ | Creates and return new JobExecution | create | {
"repo_name": "stzilli/kapua",
"path": "service/job/internal/src/main/java/org/eclipse/kapua/service/job/execution/internal/JobExecutionDAO.java",
"license": "epl-1.0",
"size": 4680
} | [
"org.eclipse.kapua.KapuaException",
"org.eclipse.kapua.commons.jpa.EntityManager",
"org.eclipse.kapua.commons.service.internal.ServiceDAO",
"org.eclipse.kapua.service.job.execution.JobExecution",
"org.eclipse.kapua.service.job.execution.JobExecutionCreator"
] | import org.eclipse.kapua.KapuaException; import org.eclipse.kapua.commons.jpa.EntityManager; import org.eclipse.kapua.commons.service.internal.ServiceDAO; import org.eclipse.kapua.service.job.execution.JobExecution; import org.eclipse.kapua.service.job.execution.JobExecutionCreator; | import org.eclipse.kapua.*; import org.eclipse.kapua.commons.jpa.*; import org.eclipse.kapua.commons.service.internal.*; import org.eclipse.kapua.service.job.execution.*; | [
"org.eclipse.kapua"
] | org.eclipse.kapua; | 1,049,545 |
void setDate(LocalDate value); | void setDate(LocalDate value); | /**
* Sets the value of the '{@link ch.elexis.core.model.IAccountTransaction#getDate <em>Date</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Date</em>' attribute.
* @see #getDate()
* @generated
*/ | Sets the value of the '<code>ch.elexis.core.model.IAccountTransaction#getDate Date</code>' attribute. | setDate | {
"repo_name": "elexis/elexis-3-core",
"path": "bundles/ch.elexis.core/src-gen/ch/elexis/core/model/IAccountTransaction.java",
"license": "epl-1.0",
"size": 7316
} | [
"java.time.LocalDate"
] | import java.time.LocalDate; | import java.time.*; | [
"java.time"
] | java.time; | 2,565,693 |
public CacheTransactionManager getCacheTransactionManager() {
return this.txMgr;
}
private SystemTimer ccpTimer;
private final Object ccpTimerMutex = new Object(); | CacheTransactionManager function() { return this.txMgr; } private SystemTimer ccpTimer; private final Object ccpTimerMutex = new Object(); | /**
* Creates the single instance of the Transation Manager for this cache. Returns the existing one upon request.
*
* @return the CacheTransactionManager instance.
*
* @since 4.0
*/ | Creates the single instance of the Transation Manager for this cache. Returns the existing one upon request | getCacheTransactionManager | {
"repo_name": "ameybarve15/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java",
"license": "apache-2.0",
"size": 179530
} | [
"com.gemstone.gemfire.cache.CacheTransactionManager",
"com.gemstone.gemfire.internal.SystemTimer"
] | import com.gemstone.gemfire.cache.CacheTransactionManager; import com.gemstone.gemfire.internal.SystemTimer; | import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.internal.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 538,622 |
public static final AdGroupFeedServiceClient create(AdGroupFeedServiceSettings settings)
throws IOException {
return new AdGroupFeedServiceClient(settings);
} | static final AdGroupFeedServiceClient function(AdGroupFeedServiceSettings settings) throws IOException { return new AdGroupFeedServiceClient(settings); } | /**
* Constructs an instance of AdGroupFeedServiceClient, using the given settings. The channels are
* created based on the settings passed in, or defaults for any settings that are not set.
*/ | Constructs an instance of AdGroupFeedServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set | create | {
"repo_name": "googleads/google-ads-java",
"path": "google-ads-stubs-v10/src/main/java/com/google/ads/googleads/v10/services/AdGroupFeedServiceClient.java",
"license": "apache-2.0",
"size": 11329
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,040,808 |
private static Set<EdgeResult> getSources(final INaviEdge edge,
final Map<INaviViewNode, INaviViewNode> nodeMap, final Set<INaviEdge> visited) {
final INaviViewNode source = edge.getSource();
visited.add(edge);
final Set<EdgeResult> sources = new HashSet<EdgeResult>();
if (nodeMap.containsKey... | static Set<EdgeResult> function(final INaviEdge edge, final Map<INaviViewNode, INaviViewNode> nodeMap, final Set<INaviEdge> visited) { final INaviViewNode source = edge.getSource(); visited.add(edge); final Set<EdgeResult> sources = new HashSet<EdgeResult>(); if (nodeMap.containsKey(source)) { sources.add(new EdgeResul... | /**
* Collects edge information about outgoing edges.
*
* @param edge The edge whose information is collected.
* @param nodeMap Maps between nodes of the old view and nodes of the new view.
* @param visited Already visited edges.
*
* @return The collected edge information.
*/ | Collects edge information about outgoing edges | getSources | {
"repo_name": "mayl8822/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Gui/GraphWindows/BottomPanel/RegisterTracker/CViewPruner.java",
"license": "apache-2.0",
"size": 8106
} | [
"com.google.security.zynamics.binnavi.disassembly.INaviEdge",
"com.google.security.zynamics.binnavi.disassembly.INaviViewNode",
"java.util.HashSet",
"java.util.Map",
"java.util.Set"
] | import com.google.security.zynamics.binnavi.disassembly.INaviEdge; import com.google.security.zynamics.binnavi.disassembly.INaviViewNode; import java.util.HashSet; import java.util.Map; import java.util.Set; | import com.google.security.zynamics.binnavi.disassembly.*; import java.util.*; | [
"com.google.security",
"java.util"
] | com.google.security; java.util; | 1,144,634 |
public void process (int grid, float reg, int maxIter, float sizeTrashold) {
this.gridSize = (grid < 5) ? 5 : grid;
this.regul = (reg < 0) ? 0 : reg;
// according the VLFeat library the regul is in range {0,1}
this.factor = (regul*regul) * (float)(gridSize);
float err, lastErr = Float.MAX_VALUE;
Loggi... | void function (int grid, float reg, int maxIter, float sizeTrashold) { this.gridSize = (grid < 5) ? 5 : grid; this.regul = (reg < 0) ? 0 : reg; this.factor = (regul*regul) * (float)(gridSize); float err, lastErr = Float.MAX_VALUE; Logging.logMsg(STR + Integer.toString(gridSize) + STR + Float.toString(regul)); initClust... | /**
* Process the whole segmentation process
*
* @param grid integer number defining the initial regular grid size
* @param reg float defining the superpixel elasticity in range (0,1)
* @param maxIter number of maximal iterations
* @param sizeTrashold says till which size superpixels will by terminate... | Process the whole segmentation process | process | {
"repo_name": "dscho/ij-CMP-BIA",
"path": "src/main/java/sc/fiji/CMP_BIA/segmentation/superpixels/jSLIC.java",
"license": "gpl-2.0",
"size": 27141
} | [
"sc.fiji.CMP_BIA"
] | import sc.fiji.CMP_BIA; | import sc.fiji.*; | [
"sc.fiji"
] | sc.fiji; | 1,259,432 |
@Override
public HierarchicalUriComponents encode(String encoding) throws UnsupportedEncodingException {
Assert.hasLength(encoding, "Encoding must not be empty");
if (this.encoded) {
return this;
}
String encodedScheme = encodeUriComponent(getScheme(), encoding, Type.SCHEME);
String encodedUserInfo = e... | HierarchicalUriComponents function(String encoding) throws UnsupportedEncodingException { Assert.hasLength(encoding, STR); if (this.encoded) { return this; } String encodedScheme = encodeUriComponent(getScheme(), encoding, Type.SCHEME); String encodedUserInfo = encodeUriComponent(this.userInfo, encoding, Type.USER_INFO... | /**
* Encodes all URI components using their specific encoding rules, and returns the result as a new
* {@code UriComponents} instance.
* @param encoding the encoding of the values contained in this map
* @return the encoded uri components
* @throws UnsupportedEncodingException if the given encoding is not su... | Encodes all URI components using their specific encoding rules, and returns the result as a new UriComponents instance | encode | {
"repo_name": "admin-zhx/spring-android",
"path": "spring-android-rest-template/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java",
"license": "apache-2.0",
"size": 24322
} | [
"java.io.UnsupportedEncodingException",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.springframework.util.Assert",
"org.springframework.util.LinkedMultiValueMap",
"org.springframework.util.MultiValueMap"
] | import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.springframework.util.Assert; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; | import java.io.*; import java.util.*; import org.springframework.util.*; | [
"java.io",
"java.util",
"org.springframework.util"
] | java.io; java.util; org.springframework.util; | 2,068,134 |
public List<T> listRange(int usageKeyStart, int usageKeyEnd) {
if (usageKeyStart > usageKeyEnd) {
throw new IllegalArgumentException("start " + usageKeyStart + " > end " + usageKeyEnd + " range");
}
if (isNub(usageKeyEnd)) {
// only nub usages
return mapper.listByNubUsageRange(usageKeySt... | List<T> function(int usageKeyStart, int usageKeyEnd) { if (usageKeyStart > usageKeyEnd) { throw new IllegalArgumentException(STR + usageKeyStart + STR + usageKeyEnd + STR); } if (isNub(usageKeyEnd)) { return mapper.listByNubUsageRange(usageKeyStart, usageKeyEnd); } else if (!isNub(usageKeyStart)) { return mapper.listBy... | /**
* Lists all name usages with a key between start / end.
*
* @throws IllegalArgumentException if start <= end
*/ | Lists all name usages with a key between start / end | listRange | {
"repo_name": "fmendezh/checklistbank",
"path": "checklistbank-mybatis-service/src/main/java/org/gbif/checklistbank/service/mybatis/NameUsageComponentServiceMyBatis.java",
"license": "apache-2.0",
"size": 2358
} | [
"java.util.List",
"org.gbif.api.model.Constants"
] | import java.util.List; import org.gbif.api.model.Constants; | import java.util.*; import org.gbif.api.model.*; | [
"java.util",
"org.gbif.api"
] | java.util; org.gbif.api; | 2,412,398 |
Date getTime(); | Date getTime(); | /**
* Returns the value of the '<em><b>Time</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Time</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Time</em>' attribute.
* ... | Returns the value of the 'Time' attribute. If the meaning of the 'Time' attribute isn't clear, there really should be more of a description here... | getTime | {
"repo_name": "sazgin/elexis-3-core",
"path": "ch.elexis.core.ui.usage/src-gen/ch/elexis/core/ui/usage/model/IStatistic.java",
"license": "epl-1.0",
"size": 4037
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,765,635 |
protected void scanAttributeValue(XMLString value,
XMLString nonNormalizedValue,
String atName,
XMLAttributes attributes, int attrIndex,
boolean checkEntities, String eleName)
throws IOException, XNIException {
XMLStringBuffer stringBuffer = null;
... | void function(XMLString value, XMLString nonNormalizedValue, String atName, XMLAttributes attributes, int attrIndex, boolean checkEntities, String eleName) throws IOException, XNIException { XMLStringBuffer stringBuffer = null; int quote = fEntityScanner.peekChar(); if (quote != '\'' && quote != 'STROpenQuoteExpectedST... | /**
* Scans an attribute value and normalizes whitespace converting all
* whitespace characters to space characters.
*
* [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
*
* @param value The XMLString to fill in with the value.
* @param nonNormalizedValu... | Scans an attribute value and normalizes whitespace converting all whitespace characters to space characters. [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" | scanAttributeValue | {
"repo_name": "shelan/jdk9-mirror",
"path": "jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java",
"license": "gpl-2.0",
"size": 58084
} | [
"com.sun.org.apache.xerces.internal.util.XMLStringBuffer",
"com.sun.org.apache.xerces.internal.xni.XMLAttributes",
"com.sun.org.apache.xerces.internal.xni.XMLString",
"com.sun.org.apache.xerces.internal.xni.XNIException",
"java.io.IOException"
] | import com.sun.org.apache.xerces.internal.util.XMLStringBuffer; import com.sun.org.apache.xerces.internal.xni.XMLAttributes; import com.sun.org.apache.xerces.internal.xni.XMLString; import com.sun.org.apache.xerces.internal.xni.XNIException; import java.io.IOException; | import com.sun.org.apache.xerces.internal.util.*; import com.sun.org.apache.xerces.internal.xni.*; import java.io.*; | [
"com.sun.org",
"java.io"
] | com.sun.org; java.io; | 1,845,745 |
private static Integer writeToTar(File baseDir, String fileMask, String excludes, OutputStream out) throws IOException {
Archiver tw = ArchiverFactory.TAR.create(out);
try {
new DirScanner.Glob(fileMask, excludes).scan(baseDir, tw);
} finally {
tw.close();
}
... | static Integer function(File baseDir, String fileMask, String excludes, OutputStream out) throws IOException { Archiver tw = ArchiverFactory.TAR.create(out); try { new DirScanner.Glob(fileMask, excludes).scan(baseDir, tw); } finally { tw.close(); } return tw.countEntries(); } | /**
* Writes to a tar stream and stores obtained files to the base dir.
*
* @return number of files/directories that are written.
*/ | Writes to a tar stream and stores obtained files to the base dir | writeToTar | {
"repo_name": "sap-production/hudson-3.x",
"path": "hudson-core/src/main/java/hudson/FilePath.java",
"license": "apache-2.0",
"size": 77110
} | [
"hudson.util.DirScanner",
"hudson.util.io.Archiver",
"hudson.util.io.ArchiverFactory",
"java.io.File",
"java.io.IOException",
"java.io.OutputStream"
] | import hudson.util.DirScanner; import hudson.util.io.Archiver; import hudson.util.io.ArchiverFactory; import java.io.File; import java.io.IOException; import java.io.OutputStream; | import hudson.util.*; import hudson.util.io.*; import java.io.*; | [
"hudson.util",
"hudson.util.io",
"java.io"
] | hudson.util; hudson.util.io; java.io; | 2,365,399 |
private void groupChatMessageCheck(ChatRoom chatRoom, boolean customMsg, String customMsgText, String customMsgTitle) {
// predefine if this is a group chat message or not
localPref = SettingsManager.getLocalPreferences();
boolean isGroupChat = chatRoom.getChatType() == Message.Type.group... | void function(ChatRoom chatRoom, boolean customMsg, String customMsgText, String customMsgTitle) { localPref = SettingsManager.getLocalPreferences(); boolean isGroupChat = chatRoom.getChatType() == Message.Type.groupchat; int size = chatRoom.getTranscripts().size(); if (isGroupChat) { String fromNickName=STRSTRSTR/STRg... | /**
* Performs several group chat checks
*
* chatRoom the chat room that needs to be passed
* customMsg whether or not this is a custom message
* customMsgText if any custom message should appear in the popup
* customMsgTitle whether or not the toaster should have any popup
*
... | Performs several group chat checks chatRoom the chat room that needs to be passed customMsg whether or not this is a custom message customMsgText if any custom message should appear in the popup customMsgTitle whether or not the toaster should have any popup | groupChatMessageCheck | {
"repo_name": "joshuairl/toothchat-client",
"path": "src/java/org/jivesoftware/spark/ui/ChatContainer.java",
"license": "apache-2.0",
"size": 52693
} | [
"org.jivesoftware.smack.packet.Message",
"org.jivesoftware.sparkimpl.settings.local.SettingsManager"
] | import org.jivesoftware.smack.packet.Message; import org.jivesoftware.sparkimpl.settings.local.SettingsManager; | import org.jivesoftware.smack.packet.*; import org.jivesoftware.sparkimpl.settings.local.*; | [
"org.jivesoftware.smack",
"org.jivesoftware.sparkimpl"
] | org.jivesoftware.smack; org.jivesoftware.sparkimpl; | 1,051,588 |
public static Calendar startOfDayYesterday() {
Calendar yesterday = Calendar.getInstance();
truncateDay(yesterday);
yesterday.add(Calendar.DAY_OF_MONTH, -1);
return yesterday;
} | static Calendar function() { Calendar yesterday = Calendar.getInstance(); truncateDay(yesterday); yesterday.add(Calendar.DAY_OF_MONTH, -1); return yesterday; } | /**
* create a calendar for start of day yesterday.
* @return
*/ | create a calendar for start of day yesterday | startOfDayYesterday | {
"repo_name": "yangjiandong/sshapp",
"path": "application/sshapp/src/main/java/org/ssh/app/util/CalendarUtil.java",
"license": "apache-2.0",
"size": 5961
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 932,965 |
@POST
@Path("/{idGP}/assess")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public String assess2(String actionP, @PathParam("idGP") int idGP)
{
FeedbackTriggerController feedbackTriggerController = null;
GamePlayController gpController = null;
... | @Path(STR) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) String function(String actionP, @PathParam("idGP") int idGP) { FeedbackTriggerController feedbackTriggerController = null; GamePlayController gpController = null; try { JSONObject action=(JSONObject) JSONValue.parse(actionP); gpContr... | /**
* Method handling HTTP POST requests on path "gameplay/{idGP}/assess"
*
* @param idGP = an integer id of the current gameplay
* @param actionP = a JSON object containing a String "action" and a JSON "values"
* (containg a String foreach parameter of the action)
* @return the list of ... | Method handling HTTP POST requests on path "gameplay/{idGP}/assess" | assess2 | {
"repo_name": "yaelleUWS/engage_ws",
"path": "src/main/java/uws/engage/assessment/GamePlayResource.java",
"license": "gpl-2.0",
"size": 37052
} | [
"java.util.ArrayList",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"org.json.simple.JSONObject",
"org.json.simple.JSONValue"
] | import java.util.ArrayList; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.json.simple.JSONObject; import org.json.simple.JSONValue; | import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.json.simple.*; | [
"java.util",
"javax.ws",
"org.json.simple"
] | java.util; javax.ws; org.json.simple; | 679,852 |
@RPCMethod(legacy = true)
default Future<ActionDescription> applyAction(final ActionParameterOrBuilder actionParameter) {
try {
final ActionDescription.Builder actionDescriptionBuilder = ActionDescriptionProcessor.generateActionDescriptionBuilder(actionParameter);
if (actionDescr... | @RPCMethod(legacy = true) default Future<ActionDescription> applyAction(final ActionParameterOrBuilder actionParameter) { try { final ActionDescription.Builder actionDescriptionBuilder = ActionDescriptionProcessor.generateActionDescriptionBuilder(actionParameter); if (actionDescriptionBuilder.getServiceStateDescription... | /**
* Method applies the action on this instance.
*
* @param actionParameter the needed parameters to generate a new action.
*
* @return a future which gives feedback about the action execution state.
*/ | Method applies the action on this instance | applyAction | {
"repo_name": "DivineCooperation/bco.dal",
"path": "lib/src/main/java/org/openbase/bco/dal/lib/layer/service/ServiceProvider.java",
"license": "gpl-3.0",
"size": 5547
} | [
"java.util.concurrent.Future",
"org.openbase.bco.authentication.lib.SessionManager",
"org.openbase.bco.authentication.lib.future.AuthenticatedValueFuture",
"org.openbase.bco.dal.lib.action.ActionDescriptionProcessor",
"org.openbase.jul.annotation.RPCMethod",
"org.openbase.jul.exception.CouldNotPerformExce... | import java.util.concurrent.Future; import org.openbase.bco.authentication.lib.SessionManager; import org.openbase.bco.authentication.lib.future.AuthenticatedValueFuture; import org.openbase.bco.dal.lib.action.ActionDescriptionProcessor; import org.openbase.jul.annotation.RPCMethod; import org.openbase.jul.exception.Co... | import java.util.concurrent.*; import org.openbase.bco.authentication.lib.*; import org.openbase.bco.authentication.lib.future.*; import org.openbase.bco.dal.lib.action.*; import org.openbase.jul.annotation.*; import org.openbase.jul.exception.*; import org.openbase.jul.schedule.*; import org.openbase.type.domotic.acti... | [
"java.util",
"org.openbase.bco",
"org.openbase.jul",
"org.openbase.type"
] | java.util; org.openbase.bco; org.openbase.jul; org.openbase.type; | 2,038,747 |
public static void sendNPCChatOneLine(Player player, DialogueListener listener, String firstLine, int npcID, int dialogueId, String npcName, HeadAnimations anim) {
player.send(new SendNPCHeadEvent(4883, npcID));
player.send(new ChatHeadAnimationEvent(4883, Animation.create(anim.getAnim())));
... | static void function(Player player, DialogueListener listener, String firstLine, int npcID, int dialogueId, String npcName, HeadAnimations anim) { player.send(new SendNPCHeadEvent(4883, npcID)); player.send(new ChatHeadAnimationEvent(4883, Animation.create(anim.getAnim()))); player.send(new SetInterfaceTextEvent(4885, ... | /**
* Sends an npc chat dialogue with only one line.
*
* @param player
* the player
* @param listener
* the listener
* @param firstLine
* the first line
* @param npcID
* the npc id
* @param dialogueId
* the dialogue id
* @p... | Sends an npc chat dialogue with only one line | sendNPCChatOneLine | {
"repo_name": "AWildridge/ProtoScape",
"path": "src/org/apollo/game/model/inter/dialog/DialogueSender.java",
"license": "isc",
"size": 15757
} | [
"org.apollo.game.event.impl.ChatHeadAnimationEvent",
"org.apollo.game.event.impl.SendNPCHeadEvent",
"org.apollo.game.event.impl.SetInterfaceTextEvent",
"org.apollo.game.model.Animation",
"org.apollo.game.model.Player"
] | import org.apollo.game.event.impl.ChatHeadAnimationEvent; import org.apollo.game.event.impl.SendNPCHeadEvent; import org.apollo.game.event.impl.SetInterfaceTextEvent; import org.apollo.game.model.Animation; import org.apollo.game.model.Player; | import org.apollo.game.event.impl.*; import org.apollo.game.model.*; | [
"org.apollo.game"
] | org.apollo.game; | 303,503 |
public void deleteBidStateData() throws DataLayerException
{
bidStateDao.deleteAll();
}
| void function() throws DataLayerException { bidStateDao.deleteAll(); } | /**
* Delete all BidState data.
*
* @throws DataLayerException
*/ | Delete all BidState data | deleteBidStateData | {
"repo_name": "alistairrutherford/trader-rater",
"path": "trader-rater-common-jpa/src/test/java/com/netthreads/test/helper/StaticDataHelper.java",
"license": "apache-2.0",
"size": 3151
} | [
"com.netthreads.trader.exception.DataLayerException"
] | import com.netthreads.trader.exception.DataLayerException; | import com.netthreads.trader.exception.*; | [
"com.netthreads.trader"
] | com.netthreads.trader; | 2,852,507 |
private void testTransaction0(IgniteCache<Integer, Object>[] caches, TransactionConcurrency concurrency,
Integer key, byte[] val) throws Exception {
testTransactionMixed0(caches, concurrency, key, val, null, null);
} | void function(IgniteCache<Integer, Object>[] caches, TransactionConcurrency concurrency, Integer key, byte[] val) throws Exception { testTransactionMixed0(caches, concurrency, key, val, null, null); } | /**
* Test transaction behavior.
*
* @param caches Caches.
* @param concurrency Concurrency.
* @param key Key.
* @param val Value.
* @throws Exception If failed.
*/ | Test transaction behavior | testTransaction0 | {
"repo_name": "leveyj/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java",
"license": "apache-2.0",
"size": 12388
} | [
"org.apache.ignite.IgniteCache",
"org.apache.ignite.transactions.TransactionConcurrency"
] | import org.apache.ignite.IgniteCache; import org.apache.ignite.transactions.TransactionConcurrency; | import org.apache.ignite.*; import org.apache.ignite.transactions.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 479,974 |
@SuppressWarnings("unused")
protected void validateNodeBeforeAcceptingRequests(Settings settings, BoundTransportAddress boundTransportAddress) {
} | @SuppressWarnings(STR) void function(Settings settings, BoundTransportAddress boundTransportAddress) { } | /**
* Hook for validating the node after network
* services are started but before the cluster service is started
* and before the network service starts accepting incoming network
* requests.
*
* @param settings the fully-resolved settings
* @param boundTransportAddress ... | Hook for validating the node after network services are started but before the cluster service is started and before the network service starts accepting incoming network requests | validateNodeBeforeAcceptingRequests | {
"repo_name": "mmaracic/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/node/Node.java",
"license": "apache-2.0",
"size": 26774
} | [
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.common.transport.BoundTransportAddress"
] | import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.BoundTransportAddress; | import org.elasticsearch.common.settings.*; import org.elasticsearch.common.transport.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 748,118 |
public void setClipPath(Shape clipPath) {
touch();
this.clipPath = clipPath;
} | void function(Shape clipPath) { touch(); this.clipPath = clipPath; } | /**
* Set the clip path to use.
* The path will be filled with opaque white.
* @param clipPath The clip path to use
*/ | Set the clip path to use. The path will be filled with opaque white | setClipPath | {
"repo_name": "apache/batik",
"path": "batik-awt-util/src/main/java/org/apache/batik/ext/awt/image/renderable/ClipRable8Bit.java",
"license": "apache-2.0",
"size": 5750
} | [
"java.awt.Shape"
] | import java.awt.Shape; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,587,624 |
public boolean delete() throws IOException, InterruptedException {
act(new Delete());
return true;
} | boolean function() throws IOException, InterruptedException { act(new Delete()); return true; } | /**
* Deletes this file.
* @throws IOException if it exists but could not be successfully deleted
* @return true, for a modicum of compatibility
*/ | Deletes this file | delete | {
"repo_name": "pjanouse/jenkins",
"path": "core/src/main/java/hudson/FilePath.java",
"license": "mit",
"size": 148331
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,868,088 |
public void destroyObject(Object obj) throws Exception {
if (obj instanceof PooledConnectionAndInfo) {
PooledConnection pc = ((PooledConnectionAndInfo)obj).getPooledConnection();
pc.removeConnectionEventListener(this);
pcMap.remove(pc);
pc.close();
}
... | void function(Object obj) throws Exception { if (obj instanceof PooledConnectionAndInfo) { PooledConnection pc = ((PooledConnectionAndInfo)obj).getPooledConnection(); pc.removeConnectionEventListener(this); pcMap.remove(pc); pc.close(); } } | /**
* Closes the PooledConnection and stops listening for events from it.
*/ | Closes the PooledConnection and stops listening for events from it | destroyObject | {
"repo_name": "ZJU-Shaonian-Biancheng-Tuan/bbossgroups-3.5",
"path": "bboss-persistent/src-jdk6/com/frameworkset/commons/dbcp/datasources/CPDSConnectionFactory.java",
"license": "apache-2.0",
"size": 12798
} | [
"javax.sql.PooledConnection"
] | import javax.sql.PooledConnection; | import javax.sql.*; | [
"javax.sql"
] | javax.sql; | 1,995,891 |
@Override
public int addToPool(Task task, EngineMessageProducer engineMessageProducer) throws TaskStoreException {
int engineId = (engineMessageProducer == null) ? -1 : engineMessageProducer.getClientID();
if (task.getId() == 0) {
if (getTask(task.getFacility(), task.getService()) == null) {
int id = ta... | int function(Task task, EngineMessageProducer engineMessageProducer) throws TaskStoreException { int engineId = (engineMessageProducer == null) ? -1 : engineMessageProducer.getClientID(); if (task.getId() == 0) { if (getTask(task.getFacility(), task.getService()) == null) { int id = taskManager.scheduleNewTask(task, en... | /**
* Adds Task and associated dispatcherQueue into scheduling pools internal maps and also to the database.
*
* @param task Task which will be added and persisted.
* @param engineMessageProducer dispatcherQueue associated with the Task which will be added and persisted.
* @return Number of Tasks i... | Adds Task and associated dispatcherQueue into scheduling pools internal maps and also to the database | addToPool | {
"repo_name": "stavamichal/perun",
"path": "perun-dispatcher/src/main/java/cz/metacentrum/perun/dispatcher/scheduling/impl/SchedulingPoolImpl.java",
"license": "bsd-2-clause",
"size": 20393
} | [
"cz.metacentrum.perun.dispatcher.jms.EngineMessageProducer",
"cz.metacentrum.perun.taskslib.exceptions.TaskStoreException",
"cz.metacentrum.perun.taskslib.model.Task"
] | import cz.metacentrum.perun.dispatcher.jms.EngineMessageProducer; import cz.metacentrum.perun.taskslib.exceptions.TaskStoreException; import cz.metacentrum.perun.taskslib.model.Task; | import cz.metacentrum.perun.dispatcher.jms.*; import cz.metacentrum.perun.taskslib.exceptions.*; import cz.metacentrum.perun.taskslib.model.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 832,065 |
public void update(DataRecord data, RecordTemplate template); | void function(DataRecord data, RecordTemplate template); | /**
* Update the settings with a given DataRecord
* @param data the data record
* @param template the record template
*/ | Update the settings with a given DataRecord | update | {
"repo_name": "stephaneperry/Silverpeas-Core",
"path": "ejb-core/formtemplate/src/main/java/com/silverpeas/workflow/api/user/UserSettings.java",
"license": "agpl-3.0",
"size": 2417
} | [
"com.silverpeas.form.DataRecord",
"com.silverpeas.form.RecordTemplate"
] | import com.silverpeas.form.DataRecord; import com.silverpeas.form.RecordTemplate; | import com.silverpeas.form.*; | [
"com.silverpeas.form"
] | com.silverpeas.form; | 476,189 |
private float getNormalizedVolume(ISound p_148594_1_, SoundPoolEntry p_148594_2_, SoundCategory p_148594_3_)
{
return (float)MathHelper.clamp_double((double)p_148594_1_.getVolume() * p_148594_2_.getVolume(), 0.0D, 1.0D) * this.getSoundCategoryVolume(p_148594_3_);
} | float function(ISound p_148594_1_, SoundPoolEntry p_148594_2_, SoundCategory p_148594_3_) { return (float)MathHelper.clamp_double((double)p_148594_1_.getVolume() * p_148594_2_.getVolume(), 0.0D, 1.0D) * this.getSoundCategoryVolume(p_148594_3_); } | /**
* Normalizes volume level from parameters. Range [0.0, 1.0]
*/ | Normalizes volume level from parameters. Range [0.0, 1.0] | getNormalizedVolume | {
"repo_name": "Hexeption/Youtube-Hacked-Client-1.8",
"path": "minecraft/net/minecraft/client/audio/SoundManager.java",
"license": "mit",
"size": 22118
} | [
"net.minecraft.util.MathHelper"
] | import net.minecraft.util.MathHelper; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,926,018 |
private void testChecker(FileSystem fileSys, boolean readCS)
throws Exception {
Path file = new Path("try.dat");
writeFile(fileSys, file);
try {
if (!readCS) {
fileSys.setVerifyChecksum(false);
}
stm = fileSys.open(file);
checkReadAndGetPos();
checkSeek();
c... | void function(FileSystem fileSys, boolean readCS) throws Exception { Path file = new Path(STR); writeFile(fileSys, file); try { if (!readCS) { fileSys.setVerifyChecksum(false); } stm = fileSys.open(file); checkReadAndGetPos(); checkSeek(); checkSkip(); assertFalse(stm.markSupported()); stm.close(); } finally { if (!rea... | /**
* Tests read/seek/getPos/skipped opeation for input stream.
*/ | Tests read/seek/getPos/skipped opeation for input stream | testChecker | {
"repo_name": "jayantgolhar/Hadoop-0.21.0",
"path": "hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestFSInputChecker.java",
"license": "apache-2.0",
"size": 11189
} | [
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,329,290 |
public static HasIpAccessLists hasIpAccessLists(
@Nonnull Matcher<? super Map<String, IpAccessList>> subMatcher) {
return new HasIpAccessLists(subMatcher);
} | static HasIpAccessLists function( @Nonnull Matcher<? super Map<String, IpAccessList>> subMatcher) { return new HasIpAccessLists(subMatcher); } | /**
* Provides a matcher that matches if the provided {@code subMatcher} matches the configuration's
* ipAccessLists.
*/ | Provides a matcher that matches if the provided subMatcher matches the configuration's ipAccessLists | hasIpAccessLists | {
"repo_name": "arifogel/batfish",
"path": "projects/batfish-common-protocol/src/test/java/org/batfish/datamodel/matchers/ConfigurationMatchers.java",
"license": "apache-2.0",
"size": 10497
} | [
"java.util.Map",
"javax.annotation.Nonnull",
"org.batfish.datamodel.IpAccessList",
"org.batfish.datamodel.matchers.ConfigurationMatchersImpl",
"org.hamcrest.Matcher"
] | import java.util.Map; import javax.annotation.Nonnull; import org.batfish.datamodel.IpAccessList; import org.batfish.datamodel.matchers.ConfigurationMatchersImpl; import org.hamcrest.Matcher; | import java.util.*; import javax.annotation.*; import org.batfish.datamodel.*; import org.batfish.datamodel.matchers.*; import org.hamcrest.*; | [
"java.util",
"javax.annotation",
"org.batfish.datamodel",
"org.hamcrest"
] | java.util; javax.annotation; org.batfish.datamodel; org.hamcrest; | 1,991,407 |
private void refill() throws IOException {
offset += usableLength;
int leftover = length - usableLength;
System.arraycopy(buffer, usableLength, buffer, 0, leftover);
int requested = buffer.length - leftover;
int returned = read(input, buffer, leftover, requested);
length = returned < 0 ? lefto... | void function() throws IOException { offset += usableLength; int leftover = length - usableLength; System.arraycopy(buffer, usableLength, buffer, 0, leftover); int requested = buffer.length - leftover; int returned = read(input, buffer, leftover, requested); length = returned < 0 ? leftover : returned + leftover; if (r... | /**
* Refill the buffer, accumulating the offset and setting usableLength to the
* last unambiguous break position
*
* @throws IOException
*/ | Refill the buffer, accumulating the offset and setting usableLength to the last unambiguous break position | refill | {
"repo_name": "lucene-gosen/lucene-gosen",
"path": "src/main/java/org/apache/lucene/analysis/gosen/StreamTagger2.java",
"license": "lgpl-2.1",
"size": 6554
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,300,066 |
public boolean hasKey() {
return !TextUtils.isEmpty(mKey);
} | boolean function() { return !TextUtils.isEmpty(mKey); } | /**
* Checks whether this Preference has a valid key.
*
* @return True if the key exists and is not a blank string, false otherwise.
*/ | Checks whether this Preference has a valid key | hasKey | {
"repo_name": "xorware/android_frameworks_base",
"path": "core/java/android/preference/Preference.java",
"license": "apache-2.0",
"size": 67104
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 2,378,898 |
public T jacksonxml(boolean prettyPrint) {
JacksonXMLDataFormat jacksonXMLDataFormat = new JacksonXMLDataFormat();
jacksonXMLDataFormat.setPrettyPrint(prettyPrint);
return dataFormat(jacksonXMLDataFormat);
} | T function(boolean prettyPrint) { JacksonXMLDataFormat jacksonXMLDataFormat = new JacksonXMLDataFormat(); jacksonXMLDataFormat.setPrettyPrint(prettyPrint); return dataFormat(jacksonXMLDataFormat); } | /**
* Uses the Jackson XML data format using the Jackson library turning pretty
* printing on or off
*
* @param prettyPrint
* turn pretty printing on or off
*/ | Uses the Jackson XML data format using the Jackson library turning pretty printing on or off | jacksonxml | {
"repo_name": "jarst/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 39484
} | [
"org.apache.camel.model.dataformat.JacksonXMLDataFormat"
] | import org.apache.camel.model.dataformat.JacksonXMLDataFormat; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 332,916 |
public final String escapeElementEntities(final String str,
final Format format) {
return Format.escapeText(format.getEscapeStrategy(),
format.getLineSeparator(), str);
}
}
private static final DefaultXMLProcessor DEFAULTPROCESSOR =
new DefaultXMLProcessor();
// For normal output
privat... | final String function(final String str, final Format format) { return Format.escapeText(format.getEscapeStrategy(), format.getLineSeparator(), str); } } private static final DefaultXMLProcessor DEFAULTPROCESSOR = new DefaultXMLProcessor(); private Format myFormat = null; private XMLOutputProcessor myProcessor = null; p... | /**
* A helper method to implement backward-compatibility with JDOM1
*
* @see XMLOutputter#escapeElementEntities(String)
* @param str
* The String to output.
* @param format
* The format details to use.
* @return The input String escaped as an element text value.
*/ | A helper method to implement backward-compatibility with JDOM1 | escapeElementEntities | {
"repo_name": "djcraft/Algotica",
"path": "compilateurAlgotica/src/org/jdom2/output/XMLOutputter.java",
"license": "gpl-3.0",
"size": 35699
} | [
"org.jdom2.output.support.XMLOutputProcessor"
] | import org.jdom2.output.support.XMLOutputProcessor; | import org.jdom2.output.support.*; | [
"org.jdom2.output"
] | org.jdom2.output; | 475,924 |
public void modify(String fid, SimpleFeature f) {
synchronized (mutex) {
SimpleFeature old;
if( addedFeatures.containsKey(fid) ){
old = addedFeatures.get(fid);
if( f == null ){
addedFeatures.remove(fid);
addedFidList.remove(fid);
... | void function(String fid, SimpleFeature f) { synchronized (mutex) { SimpleFeature old; if( addedFeatures.containsKey(fid) ){ old = addedFeatures.get(fid); if( f == null ){ addedFeatures.remove(fid); addedFidList.remove(fid); } else { addedFeatures.put(fid, f); } } else{ old = modifiedFeatures.get(fid); modifiedFeatures... | /**
* Record a modification to the indicated fid
*
* @param fid
* @param f replacement feature; null to indicate remove
*/ | Record a modification to the indicated fid | modify | {
"repo_name": "FUNCATE/TerraMobile",
"path": "sldparser/src/main/geotools/data/Diff.java",
"license": "apache-2.0",
"size": 14428
} | [
"org.geotools.geometry.jts.ReferencedEnvelope",
"org.opengis.feature.simple.SimpleFeature"
] | import org.geotools.geometry.jts.ReferencedEnvelope; import org.opengis.feature.simple.SimpleFeature; | import org.geotools.geometry.jts.*; import org.opengis.feature.simple.*; | [
"org.geotools.geometry",
"org.opengis.feature"
] | org.geotools.geometry; org.opengis.feature; | 1,745,411 |
public void removeProgressListener(ProgressListener listener) {
listenerList.remove(ProgressListener.class, listener);
}
| void function(ProgressListener listener) { listenerList.remove(ProgressListener.class, listener); } | /**
* Remove any object no longer interested in listening to persistence
* progress.
*
* @param listener the listener to remove.
*/ | Remove any object no longer interested in listening to persistence progress | removeProgressListener | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/argouml_diagrams/argouml-app/src/org/argouml/persistence/AbstractFilePersister.java",
"license": "gpl-3.0",
"size": 17206
} | [
"org.argouml.taskmgmt.ProgressListener"
] | import org.argouml.taskmgmt.ProgressListener; | import org.argouml.taskmgmt.*; | [
"org.argouml.taskmgmt"
] | org.argouml.taskmgmt; | 1,674,957 |
public String generateSharedDatabaseID() {
this.sharedDatabaseID = new BigInteger(128, new SecureRandom()).toString(32);
return this.sharedDatabaseID;
} | String function() { this.sharedDatabaseID = new BigInteger(128, new SecureRandom()).toString(32); return this.sharedDatabaseID; } | /**
* Generates and sets a random ID which is globally unique.
*
* @return The generated sharedDatabaseID
*/ | Generates and sets a random ID which is globally unique | generateSharedDatabaseID | {
"repo_name": "zellerdev/jabref",
"path": "src/main/java/org/jabref/model/database/BibDatabase.java",
"license": "mit",
"size": 21909
} | [
"java.math.BigInteger",
"java.security.SecureRandom"
] | import java.math.BigInteger; import java.security.SecureRandom; | import java.math.*; import java.security.*; | [
"java.math",
"java.security"
] | java.math; java.security; | 2,635,277 |
private MTSSetTransactionStatement setMTSSetTransactionStatement(VariableScope scope)
throws SQLSyntaxErrorException {
lexer.nextToken();
matchIdentifier("ISOLATION");
matchIdentifier("LEVEL");
... | MTSSetTransactionStatement function(VariableScope scope) throws SQLSyntaxErrorException { lexer.nextToken(); matchIdentifier(STR); matchIdentifier("LEVEL"); SpecialIdentifier si; switch (lexer.token()) { case KW_READ: lexer.nextToken(); si = specialIdentifiers.get(lexer.stringValueUppercase()); if (si != null) { switch... | /**
* first token is <code>TRANSACTION</code>
*/ | first token is <code>TRANSACTION</code> | setMTSSetTransactionStatement | {
"repo_name": "beebeandwer/TDDL",
"path": "tddl-parser/src/main/java/com/alibaba/cobar/parser/recognizer/mysql/syntax/MySQLDALParser.java",
"license": "apache-2.0",
"size": 46837
} | [
"com.alibaba.cobar.parser.ast.fragment.VariableScope",
"com.alibaba.cobar.parser.ast.stmt.mts.MTSSetTransactionStatement",
"java.sql.SQLSyntaxErrorException"
] | import com.alibaba.cobar.parser.ast.fragment.VariableScope; import com.alibaba.cobar.parser.ast.stmt.mts.MTSSetTransactionStatement; import java.sql.SQLSyntaxErrorException; | import com.alibaba.cobar.parser.ast.fragment.*; import com.alibaba.cobar.parser.ast.stmt.mts.*; import java.sql.*; | [
"com.alibaba.cobar",
"java.sql"
] | com.alibaba.cobar; java.sql; | 1,598,940 |
public void addOtherEmoticons(HashMap<String,HashSet<Emoticon>> newEmoticons) {
otherEmoticons.putAll(newEmoticons);
} | void function(HashMap<String,HashSet<Emoticon>> newEmoticons) { otherEmoticons.putAll(newEmoticons); } | /**
* Adds emoticons associated with a channel.
*
* @param newEmoticons
*/ | Adds emoticons associated with a channel | addOtherEmoticons | {
"repo_name": "pokemane/TwitchChatClient",
"path": "src/chatty/util/api/Emoticons.java",
"license": "mit",
"size": 2194
} | [
"java.util.HashMap",
"java.util.HashSet"
] | import java.util.HashMap; import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,334,235 |
public DeleteUserResponse deleteUser(DeleteUserRequest request, RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(request, SecurityRequestConverters::deleteUser, options,
DeleteUserResponse::fromXContent, singleton(404));
} | DeleteUserResponse function(DeleteUserRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, SecurityRequestConverters::deleteUser, options, DeleteUserResponse::fromXContent, singleton(404)); } | /**
* Removes user from the native realm synchronously.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html">
* the docs</a> for more.
* @param request the request with the user to delete
* @param options the request options (e.g. headers... | Removes user from the native realm synchronously. See the docs for more | deleteUser | {
"repo_name": "coding0011/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/SecurityClient.java",
"license": "apache-2.0",
"size": 62531
} | [
"java.io.IOException",
"java.util.Collections",
"org.elasticsearch.client.security.DeleteUserRequest",
"org.elasticsearch.client.security.DeleteUserResponse"
] | import java.io.IOException; import java.util.Collections; import org.elasticsearch.client.security.DeleteUserRequest; import org.elasticsearch.client.security.DeleteUserResponse; | import java.io.*; import java.util.*; import org.elasticsearch.client.security.*; | [
"java.io",
"java.util",
"org.elasticsearch.client"
] | java.io; java.util; org.elasticsearch.client; | 18,376 |
void enterCreateTableColumnList(@NotNull EsperEPL2GrammarParser.CreateTableColumnListContext ctx);
void exitCreateTableColumnList(@NotNull EsperEPL2GrammarParser.CreateTableColumnListContext ctx); | void enterCreateTableColumnList(@NotNull EsperEPL2GrammarParser.CreateTableColumnListContext ctx); void exitCreateTableColumnList(@NotNull EsperEPL2GrammarParser.CreateTableColumnListContext ctx); | /**
* Exit a parse tree produced by {@link EsperEPL2GrammarParser#createTableColumnList}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>EsperEPL2GrammarParser#createTableColumnList</code> | exitCreateTableColumnList | {
"repo_name": "georgenicoll/esper",
"path": "esper/src/main/java/com/espertech/esper/epl/generated/EsperEPL2GrammarListener.java",
"license": "gpl-2.0",
"size": 114105
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,637,065 |
@Override
@SuppressWarnings("unchecked")
public Set<ObjectName> queryNames(final ObjectName objectName, final QueryExp queryExpression) {
final URI link = HttpRequester.createURI(baseUrl, "/mbean/query");
Object content = new QueryParameterSource(objectName, queryExpression);
try {
return (Set<... | @SuppressWarnings(STR) Set<ObjectName> function(final ObjectName objectName, final QueryExp queryExpression) { final URI link = HttpRequester.createURI(baseUrl, STR); Object content = new QueryParameterSource(objectName, queryExpression); try { return (Set<ObjectName>) IOUtils .deserializeObject(httpRequester.post(link... | /**
* This method searches the MBean server, based on the OperationsInvoker's JMX-based or remoting
* capable MBean server connection, for MBeans matching a specific ObjectName or matching an
* ObjectName pattern along with satisfying criteria from the Query expression.
*
* @param objectName the ObjectNa... | This method searches the MBean server, based on the OperationsInvoker's JMX-based or remoting capable MBean server connection, for MBeans matching a specific ObjectName or matching an ObjectName pattern along with satisfying criteria from the Query expression | queryNames | {
"repo_name": "smgoller/geode",
"path": "geode-gfsh/src/main/java/org/apache/geode/management/internal/web/shell/HttpOperationInvoker.java",
"license": "apache-2.0",
"size": 18144
} | [
"java.util.Set",
"javax.management.ObjectName",
"javax.management.QueryExp",
"org.apache.geode.internal.util.IOUtils",
"org.apache.geode.management.internal.web.domain.QueryParameterSource",
"org.apache.geode.management.internal.web.http.support.HttpRequester"
] | import java.util.Set; import javax.management.ObjectName; import javax.management.QueryExp; import org.apache.geode.internal.util.IOUtils; import org.apache.geode.management.internal.web.domain.QueryParameterSource; import org.apache.geode.management.internal.web.http.support.HttpRequester; | import java.util.*; import javax.management.*; import org.apache.geode.internal.util.*; import org.apache.geode.management.internal.web.domain.*; import org.apache.geode.management.internal.web.http.support.*; | [
"java.util",
"javax.management",
"org.apache.geode"
] | java.util; javax.management; org.apache.geode; | 734,903 |
private List<Pair<Vector3i,Vector3f>> enclosingGrid(List<Mesh.Vertex> vertices, VoxelGrid grid) {
ArrayList<Vector3fc> positions = new ArrayList<>(vertices.size());
for (Mesh.Vertex vertex : vertices) {
positions.add(vertex.getPosition());
}
float bounds[] = Mes... | List<Pair<Vector3i,Vector3f>> function(List<Mesh.Vertex> vertices, VoxelGrid grid) { ArrayList<Vector3fc> positions = new ArrayList<>(vertices.size()); for (Mesh.Vertex vertex : vertices) { positions.add(vertex.getPosition()); } float bounds[] = MeshMathUtil.bounds(positions); Vector3i max = grid.coordinateToVoxel(new ... | /**
* Calculates and returns the enclosing grid, i.e. a list of Voxels from the grid that enclose the list
* of provided vertices.
*
* @param vertices The Vertices for which an enclosing grid needs to be found.
* @param grid VoxelGrid to select voxels from.
* @return List of voxels that co... | Calculates and returns the enclosing grid, i.e. a list of Voxels from the grid that enclose the list of provided vertices | enclosingGrid | {
"repo_name": "silvanheller/cineast",
"path": "src/org/vitrivr/cineast/core/data/m3d/Voxelizer.java",
"license": "mit",
"size": 11781
} | [
"java.util.ArrayList",
"java.util.List",
"org.joml.Vector3f",
"org.joml.Vector3fc",
"org.joml.Vector3i",
"org.vitrivr.cineast.core.data.Pair",
"org.vitrivr.cineast.core.util.mesh.MeshMathUtil"
] | import java.util.ArrayList; import java.util.List; import org.joml.Vector3f; import org.joml.Vector3fc; import org.joml.Vector3i; import org.vitrivr.cineast.core.data.Pair; import org.vitrivr.cineast.core.util.mesh.MeshMathUtil; | import java.util.*; import org.joml.*; import org.vitrivr.cineast.core.data.*; import org.vitrivr.cineast.core.util.mesh.*; | [
"java.util",
"org.joml",
"org.vitrivr.cineast"
] | java.util; org.joml; org.vitrivr.cineast; | 691,057 |
public static boolean read(BoardFrame p_board_frame,
app.freerouting.interactive.BoardHandling p_board_handling, java.io.InputStream p_input_stream)
{
if (p_input_stream == null)
{
return false;
}
GUIDefaultsScanner scanner = new GUIDefa... | static boolean function(BoardFrame p_board_frame, app.freerouting.interactive.BoardHandling p_board_handling, java.io.InputStream p_input_stream) { if (p_input_stream == null) { return false; } GUIDefaultsScanner scanner = new GUIDefaultsScanner(p_input_stream); GUIDefaultsFile new_instance = new GUIDefaultsFile(p_boar... | /**
* Reads the GUI setting of p_board_frame from file.
* Returns false, if an error occured while reading the file.
*/ | Reads the GUI setting of p_board_frame from file. Returns false, if an error occured while reading the file | read | {
"repo_name": "freerouting/freerouting",
"path": "src/main/java/app/freerouting/gui/GUIDefaultsFile.java",
"license": "gpl-3.0",
"size": 63513
} | [
"app.freerouting.datastructures.IndentFileWriter",
"app.freerouting.logger.FRLogger"
] | import app.freerouting.datastructures.IndentFileWriter; import app.freerouting.logger.FRLogger; | import app.freerouting.datastructures.*; import app.freerouting.logger.*; | [
"app.freerouting.datastructures",
"app.freerouting.logger"
] | app.freerouting.datastructures; app.freerouting.logger; | 1,474,856 |
public void logSnitchBucketEmpty(Snitch snitch, Player player, Location loc, ItemStack item) {
// no victim user in this event
this.logSnitchInfo(snitch, item.getType(), loc, new Date(), LoggedAction.BUCKET_EMPTY, player.getPlayerListName(), null);
} | void function(Snitch snitch, Player player, Location loc, ItemStack item) { this.logSnitchInfo(snitch, item.getType(), loc, new Date(), LoggedAction.BUCKET_EMPTY, player.getPlayerListName(), null); } | /**
* Logs a message that someone emptied a bucket within the snitch's field
*
* @param snitch - the snitch that recorded this event
* @param player - the player that emptied the bucket
* @param loc - the location of where the bucket empty occurred
* @param item - the ItemStack representin... | Logs a message that someone emptied a bucket within the snitch's field | logSnitchBucketEmpty | {
"repo_name": "psygate/JukeAlert",
"path": "src/com/untamedears/JukeAlert/storage/JukeAlertLogger.java",
"license": "bsd-3-clause",
"size": 74420
} | [
"com.untamedears.JukeAlert",
"java.util.Date",
"org.bukkit.Location",
"org.bukkit.entity.Player",
"org.bukkit.inventory.ItemStack"
] | import com.untamedears.JukeAlert; import java.util.Date; import org.bukkit.Location; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; | import com.untamedears.*; import java.util.*; import org.bukkit.*; import org.bukkit.entity.*; import org.bukkit.inventory.*; | [
"com.untamedears",
"java.util",
"org.bukkit",
"org.bukkit.entity",
"org.bukkit.inventory"
] | com.untamedears; java.util; org.bukkit; org.bukkit.entity; org.bukkit.inventory; | 1,366,714 |
public static SearchRequest searchRequest(String... indices) {
return new SearchRequest(indices);
} | static SearchRequest function(String... indices) { return new SearchRequest(indices); } | /**
* Creates a search request against one or more indices. Note, the search source must be set either using the
* actual JSON search source, or the {@link org.elasticsearch.search.builder.SearchSourceBuilder}.
*
* @param indices The indices to search against. Use <tt>null</tt> or <tt>_all</tt> to e... | Creates a search request against one or more indices. Note, the search source must be set either using the actual JSON search source, or the <code>org.elasticsearch.search.builder.SearchSourceBuilder</code> | searchRequest | {
"repo_name": "jpountz/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/client/Requests.java",
"license": "apache-2.0",
"size": 19996
} | [
"org.elasticsearch.action.search.SearchRequest"
] | import org.elasticsearch.action.search.SearchRequest; | import org.elasticsearch.action.search.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 54,695 |
@RunsInCurrentThread
public static @Nonnull Point centerOf(@Nonnull Rectangle r) {
return new Point((r.x + (r.width / 2)), (r.y + (r.height / 2)));
} | static @Nonnull Point function(@Nonnull Rectangle r) { return new Point((r.x + (r.width / 2)), (r.y + (r.height / 2))); } | /**
* <p>
* Returns a point at the center of the given {@code Rectangle}.
* </p>
*
* <p>
* <b>Note:</b> This method is accessed in the current executing thread. Such thread may or may not be the event
* dispatch thread (EDT.) Client code must call this method from the EDT.
* </p>
*
* @pa... | Returns a point at the center of the given Rectangle. Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT.) Client code must call this method from the EDT. | centerOf | {
"repo_name": "google/fest",
"path": "third_party/fest-swing/src/main/java/org/fest/swing/awt/AWT.java",
"license": "apache-2.0",
"size": 13665
} | [
"java.awt.Point",
"java.awt.Rectangle",
"javax.annotation.Nonnull"
] | import java.awt.Point; import java.awt.Rectangle; import javax.annotation.Nonnull; | import java.awt.*; import javax.annotation.*; | [
"java.awt",
"javax.annotation"
] | java.awt; javax.annotation; | 834,089 |
public static MaterialDesignIconView createLinkIcon() {
return makeIcon(MaterialDesignIcon.LINK, "icon-link"); //48a200
} | static MaterialDesignIconView function() { return makeIcon(MaterialDesignIcon.LINK, STR); } | /**
* Create icon for link
* @return link's material icon
*/ | Create icon for link | createLinkIcon | {
"repo_name": "firm1/zest-writer",
"path": "src/main/java/com/zds/zw/view/com/IconFactory.java",
"license": "gpl-3.0",
"size": 6517
} | [
"de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon",
"de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView"
] | import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView; | import de.jensd.fx.glyphs.materialdesignicons.*; | [
"de.jensd.fx"
] | de.jensd.fx; | 795,957 |
public static void generateDotCSVFile(File file, CalculationResult result)
throws IOException {
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
writer.write(CalculationStepResult.toStringRowDescription());
writer.newLine();
for (CalculationStepResult step : result.getCalculationResult()... | static void function(File file, CalculationResult result) throws IOException { BufferedWriter writer = new BufferedWriter(new FileWriter(file)); writer.write(CalculationStepResult.toStringRowDescription()); writer.newLine(); for (CalculationStepResult step : result.getCalculationResult()) { writer.write(step.toString()... | /**
* Writes all values in a matching .csv file. Decimal seperator - dot
*
* @param file
* - File location
* @throws IOException
*/ | Writes all values in a matching .csv file. Decimal seperator - dot | generateDotCSVFile | {
"repo_name": "RATDevs/Rocket-Analysis-Tool",
"path": "RAT/src/rat/controller/dataIO/TextFileGenerator.java",
"license": "gpl-2.0",
"size": 2314
} | [
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileWriter",
"java.io.IOException"
] | import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,817,774 |
private void processInterestOpsUpdateRequests() {
SelectionKey key;
while (!stopped && (key = updateQueue.poll()) != null) {
if (!key.isValid()) {
cleanupSelectionKey(key);
}
NIOServerCnxn cnxn = (NIOServerCnxn) key.atta... | void function() { SelectionKey key; while (!stopped && (key = updateQueue.poll()) != null) { if (!key.isValid()) { cleanupSelectionKey(key); } NIOServerCnxn cnxn = (NIOServerCnxn) key.attachment(); if (cnxn.isSelectable()) { key.interestOps(cnxn.getInterestOps()); } } } } private class IOWorkRequest extends WorkerServi... | /**
* Iterate over the queue of connections ready to resume selection,
* and restore their interest ops selection mask.
*/ | Iterate over the queue of connections ready to resume selection, and restore their interest ops selection mask | processInterestOpsUpdateRequests | {
"repo_name": "ehomeshasha/zookeeper",
"path": "src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java",
"license": "apache-2.0",
"size": 34835
} | [
"java.nio.channels.SelectionKey"
] | import java.nio.channels.SelectionKey; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 307,534 |
public List<S> local_lookup(K key, int num); | List<S> function(K key, int num); | /**
* This call produces a list of OverlayContacts that can be used as next
* hops on a route towards key key
*
* @param key
* the key we want to lookup for
* @param num
* the maximum number of entries we want as a result
* @return list of OverlayContacts
*/ | This call produces a list of OverlayContacts that can be used as next hops on a route towards key key | local_lookup | {
"repo_name": "flyroom/PeerfactSimKOM_Clone",
"path": "src/org/peerfact/api/overlay/kbr/KBRNode.java",
"license": "gpl-2.0",
"size": 7043
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,235,548 |
protected Serializer getSpecialized(String mechanismType) {
if (javaType != null && xmlType != null) {
Method getSerializer = getGetSerializer();
if (getSerializer != null) {
try {
return (Serializer)
getSerializer.invoke(
... | Serializer function(String mechanismType) { if (javaType != null && xmlType != null) { Method getSerializer = getGetSerializer(); if (getSerializer != null) { try { return (Serializer) getSerializer.invoke( null, new Object[] {mechanismType, javaType, xmlType}); } catch (IllegalAccessException e) { if(log.isDebugEnable... | /**
* Obtains a serializer by invoking getSerializer method in the
* javaType class or its Helper class.
*/ | Obtains a serializer by invoking getSerializer method in the javaType class or its Helper class | getSpecialized | {
"repo_name": "hugosato/apache-axis",
"path": "src/org/apache/axis/encoding/ser/BaseSerializerFactory.java",
"license": "apache-2.0",
"size": 11593
} | [
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method",
"org.apache.axis.encoding.Serializer",
"org.apache.axis.utils.Messages"
] | import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.apache.axis.encoding.Serializer; import org.apache.axis.utils.Messages; | import java.lang.reflect.*; import org.apache.axis.encoding.*; import org.apache.axis.utils.*; | [
"java.lang",
"org.apache.axis"
] | java.lang; org.apache.axis; | 1,782,007 |
@Override
public Adapter createExpressionAdapter() {
if (expressionItemProvider == null) {
expressionItemProvider = new ExpressionItemProvider(this);
}
return expressionItemProvider;
}
protected VerbatimExpressionItemProvider verbatimExpressionItemProvider; | Adapter function() { if (expressionItemProvider == null) { expressionItemProvider = new ExpressionItemProvider(this); } return expressionItemProvider; } protected VerbatimExpressionItemProvider verbatimExpressionItemProvider; | /**
* This creates an adapter for a {@link org.xtext.example.statemachine.statemachine.Expression}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.xtext.example.statemachine.statemachine.Expression</code>. | createExpressionAdapter | {
"repo_name": "spoenemann/xtext-gef",
"path": "org.xtext.example.statemachine.edit/src/org/xtext/example/statemachine/statemachine/provider/StatemachineItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 12567
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,177,722 |
@SuppressWarnings("unchecked")
private <R> R readEmbeddedEntity(Class<R> type, DattyPersistentEntity<R> entity, ByteBuf buffer) {
BeanWrapper wrapper = new BeanWrapperImpl(type);
if (!ValueMessageReader.INSTANCE.hasNext(buffer)) {
return (R) wrapper.getWrappedInstance();
}
MapMessageReader reader ... | @SuppressWarnings(STR) <R> R function(Class<R> type, DattyPersistentEntity<R> entity, ByteBuf buffer) { BeanWrapper wrapper = new BeanWrapperImpl(type); if (!ValueMessageReader.INSTANCE.hasNext(buffer)) { return (R) wrapper.getWrappedInstance(); } MapMessageReader reader = new MapMessageReader(buffer); for (int i = 0; ... | /**
* Reads embedded entity from the buffer
*
* @param type - entity type
* @param entity - entity metadata
* @param buffer - input buffer
*
* @return entity instance
*/ | Reads embedded entity from the buffer | readEmbeddedEntity | {
"repo_name": "datty-io/datty",
"path": "spring-data-datty/src/main/java/io/datty/spring/convert/DattyMappingConverter.java",
"license": "apache-2.0",
"size": 15837
} | [
"io.datty.msgpack.core.MapMessageReader",
"io.datty.msgpack.core.ValueMessageReader",
"io.datty.spring.mapping.DattyPersistentEntity",
"io.datty.spring.mapping.DattyPersistentProperty",
"io.netty.buffer.ByteBuf",
"java.util.Optional",
"org.springframework.beans.BeanWrapper",
"org.springframework.beans... | import io.datty.msgpack.core.MapMessageReader; import io.datty.msgpack.core.ValueMessageReader; import io.datty.spring.mapping.DattyPersistentEntity; import io.datty.spring.mapping.DattyPersistentProperty; import io.netty.buffer.ByteBuf; import java.util.Optional; import org.springframework.beans.BeanWrapper; import or... | import io.datty.msgpack.core.*; import io.datty.spring.mapping.*; import io.netty.buffer.*; import java.util.*; import org.springframework.beans.*; import org.springframework.data.mapping.model.*; | [
"io.datty.msgpack",
"io.datty.spring",
"io.netty.buffer",
"java.util",
"org.springframework.beans",
"org.springframework.data"
] | io.datty.msgpack; io.datty.spring; io.netty.buffer; java.util; org.springframework.beans; org.springframework.data; | 33,673 |
public static String getConstructorDescriptor(final Constructor<?> c) {
Class<?>[] parameters = c.getParameterTypes();
StringBuffer buf = new StringBuffer();
buf.append('(');
for (int i = 0; i < parameters.length; ++i) {
getDescriptor(buf, parameters[i]);
}
... | static String function(final Constructor<?> c) { Class<?>[] parameters = c.getParameterTypes(); StringBuffer buf = new StringBuffer(); buf.append('('); for (int i = 0; i < parameters.length; ++i) { getDescriptor(buf, parameters[i]); } return buf.append(")V").toString(); } | /**
* Returns the descriptor corresponding to the given constructor.
*
* @param c
* a {@link Constructor Constructor} object.
* @return the descriptor of the given constructor.
*/ | Returns the descriptor corresponding to the given constructor | getConstructorDescriptor | {
"repo_name": "frohoff/jdk8u-jdk",
"path": "src/share/classes/jdk/internal/org/objectweb/asm/Type.java",
"license": "gpl-2.0",
"size": 30700
} | [
"java.lang.reflect.Constructor"
] | import java.lang.reflect.Constructor; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,051,903 |
void closeMetaTableRegions(final boolean abort) {
HRegion meta = null;
HRegion root = null;
this.lock.writeLock().lock();
try {
for (Map.Entry<String, HRegion> e: onlineRegions.entrySet()) {
HRegionInfo hri = e.getValue().getRegionInfo();
if (hri.isRootRegion()) {
root ... | void closeMetaTableRegions(final boolean abort) { HRegion meta = null; HRegion root = null; this.lock.writeLock().lock(); try { for (Map.Entry<String, HRegion> e: onlineRegions.entrySet()) { HRegionInfo hri = e.getValue().getRegionInfo(); if (hri.isRootRegion()) { root = e.getValue(); } else if (hri.isMetaRegion()) { m... | /**
* Close root and meta regions if we carry them
* @param abort Whether we're running an abort.
*/ | Close root and meta regions if we carry them | closeMetaTableRegions | {
"repo_name": "daidong/DominoHBase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java",
"license": "apache-2.0",
"size": 156547
} | [
"java.util.Map",
"org.apache.hadoop.hbase.HRegionInfo"
] | import java.util.Map; import org.apache.hadoop.hbase.HRegionInfo; | import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,963,581 |
private static void loadCache(IgniteCache<Long, Person> cache) {
long start = System.currentTimeMillis();
// Start loading cache from persistent store on all caching nodes.
cache.loadCache(null, ENTRY_COUNT);
long end = System.currentTimeMillis();
System.out.println(">>> L... | static void function(IgniteCache<Long, Person> cache) { long start = System.currentTimeMillis(); cache.loadCache(null, ENTRY_COUNT); long end = System.currentTimeMillis(); System.out.println(STR + cache.size() + STR + (end - start) + "ms."); } | /**
* Makes initial cache loading.
*
* @param cache Cache to load.
*/ | Makes initial cache loading | loadCache | {
"repo_name": "apacheignite/ignite",
"path": "examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcStoreExample.java",
"license": "apache-2.0",
"size": 5702
} | [
"org.apache.ignite.IgniteCache",
"org.apache.ignite.examples.model.Person"
] | import org.apache.ignite.IgniteCache; import org.apache.ignite.examples.model.Person; | import org.apache.ignite.*; import org.apache.ignite.examples.model.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,627,535 |
public final void setIpsToCheckPattern(@NotNull final String ipsToCheckPattern) {
this.ipsToCheckPattern = Pattern.compile(ipsToCheckPattern);
} | final void function(@NotNull final String ipsToCheckPattern) { this.ipsToCheckPattern = Pattern.compile(ipsToCheckPattern); } | /**
* Regular expression string to define IPs which should be considered.
* @param ipsToCheckPattern the ips to check as a regex pattern
*/ | Regular expression string to define IPs which should be considered | setIpsToCheckPattern | {
"repo_name": "moghaddam/cas",
"path": "cas-server-support-spnego/src/main/java/org/jasig/cas/support/spnego/web/flow/client/BaseSpnegoKnownClientSystemsFilterAction.java",
"license": "apache-2.0",
"size": 8824
} | [
"java.util.regex.Pattern",
"javax.validation.constraints.NotNull"
] | import java.util.regex.Pattern; import javax.validation.constraints.NotNull; | import java.util.regex.*; import javax.validation.constraints.*; | [
"java.util",
"javax.validation"
] | java.util; javax.validation; | 1,838,468 |
private Map<String, Double> downloadData() throws IOException,
ParseException, XmlPullParserException {
InputStream is = null;
Map<String, Double> entries = new HashMap<String, Double>();
try {
URL url = new URL(dataQueryURL);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.... | Map<String, Double> function() throws IOException, ParseException, XmlPullParserException { InputStream is = null; Map<String, Double> entries = new HashMap<String, Double>(); try { URL url = new URL(dataQueryURL); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setReadTimeout(10000 ); conn.setC... | /**
* Connects to the metobs web service, downloads data in XML, returns the
* most recent values in a string key -> double value map
*
* @return
* @throws IOException
* @throws ParseException
* @throws XmlPullParserException
*/ | Connects to the metobs web service, downloads data in XML, returns the most recent values in a string key -> double value map | downloadData | {
"repo_name": "cndbain/lakemendotabuoy",
"path": "src/com/candacebain/lakemendotabuoy/MainActivity.java",
"license": "apache-2.0",
"size": 21960
} | [
"android.util.Xml",
"java.io.IOException",
"java.io.InputStream",
"java.net.HttpURLConnection",
"java.text.ParseException",
"java.util.Date",
"java.util.HashMap",
"java.util.Map",
"org.xmlpull.v1.XmlPullParser",
"org.xmlpull.v1.XmlPullParserException"
] | import android.util.Xml; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.text.ParseException; import java.util.Date; import java.util.HashMap; import java.util.Map; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; | import android.util.*; import java.io.*; import java.net.*; import java.text.*; import java.util.*; import org.xmlpull.v1.*; | [
"android.util",
"java.io",
"java.net",
"java.text",
"java.util",
"org.xmlpull.v1"
] | android.util; java.io; java.net; java.text; java.util; org.xmlpull.v1; | 2,149,982 |
public void deleteFormFieldSetsId(Integer id) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling deleteFormFieldSetsId");
}
// create path and map v... | void function(Integer id) throws ApiException { Object localVarPostBody = null; if (id == null) { throw new ApiException(400, STR); } String localVarPath = STR .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHe... | /**
* Delete Form Field Set
* Delete Form Field Set
* @param id Form Field Set ID. (required)
* @throws ApiException if fails to make API call
*/ | Delete Form Field Set Delete Form Field Set | deleteFormFieldSetsId | {
"repo_name": "iterate-ch/cyberduck",
"path": "brick/src/main/java/ch/cyberduck/core/brick/io/swagger/client/api/FormFieldSetsApi.java",
"license": "gpl-3.0",
"size": 9531
} | [
"ch.cyberduck.core.brick.io.swagger.client.ApiException",
"ch.cyberduck.core.brick.io.swagger.client.Pair",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import ch.cyberduck.core.brick.io.swagger.client.ApiException; import ch.cyberduck.core.brick.io.swagger.client.Pair; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import ch.cyberduck.core.brick.io.swagger.client.*; import java.util.*; | [
"ch.cyberduck.core",
"java.util"
] | ch.cyberduck.core; java.util; | 1,782,990 |
public MessageBuilder addRecipients(List<InternetAddress> recipients)
{
this.recipients.addAll(recipients);
return this;
} | MessageBuilder function(List<InternetAddress> recipients) { this.recipients.addAll(recipients); return this; } | /**
* Adds a list of recipients.
*
* @param recipients
* The recpients.
* @return This builder for chaining calls.
*/ | Adds a list of recipients | addRecipients | {
"repo_name": "jaapgeurts/snap",
"path": "src/main/java/snap/mail/Mailer.java",
"license": "gpl-2.0",
"size": 11691
} | [
"java.util.List",
"javax.mail.internet.InternetAddress"
] | import java.util.List; import javax.mail.internet.InternetAddress; | import java.util.*; import javax.mail.internet.*; | [
"java.util",
"javax.mail"
] | java.util; javax.mail; | 2,154,149 |
public void setAboutmenuname(String s) {
bundleProperties.setCFBundleName(s);
} | void function(String s) { bundleProperties.setCFBundleName(s); } | /**
* Setter for the "aboutmenuname" attribute (optional)
*/ | Setter for the "aboutmenuname" attribute (optional) | setAboutmenuname | {
"repo_name": "humandoing/JarIndexer",
"path": "resources/jarbundler-1.9/src/net/sourceforge/jarbundler/JarBundler.java",
"license": "bsd-3-clause",
"size": 44012
} | [
"java.lang.String"
] | import java.lang.String; | import java.lang.*; | [
"java.lang"
] | java.lang; | 79,961 |
public Map<String, List<String>> getFilterMap() {
return this.filterMap;
} | Map<String, List<String>> function() { return this.filterMap; } | /**
* Returns the {@link PDFFilter}s map used for filters in this document.
*
* @return the map of filters being used
*/ | Returns the <code>PDFFilter</code>s map used for filters in this document | getFilterMap | {
"repo_name": "argv-minus-one/fop",
"path": "fop-core/src/main/java/org/apache/fop/pdf/PDFDocument.java",
"license": "apache-2.0",
"size": 40374
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 940,932 |
Type type = getFirstNonOptionalType(field);
if (type instanceof ParameterizedType) {
type = ((ParameterizedType) type).getActualTypeArguments()[0];
}
if (type instanceof WildcardType) {
type = ((WildcardType) type).getUpperBounds()[0];
}
return Primitives.wrap((Class<?>) type);
} | Type type = getFirstNonOptionalType(field); if (type instanceof ParameterizedType) { type = ((ParameterizedType) type).getActualTypeArguments()[0]; } if (type instanceof WildcardType) { type = ((WildcardType) type).getUpperBounds()[0]; } return Primitives.wrap((Class<?>) type); } | /**
* Determine the "base type" of a field. That is, the following will be returned:
* <ul>
* <li>{@code String} -> {@code String.class}
* <li>{@code Optional<String>} -> {@code String.class}
* <li>{@code Set<String>} -> {@code String.class}
* <li>{@code Collection<? ex... | Determine the "base type" of a field. That is, the following will be returned: String -> String.class Optional<String> -> String.class Set<String> -> String.class Collection<? extends Comparable> -> Comparable.class Collection<? super Comparable -> Object.class | getBaseType | {
"repo_name": "neonichu/buck",
"path": "src/com/facebook/buck/util/Types.java",
"license": "apache-2.0",
"size": 3495
} | [
"com.google.common.primitives.Primitives",
"java.lang.reflect.ParameterizedType",
"java.lang.reflect.Type",
"java.lang.reflect.WildcardType"
] | import com.google.common.primitives.Primitives; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.WildcardType; | import com.google.common.primitives.*; import java.lang.reflect.*; | [
"com.google.common",
"java.lang"
] | com.google.common; java.lang; | 1,758,971 |
public boolean enabled() {
return CompressorJNI.getCompressor(m_pcm);
} | boolean function() { return CompressorJNI.getCompressor(m_pcm); } | /**
* Get the enabled status of the compressor
*$
* @return true if the compressor is on
*/ | Get the enabled status of the compressor $ | enabled | {
"repo_name": "JLLeitschuh/allwpilib",
"path": "wpilibj/src/athena/java/edu/wpi/first/wpilibj/Compressor.java",
"license": "bsd-3-clause",
"size": 6904
} | [
"edu.wpi.first.wpilibj.hal.CompressorJNI"
] | import edu.wpi.first.wpilibj.hal.CompressorJNI; | import edu.wpi.first.wpilibj.hal.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 2,094,281 |
public static void init(Object mod)
{
EntityRegistry.registerModEntity(EntityThrownProton.class, "Proton", 1, mod, 200, 1, true );
EntityRegistry.registerModEntity(EntityThrownAntiProton.class, "AntiProton", 2, mod, 200, 1, true );
//Do this for every entity
}
| static void function(Object mod) { EntityRegistry.registerModEntity(EntityThrownProton.class, STR, 1, mod, 200, 1, true ); EntityRegistry.registerModEntity(EntityThrownAntiProton.class, STR, 2, mod, 200, 1, true ); } | /**
* Registers all entities
* @param mod
*/ | Registers all entities | init | {
"repo_name": "aegf1/MCTest1",
"path": "src/main/java/com/JosephB/maxwellcraft/init/ModEntities.java",
"license": "gpl-3.0",
"size": 1599
} | [
"net.minecraftforge.fml.common.registry.EntityRegistry"
] | import net.minecraftforge.fml.common.registry.EntityRegistry; | import net.minecraftforge.fml.common.registry.*; | [
"net.minecraftforge.fml"
] | net.minecraftforge.fml; | 2,792,941 |
@SuppressWarnings("deprecation")
public Route attach(String pathTemplate, Restlet target) {
return attach(pathTemplate, target, getMatchingMode(target));
} | @SuppressWarnings(STR) Route function(String pathTemplate, Restlet target) { return attach(pathTemplate, target, getMatchingMode(target)); } | /**
* Attaches a target Restlet to this router based on a given URI pattern. A
* new route using the matching mode returned by
* {@link #getMatchingMode(Restlet)} will be added routing to the target
* when calls with a URI matching the pattern will be received.
*
* @param pathTemplate
... | Attaches a target Restlet to this router based on a given URI pattern. A new route using the matching mode returned by <code>#getMatchingMode(Restlet)</code> will be added routing to the target when calls with a URI matching the pattern will be received | attach | {
"repo_name": "debrief/debrief",
"path": "org.mwc.asset.comms/docs/restlet_src/org.restlet/org/restlet/routing/Router.java",
"license": "epl-1.0",
"size": 30634
} | [
"org.restlet.Restlet"
] | import org.restlet.Restlet; | import org.restlet.*; | [
"org.restlet"
] | org.restlet; | 2,850,958 |
@Test (timeout=300000)
public void testForceSplitMultiFamily() throws Exception {
int numVersions = HColumnDescriptor.DEFAULT_VERSIONS;
// use small HFile block size so that we can have lots of blocks in HFile
// Otherwise, if there is only one block,
// HFileBlockIndex.midKey()'s value == startKey... | @Test (timeout=300000) void function() throws Exception { int numVersions = HColumnDescriptor.DEFAULT_VERSIONS; int blockSize = 256; byte[][] familyNames = new byte[][] { Bytes.toBytes("cf1"), Bytes.toBytes("cf2") }; int[] rowCounts = new int[] { 6000, 1 }; splitTest(null, familyNames, rowCounts, numVersions, blockSize... | /**
* Multi-family scenario. Tests forcing split from client and
* having scanners successfully ride over split.
* @throws Exception
* @throws IOException
*/ | Multi-family scenario. Tests forcing split from client and having scanners successfully ride over split | testForceSplitMultiFamily | {
"repo_name": "Jackygq1982/hbase_src",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java",
"license": "apache-2.0",
"size": 43931
} | [
"org.apache.hadoop.hbase.HColumnDescriptor",
"org.apache.hadoop.hbase.util.Bytes",
"org.junit.Test"
] | import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.util.Bytes; import org.junit.Test; | import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 2,435,514 |
private Book loadBookFromContent(String name, BookName.Format format, String content, VersionedRook vrook) throws IOException {
File tmpFile = shelf.getTempBookFile();
MiscUtils.writeStringToFile(content, tmpFile);
try {
return shelf.loadBookFromFile(name, format, tmpFi... | Book function(String name, BookName.Format format, String content, VersionedRook vrook) throws IOException { File tmpFile = shelf.getTempBookFile(); MiscUtils.writeStringToFile(content, tmpFile); try { return shelf.loadBookFromFile(name, format, tmpFile, vrook); } finally { tmpFile.delete(); } } | /**
* Imports book to database overwriting the existing one with the same name.
* @param name Notebook name
* @param content Notebook's content
*/ | Imports book to database overwriting the existing one with the same name | loadBookFromContent | {
"repo_name": "MackieLoeffel/orgzly-android",
"path": "app/src/androidTest/java/com/orgzly/android/ShelfTestUtils.java",
"license": "gpl-3.0",
"size": 4123
} | [
"com.orgzly.android.repos.VersionedRook",
"com.orgzly.android.util.MiscUtils",
"java.io.File",
"java.io.IOException"
] | import com.orgzly.android.repos.VersionedRook; import com.orgzly.android.util.MiscUtils; import java.io.File; import java.io.IOException; | import com.orgzly.android.repos.*; import com.orgzly.android.util.*; import java.io.*; | [
"com.orgzly.android",
"java.io"
] | com.orgzly.android; java.io; | 1,523,766 |
@Path("clear-user-cache")
@POST
public void clearUserCache() {
auth.requireManage();
UserCache cache = session.getProvider(UserCache.class);
if (cache != null) {
cache.clear();
}
adminEvent.operation(OperationType.ACTION).resourcePath(uriInfo).success();... | @Path(STR) void function() { auth.requireManage(); UserCache cache = session.getProvider(UserCache.class); if (cache != null) { cache.clear(); } adminEvent.operation(OperationType.ACTION).resourcePath(uriInfo).success(); } | /**
* Clear user cache
*
*/ | Clear user cache | clearUserCache | {
"repo_name": "chameleon82/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java",
"license": "apache-2.0",
"size": 32591
} | [
"javax.ws.rs.Path",
"org.keycloak.events.admin.OperationType",
"org.keycloak.models.cache.UserCache"
] | import javax.ws.rs.Path; import org.keycloak.events.admin.OperationType; import org.keycloak.models.cache.UserCache; | import javax.ws.rs.*; import org.keycloak.events.admin.*; import org.keycloak.models.cache.*; | [
"javax.ws",
"org.keycloak.events",
"org.keycloak.models"
] | javax.ws; org.keycloak.events; org.keycloak.models; | 542,635 |
public NamedSortHLAPI getContainerNamedSortHLAPI(){
if(item.getContainerNamedSort() == null) return null;
return new NamedSortHLAPI(item.getContainerNamedSort());
}
| NamedSortHLAPI function(){ if(item.getContainerNamedSort() == null) return null; return new NamedSortHLAPI(item.getContainerNamedSort()); } | /**
* This accessor automatically encapsulate an element of the current object.
* WARNING : this creates a new object in memory.
* @return : null if the element is null
*/ | This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory | getContainerNamedSortHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/integers/hlapi/PositiveHLAPI.java",
"license": "epl-1.0",
"size": 18340
} | [
"fr.lip6.move.pnml.hlpn.terms.hlapi.NamedSortHLAPI"
] | import fr.lip6.move.pnml.hlpn.terms.hlapi.NamedSortHLAPI; | import fr.lip6.move.pnml.hlpn.terms.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 2,484,976 |
public HLAnnotationHLAPI getContainerHLAnnotationHLAPI(){
if(item.getContainerHLAnnotation() == null) return null;
return new HLAnnotationHLAPI(item.getContainerHLAnnotation());
}
| HLAnnotationHLAPI function(){ if(item.getContainerHLAnnotation() == null) return null; return new HLAnnotationHLAPI(item.getContainerHLAnnotation()); } | /**
* This accessor automatically encapsulate an element of the current object.
* WARNING : this creates a new object in memory.
* @return : null if the element is null
*/ | This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory | getContainerHLAnnotationHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/booleans/hlapi/BooleanConstantHLAPI.java",
"license": "epl-1.0",
"size": 91863
} | [
"fr.lip6.move.pnml.symmetricnet.hlcorestructure.hlapi.HLAnnotationHLAPI"
] | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.hlapi.HLAnnotationHLAPI; | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 1,844,090 |
@Deprecated
HRegionLocation getRegionLocation(TableName tableName, byte [] row,
boolean reload)
throws IOException; | HRegionLocation getRegionLocation(TableName tableName, byte [] row, boolean reload) throws IOException; | /**
* Find region location hosting passed row
* @param tableName table name
* @param row Row to find.
* @param reload If true do not use cache, otherwise bypass.
* @return Location of row.
* @throws IOException if a remote or network exception occurs
* @deprecated internal method, do not use thru H... | Find region location hosting passed row | getRegionLocation | {
"repo_name": "grokcoder/pbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnection.java",
"license": "apache-2.0",
"size": 23080
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.HRegionLocation",
"org.apache.hadoop.hbase.TableName"
] | import java.io.IOException; import org.apache.hadoop.hbase.HRegionLocation; import org.apache.hadoop.hbase.TableName; | import java.io.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 684,229 |
@Nonnull
InetAddress getAddress(); | InetAddress getAddress(); | /**
* Return agent address
*
* @return the agent address
*/ | Return agent address | getAddress | {
"repo_name": "alesharik/AlesharikWebServer",
"path": "serverless/src/com/alesharik/webserver/serverless/RemoteAgent.java",
"license": "gpl-3.0",
"size": 2002
} | [
"java.net.InetAddress"
] | import java.net.InetAddress; | import java.net.*; | [
"java.net"
] | java.net; | 2,805,662 |
public ColumnStatistics finish() {
int averageSize = averageSize(size, total, nullsCnt);
return new ColumnStatistics(min, max, nullsCnt, hll.cardinality(), total, averageSize, hll.toBytes(), ver,
U.currentTimeMillis());
} | ColumnStatistics function() { int averageSize = averageSize(size, total, nullsCnt); return new ColumnStatistics(min, max, nullsCnt, hll.cardinality(), total, averageSize, hll.toBytes(), ver, U.currentTimeMillis()); } | /**
* Get total column statistics.
*
* @return Aggregated column statistics.
*/ | Get total column statistics | finish | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/stat/ColumnStatisticsCollector.java",
"license": "apache-2.0",
"size": 8753
} | [
"org.apache.ignite.internal.util.typedef.internal.U"
] | import org.apache.ignite.internal.util.typedef.internal.U; | import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,495,443 |
private void assertMail(MailMessage have, MailMessage want) {
assertThat(have.id()).isEqualTo(want.id());
assertThat(have.to()).isEqualTo(want.to());
assertThat(have.from()).isEqualTo(want.from());
assertThat(have.cc()).isEqualTo(want.cc());
assertThat(have.dateReceived()).isEqualTo(want.dateRecei... | void function(MailMessage have, MailMessage want) { assertThat(have.id()).isEqualTo(want.id()); assertThat(have.to()).isEqualTo(want.to()); assertThat(have.from()).isEqualTo(want.from()); assertThat(have.cc()).isEqualTo(want.cc()); assertThat(have.dateReceived()).isEqualTo(want.dateReceived()); assertThat(have.addition... | /**
* This method makes it easier to debug failing tests by checking each property individual instead
* of calling equals as it will immediately reveal the property that diverges between the two
* objects.
*
* @param have MailMessage retrieved from the parser
* @param want MailMessage that would be ex... | This method makes it easier to debug failing tests by checking each property individual instead of calling equals as it will immediately reveal the property that diverges between the two objects | assertMail | {
"repo_name": "WANdisco/gerrit",
"path": "javatests/com/google/gerrit/mail/RawMailParserTest.java",
"license": "apache-2.0",
"size": 3073
} | [
"com.google.common.truth.Truth"
] | import com.google.common.truth.Truth; | import com.google.common.truth.*; | [
"com.google.common"
] | com.google.common; | 440,444 |
private List<StageWrapper> buildHosts(UpgradeContext upgradeContext, List<String> hosts) {
if (CollectionUtils.isEmpty(hosts)) {
return Collections.emptyList();
}
Cluster cluster = upgradeContext.getCluster();
List<StageWrapper> wrappers = new ArrayList<>();
HostRoleCommandFa... | List<StageWrapper> function(UpgradeContext upgradeContext, List<String> hosts) { if (CollectionUtils.isEmpty(hosts)) { return Collections.emptyList(); } Cluster cluster = upgradeContext.getCluster(); List<StageWrapper> wrappers = new ArrayList<>(); HostRoleCommandFactory hrcFactory = upgradeContext.getHostRoleCommandFa... | /**
* Builds the stages for each host which typically consist of a STOP, a
* manual wait, and a START. The starting of components can be a single
* stage or may consist of several stages if the host components have
* dependencies on each other.
*
* @param upgradeContext
* the... | Builds the stages for each host which typically consist of a STOP, a manual wait, and a START. The starting of components can be a single stage or may consist of several stages if the host components have dependencies on each other | buildHosts | {
"repo_name": "arenadata/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java",
"license": "apache-2.0",
"size": 14882
} | [
"com.google.gson.JsonObject",
"java.util.ArrayList",
"java.util.Collections",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.apache.ambari.server.AmbariException",
"org.apache.ambari.server.Role",
"org.apache.ambari.server.RoleCommand",
"org.apache.ambari.server.actionmanager.HostRol... | import com.google.gson.JsonObject; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.Role; import org.apache.ambari.server.RoleCommand; import org.apache.ambari... | import com.google.gson.*; import java.util.*; import org.apache.ambari.server.*; import org.apache.ambari.server.actionmanager.*; import org.apache.ambari.server.api.services.*; import org.apache.ambari.server.metadata.*; import org.apache.ambari.server.orm.entities.*; import org.apache.ambari.server.stack.*; import or... | [
"com.google.gson",
"java.util",
"org.apache.ambari",
"org.apache.commons"
] | com.google.gson; java.util; org.apache.ambari; org.apache.commons; | 2,040,404 |
public static void showSnackbar(@NonNull Activity activity, @StringRes int resource) {
View view = activity.findViewById(android.R.id.content);
if (view == null) {
Log.e(TAG, "showSnackbar", new NullPointerException("Unable to find android.R.id.content"));
return;
}
... | static void function(@NonNull Activity activity, @StringRes int resource) { View view = activity.findViewById(android.R.id.content); if (view == null) { Log.e(TAG, STR, new NullPointerException(STR)); return; } Snackbar.make(view, resource, Snackbar.LENGTH_SHORT).show(); } | /**
* Displays a snackbar to the user with a String resource.
* <p>
* NOTE: If there is an accessibility manager enabled on
* the device, such as LastPass, then the snackbar animations
* will not work.
*
* @param activity the activity needed to create a snackbar.
* @param resourc... | Displays a snackbar to the user with a String resource. the device, such as LastPass, then the snackbar animations will not work | showSnackbar | {
"repo_name": "eXGameStudio/Browser",
"path": "app/src/main/java/acr/browser/lightning/utils/Utils.java",
"license": "mpl-2.0",
"size": 15872
} | [
"android.app.Activity",
"android.support.annotation.NonNull",
"android.support.annotation.StringRes",
"android.support.design.widget.Snackbar",
"android.util.Log",
"android.view.View"
] | import android.app.Activity; import android.support.annotation.NonNull; import android.support.annotation.StringRes; import android.support.design.widget.Snackbar; import android.util.Log; import android.view.View; | import android.app.*; import android.support.annotation.*; import android.support.design.widget.*; import android.util.*; import android.view.*; | [
"android.app",
"android.support",
"android.util",
"android.view"
] | android.app; android.support; android.util; android.view; | 2,289,620 |
public static <T> T randomValueOtherThanMany(Predicate<T> input, Supplier<T> randomSupplier) {
T randomValue = null;
do {
randomValue = randomSupplier.get();
} while (input.test(randomValue));
return randomValue;
} | static <T> T function(Predicate<T> input, Supplier<T> randomSupplier) { T randomValue = null; do { randomValue = randomSupplier.get(); } while (input.test(randomValue)); return randomValue; } | /**
* helper to get a random value in a certain range that's different from the input
*/ | helper to get a random value in a certain range that's different from the input | randomValueOtherThanMany | {
"repo_name": "girirajsharma/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java",
"license": "apache-2.0",
"size": 33895
} | [
"java.util.function.Predicate",
"java.util.function.Supplier"
] | import java.util.function.Predicate; import java.util.function.Supplier; | import java.util.function.*; | [
"java.util"
] | java.util; | 169,333 |
public final static String getISO8601Date(long millis) {
StringBuilder sb = new StringBuilder(19);
Calendar cal = new GregorianCalendar();
cal.setTimeInMillis(millis);
// year
sb.append(cal.get(Calendar.YEAR));
// month
sb.append('-');
int month = ca... | final static String function(long millis) { StringBuilder sb = new StringBuilder(19); Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(millis); sb.append(cal.get(Calendar.YEAR)); sb.append('-'); int month = cal.get(Calendar.MONTH) + 1; if (month < 10) { sb.append('0'); } sb.append(month); sb.append('-'); int... | /**
* Get ISO 8601 timestamp.
*/ | Get ISO 8601 timestamp | getISO8601Date | {
"repo_name": "xuse/ef-others",
"path": "common-net/src/main/java/jef/net/ftpserver/util/DateUtils.java",
"license": "apache-2.0",
"size": 6163
} | [
"java.util.Calendar",
"java.util.GregorianCalendar"
] | import java.util.Calendar; import java.util.GregorianCalendar; | import java.util.*; | [
"java.util"
] | java.util; | 974,567 |
@FIXVersion(introduced="4.3")
@TagNumRef(tagNum=TagNum.CrossPrioritization, required=true)
public CrossPrioritization getCrossPrioritization() {
return crossPrioritization;
} | @FIXVersion(introduced="4.3") @TagNumRef(tagNum=TagNum.CrossPrioritization, required=true) CrossPrioritization function() { return crossPrioritization; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getCrossPrioritization | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/NewOrderCrossMsg.java",
"license": "gpl-3.0",
"size": 84522
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.CrossPrioritization",
"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.CrossPrioritization; 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; | 2,468,065 |
public static String toString(Object object, String tagName)
throws JSONException {
StringBuilder sb = new StringBuilder();
JSONArray ja;
JSONObject jo;
String key;
Iterator<String> keys;
String string;
Object value;
if (object instanceof ... | static String function(Object object, String tagName) throws JSONException { StringBuilder sb = new StringBuilder(); JSONArray ja; JSONObject jo; String key; Iterator<String> keys; String string; Object value; if (object instanceof JSONObject) { if (tagName != null) { sb.append('<'); sb.append(tagName); sb.append('>');... | /**
* Convert a JSONObject into a well-formed, element-normal XML string.
*
* @param object
* A JSONObject.
* @param tagName
* The optional name of the enclosing tag.
* @return A string.
* @throws JSONException Thrown if there is an error parsing the string... | Convert a JSONObject into a well-formed, element-normal XML string | toString | {
"repo_name": "LattEngineer/LattEngineerAPI",
"path": "src/main/java/io/lattengineer/LattEngineerAPI/json/XML.java",
"license": "mit",
"size": 17562
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,895,352 |
public void replicateEntries(List<WALEntry> entries, final CellScanner cells,
String replicationClusterId, String sourceBaseNamespaceDirPath,
String sourceHFileArchiveDirPath) throws IOException {
if (entries.isEmpty()) return;
if (cells == null) throw new NullPointerException("TODO: Add handling ... | void function(List<WALEntry> entries, final CellScanner cells, String replicationClusterId, String sourceBaseNamespaceDirPath, String sourceHFileArchiveDirPath) throws IOException { if (entries.isEmpty()) return; if (cells == null) throw new NullPointerException(STR); try { long totalReplicated = 0; Map<TableName, Map<... | /**
* Replicate this array of entries directly into the local cluster using the native client. Only
* operates against raw protobuf type saving on a conversion from pb to pojo.
* @param entries
* @param cells
* @param replicationClusterId Id which will uniquely identify source cluster FS client
* ... | Replicate this array of entries directly into the local cluster using the native client. Only operates against raw protobuf type saving on a conversion from pb to pojo | replicateEntries | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java",
"license": "apache-2.0",
"size": 16817
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"java.util.TreeMap",
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.CellScanner",
"org.apache.hadoop.hbase.CellUtil",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.clie... | import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.TableName; imp... | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.hbase.wal.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,077,575 |
public static void createDirectory(String dir)
throws IOException
{
createDirectory(new File(dir));
} | static void function(String dir) throws IOException { createDirectory(new File(dir)); } | /**
* Creates the given directory and its dependency if it does not yet exist and ensures that the directory is writable.
*
*
* @param dir the directory
*
* @throws IOException if the directory does not yet exist and cannot be created or the directory is not writabl... | Creates the given directory and its dependency if it does not yet exist and ensures that the directory is writable | createDirectory | {
"repo_name": "justinjohn83/utils-java",
"path": "utils/src/main/java/com/gamesalutes/utils/FileUtils.java",
"license": "lgpl-3.0",
"size": 54765
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,543,553 |
protected static String buildActionResponseBody(DeviceService service, Action action, Device device)
{
// convert out arguments to string array
String[] argName = new String[0];
String[] argValue = new String[0];
// build arrays with out argument names and valueStrings
if (action.getOutArgument... | static String function(DeviceService service, Action action, Device device) { String[] argName = new String[0]; String[] argValue = new String[0]; if (action.getOutArgumentTable() != null) { Argument[] outArguments = action.getOutArgumentTable(); argName = new String[outArguments.length]; argValue = new String[outArgum... | /**
* This methods builds an action response message.
*
* @param serverAddress
* Address of server that received the request
* @param service
* The service that processed the request
* @param action
* The action that handled the request
* @param device
* ... | This methods builds an action response message | buildActionResponseBody | {
"repo_name": "fraunhoferfokus/fokus-upnp",
"path": "upnp-core/src/main/java/de/fraunhofer/fokus/upnp/core/device/DeviceControlMessageProcessor.java",
"license": "gpl-3.0",
"size": 19392
} | [
"de.fraunhofer.fokus.upnp.core.Argument",
"de.fraunhofer.fokus.upnp.soap.SOAPMessageBuilder"
] | import de.fraunhofer.fokus.upnp.core.Argument; import de.fraunhofer.fokus.upnp.soap.SOAPMessageBuilder; | import de.fraunhofer.fokus.upnp.core.*; import de.fraunhofer.fokus.upnp.soap.*; | [
"de.fraunhofer.fokus"
] | de.fraunhofer.fokus; | 537,088 |
@AssertTrue(message = "the provided ios certificate passphrase does not match with the uploaded certificate")
// TODO: this can not be named isiOS...();
public boolean isAppleVariantValid() {
if (iOSVariantName != null) {
try {
PKCS12.validate(iOSCertificate, iOSPassphras... | @AssertTrue(message = STR) boolean function() { if (iOSVariantName != null) { try { PKCS12.validate(iOSCertificate, iOSPassphrase); } catch (Exception e) { return false; } } return true; } | /**
* Basic validations for iOS, when iOS is present.
*
* @return true if valid, otherwise false
*/ | Basic validations for iOS, when iOS is present | isAppleVariantValid | {
"repo_name": "diogoalbuquerque/aerogear-unifiedpush-server",
"path": "jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/util/BootstrapForm.java",
"license": "apache-2.0",
"size": 7023
} | [
"javax.validation.constraints.AssertTrue"
] | import javax.validation.constraints.AssertTrue; | import javax.validation.constraints.*; | [
"javax.validation"
] | javax.validation; | 662,086 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.