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
List<IExpression> getParentList(IExpression childExpression);
List<IExpression> getParentList(IExpression childExpression);
/** * To get the list of Parents of the given Expression. * @param childExpression the Child Expression reference. * @return The List parent of Expression for th given childExpression. */
To get the list of Parents of the given Expression
getParentList
{ "repo_name": "NCIP/metadata-based-query", "path": "software/Query/src/main/java/edu/wustl/common/querysuite/queryobject/IJoinGraph.java", "license": "bsd-3-clause", "size": 4809 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,634,439
public Bitmap loadImageSync(String uri) { return loadImageSync(uri, null, null); }
Bitmap function(String uri) { return loadImageSync(uri, null, null); }
/** * Loads and decodes image synchronously.<br /> * Default display image options * {@linkplain ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions) from * configuration} will be used.<br /> * <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this m...
Loads and decodes image synchronously. Default display image options ImageLoaderConfiguration.Builder#defaultDisplayImageOptions(DisplayImageOptions) from configuration will be used
loadImageSync
{ "repo_name": "xiaohuoban/milian-client-android", "path": "project/extern_libs/Android-Universal-Image-Loader/library/src/com/nostra13/universalimageloader/core/ImageLoader.java", "license": "apache-2.0", "size": 38384 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,293,790
public void applyLayout(final LGraph lgraph) { Object graphOrigin = lgraph.getProperty(InternalProperties.ORIGIN); if (!(graphOrigin instanceof ElkNode)) { return; } // The ElkNode that represents this graph in the original ElkGraph ElkNode parentElkNode ...
void function(final LGraph lgraph) { Object graphOrigin = lgraph.getProperty(InternalProperties.ORIGIN); if (!(graphOrigin instanceof ElkNode)) { return; } ElkNode parentElkNode = (ElkNode) graphOrigin; LNode parentLNode = (LNode) lgraph.getProperty(InternalProperties.PARENT_LNODE); KVector offset = new KVector(lgraph....
/** * Applies the layout information contained in the given LGraph to the ElkGraph elements it was * created from. All source ElkGraph elements are expected to be accessible through their LGraph * counterparts through the {@link InternalProperties#ORIGIN} property. * * @param lgraph the LGraph...
Applies the layout information contained in the given LGraph to the ElkGraph elements it was created from. All source ElkGraph elements are expected to be accessible through their LGraph counterparts through the <code>InternalProperties#ORIGIN</code> property
applyLayout
{ "repo_name": "eNBeWe/elk", "path": "plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/graph/transform/ElkGraphLayoutTransferrer.java", "license": "epl-1.0", "size": 18644 }
[ "com.google.common.collect.Lists", "java.util.EnumSet", "java.util.List", "org.eclipse.elk.alg.layered.graph.LEdge", "org.eclipse.elk.alg.layered.graph.LGraph", "org.eclipse.elk.alg.layered.graph.LGraphUtil", "org.eclipse.elk.alg.layered.graph.LNode", "org.eclipse.elk.alg.layered.graph.LPadding", "o...
import com.google.common.collect.Lists; import java.util.EnumSet; import java.util.List; import org.eclipse.elk.alg.layered.graph.LEdge; import org.eclipse.elk.alg.layered.graph.LGraph; import org.eclipse.elk.alg.layered.graph.LGraphUtil; import org.eclipse.elk.alg.layered.graph.LNode; import org.eclipse.elk.alg.layere...
import com.google.common.collect.*; import java.util.*; import org.eclipse.elk.alg.layered.graph.*; import org.eclipse.elk.alg.layered.options.*; import org.eclipse.elk.core.math.*; import org.eclipse.elk.core.options.*; import org.eclipse.elk.graph.*;
[ "com.google.common", "java.util", "org.eclipse.elk" ]
com.google.common; java.util; org.eclipse.elk;
1,620,103
public TabWebContentsDelegateAndroid createWebContentsDelegate( Tab tab, ChromeActivity activity) { return new TabWebContentsDelegateAndroid(tab, activity); }
TabWebContentsDelegateAndroid function( Tab tab, ChromeActivity activity) { return new TabWebContentsDelegateAndroid(tab, activity); }
/** * Creates the {@link WebContentsDelegateAndroid} the tab will be initialized with. * @param tab The associated {@link Tab}. * @param activity The {@link ChromeActivity} that the tab belongs to. * @return The {@link WebContentsDelegateAndroid} to be used for this tab. */
Creates the <code>WebContentsDelegateAndroid</code> the tab will be initialized with
createWebContentsDelegate
{ "repo_name": "js0701/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/tab/TabDelegateFactory.java", "license": "bsd-3-clause", "size": 3159 }
[ "org.chromium.chrome.browser.ChromeActivity" ]
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
1,213,301
private static void removeInnerNameFolder(Path worldPath) { // We successfully copied the region folder elsewhere so now delete the DIM-1/DIM1 inside // world_nether/world_the_end try { Files.delete(worldPath.resolve(worldPath.getFileName().toString())); } catch (IOExcept...
static void function(Path worldPath) { try { Files.delete(worldPath.resolve(worldPath.getFileName().toString())); } catch (IOException ignore) {} }
/** * The last step of migration involves cleaning up folders within the world folders that are the same name as the root * folder's name (which happens due to how Bukkit stores DIM-1/DIM1 within world_nether/world_the_end * @param worldPath The path to inspect */
The last step of migration involves cleaning up folders within the world folders that are the same name as the root folder's name (which happens due to how Bukkit stores DIM-1/DIM1 within world_nether/world_the_end
removeInnerNameFolder
{ "repo_name": "kashike/SpongeCommon", "path": "src/main/java/org/spongepowered/common/world/WorldMigrator.java", "license": "mit", "size": 9399 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,091,100
public byte[] msgTransaction(byte[] msg) throws ModbusProtocolException { byte[] cmd = null; if(m_txMode == ModbusTransmissionMode.RTU_MODE){ cmd = new byte[msg.length+2]; for(int i=0; i<msg.length; i++) cmd[i]=msg[i]; // Add crc calculation to end of message int crc =...
byte[] function(byte[] msg) throws ModbusProtocolException { byte[] cmd = null; if(m_txMode == ModbusTransmissionMode.RTU_MODE){ cmd = new byte[msg.length+2]; for(int i=0; i<msg.length; i++) cmd[i]=msg[i]; int crc = Crc16.getCrc16(msg, msg.length, 0x0ffff); cmd[msg.length] = (byte) crc; cmd[msg.length + 1] = (byte) (cr...
/** * msgTransaction must be called with a byte array having two extra * bytes for the CRC. It will return a byte array of the response to the * message. Validation will include checking the CRC and verifying the * command matches. */
msgTransaction must be called with a byte array having two extra bytes for the CRC. It will return a byte array of the response to the message. Validation will include checking the CRC and verifying the command matches
msgTransaction
{ "repo_name": "mhddurrah/kura", "path": "kura/org.eclipse.kura.protocol.modbus/src/main/java/org/eclipse/kura/protocol/modbus/ModbusProtocolDevice.java", "license": "epl-1.0", "size": 45724 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.net.Socket", "java.util.Properties", "org.osgi.service.io.ConnectionFactory" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; import java.util.Properties; import org.osgi.service.io.ConnectionFactory;
import java.io.*; import java.net.*; import java.util.*; import org.osgi.service.io.*;
[ "java.io", "java.net", "java.util", "org.osgi.service" ]
java.io; java.net; java.util; org.osgi.service;
2,735,633
private int getIterations(final String username) throws UserNotFoundException { return UserManager.getUserProvider().loadUser(username).getIterations(); }
int function(final String username) throws UserNotFoundException { return UserManager.getUserProvider().loadUser(username).getIterations(); }
/** * Retrieve the iteration count from the database for a given username. */
Retrieve the iteration count from the database for a given username
getIterations
{ "repo_name": "zhouluoyang/openfire", "path": "src/java/org/jivesoftware/openfire/sasl/ScramSha1SaslServer.java", "license": "apache-2.0", "size": 13996 }
[ "org.jivesoftware.openfire.user.UserManager", "org.jivesoftware.openfire.user.UserNotFoundException" ]
import org.jivesoftware.openfire.user.UserManager; import org.jivesoftware.openfire.user.UserNotFoundException;
import org.jivesoftware.openfire.user.*;
[ "org.jivesoftware.openfire" ]
org.jivesoftware.openfire;
434,001
protected void replaceText_internal(int start, int end, CharSequence text) { ((Editable) mText).replace(start, end, text); }
void function(int start, int end, CharSequence text) { ((Editable) mText).replace(start, end, text); }
/** * Replaces the range of text [start, end[ by replacement text * @hide */
Replaces the range of text [start, end[ by replacement text
replaceText_internal
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/widget/TextView.java", "license": "apache-2.0", "size": 343681 }
[ "android.text.Editable" ]
import android.text.Editable;
import android.text.*;
[ "android.text" ]
android.text;
655,822
private Condition evaluateSimpleExpression(String condType, StringBuffer expression, int index) { Condition result = instantiateConditionClass(condType); String warningMsg = "Condition: %s contains reference to undefined condition: %s"; String conditionId = expression.toString(); St...
Condition function(String condType, StringBuffer expression, int index) { Condition result = instantiateConditionClass(condType); String warningMsg = STR; String conditionId = expression.toString(); String operand1Id = expression.substring(0,index); Condition operand1 = conditionsMap.get(operand1Id); if (operand1 != nu...
/** * This method replaces some of the functionality in the getConditionByExpr() method. It checks both operands in either side of the relation, * and returns a warning / null value if any of the operands is actually undefined. Fixes the NPE in IZPACK-1109. * * @param condType the type of simple exp...
This method replaces some of the functionality in the getConditionByExpr() method. It checks both operands in either side of the relation, and returns a warning / null value if any of the operands is actually undefined. Fixes the NPE in IZPACK-1109
evaluateSimpleExpression
{ "repo_name": "mtjandra/izpack", "path": "izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java", "license": "apache-2.0", "size": 33690 }
[ "com.izforge.izpack.api.rules.Condition", "com.izforge.izpack.api.rules.ConditionWithMultipleOperands" ]
import com.izforge.izpack.api.rules.Condition; import com.izforge.izpack.api.rules.ConditionWithMultipleOperands;
import com.izforge.izpack.api.rules.*;
[ "com.izforge.izpack" ]
com.izforge.izpack;
272,047
public String[] getPrevStepNames(StepMeta stepMeta) { StepMeta prevStepMetas[] = getPrevSteps(stepMeta); String retval[] = new String[prevStepMetas.length]; for (int x = 0; x < prevStepMetas.length; x++) retval[x] = prevStepMetas[x].getName(); return retval; }
String[] function(StepMeta stepMeta) { StepMeta prevStepMetas[] = getPrevSteps(stepMeta); String retval[] = new String[prevStepMetas.length]; for (int x = 0; x < prevStepMetas.length; x++) retval[x] = prevStepMetas[x].getName(); return retval; }
/** * Retrieve an array of preceding steps for a certain destination step. * * @param stepMeta The destination step * @return an array of preceding step names. */
Retrieve an array of preceding steps for a certain destination step
getPrevStepNames
{ "repo_name": "icholy/geokettle-2.0", "path": "src/org/pentaho/di/trans/TransMeta.java", "license": "lgpl-2.1", "size": 230572 }
[ "org.pentaho.di.trans.step.StepMeta" ]
import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.step.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,554,589
public SearchResults<SearchResult> searchFaceted(Query query) { SolrQueryBuilder queryBuilder = this.queryBuilderFactory .newSolrQueryBuilder(query.getQuery(), query.getOffset(), query.getRows()) .addHighlightingCapabilities(this.searchParameters.getNumberOf...
SearchResults<SearchResult> function(Query query) { SolrQueryBuilder queryBuilder = this.queryBuilderFactory .newSolrQueryBuilder(query.getQuery(), query.getOffset(), query.getRows()) .addHighlightingCapabilities(this.searchParameters.getNumberOfSnippets(), this.searchParameters.getHighlightSize()) .setSortCapabilities...
/** * Search the solr index for documents matching query. This method will return facets and filter by facets if the facets in the query * are set. * * @param query The query containing a query string and a number of facets with values to filter by. * @return A list of found documents wra...
Search the solr index for documents matching query. This method will return facets and filter by facets if the facets in the query are set
searchFaceted
{ "repo_name": "Deutsche-Digitale-Bibliothek/ddb-backend", "path": "SolrIndexServices/src/main/java/de/fhg/iais/cortex/search/Searcher.java", "license": "apache-2.0", "size": 11987 }
[ "de.fhg.iais.cortex.search.exception.SearchException", "de.fhg.iais.cortex.search.types.Query", "de.fhg.iais.cortex.search.types.SearchResult", "de.fhg.iais.cortex.search.types.SearchResults", "de.fhg.iais.cortex.search.utils.SolrQueryBuilder", "org.apache.solr.client.solrj.SolrQuery", "org.apache.solr....
import de.fhg.iais.cortex.search.exception.SearchException; import de.fhg.iais.cortex.search.types.Query; import de.fhg.iais.cortex.search.types.SearchResult; import de.fhg.iais.cortex.search.types.SearchResults; import de.fhg.iais.cortex.search.utils.SolrQueryBuilder; import org.apache.solr.client.solrj.SolrQuery; imp...
import de.fhg.iais.cortex.search.exception.*; import de.fhg.iais.cortex.search.types.*; import de.fhg.iais.cortex.search.utils.*; import org.apache.solr.client.solrj.*; import org.apache.solr.client.solrj.response.*;
[ "de.fhg.iais", "org.apache.solr" ]
de.fhg.iais; org.apache.solr;
1,122,040
public static java.util.List extractMRSAAssessmentList(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MRSAAssessmentVoCollection voCollection) { return extractMRSAAssessmentList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MRSAAssessmentVoCollection voCollection) { return extractMRSAAssessmentList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.nursing.assessmenttools.domain.objects.MRSAAssessment list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.nursing.assessmenttools.domain.objects.MRSAAssessment list from the value object collection
extractMRSAAssessmentList
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/nursing/vo/domain/MRSAAssessmentVoAssembler.java", "license": "agpl-3.0", "size": 21373 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,281,770
private void checkCardinality(int rows, int cols) { if (rows != rowSize()) throw new CardinalityException(rowSize(), rows); if (cols != columnSize()) throw new CardinalityException(columnSize(), cols); }
void function(int rows, int cols) { if (rows != rowSize()) throw new CardinalityException(rowSize(), rows); if (cols != columnSize()) throw new CardinalityException(columnSize(), cols); }
/** * Checks that dimensions of this matrix are equal to given dimensions. * * @param rows Rows. * @param cols Columns. */
Checks that dimensions of this matrix are equal to given dimensions
checkCardinality
{ "repo_name": "voipp/ignite", "path": "modules/ml/src/main/java/org/apache/ignite/ml/nn/ReplicatedVectorMatrix.java", "license": "apache-2.0", "size": 16716 }
[ "org.apache.ignite.ml.math.exceptions.CardinalityException" ]
import org.apache.ignite.ml.math.exceptions.CardinalityException;
import org.apache.ignite.ml.math.exceptions.*;
[ "org.apache.ignite" ]
org.apache.ignite;
719,254
@Test public void testHandleCauseUncheckedError() { Error err = new AssertionError("Test"); try { ConcurrentUtils.handleCauseUnchecked(new ExecutionException(err)); fail("Error not thrown!"); } catch (Error e) { assertEquals("Wrong error", err, e); ...
void function() { Error err = new AssertionError("Test"); try { ConcurrentUtils.handleCauseUnchecked(new ExecutionException(err)); fail(STR); } catch (Error e) { assertEquals(STR, err, e); } }
/** * Tests handleCauseUnchecked() if the cause is an error. */
Tests handleCauseUnchecked() if the cause is an error
testHandleCauseUncheckedError
{ "repo_name": "Shoreray/CommonsLang", "path": "src/test/java/org/apache/commons/lang3/concurrent/ConcurrentUtilsTest.java", "license": "apache-2.0", "size": 18910 }
[ "java.util.concurrent.ExecutionException", "org.junit.Assert", "org.junit.Test" ]
import java.util.concurrent.ExecutionException; import org.junit.Assert; import org.junit.Test;
import java.util.concurrent.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,152,463
@Test public void testLexingConcatenatedJsonValues() throws IOException, DeserializationException{ StringReader lexable; Yylex lexer; Yytoken lexed; lexable = new StringReader("nullnullnullnull12.33.21truetruenullfalse\"\"{}[]"); lexer = new Yylex(lexable); lexed ...
void function() throws IOException, DeserializationException{ StringReader lexable; Yylex lexer; Yytoken lexed; lexable = new StringReader(STR\"{}[]"); lexer = new Yylex(lexable); lexed = lexer.yylex(); Assert.assertEquals(Yytoken.Types.DATUM, lexed.getType()); Assert.assertEquals(null, lexed.getValue()); lexed = lexer...
/** Ensure concatenated JSON values are lexable. * @throws IOException if the test failed. * @throws DeserializationException if the test failed. */
Ensure concatenated JSON values are lexable
testLexingConcatenatedJsonValues
{ "repo_name": "tomwhoiscontrary/json-simple", "path": "src/test/java/org/json/simple/YylexTest.java", "license": "apache-2.0", "size": 9331 }
[ "java.io.IOException", "java.io.StringReader", "java.math.BigDecimal", "org.junit.Assert" ]
import java.io.IOException; import java.io.StringReader; import java.math.BigDecimal; import org.junit.Assert;
import java.io.*; import java.math.*; import org.junit.*;
[ "java.io", "java.math", "org.junit" ]
java.io; java.math; org.junit;
214,048
public String getIdentifier() { return ID3v24Frames.FRAME_ID_RELEASE_TIME; }
String function() { return ID3v24Frames.FRAME_ID_RELEASE_TIME; }
/** * The ID3v2 frame identifier * * @return the ID3v2 frame identifier for this frame type */
The ID3v2 frame identifier
getIdentifier
{ "repo_name": "dubenju/javay", "path": "src/java/org/jaudiotagger/tag/id3/framebody/FrameBodyTDRL.java", "license": "apache-2.0", "size": 2177 }
[ "org.jaudiotagger.tag.id3.ID3v24Frames" ]
import org.jaudiotagger.tag.id3.ID3v24Frames;
import org.jaudiotagger.tag.id3.*;
[ "org.jaudiotagger.tag" ]
org.jaudiotagger.tag;
1,707,541
public static boolean tablesOnMaster(Configuration conf) { String[] tables = getTablesOnMaster(conf); return tables != null && tables.length > 0; }
static boolean function(Configuration conf) { String[] tables = getTablesOnMaster(conf); return tables != null && tables.length > 0; }
/** * Check if configured to put any tables on the active master */
Check if configured to put any tables on the active master
tablesOnMaster
{ "repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java", "license": "apache-2.0", "size": 53544 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,740,118
protected String buildCancelContext(VelocityPortlet portlet, Context context, RunData rundata, AnnouncementActionState state) { // buildNormalContext(portlet, context, rundata); String template = (String) getContext(rundata).get("template"); return template; } // buildCancelContext
String function(VelocityPortlet portlet, Context context, RunData rundata, AnnouncementActionState state) { String template = (String) getContext(rundata).get(STR); return template; }
/** * Build the context for cancelling the operation and going back to list view */
Build the context for cancelling the operation and going back to list view
buildCancelContext
{ "repo_name": "ouit0408/sakai", "path": "announcement/announcement-tool/tool/src/java/org/sakaiproject/announcement/tool/AnnouncementAction.java", "license": "apache-2.0", "size": 173337 }
[ "org.sakaiproject.cheftool.Context", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.cheftool.VelocityPortlet" ]
import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.cheftool.VelocityPortlet;
import org.sakaiproject.cheftool.*;
[ "org.sakaiproject.cheftool" ]
org.sakaiproject.cheftool;
1,241,871
public static ZWaveCommandProcessor getMessageDispatcher(SerialMessage.SerialMessageClass serialMessage) { if (messageMap == null) { messageMap = new HashMap<SerialMessage.SerialMessageClass, Class<? extends ZWaveCommandProcessor>>(); messageMap.put(SerialMessage.SerialMessageClass.A...
static ZWaveCommandProcessor function(SerialMessage.SerialMessageClass serialMessage) { if (messageMap == null) { messageMap = new HashMap<SerialMessage.SerialMessageClass, Class<? extends ZWaveCommandProcessor>>(); messageMap.put(SerialMessage.SerialMessageClass.AddNodeToNetwork, AddNodeMessageClass.class); messageMap...
/** * Returns the message processor for the specified message class * * @param serialMessage The message class required to be processed * @return The message processor */
Returns the message processor for the specified message class
getMessageDispatcher
{ "repo_name": "tdiekmann/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/serialmessage/ZWaveCommandProcessor.java", "license": "epl-1.0", "size": 8251 }
[ "java.lang.reflect.Constructor", "java.util.HashMap", "org.openhab.binding.zwave.internal.protocol.SerialMessage" ]
import java.lang.reflect.Constructor; import java.util.HashMap; import org.openhab.binding.zwave.internal.protocol.SerialMessage;
import java.lang.reflect.*; import java.util.*; import org.openhab.binding.zwave.internal.protocol.*;
[ "java.lang", "java.util", "org.openhab.binding" ]
java.lang; java.util; org.openhab.binding;
1,703,308
public void sendTo(IMessage message, EntityPlayerMP player) { channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER); channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player); channels.get(Side.SERVER...
void function(IMessage message, EntityPlayerMP player) { channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.PLAYER); channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(player); channels.get(Side.SERVER).writeAndFlush(message).addListener(...
/** * Send this message to the specified player. * The {@link IMessageHandler} for this message type should be on the CLIENT side. * * @param message The message to send * @param player The player to send it to */
Send this message to the specified player. The <code>IMessageHandler</code> for this message type should be on the CLIENT side
sendTo
{ "repo_name": "blay09/MinecraftForge", "path": "src/main/java/net/minecraftforge/fml/common/network/simpleimpl/SimpleNetworkWrapper.java", "license": "lgpl-2.1", "size": 12620 }
[ "io.netty.channel.ChannelFutureListener", "net.minecraft.entity.player.EntityPlayerMP", "net.minecraftforge.fml.common.network.FMLOutboundHandler", "net.minecraftforge.fml.relauncher.Side" ]
import io.netty.channel.ChannelFutureListener; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.fml.common.network.FMLOutboundHandler; import net.minecraftforge.fml.relauncher.Side;
import io.netty.channel.*; import net.minecraft.entity.player.*; import net.minecraftforge.fml.common.network.*; import net.minecraftforge.fml.relauncher.*;
[ "io.netty.channel", "net.minecraft.entity", "net.minecraftforge.fml" ]
io.netty.channel; net.minecraft.entity; net.minecraftforge.fml;
2,098,216
protected void writeParagraphEnd() throws IOException { if (!inParagraph) { writeParagraphStart(); } output.write(getParagraphEnd()); inParagraph = false; }
void function() throws IOException { if (!inParagraph) { writeParagraphStart(); } output.write(getParagraphEnd()); inParagraph = false; }
/** * Write something (if defined) at the end of a paragraph. * * @throws IOException if something went wrong */
Write something (if defined) at the end of a paragraph
writeParagraphEnd
{ "repo_name": "joansmith/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java", "license": "apache-2.0", "size": 76309 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,767,807
public static void showFatalInGrowl(String title, String message) { showInGrowl(FacesMessage.SEVERITY_FATAL, title, message); }
static void function(String title, String message) { showInGrowl(FacesMessage.SEVERITY_FATAL, title, message); }
/** * Shows a message for the user in growl * * @param title * @param message */
Shows a message for the user in growl
showFatalInGrowl
{ "repo_name": "machadolucas/watchout", "path": "src/main/java/com/riskvis/util/MessageUtils.java", "license": "apache-2.0", "size": 5442 }
[ "javax.faces.application.FacesMessage" ]
import javax.faces.application.FacesMessage;
import javax.faces.application.*;
[ "javax.faces" ]
javax.faces;
200,155
@Override public boolean nextKeyValue() throws IOException, InterruptedException { currentValue = null; // Check if we already have a reader in-progress. if (delegateReader != null) { if (delegateReader.nextKeyValue()) { populateCurrentKeyValue(); return true; } else { ...
boolean function() throws IOException, InterruptedException { currentValue = null; if (delegateReader != null) { if (delegateReader.nextKeyValue()) { populateCurrentKeyValue(); return true; } else { delegateReader.close(); delegateReader = null; } } boolean needRefresh = !isNextFileReady() && shouldExpectMoreFiles(); i...
/** * Reads the next key, value pair. Gets next line and parses Json object. May hang for a long time * waiting for more files to appear in this reader's directory. * * @return true if a key/value pair was read. * @throws IOException on IO Error. */
Reads the next key, value pair. Gets next line and parses Json object. May hang for a long time waiting for more files to appear in this reader's directory
nextKeyValue
{ "repo_name": "GoogleCloudDataproc/hadoop-connectors", "path": "bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/DynamicFileListRecordReader.java", "license": "apache-2.0", "size": 15142 }
[ "com.google.common.base.Preconditions", "java.io.IOException", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.mapreduce.InputSplit", "org.apache.hadoop.mapreduce.lib.input.FileSplit" ]
import com.google.common.base.Preconditions; import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.mapreduce.InputSplit; import org.apache.hadoop.mapreduce.lib.input.FileSplit;
import com.google.common.base.*; import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.lib.input.*;
[ "com.google.common", "java.io", "org.apache.hadoop" ]
com.google.common; java.io; org.apache.hadoop;
2,297,375
boolean audit(Class<?> clazz, Method method, Object[] args);
boolean audit(Class<?> clazz, Method method, Object[] args);
/** * Audit with annotation. * * @param clazz * the clazz * @param method * the method * @param args * the args * @return true, if successful * */
Audit with annotation
audit
{ "repo_name": "BartRobeyns/audit4j-core", "path": "src/main/java/org/audit4j/core/IAuditManager.java", "license": "apache-2.0", "size": 1161 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
685,317
@Override public void mouseWheelMoved(MouseWheelEvent e) { JFreeChart chart = this.chartPanel.getChart(); if (chart == null) { return; } Plot plot = chart.getPlot(); if (plot instanceof Zoomable) { Zoomable zoomable = (Zoomable) plot; ...
void function(MouseWheelEvent e) { JFreeChart chart = this.chartPanel.getChart(); if (chart == null) { return; } Plot plot = chart.getPlot(); if (plot instanceof Zoomable) { Zoomable zoomable = (Zoomable) plot; handleZoomable(zoomable, e); } else if (plot instanceof PiePlot) { PiePlot pp = (PiePlot) plot; pp.handleMous...
/** * Handles a mouse wheel event from the underlying chart panel. * * @param e the event. */
Handles a mouse wheel event from the underlying chart panel
mouseWheelMoved
{ "repo_name": "greearb/jfreechart-fse-ct", "path": "src/main/java/org/jfree/chart/MouseWheelHandler.java", "license": "lgpl-2.1", "size": 5498 }
[ "java.awt.event.MouseWheelEvent", "org.jfree.chart.plot.PiePlot", "org.jfree.chart.plot.Plot", "org.jfree.chart.plot.Zoomable" ]
import java.awt.event.MouseWheelEvent; import org.jfree.chart.plot.PiePlot; import org.jfree.chart.plot.Plot; import org.jfree.chart.plot.Zoomable;
import java.awt.event.*; import org.jfree.chart.plot.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
2,205,594
public Map<Integer, ArrayList<RepairItem>> getUnsortedRepairItems() { return Collections.unmodifiableMap(unsortedRepairItems); }
Map<Integer, ArrayList<RepairItem>> function() { return Collections.unmodifiableMap(unsortedRepairItems); }
/** * Gets the repairable items, unsorted (in order of occurrence in simulation). * * @return the set of repairable items */
Gets the repairable items, unsorted (in order of occurrence in simulation)
getUnsortedRepairItems
{ "repo_name": "ptgrogan/spacenet", "path": "src/main/java/edu/mit/spacenet/simulator/DemandSimulator.java", "license": "apache-2.0", "size": 8595 }
[ "edu.mit.spacenet.scenario.RepairItem", "java.util.ArrayList", "java.util.Collections", "java.util.Map" ]
import edu.mit.spacenet.scenario.RepairItem; import java.util.ArrayList; import java.util.Collections; import java.util.Map;
import edu.mit.spacenet.scenario.*; import java.util.*;
[ "edu.mit.spacenet", "java.util" ]
edu.mit.spacenet; java.util;
2,015,480
public FSArray getFacetEntailments() { if (FacetedStudentAnswer_Type.featOkTst && ((FacetedStudentAnswer_Type)jcasType).casFeat_FacetEntailments == null) jcasType.jcas.throwFeatMissing("FacetEntailments", "semeval2013.task7.type.FacetedStudentAnswer"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jca...
FSArray function() { if (FacetedStudentAnswer_Type.featOkTst && ((FacetedStudentAnswer_Type)jcasType).casFeat_FacetEntailments == null) jcasType.jcas.throwFeatMissing(STR, STR); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((FacetedStudentAnswer_Type)jcasType).casFeatCode_FacetEn...
/** getter for FacetEntailments - gets * @generated */
getter for FacetEntailments - gets
getFacetEntailments
{ "repo_name": "zesch/semeval", "path": "semeval2013/semeval2013.task7/src/main/java/semeval2013/task7/type/FacetedStudentAnswer.java", "license": "apache-2.0", "size": 4149 }
[ "org.apache.uima.jcas.cas.FSArray" ]
import org.apache.uima.jcas.cas.FSArray;
import org.apache.uima.jcas.cas.*;
[ "org.apache.uima" ]
org.apache.uima;
696,363
private void createContents() { GridLayout clayout = new GridLayout(); clayout.marginHeight = 2; clayout.marginWidth = 2; clayout.marginTop = 2; clayout.marginBottom = 2; clayout.marginLeft = 2; clayout.marginRight = 2; clayout.numColumns = 1; setLayout(clayout); m_recoveryTable = new RecoveryT...
void function() { GridLayout clayout = new GridLayout(); clayout.marginHeight = 2; clayout.marginWidth = 2; clayout.marginTop = 2; clayout.marginBottom = 2; clayout.marginLeft = 2; clayout.marginRight = 2; clayout.numColumns = 1; setLayout(clayout); m_recoveryTable = new RecoveryTable(this); GridData tableLayoutData = ...
/*************************************************************************** * Create the executor information group **************************************************************************/
Create the executor information group
createContents
{ "repo_name": "Spacecraft-Code/SPELL", "path": "src/spel-gui/com.astra.ses.spell.gui/src/com/astra/ses/spell/gui/views/controls/master/recovery/RecoveryComposite.java", "license": "lgpl-3.0", "size": 11169 }
[ "org.eclipse.swt.layout.FillLayout", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.layout.GridLayout", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Composite" ]
import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,631,701
@Test public void testCheckpointStarted_WhenWalHasTooBigSizeWithoutCheckpoint() throws Exception { //given: configured grid with max wal archive size = 1MB, wal segment size = 512KB Ignite ignite = startGrid(dbCfg -> { dbCfg.setMaxWalArchiveSize(1 * 1024 * 1024);// 1 Mbytes }...
void function() throws Exception { Ignite ignite = startGrid(dbCfg -> { dbCfg.setMaxWalArchiveSize(1 * 1024 * 1024); }); GridCacheDatabaseSharedManager dbMgr = gridDatabase(ignite); IgniteCache<Integer, Integer> cache = ignite.getOrCreateCache(cacheConfiguration()); for (int i = 0; i < 500; i++) cache.put(i, i); Checkp...
/** * Checkpoint triggered depends on wal size. */
Checkpoint triggered depends on wal size
testCheckpointStarted_WhenWalHasTooBigSizeWithoutCheckpoint
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalDeletionArchiveAbstractTest.java", "license": "apache-2.0", "size": 10849 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.IgniteCache", "org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager", "org.apache.ignite.internal.processors.cache.persistence.checkpoint.Checkpointer", "org.apache.ignite.internal.util.typedef.internal.U" ]
import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager; import org.apache.ignite.internal.processors.cache.persistence.checkpoint.Checkpointer; import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.persistence.*; import org.apache.ignite.internal.processors.cache.persistence.checkpoint.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,600,954
try { if (args.length == 0){ System.err.println("No main class specified."); System.err.println("usage: CLILoader <fedora main class> <options>"); System.exit(1); } String webInfLib = System.getProperty("fedora.web.inf.lib"); ...
try { if (args.length == 0){ System.err.println(STR); System.err.println(STR); System.exit(1); } String webInfLib = System.getProperty(STR); if (webInfLib == null){ System.err.println(STR); System.exit(1); } File webInfLibDir = new File(webInfLib); if (!webInfLibDir.exists()){ System.err.println(STR); System.exit(1); }...
/** * {@link CLILoader#main(String[])} assumes access to a system property * ("fedora.web.inf.lib") that refers to a directory containing all the * jar libraries needed to invoke the main class. * Usage: * args[0]: <name of main class to be invoked> * args[1:n] : remaining arguments to...
<code>CLILoader#main(String[])</code> assumes access to a system property ("fedora.web.inf.lib") that refers to a directory containing all the jar libraries needed to invoke the main class. Usage: args[0]: args[1:n] : remaining arguments to be passed to class indicated in args[0]
main
{ "repo_name": "FLVC/fcrepo-src-3.4.2", "path": "fcrepo-server/src/main/java/org/fcrepo/server/utilities/rebuild/cli/CLILoader.java", "license": "apache-2.0", "size": 3203 }
[ "java.io.File", "java.lang.reflect.Method" ]
import java.io.File; import java.lang.reflect.Method;
import java.io.*; import java.lang.reflect.*;
[ "java.io", "java.lang" ]
java.io; java.lang;
2,065,216
@Override public void onAttach(Activity activity) { if (DEBUG) Log.i(LOG_TAG, "onAttach(Activity)"); super.onAttach(activity); mOnPassReferenceCallback = (onPassReferenceListener) getTargetFragment(); if (DEBUG) Log.d(LOG_TAG,"mOnPassReferenceCallback initialised!!" + m...
void function(Activity activity) { if (DEBUG) Log.i(LOG_TAG, STR); super.onAttach(activity); mOnPassReferenceCallback = (onPassReferenceListener) getTargetFragment(); if (DEBUG) Log.d(LOG_TAG,STR + mOnPassReferenceCallback); }
/** * Hold a reference to the parent Activity so we can report the * task's current progress and results. The Android framework * will pass us a reference to the newly created Activity after * each configuration change. */
Hold a reference to the parent Activity so we can report the task's current progress and results. The Android framework will pass us a reference to the newly created Activity after each configuration change
onAttach
{ "repo_name": "vector2016/udacity_projects", "path": "app/src/main/java/demo/example/com/customarrayadapter/contentviews/MainActivityFragment.java", "license": "apache-2.0", "size": 14297 }
[ "android.app.Activity", "android.util.Log" ]
import android.app.Activity; import android.util.Log;
import android.app.*; import android.util.*;
[ "android.app", "android.util" ]
android.app; android.util;
554,388
@SmallTest @Feature({"Gestures"}) public void testDrainWithFlingAndClickOutofTouchHandler() throws Exception { final long downTime = SystemClock.uptimeMillis(); final long eventTime = SystemClock.uptimeMillis(); mGestureHandler = new ContentViewGestureHandler( getIns...
@Feature({STR}) void function() throws Exception { final long downTime = SystemClock.uptimeMillis(); final long eventTime = SystemClock.uptimeMillis(); mGestureHandler = new ContentViewGestureHandler( getInstrumentation().getTargetContext(), new MockMotionEventDelegate(), new MockZoomManager(getInstrumentation().getTar...
/** * Verify that when a registered touch event handler return NO_CONSUMER_EXISTS for down event * all queue is drained until next down. * @throws Exception */
Verify that when a registered touch event handler return NO_CONSUMER_EXISTS for down event all queue is drained until next down
testDrainWithFlingAndClickOutofTouchHandler
{ "repo_name": "codenote/chromium-test", "path": "content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java", "license": "bsd-3-clause", "size": 37590 }
[ "android.os.SystemClock", "android.view.MotionEvent", "org.chromium.base.test.util.Feature" ]
import android.os.SystemClock; import android.view.MotionEvent; import org.chromium.base.test.util.Feature;
import android.os.*; import android.view.*; import org.chromium.base.test.util.*;
[ "android.os", "android.view", "org.chromium.base" ]
android.os; android.view; org.chromium.base;
1,945,617
private void downloadHighResImage(final View view, final int position) { final PhotoView imageView = view.findViewById(R.id.media_slider_image_view); final PieFractionView pieFractionView = view.findViewById(R.id.media_slider_pie_view); final View downloadFailedView = view.findViewById(R.id....
void function(final View view, final int position) { final PhotoView imageView = view.findViewById(R.id.media_slider_image_view); final PieFractionView pieFractionView = view.findViewById(R.id.media_slider_pie_view); final View downloadFailedView = view.findViewById(R.id.media_download_failed); final SlidableMediaInfo ...
/** * Download the high res image * * @param view the slider page view * @param position the item position */
Download the high res image
downloadHighResImage
{ "repo_name": "vector-im/vector-android", "path": "vector/src/main/java/im/vector/adapters/VectorMediaViewerAdapter.java", "license": "apache-2.0", "size": 28573 }
[ "android.view.View", "com.github.chrisbanes.photoview.PhotoView", "im.vector.util.SlidableMediaInfo", "im.vector.view.PieFractionView" ]
import android.view.View; import com.github.chrisbanes.photoview.PhotoView; import im.vector.util.SlidableMediaInfo; import im.vector.view.PieFractionView;
import android.view.*; import com.github.chrisbanes.photoview.*; import im.vector.util.*; import im.vector.view.*;
[ "android.view", "com.github.chrisbanes", "im.vector.util", "im.vector.view" ]
android.view; com.github.chrisbanes; im.vector.util; im.vector.view;
2,755,762
protected boolean isRememberMeRequest(String userNameInRequest, MessageContext messageContext) { return false; }
boolean function(String userNameInRequest, MessageContext messageContext) { return false; }
/** * Checks whether given request contains remember me option. * @param userNameInRequest User name as in the request. * @param messageContext The incoming message context. * @return <code>true</code> if the request asks to remember else <code>false</code>. */
Checks whether given request contains remember me option
isRememberMeRequest
{ "repo_name": "maheshika/carbon4-kernel", "path": "core/org.wso2.carbon.core.services/src/main/java/org/wso2/carbon/core/services/authentication/AbstractAuthenticator.java", "license": "apache-2.0", "size": 20165 }
[ "org.apache.axis2.context.MessageContext" ]
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.*;
[ "org.apache.axis2" ]
org.apache.axis2;
833,833
void deleteTasks(Collection<String> taskIds, String deleteReason);
void deleteTasks(Collection<String> taskIds, String deleteReason);
/** * Deletes all tasks of the given collection, not deleting historic information that is related to these tasks. * * @param taskIds * The id's of the tasks that will be deleted, cannot be null. All id's in the list that don't have an existing task will be ignored. * @param deleteR...
Deletes all tasks of the given collection, not deleting historic information that is related to these tasks
deleteTasks
{ "repo_name": "robsoncardosoti/flowable-engine", "path": "modules/flowable5-engine/src/main/java/org/activiti/engine/TaskService.java", "license": "apache-2.0", "size": 24405 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,779,615
private ObjectName getObjectName(String type, String objectName) throws MalformedObjectNameException { Hashtable<String, String> table = new Hashtable<String, String>(); table.put("type", quote(type)); table.put("name", quote(objectName)); table.put("instance", quote(hz.getName())); ...
ObjectName function(String type, String objectName) throws MalformedObjectNameException { Hashtable<String, String> table = new Hashtable<String, String>(); table.put("type", quote(type)); table.put("name", quote(objectName)); table.put(STR, quote(hz.getName())); return new ObjectName(STR, table); }
/** * JMX object name * * @param type Type of the Hazelcast object (first level of hierarchy), e.g. "IMap" * @param objectName Name of the Hazelcast object (second level of hierarchy), e.g. "myMap" * @return JMX object name */
JMX object name
getObjectName
{ "repo_name": "mdogan/hazelcast", "path": "hazelcast/src/test/java/com/hazelcast/internal/jmx/MBeanDataHolder.java", "license": "apache-2.0", "size": 5746 }
[ "com.hazelcast.internal.jmx.ManagementService", "java.util.Hashtable", "javax.management.MalformedObjectNameException", "javax.management.ObjectName" ]
import com.hazelcast.internal.jmx.ManagementService; import java.util.Hashtable; import javax.management.MalformedObjectNameException; import javax.management.ObjectName;
import com.hazelcast.internal.jmx.*; import java.util.*; import javax.management.*;
[ "com.hazelcast.internal", "java.util", "javax.management" ]
com.hazelcast.internal; java.util; javax.management;
1,377,944
private static List<JavadocTag> getMultilineNoArgTags(final Matcher noargMultilineStart, final String[] lines, final int lineIndex, final int tagLine) { final String param1 = noargMultilineStart.group(1); final int col = noargMultilineStart.start(1) - 1; final List<JavadocTag> ta...
static List<JavadocTag> function(final Matcher noargMultilineStart, final String[] lines, final int lineIndex, final int tagLine) { final String param1 = noargMultilineStart.group(1); final int col = noargMultilineStart.start(1) - 1; final List<JavadocTag> tags = new ArrayList<>(); int remIndex = lineIndex + 1; while (...
/** * Gets multiline Javadoc tags with no arguments. * @param noargMultilineStart javadoc tag Matcher * @param lines comment text lines * @param lineIndex line number that contains the javadoc tag * @param tagLine javadoc tag line number in file * @return javadoc tags with no arguments ...
Gets multiline Javadoc tags with no arguments
getMultilineNoArgTags
{ "repo_name": "sirdis/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java", "license": "lgpl-2.1", "size": 37232 }
[ "java.util.ArrayList", "java.util.List", "java.util.regex.Matcher" ]
import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
1,366,958
public boolean isCompatible(MibValue value) { String str1 = this.value.toString(); String str2 = value.toString(); if (this.value instanceof NumberValue && value instanceof NumberValue) { return str1.equals(str2); } else if (this.value instanceof StringValue ...
boolean function(MibValue value) { String str1 = this.value.toString(); String str2 = value.toString(); if (this.value instanceof NumberValue && value instanceof NumberValue) { return str1.equals(str2); } else if (this.value instanceof StringValue && value instanceof StringValue) { return str1.equals(str2); } else { re...
/** * Checks if the specified value is compatible with this * constraint. * * @param value the value to check * * @return true if the value is compatible, or * false otherwise */
Checks if the specified value is compatible with this constraint
isCompatible
{ "repo_name": "tmoskun/JSNMPWalker", "path": "lib/mibble-2.9.3/src/java/net/percederberg/mibble/type/ValueConstraint.java", "license": "gpl-3.0", "size": 4305 }
[ "net.percederberg.mibble.MibValue", "net.percederberg.mibble.value.NumberValue", "net.percederberg.mibble.value.StringValue" ]
import net.percederberg.mibble.MibValue; import net.percederberg.mibble.value.NumberValue; import net.percederberg.mibble.value.StringValue;
import net.percederberg.mibble.*; import net.percederberg.mibble.value.*;
[ "net.percederberg.mibble" ]
net.percederberg.mibble;
2,030,410
public Artifact getBinArtifact(String relative) { return getBinArtifact(PathFragment.create(relative)); }
Artifact function(String relative) { return getBinArtifact(PathFragment.create(relative)); }
/** * Creates an artifact in a directory that is unique to the package that contains the rule, thus * guaranteeing that it never clashes with artifacts created by rules in other packages. */
Creates an artifact in a directory that is unique to the package that contains the rule, thus guaranteeing that it never clashes with artifacts created by rules in other packages
getBinArtifact
{ "repo_name": "ButterflyNetwork/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java", "license": "apache-2.0", "size": 82210 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.vfs.PathFragment" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
19,542
public OHttpResponseWrapper send(final int iCode, final String iReason, final String iContentType, final Object iContent) throws IOException { response.send(iCode, iReason, iContentType, iContent, null); return this; }
OHttpResponseWrapper function(final int iCode, final String iReason, final String iContentType, final Object iContent) throws IOException { response.send(iCode, iReason, iContentType, iContent, null); return this; }
/** * Sends the complete HTTP response in one call. * * @param iCode * HTTP response's Code * @param iReason * Response's reason * @param iContentType * Response's content type * @param iContent * Content to send. Content can be a string for plain text,...
Sends the complete HTTP response in one call
send
{ "repo_name": "delebash/orientdb-parent", "path": "server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponseWrapper.java", "license": "apache-2.0", "size": 11003 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
334,670
public Resource createResource(Action action);
Resource function(Action action);
/** * resource of an action * * @param action * @return */
resource of an action
createResource
{ "repo_name": "Blazebit/blaze-security", "path": "core-api/src/main/java/com/blazebit/security/spi/ResourceFactory.java", "license": "apache-2.0", "size": 679 }
[ "com.blazebit.security.model.Action", "com.blazebit.security.model.Resource" ]
import com.blazebit.security.model.Action; import com.blazebit.security.model.Resource;
import com.blazebit.security.model.*;
[ "com.blazebit.security" ]
com.blazebit.security;
2,638,651
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String operationTypeHeader = request .getHeader(EndpointCentralServletConstants.RequestHeaders.HEADER_OPERATION_TYPE); if (EndpointCentral...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String operationTypeHeader = request .getHeader(EndpointCentralServletConstants.RequestHeaders.HEADER_OPERATION_TYPE); if (EndpointCentralServletConstants.RequestHeaders.LOGIN.equals(operationTypeHeader)) { En...
/** * Handles post requests. * * @param request post request * @param response servlet response */
Handles post requests
doPost
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.apim.endpoint.central/src/org/wso2/developerstudio/eclipse/apim/endpoint/central/servlets/EndpointCentralServlet.java", "license": "apache-2.0", "size": 4101 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.wso2.developerstudio.eclipse.apim.endpoint.central.handler.EndpointCentralServletRequestHandler", "org.wso2.developerstudio.eclipse.apim.endpoint.central.resourc...
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.wso2.developerstudio.eclipse.apim.endpoint.central.handler.EndpointCentralServletRequestHandler; import org.wso2.developerstudio.eclipse.apim.endpoin...
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.wso2.developerstudio.eclipse.apim.endpoint.central.handler.*; import org.wso2.developerstudio.eclipse.apim.endpoint.central.resources.*;
[ "java.io", "javax.servlet", "org.wso2.developerstudio" ]
java.io; javax.servlet; org.wso2.developerstudio;
472,521
@FIXVersion(introduced = "5.0SP1") @TagNumRef(tagNum = TagNum.DerivativeLocaleOfIssue) public void setDerivativeLocaleOfIssue(String derivativeLocaleOfIssue) { this.derivativeLocaleOfIssue = derivativeLocaleOfIssue; }
@FIXVersion(introduced = STR) @TagNumRef(tagNum = TagNum.DerivativeLocaleOfIssue) void function(String derivativeLocaleOfIssue) { this.derivativeLocaleOfIssue = derivativeLocaleOfIssue; }
/** * Message field setter. * @param derivativeLocaleOfIssue field value */
Message field setter
setDerivativeLocaleOfIssue
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/comp/DerivativeInstrument.java", "license": "gpl-3.0", "size": 83551 }
[ "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,057,142
void reenterState() throws CommandFormatException;
void reenterState() throws CommandFormatException;
/** * Leaves the current state and then enters it again. * * @throws CommandFormatException in case something went wrong */
Leaves the current state and then enters it again
reenterState
{ "repo_name": "yersan/wildfly-core", "path": "cli/src/main/java/org/jboss/as/cli/parsing/ParsingContext.java", "license": "lgpl-2.1", "size": 7667 }
[ "org.jboss.as.cli.CommandFormatException" ]
import org.jboss.as.cli.CommandFormatException;
import org.jboss.as.cli.*;
[ "org.jboss.as" ]
org.jboss.as;
1,733,454
public Set<Operation> getAllValuesOfop() { return rawAccumulateAllValuesOfop(emptyArray()); }
Set<Operation> function() { return rawAccumulateAllValuesOfop(emptyArray()); }
/** * Retrieve the set of values that occur in matches for op. * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches * */
Retrieve the set of values that occur in matches for op
getAllValuesOfop
{ "repo_name": "ELTE-Soft/xUML-RT-Executor", "path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/UnmarkedConstructorMatcher.java", "license": "epl-1.0", "size": 10385 }
[ "java.util.Set", "org.eclipse.uml2.uml.Operation" ]
import java.util.Set; import org.eclipse.uml2.uml.Operation;
import java.util.*; import org.eclipse.uml2.uml.*;
[ "java.util", "org.eclipse.uml2" ]
java.util; org.eclipse.uml2;
1,617,972
@Test public void updatesWrapsFromMaxLongToNegativeValue() { statistics.incLong(updatesId, Long.MAX_VALUE); cachePerfStats.endPut(0, true); assertThat(cachePerfStats.getUpdates()).isNegative(); }
void function() { statistics.incLong(updatesId, Long.MAX_VALUE); cachePerfStats.endPut(0, true); assertThat(cachePerfStats.getUpdates()).isNegative(); }
/** * Characterization test: {@code updates} currently wraps to negative from max long value. */
Characterization test: updates currently wraps to negative from max long value
updatesWrapsFromMaxLongToNegativeValue
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java", "license": "apache-2.0", "size": 34945 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
996,679
synchronized void removeStoredBlock(Block block, DatanodeDescriptor node) { NameNode.stateChangeLog.debug("BLOCK* NameSystem.removeStoredBlock: " +block + " from "+node.getName()); if (!blocksMap.removeNode(block, node)) { NameNode.stateChangeLog.debug("BLOCK* NameSyste...
synchronized void removeStoredBlock(Block block, DatanodeDescriptor node) { NameNode.stateChangeLog.debug(STR +block + STR+node.getName()); if (!blocksMap.removeNode(block, node)) { NameNode.stateChangeLog.debug(STR +block+STR+node); return; } if (fileINode != null) { decrementSafeBlockCount(block); updateNeededReplica...
/** * Modify (block-->datanode) map. Possibly generate * replication tasks, if the removed block is still valid. */
Modify (block-->datanode) map. Possibly generate replication tasks, if the removed block is still valid
removeStoredBlock
{ "repo_name": "andy8788/hadoop-hdfs", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 214042 }
[ "org.apache.hadoop.hdfs.protocol.Block" ]
import org.apache.hadoop.hdfs.protocol.Block;
import org.apache.hadoop.hdfs.protocol.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,530,302
private MenuToolsControl getMenuToolsControl() { return Control.getSingleton().getMenuToolsControl(); }
MenuToolsControl function() { return Control.getSingleton().getMenuToolsControl(); }
/** * This method initializes menuToolsControl * * @return org.parosproxy.paros.view.MenuToolsControl */
This method initializes menuToolsControl
getMenuToolsControl
{ "repo_name": "gsavastano/zaproxy", "path": "src/org/parosproxy/paros/view/MainMenuBar.java", "license": "apache-2.0", "size": 17648 }
[ "org.parosproxy.paros.control.Control", "org.parosproxy.paros.control.MenuToolsControl" ]
import org.parosproxy.paros.control.Control; import org.parosproxy.paros.control.MenuToolsControl;
import org.parosproxy.paros.control.*;
[ "org.parosproxy.paros" ]
org.parosproxy.paros;
588,500
public synchronized ServerSocketChannel getServerSocketChannel() { return serverChannel; }
synchronized ServerSocketChannel function() { return serverChannel; }
/** * Get the inner Server socket for accepting new client connections * * @return */
Get the inner Server socket for accepting new client connections
getServerSocketChannel
{ "repo_name": "yangzhongj/mina", "path": "core/src/main/java/org/apache/mina/transport/nio/NioTcpServer.java", "license": "apache-2.0", "size": 13065 }
[ "java.nio.channels.ServerSocketChannel" ]
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.*;
[ "java.nio" ]
java.nio;
2,391,852
@Test public void testExecutionOnSample() throws IOException { testEncodersOnDataset( RedundantKVGenerator.convertKvToByteBuffer( generator.generateTestKeyValues(NUMBER_OF_KV), includesMemstoreTS)); }
void function() throws IOException { testEncodersOnDataset( RedundantKVGenerator.convertKvToByteBuffer( generator.generateTestKeyValues(NUMBER_OF_KV), includesMemstoreTS)); }
/** * Test whether compression -> decompression gives the consistent results on * pseudorandom sample. * @throws IOException On test failure. */
Test whether compression -> decompression gives the consistent results on pseudorandom sample
testExecutionOnSample
{ "repo_name": "francisliu/hbase_namespace", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java", "license": "apache-2.0", "size": 13510 }
[ "java.io.IOException", "org.apache.hadoop.hbase.util.test.RedundantKVGenerator" ]
import java.io.IOException; import org.apache.hadoop.hbase.util.test.RedundantKVGenerator;
import java.io.*; import org.apache.hadoop.hbase.util.test.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,255,018
public TskData.FileKnown getKnown() { return known; }
TskData.FileKnown function() { return known; }
/** * Get the known status * * @return the known status */
Get the known status
getKnown
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/centralrepository/application/NodeData.java", "license": "apache-2.0", "size": 7497 }
[ "org.sleuthkit.datamodel.TskData" ]
import org.sleuthkit.datamodel.TskData;
import org.sleuthkit.datamodel.*;
[ "org.sleuthkit.datamodel" ]
org.sleuthkit.datamodel;
2,839,411
public JMXServiceURL getJMXServiceURL() { if(jmxServiceURL==null) { synchronized(this) { if(jmxServiceURL==null) { try { String connAddr = getAgentProperties().getProperty(CONNECTOR_ADDRESS); if(connAddr==null) { Properties sysProps = getSystemProperties(); String file...
JMXServiceURL function() { if(jmxServiceURL==null) { synchronized(this) { if(jmxServiceURL==null) { try { String connAddr = getAgentProperties().getProperty(CONNECTOR_ADDRESS); if(connAddr==null) { Properties sysProps = getSystemProperties(); String fileSep = sysProps.getProperty(FILE_SEP, File.separator); String javaH...
/** * Returns a {@link JMXServiceURL} to connect to this VM instance * @return a {@link JMXServiceURL} to connect to this VM instance * TODO: We need to allow this using authentication. */
Returns a <code>JMXServiceURL</code> to connect to this VM instance
getJMXServiceURL
{ "repo_name": "nickman/heliosJMX", "path": "src/main/java/com/heliosapm/attachme/VirtualMachine.java", "license": "apache-2.0", "size": 13172 }
[ "java.io.File", "java.util.Properties", "javax.management.remote.JMXServiceURL" ]
import java.io.File; import java.util.Properties; import javax.management.remote.JMXServiceURL;
import java.io.*; import java.util.*; import javax.management.remote.*;
[ "java.io", "java.util", "javax.management" ]
java.io; java.util; javax.management;
2,845,249
protected X509Certificate[] getRequestCertificates(final Request request) throws IllegalStateException { X509Certificate certs[] = (X509Certificate[]) request.getAttribute(Globals.CERTIFICATES_ATTR); if ((certs == null) || (certs.length < 1)) { try { ...
X509Certificate[] function(final Request request) throws IllegalStateException { X509Certificate certs[] = (X509Certificate[]) request.getAttribute(Globals.CERTIFICATES_ATTR); if ((certs == null) (certs.length < 1)) { try { request.getCoyoteRequest().action(ActionCode.REQ_SSL_CERTIFICATE, null); certs = (X509Certificat...
/** * Look for the X509 certificate chain in the Request under the key * <code>javax.servlet.request.X509Certificate</code>. If not found, trigger * extracting the certificate chain from the Coyote request. * * @param request Request to be processed * * @return The X509 cer...
Look for the X509 certificate chain in the Request under the key <code>javax.servlet.request.X509Certificate</code>. If not found, trigger extracting the certificate chain from the Coyote request
getRequestCertificates
{ "repo_name": "nrgaway/qubes-tools", "path": "experimental/tomcat/apache-tomcat-8.0.15-src/java/org/apache/catalina/authenticator/AuthenticatorBase.java", "license": "gpl-2.0", "size": 33099 }
[ "java.security.cert.X509Certificate", "org.apache.catalina.Globals", "org.apache.catalina.connector.Request", "org.apache.coyote.ActionCode" ]
import java.security.cert.X509Certificate; import org.apache.catalina.Globals; import org.apache.catalina.connector.Request; import org.apache.coyote.ActionCode;
import java.security.cert.*; import org.apache.catalina.*; import org.apache.catalina.connector.*; import org.apache.coyote.*;
[ "java.security", "org.apache.catalina", "org.apache.coyote" ]
java.security; org.apache.catalina; org.apache.coyote;
1,126,060
protected void updateProblemIndication() { if (updateProblemIndication) { BasicDiagnostic diagnostic = new BasicDiagnostic (Diagnostic.OK, "org.isoe.diagraph.megamodel.editor", 0, null, new Object [] { editingDomain.getResourceSet() }); for (Diagnostic childDiagnostic : resou...
void function() { if (updateProblemIndication) { BasicDiagnostic diagnostic = new BasicDiagnostic (Diagnostic.OK, STR, 0, null, new Object [] { editingDomain.getResourceSet() }); for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { if (childDiagnostic.getSeverity() != Diagnostic.OK) { diagnostic.add(ch...
/** * Updates the problems indication with the information described in the specified diagnostic. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Updates the problems indication with the information described in the specified diagnostic.
updateProblemIndication
{ "repo_name": "francoispfister/diagraph", "path": "org.isoe.diagraph.megamodel.editor/src/org/isoe/diagraph/megamodel/presentation/MegamodelEditor.java", "license": "epl-1.0", "size": 53772 }
[ "org.eclipse.core.runtime.CoreException", "org.eclipse.emf.common.ui.editor.ProblemEditorPart", "org.eclipse.emf.common.util.BasicDiagnostic", "org.eclipse.emf.common.util.Diagnostic", "org.eclipse.ui.PartInitException" ]
import org.eclipse.core.runtime.CoreException; import org.eclipse.emf.common.ui.editor.ProblemEditorPart; import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.ui.PartInitException;
import org.eclipse.core.runtime.*; import org.eclipse.emf.common.ui.editor.*; import org.eclipse.emf.common.util.*; import org.eclipse.ui.*;
[ "org.eclipse.core", "org.eclipse.emf", "org.eclipse.ui" ]
org.eclipse.core; org.eclipse.emf; org.eclipse.ui;
1,691,151
long getNumberOfPosts(SlingHttpServletRequest request);
long getNumberOfPosts(SlingHttpServletRequest request);
/** * Get the number of blog posts in the system. * * @param request the {@link SlingHttpServletRequest} used to identify the user requesting this information * @return The number of blog posts. */
Get the number of blog posts in the system
getNumberOfPosts
{ "repo_name": "raducotescu/publick-sling-blog", "path": "src/main/java/com/nateyolles/sling/publick/services/BlogService.java", "license": "apache-2.0", "size": 2219 }
[ "org.apache.sling.api.SlingHttpServletRequest" ]
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.*;
[ "org.apache.sling" ]
org.apache.sling;
751,214
private static List<ResultElement> filterResultRow(List<ResultElement> row, Collection<Path> unionPathCollection, Collection<Path> newPathCollection) { List<ResultElement> newRow = new ArrayList<ResultElement>(); if (unionPathCollection == null && newPathCollection == null) { ...
static List<ResultElement> function(List<ResultElement> row, Collection<Path> unionPathCollection, Collection<Path> newPathCollection) { List<ResultElement> newRow = new ArrayList<ResultElement>(); if (unionPathCollection == null && newPathCollection == null) { return row; } if (unionPathCollection.containsAll(newPathC...
/** * Remove the elements from row which are not in pathCollection */
Remove the elements from row which are not in pathCollection
filterResultRow
{ "repo_name": "elsiklab/intermine", "path": "bio/webapp/src/org/intermine/bio/web/export/GFF3Exporter.java", "license": "lgpl-2.1", "size": 21844 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "org.intermine.api.results.ResultElement", "org.intermine.pathquery.Path" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.intermine.api.results.ResultElement; import org.intermine.pathquery.Path;
import java.util.*; import org.intermine.api.results.*; import org.intermine.pathquery.*;
[ "java.util", "org.intermine.api", "org.intermine.pathquery" ]
java.util; org.intermine.api; org.intermine.pathquery;
1,069,559
public void beforeGenerate(ItemType item, List<String> fields, List<String> forcedFields, Form form, Map<String, Object> context);
void function(ItemType item, List<String> fields, List<String> forcedFields, Form form, Map<String, Object> context);
/** * Callback used to indicate that a form is about to be generated for * the given items and fields. * * <p> * NOTE: Filters all relating to the same type of form can cast the Object * to a more appropriate object, for example all the Node based handlers * can expect a NodeRef obje...
Callback used to indicate that a form is about to be generated for the given items and fields. to a more appropriate object, for example all the Node based handlers can expect a NodeRef object and therefore cast to that
beforeGenerate
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/forms/processor/Filter.java", "license": "lgpl-3.0", "size": 4259 }
[ "java.util.List", "java.util.Map", "org.alfresco.repo.forms.Form" ]
import java.util.List; import java.util.Map; import org.alfresco.repo.forms.Form;
import java.util.*; import org.alfresco.repo.forms.*;
[ "java.util", "org.alfresco.repo" ]
java.util; org.alfresco.repo;
1,382,490
public void set(long startIndex, long endIndex) { if (endIndex <= startIndex) return; int startWord = (int)(startIndex>>6); // since endIndex is one past the end, this is index of the last // word to be changed. int endWord = expandingWordNum(endIndex-1); long startmask = -1L << startIndex;...
void function(long startIndex, long endIndex) { if (endIndex <= startIndex) return; int startWord = (int)(startIndex>>6); int endWord = expandingWordNum(endIndex-1); long startmask = -1L << startIndex; long endmask = -1L >>> -endIndex; if (startWord == endWord) { bits[startWord] = (startmask & endmask); return; } bits[...
/** Sets a range of bits, expanding the set size if necessary * * @param startIndex lower index * @param endIndex one-past the last bit to set */
Sets a range of bits, expanding the set size if necessary
set
{ "repo_name": "williamchengit/TestRepo", "path": "solr-4.9.0/lucene/core/src/java/org/apache/lucene/util/OpenBitSet.java", "license": "apache-2.0", "size": 27797 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
973,515
public void associateWithTask(DNSTask task, DNSState state);
void function(DNSTask task, DNSState state);
/** * Sets the task associated with this Object. * * @param task * associated task * @param state * state of the task */
Sets the task associated with this Object
associateWithTask
{ "repo_name": "maximeflamant/waveplay", "path": "src/javax/jmdns/impl/DNSStatefulObject.java", "license": "mit", "size": 16061 }
[ "javax.jmdns.impl.constants.DNSState", "javax.jmdns.impl.tasks.DNSTask" ]
import javax.jmdns.impl.constants.DNSState; import javax.jmdns.impl.tasks.DNSTask;
import javax.jmdns.impl.constants.*; import javax.jmdns.impl.tasks.*;
[ "javax.jmdns" ]
javax.jmdns;
2,743,436
public static Data newInstance(Context context) throws PackageManager.NameNotFoundException, UnsupportedEncodingException { Data data = new Data(); data.app.packageName = context.getPackageName(); // 'it.dimension.contactlab.pushsample' PackageInfo packageInfo = context.getPackageManage...
static Data function(Context context) throws PackageManager.NameNotFoundException, UnsupportedEncodingException { Data data = new Data(); data.app.packageName = context.getPackageName(); PackageInfo packageInfo = context.getPackageManager().getPackageInfo(data.app.packageName, 0); data.app.versionName = packageInfo.ver...
/** * Factory method that will return a populated Data object. * @param context Context, required. * @return A ready to be sent Data object. * @throws PackageManager.NameNotFoundException * @throws UnsupportedEncodingException */
Factory method that will return a populated Data object
newInstance
{ "repo_name": "contactlab/CLABPush-Android", "path": "app/src/main/java/com/contactlab/clabpush_android_sample/Data.java", "license": "apache-2.0", "size": 4463 }
[ "android.content.Context", "android.content.pm.PackageInfo", "android.content.pm.PackageManager", "android.os.Build", "java.io.UnsupportedEncodingException", "java.util.Locale", "java.util.TimeZone" ]
import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Build; import java.io.UnsupportedEncodingException; import java.util.Locale; import java.util.TimeZone;
import android.content.*; import android.content.pm.*; import android.os.*; import java.io.*; import java.util.*;
[ "android.content", "android.os", "java.io", "java.util" ]
android.content; android.os; java.io; java.util;
2,328,240
@Generated @Selector("constraintEqualToAnchor:multiplier:") public native NSLayoutConstraint constraintEqualToAnchorMultiplier(NSLayoutDimension anchor, @NFloat double m);
@Selector(STR) native NSLayoutConstraint function(NSLayoutDimension anchor, @NFloat double m);
/** * These methods return an inactive constraint of the form thisAnchor = otherAnchor * multiplier. */
These methods return an inactive constraint of the form thisAnchor = otherAnchor * multiplier
constraintEqualToAnchorMultiplier
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/NSLayoutDimension.java", "license": "apache-2.0", "size": 7111 }
[ "org.moe.natj.general.ann.NFloat", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.NFloat; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
836,324
@Override protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) { XInterface oObj = null; XShape oShape = null; // creation of testobject here // first we write what we are intend to do to log file log.println( "creating a test environm...
TestEnvironment function(TestParameters tParam, PrintWriter log) { XInterface oObj = null; XShape oShape = null; log.println( STR ); try { SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF()); oShape = SOF.createShape(xDrawDoc,4000,4000,3000,3000,STR); DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0))....
/** * creating a TestEnvironment for the interfaces to be tested * * @param tParam class which contains additional test parameters * @param log class to log the test state and result * * @return Status class * * @see TestParameters * @see PrintWriter ...
creating a TestEnvironment for the interfaces to be tested
createTestEnvironment
{ "repo_name": "beppec56/core", "path": "qadevOOo/tests/java/mod/_svx/SvxShapeDimensioning.java", "license": "gpl-3.0", "size": 5255 }
[ "com.sun.star.beans.XPropertySet", "com.sun.star.drawing.XShape", "com.sun.star.style.XStyle", "com.sun.star.uno.AnyConverter", "com.sun.star.uno.Type", "com.sun.star.uno.UnoRuntime", "com.sun.star.uno.XInterface", "java.io.PrintWriter" ]
import com.sun.star.beans.XPropertySet; import com.sun.star.drawing.XShape; import com.sun.star.style.XStyle; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Type; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import java.io.PrintWriter;
import com.sun.star.beans.*; import com.sun.star.drawing.*; import com.sun.star.style.*; import com.sun.star.uno.*; import java.io.*;
[ "com.sun.star", "java.io" ]
com.sun.star; java.io;
2,618,641
public double getInnerWidth() { return WidgetUtil .getRequiredWidthBoundingClientRectDouble(tableWrapper); }
double function() { return WidgetUtil .getRequiredWidthBoundingClientRectDouble(tableWrapper); }
/** * Gets the escalator's inner width. This is the entire width in pixels, * without the vertical scrollbar. * * @return escalator's inner width */
Gets the escalator's inner width. This is the entire width in pixels, without the vertical scrollbar
getInnerWidth
{ "repo_name": "fireflyc/vaadin", "path": "client/src/com/vaadin/client/widgets/Escalator.java", "license": "apache-2.0", "size": 266904 }
[ "com.vaadin.client.WidgetUtil" ]
import com.vaadin.client.WidgetUtil;
import com.vaadin.client.*;
[ "com.vaadin.client" ]
com.vaadin.client;
1,619,392
public void addConfigurationProperty(String key, String value) { if (this.configurationProperties == null) { this.configurationProperties = new HashMap<>(); } this.configurationProperties.put(key, value); }
void function(String key, String value) { if (this.configurationProperties == null) { this.configurationProperties = new HashMap<>(); } this.configurationProperties.put(key, value); }
/** * Adds an implementation specific property for the CacheManager */
Adds an implementation specific property for the CacheManager
addConfigurationProperty
{ "repo_name": "adessaigne/camel", "path": "components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java", "license": "apache-2.0", "size": 9915 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,435,759
@SystemApi public boolean startLocationRestrictedScan(WorkSource workSource) { try { mService.startLocationRestrictedScan(workSource); return true; } catch (RemoteException e) { return false; } }
boolean function(WorkSource workSource) { try { mService.startLocationRestrictedScan(workSource); return true; } catch (RemoteException e) { return false; } }
/** * startLocationRestrictedScan() * Trigger a scan which will not make use of DFS channels and is thus not suitable for * establishing wifi connection. * @hide */
startLocationRestrictedScan() Trigger a scan which will not make use of DFS channels and is thus not suitable for establishing wifi connection
startLocationRestrictedScan
{ "repo_name": "Ant-Droid/android_frameworks_base_OLD", "path": "wifi/java/android/net/wifi/WifiManager.java", "license": "apache-2.0", "size": 103390 }
[ "android.os.RemoteException", "android.os.WorkSource" ]
import android.os.RemoteException; import android.os.WorkSource;
import android.os.*;
[ "android.os" ]
android.os;
335,549
public BlobReleaseLeaseHeaders setDateProperty(OffsetDateTime dateProperty) { if (dateProperty == null) { this.dateProperty = null; } else { this.dateProperty = new DateTimeRfc1123(dateProperty); } return this; }
BlobReleaseLeaseHeaders function(OffsetDateTime dateProperty) { if (dateProperty == null) { this.dateProperty = null; } else { this.dateProperty = new DateTimeRfc1123(dateProperty); } return this; }
/** * Set the dateProperty property: UTC date/time value generated by the * service that indicates the time at which the response was initiated. * * @param dateProperty the dateProperty value to set. * @return the BlobReleaseLeaseHeaders object itself. */
Set the dateProperty property: UTC date/time value generated by the service that indicates the time at which the response was initiated
setDateProperty
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobReleaseLeaseHeaders.java", "license": "mit", "size": 7915 }
[ "com.azure.core.util.DateTimeRfc1123", "java.time.OffsetDateTime" ]
import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime;
import com.azure.core.util.*; import java.time.*;
[ "com.azure.core", "java.time" ]
com.azure.core; java.time;
1,189,734
@Override public void run() { run = true; main.beforeRun(); while (true) { main.runLoop(); synchronized (waitingObject) { try { waitingObject.wait(20); } catch (InterruptedException ex) { Logg...
void function() { run = true; main.beforeRun(); while (true) { main.runLoop(); synchronized (waitingObject) { try { waitingObject.wait(20); } catch (InterruptedException ex) { Logger.getLogger(DefenderThread.class.getName()).log(Level.SEVERE, STR, ex); } } if (main.isDone()) { break; } if (!run) { break; } } main.after...
/** * Do Not Call This Method!!!!. */
Do Not Call This Method!!!!
run
{ "repo_name": "daboross/Defender", "path": "src/main/java/net/daboross/defender/DefenderThread.java", "license": "gpl-3.0", "size": 1649 }
[ "java.util.logging.Level", "java.util.logging.Logger" ]
import java.util.logging.Level; import java.util.logging.Logger;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,023,779
private static void printUsage(String cmd) { if ("-report".equals(cmd)) { System.err.println("Usage: java DFSAdmin" + " [-report]"); } else if ("-safemode".equals(cmd)) { System.err.println("Usage: java DFSAdmin" + " [-safemode enter | leave | get ...
static void function(String cmd) { if (STR.equals(cmd)) { System.err.println(STR + STR); } else if (STR.equals(cmd)) { System.err.println(STR + STR); } else if (STR.equals(cmd)) { System.err.println(STR + STR); } else if (STR.equals(cmd)) { System.err.println(STR + STR); } else if (STR.equals(cmd)) { System.err.println...
/** * Displays format of commands. * @param cmd The command that is being executed. */
Displays format of commands
printUsage
{ "repo_name": "jziub/MRProvenance", "path": "src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java", "license": "apache-2.0", "size": 31911 }
[ "org.apache.hadoop.util.ToolRunner" ]
import org.apache.hadoop.util.ToolRunner;
import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
563,211
@GET @Produces(MediaType.APPLICATION_JSON) public Response getIntents() { final Iterable<Intent> intents = get(IntentService.class).getIntents(); final ObjectNode root = encodeArray(Intent.class, "intents", intents); return ok(root).build(); }
@Produces(MediaType.APPLICATION_JSON) Response function() { final Iterable<Intent> intents = get(IntentService.class).getIntents(); final ObjectNode root = encodeArray(Intent.class, STR, intents); return ok(root).build(); }
/** * Gets all intents. * Returns array containing all the intents in the system. * * @return 200 OK with array of all the intents in the system * @onos.rsModel Intents */
Gets all intents. Returns array containing all the intents in the system
getIntents
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java", "license": "apache-2.0", "size": 12663 }
[ "com.fasterxml.jackson.databind.node.ObjectNode", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.onosproject.net.intent.Intent", "org.onosproject.net.intent.IntentService" ]
import com.fasterxml.jackson.databind.node.ObjectNode; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onosproject.net.intent.Intent; import org.onosproject.net.intent.IntentService;
import com.fasterxml.jackson.databind.node.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.net.intent.*;
[ "com.fasterxml.jackson", "javax.ws", "org.onosproject.net" ]
com.fasterxml.jackson; javax.ws; org.onosproject.net;
487,610
void addGeneralBloomFilter(BloomFilterWriter bfw);
void addGeneralBloomFilter(BloomFilterWriter bfw);
/** * Store general Bloom filter in the file. This does not deal with Bloom filter * internals but is necessary, since Bloom filters are stored differently * in HFile version 1 and version 2. */
Store general Bloom filter in the file. This does not deal with Bloom filter internals but is necessary, since Bloom filters are stored differently in HFile version 1 and version 2
addGeneralBloomFilter
{ "repo_name": "mapr/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java", "license": "apache-2.0", "size": 32867 }
[ "org.apache.hadoop.hbase.util.BloomFilterWriter" ]
import org.apache.hadoop.hbase.util.BloomFilterWriter;
import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
129,032
Put add(byte[] bytes, byte[] bytes2, byte[] bytes3);
Put add(byte[] bytes, byte[] bytes2, byte[] bytes3);
/** * A method that encapsulates add(byte[] bytes, byte[] bytes2, byte[] bytes3). * @param bytes * byte array * @param bytes2 * byte array * @param bytes3 * byte array * @return * a value of Put type */
A method that encapsulates add(byte[] bytes, byte[] bytes2, byte[] bytes3)
add
{ "repo_name": "LiuJianan/Graduate-Graph", "path": "src/java/com/chinamobile/bcbsp/thirdPartyInterface/Hbase/BSPHBPut.java", "license": "apache-2.0", "size": 507 }
[ "org.apache.hadoop.hbase.client.Put" ]
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
358,598
public Term getTerm(String name, final String type){
Term function(String name, final String type){
/** * Returns a term with the given name if it exists or * null if it doesn't */
Returns a term with the given name if it exists or null if it doesn't
getTerm
{ "repo_name": "sanger-pathogens/GeneDB", "path": "Jogra/src/org/genedb/jogra/services/SqlTermService.java", "license": "gpl-3.0", "size": 25912 }
[ "org.genedb.jogra.domain.Term" ]
import org.genedb.jogra.domain.Term;
import org.genedb.jogra.domain.*;
[ "org.genedb.jogra" ]
org.genedb.jogra;
1,321,297
AdminIterator contents(Entry tmpl, Transaction txn) throws TransactionException, RemoteException;
AdminIterator contents(Entry tmpl, Transaction txn) throws TransactionException, RemoteException;
/** * Return an <code>AdminIterator</code> that will iterate over all * the entries in the space that match the given template and are * visible under the given transaction. * <p> * The interactions between other operations on the space and * the returned iterator are undefined * <p> ...
Return an <code>AdminIterator</code> that will iterate over all the entries in the space that match the given template and are visible under the given transaction. The interactions between other operations on the space and the returned iterator are undefined
contents
{ "repo_name": "cdegroot/river", "path": "src/com/sun/jini/outrigger/JavaSpaceAdmin.java", "license": "apache-2.0", "size": 4643 }
[ "java.rmi.RemoteException", "net.jini.core.entry.Entry", "net.jini.core.transaction.Transaction", "net.jini.core.transaction.TransactionException" ]
import java.rmi.RemoteException; import net.jini.core.entry.Entry; import net.jini.core.transaction.Transaction; import net.jini.core.transaction.TransactionException;
import java.rmi.*; import net.jini.core.entry.*; import net.jini.core.transaction.*;
[ "java.rmi", "net.jini.core" ]
java.rmi; net.jini.core;
2,123,301
private void createCommitsTable(Resources res) { commits = new CellTable<Revision>(15, res);
void function(Resources res) { commits = new CellTable<Revision>(15, res);
/** Creates table what contains list of available commits. * @param res*/
Creates table what contains list of available commits
createCommitsTable
{ "repo_name": "riuvshin/che-plugins", "path": "plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/history/HistoryViewImpl.java", "license": "epl-1.0", "size": 11966 }
[ "com.google.gwt.user.cellview.client.CellTable", "org.eclipse.che.api.git.shared.Revision", "org.eclipse.che.ide.Resources" ]
import com.google.gwt.user.cellview.client.CellTable; import org.eclipse.che.api.git.shared.Revision; import org.eclipse.che.ide.Resources;
import com.google.gwt.user.cellview.client.*; import org.eclipse.che.api.git.shared.*; import org.eclipse.che.ide.*;
[ "com.google.gwt", "org.eclipse.che" ]
com.google.gwt; org.eclipse.che;
2,071,250
public JComponent getHoverComponent(Program program, ProgramLocation programLocation, FieldLocation fieldLocation, Field field);
JComponent function(Program program, ProgramLocation programLocation, FieldLocation fieldLocation, Field field);
/** * Returns a component to be shown in a popup window that is relevant to the given parameters. * Null is returned if there is no appropriate information to display. * @param program the program that is being hovered over. * @param programLocation the program location where the mouse is hovering. * @param f...
Returns a component to be shown in a popup window that is relevant to the given parameters. Null is returned if there is no appropriate information to display
getHoverComponent
{ "repo_name": "NationalSecurityAgency/ghidra", "path": "Ghidra/Features/Base/src/main/java/ghidra/app/services/HoverService.java", "license": "apache-2.0", "size": 2334 }
[ "javax.swing.JComponent" ]
import javax.swing.JComponent;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,924,945
@Nullable private Object handleNullValue(String name, @Nullable Object value, Class<?> paramType) { if (value == null) { if (Boolean.TYPE.equals(paramType)) { return Boolean.FALSE; } else if (paramType.isPrimitive()) { throw new IllegalStateException("Optional " + paramType.getSimpleName() + " pa...
Object function(String name, @Nullable Object value, Class<?> paramType) { if (value == null) { if (Boolean.TYPE.equals(paramType)) { return Boolean.FALSE; } else if (paramType.isPrimitive()) { throw new IllegalStateException(STR + paramType.getSimpleName() + STR + name + STR + STR); } } return value; }
/** * A {@code null} results in a {@code false} value for {@code boolean}s or an exception for other primitives. */
A null results in a false value for booleans or an exception for other primitives
handleNullValue
{ "repo_name": "spring-projects/spring-framework", "path": "spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java", "license": "apache-2.0", "size": 11886 }
[ "org.springframework.lang.Nullable" ]
import org.springframework.lang.Nullable;
import org.springframework.lang.*;
[ "org.springframework.lang" ]
org.springframework.lang;
1,571,957
public SerializationHandler getOutputDomBuilder() { return _main.getOutputDomBuilder(); }
SerializationHandler function() { return _main.getOutputDomBuilder(); }
/** * Returns a DOMBuilder class wrapped in a SAX adapter. */
Returns a DOMBuilder class wrapped in a SAX adapter
getOutputDomBuilder
{ "repo_name": "universsky/openjdk", "path": "jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/MultiDOM.java", "license": "gpl-2.0", "size": 20790 }
[ "com.sun.org.apache.xml.internal.serializer.SerializationHandler" ]
import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
import com.sun.org.apache.xml.internal.serializer.*;
[ "com.sun.org" ]
com.sun.org;
532,353
public void initialize(Properties props) { try { if (props != null) { PROPERTIES = props; } else { PROPERTIES = Utils.readProperties(PROPERTY_FILE); } // Register the drivers in jdbc DriverManager String drivers = PROPERTIES.getProperty("jdbcDriver", "jdbc.idbDriver"...
void function(Properties props) { try { if (props != null) { PROPERTIES = props; } else { PROPERTIES = Utils.readProperties(PROPERTY_FILE); } String drivers = PROPERTIES.getProperty(STR, STR); if (drivers == null) { throw new Exception(STR); } StringTokenizer st = new StringTokenizer(drivers, STR); while (st.hasMoreTok...
/** * Initializes the database connection. * * @param props the properties to obtain the parameters from, ignored if null */
Initializes the database connection
initialize
{ "repo_name": "mydzigear/weka.kmeanspp.silhouette_score", "path": "src/weka/experiment/DatabaseUtils.java", "license": "gpl-3.0", "size": 44060 }
[ "java.util.Properties", "java.util.StringTokenizer" ]
import java.util.Properties; import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
1,603,276
@NonNull @SuppressWarnings("unchecked") // used by Jelly EL only @Restricted(NoExternalUse.class) // used by Jelly EL only public final List<NodePropertyDescriptor> nodePropertyDescriptors(@CheckForNull Slave it) { List<NodePropertyDescriptor> result = new ArrayList<>(); ...
@SuppressWarnings(STR) @Restricted(NoExternalUse.class) final List<NodePropertyDescriptor> function(@CheckForNull Slave it) { List<NodePropertyDescriptor> result = new ArrayList<>(); Collection<NodePropertyDescriptor> list = (Collection) Jenkins.get().getDescriptorList(NodeProperty.class); for (NodePropertyDescriptor n...
/** * Returns the list of {@link NodePropertyDescriptor} appropriate to the supplied {@link Slave}. * * @param it the {@link Slave} or {@code null} to assume the agent is of type {@link #clazz}. * @return the filtered list * @since 2.12 */
Returns the list of <code>NodePropertyDescriptor</code> appropriate to the supplied <code>Slave</code>
nodePropertyDescriptors
{ "repo_name": "v1v/jenkins", "path": "core/src/main/java/hudson/model/Slave.java", "license": "mit", "size": 28398 }
[ "edu.umd.cs.findbugs.annotations.CheckForNull", "hudson.remoting.Callable", "hudson.slaves.NodeProperty", "hudson.slaves.NodePropertyDescriptor", "java.util.ArrayList", "java.util.Collection", "java.util.List", "org.kohsuke.accmod.Restricted", "org.kohsuke.accmod.restrictions.NoExternalUse" ]
import edu.umd.cs.findbugs.annotations.CheckForNull; import hudson.remoting.Callable; import hudson.slaves.NodeProperty; import hudson.slaves.NodePropertyDescriptor; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictio...
import edu.umd.cs.findbugs.annotations.*; import hudson.remoting.*; import hudson.slaves.*; import java.util.*; import org.kohsuke.accmod.*; import org.kohsuke.accmod.restrictions.*;
[ "edu.umd.cs", "hudson.remoting", "hudson.slaves", "java.util", "org.kohsuke.accmod" ]
edu.umd.cs; hudson.remoting; hudson.slaves; java.util; org.kohsuke.accmod;
2,486,376
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append('['); sb.append(tagName); IMetaTagAttribute[] attrs = getAllAttributes(); if (attrs != null && attrs.length > 0) { sb.append('('); int i = 0; ...
String function() { StringBuilder sb = new StringBuilder(); sb.append('['); sb.append(tagName); IMetaTagAttribute[] attrs = getAllAttributes(); if (attrs != null && attrs.length > 0) { sb.append('('); int i = 0; for (IMetaTagAttribute attr : getAllAttributes()) { if (i != 0) { sb.append(','); sb.append(' '); } String k...
/** * For debugging only. */
For debugging only
toString
{ "repo_name": "greg-dove/flex-falcon", "path": "compiler/src/main/java/org/apache/flex/compiler/internal/definitions/metadata/MetaTag.java", "license": "apache-2.0", "size": 11579 }
[ "org.apache.flex.compiler.definitions.metadata.IMetaTagAttribute" ]
import org.apache.flex.compiler.definitions.metadata.IMetaTagAttribute;
import org.apache.flex.compiler.definitions.metadata.*;
[ "org.apache.flex" ]
org.apache.flex;
749,463
public RSAOtherPrimeInfo[] getOtherPrimeInfo();
RSAOtherPrimeInfo[] function();
/** * Returns the otherPrimeInfo or null if there are only * two prime factors (p and q). * * @return the otherPrimeInfo. */
Returns the otherPrimeInfo or null if there are only two prime factors (p and q)
getOtherPrimeInfo
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java", "license": "apache-2.0", "size": 3210 }
[ "java.security.spec.RSAOtherPrimeInfo" ]
import java.security.spec.RSAOtherPrimeInfo;
import java.security.spec.*;
[ "java.security" ]
java.security;
1,674,234
public static fig.basic.Pair<String, String>[] posTagLineToArray(String line) { Annotation document = new Annotation(line); pipeline.annotate(document); List<fig.basic.Pair<String, String>> out = new ArrayList<>(); for(CoreMap sentence: document.get(SentencesAnnotation.class)...
static fig.basic.Pair<String, String>[] function(String line) { Annotation document = new Annotation(line); pipeline.annotate(document); List<fig.basic.Pair<String, String>> out = new ArrayList<>(); for(CoreMap sentence: document.get(SentencesAnnotation.class)) { List<CoreLabel> tokens = sentence.get(TokensAnnotation.c...
/** * * POS-tag sentence and return an array of Pairs that contain the POS-tag and word. * @param line * @return */
POS-tag sentence and return an array of Pairs that contain the POS-tag and word
posTagLineToArray
{ "repo_name": "sinantie/PLTAG", "path": "src/pltag/util/PosTagger.java", "license": "gpl-3.0", "size": 5075 }
[ "edu.stanford.nlp.ling.CoreAnnotations", "edu.stanford.nlp.ling.CoreLabel", "edu.stanford.nlp.pipeline.Annotation", "edu.stanford.nlp.util.CoreMap", "java.util.ArrayList", "java.util.List" ]
import edu.stanford.nlp.ling.CoreAnnotations; import edu.stanford.nlp.ling.CoreLabel; import edu.stanford.nlp.pipeline.Annotation; import edu.stanford.nlp.util.CoreMap; import java.util.ArrayList; import java.util.List;
import edu.stanford.nlp.ling.*; import edu.stanford.nlp.pipeline.*; import edu.stanford.nlp.util.*; import java.util.*;
[ "edu.stanford.nlp", "java.util" ]
edu.stanford.nlp; java.util;
1,431,701
protected void iterateOverDependencies(String projName, List<String> deps, List projects) { for (String dep: deps) { if (dep.length() > 0) { if (projName.equals(dep)) { continue; } if (!nofollow) { followPro...
void function(String projName, List<String> deps, List projects) { for (String dep: deps) { if (dep.length() > 0) { if (projName.equals(dep)) { continue; } if (!nofollow) { followProjectDependencies(dep, projects, new ArrayList<String>()); } if (projects.contains(dep)) { } else { projects.add(dep); } } } }
/** * Step over each dependency mentioned in depsString and record it. Also follow * each project once. * @param projName the name of the current project * @param deps list of project dependencies * @param projects accumulation of project names found */
Step over each dependency mentioned in depsString and record it. Also follow each project once
iterateOverDependencies
{ "repo_name": "joshkh/intermine", "path": "imbuild/im-ant-tasks/src/org/intermine/task/Dependencies.java", "license": "lgpl-2.1", "size": 20747 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,576,594
public boolean checkTokenValidForIntrospection(KeycloakSession session, RealmModel realm, AccessToken token) throws OAuthErrorException { if (!token.isActive()) { return false; } if (token.getIssuedAt() < realm.getNotBefore()) { return false; } Clien...
boolean function(KeycloakSession session, RealmModel realm, AccessToken token) throws OAuthErrorException { if (!token.isActive()) { return false; } if (token.getIssuedAt() < realm.getNotBefore()) { return false; } ClientModel client = realm.getClientByClientId(token.getIssuedFor()); if (client == null !client.isEnable...
/** * Checks if the token is valid. Intended usage is for token introspection endpoints as the session last refresh * is updated if the token was valid. This is used to keep the session alive when long lived tokens are used. * * @param session * @param realm * @param token * @return ...
Checks if the token is valid. Intended usage is for token introspection endpoints as the session last refresh is updated if the token was valid. This is used to keep the session alive when long lived tokens are used
checkTokenValidForIntrospection
{ "repo_name": "brat000012001/keycloak", "path": "services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java", "license": "apache-2.0", "size": 40548 }
[ "org.keycloak.OAuthErrorException", "org.keycloak.common.util.Time", "org.keycloak.models.ClientModel", "org.keycloak.models.KeycloakSession", "org.keycloak.models.RealmModel", "org.keycloak.models.UserSessionModel", "org.keycloak.representations.AccessToken", "org.keycloak.services.managers.Authentic...
import org.keycloak.OAuthErrorException; import org.keycloak.common.util.Time; import org.keycloak.models.ClientModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.UserSessionModel; import org.keycloak.representations.AccessToken; import org.keycloak.serv...
import org.keycloak.*; import org.keycloak.common.util.*; import org.keycloak.models.*; import org.keycloak.representations.*; import org.keycloak.services.managers.*;
[ "org.keycloak", "org.keycloak.common", "org.keycloak.models", "org.keycloak.representations", "org.keycloak.services" ]
org.keycloak; org.keycloak.common; org.keycloak.models; org.keycloak.representations; org.keycloak.services;
1,373,151
private static void dumpFileHeader(final PrintStream printStream, final ByteBuffer buffer, final Path persistentFile, final SeekableByteChannel channel) throws IOException { buffer.clear(); buffer.limit(BLOB_STORE_HEADER_LEN); channel.read(buffer); buffer.flip(); ...
static void function(final PrintStream printStream, final ByteBuffer buffer, final Path persistentFile, final SeekableByteChannel channel) throws IOException { buffer.clear(); buffer.limit(BLOB_STORE_HEADER_LEN); channel.read(buffer); buffer.flip(); final boolean validMagic = buffer.get() == BLOB_STORE_MAGIC_NUMBER[0] ...
/** * Dump the File Header of the Blob Store * * @param printStream the stream to dump the Blob Store to * @param buffer a buffer to use * @param persistentFile the Blob Store persistent file to dump * @param channel the open channel for reading the {@code persistentFile}. * * @t...
Dump the File Header of the Blob Store
dumpFileHeader
{ "repo_name": "RemiKoutcherawy/exist", "path": "exist-core/src/main/java/org/exist/storage/blob/BlobStoreDumpTool.java", "license": "lgpl-2.1", "size": 6279 }
[ "java.io.IOException", "java.io.PrintStream", "java.nio.ByteBuffer", "java.nio.channels.SeekableByteChannel", "java.nio.file.Path" ]
import java.io.IOException; import java.io.PrintStream; import java.nio.ByteBuffer; import java.nio.channels.SeekableByteChannel; import java.nio.file.Path;
import java.io.*; import java.nio.*; import java.nio.channels.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,355,378
AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE; if (audioInputStream == null) { System.err.println("No loaded audio to save"); return; } try { audioInputStream.reset(); } catch (Exception e) { System.err.println("Unable...
AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE; if (audioInputStream == null) { System.err.println(STR); return; } try { audioInputStream.reset(); } catch (Exception e) { System.err.println(STR + e); return; } File file = new File(Utils.FILENAME_SOUND_RAW); try { if (AudioSystem.write(audioInputStream, fileT...
/** * Save an audio input stream to a WAVE file as raw sound. * * @param audioInputStream */
Save an audio input stream to a WAVE file as raw sound
saveToWaveFile
{ "repo_name": "adveres/Speech-Detection", "path": "src/speech_detection/FileSaver.java", "license": "gpl-2.0", "size": 5577 }
[ "java.io.File", "java.io.IOException", "javax.sound.sampled.AudioFileFormat", "javax.sound.sampled.AudioSystem" ]
import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioSystem;
import java.io.*; import javax.sound.sampled.*;
[ "java.io", "javax.sound" ]
java.io; javax.sound;
2,916,320
@Override public void close() throws IOException { bufferedReader.close(); }
void function() throws IOException { bufferedReader.close(); }
/** * Closes streams. * @throws IOException IOException */
Closes streams
close
{ "repo_name": "misterflud/aoleynikov", "path": "chapter_008/query/src/main/java/ru/job4j/ConnectionWithUser.java", "license": "apache-2.0", "size": 1269 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,089,744
public Deferred<Object> addPoint(final String metric, final long timestamp, final long value, final Map<String, String> tags) { final byte[] v; if (Byte.MIN_VALUE <= value && value <= Byte.MAX_VALUE) { ...
Deferred<Object> function(final String metric, final long timestamp, final long value, final Map<String, String> tags) { final byte[] v; if (Byte.MIN_VALUE <= value && value <= Byte.MAX_VALUE) { v = new byte[] { (byte) value }; } else if (Short.MIN_VALUE <= value && value <= Short.MAX_VALUE) { v = Bytes.fromShort((shor...
/** * Adds a single integer value data point in the TSDB. * @param metric A non-empty string. * @param timestamp The timestamp associated with the value. * @param value The value of the data point. * @param tags The tags on this series. This map must be non-empty. * @return A deferred object that ind...
Adds a single integer value data point in the TSDB
addPoint
{ "repo_name": "cyngn/opentsdb", "path": "src/core/TSDB.java", "license": "gpl-3.0", "size": 41107 }
[ "com.stumbleupon.async.Deferred", "java.util.Map", "org.hbase.async.Bytes" ]
import com.stumbleupon.async.Deferred; import java.util.Map; import org.hbase.async.Bytes;
import com.stumbleupon.async.*; import java.util.*; import org.hbase.async.*;
[ "com.stumbleupon.async", "java.util", "org.hbase.async" ]
com.stumbleupon.async; java.util; org.hbase.async;
205,864
public alluxio.grpc.ListAllPResponse listAll(alluxio.grpc.ListAllPRequest request) { return blockingUnaryCall( getChannel(), getListAllMethod(), getCallOptions(), request); }
alluxio.grpc.ListAllPResponse function(alluxio.grpc.ListAllPRequest request) { return blockingUnaryCall( getChannel(), getListAllMethod(), getCallOptions(), request); }
/** * <pre> ** * Lists ids of all known jobs. * </pre> */
<code> Lists ids of all known jobs. </code>
listAll
{ "repo_name": "madanadit/alluxio", "path": "core/transport/src/main/java/alluxio/grpc/JobMasterClientServiceGrpc.java", "license": "apache-2.0", "size": 22554 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
1,874,265
public int saveLicence(final String licenceId, final Licence licence) { try { final String existingLicence = getLicence(); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(licence); baos.flush...
int function(final String licenceId, final Licence licence) { try { final String existingLicence = getLicence(); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(licence); baos.flush(); final ByteBuffer bb = ByteBuffer.wrap(baos...
/** * Save the licence * * @param licenceId * the licenceId * @param licence * the licence * @return CodesReturned.ALLOK if all was ok * @throws DatafariServerException */
Save the licence
saveLicence
{ "repo_name": "francelabs/datafari", "path": "datafari-webapp/src/main/java/com/francelabs/datafari/service/db/LicenceDataService.java", "license": "apache-2.0", "size": 5458 }
[ "com.datastax.oss.driver.api.core.cql.BoundStatement", "com.datastax.oss.driver.api.core.cql.PreparedStatement", "com.francelabs.datafari.exception.CodesReturned", "com.francelabs.licence.Licence", "java.io.ByteArrayOutputStream", "java.io.ObjectOutputStream", "java.nio.ByteBuffer" ]
import com.datastax.oss.driver.api.core.cql.BoundStatement; import com.datastax.oss.driver.api.core.cql.PreparedStatement; import com.francelabs.datafari.exception.CodesReturned; import com.francelabs.licence.Licence; import java.io.ByteArrayOutputStream; import java.io.ObjectOutputStream; import java.nio.ByteBuffer;
import com.datastax.oss.driver.api.core.cql.*; import com.francelabs.datafari.exception.*; import com.francelabs.licence.*; import java.io.*; import java.nio.*;
[ "com.datastax.oss", "com.francelabs.datafari", "com.francelabs.licence", "java.io", "java.nio" ]
com.datastax.oss; com.francelabs.datafari; com.francelabs.licence; java.io; java.nio;
218,449
public synchronized void addQueryTokens(String query, List<String> queryTokens) { this.queryTokens.put(query, queryTokens); }
synchronized void function(String query, List<String> queryTokens) { this.queryTokens.put(query, queryTokens); }
/** * Adds the query tokens for the given query. */
Adds the query tokens for the given query
addQueryTokens
{ "repo_name": "GateNLP/gate-core", "path": "src/main/java/gate/creole/annic/lucene/LuceneSearcher.java", "license": "lgpl-3.0", "size": 19695 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,440,873
public Builder customClientData(Bundle customClientData) { this.customClientData = customClientData; return this; } /** * Build the {@link UpdateDetailsRequest} of this builder. * * @return an {@link UpdateDetailsRequest}
Builder function(Bundle customClientData) { this.customClientData = customClientData; return this; } /** * Build the {@link UpdateDetailsRequest} of this builder. * * @return an {@link UpdateDetailsRequest}
/** * Define the {@link Bundle} of user-defined customClientData. * * @param customClientData the {@link Bundle} of user-defined customClientData. * @return the same builder instance. */
Define the <code>Bundle</code> of user-defined customClientData
customClientData
{ "repo_name": "barracksiot/android-client", "path": "ota/src/main/java/io/barracks/ota/client/api/UpdateDetailsRequest.java", "license": "apache-2.0", "size": 5894 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
348,829
void setThreshold(BigDecimal value);
void setThreshold(BigDecimal value);
/** * Sets the value of the '{@link org.openhab.binding.tinkerforge.internal.model.MBrickDC#getThreshold * <em>Threshold</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @param value the new value of the '<em>Threshold</em>' attribute. * @see #getThreshold() ...
Sets the value of the '<code>org.openhab.binding.tinkerforge.internal.model.MBrickDC#getThreshold Threshold</code>' attribute.
setThreshold
{ "repo_name": "lewie/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/MBrickDC.java", "license": "epl-1.0", "size": 13754 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
809,166
protected void channelIdle(ChannelHandlerContext ctx, IdleStateEvent evt) throws Exception { ctx.fireUserEventTriggered(evt); }
void function(ChannelHandlerContext ctx, IdleStateEvent evt) throws Exception { ctx.fireUserEventTriggered(evt); }
/** * Is called when an {@link IdleStateEvent} should be fired. This implementation calls * {@link ChannelHandlerContext#fireUserEventTriggered(Object)}. */
Is called when an <code>IdleStateEvent</code> should be fired. This implementation calls <code>ChannelHandlerContext#fireUserEventTriggered(Object)</code>
channelIdle
{ "repo_name": "yipen9/netty", "path": "handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java", "license": "apache-2.0", "size": 21265 }
[ "io.netty.channel.ChannelHandlerContext" ]
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
1,671,871
public List<UserAccount> getCacheDataInListForm() { List<UserAccount> listOfCacheData = new ArrayList<>(); Node temp = head; while (temp != null) { listOfCacheData.add(temp.userAccount); temp = temp.next; } return listOfCacheData; }
List<UserAccount> function() { List<UserAccount> listOfCacheData = new ArrayList<>(); Node temp = head; while (temp != null) { listOfCacheData.add(temp.userAccount); temp = temp.next; } return listOfCacheData; }
/** * Returns cache data in list form. */
Returns cache data in list form
getCacheDataInListForm
{ "repo_name": "Crossy147/java-design-patterns", "path": "caching/src/main/java/com/iluwatar/caching/LruCache.java", "license": "mit", "size": 5009 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
739,782
private Iterator<Entry> siblingsAndBelow(Optional<Entry> oEntry) { return oEntry.map(entry1 -> concat(transform(getCycle(entry1).iterator(), entry -> { assert entry != null; return concat(singletonIterator(entry), siblingsAndBelow(entry.oFirstChild)); ...
Iterator<Entry> function(Optional<Entry> oEntry) { return oEntry.map(entry1 -> concat(transform(getCycle(entry1).iterator(), entry -> { assert entry != null; return concat(singletonIterator(entry), siblingsAndBelow(entry.oFirstChild)); }))).orElse(Collections.emptyIterator()); }
/** * Depth-first iteration */
Depth-first iteration
siblingsAndBelow
{ "repo_name": "pluraliseseverythings/grakn", "path": "grakn-graql/src/main/java/ai/grakn/graql/internal/gremlin/spanningtree/datastructure/FibonacciHeap.java", "license": "gpl-3.0", "size": 12102 }
[ "com.google.common.collect.Iterators", "java.util.Collections", "java.util.Iterator", "java.util.Optional" ]
import com.google.common.collect.Iterators; import java.util.Collections; import java.util.Iterator; import java.util.Optional;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
243,404
public static String stripCode(String columnMapping) { Preconditions.checkNotNull(columnMapping); int offset = columnMapping.lastIndexOf(AccumuloHiveConstants.POUND); if (-1 == offset || (0 < offset && AccumuloHiveConstants.ESCAPE == columnMapping.charAt(offset - 1))) { throw new IllegalArg...
static String function(String columnMapping) { Preconditions.checkNotNull(columnMapping); int offset = columnMapping.lastIndexOf(AccumuloHiveConstants.POUND); if (-1 == offset (0 < offset && AccumuloHiveConstants.ESCAPE == columnMapping.charAt(offset - 1))) { throw new IllegalArgumentException( STR); } return columnMap...
/** * Removes the column encoding code and separator from the original column mapping string. Throws * an IllegalArgumentException if this method is called on a string that doesn't contain a code. * * @param columnMapping * The mapping from Hive column to Accumulo column * @return The column ...
Removes the column encoding code and separator from the original column mapping string. Throws an IllegalArgumentException if this method is called on a string that doesn't contain a code
stripCode
{ "repo_name": "vineetgarg02/hive", "path": "accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/columns/ColumnEncoding.java", "license": "apache-2.0", "size": 5827 }
[ "com.google.common.base.Preconditions", "org.apache.hadoop.hive.accumulo.AccumuloHiveConstants" ]
import com.google.common.base.Preconditions; import org.apache.hadoop.hive.accumulo.AccumuloHiveConstants;
import com.google.common.base.*; import org.apache.hadoop.hive.accumulo.*;
[ "com.google.common", "org.apache.hadoop" ]
com.google.common; org.apache.hadoop;
1,531,308
public double getStartX() { Coordinate p = ls.getCoordinate(0); return p.x; }
double function() { Coordinate p = ls.getCoordinate(0); return p.x; }
/** * Gets the start X ordinate of the segment * * @return the X ordinate value */
Gets the start X ordinate of the segment
getStartX
{ "repo_name": "meteoinfo/meteoinfolib", "path": "src/org/meteoinfo/jts/triangulate/Segment.java", "license": "lgpl-3.0", "size": 5891 }
[ "org.meteoinfo.jts.geom.Coordinate" ]
import org.meteoinfo.jts.geom.Coordinate;
import org.meteoinfo.jts.geom.*;
[ "org.meteoinfo.jts" ]
org.meteoinfo.jts;
1,105,617
public void registerListener(final StatusListener listener) { listenersLock.writeLock().lock(); try { listeners.add(listener); final Level lvl = listener.getStatusLevel(); if (listenersLevel < lvl.intLevel()) { listenersLevel = lvl.intLevel(); ...
void function(final StatusListener listener) { listenersLock.writeLock().lock(); try { listeners.add(listener); final Level lvl = listener.getStatusLevel(); if (listenersLevel < lvl.intLevel()) { listenersLevel = lvl.intLevel(); } } finally { listenersLock.writeLock().unlock(); } }
/** * Registers a new listener. * * @param listener The StatusListener to register. */
Registers a new listener
registerListener
{ "repo_name": "lqbweb/logging-log4j2", "path": "log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java", "license": "apache-2.0", "size": 13475 }
[ "org.apache.logging.log4j.Level" ]
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.*;
[ "org.apache.logging" ]
org.apache.logging;
1,096,545
@Nullable public WorkbookChartSeries put(@Nonnull final WorkbookChartSeries newWorkbookChartSeries) throws ClientException { return send(HttpMethod.PUT, newWorkbookChartSeries); }
WorkbookChartSeries function(@Nonnull final WorkbookChartSeries newWorkbookChartSeries) throws ClientException { return send(HttpMethod.PUT, newWorkbookChartSeries); }
/** * Creates a WorkbookChartSeries with a new object * * @param newWorkbookChartSeries the object to create/update * @return the created WorkbookChartSeries * @throws ClientException this exception occurs if the request was unable to complete for any reason */
Creates a WorkbookChartSeries with a new object
put
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/WorkbookChartSeriesRequest.java", "license": "mit", "size": 6385 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.WorkbookChartSeries", "javax.annotation.Nonnull" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.WorkbookChartSeries; import javax.annotation.Nonnull;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
379,100