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
protected Element createCell(TableCellElement td) { DivElement cell = DivElement.as(DOM.createDiv()); double width = WidgetUtil .getRequiredWidthBoundingClientRectDouble(td); double height = WidgetUtil .getRequiredHeightBoundingClientRe...
Element function(TableCellElement td) { DivElement cell = DivElement.as(DOM.createDiv()); double width = WidgetUtil .getRequiredWidthBoundingClientRectDouble(td); double height = WidgetUtil .getRequiredHeightBoundingClientRectDouble(td); setBounds(cell, td.getOffsetLeft(), td.getOffsetTop(), width, height); return cell...
/** * Creates an editor cell corresponding to the given table cell. The * returned element is empty and has the same dimensions and position as * the table cell. * * @param td * the table cell used as a reference * @return an editor cell correspo...
Creates an editor cell corresponding to the given table cell. The returned element is empty and has the same dimensions and position as the table cell
createCell
{ "repo_name": "kironapublic/vaadin", "path": "client/src/main/java/com/vaadin/client/widgets/Grid.java", "license": "apache-2.0", "size": 330612 }
[ "com.google.gwt.dom.client.DivElement", "com.google.gwt.dom.client.Element", "com.google.gwt.dom.client.TableCellElement", "com.google.gwt.user.client.DOM", "com.vaadin.client.WidgetUtil" ]
import com.google.gwt.dom.client.DivElement; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.TableCellElement; import com.google.gwt.user.client.DOM; import com.vaadin.client.WidgetUtil;
import com.google.gwt.dom.client.*; import com.google.gwt.user.client.*; import com.vaadin.client.*;
[ "com.google.gwt", "com.vaadin.client" ]
com.google.gwt; com.vaadin.client;
839,172
@Override public void layoutBefore() { hasBeenMeasured = false; updateStyleAndText(); spanned = createSpanned(mText); if(hasNewLayout()){ WXLogUtils.e("TextDom", new IllegalStateException("Previous csslayout was ignored! markLayoutSeen() never called")); markUpdateSeen(); } s...
void function() { hasBeenMeasured = false; updateStyleAndText(); spanned = createSpanned(mText); if(hasNewLayout()){ WXLogUtils.e(STR, new IllegalStateException(STR)); markUpdateSeen(); } super.dirty(); super.layoutBefore(); }
/** * Prepare the text {@link Spanned} for calculating text's size. This is done by setting * various text span to the text. * @see android.text.style.CharacterStyle */
Prepare the text <code>Spanned</code> for calculating text's size. This is done by setting various text span to the text
layoutBefore
{ "repo_name": "xiayun200825/weex", "path": "android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java", "license": "apache-2.0", "size": 17301 }
[ "com.taobao.weex.utils.WXLogUtils" ]
import com.taobao.weex.utils.WXLogUtils;
import com.taobao.weex.utils.*;
[ "com.taobao.weex" ]
com.taobao.weex;
1,944,961
long getMemoryUsage(String workerId) throws IOException;
long getMemoryUsage(String workerId) throws IOException;
/** * Get the current memory usage of the a given worker. * * @param workerId the id of the worker * @return the amount of memory the worker is using in bytes or -1 if not supported * @throws IOException on any error. */
Get the current memory usage of the a given worker
getMemoryUsage
{ "repo_name": "kishorvpatil/incubator-storm", "path": "storm-server/src/main/java/org/apache/storm/container/ResourceIsolationInterface.java", "license": "apache-2.0", "size": 3956 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,606,034
public Launcher.LocalLauncher createLocalLauncher() { return new Launcher.LocalLauncher(StreamTaskListener.fromStdout()); }
Launcher.LocalLauncher function() { return new Launcher.LocalLauncher(StreamTaskListener.fromStdout()); }
/** * Creates {@link hudson.Launcher.LocalLauncher}. Useful for launching processes. */
Creates <code>hudson.Launcher.LocalLauncher</code>. Useful for launching processes
createLocalLauncher
{ "repo_name": "nguyentienlong/jenkins", "path": "test/src/main/java/org/jvnet/hudson/test/JenkinsRule.java", "license": "mit", "size": 82593 }
[ "hudson.util.StreamTaskListener" ]
import hudson.util.StreamTaskListener;
import hudson.util.*;
[ "hudson.util" ]
hudson.util;
303,569
void setTitleBarComponentpainter(Color left, Color right);
void setTitleBarComponentpainter(Color left, Color right);
/** * DOCUMENT ME! * * @param left DOCUMENT ME! * @param right DOCUMENT ME! */
DOCUMENT ME
setTitleBarComponentpainter
{ "repo_name": "cismet/cismet-application-commons", "path": "src/main/java/de/cismet/commons/architecture/broker/AdvancedPluginBrokerInt.java", "license": "gpl-3.0", "size": 1039 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,675,322
protected IPropertySource getPropertySource(Object object) { if (sources.containsKey(object)) return (IPropertySource) sources.get(object); IPropertySource result = null; IPropertySourceProvider provider = propertySourceProvider; if (provider == null && object != null) { provider = (IPropertySourcePr...
IPropertySource function(Object object) { if (sources.containsKey(object)) return (IPropertySource) sources.get(object); IPropertySource result = null; IPropertySourceProvider provider = propertySourceProvider; if (provider == null && object != null) { provider = (IPropertySourceProvider) ViewsPlugin.getAdapter(object,...
/** * Returns an property source for the given object. * * @param object * an object for which to obtain a property source or * <code>null</code> if a property source is not available * @return an property source for the given object * @since 3.1 (was previously private) */
Returns an property source for the given object
getPropertySource
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/ui/views/properties/PropertySheetEntry.java", "license": "epl-1.0", "size": 21706 }
[ "org.eclipse.ui.internal.views.ViewsPlugin" ]
import org.eclipse.ui.internal.views.ViewsPlugin;
import org.eclipse.ui.internal.views.*;
[ "org.eclipse.ui" ]
org.eclipse.ui;
640,552
public static void appendToFile(File file, String content) { try { com.google.common.io.Files.append(content, file, Charsets.UTF_8); } catch (IOException e) { logger.error("Failed to append content to file " + file, e); } }
static void function(File file, String content) { try { com.google.common.io.Files.append(content, file, Charsets.UTF_8); } catch (IOException e) { logger.error(STR + file, e); } }
/** * Appends content to a file. * * @param file * The file to create. * @param content * Content of the file. */
Appends content to a file
appendToFile
{ "repo_name": "eschwert/DL-Learner", "path": "components-core/src/main/java/org/dllearner/utilities/Files.java", "license": "gpl-3.0", "size": 5766 }
[ "com.google.common.base.Charsets", "java.io.File", "java.io.IOException" ]
import com.google.common.base.Charsets; import java.io.File; import java.io.IOException;
import com.google.common.base.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
2,346,295
public void getCanonicalRpcStats(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.CanonicalRpcStats> responseObserver) { asyncUnimplementedUnaryCall(METHOD_GET_CANONICAL_RPC_STATS, responseObserver); }
void function(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.CanonicalRpcStats> responseObserver) { asyncUnimplementedUnaryCall(METHOD_GET_CANONICAL_RPC_STATS, responseObserver); }
/** * <pre> * Return canonical RPC stats * </pre> */
<code> Return canonical RPC stats </code>
getCanonicalRpcStats
{ "repo_name": "nmittler/grpc-java", "path": "services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java", "license": "bsd-3-clause", "size": 22033 }
[ "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
1,877,186
public void writeLong(long value) throws IOException { if (TIME_DATA_SERIALIZATION) { startTimer(); } if (NO_ARRAY_BUFFERS) { out.writeLong(value); } else { if (long_index == long_buffer.length) { flush(); } ...
void function(long value) throws IOException { if (TIME_DATA_SERIALIZATION) { startTimer(); } if (NO_ARRAY_BUFFERS) { out.writeLong(value); } else { if (long_index == long_buffer.length) { flush(); } long_buffer[long_index++] = value; } if (DEBUG && logger.isDebugEnabled()) { logger.debug(STR + value); } if (TIME_DATA_...
/** * Writes a long value to the accumulator. * @param value The long value to write. * @exception IOException on IO error. */
Writes a long value to the accumulator
writeLong
{ "repo_name": "interdroid/ibis-ipl", "path": "io/jmesrc/ibis/io/jme/DataSerializationOutputStream.java", "license": "bsd-3-clause", "size": 32332 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
918,327
public StripedExecutor getStripedExecutorService();
StripedExecutor function();
/** * Executor service that is in charge of processing internal system messages * in stripes (dedicated threads). * * @return Thread pool implementation to be used in grid for internal system messages. */
Executor service that is in charge of processing internal system messages in stripes (dedicated threads)
getStripedExecutorService
{ "repo_name": "ptupitsyn/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java", "license": "apache-2.0", "size": 20940 }
[ "org.apache.ignite.internal.util.StripedExecutor" ]
import org.apache.ignite.internal.util.StripedExecutor;
import org.apache.ignite.internal.util.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,045,656
public boolean equals(Object o) { if (o instanceof Name) { Comparator c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER; return c.compare(name, ((Name)o).name) == 0; } else { return false; } }
boolean function(Object o) { if (o instanceof Name) { Comparator c = ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER; return c.compare(name, ((Name)o).name) == 0; } else { return false; } }
/** * Compares this attribute name to another for equality. * @param o the object to compare * @return true if this attribute name is equal to the * specified attribute object */
Compares this attribute name to another for equality
equals
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "ojluni/src/main/java/java/util/jar/Attributes.java", "license": "gpl-2.0", "size": 24560 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
2,782,893
private void writeRegistry(final RegistryOperations registryImpl, UserGroupInformation ugi, final String key, final String value, final boolean throwIfFails) throws YarnException {
void function(final RegistryOperations registryImpl, UserGroupInformation ugi, final String key, final String value, final boolean throwIfFails) throws YarnException {
/** * Write registry entry, override if exists. */
Write registry entry, override if exists
writeRegistry
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/utils/FederationRegistryClient.java", "license": "apache-2.0", "size": 11580 }
[ "org.apache.hadoop.registry.client.api.RegistryOperations", "org.apache.hadoop.security.UserGroupInformation", "org.apache.hadoop.yarn.exceptions.YarnException" ]
import org.apache.hadoop.registry.client.api.RegistryOperations; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.registry.client.api.*; import org.apache.hadoop.security.*; import org.apache.hadoop.yarn.exceptions.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
39,070
void removeHeraldry(ItemStack item);
void removeHeraldry(ItemStack item);
/** * Removes the heraldry code from the item */
Removes the heraldry code from the item
removeHeraldry
{ "repo_name": "Mine-and-blade-admin/Battlegear2", "path": "battlegear mod src/minecraft/mods/battlegear2/api/heraldry/IHeraldryItem.java", "license": "gpl-3.0", "size": 1800 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
1,415,291
public String[] getRatingSchemeNames() { Set<String> schemeNames = ratingService.getRatingSchemes().keySet(); String[] result = new String[0]; result = schemeNames.toArray(result); return result; }
String[] function() { Set<String> schemeNames = ratingService.getRatingSchemes().keySet(); String[] result = new String[0]; result = schemeNames.toArray(result); return result; }
/** * Gets the names for rating schemes currently in the system. * @return */
Gets the names for rating schemes currently in the system
getRatingSchemeNames
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/java/org/alfresco/repo/rating/script/ScriptRatingService.java", "license": "lgpl-3.0", "size": 7010 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
926,724
public void setIndexedProperty(final Object bean, final String name, final int index, final Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { try { _setIndexedProperty(bean, name, index, value); } catch (RuntimeException e) { throw e; } catch...
void function(final Object bean, final String name, final int index, final Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { try { _setIndexedProperty(bean, name, index, value); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); }...
/** * Set the value of the specified indexed property of the specified bean, * with no type conversions. In addition to supporting the JavaBeans * specification, this method has been extended to support <code>List</code> * objects as well. * * @param bean * Bean whose property is to be s...
Set the value of the specified indexed property of the specified bean, with no type conversions. In addition to supporting the JavaBeans specification, this method has been extended to support <code>List</code> objects as well
setIndexedProperty
{ "repo_name": "takacsot/q-beanutils", "path": "src/main/java/eu/qualityontime/commons/QPropertyUtilsBean.java", "license": "apache-2.0", "size": 88606 }
[ "java.lang.reflect.InvocationTargetException" ]
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,734,637
private IdSet getOIDs(String collection) { IdSet oids = _oids.get(collection); if (oids == null) { oids = new IdHashSet(); _oids.put(collection, oids); } return oids; }
IdSet function(String collection) { IdSet oids = _oids.get(collection); if (oids == null) { oids = new IdHashSet(); _oids.put(collection, oids); } return oids; }
/** * For a given collection, this method returns the OIDs of all objects * @param collection the collection's name * @return the OIDs */
For a given collection, this method returns the OIDs of all objects
getOIDs
{ "repo_name": "igd-geo/mongomvcc", "path": "src/main/java/de/fhg/igd/mongomvcc/impl/internal/Index.java", "license": "lgpl-3.0", "size": 7781 }
[ "de.fhg.igd.mongomvcc.helper.IdHashSet", "de.fhg.igd.mongomvcc.helper.IdSet" ]
import de.fhg.igd.mongomvcc.helper.IdHashSet; import de.fhg.igd.mongomvcc.helper.IdSet;
import de.fhg.igd.mongomvcc.helper.*;
[ "de.fhg.igd" ]
de.fhg.igd;
1,348,883
protected void buildSpPrivateKeys() throws Exception { Assert.notNull(this.decryptionKeyResource, "No encryption key configured for CAS SP"); Assert.notNull(this.decryptionKeySpec, "No java encryption key specification configured for CAS SP"); Assert.notNull(this.decryptionKeyType, "No encryption key type conf...
void function() throws Exception { Assert.notNull(this.decryptionKeyResource, STR); Assert.notNull(this.decryptionKeySpec, STR); Assert.notNull(this.decryptionKeyType, STR); Assert.notNull(this.signingKeyResource, STR); Assert.notNull(this.signingKeySpec, STR); Assert.notNull(this.signingKeyType, STR); this.decryptionK...
/** * Build private Keys. * * @throws Exception */
Build private Keys
buildSpPrivateKeys
{ "repo_name": "mxbossard/java-saml2-sp", "path": "src/main/java/fr/mby/saml2/sp/impl/config/BasicSpConfig.java", "license": "apache-2.0", "size": 12440 }
[ "fr.mby.saml2.sp.impl.helper.SecurityHelper", "org.springframework.util.Assert" ]
import fr.mby.saml2.sp.impl.helper.SecurityHelper; import org.springframework.util.Assert;
import fr.mby.saml2.sp.impl.helper.*; import org.springframework.util.*;
[ "fr.mby.saml2", "org.springframework.util" ]
fr.mby.saml2; org.springframework.util;
1,467,967
public static MapScope getEntityTypeMapScope( final Id applicationId ) { return new MapScopeImpl( applicationId, CpNamingUtils.TYPES_BY_UUID_MAP ); }
static MapScope function( final Id applicationId ) { return new MapScopeImpl( applicationId, CpNamingUtils.TYPES_BY_UUID_MAP ); }
/** * Get the map scope for the applicationId to store entity uuid to type mapping */
Get the map scope for the applicationId to store entity uuid to type mapping
getEntityTypeMapScope
{ "repo_name": "mdunker/usergrid", "path": "stack/core/src/main/java/org/apache/usergrid/corepersistence/util/CpNamingUtils.java", "license": "apache-2.0", "size": 12519 }
[ "org.apache.usergrid.persistence.map.MapScope", "org.apache.usergrid.persistence.map.impl.MapScopeImpl", "org.apache.usergrid.persistence.model.entity.Id" ]
import org.apache.usergrid.persistence.map.MapScope; import org.apache.usergrid.persistence.map.impl.MapScopeImpl; import org.apache.usergrid.persistence.model.entity.Id;
import org.apache.usergrid.persistence.map.*; import org.apache.usergrid.persistence.map.impl.*; import org.apache.usergrid.persistence.model.entity.*;
[ "org.apache.usergrid" ]
org.apache.usergrid;
330,261
protected boolean addToPoller(long socket, int events) { int rv = -1; for (int i = 0; i < pollers.length; i++) { if (pollerSpace[i] > 0) { rv = Poll.add(pollers[i], socket, events); if (rv == Status.APR_SUCCESS) { ...
boolean function(long socket, int events) { int rv = -1; for (int i = 0; i < pollers.length; i++) { if (pollerSpace[i] > 0) { rv = Poll.add(pollers[i], socket, events); if (rv == Status.APR_SUCCESS) { pollerSpace[i]--; connectionCount.incrementAndGet(); return true; } } } return false; }
/** * Add specified socket to one of the pollers. Must only be called from * {@link Poller#run()}. */
Add specified socket to one of the pollers. Must only be called from <code>Poller#run()</code>
addToPoller
{ "repo_name": "mayonghui2112/helloWorld", "path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/tomcat/util/net/AprEndpoint.java", "license": "apache-2.0", "size": 102685 }
[ "org.apache.tomcat.jni.Poll", "org.apache.tomcat.jni.Status" ]
import org.apache.tomcat.jni.Poll; import org.apache.tomcat.jni.Status;
import org.apache.tomcat.jni.*;
[ "org.apache.tomcat" ]
org.apache.tomcat;
554,482
private String getXAxisLabel() { Context context = getContext(); if (chartByDistance) { return metricUnits ? context.getString(R.string.unit_kilometer) : context .getString(R.string.unit_mile); } else { return context.getString(R.string.description_time); } }
String function() { Context context = getContext(); if (chartByDistance) { return metricUnits ? context.getString(R.string.unit_kilometer) : context .getString(R.string.unit_mile); } else { return context.getString(R.string.description_time); } }
/** * Gets the x axis label. */
Gets the x axis label
getXAxisLabel
{ "repo_name": "AdaDeb/septracks", "path": "MyTracks/src/com/google/android/apps/mytracks/ChartView.java", "license": "gpl-2.0", "size": 31334 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
272,869
public static String readStringProperty(String processorType, String processorTag, Map<String, Object> configuration, String propertyName, String defaultValue) { Object value = configuration.remove(propertyName); if (value == null && defaultValue != null) ...
static String function(String processorType, String processorTag, Map<String, Object> configuration, String propertyName, String defaultValue) { Object value = configuration.remove(propertyName); if (value == null && defaultValue != null) { return defaultValue; } else if (value == null) { throw newConfigurationExceptio...
/** * Returns and removes the specified property from the specified configuration map. * * If the property value isn't of type string a {@link ElasticsearchParseException} is thrown. * If the property is missing and no default value has been specified a {@link ElasticsearchParseException} is thrown ...
Returns and removes the specified property from the specified configuration map. If the property value isn't of type string a <code>ElasticsearchParseException</code> is thrown. If the property is missing and no default value has been specified a <code>ElasticsearchParseException</code> is thrown
readStringProperty
{ "repo_name": "gingerwizard/elasticsearch", "path": "server/src/main/java/org/elasticsearch/ingest/ConfigurationUtils.java", "license": "apache-2.0", "size": 22823 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,106,991
private BufferedImage createWaypointImage(Color color) { int w = whiteWaypointImage.getWidth(); int h = whiteWaypointImage.getHeight(); BufferedImage ret = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); Graphics2D g = ret.createGraphics(); g.s...
BufferedImage function(Color color) { int w = whiteWaypointImage.getWidth(); int h = whiteWaypointImage.getHeight(); BufferedImage ret = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); Graphics2D g = ret.createGraphics(); g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g.dr...
/** * Creates a waypoint image with the specified color * * @param color the color of the new image * * @return the new waypoint image */
Creates a waypoint image with the specified color
createWaypointImage
{ "repo_name": "eugene7646/autopsy", "path": "Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java", "license": "apache-2.0", "size": 37919 }
[ "java.awt.AlphaComposite", "java.awt.Color", "java.awt.Graphics2D", "java.awt.RenderingHints", "java.awt.image.BufferedImage" ]
import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
2,829,487
@NotNull PsiAnnotation addAnnotation(@NotNull @NonNls String qualifiedName);
PsiAnnotation addAnnotation(@NotNull @NonNls String qualifiedName);
/** * Adds a new annotation to this owner. The annotation class name will be shortened. No attributes will be defined. * * @param qualifiedName qualifiedName * @return newly added annotation */
Adds a new annotation to this owner. The annotation class name will be shortened. No attributes will be defined
addAnnotation
{ "repo_name": "jk1/intellij-community", "path": "java/java-psi-api/src/com/intellij/psi/PsiAnnotationOwner.java", "license": "apache-2.0", "size": 2076 }
[ "org.jetbrains.annotations.NonNls", "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
1,469,262
public void unSubscribe(String userName,String agent) throws APIManagementException { try { if (!enabled || skipEventReceiverConnection) { throw new APIManagementException("Data publisher is not enabled"); } if (publisher == null) { this...
void function(String userName,String agent) throws APIManagementException { try { if (!enabled skipEventReceiverConnection) { throw new APIManagementException(STR); } if (publisher == null) { this.initializeDataPublisher(); } ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance(); apiMgtDAO.unSubscribeAlerts(userName,agent); Al...
/** * This method will delete all the data relating to the alert subscription by given user Name. * @param userName logged in users name. */
This method will delete all the data relating to the alert subscription by given user Name
unSubscribe
{ "repo_name": "thilinicooray/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.publisher/src/main/java/org/wso2/carbon/apimgt/usage/publisher/AlertTypesPublisher.java", "license": "apache-2.0", "size": 4751 }
[ "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO", "org.wso2.carbon.apimgt.usage.publisher.dto.AlertTypeDTO" ]
import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO; import org.wso2.carbon.apimgt.usage.publisher.dto.AlertTypeDTO;
import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.dao.*; import org.wso2.carbon.apimgt.usage.publisher.dto.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,281,665
public void testParseExceptionFromEval () throws Exception { VelocityEngine ve = new VelocityEngine(); ve.init(); VelocityContext context = new VelocityContext(); Writer writer = new StringWriter(); try { ve.evaluate(contex...
void function () throws Exception { VelocityEngine ve = new VelocityEngine(); ve.init(); VelocityContext context = new VelocityContext(); Writer writer = new StringWriter(); try { ve.evaluate(context,writer,"test",STR); fail(STR); } catch (ParseErrorException e) { assertEquals("test",e.getTemplateName()); assertEquals(...
/** * Tests that parseException has useful info when thrown in VelocityEngine.evaluate() * @throws Exception */
Tests that parseException has useful info when thrown in VelocityEngine.evaluate()
testParseExceptionFromEval
{ "repo_name": "1CharlesStern/Web-XMLVerifier", "path": "src/test/org/apache/velocity/test/ParseExceptionTestCase.java", "license": "apache-2.0", "size": 9095 }
[ "java.io.StringWriter", "java.io.Writer", "org.apache.velocity.VelocityContext", "org.apache.velocity.app.VelocityEngine", "org.apache.velocity.exception.ParseErrorException" ]
import java.io.StringWriter; import java.io.Writer; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.exception.ParseErrorException;
import java.io.*; import org.apache.velocity.*; import org.apache.velocity.app.*; import org.apache.velocity.exception.*;
[ "java.io", "org.apache.velocity" ]
java.io; org.apache.velocity;
838,997
public List<DnsResource> additionalResources() { if (additional == null) { return Collections.emptyList(); } return Collections.unmodifiableList(additional); }
List<DnsResource> function() { if (additional == null) { return Collections.emptyList(); } return Collections.unmodifiableList(additional); }
/** * Returns a list of all the additional resource records in this message. */
Returns a list of all the additional resource records in this message
additionalResources
{ "repo_name": "kaustubh-walokar/grpc-poll-lab2", "path": "lib/netty/codec-dns/src/main/java/io/netty/handler/codec/dns/DnsMessage.java", "license": "bsd-3-clause", "size": 6694 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,592,177
void unexpectedErrorHandling(String message, final Throwable t) { // unwrap chained exceptions Throwable e = t; while (e.getCause() != null) { e = e.getCause(); } e.printStackTrace(); if (e instanceof OutOfMemoryError) { LoneOptionDialog.showMessageDialog("Sorry, an OutOfMemoryError occurred. Ple...
void unexpectedErrorHandling(String message, final Throwable t) { Throwable e = t; while (e.getCause() != null) { e = e.getCause(); } e.printStackTrace(); if (e instanceof OutOfMemoryError) { LoneOptionDialog.showMessageDialog(STR + ClientGameConfiguration.get(STR) + "."); } else if (e instanceof LinkageError e instanc...
/** * Handles exceptions during program invocation. * * @param message error message * @param t exception */
Handles exceptions during program invocation
unexpectedErrorHandling
{ "repo_name": "AntumDeluge/arianne-stendhal", "path": "src/games/stendhal/client/update/Bootstrap.java", "license": "gpl-2.0", "size": 15146 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
216,531
public synchronized void insertAll(Iterator<Friend> friends) throws Exception { dao.insertAll(friends); }
synchronized void function(Iterator<Friend> friends) throws Exception { dao.insertAll(friends); }
/** * The method that inserts a batch of Friend entries. */
The method that inserts a batch of Friend entries
insertAll
{ "repo_name": "smartenit-eu/smartenit", "path": "unada/db/dao/src/main/java/eu/smartenit/unada/db/dao/impl/FriendDAO.java", "license": "apache-2.0", "size": 2456 }
[ "eu.smartenit.unada.db.dto.Friend", "java.util.Iterator" ]
import eu.smartenit.unada.db.dto.Friend; import java.util.Iterator;
import eu.smartenit.unada.db.dto.*; import java.util.*;
[ "eu.smartenit.unada", "java.util" ]
eu.smartenit.unada; java.util;
769,216
public boolean hasData(final long address, final int length) { Preconditions.checkArgument(address >= 0, "Error: Address can't be less than 0"); Preconditions.checkArgument(length > 0, "Error: Length must be positive"); try { m_readLock.lock(); MemoryChunk nextChunk = findChunk(address); ...
boolean function(final long address, final int length) { Preconditions.checkArgument(address >= 0, STR); Preconditions.checkArgument(length > 0, STR); try { m_readLock.lock(); MemoryChunk nextChunk = findChunk(address); int nextLength = length; long nextAddress = address; do { if (nextChunk == null) { return false; } e...
/** * Determines whether the memory has length bytes starting from the given address. * * @param address The start address. * @param length The length of the data. * * @return True, if all bytes in the given range are available. False, otherwise. * * @throws IllegalArgumentException Thrown if...
Determines whether the memory has length bytes starting from the given address
hasData
{ "repo_name": "AmesianX/binnavi", "path": "src/main/java/com/google/security/zynamics/zylib/general/memmanager/Memory.java", "license": "apache-2.0", "size": 21748 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,001,348
@Configurable public void setStartupMode(DeployMode mode) throws ConfigException { _startupMode = mode; }
void function(DeployMode mode) throws ConfigException { _startupMode = mode; }
/** * Sets the startup mode. */
Sets the startup mode
setStartupMode
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/env/deploy/DeployGenerator.java", "license": "gpl-2.0", "size": 6545 }
[ "com.caucho.config.ConfigException" ]
import com.caucho.config.ConfigException;
import com.caucho.config.*;
[ "com.caucho.config" ]
com.caucho.config;
1,585,285
public StoredSortedMap getSupplierMap() { return supplierMap; }
StoredSortedMap function() { return supplierMap; }
/** * Return a map view of the supplier storage container. */
Return a map view of the supplier storage container
getSupplierMap
{ "repo_name": "djsedulous/namecoind", "path": "libs/db-4.7.25.NC/examples_java/src/collections/ship/marshal/SampleViews.java", "license": "mit", "size": 9341 }
[ "com.sleepycat.collections.StoredSortedMap" ]
import com.sleepycat.collections.StoredSortedMap;
import com.sleepycat.collections.*;
[ "com.sleepycat.collections" ]
com.sleepycat.collections;
2,141,967
public void insert(Widget child, Widget tab, int beforeIndex) { tabs.insert(child, tab, beforeIndex); }
void function(Widget child, Widget tab, int beforeIndex) { tabs.insert(child, tab, beforeIndex); }
/** * Inserts a widget into the panel. If the Widget is already attached, it * will be moved to the requested index. * * @param child * the widget to be added * @param tab * the widget to be placed in the associated tab * @param beforeIndex * the index before...
Inserts a widget into the panel. If the Widget is already attached, it will be moved to the requested index
insert
{ "repo_name": "AlexeyKashintsev/PlatypusJS", "path": "web-client/src/platypus/src/com/bearsoft/gwt/ui/containers/TabsDecoratedPanel.java", "license": "apache-2.0", "size": 19940 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
2,713,580
public static String getMapFieldAdderName(Field field) { if (field.isMap()) { return PUT_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
static String function(Field field) { if (field.isMap()) { return PUT_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
/** * Returns map field "put" method name. */
Returns map field "put" method name
getMapFieldAdderName
{ "repo_name": "kshchepanovskyi/proto-compiler", "path": "protostuff-generator/src/main/java/io/protostuff/generator/java/MessageFieldUtil.java", "license": "apache-2.0", "size": 19129 }
[ "io.protostuff.compiler.model.Field", "io.protostuff.generator.Formatter" ]
import io.protostuff.compiler.model.Field; import io.protostuff.generator.Formatter;
import io.protostuff.compiler.model.*; import io.protostuff.generator.*;
[ "io.protostuff.compiler", "io.protostuff.generator" ]
io.protostuff.compiler; io.protostuff.generator;
820,956
protected Issuer createDefaultIssuer() { return createIssuer(X509_NAME_ID, DEFAULT_ISSUER_VALUE); }
Issuer function() { return createIssuer(X509_NAME_ID, DEFAULT_ISSUER_VALUE); }
/** * Creates the default issuer. * * @return the issuer */
Creates the default issuer
createDefaultIssuer
{ "repo_name": "healthreveal/CONNECT", "path": "Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/callback/openSAML/OpenSAML2ComponentBuilder.java", "license": "bsd-3-clause", "size": 32385 }
[ "org.opensaml.saml2.core.Issuer" ]
import org.opensaml.saml2.core.Issuer;
import org.opensaml.saml2.core.*;
[ "org.opensaml.saml2" ]
org.opensaml.saml2;
2,488,166
public BinaryType type(String typeName) throws BinaryObjectException;
BinaryType function(String typeName) throws BinaryObjectException;
/** * Gets metadata for provided class name. * * @param typeName Type name. * @return Metadata. * @throws org.apache.ignite.binary.BinaryObjectException In case of error. */
Gets metadata for provided class name
type
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/main/java/org/apache/ignite/IgniteBinary.java", "license": "apache-2.0", "size": 18693 }
[ "org.apache.ignite.binary.BinaryObjectException", "org.apache.ignite.binary.BinaryType" ]
import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.binary.BinaryType;
import org.apache.ignite.binary.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,386,904
@Test public void testModelCopy() throws Exception { Logger.getLogger(getClass()).debug("TEST " + name.getMethodName()); CopyConstructorTester tester = new CopyConstructorTester(object); tester.proxy(Descriptor.class, 1, descriptor1); tester.proxy(Descriptor.class, 2, descriptor2); tester.proxy(...
void function() throws Exception { Logger.getLogger(getClass()).debug(STR + name.getMethodName()); CopyConstructorTester tester = new CopyConstructorTester(object); tester.proxy(Descriptor.class, 1, descriptor1); tester.proxy(Descriptor.class, 2, descriptor2); tester.proxy(Map.class, 1, map1); tester.proxy(Map.class, 2...
/** * Test copy constructor. * * @throws Exception the exception */
Test copy constructor
testModelCopy
{ "repo_name": "WestCoastInformatics/UMLS-Terminology-Server", "path": "jpa-model/src/test/java/com/wci/umls/server/jpa/test/content/DescriptorRelationshipJpaUnitTest.java", "license": "apache-2.0", "size": 8805 }
[ "com.wci.umls.server.helpers.CopyConstructorTester", "com.wci.umls.server.model.content.Descriptor", "com.wci.umls.server.model.content.DescriptorRelationship", "java.util.Map", "org.apache.log4j.Logger", "org.junit.Assert" ]
import com.wci.umls.server.helpers.CopyConstructorTester; import com.wci.umls.server.model.content.Descriptor; import com.wci.umls.server.model.content.DescriptorRelationship; import java.util.Map; import org.apache.log4j.Logger; import org.junit.Assert;
import com.wci.umls.server.helpers.*; import com.wci.umls.server.model.content.*; import java.util.*; import org.apache.log4j.*; import org.junit.*;
[ "com.wci.umls", "java.util", "org.apache.log4j", "org.junit" ]
com.wci.umls; java.util; org.apache.log4j; org.junit;
1,976,555
private int searchTerms(Integer position, List<Integer> positions) { // number of term found int found = 0; // number of the turn in the loop after to have found one term int turnAfterFound = 0; for (Integer termP : positions) { // We check to know if the positions are close if ((termP - MAX_DISTANC...
int function(Integer position, List<Integer> positions) { int found = 0; int turnAfterFound = 0; for (Integer termP : positions) { if ((termP - MAX_DISTANCE) < position && (termP + MAX_DISTANCE) > position) { found++; } else if (found > 0 && turnAfterFound < 4) { turnAfterFound++; } else { break; } } return found; }
/** * Compare a term position with the term position of the next lists. * @param position * @param positions * @return the number of the term found */
Compare a term position with the term position of the next lists
searchTerms
{ "repo_name": "DeGuitard/moviesearch", "path": "moviesearch/src/main/java/fr/univtls2/web/moviesearch/services/indexation/weighting/PositionGrusWeigher.java", "license": "gpl-2.0", "size": 2131 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,383,080
private NodesToAllocate buildNodesToAllocate(RoutingAllocation allocation, List<NodeGatewayStartedShards> nodeShardStates, ShardRouting shardRouting, boolean forceAlloca...
NodesToAllocate function(RoutingAllocation allocation, List<NodeGatewayStartedShards> nodeShardStates, ShardRouting shardRouting, boolean forceAllocate) { List<DecidedNode> yesNodeShards = new ArrayList<>(); List<DecidedNode> throttledNodeShards = new ArrayList<>(); List<DecidedNode> noNodeShards = new ArrayList<>(); f...
/** * Split the list of node shard states into groups yes/no/throttle based on allocation deciders */
Split the list of node shard states into groups yes/no/throttle based on allocation deciders
buildNodesToAllocate
{ "repo_name": "strapdata/elassandra", "path": "server/src/main/java/org/elasticsearch/gateway/PrimaryShardAllocator.java", "license": "apache-2.0", "size": 21056 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.elasticsearch.cluster.routing.RoutingNode", "org.elasticsearch.cluster.routing.ShardRouting", "org.elasticsearch.cluster.routing.allocation.RoutingAllocation", "org.elasticsearch.cluster.routing.allocation.decider.Decision", "org.e...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.elasticsearch.cluster.routing.RoutingNode; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.cluster.routing.allocation.RoutingAllocation; import org.elasticsearch.cluster.routing.allocation.decider...
import java.util.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.cluster.routing.allocation.*; import org.elasticsearch.cluster.routing.allocation.decider.*; import org.elasticsearch.gateway.*;
[ "java.util", "org.elasticsearch.cluster", "org.elasticsearch.gateway" ]
java.util; org.elasticsearch.cluster; org.elasticsearch.gateway;
1,376,246
private void computeFiBuffer() { for (int i = 0; i < this.values[this.currentVar1].length + 1; i++) { this.currentFiBuffer[i][0] = 0.; if (i == 0) { for (int j = 1; j < this.values[this.currentVar2].length + 1; j++) { this.curr...
void function() { for (int i = 0; i < this.values[this.currentVar1].length + 1; i++) { this.currentFiBuffer[i][0] = 0.; if (i == 0) { for (int j = 1; j < this.values[this.currentVar2].length + 1; j++) { this.currentFiBuffer[i][j] = 0.; } } else if (i < this.values[this.currentVar1].length) { for (int j = 1; j < this.va...
/** * Cache some statistics for speeding up calculations. */
Cache some statistics for speeding up calculations
computeFiBuffer
{ "repo_name": "ajsedgewick/tetrad", "path": "tetrad-lib/src/main/java/edu/cmu/tetrad/search/DiscreteTetradTest.java", "license": "gpl-2.0", "size": 83031 }
[ "edu.cmu.tetrad.util.ProbUtils" ]
import edu.cmu.tetrad.util.ProbUtils;
import edu.cmu.tetrad.util.*;
[ "edu.cmu.tetrad" ]
edu.cmu.tetrad;
1,750,952
public void insert_wchar(char _0) throws TypeMismatch, InvalidValue { throw new MARSHAL(_DynAnyStub.NOT_APPLICABLE); }
void function(char _0) throws TypeMismatch, InvalidValue { throw new MARSHAL(_DynAnyStub.NOT_APPLICABLE); }
/** * The remote call of DynAny methods is not possible. * * @throws MARSHAL, always. */
The remote call of DynAny methods is not possible
insert_wchar
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/org/omg/DynamicAny/_DynFixedStub.java", "license": "gpl-2.0", "size": 15179 }
[ "org.omg.DynamicAny" ]
import org.omg.DynamicAny;
import org.omg.*;
[ "org.omg" ]
org.omg;
30,078
private static SeqGraph removeCycles(final SeqGraph original, final Collection<SeqVertex> sources, final Set<SeqVertex> sinks) { final Set<BaseEdge> edgesToRemove = new HashSet<>(original.edgeSet().size()); final Set<SeqVertex> vertexToRemove = new HashSet<>(original.vertexSet().size()); bo...
static SeqGraph function(final SeqGraph original, final Collection<SeqVertex> sources, final Set<SeqVertex> sinks) { final Set<BaseEdge> edgesToRemove = new HashSet<>(original.edgeSet().size()); final Set<SeqVertex> vertexToRemove = new HashSet<>(original.vertexSet().size()); boolean foundSomePath = false; for (final S...
/** * Removes edges that produces cycles and also dead vertices that do not lead to any sink vertex. * * @param original graph to modify. * @param sources considered source vertices. * @param sinks considered sink vertices. * @return never {@code null}. */
Removes edges that produces cycles and also dead vertices that do not lead to any sink vertex
removeCycles
{ "repo_name": "BGI-flexlab/SOAPgaeaDevelopment4.0", "path": "src/main/java/org/bgi/flexlab/gaea/tools/haplotypecaller/assembly/KBestHaplotypeFinder.java", "license": "gpl-3.0", "size": 17208 }
[ "java.util.Arrays", "java.util.Collection", "java.util.HashSet", "java.util.Set", "org.bgi.flexlab.gaea.tools.haplotypecaller.assembly.vertex.BaseEdge", "org.bgi.flexlab.gaea.tools.haplotypecaller.assembly.vertex.SeqGraph", "org.bgi.flexlab.gaea.tools.haplotypecaller.assembly.vertex.SeqVertex" ]
import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.bgi.flexlab.gaea.tools.haplotypecaller.assembly.vertex.BaseEdge; import org.bgi.flexlab.gaea.tools.haplotypecaller.assembly.vertex.SeqGraph; import org.bgi.flexlab.gaea.tools.haplotypecaller.assembly.vertex....
import java.util.*; import org.bgi.flexlab.gaea.tools.haplotypecaller.assembly.vertex.*;
[ "java.util", "org.bgi.flexlab" ]
java.util; org.bgi.flexlab;
800,322
public boolean isPopupVisible(JComboBox a) { boolean returnValue = ((ComboBoxUI) (uis.elementAt(0))).isPopupVisible(a); for (int i = 1; i < uis.size(); i++) { ((ComboBoxUI) (uis.elementAt(i))).isPopupVisible(a); } return returnValue; } ///////////////////...
boolean function(JComboBox a) { boolean returnValue = ((ComboBoxUI) (uis.elementAt(0))).isPopupVisible(a); for (int i = 1; i < uis.size(); i++) { ((ComboBoxUI) (uis.elementAt(i))).isPopupVisible(a); } return returnValue; }
/** * Invokes the <code>isPopupVisible</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */
Invokes the <code>isPopupVisible</code> method on each UI handled by this object
isPopupVisible
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/jdk/src/share/classes/javax/swing/plaf/multi/MultiComboBoxUI.java", "license": "gpl-2.0", "size": 8844 }
[ "javax.swing.JComboBox", "javax.swing.plaf.ComboBoxUI" ]
import javax.swing.JComboBox; import javax.swing.plaf.ComboBoxUI;
import javax.swing.*; import javax.swing.plaf.*;
[ "javax.swing" ]
javax.swing;
1,864,608
public MultipleCurrencyAmount currencyExposure(final ForexOptionVanilla option, final BlackForexSmileProviderInterface marketData) { ArgumentChecker.notNull(option, "option"); ArgumentChecker.notNull(marketData, "marketData"); ArgumentChecker.isTrue(marketData.checkCurrencies(option.getCurrency1(), option...
MultipleCurrencyAmount function(final ForexOptionVanilla option, final BlackForexSmileProviderInterface marketData) { ArgumentChecker.notNull(option, STR); ArgumentChecker.notNull(marketData, STR); ArgumentChecker.isTrue(marketData.checkCurrencies(option.getCurrency1(), option.getCurrency2()), STR); final MulticurvePro...
/** * Computes the currency exposure of the vanilla option with the Black function and a volatility from a volatility surface. The exposure * is computed in both option currencies. * * @param option * the Forex option, not null * @param marketData * the curve and smile data, not ...
Computes the currency exposure of the vanilla option with the Black function and a volatility from a volatility surface. The exposure is computed in both option currencies
currencyExposure
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/forex/provider/ForexOptionVanillaBlackSmileMethod.java", "license": "apache-2.0", "size": 44308 }
[ "com.opengamma.analytics.financial.forex.derivative.ForexOptionVanilla", "com.opengamma.analytics.financial.model.option.pricing.analytic.formula.BlackFunctionData", "com.opengamma.analytics.financial.provider.description.forex.BlackForexSmileProviderInterface", "com.opengamma.analytics.financial.provider.des...
import com.opengamma.analytics.financial.forex.derivative.ForexOptionVanilla; import com.opengamma.analytics.financial.model.option.pricing.analytic.formula.BlackFunctionData; import com.opengamma.analytics.financial.provider.description.forex.BlackForexSmileProviderInterface; import com.opengamma.analytics.financial.p...
import com.opengamma.analytics.financial.forex.derivative.*; import com.opengamma.analytics.financial.model.option.pricing.analytic.formula.*; import com.opengamma.analytics.financial.provider.description.forex.*; import com.opengamma.analytics.financial.provider.description.interestrate.*; import com.opengamma.util.*;...
[ "com.opengamma.analytics", "com.opengamma.util" ]
com.opengamma.analytics; com.opengamma.util;
1,061,614
public void replaceUserOnSession(final String targetName, final UserSession session) { final String policiesString = session.getOptions() .getOption(ExecConstants.IMPERSONATION_POLICY_VALIDATOR); if (!policiesString.equals(this.policiesString)) { try { impersonationPolicies = deserialize...
void function(final String targetName, final UserSession session) { final String policiesString = session.getOptions() .getOption(ExecConstants.IMPERSONATION_POLICY_VALIDATOR); if (!policiesString.equals(this.policiesString)) { try { impersonationPolicies = deserializeImpersonationPolicies(policiesString); this.policie...
/** * Check if the current session user, as a proxy user, is authorized to impersonate the given target user * based on the system's impersonation policies. * * @param targetName target user name * @param session user session */
Check if the current session user, as a proxy user, is authorized to impersonate the given target user based on the system's impersonation policies
replaceUserOnSession
{ "repo_name": "johnnywale/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/InboundImpersonationManager.java", "license": "apache-2.0", "size": 8036 }
[ "java.io.IOException", "org.apache.drill.common.exceptions.DrillRuntimeException", "org.apache.drill.common.exceptions.UserException", "org.apache.drill.exec.ExecConstants", "org.apache.drill.exec.proto.UserBitShared" ]
import java.io.IOException; import org.apache.drill.common.exceptions.DrillRuntimeException; import org.apache.drill.common.exceptions.UserException; import org.apache.drill.exec.ExecConstants; import org.apache.drill.exec.proto.UserBitShared;
import java.io.*; import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.*; import org.apache.drill.exec.proto.*;
[ "java.io", "org.apache.drill" ]
java.io; org.apache.drill;
325,929
protected final Map<String, String> getVisualizationParameters() { Map<String, String> result = new HashMap<String, String>(); if(startDate != null) { result.put(VisualizationServices.PARAMETER_KEY_START_DATE, DateTimeUtils.getIso8601DateString(startDate, false)); } if(endDate != null) { result.p...
final Map<String, String> function() { Map<String, String> result = new HashMap<String, String>(); if(startDate != null) { result.put(VisualizationServices.PARAMETER_KEY_START_DATE, DateTimeUtils.getIso8601DateString(startDate, false)); } if(endDate != null) { result.put(VisualizationServices.PARAMETER_KEY_END_DATE, Da...
/** * Returns a map of the parameters to be passed to the visualization * server. * * @return A map of key-value pairs to be passed to the visualization * server. */
Returns a map of the parameters to be passed to the visualization server
getVisualizationParameters
{ "repo_name": "HaiJiaoXinHeng/server-1", "path": "src/org/ohmage/request/visualization/VisualizationRequest.java", "license": "apache-2.0", "size": 9335 }
[ "java.util.HashMap", "java.util.Map", "org.ohmage.service.VisualizationServices", "org.ohmage.util.DateTimeUtils" ]
import java.util.HashMap; import java.util.Map; import org.ohmage.service.VisualizationServices; import org.ohmage.util.DateTimeUtils;
import java.util.*; import org.ohmage.service.*; import org.ohmage.util.*;
[ "java.util", "org.ohmage.service", "org.ohmage.util" ]
java.util; org.ohmage.service; org.ohmage.util;
2,396,719
@CalledByNative private void addPermissionSection(String name, int type, int currentSettingValue) { // We have at least one permission, so show the lower permissions area. setVisibilityOfPermissionsList(true); mDisplayedPermissions.add(new PageInfoPermissionEntry(name, type, ContentSetti...
void function(String name, int type, int currentSettingValue) { setVisibilityOfPermissionsList(true); mDisplayedPermissions.add(new PageInfoPermissionEntry(name, type, ContentSetting .fromInt(currentSettingValue))); }
/** * Adds a new row for the given permission. * * @param name The title of the permission to display to the user. * @param type The ContentSettingsType of the permission. * @param currentSettingValue The ContentSetting value of the currently selected setting. */
Adds a new row for the given permission
addPermissionSection
{ "repo_name": "Workday/OpenFrame", "path": "chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java", "license": "bsd-3-clause", "size": 37793 }
[ "org.chromium.chrome.browser.preferences.website.ContentSetting" ]
import org.chromium.chrome.browser.preferences.website.ContentSetting;
import org.chromium.chrome.browser.preferences.website.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
1,777,428
private static List<ItemDTO> getItemList(ImmutableProject project, ImmutableInvoice invoice, Operation operation) { List<ItemDTO> items = new LinkedList<>(); for (ImmutableItem item : invoice.getItems()) { if (operation instanceof DelItemOp) { DelItemOp op = (DelItemOp) operation; if (op.getId() ...
static List<ItemDTO> function(ImmutableProject project, ImmutableInvoice invoice, Operation operation) { List<ItemDTO> items = new LinkedList<>(); for (ImmutableItem item : invoice.getItems()) { if (operation instanceof DelItemOp) { DelItemOp op = (DelItemOp) operation; if (op.getId() == item.getId()) { continue; } } i...
/** * Get the list of items from a previous invoice state with a given * operation that could influcene the items list. * * @param project * previous project state * @param invoice * previous invoice state * @param operation * operation that is currently perf...
Get the list of items from a previous invoice state with a given operation that could influcene the items list
getItemList
{ "repo_name": "metaxmx/PartyInvoice", "path": "src/com/illucit/partyinvoice/immutabledata/ImmutableProject.java", "license": "lgpl-2.1", "size": 18034 }
[ "com.illucit.partyinvoice.data.Item", "com.illucit.partyinvoice.data.Operation", "com.illucit.partyinvoice.immutabledata.operation.AddItemOp", "com.illucit.partyinvoice.immutabledata.operation.ChangeItemOp", "com.illucit.partyinvoice.immutabledata.operation.DelItemOp", "java.util.LinkedList", "java.util...
import com.illucit.partyinvoice.data.Item; import com.illucit.partyinvoice.data.Operation; import com.illucit.partyinvoice.immutabledata.operation.AddItemOp; import com.illucit.partyinvoice.immutabledata.operation.ChangeItemOp; import com.illucit.partyinvoice.immutabledata.operation.DelItemOp; import java.util.LinkedLi...
import com.illucit.partyinvoice.data.*; import com.illucit.partyinvoice.immutabledata.operation.*; import java.util.*;
[ "com.illucit.partyinvoice", "java.util" ]
com.illucit.partyinvoice; java.util;
2,122,770
protected void restoreFromContinuationData(Map<String, Object> data) { //noinspection unchecked localProxyBuilder.set((FactoryBuilderSupport) data.get("proxyBuilder")); //noinspection unchecked contexts.set((LinkedList<Map<String, Object>>) data.get("contexts")); }
void function(Map<String, Object> data) { localProxyBuilder.set((FactoryBuilderSupport) data.get(STR)); contexts.set((LinkedList<Map<String, Object>>) data.get(STR)); }
/** * Restores the state of the current builder to the same state as an older build. * * Caution, this will destroy rather than merge the current build context if there is any, * @param data the data retrieved from a compatible getContinuationData call */
Restores the state of the current builder to the same state as an older build. Caution, this will destroy rather than merge the current build context if there is any
restoreFromContinuationData
{ "repo_name": "jwagenleitner/groovy", "path": "src/main/groovy/groovy/util/FactoryBuilderSupport.java", "license": "apache-2.0", "size": 51621 }
[ "java.util.LinkedList", "java.util.Map" ]
import java.util.LinkedList; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
523,863
protected Button createActionButton(Collection<Artifact> inputs, Collection<Artifact> outputs) { Button button = new Button(); registerAction(new TestAction(button, inputs, outputs)); return button; }
Button function(Collection<Artifact> inputs, Collection<Artifact> outputs) { Button button = new Button(); registerAction(new TestAction(button, inputs, outputs)); return button; }
/** * Creates a TestAction from 'inputs' to 'outputs', and a new button, such * that executing the action causes the button to be pressed. The button is * returned. */
Creates a TestAction from 'inputs' to 'outputs', and a new button, such that executing the action causes the button to be pressed. The button is returned
createActionButton
{ "repo_name": "aehlig/bazel", "path": "src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java", "license": "apache-2.0", "size": 23697 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.actions.util.TestAction", "java.util.Collection" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.util.TestAction; import java.util.Collection;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.actions.util.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
724,971
public Set<GeographicPoint> getVertices() { Set<GeographicPoint> vertices = new HashSet<>(); for (GeographicPoint gp : adjacencyList.keySet()) { vertices.add(gp); } return vertices; }
Set<GeographicPoint> function() { Set<GeographicPoint> vertices = new HashSet<>(); for (GeographicPoint gp : adjacencyList.keySet()) { vertices.add(gp); } return vertices; }
/** * Return the intersections, which are the vertices in this graph. * * @return The vertices in this graph as GeographicPoints */
Return the intersections, which are the vertices in this graph
getVertices
{ "repo_name": "kentcollins/UCSDGraphs", "path": "src/roadgraph/MapGraph.java", "license": "apache-2.0", "size": 17178 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
186,369
@SimpleFunction(description = "Checks whether the Bluetooth device with the specified address " + "is paired.") public boolean IsDevicePaired(String address) { String functionName = "IsDevicePaired"; Object bluetoothAdapter = BluetoothReflection.getBluetoothAdapter(); if (bluetoothAdapter == null) { ...
@SimpleFunction(description = STR + STR) boolean function(String address) { String functionName = STR; Object bluetoothAdapter = BluetoothReflection.getBluetoothAdapter(); if (bluetoothAdapter == null) { form.dispatchErrorOccurredEvent(this, functionName, ErrorMessages.ERROR_BLUETOOTH_NOT_AVAILABLE); return false; } if...
/** * Checks whether the Bluetooth device with the given address is paired. * * @param address the MAC address of the Bluetooth device * @return true if the device is paired, false otherwise */
Checks whether the Bluetooth device with the given address is paired
IsDevicePaired
{ "repo_name": "niteshmourya/app-inventor-for-android", "path": "src/components/runtime/components/android/BluetoothClient.java", "license": "apache-2.0", "size": 10527 }
[ "com.google.devtools.simple.runtime.annotations.SimpleFunction", "com.google.devtools.simple.runtime.components.android.util.BluetoothReflection", "com.google.devtools.simple.runtime.components.util.ErrorMessages" ]
import com.google.devtools.simple.runtime.annotations.SimpleFunction; import com.google.devtools.simple.runtime.components.android.util.BluetoothReflection; import com.google.devtools.simple.runtime.components.util.ErrorMessages;
import com.google.devtools.simple.runtime.annotations.*; import com.google.devtools.simple.runtime.components.android.util.*; import com.google.devtools.simple.runtime.components.util.*;
[ "com.google.devtools" ]
com.google.devtools;
503,827
private void removeApp(String removeAppId, boolean safeRemove, Set<ApplicationAttemptId> attempts) throws Exception { String appIdRemovePath = getLeafAppIdNodePath(removeAppId, false); int splitIndex = appIdNodeSplitIndex; // Look for paths based on other split indices if path as per configured ...
void function(String removeAppId, boolean safeRemove, Set<ApplicationAttemptId> attempts) throws Exception { String appIdRemovePath = getLeafAppIdNodePath(removeAppId, false); int splitIndex = appIdNodeSplitIndex; if (!exists(appIdRemovePath)) { AppNodeSplitInfo alternatePathInfo = getAlternatePath(removeAppId); if (al...
/** * Remove application node and its attempt nodes. * * @param removeAppId Application Id to be removed. * @param safeRemove Flag indicating if application and attempt nodes have to * be removed safely under a fencing or not. * @param attempts list of attempts to be removed associated with this a...
Remove application node and its attempt nodes
removeApp
{ "repo_name": "legend-hua/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java", "license": "apache-2.0", "size": 49576 }
[ "java.util.Set", "org.apache.hadoop.yarn.api.records.ApplicationAttemptId" ]
import java.util.Set; import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import java.util.*; import org.apache.hadoop.yarn.api.records.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
531,337
public Message getPendingMessage(String resourceName, Partition partition, String instanceName) { return getStateMessage(resourceName, partition, instanceName, _pendingMessageMap); }
Message function(String resourceName, Partition partition, String instanceName) { return getStateMessage(resourceName, partition, instanceName, _pendingMessageMap); }
/** * given (resource, partition, instance), returns pending message on this instance. * @param resourceName * @param partition * @param instanceName * @return pending message */
given (resource, partition, instance), returns pending message on this instance
getPendingMessage
{ "repo_name": "dasahcc/helix", "path": "helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateOutput.java", "license": "apache-2.0", "size": 18335 }
[ "org.apache.helix.model.Message", "org.apache.helix.model.Partition" ]
import org.apache.helix.model.Message; import org.apache.helix.model.Partition;
import org.apache.helix.model.*;
[ "org.apache.helix" ]
org.apache.helix;
728,339
public static Map<String, Class<?>> allArguments() { return Collections.unmodifiableMap(VALID_ARGUMENTS); }
static Map<String, Class<?>> function() { return Collections.unmodifiableMap(VALID_ARGUMENTS); }
/** * Get argument types and names used by all methods. * * @return map with argument names as keys, and types as values */
Get argument types and names used by all methods
allArguments
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-facebook/src/main/java/org/apache/camel/component/facebook/data/FacebookMethodsTypeHelper.java", "license": "apache-2.0", "size": 15572 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,520,509
public static RecentJobStatus checkValueOf(String name) { name = Val.chkStr(name); for (RecentJobStatus s : values()) { if (s.name().equalsIgnoreCase(name)) { return s; } } LogUtil.getLogger().log(Level.SEVERE, "Invalid JobStatus value: {0}", name); return RecentJobStatus.Unavailable; }...
static RecentJobStatus function(String name) { name = Val.chkStr(name); for (RecentJobStatus s : values()) { if (s.name().equalsIgnoreCase(name)) { return s; } } LogUtil.getLogger().log(Level.SEVERE, STR, name); return RecentJobStatus.Unavailable; }
/** * Checks recent job status. * @param name status name. * @return status or <code>Unavailable</code> if unknown status. */
Checks recent job status
checkValueOf
{ "repo_name": "usgin/usgin-geoportal", "path": "src/com/esri/gpt/catalog/harvest/repository/HrRecord.java", "license": "apache-2.0", "size": 17972 }
[ "com.esri.gpt.framework.util.LogUtil", "com.esri.gpt.framework.util.Val", "java.util.logging.Level" ]
import com.esri.gpt.framework.util.LogUtil; import com.esri.gpt.framework.util.Val; import java.util.logging.Level;
import com.esri.gpt.framework.util.*; import java.util.logging.*;
[ "com.esri.gpt", "java.util" ]
com.esri.gpt; java.util;
732,199
private int getScrollRange() { int scrollRange = 0; if (getChildCount() > 0) { View child = getChildAt(0); scrollRange = Math.max(0, child.getHeight() - (getHeight() - getPaddingBottom() - getPaddingTop())); } return scrollRange; } }
int function() { int scrollRange = 0; if (getChildCount() > 0) { View child = getChildAt(0); scrollRange = Math.max(0, child.getHeight() - (getHeight() - getPaddingBottom() - getPaddingTop())); } return scrollRange; } }
/** * Taken from the AOSP ScrollView source */
Taken from the AOSP ScrollView source
getScrollRange
{ "repo_name": "ikantech/IkantechSupport", "path": "src/com/handmark/pulltorefresh/library/PullToRefreshScrollView.java", "license": "gpl-2.0", "size": 3406 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,781,753
// test both even and odd images for( int makeOdd = 0; makeOdd <= 1; makeOdd++ ) { GrayF32 orig = new GrayF32(width-makeOdd,height-makeOdd); GrayF32 tran = new GrayF32(width,height); GrayF32 rev = new GrayF32(width-makeOdd,height-makeOdd); IMO.fillUniform(orig,rand,0,50); BorderIndex1D border = wav...
for( int makeOdd = 0; makeOdd <= 1; makeOdd++ ) { GrayF32 orig = new GrayF32(width-makeOdd,height-makeOdd); GrayF32 tran = new GrayF32(width,height); GrayF32 rev = new GrayF32(width-makeOdd,height-makeOdd); IMO.fillUniform(orig,rand,0,50); BorderIndex1D border = waveletDesc.getBorder(); ImplWaveletTransformNaive.horizo...
/** * See if the provided wavelets can be used to transform the image and change it back without error * * @param waveletDesc The wavelet being tested */
See if the provided wavelets can be used to transform the image and change it back without error
checkEncodeDecode_F32
{ "repo_name": "bladestery/Sapphire", "path": "example_apps/AndroidStudioMinnie/sapphire/src/main/java/boofcv/alg/transform/wavelet/CommonFactoryWavelet.java", "license": "mit", "size": 9264 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,663,716
public void print(Object obj) throws IOException { write(String.valueOf(obj)); }
void function(Object obj) throws IOException { write(String.valueOf(obj)); }
/** * Print an object. The string produced by the <code>{@link * java.lang.String#valueOf(Object)}</code> method is translated into bytes * according to the platform's default character encoding, and these bytes * are written in exactly the manner of the <code>{@link #write(int)}</code> * meth...
Print an object. The string produced by the <code><code>java.lang.String#valueOf(Object)</code></code> method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the <code><code>#write(int)</code></code> method
print
{ "repo_name": "apache/velocity-tools", "path": "velocity-tools-view-jsp/src/main/java/org/apache/velocity/tools/view/jsp/jspimpl/JspWriterImpl.java", "license": "apache-2.0", "size": 12620 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,873,094
public FSArray getTokens() { if (QuestionTokens_Type.featOkTst && ((QuestionTokens_Type)jcasType).casFeat_tokens == null) jcasType.jcas.throwFeatMissing("tokens", "edu.cmu.deiis.types.QuestionTokens"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((QuestionTokens_...
FSArray function() { if (QuestionTokens_Type.featOkTst && ((QuestionTokens_Type)jcasType).casFeat_tokens == null) jcasType.jcas.throwFeatMissing(STR, STR); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((QuestionTokens_Type)jcasType).casFeatCode_tokens)));}
/** getter for tokens - gets The tokens in a specific question. Since usually one JCas usually holds one question, there is no need to hold an Question in it. * @generated */
getter for tokens - gets The tokens in a specific question. Since usually one JCas usually holds one question, there is no need to hold an Question in it
getTokens
{ "repo_name": "JerrySun363/hw2-chens1", "path": "hw2-chens1/src/main/java/edu/cmu/deiis/types/QuestionTokens.java", "license": "gpl-2.0", "size": 4461 }
[ "org.apache.uima.jcas.cas.FSArray" ]
import org.apache.uima.jcas.cas.FSArray;
import org.apache.uima.jcas.cas.*;
[ "org.apache.uima" ]
org.apache.uima;
2,572,597
@Test public void testGenerateCredential_defaultTransport() throws Exception { OfflineCredentials offlineCredentials = new OfflineCredentials.Builder(oAuth2Helper) .forApi(OfflineCredentials.Api.DFP) .withClientSecrets("clientId", "clientSecret") .withRefreshToken("refreshToken") ...
void function() throws Exception { OfflineCredentials offlineCredentials = new OfflineCredentials.Builder(oAuth2Helper) .forApi(OfflineCredentials.Api.DFP) .withClientSecrets(STR, STR) .withRefreshToken(STR) .build(); when(oAuth2Helper.callRefreshToken(Mockito.<Credential>anyObject())).thenReturn(true); Credential cred...
/** * Tests generating OAuth2 credentials. */
Tests generating OAuth2 credentials
testGenerateCredential_defaultTransport
{ "repo_name": "gawkermedia/googleads-java-lib", "path": "modules/ads_lib/src/test/java/com/google/api/ads/common/lib/auth/OfflineCredentialsTest.java", "license": "apache-2.0", "size": 17200 }
[ "com.google.api.ads.common.lib.auth.OfflineCredentials", "com.google.api.client.auth.oauth2.ClientParametersAuthentication", "com.google.api.client.auth.oauth2.Credential", "org.junit.Assert", "org.mockito.Mockito" ]
import com.google.api.ads.common.lib.auth.OfflineCredentials; import com.google.api.client.auth.oauth2.ClientParametersAuthentication; import com.google.api.client.auth.oauth2.Credential; import org.junit.Assert; import org.mockito.Mockito;
import com.google.api.ads.common.lib.auth.*; import com.google.api.client.auth.oauth2.*; import org.junit.*; import org.mockito.*;
[ "com.google.api", "org.junit", "org.mockito" ]
com.google.api; org.junit; org.mockito;
2,383,501
public InputProcessor getInputProcessor() { return this.inputProcessor; }
InputProcessor function() { return this.inputProcessor; }
/** * Returns the input processor of this gui manager instance. * * @return */
Returns the input processor of this gui manager instance
getInputProcessor
{ "repo_name": "kennux/jcubicworld", "path": "core/src/net/kennux/cubicworld/gui/GuiManager.java", "license": "gpl-3.0", "size": 6207 }
[ "com.badlogic.gdx.InputProcessor" ]
import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
1,615,889
IgniteUuid classLoaderId() { return clsLdrId; }
IgniteUuid classLoaderId() { return clsLdrId; }
/** * Gets property clsLdrId. * * @return Property clsLdrId. */
Gets property clsLdrId
classLoaderId
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMetadata.java", "license": "apache-2.0", "size": 6314 }
[ "org.apache.ignite.lang.IgniteUuid" ]
import org.apache.ignite.lang.IgniteUuid;
import org.apache.ignite.lang.*;
[ "org.apache.ignite" ]
org.apache.ignite;
458,245
public static void findResource( String host, String resourceUri, EnumSet<OcConnectivityType> connectivityTypeSet, OnResourceFoundListener onResourceFoundListener, QualityOfService qualityOfService) throws OcException { OcPlatform.initCheck(); ...
static void function( String host, String resourceUri, EnumSet<OcConnectivityType> connectivityTypeSet, OnResourceFoundListener onResourceFoundListener, QualityOfService qualityOfService) throws OcException { OcPlatform.initCheck(); int connTypeInt = 0; for (OcConnectivityType connType : OcConnectivityType.values()) { ...
/** * API for Service and Resource Discovery. * <p> * Note: This API is for client side only. * </p> * * @param host Host IP Address of a service to direct resource discovery query. * If empty, performs multicast resource discovery que...
API for Service and Resource Discovery. Note: This API is for client side only.
findResource
{ "repo_name": "iotivity/iotivity", "path": "java/iotivity-java/src/main/java/org/iotivity/base/OcPlatform.java", "license": "apache-2.0", "size": 48068 }
[ "java.util.EnumSet" ]
import java.util.EnumSet;
import java.util.*;
[ "java.util" ]
java.util;
280,829
public boolean setText(String value, int pickerIndex) throws MultipleElementsFoundException, UiElementFetchingException { String currentValue = pickerHelper.getNumberPickerFieldValue(pickerIndex); if (!value.equals(currentValue)) { if (!pickerHelper.setTextInNumberPi...
boolean function(String value, int pickerIndex) throws MultipleElementsFoundException, UiElementFetchingException { String currentValue = pickerHelper.getNumberPickerFieldValue(pickerIndex); if (!value.equals(currentValue)) { if (!pickerHelper.setTextInNumberPickerField(pickerIndex, value)) { return false; } } return t...
/** * Sets text in a picker editText field. * * @param value * - the text to input. * @param pickerIndex * - the index of the given picker editText field. * @return <code>true</code> if the method succeed, <code>false</code> if it fails. * @throws UiElementFetching...
Sets text in a picker editText field
setText
{ "repo_name": "MusalaSoft/atmosphere-client", "path": "src/main/java/com/musala/atmosphere/client/TimePicker.java", "license": "gpl-3.0", "size": 5617 }
[ "com.musala.atmosphere.client.exceptions.MultipleElementsFoundException", "com.musala.atmosphere.commons.exceptions.UiElementFetchingException" ]
import com.musala.atmosphere.client.exceptions.MultipleElementsFoundException; import com.musala.atmosphere.commons.exceptions.UiElementFetchingException;
import com.musala.atmosphere.client.exceptions.*; import com.musala.atmosphere.commons.exceptions.*;
[ "com.musala.atmosphere" ]
com.musala.atmosphere;
2,399,955
public InputStream getArtifactInputStream(String artifact, String version, final String defaultUrl) throws IOException { final var url = getArtifactUrl(artifact, version, defaultUrl); log.info("Resolved remote URL is {}", url); return new URL(url).openStream(); }
InputStream function(String artifact, String version, final String defaultUrl) throws IOException { final var url = getArtifactUrl(artifact, version, defaultUrl); log.info(STR, url); return new URL(url).openStream(); }
/** * Return the input stream from the remote URL. * * @param artifact * The Maven artifact identifier and also corresponding to the plug-in simple name. * @param version * The version to install. * @param defaultUrl * The default artifact base URL. * @return The opene...
Return the input stream from the remote URL
getArtifactInputStream
{ "repo_name": "ligoj/bootstrap", "path": "bootstrap-plugin/src/main/java/org/ligoj/bootstrap/resource/system/plugin/repository/AbstractRemoteRepositoryManager.java", "license": "mit", "size": 3320 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,178,345
public CompositeCounter build(String baseName, String baseDescription, Unit<?> unit) { List<Counter> counters = getSubCounters(baseName, baseDescription, unit); return new CompositeCounter(counters); }
CompositeCounter function(String baseName, String baseDescription, Unit<?> unit) { List<Counter> counters = getSubCounters(baseName, baseDescription, unit); return new CompositeCounter(counters); }
/** * Builds a new {@link CompositeCounter}, comprised of TimeWindowCounters, * and registers {@link PollingMonitoredValue}s to detect changes in their * values. * * @param baseName * the base name of the new MonitoredValues, which will have the * window name, e.g. ".60s", appended ...
Builds a new <code>CompositeCounter</code>, comprised of TimeWindowCounters, and registers <code>PollingMonitoredValue</code>s to detect changes in their values
build
{ "repo_name": "performancecopilot/parfait", "path": "parfait-core/src/main/java/io/pcp/parfait/TimeWindowCounterBuilder.java", "license": "apache-2.0", "size": 4961 }
[ "java.util.List", "javax.measure.Unit" ]
import java.util.List; import javax.measure.Unit;
import java.util.*; import javax.measure.*;
[ "java.util", "javax.measure" ]
java.util; javax.measure;
2,033,301
//----------------------------------------------------------------------- static void writeEpochSec(long epochSec, DataOutput out) throws IOException { if (epochSec >= -4575744000L && epochSec < 10413792000L && epochSec % 900 == 0) { // quarter hours between 1825 and 2300 int store = (int)...
static void writeEpochSec(long epochSec, DataOutput out) throws IOException { if (epochSec >= -4575744000L && epochSec < 10413792000L && epochSec % 900 == 0) { int store = (int) ((epochSec + 4575744000L) / 900); out.writeByte((store >>> 16) & 255); out.writeByte((store >>> 8) & 255); out.writeByte(store & 255); } else ...
/** * Writes the state to the stream. * * @param epochSec the epoch seconds, not null * @param out the output stream, not null * @throws IOException if an error occurs */
Writes the state to the stream
writeEpochSec
{ "repo_name": "karianna/jdk8_tl", "path": "jdk/src/share/classes/java/time/zone/Ser.java", "license": "gpl-2.0", "size": 9206 }
[ "java.io.DataOutput", "java.io.IOException" ]
import java.io.DataOutput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,310,816
public void setAddressCollection(Collection<Address> addressCollection){ this.addressCollection = addressCollection; }
void function(Collection<Address> addressCollection){ this.addressCollection = addressCollection; }
/** * Sets the value of addressCollection attribue **/
Sets the value of addressCollection attribue
setAddressCollection
{ "repo_name": "NCIP/cagrid2", "path": "cagrid-mms/cagrid-mms-cadsr-impl/src/main/java/gov/nih/nci/cadsr/domain/Organization.java", "license": "bsd-3-clause", "size": 6005 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,333,260
private RateLimiter getRateLimiter(RepositorySettings repositorySettings, String setting, ByteSizeValue defaultRate) { ByteSizeValue maxSnapshotBytesPerSec = repositorySettings.settings().getAsBytesSize(setting, settings.getAsBytesSize(setting, defaultRate)); if (maxSnapshotBytesPerS...
RateLimiter function(RepositorySettings repositorySettings, String setting, ByteSizeValue defaultRate) { ByteSizeValue maxSnapshotBytesPerSec = repositorySettings.settings().getAsBytesSize(setting, settings.getAsBytesSize(setting, defaultRate)); if (maxSnapshotBytesPerSec.bytes() <= 0) { return null; } else { return ne...
/** * Configures RateLimiter based on repository and global settings * * @param repositorySettings repository settings * @param setting setting to use to configure rate limiter * @param defaultRate default limiting rate * @return rate limiter or null of no throttling is n...
Configures RateLimiter based on repository and global settings
getRateLimiter
{ "repo_name": "strapdata/elassandra-test", "path": "core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java", "license": "apache-2.0", "size": 28590 }
[ "org.apache.lucene.store.RateLimiter", "org.elasticsearch.common.unit.ByteSizeValue", "org.elasticsearch.repositories.RepositorySettings" ]
import org.apache.lucene.store.RateLimiter; import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.repositories.RepositorySettings;
import org.apache.lucene.store.*; import org.elasticsearch.common.unit.*; import org.elasticsearch.repositories.*;
[ "org.apache.lucene", "org.elasticsearch.common", "org.elasticsearch.repositories" ]
org.apache.lucene; org.elasticsearch.common; org.elasticsearch.repositories;
878,098
public void testBasicSubmitWithBundleId() throws Exception { BundleJobBean coordJob = addRecordToBundleJobTable(Job.Status.PREP, false); Configuration conf = new XConfiguration(); String appPath = "file://" + getTestCaseDir() + File.separator + "coordinator.xml"; String appXml = "<co...
void function() throws Exception { BundleJobBean coordJob = addRecordToBundleJobTable(Job.Status.PREP, false); Configuration conf = new XConfiguration(); String appPath = STR<coordinator-app name=\"NAME\" frequency=\STR start=\STR end=\STR timezone=\"UTC\" STRxmlns=\STR> <controls> <concurrency>2</concurrency> STR<exec...
/** * Basic coordinator submit test with bundleId * * @throws Exception */
Basic coordinator submit test with bundleId
testBasicSubmitWithBundleId
{ "repo_name": "terrancesnyder/oozie-hadoop2", "path": "core/src/test/java/org/apache/oozie/command/coord/TestCoordSubmitXCommand.java", "license": "apache-2.0", "size": 54061 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.oozie.BundleJobBean", "org.apache.oozie.CoordinatorJobBean", "org.apache.oozie.client.Job", "org.apache.oozie.client.OozieClient", "org.apache.oozie.util.XConfiguration" ]
import org.apache.hadoop.conf.Configuration; import org.apache.oozie.BundleJobBean; import org.apache.oozie.CoordinatorJobBean; import org.apache.oozie.client.Job; import org.apache.oozie.client.OozieClient; import org.apache.oozie.util.XConfiguration;
import org.apache.hadoop.conf.*; import org.apache.oozie.*; import org.apache.oozie.client.*; import org.apache.oozie.util.*;
[ "org.apache.hadoop", "org.apache.oozie" ]
org.apache.hadoop; org.apache.oozie;
1,945,499
@Test void testNoException() { GrayF32 input = new GrayF32(width, height); GrayF32 derivX = new GrayF32(width, height); GrayF32 derivY = new GrayF32(width, height); ImageGradient_SB<GrayF32, GrayF32> alg = new ImageGradient_SB.Sobel<>(GrayF32.class, GrayF32.class); alg.process(input, derivX, derivY); }
@Test void testNoException() { GrayF32 input = new GrayF32(width, height); GrayF32 derivX = new GrayF32(width, height); GrayF32 derivY = new GrayF32(width, height); ImageGradient_SB<GrayF32, GrayF32> alg = new ImageGradient_SB.Sobel<>(GrayF32.class, GrayF32.class); alg.process(input, derivX, derivY); }
/** * See if it throws an exception or not */
See if it throws an exception or not
testNoException
{ "repo_name": "lessthanoptimal/BoofCV", "path": "main/boofcv-ip/src/test/java/boofcv/abst/filter/derivative/TestImageGradient_SB.java", "license": "apache-2.0", "size": 1332 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
2,589,723
public static ModelAndView<DisplayBitcoinAddressModel, DisplayBitcoinAddressView> newDisplayBitcoinAddressMaV(final String bitcoinAddress) { DisplayBitcoinAddressModel model = new DisplayBitcoinAddressModel(bitcoinAddress); DisplayBitcoinAddressView view = new DisplayBitcoinAddressView(model); return ne...
static ModelAndView<DisplayBitcoinAddressModel, DisplayBitcoinAddressView> function(final String bitcoinAddress) { DisplayBitcoinAddressModel model = new DisplayBitcoinAddressModel(bitcoinAddress); DisplayBitcoinAddressView view = new DisplayBitcoinAddressView(model); return new ModelAndView<>(model, view); }
/** * <p>A "display Bitcoin address" model and view displays a Bitcoin address with the following features:</p> * <ul> * <li>Non-editable text field showing the address</li> * <li>Button to copy the address to the Clipboard</li> * </ul> * * @param bitcoinAddress The Bitcoin address * * @retur...
A "display Bitcoin address" model and view displays a Bitcoin address with the following features: Non-editable text field showing the address Button to copy the address to the Clipboard
newDisplayBitcoinAddressMaV
{ "repo_name": "oscarguindzberg/multibit-hd", "path": "mbhd-swing/src/main/java/org/multibit/hd/ui/views/components/Components.java", "license": "mit", "size": 12237 }
[ "org.multibit.hd.ui.views.components.display_address.DisplayBitcoinAddressModel", "org.multibit.hd.ui.views.components.display_address.DisplayBitcoinAddressView" ]
import org.multibit.hd.ui.views.components.display_address.DisplayBitcoinAddressModel; import org.multibit.hd.ui.views.components.display_address.DisplayBitcoinAddressView;
import org.multibit.hd.ui.views.components.display_address.*;
[ "org.multibit.hd" ]
org.multibit.hd;
1,619,960
@Generated @Selector("disableProfile:onChannel:error:") public native boolean disableProfileOnChannelError(MIDICIProfile profile, byte channel, @ReferenceInfo(type = NSError.class) Ptr<NSError> outError);
@Selector(STR) native boolean function(MIDICIProfile profile, byte channel, @ReferenceInfo(type = NSError.class) Ptr<NSError> outError);
/** * Given a MIDI channel number, asynchronously request that the supplied profile be disabled. * The result of this operation is sent to the MIDICIProfileChangedBlock. * Returnes YES if the request is valid. */
Given a MIDI channel number, asynchronously request that the supplied profile be disabled. The result of this operation is sent to the MIDICIProfileChangedBlock. Returnes YES if the request is valid
disableProfileOnChannelError
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/coremidi/MIDICISession.java", "license": "apache-2.0", "size": 11059 }
[ "org.moe.natj.general.ann.ReferenceInfo", "org.moe.natj.general.ptr.Ptr", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.ReferenceInfo; import org.moe.natj.general.ptr.Ptr; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.general.ptr.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,704,050
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) public List<MailConfigsEntity> physicalSelectAll() { return physicalSelectAll(Order.DESC); }
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) List<MailConfigsEntity> function() { return physicalSelectAll(Order.DESC); }
/** * Select all data. * @return all data */
Select all data
physicalSelectAll
{ "repo_name": "support-project/knowledge", "path": "src/main/java/org/support/project/web/dao/gen/GenMailConfigsDao.java", "license": "apache-2.0", "size": 17202 }
[ "java.util.List", "org.support.project.aop.Aspect", "org.support.project.ormapping.config.Order", "org.support.project.web.entity.MailConfigsEntity" ]
import java.util.List; import org.support.project.aop.Aspect; import org.support.project.ormapping.config.Order; import org.support.project.web.entity.MailConfigsEntity;
import java.util.*; import org.support.project.aop.*; import org.support.project.ormapping.config.*; import org.support.project.web.entity.*;
[ "java.util", "org.support.project" ]
java.util; org.support.project;
1,267,161
@Override public QualifiedTypeMirror<Regex> visitBinary(BinaryTree tree, ExtendedTypeMirror type) { QualifiedTypeMirror<Regex> result = super.visitBinary(tree, type); Regex lRegex = getEffectiveQualifier(getQualifiedType(tree.getLeftOperand())); R...
QualifiedTypeMirror<Regex> function(BinaryTree tree, ExtendedTypeMirror type) { QualifiedTypeMirror<Regex> result = super.visitBinary(tree, type); Regex lRegex = getEffectiveQualifier(getQualifiedType(tree.getLeftOperand())); Regex rRegex = getEffectiveQualifier(getQualifiedType(tree.getRightOperand())); return handleB...
/** * Handle concatenation of Regex or PolyRegex String/char literals. * Also handles concatenation of partial regular expressions. */
Handle concatenation of Regex or PolyRegex String/char literals. Also handles concatenation of partial regular expressions
visitBinary
{ "repo_name": "biddyweb/checker-framework", "path": "checker/src/org/checkerframework/checker/experimental/regex_qual/RegexQualifiedTypeFactory.java", "license": "gpl-2.0", "size": 11393 }
[ "com.sun.source.tree.BinaryTree", "org.checkerframework.qualframework.base.QualifiedTypeMirror", "org.checkerframework.qualframework.util.ExtendedTypeMirror" ]
import com.sun.source.tree.BinaryTree; import org.checkerframework.qualframework.base.QualifiedTypeMirror; import org.checkerframework.qualframework.util.ExtendedTypeMirror;
import com.sun.source.tree.*; import org.checkerframework.qualframework.base.*; import org.checkerframework.qualframework.util.*;
[ "com.sun.source", "org.checkerframework.qualframework" ]
com.sun.source; org.checkerframework.qualframework;
1,533,281
public static Resource PolyphyleticGroup() { return _namespace_CDAO("CDAO_0000051"); }
static Resource function() { return _namespace_CDAO(STR); }
/** * -- No comment or description provided. -- * (http://purl.obolibrary.org/obo/CDAO_0000051) */
-- No comment or description provided. -- (HREF)
PolyphyleticGroup
{ "repo_name": "BioInterchange/BioInterchange", "path": "supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/CDAO.java", "license": "mit", "size": 85675 }
[ "com.hp.hpl.jena.rdf.model.Resource" ]
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.*;
[ "com.hp.hpl" ]
com.hp.hpl;
1,656,178
@GwtIncompatible("To be supported") CacheBuilder<K, V> keyEquivalence(Equivalence<Object> equivalence) { checkState(keyEquivalence == null, "key equivalence was already set to %s", keyEquivalence); keyEquivalence = checkNotNull(equivalence); return this; }
@GwtIncompatible(STR) CacheBuilder<K, V> keyEquivalence(Equivalence<Object> equivalence) { checkState(keyEquivalence == null, STR, keyEquivalence); keyEquivalence = checkNotNull(equivalence); return this; }
/** * Sets a custom {@code Equivalence} strategy for comparing keys. * * <p>By default, the cache uses {@link Equivalence#identity} to determine key equality when * {@link #weakKeys} is specified, and {@link Equivalence#equals()} otherwise. */
Sets a custom Equivalence strategy for comparing keys. By default, the cache uses <code>Equivalence#identity</code> to determine key equality when <code>#weakKeys</code> is specified, and <code>Equivalence#equals()</code> otherwise
keyEquivalence
{ "repo_name": "baratali/guava", "path": "guava/src/com/google/common/cache/CacheBuilder.java", "license": "apache-2.0", "size": 37942 }
[ "com.google.common.annotations.GwtIncompatible", "com.google.common.base.Equivalence", "com.google.common.base.Preconditions" ]
import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Equivalence; import com.google.common.base.Preconditions;
import com.google.common.annotations.*; import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,425,282
public static void main(String[] args) { SystemFailure.loadEmergencyClasses(); AgentConfigImpl ac; try { ac = new AgentConfigImpl(args); } catch (RuntimeException ex) { System.err .println(String.format("Failed reading configuration: %s", ex)); ExitCode.FATAL.doSystemExit(...
static void function(String[] args) { SystemFailure.loadEmergencyClasses(); AgentConfigImpl ac; try { ac = new AgentConfigImpl(args); } catch (RuntimeException ex) { System.err .println(String.format(STR, ex)); ExitCode.FATAL.doSystemExit(); return; } try { Agent agent = AgentFactory.getAgent(ac); agent.start(); } catc...
/** * Command-line main for running the GemFire Management Agent. * <p> * Accepts command-line arguments matching the options in {@link AgentConfig} and * {@link org.apache.geode.admin.DistributedSystemConfig}. * <p> * <code>AgentConfig</code> will convert -Jarguments to System properties. */
Command-line main for running the GemFire Management Agent. Accepts command-line arguments matching the options in <code>AgentConfig</code> and <code>org.apache.geode.admin.DistributedSystemConfig</code>. <code>AgentConfig</code> will convert -Jarguments to System properties
main
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java", "license": "apache-2.0", "size": 54615 }
[ "org.apache.geode.SystemFailure", "org.apache.geode.admin.jmx.Agent", "org.apache.geode.admin.jmx.AgentFactory", "org.apache.geode.internal.ExitCode" ]
import org.apache.geode.SystemFailure; import org.apache.geode.admin.jmx.Agent; import org.apache.geode.admin.jmx.AgentFactory; import org.apache.geode.internal.ExitCode;
import org.apache.geode.*; import org.apache.geode.admin.jmx.*; import org.apache.geode.internal.*;
[ "org.apache.geode" ]
org.apache.geode;
540,765
private JPanel getButtonPanel() { if (buttonPanel == null) { buttonPanel = new JPanel(); buttonPanel.setMaximumSize(new Dimension(305,40)); buttonPanel.setPreferredSize(buttonPanel.getMaximumSize()); buttonPanel.setMinimumSize(buttonPanel.getMaximumSize()); buttonPanel.setBackground(Color.whit...
JPanel function() { if (buttonPanel == null) { buttonPanel = new JPanel(); buttonPanel.setMaximumSize(new Dimension(305,40)); buttonPanel.setPreferredSize(buttonPanel.getMaximumSize()); buttonPanel.setMinimumSize(buttonPanel.getMaximumSize()); buttonPanel.setBackground(Color.white); buttonPanel.setLayout(new BoxLayout(...
/** * This method initializes buttonPanel * * @return javax.swing.JPanel */
This method initializes buttonPanel
getButtonPanel
{ "repo_name": "renespeck/Cugar", "path": "src/de/uni_leipzig/cugar/gui/LogPanel.java", "license": "gpl-2.0", "size": 4212 }
[ "java.awt.Color", "java.awt.Dimension", "javax.swing.BoxLayout", "javax.swing.JPanel" ]
import java.awt.Color; import java.awt.Dimension; import javax.swing.BoxLayout; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
388,166
private void login(final String callServerURL, final String domain, final boolean compressionEnabled) { final CidsAuthentification cidsAuth = new CidsAuthentification( callServerURL, domain, compressionEnabled, getConnectionContext()); ...
void function(final String callServerURL, final String domain, final boolean compressionEnabled) { final CidsAuthentification cidsAuth = new CidsAuthentification( callServerURL, domain, compressionEnabled, getConnectionContext()); final JXLoginPane login = new JXLoginPane(cidsAuth); final JXLoginPane.JXLoginDialog logi...
/** * DOCUMENT ME! * * @param callServerURL DOCUMENT ME! * @param domain DOCUMENT ME! * @param compressionEnabled DOCUMENT ME! */
DOCUMENT ME
login
{ "repo_name": "cismet/cids-navigator", "path": "src/main/java/de/cismet/cids/client/tools/RemoteLog4JConfigChangerDialog.java", "license": "gpl-3.0", "size": 15034 }
[ "de.cismet.tools.gui.StaticSwingTools", "java.awt.Frame", "org.jdesktop.swingx.JXLoginPane" ]
import de.cismet.tools.gui.StaticSwingTools; import java.awt.Frame; import org.jdesktop.swingx.JXLoginPane;
import de.cismet.tools.gui.*; import java.awt.*; import org.jdesktop.swingx.*;
[ "de.cismet.tools", "java.awt", "org.jdesktop.swingx" ]
de.cismet.tools; java.awt; org.jdesktop.swingx;
1,027,348
protected void trimToSize() { synchronized (sessions) { int size = sessions.size(); if (size > maximumSize) { int removals = size - maximumSize; Iterator<SSLSession> i = sessions.values().iterator(); do { SSLSession ...
void function() { synchronized (sessions) { int size = sessions.size(); if (size > maximumSize) { int removals = size - maximumSize; Iterator<SSLSession> i = sessions.values().iterator(); do { SSLSession session = i.next(); i.remove(); sessionRemoved(session); } while (--removals > 0); } } }
/** * Makes sure cache size is < maximumSize. */
Makes sure cache size is < maximumSize
trimToSize
{ "repo_name": "xdajog/samsung_sources_i927", "path": "libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AbstractSessionContext.java", "license": "gpl-2.0", "size": 8965 }
[ "java.util.Iterator", "javax.net.ssl.SSLSession" ]
import java.util.Iterator; import javax.net.ssl.SSLSession;
import java.util.*; import javax.net.ssl.*;
[ "java.util", "javax.net" ]
java.util; javax.net;
2,375,450
public static Object call(Class c, String methodName, Object param1) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException { Object params[] = {param1}; return call(c.newInstance(), methodName, params); }
static Object function(Class c, String methodName, Object param1) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException { Object params[] = {param1}; return call(c.newInstance(), methodName, params); }
/** * Run specified method from class with one parameter * * @param c class whose method will be runned * @param methodName name of the method to be runned * @param param1 first parameter to be used * @return Object with value returned by called method * @throws InstantiationException * @throws IllegalA...
Run specified method from class with one parameter
call
{ "repo_name": "mefi/JKuuza", "path": "src/main/java/com/github/mefi/jkuuza/analyzer/Reflector.java", "license": "apache-2.0", "size": 10438 }
[ "java.lang.reflect.InvocationTargetException" ]
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
836,572
public ImmutableList<String> getRustcTestFlags(String platform) { return ImmutableList.<String>builder() .addAll(getRustCompilerFlags(platform)) .addAll(getCompilerFlags(platform, RUSTC_TEST_FLAGS)) .build(); }
ImmutableList<String> function(String platform) { return ImmutableList.<String>builder() .addAll(getRustCompilerFlags(platform)) .addAll(getCompilerFlags(platform, RUSTC_TEST_FLAGS)) .build(); }
/** * Get rustc flags for rust_test() rules. * * @return List of rustc_test_flags, as well as common rustc_flags. */
Get rustc flags for rust_test() rules
getRustcTestFlags
{ "repo_name": "rmaz/buck", "path": "src/com/facebook/buck/features/rust/RustBuckConfig.java", "license": "apache-2.0", "size": 8055 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,501,694
@Column(name = "fulltext", nullable = false) public Object getFulltext() { return (Object) getValue(13); } // ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- /** * {@inheritDo...
@Column(name = STR, nullable = false) Object function() { return (Object) getValue(13); } /** * {@inheritDoc}
/** * Getter for <code>public.film.fulltext</code>. */
Getter for <code>public.film.fulltext</code>
getFulltext
{ "repo_name": "mesan/fag-ark-persistering-test-jooq", "path": "fag-ark-persistering-test-jooq-spring/src/main/java/no/mesan/ark/persistering/generated/tables/records/FilmRecord.java", "license": "unlicense", "size": 12941 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,983,514
public static void main(String[] args) throws UnsupportedLookAndFeelException { LookAndFeelManager.setDefaultLookAndFeel(); Application.launch(VdViewer.class, args); }
static void function(String[] args) throws UnsupportedLookAndFeelException { LookAndFeelManager.setDefaultLookAndFeel(); Application.launch(VdViewer.class, args); }
/** * Start the application. * * @param args - the command line arguments * @throws UnsupportedLookAndFeelException */
Start the application
main
{ "repo_name": "selfbus/development-tools", "path": "sbtools-vdviewer/src/main/java/org/selfbus/sbtools/vdviewer/VdViewer.java", "license": "gpl-3.0", "size": 12733 }
[ "javax.swing.UnsupportedLookAndFeelException", "org.jdesktop.application.Application", "org.selfbus.sbtools.common.gui.misc.LookAndFeelManager" ]
import javax.swing.UnsupportedLookAndFeelException; import org.jdesktop.application.Application; import org.selfbus.sbtools.common.gui.misc.LookAndFeelManager;
import javax.swing.*; import org.jdesktop.application.*; import org.selfbus.sbtools.common.gui.misc.*;
[ "javax.swing", "org.jdesktop.application", "org.selfbus.sbtools" ]
javax.swing; org.jdesktop.application; org.selfbus.sbtools;
1,176,517
public XmlWriter endEntity() throws IOException { if (mStack.size() == 0) { throw new InvalidObjectException("Called endEntity too many times. "); } String name = mStack.pop(); if (mEmpty) { writeAttributes(); mWriter.write("/>\n"); } else ...
XmlWriter function() throws IOException { if (mStack.size() == 0) { throw new InvalidObjectException(STR); } String name = mStack.pop(); if (mEmpty) { writeAttributes(); mWriter.write("/>\n"); } else { if (!mJustWroteText) { for (int tabIndex = 0; tabIndex < mStack.size() + mIndentingOffset; tabIndex++) mWriter.write(I...
/** * End the current entity. This will throw an exception if it is called when there is not a * currently open entity. */
End the current entity. This will throw an exception if it is called when there is not a currently open entity
endEntity
{ "repo_name": "AnySoftKeyboard/AnySoftKeyboard", "path": "ime/base/src/main/java/com/anysoftkeyboard/utils/XmlWriter.java", "license": "apache-2.0", "size": 7596 }
[ "java.io.IOException", "java.io.InvalidObjectException" ]
import java.io.IOException; import java.io.InvalidObjectException;
import java.io.*;
[ "java.io" ]
java.io;
478,467
public void printPattern(int[] index, int offset) { int size = index.length; for (int i = 0; i < size; ++i) format(Locale.ENGLISH, "%10d\n", index[i] + offset); }
void function(int[] index, int offset) { int size = index.length; for (int i = 0; i < size; ++i) format(Locale.ENGLISH, STR, index[i] + offset); }
/** * Prints the coordinates to the underlying stream. One index on each line. * The offset is added to each index, typically, this can transform from a * 0-based indicing to a 1-based. */
Prints the coordinates to the underlying stream. One index on each line. The offset is added to each index, typically, this can transform from a 0-based indicing to a 1-based
printPattern
{ "repo_name": "jpalves/matrix-toolkits-java", "path": "src/main/java/no/uib/cipr/matrix/io/MatrixVectorWriter.java", "license": "lgpl-3.0", "size": 19039 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,730,698
public void sendSystem(GridNioSession ses, Message msg) throws IgniteCheckedException { sendSystem(ses, msg, null); }
void function(GridNioSession ses, Message msg) throws IgniteCheckedException { sendSystem(ses, msg, null); }
/** * Adds message at the front of the queue without acquiring back pressure semaphore. * * @param ses Session. * @param msg Message. * @throws IgniteCheckedException If session was closed. */
Adds message at the front of the queue without acquiring back pressure semaphore
sendSystem
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java", "license": "apache-2.0", "size": 144624 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.plugin.extensions.communication.Message" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.*; import org.apache.ignite.plugin.extensions.communication.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,543,964
protected DiscreteCalcAndArguments assignCalcObjectDiscrete() throws Exception { int base; try { String basePropValueStr = propertyValues.get(DISCRETE_PROPNAME_BASE); base = Integer.parseInt(basePropValueStr); } catch (Exception ex) { JOptionPane.showMessageDialog(this, ex.getMessage()); resul...
DiscreteCalcAndArguments function() throws Exception { int base; try { String basePropValueStr = propertyValues.get(DISCRETE_PROPNAME_BASE); base = Integer.parseInt(basePropValueStr); } catch (Exception ex) { JOptionPane.showMessageDialog(this, ex.getMessage()); resultsLabel.setText(STR + DISCRETE_PROPNAME_BASE); retur...
/** * Method to assign and initialise our discrete calculator class */
Method to assign and initialise our discrete calculator class
assignCalcObjectDiscrete
{ "repo_name": "pmediano/jidt", "path": "java/source/infodynamics/demos/autoanalysis/AutoAnalyserCMI.java", "license": "gpl-3.0", "size": 16693 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,735,058
public void write(char[] c) throws IOException { write(c, 0, c.length); }
void function(char[] c) throws IOException { write(c, 0, c.length); }
/** Write an array of char's. */
Write an array of char's
write
{ "repo_name": "jankotek/asterope", "path": "skyview/nom/tam/util/BufferedDataOutputStream.java", "license": "agpl-3.0", "size": 15435 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
544,750
void setResource(Resource value);
void setResource(Resource value);
/** * Sets the value of the * '{@link org.enterprisedomain.classmaker.ResourceAdapter#getResource * <em>Resource</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc --> * * @param value the new value of the '<em>Resource</em>' reference. * @see #getResource() * @generated */
Sets the value of the '<code>org.enterprisedomain.classmaker.ResourceAdapter#getResource Resource</code>' reference.
setResource
{ "repo_name": "enterpriseDomain/ClassMaker", "path": "bundles/org.enterprisedomain.classmaker/src/org/enterprisedomain/classmaker/ResourceAdapter.java", "license": "apache-2.0", "size": 4357 }
[ "org.eclipse.emf.ecore.resource.Resource" ]
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,644,217
AWSCredentialsProvider getCredentialsProvider(Map<PropertyDescriptor, String> properties);
AWSCredentialsProvider getCredentialsProvider(Map<PropertyDescriptor, String> properties);
/** * Creates an AWSCredentialsProvider instance for this strategy, given the properties defined by the user. */
Creates an AWSCredentialsProvider instance for this strategy, given the properties defined by the user
getCredentialsProvider
{ "repo_name": "YolandaMDavis/nifi", "path": "nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsStrategy.java", "license": "apache-2.0", "size": 3297 }
[ "com.amazonaws.auth.AWSCredentialsProvider", "java.util.Map", "org.apache.nifi.components.PropertyDescriptor" ]
import com.amazonaws.auth.AWSCredentialsProvider; import java.util.Map; import org.apache.nifi.components.PropertyDescriptor;
import com.amazonaws.auth.*; import java.util.*; import org.apache.nifi.components.*;
[ "com.amazonaws.auth", "java.util", "org.apache.nifi" ]
com.amazonaws.auth; java.util; org.apache.nifi;
2,563,129
public final Target getOriginalTargetable() { return targetToSave; }
final Target function() { return targetToSave; }
/** * Return the MTargetable object of this context without considering it's * timestamp. * * @return the MTargetable object of this context. */
Return the MTargetable object of this context without considering it's timestamp
getOriginalTargetable
{ "repo_name": "JoeyLeeuwinga/Firemox", "path": "src/main/java/net/sf/firemox/event/context/MContextTarget.java", "license": "gpl-2.0", "size": 5401 }
[ "net.sf.firemox.clickable.target.Target" ]
import net.sf.firemox.clickable.target.Target;
import net.sf.firemox.clickable.target.*;
[ "net.sf.firemox" ]
net.sf.firemox;
2,285,823
public ReferencePosition getReferencePosition() { if (refpos == null) { return DEFAULT_REFPOS; } return refpos; }
ReferencePosition function() { if (refpos == null) { return DEFAULT_REFPOS; } return refpos; }
/** * Get the reference position of this Region. * * @return the region reference position. */
Get the reference position of this Region
getReferencePosition
{ "repo_name": "opencadc/dal", "path": "cadc-dali/src/main/java/ca/nrc/cadc/stc/util/RegionFormat.java", "license": "agpl-3.0", "size": 8618 }
[ "ca.nrc.cadc.stc.ReferencePosition" ]
import ca.nrc.cadc.stc.ReferencePosition;
import ca.nrc.cadc.stc.*;
[ "ca.nrc.cadc" ]
ca.nrc.cadc;
2,078,503
public static FolderTransformer createFolderTransformer(List<Map<String, Object>> initList) { return new FolderTransformer(initList); }
static FolderTransformer function(List<Map<String, Object>> initList) { return new FolderTransformer(initList); }
/** * Creates a DBTransformer for Folder objects * @param initList List of DB results to be transformed * @return */
Creates a DBTransformer for Folder objects
createFolderTransformer
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/dotcms/util/transform/TransformerLocator.java", "license": "gpl-3.0", "size": 9294 }
[ "com.dotmarketing.portlets.folders.transform.FolderTransformer", "java.util.List", "java.util.Map" ]
import com.dotmarketing.portlets.folders.transform.FolderTransformer; import java.util.List; import java.util.Map;
import com.dotmarketing.portlets.folders.transform.*; import java.util.*;
[ "com.dotmarketing.portlets", "java.util" ]
com.dotmarketing.portlets; java.util;
2,572,874
try { Signer stampsig = Signer.loadFromFile(this.owner); return Arrays.areEqual(this.sign, this.calculateSign(stampsig, pil.getSign())); } catch (FileNotFoundException ex) { Stamp._log.log(Level.SEVERE, null, ex); throw new DecodeException("Error while open signer...
try { Signer stampsig = Signer.loadFromFile(this.owner); return Arrays.areEqual(this.sign, this.calculateSign(stampsig, pil.getSign())); } catch (FileNotFoundException ex) { Stamp._log.log(Level.SEVERE, null, ex); throw new DecodeException(STR + ex.getMessage()); } }
/** * Comprueba la firma digital de un sello. * @param pil Información del peregrino. * @return true si es correcta; false si es erronea. * @throws DecodeException * @throws EncodeException */
Comprueba la firma digital de un sello
checkStamp
{ "repo_name": "Reimashi/compostelas", "path": "es/uvigo/ssi/compostelas/Stamp.java", "license": "gpl-3.0", "size": 3441 }
[ "es.uvigo.ssi.compostelas.exceptions.DecodeException", "java.io.FileNotFoundException", "java.util.logging.Level", "org.bouncycastle.util.Arrays" ]
import es.uvigo.ssi.compostelas.exceptions.DecodeException; import java.io.FileNotFoundException; import java.util.logging.Level; import org.bouncycastle.util.Arrays;
import es.uvigo.ssi.compostelas.exceptions.*; import java.io.*; import java.util.logging.*; import org.bouncycastle.util.*;
[ "es.uvigo.ssi", "java.io", "java.util", "org.bouncycastle.util" ]
es.uvigo.ssi; java.io; java.util; org.bouncycastle.util;
2,145,166
@GET("api/v2/status") Call<ApiStatus> fetchApiStatus();
@GET(STR) Call<ApiStatus> fetchApiStatus();
/** * API Status Request * Get various metadata about the TBA API * @return Call&lt;ApiStatus&gt; */
API Status Request Get various metadata about the TBA API
fetchApiStatus
{ "repo_name": "phil-lopreiato/the-blue-alliance-android", "path": "android/src/main/java/com/thebluealliance/androidclient/api/call/TbaApiV2.java", "license": "mit", "size": 13491 }
[ "com.thebluealliance.androidclient.models.ApiStatus" ]
import com.thebluealliance.androidclient.models.ApiStatus;
import com.thebluealliance.androidclient.models.*;
[ "com.thebluealliance.androidclient" ]
com.thebluealliance.androidclient;
1,029,007
public RealSequence generate(double frequency, double duration, int amplitude, double phaseOffset) throws ProcessingException { // Do this calculation with BigDecimal, to avoid float error values like 44100.0000000001 getting rounded up to 44101. final int sequenceLength = BigDecimal.valueOf(durat...
RealSequence function(double frequency, double duration, int amplitude, double phaseOffset) throws ProcessingException { final int sequenceLength = BigDecimal.valueOf(duration).multiply(BigDecimal.valueOf(sampleRate)) .setScale(0, RoundingMode.CEILING).intValue(); final RealSequence sequence = new RealSequence(sequence...
/** * Generate a sine wave. * * @param frequency * Frequency of the sine wave, in Hertz * @param duration * Duration of the sine wave, in seconds. * @param phaseOffset * The phase offset, given in radians (0 - 2pi) * @return A sine w...
Generate a sine wave
generate
{ "repo_name": "spatula75/dspatula", "path": "src/main/java/net/spatula/dspatula/signal/sine/SineWaveSignalGenerator.java", "license": "apache-2.0", "size": 1954 }
[ "java.math.BigDecimal", "java.math.RoundingMode", "net.spatula.dspatula.concurrent.DiscreteSystemParallelExecutor", "net.spatula.dspatula.exception.ProcessingException", "net.spatula.dspatula.time.sequence.RealSequence" ]
import java.math.BigDecimal; import java.math.RoundingMode; import net.spatula.dspatula.concurrent.DiscreteSystemParallelExecutor; import net.spatula.dspatula.exception.ProcessingException; import net.spatula.dspatula.time.sequence.RealSequence;
import java.math.*; import net.spatula.dspatula.concurrent.*; import net.spatula.dspatula.exception.*; import net.spatula.dspatula.time.sequence.*;
[ "java.math", "net.spatula.dspatula" ]
java.math; net.spatula.dspatula;
1,386,266
private void closeConnection() { String itemName; if (api != null) { connected = api.close(); api.removeEventListener(this); } dscAlarmItemUpdate.setConnected(false); itemName = getItemName(DSCAlarmItemType.PANEL_CONNECTION, 0, 0); if (String...
void function() { String itemName; if (api != null) { connected = api.close(); api.removeEventListener(this); } dscAlarmItemUpdate.setConnected(false); itemName = getItemName(DSCAlarmItemType.PANEL_CONNECTION, 0, 0); if (StringUtils.isNotEmpty(itemName)) { updateItem(itemName, 0, STR); } logger.debug(STR, connectorType...
/** * Close TCP or Serial connection to the DSC Alarm Panel and remove the Event Listener */
Close TCP or Serial connection to the DSC Alarm Panel and remove the Event Listener
closeConnection
{ "repo_name": "TheNetStriker/openhab", "path": "bundles/binding/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm1/internal/DSCAlarmActiveBinding.java", "license": "epl-1.0", "size": 49190 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
860,706
protected void updateTime() { SwingUtilities.invokeLater(new Runnable() {
void function() { SwingUtilities.invokeLater(new Runnable() {
/** * Redraw the time col */
Redraw the time col
updateTime
{ "repo_name": "Akeshihiro/dsworkbench", "path": "Core/src/main/java/de/tor/tribes/ui/views/DSWorkbenchAttackFrame.java", "license": "apache-2.0", "size": 45306 }
[ "javax.swing.SwingUtilities" ]
import javax.swing.SwingUtilities;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,646,033