method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
protected ToolView createToolView(ToolViewDescriptor descriptor) { ToolView toolView = (ToolView) descriptor.createPageComponent(); toolView.setContext(new DefaultPageComponentContext(this, createToolViewPane(toolView))); return toolView; }
ToolView function(ToolViewDescriptor descriptor) { ToolView toolView = (ToolView) descriptor.createPageComponent(); toolView.setContext(new DefaultPageComponentContext(this, createToolViewPane(toolView))); return toolView; }
/** * Creates a PageComponent for the given PageComponentDescriptor. * * @param descriptor the descriptor * @return the created PageComponent */
Creates a PageComponent for the given PageComponentDescriptor
createToolView
{ "repo_name": "arraydev/snap-desktop", "path": "snap-ui/src/main/java/org/esa/snap/framework/ui/application/support/AbstractApplicationPage.java", "license": "gpl-3.0", "size": 12854 }
[ "org.esa.snap.framework.ui.application.ToolView", "org.esa.snap.framework.ui.application.ToolViewDescriptor" ]
import org.esa.snap.framework.ui.application.ToolView; import org.esa.snap.framework.ui.application.ToolViewDescriptor;
import org.esa.snap.framework.ui.application.*;
[ "org.esa.snap" ]
org.esa.snap;
2,518,865
public static Message buildSnapshot(Zxid lastZxid, Zxid snapZxid) { ZabMessage.Zxid lZxid = toProtoZxid(lastZxid); ZabMessage.Zxid sZxid = toProtoZxid(snapZxid); Snapshot snapshot = Snapshot.newBuilder().setLastZxid(lZxid) .setSnapZxid(sZxid) ...
static Message function(Zxid lastZxid, Zxid snapZxid) { ZabMessage.Zxid lZxid = toProtoZxid(lastZxid); ZabMessage.Zxid sZxid = toProtoZxid(snapZxid); Snapshot snapshot = Snapshot.newBuilder().setLastZxid(lZxid) .setSnapZxid(sZxid) .build(); return Message.newBuilder().setType(MessageType.SNAPSHOT) .setSnapshot(snapshot...
/** * Creates a SNAPSHOT message. * * @param lastZxid the last zxid of the sender. * @param snapZxid the last guaranteed applied zxid in snapshot. * @return a protobuf message. */
Creates a SNAPSHOT message
buildSnapshot
{ "repo_name": "fpj/jzab", "path": "src/main/java/com/github/zk1931/jzab/MessageBuilder.java", "license": "apache-2.0", "size": 23166 }
[ "com.github.zk1931.jzab.proto.ZabMessage" ]
import com.github.zk1931.jzab.proto.ZabMessage;
import com.github.zk1931.jzab.proto.*;
[ "com.github.zk1931" ]
com.github.zk1931;
1,950,864
public T caseImply(Imply object) { return null; }
T function(Imply object) { return null; }
/** * Returns the result of interpreting the object as an instance of * '<em>Imply</em>'. <!-- begin-user-doc --> This implementation returns null; * returning a non-null result will terminate the switch. <!-- end-user-doc --> * * @param object the target of the switch. * @return the result of interpreting...
Returns the result of interpreting the object as an instance of 'Imply'. This implementation returns null; returning a non-null result will terminate the switch.
caseImply
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/booleans/util/BooleansSwitch.java", "license": "epl-1.0", "size": 16035 }
[ "fr.lip6.move.pnml.pthlpng.booleans.Imply" ]
import fr.lip6.move.pnml.pthlpng.booleans.Imply;
import fr.lip6.move.pnml.pthlpng.booleans.*;
[ "fr.lip6.move" ]
fr.lip6.move;
2,142,597
public void printValueDistribution(PrintWriter writer, boolean ascending) { List<E> keys = null; if (ascending) { keys = getKeysByValueAscending(); } else { keys = getKeysByValueDescending(); } for (E key : keys) { writer.print(String.valueOf(key)); writer.print(" : "); writer.print(getValue...
void function(PrintWriter writer, boolean ascending) { List<E> keys = null; if (ascending) { keys = getKeysByValueAscending(); } else { keys = getKeysByValueDescending(); } for (E key : keys) { writer.print(String.valueOf(key)); writer.print(STR); writer.print(getValue(key)); writer.println(); } writer.flush(); }
/** * Prints the distribution of values (ascending or descending) to the given * stream, where each value is printed on a separate line in the form * &lt;key&gt; : &lt;value&gt;. * * <p> * <i>Example:</i><br> * * foo : 4 <br> * bar : 2 * </p> */
Prints the distribution of values (ascending or descending) to the given stream, where each value is printed on a separate line in the form &lt;key&gt; : &lt;value&gt;. Example: foo : 4 bar : 2
printValueDistribution
{ "repo_name": "vimaier/conqat", "path": "org.conqat.engine.core/external/commons-src/org/conqat/lib/commons/collections/CounterSet.java", "license": "apache-2.0", "size": 6734 }
[ "java.io.PrintWriter", "java.util.List" ]
import java.io.PrintWriter; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
77,088
void sendForceRescanEvent() { // Log4j category LOG.debug("generateForceRescanEvent: interface = {}", getAgent().getHostAddress()); // Send event via EventProxy try { getEventProxy().send(createForceResanEvent()); } catch (EventProxyException e) { LOG.error("generateForceR...
void sendForceRescanEvent() { LOG.debug(STR, getAgent().getHostAddress()); try { getEventProxy().send(createForceResanEvent()); } catch (EventProxyException e) { LOG.error(STR, e); } }
/** * This method is responsible for building a Capsd forceRescan event object * and sending it out over the EventProxy. * @param eventProxy * proxy over which an event may be sent to eventd * @param ifAddress * interface address to which this event pertains * @p...
This method is responsible for building a Capsd forceRescan event object and sending it out over the EventProxy
sendForceRescanEvent
{ "repo_name": "rdkgit/opennms", "path": "opennms-services/src/main/java/org/opennms/netmgt/collectd/ForceRescanState.java", "license": "agpl-3.0", "size": 4274 }
[ "org.opennms.netmgt.events.api.EventProxyException" ]
import org.opennms.netmgt.events.api.EventProxyException;
import org.opennms.netmgt.events.api.*;
[ "org.opennms.netmgt" ]
org.opennms.netmgt;
465,023
private ModelAndView getModel(PluginConfiguration configuration) { Map<String, String> labels = new HashMap<>(); List<Plugin> plugins = pluginLoader.getPlugins(new NameFilter(configuration.getName())); if (plugins.size() > 0) { Plugin plugin = plugins.get(0); if (plug...
ModelAndView function(PluginConfiguration configuration) { Map<String, String> labels = new HashMap<>(); List<Plugin> plugins = pluginLoader.getPlugins(new NameFilter(configuration.getName())); if (plugins.size() > 0) { Plugin plugin = plugins.get(0); if (plugin != null) { Locale locale = userService.getCurrentUser().g...
/** * Get model for showing plugin configuration * * @param configuration current plugin configuration * @return ModelAndView */
Get model for showing plugin configuration
getModel
{ "repo_name": "0x0000-dot-ru/jcommune", "path": "jcommune-view/jcommune-web-controller/src/main/java/org/jtalks/jcommune/web/controller/PluginController.java", "license": "lgpl-2.1", "size": 7297 }
[ "java.util.HashMap", "java.util.List", "java.util.Locale", "java.util.Map", "org.jtalks.jcommune.model.entity.PluginConfiguration", "org.jtalks.jcommune.model.entity.PluginProperty", "org.jtalks.jcommune.model.plugins.Plugin", "org.jtalks.jcommune.service.plugins.NameFilter", "org.springframework.we...
import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import org.jtalks.jcommune.model.entity.PluginConfiguration; import org.jtalks.jcommune.model.entity.PluginProperty; import org.jtalks.jcommune.model.plugins.Plugin; import org.jtalks.jcommune.service.plugins.NameFilter; imp...
import java.util.*; import org.jtalks.jcommune.model.entity.*; import org.jtalks.jcommune.model.plugins.*; import org.jtalks.jcommune.service.plugins.*; import org.springframework.web.servlet.*;
[ "java.util", "org.jtalks.jcommune", "org.springframework.web" ]
java.util; org.jtalks.jcommune; org.springframework.web;
2,207,863
public Annotation[] getSortedAnnotations(String type){ Annotation[] annots = sortedAnnotations.get(type); if(annots == null){ //not calculated yet AnnotationSet inputAS = (inputASName == null || inputASName.trim().length() == 0) ? document.getAnnotations() : document.getAnnotation...
Annotation[] function(String type){ Annotation[] annots = sortedAnnotations.get(type); if(annots == null){ AnnotationSet inputAS = (inputASName == null inputASName.trim().length() == 0) ? document.getAnnotations() : document.getAnnotations(inputASName); ArrayList<Annotation> annOfType = new ArrayList<Annotation>( input...
/** * Get the set of annotations, of a given type, sorted by start offset and * inverse length, obtained from the input annotation set of the current * document. * * @param type the type of annotations requested. * @return an array of {@link Annotation} values. */
Get the set of annotations, of a given type, sorted by start offset and inverse length, obtained from the input annotation set of the current document
getSortedAnnotations
{ "repo_name": "TsangLab/Annotators", "path": "substrateMINE/plugins/JAPE_Plus/src/gate/jape/plus/Transducer.java", "license": "mit", "size": 31241 }
[ "java.util.ArrayList", "java.util.Collections" ]
import java.util.ArrayList; import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
659,756
@Metadata(label = "producer", enums = "1,2", description = "Specifies the delivery mode to be used." + " Possibles values are those defined by javax.jms.DeliveryMode." + " NON_PERSISTENT = 1 and PERSISTENT = 2.") public void setDeliveryMode(Integer deliveryMod...
@Metadata(label = STR, enums = "1,2", description = STR + STR + STR) void function(Integer deliveryMode) { getConfiguration().setDeliveryMode(deliveryMode); }
/** * Specifies the delivery mode to be used. * Possibles values are those defined by javax.jms.DeliveryMode. * NON_PERSISTENT = 1 and PERSISTENT = 2. */
Specifies the delivery mode to be used. Possibles values are those defined by javax.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2
setDeliveryMode
{ "repo_name": "punkhorn/camel-upstream", "path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java", "license": "apache-2.0", "size": 82155 }
[ "org.apache.camel.spi.Metadata" ]
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
219,045
public final <O extends SpaceObject> List<O> solidBoundingBoxesMeet(Class<O> cls) { return (state == null || collisionHitbox == null ? new ArrayList<>() : state.solidBoundingBoxesMeet(collisionHitbox, cls)); }
final <O extends SpaceObject> List<O> function(Class<O> cls) { return (state == null collisionHitbox == null ? new ArrayList<>() : state.solidBoundingBoxesMeet(collisionHitbox, cls)); }
/** * Returns all of the solid SpaceObjects of the specified class in this * MobileObject's SpaceState whose solid Hitboxes' rectangular bounding * boxes touch or intersect this MobileObject's collision Hitbox's * rectangular bounding box. * @param <O> The subclass of SpaceObject to search...
Returns all of the solid SpaceObjects of the specified class in this MobileObject's SpaceState whose solid Hitboxes' rectangular bounding boxes touch or intersect this MobileObject's collision Hitbox's rectangular bounding box
solidBoundingBoxesMeet
{ "repo_name": "742mph/Ironclad2D", "path": "src/org/cell2d/space/MobileObject.java", "license": "gpl-3.0", "size": 34839 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,535,261
public void onUpdate() { this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; this.moveEntity(this.motionX, this.motionY, this.motionZ); if (this.worldObj.getBlockState(new BlockPos(this)).getBlock().getMaterial() != Material.water) { ...
void function() { this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; this.moveEntity(this.motionX, this.motionY, this.motionZ); if (this.worldObj.getBlockState(new BlockPos(this)).getBlock().getMaterial() != Material.water) { this.setDead(); } if (this.particleMaxAge-- <= 0) { this.setDead...
/** * Called to update the entity's position/logic. */
Called to update the entity's position/logic
onUpdate
{ "repo_name": "SkidJava/BaseClient", "path": "new_1.8.8/net/minecraft/client/particle/EntitySuspendFX.java", "license": "gpl-2.0", "size": 1816 }
[ "net.minecraft.block.material.Material", "net.minecraft.util.BlockPos" ]
import net.minecraft.block.material.Material; import net.minecraft.util.BlockPos;
import net.minecraft.block.material.*; import net.minecraft.util.*;
[ "net.minecraft.block", "net.minecraft.util" ]
net.minecraft.block; net.minecraft.util;
1,709,752
public void setReplaces(String replaces) { this.replaces = replaces; if (replaces != null) { installFix = new AbstractQuickFix(10, true, "install_extension", getExtensionName()) {
void function(String replaces) { this.replaces = replaces; if (replaces != null) { installFix = new AbstractQuickFix(10, true, STR, getExtensionName()) {
/** * Sets replaces. * * @param replaces the replaces */
Sets replaces
setReplaces
{ "repo_name": "cm-is-dog/rapidminer-studio-core", "path": "src/main/java/com/rapidminer/operator/DummyOperator.java", "license": "agpl-3.0", "size": 6673 }
[ "com.rapidminer.operator.ports.quickfix.AbstractQuickFix" ]
import com.rapidminer.operator.ports.quickfix.AbstractQuickFix;
import com.rapidminer.operator.ports.quickfix.*;
[ "com.rapidminer.operator" ]
com.rapidminer.operator;
631,214
@Override public int hashCode() { return Objects.hash(addedRecipientIds, attachmentTabId, authoritativeCopy, authoritativeCopyMetadata, availableDocumentTypes, containsPdfFormFields, display, displayMetadata, documentBase64, documentFields, documentId, documentIdGuid, errorDetails, includeInDownload, includeInD...
int function() { return Objects.hash(addedRecipientIds, attachmentTabId, authoritativeCopy, authoritativeCopyMetadata, availableDocumentTypes, containsPdfFormFields, display, displayMetadata, documentBase64, documentFields, documentId, documentIdGuid, errorDetails, includeInDownload, includeInDownloadMetadata, name, na...
/** * Returns the HashCode. */
Returns the HashCode
hashCode
{ "repo_name": "docusign/docusign-java-client", "path": "src/main/java/com/docusign/esign/model/EnvelopeDocument.java", "license": "mit", "size": 24216 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,484,670
@Override public Request<AssociateVpcCidrBlockRequest> getDryRunRequest() { Request<AssociateVpcCidrBlockRequest> request = new AssociateVpcCidrBlockRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; }
Request<AssociateVpcCidrBlockRequest> function() { Request<AssociateVpcCidrBlockRequest> request = new AssociateVpcCidrBlockRequestMarshaller().marshall(this); request.addParameter(STR, Boolean.toString(true)); return request; }
/** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run
getDryRunRequest
{ "repo_name": "aws/aws-sdk-java", "path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/AssociateVpcCidrBlockRequest.java", "license": "apache-2.0", "size": 30234 }
[ "com.amazonaws.Request", "com.amazonaws.services.ec2.model.transform.AssociateVpcCidrBlockRequestMarshaller" ]
import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.AssociateVpcCidrBlockRequestMarshaller;
import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*;
[ "com.amazonaws", "com.amazonaws.services" ]
com.amazonaws; com.amazonaws.services;
1,595,549
public static ComponentOrientation getOrientation(Locale locale) { // Based on iterating over all languages defined in JDK 1.4, this behavior // matches Sun's. However, it makes me wonder if any non-horizontal // orientations even exist, as it sure contradicts their documentation. String language = ...
static ComponentOrientation function(Locale locale) { String language = locale.getLanguage(); if ("ar".equals(language) "fa".equals(language) "iw".equals(language) "ur".equals(language)) return RIGHT_TO_LEFT; return LEFT_TO_RIGHT; }
/** * Gets an orientation appropriate for the locale. * * @param locale the locale * @return the orientation for that locale * @throws NullPointerException if locale is null */
Gets an orientation appropriate for the locale
getOrientation
{ "repo_name": "aosm/gccfast", "path": "libjava/java/awt/ComponentOrientation.java", "license": "gpl-2.0", "size": 7439 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,251,240
public void testSerialization() throws Exception { AtomicInteger x = new AtomicInteger(); AtomicInteger y = serialClone(x); assertNotSame(x, y); x.set(22); AtomicInteger z = serialClone(x); assertEquals(22, x.get()); assertEquals(0, y.get()); assertEqu...
void function() throws Exception { AtomicInteger x = new AtomicInteger(); AtomicInteger y = serialClone(x); assertNotSame(x, y); x.set(22); AtomicInteger z = serialClone(x); assertEquals(22, x.get()); assertEquals(0, y.get()); assertEquals(22, z.get()); }
/** * a deserialized serialized atomic holds same value */
a deserialized serialized atomic holds same value
testSerialization
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/ojluni/src/test/java/util/concurrent/tck/AtomicIntegerTest.java", "license": "gpl-2.0", "size": 8926 }
[ "java.util.concurrent.atomic.AtomicInteger" ]
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
1,694,925
public long getBitMask(Object mask) { if (this.dataType == InetAddress.class) { // TODO handle Inet v4 and v6 v6 will have a second upper mask return 0; } if (this.dataType() == Byte[].class) { if (mask == null) { return 0xffffffffffffL; ...
long function(Object mask) { if (this.dataType == InetAddress.class) { return 0; } if (this.dataType() == Byte[].class) { if (mask == null) { return 0xffffffffffffL; } byte mac[] = (byte[]) mask; long bitmask = 0; for (short i = 0; i < 6; i++) { bitmask = ((mac[i] & 0xffL) << ((5 - i) * 8)); } return bitmask; } if (thi...
/** * Return the mask value in 64 bits bitmask form * * @param mask * @return */
Return the mask value in 64 bits bitmask form
getBitMask
{ "repo_name": "lbchen/ODL", "path": "opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/match/MatchType.java", "license": "epl-1.0", "size": 10629 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
2,459,640
public void hidePopup() { ((DatePickerUI) getUI()).showPopup(false); }
void function() { ((DatePickerUI) getUI()).showPopup(false); }
/** * Hides the calendar dropdown without selecting a date. */
Hides the calendar dropdown without selecting a date
hidePopup
{ "repo_name": "AlanGuerraQuispe/SisAtuxPerfumeria", "path": "atux-jrcp/src/main/java/com/michaelbaranov/microba/calendar/DatePicker.java", "license": "gpl-2.0", "size": 10291 }
[ "com.michaelbaranov.microba.calendar.ui.DatePickerUI" ]
import com.michaelbaranov.microba.calendar.ui.DatePickerUI;
import com.michaelbaranov.microba.calendar.ui.*;
[ "com.michaelbaranov.microba" ]
com.michaelbaranov.microba;
2,277,982
public M getMetaboliteById(Serializable id);
M function(Serializable id);
/** * Looks up a metabolite entity by id. Note that the id is usually a * surrogate key, which means it is bad practice to refer them in * this way. Use the entry instead which is a database specified * identifier. * * @param id the id of the metabolite * @return the metabolite with id <code>id</code> ...
Looks up a metabolite entity by id. Note that the id is usually a surrogate key, which means it is bad practice to refer them in this way. Use the entry instead which is a database specified identifier
getMetaboliteById
{ "repo_name": "Fxe/biosynth-core", "path": "src/main/java/pt/uminho/sysbio/biosynthframework/io/MetaboliteDao.java", "license": "gpl-3.0", "size": 1574 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,515,097
void write(VariableByteOutputStream os) throws IOException;
void write(VariableByteOutputStream os) throws IOException;
/** * Write the node id to a {@link org.exist.storage.io.VariableByteOutputStream}. * * @param os the output stream * @throws java.io.IOException if there's a problem with the underlying output stream */
Write the node id to a <code>org.exist.storage.io.VariableByteOutputStream</code>
write
{ "repo_name": "kingargyle/exist-1.4.x", "path": "src/org/exist/numbering/NodeId.java", "license": "lgpl-2.1", "size": 7458 }
[ "java.io.IOException", "org.exist.storage.io.VariableByteOutputStream" ]
import java.io.IOException; import org.exist.storage.io.VariableByteOutputStream;
import java.io.*; import org.exist.storage.io.*;
[ "java.io", "org.exist.storage" ]
java.io; org.exist.storage;
652,879
@ExportMessage @SuppressWarnings("static-method") Object getMembers(@SuppressWarnings("unused") boolean includeInternal, @Cached(value = "this.block.getDeclaredLocalVariables()", adopt = false, dimensions = 1, allowUncached = true) SLWriteLocalVariableNode[] writeNodes, ...
@SuppressWarnings(STR) Object getMembers(@SuppressWarnings(STR) boolean includeInternal, @Cached(value = STR, adopt = false, dimensions = 1, allowUncached = true) SLWriteLocalVariableNode[] writeNodes, @Cached(value = STR, allowUncached = true) int visibleVariablesIndex, @Cached(value = STR, allowUncached = true) int p...
/** * Get the variables. Cache the array of write nodes that declare variables in the scope(s) * and the indexes which determine visible variables. */
Get the variables. Cache the array of write nodes that declare variables in the scope(s) and the indexes which determine visible variables
getMembers
{ "repo_name": "smarr/Truffle", "path": "truffle/src/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLScopedNode.java", "license": "gpl-2.0", "size": 37980 }
[ "com.oracle.truffle.api.dsl.Cached" ]
import com.oracle.truffle.api.dsl.Cached;
import com.oracle.truffle.api.dsl.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
2,353,815
public Pokemon getPokemonById(final Long id) { synchronized (this.lock) { for (Pokemon pokemon : pokemons) { if (pokemon.getId() == id) { return pokemon; } } } return null; }
Pokemon function(final Long id) { synchronized (this.lock) { for (Pokemon pokemon : pokemons) { if (pokemon.getId() == id) { return pokemon; } } } return null; }
/** * Get a pokemon by id. * * @param id the id * @return the pokemon */
Get a pokemon by id
getPokemonById
{ "repo_name": "Grover-c13/PokeGOAPI-Java", "path": "library/src/main/java/com/pokegoapi/api/inventory/PokeBank.java", "license": "gpl-3.0", "size": 7277 }
[ "com.pokegoapi.api.pokemon.Pokemon" ]
import com.pokegoapi.api.pokemon.Pokemon;
import com.pokegoapi.api.pokemon.*;
[ "com.pokegoapi.api" ]
com.pokegoapi.api;
2,129,647
public static int incrementAndGet(AtomicInteger ai) { return Atomic.incrementAndGet(ai); }
static int function(AtomicInteger ai) { return Atomic.incrementAndGet(ai); }
/** * Atomically increments by one the current value of given AtomicInteger. * * @param ai AtomicInteger that is incremented. * @return the updated value */
Atomically increments by one the current value of given AtomicInteger
incrementAndGet
{ "repo_name": "xiangyong/btrace", "path": "src/share/classes/com/sun/btrace/BTraceUtils.java", "license": "gpl-2.0", "size": 235515 }
[ "java.util.concurrent.atomic.AtomicInteger" ]
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
1,279,127
void setKey(SelectionKey key) { if (m_key != null) { throw new IllegalStateException("Tried to set selection key twice"); } m_key = key; if (!isOpen()) { // If we closed this before receiving the key, we should cancel the key. NIOUtils.cancelKeySil...
void setKey(SelectionKey key) { if (m_key != null) { throw new IllegalStateException(STR); } m_key = key; if (!isOpen()) { NIOUtils.cancelKeySilently(m_key); return; } keyInitialized(); synchronizeKeyInterestOps(); }
/** * Sets the selection key of this responder. <p> This method is called on * the NIOService-thread. * * @param key the selection key for this responder. * @throws IllegalStateException if the selection key already is set. */
Sets the selection key of this responder. This method is called on the NIOService-thread
setKey
{ "repo_name": "m0wfo/naga", "path": "src/main/java/io/naga/ChannelResponder.java", "license": "mit", "size": 9098 }
[ "java.nio.channels.SelectionKey" ]
import java.nio.channels.SelectionKey;
import java.nio.channels.*;
[ "java.nio" ]
java.nio;
691,150
void lock(String entityName, Object entity, LockMode lockMode) throws DataAccessException;
void lock(String entityName, Object entity, LockMode lockMode) throws DataAccessException;
/** * Obtain the specified lock level upon the given object, implicitly * checking whether the corresponding database entry still exists. * @param entityName the name of the persistent entity * @param entity the persistent instance to lock * @param lockMode the lock mode to obtain * @throws org.springframew...
Obtain the specified lock level upon the given object, implicitly checking whether the corresponding database entry still exists
lock
{ "repo_name": "cbeams-archive/spring-framework-2.5.x", "path": "src/org/springframework/orm/hibernate3/HibernateOperations.java", "license": "apache-2.0", "size": 44752 }
[ "org.hibernate.LockMode", "org.springframework.dao.DataAccessException" ]
import org.hibernate.LockMode; import org.springframework.dao.DataAccessException;
import org.hibernate.*; import org.springframework.dao.*;
[ "org.hibernate", "org.springframework.dao" ]
org.hibernate; org.springframework.dao;
122,114
public ApiResponse<InlineResponse201> createItemWithHttpInfo(String authorization, UUID companyId, String avalaraProductType, ItemGoods body) throws ApiException { com.squareup.okhttp.Call call = createItemValidateBeforeCall(authorization, companyId, avalaraProductType, body, null, null); Type local...
ApiResponse<InlineResponse201> function(String authorization, UUID companyId, String avalaraProductType, ItemGoods body) throws ApiException { com.squareup.okhttp.Call call = createItemValidateBeforeCall(authorization, companyId, avalaraProductType, body, null, null); Type localVarReturnType = new TypeToken<InlineRespo...
/** * Create custom agast for one company * This method operation create a custom agast for one company * @param authorization Bearer {auth} (required) * @param companyId Company ID (required) * @param avalaraProductType Avalara Product Type (required) * @param body Transaction Message (r...
Create custom agast for one company This method operation create a custom agast for one company
createItemWithHttpInfo
{ "repo_name": "Avalara/avataxbr-clients", "path": "java-client/src/main/java/io/swagger/client/api/CompanyItemGoodsApi.java", "license": "gpl-3.0", "size": 50394 }
[ "com.google.gson.reflect.TypeToken", "io.swagger.client.ApiException", "io.swagger.client.ApiResponse", "io.swagger.client.model.InlineResponse201", "io.swagger.client.model.ItemGoods", "java.lang.reflect.Type" ]
import com.google.gson.reflect.TypeToken; import io.swagger.client.ApiException; import io.swagger.client.ApiResponse; import io.swagger.client.model.InlineResponse201; import io.swagger.client.model.ItemGoods; import java.lang.reflect.Type;
import com.google.gson.reflect.*; import io.swagger.client.*; import io.swagger.client.model.*; import java.lang.reflect.*;
[ "com.google.gson", "io.swagger.client", "java.lang" ]
com.google.gson; io.swagger.client; java.lang;
1,834,619
public void testHashcode() { XYBlockRenderer r1 = new XYBlockRenderer(); XYBlockRenderer r2 = new XYBlockRenderer(); assertTrue(r1.equals(r2)); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2); }
void function() { XYBlockRenderer r1 = new XYBlockRenderer(); XYBlockRenderer r2 = new XYBlockRenderer(); assertTrue(r1.equals(r2)); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2); }
/** * Two objects that are equal are required to return the same hashCode. */
Two objects that are equal are required to return the same hashCode
testHashcode
{ "repo_name": "JSansalone/JFreeChart", "path": "tests/org/jfree/chart/renderer/xy/junit/XYBlockRendererTests.java", "license": "lgpl-2.1", "size": 7882 }
[ "org.jfree.chart.renderer.xy.XYBlockRenderer" ]
import org.jfree.chart.renderer.xy.XYBlockRenderer;
import org.jfree.chart.renderer.xy.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,707,253
void cancel(SectionInfo info);
void cancel(SectionInfo info);
/** * Cancel the dialog. Does exactly the same thing as the close button of the dialog. * * @param info */
Cancel the dialog. Does exactly the same thing as the close button of the dialog
cancel
{ "repo_name": "equella/Equella", "path": "Source/Plugins/Core/com.equella.core/src/com/tle/web/controls/universal/UniversalControlState.java", "license": "apache-2.0", "size": 4434 }
[ "com.tle.web.sections.SectionInfo" ]
import com.tle.web.sections.SectionInfo;
import com.tle.web.sections.*;
[ "com.tle.web" ]
com.tle.web;
1,377,229
@Test(timeout = 20000) public void testSharedDurableSubChangeOfTopicAndSelector() throws Exception { doSharedSubChangeOfDetailsTestImpl(true, true, true); }
@Test(timeout = 20000) void function() throws Exception { doSharedSubChangeOfDetailsTestImpl(true, true, true); }
/** * Verifies that a shared durable subscriber creation using the same subscription * name but different topic and selector than an existing subscriber can't be active * on the same connection at the same time fails (can't change details in use). * * @throws Exception if an unexpected exceptio...
Verifies that a shared durable subscriber creation using the same subscription name but different topic and selector than an existing subscriber can't be active on the same connection at the same time fails (can't change details in use)
testSharedDurableSubChangeOfTopicAndSelector
{ "repo_name": "gemmellr/qpid-jms", "path": "qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/SubscriptionsIntegrationTest.java", "license": "apache-2.0", "size": 73102 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,500,753
@Override public void info(final Marker marker, final String message, final Object... params) { logWrapper.logIfEnabled(loggerName, Level.INFO, marker, message, params); }
void function(final Marker marker, final String message, final Object... params) { logWrapper.logIfEnabled(loggerName, Level.INFO, marker, message, params); }
/** * Logs a message with parameters at the {@code Level.INFO} level. * * @param marker the marker data specific to this log statement * @param message the message to log; the format depends on the message factory. * @param params parameters to the message. */
Logs a message with parameters at the Level.INFO level
info
{ "repo_name": "PurelyApplied/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/logging/log4j/LogWriterLogger.java", "license": "apache-2.0", "size": 56907 }
[ "org.apache.logging.log4j.Level", "org.apache.logging.log4j.Marker" ]
import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.*;
[ "org.apache.logging" ]
org.apache.logging;
2,215,540
public String getPathTranslated(NavigationRule mappedNav, String fromURL) throws NotMatchedException { URLRewriter rewriter = this.getURLRewriter(mappedNav); return rewriter.translate(mappedNav.getFromViewId().toString(), mappedNav.getFromViewId().getMappingTo(), fromURL); }
String function(NavigationRule mappedNav, String fromURL) throws NotMatchedException { URLRewriter rewriter = this.getURLRewriter(mappedNav); return rewriter.translate(mappedNav.getFromViewId().toString(), mappedNav.getFromViewId().getMappingTo(), fromURL); }
/** * translate incoming url of client to internal one. * * @param mappedNav * @param fromURL incoming url of client * @return * @throws NotMatchedException */
translate incoming url of client to internal one
getPathTranslated
{ "repo_name": "hansas/sitevelocity", "path": "src/org/sitevelocity/web/filters/navigations/Navigator.java", "license": "apache-2.0", "size": 5062 }
[ "org.sitevelocity.exceptions.NotMatchedException", "org.sitevelocity.web.utils.URLRewriter" ]
import org.sitevelocity.exceptions.NotMatchedException; import org.sitevelocity.web.utils.URLRewriter;
import org.sitevelocity.exceptions.*; import org.sitevelocity.web.utils.*;
[ "org.sitevelocity.exceptions", "org.sitevelocity.web" ]
org.sitevelocity.exceptions; org.sitevelocity.web;
119,095
private Result processScript() throws IOException, HsqlException { String token = tokenizer.getString(); ScriptWriterText dsw = null; session.checkAdmin(); try { if (tokenizer.wasValue()) { if (tokenizer.getType() != Types.VARCHAR) { ...
Result function() throws IOException, HsqlException { String token = tokenizer.getString(); ScriptWriterText dsw = null; session.checkAdmin(); try { if (tokenizer.wasValue()) { if (tokenizer.getType() != Types.VARCHAR) { throw Trace.error(Trace.INVALID_IDENTIFIER); } dsw = new ScriptWriterText(database, token, true, tr...
/** * Responsible for parsing and executing the SCRIPT SQL statement * * @return either an empty result or one in which each row is a DDL or DML * @throws IOException * @throws HsqlException */
Responsible for parsing and executing the SCRIPT SQL statement
processScript
{ "repo_name": "jonathant/rhodes", "path": "platform/bb/Hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java", "license": "gpl-3.0", "size": 107732 }
[ "java.io.IOException", "org.hsqldb.scriptio.ScriptWriterText" ]
import java.io.IOException; import org.hsqldb.scriptio.ScriptWriterText;
import java.io.*; import org.hsqldb.scriptio.*;
[ "java.io", "org.hsqldb.scriptio" ]
java.io; org.hsqldb.scriptio;
2,546,769
public static void queueCubeLoad(ICubicWorld world, CubeIO loader, CubeProviderServer cache, int x, int y, int z, Consumer<Cube> runnable) { QueuedCube key = new QueuedCube(x, y, z, world); AsyncCubeIOProvider task = cubeTasks.get(key); if (task == null) { task = new AsyncCubeIOProvider(key, loader); t...
static void function(ICubicWorld world, CubeIO loader, CubeProviderServer cache, int x, int y, int z, Consumer<Cube> runnable) { QueuedCube key = new QueuedCube(x, y, z, world); AsyncCubeIOProvider task = cubeTasks.get(key); if (task == null) { task = new AsyncCubeIOProvider(key, loader); task.addCallback(runnable); cu...
/** * Queue a cube load, running the specified callback when the load has finished. This may cause a two tick delay * if the column has to be loaded, too! If you need it faster, consider sync loading either column or both * cube and column. * * @param world The world of the cube * @param loader The file loa...
Queue a cube load, running the specified callback when the load has finished. This may cause a two tick delay if the column has to be loaded, too! If you need it faster, consider sync loading either column or both cube and column
queueCubeLoad
{ "repo_name": "Cyclonit/CubicChunks", "path": "src/main/java/cubicchunks/server/chunkio/async/forge/AsyncWorldIOExecutor.java", "license": "mit", "size": 10227 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
1,395,986
public void setParts(List<FragmentPart> parts) { this.parts = parts; notifyViews(); }
void function(List<FragmentPart> parts) { this.parts = parts; notifyViews(); }
/** * Sets the list of FragmentParts in the Fragment to parts. The list of * FragmentParts contains all the content information for the fragment. The * list of FragmentParts is displayed when a fragment is viewed. * * @param parts the new list of FragmentParts for the Fragment * @see Frag...
Sets the list of FragmentParts in the Fragment to parts. The list of FragmentParts contains all the content information for the fragment. The list of FragmentParts is displayed when a fragment is viewed
setParts
{ "repo_name": "Team-CMPUT301F13T12/301-Project", "path": "src/ualberta/g12/adventurecreator/data/Fragment.java", "license": "apache-2.0", "size": 4230 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,835,051
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) public List<MailConfigsEntity> physicalSelectAll(Order order) { String sql = SQLManager.getInstance().getSql("/org/support/project/web/dao/sql/MailConfigsDao/MailConfigsDao_physical_select_all.sql"); sql = String.form...
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) List<MailConfigsEntity> function(Order order) { String sql = SQLManager.getInstance().getSql(STR); sql = String.format(sql, order.toString()); return executeQueryList(sql, MailConfigsEntity.class); }
/** * Select all data. * @param order order * @return all data */
Select all data
physicalSelectAll
{ "repo_name": "support-project/knowledge", "path": "src/main/java/org/support/project/web/dao/gen/GenMailConfigsDao.java", "license": "apache-2.0", "size": 17202 }
[ "java.util.List", "org.support.project.aop.Aspect", "org.support.project.ormapping.common.SQLManager", "org.support.project.ormapping.config.Order", "org.support.project.web.entity.MailConfigsEntity" ]
import java.util.List; import org.support.project.aop.Aspect; import org.support.project.ormapping.common.SQLManager; import org.support.project.ormapping.config.Order; import org.support.project.web.entity.MailConfigsEntity;
import java.util.*; import org.support.project.aop.*; import org.support.project.ormapping.common.*; import org.support.project.ormapping.config.*; import org.support.project.web.entity.*;
[ "java.util", "org.support.project" ]
java.util; org.support.project;
1,267,162
public void updateExternalAPIStoresDetails(APIIdentifier apiIdentifier, Set<APIStore> apiStoreSet, Connection conn) throws APIManagementException, SQLException { PreparedStatement ps = null; try { conn.setAutoCommit(false); //This query to add external APIStores ...
void function(APIIdentifier apiIdentifier, Set<APIStore> apiStoreSet, Connection conn) throws APIManagementException, SQLException { PreparedStatement ps = null; try { conn.setAutoCommit(false); String sqlQuery = SQLConstants.UPDATE_EXTERNAL_API_STORE_SQL; ps = conn.prepareStatement(sqlQuery); int apiId; apiId = getAPI...
/** * Updateexternal APIStores details to which APIs published * * @param apiIdentifier API Identifier * @throws APIManagementException if failed to add Application */
Updateexternal APIStores details to which APIs published
updateExternalAPIStoresDetails
{ "repo_name": "knPerera/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java", "license": "apache-2.0", "size": 493075 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "java.util.Set", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.APIIdentifier", "org.wso2.carbon.apimgt.api.model.APIStore", "org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants", ...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Set; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.api.model.APIStore; import org.wso2.carbon.apimgt.impl.dao.con...
import java.sql.*; import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "java.sql", "java.util", "org.wso2.carbon" ]
java.sql; java.util; org.wso2.carbon;
1,052,131
private void registerRuntimeFilter(RuntimeFilter filter) { Map<TupleId, List<SlotId>> targetSlotsByTid = filter.getTargetSlots(); Preconditions.checkState(targetSlotsByTid != null && !targetSlotsByTid.isEmpty()); for (TupleId tupleId: targetSlotsByTid.keySet()) { registerRuntimeFilter(filter, tupleI...
void function(RuntimeFilter filter) { Map<TupleId, List<SlotId>> targetSlotsByTid = filter.getTargetSlots(); Preconditions.checkState(targetSlotsByTid != null && !targetSlotsByTid.isEmpty()); for (TupleId tupleId: targetSlotsByTid.keySet()) { registerRuntimeFilter(filter, tupleId); } }
/** * Registers a runtime filter with the tuple id of every scan node that is a candidate * destination node for that filter. */
Registers a runtime filter with the tuple id of every scan node that is a candidate destination node for that filter
registerRuntimeFilter
{ "repo_name": "924060929/impala-frontend", "path": "fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java", "license": "apache-2.0", "size": 25934 }
[ "com.google.common.base.Preconditions", "java.util.List", "java.util.Map", "org.apache.impala.analysis.SlotId", "org.apache.impala.analysis.TupleId" ]
import com.google.common.base.Preconditions; import java.util.List; import java.util.Map; import org.apache.impala.analysis.SlotId; import org.apache.impala.analysis.TupleId;
import com.google.common.base.*; import java.util.*; import org.apache.impala.analysis.*;
[ "com.google.common", "java.util", "org.apache.impala" ]
com.google.common; java.util; org.apache.impala;
191,463
public Duration totalTime() { return totalTime; }
Duration function() { return totalTime; }
/** * Total (measured locally) wall time spent running a spawn. This should be at least as large as * all the other times summed together. */
Total (measured locally) wall time spent running a spawn. This should be at least as large as all the other times summed together
totalTime
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/actions/SpawnMetrics.java", "license": "apache-2.0", "size": 17236 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
1,461,720
private void updateSync() { try { UpdateChecker checker = new UpdateChecker(); UpdateCheckResult result = checker.checkForUpdatesSync(plugin); if (result.needsUpdate()) { updateInstallSync(result); } else { notifyServer(new Upda...
void function() { try { UpdateChecker checker = new UpdateChecker(); UpdateCheckResult result = checker.checkForUpdatesSync(plugin); if (result.needsUpdate()) { updateInstallSync(result); } else { notifyServer(new UpdateResult(Status.NO_UPDATE, result)); } } catch (IOException e) { plugin.getLogger().log(Level.WARNING,...
/** * Blocking update method, must <b>not</b> be called from the server thread. */
Blocking update method, must not be called from the server thread
updateSync
{ "repo_name": "rutgerkok/BlockLocker", "path": "src/main/java/nl/rutgerkok/blocklocker/impl/updater/Updater.java", "license": "mit", "size": 4697 }
[ "java.io.IOException", "java.util.logging.Level", "nl.rutgerkok.blocklocker.impl.updater.UpdateResult" ]
import java.io.IOException; import java.util.logging.Level; import nl.rutgerkok.blocklocker.impl.updater.UpdateResult;
import java.io.*; import java.util.logging.*; import nl.rutgerkok.blocklocker.impl.updater.*;
[ "java.io", "java.util", "nl.rutgerkok.blocklocker" ]
java.io; java.util; nl.rutgerkok.blocklocker;
1,290,113
public UserStoreDTO[] getSecondaryRealmConfigurations() throws IdentityUserStoreMgtException { ArrayList<UserStoreDTO> domains = new ArrayList<UserStoreDTO>(); RealmConfiguration secondaryRealmConfiguration = null; try { secondaryRealmConfiguration = CarbonContext.getThreadLocal...
UserStoreDTO[] function() throws IdentityUserStoreMgtException { ArrayList<UserStoreDTO> domains = new ArrayList<UserStoreDTO>(); RealmConfiguration secondaryRealmConfiguration = null; try { secondaryRealmConfiguration = CarbonContext.getThreadLocalCarbonContext().getUserRealm(). getRealmConfiguration().getSecondaryRea...
/** * Get details of current secondary user store configurations * * @return : Details of all the configured secondary user stores * @throws UserStoreException */
Get details of current secondary user store configurations
getSecondaryRealmConfigurations
{ "repo_name": "pulasthi7/carbon-identity", "path": "components/user-store/org.wso2.carbon.identity.user.store.configuration/src/main/java/org/wso2/carbon/identity/user/store/configuration/UserStoreConfigAdminService.java", "license": "apache-2.0", "size": 46162 }
[ "java.util.ArrayList", "java.util.Map", "java.util.UUID", "org.wso2.carbon.context.CarbonContext", "org.wso2.carbon.identity.user.store.configuration.beans.RandomPassword", "org.wso2.carbon.identity.user.store.configuration.dto.UserStoreDTO", "org.wso2.carbon.identity.user.store.configuration.utils.Iden...
import java.util.ArrayList; import java.util.Map; import java.util.UUID; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.identity.user.store.configuration.beans.RandomPassword; import org.wso2.carbon.identity.user.store.configuration.dto.UserStoreDTO; import org.wso2.carbon.identity.user.store.conf...
import java.util.*; import org.wso2.carbon.context.*; import org.wso2.carbon.identity.user.store.configuration.beans.*; import org.wso2.carbon.identity.user.store.configuration.dto.*; import org.wso2.carbon.identity.user.store.configuration.utils.*; import org.wso2.carbon.user.api.*; import org.wso2.carbon.user.core.*;...
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
2,117,308
public void destroyLoader(int id) { if (mCreatingLoader) { throw new IllegalStateException("Called while creating a loader"); } if (DEBUG) Log.v(TAG, "destroyLoader in " + this + " of " + id); int idx = mLoaders.indexOfKey(id); if (idx >= 0) { ...
void function(int id) { if (mCreatingLoader) { throw new IllegalStateException(STR); } if (DEBUG) Log.v(TAG, STR + this + STR + id); int idx = mLoaders.indexOfKey(id); if (idx >= 0) { LoaderInfo info = mLoaders.valueAt(idx); mLoaders.removeAt(idx); info.destroy(); } idx = mInactiveLoaders.indexOfKey(id); if (idx >= 0) ...
/** * Rip down, tear apart, shred to pieces a current Loader ID. After returning * from this function, any Loader objects associated with this ID are * destroyed. Any data associated with them is destroyed. You better not * be using it when you do this. * @param id Identifier of the Loader t...
Rip down, tear apart, shred to pieces a current Loader ID. After returning from this function, any Loader objects associated with this ID are destroyed. Any data associated with them is destroyed. You better not be using it when you do this
destroyLoader
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/app/LoaderManager.java", "license": "apache-2.0", "size": 37707 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,084,943
private String validateFilePath(String file, Configuration conf) throws IOException { if (file == null) { return null; } if (file.isEmpty()) { throw new IllegalArgumentException("File name can't be empty string"); } String finalPath; URI pathURI; try { pathURI = new...
String function(String file, Configuration conf) throws IOException { if (file == null) { return null; } if (file.isEmpty()) { throw new IllegalArgumentException(STR); } String finalPath; URI pathURI; try { pathURI = new URI(file); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); } Path path = ne...
/** * takes input as a path string for file and verifies if it exist. It defaults * for file:/// if the files specified do not have a scheme. it returns the * paths uri converted defaulting to file:///. So an input of /home/user/file1 * would return file:///home/user/file1 * * @param file * @param...
takes input as a path string for file and verifies if it exist. It defaults for file:/// if the files specified do not have a scheme. it returns the paths uri converted defaulting to file:///. So an input of /home/user/file1 would return file:///home/user/file1
validateFilePath
{ "repo_name": "aliyun-beta/aliyun-oss-hadoop-fs", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/JobResourceUploader.java", "license": "apache-2.0", "size": 12616 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.net.URISyntaxException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.net.URISyntaxException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import java.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.net", "org.apache.hadoop" ]
java.io; java.net; org.apache.hadoop;
2,147,149
java.util.Set<Item> pick_items(FloatPoint p_location, ItemSelectionFilter p_item_filter) { IntPoint location = p_location.round(); java.util.Set<Item> result = board.pick_items(location, settings.layer, p_item_filter); if (result.size() == 0 && settings.select_on_all_visible_layers) ...
java.util.Set<Item> pick_items(FloatPoint p_location, ItemSelectionFilter p_item_filter) { IntPoint location = p_location.round(); java.util.Set<Item> result = board.pick_items(location, settings.layer, p_item_filter); if (result.size() == 0 && settings.select_on_all_visible_layers) { for (int i = 0; i < graphics_conte...
/** * Gets all items at p_location on the active eu.mihosoft.freerouting.board layer with the inputt item filter. * If nothing is found on the active layer and settings.select_on_all_layers * is true, all layers are selected. */
Gets all items at p_location on the active eu.mihosoft.freerouting.board layer with the inputt item filter. If nothing is found on the active layer and settings.select_on_all_layers is true, all layers are selected
pick_items
{ "repo_name": "andrasfuchs/BioBalanceDetector", "path": "Tools/KiCad_FreeRouting/FreeRouting-miho-master/freerouting-master/src/main/java/eu/mihosoft/freerouting/interactive/BoardHandling.java", "license": "gpl-3.0", "size": 57907 }
[ "eu.mihosoft.freerouting.board.Item", "eu.mihosoft.freerouting.board.ItemSelectionFilter", "eu.mihosoft.freerouting.geometry.planar.FloatPoint", "eu.mihosoft.freerouting.geometry.planar.IntPoint", "java.util.Set" ]
import eu.mihosoft.freerouting.board.Item; import eu.mihosoft.freerouting.board.ItemSelectionFilter; import eu.mihosoft.freerouting.geometry.planar.FloatPoint; import eu.mihosoft.freerouting.geometry.planar.IntPoint; import java.util.Set;
import eu.mihosoft.freerouting.board.*; import eu.mihosoft.freerouting.geometry.planar.*; import java.util.*;
[ "eu.mihosoft.freerouting", "java.util" ]
eu.mihosoft.freerouting; java.util;
245,703
public void onExchangeChangeAffinityMessage(GridDhtPartitionsExchangeFuture exchFut, boolean crd, CacheAffinityChangeMessage msg) { if (log.isDebugEnabled()) { log.debug("Process exchange affinity change message [exchVer=" + exchFut.initialVersion() + ", msg=" + m...
void function(GridDhtPartitionsExchangeFuture exchFut, boolean crd, CacheAffinityChangeMessage msg) { if (log.isDebugEnabled()) { log.debug(STR + exchFut.initialVersion() + STR + msg + ']'); } assert exchFut.exchangeId().equals(msg.exchangeId()) : msg; final AffinityTopologyVersion topVer = exchFut.initialVersion(); fi...
/** * Called when received {@link CacheAffinityChangeMessage} which should complete exchange. * * @param exchFut Exchange future. * @param crd Coordinator flag. * @param msg Affinity change message. */
Called when received <code>CacheAffinityChangeMessage</code> which should complete exchange
onExchangeChangeAffinityMessage
{ "repo_name": "WilliamDo/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java", "license": "apache-2.0", "size": 97250 }
[ "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion", "org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture" ]
import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
581,922
private int[] genStencilDisplayListGradient(PApplet pa, FloatBuffer vertBuff, FloatBuffer tbuff, FloatBuffer colorBuff, FloatBuffer strokeColBuff, IntBuffer indexBuff, boolean drawSmooth, float strokeWeight, Vertex[] vertexArr, List<Vertex[]> outLines // ,float x1R, float x1G, float x1B, float x1A, float x...
int[] function(PApplet pa, FloatBuffer vertBuff, FloatBuffer tbuff, FloatBuffer colorBuff, FloatBuffer strokeColBuff, IntBuffer indexBuff, boolean drawSmooth, float strokeWeight, Vertex[] vertexArr, List<Vertex[]> outLines ) { GL10 gl = PlatformUtil.beginGL(); GL11Plus gl11Plus = PlatformUtil.getGL11Plus(); int[] retur...
/** * Gen stencil display list gradient. * <p><b>NOTE</b>: the openGL context has to be valid at the time of calling this method. * * @param pa the pa * @param vertBuff the vert buff * @param tbuff the tbuff * @param colorBuff the color buff * @param strokeColBuff the stroke col buff * @param indexBu...
Gen stencil display list gradient. NOTE: the openGL context has to be valid at the time of calling this method
genStencilDisplayListGradient
{ "repo_name": "rogiermars/mt4j-core", "path": "src/org/mt4j/components/visibleComponents/shapes/MTStencilPolygon.java", "license": "gpl-2.0", "size": 27519 }
[ "java.nio.FloatBuffer", "java.nio.IntBuffer", "java.util.List", "org.mt4j.util.PlatformUtil", "org.mt4j.util.math.ToolsGeometry", "org.mt4j.util.math.Vertex", "org.mt4j.util.opengl.GL11Plus" ]
import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.util.List; import org.mt4j.util.PlatformUtil; import org.mt4j.util.math.ToolsGeometry; import org.mt4j.util.math.Vertex; import org.mt4j.util.opengl.GL11Plus;
import java.nio.*; import java.util.*; import org.mt4j.util.*; import org.mt4j.util.math.*; import org.mt4j.util.opengl.*;
[ "java.nio", "java.util", "org.mt4j.util" ]
java.nio; java.util; org.mt4j.util;
2,527,293
public void keyPressed(final int keyCode) { if (controlKeysHandler == null) { return; } final int actionCode = controlKeysHandler.getKeyActionCode(keyCode); if (actionCode == ControlKeys.MOVE_UP_KEY) { moveUp(true); } else if (actionCode == ControlKeys.MOVE_DOWN_KEY) { mo...
void function(final int keyCode) { if (controlKeysHandler == null) { return; } final int actionCode = controlKeysHandler.getKeyActionCode(keyCode); if (actionCode == ControlKeys.MOVE_UP_KEY) { moveUp(true); } else if (actionCode == ControlKeys.MOVE_DOWN_KEY) { moveDown(true); } else if (actionCode == ControlKeys.MOVE_L...
/** * Handle key pressed event * * @param keyCode * key code forwarded by implementing application */
Handle key pressed event
keyPressed
{ "repo_name": "camptocamp/maps-lib-nutiteq", "path": "src/com/nutiteq/BasicMapComponent.java", "license": "gpl-2.0", "size": 79702 }
[ "com.nutiteq.components.MapPos", "com.nutiteq.components.Point", "com.nutiteq.controls.ControlKeys" ]
import com.nutiteq.components.MapPos; import com.nutiteq.components.Point; import com.nutiteq.controls.ControlKeys;
import com.nutiteq.components.*; import com.nutiteq.controls.*;
[ "com.nutiteq.components", "com.nutiteq.controls" ]
com.nutiteq.components; com.nutiteq.controls;
2,441,320
private void CheckCMYK(IfdTags metadata, int n) { // Samples per pixel if (!metadata.containsTagId(TiffTags.getTagId("SamplesPerPixel"))) { validation.addErrorLoc("Missing Samples Per Pixel", "IFD" + n); } // BitsPerSample if (!metadata.containsTagId(TiffTags.getTagId("BitsPerSample"))) { ...
void function(IfdTags metadata, int n) { if (!metadata.containsTagId(TiffTags.getTagId(STR))) { validation.addErrorLoc(STR, "IFD" + n); } if (!metadata.containsTagId(TiffTags.getTagId(STR))) { validation.addErrorLoc(STR, "IFD" + n); } }
/** * Check CMYK. * * @param metadata the metadata * @param n the ifd number */
Check CMYK
CheckCMYK
{ "repo_name": "EasyinnovaSL/Tiff-Library-4J", "path": "src/main/java/com/easyinnova/tiff/profiles/BaselineProfile.java", "license": "gpl-3.0", "size": 24690 }
[ "com.easyinnova.tiff.model.IfdTags", "com.easyinnova.tiff.model.TiffTags" ]
import com.easyinnova.tiff.model.IfdTags; import com.easyinnova.tiff.model.TiffTags;
import com.easyinnova.tiff.model.*;
[ "com.easyinnova.tiff" ]
com.easyinnova.tiff;
1,875,860
return new ExpressionAdapter() {
return new ExpressionAdapter() {
/** * Returns an expression for the inbound message attachments * * @return an expression object which will return the inbound message attachments */
Returns an expression for the inbound message attachments
attachmentsExpression
{ "repo_name": "NetNow/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java", "license": "apache-2.0", "size": 69447 }
[ "org.apache.camel.support.ExpressionAdapter" ]
import org.apache.camel.support.ExpressionAdapter;
import org.apache.camel.support.*;
[ "org.apache.camel" ]
org.apache.camel;
323,710
@Message(id = 99, value = "Password should have at least %s characters!") PasswordValidationException passwordShouldHaveXCharacters(int desiredLength);
@Message(id = 99, value = STR) PasswordValidationException passwordShouldHaveXCharacters(int desiredLength);
/** * The error message for password which is not long enough. * @param desiredLength - desired length of password. * @return a {@link PasswordValidationException} for the message. */
The error message for password which is not long enough
passwordShouldHaveXCharacters
{ "repo_name": "aloubyansky/wildfly-core", "path": "domain-management/src/main/java/org/jboss/as/domain/management/logging/DomainManagementLogger.java", "license": "lgpl-2.1", "size": 66389 }
[ "org.jboss.as.domain.management.security.password.PasswordValidationException", "org.jboss.logging.annotations.Message" ]
import org.jboss.as.domain.management.security.password.PasswordValidationException; import org.jboss.logging.annotations.Message;
import org.jboss.as.domain.management.security.password.*; import org.jboss.logging.annotations.*;
[ "org.jboss.as", "org.jboss.logging" ]
org.jboss.as; org.jboss.logging;
1,817,698
SwapContents peek(String swapLocation, FlowFileQueue flowFileQueue) throws IncompleteSwapFileException, IOException;
SwapContents peek(String swapLocation, FlowFileQueue flowFileQueue) throws IncompleteSwapFileException, IOException;
/** * Recovers the FlowFiles from the swap file that lives at the given location. This action * provides a view of the FlowFiles but does not actively swap them in, meaning that the swap file * at the given location remains in that location and the FlowFile Repository is not updated. * * @param...
Recovers the FlowFiles from the swap file that lives at the given location. This action provides a view of the FlowFiles but does not actively swap them in, meaning that the swap file at the given location remains in that location and the FlowFile Repository is not updated
peek
{ "repo_name": "apsaltis/nifi", "path": "nifi-framework-api/src/main/java/org/apache/nifi/controller/repository/FlowFileSwapManager.java", "license": "apache-2.0", "size": 6162 }
[ "java.io.IOException", "org.apache.nifi.controller.queue.FlowFileQueue" ]
import java.io.IOException; import org.apache.nifi.controller.queue.FlowFileQueue;
import java.io.*; import org.apache.nifi.controller.queue.*;
[ "java.io", "org.apache.nifi" ]
java.io; org.apache.nifi;
1,114,400
public void registerFinishReceiver() { IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); filter.addDataScheme("package"); this.registerReceiver(finishReceiver, filter); }
void function() { IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); filter.addDataScheme(STR); this.registerReceiver(finishReceiver, filter); }
/** * Registers the finish receiver for PACKAGE_ADDED */
Registers the finish receiver for PACKAGE_ADDED
registerFinishReceiver
{ "repo_name": "nicholaschum/substratum", "path": "app/src/main/java/projekt/substratum/Substratum.java", "license": "gpl-3.0", "size": 16465 }
[ "android.content.Intent", "android.content.IntentFilter" ]
import android.content.Intent; import android.content.IntentFilter;
import android.content.*;
[ "android.content" ]
android.content;
1,071,162
public Collection<File> getNameEditsDirs() { return FSNamesystem.getNamespaceEditsDirs(conf); }
Collection<File> function() { return FSNamesystem.getNamespaceEditsDirs(conf); }
/** * Get the directories where the namenode stores its edits. */
Get the directories where the namenode stores its edits
getNameEditsDirs
{ "repo_name": "gndpig/hadoop", "path": "src/test/org/apache/hadoop/hdfs/MiniDFSCluster.java", "license": "apache-2.0", "size": 38318 }
[ "java.io.File", "java.util.Collection", "org.apache.hadoop.hdfs.server.namenode.FSNamesystem" ]
import java.io.File; import java.util.Collection; import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.server.namenode.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
199,078
PagedIterable<PolicyState> listQueryResultsForManagementGroup( PolicyStatesResource policyStatesResource, String managementGroupName);
PagedIterable<PolicyState> listQueryResultsForManagementGroup( PolicyStatesResource policyStatesResource, String managementGroupName);
/** * Queries policy states for the resources under the management group. * * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, * 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). * @para...
Queries policy states for the resources under the management group
listQueryResultsForManagementGroup
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/models/PolicyStates.java", "license": "mit", "size": 43705 }
[ "com.azure.core.http.rest.PagedIterable" ]
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
2,096,564
@Override public void run() { Log.v(TAG, "SendTimerTask.run() entered"); MyBroadcastReceiver broadcastReceiver = MyBroadcastReceiver.getInstance(); String messageData = broadcastReceiver.getPayload(); if (messageData == "") { Log.d("JESUS...
void function() { Log.v(TAG, STR); MyBroadcastReceiver broadcastReceiver = MyBroadcastReceiver.getInstance(); String messageData = broadcastReceiver.getPayload(); if (messageData == STRJESUSSTRpayload is emptySTRSTRjsonSTR.run() received exception on publishEvent()"); } app.setAccelData(G); Intent actionIntent = new In...
/** * Publish an accel event message. */
Publish an accel event message
run
{ "repo_name": "petemaclellan/IoTStarterAndroid", "path": "app/src/main/java/com/ibm/iot/android/iotstarter/utils/DeviceSensor.java", "license": "epl-1.0", "size": 7976 }
[ "android.content.Intent", "android.util.Log", "com.ibm.iot.android.iotstarter.receivers.MyBroadcastReceiver" ]
import android.content.Intent; import android.util.Log; import com.ibm.iot.android.iotstarter.receivers.MyBroadcastReceiver;
import android.content.*; import android.util.*; import com.ibm.iot.android.iotstarter.receivers.*;
[ "android.content", "android.util", "com.ibm.iot" ]
android.content; android.util; com.ibm.iot;
2,217,396
private boolean learnIdsFromDatabase(File dbfile, IDMap posmap) throws IOException { // open the database for reading BufferedReader br = BufferedReaderMaker.makeBufferedReader(dbfile); // process each line in the database one by one String s; while ...
boolean function(File dbfile, IDMap posmap) throws IOException { BufferedReader br = BufferedReaderMaker.makeBufferedReader(dbfile); String s; while ((s = br.readLine()) != null) { if (!s.startsWith("#")) { String[] tokens = s.split("\t", 4); try { posmap.set(tokens[0], Integer.parseInt(tokens[1]), tokens[2]); } catch ...
/** * Scan a vcf dbfile (eg. dbSNP) and record the ids associated with a locus * * @param dbfile * @param posmap * @throws IOException */
Scan a vcf dbfile (eg. dbSNP) and record the ids associated with a locus
learnIdsFromDatabase
{ "repo_name": "tkonopka/GeneticThesaurus", "path": "src/thesaurus/make/ThesaurusAnnotateVtf.java", "license": "apache-2.0", "size": 9610 }
[ "java.io.BufferedReader", "java.io.File", "java.io.IOException" ]
import java.io.BufferedReader; import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
380,256
protected LoginPanelManager buildLoginPanel( ContainerBuilder<?> rBuilder, boolean bReauthenticate) { final LoginPanelManager aLoginPanelManager = new LoginPanelManager(this, this, getAuthenticationCookiePrefix(), bReauthenticate); aLoginPanelManager.buildIn(rBuilder, Al...
LoginPanelManager function( ContainerBuilder<?> rBuilder, boolean bReauthenticate) { final LoginPanelManager aLoginPanelManager = new LoginPanelManager(this, this, getAuthenticationCookiePrefix(), bReauthenticate); aLoginPanelManager.buildIn(rBuilder, AlignedPosition.CENTER); return aLoginPanelManager; } /*************...
/*************************************** * Creates the login panel in the given container builder. * * @param rBuilder The builder to create the login panel with * @param bReauthenticate TRUE if the invocation is only for a * re-authentication of the current user * * @retu...
Creates the login panel in the given container builder
buildLoginPanel
{ "repo_name": "esoco/esoco-gwt", "path": "src/main/java/de/esoco/gwt/client/ui/AuthenticationPanelManager.java", "license": "apache-2.0", "size": 14748 }
[ "de.esoco.data.element.DataElementList", "de.esoco.ewt.build.ContainerBuilder", "de.esoco.ewt.style.AlignedPosition" ]
import de.esoco.data.element.DataElementList; import de.esoco.ewt.build.ContainerBuilder; import de.esoco.ewt.style.AlignedPosition;
import de.esoco.data.element.*; import de.esoco.ewt.build.*; import de.esoco.ewt.style.*;
[ "de.esoco.data", "de.esoco.ewt" ]
de.esoco.data; de.esoco.ewt;
250,980
void registerForVtRingInfo(Handler h, int what, Object obj);
void registerForVtRingInfo(Handler h, int what, Object obj);
/** * Register for MT VT call indication. * Message.obj will contain an AsyncResult. */
Register for MT VT call indication. Message.obj will contain an AsyncResult
registerForVtRingInfo
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/opt/telephony/src/java/com/android/internal/telephony/Phone.java", "license": "gpl-2.0", "size": 87022 }
[ "android.os.Handler" ]
import android.os.Handler;
import android.os.*;
[ "android.os" ]
android.os;
1,806,010
public T1 caseValueSpecification(ValueSpecification object) { return null; }
T1 function(ValueSpecification object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Value Specification</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. ...
Returns the result of interpreting the object as an instance of 'Value Specification'. This implementation returns null; returning a non-null result will terminate the switch.
caseValueSpecification
{ "repo_name": "sacooper/ECSE-429-Project-Group1", "path": "ca.mcgill.sel.ram/src/ca/mcgill/sel/ram/util/RamSwitch.java", "license": "gpl-2.0", "size": 105770 }
[ "ca.mcgill.sel.ram.ValueSpecification" ]
import ca.mcgill.sel.ram.ValueSpecification;
import ca.mcgill.sel.ram.*;
[ "ca.mcgill.sel" ]
ca.mcgill.sel;
2,104,547
private void putTimeToQueue(Instant time) { try { callTimes.put(time); } catch (InterruptedException e) { e.printStackTrace(); } }
void function(Instant time) { try { callTimes.put(time); } catch (InterruptedException e) { e.printStackTrace(); } }
/** * Try-catch wrapper on putting data in Queue * @param time */
Try-catch wrapper on putting data in Queue
putTimeToQueue
{ "repo_name": "sergeynenashev/thesis", "path": "thesis/src/main/java/com/thesis/crawlers/vksdk/VkApiWaitStrategy.java", "license": "mit", "size": 2271 }
[ "java.time.Instant" ]
import java.time.Instant;
import java.time.*;
[ "java.time" ]
java.time;
2,096,529
File getRoot();
File getRoot();
/** * Gets the root data source provider. * * @return The root data source provider */
Gets the root data source provider
getRoot
{ "repo_name": "TVPT/VoxelGunsmith", "path": "src/main/java/com/voxelplugineering/voxelsniper/service/platform/PlatformProxy.java", "license": "mit", "size": 2413 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
238,351
public static <T extends TemplateModel> List<T> toListNoUnwrap(TemplateCollectionModel collModel) throws TemplateModelException { // would be safer to let the wrapper do it, but we know it's just a BeanModel in Ofbiz so we can optimize. List<Object> res = new ArrayList<>(); TemplateModelIter...
static <T extends TemplateModel> List<T> function(TemplateCollectionModel collModel) throws TemplateModelException { List<Object> res = new ArrayList<>(); TemplateModelIterator it = collModel.iterator(); while(it.hasNext()) { res.add(it.next()); } return UtilGenerics.cast(res); }
/** * Adds all the elements in the given collection to a new list, as TemplateModels. * <p> * NOTE: This method does NOT handle string escaping explicitly; you may want {@link #toStringSet} instead. */
Adds all the elements in the given collection to a new list, as TemplateModels.
toListNoUnwrap
{ "repo_name": "ilscipio/scipio-erp", "path": "framework/webapp/src/com/ilscipio/scipio/ce/webapp/ftl/lang/LangFtlUtil.java", "license": "apache-2.0", "size": 88244 }
[ "freemarker.template.TemplateCollectionModel", "freemarker.template.TemplateModel", "freemarker.template.TemplateModelException", "freemarker.template.TemplateModelIterator", "java.util.ArrayList", "java.util.List", "org.ofbiz.base.util.UtilGenerics" ]
import freemarker.template.TemplateCollectionModel; import freemarker.template.TemplateModel; import freemarker.template.TemplateModelException; import freemarker.template.TemplateModelIterator; import java.util.ArrayList; import java.util.List; import org.ofbiz.base.util.UtilGenerics;
import freemarker.template.*; import java.util.*; import org.ofbiz.base.util.*;
[ "freemarker.template", "java.util", "org.ofbiz.base" ]
freemarker.template; java.util; org.ofbiz.base;
1,629,914
public CountDownLatch getChannelGroupAsync(String code, AsyncCallback<com.mozu.api.contracts.commerceruntime.channels.ChannelGroup> callback) throws Exception { return getChannelGroupAsync( code, null, callback); }
CountDownLatch function(String code, AsyncCallback<com.mozu.api.contracts.commerceruntime.channels.ChannelGroup> callback) throws Exception { return getChannelGroupAsync( code, null, callback); }
/** * Retrieves the details of a defined channel group. * <p><pre><code> * ChannelGroup channelgroup = new ChannelGroup(); * CountDownLatch latch = channelgroup.getChannelGroup( code, callback ); * latch.await() * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. ...
Retrieves the details of a defined channel group. <code><code> ChannelGroup channelgroup = new ChannelGroup(); CountDownLatch latch = channelgroup.getChannelGroup( code, callback ); latch.await() * </code></code>
getChannelGroupAsync
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/ChannelGroupResource.java", "license": "mit", "size": 19740 }
[ "com.mozu.api.AsyncCallback", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
1,723,883
public static Attachment fromTextInputStream( InputStream inputStream, MediaType mediaType ) throws IOException { return fromText( CharStreams.toString( new InputStreamReader( inputStream, mediaType.getCharset() ) ), mediaType ); } /** * Equivalent to {@link com.tngtech.jgiven.attachment.Attac...
static Attachment function( InputStream inputStream, MediaType mediaType ) throws IOException { return fromText( CharStreams.toString( new InputStreamReader( inputStream, mediaType.getCharset() ) ), mediaType ); } /** * Equivalent to {@link com.tngtech.jgiven.attachment.Attachment#Attachment(String, MediaType)}
/** * Creates a non-binary attachment from the given file. * @throws IOException if an I/O error occurs * @throws java.lang.IllegalArgumentException if mediaType is either binary or has no specified charset */
Creates a non-binary attachment from the given file
fromTextInputStream
{ "repo_name": "TNG/JGiven", "path": "jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java", "license": "apache-2.0", "size": 8966 }
[ "com.google.common.io.CharStreams", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader" ]
import com.google.common.io.CharStreams; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader;
import com.google.common.io.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
2,067,255
public void replicateEntries(HLog.Entry[] entries) throws IOException { if (entries.length == 0) { return; } // Very simple optimization where we batch sequences of rows going // to the same table. try { long totalReplicated = 0; // Map of table => list of puts, we only wan...
void function(HLog.Entry[] entries) throws IOException { if (entries.length == 0) { return; } try { long totalReplicated = 0; Map<byte[], List<Put>> puts = new TreeMap<byte[], List<Put>>(Bytes.BYTES_COMPARATOR); for (HLog.Entry entry : entries) { WALEdit edit = entry.getEdit(); List<KeyValue> kvs = edit.getKeyValues();...
/** * Replicate this array of entries directly into the local cluster * using the native client. * * @param entries * @throws IOException */
Replicate this array of entries directly into the local cluster using the native client
replicateEntries
{ "repo_name": "bcopeland/hbase-thrift", "path": "src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java", "license": "apache-2.0", "size": 7012 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.Map", "java.util.TreeMap", "org.apache.hadoop.hbase.KeyValue", "org.apache.hadoop.hbase.client.Delete", "org.apache.hadoop.hbase.client.Put", "org.apache.hadoop.hbase.regionserver.wal.HLog", "org.apache.hadoop.hbase.regions...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.regionserver.wal.HLog; import or...
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.regionserver.wal.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
476,823
boolean suppressedBy(DNSIncoming msg) { try { for (DNSRecord answer : msg.getAllAnswers()) { if (suppressedBy(answer)) { return true; } } return false; } catch (ArrayIndexOutOfBoundsException e) { log...
boolean suppressedBy(DNSIncoming msg) { try { for (DNSRecord answer : msg.getAllAnswers()) { if (suppressedBy(answer)) { return true; } } return false; } catch (ArrayIndexOutOfBoundsException e) { logger.log(Level.WARNING, STR + msg + STR, e); return false; } }
/** * True if this record is suppressed by the answers in a message. */
True if this record is suppressed by the answers in a message
suppressedBy
{ "repo_name": "mwaylabs/JmDNS", "path": "src/main/java/javax/jmdns/impl/DNSRecord.java", "license": "apache-2.0", "size": 36229 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,107,544
long getRowNumber() throws IOException;
long getRowNumber() throws IOException;
/** * Get the row number of the row that will be returned by the following * call to next(). * @return the row number from 0 to the number of rows in the file * @throws java.io.IOException */
Get the row number of the row that will be returned by the following call to next()
getRowNumber
{ "repo_name": "libin/hive-dwrf", "path": "hive-dwrf/src/main/java/com/facebook/hive/orc/RecordReader.java", "license": "apache-2.0", "size": 2104 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,891,117
ServiceFuture<Void> postAsyncRelativeRetry400Async(Product product, final ServiceCallback<Void> serviceCallback);
ServiceFuture<Void> postAsyncRelativeRetry400Async(Product product, final ServiceCallback<Void> serviceCallback);
/** * Long running post request, service returns a 202 to the initial request Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. * * @param product Product to put * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @t...
Long running post request, service returns a 202 to the initial request Poll the endpoint indicated in the Azure-AsyncOperation header for operation status
postAsyncRelativeRetry400Async
{ "repo_name": "sergey-shandar/autorest", "path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/LROSADs.java", "license": "mit", "size": 173405 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,685,735
void onEviction(Key key, CacheElement value); } public enum EvictionPolicy {
void onEviction(Key key, CacheElement value); } public enum EvictionPolicy {
/** * A call-back notification that the entry was evicted. * @param key The evicted key. * @param value The evicted value. */
A call-back notification that the entry was evicted
onEviction
{ "repo_name": "hdsdi3g/jmemcache-daemon", "path": "src/com/thimbleware/jmemcached/storage/hash/ConcurrentLinkedHashMap.java", "license": "apache-2.0", "size": 25056 }
[ "com.thimbleware.jmemcached.CacheElement", "com.thimbleware.jmemcached.Key" ]
import com.thimbleware.jmemcached.CacheElement; import com.thimbleware.jmemcached.Key;
import com.thimbleware.jmemcached.*;
[ "com.thimbleware.jmemcached" ]
com.thimbleware.jmemcached;
12,177
public static File getCacheDirectory(Context context, boolean preferExternal) { File appCacheDir = null; String externalStorageState; try { externalStorageState = Environment.getExternalStorageState(); } catch (NullPointerException e) { // (sh)it happens (Issue #660) ...
static File function(Context context, boolean preferExternal) { File appCacheDir = null; String externalStorageState; try { externalStorageState = Environment.getExternalStorageState(); } catch (NullPointerException e) { externalStorageState = STRSTR/data/data/STR/cache/"; appCacheDir = new File(cacheDirPath); } return...
/** * Returns application cache directory. Cache directory will be created on SD card * <i>("/Android/data/[app_package_name]/cache")</i> (if card is mounted and app has appropriate permission) or * on device's file system depending incoming parameters. * * @param context Application con...
Returns application cache directory. Cache directory will be created on SD card ("/Android/data/[app_package_name]/cache") (if card is mounted and app has appropriate permission) or on device's file system depending incoming parameters
getCacheDirectory
{ "repo_name": "alirezaaa/MultiImageSelector", "path": "library/src/main/java/me/nereo/multi_image_selector/utils/FileUtils.java", "license": "mit", "size": 5366 }
[ "android.content.Context", "android.os.Environment", "java.io.File" ]
import android.content.Context; import android.os.Environment; import java.io.File;
import android.content.*; import android.os.*; import java.io.*;
[ "android.content", "android.os", "java.io" ]
android.content; android.os; java.io;
1,518,161
public static void wtf(@NonNull final String tag, @NonNull final String message) { logger.wtf(tag, message); }
static void function(@NonNull final String tag, @NonNull final String message) { logger.wtf(tag, message); }
/** * Delegates to {@link Logger#wtf(String, String)}. */
Delegates to <code>Logger#wtf(String, String)</code>
wtf
{ "repo_name": "universum-studios/android_fragments", "path": "library-core/src/main/java/universum/studios/android/fragment/FragmentsLogging.java", "license": "apache-2.0", "size": 5548 }
[ "androidx.annotation.NonNull" ]
import androidx.annotation.NonNull;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
2,364,389
protected void addPower_fractionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_House_power_fraction_feature"), getString("_UI_PropertyDescr...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VisGridPackage.eINSTANCE.getHouse_Power_fraction(), true, false, false, ItemPropertyDescriptor.GE...
/** * This adds a property descriptor for the Power fraction feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Power fraction feature.
addPower_fractionPropertyDescriptor
{ "repo_name": "mikesligo/visGrid", "path": "ie.tcd.gmf.visGrid.edit/src/visGrid/provider/HouseItemProvider.java", "license": "gpl-3.0", "size": 120584 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,019,383
public void deleteConfigFile(User user, ConfigFile file) { //first make sure that the user has permission to delete this file if (!user.getOrg().equals(file.getConfigChannel().getOrg())) { throw new IllegalArgumentException("Cannot delete config file. User" + " and fi...
void function(User user, ConfigFile file) { if (!user.getOrg().equals(file.getConfigChannel().getOrg())) { throw new IllegalArgumentException(STR + STR); } if (!accessToFile(user.getId(), file.getId())) { throw new IllegalArgumentException( STR + user.getId() + STR + file.getId() + "]."); } ConfigurationFactory.removeC...
/** * Deletes a config file. Performs checking to determine whether * the user actually can delete the config file * @param user The user requesting to delete the file * @param file The file to be deleted. * @throws IllegalArgumentException if user is not allowed to delete this * c...
Deletes a config file. Performs checking to determine whether the user actually can delete the config file
deleteConfigFile
{ "repo_name": "ogajduse/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java", "license": "gpl-2.0", "size": 102493 }
[ "com.redhat.rhn.domain.config.ConfigFile", "com.redhat.rhn.domain.config.ConfigurationFactory", "com.redhat.rhn.domain.user.User" ]
import com.redhat.rhn.domain.config.ConfigFile; import com.redhat.rhn.domain.config.ConfigurationFactory; import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.domain.config.*; import com.redhat.rhn.domain.user.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
2,361,162
@NonNull public List<Gateway> getAssociatedGateways() { return gateways; }
List<Gateway> function() { return gateways; }
/** * Get associated Gateways of this apartment * * @return list of Gateways */
Get associated Gateways of this apartment
getAssociatedGateways
{ "repo_name": "Power-Switch/PowerSwitch_Android", "path": "Smartphone/src/main/java/eu/power_switch/obj/Apartment.java", "license": "gpl-3.0", "size": 8506 }
[ "eu.power_switch.obj.gateway.Gateway", "java.util.List" ]
import eu.power_switch.obj.gateway.Gateway; import java.util.List;
import eu.power_switch.obj.gateway.*; import java.util.*;
[ "eu.power_switch.obj", "java.util" ]
eu.power_switch.obj; java.util;
2,310,960
public Types.OnNormalExit getActionsAfterShutdown(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "VM.get_actions_after_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(ses...
Types.OnNormalExit function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Obje...
/** * Get the actions/after_shutdown field of the given VM. * * @return value of the field */
Get the actions/after_shutdown field of the given VM
getActionsAfterShutdown
{ "repo_name": "cinderella/incubator-cloudstack", "path": "deps/XenServerJava/com/xensource/xenapi/VM.java", "license": "apache-2.0", "size": 169722 }
[ "com.xensource.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.xensource.xenapi", "java.util", "org.apache.xmlrpc" ]
com.xensource.xenapi; java.util; org.apache.xmlrpc;
1,830,696
public ColumnProperty setColumnGap(Pixel pix) { this.clearAttribute("column-gap"); this.putAttribute("column-gap", pix.toString()); this.clearAttribute("-moz-column-gap"); this.putAttribute("-moz-column-gap", pix.toString()); this.clearAttribute("-webkit-column-gap"); this.putAttribute("-webkit...
ColumnProperty function(Pixel pix) { this.clearAttribute(STR); this.putAttribute(STR, pix.toString()); this.clearAttribute(STR); this.putAttribute(STR, pix.toString()); this.clearAttribute(STR); this.putAttribute(STR, pix.toString()); return this; }
/** * The column-gap property specifies the gap between the columns.<br> * * Note: If there is a column-rule between columns, it will appear in the * middle of the gap.<br> * * Default value: normal<br> * Inherited: no<br> * Version: CSS3<br> * JavaScript syntax: object.style.columnGap="40px"<br> ...
The column-gap property specifies the gap between the columns. Note: If there is a column-rule between columns, it will appear in the middle of the gap. Default value: normal Inherited: no Version: CSS3 JavaScript syntax: object.style.columnGap="40px"
setColumnGap
{ "repo_name": "Ccook/Stonewall", "path": "src/main/java/edu/american/student/stonewall/display/css/property/ColumnProperty.java", "license": "apache-2.0", "size": 8308 }
[ "edu.american.student.stonewall.display.css.util.Pixel" ]
import edu.american.student.stonewall.display.css.util.Pixel;
import edu.american.student.stonewall.display.css.util.*;
[ "edu.american.student" ]
edu.american.student;
915,498
//----------------------------------------------------------------------- public static List<Locale> localeLookupList(Locale locale) { return localeLookupList(locale, locale); }
static List<Locale> function(Locale locale) { return localeLookupList(locale, locale); }
/** * <p>Obtains the list of locales to search through when performing * a locale search.</p> * * <pre> * localeLookupList(Locale("fr","CA","xxx")) * = [Locale("fr","CA","xxx"), Locale("fr","CA"), Locale("fr")] * </pre> * * @param locale the locale to start from ...
Obtains the list of locales to search through when performing a locale search. <code> localeLookupList(Locale("fr","CA","xxx")) = [Locale("fr","CA","xxx"), Locale("fr","CA"), Locale("fr")] </code>
localeLookupList
{ "repo_name": "justinwm/astor", "path": "examples/Lang-issue-428/src/main/java/org/apache/commons/lang3/LocaleUtils.java", "license": "gpl-2.0", "size": 13216 }
[ "java.util.List", "java.util.Locale" ]
import java.util.List; import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,391,545
public static <T> List<T> safe(List<T> other) { return other == null ? Collections.<T>emptyList() : other; }
static <T> List<T> function(List<T> other) { return other == null ? Collections.<T>emptyList() : other; }
/** * Returns an empty collection if this list is null * @param other * @return */
Returns an empty collection if this list is null
safe
{ "repo_name": "robort/kafka", "path": "clients/src/main/java/org/apache/kafka/common/utils/Utils.java", "license": "apache-2.0", "size": 18596 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
584,465
private boolean canAddPath(List path) { Object node = this.getStartNode(); for (int j = 0; j < path.size() - 1; j++) { Object input = path.get(j); Arc arc = this.getArcBySourceAndInput(node, input); // next input in path if (arc == null) { return true; } node = arc.getTar...
boolean function(List path) { Object node = this.getStartNode(); for (int j = 0; j < path.size() - 1; j++) { Object input = path.get(j); Arc arc = this.getArcBySourceAndInput(node, input); if (arc == null) { return true; } node = arc.getTargetNode(); } Object input = path.get(path.size() - 1); Arc arc = this.getArcBySo...
/** * For testing only. Doubles combined by multiplication. */
For testing only. Doubles combined by multiplication
canAddPath
{ "repo_name": "hbbpb/stanford-corenlp-gv", "path": "src/edu/stanford/nlp/fsm/TransducerGraph.java", "license": "gpl-2.0", "size": 27804 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
202,811
private void doUpdate() { // cancel a current worker handle if one if active for (ScheduledFuture<?> handleItem : this.handle) { if (handleItem != null) { handleItem.cancel(true); } } final boolean enable = (Boolean) this.properties.get(HEAP_E...
void function() { for (ScheduledFuture<?> handleItem : this.handle) { if (handleItem != null) { handleItem.cancel(true); } } final boolean enable = (Boolean) this.properties.get(HEAP_ENABLE_PROP_NAME); final int threads = (Integer) this.properties.get(HEAP_THREADS_PROP_NAME); final int size = 1024 * (Integer) this.prop...
/** * Called after a new set of properties has been configured on the service */
Called after a new set of properties has been configured on the service
doUpdate
{ "repo_name": "nicolatimeus/kura", "path": "kura/org.eclipse.kura.stress/src/main/java/org/eclipse/kura/stress/Stress.java", "license": "epl-1.0", "size": 6199 }
[ "java.util.concurrent.ScheduledFuture" ]
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,577,224
public static int getSignalStrength() { return signal; } private final Context c; public static int signal = DEFAULT_EXTRA_VALUE; SignalStrengthListener signalStrengthListener; public PhoneNotifications(final Context c1) { c = c1; }
static int function() { return signal; } private final Context c; public static int signal = DEFAULT_EXTRA_VALUE; SignalStrengthListener signalStrengthListener; public PhoneNotifications(final Context c1) { c = c1; }
/** * Getter for the signal static member * * @return the signal strength */
Getter for the signal static member
getSignalStrength
{ "repo_name": "VisionGroup/Vision", "path": "Vision/src/com/yp2012g4/vision/apps/phoneStatus/PhoneNotifications.java", "license": "gpl-3.0", "size": 2766 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,358,770
public static IgniteCheckedException exceptionWithSuppressed(String msg, @Nullable Collection<Throwable> suppressed) { IgniteCheckedException e = new IgniteCheckedException(msg); if (suppressed != null) { for (Throwable th : suppressed) e.addSuppressed(th); } ...
static IgniteCheckedException function(String msg, @Nullable Collection<Throwable> suppressed) { IgniteCheckedException e = new IgniteCheckedException(msg); if (suppressed != null) { for (Throwable th : suppressed) e.addSuppressed(th); } return e; }
/** * Creates {@code IgniteCheckedException} with the collection of suppressed exceptions. * * @param msg Message. * @param suppressed The collections of suppressed exceptions. * @return {@code IgniteCheckedException}. */
Creates IgniteCheckedException with the collection of suppressed exceptions
exceptionWithSuppressed
{ "repo_name": "kromulan/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 298812 }
[ "java.util.Collection", "org.apache.ignite.IgniteCheckedException", "org.jetbrains.annotations.Nullable" ]
import java.util.Collection; import org.apache.ignite.IgniteCheckedException; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.apache.ignite.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
2,316,386
void stop() { if (mRunning) { mTriggerPercentage = 0; mFinishTime = AnimationUtils.currentAnimationTimeMillis(); mRunning = false; mParent.postInvalidate(); } }
void stop() { if (mRunning) { mTriggerPercentage = 0; mFinishTime = AnimationUtils.currentAnimationTimeMillis(); mRunning = false; mParent.postInvalidate(); } }
/** * Stop showing the progress animation. */
Stop showing the progress animation
stop
{ "repo_name": "leehz/BlackLight", "path": "blacklight-base/src/main/java/info/papdt/blacklight/ui/common/SwipeProgressBar.java", "license": "gpl-3.0", "size": 8993 }
[ "android.view.animation.AnimationUtils" ]
import android.view.animation.AnimationUtils;
import android.view.animation.*;
[ "android.view" ]
android.view;
2,027,804
private static final Long internalParseDate (String value, DateFormat[] formats) { Date date = null; for (int i = 0; (date == null) && (i < formats.length); i++) { try { date = formats[i].parse(value); } catch (ParseException e) { ...
static final Long function (String value, DateFormat[] formats) { Date date = null; for (int i = 0; (date == null) && (i < formats.length); i++) { try { date = formats[i].parse(value); } catch (ParseException e) { ; } } if (date == null) { return null; } return new Long(date.getTime()); }
/** * Parse date with given formatters. */
Parse date with given formatters
internalParseDate
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-8.0.9-sourcecode/modules/tomcat-lite/java/org/apache/tomcat/lite/util/FastHttpDateFormat.java", "license": "apache-2.0", "size": 6426 }
[ "java.text.DateFormat", "java.text.ParseException", "java.util.Date" ]
import java.text.DateFormat; import java.text.ParseException; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,859,386
public NodeRef closeFile(TreeConnection tree, NodeRef rootNode, String path, NetworkFile file) throws IOException { if ( logger.isDebugEnabled()) { logger.debug("Close file:" + path + ", readOnly=" + file.isReadOnly() ); } if( file instanceof PseudoNetwork...
NodeRef function(TreeConnection tree, NodeRef rootNode, String path, NetworkFile file) throws IOException { if ( logger.isDebugEnabled()) { logger.debug(STR + path + STR + file.isReadOnly() ); } if( file instanceof PseudoNetworkFile file instanceof MemoryNetworkFile) { file.close(); if(file.hasDeleteOnClose()) { if(log...
/** * Close the file. * * @exception java.io.IOException If an error occurs. * @return node ref of deleted file */
Close the file
closeFile
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/filesys/repo/ContentDiskDriver2.java", "license": "lgpl-3.0", "size": 117511 }
[ "java.io.BufferedInputStream", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "java.nio.charset.Charset", "java.util.Date", "org.alfresco.jlan.server.filesys.AccessDeniedException", "org.alfresco.jlan.server.filesys.FileName", "org.alfresco.jlan.server.filesys.NetworkFile",...
import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import java.util.Date; import org.alfresco.jlan.server.filesys.AccessDeniedException; import org.alfresco.jlan.server.filesys.FileName; import org.alfresco.jlan.se...
import java.io.*; import java.nio.charset.*; import java.util.*; import org.alfresco.jlan.server.filesys.*; import org.alfresco.jlan.server.filesys.pseudo.*; import org.alfresco.model.*; import org.alfresco.repo.content.encoding.*; import org.alfresco.repo.content.filestore.*; import org.alfresco.service.cmr.repository...
[ "java.io", "java.nio", "java.util", "org.alfresco.jlan", "org.alfresco.model", "org.alfresco.repo", "org.alfresco.service" ]
java.io; java.nio; java.util; org.alfresco.jlan; org.alfresco.model; org.alfresco.repo; org.alfresco.service;
1,371,037
public PropertyChangeListener[] findPropertyChangeListeners() { return propertyChanges.findPropertyChangeListeners(); }
PropertyChangeListener[] function() { return propertyChanges.findPropertyChangeListeners(); }
/** * Gets the property change listeners registered and associated with this property change listener. If this * property change has no listeners registered, a zero-length array is returned. * * @return an array of listeners */
Gets the property change listeners registered and associated with this property change listener. If this property change has no listeners registered, a zero-length array is returned
findPropertyChangeListeners
{ "repo_name": "binhdv/exo.social.client", "path": "src/main/java/org/exoplatform/social/client/api/model/Model.java", "license": "agpl-3.0", "size": 6705 }
[ "org.exoplatform.social.client.api.event.PropertyChangeListener" ]
import org.exoplatform.social.client.api.event.PropertyChangeListener;
import org.exoplatform.social.client.api.event.*;
[ "org.exoplatform.social" ]
org.exoplatform.social;
796,111
public int setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean enabled) { if (mBluetoothAdapter == null || mBluetoothGatt == null) { Log.w(TAG, "BluetoothAdapter not initialized"); return 0; } mBluetoothGatt.setCharacteristicNotification(...
int function(BluetoothGattCharacteristic characteristic, boolean enabled) { if (mBluetoothAdapter == null mBluetoothGatt == null) { Log.w(TAG, STR); return 0; } mBluetoothGatt.setCharacteristicNotification(characteristic, enabled); return 0; }
/** * Enables or disables notification on a give characteristic. * * @param characteristic Characteristic to act on. * @param enabled If true, enable notification. False otherwise. */
Enables or disables notification on a give characteristic
setCharacteristicNotification
{ "repo_name": "Kanval87/BleSensorTagImplementation", "path": "Application/src/main/java/com/example/android/bluetoothlegatt/BluetoothLeService.java", "license": "apache-2.0", "size": 11812 }
[ "android.bluetooth.BluetoothGattCharacteristic", "android.util.Log" ]
import android.bluetooth.BluetoothGattCharacteristic; import android.util.Log;
import android.bluetooth.*; import android.util.*;
[ "android.bluetooth", "android.util" ]
android.bluetooth; android.util;
505,279
private static native JavaScriptObject getPreventTextSelectionIEHack() ;
static native JavaScriptObject function() ;
/** * Add this to the element mouse down event by using element.setPropertyJSO * ("onselectstart",applyDisableTextSelectionIEHack()); Remove it then again * when the mouse is depressed in the mouse up event. * * @return Returns the JSO preventing text selection */
Add this to the element mouse down event by using element.setPropertyJSO ("onselectstart",applyDisableTextSelectionIEHack()); Remove it then again when the mouse is depressed in the mouse up event
getPreventTextSelectionIEHack
{ "repo_name": "udayinfy/vaadin", "path": "client/src/com/vaadin/client/ui/VScrollTable.java", "license": "apache-2.0", "size": 315709 }
[ "com.google.gwt.core.client.JavaScriptObject" ]
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.*;
[ "com.google.gwt" ]
com.google.gwt;
296,465
public static Modal input(Context context, CharSequence message, CharSequence title, TextView inputView){ return input(context, message, title, inputView, null, null); }
static Modal function(Context context, CharSequence message, CharSequence title, TextView inputView){ return input(context, message, title, inputView, null, null); }
/** * Builds an input dialog with custom text view * * * * * */
Builds an input dialog with custom text view
input
{ "repo_name": "bingzer/Butler", "path": "Library/Core/src/main/java/com/bingzer/android/Modal.java", "license": "apache-2.0", "size": 28649 }
[ "android.content.Context", "android.widget.TextView" ]
import android.content.Context; import android.widget.TextView;
import android.content.*; import android.widget.*;
[ "android.content", "android.widget" ]
android.content; android.widget;
478,578
void insert(Map<String, Object> obj);
void insert(Map<String, Object> obj);
/** * Inserts a new object to the collection. If the object does not have * a UID yet, a new one will be generated and saved in the object's * <code>uid</code> attribute. * @param obj the object to add to the collection */
Inserts a new object to the collection. If the object does not have a UID yet, a new one will be generated and saved in the object's <code>uid</code> attribute
insert
{ "repo_name": "igd-geo/mongomvcc", "path": "src/main/java/de/fhg/igd/mongomvcc/VCollection.java", "license": "lgpl-3.0", "size": 3092 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
766,339
@Override public Reference getReference(final QName aReferenceName) { for (final Reference ref : pReferences) { if (ref.getQualifiedName().equals(aReferenceName)) { return ref; } } return null; }
Reference function(final QName aReferenceName) { for (final Reference ref : pReferences) { if (ref.getQualifiedName().equals(aReferenceName)) { return ref; } } return null; }
/** * Retrieves the first reference with the given name, null if not found * * @param aReferenceName * A reference name * @return The found reference, or null */
Retrieves the first reference with the given name, null if not found
getReference
{ "repo_name": "isandlaTech/cohorte-runtime", "path": "java/deprecated/isolates/org.psem2m.sca.converter/src/org/psem2m/sca/converter/model/Composite.java", "license": "apache-2.0", "size": 15044 }
[ "org.psem2m.sca.converter.utils.QName" ]
import org.psem2m.sca.converter.utils.QName;
import org.psem2m.sca.converter.utils.*;
[ "org.psem2m.sca" ]
org.psem2m.sca;
203,051
public void register_initial_reference(String object_name, Object object) throws InvalidName { if (object_name == null) { throw new InvalidName("null"); } else if (object_name.length() == 0) { throw new InvalidName("Empty string"); } else if (m_references.cont...
void function(String object_name, Object object) throws InvalidName { if (object_name == null) { throw new InvalidName("null"); } else if (object_name.length() == 0) { throw new InvalidName(STR); } else if (m_references.containsKey(object_name)) { throw new InvalidName(object_name); } else { m_references.put(object_nam...
/** * Register reference. */
Register reference
register_initial_reference
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/gnu/CORBA/Interceptor/Registrator.java", "license": "gpl-2.0", "size": 12395 }
[ "org.omg.CORBA", "org.omg.PortableInterceptor" ]
import org.omg.CORBA; import org.omg.PortableInterceptor;
import org.omg.*;
[ "org.omg" ]
org.omg;
811,501
public static boolean hasVisibleChildren( ActionGroup group, PresentationFactory factory, ActionManager actionManager) { ActionEvent event = new ActionEvent(factory.getPresentation(group), actionManager); for (Action anAction : group.getChildren(event)) { if (anAction == null) { Log.error(...
static boolean function( ActionGroup group, PresentationFactory factory, ActionManager actionManager) { ActionEvent event = new ActionEvent(factory.getPresentation(group), actionManager); for (Action anAction : group.getChildren(event)) { if (anAction == null) { Log.error( Utils.class, STR + group + STR + factory.getPr...
/** * Returns true if action group has visible children. * * @param group action group * @param factory presentation factory * @param actionManager action manager * @return boolean */
Returns true if action group has visible children
hasVisibleChildren
{ "repo_name": "sleshchenko/che", "path": "ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/toolbar/Utils.java", "license": "epl-1.0", "size": 6090 }
[ "java.util.List", "org.eclipse.che.ide.api.action.Action", "org.eclipse.che.ide.api.action.ActionEvent", "org.eclipse.che.ide.api.action.ActionGroup", "org.eclipse.che.ide.api.action.ActionManager", "org.eclipse.che.ide.api.action.Presentation", "org.eclipse.che.ide.api.action.Separator", "org.eclipse...
import java.util.List; import org.eclipse.che.ide.api.action.Action; import org.eclipse.che.ide.api.action.ActionEvent; import org.eclipse.che.ide.api.action.ActionGroup; import org.eclipse.che.ide.api.action.ActionManager; import org.eclipse.che.ide.api.action.Presentation; import org.eclipse.che.ide.api.action.Separa...
import java.util.*; import org.eclipse.che.ide.api.action.*; import org.eclipse.che.ide.util.loging.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
1,067,661
@NonTransactional public void setDateTimeService(DateTimeService dateTimeService) { this.dateTimeService = dateTimeService; }
void function(DateTimeService dateTimeService) { this.dateTimeService = dateTimeService; }
/** * Sets the dateTimeService attribute value. * * @param dateTimeService The dateTimeService to set. */
Sets the dateTimeService attribute value
setDateTimeService
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/pdp/batch/service/impl/AchAdviceNotificationServiceImpl.java", "license": "agpl-3.0", "size": 4224 }
[ "org.kuali.rice.core.api.datetime.DateTimeService" ]
import org.kuali.rice.core.api.datetime.DateTimeService;
import org.kuali.rice.core.api.datetime.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,882,589
public static void checkArgument(boolean condition, @Nullable Object errorMessage) { if (!condition) { throw new IllegalArgumentException(String.valueOf(errorMessage)); } } /** * Checks the given boolean condition, and throws an {@code IllegalArgumentException} if * the condition is not met (evaluates ...
static void function(boolean condition, @Nullable Object errorMessage) { if (!condition) { throw new IllegalArgumentException(String.valueOf(errorMessage)); } } /** * Checks the given boolean condition, and throws an {@code IllegalArgumentException} if * the condition is not met (evaluates to {@code false}). * * @param...
/** * Checks the given boolean condition, and throws an {@code IllegalArgumentException} if * the condition is not met (evaluates to {@code false}). The exception will have the * given error message. * * @param condition The condition to check * @param errorMessage The message for the {@code IllegalArgument...
Checks the given boolean condition, and throws an IllegalArgumentException if the condition is not met (evaluates to false). The exception will have the given error message
checkArgument
{ "repo_name": "hequn8128/flink", "path": "flink-core/src/main/java/org/apache/flink/util/Preconditions.java", "license": "apache-2.0", "size": 11605 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
299,184
public List<EntryEntity> createList(int count) { List<EntryEntity> list = new LinkedList<EntryEntity>(); for ( int i = 1 ; i <= count ; i++ ) { list.add( createInstance() ); } return list; }
List<EntryEntity> function(int count) { List<EntryEntity> list = new LinkedList<EntryEntity>(); for ( int i = 1 ; i <= count ; i++ ) { list.add( createInstance() ); } return list; }
/** * Creates a list of instances * @param count number of instances to be created * @return */
Creates a list of instances
createList
{ "repo_name": "obasola/master", "path": "src/main/java/com/kumasi/journal/mock/EntryEntityMock.java", "license": "mit", "size": 1637 }
[ "com.kumasi.journal.domain.jpa.EntryEntity", "java.util.LinkedList", "java.util.List" ]
import com.kumasi.journal.domain.jpa.EntryEntity; import java.util.LinkedList; import java.util.List;
import com.kumasi.journal.domain.jpa.*; import java.util.*;
[ "com.kumasi.journal", "java.util" ]
com.kumasi.journal; java.util;
1,093,274
private String getOtherSettings ( HttpServletRequest request ) { StringBuffer returnValue = new StringBuffer ( ) ; returnValue.append ( "OTHER SETTINGS:\n" ) ; returnValue.append ( " Session Mode: " ) ; try { SessionMode mode = PageContext.getSessionMode( reque...
String function ( HttpServletRequest request ) { StringBuffer returnValue = new StringBuffer ( ) ; returnValue.append ( STR ) ; returnValue.append ( STR ) ; try { SessionMode mode = PageContext.getSessionMode( request ) ; returnValue.append( mode.toString() ) ; } catch ( SessionTimeoutException ignored ) { returnValue....
/** * Report on miscellaneous settings. * @param request * @return String ~ miscellaneous settings which might be helpful for solving * problems reported. */
Report on miscellaneous settings
getOtherSettings
{ "repo_name": "NCIP/webgenome", "path": "tags/WEBGENOME_R3.2_6MAR2009_BUILD1/java/webui/src/org/rti/webgenome/webui/taglib/ErrorEmailTag.java", "license": "bsd-3-clause", "size": 11173 }
[ "javax.servlet.http.HttpServletRequest", "org.rti.webgenome.domain.Principal", "org.rti.webgenome.service.session.SessionMode", "org.rti.webgenome.webui.SessionTimeoutException", "org.rti.webgenome.webui.util.PageContext" ]
import javax.servlet.http.HttpServletRequest; import org.rti.webgenome.domain.Principal; import org.rti.webgenome.service.session.SessionMode; import org.rti.webgenome.webui.SessionTimeoutException; import org.rti.webgenome.webui.util.PageContext;
import javax.servlet.http.*; import org.rti.webgenome.domain.*; import org.rti.webgenome.service.session.*; import org.rti.webgenome.webui.*; import org.rti.webgenome.webui.util.*;
[ "javax.servlet", "org.rti.webgenome" ]
javax.servlet; org.rti.webgenome;
938,841
public List<CourseTaken> getCoursesTaken() { return coursesTaken; }
List<CourseTaken> function() { return coursesTaken; }
/** * Method to get a list of all taken courses * @return coursesTaken - list of all taken courses */
Method to get a list of all taken courses
getCoursesTaken
{ "repo_name": "OptimusMaximus/GRADS", "path": "workspace/GRADS/src/edu/sc/csce740/model/StudentRecord.java", "license": "apache-2.0", "size": 8171 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,113,439
public Cursor searchFeeds(String searchQuery) { String[] queryWords = prepareSearchQuery(searchQuery); String queryStart = "SELECT * FROM " + TABLE_NAME_FEEDS + " WHERE "; StringBuilder sb = new StringBuilder(queryStart); for (int i = 0; i < queryWords.length; i++) { sb...
Cursor function(String searchQuery) { String[] queryWords = prepareSearchQuery(searchQuery); String queryStart = STR + TABLE_NAME_FEEDS + STR; StringBuilder sb = new StringBuilder(queryStart); for (int i = 0; i < queryWords.length; i++) { sb .append("(") .append(KEY_TITLE).append(STR).append(queryWords[i]) .append(STR)...
/** * Searches for the given query in various values of all feeds. * * @return A cursor with all search results in SEL_FI_EXTRA selection. */
Searches for the given query in various values of all feeds
searchFeeds
{ "repo_name": "ByteHamster/AntennaPod", "path": "core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java", "license": "gpl-3.0", "size": 60899 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
1,926,964
public ArrayList<String> listWims() { ArrayList<String> out = new ArrayList<String>(); Connection connection = null; Statement stmt = null; ResultSet rs = null; try { Class.forName("org.postgresql.Driver"); connection = DriverManager.getConnection( "jdbc:postgr...
ArrayList<String> function() { ArrayList<String> out = new ArrayList<String>(); Connection connection = null; Statement stmt = null; ResultSet rs = null; try { Class.forName(STR); connection = DriverManager.getConnection( STRrepo_portSTR/STRwimregistrySTRuserSTRpassSTRSELECT * FROM WIM;STRUUIDSTROperation done successf...
/** * List the compute WIMs stored in the repository. * * @return an arraylist of String with the UUID of the registered WIMs, null if error occurs */
List the compute WIMs stored in the repository
listWims
{ "repo_name": "aw32/son-sp-infrabstract", "path": "wim-adaptor/adaptor/src/main/java/sonata/kernel/WimAdaptor/wrapper/WimRepo.java", "license": "apache-2.0", "size": 19330 }
[ "java.sql.Connection", "java.sql.DriverManager", "java.sql.ResultSet", "java.sql.Statement", "java.util.ArrayList" ]
import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
1,809,066
protected void stop() throws Exception { this.logger.debug("Stopping application"); this.stopLock.lock(); try { for (ConfigurableApplicationContext context : this.rootContexts) { context.close(); this.rootContexts.remove(context); } cleanupCaches(); if (this.forceReferenceCleanup) { for...
void function() throws Exception { this.logger.debug(STR); this.stopLock.lock(); try { for (ConfigurableApplicationContext context : this.rootContexts) { context.close(); this.rootContexts.remove(context); } cleanupCaches(); if (this.forceReferenceCleanup) { forceReferenceCleanup(); } } finally { this.stopLock.unlock()...
/** * Stop the application. * @throws Exception in case of errors */
Stop the application
stop
{ "repo_name": "jxblum/spring-boot", "path": "spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java", "license": "apache-2.0", "size": 20143 }
[ "org.springframework.context.ConfigurableApplicationContext" ]
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.*;
[ "org.springframework.context" ]
org.springframework.context;
2,714,645
protected Control createCustomArea(Composite parent) { // create the top level composite for the dialog area Composite composite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.numColumns = 2; composite.setL...
Control function(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.numColumns = 2; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); Label keyLabel = new Label(composite, SWT.LEFT); keyLabel.setLayoutData(new Gri...
/** * Creates and returns the contents of an area of the dialog which appears * below the message and above the button bar. * * This implementation creates two labels and two textfields. * * @param parent parent composite to contain the custom area * @ret...
Creates and returns the contents of an area of the dialog which appears below the message and above the button bar. This implementation creates two labels and two textfields
createCustomArea
{ "repo_name": "rondiplomatico/texlipse", "path": "source/net/sourceforge/texlipse/properties/KeyValueListFieldEditor.java", "license": "epl-1.0", "size": 29607 }
[ "org.eclipse.swt.layout.GridData", "org.eclipse.swt.layout.GridLayout", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Control", "org.eclipse.swt.widgets.Label" ]
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,467,457