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
//------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF public static MarketDataEnvironmentComponentFactory.Meta meta() { return MarketDataEnvironmentComponentFactory.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(MarketDataEnvironmentComponentFactory.Meta.I...
static MarketDataEnvironmentComponentFactory.Meta function() { return MarketDataEnvironmentComponentFactory.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(MarketDataEnvironmentComponentFactory.Meta.INSTANCE); }
/** * The meta-bean for {@code MarketDataEnvironmentComponentFactory}. * @return the meta-bean, not null */
The meta-bean for MarketDataEnvironmentComponentFactory
meta
{ "repo_name": "jeorme/OG-Platform", "path": "sesame/sesame-component/src/main/java/com/opengamma/sesame/component/MarketDataEnvironmentComponentFactory.java", "license": "apache-2.0", "size": 27345 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,653,616
public static boolean powerCycleLocalController(LocalControllerDescription localController, PowerSavingAction powerSavingAction, GroupManagerRepository repository) { log_.debug(String.format("Starting...
static boolean function(LocalControllerDescription localController, PowerSavingAction powerSavingAction, GroupManagerRepository repository) { log_.debug(String.format(STR, localController)); boolean isChanged = repository.changeLocalControllerStatus(localController.getId(), LocalControllerStatus.PASSIVE); if (!isChange...
/** * Power cycles local controller. * * @param localController The local controller description * @param powerSavingAction The power saving action * @param repository The group manager repository * @return true if everything ok, false otherwise */
Power cycles local controller
powerCycleLocalController
{ "repo_name": "snoozesoftware/snoozenode", "path": "src/main/java/org/inria/myriads/snoozenode/groupmanager/energysaver/util/EnergySaverUtils.java", "license": "gpl-2.0", "size": 9030 }
[ "org.inria.myriads.snoozecommon.communication.localcontroller.LocalControllerDescription", "org.inria.myriads.snoozecommon.communication.localcontroller.LocalControllerStatus", "org.inria.myriads.snoozenode.configurator.energymanagement.enums.PowerSavingAction", "org.inria.myriads.snoozenode.database.api.Grou...
import org.inria.myriads.snoozecommon.communication.localcontroller.LocalControllerDescription; import org.inria.myriads.snoozecommon.communication.localcontroller.LocalControllerStatus; import org.inria.myriads.snoozenode.configurator.energymanagement.enums.PowerSavingAction; import org.inria.myriads.snoozenode.databa...
import org.inria.myriads.snoozecommon.communication.localcontroller.*; import org.inria.myriads.snoozenode.configurator.energymanagement.enums.*; import org.inria.myriads.snoozenode.database.api.*;
[ "org.inria.myriads" ]
org.inria.myriads;
1,350,848
private void configureClearText(SocketChannel ch) { final ChannelPipeline p = ch.pipeline(); final HttpServerCodec sourceCodec = new HttpServerCodec();
void function(SocketChannel ch) { final ChannelPipeline p = ch.pipeline(); final HttpServerCodec sourceCodec = new HttpServerCodec();
/** * Configure the pipeline for a cleartext upgrade from HTTP to HTTP/2.0 */
Configure the pipeline for a cleartext upgrade from HTTP to HTTP/2.0
configureClearText
{ "repo_name": "bryce-anderson/netty", "path": "example/src/main/java/io/netty/example/http2/helloworld/frame/server/Http2ServerInitializer.java", "license": "apache-2.0", "size": 5004 }
[ "io.netty.channel.ChannelPipeline", "io.netty.channel.socket.SocketChannel", "io.netty.handler.codec.http.HttpServerCodec" ]
import io.netty.channel.ChannelPipeline; import io.netty.channel.socket.SocketChannel; import io.netty.handler.codec.http.HttpServerCodec;
import io.netty.channel.*; import io.netty.channel.socket.*; import io.netty.handler.codec.http.*;
[ "io.netty.channel", "io.netty.handler" ]
io.netty.channel; io.netty.handler;
2,214,037
public String[] listChildren(String iPath) { // TODO: Disallow the empty string, or use databaseName? if (iPath.equals("")) { throw new IllegalArgumentException( "The empty string is not a valid path"); } String nPath = new File(iPath).getPath(); ...
String[] function(String iPath) { if (iPath.equals(STRThe empty string is not a valid path"); } String nPath = new File(iPath).getPath(); if (nPath.charAt(nPath.length() -1) != SEP) { nPath += SEP; } ArrayList<String> children = new ArrayList<String>(); synchronized (LOCK) { Iterator<String> paths = files.keySet().iter...
/** * Lists the childen of the specified path. * * @param iPath the directory to list the children of * @return An array with the relative paths of the children. */
Lists the childen of the specified path
listChildren
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/impl/io/vfmem/DataStore.java", "license": "apache-2.0", "size": 13387 }
[ "java.io.File", "java.util.ArrayList", "java.util.Iterator" ]
import java.io.File; import java.util.ArrayList; import java.util.Iterator;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
475,131
public Date getDueDate() { return this.dueDate; }
Date function() { return this.dueDate; }
/** * <p>Getter for the field <code>dueDate</code>.</p> * * @return a {@link java.util.Date} object. */
Getter for the field <code>dueDate</code>
getDueDate
{ "repo_name": "NotFound403/WePay", "path": "src/main/java/cn/felord/wepay/ali/sdk/api/domain/DrawndnVo.java", "license": "apache-2.0", "size": 10453 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,106,583
public ContentItem createMediaContentItem(byte[] data, String mimeType, String fileName);
ContentItem function(byte[] data, String mimeType, String fileName);
/** * Create a new multimedia content item, using the data passed as argument. * * @param data the data as byte array * @param mimeType the mime type in string format * @param fileName the file name of the media content (for downloading) */
Create a new multimedia content item, using the data passed as argument
createMediaContentItem
{ "repo_name": "StexX/KiWi-OSE", "path": "src/action/kiwi/api/content/ContentItemService.java", "license": "bsd-3-clause", "size": 10619 }
[ "kiwi.model.content.ContentItem" ]
import kiwi.model.content.ContentItem;
import kiwi.model.content.*;
[ "kiwi.model.content" ]
kiwi.model.content;
1,210,697
private void negotiateSSLConnection(String user, String password, String database, int packLength) throws SQLException { if (!ExportControlled.enabled()) { throw new ConnectionFeatureNotAvailableException(this.connection, this.lastPacketSentTimeMs, null); } if ((this.serverCapab...
void function(String user, String password, String database, int packLength) throws SQLException { if (!ExportControlled.enabled()) { throw new ConnectionFeatureNotAvailableException(this.connection, this.lastPacketSentTimeMs, null); } if ((this.serverCapabilities & CLIENT_SECURE_CONNECTION) != 0) { this.clientParam = ...
/** * Negotiates the SSL communications channel used when connecting * to a MySQL server that understands SSL. * * @param user * @param password * @param database * @param packLength * @throws SQLException * @throws CommunicationsException */
Negotiates the SSL communications channel used when connecting to a MySQL server that understands SSL
negotiateSSLConnection
{ "repo_name": "mwaylabs/mysql-connector-j", "path": "src/com/mysql/jdbc/MysqlIO.java", "license": "gpl-2.0", "size": 198599 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
80,273
protected BarcodeArea createArea(FontState fontState, float width, float height) { return new BarcodeArea(fontState, width, height); }
BarcodeArea function(FontState fontState, float width, float height) { return new BarcodeArea(fontState, width, height); }
/** * Factory method for creating BarcodeAreas. * @param fontState the font state * @param width the width of the area * @param height the height of the area * @return the newly created BarcodeArea */
Factory method for creating BarcodeAreas
createArea
{ "repo_name": "jeremycrosbie/barcode4j", "path": "src/fop-0.20.5/java/org/krysalis/barcode4j/fop0205/BarcodeElement.java", "license": "apache-2.0", "size": 8844 }
[ "org.apache.fop.layout.FontState" ]
import org.apache.fop.layout.FontState;
import org.apache.fop.layout.*;
[ "org.apache.fop" ]
org.apache.fop;
2,253,296
private boolean isTagIgnored(DetailNode javadocTagSection) { return ignoredTags.contains(JavadocUtils.getTagName(javadocTagSection)); }
boolean function(DetailNode javadocTagSection) { return ignoredTags.contains(JavadocUtils.getTagName(javadocTagSection)); }
/** * Checks if list of ignored tags contains javadocTagSection's javadoc tag. * * @param javadocTagSection to check javadoc tag in. * @return true, if ignoredTags contains javadocTagSection's javadoc tag. */
Checks if list of ignored tags contains javadocTagSection's javadoc tag
isTagIgnored
{ "repo_name": "another-dave/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SingleLineJavadocCheck.java", "license": "lgpl-2.1", "size": 6477 }
[ "com.puppycrawl.tools.checkstyle.api.DetailNode" ]
import com.puppycrawl.tools.checkstyle.api.DetailNode;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
1,804,916
public List<Statement> generate() { List<Statement> stmts = new ArrayList<Statement>(); Statement innerLoop = LoopDesugarTransform.makeLoopStmt(new SwitchStmt(STATE_VAR, this.states)); stmts.add(innerLoop); return stmts;...
List<Statement> function() { List<Statement> stmts = new ArrayList<Statement>(); Statement innerLoop = LoopDesugarTransform.makeLoopStmt(new SwitchStmt(STATE_VAR, this.states)); stmts.add(innerLoop); return stmts; }
/** * Generate the statements for the generator. */
Generate the statements for the generator
generate
{ "repo_name": "rfw/genja", "path": "src/genja/transform/Generator.java", "license": "gpl-3.0", "size": 6134 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,021,815
public void addListener(int key, SharedValuesListener listener) { HashSet<WeakReference<SharedValuesListener>> listeners = mValuesListeners.get(key); if (listeners == null) { listeners = new HashSet<>(); mValuesListeners.put(key, listeners); } listeners.add(ne...
void function(int key, SharedValuesListener listener) { HashSet<WeakReference<SharedValuesListener>> listeners = mValuesListeners.get(key); if (listeners == null) { listeners = new HashSet<>(); mValuesListeners.put(key, listeners); } listeners.add(new WeakReference<>(listener)); }
/** * Add a listener for a key * @param key * @param listener */
Add a listener for a key
addListener
{ "repo_name": "AndroidX/constraintlayout", "path": "constraintlayout/constraintlayout/src/main/java/androidx/constraintlayout/widget/SharedValues.java", "license": "apache-2.0", "size": 4360 }
[ "java.lang.ref.WeakReference", "java.util.HashSet" ]
import java.lang.ref.WeakReference; import java.util.HashSet;
import java.lang.ref.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,756,142
public LineMetrics getLineMetrics(CharacterIterator ci, int begin, int limit, Graphics g) { FontRenderContext rc; if (g instanceof Graphics2D) rc = ((Graphics2D) g).getFontRenderContext(); else rc = gRC; return font.getLineMetrics(ci, begin, limit, rc)...
LineMetrics function(CharacterIterator ci, int begin, int limit, Graphics g) { FontRenderContext rc; if (g instanceof Graphics2D) rc = ((Graphics2D) g).getFontRenderContext(); else rc = gRC; return font.getLineMetrics(ci, begin, limit, rc); }
/** * Returns a {@link LineMetrics} object constructed with the * specified text and the {@link FontRenderContext} of the Graphics * object when it is an instance of Graphics2D or a generic * FontRenderContext with a null transform, not anti-aliased and not * using fractional metrics. * * @param ci...
Returns a <code>LineMetrics</code> object constructed with the specified text and the <code>FontRenderContext</code> of the Graphics object when it is an instance of Graphics2D or a generic FontRenderContext with a null transform, not anti-aliased and not using fractional metrics
getLineMetrics
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/java/awt/FontMetrics.java", "license": "bsd-3-clause", "size": 13628 }
[ "java.awt.font.FontRenderContext", "java.awt.font.LineMetrics", "java.text.CharacterIterator" ]
import java.awt.font.FontRenderContext; import java.awt.font.LineMetrics; import java.text.CharacterIterator;
import java.awt.font.*; import java.text.*;
[ "java.awt", "java.text" ]
java.awt; java.text;
1,467,293
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<FileServicePropertiesInner>> getServicePropertiesWithResponseAsync( String resourceGroupName, String accountName) { if (this.client.getEndpoint() == null) { return Mono .error( new Il...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<FileServicePropertiesInner>> function( String resourceGroupName, String accountName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentExce...
/** * Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case * insensitive. * @param accountName The name of the storage acco...
Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules
getServicePropertiesWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/FileServicesClientImpl.java", "license": "mit", "size": 32560 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.storage.fluent.models.FileServicePropertiesInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.storage.fluent.models.FileServicePropertiesInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storage.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
415,905
private boolean isSupportedGlesRenderConfig(BatchRunConfiguration runConfig) throws DeviceNotAvailableException, CapabilityQueryFailureException { // query if configuration is supported final StringBuilder configCommandLine = new StringBuilder(getRunConfigDisplayCmdLine(r...
boolean function(BatchRunConfiguration runConfig) throws DeviceNotAvailableException, CapabilityQueryFailureException { final StringBuilder configCommandLine = new StringBuilder(getRunConfigDisplayCmdLine(runConfig)); if (configCommandLine.length() != 0) { configCommandLine.append(" "); } configCommandLine.append(STR);...
/** * Query if rendertarget is supported */
Query if rendertarget is supported
isSupportedGlesRenderConfig
{ "repo_name": "endlessm/chromium-browser", "path": "third_party/angle/third_party/VK-GL-CTS/src/android/cts/runner/src/com/drawelements/deqp/runner/DeqpTestRunner.java", "license": "bsd-3-clause", "size": 87167 }
[ "com.android.tradefed.device.DeviceNotAvailableException" ]
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.*;
[ "com.android.tradefed" ]
com.android.tradefed;
2,206,323
public Point obtenerPosicion() { return posicion; }
Point function() { return posicion; }
/** * Obtener posicion. * * @return the point */
Obtener posicion
obtenerPosicion
{ "repo_name": "mix9532/Juego", "path": "src/principal/inventario/ObjetoUnicoTiled.java", "license": "gpl-3.0", "size": 730 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,042,434
public boolean pingMyServer(boolean notifyListeners) throws NotConnectedException { return pingMyServer(notifyListeners, connection().getPacketReplyTimeout()); }
boolean function(boolean notifyListeners) throws NotConnectedException { return pingMyServer(notifyListeners, connection().getPacketReplyTimeout()); }
/** * Pings the server. This method will return true if the server is reachable. It * is the equivalent of calling <code>ping</code> with the XMPP domain. * <p> * Unlike the {@link #ping(String)} case, this method will return true even if * {@link #isPingSupported(String)} is false. * ...
Pings the server. This method will return true if the server is reachable. It is the equivalent of calling <code>ping</code> with the XMPP domain. Unlike the <code>#ping(String)</code> case, this method will return true even if <code>#isPingSupported(String)</code> is false
pingMyServer
{ "repo_name": "Soo000/SooChat", "path": "src/org/jivesoftware/smackx/ping/PingManager.java", "license": "apache-2.0", "size": 16012 }
[ "org.jivesoftware.smack.SmackException" ]
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
389,823
@Deprecated public byte[] getContent(XWikiContext context) throws XWikiException { if (this.attachment_content == null && context != null) { this.doc.loadAttachmentContent(this, context); } return this.attachment_content.getContent(); }
byte[] function(XWikiContext context) throws XWikiException { if (this.attachment_content == null && context != null) { this.doc.loadAttachmentContent(this, context); } return this.attachment_content.getContent(); }
/** * Retrive the content of this attachment as a byte array. * * @param context current XWikiContext * @return a byte array containing the binary data content of the attachment * @throws XWikiException when an error occurs during wiki operation * @deprecated use {@link #getContentInputStr...
Retrive the content of this attachment as a byte array
getContent
{ "repo_name": "pbondoer/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiAttachment.java", "license": "lgpl-2.1", "size": 39910 }
[ "com.xpn.xwiki.XWikiContext", "com.xpn.xwiki.XWikiException" ]
import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.XWikiException;
import com.xpn.xwiki.*;
[ "com.xpn.xwiki" ]
com.xpn.xwiki;
1,425,192
public void draw(Graphics2D g2, Rectangle2D plotArea) { draw(g2, plotArea, 0); }
void function(Graphics2D g2, Rectangle2D plotArea) { draw(g2, plotArea, 0); }
/** * Draws the needle. * * @param g2 the graphics device. * @param plotArea the plot area. */
Draws the needle
draw
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/needle/MeterNeedle.java", "license": "mit", "size": 11820 }
[ "java.awt.Graphics2D", "java.awt.geom.Rectangle2D" ]
import java.awt.Graphics2D; import java.awt.geom.Rectangle2D;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,417,960
public static String getOutputPath(ConfigurationValue cv, String fileName) { String result = fileName; if (fileName != null) { File file = new File(fileName); if (!FileUtils.isAbsolute(file)) { String directory = cv.getBuffer().getToken(flex2.too...
static String function(ConfigurationValue cv, String fileName) { String result = fileName; if (fileName != null) { File file = new File(fileName); if (!FileUtils.isAbsolute(file)) { String directory = cv.getBuffer().getToken(flex2.tools.oem.Configuration.DEFAULT_OUTPUT_DIRECTORY_TOKEN); if (directory == null) { directo...
/** * The path of a given file name based on the context of the * configuration value or the default output directory token. * * @param cv * @param fileName * @return the full path of the file. */
The path of a given file name based on the context of the configuration value or the default output directory token
getOutputPath
{ "repo_name": "apache/flex-sdk", "path": "modules/compiler/src/java/flex2/compiler/common/Configuration.java", "license": "apache-2.0", "size": 49784 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,872,838
void checkCanRevokeTablePrivilege(TransactionId transactionId, Identity identity, Privilege privilege, QualifiedObjectName tableName, String revokee, boolean grantOptionFor);
void checkCanRevokeTablePrivilege(TransactionId transactionId, Identity identity, Privilege privilege, QualifiedObjectName tableName, String revokee, boolean grantOptionFor);
/** * Check if identity is allowed to revoke a privilege from the revokee on the specified table. * * @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed */
Check if identity is allowed to revoke a privilege from the revokee on the specified table
checkCanRevokeTablePrivilege
{ "repo_name": "Yaliang/presto", "path": "presto-main/src/main/java/com/facebook/presto/security/AccessControl.java", "license": "apache-2.0", "size": 9027 }
[ "com.facebook.presto.metadata.QualifiedObjectName", "com.facebook.presto.spi.security.Identity", "com.facebook.presto.spi.security.Privilege", "com.facebook.presto.transaction.TransactionId" ]
import com.facebook.presto.metadata.QualifiedObjectName; import com.facebook.presto.spi.security.Identity; import com.facebook.presto.spi.security.Privilege; import com.facebook.presto.transaction.TransactionId;
import com.facebook.presto.metadata.*; import com.facebook.presto.spi.security.*; import com.facebook.presto.transaction.*;
[ "com.facebook.presto" ]
com.facebook.presto;
1,886,380
public LoggingErrorHandlerBuilder loggingErrorHandler(String log) { return loggingErrorHandler(LoggerFactory.getLogger(log)); }
LoggingErrorHandlerBuilder function(String log) { return loggingErrorHandler(LoggerFactory.getLogger(log)); }
/** * Creates an <a href="http://camel.apache.org/error-handler.html">error * handler</a> which just logs errors * * @return the builder */
Creates an error handler which just logs errors
loggingErrorHandler
{ "repo_name": "shuliangtao/apache-camel-2.13.0-src", "path": "camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java", "license": "apache-2.0", "size": 17617 }
[ "org.slf4j.LoggerFactory" ]
import org.slf4j.LoggerFactory;
import org.slf4j.*;
[ "org.slf4j" ]
org.slf4j;
745,299
public JSONWriter key(String string) throws JSONException { if (string == null) { throw new JSONException("Null key."); } if (this.mode == 'k') { try { this.stack[this.top - 1].putOnce(string, Boolean.TRUE); if (this.comma) { this.writer.write(','); } this.writer.write(JSONObject.quo...
JSONWriter function(String string) throws JSONException { if (string == null) { throw new JSONException(STR); } if (this.mode == 'k') { try { this.stack[this.top - 1].putOnce(string, Boolean.TRUE); if (this.comma) { this.writer.write(','); } this.writer.write(JSONObject.quote(string)); this.writer.write(':'); this.comm...
/** * Append a key. The key will be associated with the next value. In an * object, every value must be preceded by a key. * * @param string * A key string. * @return this * @throws JSONException * If the key is out of place. For example, keys * do not belong in arr...
Append a key. The key will be associated with the next value. In an object, every value must be preceded by a key
key
{ "repo_name": "GermanCoding/Nations", "path": "Nations-1.8/src/org/json/JSONWriter.java", "license": "gpl-2.0", "size": 9531 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
610,526
public Date setMinSelectableDate(final Date min) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } drawDays(); return minSelectableDate; }
Date function(final Date min) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } drawDays(); return minSelectableDate; }
/** * Sets the minimum selectable date. If null, the date 01\01\0001 will be * set instead. * * @param min * the minimum selectable date * @return the minimum selectable date */
Sets the minimum selectable date. If null, the date 01\01\0001 will be set instead
setMinSelectableDate
{ "repo_name": "joetopshot/freeplane", "path": "freeplane/src/main/java/org/freeplane/core/ui/components/calendar/JDayChooser.java", "license": "gpl-2.0", "size": 26819 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,553,307
public void setListenerClasses(List<Class> classes) { for (Class cls: classes) { addListener(ClassHelper.newInstance(cls)); } }
void function(List<Class> classes) { for (Class cls: classes) { addListener(ClassHelper.newInstance(cls)); } }
/** * Define which listeners to user for this run. * * @param classes A list of classes, which must be either ISuiteListener, * ITestListener or IReporter */
Define which listeners to user for this run
setListenerClasses
{ "repo_name": "tremes/testng", "path": "src/main/java/org/testng/TestNG.java", "license": "apache-2.0", "size": 60936 }
[ "java.util.List", "org.testng.internal.ClassHelper" ]
import java.util.List; import org.testng.internal.ClassHelper;
import java.util.*; import org.testng.internal.*;
[ "java.util", "org.testng.internal" ]
java.util; org.testng.internal;
1,673,099
public static double dirichletLoglike(double[] alpha, double[] x) { assert(alpha.length == x.length); double xsum = 0; for(int i = 0; i < alpha.length; i++) { assert(alpha[i] > 0); assert(x[i] > 0); xsum += x[i]; } assert(Math.abs(xsum - 1) < 0.00001); // // Log [ Dir (x | alpha ) ] ...
static double function(double[] alpha, double[] x) { assert(alpha.length == x.length); double xsum = 0; for(int i = 0; i < alpha.length; i++) { assert(alpha[i] > 0); assert(x[i] > 0); xsum += x[i]; } assert(Math.abs(xsum - 1) < 0.00001); double alphasum = 0; for(double a : alpha) alphasum += a; double lnormnum = Gamma....
/** * Dirichlet log-likelihood of multinomial parameter vector x * given Dirichlet hyperparameter vector alpha * * @param alpha * @param x * @return */
Dirichlet log-likelihood of multinomial parameter vector x given Dirichlet hyperparameter vector alpha
dirichletLoglike
{ "repo_name": "davidandrzej/LogicLDA", "path": "src/main/java/logiclda/EvalLDA.java", "license": "gpl-3.0", "size": 3694 }
[ "org.apache.commons.math.special.Gamma" ]
import org.apache.commons.math.special.Gamma;
import org.apache.commons.math.special.*;
[ "org.apache.commons" ]
org.apache.commons;
2,712,655
public void setColor(int color, boolean callback) { int alpha = Color.alpha(color); float[] hsv = new float[3]; Color.colorToHSV(color, hsv); mAlpha = alpha; mHue = hsv[0]; mSat = hsv[1]; mVal = hsv[2]; if (callback && mListener != null) ...
void function(int color, boolean callback) { int alpha = Color.alpha(color); float[] hsv = new float[3]; Color.colorToHSV(color, hsv); mAlpha = alpha; mHue = hsv[0]; mSat = hsv[1]; mVal = hsv[2]; if (callback && mListener != null) mListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal})); invali...
/** * Set the color this view should show. * * @param color The color that should be selected. * @param callback If you want to get a callback to * your OnColorChangedListener. */
Set the color this view should show
setColor
{ "repo_name": "PkXwmpgN/elements", "path": "platform/android/elements/libs/Preferences/src/main/java/com/yegorov/alexey/preferences/ColorPickerView.java", "license": "mit", "size": 22120 }
[ "android.graphics.Color" ]
import android.graphics.Color;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
827,899
public static void handlePostNativeInitialization() { reconcileDataReductionProxyEnabledState(); DataReductionStatsPreference.initializeDataReductionSiteBreakdownPref(); }
static void function() { reconcileDataReductionProxyEnabledState(); DataReductionStatsPreference.initializeDataReductionSiteBreakdownPref(); }
/** * Handles calls for data reduction proxy initialization that need to happen after the native * library has been loaded. */
Handles calls for data reduction proxy initialization that need to happen after the native library has been loaded
handlePostNativeInitialization
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java", "license": "bsd-3-clause", "size": 15136 }
[ "org.chromium.chrome.browser.datareduction.settings.DataReductionStatsPreference" ]
import org.chromium.chrome.browser.datareduction.settings.DataReductionStatsPreference;
import org.chromium.chrome.browser.datareduction.settings.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
2,134,827
public void setInitParams(Map initParams) { throw new DotStateException("not supported"); }
void function(Map initParams) { throw new DotStateException(STR); }
/** * Sets the init parameters of the portlet. * * @param initParams the init parameters of the portlet */
Sets the init parameters of the portlet
setInitParams
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/liferay/portal/model/Portlet.java", "license": "gpl-3.0", "size": 6135 }
[ "com.dotmarketing.business.DotStateException", "java.util.Map" ]
import com.dotmarketing.business.DotStateException; import java.util.Map;
import com.dotmarketing.business.*; import java.util.*;
[ "com.dotmarketing.business", "java.util" ]
com.dotmarketing.business; java.util;
2,101,192
public static boolean pdf_end_template(Env env, @NotNull PDF pdf) { env.stub("pdf_end_template"); return false; }
static boolean function(Env env, @NotNull PDF pdf) { env.stub(STR); return false; }
/** * Completes a template */
Completes a template
pdf_end_template
{ "repo_name": "headius/quercus", "path": "src/main/java/com/caucho/quercus/lib/pdf/PDFModule.java", "license": "gpl-2.0", "size": 48781 }
[ "com.caucho.quercus.annotation.NotNull", "com.caucho.quercus.env.Env" ]
import com.caucho.quercus.annotation.NotNull; import com.caucho.quercus.env.Env;
import com.caucho.quercus.annotation.*; import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
1,396,758
@ReflectiveMethod(name = "b", types = {NMSBlock.class}) public boolean b(NMSBlock block){ return (boolean) NMSWrapper.getInstance().exec(nmsObject, block); }
@ReflectiveMethod(name = "b", types = {NMSBlock.class}) boolean function(NMSBlock block){ return (boolean) NMSWrapper.getInstance().exec(nmsObject, block); }
/** * TODO Find correct name * @see net.minecraft.server.v1_9_R1.BlockRedstoneTorch#b(net.minecraft.server.v1_9_R1.Block) */
TODO Find correct name
b
{ "repo_name": "Vilsol/NMSWrapper", "path": "src/main/java/me/vilsol/nmswrapper/wraps/unparsed/NMSBlockRedstoneTorch.java", "license": "apache-2.0", "size": 3648 }
[ "me.vilsol.nmswrapper.NMSWrapper", "me.vilsol.nmswrapper.reflections.ReflectiveMethod" ]
import me.vilsol.nmswrapper.NMSWrapper; import me.vilsol.nmswrapper.reflections.ReflectiveMethod;
import me.vilsol.nmswrapper.*; import me.vilsol.nmswrapper.reflections.*;
[ "me.vilsol.nmswrapper" ]
me.vilsol.nmswrapper;
2,596,611
boolean isSupported(Context context);
boolean isSupported(Context context);
/** * Some implementations may not be able to return valid File handles * because the device doesn't provide the denoted storage. You can check * the provider compatibility with this method to prevent from having to * invoke this provider ever again. * * @param cont...
Some implementations may not be able to return valid File handles because the device doesn't provide the denoted storage. You can check the provider compatibility with this method to prevent from having to invoke this provider ever again
isSupported
{ "repo_name": "1037704496/ZywxEmail", "path": "src/com/fsck/zywxMailk9/mail/store/StorageManager.java", "license": "bsd-3-clause", "size": 24249 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,478,820
private static void closeSafe(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (IOException ignored) { } } } //endregion //region: Inner class: DecodeBitmapResult public static final class Deco...
static void function(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (IOException ignored) { } } } public static final class DecodeBitmapResult { public final Bitmap bitmap; public final int sampleSize; DecodeBitmapResult(Bitmap bitmap, int sampleSize) { this.sampleSize = sampleSize; th...
/** * Close the given closeable object (Stream) in a safe way: check if it is null and catch-log * exception thrown. * * @param closeable the closable object to close */
Close the given closeable object (Stream) in a safe way: check if it is null and catch-log exception thrown
closeSafe
{ "repo_name": "Minitour/crofis-android-uikit", "path": "ui/src/main/java/net/crofis/ui/custom/cropper/BitmapUtils.java", "license": "apache-2.0", "size": 21597 }
[ "android.graphics.Bitmap", "java.io.Closeable", "java.io.IOException" ]
import android.graphics.Bitmap; import java.io.Closeable; import java.io.IOException;
import android.graphics.*; import java.io.*;
[ "android.graphics", "java.io" ]
android.graphics; java.io;
275,972
private void setDefaultConfigValueToChild(List<YangLeaf> leaves, List<YangLeafList> leafLists) { if (leaves != null) { for (YangLeaf leaf : leaves) { if (leaf.isConfig() == null) { leaf.setConfig(isConfig); } } } ...
void function(List<YangLeaf> leaves, List<YangLeafList> leafLists) { if (leaves != null) { for (YangLeaf leaf : leaves) { if (leaf.isConfig() == null) { leaf.setConfig(isConfig); } } } if (leafLists != null) { for (YangLeafList leafList : leafLists) { if (leafList.isConfig() == null) { leafList.setConfig(isConfig); } }...
/** * Sets the config's value to all leaf if leaf's config statement is not * specified. * * @param leaves list of leaf attributes of container * @param leafLists list of leaf-list attributes of container */
Sets the config's value to all leaf if leaf's config statement is not specified
setDefaultConfigValueToChild
{ "repo_name": "sonu283304/onos", "path": "utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/YangContainer.java", "license": "apache-2.0", "size": 16409 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,345,854
public static <K> Map<K, TObject> javaMapToThrift(Map<K, Object> objects) { Map<K, TObject> thrift = Maps.newLinkedHashMap(); for (Entry<K, Object> entry : objects.entrySet()) { K key = entry.getKey(); TObject value = javaToThrift(entry.getValue()); thrift.put(key...
static <K> Map<K, TObject> function(Map<K, Object> objects) { Map<K, TObject> thrift = Maps.newLinkedHashMap(); for (Entry<K, Object> entry : objects.entrySet()) { K key = entry.getKey(); TObject value = javaToThrift(entry.getValue()); thrift.put(key, value); } return thrift; }
/** * Return a Map that represents the Thrift representation of each of the * {@code objects} in the input Map. * * @param objects a Map of java objects * @return a Map of TObjects */
Return a Map that represents the Thrift representation of each of the objects in the input Map
javaMapToThrift
{ "repo_name": "kylycht/concourse", "path": "concourse-driver-java/src/main/java/com/cinchapi/concourse/util/Convert.java", "license": "apache-2.0", "size": 33574 }
[ "com.cinchapi.concourse.thrift.TObject", "com.google.common.collect.Maps", "java.util.Map" ]
import com.cinchapi.concourse.thrift.TObject; import com.google.common.collect.Maps; import java.util.Map;
import com.cinchapi.concourse.thrift.*; import com.google.common.collect.*; import java.util.*;
[ "com.cinchapi.concourse", "com.google.common", "java.util" ]
com.cinchapi.concourse; com.google.common; java.util;
1,445,422
public ServiceCall<Error> put409Async(Boolean booleanValue, final ServiceCallback<Error> serviceCallback) { return ServiceCall.create(put409Async(booleanValue), serviceCallback); }
ServiceCall<Error> function(Boolean booleanValue, final ServiceCallback<Error> serviceCallback) { return ServiceCall.create(put409Async(booleanValue), serviceCallback); }
/** * Return 409 status code - should be represented in the client as an error. * * @param booleanValue Simple boolean value true * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */
Return 409 status code - should be represented in the client as an error
put409Async
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/implementation/HttpClientFailuresImpl.java", "license": "mit", "size": 78284 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,421,729
private void checkOptionPermission(String userRef, Option option) { if (option.getPollId() == null) { throw new IllegalArgumentException( "Poll Id must be set in the option to check permissions: " + option); } Long pollId = option.getPollId(); // validate poll exists Poll poll = pollListMana...
void function(String userRef, Option option) { if (option.getPollId() == null) { throw new IllegalArgumentException( STR + option); } Long pollId = option.getPollId(); Poll poll = pollListManager.getPollById(pollId, false); if (poll == null) { throw new IllegalArgumentException(STR + pollId + STR + option); } String si...
/** * Checks if the given user can create/update/delete options * * @param userRef * @param option */
Checks if the given user can create/update/delete options
checkOptionPermission
{ "repo_name": "conder/sakai", "path": "polls/tool/src/java/org/sakaiproject/poll/tool/entityproviders/PollsEntityProvider.java", "license": "apache-2.0", "size": 33551 }
[ "org.sakaiproject.poll.logic.PollListManager", "org.sakaiproject.poll.model.Option", "org.sakaiproject.poll.model.Poll" ]
import org.sakaiproject.poll.logic.PollListManager; import org.sakaiproject.poll.model.Option; import org.sakaiproject.poll.model.Poll;
import org.sakaiproject.poll.logic.*; import org.sakaiproject.poll.model.*;
[ "org.sakaiproject.poll" ]
org.sakaiproject.poll;
867,828
@Test public void testGetAllForClusterFilteredWithPermissionsNoPermissionsAndNoFilter() { // A use with permissions List<Network> result = dao.getAllForCluster(cluster, UNPRIVILEGED_USER_ID, false); assertGetAllForClusterResult(result); }
void function() { List<Network> result = dao.getAllForCluster(cluster, UNPRIVILEGED_USER_ID, false); assertGetAllForClusterResult(result); }
/** * Ensures the right set of networks are returned for the given cluster, * with a unprivileged user, but with no filtering */
Ensures the right set of networks are returned for the given cluster, with a unprivileged user, but with no filtering
testGetAllForClusterFilteredWithPermissionsNoPermissionsAndNoFilter
{ "repo_name": "OpenUniversity/ovirt-engine", "path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/NetworkDaoTest.java", "license": "apache-2.0", "size": 12422 }
[ "java.util.List", "org.ovirt.engine.core.common.businessentities.network.Network" ]
import java.util.List; import org.ovirt.engine.core.common.businessentities.network.Network;
import java.util.*; import org.ovirt.engine.core.common.businessentities.network.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
2,304,663
public static String pad(int len) { char[] dash = new char[len]; Arrays.fill(dash, ' '); return new String(dash); }
static String function(int len) { char[] dash = new char[len]; Arrays.fill(dash, ' '); return new String(dash); }
/** * Creates space filled string of given length. * * @param len Number of spaces. * @return Space filled string of given length. */
Creates space filled string of given length
pad
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 385578 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,273,528
private SSLConfig.Builder configureLegacyGatewaySSL(final DistributionConfig distributionConfig, SSLConfig.Builder sslConfigBuilder) { sslConfigBuilder.setCiphers(distributionConfig.getGatewaySSLCiphers()); sslConfigBuilder.setEnabled(distributionConfig.getGatewaySSLEnabled()); sslConfigBuilder.setK...
SSLConfig.Builder function(final DistributionConfig distributionConfig, SSLConfig.Builder sslConfigBuilder) { sslConfigBuilder.setCiphers(distributionConfig.getGatewaySSLCiphers()); sslConfigBuilder.setEnabled(distributionConfig.getGatewaySSLEnabled()); sslConfigBuilder.setKeystore(distributionConfig.getGatewaySSLKeySt...
/** * Configure a SSLConfig.Builder for the gateway using the legacy configuration * * @return A sslConfig object describing the ssl config for the gateway component * @deprecated as of Geode 1.0 */
Configure a SSLConfig.Builder for the gateway using the legacy configuration
configureLegacyGatewaySSL
{ "repo_name": "smgoller/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/net/SSLConfigurationFactory.java", "license": "apache-2.0", "size": 16252 }
[ "org.apache.geode.distributed.internal.DistributionConfig" ]
import org.apache.geode.distributed.internal.DistributionConfig;
import org.apache.geode.distributed.internal.*;
[ "org.apache.geode" ]
org.apache.geode;
2,436,041
public static synchronized void cleanup(int logsRetainHours ) throws IOException { // Purge logs of tasks on this tasktracker if their // mtime has exceeded "mapred.task.log.retain" hours long purgeTimeStamp = System.currentTimeMillis() - ...
static synchronized void function(int logsRetainHours ) throws IOException { long purgeTimeStamp = System.currentTimeMillis() - (logsRetainHours*60L*60*1000); File[] oldTaskLogs = LOG_DIR.listFiles (new TaskLogsPurgeFilter(purgeTimeStamp)); if (oldTaskLogs != null) { for (int i=0; i < oldTaskLogs.length; ++i) { FileUti...
/** * Purge old user logs. * * @throws IOException */
Purge old user logs
cleanup
{ "repo_name": "hanhlh/hadoop-0.20.2_FatBTree", "path": "src/mapred/org/apache/hadoop/mapred/TaskLog.java", "license": "apache-2.0", "size": 20678 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "org.apache.hadoop.fs.FileUtil" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import org.apache.hadoop.fs.FileUtil;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
868,426
this.apiConnection = new ApiConnection(Definitions.PAYSTACK_SUBSCRIPTIONS_CREATE_SUBSCRIPTION); return this.apiConnection.connectAndQuery(queryMap); }
this.apiConnection = new ApiConnection(Definitions.PAYSTACK_SUBSCRIPTIONS_CREATE_SUBSCRIPTION); return this.apiConnection.connectAndQuery(queryMap); }
/** * Used to create a subscription * * @param queryMap * @return */
Used to create a subscription
createSubscription
{ "repo_name": "SeunAdelekan/PaystackJava", "path": "src/me/iyanuadelekan/paystackjava/core/Subscriptions.java", "license": "mit", "size": 4308 }
[ "me.iyanuadelekan.paystackjava.constants.Definitions" ]
import me.iyanuadelekan.paystackjava.constants.Definitions;
import me.iyanuadelekan.paystackjava.constants.*;
[ "me.iyanuadelekan.paystackjava" ]
me.iyanuadelekan.paystackjava;
2,846,858
@Test public void testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNameBlank() { DataBridgeController dataBridgeController = new BasicDataBridgeController(); DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto(); manifest.setStorageName(BLANK_TEXT); ...
void function() { DataBridgeController dataBridgeController = new BasicDataBridgeController(); DataBridgeBaseManifestDto manifest = new DataBridgeBaseManifestDto(); manifest.setStorageName(BLANK_TEXT); String value = dataBridgeController.getStorageNameFromManifest(manifest); assertEquals(StorageEntity.MANAGED_STORAGE, ...
/** * When manifest specifies blank text storage name Assert return StorageEntity.MANAGED_STORAGE */
When manifest specifies blank text storage name Assert return StorageEntity.MANAGED_STORAGE
testGetStorageNameFromManifestAssertReturnDefaultWhenStorageNameBlank
{ "repo_name": "kusid/herd", "path": "herd-code/herd-tools/herd-tools-common/src/test/java/org/finra/herd/tools/common/databridge/DataBridgeControllerTest.java", "license": "apache-2.0", "size": 4570 }
[ "org.finra.herd.model.dto.DataBridgeBaseManifestDto", "org.finra.herd.model.jpa.StorageEntity", "org.junit.Assert" ]
import org.finra.herd.model.dto.DataBridgeBaseManifestDto; import org.finra.herd.model.jpa.StorageEntity; import org.junit.Assert;
import org.finra.herd.model.dto.*; import org.finra.herd.model.jpa.*; import org.junit.*;
[ "org.finra.herd", "org.junit" ]
org.finra.herd; org.junit;
1,509,727
@CheckResult @NonNull public static Observable<RecyclerViewChildAttachStateChangeEvent> childAttachStateChangeEvents( @NonNull RecyclerView view) { checkNotNull(view, "view == null"); return Observable.create(new RecyclerViewChildAttachStateChangeEventOnSubscribe(view)); }
@CheckResult static Observable<RecyclerViewChildAttachStateChangeEvent> function( @NonNull RecyclerView view) { checkNotNull(view, STR); return Observable.create(new RecyclerViewChildAttachStateChangeEventOnSubscribe(view)); }
/** * Create an observable of child attach state change events on {@code recyclerView}. * <p> * <em>Warning:</em> The created observable keeps a strong reference to {@code recyclerView}. * Unsubscribe to free this reference. */
Create an observable of child attach state change events on recyclerView. Warning: The created observable keeps a strong reference to recyclerView. Unsubscribe to free this reference
childAttachStateChangeEvents
{ "repo_name": "kunny/RxBinding", "path": "rxbinding-recyclerview-v7/src/main/java/com/jakewharton/rxbinding/support/v7/widget/RxRecyclerView.java", "license": "apache-2.0", "size": 2002 }
[ "android.support.annotation.CheckResult", "android.support.annotation.NonNull", "android.support.v7.widget.RecyclerView", "com.jakewharton.rxbinding.internal.Preconditions" ]
import android.support.annotation.CheckResult; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import com.jakewharton.rxbinding.internal.Preconditions;
import android.support.annotation.*; import android.support.v7.widget.*; import com.jakewharton.rxbinding.internal.*;
[ "android.support", "com.jakewharton.rxbinding" ]
android.support; com.jakewharton.rxbinding;
636,210
@Test public void testDeleteRegionWithNoStoreFiles() throws Exception { byte[] TABLE_NAME = Bytes.toBytes("testDeleteRegionWithNoStoreFiles"); UTIL.createTable(TABLE_NAME, TEST_FAM); // get the current store files for the region List<HRegion> servingRegions = UTIL.getHBaseCluster().getRegions(TABLE...
void function() throws Exception { byte[] TABLE_NAME = Bytes.toBytes(STR); UTIL.createTable(TABLE_NAME, TEST_FAM); List<HRegion> servingRegions = UTIL.getHBaseCluster().getRegions(TABLE_NAME); assertEquals(1, servingRegions.size()); HRegion region = servingRegions.get(0); FileSystem fs = region.getFilesystem(); Path ro...
/** * Test that the region directory is removed when we archive a region without store files, but * still has hidden files. * @throws Exception */
Test that the region directory is removed when we archive a region without store files, but still has hidden files
testDeleteRegionWithNoStoreFiles
{ "repo_name": "zqxjjj/NobidaBase", "path": "target/hbase-0.94.9/hbase-0.94.9/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java", "license": "apache-2.0", "size": 16083 }
[ "java.util.ArrayList", "java.util.List", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.regionserver.HRegion", "org.apache.hadoop.hbase.util.Bytes", "org.apache.hadoop.hbase.util.FSUtils", "org.junit.Assert" ]
import java.util.ArrayList; import java.util.List; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.FSUtils; import org.jun...
import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.util.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
1,653,720
UdiProcess createProcess(Path executable, String[] args, Map<String, String> env, UdiProcessConfig config) throws UdiException;
UdiProcess createProcess(Path executable, String[] args, Map<String, String> env, UdiProcessConfig config) throws UdiException;
/** * Creates a debuggee process that can be controlled, modified and queried using UDI * * @param executable the full path to the executable for the process * @param args the command line arguments to the process (ala UNIX execve) * @param env the environment for the process (ala UNIX execve) ...
Creates a debuggee process that can be controlled, modified and queried using UDI
createProcess
{ "repo_name": "mcnulty/udi", "path": "libudi-java/api/src/main/java/net/libudi/api/UdiProcessManager.java", "license": "mpl-2.0", "size": 1737 }
[ "java.nio.file.Path", "java.util.Map", "net.libudi.api.exceptions.UdiException" ]
import java.nio.file.Path; import java.util.Map; import net.libudi.api.exceptions.UdiException;
import java.nio.file.*; import java.util.*; import net.libudi.api.exceptions.*;
[ "java.nio", "java.util", "net.libudi.api" ]
java.nio; java.util; net.libudi.api;
2,278,126
public Observable<ServiceResponse<DomainInner>> updateWithServiceResponseAsync(String resourceGroupName, String domainName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } ...
Observable<ServiceResponse<DomainInner>> function(String resourceGroupName, String domainName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (domainName == null) { throw new IllegalArgumentException...
/** * Update a domain. * Asynchronously updates a domain with the specified parameters. * * @param resourceGroupName The name of the resource group within the user's subscription. * @param domainName Name of the domain * @throws IllegalArgumentException thrown if parameters fail the valida...
Update a domain. Asynchronously updates a domain with the specified parameters
updateWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/eventgrid/mgmt-v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java", "license": "mit", "size": 69931 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.azure.management.eventgrid.v2018_09_15_preview.DomainUpdateParameters", "com.microsoft.rest.ServiceResponse", "java.util.Map" ]
import com.google.common.reflect.TypeToken; import com.microsoft.azure.management.eventgrid.v2018_09_15_preview.DomainUpdateParameters; import com.microsoft.rest.ServiceResponse; import java.util.Map;
import com.google.common.reflect.*; import com.microsoft.azure.management.eventgrid.v2018_09_15_preview.*; import com.microsoft.rest.*; import java.util.*;
[ "com.google.common", "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.google.common; com.microsoft.azure; com.microsoft.rest; java.util;
2,711,271
private String[] cut(String prefix, char delimiter) { String[] names = new String[mLines.size()]; int length = 0; for (String line : mLines) { if (line.startsWith(prefix)) { int i = line.indexOf(delimiter); if (i == -1) ...
String[] function(String prefix, char delimiter) { String[] names = new String[mLines.size()]; int length = 0; for (String line : mLines) { if (line.startsWith(prefix)) { int i = line.indexOf(delimiter); if (i == -1) { i = line.length(); } names[length] = line.substring(prefix.length(), i); ++length; } } return Arrays....
/** * Finds the key with the given prefix and returns its suffix. */
Finds the key with the given prefix and returns its suffix
cut
{ "repo_name": "Jokejiao/SipCallDemo", "path": "registrarlesssip/src/main/java/nz/co/eighthq/registrarlesssip/sip/SimpleSessionDescription.java", "license": "apache-2.0", "size": 20194 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
857,285
public Set<Method> getDefinedComponentMethods() { return classIndex.getClassMethods(); }
Set<Method> function() { return classIndex.getClassMethods(); }
/** * Get the set of currently known component methods. This is an identity set. * * @return the set of methods */
Get the set of currently known component methods. This is an identity set
getDefinedComponentMethods
{ "repo_name": "99sono/wildfly", "path": "ee/src/main/java/org/jboss/as/ee/component/ComponentConfiguration.java", "license": "lgpl-2.1", "size": 22115 }
[ "java.lang.reflect.Method", "java.util.Set" ]
import java.lang.reflect.Method; import java.util.Set;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,778,346
public void launchIntegratedServer(String folderName, String worldName, WorldSettings worldSettingsIn) { this.loadWorld(null); System.gc(); ISaveHandler var4 = this.saveLoader.getSaveLoader(folderName, false); WorldInfo var5 = var4.loadWorldInfo(); if (var5 == null && worldSettingsIn != null) { var5 = ...
void function(String folderName, String worldName, WorldSettings worldSettingsIn) { this.loadWorld(null); System.gc(); ISaveHandler var4 = this.saveLoader.getSaveLoader(folderName, false); WorldInfo var5 = var4.loadWorldInfo(); if (var5 == null && worldSettingsIn != null) { var5 = new WorldInfo(worldSettingsIn, folderN...
/** * Arguments: World foldername, World ingame name, WorldSettings */
Arguments: World foldername, World ingame name, WorldSettings
launchIntegratedServer
{ "repo_name": "KubaKaszycki/FreeCraft", "path": "src/main/java/kk/freecraft/client/Minecraft.java", "license": "gpl-3.0", "size": 98691 }
[ "java.net.SocketAddress" ]
import java.net.SocketAddress;
import java.net.*;
[ "java.net" ]
java.net;
561,661
public void parseStem(ArgumentOption option, ArgIterator argIterator) { stemming = argIterator.getBoolean(option); LOG.trace("Stemming not yet implemented"); }
void function(ArgumentOption option, ArgIterator argIterator) { stemming = argIterator.getBoolean(option); LOG.trace(STR); }
/** use stemming? * * will have to use import org.apache.lucene.analysis.en.PorterStemFilter; * * @param option list of methods (none gives help) * @param argIterator */
use stemming? will have to use import org.apache.lucene.analysis.en.PorterStemFilter
parseStem
{ "repo_name": "rossmounce/ami-plugin", "path": "src/main/java/org/xmlcml/ami2/plugins/word/WordArgProcessor.java", "license": "apache-2.0", "size": 11435 }
[ "org.xmlcml.cmine.args.ArgIterator", "org.xmlcml.cmine.args.ArgumentOption" ]
import org.xmlcml.cmine.args.ArgIterator; import org.xmlcml.cmine.args.ArgumentOption;
import org.xmlcml.cmine.args.*;
[ "org.xmlcml.cmine" ]
org.xmlcml.cmine;
2,750,850
public ReentrantReadWriteLock newReentrantReadWriteLock( E rank, boolean fair) { return policy == Policies.DISABLED ? new ReentrantReadWriteLock(fair) : new CycleDetectingReentrantReadWriteLock( lockGraphNodes.get(rank), fair); } } //////// Implementation ///////// ...
ReentrantReadWriteLock function( E rank, boolean fair) { return policy == Policies.DISABLED ? new ReentrantReadWriteLock(fair) : new CycleDetectingReentrantReadWriteLock( lockGraphNodes.get(rank), fair); } } private static final Logger logger = Logger.getLogger( CycleDetectingLockFactory.class.getName()); final Policy ...
/** * Creates a {@link ReentrantReadWriteLock} with the given fairness policy * and rank. The values returned by {@link Enum#getDeclaringClass()} and * {@link Enum#name()} are used to describe the lock in warning or exception * output. * * @throws IllegalStateException If the factory has a...
Creates a <code>ReentrantReadWriteLock</code> with the given fairness policy and rank. The values returned by <code>Enum#getDeclaringClass()</code> and <code>Enum#name()</code> are used to describe the lock in warning or exception output
newReentrantReadWriteLock
{ "repo_name": "sebadiaz/guava", "path": "guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java", "license": "apache-2.0", "size": 36196 }
[ "com.google.common.base.Preconditions", "java.util.concurrent.locks.ReentrantReadWriteLock", "java.util.logging.Logger" ]
import com.google.common.base.Preconditions; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.logging.Logger;
import com.google.common.base.*; import java.util.concurrent.locks.*; import java.util.logging.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
294,604
private Response makeRequest( Command cmd, @Nullable String cacheName, @Nullable Object key, @Nullable Object val, @Nullable Long... extras ) throws IgniteCheckedException { assert cmd != null; int opaque = opaqueCntr.getAndIncrement(); // Send r...
Response function( Command cmd, @Nullable String cacheName, @Nullable Object key, @Nullable Object val, @Nullable Long... extras ) throws IgniteCheckedException { assert cmd != null; int opaque = opaqueCntr.getAndIncrement(); try { sock.getOutputStream().write(createPacket(cmd, cacheName, key, val, opaque, extras)); } ...
/** * Makes request to server and waits for response. * * @param cmd Command. * @param cacheName Cache name. * @param key Key. * @param val Value. * @param extras Extras. * @return Response. * @throws IgniteCheckedException In case of error. */
Makes request to server and waits for response
makeRequest
{ "repo_name": "irudyak/ignite", "path": "modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/TestMemcacheClient.java", "license": "apache-2.0", "size": 26565 }
[ "java.io.IOException", "org.apache.ignite.IgniteCheckedException", "org.jetbrains.annotations.Nullable" ]
import java.io.IOException; import org.apache.ignite.IgniteCheckedException; import org.jetbrains.annotations.Nullable;
import java.io.*; import org.apache.ignite.*; import org.jetbrains.annotations.*;
[ "java.io", "org.apache.ignite", "org.jetbrains.annotations" ]
java.io; org.apache.ignite; org.jetbrains.annotations;
1,287,863
public void setUrl(final String url) { String currUrl = getUrl(); if (!Objects.equals(url, currUrl)) { getOrCreateComponentModel().url = url; } }
void function(final String url) { String currUrl = getUrl(); if (!Objects.equals(url, currUrl)) { getOrCreateComponentModel().url = url; } }
/** * Sets the URL. * * @param url the URL to set. */
Sets the URL
setUrl
{ "repo_name": "bordertechorg/wcomponents", "path": "wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WPopup.java", "license": "gpl-3.0", "size": 5011 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
1,265,663
private void addFont(Object f, int index) { if (fonts != null) { fontStarts = addToVector(f, index, fonts, fontStarts); } else if (font == null) { font = f; } else { if (!font.equals(f)) { fonts = new Vector<Object>(INITIAL...
void function(Object f, int index) { if (fonts != null) { fontStarts = addToVector(f, index, fonts, fontStarts); } else if (font == null) { font = f; } else { if (!font.equals(f)) { fonts = new Vector<Object>(INITIAL_SIZE); fonts.addElement(font); fonts.addElement(f); fontStarts = new int[INITIAL_SIZE]; fontStarts[0] =...
/** * Add a new Font/GraphicAttribute run with the given object at the * given index. */
Add a new Font/GraphicAttribute run with the given object at the given index
addFont
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/java/awt/font/StyledParagraph.java", "license": "gpl-2.0", "size": 17617 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,864,891
public Complex dotBilinear( final ComplexVector V ) { checkShape( V ); final double [] VRe = V.re; final double [] VIm = V.im; final int dim = V.length; double rr=0, ii=0; for(int i=0; i<dim; i++) { final double r1=VRe[i]; final double r2=re[i]; final double i1=VIm[i]; final double i2=im[...
Complex function( final ComplexVector V ) { checkShape( V ); final double [] VRe = V.re; final double [] VIm = V.im; final int dim = V.length; double rr=0, ii=0; for(int i=0; i<dim; i++) { final double r1=VRe[i]; final double r2=re[i]; final double i1=VIm[i]; final double i2=im[i]; rr += r1*r2 - i1*i2; ii += r1*i2 + r2...
/** multiplies entries of <i>V</i> with <i>this</i> pairwise and returns * the sum of these products. */
multiplies entries of V with this pairwise and returns the sum of these products
dotBilinear
{ "repo_name": "jupsal/schmies-jTEM", "path": "libUnzipped/de/jtem/blas/ComplexVector.java", "license": "bsd-2-clause", "size": 52763 }
[ "de.jtem.mfc.field.Complex" ]
import de.jtem.mfc.field.Complex;
import de.jtem.mfc.field.*;
[ "de.jtem.mfc" ]
de.jtem.mfc;
850,506
private void checkViewPermissions() { permissionService.permission() .admin(AdminSystemPermission.AD_CATEGORIES_VIEW, AdminMemberPermission.ADS_VIEW) .broker(BrokerPermission.ADS_VIEW) // I suppose I can assume that members having MemberPermission.PREFERENCES_...
void function() { permissionService.permission() .admin(AdminSystemPermission.AD_CATEGORIES_VIEW, AdminMemberPermission.ADS_VIEW) .broker(BrokerPermission.ADS_VIEW) .member(MemberPermission.ADS_VIEW) .operator(MemberPermission.ADS_VIEW) .check(); }
/** * Checks if the user has permissions to view ad categories. */
Checks if the user has permissions to view ad categories
checkViewPermissions
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/services/ads/AdCategoryServiceSecurity.java", "license": "gpl-2.0", "size": 7023 }
[ "nl.strohalm.cyclos.access.AdminMemberPermission", "nl.strohalm.cyclos.access.AdminSystemPermission", "nl.strohalm.cyclos.access.BrokerPermission", "nl.strohalm.cyclos.access.MemberPermission" ]
import nl.strohalm.cyclos.access.AdminMemberPermission; import nl.strohalm.cyclos.access.AdminSystemPermission; import nl.strohalm.cyclos.access.BrokerPermission; import nl.strohalm.cyclos.access.MemberPermission;
import nl.strohalm.cyclos.access.*;
[ "nl.strohalm.cyclos" ]
nl.strohalm.cyclos;
1,213,362
public PostingsFormat getPostingsFormatForField(String field) { return defaultFormat; }
PostingsFormat function(String field) { return defaultFormat; }
/** Returns the postings format that should be used for writing * new segments of <code>field</code>. * * The default implementation always returns "Lucene41" */
Returns the postings format that should be used for writing new segments of <code>field</code>. The default implementation always returns "Lucene41"
getPostingsFormatForField
{ "repo_name": "q474818917/solr-5.2.0", "path": "lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene41/Lucene41Codec.java", "license": "apache-2.0", "size": 4143 }
[ "org.apache.lucene.codecs.PostingsFormat" ]
import org.apache.lucene.codecs.PostingsFormat;
import org.apache.lucene.codecs.*;
[ "org.apache.lucene" ]
org.apache.lucene;
826,209
public static StringBuilder appendMd5DigestAsHex(InputStream inputStream, StringBuilder builder) throws IOException { return appendDigestAsHex(MD5_ALGORITHM_NAME, inputStream, builder); }
static StringBuilder function(InputStream inputStream, StringBuilder builder) throws IOException { return appendDigestAsHex(MD5_ALGORITHM_NAME, inputStream, builder); }
/** * Append a hexadecimal string representation of the MD5 digest of the given * inputStream to the given {@link StringBuilder}. * <p>This method does <strong>not</strong> close the input stream.</p> * @param inputStream the inputStream to calculate the digest over * @param builder the string ...
Append a hexadecimal string representation of the MD5 digest of the given inputStream to the given <code>StringBuilder</code>. This method does not close the input stream
appendMd5DigestAsHex
{ "repo_name": "aspectran/aspectran", "path": "core/src/main/java/com/aspectran/core/util/DigestUtils.java", "license": "apache-2.0", "size": 6595 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,370,107
public Builder name(String name) { this.name = name; return this; }
Builder function(String name) { this.name = name; return this; }
/** * The customer's full name. */
The customer's full name
name
{ "repo_name": "cailingxiao/wire", "path": "wire-runtime/src/test/java/com/squareup/wire/protos/person/Person.java", "license": "apache-2.0", "size": 6327 }
[ "java.lang.String" ]
import java.lang.String;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,753,128
public boolean cacheResults() { return true; } // ----------------------------------------------------- XAResource Mathods // there might be at least one active transaction branch per thread private ThreadLocal activeTransactionBranch = new ThreadLocal(); private Map suspendedContext...
boolean function() { return true; } private ThreadLocal activeTransactionBranch = new ThreadLocal(); private Map suspendedContexts = new ConcurrentHashMap(); private Map activeContexts = new ConcurrentHashMap();
/** * Indicates whether or not the objects managed by this service should be * cached. Caching is enabled by default. * * @return boolean True if results should be cached */
Indicates whether or not the objects managed by this service should be cached. Caching is enabled by default
cacheResults
{ "repo_name": "integrated/jakarta-slide-server", "path": "src/share/org/apache/slide/common/AbstractXAServiceBase.java", "license": "apache-2.0", "size": 15368 }
[ "java.util.Map", "java.util.concurrent.ConcurrentHashMap" ]
import java.util.Map; import java.util.concurrent.ConcurrentHashMap;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,993,514
public static ResolvableType forMethodReturnType(Method method, Class<?> implementationClass) { Assert.notNull(method, "Method must not be null"); MethodParameter methodParameter = new MethodParameter(method, -1); methodParameter.setContainingClass(implementationClass); return forMethodParameter(methodParame...
static ResolvableType function(Method method, Class<?> implementationClass) { Assert.notNull(method, STR); MethodParameter methodParameter = new MethodParameter(method, -1); methodParameter.setContainingClass(implementationClass); return forMethodParameter(methodParameter); }
/** * Return a {@link ResolvableType} for the specified {@link Method} return type. * Use this variant when the class that declares the method includes generic * parameter variables that are satisfied by the implementation class. * @param method the source for the method return type * @param implementationCla...
Return a <code>ResolvableType</code> for the specified <code>Method</code> return type. Use this variant when the class that declares the method includes generic parameter variables that are satisfied by the implementation class
forMethodReturnType
{ "repo_name": "lj654548718/ispring", "path": "src/main/java/io/ispring/ori/core/ResolvableType.java", "license": "apache-2.0", "size": 56184 }
[ "io.ispring.ori.utils.Assert", "java.lang.reflect.Method" ]
import io.ispring.ori.utils.Assert; import java.lang.reflect.Method;
import io.ispring.ori.utils.*; import java.lang.reflect.*;
[ "io.ispring.ori", "java.lang" ]
io.ispring.ori; java.lang;
462,181
private int initFromDittedStringData(String text) throws IllegalArgumentException { int markOffset = -1; int mode = -1; // -1: looking for start, -2: skip to EOL, 0: hex mode, 1: binary mode ArrayList<Byte> ditarray = new ArrayList<Byte>(); ArrayList<Byte> bitarray = new ArrayList<Byte>(); int i = 0; whi...
int function(String text) throws IllegalArgumentException { int markOffset = -1; int mode = -1; ArrayList<Byte> ditarray = new ArrayList<Byte>(); ArrayList<Byte> bitarray = new ArrayList<Byte>(); int i = 0; while (i < text.length()) { char c1, c2; c1 = text.charAt(i); if (mode == -2 && c1 != '\n') { i += 1; continue; }...
/** * Initialize this sequence with a ditted sequence from a string in the form * (e.g. - 011...1., 0x.F, 01110011 0xAB) * * @param text ditted sequence * * @return number of bytes in the ditted sequence * * @throws IllegalArgumentException if string is malformed */
Initialize this sequence with a ditted sequence from a string in the form (e.g. - 011...1., 0x.F, 01110011 0xAB)
initFromDittedStringData
{ "repo_name": "NationalSecurityAgency/ghidra", "path": "Ghidra/Features/Base/src/main/java/ghidra/util/bytesearch/DittedBitSequence.java", "license": "apache-2.0", "size": 13063 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,874,411
protected Component buildDetailEditorComponent() { return null; }
Component function() { return null; }
/** * Delegate the construction of the detail editor component. * <p> * Subclasses should override this method if they choose to provide a * detailed constraint editor. This is an optional feature, and this implementation * returns null to satisfy the <code>ColumnConstraintEditor</code> contract. * * @see...
Delegate the construction of the detail editor component. Subclasses should override this method if they choose to provide a detailed constraint editor. This is an optional feature, and this implementation returns null to satisfy the <code>ColumnConstraintEditor</code> contract
buildDetailEditorComponent
{ "repo_name": "NationalSecurityAgency/ghidra", "path": "Ghidra/Framework/Docking/src/main/java/docking/widgets/table/constrainteditor/AbstractColumnConstraintEditor.java", "license": "apache-2.0", "size": 6549 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,498,389
public ParamValueType<WebAppType<T>> createContextParam();
ParamValueType<WebAppType<T>> function();
/** * Creates a new <code>context-param</code> element * @return the new created instance of <code>ParamValueType<WebAppType<T>></code> */
Creates a new <code>context-param</code> element
createContextParam
{ "repo_name": "forge/javaee-descriptors", "path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/webapp31/WebAppType.java", "license": "epl-1.0", "size": 60822 }
[ "org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType" ]
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType;
import org.jboss.shrinkwrap.descriptor.api.javaee7.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
2,563,323
public ObjectiveWrapper getObjective() { return objective; }
ObjectiveWrapper function() { return objective; }
/** * Get the ObjectiveWrapper that this score change took place in. * * @return The ObjectiveWrapper whose score has changed. */
Get the ObjectiveWrapper that this score change took place in
getObjective
{ "repo_name": "ewized/CommonUtils", "path": "src/main/java/com/archeinteractive/dev/commonutils/scoreboard/api/events/ScoreboardScoreChangeEvent.java", "license": "gpl-3.0", "size": 2492 }
[ "com.archeinteractive.dev.commonutils.scoreboard.api.wrappers.ObjectiveWrapper" ]
import com.archeinteractive.dev.commonutils.scoreboard.api.wrappers.ObjectiveWrapper;
import com.archeinteractive.dev.commonutils.scoreboard.api.wrappers.*;
[ "com.archeinteractive.dev" ]
com.archeinteractive.dev;
991,992
@Override public String getNextStructDirectiveId(IPerson person) { return super.getNextStructId(person, Constants.DIRECTIVE_PREFIX); }
String function(IPerson person) { return super.getNextStructId(person, Constants.DIRECTIVE_PREFIX); }
/** * Generates a new struct id for directive elements that dlm places in * the PLF version of the layout tree. These elements are atifacts of the * dlm storage model and used during merge but do not appear in the user's * composite view. */
Generates a new struct id for directive elements that dlm places in the PLF version of the layout tree. These elements are atifacts of the dlm storage model and used during merge but do not appear in the user's composite view
getNextStructDirectiveId
{ "repo_name": "EdiaEducationTechnology/uPortal", "path": "uportal-war/src/main/java/org/jasig/portal/layout/dlm/RDBMDistributedLayoutStore.java", "license": "apache-2.0", "size": 93494 }
[ "org.jasig.portal.security.IPerson" ]
import org.jasig.portal.security.IPerson;
import org.jasig.portal.security.*;
[ "org.jasig.portal" ]
org.jasig.portal;
1,495,672
if (adapter != null && gl != null) { // Check if the adapter was already initialized. // This must be done from the OpenGl-thread: if (!adapterInitialized) { adapter.performGLInit(gl); } // Do further processing in the OpenGL-context: adapter.performGLCalls(gl); // Get the texture querying ...
if (adapter != null && gl != null) { if (!adapterInitialized) { adapter.performGLInit(gl); } adapter.performGLCalls(gl); Texture texture = adapter .getTexture(MarkerAdapter.MARKER_TEXTURE_KEY); if (texture != null) { TextureCoords texCoords = texture.getImageTexCoords(); gl.glEnable(GL2.GL_BLEND); gl.glBlendFunc(GL2.GL...
/** * Draws all POIs available for the current view. Also all OpenGL-specific * work in the adapter must be performed here. */
Draws all POIs available for the current view. Also all OpenGL-specific work in the adapter must be performed here
draw
{ "repo_name": "johb/GAIA", "path": "src/main/java/sep/gaia/renderer/layer/MarkerLayer.java", "license": "apache-2.0", "size": 4005 }
[ "com.jogamp.opengl.util.texture.Texture", "com.jogamp.opengl.util.texture.TextureCoords", "java.util.Collection" ]
import com.jogamp.opengl.util.texture.Texture; import com.jogamp.opengl.util.texture.TextureCoords; import java.util.Collection;
import com.jogamp.opengl.util.texture.*; import java.util.*;
[ "com.jogamp.opengl", "java.util" ]
com.jogamp.opengl; java.util;
988,788
private List<BandwidthRestriction> createDaysDisplayRestrictions(List<BandwidthRestriction> aDay) { List<BandwidthRestriction> displayDay = new ArrayList<BandwidthRestriction>(); Calendar cal = Calendar.getInstance(); Date dfltStart = BandwidthRestriction.getDefaultStartTime(); Date dfltEnd = BandwidthRestr...
List<BandwidthRestriction> function(List<BandwidthRestriction> aDay) { List<BandwidthRestriction> displayDay = new ArrayList<BandwidthRestriction>(); Calendar cal = Calendar.getInstance(); Date dfltStart = BandwidthRestriction.getDefaultStartTime(); Date dfltEnd = BandwidthRestriction.getDefaultEndTime(); BandwidthRest...
/** * Create a map of bandwidth restirctions to display on the UI. * * @param aDay * the list of the days persisted bandwidth restrictions * @return the list of the days display bandwidth restrictions */
Create a map of bandwidth restirctions to display on the UI
createDaysDisplayRestrictions
{ "repo_name": "DIA-NZ/webcurator", "path": "wct-core/src/main/java/org/webcurator/ui/agent/controller/BandwidthRestrictionsController.java", "license": "apache-2.0", "size": 16290 }
[ "java.util.ArrayList", "java.util.Calendar", "java.util.Date", "java.util.Iterator", "java.util.List", "org.webcurator.domain.model.core.BandwidthRestriction" ]
import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.Iterator; import java.util.List; import org.webcurator.domain.model.core.BandwidthRestriction;
import java.util.*; import org.webcurator.domain.model.core.*;
[ "java.util", "org.webcurator.domain" ]
java.util; org.webcurator.domain;
65,283
@Ignore @Test public void given1outOf2partitionedExecutionDef_FirstOne$whenListScripts$thenListed() { System.setProperty(ScriptiveSuiteSet.SCRIPTIVEUNIT_PARTITION, "1:2"); try { assertEquals( singletonList("tests/suiteset/suite2.json"), new ScriptiveCore().listScripts(SuiteSet1.c...
public void given1outOf2partitionedExecutionDef_FirstOne$whenListScripts$thenListed() { System.setProperty(ScriptiveSuiteSet.SCRIPTIVEUNIT_PARTITION, "1:2"); try { assertEquals( singletonList(STR), new ScriptiveCore().listScripts(SuiteSet1.class).stream().sorted().collect(toList()) ); } finally { System.getProperties()...
/** * This test can only work when it is run individually since ScriptiveUnit * relies on a constant value created by referencing a system property. * * @see ScriptiveSuiteSet */
This test can only work when it is run individually since ScriptiveUnit relies on a constant value created by referencing a system property
given1outOf2partitionedExecutionDef_FirstOne$whenListScripts$thenListed
{ "repo_name": "dakusui/scriptunit", "path": "src/test/java/com/github/dakusui/scriptiveunit/unittests/core/ScriptiveCoreTest.java", "license": "apache-2.0", "size": 7078 }
[ "com.github.dakusui.scriptiveunit.ScriptiveCore", "com.github.dakusui.scriptiveunit.ScriptiveSuiteSet", "com.github.dakusui.scriptiveunit.testassets.SuiteSet1", "java.util.Collections", "org.junit.Assert" ]
import com.github.dakusui.scriptiveunit.ScriptiveCore; import com.github.dakusui.scriptiveunit.ScriptiveSuiteSet; import com.github.dakusui.scriptiveunit.testassets.SuiteSet1; import java.util.Collections; import org.junit.Assert;
import com.github.dakusui.scriptiveunit.*; import com.github.dakusui.scriptiveunit.testassets.*; import java.util.*; import org.junit.*;
[ "com.github.dakusui", "java.util", "org.junit" ]
com.github.dakusui; java.util; org.junit;
857,508
public void writePacket(final byte[] data, final int offset, final int len) throws IOException { raf.write(data, offset, len); size+= len; }
void function(final byte[] data, final int offset, final int len) throws IOException { raf.write(data, offset, len); size+= len; }
/** * Writes a packet of audio. * @param data audio data * @param offset the offset from which to start reading the data. * @param len the length of data to read. * @exception IOException */
Writes a packet of audio
writePacket
{ "repo_name": "frsyuki/festivoice", "path": "src/main/java/org/xiph/speex/PcmWaveWriter.java", "license": "apache-2.0", "size": 16630 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,082,700
synchronized public DTMIterator createDTMIterator(int node) { return null; }
synchronized DTMIterator function(int node) { return null; }
/** * NEEDSDOC Method createDTMIterator * * * NEEDSDOC @param node * * NEEDSDOC (createDTMIterator) @return */
NEEDSDOC Method createDTMIterator NEEDSDOC @param node NEEDSDOC (createDTMIterator) @return
createDTMIterator
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java", "license": "mit", "size": 32161 }
[ "com.sun.org.apache.xml.internal.dtm.DTMIterator" ]
import com.sun.org.apache.xml.internal.dtm.DTMIterator;
import com.sun.org.apache.xml.internal.dtm.*;
[ "com.sun.org" ]
com.sun.org;
2,214,490
void onPlaylistBlacklisted(HlsUrl url, long blacklistDurationMs); } private static final long PRIMARY_URL_KEEPALIVE_MS = 15000; private final Uri initialPlaylistUri; private final DataSource.Factory dataSourceFactory; private final HlsPlaylistParser playlistParser; private final int minRetryCount;...
void onPlaylistBlacklisted(HlsUrl url, long blacklistDurationMs); } private static final long PRIMARY_URL_KEEPALIVE_MS = 15000; private final Uri initialPlaylistUri; private final DataSource.Factory dataSourceFactory; private final HlsPlaylistParser playlistParser; private final int minRetryCount; private final Identit...
/** * Called if an error is encountered while loading a playlist. * * @param url The loaded url that caused the error. * @param blacklistDurationMs The number of milliseconds for which the playlist has been * blacklisted. */
Called if an error is encountered while loading a playlist
onPlaylistBlacklisted
{ "repo_name": "fanhattan/ExoPlayer", "path": "library/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistTracker.java", "license": "apache-2.0", "size": 20520 }
[ "android.net.Uri", "android.os.Handler", "com.google.android.exoplayer2.source.AdaptiveMediaSourceEventListener", "com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist", "com.google.android.exoplayer2.upstream.DataSource", "com.google.android.exoplayer2.upstream.Loader", "java.util.ArrayL...
import android.net.Uri; import android.os.Handler; import com.google.android.exoplayer2.source.AdaptiveMediaSourceEventListener; import com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist; import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.Loader; imp...
import android.net.*; import android.os.*; import com.google.android.exoplayer2.source.*; import com.google.android.exoplayer2.source.hls.playlist.*; import com.google.android.exoplayer2.upstream.*; import java.util.*;
[ "android.net", "android.os", "com.google.android", "java.util" ]
android.net; android.os; com.google.android; java.util;
2,906,482
HttpResponse toNettyResponse(Message message, NettyHttpConfiguration configuration) throws Exception;
HttpResponse toNettyResponse(Message message, NettyHttpConfiguration configuration) throws Exception;
/** * Binds from Camel {@link Message} to Netty {@link HttpResponse}. * * @param message the Camel message * @param configuration the endpoint configuration * @return the http response * @throws Exception is thrown if error during binding */
Binds from Camel <code>Message</code> to Netty <code>HttpResponse</code>
toNettyResponse
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpBinding.java", "license": "apache-2.0", "size": 6524 }
[ "io.netty.handler.codec.http.HttpResponse", "org.apache.camel.Message" ]
import io.netty.handler.codec.http.HttpResponse; import org.apache.camel.Message;
import io.netty.handler.codec.http.*; import org.apache.camel.*;
[ "io.netty.handler", "org.apache.camel" ]
io.netty.handler; org.apache.camel;
873,880
@Reference(service = ExecutorService.class, cardinality = ReferenceCardinality.MANDATORY) protected void setExecutorService(ExecutorService executorService) { this.executorService = executorService; }
@Reference(service = ExecutorService.class, cardinality = ReferenceCardinality.MANDATORY) void function(ExecutorService executorService) { this.executorService = executorService; }
/** * DS method for setting the executor service reference. * * @param executorService the {@link java.util.concurrent.ExecutorService} to * queue work to. */
DS method for setting the executor service reference
setExecutorService
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/io.openliberty.netty.internal.impl/src/io/openliberty/netty/internal/impl/NettyFrameworkImpl.java", "license": "epl-1.0", "size": 14280 }
[ "java.util.concurrent.ExecutorService", "org.osgi.service.component.annotations.Reference", "org.osgi.service.component.annotations.ReferenceCardinality" ]
import java.util.concurrent.ExecutorService; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality;
import java.util.concurrent.*; import org.osgi.service.component.annotations.*;
[ "java.util", "org.osgi.service" ]
java.util; org.osgi.service;
2,408,890
@Deprecated public Expression getFontWeight() { return fontWeight; }
Expression function() { return fontWeight; }
/** * Getter for property fontWeight. * * @return Value of property fontWeight. */
Getter for property fontWeight
getFontWeight
{ "repo_name": "FUNCATE/TerraMobile", "path": "sldparser/src/main/geotools/styling/FontImpl.java", "license": "apache-2.0", "size": 7134 }
[ "org.opengis.filter.expression.Expression" ]
import org.opengis.filter.expression.Expression;
import org.opengis.filter.expression.*;
[ "org.opengis.filter" ]
org.opengis.filter;
472,464
private void sendMessageToHandler(Integer what, Bundle data) { Message msg = Message.obtain(); msg.what = what; if (data != null) { msg.setData(data); } try { mMessenger.send(msg); } catch (RemoteException e) { Log.w(Constants.TAG,...
void function(Integer what, Bundle data) { Message msg = Message.obtain(); msg.what = what; if (data != null) { msg.setData(data); } try { mMessenger.send(msg); } catch (RemoteException e) { Log.w(Constants.TAG, STR, e); } catch (NullPointerException e) { Log.w(Constants.TAG, STR, e); } }
/** * Send message back to handler which is initialized in a activity * * @param what Message integer you want to send */
Send message back to handler which is initialized in a activity
sendMessageToHandler
{ "repo_name": "eric-stanley/apg", "path": "OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/PassphraseDialogFragment.java", "license": "gpl-3.0", "size": 14039 }
[ "android.os.Bundle", "android.os.Message", "android.os.RemoteException", "org.thialfihar.android.apg.Constants", "org.thialfihar.android.apg.util.Log" ]
import android.os.Bundle; import android.os.Message; import android.os.RemoteException; import org.thialfihar.android.apg.Constants; import org.thialfihar.android.apg.util.Log;
import android.os.*; import org.thialfihar.android.apg.*; import org.thialfihar.android.apg.util.*;
[ "android.os", "org.thialfihar.android" ]
android.os; org.thialfihar.android;
227,771
NodeRef resolveQNameReference(String[] reference);
NodeRef resolveQNameReference(String[] reference);
/** * QName type explicit inversion of * {@link Repository#findNodeRef(String, String[])}.<br> * Unlike {@link Repository} {@link NodeRefResolver} implementors must * provide an adequate implementation. * * @return reference array of reference segments * @throws AlfrescoRuntimeExcept...
QName type explicit inversion of <code>Repository#findNodeRef(String, String[])</code>. Unlike <code>Repository</code> <code>NodeRefResolver</code> implementors must provide an adequate implementation
resolveQNameReference
{ "repo_name": "Kast0rTr0y/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/virtual/config/NodeRefResolver.java", "license": "lgpl-3.0", "size": 4248 }
[ "org.alfresco.service.cmr.repository.NodeRef" ]
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.service" ]
org.alfresco.service;
921,791
boolean reclaimValue(K key, int hash, ValueReference<K, V> valueReference) { lock(); try { int newCount = this.count - 1; AtomicReferenceArray<ReferenceEntry<K, V>> table = this.table; int index = hash & (table.length() - 1); ReferenceEntry<K, V> first = table.get(index);...
boolean reclaimValue(K key, int hash, ValueReference<K, V> valueReference) { lock(); try { int newCount = this.count - 1; AtomicReferenceArray<ReferenceEntry<K, V>> table = this.table; int index = hash & (table.length() - 1); ReferenceEntry<K, V> first = table.get(index); for (ReferenceEntry<K, V> e = first; e != null;...
/** * Removes an entry whose value has been garbage collected. */
Removes an entry whose value has been garbage collected
reclaimValue
{ "repo_name": "uschindler/guava", "path": "guava/src/com/google/common/cache/LocalCache.java", "license": "apache-2.0", "size": 144800 }
[ "java.util.concurrent.atomic.AtomicReferenceArray" ]
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
40,842
ActionFuture<GetTaskResponse> getTask(GetTaskRequest request);
ActionFuture<GetTaskResponse> getTask(GetTaskRequest request);
/** * Get a task. * * @param request the request * @return the result future * @see org.elasticsearch.client.Requests#getTaskRequest() */
Get a task
getTask
{ "repo_name": "strapdata/elassandra", "path": "server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java", "license": "apache-2.0", "size": 26657 }
[ "org.elasticsearch.action.ActionFuture", "org.elasticsearch.action.admin.cluster.node.tasks.get.GetTaskRequest", "org.elasticsearch.action.admin.cluster.node.tasks.get.GetTaskResponse" ]
import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.admin.cluster.node.tasks.get.GetTaskRequest; import org.elasticsearch.action.admin.cluster.node.tasks.get.GetTaskResponse;
import org.elasticsearch.action.*; import org.elasticsearch.action.admin.cluster.node.tasks.get.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
463,161
public void setAny(final List<Object> any) { this.any = any; } /** * add a value to the any property collection * * @param any * Objects of the following type are allowed in the list: {@link Object}
void function(final List<Object> any) { this.any = any; } /** * add a value to the any property collection * * @param any * Objects of the following type are allowed in the list: {@link Object}
/** * Sets the value of the any property Objects of the following type(s) are allowed in the list List<Object>. * <p>Note: * <p>This method does not make use of the fluent pattern.If you would like to make it fluent, use {@link #withAny} instead. * * * @param any */
Sets the value of the any property Objects of the following type(s) are allowed in the list List. Note: This method does not make use of the fluent pattern.If you would like to make it fluent, use <code>#withAny</code> instead
setAny
{ "repo_name": "micromata/javaapiforkml", "path": "src/main/java/de/micromata/opengis/kml/v_2_2_0/xal/PostalCode.java", "license": "bsd-3-clause", "size": 49020 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,455,373
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<AttestationInner> listByResourceGroupAsync(String resourceGroupName) { final Integer top = null; final String filter = null; return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, t...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<AttestationInner> function(String resourceGroupName) { final Integer top = null; final String filter = null; return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, top, filter), nextLink -> listForResourceGroupNextSinglePageAsync(nex...
/** * Gets all attestations for the resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. ...
Gets all attestations for the resource group
listByResourceGroupAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java", "license": "mit", "size": 124635 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.policyinsights.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
82,817
public static void initTableMapperJob(String table, Scan scan, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job, boolean addDependencyJars) throws IOException { initTableMapperJob(table, scan, mapper, outputKeyClass, outputV...
static void function(String table, Scan scan, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job, boolean addDependencyJars) throws IOException { initTableMapperJob(table, scan, mapper, outputKeyClass, outputValueClass, job, addDependencyJars, getConfiguredInputFormat(job))...
/** * Use this before submitting a TableMap job. It will appropriately set up * the job. * * @param table The table name to read from. * @param scan The scan instance with the columns, time range etc. * @param mapper The mapper class to use. * @param outputKeyClass The class of the output key. ...
Use this before submitting a TableMap job. It will appropriately set up the job
initTableMapperJob
{ "repo_name": "HubSpot/hbase", "path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java", "license": "apache-2.0", "size": 46774 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.mapreduce.Job" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.mapreduce.Job;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,374,418
String toString(IStrategoTerm term);
String toString(IStrategoTerm term);
/** * Turns given term into a string. If the term is a string, return the string. Otherwise, return a pretty-printed * term. * * @param term * Term to convert to a string. * @return Result as a string. */
Turns given term into a string. If the term is a string, return the string. Otherwise, return a pretty-printed term
toString
{ "repo_name": "metaborg/spoofax", "path": "org.metaborg.spoofax.core/src/main/java/org/metaborg/spoofax/core/stratego/IStrategoCommon.java", "license": "apache-2.0", "size": 8973 }
[ "org.spoofax.interpreter.terms.IStrategoTerm" ]
import org.spoofax.interpreter.terms.IStrategoTerm;
import org.spoofax.interpreter.terms.*;
[ "org.spoofax.interpreter" ]
org.spoofax.interpreter;
862,302
@Override public void onSignedIn(PlusClient plusClient) { if (plusClient.isConnected()) { // Retrieve the account name of the user which allows us to retrieve // the OAuth access // token that we securely pass over to the OpenIt service to // identify and ...
void function(PlusClient plusClient) { if (plusClient.isConnected()) { final String name = plusClient.getAccountName();
/** * Invoked when the {@link PlusClientFragment} delegate has successfully * authenticated the user. * * @param plusClient The connected PlusClient which gives us access to the Google+ * APIs. */
Invoked when the <code>PlusClientFragment</code> delegate has successfully authenticated the user
onSignedIn
{ "repo_name": "msprunck/openit-client-android", "path": "app/src/main/java/com/sprunck/openit/activity/LoginActivity.java", "license": "apache-2.0", "size": 8150 }
[ "com.google.android.gms.plus.PlusClient" ]
import com.google.android.gms.plus.PlusClient;
import com.google.android.gms.plus.*;
[ "com.google.android" ]
com.google.android;
2,691,011
static void signalTasks(MiniDFSCluster dfs, FileSystem fileSys, String mapSignalFile, String reduceSignalFile, int replication) throws IOException { writeFile(dfs.getNameNode(), fileSys.getConf(), new Path(mapSignalFile), (short)replication);...
static void signalTasks(MiniDFSCluster dfs, FileSystem fileSys, String mapSignalFile, String reduceSignalFile, int replication) throws IOException { writeFile(dfs.getNameNode(), fileSys.getConf(), new Path(mapSignalFile), (short)replication); writeFile(dfs.getNameNode(), fileSys.getConf(), new Path(reduceSignalFile), (...
/** * Signal the maps/reduces to start. */
Signal the maps/reduces to start
signalTasks
{ "repo_name": "moreus/hadoop", "path": "hadoop-0.23.10/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/UtilsForTests.java", "license": "apache-2.0", "size": 24932 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.MiniDFSCluster" ]
import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.MiniDFSCluster;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
42,256
public void run() { try { init(); for (String fn : ilogFileNames) { out.println(); out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); out.println("reading log file: " + fn); ...
void function() { try { init(); for (String fn : ilogFileNames) { out.println(); out.println(STR); out.println(STR + fn); out.println(STR); BufferedReader ilog = null; try { ilog = new BufferedReader(new FileReader(fn)); process(ilog); } finally { if (ilog != null) ilog.close(); } } close(); } catch (Exception ex) { ou...
/** * Runs the result processor. */
Runs the result processor
run
{ "repo_name": "hasegaw/ref-mysql-labs-tplc", "path": "storage/ndb/test/crund/src/com/mysql/cluster/crund/ResultProcessor.java", "license": "gpl-2.0", "size": 13292 }
[ "java.io.BufferedReader", "java.io.FileReader" ]
import java.io.BufferedReader; import java.io.FileReader;
import java.io.*;
[ "java.io" ]
java.io;
35,066
public FacesConfigValidatorType<FacesConfigType<T>> getOrCreateValidator() { List<Node> nodeList = childNode.get("validator"); if (nodeList != null && nodeList.size() > 0) { return new FacesConfigValidatorTypeImpl<FacesConfigType<T>>(this, "validator", childNode, nodeList.get(0)); ...
FacesConfigValidatorType<FacesConfigType<T>> function() { List<Node> nodeList = childNode.get(STR); if (nodeList != null && nodeList.size() > 0) { return new FacesConfigValidatorTypeImpl<FacesConfigType<T>>(this, STR, childNode, nodeList.get(0)); } return createValidator(); }
/** * If not already created, a new <code>validator</code> element will be created and returned. * Otherwise, the first existing <code>validator</code> element will be returned. * @return the instance defined for the element <code>validator</code> */
If not already created, a new <code>validator</code> element will be created and returned. Otherwise, the first existing <code>validator</code> element will be returned
getOrCreateValidator
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig22/FacesConfigTypeImpl.java", "license": "epl-1.0", "size": 45745 }
[ "java.util.List", "org.jboss.shrinkwrap.descriptor.api.facesconfig22.FacesConfigType", "org.jboss.shrinkwrap.descriptor.api.facesconfig22.FacesConfigValidatorType", "org.jboss.shrinkwrap.descriptor.spi.node.Node" ]
import java.util.List; import org.jboss.shrinkwrap.descriptor.api.facesconfig22.FacesConfigType; import org.jboss.shrinkwrap.descriptor.api.facesconfig22.FacesConfigValidatorType; import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import java.util.*; import org.jboss.shrinkwrap.descriptor.api.facesconfig22.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;
[ "java.util", "org.jboss.shrinkwrap" ]
java.util; org.jboss.shrinkwrap;
1,492,388
public boolean checkRootAssigned() { List<LocationHierarchy> list = genericDao.findAll(LocationHierarchy.class, false); for (LocationHierarchy item : list) { if (item.getParent() != null) { if (item.getParent().getExtId().equals("HIERARCHY_ROOT")) return true; } } return false; }...
boolean function() { List<LocationHierarchy> list = genericDao.findAll(LocationHierarchy.class, false); for (LocationHierarchy item : list) { if (item.getParent() != null) { if (item.getParent().getExtId().equals(STR)) return true; } } return false; }
/** * Checks to see if a Hierarchy item has been assigned the root as the parent */
Checks to see if a Hierarchy item has been assigned the root as the parent
checkRootAssigned
{ "repo_name": "SwissTPH/openhds-server", "path": "controller/src/main/java/org/openhds/controller/service/impl/LocationHierarchyServiceImpl.java", "license": "bsd-3-clause", "size": 18878 }
[ "java.util.List", "org.openhds.domain.model.LocationHierarchy" ]
import java.util.List; import org.openhds.domain.model.LocationHierarchy;
import java.util.*; import org.openhds.domain.model.*;
[ "java.util", "org.openhds.domain" ]
java.util; org.openhds.domain;
2,671,574
private static void read(TestReport report, String path) throws Exception { if(path.startsWith("http://")) { ParseXML.parse(report, new URL(path)); } else { File file = new File(path); if(file.isDirectory()) { File[] files = file.listFiles(); for (File f : files) { read(report...
static void function(TestReport report, String path) throws Exception { if(path.startsWith("http: { ParseXML.parse(report, new URL(path)); } else { File file = new File(path); if(file.isDirectory()) { File[] files = file.listFiles(); for (File f : files) { read(report, f.getAbsolutePath()); } } else { ParseXML.parse(re...
/** * This method reads the test reports * (recursively, if need be) and store * them in the {@link TestReport} class. * @param report * @param path * @throws Exception */
This method reads the test reports (recursively, if need be) and store them in the <code>TestReport</code> class
read
{ "repo_name": "svvivek/junit-report-comparison", "path": "src/com/codeight/jrc/Main.java", "license": "mit", "size": 8629 }
[ "com.codeight.jrc.model.TestReport", "com.codeight.jrc.read.ParseXML", "java.io.File" ]
import com.codeight.jrc.model.TestReport; import com.codeight.jrc.read.ParseXML; import java.io.File;
import com.codeight.jrc.model.*; import com.codeight.jrc.read.*; import java.io.*;
[ "com.codeight.jrc", "java.io" ]
com.codeight.jrc; java.io;
1,868,254
public synchronized boolean freeSegment(Segment seg) throws IOException { if (seg == null) return false; int segId = seg.getSegmentId(); if (segId < _segList.size() && _segList.get(segId) == seg) { _segList.set(segId, null); seg.close(false); ...
synchronized boolean function(Segment seg) throws IOException { if (seg == null) return false; int segId = seg.getSegmentId(); if (segId < _segList.size() && _segList.get(segId) == seg) { _segList.set(segId, null); seg.close(false); if(segId == (_segList.size() - 1)) { try { _segList.remove(segId); File segFile = seg.g...
/** * Frees the specified segment. */
Frees the specified segment
freeSegment
{ "repo_name": "ferdiknight/krati", "path": "krati-main/src/main/java/krati/core/segment/SegmentManager.java", "license": "apache-2.0", "size": 20260 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,723,534
@Test(expectedExceptions = IllegalArgumentException.class) public void testGetSingleNullIds1() { new RemoteConventionSource(_baseUri).getSingle((ExternalIdBundle) null); }
@Test(expectedExceptions = IllegalArgumentException.class) void function() { new RemoteConventionSource(_baseUri).getSingle((ExternalIdBundle) null); }
/** * Tests that the external id bundle cannot be null. */
Tests that the external id bundle cannot be null
testGetSingleNullIds1
{ "repo_name": "McLeodMoores/starling", "path": "projects/core-rest-client/src/test/java/com/opengamma/core/convention/impl/RemoteConventionSourceTest.java", "license": "apache-2.0", "size": 21252 }
[ "com.opengamma.id.ExternalIdBundle", "org.testng.annotations.Test" ]
import com.opengamma.id.ExternalIdBundle; import org.testng.annotations.Test;
import com.opengamma.id.*; import org.testng.annotations.*;
[ "com.opengamma.id", "org.testng.annotations" ]
com.opengamma.id; org.testng.annotations;
2,149,956
DoubleStream mapToDouble(LongToDoubleFunction mapper); /** * Returns a stream consisting of the results of replacing each element of * this stream with the contents of a mapped stream produced by applying * the provided mapping function to each element. Each mapped stream is * {@link java....
DoubleStream mapToDouble(LongToDoubleFunction mapper); /** * Returns a stream consisting of the results of replacing each element of * this stream with the contents of a mapped stream produced by applying * the provided mapping function to each element. Each mapped stream is * {@link java.util.stream.BaseStream#close()...
/** * Returns a {@code DoubleStream} consisting of the results of applying the * given function to the elements of this stream. * * <p>This is an <a href="package-summary.html#StreamOps">intermediate * operation</a>. * * @param mapper a <a href="package-summary.html#NonInterference">n...
Returns a DoubleStream consisting of the results of applying the given function to the elements of this stream. This is an intermediate operation
mapToDouble
{ "repo_name": "shelan/jdk9-mirror", "path": "jdk/src/java.base/share/classes/java/util/stream/LongStream.java", "license": "gpl-2.0", "size": 38772 }
[ "java.util.function.LongToDoubleFunction" ]
import java.util.function.LongToDoubleFunction;
import java.util.function.*;
[ "java.util" ]
java.util;
591,936
static public void resetLocationCoordinates(Context c) { }
static void function(Context c) { }
/** * Resets the stored location coordinates. * * @param c Context used to get the SharedPreferences */
Resets the stored location coordinates
resetLocationCoordinates
{ "repo_name": "3Heads6Arms/Sunshine", "path": "S06.03-Exercise-PolishingPreferences/app/src/main/java/com/example/android/sunshine/data/SunshinePreferences.java", "license": "apache-2.0", "size": 5513 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,443,032
@Override public void exitScope() { Map<Key<?>, Object> scopeMap = scopeStackCache.get().peek(); performDisposal(scopeMap); scopeStackCache.get().pop(); log.debug("Exited scope."); }
void function() { Map<Key<?>, Object> scopeMap = scopeStackCache.get().peek(); performDisposal(scopeMap); scopeStackCache.get().pop(); log.debug(STR); }
/** * Exists the scope context of the current thread by popping the context's map off the internal * stack. */
Exists the scope context of the current thread by popping the context's map off the internal stack
exitScope
{ "repo_name": "mgmik/jfunk", "path": "jfunk-common/src/main/java/com/mgmtp/jfunk/common/config/StackedScope.java", "license": "apache-2.0", "size": 2741 }
[ "com.google.inject.Key", "java.util.Map" ]
import com.google.inject.Key; import java.util.Map;
import com.google.inject.*; import java.util.*;
[ "com.google.inject", "java.util" ]
com.google.inject; java.util;
1,163,099
@Nullable T visitSiblingConnection(BareSiblingConnection connection, @Nullable P parameter);
T visitSiblingConnection(BareSiblingConnection connection, @Nullable P parameter);
/** * Visits a sibling connection. */
Visits a sibling connection
visitSiblingConnection
{ "repo_name": "fschopp/cloudkeeper", "path": "cloudkeeper-core/cloudkeeper-model/src/main/java/xyz/cloudkeeper/model/bare/element/module/BareConnectionVisitor.java", "license": "apache-2.0", "size": 920 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,758,318
protected Multimap<String, String> getReferences() { return this.refs; }
Multimap<String, String> function() { return this.refs; }
/** * Key is property name. Value is a collection of one or more UUID values. If multiple values then property is * multi-valued. * * @return the references that need to have weak references created (never <code>null</code>) */
Key is property name. Value is a collection of one or more UUID values. If multiple values then property is multi-valued
getReferences
{ "repo_name": "stemig62/modeshape", "path": "sequencers/modeshape-sequencer-teiid/src/main/java/org/modeshape/sequencer/teiid/model/ReferenceResolver.java", "license": "apache-2.0", "size": 23843 }
[ "org.modeshape.common.collection.Multimap" ]
import org.modeshape.common.collection.Multimap;
import org.modeshape.common.collection.*;
[ "org.modeshape.common" ]
org.modeshape.common;
160,809
public void addStringsToList(List<String> values) { if (isSorted) { SortedListModel availableModel = (SortedListModel) availableList .getModel(); for (String value : values) availableModel.addElement(value); } else { DefaultListModel availableModel = (DefaultListModel) availableList .getM...
void function(List<String> values) { if (isSorted) { SortedListModel availableModel = (SortedListModel) availableList .getModel(); for (String value : values) availableModel.addElement(value); } else { DefaultListModel availableModel = (DefaultListModel) availableList .getModel(); for (String value : values) availableM...
/** * Adds Strings to the left list. * * @param values * Values to add. */
Adds Strings to the left list
addStringsToList
{ "repo_name": "sing-group/BEW", "path": "plugins_src/bew/es/uvigo/ei/sing/bew/view/panels/ListsPanel.java", "license": "gpl-3.0", "size": 8948 }
[ "es.uvigo.ei.sing.bew.tables.models.SortedListModel", "java.util.List", "javax.swing.DefaultListModel" ]
import es.uvigo.ei.sing.bew.tables.models.SortedListModel; import java.util.List; import javax.swing.DefaultListModel;
import es.uvigo.ei.sing.bew.tables.models.*; import java.util.*; import javax.swing.*;
[ "es.uvigo.ei", "java.util", "javax.swing" ]
es.uvigo.ei; java.util; javax.swing;
644,513
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<WorkerPoolResourceInner>> getMultiRolePoolWithResponseAsync( String resourceGroupName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( ne...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<WorkerPoolResourceInner>> function( String resourceGroupName, String name, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgum...
/** * Get properties of a multi-role pool. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the App Service Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if p...
Get properties of a multi-role pool
getMultiRolePoolWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServiceEnvironmentsClientImpl.java", "license": "mit", "size": 563770 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.appservice.fluent.models.WorkerPoolResourceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.WorkerPoolResourceInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,642,905
public boolean ban(IPBan ban) { BungeeIPBanEvent event = new BungeeIPBanEvent(this.address, ban); ProxyServer.getInstance().getPluginManager().callEvent(event); if(!event.isCancelled()) { this.unban(); this.bans.add(ban); ban.save(); if (this.t...
boolean function(IPBan ban) { BungeeIPBanEvent event = new BungeeIPBanEvent(this.address, ban); ProxyServer.getInstance().getPluginManager().callEvent(event); if(!event.isCancelled()) { this.unban(); this.bans.add(ban); ban.save(); if (this.toProxiedPlayer() != null) { this.toProxiedPlayer().disconnect(this.getBanMessa...
/** * IP Bans this ip * @param ban ban data * @return success state */
IP Bans this ip
ban
{ "repo_name": "lucavinci/bungeeban", "path": "src/main/java/de/lucavinci/bungeeban/util/IP.java", "license": "gpl-3.0", "size": 3890 }
[ "de.lucavinci.bungeeban.events.BungeeIPBanEvent", "net.md_5.bungee.api.ProxyServer" ]
import de.lucavinci.bungeeban.events.BungeeIPBanEvent; import net.md_5.bungee.api.ProxyServer;
import de.lucavinci.bungeeban.events.*; import net.md_5.bungee.api.*;
[ "de.lucavinci.bungeeban", "net.md_5.bungee" ]
de.lucavinci.bungeeban; net.md_5.bungee;
2,390,520
public String getAsShortText(ReadablePartial partial, Locale locale) { throw unsupported(); }
String function(ReadablePartial partial, Locale locale) { throw unsupported(); }
/** * Always throws UnsupportedOperationException * * @throws UnsupportedOperationException */
Always throws UnsupportedOperationException
getAsShortText
{ "repo_name": "aparo/scalajs-joda", "path": "src/main/scala/org/joda/time/field/UnsupportedDateTimeField.java", "license": "apache-2.0", "size": 14131 }
[ "java.util.Locale", "org.joda.time.ReadablePartial" ]
import java.util.Locale; import org.joda.time.ReadablePartial;
import java.util.*; import org.joda.time.*;
[ "java.util", "org.joda.time" ]
java.util; org.joda.time;
1,405,989