method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void appendToNalUnit(byte[] data, int offset, int limit) { if (!isFilling) { return; } int readLength = limit - offset; if (buffer.length < bufferLength + readLength) { buffer = Arrays.copyOf(buffer, (bufferLength + readLength) * 2); } System.arraycopy(data...
void function(byte[] data, int offset, int limit) { if (!isFilling) { return; } int readLength = limit - offset; if (buffer.length < bufferLength + readLength) { buffer = Arrays.copyOf(buffer, (bufferLength + readLength) * 2); } System.arraycopy(data, offset, buffer, bufferLength, readLength); bufferLength += readLengt...
/** * Called to pass stream data. The data passed should not include the 3 byte start code. * * @param data Holds the data being passed. * @param offset The offset of the data in {@code data}. * @param limit The limit (exclusive) of the data in {@code data}. */
Called to pass stream data. The data passed should not include the 3 byte start code
appendToNalUnit
{ "repo_name": "MaTriXy/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/H264Reader.java", "license": "apache-2.0", "size": 20415 }
[ "com.google.android.exoplayer2.util.NalUnitUtil", "java.util.Arrays" ]
import com.google.android.exoplayer2.util.NalUnitUtil; import java.util.Arrays;
import com.google.android.exoplayer2.util.*; import java.util.*;
[ "com.google.android", "java.util" ]
com.google.android; java.util;
655,941
public StringBuffer format(Date date, StringBuffer dateStrBuf, FieldPosition fieldPosition) { int start = dateStrBuf.length(); super.format(date, dateStrBuf, fieldPosition); int pos = 0; // find the beginning of the 'XXXXX' string in the formatted date // 25 is the first position that we ex...
StringBuffer function(Date date, StringBuffer dateStrBuf, FieldPosition fieldPosition) { int start = dateStrBuf.length(); super.format(date, dateStrBuf, fieldPosition); int pos = 0; for (pos = start + 25; dateStrBuf.charAt(pos) != 'X'; pos++) ; calendar.clear(); calendar.setTime(date); int offset = calendar.get(Calenda...
/** * Formats the given date in the format specified by * draft-ietf-drums-msg-fmt-08 in the current TimeZone. * * @param date the Date object * @param dateStrBuf the formatted string * @param fieldPosition the current field position * @return StringBuf...
Formats the given date in the format specified by draft-ietf-drums-msg-fmt-08 in the current TimeZone
format
{ "repo_name": "liyue80/GmailAssistant20", "path": "src/javax/mail/internet/MailDateFormat.java", "license": "gpl-2.0", "size": 25548 }
[ "java.text.FieldPosition", "java.util.Calendar", "java.util.Date" ]
import java.text.FieldPosition; import java.util.Calendar; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,133,902
public final Object getContent() throws IOException { return openConnection().getContent(); }
final Object function() throws IOException { return openConnection().getContent(); }
/** * Gets the content of the resource which is referred by this URL. By * default one of the following object types will be returned: * <p> * <li>Image for pictures</li> * <li>AudioClip for audio sequences</li> * <li>{@link InputStream} for all other data</li> * * @return the co...
Gets the content of the resource which is referred by this URL. By default one of the following object types will be returned: Image for pictures AudioClip for audio sequences <code>InputStream</code> for all other data
getContent
{ "repo_name": "openweave/openweave-core", "path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/java/net/URL.java", "license": "apache-2.0", "size": 32232 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,437,919
@Deprecated public static ImageDescriptor getPluginImageDescriptor(final Object plugin, final String name) { try { try { final URL url = getPluginImageURL(plugin, name); return ImageDescriptor.createFromURL(url); } catch (final Throwable e) { // Ignore any exceptions } } catch (fin...
static ImageDescriptor function(final Object plugin, final String name) { try { try { final URL url = getPluginImageURL(plugin, name); return ImageDescriptor.createFromURL(url); } catch (final Throwable e) { } } catch (final Throwable e) { } return null; }
/** * Returns an {@link ImageDescriptor} based on a plugin and file path. * * @param plugin the plugin {@link Object} containing the image. * @param name the path to th eimage within the plugin. * @return the {@link ImageDescriptor} stored in the file at the specified path. * * @deprecated Use {@...
Returns an <code>ImageDescriptor</code> based on a plugin and file path
getPluginImageDescriptor
{ "repo_name": "debrief/debrief", "path": "org.mwc.debrief.multipath2/src/org/eclipse/wb/swt/ResourceManager.java", "license": "epl-1.0", "size": 15061 }
[ "org.eclipse.jface.resource.ImageDescriptor" ]
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,784,947
@DELETE @Produces(MediaType.APPLICATION_JSON) @NoCache public Response logout(@QueryParam("current") boolean removeCurrent) { auth.require(AccountRoles.MANAGE_ACCOUNT); List<UserSessionModel> userSessions = session.sessions().getUserSessions(realm, user); for (UserSessionModel s...
@Produces(MediaType.APPLICATION_JSON) Response function(@QueryParam(STR) boolean removeCurrent) { auth.require(AccountRoles.MANAGE_ACCOUNT); List<UserSessionModel> userSessions = session.sessions().getUserSessions(realm, user); for (UserSessionModel s : userSessions) { if (removeCurrent !isCurrentSession(s)) { Authenti...
/** * Remove sessions * * @param removeCurrent remove current session (default is false) * @return */
Remove sessions
logout
{ "repo_name": "mhajas/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/account/SessionResource.java", "license": "apache-2.0", "size": 7488 }
[ "java.util.List", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.keycloak.models.AccountRoles", "org.keycloak.models.UserSessionModel", "org.keycloak.services.managers.AuthenticationManager", "org.keycloak.services.resources.Cors" ]
import java.util.List; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.keycloak.models.AccountRoles; import org.keycloak.models.UserSessionModel; import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.s...
import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.keycloak.models.*; import org.keycloak.services.managers.*; import org.keycloak.services.resources.*;
[ "java.util", "javax.ws", "org.keycloak.models", "org.keycloak.services" ]
java.util; javax.ws; org.keycloak.models; org.keycloak.services;
1,208,386
public int createProfileWithCustomUrl(User loggedInUser, String profileLabel, String virtualizationType, String kickstartableTreeLabel, String downloadUrl, String rootPassword) { return createProfileWithCustomUrl(loggedInUser, profileLabel, virtualizationT...
int function(User loggedInUser, String profileLabel, String virtualizationType, String kickstartableTreeLabel, String downloadUrl, String rootPassword) { return createProfileWithCustomUrl(loggedInUser, profileLabel, virtualizationType, kickstartableTreeLabel, downloadUrl, rootPassword, getDefaultUpdateType()); }
/** * Create a new kickstart profile with a custom download URL. * * @param loggedInUser The current user * @param profileLabel Label for the new kickstart profile. * @param virtualizationType Virtualization type, or none. * @param kickstartableTreeLabel Label of a kickstartable tree. ...
Create a new kickstart profile with a custom download URL
createProfileWithCustomUrl
{ "repo_name": "davidhrbac/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java", "license": "gpl-2.0", "size": 34773 }
[ "com.redhat.rhn.domain.user.User" ]
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.domain.user.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
242,549
List<ItemStack> getBrewedItems();
List<ItemStack> getBrewedItems();
/** * Gets the final brewed items. * * @return The resulting brewed items */
Gets the final brewed items
getBrewedItems
{ "repo_name": "SpongeHistory/SpongeAPI-History", "path": "src/main/java/org/spongepowered/api/event/block/tile/BrewingStandBrewEvent.java", "license": "mit", "size": 2586 }
[ "java.util.List", "org.spongepowered.api.item.inventory.ItemStack" ]
import java.util.List; import org.spongepowered.api.item.inventory.ItemStack;
import java.util.*; import org.spongepowered.api.item.inventory.*;
[ "java.util", "org.spongepowered.api" ]
java.util; org.spongepowered.api;
795,484
public ServiceFuture<RegistryUsageListResultInner> listUsagesAsync(String resourceGroupName, String registryName, final ServiceCallback<RegistryUsageListResultInner> serviceCallback) { return ServiceFuture.fromResponse(listUsagesWithServiceResponseAsync(resourceGroupName, registryName), serviceCallback); ...
ServiceFuture<RegistryUsageListResultInner> function(String resourceGroupName, String registryName, final ServiceCallback<RegistryUsageListResultInner> serviceCallback) { return ServiceFuture.fromResponse(listUsagesWithServiceResponseAsync(resourceGroupName, registryName), serviceCallback); }
/** * Gets the quota usages for the specified container registry. * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param serviceCallback the async ServiceCallback to handle successfu...
Gets the quota usages for the specified container registry
listUsagesAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerregistry/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistriesInner.java", "license": "mit", "size": 122184 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
674,454
public void getXML(PrintWriter pw) throws IOException, xBaseJException { pw.println("<?xml version=\"1.0\"?>"); pw.println("<!-- org.xBaseJ release " + xBaseJVersion + "-->"); pw.println("<!-- http://www.americancoders.com-->"); pw.println("<!DOCTYPE dbf SYSTEM \"xbase.dtd\">"); ...
void function(PrintWriter pw) throws IOException, xBaseJException { pw.println(STR1.0\"?>"); pw.println(STR + xBaseJVersion + "-->"); pw.println(STR<!DOCTYPE dbf SYSTEM \STR>STR<dbf name=\STR\STRSTR\">"); Field fld; for (i = 1; i <= getFieldCount(); i++) { fld = getField(i); pw.print(STRSTR\STR type=\STR\STR length=\ST...
/** * generates an xml string representation using xbase.dtd * * @param pw - PrinterWriter */
generates an xml string representation using xbase.dtd
getXML
{ "repo_name": "ianturton/xbasej", "path": "src/main/java/org/xbasej/DBF.java", "license": "lgpl-3.0", "size": 76131 }
[ "java.io.IOException", "java.io.PrintWriter", "org.xbasej.fields.Field" ]
import java.io.IOException; import java.io.PrintWriter; import org.xbasej.fields.Field;
import java.io.*; import org.xbasej.fields.*;
[ "java.io", "org.xbasej.fields" ]
java.io; org.xbasej.fields;
2,176,086
private void postDelete(final MasterProcedureEnv env, final DeleteColumnFamilyState state) throws IOException, InterruptedException { runCoprocessorAction(env, state); }
void function(final MasterProcedureEnv env, final DeleteColumnFamilyState state) throws IOException, InterruptedException { runCoprocessorAction(env, state); }
/** * Action after deleting column family. * @param env MasterProcedureEnv * @param state the procedure state * @throws IOException * @throws InterruptedException */
Action after deleting column family
postDelete
{ "repo_name": "JingchengDu/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteColumnFamilyProcedure.java", "license": "apache-2.0", "size": 13423 }
[ "java.io.IOException", "org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos" ]
import java.io.IOException; import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos;
import java.io.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,832,194
@Test(timeout=100000) public void testClusterSetStorageCapacity() throws Throwable { final Configuration conf = new HdfsConfiguration(); final int numDatanodes = 1; final int defaultBlockSize = 1024; final int blocks = 100; final int blocksSize = 1024; final int fileLen = blocks * blocksSiz...
@Test(timeout=100000) void function() throws Throwable { final Configuration conf = new HdfsConfiguration(); final int numDatanodes = 1; final int defaultBlockSize = 1024; final int blocks = 100; final int blocksSize = 1024; final int fileLen = blocks * blocksSize; final long capcacity = defaultBlockSize * 2 * fileLen;...
/** * Tests storage capacity setting still effective after cluster restart. */
Tests storage capacity setting still effective after cluster restart
testClusterSetStorageCapacity
{ "repo_name": "steveloughran/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestMiniDFSCluster.java", "license": "apache-2.0", "size": 11579 }
[ "org.apache.hadoop.conf.Configuration", "org.junit.Test" ]
import org.apache.hadoop.conf.Configuration; import org.junit.Test;
import org.apache.hadoop.conf.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
1,338,464
protected Component buildMainPanel() { GridBagConstraints constraints = new GridBagConstraints(); // Create the container JPanel container = new JPanel(new GridBagLayout()); // Sessions list label JLabel sessionsListLabel = new JLabel(resourceRepository().getString("SESSIONS_LIST_DIALOG_SESSIONS...
Component function() { GridBagConstraints constraints = new GridBagConstraints(); JPanel container = new JPanel(new GridBagLayout()); JLabel sessionsListLabel = new JLabel(resourceRepository().getString(STR)); sessionsListLabel.setDisplayedMnemonic(resourceRepository().getMnemonic(STR)); sessionsListLabel.setDisplayedM...
/** * Initializes the layout of this dialog's main pane. * * @return The fully initialize pane with its widgets */
Initializes the layout of this dialog's main pane
buildMainPanel
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "utils/eclipselink.utils.workbench/scplugin/source/org/eclipse/persistence/tools/workbench/scplugin/ui/broker/SessionsListDialog.java", "license": "epl-1.0", "size": 6454 }
[ "java.awt.Component", "java.awt.Dimension", "java.awt.GridBagConstraints", "java.awt.GridBagLayout", "java.awt.Insets", "javax.swing.JLabel", "javax.swing.JPanel", "javax.swing.event.ListSelectionListener", "org.eclipse.persistence.tools.workbench.framework.uitools.CheckList" ]
import java.awt.Component; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.event.ListSelectionListener; import org.eclipse.persistence.tools.workbench.framework.uitools.CheckLis...
import java.awt.*; import javax.swing.*; import javax.swing.event.*; import org.eclipse.persistence.tools.workbench.framework.uitools.*;
[ "java.awt", "javax.swing", "org.eclipse.persistence" ]
java.awt; javax.swing; org.eclipse.persistence;
1,912,226
public synchronized ImmutableStringStringMap build() throws DictionaryBuilderException { PerfectHashDictionary keyDict = new DictionaryBuilder().addAll(d_map.keySet()).buildPerfectHash(false); PerfectHashDictionary valueDict = new DictionaryBuilder().addAll(new TreeSet<>(d_map.values())) .buildPerfect...
synchronized ImmutableStringStringMap function() throws DictionaryBuilderException { PerfectHashDictionary keyDict = new DictionaryBuilder().addAll(d_map.keySet()).buildPerfectHash(false); PerfectHashDictionary valueDict = new DictionaryBuilder().addAll(new TreeSet<>(d_map.values())) .buildPerfectHash(false); int links...
/** * Construct a {@link ImmutableStringStringMap}. */
Construct a <code>ImmutableStringStringMap</code>
build
{ "repo_name": "danieldk/dictomaton", "path": "src/main/java/eu/danieldk/dictomaton/collections/ImmutableStringStringMap.java", "license": "apache-2.0", "size": 5948 }
[ "eu.danieldk.dictomaton.DictionaryBuilder", "eu.danieldk.dictomaton.DictionaryBuilderException", "eu.danieldk.dictomaton.PerfectHashDictionary", "java.util.AbstractSet", "java.util.Iterator", "java.util.Map", "java.util.TreeSet" ]
import eu.danieldk.dictomaton.DictionaryBuilder; import eu.danieldk.dictomaton.DictionaryBuilderException; import eu.danieldk.dictomaton.PerfectHashDictionary; import java.util.AbstractSet; import java.util.Iterator; import java.util.Map; import java.util.TreeSet;
import eu.danieldk.dictomaton.*; import java.util.*;
[ "eu.danieldk.dictomaton", "java.util" ]
eu.danieldk.dictomaton; java.util;
1,281,023
public void setActionCommand(final String command) throws PropertyVetoException { final String oldValue = actionCommand; vetos.fireVetoableChange("ActionCommand", oldValue, command); actionCommand = command; changes.firePropertyChange("ActionCommand", oldValue, command); }
void function(final String command) throws PropertyVetoException { final String oldValue = actionCommand; vetos.fireVetoableChange(STR, oldValue, command); actionCommand = command; changes.firePropertyChange(STR, oldValue, command); }
/** * Sets the command name of the action event fired by this button. * @param command The name of the action event command fired by this button * @exception PropertyVetoException * if the specified property value is unacceptable */
Sets the command name of the action event fired by this button
setActionCommand
{ "repo_name": "pecko/debrief", "path": "org.mwc.cmap.legacy/src/MWC/GUI/TabPanel/ButtonBase.java", "license": "epl-1.0", "size": 48807 }
[ "java.beans.PropertyVetoException" ]
import java.beans.PropertyVetoException;
import java.beans.*;
[ "java.beans" ]
java.beans;
147,023
public List<Artifact> validateSrcs() { List<Artifact> sourceFiles = new ArrayList<>(); // TODO(bazel-team): Need to get the transitive deps closure, not just the sources of the rule. for (TransitiveInfoCollection src : ruleContext.getPrerequisitesIf("srcs", FileProvider.class)) { // Make sur...
List<Artifact> function() { List<Artifact> sourceFiles = new ArrayList<>(); for (TransitiveInfoCollection src : ruleContext.getPrerequisitesIf("srcs", FileProvider.class)) { if (Util.containsHyphen(src.getLabel().getPackageFragment())) { ruleContext.attributeError("srcs", src.getLabel() + STR); } Iterable<Artifact> pyS...
/** * Returns a mutable List of the source Artifacts. */
Returns a mutable List of the source Artifacts
validateSrcs
{ "repo_name": "davidzchen/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java", "license": "apache-2.0", "size": 44514 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.Iterables", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.FileProvider", "com.google.devtools.build.lib.analysis.TransitiveInfoCollection", "com.google.devtools.build.lib.analysis.Util", "co...
import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.FileProvider; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import com.google.devtools.build.lib.anal...
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.util.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
1,278,242
private void saveRegisterWatermarkTimer() { long currentWatermark = timerService.currentWatermark(); // protect against overflow if (currentWatermark + 1 > currentWatermark) { timerService.registerEventTimeTimer(VoidNamespace.INSTANCE, currentWatermark + 1); } }
void function() { long currentWatermark = timerService.currentWatermark(); if (currentWatermark + 1 > currentWatermark) { timerService.registerEventTimeTimer(VoidNamespace.INSTANCE, currentWatermark + 1); } }
/** * Registers a timer for {@code current watermark + 1}, this means that we get triggered * whenever the watermark advances, which is what we want for working off the queue of buffered * elements. */
Registers a timer for current watermark + 1, this means that we get triggered whenever the watermark advances, which is what we want for working off the queue of buffered elements
saveRegisterWatermarkTimer
{ "repo_name": "lincoln-lil/flink", "path": "flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/operator/CepOperator.java", "license": "apache-2.0", "size": 21555 }
[ "org.apache.flink.runtime.state.VoidNamespace" ]
import org.apache.flink.runtime.state.VoidNamespace;
import org.apache.flink.runtime.state.*;
[ "org.apache.flink" ]
org.apache.flink;
2,096,419
public String getStringValue(final TargetMode _mode) throws EFapsException { this.targetMode = _mode; this.display = Display.NONE; String ret = null; ret = executeEvents(EventType.UI_FIELD_VALUE); if (ret == null) { ret = executeEvents(EventType.UI_FIE...
String function(final TargetMode _mode) throws EFapsException { this.targetMode = _mode; this.display = Display.NONE; String ret = null; ret = executeEvents(EventType.UI_FIELD_VALUE); if (ret == null) { ret = executeEvents(EventType.UI_FIELD_FORMAT); if (ret == null && this.ui != null) { ret = this.ui.getStringValue(th...
/** * Method to get a plain string for this FieldValue . * * @see #executeEvents * @param _mode target mode * @throws EFapsException on error * @return plain string * @throws EFapsException */
Method to get a plain string for this FieldValue
getStringValue
{ "repo_name": "ov3rflow/eFaps-Kernel", "path": "src/main/java/org/efaps/admin/datamodel/ui/FieldValue.java", "license": "apache-2.0", "size": 18447 }
[ "org.efaps.admin.event.EventType", "org.efaps.admin.ui.AbstractUserInterfaceObject", "org.efaps.admin.ui.field.Field", "org.efaps.util.EFapsException" ]
import org.efaps.admin.event.EventType; import org.efaps.admin.ui.AbstractUserInterfaceObject; import org.efaps.admin.ui.field.Field; import org.efaps.util.EFapsException;
import org.efaps.admin.event.*; import org.efaps.admin.ui.*; import org.efaps.admin.ui.field.*; import org.efaps.util.*;
[ "org.efaps.admin", "org.efaps.util" ]
org.efaps.admin; org.efaps.util;
915,858
@Override public void saveDefaultConfig() //TODO: change this? { try { configFile.createNewFile(); } catch (IOException ex) { logger.log(Level.SEVERE, "Could not create config file " + configFile, ex); } }
void function() { try { configFile.createNewFile(); } catch (IOException ex) { logger.log(Level.SEVERE, STR + configFile, ex); } }
/** * Checks if the plugin has a config file and creates an empty config if it doesn't. * <br>(RuntimePlugins doesn't have a default config resource!) */
Checks if the plugin has a config file and creates an empty config if it doesn't. (RuntimePlugins doesn't have a default config resource!)
saveDefaultConfig
{ "repo_name": "AnorZaken/aztb", "path": "src/nu/mine/obsidian/aztb/bukkit/plugin/wip/RuntimePlugins.java", "license": "lgpl-3.0", "size": 22460 }
[ "java.io.IOException", "java.util.logging.Level" ]
import java.io.IOException; import java.util.logging.Level;
import java.io.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
466,942
public final Iterator<OSProcess> iterator() { return processes.values().iterator(); }
final Iterator<OSProcess> function() { return processes.values().iterator(); }
/** * Lists all the processes in the system. */
Lists all the processes in the system
iterator
{ "repo_name": "jtnord/jenkins", "path": "core/src/main/java/hudson/util/ProcessTree.java", "license": "mit", "size": 46426 }
[ "hudson.util.ProcessTree", "java.util.Iterator" ]
import hudson.util.ProcessTree; import java.util.Iterator;
import hudson.util.*; import java.util.*;
[ "hudson.util", "java.util" ]
hudson.util; java.util;
1,856,873
ByteOrder getOrder();
ByteOrder getOrder();
/** * Returns the current order of the stream. * @return See above. */
Returns the current order of the stream
getOrder
{ "repo_name": "JoeHsiao/bioformats", "path": "components/formats-common/src/loci/common/IRandomAccess.java", "license": "gpl-2.0", "size": 3772 }
[ "java.nio.ByteOrder" ]
import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,655,036
public static float getMinimumDistance(List<SelectionDetail> valsAtIndex, float y, AxisDependency axis) { float distance = Float.MAX_VALUE; for (int i = 0; i < valsAtIndex.size(); i++) { SelectionDet...
static float function(List<SelectionDetail> valsAtIndex, float y, AxisDependency axis) { float distance = Float.MAX_VALUE; for (int i = 0; i < valsAtIndex.size(); i++) { SelectionDetail sel = valsAtIndex.get(i); if (sel.dataSet.getAxisDependency() == axis) { float cdistance = Math.abs(sel.y - y); if (cdistance < distan...
/** * Returns the minimum distance from a touch-y-value (in pixels) to the * closest y-value (in pixels) that is displayed in the chart. * * @param valsAtIndex * @param y * @param axis * @return */
Returns the minimum distance from a touch-y-value (in pixels) to the closest y-value (in pixels) that is displayed in the chart
getMinimumDistance
{ "repo_name": "wpy2016/TimeContrloller", "path": "app/src/main/java/com/jn/chart/utils/Utils.java", "license": "gpl-2.0", "size": 26487 }
[ "com.jn.chart.components.YAxis", "java.util.List" ]
import com.jn.chart.components.YAxis; import java.util.List;
import com.jn.chart.components.*; import java.util.*;
[ "com.jn.chart", "java.util" ]
com.jn.chart; java.util;
1,470,052
private void formatAndLog(int level, String format, Object arg1, Object arg2) { if (!isLevelEnabled(level)) { return; } FormattingTuple tp = MessageFormatter.format(format, arg1, arg2); log(level, tp.getMessage(), tp.getThrowable()); }
void function(int level, String format, Object arg1, Object arg2) { if (!isLevelEnabled(level)) { return; } FormattingTuple tp = MessageFormatter.format(format, arg1, arg2); log(level, tp.getMessage(), tp.getThrowable()); }
/** * For formatted messages, first substitute arguments and then log. * * @param level * @param format * @param arg1 * @param arg2 */
For formatted messages, first substitute arguments and then log
formatAndLog
{ "repo_name": "twwwt/slf4j", "path": "slf4j-simple/src/main/java/org/slf4j/impl/SimpleLogger.java", "license": "mit", "size": 23785 }
[ "org.slf4j.helpers.FormattingTuple", "org.slf4j.helpers.MessageFormatter" ]
import org.slf4j.helpers.FormattingTuple; import org.slf4j.helpers.MessageFormatter;
import org.slf4j.helpers.*;
[ "org.slf4j.helpers" ]
org.slf4j.helpers;
52,945
public static void bind(ServerSocket socket, InetSocketAddress address, int backlog) throws IOException { bind(socket, address, backlog, null, null); }
static void function(ServerSocket socket, InetSocketAddress address, int backlog) throws IOException { bind(socket, address, backlog, null, null); }
/** * A convenience method to bind to a given address and report * better exceptions if the address is not a valid host. * @param socket the socket to bind * @param address the address to bind to * @param backlog the number of connections allowed in the queue * @throws BindException if the address ca...
A convenience method to bind to a given address and report better exceptions if the address is not a valid host
bind
{ "repo_name": "odpi/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java", "license": "apache-2.0", "size": 113207 }
[ "java.io.IOException", "java.net.InetSocketAddress", "java.net.ServerSocket" ]
import java.io.IOException; import java.net.InetSocketAddress; import java.net.ServerSocket;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,166,933
protected void addHostRequestHeader(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace("enter HttpMethodBase.addHostRequestHeader(HttpState, " + "HttpConnection)"); // Per 19.6.1.1 of RFC 2616, it is legal for HTTP/1.0 based // applicat...
void function(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace(STR + STR); String host = this.params.getVirtualHost(); if (host != null) { LOG.debug(STR + host); } else { host = conn.getHost(); } int port = conn.getPort(); if (LOG.isDebugEnabled()) { LOG.debug(STR); } if (conn.getProt...
/** * Generates <tt>Host</tt> request header, as long as no <tt>Host</tt> request * header already exists. * * @param state the {@link HttpState state} information associated with this method * @param conn the {@link HttpConnection connection} used to execute * this HTTP method ...
Generates Host request header, as long as no Host request header already exists
addHostRequestHeader
{ "repo_name": "gaowangyizu/myHeritrix", "path": "myHeritrix/src/org/apache/commons/httpclient/HttpMethodBase.java", "license": "apache-2.0", "size": 87048 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
779,996
private static int makeMarkAndDotEqual(JTextArea textArea, boolean forward) { Caret c = textArea.getCaret(); int val = forward ? Math.min(c.getDot(), c.getMark()) : Math.max(c.getDot(), c.getMark()); c.setDot(val); return val; }
static int function(JTextArea textArea, boolean forward) { Caret c = textArea.getCaret(); int val = forward ? Math.min(c.getDot(), c.getMark()) : Math.max(c.getDot(), c.getMark()); c.setDot(val); return val; }
/** * Makes the caret's dot and mark the same location so that, for the * next search in the specified direction, a match will be found even * if it was within the original dot and mark's selection. * * @param textArea The text area. * @param forward Whether the search will be forward through the *...
Makes the caret's dot and mark the same location so that, for the next search in the specified direction, a match will be found even if it was within the original dot and mark's selection
makeMarkAndDotEqual
{ "repo_name": "Nanonid/RSyntaxTextArea", "path": "src/org/fife/ui/rtextarea/SearchEngine.java", "license": "bsd-3-clause", "size": 28074 }
[ "javax.swing.JTextArea", "javax.swing.text.Caret" ]
import javax.swing.JTextArea; import javax.swing.text.Caret;
import javax.swing.*; import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
1,171,121
protected void streamToResponse(byte[] fileContents, String fileName, String fileContentType, HttpServletResponse response) throws Exception { ByteArrayOutputStream baos = null; try { baos = new ByteArrayOutputStream(fileContents.length); baos.write(fileContents); ...
void function(byte[] fileContents, String fileName, String fileContentType, HttpServletResponse response) throws Exception { ByteArrayOutputStream baos = null; try { baos = new ByteArrayOutputStream(fileContents.length); baos.write(fileContents); WebUtils.saveMimeOutputStreamAsFile(response, fileContentType, baos, file...
/** * Handy method to stream the byte array to response object * * @param fileContents * @param fileName * @param fileContentType * @param response * @throws Exception */
Handy method to stream the byte array to response object
streamToResponse
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-kns/src/main/java/org/kuali/kfs/kns/web/struts/action/KualiDocumentActionBase.java", "license": "agpl-3.0", "size": 111089 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "javax.servlet.http.HttpServletResponse", "org.kuali.kfs.kns.util.WebUtils" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import javax.servlet.http.HttpServletResponse; import org.kuali.kfs.kns.util.WebUtils;
import java.io.*; import javax.servlet.http.*; import org.kuali.kfs.kns.util.*;
[ "java.io", "javax.servlet", "org.kuali.kfs" ]
java.io; javax.servlet; org.kuali.kfs;
2,650,851
public void createTopic(final String topic, final int partitions, final int replication) throws InterruptedException { createTopic(topic, partitions, replication, new Properties()); }
void function(final String topic, final int partitions, final int replication) throws InterruptedException { createTopic(topic, partitions, replication, new Properties()); }
/** * Create a Kafka topic with the given parameters. * * @param topic The name of the topic. * @param partitions The number of partitions for this topic. * @param replication The replication factor for (the partitions of) this topic. */
Create a Kafka topic with the given parameters
createTopic
{ "repo_name": "themarkypantz/kafka", "path": "streams/src/test/java/org/apache/kafka/streams/integration/utils/EmbeddedKafkaCluster.java", "license": "apache-2.0", "size": 12537 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
346,687
public static void addBytesFor(long pulse, long count, List<Byte> output) { checkNotNull(output, "output list cannot be null"); if( count < 1 ) return; if( pulse > PZXEncodeUtils.BIT_32_MASK ) { // Encode as "very long pulse" - a stream of one count pulses // interspe...
static void function(long pulse, long count, List<Byte> output) { checkNotNull(output, STR); if( count < 1 ) return; if( pulse > PZXEncodeUtils.BIT_32_MASK ) { for(int i = 0; i < count; i++) { for(long j = 0; j < pulse / PZXEncodeUtils.LOW_31_BITS_MASK; j++) { PZXEncodeUtils.writeMultiCyclePulse(PZXEncodeUtils.LOW_31_B...
/** * Utility function for adding pulses in the proper format for the PULS block * in the supplied list. * @param pulse the duration of the pulse to add * @param count the number of repeats of the pulse to add * @param output the destination for the bytes corresponding to the pulse sequence * @throws NullPo...
Utility function for adding pulses in the proper format for the PULS block in the supplied list
addBytesFor
{ "repo_name": "fmeunier/wav2pzx", "path": "src/main/java/xyz/meunier/wav2pzx/blocks/PZXEncodeUtils.java", "license": "bsd-2-clause", "size": 12882 }
[ "com.google.common.base.Preconditions", "java.util.List" ]
import com.google.common.base.Preconditions; import java.util.List;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,049,482
public DataPath getPath(String path) { PreCon.notNullOrEmpty(path); DataPath newPath = new DataPath(); String[] relativePath = TextUtils.PATTERN_DOT.split(path); int size = _dataPath.length + relativePath.length; newPath._dataPath = new String[size]; System.arrayc...
DataPath function(String path) { PreCon.notNullOrEmpty(path); DataPath newPath = new DataPath(); String[] relativePath = TextUtils.PATTERN_DOT.split(path); int size = _dataPath.length + relativePath.length; newPath._dataPath = new String[size]; System.arraycopy(_dataPath, 0, newPath._dataPath, 0, _dataPath.length); Sys...
/** * Create a new {@link DataPath} using a path that is relative * to the current {@link DataPath}. * * @param path The relative path to add to the existing path. * * @return A new {@link DataPath}. */
Create a new <code>DataPath</code> using a path that is relative to the current <code>DataPath</code>
getPath
{ "repo_name": "JCThePants/NucleusFramework", "path": "src/com/jcwhatever/nucleus/storage/DataPath.java", "license": "mit", "size": 5966 }
[ "com.jcwhatever.nucleus.utils.PreCon", "com.jcwhatever.nucleus.utils.text.TextUtils" ]
import com.jcwhatever.nucleus.utils.PreCon; import com.jcwhatever.nucleus.utils.text.TextUtils;
import com.jcwhatever.nucleus.utils.*; import com.jcwhatever.nucleus.utils.text.*;
[ "com.jcwhatever.nucleus" ]
com.jcwhatever.nucleus;
819,398
void write(DataOutput p_74734_1_) throws IOException { p_74734_1_.writeInt(this.byteArray.length); p_74734_1_.write(this.byteArray); }
void write(DataOutput p_74734_1_) throws IOException { p_74734_1_.writeInt(this.byteArray.length); p_74734_1_.write(this.byteArray); }
/** * Write the actual data contents of the tag, implemented in NBT extension classes */
Write the actual data contents of the tag, implemented in NBT extension classes
write
{ "repo_name": "CheeseL0ver/Ore-TTM", "path": "build/tmp/recompSrc/net/minecraft/nbt/NBTTagByteArray.java", "license": "lgpl-2.1", "size": 1924 }
[ "java.io.DataOutput", "java.io.IOException" ]
import java.io.DataOutput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,810,298
@Test public void testLocalityBasedOnState() throws Exception { final int parallelism = 10; final TaskManagerLocation[] locations = new TaskManagerLocation[parallelism]; final ExecutionGraph graph = createTestGraph(parallelism, false); // set the location for all sources and targets for (int i = 0; i < ...
void function() throws Exception { final int parallelism = 10; final TaskManagerLocation[] locations = new TaskManagerLocation[parallelism]; final ExecutionGraph graph = createTestGraph(parallelism, false); for (int i = 0; i < parallelism; i++) { ExecutionVertex source = graph.getAllVertices().get(sourceVertexId).getTa...
/** * This test validates that stateful vertices schedule based in the state's location * (which is the prior execution's location). */
This test validates that stateful vertices schedule based in the state's location (which is the prior execution's location)
testLocalityBasedOnState
{ "repo_name": "shaoxuan-wang/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionVertexLocalityTest.java", "license": "apache-2.0", "size": 10541 }
[ "java.net.InetAddress", "java.util.Iterator", "java.util.concurrent.CompletableFuture", "org.apache.flink.runtime.checkpoint.JobManagerTaskRestore", "org.apache.flink.runtime.clusterframework.types.ResourceID", "org.apache.flink.runtime.execution.ExecutionState", "org.apache.flink.runtime.taskmanager.Ta...
import java.net.InetAddress; import java.util.Iterator; import java.util.concurrent.CompletableFuture; import org.apache.flink.runtime.checkpoint.JobManagerTaskRestore; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.runtime.execution.ExecutionState; import org.apache.flink.ru...
import java.net.*; import java.util.*; import java.util.concurrent.*; import org.apache.flink.runtime.checkpoint.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.execution.*; import org.apache.flink.runtime.taskmanager.*; import org.junit.*;
[ "java.net", "java.util", "org.apache.flink", "org.junit" ]
java.net; java.util; org.apache.flink; org.junit;
70,399
@Override public void error(final String message, final Supplier<?>... paramSuppliers) { log(Level.SEVERE, message, paramSuppliers); } /** * Logs a message at the ERROR level including the stack trace of the {@link Throwable}
void function(final String message, final Supplier<?>... paramSuppliers) { log(Level.SEVERE, message, paramSuppliers); } /** * Logs a message at the ERROR level including the stack trace of the {@link Throwable}
/** * Logs a message with parameters which are only to be constructed if the * logging level is the ERROR level. * * @param message the message to log; the format depends on the message factory. * @param paramSuppliers An array of functions, which when called, produce * the desired ...
Logs a message with parameters which are only to be constructed if the logging level is the ERROR level
error
{ "repo_name": "apache/commons-jcs", "path": "commons-jcs-core/src/main/java/org/apache/commons/jcs3/log/JulLogAdapter.java", "license": "apache-2.0", "size": 16168 }
[ "java.util.function.Supplier", "java.util.logging.Level" ]
import java.util.function.Supplier; import java.util.logging.Level;
import java.util.function.*; import java.util.logging.*;
[ "java.util" ]
java.util;
177,937
@Override protected void doStop() throws Exception { _started=false; super.doStop(); List<Bean> reverse = new ArrayList<Bean>(_beans); Collections.reverse(reverse); for (Bean b:reverse) { if (b._managed && b._bean instanceof LifeCycle) ...
void function() throws Exception { _started=false; super.doStop(); List<Bean> reverse = new ArrayList<Bean>(_beans); Collections.reverse(reverse); for (Bean b:reverse) { if (b._managed && b._bean instanceof LifeCycle) { LifeCycle l=(LifeCycle)b._bean; if (l.isRunning()) l.stop(); } } }
/** * Stop the joined lifecycle beans in the reverse order they were added. * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStart() */
Stop the joined lifecycle beans in the reverse order they were added
doStop
{ "repo_name": "itead/IoTgo_Android_App", "path": "plugins/com.knowledgecode.cordova.websocket/src/android/org/eclipse/jetty/util/component/AggregateLifeCycle.java", "license": "mit", "size": 13536 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
293,942
void createSpoiler(Element elemnt, ViewGroup parent) { insertText(); Spoiler spoiler = new Spoiler(context); parent.addView(spoiler.getSpoiler()); // label Element label = elemnt.child(0); spoiler.getTitle().setText(" + " + label.text()); // label.remove(); ...
void createSpoiler(Element elemnt, ViewGroup parent) { insertText(); Spoiler spoiler = new Spoiler(context); parent.addView(spoiler.getSpoiler()); Element label = elemnt.child(0); spoiler.getTitle().setText(STR + label.text()); Element content = elemnt.getElementsByClass("inner").get(0); looper(content.childNodes(), sp...
/** * ********************************************************** * Work with spoiler * ********************************************************** */
Work with spoiler
createSpoiler
{ "repo_name": "LeshiyGS/shikimori", "path": "library/src/main/java/org/shikimori/library/tool/parser/jsop/BodyBuild.java", "license": "gpl-3.0", "size": 30200 }
[ "android.view.ViewGroup", "org.jsoup.nodes.Element", "org.shikimori.library.tool.parser.elements.Spoiler" ]
import android.view.ViewGroup; import org.jsoup.nodes.Element; import org.shikimori.library.tool.parser.elements.Spoiler;
import android.view.*; import org.jsoup.nodes.*; import org.shikimori.library.tool.parser.elements.*;
[ "android.view", "org.jsoup.nodes", "org.shikimori.library" ]
android.view; org.jsoup.nodes; org.shikimori.library;
1,698,700
public synchronized List<UAVObjectField> getFields() { return fields; }
synchronized List<UAVObjectField> function() { return fields; }
/** * Get the object's fields */
Get the object's fields
getFields
{ "repo_name": "mluessi/dronin", "path": "androidgcs/src/org/taulabs/uavtalk/UAVObject.java", "license": "gpl-3.0", "size": 22286 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
894,576
@Override public final TypeFamilyEntry toTypeFamilyEntry(Location l) { return this; }
final TypeFamilyEntry function(Location l) { return this; }
/** * <p> * This method will attempt to convert this {@link SymbolTableEntry} into a {@link TypeFamilyEntry}. * </p> * * @param l * Location where we encountered this entry. * * @return A {@link TypeFamilyEntry} if possible. Otherwise, it throws a {@link SourceErrorExc...
This method will attempt to convert this <code>SymbolTableEntry</code> into a <code>TypeFamilyEntry</code>.
toTypeFamilyEntry
{ "repo_name": "yushan87/RESOLVE", "path": "src/java/edu/clemson/rsrg/typeandpopulate/entry/TypeFamilyEntry.java", "license": "bsd-3-clause", "size": 5464 }
[ "edu.clemson.rsrg.parsing.data.Location" ]
import edu.clemson.rsrg.parsing.data.Location;
import edu.clemson.rsrg.parsing.data.*;
[ "edu.clemson.rsrg" ]
edu.clemson.rsrg;
1,707,578
Assert.assertTrue(StringUtils.isValidEmail("guynir75@gmail.com")); Assert.assertFalse(StringUtils.isValidEmail("guynir75gmail.com")); Assert.assertFalse(StringUtils.isValidEmail("guynir75@gmail")); }
Assert.assertTrue(StringUtils.isValidEmail(STR)); Assert.assertFalse(StringUtils.isValidEmail(STR)); Assert.assertFalse(StringUtils.isValidEmail(STR)); }
/** * Test cases for {@link StringUtils#isValidEmail(String)} */
Test cases for <code>StringUtils#isValidEmail(String)</code>
testEmailAddressValidator
{ "repo_name": "guynir/gcommon", "path": "src/test/java/gcommon/StringUtilsTest.java", "license": "mit", "size": 1018 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,451,381
@Test public void testGetDNSWithDnssecOnlySecureExtension() { System.out.println("--------DNSSEC_RETURN_ONLY_SECURE--------------"); final IGetDNSContextSync context = GetDNSFactory.createSync(1,null); try { HashMap<ExtensionName, Object> extensions = new HashMap<ExtensionName, Object>(); extensions.put...
void function() { System.out.println(STR); final IGetDNSContextSync context = GetDNSFactory.createSync(1,null); try { HashMap<ExtensionName, Object> extensions = new HashMap<ExtensionName, Object>(); extensions.put(ExtensionName.DNSSEC_RETURN_ONLY_SECURE, GetDNSConstants.GETDNS_EXTENSION_TRUE); HashMap<String, Object> ...
/** * test with dnssec return only secure */
test with dnssec return only secure
testGetDNSWithDnssecOnlySecureExtension
{ "repo_name": "getdnsapi/getdns-java-bindings", "path": "src/test/java/com/verisign/getdns/test/GetDNSWithExtensionPositiveTest.java", "license": "bsd-3-clause", "size": 25896 }
[ "com.verisign.getdns.ExtensionName", "com.verisign.getdns.GetDNSConstants", "com.verisign.getdns.GetDNSFactory", "com.verisign.getdns.GetDNSUtil", "com.verisign.getdns.IGetDNSContextSync", "com.verisign.getdns.RRType", "java.util.HashMap", "org.junit.Assert" ]
import com.verisign.getdns.ExtensionName; import com.verisign.getdns.GetDNSConstants; import com.verisign.getdns.GetDNSFactory; import com.verisign.getdns.GetDNSUtil; import com.verisign.getdns.IGetDNSContextSync; import com.verisign.getdns.RRType; import java.util.HashMap; import org.junit.Assert;
import com.verisign.getdns.*; import java.util.*; import org.junit.*;
[ "com.verisign.getdns", "java.util", "org.junit" ]
com.verisign.getdns; java.util; org.junit;
1,185,072
public static ShowcaseSearch success(List<ShowcaseReference> result, String nextPage) { return new ShowcaseSearch(null, result, nextPage); }
static ShowcaseSearch function(List<ShowcaseReference> result, String nextPage) { return new ShowcaseSearch(null, result, nextPage); }
/** * Constructs successful search call. * * @param result obtained items * @param nextPage next page marker */
Constructs successful search call
success
{ "repo_name": "RomanPozdeev/yandex-money-sdk-java", "path": "src/main/java/com/yandex/money/api/methods/ShowcaseSearch.java", "license": "mit", "size": 4587 }
[ "com.yandex.money.api.model.showcase.ShowcaseReference", "java.util.List" ]
import com.yandex.money.api.model.showcase.ShowcaseReference; import java.util.List;
import com.yandex.money.api.model.showcase.*; import java.util.*;
[ "com.yandex.money", "java.util" ]
com.yandex.money; java.util;
1,964,230
public void setDeveloperIpPersistence( DeveloperIpPersistence developerIpPersistence) { this.developerIpPersistence = developerIpPersistence; }
void function( DeveloperIpPersistence developerIpPersistence) { this.developerIpPersistence = developerIpPersistence; }
/** * Sets the developer ip persistence. * * @param developerIpPersistence the developer ip persistence */
Sets the developer ip persistence
setDeveloperIpPersistence
{ "repo_name": "queza85/edison", "path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/src/org/kisti/edison/science/service/base/RequiredLibServiceBaseImpl.java", "license": "gpl-3.0", "size": 52463 }
[ "org.kisti.edison.science.service.persistence.DeveloperIpPersistence" ]
import org.kisti.edison.science.service.persistence.DeveloperIpPersistence;
import org.kisti.edison.science.service.persistence.*;
[ "org.kisti.edison" ]
org.kisti.edison;
2,156,608
EAttribute getPose2D_Y();
EAttribute getPose2D_Y();
/** * Returns the meta object for the attribute '{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.Pose2D#getY <em>Y</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Y</em>'. * @see org.eclipse.papyru...
Returns the meta object for the attribute '<code>org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.geometry_datatypes.Pose2D#getY Y</code>'.
getPose2D_Y
{ "repo_name": "RobotML/RobotML-SDK-Juno", "path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/geometry_datatypes/Geometry_datatypesPackage.java", "license": "epl-1.0", "size": 84334 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
897,502
public IItemHandler getInventoryForInventoryReader(EnumFacing side) { return this.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side); }
IItemHandler function(EnumFacing side) { return this.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side); }
/** * Returns the inventory that the Inventory Readers should use to calculate their output signal * @param side * @return */
Returns the inventory that the Inventory Readers should use to calculate their output signal
getInventoryForInventoryReader
{ "repo_name": "maruohon/autoverse", "path": "src/main/java/fi/dy/masa/autoverse/tileentity/base/TileEntityAutoverseInventory.java", "license": "gpl-3.0", "size": 8437 }
[ "net.minecraft.util.EnumFacing", "net.minecraftforge.items.CapabilityItemHandler", "net.minecraftforge.items.IItemHandler" ]
import net.minecraft.util.EnumFacing; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler;
import net.minecraft.util.*; import net.minecraftforge.items.*;
[ "net.minecraft.util", "net.minecraftforge.items" ]
net.minecraft.util; net.minecraftforge.items;
654,317
public GenericMethod getMethod() { return method; }
GenericMethod function() { return method; }
/** * <p> * Getter for the field <code>method</code>. * </p> * * @return a {@link java.lang.reflect.Method} object. */
Getter for the field <code>method</code>.
getMethod
{ "repo_name": "claudejin/evosuite", "path": "client/src/main/java/org/evosuite/testcase/statements/MethodStatement.java", "license": "lgpl-3.0", "size": 17957 }
[ "org.evosuite.utils.generic.GenericMethod" ]
import org.evosuite.utils.generic.GenericMethod;
import org.evosuite.utils.generic.*;
[ "org.evosuite.utils" ]
org.evosuite.utils;
2,064,141
public void _updateBoolean() { boolean result = true ; int idx = findColumnOfType(Boolean.class) ; if (idx < 0) { log.println("Required type not found") ; tRes.tested("updateBoolean()", Status.skipped(true)) ; return ; } try { ...
void function() { boolean result = true ; int idx = findColumnOfType(Boolean.class) ; if (idx < 0) { log.println(STR) ; tRes.tested(STR, Status.skipped(true)) ; return ; } try { boolean newVal = !row.getBoolean(idx) ; oObj.updateBoolean(idx, newVal) ; boolean getVal = row.getBoolean(idx) ; result = newVal == getVal ; }...
/** * Updates column with the appropriate type (if exists) and then * checks result with interface <code>XRow</code>.<p> * Has OK status if column successfully updated, ahd the same * result returned. */
Updates column with the appropriate type (if exists) and then checks result with interface <code>XRow</code>. Has OK status if column successfully updated, ahd the same result returned
_updateBoolean
{ "repo_name": "jvanz/core", "path": "qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java", "license": "gpl-3.0", "size": 22429 }
[ "com.sun.star.sdbc.SQLException" ]
import com.sun.star.sdbc.SQLException;
import com.sun.star.sdbc.*;
[ "com.sun.star" ]
com.sun.star;
1,723,668
@Deprecated public static void assertJsonStructureEquals(Object expected, Object actual) { Diff diff = create(expected, actual, ACTUAL, ROOT, configuration.withOptions(COMPARING_ONLY_STRUCTURE)); diff.failIfDifferent(); }
static void function(Object expected, Object actual) { Diff diff = create(expected, actual, ACTUAL, ROOT, configuration.withOptions(COMPARING_ONLY_STRUCTURE)); diff.failIfDifferent(); }
/** * Compares structures of two JSON documents. Is too lenient, ignores types, prefer IGNORING_VALUES option instead. * Throws {@link AssertionError} if they are different. * * @deprecated Use IGNORING_VALUES option instead */
Compares structures of two JSON documents. Is too lenient, ignores types, prefer IGNORING_VALUES option instead. Throws <code>AssertionError</code> if they are different
assertJsonStructureEquals
{ "repo_name": "lukas-krecan/JsonUnit", "path": "json-unit/src/main/java/net/javacrumbs/jsonunit/JsonAssert.java", "license": "apache-2.0", "size": 11288 }
[ "net.javacrumbs.jsonunit.core.internal.Diff" ]
import net.javacrumbs.jsonunit.core.internal.Diff;
import net.javacrumbs.jsonunit.core.internal.*;
[ "net.javacrumbs.jsonunit" ]
net.javacrumbs.jsonunit;
1,871,769
@Test public void testSnapshotFormatter() throws Exception { File snapDir = new File(testData, "invalidsnap"); File snapfile = new File(new File(snapDir, "version-2"), "snapshot.272"); String[] args = {snapfile.getCanonicalFile().toString()}; SnapshotFormatter.main(args); }
void function() throws Exception { File snapDir = new File(testData, STR); File snapfile = new File(new File(snapDir, STR), STR); String[] args = {snapfile.getCanonicalFile().toString()}; SnapshotFormatter.main(args); }
/** * Verify the SnapshotFormatter by running it on a known file. */
Verify the SnapshotFormatter by running it on a known file
testSnapshotFormatter
{ "repo_name": "alienth/zookeeper", "path": "src/java/test/org/apache/zookeeper/test/InvalidSnapshotTest.java", "license": "apache-2.0", "size": 4354 }
[ "java.io.File", "org.apache.zookeeper.server.SnapshotFormatter" ]
import java.io.File; import org.apache.zookeeper.server.SnapshotFormatter;
import java.io.*; import org.apache.zookeeper.server.*;
[ "java.io", "org.apache.zookeeper" ]
java.io; org.apache.zookeeper;
1,494,716
@Override public Adapter createEnqueueMediatorInputConnectorAdapter() { if (enqueueMediatorInputConnectorItemProvider == null) { enqueueMediatorInputConnectorItemProvider = new EnqueueMediatorInputConnectorItemProvider(this); } return enqueueMediatorInputConnectorItemProvider; } protected EnqueueMedi...
Adapter function() { if (enqueueMediatorInputConnectorItemProvider == null) { enqueueMediatorInputConnectorItemProvider = new EnqueueMediatorInputConnectorItemProvider(this); } return enqueueMediatorInputConnectorItemProvider; } protected EnqueueMediatorOutputConnectorItemProvider enqueueMediatorOutputConnectorItemProv...
/** * This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.EnqueueMediatorInputConnector}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.EnqueueMediatorInputConnector</code>.
createEnqueueMediatorInputConnectorAdapter
{ "repo_name": "rajeevanv89/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 286852 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,344,706
@Override public Iterator<T> iterator() { return map.keySet().iterator(); }
Iterator<T> function() { return map.keySet().iterator(); }
/** * Return an iterator over the object in this index. NB if pruning occurs * the iterator will break. */
Return an iterator over the object in this index. NB if pruning occurs the iterator will break
iterator
{ "repo_name": "sodash/open-code", "path": "winterwell.maths/src/com/winterwell/maths/datastorage/HalfLifeIndex.java", "license": "mit", "size": 7877 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
999,812
@Override public T visitMethodInvocation_lfno_primary(@NotNull Java8Parser.MethodInvocation_lfno_primaryContext ctx) { return visitChildren(ctx); }
@Override public T visitMethodInvocation_lfno_primary(@NotNull Java8Parser.MethodInvocation_lfno_primaryContext ctx) { return visitChildren(ctx); }
/** * {@inheritDoc} * * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> */
The default implementation returns the result of calling <code>#visitChildren</code> on ctx
visitEnumConstant
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/Java8BaseVisitor.java", "license": "gpl-3.0", "size": 65479 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,462,915
private TaskInputOutputContext getTIOC() { if (tioc == null) { tioc = PigHadoopLogger.getInstance().getTaskIOContext(); } return tioc; }
TaskInputOutputContext function() { if (tioc == null) { tioc = PigHadoopLogger.getInstance().getTaskIOContext(); } return tioc; }
/** * Try for the Reporter object if it hasn't been initialized yet, otherwise just return it. * @return the job's reporter object, or null if it isn't retrievable yet. */
Try for the Reporter object if it hasn't been initialized yet, otherwise just return it
getTIOC
{ "repo_name": "hirohanin/elephant-birdpig7hadoop21", "path": "src/java/com/twitter/elephantbird/pig/util/PigCounterHelper.java", "license": "apache-2.0", "size": 2585 }
[ "org.apache.hadoop.mapreduce.TaskInputOutputContext", "org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigHadoopLogger" ]
import org.apache.hadoop.mapreduce.TaskInputOutputContext; import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigHadoopLogger;
import org.apache.hadoop.mapreduce.*; import org.apache.pig.backend.hadoop.executionengine.*;
[ "org.apache.hadoop", "org.apache.pig" ]
org.apache.hadoop; org.apache.pig;
279,958
private Dimension calculateMinFieldDim() { Dimension dim = KrokiTextMeasurer.measureText("M", getFont()); dim.width *= MIN_COLS; dim.height *= MIN_ROWS; // int cell = 10; // int mod = dim.width % cell; // if (mod > 0) { // dim.width += cell - mod; //...
Dimension function() { Dimension dim = KrokiTextMeasurer.measureText("M", getFont()); dim.width *= MIN_COLS; dim.height *= MIN_ROWS; dim.width += margins.left + margins.right; dim.height += margins.top + margins.bottom; return dim; }
/** * Calculates the minimal dimension of the input field */
Calculates the minimal dimension of the input field
calculateMinFieldDim
{ "repo_name": "farkas-arpad/KROKI-mockup-tool", "path": "Kroki/src/kroki/mockup/model/components/TextField.java", "license": "mit", "size": 6948 }
[ "java.awt.Dimension" ]
import java.awt.Dimension;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,058,070
BigInteger getQuantity();
BigInteger getQuantity();
/** * Returns the value of the '<em><b>Quantity</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Quantity</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Quantity</em>' att...
Returns the value of the 'Quantity' attribute. If the meaning of the 'Quantity' attribute isn't clear, there really should be more of a description here...
getQuantity
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/InfWork/CUAsset.java", "license": "mit", "size": 6769 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,478,723
private void drawItemStack(ItemStack stack, int x, int y, String altText) { GlStateManager.translate(0.0F, 0.0F, 32.0F); this.zLevel = 200.0F; this.itemRender.zLevel = 200.0F; net.minecraft.client.gui.FontRenderer font = null; if (stack != null) font = stack.getItem().get...
void function(ItemStack stack, int x, int y, String altText) { GlStateManager.translate(0.0F, 0.0F, 32.0F); this.zLevel = 200.0F; this.itemRender.zLevel = 200.0F; net.minecraft.client.gui.FontRenderer font = null; if (stack != null) font = stack.getItem().getFontRenderer(stack); if (font == null) font = fontRendererObj...
/** * Render an ItemStack. Args : stack, x, y, format */
Render an ItemStack. Args : stack, x, y, format
drawItemStack
{ "repo_name": "dogjaw2233/tiu-s-mod", "path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/inventory/GuiContainer.java", "license": "lgpl-2.1", "size": 29027 }
[ "net.minecraft.client.renderer.GlStateManager", "net.minecraft.item.ItemStack" ]
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack;
import net.minecraft.client.renderer.*; import net.minecraft.item.*;
[ "net.minecraft.client", "net.minecraft.item" ]
net.minecraft.client; net.minecraft.item;
2,763,447
public interface CompletionCheck { public CompletionHandlerCall callHandler(CompletionState state, ByteBuffer[] buffers, int offset, int length); }
interface CompletionCheck { public CompletionHandlerCall function(CompletionState state, ByteBuffer[] buffers, int offset, int length); }
/** * Determine what call, if any, should be made to the completion * handler. * * @param state of the operation (done or done in-line since the * IO call is done) * @param buffers ByteBuffer[] that has been passed to the * original IO call ...
Determine what call, if any, should be made to the completion handler
callHandler
{ "repo_name": "apache/tomcat", "path": "java/org/apache/tomcat/util/net/SocketWrapperBase.java", "license": "apache-2.0", "size": 59077 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,689,403
private static SSLEngineConfigurator initializeSSL() { // Initialize SSLContext configuration SSLContextConfigurator sslContextConfig = new SSLContextConfigurator(); // Set key store ClassLoader cl = SSLEchoClient.class.getClassLoader(); URL cacertsUrl = cl.getResource("sslt...
static SSLEngineConfigurator function() { SSLContextConfigurator sslContextConfig = new SSLContextConfigurator(); ClassLoader cl = SSLEchoClient.class.getClassLoader(); URL cacertsUrl = cl.getResource(STR); if (cacertsUrl != null) { sslContextConfig.setTrustStoreFile(cacertsUrl.getFile()); sslContextConfig.setTrustStor...
/** * Initialize server side SSL configuration. * * @return server side {@link SSLEngineConfigurator}. */
Initialize server side SSL configuration
initializeSSL
{ "repo_name": "rayrelay/devnote", "path": "devnote-example/src/main/java/org/glassfish/grizzly/samples/ssl/SSLEchoClient.java", "license": "apache-2.0", "size": 8405 }
[ "org.glassfish.grizzly.ssl.SSLContextConfigurator", "org.glassfish.grizzly.ssl.SSLEngineConfigurator" ]
import org.glassfish.grizzly.ssl.SSLContextConfigurator; import org.glassfish.grizzly.ssl.SSLEngineConfigurator;
import org.glassfish.grizzly.ssl.*;
[ "org.glassfish.grizzly" ]
org.glassfish.grizzly;
131,461
@Override public ResourceLocator getResourceLocator() { return DebugEditPlugin.INSTANCE; }
ResourceLocator function() { return DebugEditPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> <!-- * end-user-doc --> * @generated */
Return the resource locator for this item provider's resources.
getResourceLocator
{ "repo_name": "SiriusLab/SiriusAnimator", "path": "simulationmodelanimation/plugins/org.eclipse.gemoc.dsl.debug.edit/src-gen/org/eclipse/gemoc/dsl/debug/provider/DebugTargetItemProvider.java", "license": "epl-1.0", "size": 8357 }
[ "org.eclipse.emf.common.util.ResourceLocator" ]
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,770,456
public static Document getOwnerDocument(Node node) { if (node.getNodeType() == Node.DOCUMENT_NODE) { return (Document) node; } try { return node.getOwnerDocument(); } catch (NullPointerException npe) { throw new NullPointerException(I18n.translate(...
static Document function(Node node) { if (node.getNodeType() == Node.DOCUMENT_NODE) { return (Document) node; } try { return node.getOwnerDocument(); } catch (NullPointerException npe) { throw new NullPointerException(I18n.translate(STR) + STRSTR\""); } }
/** * This method returns the owner document of a particular node. * This method is necessary because it <I>always</I> returns a * {@link Document}. {@link Node#getOwnerDocument} returns <CODE>null</CODE> * if the {@link Node} is a {@link Document}. * * @param node * @return the owner...
This method returns the owner document of a particular node. This method is necessary because it always returns a <code>Document</code>. <code>Node#getOwnerDocument</code> returns <code>null</code> if the <code>Node</code> is a <code>Document</code>
getOwnerDocument
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java", "license": "gpl-2.0", "size": 35599 }
[ "org.w3c.dom.Document", "org.w3c.dom.Node" ]
import org.w3c.dom.Document; import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,642,715
@Override public void modelChanged(Project model) throws Exception { IJavaProject javaProject = Central.getJavaProject(model); if (javaProject == null) { return; // bnd project is not loaded in the workspace } requestClasspathContainerUpdate(javaProject); }
void function(Project model) throws Exception { IJavaProject javaProject = Central.getJavaProject(model); if (javaProject == null) { return; } requestClasspathContainerUpdate(javaProject); }
/** * ModelListener modelChanged method. */
ModelListener modelChanged method
modelChanged
{ "repo_name": "bjhargrave/bndtools", "path": "bndtools.builder/src/org/bndtools/builder/classpath/BndContainerInitializer.java", "license": "epl-1.0", "size": 30674 }
[ "org.eclipse.jdt.core.IJavaProject" ]
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
2,781,640
public synchronized void addChain(TemporalChain chain) { synchronized (client) { int expectedWork = queuer.queueAddChain(chain); if (expectedWork != 0) { List results = client.flushQueue(); boolean anyRelationsAdded = false; int failedRelations = 0; for (Object object : results) { if (ob...
synchronized void function(TemporalChain chain) { synchronized (client) { int expectedWork = queuer.queueAddChain(chain); if (expectedWork != 0) { List results = client.flushQueue(); boolean anyRelationsAdded = false; int failedRelations = 0; for (Object object : results) { if (object instanceof Exception) { Exception ...
/** * Add the temporal relations for the given chain to europa. * Unknown nodes are skipped in the chain. * @param timepointConstraint */
Add the temporal relations for the given chain to europa. Unknown nodes are skipped in the chain
addChain
{ "repo_name": "nasa/OpenSPIFe", "path": "gov.nasa.arc.spife.europa/src/gov/nasa/arc/spife/europa/Europa.java", "license": "apache-2.0", "size": 40804 }
[ "gov.nasa.ensemble.core.model.plan.constraints.TemporalChain", "java.util.List" ]
import gov.nasa.ensemble.core.model.plan.constraints.TemporalChain; import java.util.List;
import gov.nasa.ensemble.core.model.plan.constraints.*; import java.util.*;
[ "gov.nasa.ensemble", "java.util" ]
gov.nasa.ensemble; java.util;
1,711,526
void onUpdate(Vector x, Vector v);
void onUpdate(Vector x, Vector v);
/** * Notifies the occurrence of another frame of the physics simulation. This is called after * the current frame's values have been calculated. * * @param x The position of the object. * @param v The velocity of the object. */
Notifies the occurrence of another frame of the physics simulation. This is called after the current frame's values have been calculated
onUpdate
{ "repo_name": "material-motion/physics-android", "path": "library/src/main/java/com/google/android/material/motion/physics/Integrator.java", "license": "apache-2.0", "size": 10343 }
[ "com.google.android.material.motion.physics.math.Vector" ]
import com.google.android.material.motion.physics.math.Vector;
import com.google.android.material.motion.physics.math.*;
[ "com.google.android" ]
com.google.android;
1,937,796
protected TrackerFactory<?> createDefaultTrackerFactory() { return TimeDurationTracker.FACTORY; }
TrackerFactory<?> function() { return TimeDurationTracker.FACTORY; }
/** * A factory method for getting the default {@link TrackerFactory}. * * @return The default {@link TrackerFactory}, never <tt>null</tt>. */
A factory method for getting the default <code>TrackerFactory</code>
createDefaultTrackerFactory
{ "repo_name": "bhuvi3/stajistics", "path": "stajistics-core/src/main/java/org/stajistics/configuration/DefaultStatsConfigBuilder.java", "license": "apache-2.0", "size": 6748 }
[ "org.stajistics.tracker.TrackerFactory", "org.stajistics.tracker.span.TimeDurationTracker" ]
import org.stajistics.tracker.TrackerFactory; import org.stajistics.tracker.span.TimeDurationTracker;
import org.stajistics.tracker.*; import org.stajistics.tracker.span.*;
[ "org.stajistics.tracker" ]
org.stajistics.tracker;
2,802,334
@ApiModelProperty(example = "json_fault.xml", required = true, value = "") public String getName() { return name; }
@ApiModelProperty(example = STR, required = true, value = "") String function() { return name; }
/** * Get name * @return name **/
Get name
getName
{ "repo_name": "jaadds/product-apim", "path": "sample-scenarios/clients/admin/src/main/java/org/wso2/carbon/apimgt/samples/utils/admin/rest/client/model/MediationInfo.java", "license": "apache-2.0", "size": 3737 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
296,692
public KeyStore getEncryptionKeyStore() { if (encryptionWSSCrypto != null) { return encryptionWSSCrypto.getKeyStore(); } return null; }
KeyStore function() { if (encryptionWSSCrypto != null) { return encryptionWSSCrypto.getKeyStore(); } return null; }
/** * Returns the encryption keystore * * @return A keystore for encryption operation */
Returns the encryption keystore
getEncryptionKeyStore
{ "repo_name": "asoldano/wss4j", "path": "ws-security-stax/src/main/java/org/apache/wss4j/stax/ext/WSSSecurityProperties.java", "license": "apache-2.0", "size": 35117 }
[ "java.security.KeyStore" ]
import java.security.KeyStore;
import java.security.*;
[ "java.security" ]
java.security;
2,346,405
void showStatusMessage(RefactoringStatus status);
void showStatusMessage(RefactoringStatus status);
/** * Show information message into bottom of view. * * @param status status of move operation */
Show information message into bottom of view
showStatusMessage
{ "repo_name": "sleshchenko/che", "path": "plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/RenameView.java", "license": "epl-1.0", "size": 4576 }
[ "org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringStatus" ]
import org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringStatus;
import org.eclipse.che.ide.ext.java.shared.dto.refactoring.*;
[ "org.eclipse.che" ]
org.eclipse.che;
1,240,214
public static void addInt(Element element, String tagName, int value) { StructuredDocument structuredDocument = element.getRoot(); Element childElement = structuredDocument.createElement(tagName, Integer.toString(value)); element.appendChild(childElement); }
static void function(Element element, String tagName, int value) { StructuredDocument structuredDocument = element.getRoot(); Element childElement = structuredDocument.createElement(tagName, Integer.toString(value)); element.appendChild(childElement); }
/** * Add an Element with the specified tagname and value (converted to a String) * * @param element Parent Element that the new element will be added to * @param tagName TagName to be used for the created Child Element * @param value The value that will be stored in the Element as a String ...
Add an Element with the specified tagname and value (converted to a String)
addInt
{ "repo_name": "johnjianfang/jxse", "path": "src/main/java/net/jxta/util/documentSerializable/DocumentSerializableUtilities.java", "license": "apache-2.0", "size": 24377 }
[ "net.jxta.document.Element", "net.jxta.document.StructuredDocument" ]
import net.jxta.document.Element; import net.jxta.document.StructuredDocument;
import net.jxta.document.*;
[ "net.jxta.document" ]
net.jxta.document;
1,514,279
protected ECPoint decompressPoint(int yTilde, BigInteger X1) { ECFieldElement x = fromBigInteger(X1), y = null; if (x.isZero()) { y = b.sqrt(); } else { ECFieldElement beta = x.square().invert().multiply(b).add(a).add(x); ECFiel...
ECPoint function(int yTilde, BigInteger X1) { ECFieldElement x = fromBigInteger(X1), y = null; if (x.isZero()) { y = b.sqrt(); } else { ECFieldElement beta = x.square().invert().multiply(b).add(a).add(x); ECFieldElement z = solveQuadraticEquation(beta); if (z != null) { if (z.testBitZero() != (yTilde == 1)) { z = z.add...
/** * Decompresses a compressed point P = (xp, yp) (X9.62 s 4.2.2). * * @param yTilde * ~yp, an indication bit for the decompression of yp. * @param X1 * The field element xp. * @return the decompressed point. */
Decompresses a compressed point P = (xp, yp) (X9.62 s 4.2.2)
decompressPoint
{ "repo_name": "onessimofalconi/bc-java", "path": "core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT163R2Curve.java", "license": "mit", "size": 4983 }
[ "java.math.BigInteger", "org.bouncycastle.math.ec.ECFieldElement", "org.bouncycastle.math.ec.ECPoint" ]
import java.math.BigInteger; import org.bouncycastle.math.ec.ECFieldElement; import org.bouncycastle.math.ec.ECPoint;
import java.math.*; import org.bouncycastle.math.ec.*;
[ "java.math", "org.bouncycastle.math" ]
java.math; org.bouncycastle.math;
679,030
public static ImmutableCollection<Path> getDirectoryContents( AbsPath root, ImmutableCollection<PathMatcher> ignores, Path pathRelativeToProjectRoot) throws IOException { Path path = getPathForRelativePath(root, pathRelativeToProjectRoot); try (DirectoryStream<Path> stream = Files.newDirectoryStre...
static ImmutableCollection<Path> function( AbsPath root, ImmutableCollection<PathMatcher> ignores, Path pathRelativeToProjectRoot) throws IOException { Path path = getPathForRelativePath(root, pathRelativeToProjectRoot); try (DirectoryStream<Path> stream = Files.newDirectoryStream(path)) { return FluentIterable.from(st...
/** * Gets a list of paths of the contents of the given directory, obeying the ignores. All paths are * relative to the root of this view. */
Gets a list of paths of the contents of the given directory, obeying the ignores. All paths are relative to the root of this view
getDirectoryContents
{ "repo_name": "JoelMarcey/buck", "path": "src/com/facebook/buck/io/filesystem/impl/ProjectFilesystemUtils.java", "license": "apache-2.0", "size": 38321 }
[ "com.facebook.buck.core.filesystems.AbsPath", "com.facebook.buck.io.file.MorePaths", "com.facebook.buck.io.file.PathMatcher", "com.google.common.collect.FluentIterable", "com.google.common.collect.ImmutableCollection", "java.io.IOException", "java.nio.file.DirectoryStream", "java.nio.file.Files", "j...
import com.facebook.buck.core.filesystems.AbsPath; import com.facebook.buck.io.file.MorePaths; import com.facebook.buck.io.file.PathMatcher; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableCollection; import java.io.IOException; import java.nio.file.DirectoryStream; import jav...
import com.facebook.buck.core.filesystems.*; import com.facebook.buck.io.file.*; import com.google.common.collect.*; import java.io.*; import java.nio.file.*; import java.util.*;
[ "com.facebook.buck", "com.google.common", "java.io", "java.nio", "java.util" ]
com.facebook.buck; com.google.common; java.io; java.nio; java.util;
208,944
protected void restoreBest(Solution<V, T> solution) { info("Best solution restored."); solution.restoreBest(); iLastImprovingIter = -1; }
void function(Solution<V, T> solution) { info(STR); solution.restoreBest(); iLastImprovingIter = -1; }
/** * restore best ever found solution * @param solution current solution */
restore best ever found solution
restoreBest
{ "repo_name": "UniTime/cpsolver", "path": "src/org/cpsolver/ifs/algorithms/SimulatedAnnealing.java", "license": "lgpl-3.0", "size": 19116 }
[ "org.cpsolver.ifs.solution.Solution" ]
import org.cpsolver.ifs.solution.Solution;
import org.cpsolver.ifs.solution.*;
[ "org.cpsolver.ifs" ]
org.cpsolver.ifs;
502,846
public final SecondaryDatabase getShipmentByPartDatabase() { return shipmentByPartDb; }
final SecondaryDatabase function() { return shipmentByPartDb; }
/** * Return the shipment-by-part index. */
Return the shipment-by-part index
getShipmentByPartDatabase
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/examples/collections/ship/index/SampleDatabase.java", "license": "apache-2.0", "size": 11691 }
[ "com.sleepycat.je.SecondaryDatabase" ]
import com.sleepycat.je.SecondaryDatabase;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
2,746,535
public void writePolygon(Polygon poly, Object output) throws IOException { encode(createPolygon(poly), output); } /** * Writes a Polygon as GeoJSON. * * <p>This method calls through to {@link #writePolygon(Polygon, Object)}
void function(Polygon poly, Object output) throws IOException { encode(createPolygon(poly), output); } /** * Writes a Polygon as GeoJSON. * * <p>This method calls through to {@link #writePolygon(Polygon, Object)}
/** * Writes a Polygon as GeoJSON. * * @param poly The polygon. * @param output The output. See {@link GeoJSONUtil#toWriter(Object)} for details. */
Writes a Polygon as GeoJSON
writePolygon
{ "repo_name": "geotools/geotools", "path": "modules/unsupported/geojson/src/main/java/org/geotools/geojson/geom/GeometryJSON.java", "license": "lgpl-2.1", "size": 24452 }
[ "java.io.IOException", "org.locationtech.jts.geom.Polygon" ]
import java.io.IOException; import org.locationtech.jts.geom.Polygon;
import java.io.*; import org.locationtech.jts.geom.*;
[ "java.io", "org.locationtech.jts" ]
java.io; org.locationtech.jts;
1,906,291
public static LinkedHashMap<String, String> getMacros(){ if(getString(RUN_MACROS) != null){ try { LinkedHashMap<String, String> macros = new LinkedHashMap<String, String>(); List<String[]> items = StringTableFieldEditor.decodeStringTable(getString(RUN_MACROS)); ...
static LinkedHashMap<String, String> function(){ if(getString(RUN_MACROS) != null){ try { LinkedHashMap<String, String> macros = new LinkedHashMap<String, String>(); List<String[]> items = StringTableFieldEditor.decodeStringTable(getString(RUN_MACROS)); for(String[] item : items){ if(item.length == 2) macros.put(item[0...
/**Get the macros map from preference store. * @return the macros map. null if failed to get macros from preference store. */
Get the macros map from preference store
getMacros
{ "repo_name": "css-iter/cs-studio", "path": "applications/opibuilder/opibuilder-plugins/org.csstudio.opibuilder/src/org/csstudio/opibuilder/preferences/PreferencesHelper.java", "license": "epl-1.0", "size": 21507 }
[ "java.util.LinkedHashMap", "java.util.List", "java.util.logging.Level", "org.csstudio.opibuilder.OPIBuilderPlugin" ]
import java.util.LinkedHashMap; import java.util.List; import java.util.logging.Level; import org.csstudio.opibuilder.OPIBuilderPlugin;
import java.util.*; import java.util.logging.*; import org.csstudio.opibuilder.*;
[ "java.util", "org.csstudio.opibuilder" ]
java.util; org.csstudio.opibuilder;
2,862,484
@SideOnly(Side.CLIENT) @Deprecated // Doesn't work at all. public void registerVillagerSkin(int villagerId, ResourceLocation villagerSkin) { if (newVillagers == null) { newVillagers = Maps.newHashMap(); } newVillagers.put(villagerId, villagerSkin); }
@SideOnly(Side.CLIENT) @Deprecated void function(int villagerId, ResourceLocation villagerSkin) { if (newVillagers == null) { newVillagers = Maps.newHashMap(); } newVillagers.put(villagerId, villagerSkin); }
/** * Register a new skin for a villager type * * @param villagerId * @param villagerSkin */
Register a new skin for a villager type
registerVillagerSkin
{ "repo_name": "seblund/Dissolvable", "path": "build/tmp/recompileMc/sources/net/minecraftforge/fml/common/registry/VillagerRegistry.java", "license": "gpl-3.0", "size": 26372 }
[ "com.google.common.collect.Maps", "net.minecraft.util.ResourceLocation", "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import com.google.common.collect.Maps; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import com.google.common.collect.*; import net.minecraft.util.*; import net.minecraftforge.fml.relauncher.*;
[ "com.google.common", "net.minecraft.util", "net.minecraftforge.fml" ]
com.google.common; net.minecraft.util; net.minecraftforge.fml;
731,277
public Enumeration<Operaction> enumerateOperaction() { return Collections.enumeration(_operactionList); }
Enumeration<Operaction> function() { return Collections.enumeration(_operactionList); }
/** * Method enumerateOperaction. * * @return an Enumeration over all possible elements of this collection */
Method enumerateOperaction
enumerateOperaction
{ "repo_name": "dzonekl/oss2nms", "path": "plugins/com.netxforge.oss2.model/src/com/netxforge/oss2/xml/event/Event.java", "license": "gpl-3.0", "size": 46316 }
[ "java.util.Collections", "java.util.Enumeration" ]
import java.util.Collections; import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,578,529
int deleteByExample(MappingStockBkExample example);
int deleteByExample(MappingStockBkExample example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table mapping_stock_bk * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table mapping_stock_bk
deleteByExample
{ "repo_name": "gubaijin/gplucky", "path": "common/src/main/java/com/gplucky/mybatis/dao/MappingStockBkMapper.java", "license": "apache-2.0", "size": 2828 }
[ "com.gplucky.mybatis.model.MappingStockBkExample" ]
import com.gplucky.mybatis.model.MappingStockBkExample;
import com.gplucky.mybatis.model.*;
[ "com.gplucky.mybatis" ]
com.gplucky.mybatis;
2,374,402
public byte[] getValue(byte[] key) { return getValue(new ImmutableBytesWritable(key)); }
byte[] function(byte[] key) { return getValue(new ImmutableBytesWritable(key)); }
/** * Getter for accessing the metadata associated with the key * * @param key The key. * @return The value. * @see #values */
Getter for accessing the metadata associated with the key
getValue
{ "repo_name": "cloud-software-foundation/c5", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java", "license": "apache-2.0", "size": 51834 }
[ "org.apache.hadoop.hbase.io.ImmutableBytesWritable" ]
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.hbase.io.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,983,850
@Test public void testChangePermissionsRWAToRWRW() throws Exception { root = newRootOmeroClient(); IAdminPrx prx = root.getSession().getAdminService(); String uuid = UUID.randomUUID().toString(); // First group rwr--- ExperimenterGroup g = new ExperimenterGroupI(); ...
void function() throws Exception { root = newRootOmeroClient(); IAdminPrx prx = root.getSession().getAdminService(); String uuid = UUID.randomUUID().toString(); ExperimenterGroup g = new ExperimenterGroupI(); g.setName(omero.rtypes.rstring(uuid)); g.setLdap(omero.rtypes.rbool(false)); String representation = STR; g.get...
/** * Tests to modify the permissions of a group. Creates a <code>rwr---</code> * group and increases the permissions to <code>rwrw--</code> then back * again to <code>rwr--</code>. This tests the * <code>ChangePermissions</code> method. * * @throws Exception * Thrown if a...
Tests to modify the permissions of a group. Creates a <code>rwr---</code> group and increases the permissions to <code>rwrw--</code> then back again to <code>rwr--</code>. This tests the <code>ChangePermissions</code> method
testChangePermissionsRWAToRWRW
{ "repo_name": "simleo/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/AdminServiceTest.java", "license": "gpl-2.0", "size": 85916 }
[ "java.util.UUID", "org.testng.Assert" ]
import java.util.UUID; import org.testng.Assert;
import java.util.*; import org.testng.*;
[ "java.util", "org.testng" ]
java.util; org.testng;
2,247,137
public DropboxDelResult del(String remotePath) throws DropboxException { try { client.files().deleteV2(remotePath); } catch (DbxException e) { throw new DropboxException(remotePath + " does not exist or cannot obtain metadata", e); } return new DropboxDelResul...
DropboxDelResult function(String remotePath) throws DropboxException { try { client.files().deleteV2(remotePath); } catch (DbxException e) { throw new DropboxException(remotePath + STR, e); } return new DropboxDelResult(remotePath); }
/** * Delete every files and subdirectories inside the remote directory. In * case the remotePath is a file, delete the file. * * @param remotePath the remote location to delete * @return a result object with the result of the delete operation. * @throws DropboxException */
Delete every files and subdirectories inside the remote directory. In case the remotePath is a file, delete the file
del
{ "repo_name": "rmarting/camel", "path": "components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/core/DropboxAPIFacade.java", "license": "apache-2.0", "size": 16377 }
[ "com.dropbox.core.DbxException", "org.apache.camel.component.dropbox.dto.DropboxDelResult", "org.apache.camel.component.dropbox.util.DropboxException" ]
import com.dropbox.core.DbxException; import org.apache.camel.component.dropbox.dto.DropboxDelResult; import org.apache.camel.component.dropbox.util.DropboxException;
import com.dropbox.core.*; import org.apache.camel.component.dropbox.dto.*; import org.apache.camel.component.dropbox.util.*;
[ "com.dropbox.core", "org.apache.camel" ]
com.dropbox.core; org.apache.camel;
2,801,461
public static Integer createServerCacheTwo(Integer maxThreads) throws Exception { new InstantiatorPropogationDUnitTest("temp") .createCache(new Properties()); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setMirrorType(MirrorType....
static Integer function(Integer maxThreads) throws Exception { new InstantiatorPropogationDUnitTest("temp") .createCache(new Properties()); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setMirrorType(MirrorType.KEYS_VALUES); RegionAttributes attrs = factory.create...
/** * This method creates the server cache * * @param maxThreads * @return * @throws Exception */
This method creates the server cache
createServerCacheTwo
{ "repo_name": "papicella/snappy-store", "path": "tests/core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/InstantiatorPropogationDUnitTest.java", "license": "apache-2.0", "size": 49120 }
[ "com.gemstone.gemfire.cache.AttributesFactory", "com.gemstone.gemfire.cache.MirrorType", "com.gemstone.gemfire.cache.RegionAttributes", "com.gemstone.gemfire.cache.Scope", "com.gemstone.gemfire.cache.util.BridgeServer", "com.gemstone.gemfire.internal.AvailablePort", "java.util.Properties" ]
import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.MirrorType; import com.gemstone.gemfire.cache.RegionAttributes; import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.cache.util.BridgeServer; import com.gemstone.gemfire.internal.AvailablePort; import java.util.Proper...
import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.cache.util.*; import com.gemstone.gemfire.internal.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
1,343,044
public static OrientGraph getGraph(final boolean autoStartTx, OModifiableBoolean shouldBeShutDown) { final ODatabaseDocument database = ODatabaseRecordThreadLocal.INSTANCE.get(); final OrientBaseGraph result = OrientBaseGraph.getActiveGraph(); if (result != null && (result instanceof OrientGraph)) { ...
static OrientGraph function(final boolean autoStartTx, OModifiableBoolean shouldBeShutDown) { final ODatabaseDocument database = ODatabaseRecordThreadLocal.INSTANCE.get(); final OrientBaseGraph result = OrientBaseGraph.getActiveGraph(); if (result != null && (result instanceof OrientGraph)) { final ODatabaseDocumentTx ...
/** * Returns a Transactional OrientGraph implementation from the current database in thread local. * * @param autoStartTx * Whether returned graph will start transaction before each operation till commit automatically or user should do it * explicitly be calling {@link OrientGraph#getR...
Returns a Transactional OrientGraph implementation from the current database in thread local
getGraph
{ "repo_name": "mmacfadden/orientdb", "path": "graphdb/src/main/java/com/orientechnologies/orient/graph/sql/OGraphCommandExecutorSQLFactory.java", "license": "apache-2.0", "size": 10924 }
[ "com.orientechnologies.common.types.OModifiableBoolean", "com.orientechnologies.orient.core.db.ODatabaseDocumentInternal", "com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal", "com.orientechnologies.orient.core.db.document.ODatabaseDocument", "com.orientechnologies.orient.core.db.document.ODat...
import com.orientechnologies.common.types.OModifiableBoolean; import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal; import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal; import com.orientechnologies.orient.core.db.document.ODatabaseDocument; import com.orientechnologies.orient.core.db...
import com.orientechnologies.common.types.*; import com.orientechnologies.orient.core.db.*; import com.orientechnologies.orient.core.db.document.*; import com.tinkerpop.blueprints.impls.orient.*;
[ "com.orientechnologies.common", "com.orientechnologies.orient", "com.tinkerpop.blueprints" ]
com.orientechnologies.common; com.orientechnologies.orient; com.tinkerpop.blueprints;
1,630,559
public String createPreview(CIVersion version, PreviewStyle style, boolean showDeleted);
String function(CIVersion version, PreviewStyle style, boolean showDeleted);
/** * Creates a preview for a version * @param version * @return */
Creates a preview for a version
createPreview
{ "repo_name": "fregaham/KiWi", "path": "src/action/kiwi/api/revision/UpdateTextContentService.java", "license": "bsd-3-clause", "size": 3419 }
[ "kiwi.model.revision.CIVersion" ]
import kiwi.model.revision.CIVersion;
import kiwi.model.revision.*;
[ "kiwi.model.revision" ]
kiwi.model.revision;
1,107,111
public void resumeOcrEngine() { Log.d(TAG, "resumeOcrEngine()"); // This method is called when Tesseract has already been successfully // initialized, so set // isEngineReady = true here. if (mBaseApi != null) { if (mCaptureActivityHandler != null) { ...
void function() { Log.d(TAG, STR); if (mBaseApi != null) { if (mCaptureActivityHandler != null) { mCaptureActivityHandler.startDecode(mBaseApi); } mBaseApi.setPageSegMode(PAGE_SEGMENTATION_MODE); mBaseApi.setVariable(TessBaseAPI.VAR_CHAR_BLACKLIST, ""); mBaseApi.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, CHARACTER_WHI...
/** * Method to start or restart recognition after the OCR engine has been * initialized, or after the app regains focus. Sets state related settings * and OCR engine parameters, and requests camera initialization. */
Method to start or restart recognition after the OCR engine has been initialized, or after the app regains focus. Sets state related settings and OCR engine parameters, and requests camera initialization
resumeOcrEngine
{ "repo_name": "luklanis/esr-scanner", "path": "src/main/java/ch/luklanis/esscan/ime/ScannerIME.java", "license": "apache-2.0", "size": 21930 }
[ "android.util.Log", "com.googlecode.tesseract.android.TessBaseAPI" ]
import android.util.Log; import com.googlecode.tesseract.android.TessBaseAPI;
import android.util.*; import com.googlecode.tesseract.android.*;
[ "android.util", "com.googlecode.tesseract" ]
android.util; com.googlecode.tesseract;
2,042,669
public String getModuleLicense() { for (Annotation ann : moduleDescriptor.getAnnotations()) { if (ann.getName().equals("license")) { List<String> args = ann.getPositionalArguments(); if (args != null && !args.isEmpty()) { return removeQuotes(ar...
String function() { for (Annotation ann : moduleDescriptor.getAnnotations()) { if (ann.getName().equals(STR)) { List<String> args = ann.getPositionalArguments(); if (args != null && !args.isEmpty()) { return removeQuotes(args.get(0)); } } } return null; }
/** * Gets the module license * @return The module version, or null if no version could be found */
Gets the module license
getModuleLicense
{ "repo_name": "lucaswerkmeister/ceylon-compiler", "path": "src/com/redhat/ceylon/compiler/ModuleDescriptorReader.java", "license": "gpl-2.0", "size": 6761 }
[ "com.redhat.ceylon.compiler.typechecker.model.Annotation", "java.util.List" ]
import com.redhat.ceylon.compiler.typechecker.model.Annotation; import java.util.List;
import com.redhat.ceylon.compiler.typechecker.model.*; import java.util.*;
[ "com.redhat.ceylon", "java.util" ]
com.redhat.ceylon; java.util;
1,618,065
public void setDate(Date date) { this.date = GlobalConfiguration.MEDIUM_DATE_FORMAT.format(date); }
void function(Date date) { this.date = GlobalConfiguration.MEDIUM_DATE_FORMAT.format(date); }
/** * Set date from java date object */
Set date from java date object
setDate
{ "repo_name": "gcleenew/RottenCave", "path": "core/src/org/isep/rottencave/score/PersonalScore.java", "license": "gpl-2.0", "size": 1052 }
[ "java.util.Date", "org.isep.rottencave.GlobalConfiguration" ]
import java.util.Date; import org.isep.rottencave.GlobalConfiguration;
import java.util.*; import org.isep.rottencave.*;
[ "java.util", "org.isep.rottencave" ]
java.util; org.isep.rottencave;
2,867,040
public T caseWheelSystem(WheelSystem object) { return null; }
T function(WheelSystem object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Wheel System</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of in...
Returns the result of interpreting the object as an instance of 'Wheel System'. This implementation returns null; returning a non-null result will terminate the switch.
caseWheelSystem
{ "repo_name": "RobotML/RobotML-SDK-Juno", "path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/util/RobotMLSwitch.java", "license": "epl-1.0", "size": 53133 }
[ "org.eclipse.papyrus.RobotML" ]
import org.eclipse.papyrus.RobotML;
import org.eclipse.papyrus.*;
[ "org.eclipse.papyrus" ]
org.eclipse.papyrus;
971,743
Collection<InflightExchange> browse();
Collection<InflightExchange> browse();
/** * A <i>read-only</i> browser of the {@link InflightExchange}s that are currently inflight. */
A read-only browser of the <code>InflightExchange</code>s that are currently inflight
browse
{ "repo_name": "DariusX/camel", "path": "core/camel-api/src/main/java/org/apache/camel/spi/InflightRepository.java", "license": "apache-2.0", "size": 6312 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,437,752
EReference getIsA__SingleIsA_1();
EReference getIsA__SingleIsA_1();
/** * Returns the meta object for the containment reference list '{@link cruise.umple.umple.IsA_#getSingleIsA_1 <em>Single Is A1</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Single Is A1</em>'. * @see cruise.umple.umple.IsA_#g...
Returns the meta object for the containment reference list '<code>cruise.umple.umple.IsA_#getSingleIsA_1 Single Is A1</code>'.
getIsA__SingleIsA_1
{ "repo_name": "ahmedvc/umple", "path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java", "license": "mit", "size": 485842 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
392,188
@Override public void cacheGroupsAdd(List<String> groups) throws IOException { for(String group: groups) { if(group.length() == 0) { // better safe than sorry (should never happen) } else if(group.charAt(0) == '@') { if(!NetgroupCache.isCached(group)) { NetgroupCache.add(gr...
void function(List<String> groups) throws IOException { for(String group: groups) { if(group.length() == 0) { } else if(group.charAt(0) == '@') { if(!NetgroupCache.isCached(group)) { NetgroupCache.add(group, getUsersForNetgroup(group)); } } else { } } }
/** * Add a group to cache, only netgroups are cached * * @param groups list of group names to add to cache */
Add a group to cache, only netgroups are cached
cacheGroupsAdd
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.java", "license": "apache-2.0", "size": 4273 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.security.NetgroupCache" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.security.NetgroupCache;
import java.io.*; import java.util.*; import org.apache.hadoop.security.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,685,905
private void assertCommandSuccess(String inputCommand, String expectedMessage, ReadOnlyTaskManager expectedAddressBook, List<? extends ReadOnlyTask> expectedShownList) { assertCommandBehavior(false, inputCommand, expectedMessage, ex...
void function(String inputCommand, String expectedMessage, ReadOnlyTaskManager expectedAddressBook, List<? extends ReadOnlyTask> expectedShownList) { assertCommandBehavior(false, inputCommand, expectedMessage, expectedAddressBook, expectedShownList); }
/** * Executes the command, confirms that a CommandException is not thrown and that the result message is correct. * Also confirms that both the 'address book' and the 'last shown list' are as specified. * @see #assertCommandBehavior(boolean, String, String, ReadOnlyTaskManager, List) */
Executes the command, confirms that a CommandException is not thrown and that the result message is correct. Also confirms that both the 'address book' and the 'last shown list' are as specified
assertCommandSuccess
{ "repo_name": "CS2103JAN2017-T09-B3/main", "path": "src/test/java/seedu/mypotato/logic/LogicManagerTest.java", "license": "mit", "size": 22712 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,679,310
@Test public void invalidCredentials() throws Exception { String wrongUser = USERNAME + "!"; String wrongPass = PASSWORD + "!"; String ahdr = "Basic " + Base64.encodeBase64String( (USERNAME + ":" + PASSWORD).getBytes(StandardCharsets.UTF_8)); stubFor(get(urlEqual...
void function() throws Exception { String wrongUser = USERNAME + "!"; String wrongPass = PASSWORD + "!"; String ahdr = STR + Base64.encodeBase64String( (USERNAME + ":" + PASSWORD).getBytes(StandardCharsets.UTF_8)); stubFor(get(urlEqualTo(AUTHENTICATE)) .willReturn(aResponse() .withHeader(STR, STRSTR\STRAuthorizationSTR...
/** * Tests if the plugin can handle failed authentication * @throws Exception if anything goes wrong */
Tests if the plugin can handle failed authentication
invalidCredentials
{ "repo_name": "michel-kraemer/gradle-download-task", "path": "src/test/java/de/undercouch/gradle/tasks/download/AuthenticationTest.java", "license": "apache-2.0", "size": 6963 }
[ "com.github.tomakehurst.wiremock.client.WireMock", "java.nio.charset.StandardCharsets", "org.apache.commons.codec.binary.Base64" ]
import com.github.tomakehurst.wiremock.client.WireMock; import java.nio.charset.StandardCharsets; import org.apache.commons.codec.binary.Base64;
import com.github.tomakehurst.wiremock.client.*; import java.nio.charset.*; import org.apache.commons.codec.binary.*;
[ "com.github.tomakehurst", "java.nio", "org.apache.commons" ]
com.github.tomakehurst; java.nio; org.apache.commons;
424,466
public static boolean isDouble(final Field field) { AjahUtils.requireParam(field, "field"); return double.class.isAssignableFrom(field.getType()) || Double.class.isAssignableFrom(field.getType()); }
static boolean function(final Field field) { AjahUtils.requireParam(field, "field"); return double.class.isAssignableFrom(field.getType()) Double.class.isAssignableFrom(field.getType()); }
/** * Checks to see if the field's type is a double. * * @param field * The field to check the type of, required. * @return true if the field's type is a double */
Checks to see if the field's type is a double
isDouble
{ "repo_name": "efsavage/ajah", "path": "ajah-util/src/main/java/com/ajah/util/reflect/IntrospectionUtils.java", "license": "apache-2.0", "size": 7149 }
[ "com.ajah.util.AjahUtils", "java.lang.reflect.Field" ]
import com.ajah.util.AjahUtils; import java.lang.reflect.Field;
import com.ajah.util.*; import java.lang.reflect.*;
[ "com.ajah.util", "java.lang" ]
com.ajah.util; java.lang;
1,245,564
protected void updateProblemIndication() { if (updateProblemIndication) { BasicDiagnostic diagnostic = new BasicDiagnostic (Diagnostic.OK, "org.roboid.robot.model.editor", 0, null, new Object [] { editingDomain.getResourceSet() }); for (Diagnostic childDiagnostic : resourceT...
void function() { if (updateProblemIndication) { BasicDiagnostic diagnostic = new BasicDiagnostic (Diagnostic.OK, STR, 0, null, new Object [] { editingDomain.getResourceSet() }); for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { if (childDiagnostic.getSeverity() != Diagnostic.OK) { diagnostic.add(ch...
/** * Updates the problems indication with the information described in the specified diagnostic. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Updates the problems indication with the information described in the specified diagnostic.
updateProblemIndication
{ "repo_name": "roboidstudio/embedded", "path": "org.roboid.robot.model.editor/src/org/roboid/robot/presentation/RobotEditor.java", "license": "lgpl-2.1", "size": 57235 }
[ "org.eclipse.core.runtime.CoreException", "org.eclipse.emf.common.ui.editor.ProblemEditorPart", "org.eclipse.emf.common.util.BasicDiagnostic", "org.eclipse.emf.common.util.Diagnostic", "org.eclipse.ui.PartInitException" ]
import org.eclipse.core.runtime.CoreException; import org.eclipse.emf.common.ui.editor.ProblemEditorPart; import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.ui.PartInitException;
import org.eclipse.core.runtime.*; import org.eclipse.emf.common.ui.editor.*; import org.eclipse.emf.common.util.*; import org.eclipse.ui.*;
[ "org.eclipse.core", "org.eclipse.emf", "org.eclipse.ui" ]
org.eclipse.core; org.eclipse.emf; org.eclipse.ui;
1,047,015
public void featureSelection(Collection<Integer> trainIndices, int n) throws InterruptedException, ExecutionException{ System.out.println("begin feature selection"); //remove useless columns: removeAllZeroColumns(trainIndices); assert(n <= shapeletFeatureMatrix[0].length); if(n>shapeletFeatureMatrix[0].len...
void function(Collection<Integer> trainIndices, int n) throws InterruptedException, ExecutionException{ System.out.println(STR); removeAllZeroColumns(trainIndices); assert(n <= shapeletFeatureMatrix[0].length); if(n>shapeletFeatureMatrix[0].length){ return; } Shapelet[] newShapeletsOfColumns = new Shapelet[n]; TreeSet<...
/*** * selects and keeps the features that have the highest information gain, this will reduce the number of columns to n * @param trainIndices the rows (sequence indices) that are to be considered for feature selection * @param n the number of features to keep * @throws ExecutionException * @throws Interrup...
selects and keeps the features that have the highest information gain, this will reduce the number of columns to n
featureSelection
{ "repo_name": "ToshRaka/DataMiningResearch", "path": "stife/src/shapelet/extraction/ShapeletFeatureMatrix.java", "license": "gpl-2.0", "size": 8831 }
[ "java.util.Collection", "java.util.Iterator", "java.util.TreeSet", "java.util.concurrent.ExecutionException" ]
import java.util.Collection; import java.util.Iterator; import java.util.TreeSet; import java.util.concurrent.ExecutionException;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,714,932
private int statusToInt(final ApiResponse response) { return Integer.parseInt(((ApiResponseElement) response).getValue()); }
private int statusToInt(final ApiResponse response) { return Integer.parseInt(((ApiResponseElement) response).getValue()); }
/** * Method used to return the checked state inside EXPORT REPORT. **/
Method used to return the checked state inside EXPORT REPORT
returnBooleanCheckedStatus
{ "repo_name": "tlenaic/zap-plugin", "path": "src/main/java/org/jenkinsci/plugins/zap/ZAPDriver.java", "license": "mit", "size": 157200 }
[ "org.zaproxy.clientapi.core.ApiResponse", "org.zaproxy.clientapi.core.ApiResponseElement" ]
import org.zaproxy.clientapi.core.ApiResponse; import org.zaproxy.clientapi.core.ApiResponseElement;
import org.zaproxy.clientapi.core.*;
[ "org.zaproxy.clientapi" ]
org.zaproxy.clientapi;
1,796,127
EList<SignalInterface> getSignalinterfaces();
EList<SignalInterface> getSignalinterfaces();
/** * Returns the value of the '<em><b>Signalinterfaces</b></em>' reference list. * The list contents are of type {@link edu.kit.ipd.sdq.kamp4aps.model.aPS.InterfaceRepository.SignalInterface}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Signalinterfaces</em>' reference list isn't clear,...
Returns the value of the 'Signalinterfaces' reference list. The list contents are of type <code>edu.kit.ipd.sdq.kamp4aps.model.aPS.InterfaceRepository.SignalInterface</code>. If the meaning of the 'Signalinterfaces' reference list isn't clear, there really should be more of a description here...
getSignalinterfaces
{ "repo_name": "KAMP-Research/KAMP4APS", "path": "edu.kit.ipd.sdq.kamp4aps.aps/src/edu/kit/ipd/sdq/kamp4aps/model/aPS/BusComponents/BusBox.java", "license": "apache-2.0", "size": 4998 }
[ "edu.kit.ipd.sdq.kamp4aps.model.aPS.InterfaceRepository", "org.eclipse.emf.common.util.EList" ]
import edu.kit.ipd.sdq.kamp4aps.model.aPS.InterfaceRepository; import org.eclipse.emf.common.util.EList;
import edu.kit.ipd.sdq.kamp4aps.model.*; import org.eclipse.emf.common.util.*;
[ "edu.kit.ipd", "org.eclipse.emf" ]
edu.kit.ipd; org.eclipse.emf;
1,529,934
@Test public void ensureToscaSpecExampleIsUpToDate() throws IOException { ToscaSpec spec = createFullToscaSpec(); String specAsJson = ToscaSpecImpl.OBJECT_MAPPER.writeValueAsString(spec); // The file name extension is "example" and not "json" to prevent the IDE from reformatting the file...
void function() throws IOException { ToscaSpec spec = createFullToscaSpec(); String specAsJson = ToscaSpecImpl.OBJECT_MAPPER.writeValueAsString(spec); try (InputStream expectedStream = HtmlGeneratorTest.class.getResourceAsStream(STR)) { Assert.assertEquals(IOUtils.toString(expectedStream, Charset.defaultCharset()).trim...
/** * Compare the JSON generated from the up-to-date ToscaSpec class against an example file. * <br/> * This method is not a real test but this will make sure that we always have a correct example file * that shows how a TOSCA spec JSON should look like. * * @throws IOException in case exc...
Compare the JSON generated from the up-to-date ToscaSpec class against an example file. This method is not a real test but this will make sure that we always have a correct example file that shows how a TOSCA spec JSON should look like
ensureToscaSpecExampleIsUpToDate
{ "repo_name": "ALU-CloudBand/tosca-docs-generator", "path": "src/test/java/org/tosca/docs/generators/html/HtmlGeneratorTest.java", "license": "mit", "size": 20467 }
[ "java.io.IOException", "java.io.InputStream", "java.nio.charset.Charset", "org.apache.commons.io.IOUtils", "org.junit.Assert", "org.tosca.docs.model.ToscaSpec", "org.tosca.docs.model.impl.ToscaSpecImpl" ]
import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import org.apache.commons.io.IOUtils; import org.junit.Assert; import org.tosca.docs.model.ToscaSpec; import org.tosca.docs.model.impl.ToscaSpecImpl;
import java.io.*; import java.nio.charset.*; import org.apache.commons.io.*; import org.junit.*; import org.tosca.docs.model.*; import org.tosca.docs.model.impl.*;
[ "java.io", "java.nio", "org.apache.commons", "org.junit", "org.tosca.docs" ]
java.io; java.nio; org.apache.commons; org.junit; org.tosca.docs;
381,361
@Override public CompletableFuture<T> toCompletableFuture() { CompletableFuture<T> future = addInternalCallback(new CompletableFutureCallback<T>()).getFuture(); completeFrom(future); return future; }
CompletableFuture<T> function() { CompletableFuture<T> future = addInternalCallback(new CompletableFutureCallback<T>()).getFuture(); completeFrom(future); return future; }
/** * Returns a {@link CompletableFuture} maintaining the same completion * properties as this future. Completing or cancelling the result will * complete this future also. (Note however that this is not done * atomically; if two threads race, they may leave the result in a different * state th...
Returns a <code>CompletableFuture</code> maintaining the same completion properties as this future. Completing or cancelling the result will complete this future also. (Note however that this is not done atomically; if two threads race, they may leave the result in a different state than this future.)
toCompletableFuture
{ "repo_name": "cjp39/j8stages", "path": "src/main/java/org/inferred/cjp39/j8stages/MyFuture.java", "license": "mit", "size": 41552 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,955,732
public void removeRoadSouth() { if ((this.area.TYPE != 0) && (this.area.TERRAIN > 1)) { if (this.area.TERRAIN == 3) { return; } final Plot other = this.getRelative(2); final Location bot = other.getBottomAbs(); final Location top = ...
void function() { if ((this.area.TYPE != 0) && (this.area.TERRAIN > 1)) { if (this.area.TERRAIN == 3) { return; } final Plot other = this.getRelative(2); final Location bot = other.getBottomAbs(); final Location top = this.getTopAbs(); final Location pos1 = new Location(this.area.worldname, bot.getX(), 0, top.getZ()); ...
/** * Remove the south road section of a plot<br> * - Used when a plot is merged<br> */
Remove the south road section of a plot - Used when a plot is merged
removeRoadSouth
{ "repo_name": "SilverCory/PlotSquared", "path": "Core/src/main/java/com/intellectualcrafters/plot/object/Plot.java", "license": "gpl-3.0", "size": 98015 }
[ "com.intellectualcrafters.plot.util.ChunkManager" ]
import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.*;
[ "com.intellectualcrafters.plot" ]
com.intellectualcrafters.plot;
1,262,039
EList<Cell> getNeighbors();
EList<Cell> getNeighbors();
/** * Returns the value of the '<em><b>Neighbors</b></em>' reference list. * The list contents are of type {@link vm.Cell}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Neighbors</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-us...
Returns the value of the 'Neighbors' reference list. The list contents are of type <code>vm.Cell</code>. If the meaning of the 'Neighbors' reference list isn't clear, there really should be more of a description here...
getNeighbors
{ "repo_name": "diverse-project/k3", "path": "k3-samples-incomplete/cellular_automata/org.kermeta.language.sample.cellularautomata.vm.model/src/vm/Cell.java", "license": "epl-1.0", "size": 1722 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
809,525
@Test(groups = "samples", timeOut = TIMEOUT) public void collectionCreateAndQuery() throws Exception { // CREATE a Collection DocumentCollection collection = client .createCollection(getDatabaseLink(), collectionDefinition, null).single().block() .getResource(); ...
@Test(groups = STR, timeOut = TIMEOUT) void function() throws Exception { DocumentCollection collection = client .createCollection(getDatabaseLink(), collectionDefinition, null).single().block() .getResource(); Flux<FeedResponse<DocumentCollection>> queryCollectionObservable = client.queryCollections( getDatabaseLink()...
/** * Query a Collection in an Async manner */
Query a Collection in an Async manner
collectionCreateAndQuery
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/cosmos/microsoft-azure-cosmos-examples/src/test/java/com/azure/data/cosmos/rx/examples/CollectionCRUDAsyncAPITest.java", "license": "mit", "size": 17016 }
[ "com.azure.data.cosmos.FeedResponse", "com.azure.data.cosmos.internal.DocumentCollection", "java.util.concurrent.CountDownLatch", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.testng.annotations.Test" ]
import com.azure.data.cosmos.FeedResponse; import com.azure.data.cosmos.internal.DocumentCollection; import java.util.concurrent.CountDownLatch; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.testng.annotations.Test;
import com.azure.data.cosmos.*; import com.azure.data.cosmos.internal.*; import java.util.concurrent.*; import org.hamcrest.*; import org.testng.annotations.*;
[ "com.azure.data", "java.util", "org.hamcrest", "org.testng.annotations" ]
com.azure.data; java.util; org.hamcrest; org.testng.annotations;
835,404
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Flux<ByteBuffer>>> createWithResponseAsync( String resourceGroupName, String profileName, String endpointName, EndpointInner endpoint) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String profileName, String endpointName, EndpointInner endpoint) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return ...
/** * Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and * profile. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the CDN profile which is unique within the resour...
Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile
createWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EndpointsClientImpl.java", "license": "mit", "size": 169310 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.cdn.fluent.models.EndpointInner", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.cdn.fluent.models.EndpointInner; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.cdn.fluent.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
2,602,155