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
private void refresh() { if (inRefresh) return; inRefresh = true; try { int selectedRow = connectionsTable.getSelectedRow(); Object[][] data = initTableModel(); if (selectedRow >= 0) { connectionsTable.getSelectionModel().setSelectionInterval(selectedRow, selectedRow); currentConnection = conn...
void function() { if (inRefresh) return; inRefresh = true; try { int selectedRow = connectionsTable.getSelectedRow(); Object[][] data = initTableModel(); if (selectedRow >= 0) { connectionsTable.getSelectionModel().setSelectionInterval(selectedRow, selectedRow); currentConnection = connectionList.get(selectedRow); } el...
/** * Refreshes the dialog after model changes. */
Refreshes the dialog after model changes
refresh
{ "repo_name": "domdorn/Jailer", "path": "src/main/net/sf/jailer/ui/DbConnectionDialog.java", "license": "apache-2.0", "size": 33166 }
[ "java.awt.Component", "javax.swing.table.TableColumn" ]
import java.awt.Component; import javax.swing.table.TableColumn;
import java.awt.*; import javax.swing.table.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,187,961
private final boolean isResolvable(Object base) { return base instanceof Map<?,?>; }
final boolean function(Object base) { return base instanceof Map<?,?>; }
/** * Test whether the given base should be resolved by this ELResolver. * * @param base * The bean to analyze. * @param property * The name of the property to analyze. Will be coerced to a String. * @return base instanceof Map */
Test whether the given base should be resolved by this ELResolver
isResolvable
{ "repo_name": "xasx/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/impl/javax/el/MapELResolver.java", "license": "apache-2.0", "size": 13225 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
231,664
void invoking(Method method, Object instance);
void invoking(Method method, Object instance);
/** * Event thrown as the component method is being invoked on the given instance * * @param method the Method invoked on the component instance * @param instance the component instance */
Event thrown as the component method is being invoked on the given instance
invoking
{ "repo_name": "picocontainer/PicoContainer1", "path": "container/src/java/org/picocontainer/ComponentMonitor.java", "license": "bsd-3-clause", "size": 4037 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,182,367
JProgressBar getProgBarClass();
JProgressBar getProgBarClass();
/** * DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getProgBarClass
{ "repo_name": "cismet/data-objects", "path": "src/main/java/de/cismet/cids/meta/IndexProgressListener.java", "license": "lgpl-3.0", "size": 1262 }
[ "javax.swing.JProgressBar" ]
import javax.swing.JProgressBar;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,264,640
public void sendRequest(long id, Message msg, RspCollector coll) { sendRequest(id, null, msg, coll); }
void function(long id, Message msg, RspCollector coll) { sendRequest(id, null, msg, coll); }
/** * Helper method for {@link #sendRequest(long,List,Message,RspCollector)}. */
Helper method for <code>#sendRequest(long,List,Message,RspCollector)</code>
sendRequest
{ "repo_name": "joseananio/TayzGrid", "path": "src/tgcluster/src/com/alachisoft/tayzgrid/cluster/blocks/RequestCorrelator.java", "license": "apache-2.0", "size": 54899 }
[ "com.alachisoft.tayzgrid.cluster.Message" ]
import com.alachisoft.tayzgrid.cluster.Message;
import com.alachisoft.tayzgrid.cluster.*;
[ "com.alachisoft.tayzgrid" ]
com.alachisoft.tayzgrid;
636,648
public static void fixMicroheterogenity(Structure bioJavaStruct) { // Loop through the models for (int i=0; i<bioJavaStruct.nrModels(); i++){ // Then the chains List<Chain> chains = bioJavaStruct.getModel(i); for (Chain c : chains) { // Build a new list of groups List<Group> outGroups = new Arra...
static void function(Structure bioJavaStruct) { for (int i=0; i<bioJavaStruct.nrModels(); i++){ List<Chain> chains = bioJavaStruct.getModel(i); for (Chain c : chains) { List<Group> outGroups = new ArrayList<>(); for (Group g : c.getAtomGroups()) { List<Group> removeList = new ArrayList<>(); for (Group altLoc : g.getAlt...
/** * This sets all microheterogeneous groups * (previously alternate location groups) as separate groups. * This is required because mmtf groups cannot have multiple HET codes. * @param bioJavaStruct */
This sets all microheterogeneous groups (previously alternate location groups) as separate groups. This is required because mmtf groups cannot have multiple HET codes
fixMicroheterogenity
{ "repo_name": "andreasprlic/biojava", "path": "biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmtf/MmtfUtils.java", "license": "lgpl-2.1", "size": 17445 }
[ "java.util.ArrayList", "java.util.List", "org.biojava.nbio.structure.Chain", "org.biojava.nbio.structure.Group", "org.biojava.nbio.structure.Structure" ]
import java.util.ArrayList; import java.util.List; import org.biojava.nbio.structure.Chain; import org.biojava.nbio.structure.Group; import org.biojava.nbio.structure.Structure;
import java.util.*; import org.biojava.nbio.structure.*;
[ "java.util", "org.biojava.nbio" ]
java.util; org.biojava.nbio;
1,651,312
public ClusterState state() { return clusterServiceState().getClusterState(); }
ClusterState function() { return clusterServiceState().getClusterState(); }
/** * The current cluster state. */
The current cluster state
state
{ "repo_name": "spiegela/elasticsearch", "path": "core/src/main/java/org/elasticsearch/cluster/service/ClusterService.java", "license": "apache-2.0", "size": 57961 }
[ "org.elasticsearch.cluster.ClusterState" ]
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
2,210,709
protected void initialize(final UUID _commandUUID, final String _openerId) throws CacheReloadException { this.openerId = _openerId; if (_commandUUID != null) { final AbstractCommand command = getCommand(_commandUUID); this.cmdUUID = c...
void function(final UUID _commandUUID, final String _openerId) throws CacheReloadException { this.openerId = _openerId; if (_commandUUID != null) { final AbstractCommand command = getCommand(_commandUUID); this.cmdUUID = command.getUUID(); setMode(command.getTargetMode()); this.target = command.getTarget(); this.submit...
/** * Method initializes the model. * * @param _commandUUID UUID for this Model * @param _openerId id of the opener * @throws CacheReloadException on error */
Method initializes the model
initialize
{ "repo_name": "eFaps/eFaps-WebApp", "path": "src/main/java/org/efaps/ui/wicket/models/objects/AbstractUIObject.java", "license": "apache-2.0", "size": 17498 }
[ "org.efaps.admin.event.EventType", "org.efaps.admin.ui.AbstractCommand", "org.efaps.admin.ui.AbstractUserInterfaceObject", "org.efaps.util.cache.CacheReloadException" ]
import org.efaps.admin.event.EventType; import org.efaps.admin.ui.AbstractCommand; import org.efaps.admin.ui.AbstractUserInterfaceObject; import org.efaps.util.cache.CacheReloadException;
import org.efaps.admin.event.*; import org.efaps.admin.ui.*; import org.efaps.util.cache.*;
[ "org.efaps.admin", "org.efaps.util" ]
org.efaps.admin; org.efaps.util;
559,609
Map<ApplicationAttemptId, RMAppAttempt> getAppAttempts();
Map<ApplicationAttemptId, RMAppAttempt> getAppAttempts();
/** * {@link RMApp} can have multiple application attempts {@link RMAppAttempt}. * This method returns the all {@link RMAppAttempt}s for the RMApp. * @return all {@link RMAppAttempt}s for the RMApp. */
<code>RMApp</code> can have multiple application attempts <code>RMAppAttempt</code>. This method returns the all <code>RMAppAttempt</code>s for the RMApp
getAppAttempts
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmapp/RMApp.java", "license": "gpl-3.0", "size": 9693 }
[ "java.util.Map", "org.apache.hadoop.yarn.api.records.ApplicationAttemptId", "org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt" ]
import java.util.Map; import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt;
import java.util.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,233,468
private void synchronizeAttachmentsToDataset(final Dataset dataset, final ImagePlus imagePlus) { if (dataset == null || imagePlus == null) return; // ROIs if (imagePlus.getOverlay() != null && imagePlus.getOverlay().size() > 0) { if (imagePlus.getRoi() != null && !imagePlus.getOverlay().contains( im...
void function(final Dataset dataset, final ImagePlus imagePlus) { if (dataset == null imagePlus == null) return; if (imagePlus.getOverlay() != null && imagePlus.getOverlay().size() > 0) { if (imagePlus.getRoi() != null && !imagePlus.getOverlay().contains( imagePlus.getRoi())) imagePlus.getOverlay().add(imagePlus.getRoi...
/** * Ensures that the given {@link Dataset} has equivalent ROIs/tables attached * as those associated with the given {@link ImagePlus}. * <p> * All ROIs/tables associated with the given {@link ImagePlus} are converted * and attached to the {@link Dataset}. Such that both the given * {@link ImagePlus} and t...
Ensures that the given <code>Dataset</code> has equivalent ROIs/tables attached as those associated with the given <code>ImagePlus</code>. All ROIs/tables associated with the given <code>ImagePlus</code> are converted and attached to the <code>Dataset</code>. Such that both the given <code>ImagePlus</code> and the <cod...
synchronizeAttachmentsToDataset
{ "repo_name": "imagej/imagej-legacy", "path": "src/main/java/net/imagej/legacy/LegacyImageMap.java", "license": "bsd-2-clause", "size": 24562 }
[ "java.util.ArrayList", "java.util.List", "net.imagej.Dataset", "net.imagej.display.ImageDisplay", "net.imagej.legacy.convert.TableListWrapper", "net.imagej.overlay.Overlay", "net.imagej.roi.ROIService", "net.imagej.roi.ROITree", "net.imagej.table.TableService", "org.scijava.table.Table" ]
import java.util.ArrayList; import java.util.List; import net.imagej.Dataset; import net.imagej.display.ImageDisplay; import net.imagej.legacy.convert.TableListWrapper; import net.imagej.overlay.Overlay; import net.imagej.roi.ROIService; import net.imagej.roi.ROITree; import net.imagej.table.TableService; import org.sc...
import java.util.*; import net.imagej.*; import net.imagej.display.*; import net.imagej.legacy.convert.*; import net.imagej.overlay.*; import net.imagej.roi.*; import net.imagej.table.*; import org.scijava.table.*;
[ "java.util", "net.imagej", "net.imagej.display", "net.imagej.legacy", "net.imagej.overlay", "net.imagej.roi", "net.imagej.table", "org.scijava.table" ]
java.util; net.imagej; net.imagej.display; net.imagej.legacy; net.imagej.overlay; net.imagej.roi; net.imagej.table; org.scijava.table;
2,476,597
XStream xStream = new XStream(); xStream.setClassLoader(TestSerializer.class.getClassLoader()); xStream.allowTypesByWildcard(new String[]{"org.axonframework.**"}); return XStreamSerializer.builder().xStream(xStream).build(); }
XStream xStream = new XStream(); xStream.setClassLoader(TestSerializer.class.getClassLoader()); xStream.allowTypesByWildcard(new String[]{STR}); return XStreamSerializer.builder().xStream(xStream).build(); }
/** * Return a {@link XStreamSerializer} for which the security settings have been set. * * @return a {@link XStreamSerializer} for which the security settings have been set. */
Return a <code>XStreamSerializer</code> for which the security settings have been set
secureXStreamSerializer
{ "repo_name": "krosenvold/AxonFramework", "path": "eventsourcing/src/test/java/org/axonframework/eventsourcing/utils/TestSerializer.java", "license": "apache-2.0", "size": 1534 }
[ "com.thoughtworks.xstream.XStream", "org.axonframework.serialization.xml.XStreamSerializer" ]
import com.thoughtworks.xstream.XStream; import org.axonframework.serialization.xml.XStreamSerializer;
import com.thoughtworks.xstream.*; import org.axonframework.serialization.xml.*;
[ "com.thoughtworks.xstream", "org.axonframework.serialization" ]
com.thoughtworks.xstream; org.axonframework.serialization;
2,391,452
public static AutofillPaymentAppCreator createAppCreator(PaymentAppFactoryDelegate delegate) { return new Creator(delegate); }
static AutofillPaymentAppCreator function(PaymentAppFactoryDelegate delegate) { return new Creator(delegate); }
/** * Create an instance of {@link AutofillPaymentAppFactory.Creator}. * @param delegate The delegate of a payment app factory. * @return The created instance. */
Create an instance of <code>AutofillPaymentAppFactory.Creator</code>
createAppCreator
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentAppFactory.java", "license": "bsd-3-clause", "size": 9016 }
[ "org.chromium.components.payments.PaymentAppFactoryDelegate" ]
import org.chromium.components.payments.PaymentAppFactoryDelegate;
import org.chromium.components.payments.*;
[ "org.chromium.components" ]
org.chromium.components;
2,162,175
public MibType createReference(ArrayList<?> values) throws UnsupportedOperationException { String msg = name + " type cannot be referenced with " + "defined values"; throw new UnsupportedOperationException(msg); }
MibType function(ArrayList<?> values) throws UnsupportedOperationException { String msg = name + STR + STR; throw new UnsupportedOperationException(msg); }
/** * Creates a constrained type reference to this type. The type * reference is normally an identical type, but with the * primitive flag set to false. Only certain types support being * referenced, and the default implementation of this method * throws an exception.<p> * * <strong>N...
Creates a constrained type reference to this type. The type reference is normally an identical type, but with the primitive flag set to false. Only certain types support being referenced, and the default implementation of this method throws an exception. only be called by the MIB loader
createReference
{ "repo_name": "runner-mei/mibble", "path": "src/main/java/net/percederberg/mibble/MibType.java", "license": "gpl-2.0", "size": 15138 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,333,949
public List<AdministeredObjectType<WebAppType<T>>> getAllAdministeredObject();
List<AdministeredObjectType<WebAppType<T>>> function();
/** * Returns all <code>administered-object</code> elements * @return list of <code>administered-object</code> */
Returns all <code>administered-object</code> elements
getAllAdministeredObject
{ "repo_name": "forge/javaee-descriptors", "path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/webapp31/WebAppType.java", "license": "epl-1.0", "size": 60822 }
[ "java.util.List", "org.jboss.shrinkwrap.descriptor.api.javaee7.AdministeredObjectType" ]
import java.util.List; import org.jboss.shrinkwrap.descriptor.api.javaee7.AdministeredObjectType;
import java.util.*; import org.jboss.shrinkwrap.descriptor.api.javaee7.*;
[ "java.util", "org.jboss.shrinkwrap" ]
java.util; org.jboss.shrinkwrap;
2,563,422
public void addListener(Consumer<String> consumer) { callbacks.add(consumer); }
void function(Consumer<String> consumer) { callbacks.add(consumer); }
/** * Adds a listener that gets executed every time a new line is read from the * process output. * * @param consumer The consumer that will be executed. */
Adds a listener that gets executed every time a new line is read from the process output
addListener
{ "repo_name": "seeseemelk/discordcli", "path": "src/main/java/be/seeseemelk/discordcli/MainProcess.java", "license": "gpl-3.0", "size": 3775 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
1,976,033
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.wallPaint = SerialUtilities.readPaint(stream); }
void function(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.wallPaint = SerialUtilities.readPaint(stream); }
/** * Provides serialization support. * * @param stream the input stream. * * @throws IOException if there is an I/O error. * @throws ClassNotFoundException if there is a classpath problem. */
Provides serialization support
readObject
{ "repo_name": "apetresc/JFreeChart", "path": "src/main/java/org/jfree/chart/renderer/category/BarRenderer3D.java", "license": "lgpl-2.1", "size": 31854 }
[ "java.io.IOException", "java.io.ObjectInputStream", "org.jfree.io.SerialUtilities" ]
import java.io.IOException; import java.io.ObjectInputStream; import org.jfree.io.SerialUtilities;
import java.io.*; import org.jfree.io.*;
[ "java.io", "org.jfree.io" ]
java.io; org.jfree.io;
1,786,351
public void attributeDecl(String elementName, String attributeName, String type, String[] enumeration, String defaultType, XMLString defaultValue, XMLString nonNormalizedDefaultValue, Augmentations augs) throws XNIException { ...
void function(String elementName, String attributeName, String type, String[] enumeration, String defaultType, XMLString defaultValue, XMLString nonNormalizedDefaultValue, Augmentations augs) throws XNIException { if (type != XMLSymbols.fCDATASymbol && defaultValue != null) { normalizeDefaultAttrValue(defaultValue); } ...
/** * An attribute declaration. * * @param elementName The name of the element that this attribute * is associated with. * @param attributeName The name of the attribute. * @param type The attribute type. This value will be one of * ...
An attribute declaration
attributeDecl
{ "repo_name": "FauxFaux/jdk9-jaxp", "path": "src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java", "license": "gpl-2.0", "size": 68072 }
[ "com.sun.org.apache.xerces.internal.impl.XMLErrorReporter", "com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter", "com.sun.org.apache.xerces.internal.util.XMLSymbols", "com.sun.org.apache.xerces.internal.xni.Augmentations", "com.sun.org.apache.xerces.internal.xni.XMLString", "com.sun.org.apac...
import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; import com.sun.org.apache.xerces.internal.util.XMLSymbols; import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XMLString; import...
import com.sun.org.apache.xerces.internal.impl.*; import com.sun.org.apache.xerces.internal.impl.msg.*; import com.sun.org.apache.xerces.internal.util.*; import com.sun.org.apache.xerces.internal.xni.*; import java.util.*;
[ "com.sun.org", "java.util" ]
com.sun.org; java.util;
2,839,837
public void setOnSeekCompletionListener(OnSeekCompletionListener listener) { listenerMux.setOnSeekCompletionListener(listener); }
void function(OnSeekCompletionListener listener) { listenerMux.setOnSeekCompletionListener(listener); }
/** * Sets the listener to inform of VideoPlayer seek completion events * * @param listener The listener */
Sets the listener to inform of VideoPlayer seek completion events
setOnSeekCompletionListener
{ "repo_name": "ayaseruri/luxunPro", "path": "exoplayer/src/main/java/com/devbrackets/android/exomedia/EMAudioPlayer.java", "license": "apache-2.0", "size": 13192 }
[ "com.devbrackets.android.exomedia.listener.OnSeekCompletionListener" ]
import com.devbrackets.android.exomedia.listener.OnSeekCompletionListener;
import com.devbrackets.android.exomedia.listener.*;
[ "com.devbrackets.android" ]
com.devbrackets.android;
2,534,444
public Builder vertexProperties(final Traversal<VertexProperty, ?> vertexPropertyPredicate) { this.vertexPropertyCriterion = vertexPropertyPredicate; return this; }
Builder function(final Traversal<VertexProperty, ?> vertexPropertyPredicate) { this.vertexPropertyCriterion = vertexPropertyPredicate; return this; }
/** * The traversal predicate that defines the vertex properties to include in the subgraph. */
The traversal predicate that defines the vertex properties to include in the subgraph
vertexProperties
{ "repo_name": "artem-aliev/tinkerpop", "path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/SubgraphStrategy.java", "license": "apache-2.0", "size": 22273 }
[ "org.apache.tinkerpop.gremlin.process.traversal.Traversal", "org.apache.tinkerpop.gremlin.structure.VertexProperty" ]
import org.apache.tinkerpop.gremlin.process.traversal.Traversal; import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.apache.tinkerpop.gremlin.process.traversal.*; import org.apache.tinkerpop.gremlin.structure.*;
[ "org.apache.tinkerpop" ]
org.apache.tinkerpop;
2,589,347
private void checkInputAndOutput(String[] inputTups, String[] outputTups, boolean isMapMemEmpty) throws Exception { PigMapReduce.sJobConfInternal.set(new Configuration()); if (isMapMemEmpty) { PigMapReduce.sJobConfInternal.get().set(PigConfiguration.PROP_CACHEDBAG_MEMUSAGE, ...
void function(String[] inputTups, String[] outputTups, boolean isMapMemEmpty) throws Exception { PigMapReduce.sJobConfInternal.set(new Configuration()); if (isMapMemEmpty) { PigMapReduce.sJobConfInternal.get().set(PigConfiguration.PROP_CACHEDBAG_MEMUSAGE, "0"); } List<Tuple> inputs = Util.getTuplesFromConstantTupleStri...
/** * run the plan on inputTups and check if output matches outputTups if * isMapMemEmpty is set to true, set memory available for the hash-map to * zero * * @param inputTups * @param outputTups * @param isMapMemEmpty * @throws ParserException * @throws ExecException *...
run the plan on inputTups and check if output matches outputTups if isMapMemEmpty is set to true, set memory available for the hash-map to zero
checkInputAndOutput
{ "repo_name": "miyakawataku/piggybank-ltsv", "path": "test/org/apache/pig/test/TestPOPartialAgg.java", "license": "apache-2.0", "size": 11326 }
[ "java.util.ArrayList", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.pig.PigConfiguration", "org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce", "org.apache.pig.backend.hadoop.executionengine.physicalLayer.POStatus", "org.apache.pig.backend.hadoop.executio...
import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.pig.PigConfiguration; import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce; import org.apache.pig.backend.hadoop.executionengine.physicalLayer.POStatus; import org.apache.pig.bac...
import java.util.*; import org.apache.hadoop.conf.*; import org.apache.pig.*; import org.apache.pig.backend.hadoop.executionengine.*; import org.apache.pig.data.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.apache.pig", "org.junit" ]
java.util; org.apache.hadoop; org.apache.pig; org.junit;
2,686,443
public byte[] readResourceBytes(String path) { if (path == null) { Assert.fail("Resource 'path' not specified."); } InputStream resourceStream = getResourceAsStream(path); if (resourceStream == null) { Assert.fail("Resource '" + path + "' not found on classpa...
byte[] function(String path) { if (path == null) { Assert.fail(STR); } InputStream resourceStream = getResourceAsStream(path); if (resourceStream == null) { Assert.fail(STR + path + STR + _testInstance.getClass().getName() + STR); } ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream(); try { byte[] readBuf...
/** * Read a classpath resource and return as a byte array. * @param path The path to the classpath resource. The specified path can be * relative to the test class' location on the classpath. * @return The resource as an array of bytes. */
Read a classpath resource and return as a byte array
readResourceBytes
{ "repo_name": "cunningt/switchyard", "path": "core/test/src/main/java/org/switchyard/test/SwitchYardTestKit.java", "license": "apache-2.0", "size": 42091 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream", "org.junit.Assert" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
1,357,575
public static void addFormattedMove(final PlayerLocation from, final PlayerLocation to, final Location loc, final StringBuilder builder){ if (loc != null && !from.isSamePos(loc)){ builder.append("("); addFormattedLocation(loc, builder); builder.append(") "); ...
static void function(final PlayerLocation from, final PlayerLocation to, final Location loc, final StringBuilder builder){ if (loc != null && !from.isSamePos(loc)){ builder.append("("); addFormattedLocation(loc, builder); builder.append(STR); } addFormattedMove(from.getX(), from.getY(), from.getZ(), to.getX(), to.getY(...
/** * 3 decimal digits after comma (StringUtil.fdec3). No leading new line. * @param from * @param to * @param loc Reference location for from, usually Player.getLocation(). May be null. * @param builder * @return */
3 decimal digits after comma (StringUtil.fdec3). No leading new line
addFormattedMove
{ "repo_name": "Samistine/NoCheatPlus2", "path": "NCPCore/src/main/java/fr/neatmonster/nocheatplus/logging/debug/DebugUtil.java", "license": "gpl-3.0", "size": 13728 }
[ "fr.neatmonster.nocheatplus.utilities.PlayerLocation", "org.bukkit.Location" ]
import fr.neatmonster.nocheatplus.utilities.PlayerLocation; import org.bukkit.Location;
import fr.neatmonster.nocheatplus.utilities.*; import org.bukkit.*;
[ "fr.neatmonster.nocheatplus", "org.bukkit" ]
fr.neatmonster.nocheatplus; org.bukkit;
2,175,840
public void testHunterBump() { System.out.println("Running: testHunterBump()"); Model board = new Model(new Size(4, 4, 1)); assertTrue(board.getHunter().getPosition().getX() == 0); assertTrue(board.getHunter().getPosition().getY() == 0); assertTrue(board.getHunter().getPosition().getOrien...
void function() { System.out.println(STR); Model board = new Model(new Size(4, 4, 1)); assertTrue(board.getHunter().getPosition().getX() == 0); assertTrue(board.getHunter().getPosition().getY() == 0); assertTrue(board.getHunter().getPosition().getOrientation() == Orientation.North); board.setHunterAction(Action.TurnLef...
/** * testHunterForward() * This tests forward motion (and left/right turns) without checking for game state */
testHunterForward() This tests forward motion (and left/right turns) without checking for game state
testHunterBump
{ "repo_name": "BJ-Wumpus-And-Company/wumpus-world", "path": "src/org.bjwumpusandcompany.wumpusworld/src/test/java/org/bjwumpusandcompany/wumpusworld/ModelTest.java", "license": "mit", "size": 12015 }
[ "org.bjwumpusandcompany.wumpusworld.ModelInterface", "org.bjwumpusandcompany.wumpusworld.common.Position", "org.bjwumpusandcompany.wumpusworld.common.Size", "org.bjwumpusandcompany.wumpusworld.model.Model" ]
import org.bjwumpusandcompany.wumpusworld.ModelInterface; import org.bjwumpusandcompany.wumpusworld.common.Position; import org.bjwumpusandcompany.wumpusworld.common.Size; import org.bjwumpusandcompany.wumpusworld.model.Model;
import org.bjwumpusandcompany.wumpusworld.*; import org.bjwumpusandcompany.wumpusworld.common.*; import org.bjwumpusandcompany.wumpusworld.model.*;
[ "org.bjwumpusandcompany.wumpusworld" ]
org.bjwumpusandcompany.wumpusworld;
2,773,259
public void onDelete() { if (K9.confirmDelete() || (K9.confirmDeleteStarred() && mMessage.isSet(Flag.FLAGGED))) { showDialog(R.id.dialog_confirm_delete); } else { delete(); } }
void function() { if (K9.confirmDelete() (K9.confirmDeleteStarred() && mMessage.isSet(Flag.FLAGGED))) { showDialog(R.id.dialog_confirm_delete); } else { delete(); } }
/** * Called from UI thread when user select Delete */
Called from UI thread when user select Delete
onDelete
{ "repo_name": "Valodim/k-9", "path": "k9mail/src/main/java/com/fsck/k9/fragment/MessageViewFragment.java", "license": "bsd-3-clause", "size": 30785 }
[ "com.fsck.k9.mail.Flag" ]
import com.fsck.k9.mail.Flag;
import com.fsck.k9.mail.*;
[ "com.fsck.k9" ]
com.fsck.k9;
1,856,346
public MBlockPos north(int n) { return this.offset(EnumFacing.NORTH, n); }
MBlockPos function(int n) { return this.offset(EnumFacing.NORTH, n); }
/** * Offset this BlockPos n blocks in northern direction */
Offset this BlockPos n blocks in northern direction
north
{ "repo_name": "Ordinastie/MalisisCore", "path": "src/main/java/net/malisis/core/util/MBlockPos.java", "license": "mit", "size": 8746 }
[ "net.minecraft.util.EnumFacing" ]
import net.minecraft.util.EnumFacing;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
1,866,060
Collection<Figure> getSelectedFiguresFromTables() { List l = objectsTable.getSelectedObjects(); if (CollectionUtils.isEmpty(l)) return null; Iterator i = l.iterator(); Object o; ROI roi; ROIShape shape; List<Figure> list = new ArrayList<Figure>(); while (...
Collection<Figure> getSelectedFiguresFromTables() { List l = objectsTable.getSelectedObjects(); if (CollectionUtils.isEmpty(l)) return null; Iterator i = l.iterator(); Object o; ROI roi; ROIShape shape; List<Figure> list = new ArrayList<Figure>(); while (i.hasNext()) { o = i.next(); if (o instanceof ROI) { roi = (ROI) ...
/** * Returns a collection of all figures selected * If a ROI is selected, all the figures hosted will that ROI will be * returned. * @return See above. */
Returns a collection of all figures selected If a ROI is selected, all the figures hosted will that ROI will be returned
getSelectedFiguresFromTables
{ "repo_name": "dominikl/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/ObjectManager.java", "license": "gpl-2.0", "size": 14714 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Iterator", "java.util.List", "org.apache.commons.collections.CollectionUtils", "org.jhotdraw.draw.Figure", "org.openmicroscopy.shoola.util.roi.model.ROIShape" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import org.apache.commons.collections.CollectionUtils; import org.jhotdraw.draw.Figure; import org.openmicroscopy.shoola.util.roi.model.ROIShape;
import java.util.*; import org.apache.commons.collections.*; import org.jhotdraw.draw.*; import org.openmicroscopy.shoola.util.roi.model.*;
[ "java.util", "org.apache.commons", "org.jhotdraw.draw", "org.openmicroscopy.shoola" ]
java.util; org.apache.commons; org.jhotdraw.draw; org.openmicroscopy.shoola;
1,090,587
public static void applyTheme(Activity activity) { switch (WearablePreferencesHandler.getTheme()) { case SettingsConstants.THEME_DARK_BLUE: activity.setTheme(R.style.PowerSwitchWearTheme_Dark_Blue); break; case SettingsConstants.THEME_DARK_RED: ...
static void function(Activity activity) { switch (WearablePreferencesHandler.getTheme()) { case SettingsConstants.THEME_DARK_BLUE: activity.setTheme(R.style.PowerSwitchWearTheme_Dark_Blue); break; case SettingsConstants.THEME_DARK_RED: activity.setTheme(R.style.PowerSwitchWearTheme_Dark_Red); break; case SettingsConsta...
/** * Apply a Theme to an Activity * * @param activity Activity to apply theme on */
Apply a Theme to an Activity
applyTheme
{ "repo_name": "Power-Switch/PowerSwitch_Android", "path": "Wearable/src/main/java/eu/power_switch/gui/ThemeHelper.java", "license": "gpl-3.0", "size": 2987 }
[ "android.app.Activity", "eu.power_switch.shared.constants.SettingsConstants", "eu.power_switch.shared.settings.WearablePreferencesHandler" ]
import android.app.Activity; import eu.power_switch.shared.constants.SettingsConstants; import eu.power_switch.shared.settings.WearablePreferencesHandler;
import android.app.*; import eu.power_switch.shared.constants.*; import eu.power_switch.shared.settings.*;
[ "android.app", "eu.power_switch.shared" ]
android.app; eu.power_switch.shared;
631,083
@Test public void testBuiltInChoiceFormat() { final Object[] values = new Number[] {Integer.valueOf(1), Double.valueOf("2.2"), Double.valueOf("1234.5")}; String choicePattern = null; final Locale[] availableLocales = NumberFormat.getAvailableLocales(); choicePattern = "{0,choice...
void function() { final Object[] values = new Number[] {Integer.valueOf(1), Double.valueOf("2.2"), Double.valueOf(STR)}; String choicePattern = null; final Locale[] availableLocales = NumberFormat.getAvailableLocales(); choicePattern = STR; for (final Object value : values) { checkBuiltInFormat(value + STR + choicePatt...
/** * Test the built in choice format. */
Test the built in choice format
testBuiltInChoiceFormat
{ "repo_name": "MarkDacek/commons-lang", "path": "src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java", "license": "apache-2.0", "size": 21177 }
[ "java.text.NumberFormat", "java.util.Locale" ]
import java.text.NumberFormat; import java.util.Locale;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,031,049
DeviceAssets read(KapuaId scopeId, KapuaId deviceId, DeviceAssets deviceAssets, Long timeout) throws KapuaException;
DeviceAssets read(KapuaId scopeId, KapuaId deviceId, DeviceAssets deviceAssets, Long timeout) throws KapuaException;
/** * Reads current values from the device channels * * @param scopeId The target scope id * @param deviceId The target device id * @param deviceAssets The {@link DeviceAssets} to filter read channel values * @param timeout The timeout waiting for the Device response. * ...
Reads current values from the device channels
read
{ "repo_name": "stzilli/kapua", "path": "service/device/management/asset/api/src/main/java/org/eclipse/kapua/service/device/management/asset/DeviceAssetManagementService.java", "license": "epl-1.0", "size": 2705 }
[ "org.eclipse.kapua.KapuaException", "org.eclipse.kapua.model.id.KapuaId" ]
import org.eclipse.kapua.KapuaException; import org.eclipse.kapua.model.id.KapuaId;
import org.eclipse.kapua.*; import org.eclipse.kapua.model.id.*;
[ "org.eclipse.kapua" ]
org.eclipse.kapua;
1,006,525
public static ImageDescriptor getCompositeWizbanDescriptor(ImageDescriptor overlayImage) { return getCompositeDescriptor(UIEplPlugin.imageDescriptorFromPlugin(UIEplPlugin.PLUGIN_ID, IMG_WIZBAN_DEFAULT), overlayImage); } private static class CenteredCompositeImageDescriptor extends CompositeImageDescripto...
static ImageDescriptor function(ImageDescriptor overlayImage) { return getCompositeDescriptor(UIEplPlugin.imageDescriptorFromPlugin(UIEplPlugin.PLUGIN_ID, IMG_WIZBAN_DEFAULT), overlayImage); } private static class CenteredCompositeImageDescriptor extends CompositeImageDescriptor { private ImageData baseImageData; priva...
/** * Returns a composition of a standard basic wizard-banner image with a given overlay image. * * @param overlayImage * @return An {@link ImageDescriptor} composition. */
Returns a composition of a standard basic wizard-banner image with a given overlay image
getCompositeWizbanDescriptor
{ "repo_name": "HossainKhademian/Studio3", "path": "plugins/com.aptana.ui/src/com/aptana/ui/util/ImageDecoratorUtil.java", "license": "gpl-3.0", "size": 3430 }
[ "com.aptana.ui.epl.UIEplPlugin", "org.eclipse.jface.resource.CompositeImageDescriptor", "org.eclipse.jface.resource.ImageDescriptor", "org.eclipse.swt.graphics.ImageData", "org.eclipse.swt.graphics.Point" ]
import com.aptana.ui.epl.UIEplPlugin; import org.eclipse.jface.resource.CompositeImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.Point;
import com.aptana.ui.epl.*; import org.eclipse.jface.resource.*; import org.eclipse.swt.graphics.*;
[ "com.aptana.ui", "org.eclipse.jface", "org.eclipse.swt" ]
com.aptana.ui; org.eclipse.jface; org.eclipse.swt;
515,676
public JMethod []getDeclaredMethods() { ArrayList<JavaMethod> methodList = getMethodList(); JMethod[] methods = new JMethod[methodList.size()]; methodList.toArray(methods); return methods; }
public JMethod []getDeclaredMethods() { ArrayList<JavaMethod> methodList = getMethodList(); JMethod[] methods = new JMethod[methodList.size()]; methodList.toArray(methods); return methods; }
/** * Returns the array of declared methods. */
Returns the array of declared methods
getDeclaredMethods
{ "repo_name": "baratine/baratine", "path": "core/src/main/java/com/caucho/v5/bytecode/JavaClass.java", "license": "gpl-2.0", "size": 17328 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
449,161
public Date stringToDate(String date, String pattern) throws ParseException { if(date.length() == 7){ date = "0" + date; } SimpleDateFormat format = new SimpleDateFormat(pattern, LocaleUtils.DEFAULT_LOCALE); return format.parse(date); }
Date function(String date, String pattern) throws ParseException { if(date.length() == 7){ date = "0" + date; } SimpleDateFormat format = new SimpleDateFormat(pattern, LocaleUtils.DEFAULT_LOCALE); return format.parse(date); }
/** * Cria um objeto Date a partir de uma String e um padao. Exemplo de * pattern: ddMMyyyy. * * @param date Data a ser criada. * @param pattern padrao. * @return Data criada * @throws ParseException Caso ocorra algum erro. */
Cria um objeto Date a partir de uma String e um padao. Exemplo de pattern: ddMMyyyy
stringToDate
{ "repo_name": "g6tech/waiso-social", "path": "waiso-social-framework/src/main/java/com/waiso/social/framework/utilitario/DateUtils.java", "license": "apache-2.0", "size": 8852 }
[ "com.waiso.social.framework.i18n.LocaleUtils", "java.text.ParseException", "java.text.SimpleDateFormat", "java.util.Date" ]
import com.waiso.social.framework.i18n.LocaleUtils; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date;
import com.waiso.social.framework.i18n.*; import java.text.*; import java.util.*;
[ "com.waiso.social", "java.text", "java.util" ]
com.waiso.social; java.text; java.util;
1,564,402
public static Animation fadeInAnimation(long duration, final View view) { Animation animation = fadeInAnimation(500, 0);
static Animation function(long duration, final View view) { Animation animation = fadeInAnimation(500, 0);
/** * A fade animation that will ensure the View starts and ends with the correct visibility * @param view the View to be faded in * @param duration the animation duration in milliseconds * @return a fade animation that will set the visibility of the view at the start and end of animation */
A fade animation that will ensure the View starts and ends with the correct visibility
fadeInAnimation
{ "repo_name": "javocsoft/javocsoft-toolbox", "path": "src/es/javocsoft/android/lib/toolbox/animation/AnimationFactory.java", "license": "gpl-3.0", "size": 28229 }
[ "android.view.View", "android.view.animation.Animation" ]
import android.view.View; import android.view.animation.Animation;
import android.view.*; import android.view.animation.*;
[ "android.view" ]
android.view;
1,839,887
public void testCreateRenameNoClose() throws Exception { if (dual) return; create(igfs, paths(DIR, SUBDIR), null); IgfsOutputStream os = null; try { os = igfs.create(FILE, true); igfs.rename(FILE, FILE2); os.close(); } ...
void function() throws Exception { if (dual) return; create(igfs, paths(DIR, SUBDIR), null); IgfsOutputStream os = null; try { os = igfs.create(FILE, true); igfs.rename(FILE, FILE2); os.close(); } finally { U.closeQuiet(os); } }
/** * Test rename on the file when it was opened for write(create) and is not closed yet. * * @throws Exception If failed. */
Test rename on the file when it was opened for write(create) and is not closed yet
testCreateRenameNoClose
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java", "license": "apache-2.0", "size": 80491 }
[ "org.apache.ignite.igfs.IgfsOutputStream", "org.apache.ignite.internal.util.typedef.internal.U" ]
import org.apache.ignite.igfs.IgfsOutputStream; import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.igfs.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
125,254
//---------------------------------------------------------------------- @Override public int delete(Long id) throws SQLException { TopicDTO topicDTO = newInstanceWithPrimaryKey(id) ; return super.doDelete(topicDTO); }
int function(Long id) throws SQLException { TopicDTO topicDTO = newInstanceWithPrimaryKey(id) ; return super.doDelete(topicDTO); }
/** * Deletes the record in the database using the given primary key value(s) * @param id; * @return */
Deletes the record in the database using the given primary key value(s)
delete
{ "repo_name": "vasttrafik/wso2-community-api", "path": "java/src/main/java/org/vasttrafik/wso2/carbon/community/api/dao/impl/jdbc/TopicDAOImpl.java", "license": "mit", "size": 22307 }
[ "java.sql.SQLException", "org.vasttrafik.wso2.carbon.community.api.model.TopicDTO" ]
import java.sql.SQLException; import org.vasttrafik.wso2.carbon.community.api.model.TopicDTO;
import java.sql.*; import org.vasttrafik.wso2.carbon.community.api.model.*;
[ "java.sql", "org.vasttrafik.wso2" ]
java.sql; org.vasttrafik.wso2;
1,877,775
ResourceSet query(String query, String sortExpr) throws XMLDBException;
ResourceSet query(String query, String sortExpr) throws XMLDBException;
/** * Process an XPath query and sort the results by applying a second XPath expression * to each of the search results. The result of applying the sort expression is converted * into a string, which is then used to sort the set of results. * * @param query the XPath query * @param sortExp...
Process an XPath query and sort the results by applying a second XPath expression to each of the search results. The result of applying the sort expression is converted into a string, which is then used to sort the set of results
query
{ "repo_name": "windauer/exist", "path": "exist-core/src/main/java/org/exist/xmldb/EXistXPathQueryService.java", "license": "lgpl-2.1", "size": 6423 }
[ "org.xmldb.api.base.ResourceSet", "org.xmldb.api.base.XMLDBException" ]
import org.xmldb.api.base.ResourceSet; import org.xmldb.api.base.XMLDBException;
import org.xmldb.api.base.*;
[ "org.xmldb.api" ]
org.xmldb.api;
843,256
@Override public void onCompletion(Void result, Exception exception) { long processingStartTimeMs = SystemTime.getInstance().milliseconds(); metrics.getPeersSecurityPostProcessRequestTimeInMs.update(processingStartTimeMs - operationStartTimeMs); ReadableStreamChannel channel = null; try ...
void function(Void result, Exception exception) { long processingStartTimeMs = SystemTime.getInstance().milliseconds(); metrics.getPeersSecurityPostProcessRequestTimeInMs.update(processingStartTimeMs - operationStartTimeMs); ReadableStreamChannel channel = null; try { if (exception == null) { DataNodeId dataNodeId = ge...
/** * If {@code exception} is null, gathers all the peers of the datanode that corresponds to the params in the request * and returns them as a JSON with the field {@link #PEERS_FIELD_NAME} whose value is a JSON array of objects with * fields {@link #NAME_QUERY_PARAM} and {@link #PORT_QUERY_PARAM}. ...
If exception is null, gathers all the peers of the datanode that corresponds to the params in the request and returns them as a JSON with the field <code>#PEERS_FIELD_NAME</code> whose value is a JSON array of objects with fields <code>#NAME_QUERY_PARAM</code> and <code>#PORT_QUERY_PARAM</code>
onCompletion
{ "repo_name": "cgtz/ambry", "path": "ambry-frontend/src/main/java/com/github/ambry/frontend/GetPeersHandler.java", "license": "apache-2.0", "size": 10882 }
[ "com.github.ambry.clustermap.DataNodeId", "com.github.ambry.clustermap.ReplicaId", "com.github.ambry.rest.RestUtils", "com.github.ambry.router.ReadableStreamChannel", "com.github.ambry.utils.SystemTime", "java.util.GregorianCalendar", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import com.github.ambry.clustermap.DataNodeId; import com.github.ambry.clustermap.ReplicaId; import com.github.ambry.rest.RestUtils; import com.github.ambry.router.ReadableStreamChannel; import com.github.ambry.utils.SystemTime; import java.util.GregorianCalendar; import java.util.HashSet; import java.util.List; import...
import com.github.ambry.clustermap.*; import com.github.ambry.rest.*; import com.github.ambry.router.*; import com.github.ambry.utils.*; import java.util.*;
[ "com.github.ambry", "java.util" ]
com.github.ambry; java.util;
457,849
protected final static void packInfoDirectoryBoth(FileInfo info, DataBuffer buf, boolean uni) { // Information format :- // ULONG NextEntryOffset // ULONG FileIndex // LARGE_INTEGER CreationTime // LARGE_INTEGER LastAccessTime // LARGE_INTEGER LastWriteTime // LARGE_INTEGER ChangeTime ...
final static void function(FileInfo info, DataBuffer buf, boolean uni) { int startPos = buf.getPosition(); buf.putZeros(4); buf.putInt( EnableFileIdPacking ? info.getFileId() : 0); if (info.hasCreationDateTime()) { buf.putLong(NTTime.toNTTime(info.getCreationDateTime())); } else buf.putZeros(8); if (info.hasAccessDateT...
/** * Pack the full file/directory information * * @param info File information to be packed. * @param buf Buffer to pack the data into. * @param uni Pack Unicode strings if true, else pack ASCII strings */
Pack the full file/directory information
packInfoDirectoryBoth
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/smb/server/FindInfoPacker.java", "license": "lgpl-3.0", "size": 29620 }
[ "org.alfresco.jlan.server.filesys.FileInfo", "org.alfresco.jlan.smb.NTTime", "org.alfresco.jlan.util.DataBuffer" ]
import org.alfresco.jlan.server.filesys.FileInfo; import org.alfresco.jlan.smb.NTTime; import org.alfresco.jlan.util.DataBuffer;
import org.alfresco.jlan.server.filesys.*; import org.alfresco.jlan.smb.*; import org.alfresco.jlan.util.*;
[ "org.alfresco.jlan" ]
org.alfresco.jlan;
2,400,088
public VirtualMachineScaleSetUpdateNetworkConfiguration withIpConfigurations( List<VirtualMachineScaleSetUpdateIpConfiguration> ipConfigurations) { if (this.innerProperties() == null) { this.innerProperties = new VirtualMachineScaleSetUpdateNetworkConfigurationProperties(); } ...
VirtualMachineScaleSetUpdateNetworkConfiguration function( List<VirtualMachineScaleSetUpdateIpConfiguration> ipConfigurations) { if (this.innerProperties() == null) { this.innerProperties = new VirtualMachineScaleSetUpdateNetworkConfigurationProperties(); } this.innerProperties().withIpConfigurations(ipConfigurations);...
/** * Set the ipConfigurations property: The virtual machine scale set IP Configuration. * * @param ipConfigurations the ipConfigurations value to set. * @return the VirtualMachineScaleSetUpdateNetworkConfiguration object itself. */
Set the ipConfigurations property: The virtual machine scale set IP Configuration
withIpConfigurations
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/models/VirtualMachineScaleSetUpdateNetworkConfiguration.java", "license": "mit", "size": 9446 }
[ "com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetUpdateNetworkConfigurationProperties", "java.util.List" ]
import com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetUpdateNetworkConfigurationProperties; import java.util.List;
import com.azure.resourcemanager.compute.fluent.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
272,521
public boolean disableAll(Jid pushJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return disable(pushJid, null); }
boolean function(Jid pushJid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return disable(pushJid, null); }
/** * Disable all push notifications. * * @param pushJid TODO javadoc me please * @return true if it was successfully disabled, false if not * @throws NoResponseException if there was no response from the remote entity. * @throws XMPPErrorException if there was an XMPP error returned. ...
Disable all push notifications
disableAll
{ "repo_name": "igniterealtime/Smack", "path": "smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/PushNotificationsManager.java", "license": "apache-2.0", "size": 7318 }
[ "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPException", "org.jxmpp.jid.Jid" ]
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jxmpp.jid.Jid;
import org.jivesoftware.smack.*; import org.jxmpp.jid.*;
[ "org.jivesoftware.smack", "org.jxmpp.jid" ]
org.jivesoftware.smack; org.jxmpp.jid;
916,323
Random rnd = new Random(); return String .format("#%02X%02X%02X", rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256)); }
Random rnd = new Random(); return String .format(STR, rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256)); }
/** * Create a random string hex color. * @return string hex color */
Create a random string hex color
randomHex
{ "repo_name": "YMonnier/TrailsCommunity", "path": "app/android/TrailsCommunity/app/src/main/java/fr/univ_tln/trailscommunity/utilities/color/ColorUtils.java", "license": "mit", "size": 681 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
13,605
protected void endBlock(final String endString, final boolean hasContents) throws IOException { m_depth--; write(endString); }
void function(final String endString, final boolean hasContents) throws IOException { m_depth--; write(endString); }
/** * Internal method for ending the writing of a block (array, list, object, * map etc) * * @param endString * The finishing string (such as ']' for arrays) * * @param hasContents * If the block was non-empty * * @throws IOException * If an IOException occurs ...
Internal method for ending the writing of a block (array, list, object, map etc)
endBlock
{ "repo_name": "culvertsoft/mgen", "path": "mgen-javalib/src/main/java/se/culvertsoft/mgen/javapack/serialization/JsonWriter.java", "license": "mit", "size": 22957 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,296,150
public void setNamespaceService(NamespaceService namespaceService) { this.namespaceService = namespaceService; }
void function(NamespaceService namespaceService) { this.namespaceService = namespaceService; }
/** * Sets the namespace service. */
Sets the namespace service
setNamespaceService
{ "repo_name": "Kast0rTr0y/community-edition", "path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java", "license": "lgpl-3.0", "size": 147090 }
[ "org.alfresco.service.namespace.NamespaceService" ]
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.*;
[ "org.alfresco.service" ]
org.alfresco.service;
905,846
@JsonIgnore public Map<String, Object> getProperties() { Map<String, Object> props = new HashMap<String, Object>( properties ); if ( getRevision() != null ) { props.put( Document.REVISION_FIELD_NAME, getRevision() ); } return props; }
Map<String, Object> function() { Map<String, Object> props = new HashMap<String, Object>( properties ); if ( getRevision() != null ) { props.put( Document.REVISION_FIELD_NAME, getRevision() ); } return props; }
/** * Returns all properties of this entity, including its revision. * * @return all properties of this entity */
Returns all properties of this entity, including its revision
getProperties
{ "repo_name": "emmanuelbernard/hibernate-ogm", "path": "couchdb/src/main/java/org/hibernate/ogm/datastore/couchdb/dialect/backend/json/impl/EntityDocument.java", "license": "lgpl-2.1", "size": 7178 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
439,547
private void applyNextRunConfiguration() { // Remove snpashot first, in case other update is in progress, it will block this one with exclusive lock // and any newer update should be preffered to this one. Snapshot runSnap = getSnapshotDAO().get(getVmId(), SnapshotType.NEXT_RUN); if ...
void function() { Snapshot runSnap = getSnapshotDAO().get(getVmId(), SnapshotType.NEXT_RUN); if (runSnap != null) { getSnapshotDAO().remove(runSnap.getId()); Date originalCreationDate = getVm().getVmCreationDate(); new SnapshotsManager().updateVmFromConfiguration(getVm(), runSnap.getVmConfiguration()); getVm().setVmCre...
/** * Update vm configuration with NEXT_RUN configuration, if exists * @param vmId */
Update vm configuration with NEXT_RUN configuration, if exists
applyNextRunConfiguration
{ "repo_name": "jtux270/translate", "path": "ovirt/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ProcessDownVmCommand.java", "license": "gpl-3.0", "size": 9470 }
[ "java.util.Date", "org.ovirt.engine.core.bll.snapshots.SnapshotsManager", "org.ovirt.engine.core.common.action.VdcActionType", "org.ovirt.engine.core.common.businessentities.Snapshot" ]
import java.util.Date; import org.ovirt.engine.core.bll.snapshots.SnapshotsManager; import org.ovirt.engine.core.common.action.VdcActionType; import org.ovirt.engine.core.common.businessentities.Snapshot;
import java.util.*; import org.ovirt.engine.core.bll.snapshots.*; import org.ovirt.engine.core.common.action.*; import org.ovirt.engine.core.common.businessentities.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
674,287
public Enumeration elements() { return new Enumeration() { int idx=-1, bit=BITS; { advance(); }
Enumeration function() { return new Enumeration() { int idx=-1, bit=BITS; { advance(); }
/** * Return an <code>Enumeration</code> of <code>Integer</code>s * which represent set bit indices in this SparseBitSet. */
Return an <code>Enumeration</code> of <code>Integer</code>s which represent set bit indices in this SparseBitSet
elements
{ "repo_name": "cambridgehackers/jregexp", "path": "regular-expression-parsing/JLex/Main.java", "license": "mit", "size": 204432 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
475,500
PhoneMetadata getMetadataForRegion(String regionCode) { if (!isValidRegionCode(regionCode)) { return null; } return metadataSource.getMetadataForRegion(regionCode); }
PhoneMetadata getMetadataForRegion(String regionCode) { if (!isValidRegionCode(regionCode)) { return null; } return metadataSource.getMetadataForRegion(regionCode); }
/** * Returns the metadata for the given region code or {@code null} if the region code is invalid * or unknown. */
Returns the metadata for the given region code or null if the region code is invalid or unknown
getMetadataForRegion
{ "repo_name": "jarroda/libphonenumber-dotnet", "path": "java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java", "license": "apache-2.0", "size": 167778 }
[ "com.google.i18n.phonenumbers.Phonemetadata" ]
import com.google.i18n.phonenumbers.Phonemetadata;
import com.google.i18n.phonenumbers.*;
[ "com.google.i18n" ]
com.google.i18n;
1,352,187
public final List<String> getFooterLines(final FooterKey keyName) { final List<FooterLine> src = getFooterLines(); if (src.isEmpty()) return Collections.emptyList(); final ArrayList<String> r = new ArrayList<String>(src.size()); for (final FooterLine f : src) { if (f.matches(keyName)) r.add(f.getVa...
final List<String> function(final FooterKey keyName) { final List<FooterLine> src = getFooterLines(); if (src.isEmpty()) return Collections.emptyList(); final ArrayList<String> r = new ArrayList<String>(src.size()); for (final FooterLine f : src) { if (f.matches(keyName)) r.add(f.getValue()); } return r; }
/** * Get the values of all footer lines with the given key. * * @param keyName * footer key to find values of, case insensitive. * @return values of footers with key of {@code keyName}, ordered by their * order of appearance. Duplicates may be returned if the same * footer appe...
Get the values of all footer lines with the given key
getFooterLines
{ "repo_name": "DanielliUrbieta/ProjetoHidraWS", "path": "src/org/eclipse/jgit/revwalk/RevCommit.java", "license": "gpl-2.0", "size": 18994 }
[ "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;
277,485
public void runTemplateWizard(TemplateDescriptor td, boolean useWizard) { TemplateWizard wizardDescriptor = new CustomTemplateWizard(); //wizardDescriptor.putProperty("useCustomChooserPanel", "true"); // NOI18N File targetFolder = Misc.findStartingDirectory(); if (targetFol...
void function(TemplateDescriptor td, boolean useWizard) { TemplateWizard wizardDescriptor = new CustomTemplateWizard(); File targetFolder = Misc.findStartingDirectory(); if (targetFolder == null !targetFolder.exists()) { System.out.println(STR + targetFolder); System.out.flush(); } DataFolder df = DataFolder.findFolder...
/** * Just create a new file from the template selected. * If useWizard is true, the standard iReport wizard is launched. * The implementation put in the created wizardDescriptor the td.getFileObject() * in the propery reportTemplate. * which will be used by the wizard as template for the new r...
Just create a new file from the template selected. If useWizard is true, the standard iReport wizard is launched. The implementation put in the created wizardDescriptor the td.getFileObject() in the propery reportTemplate. which will be used by the wizard as template for the new report
runTemplateWizard
{ "repo_name": "klebergraciasoares/ireport-fork", "path": "ireport-designer/src/com/jaspersoft/ireport/designer/templates/TemplatesFrame.java", "license": "agpl-3.0", "size": 25840 }
[ "com.jaspersoft.ireport.designer.utils.Misc", "com.jaspersoft.ireport.designer.wizards.CustomTemplateWizard", "java.awt.Dialog", "java.io.File", "org.openide.DialogDisplayer", "org.openide.filesystems.FileObject", "org.openide.filesystems.FileUtil", "org.openide.filesystems.Repository", "org.openide...
import com.jaspersoft.ireport.designer.utils.Misc; import com.jaspersoft.ireport.designer.wizards.CustomTemplateWizard; import java.awt.Dialog; import java.io.File; import org.openide.DialogDisplayer; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.filesystems.Repo...
import com.jaspersoft.ireport.designer.utils.*; import com.jaspersoft.ireport.designer.wizards.*; import java.awt.*; import java.io.*; import org.openide.*; import org.openide.filesystems.*; import org.openide.loaders.*;
[ "com.jaspersoft.ireport", "java.awt", "java.io", "org.openide", "org.openide.filesystems", "org.openide.loaders" ]
com.jaspersoft.ireport; java.awt; java.io; org.openide; org.openide.filesystems; org.openide.loaders;
672,280
public void addEdges(Map<Edge, Set<Property>> edgesMap) { for (Edge edge : edgesMap.keySet()) { edgeUpdate(edge, UpdateType.ADDED, edgesMap.get(edge)); } repaint(); }
void function(Map<Edge, Set<Property>> edgesMap) { for (Edge edge : edgesMap.keySet()) { edgeUpdate(edge, UpdateType.ADDED, edgesMap.get(edge)); } repaint(); }
/** * Add edges to graph * * @param edgesMap */
Add edges to graph
addEdges
{ "repo_name": "wkujawa/SDNHub_Opendaylight_Tutorial", "path": "tee/src/main/java/org/opendaylight/controller/tee/internal/monitoring/NetworkMonitor.java", "license": "gpl-3.0", "size": 20984 }
[ "java.util.Map", "java.util.Set", "org.opendaylight.controller.sal.core.Edge", "org.opendaylight.controller.sal.core.Property", "org.opendaylight.controller.sal.core.UpdateType" ]
import java.util.Map; import java.util.Set; import org.opendaylight.controller.sal.core.Edge; import org.opendaylight.controller.sal.core.Property; import org.opendaylight.controller.sal.core.UpdateType;
import java.util.*; import org.opendaylight.controller.sal.core.*;
[ "java.util", "org.opendaylight.controller" ]
java.util; org.opendaylight.controller;
71,998
@SuppressWarnings("unchecked") public static Class<?> getRawClass(Type type) { if (type instanceof ParameterizedType) { return (Class<?>) ((ParameterizedType) type).getRawType(); } else { return (Class<?>) type; } }
@SuppressWarnings(STR) static Class<?> function(Type type) { if (type instanceof ParameterizedType) { return (Class<?>) ((ParameterizedType) type).getRawType(); } else { return (Class<?>) type; } }
/** * Get the raw class for a given type. * * @param type the input type * @return the raw class */
Get the raw class for a given type
getRawClass
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/core/azure-core/src/main/java/com/azure/core/implementation/TypeUtil.java", "license": "mit", "size": 8265 }
[ "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type" ]
import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,982,831
public Set<TriggerKey> getTriggerKeys(GroupMatcher<TriggerKey> matcher) throws SchedulerException { validateState(); if(matcher == null) { matcher = GroupMatcher.groupEquals(Scheduler.DEFAULT_GROUP); } return resources.getJobStore().getTriggerKeys(matche...
Set<TriggerKey> function(GroupMatcher<TriggerKey> matcher) throws SchedulerException { validateState(); if(matcher == null) { matcher = GroupMatcher.groupEquals(Scheduler.DEFAULT_GROUP); } return resources.getJobStore().getTriggerKeys(matcher); }
/** * <p> * Get the names of all the <code>{@link org.quartz.Trigger}s</code> in * the matching groups. * </p> */
Get the names of all the <code><code>org.quartz.Trigger</code>s</code> in the matching groups.
getTriggerKeys
{ "repo_name": "dumptruckman/Pail", "path": "lib/quartz-2.0.1/quartz/src/main/java/org/quartz/core/QuartzScheduler.java", "license": "gpl-2.0", "size": 77924 }
[ "java.util.Set", "org.quartz.Scheduler", "org.quartz.SchedulerException", "org.quartz.TriggerKey", "org.quartz.impl.matchers.GroupMatcher" ]
import java.util.Set; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.TriggerKey; import org.quartz.impl.matchers.GroupMatcher;
import java.util.*; import org.quartz.*; import org.quartz.impl.matchers.*;
[ "java.util", "org.quartz", "org.quartz.impl" ]
java.util; org.quartz; org.quartz.impl;
639,529
@PUT @Path("jobs/{jobid}/startat/{startAt}") @Produces("application/json") boolean changeStartAt(@HeaderParam("sessionid") final String sessionId, @PathParam("jobid") final String jobId, @PathParam("startAt") final String startAt) throws NotConnectedRestException, UnknownJobRestException, Pe...
@Path(STR) @Produces(STR) boolean changeStartAt(@HeaderParam(STR) final String sessionId, @PathParam("jobid") final String jobId, @PathParam(STR) final String startAt) throws NotConnectedRestException, UnknownJobRestException, PermissionRestException;
/** * Change the START_AT generic information at job level and reset the * scheduledAt at task level * * @param sessionId * current session * @param jobid * id of the job that needs to be updated * @param startAt * its value should be ISO 86...
Change the START_AT generic information at job level and reset the scheduledAt at task level
changeStartAt
{ "repo_name": "tobwiens/scheduling", "path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/SchedulerRestInterface.java", "license": "agpl-3.0", "size": 80291 }
[ "javax.ws.rs.HeaderParam", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException", "org.ow2.proactive_grid_cloud_portal.scheduler.exception.PermissionRestException", "org.ow2.proactive_grid_cloud_portal.sch...
import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.PermissionRestException; import org.ow2.proactive_g...
import javax.ws.rs.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*;
[ "javax.ws", "org.ow2.proactive_grid_cloud_portal" ]
javax.ws; org.ow2.proactive_grid_cloud_portal;
443,802
@Nested public Property<NativePlatform> getTargetPlatform() { return targetPlatform; }
Property<NativePlatform> function() { return targetPlatform; }
/** * The platform being compiled for. * * @since 4.7 */
The platform being compiled for
getTargetPlatform
{ "repo_name": "robinverduijn/gradle", "path": "subprojects/language-native/src/main/java/org/gradle/language/rc/tasks/WindowsResourceCompile.java", "license": "apache-2.0", "size": 8310 }
[ "org.gradle.api.provider.Property", "org.gradle.nativeplatform.platform.NativePlatform" ]
import org.gradle.api.provider.Property; import org.gradle.nativeplatform.platform.NativePlatform;
import org.gradle.api.provider.*; import org.gradle.nativeplatform.platform.*;
[ "org.gradle.api", "org.gradle.nativeplatform" ]
org.gradle.api; org.gradle.nativeplatform;
1,994,962
public LocalDate convertDate(String dateStr) { return LocalDate.parse(dateStr, FPML_DATE_FORMAT); }
LocalDate function(String dateStr) { return LocalDate.parse(dateStr, FPML_DATE_FORMAT); }
/** * Converts an FpML date to a {@code LocalDate}. * * @param dateStr the business center name used by FpML * @return the holiday calendar * @throws DateTimeParseException if the date cannot be parsed */
Converts an FpML date to a LocalDate
convertDate
{ "repo_name": "ChinaQuants/Strata", "path": "modules/loader/src/main/java/com/opengamma/strata/loader/fpml/FpmlDocument.java", "license": "apache-2.0", "size": 35318 }
[ "java.time.LocalDate" ]
import java.time.LocalDate;
import java.time.*;
[ "java.time" ]
java.time;
1,501,379
@Override protected void doPerformPaint(Graphics g, PaintMoment moment) { AxisPanel xAxis; XYSequence data; double xMin; double xMax; double x; double y; int i; MathematicalExpression expr; xAxis = getPlot().getAxis(Axis.BOTTOM); xMin = xAxis.getActualMin...
void function(Graphics g, PaintMoment moment) { AxisPanel xAxis; XYSequence data; double xMin; double xMax; double x; double y; int i; MathematicalExpression expr; xAxis = getPlot().getAxis(Axis.BOTTOM); xMin = xAxis.getActualMinimum(); xMax = xAxis.getActualMaximum(); data = new XYSequence(); expr = new MathematicalEx...
/** * The paint routine of the paintlet. * * @param g the graphics context to use for painting * @param moment what {@link PaintMoment} is currently being painted */
The paint routine of the paintlet
doPerformPaint
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/visualization/sequence/MathExpressionOverlayPaintlet.java", "license": "gpl-3.0", "size": 8990 }
[ "java.awt.Color", "java.awt.Graphics" ]
import java.awt.Color; import java.awt.Graphics;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,025,051
public FlexibleAggregationStrategy<E> condition(Predicate predicate) { this.conditionPredicate = predicate; return this; }
FlexibleAggregationStrategy<E> function(Predicate predicate) { this.conditionPredicate = predicate; return this; }
/** * Set a filter condition such as only results satisfying it will be * aggregated. By default, all picked values will be processed. * * @param predicate The condition. * @return This instance. */
Set a filter condition such as only results satisfying it will be aggregated. By default, all picked values will be processed
condition
{ "repo_name": "zregvart/camel", "path": "core/camel-core-engine/src/main/java/org/apache/camel/builder/FlexibleAggregationStrategy.java", "license": "apache-2.0", "size": 16250 }
[ "org.apache.camel.Predicate" ]
import org.apache.camel.Predicate;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
2,184,144
public static void recreateTable(Connect connect) { System.out.println("Recreating the table `label_category`..."); Map<Integer, LabelCategory> _id2category = fillLocalMaps(); UtilSQL.deleteAllRecordsResetAutoIncrement(connect, "label_category"); fillDB(connect, _id2category); ...
static void function(Connect connect) { System.out.println(STR); Map<Integer, LabelCategory> _id2category = fillLocalMaps(); UtilSQL.deleteAllRecordsResetAutoIncrement(connect, STR); fillDB(connect, _id2category); { int db_current_size = wikokit.base.wikipedia.sql.Statistics.Count(connect, STR); assert(db_current_size ...
/** Deletes all records from the table 'label_category', * loads names of labels categories from LabelCategory.java, * sorts by name, * fills the table. */
Deletes all records from the table 'label_category', loads names of labels categories from LabelCategory.java, sorts by name, fills the table
recreateTable
{ "repo_name": "componavt/wikokit", "path": "common_wiki_jdbc/src/wikokit/base/wikt/sql/label/TLabelCategory.java", "license": "apache-2.0", "size": 11497 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
457,788
if (resolver != null && resolver.hasTaxonAndClassName(taxonId, this.clsCol .iterator().next())) { return; } if (resolver == null) { if (clsCol.size() > 1) { resolver = new IdResolver(); } else { r...
if (resolver != null && resolver.hasTaxonAndClassName(taxonId, this.clsCol .iterator().next())) { return; } if (resolver == null) { if (clsCol.size() > 1) { resolver = new IdResolver(); } else { resolver = new IdResolver(clsCol.iterator().next()); } } try { boolean isCachedIdResolverRestored = restoreFromFile(); if (!i...
/** * Build an IdResolver from Entrez Gene gene_info file */
Build an IdResolver from Entrez Gene gene_info file
createIdResolver
{ "repo_name": "joshkh/intermine", "path": "bio/core/main/src/org/intermine/bio/dataconversion/ZfinIdentifiersResolverFactory.java", "license": "lgpl-2.1", "size": 4503 }
[ "java.io.File", "org.apache.commons.lang.StringUtils", "org.intermine.util.PropertiesUtil" ]
import java.io.File; import org.apache.commons.lang.StringUtils; import org.intermine.util.PropertiesUtil;
import java.io.*; import org.apache.commons.lang.*; import org.intermine.util.*;
[ "java.io", "org.apache.commons", "org.intermine.util" ]
java.io; org.apache.commons; org.intermine.util;
2,721,296
@JsonProperty("aws_ec2_instance_group_name") public HashSet getAwsEc2InstanceGroupName() { return awsEc2InstanceGroupName; }
@JsonProperty(STR) public HashSet getAwsEc2InstanceGroupName() { return awsEc2InstanceGroupName; }
/** * Sets aws ec 2 instance type. * * @param awsEc2InstanceType the aws ec 2 instance type */
Sets aws ec 2 instance type
setAwsEc2InstanceType
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/assetImport/models/AssetImport.java", "license": "mit", "size": 9399 }
[ "com.fasterxml.jackson.annotation.JsonProperty", "java.util.HashSet" ]
import com.fasterxml.jackson.annotation.JsonProperty; import java.util.HashSet;
import com.fasterxml.jackson.annotation.*; import java.util.*;
[ "com.fasterxml.jackson", "java.util" ]
com.fasterxml.jackson; java.util;
705,901
private void prepare() { LogicalDatastoreType store = LogicalDatastoreType.CONFIGURATION; when(readTx.read(store, portPath)). thenReturn(getReadResult(targetPort)); succeeded = true; }
void function() { LogicalDatastoreType store = LogicalDatastoreType.CONFIGURATION; when(readTx.read(store, portPath)). thenReturn(getReadResult(targetPort)); succeeded = true; }
/** * Prepare the mock-up for test. */
Prepare the mock-up for test
prepare
{ "repo_name": "opendaylight/vtn", "path": "manager/neutron/src/test/java/org/opendaylight/vtn/manager/neutron/impl/OvsdbNodeChangeTest.java", "license": "epl-1.0", "size": 76494 }
[ "org.mockito.Mockito", "org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType" ]
import org.mockito.Mockito; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.mockito.*; import org.opendaylight.controller.md.sal.common.api.data.*;
[ "org.mockito", "org.opendaylight.controller" ]
org.mockito; org.opendaylight.controller;
536,917
private int calculateLayoutWidth(int widthSize, int mode) { initResourcesIfNecessary(); // TODO: make it static itemsLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); itemsLayout.measure(MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.UNSPECIFIED), ...
int function(int widthSize, int mode) { initResourcesIfNecessary(); itemsLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); itemsLayout.measure(MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); int widt...
/** * Calculates control width and creates text layouts * @param widthSize the input layout width * @param mode the layout mode * @return the calculated control width */
Calculates control width and creates text layouts
calculateLayoutWidth
{ "repo_name": "socoolby/CoolClock", "path": "app/src/main/java/clock/socoolby/com/clock/widget/WheelView.java", "license": "gpl-3.0", "size": 23193 }
[ "android.view.ViewGroup" ]
import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
2,108,180
ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear);
ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear);
/** * Wears out a frame. * * @param housing * IBeeHousing the frame is contained in. * @param frame * ItemStack containing the actual frame. * @param queen * Current queen in the caller. * @param wear * Integer denoting the amount worn out. {@link IBeekee...
Wears out a frame
frameUsed
{ "repo_name": "covers1624/ForestryLegacy", "path": "forestry_common/core/forestry/api/apiculture/IHiveFrame.java", "license": "gpl-3.0", "size": 1251 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
2,456,195
public void interactivePickerMax() { JXDatePicker picker = new JXDatePicker(); picker.setBorder(BorderFactory.createLineBorder(Color.RED)); JComponent content = new JPanel(); content.setLayout(new BoxLayout(content, BoxLayout.PAGE_AXIS)); content.add(picker); // conten...
void function() { JXDatePicker picker = new JXDatePicker(); picker.setBorder(BorderFactory.createLineBorder(Color.RED)); JComponent content = new JPanel(); content.setLayout(new BoxLayout(content, BoxLayout.PAGE_AXIS)); content.add(picker); JXFrame frame = showInFrame(content, STR); frame.setSize(frame.getWidth() * 2, ...
/** * Quick check if DatePicker behaves correctly in vertical max * (yes, thougnh I don't know why: max size isn't overriden?) */
Quick check if DatePicker behaves correctly in vertical max (yes, thougnh I don't know why: max size isn't overriden?)
interactivePickerMax
{ "repo_name": "syncer/swingx", "path": "swingx-core/src/test/java/org/jdesktop/swingx/JXDatePickerVisualCheck.java", "license": "lgpl-2.1", "size": 51161 }
[ "java.awt.Color", "javax.swing.BorderFactory", "javax.swing.BoxLayout", "javax.swing.JComponent", "javax.swing.JPanel" ]
import java.awt.Color; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JComponent; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
627,986
public static void execute(String accountId, String invoice) throws OTException { AccountModule accountModule = AccountModule.getInstance(accountId); if (readBooleanFromInput("Are you sure you want to cancel this invoice?")) accountModule.cancelInvoice(invoice); } }
static void function(String accountId, String invoice) throws OTException { AccountModule accountModule = AccountModule.getInstance(accountId); if (readBooleanFromInput(STR)) accountModule.cancelInvoice(invoice); } }
/** * Cancel an invoice so that the recipient can no longer pay it * * @param accountId * @param invoice * @throws OTException */
Cancel an invoice so that the recipient can no longer pay it
execute
{ "repo_name": "PUREMoneySystems/firstlight", "path": "src/main/java/eu/opentxs/bridge/core/commands/act/BusinessCommands.java", "license": "apache-2.0", "size": 35624 }
[ "eu.opentxs.bridge.core.exceptions.OTException", "eu.opentxs.bridge.core.modules.act.AccountModule" ]
import eu.opentxs.bridge.core.exceptions.OTException; import eu.opentxs.bridge.core.modules.act.AccountModule;
import eu.opentxs.bridge.core.exceptions.*; import eu.opentxs.bridge.core.modules.act.*;
[ "eu.opentxs.bridge" ]
eu.opentxs.bridge;
2,327,833
@Test public void testPoly1305TestVector11() throws GeneralSecurityException { byte[] key = TestUtil.hexDecode("" + "01000000000000000400000000000000" + "00000000000000000000000000000000"); byte[] in = TestUtil.hexDecode("" + "e33594d7505e43b90000000000000000" + "3394d7505e43...
void function() throws GeneralSecurityException { byte[] key = TestUtil.hexDecode(STR01000000000000000400000000000000STR00000000000000000000000000000000"); byte[] in = TestUtil.hexDecode(STRe33594d7505e43b90000000000000000STR3394d7505e4379cd0100000000000000STR00000000000000000000000000000000"); Truth.assertThat(Poly130...
/** * Tests against the test vector 11 in Appendix A.3 of RFC 7539. * https://tools.ietf.org/html/rfc7539#appendix-A.3 */
Tests against the test vector 11 in Appendix A.3 of RFC 7539. HREF
testPoly1305TestVector11
{ "repo_name": "google/tink", "path": "java_src/src/test/java/com/google/crypto/tink/subtle/Poly1305Test.java", "license": "apache-2.0", "size": 12560 }
[ "com.google.common.truth.Truth", "com.google.crypto.tink.testing.TestUtil", "java.security.GeneralSecurityException" ]
import com.google.common.truth.Truth; import com.google.crypto.tink.testing.TestUtil; import java.security.GeneralSecurityException;
import com.google.common.truth.*; import com.google.crypto.tink.testing.*; import java.security.*;
[ "com.google.common", "com.google.crypto", "java.security" ]
com.google.common; com.google.crypto; java.security;
2,371,613
public static int getGlobalSortPartitions(Object globalSortPartitions) { int numPartitions; try { // First try to get the number from ddl, otherwise get it from carbon properties. if (globalSortPartitions == null) { numPartitions = Integer.parseInt(CarbonProperties.getInstance() ...
static int function(Object globalSortPartitions) { int numPartitions; try { if (globalSortPartitions == null) { numPartitions = Integer.parseInt(CarbonProperties.getInstance() .getProperty(CarbonCommonConstants.LOAD_GLOBAL_SORT_PARTITIONS, CarbonCommonConstants.LOAD_GLOBAL_SORT_PARTITIONS_DEFAULT)); } else { numPartiti...
/** * Get the number of partitions in global sort * @param globalSortPartitions * @return the number of partitions */
Get the number of partitions in global sort
getGlobalSortPartitions
{ "repo_name": "sgururajshetty/carbondata", "path": "processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java", "license": "apache-2.0", "size": 29272 }
[ "org.apache.carbondata.core.constants.CarbonCommonConstants", "org.apache.carbondata.core.util.CarbonProperties" ]
import org.apache.carbondata.core.constants.CarbonCommonConstants; import org.apache.carbondata.core.util.CarbonProperties;
import org.apache.carbondata.core.constants.*; import org.apache.carbondata.core.util.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
1,801,422
EReference getScheduleTimeEvent_TimeEvent();
EReference getScheduleTimeEvent_TimeEvent();
/** * Returns the meta object for the reference '{@link org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeEvent <em>Time Event</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Time Event</em>'. * @see org.yakindu.sct.model.sexec.ScheduleTimeEvent#ge...
Returns the meta object for the reference '<code>org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeEvent Time Event</code>'.
getScheduleTimeEvent_TimeEvent
{ "repo_name": "Yakindu/statecharts", "path": "plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecPackage.java", "license": "epl-1.0", "size": 168724 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
456,193
void handleRecoverableException(Exchange exchange);
void handleRecoverableException(Exchange exchange);
/** * This method should handle a recoverable exception * * @param exchange */
This method should handle a recoverable exception
handleRecoverableException
{ "repo_name": "andrewharmellaw/camel-exception-handlers", "path": "src/main/java/com/capgemini/camel/bean/exceptionhandler/ExceptionHandler.java", "license": "apache-2.0", "size": 1050 }
[ "org.apache.camel.Exchange" ]
import org.apache.camel.Exchange;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,727,819
public void testGetAllDifferences_notEqualsDifferentOrderLenientMultipleDifferentValues() { arrayDifferentOrderDifferentValue[0].string = "XXXXXX"; Difference result = lenientOrderComparator.getDifference(arrayA, arrayDifferentOrderDifferentValue); Difference innerDifference1 = getInner...
void function() { arrayDifferentOrderDifferentValue[0].string = STR; Difference result = lenientOrderComparator.getDifference(arrayA, arrayDifferentOrderDifferentValue); Difference innerDifference1 = getInnerDifference(STR, getInnerDifference("1", result)); assertEquals(STR, innerDifference1.getLeftValue()); assertEqua...
/** * Tests for objects with inner arrays that have a element order but with lenient order checking. */
Tests for objects with inner arrays that have a element order but with lenient order checking
testGetAllDifferences_notEqualsDifferentOrderLenientMultipleDifferentValues
{ "repo_name": "arteam/unitils", "path": "unitils-test/src/test/java/org/unitils/reflectionassert/ReflectionComparatorArrayTest.java", "license": "apache-2.0", "size": 13366 }
[ "org.unitils.reflectionassert.difference.Difference", "org.unitils.reflectionassert.util.InnerDifferenceFinder" ]
import org.unitils.reflectionassert.difference.Difference; import org.unitils.reflectionassert.util.InnerDifferenceFinder;
import org.unitils.reflectionassert.difference.*; import org.unitils.reflectionassert.util.*;
[ "org.unitils.reflectionassert" ]
org.unitils.reflectionassert;
14,349
public ApplicationContext getApplicationContext() { return applicationContext; } /** * <p> * Setter for the field <code>applicationContext</code>. * </p> * * @param applicationContext * a {@link org.springframework.context.ApplicationContext}
ApplicationContext function() { return applicationContext; } /** * <p> * Setter for the field <code>applicationContext</code>. * </p> * * @param applicationContext * a {@link org.springframework.context.ApplicationContext}
/** * <p> * Getter for the field <code>applicationContext</code>. * </p> * * @return a {@link org.springframework.context.ApplicationContext} object. */
Getter for the field <code>applicationContext</code>.
getApplicationContext
{ "repo_name": "denisneuling/db2eshop", "path": "src/main/java/com/db2eshop/governance/spring/ApplicationContextLoader.java", "license": "apache-2.0", "size": 2866 }
[ "org.springframework.context.ApplicationContext" ]
import org.springframework.context.ApplicationContext;
import org.springframework.context.*;
[ "org.springframework.context" ]
org.springframework.context;
1,514,239
public static Integer getHeight(final Intent request) { return parseInteger(request, PARAM_HEIGHT); }
static Integer function(final Intent request) { return parseInteger(request, PARAM_HEIGHT); }
/** * Gets height of resolution of ROI image from the specified request. * @param request Request data * @return height of resolution of ROI image */
Gets height of resolution of ROI image from the specified request
getHeight
{ "repo_name": "Onuzimoyr/dAndroid", "path": "dConnectDevicePlugin/dConnectDeviceTheta/app/src/main/java/org/deviceconnect/android/profile/OmnidirectionalImageProfile.java", "license": "mit", "size": 10705 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
785,702
boolean tryCaptureViewForDrag(View toCapture, int pointerId) { if (toCapture == mCapturedView && mActivePointerId == pointerId) { // Already done! return true; } if (toCapture != null && mCallback.tryCaptureView(toCapture, pointerId)) { mActivePointerId = pointerId; captureChildView(toCapture, poin...
boolean tryCaptureViewForDrag(View toCapture, int pointerId) { if (toCapture == mCapturedView && mActivePointerId == pointerId) { return true; } if (toCapture != null && mCallback.tryCaptureView(toCapture, pointerId)) { mActivePointerId = pointerId; captureChildView(toCapture, pointerId); return true; } return false; }
/** * Attempt to capture the view with the given pointer ID. The callback will * be involved. This will put us into the "dragging" state. If we've already * captured this view with this pointer this method will immediately return * true without consulting the callback. * * @param toCapture * V...
Attempt to capture the view with the given pointer ID. The callback will be involved. This will put us into the "dragging" state. If we've already captured this view with this pointer this method will immediately return true without consulting the callback
tryCaptureViewForDrag
{ "repo_name": "lgtianxiawudi/StudyDemo", "path": "Commonlibrary/src/main/java/com/example/ligang/commonlibrary/swipeback/ViewDragHelper.java", "license": "apache-2.0", "size": 53222 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,035,540
@GET("/detach") @Detach(Deserialize.class) String detachDeserializer(); static final class UninstantiableDeserializer extends AbstractDeserializer<String> { public UninstantiableDeserializer(String illegalParam) { //illegal parameterized constructor super(String.class); }
@GET(STR) @Detach(Deserialize.class) String detachDeserializer(); static final class UninstantiableDeserializer extends AbstractDeserializer<String> { public UninstantiableDeserializer(String illegalParam) { super(String.class); }
/** * <p>Sends a request which detaches the inherited deserializer defined on the endpoint.</p> * * @return the response which should not be processed by a deserializer * * @since 1.3.0 */
Sends a request which detaches the inherited deserializer defined on the endpoint
detachDeserializer
{ "repo_name": "sahan/ZombieLink", "path": "zombielink/src/test/java/com/lonepulse/zombielink/processor/DeserializerEndpoint.java", "license": "apache-2.0", "size": 5617 }
[ "com.lonepulse.zombielink.annotation.Deserialize", "com.lonepulse.zombielink.annotation.Detach", "com.lonepulse.zombielink.response.AbstractDeserializer" ]
import com.lonepulse.zombielink.annotation.Deserialize; import com.lonepulse.zombielink.annotation.Detach; import com.lonepulse.zombielink.response.AbstractDeserializer;
import com.lonepulse.zombielink.annotation.*; import com.lonepulse.zombielink.response.*;
[ "com.lonepulse.zombielink" ]
com.lonepulse.zombielink;
1,810,550
public static PidFile create(Path path, boolean deleteOnExit) throws IOException { return create(path, deleteOnExit, JvmInfo.jvmInfo().pid()); }
static PidFile function(Path path, boolean deleteOnExit) throws IOException { return create(path, deleteOnExit, JvmInfo.jvmInfo().pid()); }
/** * Creates a new PidFile and writes the current process ID into the provided path * * @param path the path to the pid file. The file is newly created or truncated if it already exists * @param deleteOnExit if <code>true</code> the pid file is deleted with best effort on system exit * @throws...
Creates a new PidFile and writes the current process ID into the provided path
create
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/PidFile.java", "license": "apache-2.0", "size": 4284 }
[ "java.io.IOException", "java.nio.file.Path", "org.elasticsearch.monitor.jvm.JvmInfo" ]
import java.io.IOException; import java.nio.file.Path; import org.elasticsearch.monitor.jvm.JvmInfo;
import java.io.*; import java.nio.file.*; import org.elasticsearch.monitor.jvm.*;
[ "java.io", "java.nio", "org.elasticsearch.monitor" ]
java.io; java.nio; org.elasticsearch.monitor;
1,949,120
Action getAction();
Action getAction();
/** * The action this ActionConfig represents. Must not return null. * * @return The action this ActionConfig represents. */
The action this ActionConfig represents. Must not return null
getAction
{ "repo_name": "DemonWav/EctoTokens", "path": "src/main/java/com/demonwav/ectotokens/config/ActionConfig.java", "license": "mit", "size": 1053 }
[ "com.demonwav.ectotokens.action.Action" ]
import com.demonwav.ectotokens.action.Action;
import com.demonwav.ectotokens.action.*;
[ "com.demonwav.ectotokens" ]
com.demonwav.ectotokens;
2,308,236
boolean tryCaptureViewForDrag(View toCapture, int pointerId) { if (toCapture == mCapturedView && mActivePointerId == pointerId) { // Already done! return true; } if (toCapture != null && mCallback.tryCaptureView(toCapture, pointerId)) { mActivePointerId = ...
boolean tryCaptureViewForDrag(View toCapture, int pointerId) { if (toCapture == mCapturedView && mActivePointerId == pointerId) { return true; } if (toCapture != null && mCallback.tryCaptureView(toCapture, pointerId)) { mActivePointerId = pointerId; captureChildView(toCapture, pointerId); return true; } return false; }
/** * Attempt to capture the view with the given pointer ID. The callback will * be involved. This will put us into the "dragging" state. If we've already * captured this view with this pointer this method will immediately return * true without consulting the callback. * * @param toCapture...
Attempt to capture the view with the given pointer ID. The callback will be involved. This will put us into the "dragging" state. If we've already captured this view with this pointer this method will immediately return true without consulting the callback
tryCaptureViewForDrag
{ "repo_name": "yjp999/SMSCollectionTask", "path": "src/com/cloudyang/swipebacklayout/ViewDragHelper.java", "license": "apache-2.0", "size": 62195 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,311,180
public static String SHA256(String rawData) { StringBuffer hexString = new StringBuffer(); try { MessageDigest digest = MessageDigest.getInstance("SHA-256"); byte[] hash = digest.digest(rawData.getBytes(StandardCharsets.UTF_8)); //thanks to https://stackoverflo...
static String function(String rawData) { StringBuffer hexString = new StringBuffer(); try { MessageDigest digest = MessageDigest.getInstance(STR); byte[] hash = digest.digest(rawData.getBytes(StandardCharsets.UTF_8)); for (int i = 0; i < hash.length; i++) { if ((0xff & hash[i]) < 0x10) { hexString.append("0" + Integer....
/** * Return the sha256 checksum of a string. */
Return the sha256 checksum of a string
SHA256
{ "repo_name": "SerialKeyManager/SKGL-Extension-for-Java", "path": "src/main/java/io/cryptolens/methods/Helpers.java", "license": "bsd-3-clause", "size": 17816 }
[ "java.nio.charset.StandardCharsets", "java.security.MessageDigest" ]
import java.nio.charset.StandardCharsets; import java.security.MessageDigest;
import java.nio.charset.*; import java.security.*;
[ "java.nio", "java.security" ]
java.nio; java.security;
2,532,502
@Nullable private FeedCategory domainToFeedCategory(@Nullable final Category domainCategory, @Nonnull final Set<UserFieldDescriptor> userFields) { if (domainCategory != null) { FeedCategory category = new FeedCategory(); category.setId(domainCategory.getId().toString()); ...
FeedCategory function(@Nullable final Category domainCategory, @Nonnull final Set<UserFieldDescriptor> userFields) { if (domainCategory != null) { FeedCategory category = new FeedCategory(); category.setId(domainCategory.getId().toString()); if (domainCategory.getFeeds() != null) { List<FeedSummary> summaries = feedMod...
/** * Transforms the specified Metadata category into a Feed Manager category. * * @param domainCategory the Metadata category * @param userFields the user-defined fields * @return the Feed Manager category */
Transforms the specified Metadata category into a Feed Manager category
domainToFeedCategory
{ "repo_name": "peter-gergely-horvath/kylo", "path": "services/feed-manager-service/feed-manager-controller/src/main/java/com/thinkbiganalytics/feedmgr/service/category/CategoryModelTransform.java", "license": "apache-2.0", "size": 11192 }
[ "com.thinkbiganalytics.feedmgr.rest.model.FeedCategory", "com.thinkbiganalytics.feedmgr.rest.model.FeedSummary", "com.thinkbiganalytics.feedmgr.service.UserPropertyTransform", "com.thinkbiganalytics.metadata.api.category.Category", "com.thinkbiganalytics.metadata.api.extension.UserFieldDescriptor", "com.t...
import com.thinkbiganalytics.feedmgr.rest.model.FeedCategory; import com.thinkbiganalytics.feedmgr.rest.model.FeedSummary; import com.thinkbiganalytics.feedmgr.service.UserPropertyTransform; import com.thinkbiganalytics.metadata.api.category.Category; import com.thinkbiganalytics.metadata.api.extension.UserFieldDescrip...
import com.thinkbiganalytics.feedmgr.rest.model.*; import com.thinkbiganalytics.feedmgr.service.*; import com.thinkbiganalytics.metadata.api.category.*; import com.thinkbiganalytics.metadata.api.extension.*; import com.thinkbiganalytics.metadata.api.security.*; import java.util.*; import javax.annotation.*;
[ "com.thinkbiganalytics.feedmgr", "com.thinkbiganalytics.metadata", "java.util", "javax.annotation" ]
com.thinkbiganalytics.feedmgr; com.thinkbiganalytics.metadata; java.util; javax.annotation;
52,080
void validateNode (Node node) throws SarasvatiLoadException;
void validateNode (Node node) throws SarasvatiLoadException;
/** * Allows user validation of each {@link Node} in the loaded {@link Graph}. * This is invoked at the very end of the load process, after the XML has * been loaded, and after the full {@link Graph} has been constructed. * <p> * If a user constraint is violated, a {@link SarasvatiLoadException} should b...
Allows user validation of each <code>Node</code> in the loaded <code>Graph</code>. This is invoked at the very end of the load process, after the XML has been loaded, and after the full <code>Graph</code> has been constructed. If a user constraint is violated, a <code>SarasvatiLoadException</code> should be thrown
validateNode
{ "repo_name": "plorenz/sarasvati", "path": "sarasvati-core/src/main/java/com/googlecode/sarasvati/load/GraphValidator.java", "license": "lgpl-3.0", "size": 5839 }
[ "com.googlecode.sarasvati.Node" ]
import com.googlecode.sarasvati.Node;
import com.googlecode.sarasvati.*;
[ "com.googlecode.sarasvati" ]
com.googlecode.sarasvati;
480,677
private static boolean isPercent(String input) { Pattern pattern = Pattern.compile("^(\\d+|\\d+\\.\\d+)\\%$"); Matcher matcher = pattern.matcher(input); return matcher.matches(); }
static boolean function(String input) { Pattern pattern = Pattern.compile(STR); Matcher matcher = pattern.matcher(input); return matcher.matches(); }
/** * check the input string is percent number * * @param input * @return */
check the input string is percent number
isPercent
{ "repo_name": "lncwwn/meizhuang", "path": "mz-core/src/main/java/com/lncwwn/meizhuang/core/util/StringUtil.java", "license": "mit", "size": 1473 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
596,358
public Vector toVector() { return new Vector(this.x, this.y, this.z); }
Vector function() { return new Vector(this.x, this.y, this.z); }
/** * Converts the builder to a bukkitVector * * @return bukkitVector */
Converts the builder to a bukkitVector
toVector
{ "repo_name": "Shynixn/AstralEdit", "path": "astraledit-bukkit-plugin/src/main/java/com/github/shynixn/astraledit/bukkit/logic/lib/LocationBuilder.java", "license": "apache-2.0", "size": 11441 }
[ "org.bukkit.util.Vector" ]
import org.bukkit.util.Vector;
import org.bukkit.util.*;
[ "org.bukkit.util" ]
org.bukkit.util;
375,563
private void updateListFooter() { if (mListFooterMode != LIST_FOOTER_MODE_NONE) { Logging.d(TAG, "updateListFooter mListFooterMode " + mListFooterMode); int footerTextId = 0; switch (mListFooterMode) { case LIST_FOOTER_MODE_MORE: boolea...
void function() { if (mListFooterMode != LIST_FOOTER_MODE_NONE) { Logging.d(TAG, STR + mListFooterMode); int footerTextId = 0; switch (mListFooterMode) { case LIST_FOOTER_MODE_MORE: boolean active = mRefreshManager.isMessageListRefreshing(getMailboxId()); footerTextId = active ? R.string.status_loading_messages : R.str...
/** * Set the list footer text based on mode and the current "network active" status */
Set the list footer text based on mode and the current "network active" status
updateListFooter
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/Email/src/com/android/email/activity/MessageListFragment.java", "license": "gpl-2.0", "size": 89286 }
[ "android.view.View", "com.android.emailcommon.Logging" ]
import android.view.View; import com.android.emailcommon.Logging;
import android.view.*; import com.android.emailcommon.*;
[ "android.view", "com.android.emailcommon" ]
android.view; com.android.emailcommon;
2,527,319
@Test public void testList04() throws Exception { // given truncateTables("users"); createUser(getDefaultEmail(), getDefaultPass(), null, UserStatus.ACTIVE, UserRole.ROLE_ADMIN); final int userCount = 10; String text = "est"; String token = login...
void function() throws Exception { truncateTables("users"); createUser(getDefaultEmail(), getDefaultPass(), null, UserStatus.ACTIVE, UserRole.ROLE_ADMIN); final int userCount = 10; String text = "est"; String token = login(); String url = getDefaultHostAndPort() + API_USER_LIST + STR + token + STR + text; for (int i = ...
/** * testList04(). * filter out by text * @throws Exception Exception */
testList04(). filter out by text
testList04
{ "repo_name": "formkiq/formkiq-server", "path": "web/src/test/java/com/formkiq/web/UsersControllerIntegrationTest.java", "license": "apache-2.0", "size": 38086 }
[ "com.formkiq.core.domain.type.UserDTO", "com.formkiq.core.domain.type.UserListDTO", "com.formkiq.core.domain.type.UserRole", "com.formkiq.core.domain.type.UserStatus", "org.junit.Assert", "org.springframework.http.HttpMethod", "org.springframework.http.ResponseEntity", "org.springframework.util.String...
import com.formkiq.core.domain.type.UserDTO; import com.formkiq.core.domain.type.UserListDTO; import com.formkiq.core.domain.type.UserRole; import com.formkiq.core.domain.type.UserStatus; import org.junit.Assert; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.spri...
import com.formkiq.core.domain.type.*; import org.junit.*; import org.springframework.http.*; import org.springframework.util.*;
[ "com.formkiq.core", "org.junit", "org.springframework.http", "org.springframework.util" ]
com.formkiq.core; org.junit; org.springframework.http; org.springframework.util;
898,648
public Set<PdfName> getKeys() { return this.hashMap.keySet(); }
Set<PdfName> function() { return this.hashMap.keySet(); }
/** * Get all keys that are set. * * @return <CODE>true</CODE> if it is, otherwise <CODE>false</CODE>. */
Get all keys that are set
getKeys
{ "repo_name": "venanciolm/afirma-ui-miniapplet_x_x", "path": "afirma_ui_miniapplet/src/main/java/com/lowagie/text/pdf/PdfDictionary.java", "license": "mit", "size": 16971 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,561,186
public static byte[] convertBitmapToByteArrayUncompressed(Bitmap bitmap){ ByteBuffer byteBuffer = ByteBuffer.allocate(bitmap.getByteCount()); bitmap.copyPixelsToBuffer(byteBuffer); byteBuffer.rewind(); return byteBuffer.array(); }
static byte[] function(Bitmap bitmap){ ByteBuffer byteBuffer = ByteBuffer.allocate(bitmap.getByteCount()); bitmap.copyPixelsToBuffer(byteBuffer); byteBuffer.rewind(); return byteBuffer.array(); }
/** * Converts bitmap to the byte array without compression * @param bitmap source bitmap * @return result byte array */
Converts bitmap to the byte array without compression
convertBitmapToByteArrayUncompressed
{ "repo_name": "vvkirillov/viewnote", "path": "androidutils/src/main/java/com/nr/androidutils/BitmapUtils.java", "license": "apache-2.0", "size": 2076 }
[ "android.graphics.Bitmap", "java.nio.ByteBuffer" ]
import android.graphics.Bitmap; import java.nio.ByteBuffer;
import android.graphics.*; import java.nio.*;
[ "android.graphics", "java.nio" ]
android.graphics; java.nio;
2,867,983
public int skip(PositionedByteRange src);
int function(PositionedByteRange src);
/** * Skip {@code src}'s position forward over one encoded value. * @param src the buffer containing the encoded value. * @return number of bytes skipped. */
Skip src's position forward over one encoded value
skip
{ "repo_name": "throughsky/lywebank", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/types/DataType.java", "license": "apache-2.0", "size": 4883 }
[ "org.apache.hadoop.hbase.util.PositionedByteRange" ]
import org.apache.hadoop.hbase.util.PositionedByteRange;
import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
619,046
public InputStream getStream() { return this.stream; } }
InputStream function() { return this.stream; } }
/** * Returns the dictionary file stream * * @return concept file stream */
Returns the dictionary file stream
getStream
{ "repo_name": "jgrivolla/uima-addons", "path": "DictionaryAnnotator/src/main/java/org/apache/uima/annotator/dict_annot/impl/DictionaryAnnotator.java", "license": "apache-2.0", "size": 18130 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
207,787
@SimpleEvent(description = "This event is raised when the recent messages " + "requested through <code>RequestDirectMessages</code> have " + "been retrieved. A list of the messages can then be found in the " + "<code>messages</code> parameter or the <code>Messages</code> " + "property.") pub...
@SimpleEvent(description = STR + STR + STR + STR + STR) void function(final List<String> messages) { EventDispatcher.dispatchEvent(this, STR, messages); }
/** * Indicates when all the direct messages requested through * {@link #RequestDirectMessages()} have been received. */
Indicates when all the direct messages requested through <code>#RequestDirectMessages()</code> have been received
DirectMessagesReceived
{ "repo_name": "bitsecure/appinventor1-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Twitter.java", "license": "apache-2.0", "size": 38561 }
[ "com.google.appinventor.components.annotations.SimpleEvent", "java.util.List" ]
import com.google.appinventor.components.annotations.SimpleEvent; import java.util.List;
import com.google.appinventor.components.annotations.*; import java.util.*;
[ "com.google.appinventor", "java.util" ]
com.google.appinventor; java.util;
1,408,765
public void addTarget(InformationSystemHost target) { for (InformationSystemGraphVertex vertex : this.getVertices()) { if (vertex.getType().equals(InformationSystemGraphVertex.TopologyVertexType.Machine)) { if (vertex.getMachine().equals(target)) { vertex.setT...
void function(InformationSystemHost target) { for (InformationSystemGraphVertex vertex : this.getVertices()) { if (vertex.getType().equals(InformationSystemGraphVertex.TopologyVertexType.Machine)) { if (vertex.getMachine().equals(target)) { vertex.setTarget(true); } } } }
/** * Set a node of the information system graph as a target * * @param target the host that is a target */
Set a node of the information system graph as a target
addTarget
{ "repo_name": "DOCTOR-ANR/cybercaptor-server", "path": "src/main/java/org/fiware/cybercaptor/server/informationsystem/graph/InformationSystemGraph.java", "license": "gpl-3.0", "size": 7136 }
[ "org.fiware.cybercaptor.server.informationsystem.InformationSystemHost" ]
import org.fiware.cybercaptor.server.informationsystem.InformationSystemHost;
import org.fiware.cybercaptor.server.informationsystem.*;
[ "org.fiware.cybercaptor" ]
org.fiware.cybercaptor;
2,241,445
public void setNonStrokingColor(double g) throws IOException { appendRawCommands(g); appendRawCommands(SPACE); appendRawCommands(G_NON_STROKING); }
void function(double g) throws IOException { appendRawCommands(g); appendRawCommands(SPACE); appendRawCommands(G_NON_STROKING); }
/** * Set the non stroking color, specified as Grayscale 0.0-1.0. * * @param g The gray value. * @throws IOException If an IO error occurs while writing to the stream. */
Set the non stroking color, specified as Grayscale 0.0-1.0
setNonStrokingColor
{ "repo_name": "sencko/NALB", "path": "nalb2013/src/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.java", "license": "gpl-2.0", "size": 48071 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
957,900
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, HIDE_SOFT_INPUT_FLAGS_NONE); }
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, HIDE_SOFT_INPUT_FLAGS_NONE); }
/** * Show the keyboard * * @param context the context */
Show the keyboard
show
{ "repo_name": "massivedisaster/ADAL", "path": "adal-utils/src/main/java/com/massivedisaster/adal/utils/KeyboardUtils.java", "license": "mit", "size": 2939 }
[ "android.content.Context", "android.view.inputmethod.InputMethodManager" ]
import android.content.Context; import android.view.inputmethod.InputMethodManager;
import android.content.*; import android.view.inputmethod.*;
[ "android.content", "android.view" ]
android.content; android.view;
2,797,102
BigDecimal getTemperatureMin();
BigDecimal getTemperatureMin();
/** * Returns the minimum temperature on the given day in degrees * Fahrenheit. * * @return The minimum temperature on the given day in degrees * Fahrenheit. */
Returns the minimum temperature on the given day in degrees Fahrenheit
getTemperatureMin
{ "repo_name": "sutra/forecast", "path": "src/main/java/com/github/sutra/io/forecast/DataPoint.java", "license": "bsd-2-clause", "size": 8643 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,915,947
void addKey(@NotNull CharCodeWithModifiers key, @NotNull String actionId);
void addKey(@NotNull CharCodeWithModifiers key, @NotNull String actionId);
/** * Add key binding for action. * * @param key * the hot key which bind * @param actionId * the action id which keys bind */
Add key binding for action
addKey
{ "repo_name": "codenvy/che-core", "path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/keybinding/Scheme.java", "license": "epl-1.0", "size": 2113 }
[ "javax.validation.constraints.NotNull", "org.eclipse.che.ide.util.input.CharCodeWithModifiers" ]
import javax.validation.constraints.NotNull; import org.eclipse.che.ide.util.input.CharCodeWithModifiers;
import javax.validation.constraints.*; import org.eclipse.che.ide.util.input.*;
[ "javax.validation", "org.eclipse.che" ]
javax.validation; org.eclipse.che;
755,155
@Deprecated public Employee getEmployeeForPositionAndDate(final Long posId, final Date givenDate) { return assignmentService.getPrimaryAssignmentForPositionAndDate(posId, givenDate).getEmployee(); }
Employee function(final Long posId, final Date givenDate) { return assignmentService.getPrimaryAssignmentForPositionAndDate(posId, givenDate).getEmployee(); }
/** * Refer the same API in employee service * * @param posId * @param givenDate * @return Employee object */
Refer the same API in employee service
getEmployeeForPositionAndDate
{ "repo_name": "egovernments/egov-playground", "path": "eGov/egov/egov-eis/src/main/java/org/egov/eis/service/EisCommonService.java", "license": "gpl-3.0", "size": 8661 }
[ "java.util.Date", "org.egov.eis.entity.Employee" ]
import java.util.Date; import org.egov.eis.entity.Employee;
import java.util.*; import org.egov.eis.entity.*;
[ "java.util", "org.egov.eis" ]
java.util; org.egov.eis;
89,948
public void addPoint(int color, ILocational locational) { addPoint("", color, false, locational); }
void function(int color, ILocational locational) { addPoint("", color, false, locational); }
/** * Adds a point to be displayed on client. * @param color the color * @param locational the ILocational to take coordinates for this point */
Adds a point to be displayed on client
addPoint
{ "repo_name": "rubenswagner/L2J-Global", "path": "java/com/l2jglobal/gameserver/network/serverpackets/ExServerPrimitive.java", "license": "gpl-3.0", "size": 17405 }
[ "com.l2jglobal.gameserver.model.interfaces.ILocational" ]
import com.l2jglobal.gameserver.model.interfaces.ILocational;
import com.l2jglobal.gameserver.model.interfaces.*;
[ "com.l2jglobal.gameserver" ]
com.l2jglobal.gameserver;
1,906,082
public void testJSR() throws Exception { BlockDecomposer decomposer = new BlockDecomposer(); decomposer.addOp(load(1)); Label sub = new Label(); decomposer.jumpSubroutine(sub, 0); decomposer.addOp(load(2)); decomposer.addOp(new Return(0, VOID)); decomposer.label(sub); decomposer.addOp(...
void function() throws Exception { BlockDecomposer decomposer = new BlockDecomposer(); decomposer.addOp(load(1)); Label sub = new Label(); decomposer.jumpSubroutine(sub, 0); decomposer.addOp(load(2)); decomposer.addOp(new Return(0, VOID)); decomposer.label(sub); decomposer.addOp(load(3)); decomposer.addOp(new RetSub(0)...
/** * load 1 * jsr mySub * load 2 * return * * mySub: * load 3 * return; */
load 1 jsr mySub load 2 return mySub: load 3 return
testJSR
{ "repo_name": "dipooyekanmi/testability-explorer", "path": "testability-explorer/src/test/java/com/google/test/metric/method/BlockDecomposerTest.java", "license": "apache-2.0", "size": 14621 }
[ "com.google.test.metric.method.op.stack.RetSub", "com.google.test.metric.method.op.stack.Return", "com.google.test.metric.method.op.stack.StackOperation", "java.util.List", "org.objectweb.asm.Label" ]
import com.google.test.metric.method.op.stack.RetSub; import com.google.test.metric.method.op.stack.Return; import com.google.test.metric.method.op.stack.StackOperation; import java.util.List; import org.objectweb.asm.Label;
import com.google.test.metric.method.op.stack.*; import java.util.*; import org.objectweb.asm.*;
[ "com.google.test", "java.util", "org.objectweb.asm" ]
com.google.test; java.util; org.objectweb.asm;
1,622,276
@Test public void testRpcMethodPing() { Request req = new Request("ping"); client.invoke(req); assertFalse(req.errorMessage(), req.isError()); assertEquals(1, req.returnValues().size()); assertEquals(0, req.returnValues().get(0).asInt32()); }
void function() { Request req = new Request("ping"); client.invoke(req); assertFalse(req.errorMessage(), req.isError()); assertEquals(1, req.returnValues().size()); assertEquals(0, req.returnValues().get(0).asInt32()); }
/** * Tests ping RPC command */
Tests ping RPC command
testRpcMethodPing
{ "repo_name": "vespa-engine/vespa", "path": "config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java", "license": "apache-2.0", "size": 11093 }
[ "com.yahoo.jrt.Request", "org.junit.Assert" ]
import com.yahoo.jrt.Request; import org.junit.Assert;
import com.yahoo.jrt.*; import org.junit.*;
[ "com.yahoo.jrt", "org.junit" ]
com.yahoo.jrt; org.junit;
1,386,374
private EPackage findOrMakePackage(String packageName) { EPackage thePackage = null; for (Iterator<EPackage> it = topPackage.getESubpackages().iterator();it.hasNext();) { EPackage next = it.next(); if (next.getName().equals(packageName)) thePackage = next; } if (thePackage == null) { ...
EPackage function(String packageName) { EPackage thePackage = null; for (Iterator<EPackage> it = topPackage.getESubpackages().iterator();it.hasNext();) { EPackage next = it.next(); if (next.getName().equals(packageName)) thePackage = next; } if (thePackage == null) { thePackage = EcoreFactory.eINSTANCE.createEPackage()...
/** * find or make a package with a given name * @param packageName * @return the package */
find or make a package with a given name
findOrMakePackage
{ "repo_name": "openmapsoftware/mappingtools", "path": "openmap-mapper-health/src/main/java/com/openMap1/mapper/health/actions/ImportMDHTModel.java", "license": "epl-1.0", "size": 93111 }
[ "java.util.Iterator", "org.eclipse.emf.ecore.EPackage", "org.eclipse.emf.ecore.EcoreFactory" ]
import java.util.Iterator; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EcoreFactory;
import java.util.*; import org.eclipse.emf.ecore.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
2,105,694
public void sort() { // sort the intervals by start position Collections.sort(list, startcomparator); // create an array indicating the maximal end position // The size of this array will always be one longer than the interval array int listsize = list.size(); if (l...
void function() { Collections.sort(list, startcomparator); int listsize = list.size(); if (listsize > 0) { maxend = new int[listsize + 1]; maxend[0] = list.get(0).getEnd(); for (int i = 1; i < listsize; i++) { maxend[i] = Math.max(maxend[i - 1], list.get(i).getEnd()); } maxend[listsize] = list.get(listsize - 1).getEnd(...
/** * rearranges the values within the internal list. This MUST be called * before getValues(int position) can output some reasonable answers. * * Invisibly from the user, this also creates a helper array maxend which * helps to speed up the getValues process. * */
rearranges the values within the internal list. This MUST be called before getValues(int position) can output some reasonable answers. Invisibly from the user, this also creates a helper array maxend which helps to speed up the getValues process
sort
{ "repo_name": "tkonopka/GeneticThesaurus", "path": "src/thesaurus/util/IntervalWithValueList.java", "license": "apache-2.0", "size": 6317 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
1,445,744