method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static @Nonnull User get(String idOrFullName) { return get(idOrFullName,true); }
static @Nonnull User function(String idOrFullName) { return get(idOrFullName,true); }
/** * Gets the {@link User} object by its id or full name. * Use {@link #getById} when you know you have an ID. */
Gets the <code>User</code> object by its id or full name. Use <code>#getById</code> when you know you have an ID
get
{ "repo_name": "escoem/jenkins", "path": "core/src/main/java/hudson/model/User.java", "license": "mit", "size": 43263 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,131,117
public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; }
void function(Date expirationDate) { this.expirationDate = expirationDate; }
/** * Sets the expiration date of the object. */
Sets the expiration date of the object
setExpirationDate
{ "repo_name": "trasa/aws-sdk-java", "path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/BucketLifecycleConfiguration.java", "license": "apache-2.0", "size": 23005 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,068,332
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jFileChooser1 = new javax.swing.JFileChooser(); setDefaultCloseOperation(javax.swing.WindowCo...
@SuppressWarnings(STR) void function() { jPanel1 = new javax.swing.JPanel(); jFileChooser1 = new javax.swing.JFileChooser(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(STR));
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "flibledish/JCryptCloud", "path": "src/jcryptcloud/JFolderSelectorDialog.java", "license": "gpl-2.0", "size": 4806 }
[ "javax.swing.BorderFactory" ]
import javax.swing.BorderFactory;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
856,633
public static boolean buscarValorAtualInterruptor(String nome_interruptor){ Optional<Componente> interruptor = listaComponentes.stream().filter(x -> x.getTipoComponente() == TipoComponente.slider && x.getNome().equalsIgnoreCase(nome_interruptor)).findAny(); if(interruptor != null){ ...
static boolean function(String nome_interruptor){ Optional<Componente> interruptor = listaComponentes.stream().filter(x -> x.getTipoComponente() == TipoComponente.slider && x.getNome().equalsIgnoreCase(nome_interruptor)).findAny(); if(interruptor != null){ Interruptor interruptorEncontrado = (Interruptor) interruptor.g...
/** * Retorna o valor de um interruptor consultando pelo seu nome * * @param nome_interruptor * @return */
Retorna o valor de um interruptor consultando pelo seu nome
buscarValorAtualInterruptor
{ "repo_name": "douglasbreda/SimuladorExperimentos", "path": "src/br/simulador/gerenciadores/GerenciadorComponentes.java", "license": "lgpl-3.0", "size": 10057 }
[ "br.simulador.plugin.biblioteca.componentes.Componente", "br.simulador.plugin.biblioteca.componentes.Interruptor", "br.simulador.plugin.biblioteca.componentes.TipoComponente", "java.util.Optional" ]
import br.simulador.plugin.biblioteca.componentes.Componente; import br.simulador.plugin.biblioteca.componentes.Interruptor; import br.simulador.plugin.biblioteca.componentes.TipoComponente; import java.util.Optional;
import br.simulador.plugin.biblioteca.componentes.*; import java.util.*;
[ "br.simulador.plugin", "java.util" ]
br.simulador.plugin; java.util;
2,607,565
public void testPublicCloneable() { LineAndShapeRenderer r1 = new LineAndShapeRenderer(); assertTrue(r1 instanceof PublicCloneable); }
void function() { LineAndShapeRenderer r1 = new LineAndShapeRenderer(); assertTrue(r1 instanceof PublicCloneable); }
/** * Check that this class implements PublicCloneable. */
Check that this class implements PublicCloneable
testPublicCloneable
{ "repo_name": "JSansalone/JFreeChart", "path": "tests/org/jfree/chart/renderer/category/junit/LineAndShapeRendererTests.java", "license": "lgpl-2.1", "size": 11809 }
[ "org.jfree.chart.renderer.category.LineAndShapeRenderer", "org.jfree.util.PublicCloneable" ]
import org.jfree.chart.renderer.category.LineAndShapeRenderer; import org.jfree.util.PublicCloneable;
import org.jfree.chart.renderer.category.*; import org.jfree.util.*;
[ "org.jfree.chart", "org.jfree.util" ]
org.jfree.chart; org.jfree.util;
267,646
final var servletBuilder = Servlets.deployment() .setClassLoader(Thread.currentThread().getContextClassLoader()) .setContextPath("/") .setDeploymentName("ROOT.war") .addServlets( Servlets.servlet("AsyncUploadServlet", AsyncUploadSer...
final var servletBuilder = Servlets.deployment() .setClassLoader(Thread.currentThread().getContextClassLoader()) .setContextPath("/") .setDeploymentName(STR) .addServlets( Servlets.servlet(STR, AsyncUploadServlet.class) .addMapping(STR) .setAsyncSupported(true), Servlets.servlet(STR, BlockingUploadServlet.class) .addMa...
/** * Sets up the test environment, generates data to upload, starts an * Undertow instance which will receive the client requests. * @throws Exception If an error occurred with the servlets */
Sets up the test environment, generates data to upload, starts an Undertow instance which will receive the client requests
setUpClass
{ "repo_name": "Elopteryx/upload-parser", "path": "upload-parser-tests/src/test/java/com/github/elopteryx/upload/internal/integration/UndertowIntegrationTest.java", "license": "apache-2.0", "size": 4907 }
[ "io.undertow.Handlers", "io.undertow.Undertow", "io.undertow.servlet.Servlets" ]
import io.undertow.Handlers; import io.undertow.Undertow; import io.undertow.servlet.Servlets;
import io.undertow.*; import io.undertow.servlet.*;
[ "io.undertow", "io.undertow.servlet" ]
io.undertow; io.undertow.servlet;
2,307,104
public void setPreferenceModifier(PreferenceModifier modifier) { this.preferenceModifier = checkNotNull(modifier, "Modifier cannot be null"); }
void function(PreferenceModifier modifier) { this.preferenceModifier = checkNotNull(modifier, STR); }
/** * Set the preference modifier. * * @param modifier The preference modifier to use. */
Set the preference modifier
setPreferenceModifier
{ "repo_name": "cookingfox/prefer-android", "path": "prefer/src/main/java/com/cookingfox/android/prefer/impl/pref/AbstractAndroidPref.java", "license": "mit", "size": 4560 }
[ "com.cookingfox.guava_preconditions.Preconditions" ]
import com.cookingfox.guava_preconditions.Preconditions;
import com.cookingfox.guava_preconditions.*;
[ "com.cookingfox.guava_preconditions" ]
com.cookingfox.guava_preconditions;
2,107,716
public void eliminateDuplicates(int[] array,int index, int endIndex) { int[] array2 = new int[array.length]; Arrays.sort(array);//sorts the current array in ascending order using the merge sort algorithm eliminate(array,array2,index,endIndex); //revert array as a...
void function(int[] array,int index, int endIndex) { int[] array2 = new int[array.length]; Arrays.sort(array); eliminate(array,array2,index,endIndex); new ArrayFunctions().copyArrays(array2, array); }
/** * this method invokes the recursive method eliminate, which is set to private * it eliminates the array duplicates, the downside is that the space of the deleted items is still contained in the * system memory * @param array the current array containing elements * * @param index ...
this method invokes the recursive method eliminate, which is set to private it eliminates the array duplicates, the downside is that the space of the deleted items is still contained in the system memory
eliminateDuplicates
{ "repo_name": "gerryDreamer/dreamerLib", "path": "src/com/dreamer/array/RemoveArrayDuplicates.java", "license": "gpl-2.0", "size": 6876 }
[ "com.dreamer.array.ArrayFunctions", "java.util.Arrays" ]
import com.dreamer.array.ArrayFunctions; import java.util.Arrays;
import com.dreamer.array.*; import java.util.*;
[ "com.dreamer.array", "java.util" ]
com.dreamer.array; java.util;
2,187,354
YangNode node = manager.getDataModel("src/test/resources/ModuleSubStatementContainer.yang"); assertThat((node instanceof YangModule), is(true)); // Check whether the node type is set properly to module. assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE)); // Check whe...
YangNode node = manager.getDataModel(STR); assertThat((node instanceof YangModule), is(true)); assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE)); YangModule yangNode = (YangModule) node; assertThat(yangNode.getName(), is("Test")); YangContainer yangContainer = (YangContainer) yangNode.getChild(); assertThat(...
/** * Checks container statement as sub-statement of module. */
Checks container statement as sub-statement of module
processModuleSubStatementContainer
{ "repo_name": "Phaneendra-Huawei/demo", "path": "utils/yangutils/src/test/java/org/onosproject/yangutils/parser/impl/listeners/ContainerListenerTest.java", "license": "apache-2.0", "size": 9156 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.core.Is", "org.junit.Test", "org.onosproject.yangutils.datamodel.YangContainer", "org.onosproject.yangutils.datamodel.YangModule", "org.onosproject.yangutils.datamodel.YangNode", "org.onosproject.yangutils.datamodel.YangNodeType" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.junit.Test; import org.onosproject.yangutils.datamodel.YangContainer; import org.onosproject.yangutils.datamodel.YangModule; import org.onosproject.yangutils.datamodel.YangNode; import org.onosproject.yangutils.datamodel.YangNodeType;
import org.hamcrest.*; import org.hamcrest.core.*; import org.junit.*; import org.onosproject.yangutils.datamodel.*;
[ "org.hamcrest", "org.hamcrest.core", "org.junit", "org.onosproject.yangutils" ]
org.hamcrest; org.hamcrest.core; org.junit; org.onosproject.yangutils;
1,294,120
stroke = new BasicStroke((float) width); }
stroke = new BasicStroke((float) width); }
/** * Sets the stroke for rendering fat arrows. * @param width double */
Sets the stroke for rendering fat arrows
setStrokeWidth
{ "repo_name": "dobrown/tracker-mvn", "path": "src/main/java/org/opensourcephysics/display/InteractiveArrow.java", "license": "gpl-3.0", "size": 9552 }
[ "java.awt.BasicStroke" ]
import java.awt.BasicStroke;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,853,275
public static void addOwner(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Agent value) { Base.add(model, instanceResource, OWNER, value); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Agent value) { Base.add(model, instanceResource, OWNER, value); }
/** * Adds a value to property Owner from an instance of Agent * * @param model * an RDF2Go model * @param resource * an RDF2Go resource * * [Generated from RDFReactor template rule #add3static] */
Adds a value to property Owner from an instance of Agent
addOwner
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-w3-wacl/src/main/java/org/w3/ns/auth/acl/Thing.java", "license": "mit", "size": 19612 }
[ "com.xmlns.foaf.Agent", "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import com.xmlns.foaf.Agent; import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import com.xmlns.foaf.*; import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "com.xmlns.foaf", "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
com.xmlns.foaf; org.ontoware.rdf2go; org.ontoware.rdfreactor;
381,348
public synchronized OVXLink setLinkPath(final int linkId, final List<PhysicalLink> physicalLinks, final byte priority) throws IndexOutOfBoundException { // create the map to the reverse list of physical links final List<PhysicalLink> reversePhysicalLinks = new LinkedList<Phys...
synchronized OVXLink function(final int linkId, final List<PhysicalLink> physicalLinks, final byte priority) throws IndexOutOfBoundException { final List<PhysicalLink> reversePhysicalLinks = new LinkedList<PhysicalLink>(); for (final PhysicalLink phyLink : Lists.reverse(physicalLinks)) { reversePhysicalLinks.add(Physic...
/** * Creates virtual link mapping to the physical topology. * * @param linkId the unique link ID * @param physicalLinks the list of physical links * @param priority the priority value * @return the virtual link instance * @throws IndexOutOfBoundException */
Creates virtual link mapping to the physical topology
setLinkPath
{ "repo_name": "shijiameng/OpenVirteX", "path": "src/main/java/net/onrc/openvirtex/elements/network/OVXNetwork.java", "license": "apache-2.0", "size": 29460 }
[ "com.google.common.collect.Lists", "java.util.LinkedList", "java.util.List", "net.onrc.openvirtex.elements.link.OVXLink", "net.onrc.openvirtex.elements.link.PhysicalLink", "net.onrc.openvirtex.exceptions.IndexOutOfBoundException" ]
import com.google.common.collect.Lists; import java.util.LinkedList; import java.util.List; import net.onrc.openvirtex.elements.link.OVXLink; import net.onrc.openvirtex.elements.link.PhysicalLink; import net.onrc.openvirtex.exceptions.IndexOutOfBoundException;
import com.google.common.collect.*; import java.util.*; import net.onrc.openvirtex.elements.link.*; import net.onrc.openvirtex.exceptions.*;
[ "com.google.common", "java.util", "net.onrc.openvirtex" ]
com.google.common; java.util; net.onrc.openvirtex;
1,755,377
public TimeInterpolator getInterpolator() { return mInterpolator; } /** * Returns the set of property names used stored in the {@link TransitionValues}
TimeInterpolator function() { return mInterpolator; } /** * Returns the set of property names used stored in the {@link TransitionValues}
/** * Returns the interpolator set on this transition. If no interpolator has been set, * the returned value will be null, indicating that resulting animators will * retain their own interpolators. * * @return The interpolator set on this transition, if one has been set, otherwise * return...
Returns the interpolator set on this transition. If no interpolator has been set, the returned value will be null, indicating that resulting animators will retain their own interpolators
getInterpolator
{ "repo_name": "oeager/BaisinceManager", "path": "transitioncompat/src/main/java/com/bison/transition/Transition.java", "license": "apache-2.0", "size": 102943 }
[ "android.animation.TimeInterpolator" ]
import android.animation.TimeInterpolator;
import android.animation.*;
[ "android.animation" ]
android.animation;
351,700
public void setActionParameters(Map<String, String> actionParameters);
void function(Map<String, String> actionParameters);
/** * Setter for the action parameters map * * @param actionParameters */
Setter for the action parameters map
setActionParameters
{ "repo_name": "ua-eas/ua-rice-2.1.9", "path": "krad/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/view/ViewModel.java", "license": "apache-2.0", "size": 9437 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,330,554
public void addCase(SequenceType[] types, QName var, Expression caseClause) { cases.add(new Case(types, var, caseClause)); }
void function(SequenceType[] types, QName var, Expression caseClause) { cases.add(new Case(types, var, caseClause)); }
/** * Add a case clause with a sequence type and an optional variable declaration. * * @param types the sequence types to match * @param var name of the variable to bind the current item to * @param caseClause the expression to evaluate */
Add a case clause with a sequence type and an optional variable declaration
addCase
{ "repo_name": "dizzzz/exist", "path": "exist-core/src/main/java/org/exist/xquery/TypeswitchExpression.java", "license": "lgpl-2.1", "size": 8786 }
[ "org.exist.dom.QName", "org.exist.xquery.value.SequenceType" ]
import org.exist.dom.QName; import org.exist.xquery.value.SequenceType;
import org.exist.dom.*; import org.exist.xquery.value.*;
[ "org.exist.dom", "org.exist.xquery" ]
org.exist.dom; org.exist.xquery;
249,446
private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final) setLayout(new BorderLayout()); add(makeLabelPanel(), BorderLayout.NORTH); add(makeMainPanel(), BorderLayout.CENTER); // Force a minimum table height of 70 pixels add(...
void function() { setLayout(new BorderLayout()); add(makeLabelPanel(), BorderLayout.NORTH); add(makeMainPanel(), BorderLayout.CENTER); add(Box.createVerticalStrut(70), BorderLayout.WEST); add(makeButtonPanel(), BorderLayout.SOUTH); table.revalidate(); }
/** * Initialize the components and layout of this component. */
Initialize the components and layout of this component
init
{ "repo_name": "apache/jmeter", "path": "src/protocol/ldap/src/main/java/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java", "license": "apache-2.0", "size": 11775 }
[ "java.awt.BorderLayout", "javax.swing.Box" ]
import java.awt.BorderLayout; import javax.swing.Box;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
674,738
public Object clone() throws CloneNotSupportedException { PolarPlot clone = (PolarPlot) super.clone(); if (this.axis != null) { clone.axis = (ValueAxis) ObjectUtilities.clone(this.axis); clone.axis.setPlot(clone); clone.axis.addChangeListener(clone); ...
Object function() throws CloneNotSupportedException { PolarPlot clone = (PolarPlot) super.clone(); if (this.axis != null) { clone.axis = (ValueAxis) ObjectUtilities.clone(this.axis); clone.axis.setPlot(clone); clone.axis.addChangeListener(clone); } if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } ...
/** * Returns a clone of the plot. * * @return A clone. * * @throws CloneNotSupportedException this can occur if some component of * the plot cannot be cloned. */
Returns a clone of the plot
clone
{ "repo_name": "opensim-org/opensim-gui", "path": "Gui/opensim/jfreechart/src/org/jfree/chart/plot/PolarPlot.java", "license": "apache-2.0", "size": 39793 }
[ "java.util.ArrayList", "org.jfree.chart.axis.ValueAxis", "org.jfree.chart.renderer.PolarItemRenderer", "org.jfree.util.ObjectUtilities" ]
import java.util.ArrayList; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.renderer.PolarItemRenderer; import org.jfree.util.ObjectUtilities;
import java.util.*; import org.jfree.chart.axis.*; import org.jfree.chart.renderer.*; import org.jfree.util.*;
[ "java.util", "org.jfree.chart", "org.jfree.util" ]
java.util; org.jfree.chart; org.jfree.util;
1,361,504
public String getUsageInformation() { HelpFormatter formatter = new HelpFormatter(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); formatter.printHelp(pw, formatter.getWidth(), applicationName, null, options, formatter.getLeftPadding(), formatter.ge...
String function() { HelpFormatter formatter = new HelpFormatter(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); formatter.printHelp(pw, formatter.getWidth(), applicationName, null, options, formatter.getLeftPadding(), formatter.getDescPadding(), null, false); pw.flush(); return sw.toStrin...
/** * Returns a help message, including the program usage and information about the arguments registered with the ArgumentParser. * * @return the usage information about the arguments registered with the ArgumentParser. */
Returns a help message, including the program usage and information about the arguments registered with the ArgumentParser
getUsageInformation
{ "repo_name": "FINRAOS/herd", "path": "herd-code/herd-core/src/main/java/org/finra/herd/core/ArgumentParser.java", "license": "apache-2.0", "size": 14195 }
[ "java.io.PrintWriter", "java.io.StringWriter", "org.apache.commons.cli.HelpFormatter" ]
import java.io.PrintWriter; import java.io.StringWriter; import org.apache.commons.cli.HelpFormatter;
import java.io.*; import org.apache.commons.cli.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,194,294
public SDVariable adjustHue(String name, SDVariable in, double delta) { SDValidation.validateNumerical("adjustHue", "in", in); SDVariable out = new org.nd4j.linalg.api.ops.custom.AdjustHue(sd,in, delta).outputVariable(); return sd.updateVariableNameAndReference(out, name); }
SDVariable function(String name, SDVariable in, double delta) { SDValidation.validateNumerical(STR, "in", in); SDVariable out = new org.nd4j.linalg.api.ops.custom.AdjustHue(sd,in, delta).outputVariable(); return sd.updateVariableNameAndReference(out, name); }
/** * Adjust hue of RGB image <br> * * @param name name May be null. Name for the output variable * @param in image as 3D array (NUMERIC type) * @param delta value to add to hue channel * @return output adjusted image (NUMERIC type) */
Adjust hue of RGB image
adjustHue
{ "repo_name": "deeplearning4j/deeplearning4j", "path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDImage.java", "license": "apache-2.0", "size": 29470 }
[ "java.lang.String", "org.nd4j.autodiff.samediff.SDVariable" ]
import java.lang.String; import org.nd4j.autodiff.samediff.SDVariable;
import java.lang.*; import org.nd4j.autodiff.samediff.*;
[ "java.lang", "org.nd4j.autodiff" ]
java.lang; org.nd4j.autodiff;
1,699,336
@NotNull TokenSet getExpressionTokens();
TokenSet getExpressionTokens();
/** * Returns element types that are subclasses of {@link com.jetbrains.python.psi.PyExpression}. */
Returns element types that are subclasses of <code>com.jetbrains.python.psi.PyExpression</code>
getExpressionTokens
{ "repo_name": "siosio/intellij-community", "path": "python/python-psi-api/src/com/jetbrains/python/PythonDialectsTokenSetContributor.java", "license": "apache-2.0", "size": 2149 }
[ "com.intellij.psi.tree.TokenSet" ]
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.tree.*;
[ "com.intellij.psi" ]
com.intellij.psi;
2,723,891
public boolean updatesAreDetected(int type) throws SQLException { return false; }
boolean function(int type) throws SQLException { return false; }
/** * JDBC 2.0 Determine whether or not a visible row update can be detected by * calling ResultSet.rowUpdated(). * * @param type * set type, i.e. ResultSet.TYPE_XXX * @return true if changes are detected by the resultset type * @exception SQLException * if a database-access e...
JDBC 2.0 Determine whether or not a visible row update can be detected by calling ResultSet.rowUpdated()
updatesAreDetected
{ "repo_name": "shubhanshu-gupta/Apache-Solr", "path": "example/solr/collection1/lib/mysql-connector-java-5.1.32/src/com/mysql/jdbc/DatabaseMetaData.java", "license": "apache-2.0", "size": 287958 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
371,124
public void messages(@Nullable Collection<TcpDiscoveryAbstractMessage> msgs, @Nullable IgniteUuid discardMsgId) { this.msgs = msgs; this.discardMsgId = discardMsgId; }
void function(@Nullable Collection<TcpDiscoveryAbstractMessage> msgs, @Nullable IgniteUuid discardMsgId) { this.msgs = msgs; this.discardMsgId = discardMsgId; }
/** * Sets pending messages to send to new node. * * @param msgs Pending messages to send to new node. * @param discardMsgId Discarded message ID. */
Sets pending messages to send to new node
messages
{ "repo_name": "gargvish/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryNodeAddedMessage.java", "license": "apache-2.0", "size": 6092 }
[ "java.util.Collection", "org.apache.ignite.lang.IgniteUuid", "org.jetbrains.annotations.Nullable" ]
import java.util.Collection; import org.apache.ignite.lang.IgniteUuid; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
89,089
void complete( List<OSMElement> decodedEntities );
void complete( List<OSMElement> decodedEntities );
/** * Provides the listener with the list of decoded entities. * <p/> * @param decodedEntities The decoded entities. */
Provides the listener with the list of decoded entities.
complete
{ "repo_name": "jansoe/graphhopper", "path": "core/src/main/java/com/graphhopper/reader/pbf/PbfBlobDecoderListener.java", "license": "apache-2.0", "size": 673 }
[ "com.graphhopper.reader.OSMElement", "java.util.List" ]
import com.graphhopper.reader.OSMElement; import java.util.List;
import com.graphhopper.reader.*; import java.util.*;
[ "com.graphhopper.reader", "java.util" ]
com.graphhopper.reader; java.util;
1,598,962
public static void main(String... args) throws SQLException { new Recover().runTool(args); }
static void function(String... args) throws SQLException { new Recover().runTool(args); }
/** * Options are case sensitive. Supported options are: * <table> * <tr><td>[-help] or [-?]</td> * <td>Print the list of options</td></tr> * <tr><td>[-dir &lt;dir&gt;]</td> * <td>The directory (default: .)</td></tr> * <tr><td>[-db &lt;database&gt;]</td> * <td>The database name (...
Options are case sensitive. Supported options are: [-help] or [-?] Print the list of options [-dir &lt;dir&gt;] The directory (default: .) [-db &lt;database&gt;] The database name (all databases if not set) [-trace] Print additional trace information [-transactionLog] Print the transaction log Encrypted databases need ...
main
{ "repo_name": "votaguz/frostwire-desktop", "path": "lib/jars-src/h2-1.4.186/src/main/org/h2/tools/Recover.java", "license": "gpl-3.0", "size": 64596 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,314,770
private void readCurrentBlockToPos(long pos) throws IOException { if (mCurrentBlockInStream == null) { return; } long len = Math.min(pos - mPos, mCurrentBlockInStream.remaining()); if (len <= 0) { return; } do { // Account for the last read which might be less than mSeekBuff...
void function(long pos) throws IOException { if (mCurrentBlockInStream == null) { return; } long len = Math.min(pos - mPos, mCurrentBlockInStream.remaining()); if (len <= 0) { return; } do { int bytesRead = readInternal(mSeekBuffer, 0, (int) Math.min(mSeekBuffer.length, len)); Preconditions.checkState(bytesRead > 0, Pr...
/** * Reads till the file offset (mPos) equals pos or the end of the current block (whichever is * met first) if pos > mPos. Otherwise no-op. * * @param pos file offset */
Reads till the file offset (mPos) equals pos or the end of the current block (whichever is met first) if pos > mPos. Otherwise no-op
readCurrentBlockToPos
{ "repo_name": "ShailShah/alluxio", "path": "core/client/fs/src/main/java/alluxio/client/file/FileInStream.java", "license": "apache-2.0", "size": 23701 }
[ "com.google.common.base.Preconditions", "java.io.IOException" ]
import com.google.common.base.Preconditions; import java.io.IOException;
import com.google.common.base.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
585,698
public FeatureResultSet queryFeaturesForChunk(String[] columns, BoundingBox boundingBox, Map<String, Object> fieldValues, int limit, long offset) { return queryFeaturesForChunk(columns, boundingBox, fieldValues, getPkColumnName(), limit, offset); }
FeatureResultSet function(String[] columns, BoundingBox boundingBox, Map<String, Object> fieldValues, int limit, long offset) { return queryFeaturesForChunk(columns, boundingBox, fieldValues, getPkColumnName(), limit, offset); }
/** * Query for features within the bounding box ordered by id, starting at the * offset and returning no more than the limit * * @param columns * columns * @param boundingBox * bounding box * @param fieldValues * field values * @param limit * chunk lim...
Query for features within the bounding box ordered by id, starting at the offset and returning no more than the limit
queryFeaturesForChunk
{ "repo_name": "ngageoint/geopackage-java", "path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java", "license": "mit", "size": 349361 }
[ "java.util.Map", "mil.nga.geopackage.BoundingBox", "mil.nga.geopackage.features.user.FeatureResultSet" ]
import java.util.Map; import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureResultSet;
import java.util.*; import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*;
[ "java.util", "mil.nga.geopackage" ]
java.util; mil.nga.geopackage;
1,962,513
public RelationType withAlias(String relationAlias, List<String> columnAliases) { if (columnAliases != null) { checkArgument(columnAliases.size() == visibleFields.size(), "Column alias list has %s entries but '%s' has %s columns available", columnAlias...
RelationType function(String relationAlias, List<String> columnAliases) { if (columnAliases != null) { checkArgument(columnAliases.size() == visibleFields.size(), STR, columnAliases.size(), relationAlias, visibleFields.size()); } ImmutableList.Builder<Field> fieldsBuilder = ImmutableList.builder(); for (int i = 0; i < ...
/** * Creates a new tuple descriptor with the relation, and, optionally, the columns aliased. */
Creates a new tuple descriptor with the relation, and, optionally, the columns aliased
withAlias
{ "repo_name": "miniway/presto", "path": "presto-main/src/main/java/io/prestosql/sql/analyzer/RelationType.java", "license": "apache-2.0", "size": 6894 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.ImmutableList", "io.prestosql.sql.tree.QualifiedName", "java.util.List", "java.util.Optional" ]
import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import io.prestosql.sql.tree.QualifiedName; import java.util.List; import java.util.Optional;
import com.google.common.base.*; import com.google.common.collect.*; import io.prestosql.sql.tree.*; import java.util.*;
[ "com.google.common", "io.prestosql.sql", "java.util" ]
com.google.common; io.prestosql.sql; java.util;
1,932,493
ReplicaHandler recoverAppend( ExtendedBlock b, long newGS, long expectedBlockLen) throws IOException;
ReplicaHandler recoverAppend( ExtendedBlock b, long newGS, long expectedBlockLen) throws IOException;
/** * Recover a failed append to a finalized replica and returns the meta * info of the replica. * * @param b block * @param newGS the new generation stamp for the replica * @param expectedBlockLen the number of bytes the replica is expected to have * @return the meta info of the replica which is ...
Recover a failed append to a finalized replica and returns the meta info of the replica
recoverAppend
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java", "license": "apache-2.0", "size": 22452 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.ExtendedBlock", "org.apache.hadoop.hdfs.server.datanode.ReplicaHandler" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.server.datanode.ReplicaHandler;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
872,567
public ServiceCall<Void> beginPost202Retry200Async(Product product, final ServiceCallback<Void> serviceCallback) { return ServiceCall.createWithHeaders(beginPost202Retry200WithServiceResponseAsync(product), serviceCallback); }
ServiceCall<Void> function(Product product, final ServiceCallback<Void> serviceCallback) { return ServiceCall.createWithHeaders(beginPost202Retry200WithServiceResponseAsync(product), serviceCallback); }
/** * Long running post request, service returns a 500, then a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success. * * @param product Product to put * @param serviceCallback the async ServiceCallback to handle successful and f...
Long running post request, service returns a 500, then a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success
beginPost202Retry200Async
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/implementation/LRORetrysImpl.java", "license": "mit", "size": 81231 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,520,758
//----------------------------------------------------------------------- public MarketDataManager getMarketDataManager() { return _marketDataManager; }
MarketDataManager function() { return _marketDataManager; }
/** * Gets market data manager. * @return the value of the property, not null */
Gets market data manager
getMarketDataManager
{ "repo_name": "McLeodMoores/starling", "path": "projects/starling-client/src/main/java/com/mcleodmoores/starling/client/component/StarlingToolContextComponentFactory.java", "license": "apache-2.0", "size": 19948 }
[ "com.mcleodmoores.starling.client.marketdata.MarketDataManager" ]
import com.mcleodmoores.starling.client.marketdata.MarketDataManager;
import com.mcleodmoores.starling.client.marketdata.*;
[ "com.mcleodmoores.starling" ]
com.mcleodmoores.starling;
2,634,357
protected void setReportClassForPaymentsAndInvoicesSubPanel( Map<String, Object> hashMap){ Map<String, String> primaryKeyField = new HashMap<String, String>(); primaryKeyField.put(REPORT_CLASS_CODE_FIELD, this.getParameterService().getParameterValueAsString(AwardDocument...
void function( Map<String, Object> hashMap){ Map<String, String> primaryKeyField = new HashMap<String, String>(); primaryKeyField.put(REPORT_CLASS_CODE_FIELD, this.getParameterService().getParameterValueAsString(AwardDocument.class ,KeyConstants.REPORT_CLASS_FOR_PAYMENTS_AND_INVOICES)); hashMap.put(Constants.REPORT_CLA...
/** * * This method fetches the reportClass object from the database using system paramter as the primary * key and puts it in the map and returns it. * It is used in the jsp/tag files to populate the report class panel under Payments and Invoices panel. * * @param hashMap * @retur...
This method fetches the reportClass object from the database using system paramter as the primary key and puts it in the map and returns it. It is used in the jsp/tag files to populate the report class panel under Payments and Invoices panel
setReportClassForPaymentsAndInvoicesSubPanel
{ "repo_name": "mukadder/kc", "path": "coeus-impl/src/main/java/org/kuali/kra/award/service/impl/AwardReportsServiceImpl.java", "license": "agpl-3.0", "size": 8582 }
[ "java.util.HashMap", "java.util.Map", "org.kuali.kra.award.document.AwardDocument", "org.kuali.kra.award.paymentreports.ReportClass", "org.kuali.kra.infrastructure.Constants", "org.kuali.kra.infrastructure.KeyConstants" ]
import java.util.HashMap; import java.util.Map; import org.kuali.kra.award.document.AwardDocument; import org.kuali.kra.award.paymentreports.ReportClass; import org.kuali.kra.infrastructure.Constants; import org.kuali.kra.infrastructure.KeyConstants;
import java.util.*; import org.kuali.kra.award.document.*; import org.kuali.kra.award.paymentreports.*; import org.kuali.kra.infrastructure.*;
[ "java.util", "org.kuali.kra" ]
java.util; org.kuali.kra;
1,553,533
@Metadata(label = "advanced", description = "To use a custom Spring org.springframework.jms.support.converter.MessageConverter so you can be in control how to map to/from a javax.jms.Message.") public void setMessageConverter(MessageConverter messageConverter) { getConfiguration().setMessage...
@Metadata(label = STR, description = STR) void function(MessageConverter messageConverter) { getConfiguration().setMessageConverter(messageConverter); }
/** * To use a custom Spring org.springframework.jms.support.converter.MessageConverter so you can be in control * how to map to/from a javax.jms.Message. */
To use a custom Spring org.springframework.jms.support.converter.MessageConverter so you can be in control how to map to/from a javax.jms.Message
setMessageConverter
{ "repo_name": "veithen/camel", "path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java", "license": "apache-2.0", "size": 74797 }
[ "org.apache.camel.spi.Metadata", "org.springframework.jms.support.converter.MessageConverter" ]
import org.apache.camel.spi.Metadata; import org.springframework.jms.support.converter.MessageConverter;
import org.apache.camel.spi.*; import org.springframework.jms.support.converter.*;
[ "org.apache.camel", "org.springframework.jms" ]
org.apache.camel; org.springframework.jms;
1,574,819
if (trigger) { returnEventChunk.clear(); complexEventChunk.reset(); while (complexEventChunk.hasNext()) { StreamEvent streamEvent = (StreamEvent) complexEventChunk.next(); if (streamEvent.getType() == ComplexEvent.Type.TIMER || ...
if (trigger) { returnEventChunk.clear(); complexEventChunk.reset(); while (complexEventChunk.hasNext()) { StreamEvent streamEvent = (StreamEvent) complexEventChunk.next(); if (streamEvent.getType() == ComplexEvent.Type.TIMER (!preJoinProcessor && streamEvent.getType() == ComplexEvent.Type.CURRENT)) { continue; } Stream...
/** * Process the handed StreamEvent * * @param complexEventChunk event chunk to be processed */
Process the handed StreamEvent
process
{ "repo_name": "lasanthafdo/siddhi", "path": "modules/siddhi-core/src/main/java/org/wso2/siddhi/core/query/input/stream/join/JoinProcessor.java", "license": "apache-2.0", "size": 5701 }
[ "org.wso2.siddhi.core.event.ComplexEvent", "org.wso2.siddhi.core.event.state.StateEvent", "org.wso2.siddhi.core.event.stream.StreamEvent" ]
import org.wso2.siddhi.core.event.ComplexEvent; import org.wso2.siddhi.core.event.state.StateEvent; import org.wso2.siddhi.core.event.stream.StreamEvent;
import org.wso2.siddhi.core.event.*; import org.wso2.siddhi.core.event.state.*; import org.wso2.siddhi.core.event.stream.*;
[ "org.wso2.siddhi" ]
org.wso2.siddhi;
2,693,024
public void write(Writer writer, CSVWriteProc proc) { write(writer(writer), proc); }
void function(Writer writer, CSVWriteProc proc) { write(writer(writer), proc); }
/** * Write CSV using the supplied {@link CSVWriteProc}. * * @param writer * the writer to an underlying CSV. The writer will not be closed. * @param proc * the {@link CSVWriteProc} to use for CSV writing */
Write CSV using the supplied <code>CSVWriteProc</code>
write
{ "repo_name": "kongch/OpenCSV-3.0", "path": "OpenCSV/src/au/com/bytecode/opencsv/CSV.java", "license": "apache-2.0", "size": 18888 }
[ "java.io.Writer" ]
import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
476,468
public void changeServerState(int nodeId, VoldemortMetadata.ServerState state) { Cluster currentCluster = metadata.getCurrentCluster(); Node node = currentCluster.getNodeById(nodeId); SocketDestination destination = new SocketDestination(node.getHost(), node.getAdminPort()); SocketAn...
void function(int nodeId, VoldemortMetadata.ServerState state) { Cluster currentCluster = metadata.getCurrentCluster(); Node node = currentCluster.getNodeById(nodeId); SocketDestination destination = new SocketDestination(node.getHost(), node.getAdminPort()); SocketAndStreams sands = pool.checkout(destination); try { D...
/** * changes {@link ServerState} for (remote) node with given nodeId * * @param nodeId * @param state */
changes <code>ServerState</code> for (remote) node with given nodeId
changeServerState
{ "repo_name": "nassim-git/project-voldemort", "path": "src/java/voldemort/client/AdminClient.java", "license": "apache-2.0", "size": 14957 }
[ "java.io.DataInputStream", "java.io.DataOutputStream", "java.io.IOException" ]
import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,311,282
public WellSetInteger sets(WellSetInteger set, int n, int begin, int length) { if(set == null) { throw new NullPointerException("Well set is null."); } WellSetInteger result = new WellSetInteger(); for(WellInteger well : set) { result.add(new WellInteger(well.row(),...
WellSetInteger function(WellSetInteger set, int n, int begin, int length) { if(set == null) { throw new NullPointerException(STR); } WellSetInteger result = new WellSetInteger(); for(WellInteger well : set) { result.add(new WellInteger(well.row(), well.column(), this.calculate(well.data(), n, begin, length))); } return...
/** * Returns the result of the mathematical operation using the values between * the indices. * @param WellSetInteger the first plate * @param int number of bits to shift * @param int beginning index of the subset * @param int lengt...
Returns the result of the mathematical operation using the values between the indices
sets
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/integerflex/math/MathOperationIntegerShift.java", "license": "apache-2.0", "size": 9153 }
[ "com.github.jessemull.microflex.integerflex.plate.WellInteger", "com.github.jessemull.microflex.integerflex.plate.WellSetInteger" ]
import com.github.jessemull.microflex.integerflex.plate.WellInteger; import com.github.jessemull.microflex.integerflex.plate.WellSetInteger;
import com.github.jessemull.microflex.integerflex.plate.*;
[ "com.github.jessemull" ]
com.github.jessemull;
954,222
public static Simplifier toUpperCase() { return toUpperCase(Locale.getDefault()); }
static Simplifier function() { return toUpperCase(Locale.getDefault()); }
/** * Returns a simplifier that transforms all lower case characters into their * upper case equivalent. * <P> * Uses the default locale to apply the transform. * * @return a simplifier that transforms all lower case characters into their * upper case equivalent */
Returns a simplifier that transforms all lower case characters into their upper case equivalent. Uses the default locale to apply the transform
toUpperCase
{ "repo_name": "mpkorstanje/simmetrics", "path": "simmetrics-core/src/main/java/com/github/mpkorstanje/simmetrics/simplifiers/Simplifiers.java", "license": "apache-2.0", "size": 11500 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,441,024
public void readout(final Marker marker, final String message) { logger.logIfEnabled(FQCN, READOUT, marker, message, (Throwable) null); }
void function(final Marker marker, final String message) { logger.logIfEnabled(FQCN, READOUT, marker, message, (Throwable) null); }
/** * Logs a message object with the {@code READOUT} level. * * @param marker the marker data specific to this log statement * @param message the message object to log. */
Logs a message object with the READOUT level
readout
{ "repo_name": "Betalord/BHBot", "path": "src/main/java/BHBotLogger.java", "license": "gpl-3.0", "size": 177002 }
[ "org.apache.logging.log4j.Marker" ]
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.*;
[ "org.apache.logging" ]
org.apache.logging;
1,153,289
private void throttle() throws InterruptedException { if (throttleLimitRatio >= 1.0) { return; } final long expect = (long) (throttleTimerAll.now(TimeUnit.MILLISECONDS) * throttleLimitRatio); final long actual = throttleTimerLocked.now(TimeUnit.MILLISECONDS); if (LOG.isDebugEnabled(...
void function() throws InterruptedException { if (throttleLimitRatio >= 1.0) { return; } final long expect = (long) (throttleTimerAll.now(TimeUnit.MILLISECONDS) * throttleLimitRatio); final long actual = throttleTimerLocked.now(TimeUnit.MILLISECONDS); if (LOG.isDebugEnabled()) { LOG.debug(STR + STR, expect, actual, thr...
/** * Throttles the ReencryptionUpdater to prevent from contending FSN/FSD write * locks. This is done by the configuration. */
Throttles the ReencryptionUpdater to prevent from contending FSN/FSD write locks. This is done by the configuration
throttle
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ReencryptionUpdater.java", "license": "apache-2.0", "size": 19924 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,020,111
@Test public void testIncrementInt() { assertNotNull(progressBar.increment(5)); assertEquals(progressBar.increment(5).render().toString(), "$('#anId').progressbar('value', $('#anId').progressbar('value') + 5);"); }
void function() { assertNotNull(progressBar.increment(5)); assertEquals(progressBar.increment(5).render().toString(), STR); }
/** * Test method for * {@link org.odlabs.wiquery.ui.progressbar.ProgressBar#increment(int)}. */
Test method for <code>org.odlabs.wiquery.ui.progressbar.ProgressBar#increment(int)</code>
testIncrementInt
{ "repo_name": "WiQuery/wiquery", "path": "wiquery-jquery-ui/src/test/java/org/odlabs/wiquery/ui/progressbar/ProgressBarTestCase.java", "license": "mit", "size": 7820 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,652,746
@Override public byte[] getShortMidpointKey(final byte[] leftKey, final byte[] rightKey) { return Arrays.copyOf(rightKey, rightKey.length); }
byte[] function(final byte[] leftKey, final byte[] rightKey) { return Arrays.copyOf(rightKey, rightKey.length); }
/** * Don't do any fancy Block Index splitting tricks. */
Don't do any fancy Block Index splitting tricks
getShortMidpointKey
{ "repo_name": "narendragoyal/hbase", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java", "license": "apache-2.0", "size": 98078 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
731,761
public static void setRole(PerunSession sess, User user, PerunBean complementaryObject, Role role) throws InternalErrorException, PrivilegeException, UserNotExistsException, AlreadyAdminException { Utils.notNull(role, "role"); ((PerunBl) sess.getPerun()).getUsersManagerBl().checkUserExists(sess, user); if(!i...
static void function(PerunSession sess, User user, PerunBean complementaryObject, Role role) throws InternalErrorException, PrivilegeException, UserNotExistsException, AlreadyAdminException { Utils.notNull(role, "role"); ((PerunBl) sess.getPerun()).getUsersManagerBl().checkUserExists(sess, user); if(!isAuthorized(sess,...
/** * Set role for user and <b>one</b> complementary object. * * If complementary object is wrong for the role, throw an exception. * For role "perunadmin" ignore complementary object. * * @param sess perun session * @param user the user for setting role * @param role role of user in a session * @para...
Set role for user and one complementary object. If complementary object is wrong for the role, throw an exception. For role "perunadmin" ignore complementary object
setRole
{ "repo_name": "licehammer/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/AuthzResolver.java", "license": "bsd-2-clause", "size": 25476 }
[ "cz.metacentrum.perun.core.api.exceptions.AlreadyAdminException", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.PrivilegeException", "cz.metacentrum.perun.core.api.exceptions.UserNotExistsException", "cz.metacentrum.perun.core.bl.PerunBl", "cz...
import cz.metacentrum.perun.core.api.exceptions.AlreadyAdminException; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.UserNotExistsException; import cz.metacentrum.perun.core.bl.P...
import cz.metacentrum.perun.core.api.exceptions.*; import cz.metacentrum.perun.core.bl.*; import cz.metacentrum.perun.core.impl.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
2,398,354
public static java.util.Set extractReportBoSet(ims.domain.ILightweightDomainFactory domainFactory, ims.correspondence.vo.DocReportVoCollection voCollection) { return extractReportBoSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.correspondence.vo.DocReportVoCollection voCollection) { return extractReportBoSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.core.admin.domain.objects.ReportBo set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.core.admin.domain.objects.ReportBo set from the value object collection
extractReportBoSet
{ "repo_name": "openhealthcare/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/correspondence/vo/domain/DocReportVoAssembler.java", "license": "agpl-3.0", "size": 18113 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
45,138
@Override public void onCompletion(MediaPlayer arg0) { // check for repeat is ON or OFF if(isRepeat){ // repeat is on play same song again playSong(currentSongIndex); } else if(isShuffle){ // shuffle is on - play a random song Random rand = new Random(); currentSongIndex = rand.nextInt((songsL...
void function(MediaPlayer arg0) { if(isRepeat){ playSong(currentSongIndex); } else if(isShuffle){ Random rand = new Random(); currentSongIndex = rand.nextInt((songsList.size() - 1) - 0 + 1) + 0; playSong(currentSongIndex); } else{ if(currentSongIndex < (songsList.size() - 1)){ playSong(currentSongIndex + 1); currentSon...
/** * On Song Playing completed * if repeat is ON play same song again * if shuffle is ON play random song * */
On Song Playing completed if repeat is ON play same song again if shuffle is ON play random song
onCompletion
{ "repo_name": "netgroup/hts-cycle", "path": "MusicShareP2P/src/it/uniroma2/musicsharep2p/MainActivity.java", "license": "gpl-3.0", "size": 22990 }
[ "android.media.MediaPlayer", "java.util.Random" ]
import android.media.MediaPlayer; import java.util.Random;
import android.media.*; import java.util.*;
[ "android.media", "java.util" ]
android.media; java.util;
2,457,533
public String getName(boolean forcedUpdate) { String name = get().getName(); if ((name == null || forcedUpdate) && api.getRiotApi() != null) { try { name = api.getRiotApi().getName(getUserId()); setName(name); } catch (final IOException e) { e.printStackTrace(); } } return name...
String function(boolean forcedUpdate) { String name = get().getName(); if ((name == null forcedUpdate) && api.getRiotApi() != null) { try { name = api.getRiotApi().getName(getUserId()); setName(name); } catch (final IOException e) { e.printStackTrace(); } } return name; }
/** * Gets the name of this friend. If the name was null then we try to fetch * the name with your Riot API Key if provided. Enable forcedUpdate to * always fetch the latest name of this Friend even when the name is not * null. * * @param forcedUpdate * True will force to update the nam...
Gets the name of this friend. If the name was null then we try to fetch the name with your Riot API Key if provided. Enable forcedUpdate to always fetch the latest name of this Friend even when the name is not null
getName
{ "repo_name": "rafaelneiva/League-of-Legends-XMPP-Chat-Library", "path": "src/main/java/com/github/theholywaffle/lolchatapi/wrapper/Friend.java", "license": "mit", "size": 8716 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,811,732
private int compareGermplasmNames( CatalogStock stock_1, CatalogStock stock_2 ) { int result = 0; Germplasm germplasm_1 = stock_1.getGermplasm(); Germplasm germplasm_2 = stock_2.getGermplasm(); String name_1 = germplasm_1.get_name(); ...
int function( CatalogStock stock_1, CatalogStock stock_2 ) { int result = 0; Germplasm germplasm_1 = stock_1.getGermplasm(); Germplasm germplasm_2 = stock_2.getGermplasm(); String name_1 = germplasm_1.get_name(); String name_2 = germplasm_2.get_name(); result = name_1.compareTo( name_2 ); return result; }
/** * Compare names of stocks' germplasms and returns results of * string comparison. * * @param stock_1 Stock to compare against stock_2 * @param stock_2 Stock to compare against stock_1 * @return -1 if stock_1 should sort before stock_2, 1 if stock_2 should * sort before stock_1, o...
Compare names of stocks' germplasms and returns results of string comparison
compareGermplasmNames
{ "repo_name": "tair/tairwebapp", "path": "src/org/tair/abrc/catalog/category/TDNAConfirmedComparator.java", "license": "gpl-3.0", "size": 5432 }
[ "org.tair.abrc.catalog.CatalogStock", "org.tair.querytools.Germplasm" ]
import org.tair.abrc.catalog.CatalogStock; import org.tair.querytools.Germplasm;
import org.tair.abrc.catalog.*; import org.tair.querytools.*;
[ "org.tair.abrc", "org.tair.querytools" ]
org.tair.abrc; org.tair.querytools;
2,463,974
@Test void testUseCaseForwardRoot2() throws IOException, ServletException { checkForwardTo("", "/index.html", ""); }
void testUseCaseForwardRoot2() throws IOException, ServletException { checkForwardTo(STR/index.htmlSTR"); }
/** * Test forward from root, without context URL. */
Test forward from root, without context URL
testUseCaseForwardRoot2
{ "repo_name": "ligoj/ligoj", "path": "app-ui/src/test/java/org/ligoj/app/http/proxy/HtmlProxyFilterTest.java", "license": "mit", "size": 2388 }
[ "java.io.IOException", "javax.servlet.ServletException" ]
import java.io.IOException; import javax.servlet.ServletException;
import java.io.*; import javax.servlet.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,864,666
private void changeImage(Button previousButton, Button forwardButton, final int index, SourceContent sourceContent, TextView countTextView, ImageView imageSet, String url, final int current) { if (currentImageSet[index] ...
void function(Button previousButton, Button forwardButton, final int index, SourceContent sourceContent, TextView countTextView, ImageView imageSet, String url, final int current) { if (currentImageSet[index] != null) { currentImage = currentImageSet[index]; imageSet.setImageBitmap(currentImage); } else { UrlImageViewH...
/** * Change the current image in image set */
Change the current image in image set
changeImage
{ "repo_name": "LeonardoCardoso/Android-Link-Preview", "path": "app/src/main/java/com/leocardz/link/preview/Main.java", "license": "apache-2.0", "size": 24330 }
[ "android.widget.Button", "android.widget.ImageView", "android.widget.TextView", "com.koushikdutta.urlimageviewhelper.UrlImageViewCallback", "com.koushikdutta.urlimageviewhelper.UrlImageViewHelper", "com.leocardz.link.preview.library.SourceContent" ]
import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import com.koushikdutta.urlimageviewhelper.UrlImageViewCallback; import com.koushikdutta.urlimageviewhelper.UrlImageViewHelper; import com.leocardz.link.preview.library.SourceContent;
import android.widget.*; import com.koushikdutta.urlimageviewhelper.*; import com.leocardz.link.preview.library.*;
[ "android.widget", "com.koushikdutta.urlimageviewhelper", "com.leocardz.link" ]
android.widget; com.koushikdutta.urlimageviewhelper; com.leocardz.link;
762,769
protected Map<K, V> createUnderlyingMap() { return Maps.<K, V>newHashMap(); }
Map<K, V> function() { return Maps.<K, V>newHashMap(); }
/** * Creates the Map we will use to map keys to their registered values. */
Creates the Map we will use to map keys to their registered values
createUnderlyingMap
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/util/registry/RegistrySimple.java", "license": "gpl-3.0", "size": 2293 }
[ "com.google.common.collect.Maps", "java.util.Map" ]
import com.google.common.collect.Maps; import java.util.Map;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,801,629
public boolean initMoveHandle(CmsDNDHandler dndHandler, boolean addFirst) { if (m_moveHandle != null) { return true; } if (m_listItemWidget == null) { return false; } m_moveHandle = new MoveHandle(this); if (addFirst) { m_listItemW...
boolean function(CmsDNDHandler dndHandler, boolean addFirst) { if (m_moveHandle != null) { return true; } if (m_listItemWidget == null) { return false; } m_moveHandle = new MoveHandle(this); if (addFirst) { m_listItemWidget.addButtonToFront(m_moveHandle); } else { m_listItemWidget.addButton(m_moveHandle); } m_moveHandl...
/** * Initializes the move handle with the given drag and drop handler and adds it to the list item widget.<p> * * This method will not work for list items that don't have a list-item-widget.<p> * * @param dndHandler the drag and drop handler * * @param addFirst if true, adds the move...
Initializes the move handle with the given drag and drop handler and adds it to the list item widget. This method will not work for list items that don't have a list-item-widget
initMoveHandle
{ "repo_name": "mediaworx/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/CmsListItem.java", "license": "lgpl-2.1", "size": 20020 }
[ "org.opencms.gwt.client.dnd.CmsDNDHandler" ]
import org.opencms.gwt.client.dnd.CmsDNDHandler;
import org.opencms.gwt.client.dnd.*;
[ "org.opencms.gwt" ]
org.opencms.gwt;
2,172,729
public static DocumentBuilder builder() { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); // [#9] [#107] In order to take advantage of namespace-related DOM // features, the internal builder should be namespace-aware factory...
static DocumentBuilder function() { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); return builder; } catch (Exception e) { throw new RuntimeException(e); } } private static final Set<String> TRUE_VALUE...
/** * Get a namespace-aware document builder */
Get a namespace-aware document builder
builder
{ "repo_name": "angcyo/jOOX", "path": "jOOX/src/main/java/org/joox/JOOX.java", "license": "apache-2.0", "size": 42387 }
[ "java.util.HashSet", "java.util.Set", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory" ]
import java.util.HashSet; import java.util.Set; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory;
import java.util.*; import javax.xml.parsers.*;
[ "java.util", "javax.xml" ]
java.util; javax.xml;
908,477
protected void getInstanceTest3(BeanFactoryLocator facLoc) { BeanFactoryReference bfr; BeanFactory fac; BeanFactoryReference bfr2; TestBean tb; BeanFactoryReference bfr3; BeanFactoryReference bfr4; bfr = facLoc.useBeanFactory("a.qualified.name.of.some.sort"); fac = bfr.getFactory(); bfr2 = facLoc.u...
void function(BeanFactoryLocator facLoc) { BeanFactoryReference bfr; BeanFactory fac; BeanFactoryReference bfr2; TestBean tb; BeanFactoryReference bfr3; BeanFactoryReference bfr4; bfr = facLoc.useBeanFactory(STR); fac = bfr.getFactory(); bfr2 = facLoc.useBeanFactory(STR); fac = bfr2.getFactory(); tb = (TestBean) fac.ge...
/** * Worker method so subclass can use it too */
Worker method so subclass can use it too
getInstanceTest3
{ "repo_name": "cbeams-archive/spring-framework-2.5.x", "path": "test/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java", "license": "apache-2.0", "size": 6882 }
[ "org.springframework.beans.factory.BeanFactory" ]
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.*;
[ "org.springframework.beans" ]
org.springframework.beans;
728,170
static String renameReservedPathsOnUpgrade(String path, final int layoutVersion) { final String oldPath = path; // If any known LVs aren't supported, we're doing an upgrade if (!NameNodeLayoutVersion.supports(Feature.ADD_INODE_ID, layoutVersion)) { String[] components = INode.getPathNames(path...
static String renameReservedPathsOnUpgrade(String path, final int layoutVersion) { final String oldPath = path; if (!NameNodeLayoutVersion.supports(Feature.ADD_INODE_ID, layoutVersion)) { String[] components = INode.getPathNames(path); if (components.length > 1) { components[1] = DFSUtil.bytes2String( renameReservedRoo...
/** * When upgrading from an old version, the filesystem could contain paths * that are now reserved in the new version (e.g. .snapshot). This renames * these new reserved paths to a user-specified value to avoid collisions * with the reserved name. * * @param path Old path potentially containing a r...
When upgrading from an old version, the filesystem could contain paths that are now reserved in the new version (e.g. .snapshot). This renames these new reserved paths to a user-specified value to avoid collisions with the reserved name
renameReservedPathsOnUpgrade
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java", "license": "apache-2.0", "size": 54276 }
[ "org.apache.hadoop.hdfs.DFSUtil", "org.apache.hadoop.hdfs.protocol.HdfsConstants", "org.apache.hadoop.hdfs.protocol.LayoutVersion", "org.apache.hadoop.hdfs.server.common.HdfsServerConstants" ]
import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.protocol.LayoutVersion; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants;
import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.common.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
769,997
public long shouldFail(int hopsToLive, long time, boolean noStats) { long failedTime=-1; for(Iterator i = myItems.iterator();i.hasNext();) { FailItem fi = (FailItem)i.next(); if ( fi.expired(time) ) { fi.remove(); i.remove(); continue; } if( (failedTime=fi.shouldFail(hopsToLive...
long function(int hopsToLive, long time, boolean noStats) { long failedTime=-1; for(Iterator i = myItems.iterator();i.hasNext();) { FailItem fi = (FailItem)i.next(); if ( fi.expired(time) ) { fi.remove(); i.remove(); continue; } if( (failedTime=fi.shouldFail(hopsToLive,time)) >= 0 ) { if(!noStats) { blocks++; totalBloc...
/** * Checks whether a query should fail. * * @return The time at which the query that failed to find the key * occured, or < 0 if no such query is known. */
Checks whether a query should fail
shouldFail
{ "repo_name": "freenet/legacy", "path": "src/freenet/node/FailureTable.java", "license": "gpl-2.0", "size": 13606 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,996,486
public static void removePhone(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.remove(model, instanceResource, PHONE, value); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.remove(model, instanceResource, PHONE, value); }
/** * Removes a value of property Phone as an RDF2Go node * * @param model an RDF2Go model * @param resource an RDF2Go resource * @param value the value to be removed [Generated from RDFReactor template * rule #remove1static] */
Removes a value of property Phone as an RDF2Go node
removePhone
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-foaf/src/main/java/com/xmlns/foaf/Thing.java", "license": "mit", "size": 274766 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
2,810,062
@Test public void testIsValid() { assertTrue(testee.isValid("Not yet implemented")); }
void function() { assertTrue(testee.isValid(STR)); }
/** * Test method for {@link org.dbunit.validator.RegExpValidator#isValid(java.lang.String)}. */
Test method for <code>org.dbunit.validator.RegExpValidator#isValid(java.lang.String)</code>
testIsValid
{ "repo_name": "opensource21/dbunit-validation", "path": "src/test/java/org/dbunit/validator/RegExpValidatorTest.java", "license": "lgpl-3.0", "size": 2226 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,652,234
// This is also used by LookAndFeelCommand public static LookAndFeelInfo[] getAllLAFs() { UIManager.LookAndFeelInfo[] lafs = UIManager.getInstalledLookAndFeels(); int i = lafs.length; UIManager.LookAndFeelInfo[] lafsAll = new UIManager.LookAndFeelInfo[i+2]; System.arraycopy(lafs,...
static LookAndFeelInfo[] function() { UIManager.LookAndFeelInfo[] lafs = UIManager.getInstalledLookAndFeels(); int i = lafs.length; UIManager.LookAndFeelInfo[] lafsAll = new UIManager.LookAndFeelInfo[i+2]; System.arraycopy(lafs, 0, lafsAll, 0, i); lafsAll[i++]=new UIManager.LookAndFeelInfo(CROSS_PLATFORM_LAF,UIManager....
/** * Get a list of all installed LAFs plus CrossPlatform and System. * * @return The list of available {@link LookAndFeelInfo}s */
Get a list of all installed LAFs plus CrossPlatform and System
getAllLAFs
{ "repo_name": "max3163/jmeter", "path": "src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java", "license": "apache-2.0", "size": 33366 }
[ "javax.swing.UIManager" ]
import javax.swing.UIManager;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
211,931
@Test public void testCreateObjectNormalOperation() throws IOException { // Prepare the mock return values before invoking the method being tested. when(mockStorage.objects()).thenReturn(mockStorageObjects); setupNonConflictedSuccessfulWrite(); when(mockStorageObjects.insert( eq(BUCK...
void function() throws IOException { when(mockStorage.objects()).thenReturn(mockStorageObjects); setupNonConflictedSuccessfulWrite(); when(mockStorageObjects.insert( eq(BUCKET_NAME), any(StorageObject.class), any(AbstractInputStreamContent.class))) .thenReturn(mockStorageObjectsInsert); when(mockClientRequestHelper.get...
/** * Test successful operation of GoogleCloudStorage.create(2). */
Test successful operation of GoogleCloudStorage.create(2)
testCreateObjectNormalOperation
{ "repo_name": "ravwojdyla/bigdata-interop", "path": "gcs/src/test/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageTest.java", "license": "apache-2.0", "size": 127749 }
[ "com.google.api.client.http.AbstractInputStreamContent", "com.google.api.services.storage.Storage", "com.google.api.services.storage.model.Objects", "com.google.api.services.storage.model.StorageObject", "java.io.IOException", "java.nio.channels.WritableByteChannel", "org.junit.Assert", "org.mockito.A...
import com.google.api.client.http.AbstractInputStreamContent; import com.google.api.services.storage.Storage; import com.google.api.services.storage.model.Objects; import com.google.api.services.storage.model.StorageObject; import java.io.IOException; import java.nio.channels.WritableByteChannel; import org.junit.Asser...
import com.google.api.client.http.*; import com.google.api.services.storage.*; import com.google.api.services.storage.model.*; import java.io.*; import java.nio.channels.*; import org.junit.*; import org.mockito.*;
[ "com.google.api", "java.io", "java.nio", "org.junit", "org.mockito" ]
com.google.api; java.io; java.nio; org.junit; org.mockito;
441,772
public Adapter createOneofFieldAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link protolipse.protobuf.OneofField <em>Oneof Field</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-...
Creates a new adapter for an object of class '<code>protolipse.protobuf.OneofField Oneof Field</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createOneofFieldAdapter
{ "repo_name": "dvdkruk/protolipse", "path": "protolipse/src-gen/protolipse/protobuf/util/ProtobufAdapterFactory.java", "license": "apache-2.0", "size": 32376 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,475,242
public void load() { if (nodeType.equals(PlateData.class)) { List<Long> objects = new ArrayList<Long>(); Iterator<DataObject> i = ids.iterator(); PixelsData pxd; while (i.hasNext()) { pxd = (PixelsData) i.next(); objects.add(pxd.getImage().getId()); } handle = dmView.loadPlateFromImage(c...
void function() { if (nodeType.equals(PlateData.class)) { List<Long> objects = new ArrayList<Long>(); Iterator<DataObject> i = ids.iterator(); PixelsData pxd; while (i.hasNext()) { pxd = (PixelsData) i.next(); objects.add(pxd.getImage().getId()); } handle = dmView.loadPlateFromImage(ctx, objects, this); } else if (node...
/** * Loads the images or plate. * @see DataImporterLoader#load() */
Loads the images or plate
load
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/ImportResultLoader.java", "license": "gpl-2.0", "size": 5444 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.openmicroscopy.shoola.agents.dataBrowser.ThumbnailProvider", "org.openmicroscopy.shoola.env.data.model.ThumbnailData", "org.openmicroscopy.shoola.env.data.views.HierarchyBrowsingView" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.openmicroscopy.shoola.agents.dataBrowser.ThumbnailProvider; import org.openmicroscopy.shoola.env.data.model.ThumbnailData; import org.openmicroscopy.shoola.env.data.views.HierarchyBrowsingView;
import java.util.*; import org.openmicroscopy.shoola.agents.*; import org.openmicroscopy.shoola.env.data.model.*; import org.openmicroscopy.shoola.env.data.views.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
1,500,124
@Test public void testRDNCompareToNC2NCS() throws LdapException { Rdn rdn1 = new Rdn( schemaManager, " sn = b " ); Rdn rdn2 = new Rdn( schemaManager, " cn = b + sn = d + l = f + gn = h " ); assertFalse( rdn1.equals( rdn2 ) ); }
void function() throws LdapException { Rdn rdn1 = new Rdn( schemaManager, STR ); Rdn rdn2 = new Rdn( schemaManager, STR ); assertFalse( rdn1.equals( rdn2 ) ); }
/** * Compares a single NC to a composite NC. * * @throws LdapException */
Compares a single NC to a composite NC
testRDNCompareToNC2NCS
{ "repo_name": "darranl/directory-shared", "path": "integ/src/test/java/org/apache/directory/api/ldap/model/name/SchemaAwareRdnTest.java", "license": "apache-2.0", "size": 35457 }
[ "org.apache.directory.api.ldap.model.exception.LdapException", "org.apache.directory.api.ldap.model.name.Rdn", "org.junit.Assert" ]
import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.name.Rdn; import org.junit.Assert;
import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.name.*; import org.junit.*;
[ "org.apache.directory", "org.junit" ]
org.apache.directory; org.junit;
779,269
public void downloadGcsFile(Context context, CronetEngine cronetEngine, String gcsBucket, String gcsPath, GcsDownloadListener downloadListener) { String gcsUrl = "gs://" + gcsBucket + "/" + gcsPath; try { getGcsDownloadUri(gcsUrl, task -> { ...
void function(Context context, CronetEngine cronetEngine, String gcsBucket, String gcsPath, GcsDownloadListener downloadListener) { String gcsUrl = "gs: try { getGcsDownloadUri(gcsUrl, task -> { if (task.isSuccessful()) { Uri downloadUri = task.getResult(); if (downloadUri != null) { UrlRequest request = buildGcsReques...
/** * Performs an authenticated request to a Google Cloud Storage bucket to download the object in * the specified path. Returns a pointer to the downloaded file in the local storage. * @param context The application context. * @param gcsBucket The Google Cloud Storage bucket that contains the objec...
Performs an authenticated request to a Google Cloud Storage bucket to download the object in the specified path. Returns a pointer to the downloaded file in the local storage
downloadGcsFile
{ "repo_name": "GoogleCloudPlatform/firebase-android-client", "path": "app/src/main/java/com/google/cloud/solutions/flexenv/common/GcsDownloadHelper.java", "license": "apache-2.0", "size": 9236 }
[ "android.content.Context", "android.net.Uri", "android.util.Log", "org.chromium.net.CronetEngine", "org.chromium.net.UrlRequest" ]
import android.content.Context; import android.net.Uri; import android.util.Log; import org.chromium.net.CronetEngine; import org.chromium.net.UrlRequest;
import android.content.*; import android.net.*; import android.util.*; import org.chromium.net.*;
[ "android.content", "android.net", "android.util", "org.chromium.net" ]
android.content; android.net; android.util; org.chromium.net;
2,338,564
public IgniteInternalFuture<?> rebuildIndexesFromHash(GridCacheContext cctx);
IgniteInternalFuture<?> function(GridCacheContext cctx);
/** * Rebuild indexes for the given cache if necessary. * * @param cctx Cache context. * @return Future completed when index rebuild finished. */
Rebuild indexes for the given cache if necessary
rebuildIndexesFromHash
{ "repo_name": "shroman/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java", "license": "apache-2.0", "size": 15927 }
[ "org.apache.ignite.internal.IgniteInternalFuture", "org.apache.ignite.internal.processors.cache.GridCacheContext" ]
import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*;
[ "org.apache.ignite" ]
org.apache.ignite;
848,886
protected synchronized void setNextNeighbor(GMSMembershipView<ID> newView, ID nextTo) { if (newView == null) { return; } if (nextTo == null) { nextTo = localAddress; } List<ID> allMembers = newView.getMembers(); if (allMembers.size() > 1 && suspectedMemberIds.size() >= allM...
synchronized void function(GMSMembershipView<ID> newView, ID nextTo) { if (newView == null) { return; } if (nextTo == null) { nextTo = localAddress; } List<ID> allMembers = newView.getMembers(); if (allMembers.size() > 1 && suspectedMemberIds.size() >= allMembers.size() - 1) { boolean nonSuspectFound = false; for (ID m...
/*** * This method sets next neighbour which it needs to watch in current view. * * if nextTo == null then it watches member next to it. * * It becomes null when we suspect current neighbour, during that time it watches member next to * suspect member. */
This method sets next neighbour which it needs to watch in current view. if nextTo == null then it watches member next to it. It becomes null when we suspect current neighbour, during that time it watches member next to suspect member
setNextNeighbor
{ "repo_name": "davinash/geode", "path": "geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitor.java", "license": "apache-2.0", "size": 51674 }
[ "java.util.List", "org.apache.geode.distributed.internal.membership.gms.GMSMembershipView" ]
import java.util.List; import org.apache.geode.distributed.internal.membership.gms.GMSMembershipView;
import java.util.*; import org.apache.geode.distributed.internal.membership.gms.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
1,785,567
public void decrement(ActionEvent e) { this.value -= 1; }
void function(ActionEvent e) { this.value -= 1; }
/** * Decrement the value of the counter. * * @param e */
Decrement the value of the counter
decrement
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.jsf.2.2_fat/test-applications/ViewScopedCDIBean.war/src/com/ibm/ws/jsf22/fat/viewscopedcdi/ViewScopedCDIBean.java", "license": "epl-1.0", "size": 2329 }
[ "javax.faces.event.ActionEvent" ]
import javax.faces.event.ActionEvent;
import javax.faces.event.*;
[ "javax.faces" ]
javax.faces;
2,686,697
public List<DiscoverInfo> findServicesDiscoverInfo(String feature, boolean stopOnFirst, boolean useCache) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { List<DiscoverInfo> serviceDiscoInfo = null; DomainBareJid serviceName = connecti...
List<DiscoverInfo> function(String feature, boolean stopOnFirst, boolean useCache) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { List<DiscoverInfo> serviceDiscoInfo = null; DomainBareJid serviceName = connection().getXMPPServiceDomain(); if (useCache) { serviceDiscoInfo =...
/** * Find all services under the users service that provide a given feature. * * @param feature the feature to search for * @param stopOnFirst if true, stop searching after the first service was found * @param useCache if true, query a cache first to avoid network I/O * @return a possibl...
Find all services under the users service that provide a given feature
findServicesDiscoverInfo
{ "repo_name": "esl/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java", "license": "apache-2.0", "size": 37216 }
[ "java.util.LinkedList", "java.util.List", "java.util.logging.Level", "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPException", "org.jivesoftware.smackx.disco.packet.DiscoverInfo", "org.jivesoftware.smackx.disco.packet.DiscoverItems", "org.jxmpp.jid.DomainBareJid" ]
import java.util.LinkedList; import java.util.List; import java.util.logging.Level; import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.disco.packet.DiscoverInfo; import org.jivesoftware.smackx.disco.packet.DiscoverItems; import org.jxmpp.jid.DomainB...
import java.util.*; import java.util.logging.*; import org.jivesoftware.smack.*; import org.jivesoftware.smackx.disco.packet.*; import org.jxmpp.jid.*;
[ "java.util", "org.jivesoftware.smack", "org.jivesoftware.smackx", "org.jxmpp.jid" ]
java.util; org.jivesoftware.smack; org.jivesoftware.smackx; org.jxmpp.jid;
2,000,217
// [TARGET listTableData(String, String, TableDataListOption...)] // [VARIABLE "my_dataset_name"] // [VARIABLE "my_table_name"] public TableResult listTableData(String datasetName, String tableName) { // [START listTableData] // This example reads the result 100 rows per RPC call. If there's no need to ...
TableResult function(String datasetName, String tableName) { TableResult tableData = bigquery.listTableData(datasetName, tableName, TableDataListOption.pageSize(100)); for (FieldValueList row : tableData.iterateAll()) { } return tableData; }
/** * Example of listing table rows, specifying the page size. */
Example of listing table rows, specifying the page size
listTableData
{ "repo_name": "mbrukman/gcloud-java", "path": "google-cloud-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/BigQuerySnippets.java", "license": "apache-2.0", "size": 21428 }
[ "com.google.cloud.bigquery.BigQuery", "com.google.cloud.bigquery.FieldValueList", "com.google.cloud.bigquery.TableResult" ]
import com.google.cloud.bigquery.BigQuery; import com.google.cloud.bigquery.FieldValueList; import com.google.cloud.bigquery.TableResult;
import com.google.cloud.bigquery.*;
[ "com.google.cloud" ]
com.google.cloud;
2,204,349
public void setOutputStream(OutputStream output) { m_handler.setOutputStream(output); }
void function(OutputStream output) { m_handler.setOutputStream(output); }
/** * Sets the output stream to write to * @param output the OutputStream to write to * @see Serializer#setOutputStream(OutputStream) */
Sets the output stream to write to
setOutputStream
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java", "license": "apache-2.0", "size": 38953 }
[ "java.io.OutputStream" ]
import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
923,963
@Bean public CompositeSessionAuthenticationStrategy sessionAuth() { final var registry = sessionRegistry(); final var sas = new ConcurrentSessionControlAuthenticationStrategy(registry); sas.setMaximumSessions(maxSession); sas.setExceptionIfMaximumExceeded(false); final var sfps = new SessionFixationProtec...
CompositeSessionAuthenticationStrategy function() { final var registry = sessionRegistry(); final var sas = new ConcurrentSessionControlAuthenticationStrategy(registry); sas.setMaximumSessions(maxSession); sas.setExceptionIfMaximumExceeded(false); final var sfps = new SessionFixationProtectionStrategy(); final var rsas...
/** * Maximum ONE concurrent session. Previous user is logged out. * * @return Concurrency configuration. */
Maximum ONE concurrent session. Previous user is logged out
sessionAuth
{ "repo_name": "ligoj/ligoj", "path": "app-ui/src/main/java/org/ligoj/boot/web/SecurityConfiguration.java", "license": "mit", "size": 10952 }
[ "java.util.Arrays", "org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy", "org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy", "org.springframework.security.web.authentication.session.RegisterSessionAuthentication...
import java.util.Arrays; import org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy; import org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy; import org.springframework.security.web.authentication.session.RegisterSessionAut...
import java.util.*; import org.springframework.security.web.authentication.session.*;
[ "java.util", "org.springframework.security" ]
java.util; org.springframework.security;
2,339,859
public List<WebElement> findElements(final By locator) { return getWebDriver().findElements(locator); }
List<WebElement> function(final By locator) { return getWebDriver().findElements(locator); }
/** * Find elements. * * @param locator * the locator * @return the list */
Find elements
findElements
{ "repo_name": "openMF/mifosx-e2e-testing", "path": "MifosTestAutomation/src/test/java/com/mifos/pages/MifosWebPage.java", "license": "mpl-2.0", "size": 59471 }
[ "java.util.List", "org.openqa.selenium.By", "org.openqa.selenium.WebElement" ]
import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebElement;
import java.util.*; import org.openqa.selenium.*;
[ "java.util", "org.openqa.selenium" ]
java.util; org.openqa.selenium;
1,136,930
@ApiModelProperty(required = true, value = "The user") public SimpleUserResource getUser() { return user; }
@ApiModelProperty(required = true, value = STR) SimpleUserResource function() { return user; }
/** * The user * @return user **/
The user
getUser
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/main/java/com/knetikcloud/model/PollResponseResource.java", "license": "apache-2.0", "size": 4532 }
[ "com.knetikcloud.model.SimpleUserResource", "io.swagger.annotations.ApiModelProperty" ]
import com.knetikcloud.model.SimpleUserResource; import io.swagger.annotations.ApiModelProperty;
import com.knetikcloud.model.*; import io.swagger.annotations.*;
[ "com.knetikcloud.model", "io.swagger.annotations" ]
com.knetikcloud.model; io.swagger.annotations;
2,130,336
public Category getCategory(int id){ if(id >= 0 && id < Category.values().length) return Category.values()[id]; else return null; } /** * Get all Categories wrapped in a {@link JsonArray}
Category function(int id){ if(id >= 0 && id < Category.values().length) return Category.values()[id]; else return null; } /** * Get all Categories wrapped in a {@link JsonArray}
/** * Returns a category object, given a valid id * @param id * @return */
Returns a category object, given a valid id
getCategory
{ "repo_name": "samarti/wemeep-meep-service", "path": "src/main/java/controllers/CategoriesController.java", "license": "mit", "size": 998 }
[ "com.google.gson.JsonArray" ]
import com.google.gson.JsonArray;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
612,639
@Override @Deprecated public URI getUri( ) { return ServiceUris.remote( this ); }
URI function( ) { return ServiceUris.remote( this ); }
/** * Use the facade instead. * * @see ServiceUris#remote(ServiceConfiguration, String...) */
Use the facade instead
getUri
{ "repo_name": "sosilent/euca", "path": "clc/modules/msgs/src/main/java/com/eucalyptus/config/ComponentConfiguration.java", "license": "gpl-3.0", "size": 11948 }
[ "com.eucalyptus.component.ServiceUris" ]
import com.eucalyptus.component.ServiceUris;
import com.eucalyptus.component.*;
[ "com.eucalyptus.component" ]
com.eucalyptus.component;
897,934
EAttribute getCollaboration_Name();
EAttribute getCollaboration_Name();
/** * Returns the meta object for the attribute '{@link org.eclipse.bpmn2.Collaboration#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see org.eclipse.bpmn2.Collaboration#getName() * @see #getCollab...
Returns the meta object for the attribute '<code>org.eclipse.bpmn2.Collaboration#getName Name</code>'.
getCollaboration_Name
{ "repo_name": "lqjack/fixflow", "path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 1014933 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,408,012
public void write(byte[] buffer) { try { mmOutStream.write(buffer); // Share the sent message back to the UI Activity mHandler.obtainMessage(Constants.MESSAGE_WRITE, -1, -1, buffer) .sendToTarget(); } catch (IOExcep...
void function(byte[] buffer) { try { mmOutStream.write(buffer); mHandler.obtainMessage(Constants.MESSAGE_WRITE, -1, -1, buffer) .sendToTarget(); } catch (IOException e) { Log.e(TAG, STR, e); } }
/** * Write to the connected OutStream. * * @param buffer The bytes to write */
Write to the connected OutStream
write
{ "repo_name": "AccelNA/azure-guidance", "path": "EventHub/AndroidApps/EventHubSender/Application/src/main/java/com/example/android/IotReceiver/BluetoothCommunicationService.java", "license": "mit", "size": 17745 }
[ "com.example.android.common.logger.Log", "java.io.IOException" ]
import com.example.android.common.logger.Log; import java.io.IOException;
import com.example.android.common.logger.*; import java.io.*;
[ "com.example.android", "java.io" ]
com.example.android; java.io;
1,004,203
Text createStringNode (Page page, int start, int end) throws ParserException;
Text createStringNode (Page page, int start, int end) throws ParserException;
/** * Create a new text node. * @param page The page the node is on. * @param start The beginning position of the string. * @param end The ending positiong of the string. * @throws ParserException If there is a problem encountered * when creating the node. * @return A text node compri...
Create a new text node
createStringNode
{ "repo_name": "patrickfav/tuwien", "path": "master/swt workspace/HTMLParser/src/org/htmlparser/NodeFactory.java", "license": "apache-2.0", "size": 3843 }
[ "org.htmlparser.lexer.Page", "org.htmlparser.util.ParserException" ]
import org.htmlparser.lexer.Page; import org.htmlparser.util.ParserException;
import org.htmlparser.lexer.*; import org.htmlparser.util.*;
[ "org.htmlparser.lexer", "org.htmlparser.util" ]
org.htmlparser.lexer; org.htmlparser.util;
839,634
public final VersionControlMgr getVersionManager( ) { return versionMgr; }
final VersionControlMgr function( ) { return versionMgr; }
/** * Returns the version manager for the API compatibility. * * @return the version manager */
Returns the version manager for the API compatibility
getVersionManager
{ "repo_name": "sguan-actuate/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/ModuleImpl.java", "license": "epl-1.0", "size": 72136 }
[ "org.eclipse.birt.report.model.util.VersionControlMgr" ]
import org.eclipse.birt.report.model.util.VersionControlMgr;
import org.eclipse.birt.report.model.util.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
650,723
public IAttributeMerger getAttributeMerger() { val name = this.name().toUpperCase(); switch (name.toUpperCase()) { case "REPLACE": return new ReplacingAttributeAdder(); case "ADD": return new NoncollidingAttributeAdd...
IAttributeMerger function() { val name = this.name().toUpperCase(); switch (name.toUpperCase()) { case STR: return new ReplacingAttributeAdder(); case "ADD": return new NoncollidingAttributeAdder(); case STR: return new MultivaluedAttributeMerger(); default: return null; } } }
/** * Get attribute merger. * * @return the attribute merger */
Get attribute merger
getAttributeMerger
{ "repo_name": "frett/cas", "path": "core/cas-server-core-authentication-attributes/src/main/java/org/apereo/cas/authentication/principal/cache/AbstractPrincipalAttributesRepository.java", "license": "apache-2.0", "size": 10179 }
[ "org.apereo.services.persondir.support.merger.IAttributeMerger", "org.apereo.services.persondir.support.merger.MultivaluedAttributeMerger", "org.apereo.services.persondir.support.merger.NoncollidingAttributeAdder", "org.apereo.services.persondir.support.merger.ReplacingAttributeAdder" ]
import org.apereo.services.persondir.support.merger.IAttributeMerger; import org.apereo.services.persondir.support.merger.MultivaluedAttributeMerger; import org.apereo.services.persondir.support.merger.NoncollidingAttributeAdder; import org.apereo.services.persondir.support.merger.ReplacingAttributeAdder;
import org.apereo.services.persondir.support.merger.*;
[ "org.apereo.services" ]
org.apereo.services;
566,924
public PactDslRequestWithoutPath query(String query) { this.query = PactReader.queryStringToMap(query, false); return this; }
PactDslRequestWithoutPath function(String query) { this.query = PactReader.queryStringToMap(query, false); return this; }
/** * The query string for the request * * @param query query string */
The query string for the request
query
{ "repo_name": "Fitzoh/pact-jvm", "path": "pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithoutPath.java", "license": "apache-2.0", "size": 9316 }
[ "au.com.dius.pact.model.PactReader" ]
import au.com.dius.pact.model.PactReader;
import au.com.dius.pact.model.*;
[ "au.com.dius" ]
au.com.dius;
702,310
@Deployment(testable = false) public static WebArchive deployment() { return Deployments.kitchensink(); } @FindByJQuery("[id*='newMemberPanel'] [id*='name']") WebElement nameField; @FindByJQuery("[id*='newMemberPanel'] [id*='email']") WebElement emailField; @Fin...
@Deployment(testable = false) static WebArchive function() { return Deployments.kitchensink(); } @FindByJQuery(STR) WebElement nameField; @FindByJQuery(STR) WebElement emailField; @FindByJQuery(STR) WebElement phoneFiled; @FindByJQuery(STR) WebElement registerButton; @FindByJQuery(STR) WebElement tableMembers; @FindByJ...
/** * Creates deployment which is sent to the container upon test's start. * * @return war file which is deployed while testing, the whole application in our case */
Creates deployment which is sent to the container upon test's start
deployment
{ "repo_name": "jboss-developer/jboss-wfk-quickstarts", "path": "kitchensink-rf/functional-tests/src/test/java/org/jboss/as/quickstarts/kitchensink/test/KitchensinkRichFacesTest.java", "license": "apache-2.0", "size": 9508 }
[ "java.util.List", "org.jboss.arquillian.container.test.api.Deployment", "org.jboss.arquillian.graphene.findby.FindByJQuery", "org.jboss.shrinkwrap.api.spec.WebArchive", "org.openqa.selenium.WebElement" ]
import java.util.List; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.graphene.findby.FindByJQuery; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.openqa.selenium.WebElement;
import java.util.*; import org.jboss.arquillian.container.test.api.*; import org.jboss.arquillian.graphene.findby.*; import org.jboss.shrinkwrap.api.spec.*; import org.openqa.selenium.*;
[ "java.util", "org.jboss.arquillian", "org.jboss.shrinkwrap", "org.openqa.selenium" ]
java.util; org.jboss.arquillian; org.jboss.shrinkwrap; org.openqa.selenium;
219,510
public void unbindService(ServiceConnection connection);
void function(ServiceConnection connection);
/** * Called by the BeaconManager to unbind your BeaconConsumer to the BeaconService. This method is implemented by Service or Activity, and * You generally should not override it. * @return the application context of your service or activity */
Called by the BeaconManager to unbind your BeaconConsumer to the BeaconService. This method is implemented by Service or Activity, and You generally should not override it
unbindService
{ "repo_name": "gelldur/android-beacon-library", "path": "src/main/java/org/altbeacon/beacon/BeaconConsumer.java", "license": "apache-2.0", "size": 4259 }
[ "android.content.ServiceConnection" ]
import android.content.ServiceConnection;
import android.content.*;
[ "android.content" ]
android.content;
477,705
Set<IScheduledTask> build(int count) { ImmutableSet.Builder<IScheduledTask> tasks = ImmutableSet.builder(); for (int i = 0; i < count; i++) { String taskId = jobKey.getRole() + "-" + jobKey.getEnvironment() + "-" + i + "-" + (uuidStart + i); ScheduledTask builder = TaskTest...
Set<IScheduledTask> build(int count) { ImmutableSet.Builder<IScheduledTask> tasks = ImmutableSet.builder(); for (int i = 0; i < count; i++) { String taskId = jobKey.getRole() + "-" + jobKey.getEnvironment() + "-" + i + "-" + (uuidStart + i); ScheduledTask builder = TaskTestUtil.makeTask(taskId, IJobKey.build(jobKey)) ....
/** * Builds a set of {@link IScheduledTask} for the current configuration. * * @param count Number of tasks to build. * @return Set of tasks. */
Builds a set of <code>IScheduledTask</code> for the current configuration
build
{ "repo_name": "kidaa/aurora", "path": "src/jmh/java/org/apache/aurora/benchmark/Tasks.java", "license": "apache-2.0", "size": 4662 }
[ "com.google.common.collect.ImmutableSet", "com.google.common.collect.Lists", "com.twitter.common.quantity.Data", "java.util.Set", "org.apache.aurora.gen.ScheduleStatus", "org.apache.aurora.gen.ScheduledTask", "org.apache.aurora.gen.TaskEvent", "org.apache.aurora.scheduler.base.TaskTestUtil", "org.ap...
import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.twitter.common.quantity.Data; import java.util.Set; import org.apache.aurora.gen.ScheduleStatus; import org.apache.aurora.gen.ScheduledTask; import org.apache.aurora.gen.TaskEvent; import org.apache.aurora.scheduler.base.T...
import com.google.common.collect.*; import com.twitter.common.quantity.*; import java.util.*; import org.apache.aurora.gen.*; import org.apache.aurora.scheduler.base.*; import org.apache.aurora.scheduler.storage.entities.*;
[ "com.google.common", "com.twitter.common", "java.util", "org.apache.aurora" ]
com.google.common; com.twitter.common; java.util; org.apache.aurora;
984,032
@DapAPI public synchronized <T extends AnnotationContents> AnnotationReference addAnnotation(int begin, int end, T annotationContents) { if ((begin<0)||(end<0)||(end<begin)) {throw new DapException("Illegal begin / end value(s): begin="+begin+". end="+end+".");} if (end>text.length()) {throw new DapException("...
synchronized <T extends AnnotationContents> AnnotationReference function(int begin, int end, T annotationContents) { if ((begin<0) (end<0) (end<begin)) {throw new DapException(STR+begin+STR+end+".");} if (end>text.length()) {throw new DapException(STR+end+STR+text.length()+".");} if (null==annotationContents) {throw ne...
/** * Add an annotation to the document. Annotate the text-span between the given begin and end indexes, and attach the given * {@link AnnotationContents} to this newly-created annotation. * @param begin the character-index specifying where the new annotation begins. * @param end the character-index specifying ...
Add an annotation to the document. Annotate the text-span between the given begin and end indexes, and attach the given <code>AnnotationContents</code> to this newly-created annotation
addAnnotation
{ "repo_name": "document-analysis/dap", "path": "src/main/java/org/dap/data_structures/Document.java", "license": "apache-2.0", "size": 10024 }
[ "org.dap.common.DapException" ]
import org.dap.common.DapException;
import org.dap.common.*;
[ "org.dap.common" ]
org.dap.common;
722,558
public void setDatatypeService(DatatypeService datatypeService) { setService(DatatypeService.class, datatypeService); }
void function(DatatypeService datatypeService) { setService(DatatypeService.class, datatypeService); }
/** * Sets the datatype service * * @param datatypeService the datatypeService to set * @since 1.9 */
Sets the datatype service
setDatatypeService
{ "repo_name": "kabariyamilind/openMRSDEV", "path": "api/src/main/java/org/openmrs/api/context/ServiceContext.java", "license": "mpl-2.0", "size": 30858 }
[ "org.openmrs.api.DatatypeService" ]
import org.openmrs.api.DatatypeService;
import org.openmrs.api.*;
[ "org.openmrs.api" ]
org.openmrs.api;
2,486,816
private LocalMigrationResource createScriptMigration(Resource resource, String filename) { int pos = filename.lastIndexOf(".sql"); String mainName = filename.substring(0, pos); MigrationVersion migrationVersion = MigrationVersion.parse(mainName); return new LocalDdlMigrationResource(migrationVersion, ...
LocalMigrationResource function(Resource resource, String filename) { int pos = filename.lastIndexOf(".sql"); String mainName = filename.substring(0, pos); MigrationVersion migrationVersion = MigrationVersion.parse(mainName); return new LocalDdlMigrationResource(migrationVersion, resource.getLocation(), resource); }
/** * Create a script based migration. */
Create a script based migration
createScriptMigration
{ "repo_name": "ebean-orm/ebean-dbmigration", "path": "ebean-migration/src/main/java/io/ebean/migration/runner/LocalMigrationResources.java", "license": "apache-2.0", "size": 3888 }
[ "io.avaje.classpath.scanner.Resource", "io.ebean.migration.MigrationVersion" ]
import io.avaje.classpath.scanner.Resource; import io.ebean.migration.MigrationVersion;
import io.avaje.classpath.scanner.*; import io.ebean.migration.*;
[ "io.avaje.classpath", "io.ebean.migration" ]
io.avaje.classpath; io.ebean.migration;
552,294
private void downloadFileTypeSettings(File remoteFolder) throws SharedConfigurationException { publishTask("Downloading FileType module configuration"); copyToLocalFolder(USER_DEFINED_TYPE_DEFINITIONS_FILE, moduleDirPath, remoteFolder, true); copyToLocalFolder(USER_DEFINED_TYPE_DEFINITIONS_F...
void function(File remoteFolder) throws SharedConfigurationException { publishTask(STR); copyToLocalFolder(USER_DEFINED_TYPE_DEFINITIONS_FILE, moduleDirPath, remoteFolder, true); copyToLocalFolder(USER_DEFINED_TYPE_DEFINITIONS_FILE_LEGACY, moduleDirPath, remoteFolder, true); }
/** * Download settings file containing file type settings. * * @param remoteFolder Shared settings folder * * @throws SharedConfigurationException */
Download settings file containing file type settings
downloadFileTypeSettings
{ "repo_name": "dgrove727/autopsy", "path": "Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java", "license": "apache-2.0", "size": 60350 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,291,196
ServiceCall get202None204NoneDefaultNone202InvalidAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
ServiceCall get202None204NoneDefaultNone202InvalidAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
/** * Send a 202 response with an unexpected payload {'property': 'value'}. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */
Send a 202 response with an unexpected payload {'property': 'value'}
get202None204NoneDefaultNone202InvalidAsync
{ "repo_name": "brodyberg/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/http/MultipleResponsesOperations.java", "license": "mit", "size": 29440 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,102,770
private JSType getJSType(Node n) { JSType jsType = n.getJSType(); if (jsType == null) { // TODO(nicksantos): This branch indicates a compiler bug, not worthy of // halting the compilation but we should log this and analyze to track // down why it happens. This is not critical and will be res...
JSType function(Node n) { JSType jsType = n.getJSType(); if (jsType == null) { return getNativeType(UNKNOWN_TYPE); } else { return jsType; } }
/** * This method gets the JSType from the Node argument and verifies that it is * present. */
This method gets the JSType from the Node argument and verifies that it is present
getJSType
{ "repo_name": "johan/closure-compiler", "path": "src/com/google/javascript/jscomp/TypeInference.java", "license": "apache-2.0", "size": 45384 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.JSType" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType;
import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
898,621
public List<AlertDefinition> getServerDefinitions() { if (null != m_serverDefinitions) { return m_serverDefinitions; } m_serverDefinitions = getDefinitions(Components.AMBARI_SERVER); return m_serverDefinitions; }
List<AlertDefinition> function() { if (null != m_serverDefinitions) { return m_serverDefinitions; } m_serverDefinitions = getDefinitions(Components.AMBARI_SERVER); return m_serverDefinitions; }
/** * Gets all of the {@link AlertDefinition}s that exist on the path for * {@link Components#AMBARI_SERVER}. * * @return the alerts with {@link Components#AMBARI_SERVER} as the component * and {@code AMBARI} as the service. */
Gets all of the <code>AlertDefinition</code>s that exist on the path for <code>Components#AMBARI_SERVER</code>
getServerDefinitions
{ "repo_name": "zouzhberk/ambaridemo", "path": "demo-server/src/main/java/org/apache/ambari/server/metadata/AmbariServiceAlertDefinitions.java", "license": "apache-2.0", "size": 4289 }
[ "java.util.List", "org.apache.ambari.server.controller.RootServiceResponseFactory", "org.apache.ambari.server.state.alert.AlertDefinition" ]
import java.util.List; import org.apache.ambari.server.controller.RootServiceResponseFactory; import org.apache.ambari.server.state.alert.AlertDefinition;
import java.util.*; import org.apache.ambari.server.controller.*; import org.apache.ambari.server.state.alert.*;
[ "java.util", "org.apache.ambari" ]
java.util; org.apache.ambari;
242,481
static long getInitialDelay(Configuration conf) { return conf.getLong(FS_UTILIZATION_CHORE_DELAY_KEY, FS_UTILIZATION_CHORE_DELAY_DEFAULT); }
static long getInitialDelay(Configuration conf) { return conf.getLong(FS_UTILIZATION_CHORE_DELAY_KEY, FS_UTILIZATION_CHORE_DELAY_DEFAULT); }
/** * Extracts the initial delay for the chore from the configuration. * * @param conf The configuration object. * @return The configured chore initial delay or the default value. */
Extracts the initial delay for the chore from the configuration
getInitialDelay
{ "repo_name": "JingchengDu/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/FileSystemUtilizationChore.java", "license": "apache-2.0", "size": 9051 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,779,444
@Nullable public UpdateEnvironment getStatusEnvironment() { return null; }
UpdateEnvironment function() { return null; }
/** * Returns the interface for performing "check status" operations (operations which show the differences between * the local working copy state and the latest server state). * * @return the status interface, or null if the check status operation is not supported or required by the VCS. */
Returns the interface for performing "check status" operations (operations which show the differences between the local working copy state and the latest server state)
getStatusEnvironment
{ "repo_name": "android-ia/platform_tools_idea", "path": "platform/vcs-api/src/com/intellij/openapi/vcs/AbstractVcs.java", "license": "apache-2.0", "size": 19956 }
[ "com.intellij.openapi.vcs.update.UpdateEnvironment" ]
import com.intellij.openapi.vcs.update.UpdateEnvironment;
import com.intellij.openapi.vcs.update.*;
[ "com.intellij.openapi" ]
com.intellij.openapi;
2,685,406
public Map<String, Boolean> getBooleanData() { return booleanData; }
Map<String, Boolean> function() { return booleanData; }
/** * Map containing boolean data for the view. * * @return map where key is property name and value is the property value */
Map containing boolean data for the view
getBooleanData
{ "repo_name": "geothomasp/kualico-rice-kc", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/mock/DynaForm.java", "license": "apache-2.0", "size": 2970 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,418,683
public void setCodec(Codec codec) { this.codec = codec; }
void function(Codec codec) { this.codec = codec; }
/** * Redis data codec applied to cache entries. * Default is MarshallingCodec codec * * @see Codec * @see org.redisson.codec.MarshallingCodec * * @param codec - data codec * @return config */
Redis data codec applied to cache entries. Default is MarshallingCodec codec
setCodec
{ "repo_name": "redisson/redisson", "path": "redisson-micronaut/redisson-micronaut-20/src/main/java/org/redisson/micronaut/cache/BaseCacheConfiguration.java", "license": "apache-2.0", "size": 4525 }
[ "org.redisson.client.codec.Codec" ]
import org.redisson.client.codec.Codec;
import org.redisson.client.codec.*;
[ "org.redisson.client" ]
org.redisson.client;
2,525,925
// public void doList ( RunData data) { logger.debug(this + ".doList()"); // get the state object SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); state.setAttribute (STATE_MODE, MODE_LIST); } // doList
void function ( RunData data) { logger.debug(this + STR); SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); state.setAttribute (STATE_MODE, MODE_LIST); }
/** * Expand all the collection resources and put in EXPANDED_COLLECTIONS attribute. */
Expand all the collection resources and put in EXPANDED_COLLECTIONS attribute
doList
{ "repo_name": "buckett/sakai-gitflow", "path": "content/content-tool/tool/src/java/org/sakaiproject/content/tool/ResourcesAction.java", "license": "apache-2.0", "size": 334662 }
[ "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
org.sakaiproject.cheftool; org.sakaiproject.event;
2,585,572
@Override public int compareTo(Object o) { Stats os = (Stats) o; if (nolangCount < os.nolangCount) return -1; if (nolangCount > os.nolangCount) return 1; // if (nolangCount == os.nolangCount) if (differences < os.differences) return -1...
int function(Object o) { Stats os = (Stats) o; if (nolangCount < os.nolangCount) return -1; if (nolangCount > os.nolangCount) return 1; if (differences < os.differences) return -1; if (differences > os.differences) return 1; if (regExpCount < os.regExpCount) return -1; if (regExpCount > os.regExpCount) return 1; if (se...
/** * Less language changes is better. If language change counts are * equal, less regexp fragments is better. If regexp counts are equal, * less seperators is better. Best object is the smallest one according * to this comparator. * @param o the object to be compared. ...
Less language changes is better. If language change counts are equal, less regexp fragments is better. If regexp counts are equal, less seperators is better. Best object is the smallest one according to this comparator
compareTo
{ "repo_name": "lauma/LVSegmenter", "path": "src/main/java/lv/ailab/segmenter/datastruct/LanguageSequence.java", "license": "gpl-3.0", "size": 8210 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
48,751
public Component getAnchor() { return anchor; }
Component function() { return anchor; }
/** * Gets any anchor component. * * @return Any anchor component to jump to, might be null */
Gets any anchor component
getAnchor
{ "repo_name": "mosoft521/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/markup/html/link/Link.java", "license": "apache-2.0", "size": 12500 }
[ "org.apache.wicket.Component" ]
import org.apache.wicket.Component;
import org.apache.wicket.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,797,938
@ApiModelProperty(example = "null", value = "") public String getValidateMessage() { return validateMessage; }
@ApiModelProperty(example = "null", value = "") String function() { return validateMessage; }
/** * Get validateMessage * @return validateMessage **/
Get validateMessage
getValidateMessage
{ "repo_name": "jtheulier/bouquet-java-sdk", "path": "src/main/java/com/squid/kraken/v4/model/ExpressionSuggestion.java", "license": "apache-2.0", "size": 4614 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,685,068
public Map<String, List<String>> getAuthenticationFailureHeaders() { return Collections.singletonMap( "WWW-Authenticate", Collections.singletonList("Basic realm=\"" + XPackField.SECURITY + "\" charset=\"UTF-8\"") ); }
Map<String, List<String>> function() { return Collections.singletonMap( STR, Collections.singletonList(STRSTR\STRUTF-8\"") ); }
/** * Each realm can define response headers to be sent on failure. * <p> * By default it adds 'WWW-Authenticate' header with auth scheme 'Basic'. * * @return Map of authentication failure response headers. */
Each realm can define response headers to be sent on failure. By default it adds 'WWW-Authenticate' header with auth scheme 'Basic'
getAuthenticationFailureHeaders
{ "repo_name": "GlenRSmith/elasticsearch", "path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/Realm.java", "license": "apache-2.0", "size": 6701 }
[ "java.util.Collections", "java.util.List", "java.util.Map" ]
import java.util.Collections; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,128,757
public RhnSet lookup(User u) { return RhnSetManager.findByLabel(u.getId(), label, cleanup); }
RhnSet function(User u) { return RhnSetManager.findByLabel(u.getId(), label, cleanup); }
/** * Look the set for user <code>u</code> up from the database. If the user * has no entries in the set, return <code>null</code> * @param u the user for whom to look the set up * @return the set or <code>null</code> if the user has nothing in the set */
Look the set for user <code>u</code> up from the database. If the user has no entries in the set, return <code>null</code>
lookup
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/rhnset/RhnSetDecl.java", "license": "gpl-2.0", "size": 22046 }
[ "com.redhat.rhn.domain.rhnset.RhnSet", "com.redhat.rhn.domain.user.User" ]
import com.redhat.rhn.domain.rhnset.RhnSet; import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.domain.rhnset.*; import com.redhat.rhn.domain.user.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
1,111,685
public Iterator<GraphNode> iterator() { return this.mGraphImplementor.iterator(); }
Iterator<GraphNode> function() { return this.mGraphImplementor.iterator(); }
/** * Returns an iterator that traverses through the graph using a graph traversal algorithm. * * @return Iterator through the nodes of the graph. */
Returns an iterator that traverses through the graph using a graph traversal algorithm
iterator
{ "repo_name": "pegasus-isi/pegasus", "path": "src/edu/isi/pegasus/planner/classes/ADag.java", "license": "apache-2.0", "size": 34906 }
[ "edu.isi.pegasus.planner.partitioner.graph.GraphNode", "java.util.Iterator" ]
import edu.isi.pegasus.planner.partitioner.graph.GraphNode; import java.util.Iterator;
import edu.isi.pegasus.planner.partitioner.graph.*; import java.util.*;
[ "edu.isi.pegasus", "java.util" ]
edu.isi.pegasus; java.util;
1,042,795