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
ByteBuffer getFirstKeyInBlock(ByteBuffer block);
ByteBuffer getFirstKeyInBlock(ByteBuffer block);
/** * Return first key in block. Useful for indexing. Typically does not make * a deep copy but returns a buffer wrapping a segment of the actual block's * byte array. This is because the first key in block is usually stored * unencoded. * @param block encoded block we want index, the position will not c...
Return first key in block. Useful for indexing. Typically does not make a deep copy but returns a buffer wrapping a segment of the actual block's byte array. This is because the first key in block is usually stored unencoded
getFirstKeyInBlock
{ "repo_name": "intel-hadoop/hbase-rhino", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/DataBlockEncoder.java", "license": "apache-2.0", "size": 8080 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,881,681
public boolean isScreenBright() { return getWindowFlagValue(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, mScreenBright); }
boolean function() { return getWindowFlagValue(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, mScreenBright); }
/** * Returns whether or not this dream keeps the screen bright while dreaming. * Defaults to false, allowing the screen to dim if necessary. * * @see #setScreenBright(boolean) */
Returns whether or not this dream keeps the screen bright while dreaming. Defaults to false, allowing the screen to dim if necessary
isScreenBright
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/service/dreams/DreamService.java", "license": "gpl-3.0", "size": 40035 }
[ "android.view.WindowManager" ]
import android.view.WindowManager;
import android.view.*;
[ "android.view" ]
android.view;
1,265,563
@VisibleForTesting public int[] getRuleIds(final Rule rule) { if (this.isClassLM) { // map words to class ids return getClasses(rule); } // Regular LM: use rule word ids return rule.getEnglish(); }
int[] function(final Rule rule) { if (this.isClassLM) { return getClasses(rule); } return rule.getEnglish(); }
/** * Retrieve ids from rule. These are either simply the rule ids on the target * side, their corresponding class map ids, or the configured source-side * annotation tags. * @param rule an input from from which to retrieve ids * @return an array if int's representing the id's from the input Rule */
Retrieve ids from rule. These are either simply the rule ids on the target side, their corresponding class map ids, or the configured source-side annotation tags
getRuleIds
{ "repo_name": "fhieber/incubator-joshua", "path": "src/main/java/org/apache/joshua/decoder/ff/lm/LanguageModelFF.java", "license": "apache-2.0", "size": 18765 }
[ "org.apache.joshua.decoder.ff.tm.Rule" ]
import org.apache.joshua.decoder.ff.tm.Rule;
import org.apache.joshua.decoder.ff.tm.*;
[ "org.apache.joshua" ]
org.apache.joshua;
2,566,474
public RectangleAnchor getTextAnchor() { return this.textAnchor; }
RectangleAnchor function() { return this.textAnchor; }
/** * Returns the text anchor (never <code>null</code>). * * @return The text anchor. * * @since JFreeChart 1.0.13 */
Returns the text anchor (never <code>null</code>)
getTextAnchor
{ "repo_name": "djun100/afreechart", "path": "src/org/afree/chart/block/LabelBlock.java", "license": "lgpl-3.0", "size": 12082 }
[ "org.afree.ui.RectangleAnchor" ]
import org.afree.ui.RectangleAnchor;
import org.afree.ui.*;
[ "org.afree.ui" ]
org.afree.ui;
2,848,109
public Style parseStyle(Node n) { if (dom == null) { try { dom = newDocumentBuilder(false).newDocument(); } catch (ParserConfigurationException pce) { throw new RuntimeException(pce); } } Style style = factory.createStyle()...
Style function(Node n) { if (dom == null) { try { dom = newDocumentBuilder(false).newDocument(); } catch (ParserConfigurationException pce) { throw new RuntimeException(pce); } } Style style = factory.createStyle(); NodeList children = n.getChildNodes(); final int length = children.getLength(); if (LOGGER.isLoggable(Le...
/** * build a style for the Node provided * * @param n * the node which contains the style to be parsed. * * @return the Style constructed. * * @throws RuntimeException * if an error occurs setting up the parser */
build a style for the Node provided
parseStyle
{ "repo_name": "FUNCATE/TerraMobile", "path": "sldparser/src/main/geotools/styling/SLDParser.java", "license": "apache-2.0", "size": 96047 }
[ "java.util.logging.Level", "javax.xml.parsers.ParserConfigurationException", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import java.util.logging.Level; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import java.util.logging.*; import javax.xml.parsers.*; import org.w3c.dom.*;
[ "java.util", "javax.xml", "org.w3c.dom" ]
java.util; javax.xml; org.w3c.dom;
916,141
public String getSort(IStrategoAppl rhs) { for (IStrategoTerm current = rhs; current.getSubtermCount() > 0 && isTermAppl(current); current = termAt(current, 0)) { IStrategoAppl currentAppl = (IStrategoAppl) current; String sort = tryGetSort(currentAppl); if (sort != null) return sort; } ...
String function(IStrategoAppl rhs) { for (IStrategoTerm current = rhs; current.getSubtermCount() > 0 && isTermAppl(current); current = termAt(current, 0)) { IStrategoAppl currentAppl = (IStrategoAppl) current; String sort = tryGetSort(currentAppl); if (sort != null) return sort; } return null; }
/** * Get the RTG sort name of a production RHS, or for lists, the RTG element sort name. */
Get the RTG sort name of a production RHS, or for lists, the RTG element sort name
getSort
{ "repo_name": "metaborg/jsglr", "path": "org.spoofax.jsglr/src/org/spoofax/jsglr/client/imploder/ProductionAttributeReader.java", "license": "apache-2.0", "size": 12906 }
[ "org.spoofax.interpreter.terms.IStrategoAppl", "org.spoofax.interpreter.terms.IStrategoTerm", "org.spoofax.terms.Term" ]
import org.spoofax.interpreter.terms.IStrategoAppl; import org.spoofax.interpreter.terms.IStrategoTerm; import org.spoofax.terms.Term;
import org.spoofax.interpreter.terms.*; import org.spoofax.terms.*;
[ "org.spoofax.interpreter", "org.spoofax.terms" ]
org.spoofax.interpreter; org.spoofax.terms;
822,280
public long getLong(int columnIndex) throws SQLException { return getLong(columnIndex, true); }
long function(int columnIndex) throws SQLException { return getLong(columnIndex, true); }
/** * Get the value of a column in the current row as a Java long. * * @param columnIndex * the first column is 1, the second is 2,... * * @return the column value; 0 if SQL NULL * * @exception SQLException * if a database access error occurs */
Get the value of a column in the current row as a Java long
getLong
{ "repo_name": "shubhanshu-gupta/Apache-Solr", "path": "example/solr/collection1/lib/mysql-connector-java-5.1.32/src/com/mysql/jdbc/ResultSetImpl.java", "license": "apache-2.0", "size": 247329 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
545,715
public void setNomConnector(INomConnector nomConnector) { this.nomConnector = nomConnector; }
void function(INomConnector nomConnector) { this.nomConnector = nomConnector; }
/** * Sets the nomConnector. * * @param nomConnector The nomConnector to be set. */
Sets the nomConnector
setNomConnector
{ "repo_name": "MatthiasEberl/cordysfilecon", "path": "src/cws/FileConnector/com-cordys-coe/fileconnector/java/source/com/cordys/coe/ac/fileconnector/extensions/directorypoller/FileContext.java", "license": "apache-2.0", "size": 14164 }
[ "com.cordys.coe.ac.fileconnector.INomConnector" ]
import com.cordys.coe.ac.fileconnector.INomConnector;
import com.cordys.coe.ac.fileconnector.*;
[ "com.cordys.coe" ]
com.cordys.coe;
1,680,217
private BasicBlock getFirstNode() { if (forward) { return ir.cfg.entry(); } else { return ir.cfg.exit(); } }
BasicBlock function() { if (forward) { return ir.cfg.entry(); } else { return ir.cfg.exit(); } }
/** * Get the first node, either entry or exit * depending on which way we are viewing the graph * @return the entry node or exit node */
Get the first node, either entry or exit depending on which way we are viewing the graph
getFirstNode
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/controlflow/DominatorTree.java", "license": "epl-1.0", "size": 9459 }
[ "org.jikesrvm.compilers.opt.ir.BasicBlock" ]
import org.jikesrvm.compilers.opt.ir.BasicBlock;
import org.jikesrvm.compilers.opt.ir.*;
[ "org.jikesrvm.compilers" ]
org.jikesrvm.compilers;
1,244,942
@Test public void testGetColumnCount() { // check an empty dataset DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); assertEquals(0, empty.getColumnCount()); }
void function() { DefaultIntervalCategoryDataset empty = new DefaultIntervalCategoryDataset(new double[0][0], new double[0][0]); assertEquals(0, empty.getColumnCount()); }
/** * Some checks for the getColumnCount() method. */
Some checks for the getColumnCount() method
testGetColumnCount
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/test/java/org/jfree/data/category/DefaultIntervalCategoryDatasetTest.java", "license": "lgpl-2.1", "size": 18156 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,260,766
public int getActiveContexts() { return this.activeContexts.size(); } static class NormsWarmer implements IndicesWarmer.Listener { private final IndicesWarmer indicesWarmer; public NormsWarmer(IndicesWarmer indicesWarmer) { this.indicesWarmer = indicesWarmer; }
int function() { return this.activeContexts.size(); } static class NormsWarmer implements IndicesWarmer.Listener { private final IndicesWarmer indicesWarmer; public NormsWarmer(IndicesWarmer indicesWarmer) { this.indicesWarmer = indicesWarmer; }
/** * Returns the number of active contexts in this * SearchService */
Returns the number of active contexts in this SearchService
getActiveContexts
{ "repo_name": "diendt/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/SearchService.java", "license": "apache-2.0", "size": 51787 }
[ "org.elasticsearch.indices.IndicesWarmer" ]
import org.elasticsearch.indices.IndicesWarmer;
import org.elasticsearch.indices.*;
[ "org.elasticsearch.indices" ]
org.elasticsearch.indices;
250,815
public static void apiManagementPortalSettingsUpdateSignIn( com.azure.resourcemanager.apimanagement.ApiManagementManager manager) { manager .signInSettings() .updateWithResponse( "rg1", "apimService1", "*", new PortalSigninSettingsInner().withEnabled(true...
static void function( com.azure.resourcemanager.apimanagement.ApiManagementManager manager) { manager .signInSettings() .updateWithResponse( "rg1", STR, "*", new PortalSigninSettingsInner().withEnabled(true), Context.NONE); }
/** * Sample code: ApiManagementPortalSettingsUpdateSignIn. * * @param manager Entry point to ApiManagementManager. */
Sample code: ApiManagementPortalSettingsUpdateSignIn
apiManagementPortalSettingsUpdateSignIn
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/samples/java/com/azure/resourcemanager/apimanagement/SignInSettingsUpdateSamples.java", "license": "mit", "size": 1057 }
[ "com.azure.core.util.Context", "com.azure.resourcemanager.apimanagement.fluent.models.PortalSigninSettingsInner" ]
import com.azure.core.util.Context; import com.azure.resourcemanager.apimanagement.fluent.models.PortalSigninSettingsInner;
import com.azure.core.util.*; import com.azure.resourcemanager.apimanagement.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,501,369
@RequestMapping("/doMineralOccurrenceFilter.do") public ModelAndView doMineralOccurrenceFilter( @RequestParam(value="serviceUrl", required=false) String serviceUrl, @RequestParam(value="commodityName", required=false) String commodityName, @RequestParam(value="meas...
@RequestMapping(STR) ModelAndView function( @RequestParam(value=STR, required=false) String serviceUrl, @RequestParam(value=STR, required=false) String commodityName, @RequestParam(value=STR, required=false) String measureType, @RequestParam(value=STR, required=false) String minOreAmount, @RequestParam(value=STR, requi...
/** * Handles the Earth Resource MineralOccerrence filter queries. * * @param serviceUrl * @param commodityName * @param measureType * @param minOreAmount * @param minOreAmountUOM * @param minCommodityAmount * @param minCommodityAmountUOM * @param request ...
Handles the Earth Resource MineralOccerrence filter queries
doMineralOccurrenceFilter
{ "repo_name": "AuScope/ABIN-Portal", "path": "src/main/java/org/auscope/portal/server/web/controllers/EarthResourcesFilterController.java", "license": "gpl-3.0", "size": 14256 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.commons.httpclient.HttpMethodBase", "org.auscope.portal.server.domain.filter.FilterBoundingBox", "org.auscope.portal.server.web.ErrorMessages", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestPar...
import javax.servlet.http.HttpServletRequest; import org.apache.commons.httpclient.HttpMethodBase; import org.auscope.portal.server.domain.filter.FilterBoundingBox; import org.auscope.portal.server.web.ErrorMessages; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.anno...
import javax.servlet.http.*; import org.apache.commons.httpclient.*; import org.auscope.portal.server.domain.filter.*; import org.auscope.portal.server.web.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*;
[ "javax.servlet", "org.apache.commons", "org.auscope.portal", "org.springframework.web" ]
javax.servlet; org.apache.commons; org.auscope.portal; org.springframework.web;
2,190,608
public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(field_176430_a, func_176428_b(meta)).withProperty(field_176429_b, Boolean.valueOf(getActiveStateFromMetadata(meta))); }
IBlockState function(int meta) { return this.getDefaultState().withProperty(field_176430_a, func_176428_b(meta)).withProperty(field_176429_b, Boolean.valueOf(getActiveStateFromMetadata(meta))); }
/** * Convert the given metadata into a BlockState for this Block */
Convert the given metadata into a BlockState for this Block
getStateFromMeta
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/block/BlockHopper.java", "license": "mit", "size": 8189 }
[ "net.minecraft.block.state.IBlockState" ]
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.state.*;
[ "net.minecraft.block" ]
net.minecraft.block;
953,280
private MultiWordSuggestOracle getSuggestOracle() { return (MultiWordSuggestOracle) getSuggestBox().getSuggestOracle(); } //~ Inner Classes ---------------------------------------------------------- public static class ComboBoxWidgetFactory implements WidgetFactory<Widget> { //~ Methods ----------------...
MultiWordSuggestOracle function() { return (MultiWordSuggestOracle) getSuggestBox().getSuggestOracle(); } public static class ComboBoxWidgetFactory implements WidgetFactory<Widget> { /*************************************** * {@inheritDoc}
/*************************************** * Returns the {@link MultiWordSuggestOracle} of this instance. * * @return The suggest oracle */
Returns the <code>MultiWordSuggestOracle</code> of this instance
getSuggestOracle
{ "repo_name": "esoco/gewt", "path": "src/main/java/de/esoco/ewt/component/ComboBox.java", "license": "apache-2.0", "size": 8430 }
[ "com.google.gwt.user.client.ui.MultiWordSuggestOracle", "com.google.gwt.user.client.ui.Widget", "de.esoco.ewt.impl.gwt.WidgetFactory" ]
import com.google.gwt.user.client.ui.MultiWordSuggestOracle; import com.google.gwt.user.client.ui.Widget; import de.esoco.ewt.impl.gwt.WidgetFactory;
import com.google.gwt.user.client.ui.*; import de.esoco.ewt.impl.gwt.*;
[ "com.google.gwt", "de.esoco.ewt" ]
com.google.gwt; de.esoco.ewt;
936,151
//=== @2013-07-24,10:23; text reflow mode; === // #ifdef pro private void setTextReflowMode(boolean mode) { if (mode) { Log.d(TAG, "text reflow"); int page = this.pagesView.getCurrentPage(); String text = this.pdf.getText(page); if (text == null) text = ""; text = text.trim(...
void function(boolean mode) { if (mode) { Log.d(TAG, STR); int page = this.pagesView.getCurrentPage(); String text = this.pdf.getText(page); if (text == null) text = STRtext of page STR is: STRClose Text ReflowSTRText Reflow"); this.textReflowView.setVisibility(View.GONE); this.pagesView.setVisibility(View.VISIBLE); th...
/** * Switch text reflow mode and set this.textReflowMode by hiding and showing relevant interface elements. * @param mode if true ten show text reflow view, otherwise hide text reflow view */
Switch text reflow mode and set this.textReflowMode by hiding and showing relevant interface elements
setTextReflowMode
{ "repo_name": "freelsen/apv", "path": "pdfview/src/cx/hell/android/pdfviewpro/OpenFileActivity.java", "license": "gpl-3.0", "size": 72326 }
[ "android.util.Log", "android.view.View" ]
import android.util.Log; import android.view.View;
import android.util.*; import android.view.*;
[ "android.util", "android.view" ]
android.util; android.view;
197,281
Pageable page = Utility.buildPageRequest(size, pageno); return authorRepository.findAll(page); }
Pageable page = Utility.buildPageRequest(size, pageno); return authorRepository.findAll(page); }
/** * get the list of all the authors * @return List<Author> */
get the list of all the authors
getAllAuthor
{ "repo_name": "pratyasam/review-app", "path": "src/main/java/com/mindfire/review/services/AuthorServiceImpl.java", "license": "apache-2.0", "size": 12222 }
[ "com.mindfire.review.util.Utility", "org.springframework.data.domain.Pageable" ]
import com.mindfire.review.util.Utility; import org.springframework.data.domain.Pageable;
import com.mindfire.review.util.*; import org.springframework.data.domain.*;
[ "com.mindfire.review", "org.springframework.data" ]
com.mindfire.review; org.springframework.data;
2,725,251
static String getMethodSignature(Method m) { StringBuilder result = new StringBuilder(); result.append('('); for (Class<?> parameterType : m.getParameterTypes()) { result.append(getSignature(parameterType)); } result.append(")"); result.append(getSignature(m.getReturnType...
static String getMethodSignature(Method m) { StringBuilder result = new StringBuilder(); result.append('('); for (Class<?> parameterType : m.getParameterTypes()) { result.append(getSignature(parameterType)); } result.append(")"); result.append(getSignature(m.getReturnType())); return result.toString(); }
/** * Return a String representing the signature for a method {@code m}. * * @param m * a java.lang.reflect.Method for which to compute the signature * @return the method's signature */
Return a String representing the signature for a method m
getMethodSignature
{ "repo_name": "lukhnos/j2objc", "path": "jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamClass.java", "license": "apache-2.0", "size": 48423 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,602,461
LoginModule newInstance(Map options) throws ConfigurationException;
LoginModule newInstance(Map options) throws ConfigurationException;
/** * New instance. * * @param options * the options * @return the login module * @throws ConfigurationException * the configuration exception */
New instance
newInstance
{ "repo_name": "alarulrajan/CodeFest", "path": "src/com/technoetic/xplanner/security/module/LoginModuleFactory.java", "license": "gpl-2.0", "size": 579 }
[ "com.technoetic.xplanner.security.LoginModule", "java.util.Map" ]
import com.technoetic.xplanner.security.LoginModule; import java.util.Map;
import com.technoetic.xplanner.security.*; import java.util.*;
[ "com.technoetic.xplanner", "java.util" ]
com.technoetic.xplanner; java.util;
1,240,322
LevelConstraint getContentTimestampConstraint();
LevelConstraint getContentTimestampConstraint();
/** * Indicates if the signed property: content-time-stamp should be checked. If ContentTimeStamp element is absent * within the constraint file then null is * returned. * * @return {@code LevelConstraint} if ContentTimeStamp element is present in the constraint file, null otherwise. */
Indicates if the signed property: content-time-stamp should be checked. If ContentTimeStamp element is absent within the constraint file then null is returned
getContentTimestampConstraint
{ "repo_name": "alisdev/dss", "path": "validation-policy/src/main/java/eu/europa/esig/dss/validation/policy/ValidationPolicy.java", "license": "lgpl-2.1", "size": 15546 }
[ "eu.europa.esig.jaxb.policy.LevelConstraint" ]
import eu.europa.esig.jaxb.policy.LevelConstraint;
import eu.europa.esig.jaxb.policy.*;
[ "eu.europa.esig" ]
eu.europa.esig;
21,555
public BaseGraph<T, E> getGraph() { return graph; } public List<E> getEdges() { return Collections.unmodifiableList(edgesInOrder); }
BaseGraph<T, E> function() { return graph; } public List<E> getEdges() { return Collections.unmodifiableList(edgesInOrder); }
/** * Get the graph of this path * @return a non-null graph */
Get the graph of this path
getGraph
{ "repo_name": "BGI-flexlab/SOAPgaeaDevelopment4.0", "path": "src/main/java/org/bgi/flexlab/gaea/tools/haplotypecaller/assembly/vertex/Path.java", "license": "gpl-3.0", "size": 7779 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,477,180
public String toHtml(int headerDepth, Function<String, String> idGenerator, Map<String, String> dynamicUpdateModes) { boolean hasUpdateModes = !dynamicUpdateModes.isEmpty(); List<ConfigKey> configs = sortedConfigs(); StringBuilder b = new StringBuilder(); b.a...
String function(int headerDepth, Function<String, String> idGenerator, Map<String, String> dynamicUpdateModes) { boolean hasUpdateModes = !dynamicUpdateModes.isEmpty(); List<ConfigKey> configs = sortedConfigs(); StringBuilder b = new StringBuilder(); b.append(STRconfig-list\">\n"); for (ConfigKey key : configs) { if (k...
/** * Converts this config into an HTML list that can be embedded into docs. * If <code>dynamicUpdateModes</code> is non-empty, a "Dynamic Update Mode" label * will be included in the config details with the value of the update mode. Default * mode is "read-only". * @param headerDepth The top l...
Converts this config into an HTML list that can be embedded into docs. If <code>dynamicUpdateModes</code> is non-empty, a "Dynamic Update Mode" label will be included in the config details with the value of the update mode. Default mode is "read-only"
toHtml
{ "repo_name": "guozhangwang/kafka", "path": "clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java", "license": "apache-2.0", "size": 69372 }
[ "java.util.List", "java.util.Map", "java.util.function.Function" ]
import java.util.List; import java.util.Map; import java.util.function.Function;
import java.util.*; import java.util.function.*;
[ "java.util" ]
java.util;
2,913,423
private byte[] firstElement() throws KeeperException, InterruptedException { while (true) { String firstChild = firstChild(false); if (firstChild == null) { return null; } try { return zookeeper.getData(dir + "/" + firstChild, null, null, true); } catch (KeeperExcepti...
byte[] function() throws KeeperException, InterruptedException { while (true) { String firstChild = firstChild(false); if (firstChild == null) { return null; } try { return zookeeper.getData(dir + "/" + firstChild, null, null, true); } catch (KeeperException.NoNodeException e) { updateLock.lockInterruptibly(); try { kn...
/** * Return the head of the queue without modifying the queue. * * @return the data at the head of the queue. */
Return the head of the queue without modifying the queue
firstElement
{ "repo_name": "PATRIC3/p3_solr", "path": "solr/core/src/java/org/apache/solr/cloud/DistributedQueue.java", "license": "apache-2.0", "size": 13841 }
[ "org.apache.zookeeper.KeeperException" ]
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.*;
[ "org.apache.zookeeper" ]
org.apache.zookeeper;
440,017
File checkTemplate( String aTemplateDir ) throws Exception { File template = new File( aTemplateDir, "log4j_template.xml" ); if ( !template.exists() ) { // maybe old installation which still has log4j.xml in WEB-INF: File firstTemplate = template; ...
File checkTemplate( String aTemplateDir ) throws Exception { File template = new File( aTemplateDir, STR ); if ( !template.exists() ) { File firstTemplate = template; template = new File( aTemplateDir, STR ); if ( !template.exists() ) { throw new Exception( STRSTR\"" ); } } return template; }
/** * Checks if the file log4j_template.xml can be found in given directory. * <p> * If not found also the file log4j.xml is evaluated. * <p> * @param aTemplateDir * folder where the file is to be expected * @return an initialized File object. * @throws Exception ...
Checks if the file log4j_template.xml can be found in given directory. If not found also the file log4j.xml is evaluated.
checkTemplate
{ "repo_name": "AdnaneKhan/1699_deliv4", "path": "src/main/java/net/jforum/util/log/LoggerHelper.java", "license": "bsd-3-clause", "size": 10089 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,011,055
private String writeEmulatorStartScriptWindows() throws MojoExecutionException { String filename = scriptFolder + "\\maven-android-plugin-emulator-start.bat"; File file = new File(filename); PrintWriter writer = null; try { writer = new PrintWriter(new FileWriter(file))...
String function() throws MojoExecutionException { String filename = scriptFolder + STR; File file = new File(filename); PrintWriter writer = null; try { writer = new PrintWriter(new FileWriter(file)); String command = assembleStartCommandLine(); String uniqueWindowTitle = STR + parsedAvd; writer.print(STRSTR\" " + comm...
/** * Writes the script to start the emulator in the background for windows based environments. This is not fully * operational. Need to implement pid file write. * * @return absolute path name of start script * @throws IOException * @throws MojoExecutionException * @see "http://stack...
Writes the script to start the emulator in the background for windows based environments. This is not fully operational. Need to implement pid file write
writeEmulatorStartScriptWindows
{ "repo_name": "snooplsm/njtransit", "path": "maven-android-plugin/src/main/java/com/jayway/maven/plugins/android/AbstractEmulatorMojo.java", "license": "gpl-3.0", "size": 15541 }
[ "java.io.File", "java.io.FileWriter", "java.io.IOException", "java.io.PrintWriter", "org.apache.maven.plugin.MojoExecutionException" ]
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import org.apache.maven.plugin.MojoExecutionException;
import java.io.*; import org.apache.maven.plugin.*;
[ "java.io", "org.apache.maven" ]
java.io; org.apache.maven;
2,306,314
public void updateCourse(@NonNull Course course){ //Open a connection to the database SQLiteDatabase db = getDatabase(); //Prepare the statement SQLiteStatement stmt = db.compileStatement(UPDATE); stmt.bindString(1, course.getName()); stmt.bindString(2, course.getLoc...
void function(@NonNull Course course){ SQLiteDatabase db = getDatabase(); SQLiteStatement stmt = db.compileStatement(UPDATE); stmt.bindString(1, course.getName()); stmt.bindString(2, course.getLocation()); stmt.bindString(3, course.getMeetingTime()); stmt.bindString(4, course.getAccessCode()); stmt.bindLong(5, course.g...
/** * Updates a course in the database. * * @param course the course to be updated. */
Updates a course in the database
updateCourse
{ "repo_name": "tndatacommons/OfficeHours-Android", "path": "app/src/main/java/org/tndata/officehours/database/CourseTableHandler.java", "license": "apache-2.0", "size": 6264 }
[ "android.database.sqlite.SQLiteDatabase", "android.database.sqlite.SQLiteStatement", "android.support.annotation.NonNull", "org.tndata.officehours.model.Course" ]
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; import android.support.annotation.NonNull; import org.tndata.officehours.model.Course;
import android.database.sqlite.*; import android.support.annotation.*; import org.tndata.officehours.model.*;
[ "android.database", "android.support", "org.tndata.officehours" ]
android.database; android.support; org.tndata.officehours;
2,507,219
protected User getUser(DirContext context, String username) throws NamingException { return getUser(context, username, null, -1); }
User function(DirContext context, String username) throws NamingException { return getUser(context, username, null, -1); }
/** * Return a User object containing information about the user * with the specified username, if found in the directory; * otherwise return <code>null</code>. * * @param context The directory context * @param username Username to be looked up * @return the User object * @except...
Return a User object containing information about the user with the specified username, if found in the directory; otherwise return <code>null</code>
getUser
{ "repo_name": "Nickname0806/Test_Q4", "path": "java/org/apache/catalina/realm/JNDIRealm.java", "license": "apache-2.0", "size": 90063 }
[ "javax.naming.NamingException", "javax.naming.directory.DirContext" ]
import javax.naming.NamingException; import javax.naming.directory.DirContext;
import javax.naming.*; import javax.naming.directory.*;
[ "javax.naming" ]
javax.naming;
633,912
public void setEntries(List<PlaylistEntry> entries) { mEntries = entries; } /** * @return the next {@link Query}
void function(List<PlaylistEntry> entries) { mEntries = entries; } /** * @return the next {@link Query}
/** * Set this {@link Playlist}'s {@link Query}s */
Set this <code>Playlist</code>'s <code>Query</code>s
setEntries
{ "repo_name": "wenscript/tomahawk-android", "path": "src/org/tomahawk/libtomahawk/collection/Playlist.java", "license": "gpl-3.0", "size": 10829 }
[ "java.util.List", "org.tomahawk.libtomahawk.resolver.Query" ]
import java.util.List; import org.tomahawk.libtomahawk.resolver.Query;
import java.util.*; import org.tomahawk.libtomahawk.resolver.*;
[ "java.util", "org.tomahawk.libtomahawk" ]
java.util; org.tomahawk.libtomahawk;
2,786,495
public Builder setCustomData(@Nullable Object customData) { this.customData = customData; return this; }
Builder function(@Nullable Object customData) { this.customData = customData; return this; }
/** * Sets the {@link DataSpec#customData}. The default value is {@code null}. * * @param customData The {@link DataSpec#customData}. * @return The builder. */
Sets the <code>DataSpec#customData</code>. The default value is null
setCustomData
{ "repo_name": "google/ExoPlayer", "path": "library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DataSpec.java", "license": "apache-2.0", "size": 25260 }
[ "androidx.annotation.Nullable" ]
import androidx.annotation.Nullable;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
148,951
public int findNearestPosition(CycleItem target) { if (target != null) { final int count = getCount(); for (int i = count - 1; i >= 0; i--) { final CycleItem item = getItem(i); if (item instanceof CycleChangeItem) { ...
int function(CycleItem target) { if (target != null) { final int count = getCount(); for (int i = count - 1; i >= 0; i--) { final CycleItem item = getItem(i); if (item instanceof CycleChangeItem) { continue; } else if (item.compareTo(target) >= 0) { return i; } } } return 0; } } public static class AppItem implements C...
/** * Find position of {@link CycleItem} in this adapter which is nearest * the given {@link CycleItem}. */
Find position of <code>CycleItem</code> in this adapter which is nearest the given <code>CycleItem</code>
findNearestPosition
{ "repo_name": "miswenwen/My_bird_work", "path": "Bird_work/我的项目/Settings/src/com/android/settings/DataUsageSummary.java", "license": "apache-2.0", "size": 132897 }
[ "android.os.Parcel", "android.os.Parcelable", "android.util.SparseBooleanArray" ]
import android.os.Parcel; import android.os.Parcelable; import android.util.SparseBooleanArray;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
393,826
public static DerivativeStructure atan2(final DerivativeStructure y, final DerivativeStructure x) throws DimensionMismatchException { return y.atan2(x); }
static DerivativeStructure function(final DerivativeStructure y, final DerivativeStructure x) throws DimensionMismatchException { return y.atan2(x); }
/** Two arguments arc tangent operation. * @param y first argument of the arc tangent * @param x second argument of the arc tangent * @return atan2(y, x) * @exception DimensionMismatchException if number of free parameters * or orders do not match */
Two arguments arc tangent operation
atan2
{ "repo_name": "SpoonLabs/astor", "path": "examples/math_5/src/main/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructure.java", "license": "gpl-2.0", "size": 43085 }
[ "org.apache.commons.math3.exception.DimensionMismatchException" ]
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.*;
[ "org.apache.commons" ]
org.apache.commons;
2,072,468
protected void releaseIrrelevantSearchContexts(AtomicArray<? extends QuerySearchResultProvider> queryResults, AtomicArray<IntArrayList> docIdsToLoad) { if (docIdsToLoad == null) { return; } // we only rele...
void function(AtomicArray<? extends QuerySearchResultProvider> queryResults, AtomicArray<IntArrayList> docIdsToLoad) { if (docIdsToLoad == null) { return; } if (request.scroll() == null) { for (AtomicArray.Entry<? extends QuerySearchResultProvider> entry : queryResults.asList()) { final TopDocs topDocs = entry.value.qu...
/** * Releases shard targets that are not used in the docsIdsToLoad. */
Releases shard targets that are not used in the docsIdsToLoad
releaseIrrelevantSearchContexts
{ "repo_name": "xingguang2013/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/search/type/TransportSearchTypeAction.java", "license": "apache-2.0", "size": 20683 }
[ "com.carrotsearch.hppc.IntArrayList", "org.apache.lucene.search.TopDocs", "org.elasticsearch.cluster.node.DiscoveryNode", "org.elasticsearch.common.util.concurrent.AtomicArray", "org.elasticsearch.search.query.QuerySearchResultProvider" ]
import com.carrotsearch.hppc.IntArrayList; import org.apache.lucene.search.TopDocs; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.util.concurrent.AtomicArray; import org.elasticsearch.search.query.QuerySearchResultProvider;
import com.carrotsearch.hppc.*; import org.apache.lucene.search.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.common.util.concurrent.*; import org.elasticsearch.search.query.*;
[ "com.carrotsearch.hppc", "org.apache.lucene", "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.search" ]
com.carrotsearch.hppc; org.apache.lucene; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.search;
2,495,826
public boolean isValid() { if(this.opts == null) { this.logger.log(Level.SEVERE, "No arguments provided"); return false; } if(this.opts.getShowHelp()) { return false; } this.logger.log(Level.INFO, "Validating arguments provided."); try { // if everything is kosher, we can run the tilin...
boolean function() { if(this.opts == null) { this.logger.log(Level.SEVERE, STR); return false; } if(this.opts.getShowHelp()) { return false; } this.logger.log(Level.INFO, STR); try { if(this.isinputFileValid() && this.isOutputFileValid() && this.isImageSettingsValid() && this.isSRSOptionsValid()) { this.logger.log(Leve...
/** * Validates options parsed from the command line, returns * * @return - True/False on whether the given arguments are valid (ie, if * tiling and packaging are both flagged, that is an invalid * selection. */
Validates options parsed from the command line, returns
isValid
{ "repo_name": "GitHubRGI/swagd", "path": "RGISuite/src/main/java/com/rgi/suite/cli/HeadlessOptionsValidator.java", "license": "mit", "size": 9773 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,533,544
@Override public void initialize(final AuxiliaryElements aux, final boolean meanOnly) throws OrekitException { computeMeanElementsTruncations(aux); if (!meanOnly) { computeShortPeriodicsTruncations(); maxEccPow = FastMath.max(maxEccPowMeanElements, maxEccPowShor...
void function(final AuxiliaryElements aux, final boolean meanOnly) throws OrekitException { computeMeanElementsTruncations(aux); if (!meanOnly) { computeShortPeriodicsTruncations(); maxEccPow = FastMath.max(maxEccPowMeanElements, maxEccPowShortPeriodics); } else { maxEccPow = maxEccPowMeanElements; } this.hansenObjects...
/** Computes the highest power of the eccentricity to appear in the truncated * analytical power series expansion. * <p> * This method computes the upper value for the central body potential and * determines the maximal power for the eccentricity producing potential * terms bigger than a d...
Computes the highest power of the eccentricity to appear in the truncated analytical power series expansion. This method computes the upper value for the central body potential and determines the maximal power for the eccentricity producing potential terms bigger than a defined tolerance.
initialize
{ "repo_name": "liscju/Orekit", "path": "src/main/java/org/orekit/propagation/semianalytical/dsst/forces/ZonalContribution.java", "license": "apache-2.0", "size": 84556 }
[ "org.apache.commons.math3.util.FastMath", "org.orekit.errors.OrekitException", "org.orekit.propagation.semianalytical.dsst.utilities.AuxiliaryElements", "org.orekit.propagation.semianalytical.dsst.utilities.hansen.HansenZonalLinear" ]
import org.apache.commons.math3.util.FastMath; import org.orekit.errors.OrekitException; import org.orekit.propagation.semianalytical.dsst.utilities.AuxiliaryElements; import org.orekit.propagation.semianalytical.dsst.utilities.hansen.HansenZonalLinear;
import org.apache.commons.math3.util.*; import org.orekit.errors.*; import org.orekit.propagation.semianalytical.dsst.utilities.*; import org.orekit.propagation.semianalytical.dsst.utilities.hansen.*;
[ "org.apache.commons", "org.orekit.errors", "org.orekit.propagation" ]
org.apache.commons; org.orekit.errors; org.orekit.propagation;
2,115,446
private void setInput(final WebElement input, final String value) { try { input.clear(); input.sendKeys(value); } catch (NoSuchElementException e) { logger.debug("Unable to find " + input); } }
void function(final WebElement input, final String value) { try { input.clear(); input.sendKeys(value); } catch (NoSuchElementException e) { logger.debug(STR + input); } }
/** * Method to set String input in the field * * @param input * @param value */
Method to set String input in the field
setInput
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/share-po/src/main/java/org/alfresco/po/share/site/discussions/AbstractTopicForm.java", "license": "lgpl-3.0", "size": 6076 }
[ "org.openqa.selenium.NoSuchElementException", "org.openqa.selenium.WebElement" ]
import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebElement;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
1,876,210
private void setDescriptorOnInlineList(String name, FieldDescriptor fd) { done: for (InlineList list : inlineListsNormal) { Object path = list.getPath(); if (((String) path).substring(0, ((String) path).indexOf('.')).equals(name)) { list.setDescriptor(fd); ...
void function(String name, FieldDescriptor fd) { done: for (InlineList list : inlineListsNormal) { Object path = list.getPath(); if (((String) path).substring(0, ((String) path).indexOf('.')).equals(name)) { list.setDescriptor(fd); break done; } } }
/** * Set Descriptor (for placement) on an InlineList, only done for normal lists * @param name * @param fd */
Set Descriptor (for placement) on an InlineList, only done for normal lists
setDescriptorOnInlineList
{ "repo_name": "julie-sullivan/phytomine", "path": "intermine/web/main/src/org/intermine/web/logic/results/ReportObject.java", "license": "lgpl-2.1", "size": 35467 }
[ "org.intermine.metadata.FieldDescriptor" ]
import org.intermine.metadata.FieldDescriptor;
import org.intermine.metadata.*;
[ "org.intermine.metadata" ]
org.intermine.metadata;
439,578
CertPathValidatorException tE = new CertPathValidatorException(); assertNull("getMessage() must return null.", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } @TestTargetNew( level = TestLevel.PARTIAL_COMPLETE, notes = "", method = "Cer...
CertPathValidatorException tE = new CertPathValidatorException(); assertNull(STR, tE.getMessage()); assertNull(STR, tE.getCause()); } @TestTargetNew( level = TestLevel.PARTIAL_COMPLETE, notes = STRCertPathValidatorException", args = {java.lang.String.class}
/** * Test for <code>CertPathValidatorException()</code> constructor * Assertion: constructs CertPathValidatorException with no detail message */
Test for <code>CertPathValidatorException()</code> constructor Assertion: constructs CertPathValidatorException with no detail message
testCertPathValidatorException01
{ "repo_name": "openweave/openweave-core", "path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/test/java/tests/security/cert/CertPathValidatorExceptionTest.java", "license": "apache-2.0", "size": 23022 }
[ "java.security.cert.CertPathValidatorException" ]
import java.security.cert.CertPathValidatorException;
import java.security.cert.*;
[ "java.security" ]
java.security;
117,999
public static KEKIdentifier getInstance( Object obj) { if (obj == null || obj instanceof KEKIdentifier) { return (KEKIdentifier)obj; } if (obj instanceof ASN1Sequence) { return new KEKIdentifier((ASN1Sequence)obj); } ...
static KEKIdentifier function( Object obj) { if (obj == null obj instanceof KEKIdentifier) { return (KEKIdentifier)obj; } if (obj instanceof ASN1Sequence) { return new KEKIdentifier((ASN1Sequence)obj); } throw new IllegalArgumentException(STR + obj.getClass().getName()); }
/** * return a KEKIdentifier object from the given object. * * @param obj the object we want converted. * @exception IllegalArgumentException if the object cannot be converted. */
return a KEKIdentifier object from the given object
getInstance
{ "repo_name": "dirtyfilthy/dirtyfilthy-bouncycastle", "path": "net/dirtyfilthy/bouncycastle/asn1/cms/KEKIdentifier.java", "license": "mit", "size": 3861 }
[ "net.dirtyfilthy.bouncycastle.asn1.ASN1Sequence" ]
import net.dirtyfilthy.bouncycastle.asn1.ASN1Sequence;
import net.dirtyfilthy.bouncycastle.asn1.*;
[ "net.dirtyfilthy.bouncycastle" ]
net.dirtyfilthy.bouncycastle;
20,863
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof MatrixSeriesCollection) { MatrixSeriesCollection c = (MatrixSeriesCollection) obj; ...
boolean function(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof MatrixSeriesCollection) { MatrixSeriesCollection c = (MatrixSeriesCollection) obj; return ObjectUtils.equal(this.seriesList, c.seriesList); } return false; }
/** * Tests this collection for equality with an arbitrary object. * * @param obj the object. * * @return A boolean. */
Tests this collection for equality with an arbitrary object
equals
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/main/java/org/jfree/data/xy/MatrixSeriesCollection.java", "license": "lgpl-2.1", "size": 10053 }
[ "org.jfree.chart.util.ObjectUtils" ]
import org.jfree.chart.util.ObjectUtils;
import org.jfree.chart.util.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,809,425
protected NodeRef addAttachment(NodeService nodeService, NodeRef folder, NodeRef mainContentNode, String fileName) { if (log.isDebugEnabled()) { log.debug("Adding attachment node (name=" + fileName + ")."); } NodeRef attachmentNode = addConte...
NodeRef function(NodeService nodeService, NodeRef folder, NodeRef mainContentNode, String fileName) { if (log.isDebugEnabled()) { log.debug(STR + fileName + ")."); } NodeRef attachmentNode = addContentNode(nodeService, folder, fileName, false); nodeService.addAspect(mainContentNode, ContentModel.ASPECT_ATTACHABLE, null...
/** * Adds new node into Alfresco repository and mark its as an attachment. * * @param nodeService Alfresco Node Service. * @param folder Space/Folder to add. * @param mainContentNode Main content node. Any mail is added into Alfresco as one main content node and several its attachments. ...
Adds new node into Alfresco repository and mark its as an attachment
addAttachment
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/email/server/handler/AbstractEmailMessageHandler.java", "license": "lgpl-3.0", "size": 18899 }
[ "org.alfresco.model.ContentModel", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.cmr.repository.NodeService" ]
import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.model.*; import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.model", "org.alfresco.service" ]
org.alfresco.model; org.alfresco.service;
292,376
public void setSymbolShapes(ArrayList<ShapeInfo> value) { _SymbolShapes = value; }
void function(ArrayList<ShapeInfo> value) { _SymbolShapes = value; }
/** * the java shapes that make up the symbol * * @param value ArrayList<ShapeInfo> */
the java shapes that make up the symbol
setSymbolShapes
{ "repo_name": "missioncommand/mil-sym-java", "path": "core/JavaRendererUtils/src/main/java/ArmyC2/C2SD/Utilities/MilStdSymbol.java", "license": "apache-2.0", "size": 49778 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,841,059
@Override protected void dropFewItems(boolean par1, int par2) { int amnt; int count; if (this.getSkeletonType() == 1) { if(this.getHeldItem().getItem() instanceof ItemJavelin && this.rand.nextFloat() < 0.03f) this.dropItem(getHeldItem().getItem(), 1); } else { if(this.getHeldI...
void function(boolean par1, int par2) { int amnt; int count; if (this.getSkeletonType() == 1) { if(this.getHeldItem().getItem() instanceof ItemJavelin && this.rand.nextFloat() < 0.03f) this.dropItem(getHeldItem().getItem(), 1); } else { if(this.getHeldItem().getItem() instanceof ItemCustomBow) { amnt = this.rand.nextIn...
/** * Drop 0-2 items of this living's type */
Drop 0-2 items of this living's type
dropFewItems
{ "repo_name": "Kittychanley/TFCraft", "path": "src/Common/com/bioxx/tfc/Entities/Mobs/EntitySkeletonTFC.java", "license": "gpl-3.0", "size": 14547 }
[ "com.bioxx.tfc.Items", "com.bioxx.tfc.TFCItems", "net.minecraft.init.Items" ]
import com.bioxx.tfc.Items; import com.bioxx.tfc.TFCItems; import net.minecraft.init.Items;
import com.bioxx.tfc.*; import net.minecraft.init.*;
[ "com.bioxx.tfc", "net.minecraft.init" ]
com.bioxx.tfc; net.minecraft.init;
197,323
public ManagedClusterInner withIdentityProfile(Map<String, ManagedClusterPropertiesIdentityProfileValue> identityProfile) { this.identityProfile = identityProfile; return this; }
ManagedClusterInner function(Map<String, ManagedClusterPropertiesIdentityProfileValue> identityProfile) { this.identityProfile = identityProfile; return this; }
/** * Set identities associated with the cluster. * * @param identityProfile the identityProfile value to set * @return the ManagedClusterInner object itself. */
Set identities associated with the cluster
withIdentityProfile
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/implementation/ManagedClusterInner.java", "license": "mit", "size": 17856 }
[ "com.microsoft.azure.management.containerservice.v2020_07_01.ManagedClusterPropertiesIdentityProfileValue", "java.util.Map" ]
import com.microsoft.azure.management.containerservice.v2020_07_01.ManagedClusterPropertiesIdentityProfileValue; import java.util.Map;
import com.microsoft.azure.management.containerservice.v2020_07_01.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
1,513,464
String ori = original != null ? new String(original) : ""; String newVer = newVersion != null ? new String(newVersion) : ""; String[] oriArray = StringUtils.splitByWholeSeparatorPreserveAllTokens(ori, null); String[] newRevArray = StringUtils.splitByWholeSeparatorPreserveAllTokens(newVer, null)...
String ori = original != null ? new String(original) : STRSTR\nSTR<span style=\STR title=\STR>STR</span>STR<span style=\STR title=\STR>STR</span>STR STR "); } catch (DifferentiationFailedException e) { throw new YoueatException(e); } return new String[] { ori, newVer }; }
/** * Return an array with 2 element [0] Original Text with fancy changed elements [1] new Version Text with fancy * changed elements * * @param ori * @param newVer * @return String[] * @throws FeedException */
Return an array with 2 element [0] Original Text with fancy changed elements [1] new Version Text with fancy changed elements
render
{ "repo_name": "alessandro-vincelli/youeat", "path": "src/main/java/it/av/youeat/web/util/TextDiffRender.java", "license": "apache-2.0", "size": 3484 }
[ "it.av.youeat.YoueatException", "org.apache.wicket.util.diff.DifferentiationFailedException" ]
import it.av.youeat.YoueatException; import org.apache.wicket.util.diff.DifferentiationFailedException;
import it.av.youeat.*; import org.apache.wicket.util.diff.*;
[ "it.av.youeat", "org.apache.wicket" ]
it.av.youeat; org.apache.wicket;
293,295
public void setUniform2fv(String uniformName, int count, float[] data, int dataOffset) { int uniformLocation = getUniformLocation(uniformName); GLES20.glUniform2fv(uniformLocation, count, data, dataOffset); GLDebugger.getInstance().passiveCheckGLError(); }
void function(String uniformName, int count, float[] data, int dataOffset) { int uniformLocation = getUniformLocation(uniformName); GLES20.glUniform2fv(uniformLocation, count, data, dataOffset); GLDebugger.getInstance().passiveCheckGLError(); }
/** * Specifies the value of the specified 2-component uniform of this shader program. * * @param uniformName Name of the uniform. * @param count Number of elements of the uniform array. * @param data Array where the value of the uniform array is stored. * @param dataOffset Offset of the first element of t...
Specifies the value of the specified 2-component uniform of this shader program
setUniform2fv
{ "repo_name": "miviclin/droidengine2d", "path": "src/com/miviclin/droidengine2d/graphics/shader/ShaderProgram.java", "license": "apache-2.0", "size": 16239 }
[ "com.miviclin.droidengine2d.graphics.GLDebugger" ]
import com.miviclin.droidengine2d.graphics.GLDebugger;
import com.miviclin.droidengine2d.graphics.*;
[ "com.miviclin.droidengine2d" ]
com.miviclin.droidengine2d;
2,464,850
@Test public void testLogDeadlockInfo() throws NullPointerException { LOG.log(Level.INFO, ThreadLogger.getFormattedDeadlockInfo( "DeadlockInfo test, none deadlocks expected. Deadlocks found: ")); }
void function() throws NullPointerException { LOG.log(Level.INFO, ThreadLogger.getFormattedDeadlockInfo( STR)); }
/** * Test logging in the absence of deadlocks. */
Test logging in the absence of deadlocks
testLogDeadlockInfo
{ "repo_name": "jwang98052/reef", "path": "lang/java/reef-common/src/test/java/org/apache/reef/util/DeadlockInfoWithDeadlockAbsentTest.java", "license": "apache-2.0", "size": 4202 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,274,978
@FIXVersion(introduced = "4.2", retired = "4.3") @TagNumRef(tagNum = TagNum.EncodedIssuerLen) public Integer getEncodedIssuerLen() { return getSafeInstrument().getEncodedIssuerLen(); }
@FIXVersion(introduced = "4.2", retired = "4.3") @TagNumRef(tagNum = TagNum.EncodedIssuerLen) Integer function() { return getSafeInstrument().getEncodedIssuerLen(); }
/** * Message field getter. * @return field value */
Message field getter
getEncodedIssuerLen
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/DontKnowTradeMsg.java", "license": "gpl-3.0", "size": 48781 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
2,086,085
public void removeListener(ServerListener listener) { this.listeners.remove(listener); }
void function(ServerListener listener) { this.listeners.remove(listener); }
/** * Removes a listener from this server. * * @param listener Listener to remove. */
Removes a listener from this server
removeListener
{ "repo_name": "P0ke55/specbot", "path": "src/main/java/com/github/steveice10/packetlib/Server.java", "license": "mit", "size": 7941 }
[ "com.github.steveice10.packetlib.event.server.ServerListener" ]
import com.github.steveice10.packetlib.event.server.ServerListener;
import com.github.steveice10.packetlib.event.server.*;
[ "com.github.steveice10" ]
com.github.steveice10;
2,344,637
public void setConversations(List<Conversation> conversations) { mConversations = conversations; if (mCurrentMenu == MENU_CONVERSATIONS) { showConversationList(); } }
void function(List<Conversation> conversations) { mConversations = conversations; if (mCurrentMenu == MENU_CONVERSATIONS) { showConversationList(); } }
/** * Set list of active conversations. */
Set list of active conversations
setConversations
{ "repo_name": "harism/android_lucidchat", "path": "src/fi/harism/lucidchat/ContainerMenu.java", "license": "apache-2.0", "size": 14958 }
[ "fi.harism.lucidchat.api.Conversation", "java.util.List" ]
import fi.harism.lucidchat.api.Conversation; import java.util.List;
import fi.harism.lucidchat.api.*; import java.util.*;
[ "fi.harism.lucidchat", "java.util" ]
fi.harism.lucidchat; java.util;
1,569,773
public static BlobGetOption metagenerationMatch(long metageneration) { return new BlobGetOption(StorageRpc.Option.IF_METAGENERATION_MATCH, metageneration); }
static BlobGetOption function(long metageneration) { return new BlobGetOption(StorageRpc.Option.IF_METAGENERATION_MATCH, metageneration); }
/** * Returns an option for blob's metageneration match. If this option is used the request will * fail if blob's metageneration does not match the provided value. */
Returns an option for blob's metageneration match. If this option is used the request will fail if blob's metageneration does not match the provided value
metagenerationMatch
{ "repo_name": "jabubake/google-cloud-java", "path": "google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java", "license": "apache-2.0", "size": 90574 }
[ "com.google.cloud.storage.spi.StorageRpc" ]
import com.google.cloud.storage.spi.StorageRpc;
import com.google.cloud.storage.spi.*;
[ "com.google.cloud" ]
com.google.cloud;
926,935
long connectionDelay(Node node, long now); /** * Check if the connection of the node has failed, based on the connection state. Such connection failure are * usually transient and can be resumed in the next {@link #ready(org.apache.kafka.common.Node, long)} }
long connectionDelay(Node node, long now); /** * Check if the connection of the node has failed, based on the connection state. Such connection failure are * usually transient and can be resumed in the next {@link #ready(org.apache.kafka.common.Node, long)} }
/** * Returns the number of milliseconds to wait, based on the connection state, before attempting to send data. When * disconnected, this respects the reconnect backoff time. When connecting or connected, this handles slow/stalled * connections. * * @param node The node to check * @param...
Returns the number of milliseconds to wait, based on the connection state, before attempting to send data. When disconnected, this respects the reconnect backoff time. When connecting or connected, this handles slow/stalled connections
connectionDelay
{ "repo_name": "wangcy6/storm_app", "path": "frame/kafka-0.11.0/kafka-0.11.0.1-src/clients/src/main/java/org/apache/kafka/clients/KafkaClient.java", "license": "apache-2.0", "size": 6450 }
[ "org.apache.kafka.common.Node" ]
import org.apache.kafka.common.Node;
import org.apache.kafka.common.*;
[ "org.apache.kafka" ]
org.apache.kafka;
1,354,898
public void sendLeashedEntitiesInChunk(EntityPlayerMP player, Chunk chunkIn) { List<Entity> list = Lists.<Entity>newArrayList(); List<Entity> list1 = Lists.<Entity>newArrayList(); for (EntityTrackerEntry entitytrackerentry : this.entries) { Entity entity = entitytrac...
void function(EntityPlayerMP player, Chunk chunkIn) { List<Entity> list = Lists.<Entity>newArrayList(); List<Entity> list1 = Lists.<Entity>newArrayList(); for (EntityTrackerEntry entitytrackerentry : this.entries) { Entity entity = entitytrackerentry.getTrackedEntity(); if (entity != player && entity.chunkCoordX == chu...
/** * Send packets to player for every tracked entity in this chunk that is either leashed to something or someone, or * has passengers */
Send packets to player for every tracked entity in this chunk that is either leashed to something or someone, or has passengers
sendLeashedEntitiesInChunk
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/EntityTracker.java", "license": "lgpl-2.1", "size": 15750 }
[ "com.google.common.collect.Lists", "java.util.List", "net.minecraft.entity.player.EntityPlayerMP", "net.minecraft.network.play.server.SPacketEntityAttach", "net.minecraft.network.play.server.SPacketSetPassengers", "net.minecraft.world.chunk.Chunk" ]
import com.google.common.collect.Lists; import java.util.List; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.play.server.SPacketEntityAttach; import net.minecraft.network.play.server.SPacketSetPassengers; import net.minecraft.world.chunk.Chunk;
import com.google.common.collect.*; import java.util.*; import net.minecraft.entity.player.*; import net.minecraft.network.play.server.*; import net.minecraft.world.chunk.*;
[ "com.google.common", "java.util", "net.minecraft.entity", "net.minecraft.network", "net.minecraft.world" ]
com.google.common; java.util; net.minecraft.entity; net.minecraft.network; net.minecraft.world;
754,293
@ARule( sa = 49, desc = "The static analysis check number 49. Refer to spec for description", author = "michal.chmielewski@oracle.com", date = "02/28/2007", order = 0 ) public void rule_SA49_0 () { }
@ARule( sa = 49, desc = STR, author = STR, date = STR, order = 0 ) void function () { }
/** * This rule is empty by design, because the spec has an empty SA rule. * It's rule 49, and it's missing :-) * * Clearly, for completeness, no better place to put it then here. */
This rule is empty by design, because the spec has an empty SA rule. It's rule 49, and it's missing :-) Clearly, for completeness, no better place to put it then here
rule_SA49_0
{ "repo_name": "Drifftr/devstudio-tooling-bps", "path": "plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/EmptyValidator.java", "license": "apache-2.0", "size": 1396 }
[ "org.eclipse.bpel.validator.model.ARule" ]
import org.eclipse.bpel.validator.model.ARule;
import org.eclipse.bpel.validator.model.*;
[ "org.eclipse.bpel" ]
org.eclipse.bpel;
2,749,817
public static List<String> getChildChannels(ChannelTree.Node container, boolean hidden) { ArrayList<String> channels = new ArrayList<String>(); Iterator<?> children = container.getChildren().iterator(); while (children.hasNext()) { ChannelTree.Node node = (ChannelTree.Node)children.next(); ...
static List<String> function(ChannelTree.Node container, boolean hidden) { ArrayList<String> channels = new ArrayList<String>(); Iterator<?> children = container.getChildren().iterator(); while (children.hasNext()) { ChannelTree.Node node = (ChannelTree.Node)children.next(); if (node.getType() == ChannelTree.CHANNEL) {...
/** * Returns all the names of children of this node that are channels. * * @param container the source node * @param hidden include hidden channels * @return a list of channel names * @since 1.3 */
Returns all the names of children of this node that are channels
getChildChannels
{ "repo_name": "cagrierciyes/osdt", "path": "rdv/src/org/rdv/rbnb/RBNBUtilities.java", "license": "isc", "size": 12030 }
[ "com.rbnb.sapi.ChannelTree", "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import com.rbnb.sapi.ChannelTree; import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import com.rbnb.sapi.*; import java.util.*;
[ "com.rbnb.sapi", "java.util" ]
com.rbnb.sapi; java.util;
377,997
public static Object[] getPercentMissingData(Phenotype tableReportIn, int precision) { double[][] rawData = tableReportIn.getData(); double[] tempData = new double[rawData.length]; int colCount = rawData[0].length; // assume that the first row has all columns int rowCount...
static Object[] function(Phenotype tableReportIn, int precision) { double[][] rawData = tableReportIn.getData(); double[] tempData = new double[rawData.length]; int colCount = rawData[0].length; int rowCount = rawData.length; BigDecimal hundred = new BigDecimal("100"); BigDecimal[] percentData = new BigDecimal[colCount...
/** * Determine the percentage of data which is NaN in the passed-in TableReport * @param tableReportIn * @param precision The number of desired significan digits after the decimal, * i.e., the significand or, more informally, the mantissa * @return */
Determine the percentage of data which is NaN in the passed-in TableReport
getPercentMissingData
{ "repo_name": "yzhnasa/TASSEL-iRods", "path": "src/net/maizegenetics/analysis/numericaltransform/Conversion.java", "license": "mit", "size": 10427 }
[ "java.math.BigDecimal", "net.maizegenetics.trait.Phenotype" ]
import java.math.BigDecimal; import net.maizegenetics.trait.Phenotype;
import java.math.*; import net.maizegenetics.trait.*;
[ "java.math", "net.maizegenetics.trait" ]
java.math; net.maizegenetics.trait;
529,684
@Nullable RequestParameter cookieParameter(String name);
@Nullable RequestParameter cookieParameter(String name);
/** * Get cookie parameter by name * * @param name Parameter name * @return */
Get cookie parameter by name
cookieParameter
{ "repo_name": "vert-x3/vertx-web", "path": "vertx-web-api-contract/src/main/java/io/vertx/ext/web/api/RequestParameters.java", "license": "apache-2.0", "size": 2286 }
[ "io.vertx.codegen.annotations.Nullable" ]
import io.vertx.codegen.annotations.Nullable;
import io.vertx.codegen.annotations.*;
[ "io.vertx.codegen" ]
io.vertx.codegen;
1,795,605
void addActionRow(LowLevelComponent... lowLevelComponents);
void addActionRow(LowLevelComponent... lowLevelComponents);
/** * Add low-level components to the message, wrapped in an ActionRow. * * @param lowLevelComponents The low level components. */
Add low-level components to the message, wrapped in an ActionRow
addActionRow
{ "repo_name": "BtoBastian/Javacord", "path": "javacord-api/src/main/java/org/javacord/api/entity/message/internal/MessageBuilderDelegate.java", "license": "lgpl-3.0", "size": 9639 }
[ "org.javacord.api.entity.message.component.LowLevelComponent" ]
import org.javacord.api.entity.message.component.LowLevelComponent;
import org.javacord.api.entity.message.component.*;
[ "org.javacord.api" ]
org.javacord.api;
2,278,191
PlainTextSegment segment = new PlainTextSegment("test"); assertThat(segment.getStaticText()).isEqualTo("test"); }
PlainTextSegment segment = new PlainTextSegment("test"); assertThat(segment.getStaticText()).isEqualTo("test"); }
/** * Verifies that the passed plain static text will be returned as static text. */
Verifies that the passed plain static text will be returned as static text
doesHaveStaticText
{ "repo_name": "pmwmedia/tinylog", "path": "tinylog-impl/src/test/java/org/tinylog/path/PlainTextSegmentTest.java", "license": "apache-2.0", "size": 1784 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
2,519,682
public Intent getIntent();
Intent function();
/** * returns Intent used to launch the activity */
returns Intent used to launch the activity
getIntent
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/frameworks/common/src/com/mediatek/common/amsplus/IAmsPlusLaunchRecord.java", "license": "gpl-2.0", "size": 3075 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
937,723
public Optional<Conflict> getConflict(@Nullable String namespace, String path);
Optional<Conflict> function(@Nullable String namespace, String path);
/** * Gets the specified conflict from the database. * * @param namespace the namespace of the conflict * @param path the conflict to retrieve * @return the conflict, or {@link Optional#absent()} if it was not found */
Gets the specified conflict from the database
getConflict
{ "repo_name": "state-hiu/GeoGit", "path": "src/core/src/main/java/org/geogit/storage/StagingDatabase.java", "license": "bsd-3-clause", "size": 1881 }
[ "com.google.common.base.Optional", "javax.annotation.Nullable", "org.geogit.api.plumbing.merge.Conflict" ]
import com.google.common.base.Optional; import javax.annotation.Nullable; import org.geogit.api.plumbing.merge.Conflict;
import com.google.common.base.*; import javax.annotation.*; import org.geogit.api.plumbing.merge.*;
[ "com.google.common", "javax.annotation", "org.geogit.api" ]
com.google.common; javax.annotation; org.geogit.api;
1,019,274
public List<? extends ReviewComment> fetchReviewCommentsForReportingPeriod(Integer rpId);
List<? extends ReviewComment> function(Integer rpId);
/** * Will list the review comments associated to reporting period. * * @param rpId the rp id * @return the list<? extends review comment> */
Will list the review comments associated to reporting period
fetchReviewCommentsForReportingPeriod
{ "repo_name": "NCIP/caaers", "path": "caAERS/software/core/src/main/java/gov/nih/nci/cabig/caaers/domain/repository/AdverseEventRoutingAndReviewRepository.java", "license": "bsd-3-clause", "size": 8634 }
[ "gov.nih.nci.cabig.caaers.domain.workflow.ReviewComment", "java.util.List" ]
import gov.nih.nci.cabig.caaers.domain.workflow.ReviewComment; import java.util.List;
import gov.nih.nci.cabig.caaers.domain.workflow.*; import java.util.*;
[ "gov.nih.nci", "java.util" ]
gov.nih.nci; java.util;
1,071,308
private boolean foundInChain(Link link, Node candidate) { String targetId = link.to; Node targetNode = findNodeById(targetId); if (targetNode == candidate) { return true; } // This algorithm relies on a nicely structured graph with well defined flows and // splits (no weird cross links // across flo...
boolean function(Link link, Node candidate) { String targetId = link.to; Node targetNode = findNodeById(targetId); if (targetNode == candidate) { return true; } List<Link> outboundLinks = findLinksFrom(targetNode, true); for (Link lnk : outboundLinks) { if (foundInChain(lnk, candidate)) { return true; } } return false;...
/** * Walk a specified link to see if it ever hits the candidate node. * * @param link points to the head of a chain of nodes * @param candidate the node possibly found on the chain of nodes * @return true if the candidate is found down the specified chain */
Walk a specified link to see if it ever hits the candidate node
foundInChain
{ "repo_name": "markfisher/spring-cloud-data", "path": "spring-cloud-dataflow-core/src/main/java/org/springframework/cloud/dataflow/core/dsl/graph/Graph.java", "license": "apache-2.0", "size": 21153 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
858,099
@WebMethod @WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v202105") @RequestWrapper(localName = "createCustomFields", targetNamespace = "https://www.google.com/apis/ads/publisher/v202105", className = "com.google.api.ads.admanager.jaxws.v202105.CustomFieldServiceInter...
@WebResult(name = "rval", targetNamespace = STRcreateCustomFieldsSTRhttps: @ResponseWrapper(localName = "createCustomFieldsResponseSTRhttps: List<CustomField> function( @WebParam(name = "customFieldsSTRhttps: List<CustomField> customFields) throws ApiException_Exception ;
/** * * Creates new {@link CustomField} objects. * * The following fields are required: * <ul> * <li>{@link CustomField#name}</li> * <li>{@link CustomField#entityType}</li> * <li>{@link CustomField#dataType}</li> * ...
Creates new <code>CustomField</code> objects. The following fields are required: <code>CustomField#name</code> <code>CustomField#entityType</code> <code>CustomField#dataType</code> <code>CustomField#visibility</code>
createCustomFields
{ "repo_name": "googleads/googleads-java-lib", "path": "modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/v202105/CustomFieldServiceInterface.java", "license": "apache-2.0", "size": 12454 }
[ "java.util.List", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.ResponseWrapper" ]
import java.util.List; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper;
import java.util.*; import javax.jws.*; import javax.xml.ws.*;
[ "java.util", "javax.jws", "javax.xml" ]
java.util; javax.jws; javax.xml;
1,525,148
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<InstanceFailoverGroupInner>, InstanceFailoverGroupInner> beginFailoverAsync( String resourceGroupName, String locationName, String failoverGroupName);
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<InstanceFailoverGroupInner>, InstanceFailoverGroupInner> beginFailoverAsync( String resourceGroupName, String locationName, String failoverGroupName);
/** * Fails over from the current primary managed instance to this managed instance. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param locationName The name of the r...
Fails over from the current primary managed instance to this managed instance
beginFailoverAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/InstanceFailoverGroupsClient.java", "license": "mit", "size": 35445 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.PollerFlux", "com.azure.resourcemanager.sql.fluent.models.InstanceFailoverGroupInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.PollerFlux; import com.azure.resourcemanager.sql.fluent.models.InstanceFailoverGroupInner;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.sql.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
235,412
//VisibileForTesting void updateDirectoryEntries(Uri uri) { ContentResolver contentResolver = getActivity().getContentResolver(); Uri docUri = DocumentsContract.buildDocumentUriUsingTree(uri, DocumentsContract.getTreeDocumentId(uri)); Uri childrenUri = DocumentsContract.b...
void updateDirectoryEntries(Uri uri) { ContentResolver contentResolver = getActivity().getContentResolver(); Uri docUri = DocumentsContract.buildDocumentUriUsingTree(uri, DocumentsContract.getTreeDocumentId(uri)); Uri childrenUri = DocumentsContract.buildChildDocumentsUriUsingTree(uri, DocumentsContract.getTreeDocument...
/** * Updates the current directory of the uri passed as an argument and its children directories. * And updates the {@link #mRecyclerView} depending on the contents of the children. * * @param uri The uri of the current directory. */
Updates the current directory of the uri passed as an argument and its children directories. And updates the <code>#mRecyclerView</code> depending on the contents of the children
updateDirectoryEntries
{ "repo_name": "wiki2014/Learning-Summary", "path": "alps/developers/samples/android/content/documentsUi/DirectorySelection/Application/src/main/java/com/example/android/directoryselection/DirectorySelectionFragment.java", "license": "gpl-3.0", "size": 9459 }
[ "android.content.ContentResolver", "android.database.Cursor", "android.net.Uri", "android.provider.DocumentsContract", "android.util.Log", "java.util.ArrayList", "java.util.List" ]
import android.content.ContentResolver; import android.database.Cursor; import android.net.Uri; import android.provider.DocumentsContract; import android.util.Log; import java.util.ArrayList; import java.util.List;
import android.content.*; import android.database.*; import android.net.*; import android.provider.*; import android.util.*; import java.util.*;
[ "android.content", "android.database", "android.net", "android.provider", "android.util", "java.util" ]
android.content; android.database; android.net; android.provider; android.util; java.util;
1,331,583
//Checks if plugin is installed. if (Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null) { //Checks if WorldGuard is enabled if (RandomCoords.getPlugin().config.getString("WorldGuard").equals("true")) { final int X = l.getBlockX(); ...
if (Bukkit.getServer().getPluginManager().getPlugin(STR) != null) { if (RandomCoords.getPlugin().config.getString(STR).equals("true")) { final int X = l.getBlockX(); final int Z = l.getBlockZ(); final int r = RandomCoords.getPlugin().config.getInt(STR); if (RandomCoords.getPlugin().config.getStringList(STR).contains(ST...
/** * Checks if the player is in, or near the specified WorldGuard regions. * @param l The location to check. * @return True or False, Is the location in one of these regions. */
Checks if the player is in, or near the specified WorldGuard regions
WorldguardCheck
{ "repo_name": "jolbol1/RandomCoordinatesV2", "path": "src/com/jolbol1/RandomCoordinates/checks/WorldGuardCheck.java", "license": "gpl-3.0", "size": 4297 }
[ "com.jolbol1.RandomCoordinates", "com.sk89q.worldedit.BlockVector", "com.sk89q.worldguard.bukkit.RegionContainer", "com.sk89q.worldguard.protection.ApplicableRegionSet", "com.sk89q.worldguard.protection.managers.RegionManager", "com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion", "com.sk89q....
import com.jolbol1.RandomCoordinates; import com.sk89q.worldedit.BlockVector; import com.sk89q.worldguard.bukkit.RegionContainer; import com.sk89q.worldguard.protection.ApplicableRegionSet; import com.sk89q.worldguard.protection.managers.RegionManager; import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegio...
import com.jolbol1.*; import com.sk89q.worldedit.*; import com.sk89q.worldguard.bukkit.*; import com.sk89q.worldguard.protection.*; import com.sk89q.worldguard.protection.managers.*; import com.sk89q.worldguard.protection.regions.*; import java.util.*; import org.bukkit.*;
[ "com.jolbol1", "com.sk89q.worldedit", "com.sk89q.worldguard", "java.util", "org.bukkit" ]
com.jolbol1; com.sk89q.worldedit; com.sk89q.worldguard; java.util; org.bukkit;
2,494,012
private void setPullToRefreshEnabled(boolean enable) { mPullToRefreshView.setMode((enable) ? PullToRefreshBase.Mode.PULL_FROM_START : PullToRefreshBase.Mode.DISABLED); }
void function(boolean enable) { mPullToRefreshView.setMode((enable) ? PullToRefreshBase.Mode.PULL_FROM_START : PullToRefreshBase.Mode.DISABLED); }
/** * Enable or disable pull-to-refresh. * * @param enable * {@code true} to enable. {@code false} to disable. */
Enable or disable pull-to-refresh
setPullToRefreshEnabled
{ "repo_name": "torte71/k-9", "path": "k9mail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java", "license": "bsd-3-clause", "size": 127649 }
[ "com.handmark.pulltorefresh.library.PullToRefreshBase" ]
import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.*;
[ "com.handmark.pulltorefresh" ]
com.handmark.pulltorefresh;
1,964,791
public com.mozu.api.contracts.commerceruntime.orders.Order resendPackageFulfillmentEmail(com.mozu.api.contracts.commerceruntime.fulfillment.FulfillmentAction action, String orderId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> client = com.mozu.api.clie...
com.mozu.api.contracts.commerceruntime.orders.Order function(com.mozu.api.contracts.commerceruntime.fulfillment.FulfillmentAction action, String orderId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> client = com.mozu.api.clients.commerce.orders.FulfillmentAct...
/** * orders-fulfillment Post ResendPackageFulfillmentEmail description DOCUMENT_HERE * <p><pre><code> * FulfillmentAction fulfillmentaction = new FulfillmentAction(); * Order order = fulfillmentaction.resendPackageFulfillmentEmail( action, orderId, responseFields); * </code></pre></p> * @param orderId U...
orders-fulfillment Post ResendPackageFulfillmentEmail description DOCUMENT_HERE <code><code> FulfillmentAction fulfillmentaction = new FulfillmentAction(); Order order = fulfillmentaction.resendPackageFulfillmentEmail( action, orderId, responseFields); </code></code>
resendPackageFulfillmentEmail
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/orders/FulfillmentActionResource.java", "license": "mit", "size": 6320 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
1,284,151
private void testStructuredNameComplicatedCommon(int vcardType) { mVerifier.initForExportTest(vcardType); final ContactEntry entry = mVerifier.addInputEntry(); entry.addContentValues(StructuredName.CONTENT_ITEM_TYPE) .put(StructuredName.FAMILY_NAME, "DoNotEmitFamilyName1") ...
void function(int vcardType) { mVerifier.initForExportTest(vcardType); final ContactEntry entry = mVerifier.addInputEntry(); entry.addContentValues(StructuredName.CONTENT_ITEM_TYPE) .put(StructuredName.FAMILY_NAME, STR) .put(StructuredName.GIVEN_NAME, STR) .put(StructuredName.MIDDLE_NAME, STR) .put(StructuredName.PREFI...
/** * Confirms all the other sides of the handling is correctly interpreted at one time. * * A kind of regression test for StructuredName handling. */
Confirms all the other sides of the handling is correctly interpreted at one time. A kind of regression test for StructuredName handling
testStructuredNameComplicatedCommon
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/com/android/vcard/tests/VCardExporterTests.java", "license": "apache-2.0", "size": 61541 }
[ "android.content.ContentValues", "android.provider.ContactsContract", "com.android.vcard.VCardConfig", "com.android.vcard.tests.testutils.ContactEntry", "com.android.vcard.tests.testutils.PropertyNodesVerifierElem", "java.util.Arrays" ]
import android.content.ContentValues; import android.provider.ContactsContract; import com.android.vcard.VCardConfig; import com.android.vcard.tests.testutils.ContactEntry; import com.android.vcard.tests.testutils.PropertyNodesVerifierElem; import java.util.Arrays;
import android.content.*; import android.provider.*; import com.android.vcard.*; import com.android.vcard.tests.testutils.*; import java.util.*;
[ "android.content", "android.provider", "com.android.vcard", "java.util" ]
android.content; android.provider; com.android.vcard; java.util;
354,870
List<Annotation> getAnnotations(List<AnnotationQuery> queries);
List<Annotation> getAnnotations(List<AnnotationQuery> queries);
/** * Reads annotation data. * * @param queries The list of queries to execute. Cannot be null, but may be empty. * * @return The query results. Will never be null, but may be empty. */
Reads annotation data
getAnnotations
{ "repo_name": "SalesforceEng/Argus", "path": "ArgusCore/src/main/java/com/salesforce/dva/argus/service/TSDBService.java", "license": "bsd-3-clause", "size": 7899 }
[ "com.salesforce.dva.argus.entity.Annotation", "com.salesforce.dva.argus.service.tsdb.AnnotationQuery", "java.util.List" ]
import com.salesforce.dva.argus.entity.Annotation; import com.salesforce.dva.argus.service.tsdb.AnnotationQuery; import java.util.List;
import com.salesforce.dva.argus.entity.*; import com.salesforce.dva.argus.service.tsdb.*; import java.util.*;
[ "com.salesforce.dva", "java.util" ]
com.salesforce.dva; java.util;
2,742,114
public static BigDecimal arctan(BigDecimal x, int scale) { // Check that |x| < 1. if (x.abs().compareTo(BigDecimal.valueOf(1)) >= 0) { throw new IllegalArgumentException("|x| >= 1"); } // If x is negative, return -arctan(-x). if (x.signum() == -1) ...
static BigDecimal function(BigDecimal x, int scale) { if (x.abs().compareTo(BigDecimal.valueOf(1)) >= 0) { throw new IllegalArgumentException(STR); } if (x.signum() == -1) { return arctan(x.negate(), scale).negate(); } else { return arctanTaylor(x, scale); } }
/** * Compute the arctangent of x to a given scale, |x| < 1 * @param x the value of x * @param scale the desired scale of the result * @return the result value */
Compute the arctangent of x to a given scale, |x| < 1
arctan
{ "repo_name": "StiaanUyttersprot/Master-NFPGenerator", "path": "BigDecimalMinkowski/src/Vector.java", "license": "gpl-2.0", "size": 6449 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,750,417
public void testAsynchWriterAttribBehaviour1() { DiskStoreFactory dsf = cache.createDiskStoreFactory(); ((DiskStoreFactoryImpl)dsf).setMaxOplogSizeInBytes(10000); File dir = new File("testingDirectoryDefault"); dir.mkdir(); dir.deleteOnExit(); File[] dirs = { dir }; dsf.setDiskDirs(dirs)...
void function() { DiskStoreFactory dsf = cache.createDiskStoreFactory(); ((DiskStoreFactoryImpl)dsf).setMaxOplogSizeInBytes(10000); File dir = new File(STR); dir.mkdir(); dir.deleteOnExit(); File[] dirs = { dir }; dsf.setDiskDirs(dirs); AttributesFactory factory = new AttributesFactory(); final long t1 = System.current...
/** * Tests if buffer size & time are not set , the asynch writer gets awakened * on time basis of default 1 second * * @author Asif */
Tests if buffer size & time are not set , the asynch writer gets awakened on time basis of default 1 second
testAsynchWriterAttribBehaviour1
{ "repo_name": "gemxd/gemfirexd-oss", "path": "tests/core/src/main/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java", "license": "apache-2.0", "size": 142001 }
[ "com.gemstone.gemfire.cache.AttributesFactory", "com.gemstone.gemfire.cache.DataPolicy", "com.gemstone.gemfire.cache.DiskStore", "com.gemstone.gemfire.cache.DiskStoreFactory", "com.gemstone.gemfire.cache.Scope", "java.io.File" ]
import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.DataPolicy; import com.gemstone.gemfire.cache.DiskStore; import com.gemstone.gemfire.cache.DiskStoreFactory; import com.gemstone.gemfire.cache.Scope; import java.io.File;
import com.gemstone.gemfire.cache.*; import java.io.*;
[ "com.gemstone.gemfire", "java.io" ]
com.gemstone.gemfire; java.io;
1,356,639
private float getInheritedOpacity(SVGSVGElement svgElem, Node element){ float returnOpactiy = 1.0f; if (element.getParentNode() == null) return returnOpactiy; //Get attribute of this element try{ if (element instanceof SVGGraphicsElement){ SVGGraphicsElement gfx = (SVGGraphicsElement)ele...
float function(SVGSVGElement svgElem, Node element){ float returnOpactiy = 1.0f; if (element.getParentNode() == null) return returnOpactiy; try{ if (element instanceof SVGGraphicsElement){ SVGGraphicsElement gfx = (SVGGraphicsElement)element; float opacity = ((CSSPrimitiveValue)svgElem.getComputedStyle(gfx, STRopacityS...
/** * Gets the inherited opacity. * * @param svgElem the svg elem * @param element the element * * @return the inherited opacity */
Gets the inherited opacity
getInheritedOpacity
{ "repo_name": "acm-uiuc/Tacchi", "path": "src/org/mt4j/util/xml/svg/SVGLoader.java", "license": "gpl-2.0", "size": 104067 }
[ "org.apache.batik.dom.svg.SVGGraphicsElement", "org.w3c.dom.Node", "org.w3c.dom.css.CSSPrimitiveValue", "org.w3c.dom.svg.SVGSVGElement" ]
import org.apache.batik.dom.svg.SVGGraphicsElement; import org.w3c.dom.Node; import org.w3c.dom.css.CSSPrimitiveValue; import org.w3c.dom.svg.SVGSVGElement;
import org.apache.batik.dom.svg.*; import org.w3c.dom.*; import org.w3c.dom.css.*; import org.w3c.dom.svg.*;
[ "org.apache.batik", "org.w3c.dom" ]
org.apache.batik; org.w3c.dom;
358,978
public void setElements(IAdaptable[] elements);
void function(IAdaptable[] elements);
/** * Sets the elements that are contained in this working set. * * @param elements * the elements to set in this working set * @since 3.3 it is now recommended that all calls to this method pass * through the results from calling * {@link #adaptElements(IAdaptable[])} with the d...
Sets the elements that are contained in this working set
setElements
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/ui/IWorkingSet.java", "license": "epl-1.0", "size": 7373 }
[ "org.eclipse.core.runtime.IAdaptable" ]
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
491,570
public void setDeleted(Date deleted);
void function(Date deleted);
/** * Set the timestamp for logically deleted objects. * * @param deleted not null if the instance should be considered logically deleted. */
Set the timestamp for logically deleted objects
setDeleted
{ "repo_name": "caratarse/caratarse-auth", "path": "caratarse-auth-model/src/main/java/org/caratarse/auth/model/po/LogicallyDeleted.java", "license": "apache-2.0", "size": 1515 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,638,592
public int checkFilesOnFS(String dirPath) throws FinderException, RemoteException { FileSystemMgt mgt = newFileSystemMgt(); int offset = 0; Collection files = mgt.getFilesOnFS(dirPath, offset, limitNumberOfFilesPerTask); FileDTO dto; File f; ...
int function(String dirPath) throws FinderException, RemoteException { FileSystemMgt mgt = newFileSystemMgt(); int offset = 0; Collection files = mgt.getFilesOnFS(dirPath, offset, limitNumberOfFilesPerTask); FileDTO dto; File f; int numDBFiles = 0; int numFilesNotAvail = 0; while (!files.isEmpty()) { numDBFiles += file...
/** * Check if the file of given filesystems are available. * * @param dirPath * @return 1 if all available, -1 if FS is empty or 0 if some available and * some not. * * @throws FinderException * @throws RemoteException */
Check if the file of given filesystems are available
checkFilesOnFS
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4jboss-all/tags/DCM4CHEE_2_10_7/dcm4jboss-sar/src/java/org/dcm4chex/archive/mbean/FileSystemMgtService.java", "license": "apache-2.0", "size": 58768 }
[ "java.io.File", "java.rmi.RemoteException", "java.util.Collection", "java.util.Iterator", "javax.ejb.FinderException", "org.dcm4chex.archive.ejb.interfaces.FileDTO", "org.dcm4chex.archive.ejb.interfaces.FileSystemMgt", "org.dcm4chex.archive.util.FileUtils" ]
import java.io.File; import java.rmi.RemoteException; import java.util.Collection; import java.util.Iterator; import javax.ejb.FinderException; import org.dcm4chex.archive.ejb.interfaces.FileDTO; import org.dcm4chex.archive.ejb.interfaces.FileSystemMgt; import org.dcm4chex.archive.util.FileUtils;
import java.io.*; import java.rmi.*; import java.util.*; import javax.ejb.*; import org.dcm4chex.archive.ejb.interfaces.*; import org.dcm4chex.archive.util.*;
[ "java.io", "java.rmi", "java.util", "javax.ejb", "org.dcm4chex.archive" ]
java.io; java.rmi; java.util; javax.ejb; org.dcm4chex.archive;
1,940,709
@Template("<div class=\"{0}\" id=\"{1}\" title=\"{2}\" aria-role=\"treeitem\">{3}</div>") SafeHtml outerDivItem(String classes,String id, String title, String content);
@Template(STR{0}\STR{1}\STR{2}\STRtreeitem\STR) SafeHtml outerDivItem(String classes,String id, String title, String content);
/** * Outer div for Tree Item. * * @param classes the classes * @param id the id * @param title the title * @param content the content * @return the safe html */
Outer div for Tree Item
outerDivItem
{ "repo_name": "JaLandry/MeasureAuthoringTool_LatestSprint", "path": "mat/src/mat/client/clause/clauseworkspace/view/XmlTreeView.java", "license": "apache-2.0", "size": 94235 }
[ "com.google.gwt.safehtml.client.SafeHtmlTemplates", "com.google.gwt.safehtml.shared.SafeHtml" ]
import com.google.gwt.safehtml.client.SafeHtmlTemplates; import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.client.*; import com.google.gwt.safehtml.shared.*;
[ "com.google.gwt" ]
com.google.gwt;
954,261
private void switchToMeetingActivity() { startActivity(new Intent(this, MeetingActivity.class)); }
void function() { startActivity(new Intent(this, MeetingActivity.class)); }
/** * Starts MeetingActivity * * @see MeetingActivity */
Starts MeetingActivity
switchToMeetingActivity
{ "repo_name": "dima2015/android", "path": "app/src/main/java/com/plunner/plunner/activities/activities/DashboardActivity.java", "license": "gpl-2.0", "size": 7575 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
1,787,562
public void nodeToBeRemoved(Node removedNode) { if (iterators != null) { Iterator it = iterators.iterator(); while (it.hasNext()) { ((DOMNodeIterator)it.next()).nodeToBeRemoved(removedNode); } } }
void function(Node removedNode) { if (iterators != null) { Iterator it = iterators.iterator(); while (it.hasNext()) { ((DOMNodeIterator)it.next()).nodeToBeRemoved(removedNode); } } }
/** * Called by the DOM when a node will be removed from the current document. */
Called by the DOM when a node will be removed from the current document
nodeToBeRemoved
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/dom/traversal/TraversalSupport.java", "license": "apache-2.0", "size": 3585 }
[ "java.util.Iterator", "org.w3c.dom.Node" ]
import java.util.Iterator; import org.w3c.dom.Node;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
2,244,027
public boolean isModeSet(char mode) { return ModeUtils.isModeSet(this.mode, mode); }
boolean function(char mode) { return ModeUtils.isModeSet(this.mode, mode); }
/** * Gets whether a user mode is set * * @param mode the mode to test * @return true if the mode is set */
Gets whether a user mode is set
isModeSet
{ "repo_name": "jcowgill/jircd", "path": "src/main/java/uk/org/cowgill/james/jircd/Client.java", "license": "apache-2.0", "size": 17635 }
[ "uk.org.cowgill.james.jircd.util.ModeUtils" ]
import uk.org.cowgill.james.jircd.util.ModeUtils;
import uk.org.cowgill.james.jircd.util.*;
[ "uk.org.cowgill" ]
uk.org.cowgill;
243,713
@Override public void startRunning() { // following are for HTTPResponseOutputStream _context.statManager().createRateStat("i2ptunnel.httpCompressionRatio", "ratio of compressed size to decompressed size after transfer", "I2PTunnel", new long[] { 60*60*1000 }); _context.statManager().cre...
void function() { _context.statManager().createRateStat(STR, STR, STR, new long[] { 60*60*1000 }); _context.statManager().createRateStat(STR, STR, STR, new long[] { 60*60*1000 }); _context.statManager().createRateStat(STR, STR, STR, new long[] { 60*60*1000 }); super.startRunning(); if (open) { this.isr = new InternalSo...
/** * Actually start working on incoming connections. * Overridden to start an internal socket too. * */
Actually start working on incoming connections. Overridden to start an internal socket too
startRunning
{ "repo_name": "NoYouShutup/CryptMeme", "path": "CryptMeme/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java", "license": "mit", "size": 75605 }
[ "net.i2p.util.PortMapper" ]
import net.i2p.util.PortMapper;
import net.i2p.util.*;
[ "net.i2p.util" ]
net.i2p.util;
1,542,358
public void addViews(List<View> views, boolean enabled) { if (enabled) { addAdapter(new EnabledSackAdapter(views)); } else { addAdapter(new SackOfViewsAdapter(views)); } }
void function(List<View> views, boolean enabled) { if (enabled) { addAdapter(new EnabledSackAdapter(views)); } else { addAdapter(new SackOfViewsAdapter(views)); } }
/** * Adds a list of views to the roster of things to appear in the aggregate * list. * * @param views List of views to add * @param enabled false if views are disabled, true if enabled */
Adds a list of views to the roster of things to appear in the aggregate list
addViews
{ "repo_name": "moreus/vMail", "path": "src/com/wii/vmail/ui/adapter/MergeAdapter.java", "license": "mit", "size": 9933 }
[ "android.view.View", "java.util.List" ]
import android.view.View; import java.util.List;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
1,693,501
public void mutePublishedMedia(MutedMediaType muteType, String participantId) throws RoomException { log.debug("Request [MUTE_PUBLISHED] muteType={} ({})", muteType, participantId); Participant participant = getParticipant(participantId); String name = participant.getName(); if (participant.isCl...
void function(MutedMediaType muteType, String participantId) throws RoomException { log.debug(STR, muteType, participantId); Participant participant = getParticipant(participantId); String name = participant.getName(); if (participant.isClosed()) { throw new RoomException(Code.USER_CLOSED_ERROR_CODE, STR + name + STR);...
/** * Mutes the streamed media of this publisher in a selective manner. * * @param muteType which leg should be disconnected (audio, video or both) * @param participantId identifier of the participant * @throws RoomException in case the participant doesn't exist, has been closed, is not * ...
Mutes the streamed media of this publisher in a selective manner
mutePublishedMedia
{ "repo_name": "AntimatterResearch/kurento-room", "path": "kurento-room-sdk/src/main/java/org/kurento/room/RoomManager.java", "license": "apache-2.0", "size": 40413 }
[ "org.kurento.room.api.MutedMediaType", "org.kurento.room.exception.RoomException", "org.kurento.room.internal.Participant" ]
import org.kurento.room.api.MutedMediaType; import org.kurento.room.exception.RoomException; import org.kurento.room.internal.Participant;
import org.kurento.room.api.*; import org.kurento.room.exception.*; import org.kurento.room.internal.*;
[ "org.kurento.room" ]
org.kurento.room;
1,897,259
public void writeDatasetRun( JRDatasetRun datasetRun, String parentName) { if(datasetRun != null) { String runName = parentName + "Run"; write( "JRDesignDatasetRun " + runName + " = new JRDesignDatasetRun();\n"); write( runName + ".setDatasetName(\"{0}\");\n", JRStringUtil.escapeJavaStringLiteral(datas...
void function( JRDatasetRun datasetRun, String parentName) { if(datasetRun != null) { String runName = parentName + "Run"; write( STR + runName + STR); write( runName + STR{0}\");\n", JRStringUtil.escapeJavaStringLiteral(datasetRun.getDatasetName())); writeExpression( datasetRun.getParametersMapExpression(), runName, S...
/** * Outputs the XML representation of a subdataset run object. * * @param datasetRun the subdataset run */
Outputs the XML representation of a subdataset run object
writeDatasetRun
{ "repo_name": "aleatorio12/ProVentasConnector", "path": "jasperreports-6.2.1-project/jasperreports-6.2.1/src/net/sf/jasperreports/engine/util/JRApiWriter.java", "license": "gpl-3.0", "size": 146427 }
[ "java.util.List", "java.util.ListIterator", "net.sf.jasperreports.engine.JRDatasetParameter", "net.sf.jasperreports.engine.JRDatasetRun", "net.sf.jasperreports.engine.ReturnValue" ]
import java.util.List; import java.util.ListIterator; import net.sf.jasperreports.engine.JRDatasetParameter; import net.sf.jasperreports.engine.JRDatasetRun; import net.sf.jasperreports.engine.ReturnValue;
import java.util.*; import net.sf.jasperreports.engine.*;
[ "java.util", "net.sf.jasperreports" ]
java.util; net.sf.jasperreports;
821,927
public static List<? extends ASTNode> getContainingList(ASTNode node) { StructuralPropertyDescriptor locationInParent= node.getLocationInParent(); if (locationInParent != null && locationInParent.isChildListProperty()) { return (List<? extends ASTNode>) node.getParent().getStructuralProperty(locatio...
static List<? extends ASTNode> function(ASTNode node) { StructuralPropertyDescriptor locationInParent= node.getLocationInParent(); if (locationInParent != null && locationInParent.isChildListProperty()) { return (List<? extends ASTNode>) node.getParent().getStructuralProperty(locationInParent); } return null; }
/** * Returns the list that contains the given ASTNode. If the node * isn't part of any list, <code>null</code> is returned. * * @param node the node in question * @return the list that contains the node or <code>null</code> */
Returns the list that contains the given ASTNode. If the node isn't part of any list, <code>null</code> is returned
getContainingList
{ "repo_name": "trylimits/Eclipse-Postfix-Code-Completion-Juno38", "path": "juno38/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodes.java", "license": "epl-1.0", "size": 35121 }
[ "java.util.List", "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.StructuralPropertyDescriptor" ]
import java.util.List; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;
import java.util.*; import org.eclipse.jdt.core.dom.*;
[ "java.util", "org.eclipse.jdt" ]
java.util; org.eclipse.jdt;
2,242,557
private ByteBuffer copyBuffer(ByteBuffer inbuf, int numBytes) { ByteBuffer b1 = Utils.getBuffer(); assert b1.remaining() >= numBytes; byte[] b = b1.array(); inbuf.get(b, 0, numBytes); b1.limit(numBytes); return b1; }
ByteBuffer function(ByteBuffer inbuf, int numBytes) { ByteBuffer b1 = Utils.getBuffer(); assert b1.remaining() >= numBytes; byte[] b = b1.array(); inbuf.get(b, 0, numBytes); b1.limit(numBytes); return b1; }
/** * Copies inbuf (numBytes from its position) to new buffer. The returned * buffer's position is zero and limit is at end (numBytes) */
Copies inbuf (numBytes from its position) to new buffer. The returned buffer's position is zero and limit is at end (numBytes)
copyBuffer
{ "repo_name": "dmlloyd/openjdk-modules", "path": "jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseContent.java", "license": "gpl-2.0", "size": 9824 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,730,243
public void setContractsGrantsInvoiceDocumentDao(ContractsGrantsInvoiceDocumentDao contractsGrantsInvoiceDocumentDao) { this.contractsGrantsInvoiceDocumentDao = contractsGrantsInvoiceDocumentDao; }
void function(ContractsGrantsInvoiceDocumentDao contractsGrantsInvoiceDocumentDao) { this.contractsGrantsInvoiceDocumentDao = contractsGrantsInvoiceDocumentDao; }
/** * Sets the contractsGrantsInvoiceDocumentDao attribute value. * * @param contractsGrantsInvoiceDocumentDao The contractsGrantsInvoiceDocumentDao to set. */
Sets the contractsGrantsInvoiceDocumentDao attribute value
setContractsGrantsInvoiceDocumentDao
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/service/impl/DunningLetterServiceImpl.java", "license": "agpl-3.0", "size": 24871 }
[ "org.kuali.kfs.module.ar.document.dataaccess.ContractsGrantsInvoiceDocumentDao" ]
import org.kuali.kfs.module.ar.document.dataaccess.ContractsGrantsInvoiceDocumentDao;
import org.kuali.kfs.module.ar.document.dataaccess.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
37,586
public String buildUri(String representationId, long segmentNumber, int bandwidth, long time) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < identifierCount; i++) { builder.append(urlPieces[i]); if (identifiers[i] == REPRESENTATION_ID) { builder.append(representationId)...
String function(String representationId, long segmentNumber, int bandwidth, long time) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < identifierCount; i++) { builder.append(urlPieces[i]); if (identifiers[i] == REPRESENTATION_ID) { builder.append(representationId); } else if (identifiers[i] == NUMBER...
/** * Constructs a Uri from the template, substituting in the provided arguments. * * <p>Arguments whose corresponding identifiers are not present in the template will be ignored. * * @param representationId The representation identifier. * @param segmentNumber The segment number. * @param bandwidt...
Constructs a Uri from the template, substituting in the provided arguments. Arguments whose corresponding identifiers are not present in the template will be ignored
buildUri
{ "repo_name": "androidx/media", "path": "libraries/exoplayer_dash/src/main/java/androidx/media3/exoplayer/dash/manifest/UrlTemplate.java", "license": "apache-2.0", "size": 7420 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
782,264
Collection<Entry<URI,Pair<DownloaderT, VisitableDownloader<MsDState>>>> getAll();
Collection<Entry<URI,Pair<DownloaderT, VisitableDownloader<MsDState>>>> getAll();
/** * Accesses all of the downloads. * * @return All the downloads. */
Accesses all of the downloads
getAll
{ "repo_name": "adamfisk/littleshoot-client", "path": "client/services/src/main/java/org/lastbamboo/client/services/download/DownloadTracker.java", "license": "gpl-2.0", "size": 5488 }
[ "java.util.Collection", "java.util.Map", "org.lastbamboo.common.download.MsDState", "org.lastbamboo.common.download.VisitableDownloader", "org.littleshoot.util.Pair" ]
import java.util.Collection; import java.util.Map; import org.lastbamboo.common.download.MsDState; import org.lastbamboo.common.download.VisitableDownloader; import org.littleshoot.util.Pair;
import java.util.*; import org.lastbamboo.common.download.*; import org.littleshoot.util.*;
[ "java.util", "org.lastbamboo.common", "org.littleshoot.util" ]
java.util; org.lastbamboo.common; org.littleshoot.util;
2,342,235
public char[] toCharArray(int start, int end) { int length = end - start; if (length == 0) { return EmptyArrays.EMPTY_CHARS; } if (start < 0 || length > length() - start) { throw new IndexOutOfBoundsException("expected: " + "0 <= start(" + start + ") <= srcId...
char[] function(int start, int end) { int length = end - start; if (length == 0) { return EmptyArrays.EMPTY_CHARS; } if (start < 0 length > length() - start) { throw new IndexOutOfBoundsException(STR + STR + start + STR + length + STR + length() + ')'); } final char[] buffer = new char[length]; for (int i = 0, j = star...
/** * Copies the characters in this string to a character array. * * @return a character array containing the characters of this string. */
Copies the characters in this string to a character array
toCharArray
{ "repo_name": "danbev/netty", "path": "common/src/main/java/io/netty/util/AsciiString.java", "license": "apache-2.0", "size": 37250 }
[ "io.netty.util.internal.EmptyArrays" ]
import io.netty.util.internal.EmptyArrays;
import io.netty.util.internal.*;
[ "io.netty.util" ]
io.netty.util;
1,951,166
public static synchronized InvocationHandler putMethodProxy(Method method, InvocationHandler invocationHandler) { return methodProxies.put(method, invocationHandler); }
static synchronized InvocationHandler function(Method method, InvocationHandler invocationHandler) { return methodProxies.put(method, invocationHandler); }
/** * Set a proxy for a method. Whenever this method is called the invocation * handler will be invoked instead. * * @return The method proxy if any. */
Set a proxy for a method. Whenever this method is called the invocation handler will be invoked instead
putMethodProxy
{ "repo_name": "jayway/powermock", "path": "powermock-core/src/main/java/org/powermock/core/MockRepository.java", "license": "apache-2.0", "size": 12957 }
[ "java.lang.reflect.InvocationHandler", "java.lang.reflect.Method" ]
import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
823,441
public void setTargetNameBox(TextBox targetNameBox) { this._targetNameBox = targetNameBox; }
void function(TextBox targetNameBox) { this._targetNameBox = targetNameBox; }
/** * Sets the target name box. * * @param targetNameBox * the new target name box */
Sets the target name box
setTargetNameBox
{ "repo_name": "Governance/dtgov", "path": "dtgov-ui-war/src/main/java/org/overlord/dtgov/ui/client/local/pages/TargetPage.java", "license": "apache-2.0", "size": 23891 }
[ "com.google.gwt.user.client.ui.TextBox" ]
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
2,912,488
@VisibleForTesting public static String getNodeString(NodeId nodeId) { return nodeId.toString().replace(":", "_"); }
static String function(NodeId nodeId) { return nodeId.toString().replace(":", "_"); }
/** * Converts a nodeId to a form used in the app log file name. * @param nodeId * @return the node string to be used to construct the file name. */
Converts a nodeId to a form used in the app log file name
getNodeString
{ "repo_name": "bruthe/hadoop-2.6.0r", "path": "src/yarn/common/org/apache/hadoop/yarn/logaggregation/LogAggregationUtils.java", "license": "apache-2.0", "size": 3865 }
[ "org.apache.hadoop.yarn.api.records.NodeId" ]
import org.apache.hadoop.yarn.api.records.NodeId;
import org.apache.hadoop.yarn.api.records.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
32,658
public static int getDirectionToMove(int fromX, int fromY, int targetX, int targetY) { int mx = targetX-fromX; int my = targetY-fromY; if (mx == 0) { if (my > 0) { return DIRECTION_DOWN; } if (my < 0) { return DIRECTION_UP; } } if (mx < 0){ if (my == 0...
static int function(int fromX, int fromY, int targetX, int targetY) { int mx = targetX-fromX; int my = targetY-fromY; if (mx == 0) { if (my > 0) { return DIRECTION_DOWN; } if (my < 0) { return DIRECTION_UP; } } if (mx < 0){ if (my == 0) { return DIRECTION_LEFT; } if (my < 0) { if (DiceGenerator.getRandom(1)==0) { retur...
/** * Get closest direction to target * @param fromX * @param fromY * @param targetX * @param targetY * @return Direction */
Get closest direction to target
getDirectionToMove
{ "repo_name": "tuomount/JHeroes", "path": "src/org/jheroes/map/character/AIPath.java", "license": "gpl-2.0", "size": 14546 }
[ "org.jheroes.map.DiceGenerator" ]
import org.jheroes.map.DiceGenerator;
import org.jheroes.map.*;
[ "org.jheroes.map" ]
org.jheroes.map;
1,332,118
public void onContainerViewChanged(ViewGroup containerView) { mContainerView = containerView; }
void function(ViewGroup containerView) { mContainerView = containerView; }
/** * Invoked when container view is changed. * * @param containerView new container view. */
Invoked when container view is changed
onContainerViewChanged
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillProvider.java", "license": "bsd-3-clause", "size": 39882 }
[ "android.view.ViewGroup" ]
import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
2,845,768
@Test public void testIsRestartable() throws Exception { // setup final DummyAbstractComponent component = new DummyAbstractComponent(); component.initialize(new JID("sub.domain"), null); final IQ pingRequest = new IQ(Type.get); pingRequest.setChildElement("ping", AbstractComponent.NAMESPACE_XMPP_...
void function() throws Exception { final DummyAbstractComponent component = new DummyAbstractComponent(); component.initialize(new JID(STR), null); final IQ pingRequest = new IQ(Type.get); pingRequest.setChildElement("ping", AbstractComponent.NAMESPACE_XMPP_PING); pingRequest.setFrom(STR); pingRequest.setTo(component.j...
/** * Every component should be functional after it has been shutdown and * restarted. * * This test creates a component, starts, stops and restarts it, and * verifies that it then responds to XMPP Ping requests. * * @see <a * href="http://www.igniterealtime.org/issues/browse/TINDER-31">T...
Every component should be functional after it has been shutdown and restarted. This test creates a component, starts, stops and restarts it, and verifies that it then responds to XMPP Ping requests
testIsRestartable
{ "repo_name": "xose/tinder", "path": "src/test/java/org/xmpp/component/AbstractComponentTest.java", "license": "apache-2.0", "size": 13234 }
[ "org.junit.Assert", "org.xmpp.packet.IQ" ]
import org.junit.Assert; import org.xmpp.packet.IQ;
import org.junit.*; import org.xmpp.packet.*;
[ "org.junit", "org.xmpp.packet" ]
org.junit; org.xmpp.packet;
444,012
public static void acquire(Semaphore sem) throws IgniteInterruptedCheckedException { try { sem.acquire(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IgniteInterruptedCheckedException(e); } }
static void function(Semaphore sem) throws IgniteInterruptedCheckedException { try { sem.acquire(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IgniteInterruptedCheckedException(e); } }
/** * Acquires a permit from provided semaphore. * * @param sem Semaphore. * @throws org.apache.ignite.internal.IgniteInterruptedCheckedException Wrapped {@link InterruptedException}. */
Acquires a permit from provided semaphore
acquire
{ "repo_name": "shurun19851206/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 289056 }
[ "java.util.concurrent.Semaphore", "org.apache.ignite.internal.IgniteInterruptedCheckedException" ]
import java.util.concurrent.Semaphore; import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import java.util.concurrent.*; import org.apache.ignite.internal.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,743,080
List<T> getSpaces(T application);
List<T> getSpaces(T application);
/** * Returns all configured spaces for the given application. * @param application The application that owns the spaces * @return All configured spaces for the given application * @since 9.5.0 */
Returns all configured spaces for the given application
getSpaces
{ "repo_name": "kovaloid/infoarchive-sip-sdk", "path": "configuration/src/main/java/com/opentext/ia/configuration/Configuration.java", "license": "mpl-2.0", "size": 12727 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
904,181
@Generated @Selector("alignment") @NInt public native long alignment();
@Selector(STR) native long function();
/** * Alignment of text within annotation bounds. Supported: NSLeftTextAlignment, NSRightTextAlignment and * NSCenterTextAlignment. * Used by annotations type(s): /FreeText, /Widget (field type(s): /Tx). */
Alignment of text within annotation bounds. Supported: NSLeftTextAlignment, NSRightTextAlignment and NSCenterTextAlignment. Used by annotations type(s): /FreeText, /Widget (field type(s): /Tx)
alignment
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/pdfkit/PDFAnnotation.java", "license": "apache-2.0", "size": 36415 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
574,301
public static boolean isLocalAddress (InetAddress addr) { // Check if the address is any local or loop back boolean local = addr.isAnyLocalAddress () || addr.isLoopbackAddress (); // Check if the address is defined on any interface if (!local) { try { local = NetworkInterface.getByInetA...
static boolean function (InetAddress addr) { boolean local = addr.isAnyLocalAddress () addr.isLoopbackAddress (); if (!local) { try { local = NetworkInterface.getByInetAddress (addr) != null; } catch (SocketException e) { local = false; } } return local; }
/** * Given an InetAddress, checks to see if the address is a local address, by comparing the address * with all the interfaces on the node. * @param addr address to check if it is local node's address * @return true if the address corresponds to the local node */
Given an InetAddress, checks to see if the address is a local address, by comparing the address with all the interfaces on the node
isLocalAddress
{ "repo_name": "mapleez/ezy", "path": "commonutils/src/main/java/com/dt/ez/common/utils/Addressing.java", "license": "apache-2.0", "size": 5167 }
[ "java.net.InetAddress", "java.net.NetworkInterface", "java.net.SocketException" ]
import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException;
import java.net.*;
[ "java.net" ]
java.net;
1,271,765