method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
protected final void procLogoffAndX(SMBSrvPacket smbPkt) throws java.io.IOException, SMBSrvException { // Check that the received packet looks like a valid logoff andX request if ( smbPkt.checkPacketIsValid(2, 0) == false) { m_sess.sendErrorResponseSMB(smbPkt, SMBStatus.NTInvalidParameter, SMBStatus.SRVNo...
final void function(SMBSrvPacket smbPkt) throws java.io.IOException, SMBSrvException { if ( smbPkt.checkPacketIsValid(2, 0) == false) { m_sess.sendErrorResponseSMB(smbPkt, SMBStatus.NTInvalidParameter, SMBStatus.SRVNonSpecificError, SMBStatus.ErrSrv); return; } int uid = smbPkt.getUserId(); VirtualCircuit vc = m_sess.f...
/** * Process the logoff request. * * @param outPkt SMBSrvPacket * @exception IOException * @exception SMBSrvException */
Process the logoff request
procLogoffAndX
{ "repo_name": "arcusys/Liferay-CIFS", "path": "source/java/org/alfresco/jlan/smb/server/LanManProtocolHandler.java", "license": "gpl-3.0", "size": 104127 }
[ "java.io.IOException", "org.alfresco.jlan.debug.Debug", "org.alfresco.jlan.smb.SMBStatus" ]
import java.io.IOException; import org.alfresco.jlan.debug.Debug; import org.alfresco.jlan.smb.SMBStatus;
import java.io.*; import org.alfresco.jlan.debug.*; import org.alfresco.jlan.smb.*;
[ "java.io", "org.alfresco.jlan" ]
java.io; org.alfresco.jlan;
1,039,616
void addAllStatements(int state, List<Statement> stmts) { for (Statement stmt : stmts) { this.addStatement(state, stmt); } }
void addAllStatements(int state, List<Statement> stmts) { for (Statement stmt : stmts) { this.addStatement(state, stmt); } }
/** * Add some statement to the given state. */
Add some statement to the given state
addAllStatements
{ "repo_name": "rfw/genja", "path": "src/genja/transform/Generator.java", "license": "gpl-3.0", "size": 6134 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,021,814
void recordFault(Fault f);
void recordFault(Fault f);
/** * record the fault message into specified file * @param f * Fault */
record the fault message into specified file
recordFault
{ "repo_name": "LiuJianan/Graduate-Graph", "path": "src/test/com/chinamobile/bcbsp/jobSubmissionProtocol/JobSubmissionProtocol.java", "license": "apache-2.0", "size": 5203 }
[ "com.chinamobile.bcbsp.fault.storage.Fault" ]
import com.chinamobile.bcbsp.fault.storage.Fault;
import com.chinamobile.bcbsp.fault.storage.*;
[ "com.chinamobile.bcbsp" ]
com.chinamobile.bcbsp;
765,095
public void createAndBlankApproveSalaryExpenseTransferDocument(String documentDescription, String explanation, String annotation, List<String> adHocRecipients, List<LaborLedgerExpenseTransferAccountingLine> sourceAccoutingLines, List<LaborLedgerExpenseTransferAccountingLine> targetAccoutingLines) throws WorkflowExc...
void function(String documentDescription, String explanation, String annotation, List<String> adHocRecipients, List<LaborLedgerExpenseTransferAccountingLine> sourceAccoutingLines, List<LaborLedgerExpenseTransferAccountingLine> targetAccoutingLines) throws WorkflowException;
/** * create and approve a salary expense transfer document generated from the given accounting lines * * @param documentDescription the description about the generated document * @param explanation the explanation for the document * @param annotation the annotation as acknowledgement * @p...
create and approve a salary expense transfer document generated from the given accounting lines
createAndBlankApproveSalaryExpenseTransferDocument
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/integration/ld/LaborModuleService.java", "license": "apache-2.0", "size": 10060 }
[ "java.util.List", "org.kuali.rice.kew.api.exception.WorkflowException" ]
import java.util.List; import org.kuali.rice.kew.api.exception.WorkflowException;
import java.util.*; import org.kuali.rice.kew.api.exception.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
1,767,679
public IoBuffer getData();
IoBuffer function();
/** * Getter for property 'data'. * * @return Value for property 'data'. */
Getter for property 'data'
getData
{ "repo_name": "OpenCorrelate/red5load", "path": "red5/src/main/java/org/red5/server/stream/IStreamData.java", "license": "lgpl-3.0", "size": 1211 }
[ "org.apache.mina.core.buffer.IoBuffer" ]
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.buffer.*;
[ "org.apache.mina" ]
org.apache.mina;
913,833
void onDismiss(RecyclerView recyclerView, int[] reverseSortedPositions); } public SwipeDismissRecyclerViewTouchListener(RecyclerView recyclerView, DismissCallbacks callbacks) { ViewConfiguration vc = ViewConfiguration.get(recyclerView.getContext()); mSlop = vc.getScaledTouchSlop();...
void onDismiss(RecyclerView recyclerView, int[] reverseSortedPositions); } public SwipeDismissRecyclerViewTouchListener(RecyclerView recyclerView, DismissCallbacks callbacks) { ViewConfiguration vc = ViewConfiguration.get(recyclerView.getContext()); mSlop = vc.getScaledTouchSlop(); mMinFlingVelocity = vc.getScaledMinim...
/** * Called when the user has indicated they she would like to dismiss one or more list item * positions. * * @param recyclerView The originating {@link ListView}. * @param reverseSortedPositions An array of positions to dismiss, sorted in descending order for con...
Called when the user has indicated they she would like to dismiss one or more list item positions
onDismiss
{ "repo_name": "luthink/Past", "path": "materialList/src/main/java/com/dexafree/materialList/controller/SwipeDismissRecyclerViewTouchListener.java", "license": "apache-2.0", "size": 17970 }
[ "android.support.v7.widget.RecyclerView", "android.view.ViewConfiguration" ]
import android.support.v7.widget.RecyclerView; import android.view.ViewConfiguration;
import android.support.v7.widget.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
1,073,561
Map<String, Map<String, Set<String>>> keysByProvider = new HashMap<>(); Map<String, Map<String, Map<String, String>>> lookupsByProvider = new HashMap<>(); // Collect the variables from the given configs that need transformation for (Map.Entry<String, String> config : configs.entrySet()) { ...
Map<String, Map<String, Set<String>>> keysByProvider = new HashMap<>(); Map<String, Map<String, Map<String, String>>> lookupsByProvider = new HashMap<>(); for (Map.Entry<String, String> config : configs.entrySet()) { if (config.getValue() != null) { List<ConfigVariable> vars = getVars(config.getValue(), DEFAULT_PATTERN...
/** * Transforms the given configuration data by using the {@link ConfigProvider} instances to * look up values to replace the variables in the pattern. * * @param configs the configuration values to be transformed * @return an instance of {@link ConfigTransformerResult} */
Transforms the given configuration data by using the <code>ConfigProvider</code> instances to look up values to replace the variables in the pattern
transform
{ "repo_name": "mihbor/kafka", "path": "clients/src/main/java/org/apache/kafka/common/config/ConfigTransformer.java", "license": "apache-2.0", "size": 8211 }
[ "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Set", "org.apache.kafka.common.config.provider.ConfigProvider" ]
import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.kafka.common.config.provider.ConfigProvider;
import java.util.*; import org.apache.kafka.common.config.provider.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
495,091
public static Rop opDiv(TypeList types) { return pickBinaryOp(types, DIV_CONST_INT, DIV_CONST_LONG, DIV_CONST_FLOAT, DIV_CONST_DOUBLE, DIV_INT, DIV_LONG, DIV_FLOAT, DIV_DOUBLE); }
static Rop function(TypeList types) { return pickBinaryOp(types, DIV_CONST_INT, DIV_CONST_LONG, DIV_CONST_FLOAT, DIV_CONST_DOUBLE, DIV_INT, DIV_LONG, DIV_FLOAT, DIV_DOUBLE); }
/** * Returns the appropriate {@code div} rop for the given * types. The result is a shared instance. * * @param types {@code non-null;} types of the sources * @return {@code non-null;} an appropriate instance */
Returns the appropriate div rop for the given types. The result is a shared instance
opDiv
{ "repo_name": "raviagarwal7/buck", "path": "third-party/java/dx/src/com/android/dx/rop/code/Rops.java", "license": "apache-2.0", "size": 82635 }
[ "com.android.dx.rop.type.TypeList" ]
import com.android.dx.rop.type.TypeList;
import com.android.dx.rop.type.*;
[ "com.android.dx" ]
com.android.dx;
837,855
private Node getFunctionalOpLHS(Node relOpNode, Node dataCriteriaSectionElem, Node lhsNode, Node rhsNode) throws XPathExpressionException { Node entryNode = generateFunctionalOpHQMF(lhsNode, (Element) dataCriteriaSectionElem); Comment comment = measureExport.getHQMFXmlProcessor().getOriginalDoc().createCom...
Node function(Node relOpNode, Node dataCriteriaSectionElem, Node lhsNode, Node rhsNode) throws XPathExpressionException { Node entryNode = generateFunctionalOpHQMF(lhsNode, (Element) dataCriteriaSectionElem); Comment comment = measureExport.getHQMFXmlProcessor().getOriginalDoc().createComment(STR+relOpNode.getAttribute...
/** * Gets the functional op lhs. * * @param relOpNode the rel op node * @param dataCriteriaSectionElem the data criteria section elem * @param lhsNode the lhs node * @param rhsNode the rhs node * @return the functional op lhs * @throws XPathExpressionException the x path expression exception */
Gets the functional op lhs
getFunctionalOpLHS
{ "repo_name": "JaLandry/MeasureAuthoringTool_LatestSprint", "path": "mat/src/mat/server/simplexml/hqmf/HQMFClauseLogicGenerator.java", "license": "apache-2.0", "size": 114148 }
[ "javax.xml.xpath.XPathExpressionException", "org.apache.commons.lang.StringUtils", "org.w3c.dom.Comment", "org.w3c.dom.Element", "org.w3c.dom.Node" ]
import javax.xml.xpath.XPathExpressionException; import org.apache.commons.lang.StringUtils; import org.w3c.dom.Comment; import org.w3c.dom.Element; import org.w3c.dom.Node;
import javax.xml.xpath.*; import org.apache.commons.lang.*; import org.w3c.dom.*;
[ "javax.xml", "org.apache.commons", "org.w3c.dom" ]
javax.xml; org.apache.commons; org.w3c.dom;
2,646,595
public Observable<ServiceResponse<Void>> resetPasswordWithServiceResponseAsync(String userName, ResetPasswordPayload resetPasswordPayload) { if (userName == null) { throw new IllegalArgumentException("Parameter userName is required and cannot be null."); } if (resetPasswordPayloa...
Observable<ServiceResponse<Void>> function(String userName, ResetPasswordPayload resetPasswordPayload) { if (userName == null) { throw new IllegalArgumentException(STR); } if (resetPasswordPayload == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new IllegalArgumentExce...
/** * Resets the user password on an environment This operation can take a while to complete. * * @param userName The name of the user. * @param resetPasswordPayload Represents the payload for resetting passwords. * @throws IllegalArgumentException thrown if parameters fail the validation ...
Resets the user password on an environment This operation can take a while to complete
resetPasswordWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/labservices/mgmt-v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java", "license": "mit", "size": 77728 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.azure.management.labservices.v2018_10_15.ResetPasswordPayload", "com.microsoft.rest.ServiceResponse", "com.microsoft.rest.Validator" ]
import com.google.common.reflect.TypeToken; import com.microsoft.azure.management.labservices.v2018_10_15.ResetPasswordPayload; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator;
import com.google.common.reflect.*; import com.microsoft.azure.management.labservices.v2018_10_15.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.azure", "com.microsoft.rest" ]
com.google.common; com.microsoft.azure; com.microsoft.rest;
2,744,736
public SingleOutputStreamOperator<T> setParallelism(int parallelism) { Preconditions.checkArgument(parallelism > 0, "The parallelism of an operator must be at least 1."); Preconditions.checkArgument(canBeParallel() || parallelism == 1, "The parallelism of non parallel operator must be 1."); transform...
SingleOutputStreamOperator<T> function(int parallelism) { Preconditions.checkArgument(parallelism > 0, STR); Preconditions.checkArgument(canBeParallel() parallelism == 1, STR); transformation.setParallelism(parallelism); return this; }
/** * Sets the parallelism for this operator. The degree must be 1 or more. * * @param parallelism * The parallelism for this operator. * @return The operator with set parallelism. */
Sets the parallelism for this operator. The degree must be 1 or more
setParallelism
{ "repo_name": "oscarceballos/flink-1.3.2", "path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java", "license": "apache-2.0", "size": 18423 }
[ "org.apache.flink.util.Preconditions" ]
import org.apache.flink.util.Preconditions;
import org.apache.flink.util.*;
[ "org.apache.flink" ]
org.apache.flink;
2,786,878
private void debugTraceTableModel() { DebugUtils.trace( model_ ); }
void function() { DebugUtils.trace( model_ ); }
/** * Dumps the content of the table model using the debug trace facility. */
Dumps the content of the table model using the debug trace facility
debugTraceTableModel
{ "repo_name": "gamegineer/dev", "path": "main/table/org.gamegineer.table.ui.impl/src/org/gamegineer/table/internal/ui/impl/view/TableView.java", "license": "gpl-3.0", "size": 79375 }
[ "org.gamegineer.table.internal.ui.impl.util.DebugUtils" ]
import org.gamegineer.table.internal.ui.impl.util.DebugUtils;
import org.gamegineer.table.internal.ui.impl.util.*;
[ "org.gamegineer.table" ]
org.gamegineer.table;
2,212,185
protected SchedulerAccount internalGetAccount() { // Get the current subject from the context final Subject subject = Subject.getSubject(AccessController.getContext()); final String username = subject.getPrincipals().iterator().next().getName(); SchedulerAccount acc = this.accountsMa...
SchedulerAccount function() { final Subject subject = Subject.getSubject(AccessController.getContext()); final String username = subject.getPrincipals().iterator().next().getName(); SchedulerAccount acc = this.accountsManager.getAccount(username); if (acc == null) { acc = SchedulerAccount.builder().build(); } return ac...
/** * Sub-classes may override this method to return null values. * @return the account corresponding to the username */
Sub-classes may override this method to return null values
internalGetAccount
{ "repo_name": "ShatalovYaroslav/scheduling", "path": "scheduler/scheduler-server/src/main/java/org/ow2/proactive/scheduler/core/jmx/mbean/MyAccountMBeanImpl.java", "license": "agpl-3.0", "size": 6365 }
[ "java.security.AccessController", "javax.security.auth.Subject", "org.ow2.proactive.scheduler.core.account.SchedulerAccount" ]
import java.security.AccessController; import javax.security.auth.Subject; import org.ow2.proactive.scheduler.core.account.SchedulerAccount;
import java.security.*; import javax.security.auth.*; import org.ow2.proactive.scheduler.core.account.*;
[ "java.security", "javax.security", "org.ow2.proactive" ]
java.security; javax.security; org.ow2.proactive;
1,301,107
public List<SQLStatement> getSQLStatements() throws KettleStepException { return getSQLStatements(null); }
List<SQLStatement> function() throws KettleStepException { return getSQLStatements(null); }
/** * Builds a list of all the SQL statements that this transformation needs in order to work properly. * * @return An ArrayList of SQLStatement objects. */
Builds a list of all the SQL statements that this transformation needs in order to work properly
getSQLStatements
{ "repo_name": "soluvas/pdi-ce", "path": "src/org/pentaho/di/trans/TransMeta.java", "license": "apache-2.0", "size": 203052 }
[ "java.util.List", "org.pentaho.di.core.SQLStatement", "org.pentaho.di.core.exception.KettleStepException" ]
import java.util.List; import org.pentaho.di.core.SQLStatement; import org.pentaho.di.core.exception.KettleStepException;
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
2,767,938
Logger.getLogger(getClass()).debug("Setting " + getKey() + " to " + value); PREFERENCES.putBoolean(getKey(), value); }
Logger.getLogger(getClass()).debug(STR + getKey() + STR + value); PREFERENCES.putBoolean(getKey(), value); }
/** * Sets the value of the preference. Will not save over reboot. * * @param value new value of preference */
Sets the value of the preference. Will not save over reboot
set
{ "repo_name": "Team4334/robot-code", "path": "src/edu/first/util/preferences/BooleanPreference.java", "license": "gpl-3.0", "size": 1787 }
[ "edu.first.util.log.Logger" ]
import edu.first.util.log.Logger;
import edu.first.util.log.*;
[ "edu.first.util" ]
edu.first.util;
1,846,914
static void appendBytes(String content, Mode mode, BitArray bits, String encoding) throws WriterException { switch (mode) { case NUMERIC: appendNumericBytes(content, bits); break; case ALPHANUMERIC: a...
static void appendBytes(String content, Mode mode, BitArray bits, String encoding) throws WriterException { switch (mode) { case NUMERIC: appendNumericBytes(content, bits); break; case ALPHANUMERIC: appendAlphanumericBytes(content, bits); break; case BYTE: append8BitBytes(content, bits, encoding); break; case KANJI: ap...
/** * Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". */
Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits"
appendBytes
{ "repo_name": "HJ-StevenSun/Weex-TestDemo", "path": "weex-dev/android/playground/app/src/main/java_zxing/com/google/zxing/qrcode/encoder/Encoder.java", "license": "apache-2.0", "size": 21482 }
[ "com.google.zxing.WriterException", "com.google.zxing.common.BitArray", "com.google.zxing.qrcode.decoder.Mode" ]
import com.google.zxing.WriterException; import com.google.zxing.common.BitArray; import com.google.zxing.qrcode.decoder.Mode;
import com.google.zxing.*; import com.google.zxing.common.*; import com.google.zxing.qrcode.decoder.*;
[ "com.google.zxing" ]
com.google.zxing;
2,878,267
static ArrayList<DbStats> getDbStats() { ArrayList<DbStats> dbStatsList = new ArrayList<DbStats>(); for (SQLiteDatabase db : getActiveDatabases()) { db.collectDbStats(dbStatsList); } return dbStatsList; }
static ArrayList<DbStats> getDbStats() { ArrayList<DbStats> dbStatsList = new ArrayList<DbStats>(); for (SQLiteDatabase db : getActiveDatabases()) { db.collectDbStats(dbStatsList); } return dbStatsList; }
/** * Collect statistics about all open databases in the current process. * Used by bug report. */
Collect statistics about all open databases in the current process. Used by bug report
getDbStats
{ "repo_name": "weitzj/sqlite-android", "path": "library/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java", "license": "apache-2.0", "size": 94364 }
[ "java.util.ArrayList", "org.sqlite.database.sqlite.SQLiteDebug" ]
import java.util.ArrayList; import org.sqlite.database.sqlite.SQLiteDebug;
import java.util.*; import org.sqlite.database.sqlite.*;
[ "java.util", "org.sqlite.database" ]
java.util; org.sqlite.database;
1,942,711
try { if (instance == null) instance = new VariableManager(); return instance; } catch (Exception e) { e.printStackTrace(); return null; } } private VariableManager() throws IOException { propLocal = new ConfigurationReader(UnaCloudConstants.LOCAL_FILE); propGlobal = new Configurati...
try { if (instance == null) instance = new VariableManager(); return instance; } catch (Exception e) { e.printStackTrace(); return null; } } private VariableManager() throws IOException { propLocal = new ConfigurationReader(UnaCloudConstants.LOCAL_FILE); propGlobal = new ConfigurationReader(UnaCloudConstants.GLOBAL_FIL...
/** * Gets instance * @return instance */
Gets instance
getInstance
{ "repo_name": "UnaCloud/UnaCloud2", "path": "AgentCloud/src/uniandes/unacloud/agent/utils/VariableManager.java", "license": "gpl-2.0", "size": 1361 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,361,073
public List<String> getJoiningNodes();
List<String> function();
/** * Retrieve the list of nodes currently bootstrapping into the ring. * * @return set of IP addresses, as Strings */
Retrieve the list of nodes currently bootstrapping into the ring
getJoiningNodes
{ "repo_name": "thobbs/cassandra", "path": "src/java/org/apache/cassandra/service/StorageServiceMBean.java", "license": "apache-2.0", "size": 27138 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,050,764
public Observable<ServiceResponse<Page<NetworkInterfaceInner>>> listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { if (resourceGroupName == null) { throw new IllegalArgumentExce...
Observable<ServiceResponse<Page<NetworkInterfaceInner>>> function(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (virtualMachineScaleSetName == null) { throw new IllegalArgumentEx...
/** * Gets information about all network interfaces in a virtual machine in a virtual machine scale set. * ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param resourceGroupName The name of the resource group. ServiceResponse<PageImpl<NetworkInterfaceInner>> * @param virtualMachineScaleSetName Th...
Gets information about all network interfaces in a virtual machine in a virtual machine scale set
listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java", "license": "mit", "size": 128627 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
171,884
public static Intent getLoadDeckIntent(Context context, long deckId) { Intent loadDeckIntent = new Intent(context, DeckPicker.class); loadDeckIntent.setAction(Intent.ACTION_MAIN); loadDeckIntent.addCategory(Intent.CATEGORY_LAUNCHER); loadDeckIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_T...
static Intent function(Context context, long deckId) { Intent loadDeckIntent = new Intent(context, DeckPicker.class); loadDeckIntent.setAction(Intent.ACTION_MAIN); loadDeckIntent.addCategory(Intent.CATEGORY_LAUNCHER); loadDeckIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK Intent.FLAG_ACTIVITY_CLEAR_TOP); loadDeckIntent....
/** * Creates an intent to load a deck given the full pathname of it. The constructed intent is equivalent (modulo the * extras) to the open used by the launcher shortcut, which means it will not open a new study options window but * bring the existing one to the front. */
Creates an intent to load a deck given the full pathname of it. The constructed intent is equivalent (modulo the extras) to the open used by the launcher shortcut, which means it will not open a new study options window but bring the existing one to the front
getLoadDeckIntent
{ "repo_name": "RossRogers/Anki-Android", "path": "src/com/ichi2/anki/DeckPicker.java", "license": "gpl-3.0", "size": 136764 }
[ "android.content.Context", "android.content.Intent" ]
import android.content.Context; import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
613,055
private void createCellSpriteIfNeccessary(int column, int row, Cell cell) { ITextureRegion textureRegion = getTextureRegionFromCellType(cell .getCellType()); if (textureRegion != null) { Sprite cellSprite = new Sprite(column * cellWidth, row * cellHeight, textureRegion, model.getMainActivity() ...
void function(int column, int row, Cell cell) { ITextureRegion textureRegion = getTextureRegionFromCellType(cell .getCellType()); if (textureRegion != null) { Sprite cellSprite = new Sprite(column * cellWidth, row * cellHeight, textureRegion, model.getMainActivity() .getVertexBufferObjectManager()); cellSprite.setWidth...
/** * If cell has another CellType than CellType.PLAIN, a Sprite is attached at * the Cells location * * @param column * the cell's column * @param row * the cell's row * @param cell */
If cell has another CellType than CellType.PLAIN, a Sprite is attached at the Cells location
createCellSpriteIfNeccessary
{ "repo_name": "KSas/androidtbsgame", "path": "AndroidTbsGame/src/de/mmssb/androidtbsgame/andengine/entities/board/Board.java", "license": "mit", "size": 5073 }
[ "de.mmssb.androidtbsgame.andengine.entities.board.Cell", "org.andengine.entity.sprite.Sprite", "org.andengine.opengl.texture.region.ITextureRegion" ]
import de.mmssb.androidtbsgame.andengine.entities.board.Cell; import org.andengine.entity.sprite.Sprite; import org.andengine.opengl.texture.region.ITextureRegion;
import de.mmssb.androidtbsgame.andengine.entities.board.*; import org.andengine.entity.sprite.*; import org.andengine.opengl.texture.region.*;
[ "de.mmssb.androidtbsgame", "org.andengine.entity", "org.andengine.opengl" ]
de.mmssb.androidtbsgame; org.andengine.entity; org.andengine.opengl;
849,288
Patient updatePatient(String patientJson);
Patient updatePatient(String patientJson);
/** * update patient resource * * @param patientObject json provided by the client * @return patient resource and will return null if patient not found for the given id */
update patient resource
updatePatient
{ "repo_name": "E-Health/openmrs-module-patientportaltoolkit-pcchr", "path": "api/src/main/java/org/openmrs/module/patientportaltoolkit/api/PatientService.java", "license": "mpl-2.0", "size": 1450 }
[ "org.openmrs.Patient" ]
import org.openmrs.Patient;
import org.openmrs.*;
[ "org.openmrs" ]
org.openmrs;
1,436,551
public boolean checkFileSystem() { if (this.fsOk && this.fs != null) { try { FSUtils.checkFileSystemAvailable(this.fs); } catch (IOException e) { abort("File System not available", e); this.fsOk = false; } } ...
boolean function() { if (this.fsOk && this.fs != null) { try { FSUtils.checkFileSystemAvailable(this.fs); } catch (IOException e) { abort(STR, e); this.fsOk = false; } } return this.fsOk; }
/** * Checks to see if the file system is still accessible. If not, sets * abortRequested and stopRequested * * @return false if file system is not available */
Checks to see if the file system is still accessible. If not, sets abortRequested and stopRequested
checkFileSystem
{ "repo_name": "grokcoder/pbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java", "license": "apache-2.0", "size": 131698 }
[ "java.io.IOException", "org.apache.hadoop.hbase.util.FSUtils" ]
import java.io.IOException; import org.apache.hadoop.hbase.util.FSUtils;
import java.io.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,525,433
public static String getString(String key, Object... params) { String pattern = getString(key); return MessageFormat.format(pattern, params); } public interface Message { String FILE_NOT_FOUND = "FILE_NOT_FOUND"; //$NON-NLS-1$ String ARRAY_TYPE_UNMATCH = "ARRAY_TYPE_UNMATCH"; //$NON-NLS-1$ ...
static String function(String key, Object... params) { String pattern = getString(key); return MessageFormat.format(pattern, params); } public interface Message { String FILE_NOT_FOUND = STR; String ARRAY_TYPE_UNMATCH = STR; String COLLECTION_IS_NULL = STR; String DATE_IS_NULL = STR; String OUT_OF_BOUND = STR; String O...
/** * Get the translated string given its key and required parameters. This is * wrapper around the java {@link MessageFormat} API. * * @param key * Message's key. * @param params * The message's parameters. * @return The translated message or !key! if not found. * @see Mes...
Get the translated string given its key and required parameters. This is wrapper around the java <code>MessageFormat</code> API
getString
{ "repo_name": "elminsterjimmy/java", "path": "Commons/src/main/java/com/elminster/common/util/Messages.java", "license": "apache-2.0", "size": 2789 }
[ "java.text.MessageFormat" ]
import java.text.MessageFormat;
import java.text.*;
[ "java.text" ]
java.text;
2,103,959
public void setParameters() throws Exception { // Create a list of all of the launch files, including // the roslaunch core launch file List<LaunchFile> launchFiles = new ArrayList<LaunchFile>(); launchFiles.add(m_rosCoreLaunch); launchFiles.addAll(m_launchFiles); // Execute all delete rosparams first ...
void function() throws Exception { List<LaunchFile> launchFiles = new ArrayList<LaunchFile>(); launchFiles.add(m_rosCoreLaunch); launchFiles.addAll(m_launchFiles); RosParamManager.deleteParameters(m_rosParams, m_uri); RosParamManager.dumpParameters(m_rosParams, m_uri); ClearParamsManager.clearParams(m_unifiedClearParam...
/** * Set all of the RosParamTags and ParamTags defined * in the launch file tree. * * @throws Exception if one of the params failed to be set */
Set all of the RosParamTags and ParamTags defined in the launch file tree
setParameters
{ "repo_name": "bponsler/rosjava_roslaunch", "path": "src/org/ros/rosjava/roslaunch/launching/LaunchConfig.java", "license": "bsd-3-clause", "size": 13935 }
[ "java.util.ArrayList", "java.util.List", "org.ros.rosjava.roslaunch.parsing.LaunchFile" ]
import java.util.ArrayList; import java.util.List; import org.ros.rosjava.roslaunch.parsing.LaunchFile;
import java.util.*; import org.ros.rosjava.roslaunch.parsing.*;
[ "java.util", "org.ros.rosjava" ]
java.util; org.ros.rosjava;
2,629,927
protected int run(String[] args) { try { LOG.debug("All environment variables: {}", ENV); final String yarnClientUsername = ENV.get(YarnConfigKeys.ENV_HADOOP_USER_NAME); require(yarnClientUsername != null, "YARN client user name environment variable (%s) not set", YarnConfigKeys.ENV_HADOOP_USER_NAME)...
int function(String[] args) { try { LOG.debug(STR, ENV); final String yarnClientUsername = ENV.get(YarnConfigKeys.ENV_HADOOP_USER_NAME); require(yarnClientUsername != null, STR, YarnConfigKeys.ENV_HADOOP_USER_NAME); final String currDir = ENV.get(Environment.PWD.key()); require(currDir != null, STR, Environment.PWD.key...
/** * The instance entry point for the YARN application master. Obtains user group * information and calls the main work method {@link #runApplicationMaster(Configuration)} as a * privileged action. * * @param args The command line arguments. * @return The process exit code. */
The instance entry point for the YARN application master. Obtains user group information and calls the main work method <code>#runApplicationMaster(Configuration)</code> as a privileged action
run
{ "repo_name": "mylog00/flink", "path": "flink-yarn/src/main/java/org/apache/flink/yarn/YarnApplicationMasterRunner.java", "license": "apache-2.0", "size": 21335 }
[ "java.io.File", "java.io.IOException", "java.util.Map", "org.apache.flink.configuration.Configuration", "org.apache.flink.configuration.SecurityOptions", "org.apache.flink.core.fs.FileSystem", "org.apache.flink.runtime.security.SecurityConfiguration", "org.apache.flink.runtime.security.SecurityUtils",...
import java.io.File; import java.io.IOException; import java.util.Map; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.SecurityOptions; import org.apache.flink.core.fs.FileSystem; import org.apache.flink.runtime.security.SecurityConfiguration; import org.apache.flink.runtime.s...
import java.io.*; import java.util.*; import org.apache.flink.configuration.*; import org.apache.flink.core.fs.*; import org.apache.flink.runtime.security.*; import org.apache.flink.yarn.*; import org.apache.flink.yarn.cli.*; import org.apache.hadoop.security.*; import org.apache.hadoop.yarn.api.*;
[ "java.io", "java.util", "org.apache.flink", "org.apache.hadoop" ]
java.io; java.util; org.apache.flink; org.apache.hadoop;
2,226,425
//-----------// // getBounds // //-----------// @Override public Rectangle getBounds () { if (super.getBounds() == null) { setBounds(boundsOf(getWords())); } return super.getBounds(); }
Rectangle function () { if (super.getBounds() == null) { setBounds(boundsOf(getWords())); } return super.getBounds(); }
/** * Overridden to recompute the bounds from contained words. * * @return the line bounds */
Overridden to recompute the bounds from contained words
getBounds
{ "repo_name": "Audiveris/audiveris", "path": "src/main/org/audiveris/omr/text/TextLine.java", "license": "agpl-3.0", "size": 29555 }
[ "java.awt.Rectangle" ]
import java.awt.Rectangle;
import java.awt.*;
[ "java.awt" ]
java.awt;
932,684
@GlobalCommand public void downloadModel() { // exit if model isn't selected if (selectedModel == null) { String message = webMessageProvider.getMessage("mp.download_model_not_selected_failed"); Messagebox.show(message); return; } // declare file File modelFile = null; try { ...
void function() { if (selectedModel == null) { String message = webMessageProvider.getMessage(STR); Messagebox.show(message); return; } File modelFile = null; try { ModuleInfo info = sessionState.getModuleInfo(); modelFile = createModelFile(info, selectedModel.getEnvironment()); AMedia media = new AMedia(modelFile, ZK_...
/** * Event handler for the global command "downloadModel". The event is triggered * from the menu bar as a global command. * * The event handler will save the selected model at the client side, e.g. the * browser. */
Event handler for the global command "downloadModel". The event is triggered from the menu bar as a global command. The event handler will save the selected model at the client side, e.g. the browser
downloadModel
{ "repo_name": "athrane/pineapple", "path": "applications/pineapple-web-application/pineapple-web-application-war/src/main/java/com/alpha/pineapple/web/zk/viewmodel/ModulePanel.java", "license": "gpl-3.0", "size": 21279 }
[ "com.alpha.pineapple.module.ModuleInfo", "java.io.File", "java.io.FileNotFoundException", "org.zkoss.util.media.AMedia", "org.zkoss.zk.ui.util.Clients", "org.zkoss.zul.Filedownload", "org.zkoss.zul.Messagebox" ]
import com.alpha.pineapple.module.ModuleInfo; import java.io.File; import java.io.FileNotFoundException; import org.zkoss.util.media.AMedia; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Filedownload; import org.zkoss.zul.Messagebox;
import com.alpha.pineapple.module.*; import java.io.*; import org.zkoss.util.media.*; import org.zkoss.zk.ui.util.*; import org.zkoss.zul.*;
[ "com.alpha.pineapple", "java.io", "org.zkoss.util", "org.zkoss.zk", "org.zkoss.zul" ]
com.alpha.pineapple; java.io; org.zkoss.util; org.zkoss.zk; org.zkoss.zul;
259,571
public void testAwait() throws InterruptedException, BrokenBarrierException, TimeoutException { CyclicBarrier barrier; synchronized (this) { barrier = this.barrier; } Objects.requireNonNull(barrier, "Barrier must be set up before awaiti...
void function() throws InterruptedException, BrokenBarrierException, TimeoutException { CyclicBarrier barrier; synchronized (this) { barrier = this.barrier; } Objects.requireNonNull(barrier, STR); barrier.await(1L, TimeUnit.SECONDS); } } private class SynchronizedDelegatingClassLoader extends DelegatingClassLoader { { ...
/** * From the test orchestrating thread, await for the test thread to continue execution * @throws InterruptedException If the current thread is interrupted while waiting * @throws BrokenBarrierException If the test thread is interrupted while waiting * @throws TimeoutException If t...
From the test orchestrating thread, await for the test thread to continue execution
testAwait
{ "repo_name": "TiVo/kafka", "path": "connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/SynchronizationTest.java", "license": "apache-2.0", "size": 19119 }
[ "java.util.List", "java.util.Objects", "java.util.concurrent.BrokenBarrierException", "java.util.concurrent.CyclicBarrier", "java.util.concurrent.TimeUnit", "java.util.concurrent.TimeoutException" ]
import java.util.List; import java.util.Objects; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
337,471
public AxisAlignedBB genQuadBoundingBox(int quad) { float xMin = 0.0F; float zMin = 0.0F; float xMax = 1.0F; float zMax = 1.0F; switch (quad) { case QUAD_XZNN: xMax = 0.5F; zMax = 0.5F; break; ...
AxisAlignedBB function(int quad) { float xMin = 0.0F; float zMin = 0.0F; float xMax = 1.0F; float zMax = 1.0F; switch (quad) { case QUAD_XZNN: xMax = 0.5F; zMax = 0.5F; break; case QUAD_XZNP: xMax = 0.5F; zMin = 0.5F; break; case QUAD_XZPN: xMin = 0.5F; zMax = 0.5F; break; case QUAD_XZPP: xMin = 0.5F; zMin = 0.5F; brea...
/** * Will generate four boxes with max height represented by largest quadrant depth. */
Will generate four boxes with max height represented by largest quadrant depth
genQuadBoundingBox
{ "repo_name": "burpingdog1/carpentersblocks", "path": "src/main/java/com/carpentersblocks/util/block/CollapsibleUtil.java", "license": "lgpl-2.1", "size": 7575 }
[ "net.minecraft.util.math.AxisAlignedBB" ]
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.*;
[ "net.minecraft.util" ]
net.minecraft.util;
114,660
protected void setupCurrentUser(Entity staff) { String user = "fake staff"; String fullName = "Fake Staff"; List<String> roles = Arrays.asList(SecureRoleRightAccessImpl.IT_ADMINISTRATOR); injector.setCustomContext(user, fullName, "MERPREALM", roles, staff, "111"); }
void function(Entity staff) { String user = STR; String fullName = STR; List<String> roles = Arrays.asList(SecureRoleRightAccessImpl.IT_ADMINISTRATOR); injector.setCustomContext(user, fullName, STR, roles, staff, "111"); }
/** * Set up the principal * * @param staff */
Set up the principal
setupCurrentUser
{ "repo_name": "inbloom/secure-data-service", "path": "sli/api/src/test/java/org/slc/sli/api/security/context/validator/CommonValidatorTest.java", "license": "apache-2.0", "size": 13910 }
[ "java.util.Arrays", "java.util.List", "org.slc.sli.api.security.roles.SecureRoleRightAccessImpl", "org.slc.sli.domain.Entity" ]
import java.util.Arrays; import java.util.List; import org.slc.sli.api.security.roles.SecureRoleRightAccessImpl; import org.slc.sli.domain.Entity;
import java.util.*; import org.slc.sli.api.security.roles.*; import org.slc.sli.domain.*;
[ "java.util", "org.slc.sli" ]
java.util; org.slc.sli;
2,681,942
public Vertex parseOperatorByteCode(DataInputStream dataStream, Vertex pop, Network network) throws IOException { Vertex expression = network.createTemporyVertex(); expression.addRelationship(Primitive.INSTANTIATION, Primitive.EXPRESSION); long id = dataStream.readLong(); Vertex operator = network.findById(i...
Vertex function(DataInputStream dataStream, Vertex pop, Network network) throws IOException { Vertex expression = network.createTemporyVertex(); expression.addRelationship(Primitive.INSTANTIATION, Primitive.EXPRESSION); long id = dataStream.readLong(); Vertex operator = network.findById(id); if (operator == null) { ret...
/** * Parse the operator and its arguments from bytecode. */
Parse the operator and its arguments from bytecode
parseOperatorByteCode
{ "repo_name": "BOTlibre/BOTlibre", "path": "ai-engine/source/org/botlibre/self/Self4Decompiler.java", "license": "epl-1.0", "size": 56442 }
[ "java.io.DataInputStream", "java.io.IOException", "org.botlibre.api.knowledge.Network", "org.botlibre.api.knowledge.Vertex", "org.botlibre.knowledge.Primitive" ]
import java.io.DataInputStream; import java.io.IOException; import org.botlibre.api.knowledge.Network; import org.botlibre.api.knowledge.Vertex; import org.botlibre.knowledge.Primitive;
import java.io.*; import org.botlibre.api.knowledge.*; import org.botlibre.knowledge.*;
[ "java.io", "org.botlibre.api", "org.botlibre.knowledge" ]
java.io; org.botlibre.api; org.botlibre.knowledge;
303,830
public void update(final int timeout, final String[] ignoreTimeout, final boolean requireTopic, final String[] ignoreTopics, final boolean addTimestamp, final boolean addSubject) { this.add...
void function(final int timeout, final String[] ignoreTimeout, final boolean requireTopic, final String[] ignoreTopics, final boolean addTimestamp, final boolean addSubject) { this.addTimestamp = addTimestamp; this.addSubject = addSubject; this.tracker.close(); this.tracker.update(ignoreTimeout, requireTopic); this.m_s...
/** * Update the event admin with new configuration. * * @param timeout The event timeout. * @param ignoreTimeout The event ignore timeout. * @param requireTopic True if the event require a topic, false else. * @param ignoreTopics The array of topic to ignore. * @param addTimestamp Tr...
Update the event admin with new configuration
update
{ "repo_name": "grgrzybek/karaf", "path": "services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java", "license": "apache-2.0", "size": 9216 }
[ "org.apache.felix.eventadmin.impl.util.Matchers" ]
import org.apache.felix.eventadmin.impl.util.Matchers;
import org.apache.felix.eventadmin.impl.util.*;
[ "org.apache.felix" ]
org.apache.felix;
2,428,095
T get(Vertex<I, V, E> vertex);
T get(Vertex<I, V, E> vertex);
/** * Retrieves an instance of the appropriate type, given a vertex. * The returned object may or may not be a new instance, * depending on the implementation. * * @param vertex Vertex * @return result */
Retrieves an instance of the appropriate type, given a vertex. The returned object may or may not be a new instance, depending on the implementation
get
{ "repo_name": "KidEinstein/giraph", "path": "giraph-core/src/main/java/org/apache/giraph/function/vertex/SupplierFromVertex.java", "license": "apache-2.0", "size": 1760 }
[ "org.apache.giraph.graph.Vertex" ]
import org.apache.giraph.graph.Vertex;
import org.apache.giraph.graph.*;
[ "org.apache.giraph" ]
org.apache.giraph;
901,740
public void startDebugServer() { startDebugServer(DebugServer.DEFAULT_DEBUG_PORT, DebugServer.NUM_CLIENTS); }
void function() { startDebugServer(DebugServer.DEFAULT_DEBUG_PORT, DebugServer.NUM_CLIENTS); }
/** * Start a debug server on the default TCP/IP port for the default number * of clients. */
Start a debug server on the default TCP/IP port for the default number of clients
startDebugServer
{ "repo_name": "parthmehta209/GearVRf", "path": "GVRf/Framework/framework/src/main/java/org/gearvrf/GVRContext.java", "license": "apache-2.0", "size": 130412 }
[ "org.gearvrf.debug.DebugServer" ]
import org.gearvrf.debug.DebugServer;
import org.gearvrf.debug.*;
[ "org.gearvrf.debug" ]
org.gearvrf.debug;
108,434
Slot selectUnAssignedSlot(String queueName) throws AndesException;
Slot selectUnAssignedSlot(String queueName) throws AndesException;
/** * Select unassigned slots for a given queue name. * * @param queueName name of queue * @return unassigned slot object if found * @throws AndesException */
Select unassigned slots for a given queue name
selectUnAssignedSlot
{ "repo_name": "prabathariyaratna/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/AndesContextStore.java", "license": "apache-2.0", "size": 21458 }
[ "org.wso2.andes.kernel.slot.Slot" ]
import org.wso2.andes.kernel.slot.Slot;
import org.wso2.andes.kernel.slot.*;
[ "org.wso2.andes" ]
org.wso2.andes;
2,598,997
public SqlFieldsQuery setTimeout(int timeout, TimeUnit timeUnit) { this.timeout = QueryUtils.validateTimeout(timeout, timeUnit); return this; }
SqlFieldsQuery function(int timeout, TimeUnit timeUnit) { this.timeout = QueryUtils.validateTimeout(timeout, timeUnit); return this; }
/** * Sets the query execution timeout. Query will be automatically cancelled if the execution timeout is exceeded. * @param timeout Timeout value. Zero value disables timeout. * @param timeUnit Time unit. * @return {@code this} For chaining. */
Sets the query execution timeout. Query will be automatically cancelled if the execution timeout is exceeded
setTimeout
{ "repo_name": "nivanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/cache/query/SqlFieldsQuery.java", "license": "apache-2.0", "size": 7360 }
[ "java.util.concurrent.TimeUnit", "org.apache.ignite.internal.processors.query.QueryUtils" ]
import java.util.concurrent.TimeUnit; import org.apache.ignite.internal.processors.query.QueryUtils;
import java.util.concurrent.*; import org.apache.ignite.internal.processors.query.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
271,174
private void createNewFile(@NotNull final String description, @NotNull final RESTLocaleV1 locale, @NotNull final String filePath, final int index, @NotNull final FileList files, @NotNull final List<Integer> ids, @NotNull final List<String> failedFiles) { if (index >= files.getLength()) { ...
void function(@NotNull final String description, @NotNull final RESTLocaleV1 locale, @NotNull final String filePath, final int index, @NotNull final FileList files, @NotNull final List<Integer> ids, @NotNull final List<String> failedFiles) { if (index >= files.getLength()) { final StringBuilder idsQuery = new StringBui...
/** * A methods to recursively load a file from the disk, add it to a new image, and upload the image. * * @param description The common description to be added to each image * @param locale The image locale * @param index The index of the file we are uploading * @param files ...
A methods to recursively load a file from the disk, add it to a new image, and upload the image
createNewFile
{ "repo_name": "pressgang-ccms/PressGangCCMSUI", "path": "src/main/java/org/jboss/pressgang/ccms/ui/client/local/mvp/presenter/file/FilesFilteredResultsAndDetailsPresenter.java", "license": "gpl-3.0", "size": 53034 }
[ "java.util.List", "org.jboss.pressgang.ccms.rest.v1.entities.RESTLocaleV1", "org.jboss.pressgang.ccms.ui.client.local.constants.Constants", "org.jboss.pressgang.ccms.ui.client.local.mvp.events.viewevents.FilesFilteredResultsAndFileViewEvent", "org.jboss.pressgang.ccms.ui.client.local.mvp.view.common.AlertBo...
import java.util.List; import org.jboss.pressgang.ccms.rest.v1.entities.RESTLocaleV1; import org.jboss.pressgang.ccms.ui.client.local.constants.Constants; import org.jboss.pressgang.ccms.ui.client.local.mvp.events.viewevents.FilesFilteredResultsAndFileViewEvent; import org.jboss.pressgang.ccms.ui.client.local.mvp.view....
import java.util.*; import org.jboss.pressgang.ccms.rest.v1.entities.*; import org.jboss.pressgang.ccms.ui.client.local.constants.*; import org.jboss.pressgang.ccms.ui.client.local.mvp.events.viewevents.*; import org.jboss.pressgang.ccms.ui.client.local.mvp.view.common.*; import org.jboss.pressgang.ccms.ui.client.local...
[ "java.util", "org.jboss.pressgang", "org.jetbrains.annotations", "org.vectomatic.file" ]
java.util; org.jboss.pressgang; org.jetbrains.annotations; org.vectomatic.file;
1,571,438
private void checkForPaginationSupport(Condition condition) throws UserStoreException, BadRequestException { List<ExpressionCondition> expressionConditions = new ArrayList<>(); getExpressionConditions(condition, expressionConditions); Boolean hasBothIdentityClaimAndDefaultClaims = ...
void function(Condition condition) throws UserStoreException, BadRequestException { List<ExpressionCondition> expressionConditions = new ArrayList<>(); getExpressionConditions(condition, expressionConditions); Boolean hasBothIdentityClaimAndDefaultClaims = hasBothIdentityClaimAndDefaultClaims(expressionConditions); Boo...
/** * Check whether the pagination support is enabled for filter requests that have both identity and default claims. * * @param condition Condition object. * @return true if contains identity claims, false otherwise. */
Check whether the pagination support is enabled for filter requests that have both identity and default claims
checkForPaginationSupport
{ "repo_name": "wso2-extensions/identity-inbound-provisioning-scim2", "path": "components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/impl/SCIMUserManager.java", "license": "apache-2.0", "size": 296414 }
[ "java.util.ArrayList", "java.util.List", "org.wso2.carbon.identity.core.util.IdentityUtil", "org.wso2.carbon.identity.scim2.common.utils.SCIMCommonConstants", "org.wso2.carbon.user.api.UserStoreException", "org.wso2.carbon.user.core.model.Condition", "org.wso2.carbon.user.core.model.ExpressionCondition"...
import java.util.ArrayList; import java.util.List; import org.wso2.carbon.identity.core.util.IdentityUtil; import org.wso2.carbon.identity.scim2.common.utils.SCIMCommonConstants; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.core.model.Condition; import org.wso2.carbon.user.core.model....
import java.util.*; import org.wso2.carbon.identity.core.util.*; import org.wso2.carbon.identity.scim2.common.utils.*; import org.wso2.carbon.user.api.*; import org.wso2.carbon.user.core.model.*; import org.wso2.charon3.core.exceptions.*;
[ "java.util", "org.wso2.carbon", "org.wso2.charon3" ]
java.util; org.wso2.carbon; org.wso2.charon3;
1,068,201
public EList<Widget> renderWidget(Widget w, StringBuilder sb) throws RenderException;
EList<Widget> function(Widget w, StringBuilder sb) throws RenderException;
/** * Produces HTML code for a given widget and writes it to a string builder. * * @param w the widget to produce HTML code for * @param sb the string builder to append the HTML code to * @return a list of widgets that need to be rendered as children of the widget; the HTML code in sb should co...
Produces HTML code for a given widget and writes it to a string builder
renderWidget
{ "repo_name": "CrackerStealth/smarthome", "path": "extensions/ui/org.eclipse.smarthome.ui.basic/src/main/java/org/eclipse/smarthome/ui/basic/render/WidgetRenderer.java", "license": "epl-1.0", "size": 1724 }
[ "org.eclipse.emf.common.util.EList", "org.eclipse.smarthome.model.sitemap.Widget" ]
import org.eclipse.emf.common.util.EList; import org.eclipse.smarthome.model.sitemap.Widget;
import org.eclipse.emf.common.util.*; import org.eclipse.smarthome.model.sitemap.*;
[ "org.eclipse.emf", "org.eclipse.smarthome" ]
org.eclipse.emf; org.eclipse.smarthome;
2,590,716
public void setupListeners(MapBean map) { logger.fine("seting up listeners"); addProjectionListener(map); map.addProjectionListener(this); }
void function(MapBean map) { logger.fine(STR); addProjectionListener(map); map.addProjectionListener(this); }
/** * Convenience function for setting up listeners */
Convenience function for setting up listeners
setupListeners
{ "repo_name": "d2fn/passage", "path": "src/main/java/com/bbn/openmap/gui/menu/ProjectionMenu.java", "license": "mit", "size": 8119 }
[ "com.bbn.openmap.MapBean" ]
import com.bbn.openmap.MapBean;
import com.bbn.openmap.*;
[ "com.bbn.openmap" ]
com.bbn.openmap;
1,348,402
private URL getResultImagePath( PrintMap printMap, String type ) throws MalformedURLException { String templateName = printMap.getTemplate(); String fileName = type + "_" + templateName + "_" + printMap.getId() + this.FORMAT; PrintMapParam printMapParam = th...
URL function( PrintMap printMap, String type ) throws MalformedURLException { String templateName = printMap.getTemplate(); String fileName = type + "_" + templateName + "_" + printMap.getId() + this.FORMAT; PrintMapParam printMapParam = this.configuration.getDeegreeParams().getPrintMapParam(); String path = printMapPa...
/** * Retrieve the result map image file path for the current request. * * @param printMap * @param type * @return URL * @throws MalformedURLException */
Retrieve the result map image file path for the current request
getResultImagePath
{ "repo_name": "lat-lon/deegree2-base", "path": "deegree2-core/src/main/java/org/deegree/ogcwebservices/wmps/PrintMapHandler.java", "license": "lgpl-2.1", "size": 53232 }
[ "java.net.MalformedURLException", "org.deegree.ogcwebservices.wmps.configuration.PrintMapParam", "org.deegree.ogcwebservices.wmps.operation.PrintMap" ]
import java.net.MalformedURLException; import org.deegree.ogcwebservices.wmps.configuration.PrintMapParam; import org.deegree.ogcwebservices.wmps.operation.PrintMap;
import java.net.*; import org.deegree.ogcwebservices.wmps.configuration.*; import org.deegree.ogcwebservices.wmps.operation.*;
[ "java.net", "org.deegree.ogcwebservices" ]
java.net; org.deegree.ogcwebservices;
1,400,099
private boolean shouldDetectWithPeers(long now, PeerNode[] peers, PeerNode[] conns, FreenetInetAddress[] nodeAddrs) { boolean detect = false; // If we have no connections, and several disconnected but enabled // peers, then run a detection. int realConnections = 0; int realDisconnected = 0; int...
boolean function(long now, PeerNode[] peers, PeerNode[] conns, FreenetInetAddress[] nodeAddrs) { boolean detect = false; int realConnections = 0; int realDisconnected = 0; int recentlyConnected = 0; if(logMINOR) Logger.minor(this, STR+peers.length+STR+conns.length+STR); for(int i=0;i<peers.length;i++) { PeerNode p = pe...
/** * Given that we have some peers, should we run the detection plugins? * @param now The time at the beginning of the calling method. * @param peers The node's peers. * @param conns The node's connected peers. * @return True if we should run a detection. */
Given that we have some peers, should we run the detection plugins
shouldDetectWithPeers
{ "repo_name": "spencerjackson/fred-staging", "path": "src/freenet/node/IPDetectorPluginManager.java", "license": "gpl-2.0", "size": 33387 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
286,012
public boolean configure(Repository repository);
boolean function(Repository repository);
/** * Configures given repository with the values entered into the dialog. * * @return true if configuration is ok */
Configures given repository with the values entered into the dialog
configure
{ "repo_name": "brtonnies/rapidminer-studio", "path": "src/main/java/com/rapidminer/repository/gui/RepositoryConfigurationPanel.java", "license": "agpl-3.0", "size": 2276 }
[ "com.rapidminer.repository.Repository" ]
import com.rapidminer.repository.Repository;
import com.rapidminer.repository.*;
[ "com.rapidminer.repository" ]
com.rapidminer.repository;
1,646,755
public static NetworkDelay random(Random random) { return random(random, DEFAULT_DELAY_MIN, DEFAULT_DELAY_MAX); }
static NetworkDelay function(Random random) { return random(random, DEFAULT_DELAY_MIN, DEFAULT_DELAY_MAX); }
/** * Delays requests by a random but fixed time value between {@link #DEFAULT_DELAY_MIN} and {@link #DEFAULT_DELAY_MAX}. * * @param random instance to use for randomization of delay */
Delays requests by a random but fixed time value between <code>#DEFAULT_DELAY_MIN</code> and <code>#DEFAULT_DELAY_MAX</code>
random
{ "repo_name": "girirajsharma/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/disruption/NetworkDisruption.java", "license": "apache-2.0", "size": 17184 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
472,527
@ServiceMethod(returns = ReturnType.SINGLE) private PollerFlux<PollResult<Void>, Void> beginDeleteAsync( String deviceName, String name, String resourceGroupName) { Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(deviceName, name, resourceGroupName); return this ...
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<Void>, Void> function( String deviceName, String name, String resourceGroupName) { Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(deviceName, name, resourceGroupName); return this .client .<Void, Void>getLroResult(mono, this.client.getHt...
/** * Deletes the trigger on the gateway device. * * @param deviceName The device name. * @param name The trigger name. * @param resourceGroupName The resource group name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown...
Deletes the trigger on the gateway device
beginDeleteAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/TriggersClientImpl.java", "license": "mit", "size": 52188 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.PollerFlux", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
1,750,577
protected List<String> getJsonFiles(File configDir) { List<String> jsonFiles = new ArrayList<>(); if (!configDir.exists() || !configDir.canRead()) { log.error("csh configDir doesn't exist: " + configDir); //$NON-NLS-1$ return jsonFiles; } File[] configFiles ...
List<String> function(File configDir) { List<String> jsonFiles = new ArrayList<>(); if (!configDir.exists() !configDir.canRead()) { log.error(STR + configDir); return jsonFiles; } File[] configFiles = configDir.listFiles(); if (configFiles != null) { for (File configFile : configFiles) { if (configFile.isFile() && conf...
/** * Return sorted list of names of the json config files in the config dir. * * @param configDir directory to search * @return sorted list of file names */
Return sorted list of names of the json config files in the config dir
getJsonFiles
{ "repo_name": "OpenUniversity/ovirt-engine", "path": "backend/manager/modules/docs/src/main/java/org/ovirt/engine/docs/utils/servlet/ContextSensitiveHelpMappingServlet.java", "license": "apache-2.0", "size": 9456 }
[ "java.io.File", "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,184,897
IRepositoryInfoPrx svc = root.getSession().getRepositoryInfoService(); assertTrue(svc.getFreeSpaceInKilobytes() > 0); }
IRepositoryInfoPrx svc = root.getSession().getRepositoryInfoService(); assertTrue(svc.getFreeSpaceInKilobytes() > 0); }
/** * Tests the <code>getFreeSpaceInKilobytes</code> method. * * @throws Exception * Thrown if an error occurred. */
Tests the <code>getFreeSpaceInKilobytes</code> method
testFreeSpace
{ "repo_name": "ximenesuk/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/RepositoryServiceTest.java", "license": "gpl-2.0", "size": 1987 }
[ "org.testng.AssertJUnit" ]
import org.testng.AssertJUnit;
import org.testng.*;
[ "org.testng" ]
org.testng;
418,298
protected void closeJobManagerConnection(JobID jobId, Exception cause) { JobManagerRegistration jobManagerRegistration = jobManagerRegistrations.remove(jobId); if (jobManagerRegistration != null) { final ResourceID jobManagerResourceId = jobManagerRegistration.getJobManagerResourceID(); final JobMasterGat...
void function(JobID jobId, Exception cause) { JobManagerRegistration jobManagerRegistration = jobManagerRegistrations.remove(jobId); if (jobManagerRegistration != null) { final ResourceID jobManagerResourceId = jobManagerRegistration.getJobManagerResourceID(); final JobMasterGateway jobMasterGateway = jobManagerRegistr...
/** * This method should be called by the framework once it detects that a currently registered * job manager has failed. * * @param jobId identifying the job whose leader shall be disconnected. * @param cause The exception which cause the JobManager failed. */
This method should be called by the framework once it detects that a currently registered job manager has failed
closeJobManagerConnection
{ "repo_name": "zohar-mizrahi/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java", "license": "apache-2.0", "size": 39192 }
[ "org.apache.flink.api.common.JobID", "org.apache.flink.runtime.clusterframework.types.ResourceID", "org.apache.flink.runtime.jobmaster.JobMasterGateway", "org.apache.flink.runtime.resourcemanager.registration.JobManagerRegistration" ]
import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.runtime.jobmaster.JobMasterGateway; import org.apache.flink.runtime.resourcemanager.registration.JobManagerRegistration;
import org.apache.flink.api.common.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.jobmaster.*; import org.apache.flink.runtime.resourcemanager.registration.*;
[ "org.apache.flink" ]
org.apache.flink;
1,883,503
public void showPopup(Point p) { JPopupMenu menu = getPopup(new Point(p)); if (menu != null) { final int xAdjust = 5; // ensure menu doesn't appear directly under pointer p.translate(getX(), getY()); getPlayPen().zoomPoint(p); menu.show(getPlayPen(), p.x...
void function(Point p) { JPopupMenu menu = getPopup(new Point(p)); if (menu != null) { final int xAdjust = 5; p.translate(getX(), getY()); getPlayPen().zoomPoint(p); menu.show(getPlayPen(), p.x + xAdjust, p.y); } }
/** * Shows the component's popup menu on the PlayPen that owns this component * because it doesn't work to show it on this component, which is not really * part of the swing hierarchy. Only executed if the component has a popup * menu, see {@link #getPopup(Point)}. * * @param p * ...
Shows the component's popup menu on the PlayPen that owns this component because it doesn't work to show it on this component, which is not really part of the swing hierarchy. Only executed if the component has a popup menu, see <code>#getPopup(Point)</code>
showPopup
{ "repo_name": "SQLPower/power-architect", "path": "src/main/java/ca/sqlpower/architect/swingui/PlayPenComponent.java", "license": "gpl-3.0", "size": 25368 }
[ "java.awt.Point", "javax.swing.JPopupMenu" ]
import java.awt.Point; import javax.swing.JPopupMenu;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
824,213
private AbstractFile addLocalFile(CaseDbTransaction trans, SpecialDirectory parentDirectory, java.io.File localFile, TskData.EncodingType encodingType, FileAddProgressUpdater progressUpdater) throws TskCoreException { if (localFile.isDirectory()) { LocalDirectory localDi...
AbstractFile function(CaseDbTransaction trans, SpecialDirectory parentDirectory, java.io.File localFile, TskData.EncodingType encodingType, FileAddProgressUpdater progressUpdater) throws TskCoreException { if (localFile.isDirectory()) { LocalDirectory localDirectory = caseDb.addLocalDirectory(parentDirectory.getId(), l...
/** * Adds a file or directory of logical/local files data source to the case * database, recursively adding the contents of directories. * * @param trans A case database transaction. * @param parentDirectory The root virtual directory of the data source or * ...
Adds a file or directory of logical/local files data source to the case database, recursively adding the contents of directories
addLocalFile
{ "repo_name": "eugene7646/autopsy", "path": "Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java", "license": "apache-2.0", "size": 35611 }
[ "org.sleuthkit.datamodel.AbstractFile", "org.sleuthkit.datamodel.LocalDirectory", "org.sleuthkit.datamodel.SleuthkitCase", "org.sleuthkit.datamodel.SpecialDirectory", "org.sleuthkit.datamodel.TskCoreException", "org.sleuthkit.datamodel.TskData" ]
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.LocalDirectory; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.SpecialDirectory; import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.TskData;
import org.sleuthkit.datamodel.*;
[ "org.sleuthkit.datamodel" ]
org.sleuthkit.datamodel;
622,364
private static Document loadDocument(Resource xmlFile) throws SAXException, IOException { DOMParser parser = new DOMParser(); InputStream is=null; try { is = IOUtil.toBufferedInputStream(xmlFile.getInputStream()); InputSource source = new InputSource(is); parser....
static Document function(Resource xmlFile) throws SAXException, IOException { DOMParser parser = new DOMParser(); InputStream is=null; try { is = IOUtil.toBufferedInputStream(xmlFile.getInputStream()); InputSource source = new InputSource(is); parser.parse(source); } finally { IOUtil.closeEL(is); } return parser.getDoc...
/** * load XML Document from XML File * @param xmlFile XML File to read * @return returns the Document * @throws SAXException * @throws IOException */
load XML Document from XML File
loadDocument
{ "repo_name": "lucee/unoffical-Lucee-no-jre", "path": "source/java/core/src/lucee/runtime/config/XMLConfigAdmin.java", "license": "lgpl-2.1", "size": 224955 }
[ "java.io.IOException", "java.io.InputStream", "org.apache.xerces.parsers.DOMParser", "org.w3c.dom.Document", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.io.InputStream; import org.apache.xerces.parsers.DOMParser; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import org.apache.xerces.parsers.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "org.apache.xerces", "org.w3c.dom", "org.xml.sax" ]
java.io; org.apache.xerces; org.w3c.dom; org.xml.sax;
1,361,021
public static void text(double x, double y, String s) { offscreen.setFont(font); FontMetrics metrics = offscreen.getFontMetrics(); double xs = scaleX(x); double ys = scaleY(y); int ws = metrics.stringWidth(s); int hs = metrics.getDescent(); offscreen.drawString(s, (float) (xs - ws / 2.0), (flo...
static void function(double x, double y, String s) { offscreen.setFont(font); FontMetrics metrics = offscreen.getFontMetrics(); double xs = scaleX(x); double ys = scaleY(y); int ws = metrics.stringWidth(s); int hs = metrics.getDescent(); offscreen.drawString(s, (float) (xs - ws / 2.0), (float) (ys + hs)); draw(); }
/** * Write the given text string in the current font, centered on (x, y). * * @param x * the center x-coordinate of the text * @param y * the center y-coordinate of the text * @param s * the text */
Write the given text string in the current font, centered on (x, y)
text
{ "repo_name": "hosny1993/vogella", "path": "de.vogella.algorithms.riddles/src/edu/princeton/draw/StdDraw.java", "license": "epl-1.0", "size": 32148 }
[ "java.awt.FontMetrics" ]
import java.awt.FontMetrics;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,831,001
public MultilayerPerceptron setBiases(int layerIdx, Vector bias) { biases(layerIdx).assign(bias); return this; }
MultilayerPerceptron function(int layerIdx, Vector bias) { biases(layerIdx).assign(bias); return this; }
/** * Sets the biases of layer with a given index. * * @param layerIdx Layer index. * @param bias New values for biases. * @return This MLP with updated biases. */
Sets the biases of layer with a given index
setBiases
{ "repo_name": "ilantukh/ignite", "path": "modules/ml/src/main/java/org/apache/ignite/ml/nn/MultilayerPerceptron.java", "license": "apache-2.0", "size": 20059 }
[ "org.apache.ignite.ml.math.primitives.vector.Vector" ]
import org.apache.ignite.ml.math.primitives.vector.Vector;
import org.apache.ignite.ml.math.primitives.vector.*;
[ "org.apache.ignite" ]
org.apache.ignite;
408,863
static void zipDirectory( File sourceDirectory, File zipFile) throws IOException { checkNotNull(sourceDirectory); checkNotNull(zipFile); checkArgument( sourceDirectory.isDirectory(), "%s is not a valid directory", sourceDirectory.getAbsolutePath()); checkArgument( ...
static void zipDirectory( File sourceDirectory, File zipFile) throws IOException { checkNotNull(sourceDirectory); checkNotNull(zipFile); checkArgument( sourceDirectory.isDirectory(), STR, sourceDirectory.getAbsolutePath()); checkArgument( !zipFile.exists(), STR, zipFile.getAbsolutePath()); Closer closer = Closer.create...
/** * Zips an entire directory specified by the path. * * @param sourceDirectory the directory to read from. This directory and all * subdirectories will be added to the zip-file. The path within the zip * file is relative to the directory given as parameter, not absolute. * @param zipFile the...
Zips an entire directory specified by the path
zipDirectory
{ "repo_name": "staslev/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/util/ZipFiles.java", "license": "apache-2.0", "size": 10758 }
[ "com.google.common.base.Preconditions", "com.google.common.io.Closer", "java.io.BufferedOutputStream", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStream" ]
import com.google.common.base.Preconditions; import com.google.common.io.Closer; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;
import com.google.common.base.*; import com.google.common.io.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
2,030,052
@Override public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); IntegerResponse info = (IntegerResponse) o; info.setResult(dataIn.readInt()); }
void function(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); IntegerResponse info = (IntegerResponse) o; info.setResult(dataIn.readInt()); }
/** * Un-marshal an object instance from the data input stream * * @param o * the object to un-marshal * @param dataIn * the data input stream to build the object from * @throws IOException */
Un-marshal an object instance from the data input stream
tightUnmarshal
{ "repo_name": "apache/activemq-openwire", "path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v7/IntegerResponseMarshaller.java", "license": "apache-2.0", "size": 3926 }
[ "java.io.DataInput", "java.io.IOException", "org.apache.activemq.openwire.codec.BooleanStream", "org.apache.activemq.openwire.codec.OpenWireFormat", "org.apache.activemq.openwire.commands.IntegerResponse" ]
import java.io.DataInput; import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.IntegerResponse;
import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*;
[ "java.io", "org.apache.activemq" ]
java.io; org.apache.activemq;
2,700,399
@Test public void test( @ArquillianResource() @OperateOnDeployment(DEPLOYMENT_1) URL baseURL1 ) throws Exception { EJBClientContext BKP = null; try { final EJBClientContext.Builder ejbClientBuilder = new EJBClientContext.Builder(); ejbClientBuilder.addTran...
void function( @ArquillianResource() @OperateOnDeployment(DEPLOYMENT_1) URL baseURL1 ) throws Exception { EJBClientContext BKP = null; try { final EJBClientContext.Builder ejbClientBuilder = new EJBClientContext.Builder(); ejbClientBuilder.addTransportProvider(new RemoteTransportProvider()); final EJBClientConnection.B...
/** * Instructs the ClusterNodeSelector on which node to call before each request and that checks that the response * comes from that very node; */
Instructs the ClusterNodeSelector on which node to call before each request and that checks that the response comes from that very node
test
{ "repo_name": "xasx/wildfly", "path": "testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/ejb/remote/ClientClusterNodeSelectorTestCase.java", "license": "lgpl-2.1", "size": 8612 }
[ "java.net.URI", "java.util.Date", "java.util.Properties", "javax.naming.Context", "javax.naming.InitialContext", "org.jboss.arquillian.container.test.api.OperateOnDeployment", "org.jboss.arquillian.test.api.ArquillianResource", "org.jboss.as.test.clustering.cluster.ejb.remote.bean.Heartbeat", "org.j...
import java.net.URI; import java.util.Date; import java.util.Properties; import javax.naming.Context; import javax.naming.InitialContext; import org.jboss.arquillian.container.test.api.OperateOnDeployment; import org.jboss.arquillian.test.api.ArquillianResource; import org.jboss.as.test.clustering.cluster.ejb.remote.be...
import java.net.*; import java.util.*; import javax.naming.*; import org.jboss.arquillian.container.test.api.*; import org.jboss.arquillian.test.api.*; import org.jboss.as.test.clustering.cluster.ejb.remote.bean.*; import org.jboss.ejb.client.*; import org.jboss.ejb.protocol.remote.*; import org.wildfly.naming.client.*...
[ "java.net", "java.util", "javax.naming", "org.jboss.arquillian", "org.jboss.as", "org.jboss.ejb", "org.wildfly.naming" ]
java.net; java.util; javax.naming; org.jboss.arquillian; org.jboss.as; org.jboss.ejb; org.wildfly.naming;
1,660,464
@GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Path("/{id}/status/history") @PreAuthorize("hasAnyRole('ROLE_MONITOR', 'ROLE_DFM', 'ROLE_ADMIN')") @TypeHint(StatusHistoryEntity.class) public Response getProcessorStatusHistory(@QueryParam(CLIENT_ID) @DefaultValue(StringUt...
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Path(STR) @PreAuthorize(STR) @TypeHint(StatusHistoryEntity.class) Response function(@QueryParam(CLIENT_ID) @DefaultValue(StringUtils.EMPTY) ClientIdParameter clientId, @PathParam("id") String id) { if (properties.isClusterManager()) { throw new Illegal...
/** * Retrieves the specified processor status history. * * @param clientId Optional client id. If the client id is not specified, a * new one will be generated. This value (whether specified or generated) is * included in the response. * @param id The id of the processor history to retrie...
Retrieves the specified processor status history
getProcessorStatusHistory
{ "repo_name": "rdblue/incubator-nifi", "path": "nar-bundles/framework-bundle/framework/web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessorResource.java", "license": "apache-2.0", "size": 29587 }
[ "javax.ws.rs.DefaultValue", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.apache.commons.lang3.StringUtils", "org.apache.nifi.web.IllegalClusterResourceRequestException", "org.apache.ni...
import javax.ws.rs.DefaultValue; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.commons.lang3.StringUtils; import org.apache.nifi.web.IllegalClusterResourceRequestEx...
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.commons.lang3.*; import org.apache.nifi.web.*; import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.dto.status.*; import org.apache.nifi.web.api.entity.*; import org.apache.nifi.web.api.request.*; import org.codehaus.enunciate.jaxrs.*; i...
[ "javax.ws", "org.apache.commons", "org.apache.nifi", "org.codehaus.enunciate", "org.springframework.security" ]
javax.ws; org.apache.commons; org.apache.nifi; org.codehaus.enunciate; org.springframework.security;
755,842
private static void processAnnotation(boolean key, QuerySqlField sqlAnn, QueryTextField txtAnn, Class<?> cls, Class<?> curCls, Class<?> fldCls, QueryEntityClassProperty prop, QueryEntityTypeDescriptor desc) { if (sqlAnn != null) { processAnnotationsInClass(key, fldCls, desc, prop); ...
static void function(boolean key, QuerySqlField sqlAnn, QueryTextField txtAnn, Class<?> cls, Class<?> curCls, Class<?> fldCls, QueryEntityClassProperty prop, QueryEntityTypeDescriptor desc) { if (sqlAnn != null) { processAnnotationsInClass(key, fldCls, desc, prop); if (!sqlAnn.name().isEmpty()) prop.alias(sqlAnn.name()...
/** * Processes annotation at field or method. * * @param key If given class relates to key. * @param sqlAnn SQL annotation, can be {@code null}. * @param txtAnn H2 text annotation, can be {@code null}. * @param cls Entity class. * @param curCls Current entity class. * @param fld...
Processes annotation at field or method
processAnnotation
{ "repo_name": "amirakhmedov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/cache/QueryEntity.java", "license": "apache-2.0", "size": 31044 }
[ "javax.cache.CacheException", "org.apache.ignite.cache.query.annotations.QuerySqlField", "org.apache.ignite.cache.query.annotations.QueryTextField", "org.apache.ignite.internal.processors.cache.query.QueryEntityClassProperty", "org.apache.ignite.internal.processors.cache.query.QueryEntityTypeDescriptor", ...
import javax.cache.CacheException; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.cache.query.annotations.QueryTextField; import org.apache.ignite.internal.processors.cache.query.QueryEntityClassProperty; import org.apache.ignite.internal.processors.cache.query.QueryEntityTypeD...
import javax.cache.*; import org.apache.ignite.cache.query.annotations.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.util.typedef.*;
[ "javax.cache", "org.apache.ignite" ]
javax.cache; org.apache.ignite;
2,784,656
EOperation getproductionSchema2petrinetDisjunctiveNode_r3__MoveElement__TGGNode_TGGNode_TGGNode();
EOperation getproductionSchema2petrinetDisjunctiveNode_r3__MoveElement__TGGNode_TGGNode_TGGNode();
/** * Returns the meta object for the '{@link de.mdelab.mltgg.productionschema2petrinet.generated.productionSchema2petrinetDisjunctiveNode_r3#moveElement(de.mdelab.mltgg.mote2.TGGNode, de.mdelab.mltgg.mote2.TGGNode, de.mdelab.mltgg.mote2.TGGNode) <em>Move Element</em>}' operation. * <!-- begin-user-doc --> * <!--...
Returns the meta object for the '<code>de.mdelab.mltgg.productionschema2petrinet.generated.productionSchema2petrinetDisjunctiveNode_r3#moveElement(de.mdelab.mltgg.mote2.TGGNode, de.mdelab.mltgg.mote2.TGGNode, de.mdelab.mltgg.mote2.TGGNode) Move Element</code>' operation.
getproductionSchema2petrinetDisjunctiveNode_r3__MoveElement__TGGNode_TGGNode_TGGNode
{ "repo_name": "Somae/mdsd-factory-project", "path": "transformation/de.mdelab.languages.productionschema2petrinet/src-gen/de/mdelab/mltgg/productionschema2petrinet/generated/GeneratedPackage.java", "license": "gpl-3.0", "size": 283384 }
[ "org.eclipse.emf.ecore.EOperation" ]
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,551,824
public static Method getMethod(Object base, Object property, Class[] paramTypes) throws MethodNotFoundException { if (base == null || property == null) { throw new MethodNotFoundException(MessageFactory.get( "error.method.notfound", base, property, ...
static Method function(Object base, Object property, Class[] paramTypes) throws MethodNotFoundException { if (base == null property == null) { throw new MethodNotFoundException(MessageFactory.get( STR, base, property, paramString(paramTypes))); } String methodName = (property instanceof String) ? (String) property : pr...
/** * Returns a method based on the criteria * @param base the object that owns the method * @param property the name of the method * @param paramTypes the parameter types to use * @return the method specified * @throws MethodNotFoundException */
Returns a method based on the criteria
getMethod
{ "repo_name": "benothman/jboss-web-nio2", "path": "java/org/apache/el/util/ReflectionUtil.java", "license": "lgpl-3.0", "size": 6153 }
[ "java.lang.reflect.Method", "javax.el.MethodNotFoundException" ]
import java.lang.reflect.Method; import javax.el.MethodNotFoundException;
import java.lang.reflect.*; import javax.el.*;
[ "java.lang", "javax.el" ]
java.lang; javax.el;
2,386,068
@Test public void testExplainStmt() throws SQLException { Statement stmt = con.createStatement(); ResultSet res = stmt.executeQuery( "explain select c1, c2, c3, c4, c5 as a, c6, c7, c8, c9, c10, c11, c12, " + "c1*2, sentences(null, null, null) as b, c23 from " + dataTypeTableName + " lim...
void function() throws SQLException { Statement stmt = con.createStatement(); ResultSet res = stmt.executeQuery( STR + STR + dataTypeTableName + STR); ResultSetMetaData md = res.getMetaData(); assertEquals(md.getColumnCount(), 1); assertEquals(md.getColumnLabel(1), EXPL_COLUMN_NAME); assertTrue(STR, res.next()); stmt.c...
/** * verify 'explain ...' resultset * @throws SQLException */
verify 'explain ...' resultset
testExplainStmt
{ "repo_name": "b-slim/hive", "path": "itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java", "license": "apache-2.0", "size": 119749 }
[ "java.sql.ResultSet", "java.sql.ResultSetMetaData", "java.sql.SQLException", "java.sql.Statement", "org.junit.Assert" ]
import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import org.junit.Assert;
import java.sql.*; import org.junit.*;
[ "java.sql", "org.junit" ]
java.sql; org.junit;
1,856,011
public String getCatalog() throws SQLException { checkIfClosed(); // we do not have support for Catalog, just return null as // the JDBC specs mentions then. return null; }
String function() throws SQLException { checkIfClosed(); return null; }
/** * Return the Connection's current catalog name. * * @return the current catalog name or null * @exception SQLException if a database-access error occurs. */
Return the Connection's current catalog name
getCatalog
{ "repo_name": "trejkaz/derby", "path": "java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "license": "apache-2.0", "size": 142130 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,463,623
public void testUpdateChildReference() { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); Account dduck = new AccountWithPassword("dduck", "secret", null); Person daffyDu...
void function() { PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); Account dduck = new AccountWithPassword("dduck", STR, null); Person daffyDuck = new Person("Daffy", "Duck", STR, dduck, null, getDepartment(pm)); dduck.setPerson(daffyDuck); pm.makePersiste...
/** * Update the child reference of the parent object. */
Update the child reference of the parent object
testUpdateChildReference
{ "repo_name": "datanucleus/tests", "path": "jdo/ldap/src/test/org/datanucleus/tests/directory/hierarchical_at_child_bidir/OneOneTest.java", "license": "apache-2.0", "size": 43068 }
[ "javax.jdo.PersistenceManager", "javax.jdo.Transaction" ]
import javax.jdo.PersistenceManager; import javax.jdo.Transaction;
import javax.jdo.*;
[ "javax.jdo" ]
javax.jdo;
2,546,977
public TPersonBasketBean getBean() { return getBean(new IdentityMap()); }
TPersonBasketBean function() { return getBean(new IdentityMap()); }
/** * Creates a TPersonBasketBean with the contents of this object * This also creates beans for cached related objects, if they exist * @return a TPersonBasketBean with the contents of this object */
Creates a TPersonBasketBean with the contents of this object This also creates beans for cached related objects, if they exist
getBean
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTPersonBasket.java", "license": "gpl-3.0", "size": 36701 }
[ "com.aurel.track.beans.TPersonBasketBean", "org.apache.commons.collections.map.IdentityMap" ]
import com.aurel.track.beans.TPersonBasketBean; import org.apache.commons.collections.map.IdentityMap;
import com.aurel.track.beans.*; import org.apache.commons.collections.map.*;
[ "com.aurel.track", "org.apache.commons" ]
com.aurel.track; org.apache.commons;
1,794,191
EList<COREReuseConfiguration> getConfigurations();
EList<COREReuseConfiguration> getConfigurations();
/** * Returns the value of the '<em><b>Configurations</b></em>' containment reference list. * The list contents are of type {@link ca.mcgill.sel.core.COREReuseConfiguration}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Configurations</em>' containment reference list isn't clear...
Returns the value of the 'Configurations' containment reference list. The list contents are of type <code>ca.mcgill.sel.core.COREReuseConfiguration</code>. If the meaning of the 'Configurations' containment reference list isn't clear, there really should be more of a description here...
getConfigurations
{ "repo_name": "mschoettle/ecse429-fall15-project", "path": "ca.mcgill.sel.core/src/ca/mcgill/sel/core/COREReuse.java", "license": "gpl-2.0", "size": 3441 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,969,353
public static QDataSet angleDistribution( ) { ArrayDataSet rip= ArrayDataSet.maybeCopy( ripples( 30, 15 ) ); QDataSet angle= linspace( PI/30/2, PI-PI/30/2, 30 ); angle= Ops.putProperty( angle, QDataSet.UNITS, Units.radians ); QDataSet rad= linspace( 1, 5, 15 ); rip.putPropert...
static QDataSet function( ) { ArrayDataSet rip= ArrayDataSet.maybeCopy( ripples( 30, 15 ) ); QDataSet angle= linspace( PI/30/2, PI-PI/30/2, 30 ); angle= Ops.putProperty( angle, QDataSet.UNITS, Units.radians ); QDataSet rad= linspace( 1, 5, 15 ); rip.putProperty( QDataSet.DEPEND_0, angle ); rip.putProperty( QDataSet.DEP...
/** * return example angle distribution. * @return example angle distribution. */
return example angle distribution
angleDistribution
{ "repo_name": "autoplot/app", "path": "QDataSet/src/org/das2/qds/examples/Schemes.java", "license": "gpl-2.0", "size": 33083 }
[ "org.das2.datum.Units", "org.das2.qds.ArrayDataSet", "org.das2.qds.QDataSet", "org.das2.qds.ops.Ops" ]
import org.das2.datum.Units; import org.das2.qds.ArrayDataSet; import org.das2.qds.QDataSet; import org.das2.qds.ops.Ops;
import org.das2.datum.*; import org.das2.qds.*; import org.das2.qds.ops.*;
[ "org.das2.datum", "org.das2.qds" ]
org.das2.datum; org.das2.qds;
1,256,815
protected static void transformSocketToSSLSocket(MysqlIO mysqlIO) throws SQLException { SocketFactory sslFact = new StandardSSLSocketFactory(getSSLSocketFactoryDefaultOrConfigured(mysqlIO), mysqlIO.socketFactory, mysqlIO.mysqlConnection); try { mysqlIO.mysqlConnection = sslFact.connect(...
static void function(MysqlIO mysqlIO) throws SQLException { SocketFactory sslFact = new StandardSSLSocketFactory(getSSLSocketFactoryDefaultOrConfigured(mysqlIO), mysqlIO.socketFactory, mysqlIO.mysqlConnection); try { mysqlIO.mysqlConnection = sslFact.connect(mysqlIO.host, mysqlIO.port, null); List<String> allowedProtoc...
/** * Converts the socket being used in the given MysqlIO to an SSLSocket by * performing the SSL/TLS handshake. * * @param mysqlIO * the MysqlIO instance containing the socket to convert to an * SSLSocket. * * @throws CommunicationsException * ...
Converts the socket being used in the given MysqlIO to an SSLSocket by performing the SSL/TLS handshake
transformSocketToSSLSocket
{ "repo_name": "swankjesse/mysql-connector-j", "path": "src/com/mysql/jdbc/ExportControlled.java", "license": "gpl-2.0", "size": 19357 }
[ "java.io.BufferedInputStream", "java.io.BufferedOutputStream", "java.io.IOException", "java.net.Socket", "java.sql.SQLException", "java.util.ArrayList", "java.util.Arrays", "java.util.List", "javax.net.ssl.SSLSocket", "javax.net.ssl.SSLSocketFactory" ]
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.IOException; import java.net.Socket; import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory;
import java.io.*; import java.net.*; import java.sql.*; import java.util.*; import javax.net.ssl.*;
[ "java.io", "java.net", "java.sql", "java.util", "javax.net" ]
java.io; java.net; java.sql; java.util; javax.net;
628,090
@SuppressWarnings("unchecked") private void initComponents() { valueSpinner = new JSpinner(); nullCheckBox = new JCheckBox(); valueSpinner.setModel(this.idSpinnerModel); nullCheckBox.setText("null"); nullCheckBox.addActionListener((ActionEvent evt) -> { null...
@SuppressWarnings(STR) void function() { valueSpinner = new JSpinner(); nullCheckBox = new JCheckBox(); valueSpinner.setModel(this.idSpinnerModel); nullCheckBox.setText("null"); nullCheckBox.addActionListener((ActionEvent evt) -> { nullCheckBoxActionPerformed(evt); }); GroupLayout layout = new GroupLayout(this); this.s...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "krichter722/reflection-form-builder", "path": "src/main/java/de/richtercloud/reflection/form/builder/panels/NumberPanel.java", "license": "gpl-3.0", "size": 8074 }
[ "java.awt.event.ActionEvent", "javax.swing.GroupLayout", "javax.swing.JCheckBox", "javax.swing.JSpinner", "javax.swing.LayoutStyle" ]
import java.awt.event.ActionEvent; import javax.swing.GroupLayout; import javax.swing.JCheckBox; import javax.swing.JSpinner; import javax.swing.LayoutStyle;
import java.awt.event.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,782,946
public byte[] calculateDigest(URL method) { logger.debug("URL method: " + method); if (digest == null) { DigestAlgorithm digestAlgorithm = DigestAlgorithm.forXML(method.toString()); digest = new Digest(digestAlgorithm, calculateDigestInternal(digestAlgorithm)); } else { logger.debug("Ret...
byte[] function(URL method) { logger.debug(STR + method); if (digest == null) { DigestAlgorithm digestAlgorithm = DigestAlgorithm.forXML(method.toString()); digest = new Digest(digestAlgorithm, calculateDigestInternal(digestAlgorithm)); } else { logger.debug(STR); } return digest.getValue(); }
/** * Calculates digest for data file. If digest is already calculated returns it, otherwise calculates the digest. * <p>Supported uris for BDoc:</p> * <br>http://www.w3.org/2000/09/xmldsig#sha1 * <br>http://www.w3.org/2001/04/xmldsig-more#sha224 * <br>http://www.w3.org/2001/04/xmlenc#sha256 * <br>htt...
Calculates digest for data file. If digest is already calculated returns it, otherwise calculates the digest. Supported uris for BDoc: HREF HREF HREF HREF HREF In case of DDoc files the parameter is ignored and SHA1 hash is always returned
calculateDigest
{ "repo_name": "open-eid/digidoc4j", "path": "digidoc4j/src/main/java/org/digidoc4j/DataFile.java", "license": "lgpl-2.1", "size": 10131 }
[ "eu.europa.esig.dss.enumerations.DigestAlgorithm", "eu.europa.esig.dss.model.Digest" ]
import eu.europa.esig.dss.enumerations.DigestAlgorithm; import eu.europa.esig.dss.model.Digest;
import eu.europa.esig.dss.enumerations.*; import eu.europa.esig.dss.model.*;
[ "eu.europa.esig" ]
eu.europa.esig;
617,558
@SuppressWarnings("unchecked") protected void updateAggregate(Aggregate resultAggregate, String valueField, Set<EventKey> inputSubEventKeys, Map<EventKey, Aggregate> inputAggregatesRepo) { Map<String, Object> resultAggregateFieldToValue = (Map<String, Object>)resultAggregate.getAggregates().getF...
@SuppressWarnings(STR) void function(Aggregate resultAggregate, String valueField, Set<EventKey> inputSubEventKeys, Map<EventKey, Aggregate> inputAggregatesRepo) { Map<String, Object> resultAggregateFieldToValue = (Map<String, Object>)resultAggregate.getAggregates().getFieldObject(valueField); if (resultAggregateFieldT...
/** * update existed sub aggregate. * The sub aggregates which kept in composite aggregate as candidate could be changed. synchronize the value with * input aggregates. * * @param resultAggregate * @param valueField * @param inputSubEventKeys * @param inputAggregatesRepo */
update existed sub aggregate. The sub aggregates which kept in composite aggregate as candidate could be changed. synchronize the value with input aggregates
updateAggregate
{ "repo_name": "ananthc/apex-malhar", "path": "library/src/main/java/org/apache/apex/malhar/lib/dimensions/aggregator/AbstractTopBottomAggregator.java", "license": "apache-2.0", "size": 10109 }
[ "java.util.Map", "java.util.Set", "org.apache.apex.malhar.lib.dimensions.DimensionsEvent" ]
import java.util.Map; import java.util.Set; import org.apache.apex.malhar.lib.dimensions.DimensionsEvent;
import java.util.*; import org.apache.apex.malhar.lib.dimensions.*;
[ "java.util", "org.apache.apex" ]
java.util; org.apache.apex;
1,513,211
void addRunner(@Nonnull Runner runner);
void addRunner(@Nonnull Runner runner);
/** * The method creates special widget for current runner and adds it on history panel. * * @param runner * runner which need add */
The method creates special widget for current runner and adds it on history panel
addRunner
{ "repo_name": "Panthro/che-plugins", "path": "plugin-runner/che-plugin-runner-ext-runner/src/main/java/org/eclipse/che/ide/ext/runner/client/tabs/history/HistoryPanel.java", "license": "epl-1.0", "size": 1850 }
[ "javax.annotation.Nonnull", "org.eclipse.che.ide.ext.runner.client.models.Runner" ]
import javax.annotation.Nonnull; import org.eclipse.che.ide.ext.runner.client.models.Runner;
import javax.annotation.*; import org.eclipse.che.ide.ext.runner.client.models.*;
[ "javax.annotation", "org.eclipse.che" ]
javax.annotation; org.eclipse.che;
1,368,573
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); return true; default: return super.onOptionsItemSelected(item); } }
boolean function(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); return true; default: return super.onOptionsItemSelected(item); } }
/** * Listener for the backbutton of the action bar */
Listener for the backbutton of the action bar
onOptionsItemSelected
{ "repo_name": "netankit/KisiFinal", "path": "src/de/kisi/android/ui/PublicPlacesActivity.java", "license": "mit", "size": 7722 }
[ "android.view.MenuItem" ]
import android.view.MenuItem;
import android.view.*;
[ "android.view" ]
android.view;
1,901,035
protected void throwIfBytesAreNoImage(byte[] imageBytes) throws IOException { try (InputStream input = new ByteArrayInputStream(imageBytes)) { try { BufferedImage bufferedImage = ImageIO.read(input); bufferedImage.toString(); } catch (Exception ex) { throw new LoupException(HttpStatus.BAD_R...
void function(byte[] imageBytes) throws IOException { try (InputStream input = new ByteArrayInputStream(imageBytes)) { try { BufferedImage bufferedImage = ImageIO.read(input); bufferedImage.toString(); } catch (Exception ex) { throw new LoupException(HttpStatus.BAD_REQUEST, STR); } } }
/** * Throws if the given bytes do not contain an image.<br> * Does not protect against steganography . * * @param imageBytes * @throws IOException */
Throws if the given bytes do not contain an image. Does not protect against steganography
throwIfBytesAreNoImage
{ "repo_name": "Traubenfuchs/loup", "path": "loup-filemanager/src/main/java/at/loup/filemanager/services/ImageManager.java", "license": "apache-2.0", "size": 10212 }
[ "at.loup.commons.exceptions.LoupException", "java.awt.image.BufferedImage", "java.io.ByteArrayInputStream", "java.io.IOException", "java.io.InputStream", "javax.imageio.ImageIO", "org.springframework.http.HttpStatus" ]
import at.loup.commons.exceptions.LoupException; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import javax.imageio.ImageIO; import org.springframework.http.HttpStatus;
import at.loup.commons.exceptions.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; import org.springframework.http.*;
[ "at.loup.commons", "java.awt", "java.io", "javax.imageio", "org.springframework.http" ]
at.loup.commons; java.awt; java.io; javax.imageio; org.springframework.http;
235,297
@Test(expectedExceptions = { LDAPException.class }) public void testDecodeInvalidElementType() throws Exception { final ASN1Sequence s = new ASN1Sequence( LDAPMessage.PROTOCOL_OP_TYPE_INTERMEDIATE_RESPONSE, new ASN1OctetString((byte) 0x79)); IntermediateResponseProtocolOp.decod...
@Test(expectedExceptions = { LDAPException.class }) void function() throws Exception { final ASN1Sequence s = new ASN1Sequence( LDAPMessage.PROTOCOL_OP_TYPE_INTERMEDIATE_RESPONSE, new ASN1OctetString((byte) 0x79)); IntermediateResponseProtocolOp.decodeProtocolOp(s); }
/** * Tests the behavior when trying to decode an intermediate response with an * invalid element type. * * @throws Exception If an unexpected problem occurs. */
Tests the behavior when trying to decode an intermediate response with an invalid element type
testDecodeInvalidElementType
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/protocol/IntermediateResponseProtocolOpTestCase.java", "license": "gpl-2.0", "size": 6310 }
[ "com.unboundid.asn1.ASN1OctetString", "com.unboundid.asn1.ASN1Sequence", "com.unboundid.ldap.sdk.LDAPException", "org.testng.annotations.Test" ]
import com.unboundid.asn1.ASN1OctetString; import com.unboundid.asn1.ASN1Sequence; import com.unboundid.ldap.sdk.LDAPException; import org.testng.annotations.Test;
import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import org.testng.annotations.*;
[ "com.unboundid.asn1", "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.asn1; com.unboundid.ldap; org.testng.annotations;
2,196,004
public static String stripHTMLMedia(String s) { Matcher imgMatcher = imgPattern.matcher(s); return stripHTML(imgMatcher.replaceAll(" $1 ")); }
static String function(String s) { Matcher imgMatcher = imgPattern.matcher(s); return stripHTML(imgMatcher.replaceAll(STR)); }
/** * Strip HTML but keep media filenames */
Strip HTML but keep media filenames
stripHTMLMedia
{ "repo_name": "peervalhoegen/Anki-Android", "path": "AnkiDroid/src/main/java/com/ichi2/libanki/Utils.java", "license": "gpl-3.0", "size": 44830 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,676,807
@Test public void testInitExecutor() { final ExecutorService exec = Executors.newSingleThreadExecutor(); final CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<Integer>( new TestCallable(), exec); assertEquals("Executor not set", exec, init....
void function() { final ExecutorService exec = Executors.newSingleThreadExecutor(); final CallableBackgroundInitializer<Integer> init = new CallableBackgroundInitializer<Integer>( new TestCallable(), exec); assertEquals(STR, exec, init.getExternalExecutor()); }
/** * Tests whether the executor service is correctly passed to the super * class. */
Tests whether the executor service is correctly passed to the super class
testInitExecutor
{ "repo_name": "mureinik/commons-lang", "path": "src/test/java/org/apache/commons/lang3/concurrent/CallableBackgroundInitializerTest.java", "license": "apache-2.0", "size": 3371 }
[ "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors", "org.junit.Assert" ]
import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.junit.Assert;
import java.util.concurrent.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
57,190
@AtMostOnce void modifyCachePool(CachePoolInfo req) throws IOException;
void modifyCachePool(CachePoolInfo req) throws IOException;
/** * Modify an existing cache pool. * * @param req * The request to modify a cache pool. * @throws IOException * If the request could not be completed. */
Modify an existing cache pool
modifyCachePool
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 68207 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
597,860
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (TypePackage.Literals.ENUMERATION_TYPE_DEFINITION__LITERAL, ExpressionFactory.eIN...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (TypePackage.Literals.ENUMERATION_TYPE_DEFINITION__LITERAL, ExpressionFactory.eINSTANCE.createCharacterExpression())); newChildDescriptors.a...
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl.edit/src-gen/net/mlanoe/language/vhdl/type/provider/EnumerationTypeDefinitionItemProvider.java", "license": "gpl-3.0", "size": 4743 }
[ "java.util.Collection", "net.mlanoe.language.vhdl.expression.ExpressionFactory", "net.mlanoe.language.vhdl.type.TypePackage" ]
import java.util.Collection; import net.mlanoe.language.vhdl.expression.ExpressionFactory; import net.mlanoe.language.vhdl.type.TypePackage;
import java.util.*; import net.mlanoe.language.vhdl.expression.*; import net.mlanoe.language.vhdl.type.*;
[ "java.util", "net.mlanoe.language" ]
java.util; net.mlanoe.language;
2,099,150
LoopsData loopsData = context.getLoopsDataProvider().getLoopsData(graph); final EconomicSetNodeEventListener inputChanges = new EconomicSetNodeEventListener(EnumSet.of(NodeEvent.INPUT_CHANGED)); try (NodeEventScope s = graph.trackNodeEvents(inputChanges)) { for (LoopEx loop : loopsData.loops...
LoopsData loopsData = context.getLoopsDataProvider().getLoopsData(graph); final EconomicSetNodeEventListener inputChanges = new EconomicSetNodeEventListener(EnumSet.of(NodeEvent.INPUT_CHANGED)); try (NodeEventScope s = graph.trackNodeEvents(inputChanges)) { for (LoopEx loop : loopsData.loops()) { removeObsoleteProxiesF...
/** * Remove loop proxies that became obsolete over time, i.e., they proxy a value that already * flowed out of a loop and dominates the loop now. * * @param canonicalizer must not be {@code null}, will be applied incrementally to nodes whose * inputs changed */
Remove loop proxies that became obsolete over time, i.e., they proxy a value that already flowed out of a loop and dominates the loop now
removeObsoleteProxies
{ "repo_name": "smarr/Truffle", "path": "compiler/src/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/util/LoopUtility.java", "license": "gpl-2.0", "size": 3326 }
[ "java.util.EnumSet", "org.graalvm.compiler.graph.Graph", "org.graalvm.compiler.nodes.loop.LoopEx", "org.graalvm.compiler.nodes.loop.LoopsData" ]
import java.util.EnumSet; import org.graalvm.compiler.graph.Graph; import org.graalvm.compiler.nodes.loop.LoopEx; import org.graalvm.compiler.nodes.loop.LoopsData;
import java.util.*; import org.graalvm.compiler.graph.*; import org.graalvm.compiler.nodes.loop.*;
[ "java.util", "org.graalvm.compiler" ]
java.util; org.graalvm.compiler;
2,838,270
public ServiceFuture<VirtualNetworkPeeringInner> getAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, final ServiceCallback<VirtualNetworkPeeringInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualNetwor...
ServiceFuture<VirtualNetworkPeeringInner> function(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, final ServiceCallback<VirtualNetworkPeeringInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetwo...
/** * Gets the specified virtual network peering. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param virtualNetworkPeeringName The name of the virtual network peering. * @param serviceCallback the async Service...
Gets the specified virtual network peering
getAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_12_01/src/main/java/com/microsoft/azure/management/network/v2018_12_01/implementation/VirtualNetworkPeeringsInner.java", "license": "mit", "size": 48368 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
189,198
private static ScreenshotImpl create( Context context, Bundle args, HostFileSender hostFileSender) { String mode = args.getString("screenshot_mode"); Album album = AlbumImpl.createStreaming(context, "default", hostFileSender); album.cleanup(); return new ScreenshotImpl(album, new Vie...
static ScreenshotImpl function( Context context, Bundle args, HostFileSender hostFileSender) { String mode = args.getString(STR); Album album = AlbumImpl.createStreaming(context, STR, hostFileSender); album.cleanup(); return new ScreenshotImpl(album, new ViewHierarchy()); }
/** * Factory method that creates this instance based on what arguments * are passed to the instrumentation */
Factory method that creates this instance based on what arguments are passed to the instrumentation
create
{ "repo_name": "fangzhzh/screenshot-tests-for-android", "path": "core/src/main/java/com/facebook/testing/screenshot/internal/ScreenshotImpl.java", "license": "bsd-3-clause", "size": 10114 }
[ "android.content.Context", "android.os.Bundle" ]
import android.content.Context; import android.os.Bundle;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
1,405,217
public List<DeploymentPolicy> retrieveDeploymentPolicies() { try { startTenantFlow(); List<DeploymentPolicy> depPolicyList = new ArrayList<DeploymentPolicy>(); RegistryManager registryManager = RegistryManager.getInstance(); String[] depPolicyResourceList = (S...
List<DeploymentPolicy> function() { try { startTenantFlow(); List<DeploymentPolicy> depPolicyList = new ArrayList<DeploymentPolicy>(); RegistryManager registryManager = RegistryManager.getInstance(); String[] depPolicyResourceList = (String[]) registryManager .retrieve(AutoscalerConstants.AUTOSCALER_RESOURCE + Autoscal...
/** * Retrieve deployment policies from registry * * @return all the deployment policies */
Retrieve deployment policies from registry
retrieveDeploymentPolicies
{ "repo_name": "ravihansa3000/stratos", "path": "components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java", "license": "apache-2.0", "size": 30447 }
[ "java.util.ArrayList", "java.util.List", "org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy", "org.apache.stratos.autoscaler.util.AutoscalerConstants", "org.apache.stratos.autoscaler.util.Deserializer" ]
import java.util.ArrayList; import java.util.List; import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy; import org.apache.stratos.autoscaler.util.AutoscalerConstants; import org.apache.stratos.autoscaler.util.Deserializer;
import java.util.*; import org.apache.stratos.autoscaler.pojo.policy.deployment.*; import org.apache.stratos.autoscaler.util.*;
[ "java.util", "org.apache.stratos" ]
java.util; org.apache.stratos;
2,588,085
public Name getPrefix(int posn) { Enumeration<String> comps = impl.getPrefix(posn); return (new CompositeName(comps)); }
Name function(int posn) { Enumeration<String> comps = impl.getPrefix(posn); return (new CompositeName(comps)); }
/** * Creates a composite name whose components consist of a prefix of the * components in this composite name. Subsequent changes to * this composite name does not affect the name that is returned. * * @param posn The 0-based index of the component at which to stop. * ...
Creates a composite name whose components consist of a prefix of the components in this composite name. Subsequent changes to this composite name does not affect the name that is returned
getPrefix
{ "repo_name": "google/openjdk-kerberos", "path": "java/krb/javax/naming/CompositeName.java", "license": "gpl-2.0", "size": 21923 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
2,075,852
private Type findTypesOfObjectInModel(Object object) throws TypeNotFoundInModelException { Type result; Set<Type> resultSet; Class<?> objectClass; objectClass = object.getClass(); resultSet = findTypesOfClassInModel(objectClass); if (resultSet.size() == 1) { result = resultSet.iterat...
Type function(Object object) throws TypeNotFoundInModelException { Type result; Set<Type> resultSet; Class<?> objectClass; objectClass = object.getClass(); resultSet = findTypesOfClassInModel(objectClass); if (resultSet.size() == 1) { result = resultSet.iterator().next(); } else { result = super.createComplexType(resul...
/** * <p> * A helper method that searches for a given Java {@link Object} the corresponding {@link Type}s * in the {@link IModel}. * </p> * * @param object The {@link Object} for which the {@link Type} shall be returned. * @return The found {@link Type}. * @throws TypeNotFoundInModelException T...
A helper method that searches for a given Java <code>Object</code> the corresponding <code>Type</code>s in the <code>IModel</code>.
findTypesOfObjectInModel
{ "repo_name": "drme/atf", "path": "atf-eplug/src/eu/sarunas/atf/generators/model/dresden/JavaModelInstanceFactory.java", "license": "bsd-3-clause", "size": 22903 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,661,974
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2) throws IOException, ServletException { log.debug("Pre-authenticated entry point called. Rejecting access"); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Access Denied...
void function(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2) throws IOException, ServletException { log.debug(STR); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, STR); }
/** * Always returns a 401 error code to the client. */
Always returns a 401 error code to the client
commence
{ "repo_name": "t4gedieb/ews-client", "path": "src/main/java/ews/client/security/Http401UnauthorizedEntryPoint.java", "license": "apache-2.0", "size": 1085 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.springframework.security.core.AuthenticationException" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.security.core.AuthenticationException;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.springframework.security.core.*;
[ "java.io", "javax.servlet", "org.springframework.security" ]
java.io; javax.servlet; org.springframework.security;
1,005,294
public int updateSelection(String type, ServiceContext context, String selected, String paramid) { // Get the selection manager or create it Set<String> selection = getSelection(type); if (selection == null) { selections.put(type, Collections.synchronizedSet(new HashSet<String>())); ...
int function(String type, ServiceContext context, String selected, String paramid) { Set<String> selection = getSelection(type); if (selection == null) { selections.put(type, Collections.synchronizedSet(new HashSet<String>())); } if (selected != null) { if (selected.equals(ADD_ALL_SELECTED)) selectAll(type, context); e...
/** * <p> * Update selected element in session * </p> * * @param type * The type of selected element handled in session * @param selected * true, false, single, all, none * @param paramid * id of the selected element * * @return number of ...
Update selected element in session
updateSelection
{ "repo_name": "OpenWIS/openwis", "path": "openwis-metadataportal/openwis-portal/src/main/java/org/fao/geonet/kernel/SelectionManager.java", "license": "gpl-3.0", "size": 9344 }
[ "java.util.Collections", "java.util.HashSet", "java.util.Iterator", "java.util.Set" ]
import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,811,176
public static String tryToTrimToSize(String s, int length, boolean trimSuffix) { if (s == null || s.isEmpty()) { return s; } else if (s.length() <= length) { return s; } else if (s.contains(File.separator)) { String before = s.substring(0, s.lastIndexOf(Fi...
static String function(String s, int length, boolean trimSuffix) { if (s == null s.isEmpty()) { return s; } else if (s.length() <= length) { return s; } else if (s.contains(File.separator)) { String before = s.substring(0, s.lastIndexOf(File.separator)); String after = s.substring(s.lastIndexOf(File.separator)); if (!t...
/** * Try to trim a String to the given size. * * @param s The String to trim. * @param length The trim length. * @param trimSuffix Flag the specifies if trimming should be applied to the suffix of the String. * @return */
Try to trim a String to the given size
tryToTrimToSize
{ "repo_name": "jledit/jledit", "path": "core/src/main/java/org/jledit/utils/Strings.java", "license": "apache-2.0", "size": 2031 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
166,369
void generateResult(Response[] responseArray, List<SurfaceForm> cols) { for (int i = 0; i < responseArray.length; i++) { SurfaceForm r = search(i, cols); if (responseArray[i] == null && r != null && r.getCandidates().size() == 1) { Response res = new Response(); List<DisambiguatedEntity> entList = ne...
void generateResult(Response[] responseArray, List<SurfaceForm> cols) { for (int i = 0; i < responseArray.length; i++) { SurfaceForm r = search(i, cols); if (responseArray[i] == null && r != null && r.getCandidates().size() == 1) { Response res = new Response(); List<DisambiguatedEntity> entList = new LinkedList<Disamb...
/** * Methods exist three times - bad programming * ToDo - Fix it * * @param responseArray * @param cols */
Methods exist three times - bad programming ToDo - Fix it
generateResult
{ "repo_name": "quhfus/DoSeR-Disambiguation", "path": "doser-dis-core/src/main/java/doser/entitydisambiguation/algorithms/collective/dbpedia/CollectiveDisambiguationDBpediaEntities.java", "license": "gpl-2.0", "size": 7402 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,626,855
public static byte[] base64Decode(String data) { byte[] d = Base64.getDecoder().decode(data.getBytes()); return d; }
static byte[] function(String data) { byte[] d = Base64.getDecoder().decode(data.getBytes()); return d; }
/** * Decodes the specified String into a byte array assuming that the string is Base64 encoded. * * @param data to decode * @return decoded byte */
Decodes the specified String into a byte array assuming that the string is Base64 encoded
base64Decode
{ "repo_name": "PeerWasp/PeerWasp", "path": "peerbox/src/main/java/org/peerbox/watchservice/PathUtils.java", "license": "mit", "size": 2681 }
[ "java.util.Base64" ]
import java.util.Base64;
import java.util.*;
[ "java.util" ]
java.util;
1,900,982
@Test public void testBatchUpdate() { @Cleanup val keyCache = new ContainerKeyCache(this.cacheStorage); val rnd = new Random(0); val expectedResult = new HashMap<TestKey, CacheBucketOffset>(); // Populate the cache initially. long updateOffset = batchInsert(0L, k...
void function() { val keyCache = new ContainerKeyCache(this.cacheStorage); val rnd = new Random(0); val expectedResult = new HashMap<TestKey, CacheBucketOffset>(); long updateOffset = batchInsert(0L, keyCache, expectedResult, rnd); val updateBatches = new HashMap<Long, TableKeyBatch>(); long highestOffset = updateOffse...
/** * Tests the {@link ContainerKeyCache#includeUpdateBatch} method for updates. */
Tests the <code>ContainerKeyCache#includeUpdateBatch</code> method for updates
testBatchUpdate
{ "repo_name": "pravega/pravega", "path": "segmentstore/server/src/test/java/io/pravega/segmentstore/server/tables/ContainerKeyCacheTests.java", "license": "apache-2.0", "size": 36573 }
[ "java.util.HashMap", "java.util.Random" ]
import java.util.HashMap; import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,153,859
ServiceCall getLongNullAsync(Long longQuery, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
ServiceCall getLongNullAsync(Long longQuery, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
/** * Get 'null 64 bit integer value (no query param in uri). * * @param longQuery null 64 bit integer value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Serv...
Get 'null 64 bit integer value (no query param in uri)
getLongNullAsync
{ "repo_name": "sharadagarwal/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/url/QueriesOperations.java", "license": "mit", "size": 45468 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,899,632
public static <C extends Expr> void removeDuplicates(List<C> l) { if (l == null) return; ListIterator<C> it1 = l.listIterator(); while (it1.hasNext()) { C e1 = it1.next(); ListIterator<C> it2 = l.listIterator(); boolean duplicate = false; while (it2.hasNext()) { C e2 = it2....
static <C extends Expr> void function(List<C> l) { if (l == null) return; ListIterator<C> it1 = l.listIterator(); while (it1.hasNext()) { C e1 = it1.next(); ListIterator<C> it2 = l.listIterator(); boolean duplicate = false; while (it2.hasNext()) { C e2 = it2.next(); if (e1 == e2) break; if (e1.equals(e2)) { duplicate =...
/** * Removes duplicate exprs (according to equals()). */
Removes duplicate exprs (according to equals())
removeDuplicates
{ "repo_name": "scalingdata/Impala", "path": "fe/src/main/java/com/cloudera/impala/analysis/Expr.java", "license": "apache-2.0", "size": 41650 }
[ "java.util.List", "java.util.ListIterator" ]
import java.util.List; import java.util.ListIterator;
import java.util.*;
[ "java.util" ]
java.util;
769,670
public Observable<ServiceResponse<RouteInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and ...
Observable<ServiceResponse<RouteInner>> function(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (routeTableName == null) { throw new IllegalArgumentException(STR); } if (routeName == null) { ...
/** * Creates or updates a route in the specified route table. * * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. * @param routeName The name of the route. * @param routeParameters Parameters supplied to the create or update ro...
Creates or updates a route in the specified route table
createOrUpdateWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/network/v2019_08_01/implementation/RoutesInner.java", "license": "mit", "size": 43032 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponse", "com.microsoft.rest.Validator" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
718,765
@Override public AttestationSigner getPolicySigner() { return this.policySigner; }
@Override AttestationSigner function() { return this.policySigner; }
/** * Get the policySigner property: The certificate used to sign the policy object, if specified. * * @return the policySigner value. */
Get the policySigner property: The certificate used to sign the policy object, if specified
getPolicySigner
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/models/AttestationResultImpl.java", "license": "mit", "size": 9468 }
[ "com.azure.security.attestation.models.AttestationSigner" ]
import com.azure.security.attestation.models.AttestationSigner;
import com.azure.security.attestation.models.*;
[ "com.azure.security" ]
com.azure.security;
2,068,434
@RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.PUT, consumes = {"application/xml", "application/json"}) @Secured(SecurityFunctions.FN_STORAGES_PUT) Storage updateStorage(@PathVariable("storageName") String storageName, @RequestBody StorageUpdateRequest storageUpdateReq...
@RequestMapping(value = STORAGE_URI_PREFIX + STR, method = RequestMethod.PUT, consumes = {STR, STR}) @Secured(SecurityFunctions.FN_STORAGES_PUT) Storage updateStorage(@PathVariable(STR) String storageName, @RequestBody StorageUpdateRequest storageUpdateRequest) { return storageService.updateStorage(new StorageKey(stora...
/** * Updates an existing storage. * * @param storageName the name of the storage to update * @param storageUpdateRequest the information needed to update the storage * * @return the updated storage information */
Updates an existing storage
updateStorage
{ "repo_name": "FINRAOS/herd", "path": "herd-code/herd-rest/src/main/java/org/finra/herd/rest/StorageRestController.java", "license": "apache-2.0", "size": 5974 }
[ "org.finra.herd.model.api.xml.Storage", "org.finra.herd.model.api.xml.StorageKey", "org.finra.herd.model.api.xml.StorageUpdateRequest", "org.finra.herd.model.dto.SecurityFunctions", "org.springframework.security.access.annotation.Secured", "org.springframework.web.bind.annotation.PathVariable", "org.spr...
import org.finra.herd.model.api.xml.Storage; import org.finra.herd.model.api.xml.StorageKey; import org.finra.herd.model.api.xml.StorageUpdateRequest; import org.finra.herd.model.dto.SecurityFunctions; import org.springframework.security.access.annotation.Secured; import org.springframework.web.bind.annotation.PathVari...
import org.finra.herd.model.api.xml.*; import org.finra.herd.model.dto.*; import org.springframework.security.access.annotation.*; import org.springframework.web.bind.annotation.*;
[ "org.finra.herd", "org.springframework.security", "org.springframework.web" ]
org.finra.herd; org.springframework.security; org.springframework.web;
1,943,227
public static void main(String[] args) throws Exception { CommandLineParser clp = new CommandLineParser(true); clp.addParam("-inDataFile", "Path to the input file.", CommandLineParser.STRING, true, false); clp.addParam("-parentDir", "Path to the parent directory for the " ...
static void function(String[] args) throws Exception { CommandLineParser clp = new CommandLineParser(true); clp.addParam(STR, STR, CommandLineParser.STRING, true, false); clp.addParam(STR, STR + STR, CommandLineParser.STRING, true, false); clp.addParam(STR, STR, CommandLineParser.STRING, true, false); clp.addParam(STR,...
/** * The main body of the script. * * @param args Command line parameters, as specified. * @throws Exception */
The main body of the script
main
{ "repo_name": "datapoet/hubminer", "path": "src/main/java/ioformat/images/DirectoryCategorizedDataImporter.java", "license": "gpl-3.0", "size": 12390 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileInputStream", "java.io.FileWriter", "java.io.InputStreamReader", "java.io.PrintWriter", "java.util.ArrayList", "java.util.HashMap" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,489,567
private static boolean isSplitLocal(List<HostAddress> splitAddresses, HostAddress nodeAddress, SetMultimap<InetAddress, InternalNode> nodesByHost) { for (HostAddress address : splitAddresses) { if (nodeAddress.equals(address)) { return true; } InetAddr...
static boolean function(List<HostAddress> splitAddresses, HostAddress nodeAddress, SetMultimap<InetAddress, InternalNode> nodesByHost) { for (HostAddress address : splitAddresses) { if (nodeAddress.equals(address)) { return true; } InetAddress inetAddress; try { inetAddress = address.toInetAddress(); } catch (UnknownHo...
/** * Helper method to determine if a split is local to a node irrespective of whether splitAddresses contain port information or not */
Helper method to determine if a split is local to a node irrespective of whether splitAddresses contain port information or not
isSplitLocal
{ "repo_name": "wyukawa/presto", "path": "presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleNodeSelector.java", "license": "apache-2.0", "size": 14549 }
[ "com.google.common.collect.SetMultimap", "io.prestosql.metadata.InternalNode", "io.prestosql.spi.HostAddress", "java.net.InetAddress", "java.net.UnknownHostException", "java.util.List", "java.util.Set" ]
import com.google.common.collect.SetMultimap; import io.prestosql.metadata.InternalNode; import io.prestosql.spi.HostAddress; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.List; import java.util.Set;
import com.google.common.collect.*; import io.prestosql.metadata.*; import io.prestosql.spi.*; import java.net.*; import java.util.*;
[ "com.google.common", "io.prestosql.metadata", "io.prestosql.spi", "java.net", "java.util" ]
com.google.common; io.prestosql.metadata; io.prestosql.spi; java.net; java.util;
1,156,002
public void dump(Resource resource, Writer w, int maxRecursionLevels, boolean tidy) throws JSONException { JSONWriter jw = new JSONWriter(w); jw.setTidy(tidy); dump(resource, jw, 0, maxRecursionLevels); }
void function(Resource resource, Writer w, int maxRecursionLevels, boolean tidy) throws JSONException { JSONWriter jw = new JSONWriter(w); jw.setTidy(tidy); dump(resource, jw, 0, maxRecursionLevels); }
/** * Dump given resource in JSON, optionally recursing into its objects * @param tidy if <code>true</code> the json dump is nicely formatted */
Dump given resource in JSON, optionally recursing into its objects
dump
{ "repo_name": "codders/k2-sling-fork", "path": "bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonResourceWriter.java", "license": "apache-2.0", "size": 8947 }
[ "java.io.Writer", "org.apache.sling.api.resource.Resource", "org.apache.sling.commons.json.JSONException", "org.apache.sling.commons.json.io.JSONWriter" ]
import java.io.Writer; import org.apache.sling.api.resource.Resource; import org.apache.sling.commons.json.JSONException; import org.apache.sling.commons.json.io.JSONWriter;
import java.io.*; import org.apache.sling.api.resource.*; import org.apache.sling.commons.json.*; import org.apache.sling.commons.json.io.*;
[ "java.io", "org.apache.sling" ]
java.io; org.apache.sling;
1,760,490