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
EReference getThrowStatement_Exception();
EReference getThrowStatement_Exception();
/** * Returns the meta object for the containment reference '{@link org.xtext.example.delphi.astm.ThrowStatement#getException <em>Exception</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Exception</em>'. * @see org.xtext.example.delphi.as...
Returns the meta object for the containment reference '<code>org.xtext.example.delphi.astm.ThrowStatement#getException Exception</code>'.
getThrowStatement_Exception
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/emf-gen/org/xtext/example/delphi/astm/AstmPackage.java", "license": "epl-1.0", "size": 670467 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,037,368
@ApiModelProperty(value = "") public Problem getProblem() { return problem; }
@ApiModelProperty(value = "") Problem function() { return problem; }
/** * Get problem * * @return problem */
Get problem
getProblem
{ "repo_name": "XeroAPI/Xero-Java", "path": "src/main/java/com/xero/models/payrollnz/LeavePeriods.java", "license": "mit", "size": 4056 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
948,434
@ARule( author = "michal.chmielewski@oracle.com", desc = "Checks the expression language for support in the BPEL model", date = "10/2/2006", sa = 4 , errors="BPELC__UNSUPPORTED_XML_LANG" ) public void rule_CheckExpressionLanguageSupport_20 () { fExpressionLanguage = getLanguage(mNode,AT_EXPRESSIONLA...
@ARule( author = STR, desc = STR, date = STR, sa = 4 , errors=STR ) void function () { fExpressionLanguage = getLanguage(mNode,AT_EXPRESSIONLANGUAGE); IProblem problem; if ( mModelQuery.hasSupport(IModelQueryLookups.SUPPORT_EXPRESSION_LANGUAGE, fExpressionLanguage) == false ) { problem = createError(); problem.fill( ST...
/** * Checks the expression language attribute for support in the model. */
Checks the expression language attribute for support in the model
rule_CheckExpressionLanguageSupport_20
{ "repo_name": "chanakaudaya/developer-studio", "path": "bps/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/rules/ConditionValidator.java", "license": "apache-2.0", "size": 2947 }
[ "org.eclipse.bpel.validator.model.ARule", "org.eclipse.bpel.validator.model.IModelQueryLookups", "org.eclipse.bpel.validator.model.IProblem" ]
import org.eclipse.bpel.validator.model.ARule; import org.eclipse.bpel.validator.model.IModelQueryLookups; import org.eclipse.bpel.validator.model.IProblem;
import org.eclipse.bpel.validator.model.*;
[ "org.eclipse.bpel" ]
org.eclipse.bpel;
1,700,410
public boolean isCellEditable(EventObject anEvent) { return true; }
boolean function(EventObject anEvent) { return true; }
/** * Subclasses may override this to make certain cells editable or not */
Subclasses may override this to make certain cells editable or not
isCellEditable
{ "repo_name": "NCIP/cagrid-core", "path": "caGrid/projects/grape/src/org/cagrid/grape/utils/errors/JComponentCellEditor.java", "license": "bsd-3-clause", "size": 4535 }
[ "java.util.EventObject" ]
import java.util.EventObject;
import java.util.*;
[ "java.util" ]
java.util;
1,302,628
@Test public void normal_cube_sensitivity() { double beta = 0.50; Surface betaSurface = ConstantSurface.of("Beta", beta) .withMetadata(DefaultSurfaceMetadata.builder() .xValueType(ValueType.YEAR_FRACTION).yValueType(ValueType.YEAR_FRACTION) .zValueType(ValueType.SABR_BETA).su...
void function() { double beta = 0.50; Surface betaSurface = ConstantSurface.of("Beta", beta) .withMetadata(DefaultSurfaceMetadata.builder() .xValueType(ValueType.YEAR_FRACTION).yValueType(ValueType.YEAR_FRACTION) .zValueType(ValueType.SABR_BETA).surfaceName("Beta").build()); double shift = 0.0300; Surface shiftSurface ...
/** * Check that the sensitivities of parameters with respect to data is stored in the metadata. * Compare the sensitivities to a finite difference approximation. * This test is relatively slow as it calibrates the full surface multiple times. */
Check that the sensitivities of parameters with respect to data is stored in the metadata. Compare the sensitivities to a finite difference approximation. This test is relatively slow as it calibrates the full surface multiple times
normal_cube_sensitivity
{ "repo_name": "ChinaQuants/Strata", "path": "modules/pricer/src/test/java/com/opengamma/strata/pricer/swaption/SabrSwaptionCalibratorCubeNormalSimpleDataTest.java", "license": "apache-2.0", "size": 19113 }
[ "com.opengamma.strata.basics.date.Tenor", "com.opengamma.strata.collect.array.DoubleArray", "com.opengamma.strata.collect.tuple.Pair", "com.opengamma.strata.market.ValueType", "com.opengamma.strata.market.param.ParameterMetadata", "com.opengamma.strata.market.surface.ConstantSurface", "com.opengamma.str...
import com.opengamma.strata.basics.date.Tenor; import com.opengamma.strata.collect.array.DoubleArray; import com.opengamma.strata.collect.tuple.Pair; import com.opengamma.strata.market.ValueType; import com.opengamma.strata.market.param.ParameterMetadata; import com.opengamma.strata.market.surface.ConstantSurface; impo...
import com.opengamma.strata.basics.date.*; import com.opengamma.strata.collect.array.*; import com.opengamma.strata.collect.tuple.*; import com.opengamma.strata.market.*; import com.opengamma.strata.market.param.*; import com.opengamma.strata.market.surface.*; import com.opengamma.strata.pricer.option.*; import com.ope...
[ "com.opengamma.strata", "java.time", "java.util", "org.testng" ]
com.opengamma.strata; java.time; java.util; org.testng;
1,602,937
public Map<String, String> getHeaders() throws AuthFailureError { return Collections.emptyMap(); }
Map<String, String> function() throws AuthFailureError { return Collections.emptyMap(); }
/** * Returns a list of extra HTTP headers to go along with this request. Can * throw {@link AuthFailureError} as authentication may be required to * provide these values. * @throws AuthFailureError In the event of auth failure */
Returns a list of extra HTTP headers to go along with this request. Can throw <code>AuthFailureError</code> as authentication may be required to provide these values
getHeaders
{ "repo_name": "Yawei-Zhu/ZhiHuLittlePaper", "path": "src/com/android/volley/Request.java", "license": "apache-2.0", "size": 20440 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,159,214
protected void addIndexNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IndexExistsType_indexName_feature"), getString("_UI_PropertyDescr...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), DbchangelogPackage.eINSTANCE.getIndexExistsType_IndexName(), true, false, false, ItemPropertyDesc...
/** * This adds a property descriptor for the Index Name feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Index Name feature.
addIndexNamePropertyDescriptor
{ "repo_name": "dzonekl/LiquibaseEditor", "path": "plugins/org.liquidbase.model.edit/src/org/liquibase/xml/ns/dbchangelog/provider/IndexExistsTypeItemProvider.java", "license": "mit", "size": 8091 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.liquibase.xml.ns.dbchangelog.DbchangelogPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.liquibase.xml.ns.dbchangelog.DbchangelogPackage;
import org.eclipse.emf.edit.provider.*; import org.liquibase.xml.ns.dbchangelog.*;
[ "org.eclipse.emf", "org.liquibase.xml" ]
org.eclipse.emf; org.liquibase.xml;
1,397,062
public final Completion<VALUE> interpret( J8BaseNode node, Locals<VALUE> locals) { Supplier<SourcePosition> oldSourcePositionSupplier = context.getSourcePositionSupplier(); context.setSourcePositionSupplier( new Supplier<SourcePosition>() {
final Completion<VALUE> function( J8BaseNode node, Locals<VALUE> locals) { Supplier<SourcePosition> oldSourcePositionSupplier = context.getSourcePositionSupplier(); context.setSourcePositionSupplier( new Supplier<SourcePosition>() {
/** * Interprets the given AST fragment. * * @param locals used to resolve free variables. */
Interprets the given AST fragment
interpret
{ "repo_name": "mikesamuel/code-interlingua", "path": "src/main/java/com/mikesamuel/cil/expr/Interpreter.java", "license": "apache-2.0", "size": 87900 }
[ "com.google.common.base.Supplier", "com.mikesamuel.cil.ast.j8.J8BaseNode", "com.mikesamuel.cil.parser.SourcePosition" ]
import com.google.common.base.Supplier; import com.mikesamuel.cil.ast.j8.J8BaseNode; import com.mikesamuel.cil.parser.SourcePosition;
import com.google.common.base.*; import com.mikesamuel.cil.ast.j8.*; import com.mikesamuel.cil.parser.*;
[ "com.google.common", "com.mikesamuel.cil" ]
com.google.common; com.mikesamuel.cil;
2,733,941
public Collection<Person> getContentGroup(long id);
Collection<Person> function(long id);
/** * Retourne la liste des personnes contenu dans un groupe. * @param id numero identifiant du groupe * @return Une liste de personnes */
Retourne la liste des personnes contenu dans un groupe
getContentGroup
{ "repo_name": "amirdine/academic-projects", "path": "j2ee/projet-jee/web-directory/src/webdir/main/business/dao/IGroupDao.java", "license": "lgpl-3.0", "size": 977 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,726,932
public void setStatusCode(int statusCode) throws ParseException;
void function(int statusCode) throws ParseException;
/** * Sets the status-code of Response. The status-code is a 3-digit integer * result code that indicates the outcome of an attempt to understand and * satisfy a request. The Status-Code is intended for use by automata. * * @param statusCode the new integer value of the status code. * @th...
Sets the status-code of Response. The status-code is a 3-digit integer result code that indicates the outcome of an attempt to understand and satisfy a request. The Status-Code is intended for use by automata
setStatusCode
{ "repo_name": "fhg-fokus-nubomedia/ims-connector", "path": "src/main/java/javax/sip/message/Response.java", "license": "apache-2.0", "size": 33728 }
[ "java.text.ParseException" ]
import java.text.ParseException;
import java.text.*;
[ "java.text" ]
java.text;
604,071
public Builder maxStale(int maxStale, TimeUnit timeUnit) { if (maxStale < 0) throw new IllegalArgumentException("maxStale < 0: " + maxStale); long maxStaleSecondsLong = timeUnit.toSeconds(maxStale); this.maxStaleSeconds = maxStaleSecondsLong > Integer.MAX_VALUE ? Integer.MAX_VALUE ...
Builder function(int maxStale, TimeUnit timeUnit) { if (maxStale < 0) throw new IllegalArgumentException(STR + maxStale); long maxStaleSecondsLong = timeUnit.toSeconds(maxStale); this.maxStaleSeconds = maxStaleSecondsLong > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) maxStaleSecondsLong; return this; }
/** * Accept cached responses that have exceeded their freshness lifetime by up to {@code * maxStale}. If unspecified, stale cache responses will not be used. * * @param maxStale a non-negative integer. This is stored and transmitted with {@link * TimeUnit#SECONDS} precision; finer precision wi...
Accept cached responses that have exceeded their freshness lifetime by up to maxStale. If unspecified, stale cache responses will not be used
maxStale
{ "repo_name": "hgl888/okhttp", "path": "okhttp/src/main/java/okhttp3/CacheControl.java", "license": "apache-2.0", "size": 12658 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,314,950
public EReference getTerminal_TopologicalNode() { return (EReference)getTerminal().getEStructuralFeatures().get(17); }
EReference function() { return (EReference)getTerminal().getEStructuralFeatures().get(17); }
/** * Returns the meta object for the reference '{@link CIM15.IEC61970.Core.Terminal#getTopologicalNode <em>Topological Node</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Topological Node</em>'. * @see CIM15.IEC61970.Core.Terminal#getTopologicalNode...
Returns the meta object for the reference '<code>CIM15.IEC61970.Core.Terminal#getTopologicalNode Topological Node</code>'.
getTerminal_TopologicalNode
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61970/Core/CorePackage.java", "license": "apache-2.0", "size": 304427 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
507,419
public Span[] tokenizePos(String s);
Span[] function(String s);
/** * Tokenize a string. * * @param s The string to be tokenized. * @return The Span[] with the spans (offsets into s) for each * token as the individuals array elements. */
Tokenize a string
tokenizePos
{ "repo_name": "BlueBrain/bluima", "path": "modules/bluima_opennlp/src/main/java/ch/epfl/bbp/shaded/opennlp/tools/tokenize/Tokenizer.java", "license": "apache-2.0", "size": 1779 }
[ "ch.epfl.bbp.shaded.opennlp.tools.util.Span" ]
import ch.epfl.bbp.shaded.opennlp.tools.util.Span;
import ch.epfl.bbp.shaded.opennlp.tools.util.*;
[ "ch.epfl.bbp" ]
ch.epfl.bbp;
2,541,210
requireNonNull(configs); InputConfigurator.setInputTableConfigs(CLASS, job.getConfiguration(), configs); }
requireNonNull(configs); InputConfigurator.setInputTableConfigs(CLASS, job.getConfiguration(), configs); }
/** * Sets the {@link InputTableConfig} objects on the given Hadoop configuration * * @param job * the Hadoop job instance to be configured * @param configs * the table query configs to be set on the configuration. * @since 1.6.0 */
Sets the <code>InputTableConfig</code> objects on the given Hadoop configuration
setInputTableConfigs
{ "repo_name": "adamjshook/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloMultiTableInputFormat.java", "license": "apache-2.0", "size": 3972 }
[ "org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator" ]
import org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator;
import org.apache.accumulo.core.client.mapreduce.lib.impl.*;
[ "org.apache.accumulo" ]
org.apache.accumulo;
2,898,403
protected void addParentFolders(String resourceName) throws CmsImportExportException, SAXException { try { // this is a resource in /system/ folder and option includeSystem is not true if (!checkExportResource(resourceName)) { return; } ...
void function(String resourceName) throws CmsImportExportException, SAXException { try { if (!checkExportResource(resourceName)) { return; } if (m_superFolders == null) { m_superFolders = new ArrayList(); } List superFolders = new ArrayList(); if (resourceName.lastIndexOf("/") != (resourceName.length() - 1)) { resource...
/** * Adds the parent folders of the given resource to the config file, * starting at the top, excluding the root folder.<p> * * @param resourceName the name of a resource in the VFS * * @throws CmsImportExportException if something goes wrong * @throws SAXException if somet...
Adds the parent folders of the given resource to the config file, starting at the top, excluding the root folder
addParentFolders
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/importexport/CmsExport.java", "license": "lgpl-2.1", "size": 68630 }
[ "java.util.ArrayList", "java.util.List", "org.opencms.file.CmsFolder", "org.opencms.file.CmsResourceFilter", "org.opencms.i18n.CmsMessageContainer", "org.opencms.main.CmsException", "org.xml.sax.SAXException" ]
import java.util.ArrayList; import java.util.List; import org.opencms.file.CmsFolder; import org.opencms.file.CmsResourceFilter; import org.opencms.i18n.CmsMessageContainer; import org.opencms.main.CmsException; import org.xml.sax.SAXException;
import java.util.*; import org.opencms.file.*; import org.opencms.i18n.*; import org.opencms.main.*; import org.xml.sax.*;
[ "java.util", "org.opencms.file", "org.opencms.i18n", "org.opencms.main", "org.xml.sax" ]
java.util; org.opencms.file; org.opencms.i18n; org.opencms.main; org.xml.sax;
2,827,088
public void resetColorAndLabel(Node n) { // Reset Color Object HTMLcolor = getInfo(n, GraphMLmaps.NODE_COLOR); if (HTMLcolor!=null) { try { Color c = KEGG2yGraph.ColorFromHTML(HTMLcolor.toString()); graph.getRealizer(n).setFillColor(c); } catch (Exception e) { ...
void function(Node n) { Object HTMLcolor = getInfo(n, GraphMLmaps.NODE_COLOR); if (HTMLcolor!=null) { try { Color c = KEGG2yGraph.ColorFromHTML(HTMLcolor.toString()); graph.getRealizer(n).setFillColor(c); } catch (Exception e) { e.printStackTrace(); } } Object name = getInfo(n, GraphMLmaps.NODE_NAME); if (name!=null) {...
/** * Reset the color and label of the node to the parameters * stored in the map during translation of the pathway. * @param n */
Reset the color and label of the node to the parameters stored in the map during translation of the pathway
resetColorAndLabel
{ "repo_name": "cogsys-tuebingen/KEGGtranslator", "path": "src/de/zbit/util/TranslatorTools.java", "license": "lgpl-3.0", "size": 23696 }
[ "de.zbit.graph.io.def.GraphMLmaps", "de.zbit.kegg.io.KEGG2yGraph", "java.awt.Color" ]
import de.zbit.graph.io.def.GraphMLmaps; import de.zbit.kegg.io.KEGG2yGraph; import java.awt.Color;
import de.zbit.graph.io.def.*; import de.zbit.kegg.io.*; import java.awt.*;
[ "de.zbit.graph", "de.zbit.kegg", "java.awt" ]
de.zbit.graph; de.zbit.kegg; java.awt;
90,200
GridDhtFuture<Object> fut = cctx.dht().dhtPreloader().request(keys.keySet(), topVer); if (fut != null) { if (!F.isEmpty(fut.invalidPartitions())) { if (retries == null) retries = new HashSet<>(); retries.addAll(fut.invalidPartitions()); ...
GridDhtFuture<Object> fut = cctx.dht().dhtPreloader().request(keys.keySet(), topVer); if (fut != null) { if (!F.isEmpty(fut.invalidPartitions())) { if (retries == null) retries = new HashSet<>(); retries.addAll(fut.invalidPartitions()); }
/** * Initializes future. */
Initializes future
init
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java", "license": "apache-2.0", "size": 16867 }
[ "java.util.HashSet", "org.apache.ignite.internal.util.typedef.F" ]
import java.util.HashSet; import org.apache.ignite.internal.util.typedef.F;
import java.util.*; import org.apache.ignite.internal.util.typedef.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
187,290
interface WithFirewallPolicy { WithCreate withFirewallPolicy(SubResource firewallPolicy); }
interface WithFirewallPolicy { WithCreate withFirewallPolicy(SubResource firewallPolicy); }
/** * Specifies firewallPolicy. * @param firewallPolicy The firewallPolicy associated with this azure firewall * @return the next definition stage */
Specifies firewallPolicy
withFirewallPolicy
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/AzureFirewall.java", "license": "mit", "size": 15544 }
[ "com.microsoft.azure.SubResource" ]
import com.microsoft.azure.SubResource;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,429,387
EAttribute getStaticVarCompensator_VoltageSetPoint();
EAttribute getStaticVarCompensator_VoltageSetPoint();
/** * Returns the meta object for the attribute '{@link gluemodel.CIM.IEC61970.Wires.StaticVarCompensator#getVoltageSetPoint <em>Voltage Set Point</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Voltage Set Point</em>'. * @see gluemodel.CIM.IEC61970.W...
Returns the meta object for the attribute '<code>gluemodel.CIM.IEC61970.Wires.StaticVarCompensator#getVoltageSetPoint Voltage Set Point</code>'.
getStaticVarCompensator_VoltageSetPoint
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Wires/WiresPackage.java", "license": "mit", "size": 669840 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
533,582
public static Type toType(Class type, boolean axistype) { if(axistype)type=AxisCaster.toAxisTypeClass(type); return Type.getType(type); }
static Type function(Class type, boolean axistype) { if(axistype)type=AxisCaster.toAxisTypeClass(type); return Type.getType(type); }
/** * translate a string cfml type definition to a Type Object * @param cfType * @param axistype * @return * @throws PageException */
translate a string cfml type definition to a Type Object
toType
{ "repo_name": "lucee/unoffical-Lucee-no-jre", "path": "source/java/core/src/lucee/transformer/bytecode/util/ASMUtil.java", "license": "lgpl-2.1", "size": 36046 }
[ "org.objectweb.asm.Type" ]
import org.objectweb.asm.Type;
import org.objectweb.asm.*;
[ "org.objectweb.asm" ]
org.objectweb.asm;
2,346,320
public static int calcTextWidth(Paint paint, String demoText) { return (int) paint.measureText(demoText); }
static int function(Paint paint, String demoText) { return (int) paint.measureText(demoText); }
/** * calculates the approximate width of a text, depending on a demo text * avoid repeated calls (e.g. inside drawing methods) * * @param paint * @param demoText * @return */
calculates the approximate width of a text, depending on a demo text avoid repeated calls (e.g. inside drawing methods)
calcTextWidth
{ "repo_name": "BD-ITAC/BD-ITAC", "path": "mobile/Alertas/MPChartLib/src/main/java/com/github/mikephil/charting/utils/Utils.java", "license": "mit", "size": 24390 }
[ "android.graphics.Paint" ]
import android.graphics.Paint;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,208,918
public void init( boolean encrypting, CipherParameters params) throws IllegalArgumentException { this.encrypting = encrypting; if (params instanceof ParametersWithIV) { ParametersWithIV ivParam = (ParametersWithIV)params; ...
void function( boolean encrypting, CipherParameters params) throws IllegalArgumentException { this.encrypting = encrypting; if (params instanceof ParametersWithIV) { ParametersWithIV ivParam = (ParametersWithIV)params; byte[] iv = ivParam.getIV(); if (iv.length < IV.length) { System.arraycopy(iv, 0, IV, IV.length - iv....
/** * Initialise the cipher and, possibly, the initialisation vector (IV). * If an IV isn't passed as part of the parameter, the IV will be all zeros. * An IV which is too short is handled in FIPS compliant fashion. * * @param encrypting if true the cipher is initialised for * encryption,...
Initialise the cipher and, possibly, the initialisation vector (IV). If an IV isn't passed as part of the parameter, the IV will be all zeros. An IV which is too short is handled in FIPS compliant fashion
init
{ "repo_name": "mobilesec/openuat-platform-j2me", "path": "thirdparty/bouncycastle-x509-deps/org/bouncycastle/crypto/modes/OFBBlockCipher.java", "license": "lgpl-3.0", "size": 5343 }
[ "org.bouncycastle.crypto.CipherParameters", "org.bouncycastle.crypto.params.ParametersWithIV" ]
import org.bouncycastle.crypto.CipherParameters; import org.bouncycastle.crypto.params.ParametersWithIV;
import org.bouncycastle.crypto.*; import org.bouncycastle.crypto.params.*;
[ "org.bouncycastle.crypto" ]
org.bouncycastle.crypto;
1,084,781
void addOrUpdateComplexityDetails(APIIdentifier apiIdentifier, GraphqlComplexityInfo graphqlComplexityInfo) throws APIManagementException;
void addOrUpdateComplexityDetails(APIIdentifier apiIdentifier, GraphqlComplexityInfo graphqlComplexityInfo) throws APIManagementException;
/** * Add or Updates the complexity details given the GraphqlComplexityInfo object * * @param apiIdentifier APIIdentifier * @param graphqlComplexityInfo GraphqlComplexityInfo object * @throws APIManagementException if failed to update complexity details */
Add or Updates the complexity details given the GraphqlComplexityInfo object
addOrUpdateComplexityDetails
{ "repo_name": "jaadds/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIManager.java", "license": "apache-2.0", "size": 36284 }
[ "org.wso2.carbon.apimgt.api.model.APIIdentifier", "org.wso2.carbon.apimgt.api.model.graphql.queryanalysis.GraphqlComplexityInfo" ]
import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.api.model.graphql.queryanalysis.GraphqlComplexityInfo;
import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.api.model.graphql.queryanalysis.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,199,025
Module installModule(Module newModule, ProgressMonitor pm) throws CoreException;
Module installModule(Module newModule, ProgressMonitor pm) throws CoreException;
/** * Performs an installation of a new module. * * @param newModule The module to be installed. * @param pm A monitor to inform the user about progress. * * @return The installed module. * * @throws CoreException if an error occures * @see #startTransaction() * ...
Performs an installation of a new module
installModule
{ "repo_name": "arraydev/snap-engine", "path": "ceres-ui/src/main/java/com/bc/ceres/swing/update/ModuleManager.java", "license": "gpl-3.0", "size": 5539 }
[ "com.bc.ceres.core.CoreException", "com.bc.ceres.core.ProgressMonitor", "com.bc.ceres.core.runtime.Module" ]
import com.bc.ceres.core.CoreException; import com.bc.ceres.core.ProgressMonitor; import com.bc.ceres.core.runtime.Module;
import com.bc.ceres.core.*; import com.bc.ceres.core.runtime.*;
[ "com.bc.ceres" ]
com.bc.ceres;
1,022,195
private void sendToClient(Event event) throws HomematicClientException { logger.debug("Sending to Homematic server {}", event.getHmValueItem()); HomematicClient client = context.getHomematicClient(); if (event.isVariable()) { client.setVariable(event.getHmValueItem(), event.getNe...
void function(Event event) throws HomematicClientException { logger.debug(STR, event.getHmValueItem()); HomematicClient client = context.getHomematicClient(); if (event.isVariable()) { client.setVariable(event.getHmValueItem(), event.getNewValue()); } else { client.setDatapointValue((HmDatapoint) event.getHmValueItem()...
/** * Sends the event to a Homematic server. */
Sends the event to a Homematic server
sendToClient
{ "repo_name": "computergeek1507/openhab", "path": "bundles/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/communicator/HomematicPublisher.java", "license": "epl-1.0", "size": 3179 }
[ "org.openhab.binding.homematic.internal.communicator.client.HomematicClientException", "org.openhab.binding.homematic.internal.communicator.client.interfaces.HomematicClient", "org.openhab.binding.homematic.internal.model.HmDatapoint" ]
import org.openhab.binding.homematic.internal.communicator.client.HomematicClientException; import org.openhab.binding.homematic.internal.communicator.client.interfaces.HomematicClient; import org.openhab.binding.homematic.internal.model.HmDatapoint;
import org.openhab.binding.homematic.internal.communicator.client.*; import org.openhab.binding.homematic.internal.communicator.client.interfaces.*; import org.openhab.binding.homematic.internal.model.*;
[ "org.openhab.binding" ]
org.openhab.binding;
2,393,888
public static MethodHandle of(Constructor<?> constructor) { return of(new MethodDescription.ForLoadedConstructor(constructor)); }
static MethodHandle function(Constructor<?> constructor) { return of(new MethodDescription.ForLoadedConstructor(constructor)); }
/** * Creates a method handle representation of the given constructor. * * @param constructor The constructor ro represent. * @return A method handle representing the given constructor. */
Creates a method handle representation of the given constructor
of
{ "repo_name": "mches/byte-buddy", "path": "byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java", "license": "apache-2.0", "size": 59108 }
[ "java.lang.reflect.Constructor", "net.bytebuddy.description.method.MethodDescription" ]
import java.lang.reflect.Constructor; import net.bytebuddy.description.method.MethodDescription;
import java.lang.reflect.*; import net.bytebuddy.description.method.*;
[ "java.lang", "net.bytebuddy.description" ]
java.lang; net.bytebuddy.description;
581,530
public LockMode getLockMode();
LockMode function();
/** * Gets the lock mode. * @return The lock mode. */
Gets the lock mode
getLockMode
{ "repo_name": "kevin-chen-hw/LDAE", "path": "com.huawei.soa.ldae/src/main/java/org/hibernate/loader/plan/exec/query/spi/QueryBuildingParameters.java", "license": "lgpl-2.1", "size": 1994 }
[ "org.hibernate.LockMode" ]
import org.hibernate.LockMode;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
2,432,618
List<CaseJudgmentInformation> selectByExample(CaseJudgmentInformationExample example);
List<CaseJudgmentInformation> selectByExample(CaseJudgmentInformationExample example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table case_judgment_information * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table case_judgment_information
selectByExample
{ "repo_name": "Harveychn/MalariaProject", "path": "src/main/java/com/zxh/ssm/module/whole/mapper/CaseJudgmentInformationMapper.java", "license": "apache-2.0", "size": 3191 }
[ "com.zxh.ssm.module.whole.pojo.CaseJudgmentInformation", "com.zxh.ssm.module.whole.pojo.CaseJudgmentInformationExample", "java.util.List" ]
import com.zxh.ssm.module.whole.pojo.CaseJudgmentInformation; import com.zxh.ssm.module.whole.pojo.CaseJudgmentInformationExample; import java.util.List;
import com.zxh.ssm.module.whole.pojo.*; import java.util.*;
[ "com.zxh.ssm", "java.util" ]
com.zxh.ssm; java.util;
1,908,807
private void start() { if (service != null) return; this.service = Executors.newCachedThreadPool(); service.submit(new Runnable() { @Override public void run() { ws.processEvents(); }
void function() { if (service != null) return; this.service = Executors.newCachedThreadPool(); service.submit(new Runnable() { public void run() { ws.processEvents(); }
/** * Start processing events in a new thread. */
Start processing events in a new thread
start
{ "repo_name": "yugecin/opsu", "path": "src/itdelatrisu/opsu/beatmap/BeatmapWatchService.java", "license": "gpl-3.0", "size": 9093 }
[ "java.util.concurrent.Executors" ]
import java.util.concurrent.Executors;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,210,656
public String createLink(Calendar calendar, int viewPeriod) { return createLink(calendar, getJsp().getRequestContext().getUri(), true, viewPeriod); }
String function(Calendar calendar, int viewPeriod) { return createLink(calendar, getJsp().getRequestContext().getUri(), true, viewPeriod); }
/** * Returns the HTML to generate a link to a overview page using the specified calendar date.<p> * The needed parameters are added to the currently requested uri. * * @param calendar the calendar date to build the link * @param viewPeriod the view period type to link to * @return the HT...
Returns the HTML to generate a link to a overview page using the specified calendar date. The needed parameters are added to the currently requested uri
createLink
{ "repo_name": "gallardo/alkacon-oamp", "path": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/CmsCalendarDisplay.java", "license": "gpl-3.0", "size": 56610 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
2,167,422
public String getStringBodyForURL(URI uri) throws ClientProtocolException, IOException, IllegalStateException, URISyntaxException { return readResponseFromEntity(getEntityForURL(uri)); }
String function(URI uri) throws ClientProtocolException, IOException, IllegalStateException, URISyntaxException { return readResponseFromEntity(getEntityForURL(uri)); }
/** * Returns the String body (response) for the given URI * * @param uri * @return * @throws ClientProtocolException * @throws IOException * @throws IllegalStateException * @throws URISyntaxException */
Returns the String body (response) for the given URI
getStringBodyForURL
{ "repo_name": "brunocvcunha/taskerbox", "path": "core/src/main/java/org/brunocvcunha/taskerbox/core/http/TaskerboxHttpBox.java", "license": "apache-2.0", "size": 16490 }
[ "java.io.IOException", "java.net.URISyntaxException", "org.apache.http.client.ClientProtocolException" ]
import java.io.IOException; import java.net.URISyntaxException; import org.apache.http.client.ClientProtocolException;
import java.io.*; import java.net.*; import org.apache.http.client.*;
[ "java.io", "java.net", "org.apache.http" ]
java.io; java.net; org.apache.http;
181,996
public void addMethodForWrapping(String className, String subSignature) { Set<String> methods = this.classList.get(className); if (methods == null) { methods = new HashSet<String>(); this.classList.put(className, methods); } methods.add(subSignature); }
void function(String className, String subSignature) { Set<String> methods = this.classList.get(className); if (methods == null) { methods = new HashSet<String>(); this.classList.put(className, methods); } methods.add(subSignature); }
/** * Adds a method to which the taint wrapping rules shall apply * @param className The class containing the method to be wrapped * @param subSignature The subsignature of the method to be wrapped */
Adds a method to which the taint wrapping rules shall apply
addMethodForWrapping
{ "repo_name": "secure-software-engineering/soot-infoflow", "path": "src/soot/jimple/infoflow/taintWrappers/EasyTaintWrapper.java", "license": "lgpl-2.1", "size": 20717 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
829,164
public synchronized void shutdownReceiver() throws NotificationServiceException { GenericLogger logger = getLogger(); if ( !isReceiverTransportCalled ) { logger.error(TAG, "Receiver service wasn't started"); throw new NotificationServiceException("Receiver service wasn't started"); } logger.debug...
synchronized void function() throws NotificationServiceException { GenericLogger logger = getLogger(); if ( !isReceiverTransportCalled ) { logger.error(TAG, STR); throw new NotificationServiceException(STR); } logger.debug(TAG, STR); stopReceiverTransport(logger); }
/** * Verifies that receiver transport was started, then calls stopReceiverTransport() * @throws NotificationServiceException */
Verifies that receiver transport was started, then calls stopReceiverTransport()
shutdownReceiver
{ "repo_name": "octoblu/alljoyn", "path": "alljoyn/services/notification/java/NotificationService/src/org/alljoyn/ns/transport/Transport.java", "license": "isc", "size": 17790 }
[ "org.alljoyn.ns.NotificationServiceException", "org.alljoyn.ns.commons.GenericLogger" ]
import org.alljoyn.ns.NotificationServiceException; import org.alljoyn.ns.commons.GenericLogger;
import org.alljoyn.ns.*; import org.alljoyn.ns.commons.*;
[ "org.alljoyn.ns" ]
org.alljoyn.ns;
1,364,291
private void setListShown(boolean shown, boolean animate) { ensureList(); if (mListShown == shown) { return; } mListShown = shown; if (shown) { if (animate) { mListContainer.startAnimation(AnimationUtils.loadAnimation( ...
void function(boolean shown, boolean animate) { ensureList(); if (mListShown == shown) { return; } mListShown = shown; if (shown) { if (animate) { mListContainer.startAnimation(AnimationUtils.loadAnimation( getActivity(), android.R.anim.fade_in)); } mListContainer.setVisibility(View.VISIBLE); } else { if (animate) { mL...
/** * Control whether the list is being displayed. You can make it not * displayed if you are waiting for the initial data to show in it. During * this time an indeterminant progress indicator will be shown instead. * * @param shown If true, the list view is shown; if false, the progress ...
Control whether the list is being displayed. You can make it not displayed if you are waiting for the initial data to show in it. During this time an indeterminant progress indicator will be shown instead
setListShown
{ "repo_name": "hgl888/farebot", "path": "src/main/java/com/codebutler/farebot/fragment/ExpandableListFragment.java", "license": "gpl-3.0", "size": 13138 }
[ "android.view.View", "android.view.animation.AnimationUtils" ]
import android.view.View; import android.view.animation.AnimationUtils;
import android.view.*; import android.view.animation.*;
[ "android.view" ]
android.view;
1,174,259
public Observable<ServiceResponse<Page<BuildStepInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<BuildStepInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * List all the build steps for a given build task. * ServiceResponse<PageImpl<BuildStepInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;BuildS...
List all the build steps for a given build task
listNextSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerregistry/mgmt-v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildStepsInner.java", "license": "mit", "size": 90712 }
[ "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;
2,806,793
@Override public ErrorHandler getHandler() { return handler; }
ErrorHandler function() { return handler; }
/** * Returns the ErrorHandler, if any. * * @return The ErrorHandler. */
Returns the ErrorHandler, if any
getHandler
{ "repo_name": "apache/logging-log4j2", "path": "log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractAppender.java", "license": "apache-2.0", "size": 11124 }
[ "org.apache.logging.log4j.core.ErrorHandler" ]
import org.apache.logging.log4j.core.ErrorHandler;
import org.apache.logging.log4j.core.*;
[ "org.apache.logging" ]
org.apache.logging;
1,619,208
public List<TableName> listTableNames(final String namespace, final String regex, final boolean includeSysTables) throws IOException { final List<HTableDescriptor> descriptors = new ArrayList<HTableDescriptor>(); boolean bypass = false; if (cpHost != null) { bypass = cpHost.preGetTableNames(d...
List<TableName> function(final String namespace, final String regex, final boolean includeSysTables) throws IOException { final List<HTableDescriptor> descriptors = new ArrayList<HTableDescriptor>(); boolean bypass = false; if (cpHost != null) { bypass = cpHost.preGetTableNames(descriptors, regex); } if (!bypass) { Col...
/** * Returns the list of table names that match the specified request * @param regex The regular expression to match against, or null if querying for all * @param namespace the namespace to query, or null if querying for all * @param includeSysTables False to match only against userspace tables * @retur...
Returns the list of table names that match the specified request
listTableNames
{ "repo_name": "drewpope/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java", "license": "apache-2.0", "size": 84381 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Collection", "java.util.List", "java.util.regex.Pattern", "org.apache.hadoop.hbase.HTableDescriptor", "org.apache.hadoop.hbase.TableName" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.regex.Pattern; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableName;
import java.io.*; import java.util.*; import java.util.regex.*; import org.apache.hadoop.hbase.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
900,715
public static int getThreadStatsTag() { return NetworkManagementSocketTagger.getThreadSocketStatsTag(); }
static int function() { return NetworkManagementSocketTagger.getThreadSocketStatsTag(); }
/** * Get the active tag used when accounting {@link Socket} traffic originating * from the current thread. Only one active tag per thread is supported. * {@link #tagSocket(Socket)}. */
Get the active tag used when accounting <code>Socket</code> traffic originating from the current thread. Only one active tag per thread is supported. <code>#tagSocket(Socket)</code>
getThreadStatsTag
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/base/core/java/android/net/TrafficStats.java", "license": "gpl-2.0", "size": 20402 }
[ "com.android.server.NetworkManagementSocketTagger" ]
import com.android.server.NetworkManagementSocketTagger;
import com.android.server.*;
[ "com.android.server" ]
com.android.server;
2,661,907
@LogMessageDoc(level="ERROR", message="failed to access storage: {reason}", explanation="Could not retrieve static flows from the system " + "database", recommendation=LogMessageDoc.CHECK_CONTROLLER) private Map<String, Map<String, OFFlowMod>> readEntriesFromSto...
@LogMessageDoc(level="ERROR", message=STR, explanation=STR + STR, recommendation=LogMessageDoc.CHECK_CONTROLLER) Map<String, Map<String, OFFlowMod>> function() { Map<String, Map<String, OFFlowMod>> entries = new ConcurrentHashMap<String, Map<String, OFFlowMod>>(); try { Map<String, Object> row; IResultSet resultSet = s...
/** * Read entries from storageSource, and store them in a hash * * @return */
Read entries from storageSource, and store them in a hash
readEntriesFromStorage
{ "repo_name": "hgupta2/floodlight2", "path": "src/main/java/net/floodlightcontroller/staticflowentry/StaticFlowEntryPusher.java", "license": "apache-2.0", "size": 27009 }
[ "java.util.Iterator", "java.util.Map", "java.util.concurrent.ConcurrentHashMap", "net.floodlightcontroller.core.annotations.LogMessageDoc", "net.floodlightcontroller.storage.IResultSet", "net.floodlightcontroller.storage.StorageException", "org.openflow.protocol.OFFlowMod" ]
import java.util.Iterator; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import net.floodlightcontroller.core.annotations.LogMessageDoc; import net.floodlightcontroller.storage.IResultSet; import net.floodlightcontroller.storage.StorageException; import org.openflow.protocol.OFFlowMod;
import java.util.*; import java.util.concurrent.*; import net.floodlightcontroller.core.annotations.*; import net.floodlightcontroller.storage.*; import org.openflow.protocol.*;
[ "java.util", "net.floodlightcontroller.core", "net.floodlightcontroller.storage", "org.openflow.protocol" ]
java.util; net.floodlightcontroller.core; net.floodlightcontroller.storage; org.openflow.protocol;
591,663
String findUserDn(String user) throws NamingException;
String findUserDn(String user) throws NamingException;
/** * Finds user's distinguished name. * @param user username * @return DN for the specified username * @throws NamingException */
Finds user's distinguished name
findUserDn
{ "repo_name": "sankarh/hive", "path": "standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ldap/DirSearch.java", "license": "apache-2.0", "size": 2324 }
[ "javax.naming.NamingException" ]
import javax.naming.NamingException;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
2,094,350
@Test public void testNonLiteralStringCompare() throws Throwable { for (String mode : new String[]{ "PREFIX", "CONTAINS", "SPARSE"}) { for (boolean forceFlush : new boolean[]{ false, true }) { try { createTable("CREA...
void function() throws Throwable { for (String mode : new String[]{ STR, STR, STR}) { for (boolean forceFlush : new boolean[]{ false, true }) { try { createTable(STR); createIndex(String.format(STR, mode)); execute(STR, 0, "a"); execute(STR, 1, "abc"); execute(STR, 2, "ac"); flush(forceFlush); Session session = session...
/** * Tests query condition '>' on string columns with is_literal=false. */
Tests query condition '>' on string columns with is_literal=false
testNonLiteralStringCompare
{ "repo_name": "jrwest/cassandra", "path": "test/unit/org/apache/cassandra/index/sasi/SASICQLTest.java", "license": "apache-2.0", "size": 15153 }
[ "com.datastax.driver.core.Row", "com.datastax.driver.core.Session", "com.datastax.driver.core.SimpleStatement", "com.datastax.driver.core.exceptions.InvalidQueryException", "java.util.List", "org.junit.Assert" ]
import com.datastax.driver.core.Row; import com.datastax.driver.core.Session; import com.datastax.driver.core.SimpleStatement; import com.datastax.driver.core.exceptions.InvalidQueryException; import java.util.List; import org.junit.Assert;
import com.datastax.driver.core.*; import com.datastax.driver.core.exceptions.*; import java.util.*; import org.junit.*;
[ "com.datastax.driver", "java.util", "org.junit" ]
com.datastax.driver; java.util; org.junit;
2,616,091
protected boolean isAccessSecurityEnabled() { return parameterService.getParameterValueAsBoolean(SecConstants.ACCESS_SECURITY_NAMESPACE_CODE, SecConstants.ALL_PARAMETER_DETAIL_COMPONENT, SecConstants.SecurityParameterNames.ENABLE_ACCESS_SECURITY); }
boolean function() { return parameterService.getParameterValueAsBoolean(SecConstants.ACCESS_SECURITY_NAMESPACE_CODE, SecConstants.ALL_PARAMETER_DETAIL_COMPONENT, SecConstants.SecurityParameterNames.ENABLE_ACCESS_SECURITY); }
/** * Helper method to check system parameter that turns access security on/off * * @return boolean indicating whether access security is turned on (true) or off (false) */
Helper method to check system parameter that turns access security on/off
isAccessSecurityEnabled
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/sec/service/impl/AccessSecurityServiceImpl.java", "license": "agpl-3.0", "size": 40253 }
[ "org.kuali.kfs.sec.SecConstants" ]
import org.kuali.kfs.sec.SecConstants;
import org.kuali.kfs.sec.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,455,713
return new JUnit4TestAdapter(UserServiceImplUnitTests.class); }
return new JUnit4TestAdapter(UserServiceImplUnitTests.class); }
/** * <p> * Adapter for earlier versions of JUnit. * </p> * * @return a test suite. */
Adapter for earlier versions of JUnit.
suite
{ "repo_name": "NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention", "path": "hub/src/java/tests/com/hfpp/network/hub/services/impl/UserServiceImplUnitTests.java", "license": "apache-2.0", "size": 23393 }
[ "junit.framework.JUnit4TestAdapter" ]
import junit.framework.JUnit4TestAdapter;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,112,190
public static Entry toServerEntry( Attributes attributes, Dn dn, SchemaManager schemaManager ) throws LdapInvalidAttributeTypeException { if ( attributes instanceof BasicAttributes ) { try { Entry entry = new DefaultEntry( schemaManager, dn ); ...
static Entry function( Attributes attributes, Dn dn, SchemaManager schemaManager ) throws LdapInvalidAttributeTypeException { if ( attributes instanceof BasicAttributes ) { try { Entry entry = new DefaultEntry( schemaManager, dn ); for ( NamingEnumeration<? extends javax.naming.directory.Attribute> attrs = attributes.g...
/** * Convert a BasicAttributes or a AttributesImpl to a ServerEntry * * @param attributes the BasicAttributes or AttributesImpl instance to convert * @param registries The registries, needed ro build a ServerEntry * @param dn The Dn which is needed by the ServerEntry * @return An instance...
Convert a BasicAttributes or a AttributesImpl to a ServerEntry
toServerEntry
{ "repo_name": "drankye/directory-server", "path": "core-api/src/main/java/org/apache/directory/server/core/api/entry/ServerEntryUtils.java", "license": "apache-2.0", "size": 30812 }
[ "java.util.Set", "javax.naming.NamingEnumeration", "javax.naming.directory.Attributes", "javax.naming.directory.BasicAttributes", "org.apache.directory.api.ldap.model.entry.Attribute", "org.apache.directory.api.ldap.model.entry.DefaultEntry", "org.apache.directory.api.ldap.model.entry.Entry", "org.apa...
import java.util.Set; import javax.naming.NamingEnumeration; import javax.naming.directory.Attributes; import javax.naming.directory.BasicAttributes; import org.apache.directory.api.ldap.model.entry.Attribute; import org.apache.directory.api.ldap.model.entry.DefaultEntry; import org.apache.directory.api.ldap.model.entr...
import java.util.*; import javax.naming.*; import javax.naming.directory.*; import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.name.*; import org.apache.directory.api.ldap.model.schema.*;
[ "java.util", "javax.naming", "org.apache.directory" ]
java.util; javax.naming; org.apache.directory;
63,027
public String getUnqualifiedTextPropertyValue(String name) { TextType tt = getUnqualifiedTextProperty(name); return tt == null ? null : tt.getStringValue(); }
String function(String name) { TextType tt = getUnqualifiedTextProperty(name); return tt == null ? null : tt.getStringValue(); }
/** * Get the value of a simple text property. * * @param name The property name. * @return The value of the text property or null if there is no value. * */
Get the value of a simple text property
getUnqualifiedTextPropertyValue
{ "repo_name": "gavanx/pdflearn", "path": "xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchema.java", "license": "apache-2.0", "size": 41334 }
[ "org.apache.xmpbox.type.TextType" ]
import org.apache.xmpbox.type.TextType;
import org.apache.xmpbox.type.*;
[ "org.apache.xmpbox" ]
org.apache.xmpbox;
339,453
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Void> importDataAsync( String resourceGroupName, String name, ImportRdbParameters parameters, Context context) { return beginImportDataAsync(resourceGroupName, name, parameters, context) .last() .flatMap(this.client...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function( String resourceGroupName, String name, ImportRdbParameters parameters, Context context) { return beginImportDataAsync(resourceGroupName, name, parameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); }
/** * Import data into Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. * @param parameters Parameters for Redis import operation. * @param context The context to associate with this operation. * @throws IllegalArgume...
Import data into Redis cache
importDataAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/RedisClientImpl.java", "license": "mit", "size": 145842 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.redis.models.ImportRdbParameters" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.redis.models.ImportRdbParameters;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.redis.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,445,605
private static boolean isDlLiteDataSubPropertyAxiom (OWLSubDataPropertyOfAxiom ax){ boolean isDlLite = false; if ((ax.getSubProperty() instanceof OWLDataProperty) && (ax.getSuperProperty() instanceof OWLDataProperty)){ isDlLite = true; } return isDlLite; }
static boolean function (OWLSubDataPropertyOfAxiom ax){ boolean isDlLite = false; if ((ax.getSubProperty() instanceof OWLDataProperty) && (ax.getSuperProperty() instanceof OWLDataProperty)){ isDlLite = true; } return isDlLite; }
/************************************************************************** * This method accepts an OWLDataSubPropertyAxiom and returns true if it is * a valid OWLDataSubPropertyAxiom in Dl-Lite * <p> * SubDataPropertyOf := SubPropertyOf ( axiomAnnotations * DataPropertyExpression DataPropertyExpres...
This method accepts an OWLDataSubPropertyAxiom and returns true if it is a valid OWLDataSubPropertyAxiom in Dl-Lite SubDataPropertyOf := SubPropertyOf ( axiomAnnotations DataPropertyExpression DataPropertyExpression )
isDlLiteDataSubPropertyAxiom
{ "repo_name": "ontop/ontoprox", "path": "src/main/java/org/semanticweb/ontop/beyondql/approximation/DLLiteAGrammarChecker.java", "license": "apache-2.0", "size": 56444 }
[ "org.semanticweb.owlapi.model.OWLDataProperty", "org.semanticweb.owlapi.model.OWLSubDataPropertyOfAxiom" ]
import org.semanticweb.owlapi.model.OWLDataProperty; import org.semanticweb.owlapi.model.OWLSubDataPropertyOfAxiom;
import org.semanticweb.owlapi.model.*;
[ "org.semanticweb.owlapi" ]
org.semanticweb.owlapi;
406,374
void sync(int sourceRepoIndex, int destRepoIndex) throws IOException { LOG.info("Sync started"); NotebookRepo srcRepo = getRepo(sourceRepoIndex); NotebookRepo dstRepo = getRepo(destRepoIndex); List <NoteInfo> srcNotes = srcRepo.list(null); List <NoteInfo> dstNotes = dstRepo.list(null); Map<St...
void sync(int sourceRepoIndex, int destRepoIndex) throws IOException { LOG.info(STR); NotebookRepo srcRepo = getRepo(sourceRepoIndex); NotebookRepo dstRepo = getRepo(destRepoIndex); List <NoteInfo> srcNotes = srcRepo.list(null); List <NoteInfo> dstNotes = dstRepo.list(null); Map<String, List<String>> noteIDs = notesChe...
/** * Copies new/updated notes from source to destination storage * * @throws IOException */
Copies new/updated notes from source to destination storage
sync
{ "repo_name": "onkarshedge/incubator-zeppelin", "path": "zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java", "license": "apache-2.0", "size": 14430 }
[ "java.io.IOException", "java.util.List", "java.util.Map", "org.apache.zeppelin.notebook.NoteInfo" ]
import java.io.IOException; import java.util.List; import java.util.Map; import org.apache.zeppelin.notebook.NoteInfo;
import java.io.*; import java.util.*; import org.apache.zeppelin.notebook.*;
[ "java.io", "java.util", "org.apache.zeppelin" ]
java.io; java.util; org.apache.zeppelin;
1,164,151
@Test (timeout=50000) public void testMoveRegion() throws Exception { TableName table = TableName.valueOf("testMoveRegion"); try { HRegionInfo hri = createTableAndGetOneRegion(table); HMaster master = TEST_UTIL.getHBaseCluster().getMaster(); RegionStates regionStates = master.getA...
@Test (timeout=50000) void function() throws Exception { TableName table = TableName.valueOf(STR); try { HRegionInfo hri = createTableAndGetOneRegion(table); HMaster master = TEST_UTIL.getHBaseCluster().getMaster(); RegionStates regionStates = master.getAssignmentManager().getRegionStates(); ServerName serverName = reg...
/** * This tests moving a region */
This tests moving a region
testMoveRegion
{ "repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestAssignmentManagerOnCluster.java", "license": "apache-2.0", "size": 55652 }
[ "java.util.List", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.ServerName", "org.apache.hadoop.hbase.TableName", "org.apache.hadoop.hbase.regionserver.HRegionServer", "org.apache.hadoop.hbase.util.Bytes", "org.apache.hadoop.hbase.util.JVMClusterUtil", "org.junit.Assert", "org.juni...
import java.util.List; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.JVMClusterUtil; import org.jun...
import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.util.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
1,898,211
public RelOptTable getTableOrigin(RelNode rel) { // Determine the simple origin of the first column in the // RelNode. If it's simple, then that means that the underlying // table is also simple, even if the column itself is derived. final Set<RelColumnOrigin> colOrigins = getColumnOrigins(rel, 0); ...
RelOptTable function(RelNode rel) { final Set<RelColumnOrigin> colOrigins = getColumnOrigins(rel, 0); if (colOrigins == null colOrigins.size() == 0) { return null; } return colOrigins.iterator().next().getOriginTable(); } /** * Returns the * {@link BuiltInMetadata.Selectivity#getSelectivity(RexNode)}
/** * Determines the origin of a {@link RelNode}, provided it maps to a single * table, optionally with filtering and projection. * * @param rel the RelNode * * @return the table, if the RelNode is a simple table; otherwise null */
Determines the origin of a <code>RelNode</code>, provided it maps to a single table, optionally with filtering and projection
getTableOrigin
{ "repo_name": "wanglan/calcite", "path": "core/src/main/java/org/apache/calcite/rel/metadata/RelMetadataQuery.java", "license": "apache-2.0", "size": 29524 }
[ "java.util.Set", "org.apache.calcite.plan.RelOptTable", "org.apache.calcite.rel.RelNode", "org.apache.calcite.rex.RexNode" ]
import java.util.Set; import org.apache.calcite.plan.RelOptTable; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rex.RexNode;
import java.util.*; import org.apache.calcite.plan.*; import org.apache.calcite.rel.*; import org.apache.calcite.rex.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,276,032
public List<Date> getDateList(String key, List<Date> defaultValue, String format) { TEMP_DATE_FORMAT.set(format); try { return getList(Date.class, key, defaultValue); } finally { TEMP_DATE_FORMAT.remove(); } }
List<Date> function(String key, List<Date> defaultValue, String format) { TEMP_DATE_FORMAT.set(format); try { return getList(Date.class, key, defaultValue); } finally { TEMP_DATE_FORMAT.remove(); } }
/** * Get a list of Dates associated with the given configuration key. * If the property is a list of Strings, they will be parsed with the * specified format pattern. If the key doesn't map to an existing object, * the default value is returned. * * @param key The configuration k...
Get a list of Dates associated with the given configuration key. If the property is a list of Strings, they will be parsed with the specified format pattern. If the key doesn't map to an existing object, the default value is returned
getDateList
{ "repo_name": "mohanaraosv/commons-configuration", "path": "src/main/java/org/apache/commons/configuration2/DataConfiguration.java", "license": "apache-2.0", "size": 58463 }
[ "java.util.Date", "java.util.List" ]
import java.util.Date; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
398,928
public static String parse(DataInputStream dis, byte data[]) throws IOException { int c = dis.readUnsignedByte(); if ((c & 0xc0) == 0xc0) { c = ((c & 0x3f) << 8) + dis.readUnsignedByte(); HashSet<Integer> jumps = new HashSet<Integer>(); jumps.add(c); ...
static String function(DataInputStream dis, byte data[]) throws IOException { int c = dis.readUnsignedByte(); if ((c & 0xc0) == 0xc0) { c = ((c & 0x3f) << 8) + dis.readUnsignedByte(); HashSet<Integer> jumps = new HashSet<Integer>(); jumps.add(c); return parse(data, c, jumps); } if (c == 0) { return STR." + t; } return ...
/** * Parse a domain name starting at the current offset and moving the input * stream pointer past this domain name (even if cross references occure). * @param dis The input stream. * @param data The raw data (for cross references). * @return The domain name string. * @throws IOException ...
Parse a domain name starting at the current offset and moving the input stream pointer past this domain name (even if cross references occure)
parse
{ "repo_name": "ZaneLove/Conversations", "path": "libs/minidns/src/main/java/de/measite/minidns/util/NameUtil.java", "license": "gpl-3.0", "size": 4045 }
[ "java.io.DataInputStream", "java.io.IOException", "java.util.HashSet" ]
import java.io.DataInputStream; import java.io.IOException; import java.util.HashSet;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
325,906
public void monitorCache(final LateralCacheNoWait<?, ?> cache) { monitor.addCache(cache); }
void function(final LateralCacheNoWait<?, ?> cache) { monitor.addCache(cache); }
/** * Add cache instance to monitor * * @param cache the cache instance * @since 3.1 */
Add cache instance to monitor
monitorCache
{ "repo_name": "apache/commons-jcs", "path": "commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPCacheFactory.java", "license": "apache-2.0", "size": 16934 }
[ "org.apache.commons.jcs3.auxiliary.lateral.LateralCacheNoWait" ]
import org.apache.commons.jcs3.auxiliary.lateral.LateralCacheNoWait;
import org.apache.commons.jcs3.auxiliary.lateral.*;
[ "org.apache.commons" ]
org.apache.commons;
570,201
public void setSpatialClip(Spatial spatial, boolean isClipEnabled) { if (isClipEnabled) { spatial.setRenderState(cs); } else { spatial.clearRenderState(cs.getStateType()); } spatial.updateRenderState(); }
void function(Spatial spatial, boolean isClipEnabled) { if (isClipEnabled) { spatial.setRenderState(cs); } else { spatial.clearRenderState(cs.getStateType()); } spatial.updateRenderState(); }
/** * Sets the spatial clip. * * @param spatial * the spatial * @param isClipEnabled * the is clip enabled */
Sets the spatial clip
setSpatialClip
{ "repo_name": "synergynet/synergynet2.5", "path": "synergynet2.5/src/main/java/apps/remotecontrol/tableportal/ClipRectangleHud.java", "license": "bsd-3-clause", "size": 7342 }
[ "com.jme.scene.Spatial" ]
import com.jme.scene.Spatial;
import com.jme.scene.*;
[ "com.jme.scene" ]
com.jme.scene;
1,418,200
void expectNumber(NodeTraversal t, Node n, JSType type, String msg) { if (!type.matchesNumberContext()) { mismatch(t, n, msg, type, NUMBER_TYPE); } }
void expectNumber(NodeTraversal t, Node n, JSType type, String msg) { if (!type.matchesNumberContext()) { mismatch(t, n, msg, type, NUMBER_TYPE); } }
/** * Expect the type to be a number, or a type convertible to number. If the * expectation is not met, issue a warning at the provided node's source code * position. */
Expect the type to be a number, or a type convertible to number. If the expectation is not met, issue a warning at the provided node's source code position
expectNumber
{ "repo_name": "weitzj/closure-compiler", "path": "src/com/google/javascript/jscomp/TypeValidator.java", "license": "apache-2.0", "size": 30807 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.JSType" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType;
import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
734,672
public List<S> partitionStateValues() { return new ArrayList<>(map.values()); }
List<S> function() { return new ArrayList<>(map.values()); }
/** * Returns the partition state values in order. */
Returns the partition state values in order
partitionStateValues
{ "repo_name": "sslavic/kafka", "path": "clients/src/main/java/org/apache/kafka/common/internals/PartitionStates.java", "license": "apache-2.0", "size": 6589 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,867,851
public int insertSamples(int startB, byte[] samplesB) { if(samplesB == null || startB > samplesToBytes(sampleAmount)) return -1; boolean alloc = false; try { alloc = memoryHandler.malloc(startB, samplesB.length); } catch(IOException e) { e.printStackTrace(); } ...
int function(int startB, byte[] samplesB) { if(samplesB == null startB > samplesToBytes(sampleAmount)) return -1; boolean alloc = false; try { alloc = memoryHandler.malloc(startB, samplesB.length); } catch(IOException e) { e.printStackTrace(); } if(!alloc) return -1; sampleAmount += bytesToSamples(samplesB.length); set...
/** * Inserts the provided samples at the specified index. * * @param startB Index to insert at in bytes. * @param samplesB Samples to insert at start. * @return Index of the first sample after the inserted samples. */
Inserts the provided samples at the specified index
insertSamples
{ "repo_name": "rejeep/apes", "path": "src/apes/models/InternalFormat.java", "license": "gpl-3.0", "size": 13130 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
364,420
private Calendar readDate() throws IOException { long ts = readVarLong(); TimeZone tz; if ((ts & 1) == 0) { tz = COMMON_TIMEZONES[0]; ts >>= 1; } else if ((ts & 2) == 0) { tz = COMMON_TIMEZONES[((int) ts >> 2) & 0x1f]; // 5 bits; ts >>...
Calendar function() throws IOException { long ts = readVarLong(); TimeZone tz; if ((ts & 1) == 0) { tz = COMMON_TIMEZONES[0]; ts >>= 1; } else if ((ts & 2) == 0) { tz = COMMON_TIMEZONES[((int) ts >> 2) & 0x1f]; ts >>= 7; } else { int m = ((int) ts << 19) >> 21; int h = m / 60; String s; if (m < 0) { s = String.format(S...
/** * Deserializes a specially encoded date written using bundle * serialization version 3. * * @return deserialized date * @throws IOException if an I/O error occurs */
Deserializes a specially encoded date written using bundle serialization version 3
readDate
{ "repo_name": "apache/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/BundleReader.java", "license": "apache-2.0", "size": 23167 }
[ "java.io.IOException", "java.util.Calendar", "java.util.GregorianCalendar", "java.util.TimeZone" ]
import java.io.IOException; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,089,393
@SuppressWarnings("unchecked") public Builder addTaxRate(String element) { if (this.taxRates == null || this.taxRates instanceof EmptyParam) { this.taxRates = new ArrayList<String>(); } ((List<String>) this.taxRates).add(element); return this; }
@SuppressWarnings(STR) Builder function(String element) { if (this.taxRates == null this.taxRates instanceof EmptyParam) { this.taxRates = new ArrayList<String>(); } ((List<String>) this.taxRates).add(element); return this; }
/** * Add an element to `taxRates` list. A list is initialized for the first `add/addAll` call, * and subsequent calls adds additional elements to the original list. See {@link * CreditNotePreviewParams.Line#taxRates} for the field documentation. */
Add an element to `taxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See <code>CreditNotePreviewParams.Line#taxRates</code> for the field documentation
addTaxRate
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/CreditNotePreviewParams.java", "license": "mit", "size": 19186 }
[ "com.stripe.param.common.EmptyParam", "java.util.ArrayList", "java.util.List" ]
import com.stripe.param.common.EmptyParam; import java.util.ArrayList; import java.util.List;
import com.stripe.param.common.*; import java.util.*;
[ "com.stripe.param", "java.util" ]
com.stripe.param; java.util;
2,895,489
Loan insert(final GrantLoanDTO params);
Loan insert(final GrantLoanDTO params);
/** * Inserts a loan in the current database transaction */
Inserts a loan in the current database transaction
insert
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/services/transactions/LoanServiceLocal.java", "license": "gpl-2.0", "size": 2647 }
[ "nl.strohalm.cyclos.entities.accounts.loans.Loan" ]
import nl.strohalm.cyclos.entities.accounts.loans.Loan;
import nl.strohalm.cyclos.entities.accounts.loans.*;
[ "nl.strohalm.cyclos" ]
nl.strohalm.cyclos;
390,019
if (configDao != null) return configDao; String className = System.getProperty(Constants.SYSTEM_KEY.CONFIG_DAO.getKey(), null); Object obj = instantiateClass(className); if (obj == null) { configDao = new ConfigDAO(); if (logger.isInfoEnabled()) { logger.info(Constants.SYSTEM_KEY.CONFIG_DAO.toSt...
if (configDao != null) return configDao; String className = System.getProperty(Constants.SYSTEM_KEY.CONFIG_DAO.getKey(), null); Object obj = instantiateClass(className); if (obj == null) { configDao = new ConfigDAO(); if (logger.isInfoEnabled()) { logger.info(Constants.SYSTEM_KEY.CONFIG_DAO.toString()); } } else { if (...
/** * Returns the {@link IConfigDAO} implementation. * This method uses the system property {@link SYSTEM_KEY#CONFIG_DAO} to identify * the implementation class. In case of any error during instantiation return the {@link IConfigDAO} as the * default implementation. * * Once the class is instantiated...
Returns the <code>IConfigDAO</code> implementation. This method uses the system property <code>SYSTEM_KEY#CONFIG_DAO</code> to identify the implementation class. In case of any error during instantiation return the <code>IConfigDAO</code> as the default implementation. Once the class is instantiated then the same class...
getConfigDAO
{ "repo_name": "MastekLtd/JBEAM", "path": "jbeam-core-components/jbeam-monitor-services/src/main/java/com/stgmastek/monitor/ws/util/DAOFactory.java", "license": "lgpl-3.0", "size": 10523 }
[ "com.stgmastek.monitor.ws.server.dao.IConfigDAO", "com.stgmastek.monitor.ws.server.dao.IStatusDAO", "com.stgmastek.monitor.ws.server.dao.impl.ConfigDAO" ]
import com.stgmastek.monitor.ws.server.dao.IConfigDAO; import com.stgmastek.monitor.ws.server.dao.IStatusDAO; import com.stgmastek.monitor.ws.server.dao.impl.ConfigDAO;
import com.stgmastek.monitor.ws.server.dao.*; import com.stgmastek.monitor.ws.server.dao.impl.*;
[ "com.stgmastek.monitor" ]
com.stgmastek.monitor;
2,815,834
@ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineScaleSetInstanceViewInner getInstanceView(String resourceGroupName, String vmScaleSetName);
@ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineScaleSetInstanceViewInner getInstanceView(String resourceGroupName, String vmScaleSetName);
/** * Gets the status of a VM scale set instance. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.Ma...
Gets the status of a VM scale set instance
getInstanceView
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java", "license": "mit", "size": 129320 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetInstanceViewInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetInstanceViewInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
445,777
private ActionEvent createActionEvent () { return new ActionEvent ( SkyTimer.this, 0, actionCommand, System.currentTimeMillis (), 0 ); } /** * {@inheritDoc}
ActionEvent function () { return new ActionEvent ( SkyTimer.this, 0, actionCommand, System.currentTimeMillis (), 0 ); } /** * {@inheritDoc}
/** * Returns action event. * * @return action event */
Returns action event
createActionEvent
{ "repo_name": "pyros2097/WebLookAndFeelLite", "path": "src/web/laf/lite/utils/SkyTimer.java", "license": "apache-2.0", "size": 40178 }
[ "java.awt.event.ActionEvent" ]
import java.awt.event.ActionEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,382,126
@Test public void submitWithoutUploadFile() { // tester.startPage(MockFormFileUploadPage.class, new PageParameters("required=true")); tester.startPage(MockFormFileUploadPage.class); MockFormFileUploadPage page = (MockFormFileUploadPage)tester.getLastRenderedPage(); Session.get().setLocale(Locale.US); F...
void function() { tester.startPage(MockFormFileUploadPage.class); MockFormFileUploadPage page = (MockFormFileUploadPage)tester.getLastRenderedPage(); Session.get().setLocale(Locale.US); FormTester formTester = tester.newFormTester("form"); tester.getRequest().setUseMultiPartContentType(true); formTester.submit(); asser...
/** * Test that formTester deal with Multipart form correctly when no actual upload */
Test that formTester deal with Multipart form correctly when no actual upload
submitWithoutUploadFile
{ "repo_name": "AlienQueen/wicket", "path": "wicket-core/src/test/java/org/apache/wicket/util/tester/FormTesterTest.java", "license": "apache-2.0", "size": 10981 }
[ "java.util.Locale", "org.apache.wicket.Session" ]
import java.util.Locale; import org.apache.wicket.Session;
import java.util.*; import org.apache.wicket.*;
[ "java.util", "org.apache.wicket" ]
java.util; org.apache.wicket;
2,873,419
@Test public void testGetAllOfStorageTypeWithInvalidType() { List<storage_domain_static> result = dao.getAllOfStorageType(StorageType.FCP); assertNotNull(result); assertTrue(result.isEmpty()); }
void function() { List<storage_domain_static> result = dao.getAllOfStorageType(StorageType.FCP); assertNotNull(result); assertTrue(result.isEmpty()); }
/** * Ensures that an empty collection is returned when no static domains of the specified type exist. */
Ensures that an empty collection is returned when no static domains of the specified type exist
testGetAllOfStorageTypeWithInvalidType
{ "repo_name": "raksha-rao/gluster-ovirt", "path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/StorageDomainStaticDAOTest.java", "license": "apache-2.0", "size": 6697 }
[ "java.util.List", "org.junit.Assert", "org.ovirt.engine.core.common.businessentities.StorageType" ]
import java.util.List; import org.junit.Assert; import org.ovirt.engine.core.common.businessentities.StorageType;
import java.util.*; import org.junit.*; import org.ovirt.engine.core.common.businessentities.*;
[ "java.util", "org.junit", "org.ovirt.engine" ]
java.util; org.junit; org.ovirt.engine;
2,393,574
public static void displayAppCopyright() { if (null != VectorApp.getCurrentActivity()) { displayInWebview(VectorApp.getCurrentActivity(), "https://riot.im/copyright"); } }
static void function() { if (null != VectorApp.getCurrentActivity()) { displayInWebview(VectorApp.getCurrentActivity(), "https: } }
/** * Display the copyright. */
Display the copyright
displayAppCopyright
{ "repo_name": "noepitome/neon-android", "path": "neon/src/main/java/im/neon/util/VectorUtils.java", "license": "apache-2.0", "size": 43597 }
[ "im.neon.VectorApp" ]
import im.neon.VectorApp;
import im.neon.*;
[ "im.neon" ]
im.neon;
6,230
Configuration configuration = new Configuration(Configuration.VERSION_2_3_24); configuration.setDefaultEncoding(STANDARD_CHARSET.toString()); configuration.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER); configuration.setLogTemplateExceptions(true); return configur...
Configuration configuration = new Configuration(Configuration.VERSION_2_3_24); configuration.setDefaultEncoding(STANDARD_CHARSET.toString()); configuration.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER); configuration.setLogTemplateExceptions(true); return configuration; }
/** * Build freemarker configuration object. * @return {@link Configuration}. */
Build freemarker configuration object
buildConfig
{ "repo_name": "amzn/alexa-skills-kit-java", "path": "ask-sdk-freemarker/src/com/amazon/ask/response/template/renderer/impl/FreeMarkerTemplateRenderer.java", "license": "apache-2.0", "size": 8313 }
[ "freemarker.template.Configuration", "freemarker.template.TemplateExceptionHandler" ]
import freemarker.template.Configuration; import freemarker.template.TemplateExceptionHandler;
import freemarker.template.*;
[ "freemarker.template" ]
freemarker.template;
1,849,654
private void updateProgress() { // Start panel data settings HostProcess hp = getSelectedHostProcess(); if (scan.getHostProcesses() != null && hp != null) { // Update the main table entries model.updateValues(scan, hp); if (scan.isStopped()) { ...
void function() { HostProcess hp = getSelectedHostProcess(); if (scan.getHostProcesses() != null && hp != null) { model.updateValues(scan, hp); if (scan.isStopped()) { this.stopThread = true; } if (chart != null) { ResponseCountSnapshot snapshot = scan.getRequestHistory(); while (snapshot != null) { try { Second second...
/** * Updates the scan progress shown by the dialogue (scanners' progress/state and chart). */
Updates the scan progress shown by the dialogue (scanners' progress/state and chart)
updateProgress
{ "repo_name": "gsavastano/zaproxy", "path": "src/org/zaproxy/zap/extension/ascan/ScanProgressDialog.java", "license": "apache-2.0", "size": 24834 }
[ "java.awt.Color", "java.util.List", "org.jfree.chart.annotations.XYTextAnnotation", "org.jfree.chart.plot.ValueMarker", "org.jfree.data.time.Second", "org.jfree.ui.Layer", "org.jfree.ui.TextAnchor", "org.parosproxy.paros.core.scanner.HostProcess", "org.parosproxy.paros.core.scanner.Plugin", "org.z...
import java.awt.Color; import java.util.List; import org.jfree.chart.annotations.XYTextAnnotation; import org.jfree.chart.plot.ValueMarker; import org.jfree.data.time.Second; import org.jfree.ui.Layer; import org.jfree.ui.TextAnchor; import org.parosproxy.paros.core.scanner.HostProcess; import org.parosproxy.paros.core...
import java.awt.*; import java.util.*; import org.jfree.chart.annotations.*; import org.jfree.chart.plot.*; import org.jfree.data.time.*; import org.jfree.ui.*; import org.parosproxy.paros.core.scanner.*; import org.zaproxy.zap.utils.*;
[ "java.awt", "java.util", "org.jfree.chart", "org.jfree.data", "org.jfree.ui", "org.parosproxy.paros", "org.zaproxy.zap" ]
java.awt; java.util; org.jfree.chart; org.jfree.data; org.jfree.ui; org.parosproxy.paros; org.zaproxy.zap;
2,067,546
@ConfID("RANDOMLY_KICK_PEER_PROB") public int randomlyKickPeerProb();
@ConfID(STR) int function();
/** * Returns the probability to kick a random peer if a poorly connected one * attempts to connect and the routing table is full. * * @return */
Returns the probability to kick a random peer if a poorly connected one attempts to connect and the routing table is full
randomlyKickPeerProb
{ "repo_name": "flyroom/PeerfactSimKOM_Clone", "path": "src/org/peerfact/impl/overlay/unstructured/heterogeneous/gnutella06/IGnutella06Config.java", "license": "gpl-2.0", "size": 3822 }
[ "org.peerfact.impl.overlay.unstructured.heterogeneous.api.ConfID" ]
import org.peerfact.impl.overlay.unstructured.heterogeneous.api.ConfID;
import org.peerfact.impl.overlay.unstructured.heterogeneous.api.*;
[ "org.peerfact.impl" ]
org.peerfact.impl;
816,198
private String scanDirectiveName(Mark startMark) { // See the specification for details. int length = 0; // A Directive-name is a sequence of alphanumeric characters // (a-z,A-Z,0-9). We scan until we find something that isn't. // FIXME this disagrees with the specification. ...
String function(Mark startMark) { int length = 0; char ch = reader.peek(length); while (Constant.ALPHA.has(ch)) { length++; ch = reader.peek(length); } if (length == 0) { throw new ScannerException(STR, startMark, STR + ch + "(" + ((int) ch) + ")", reader.getMark()); } String value = reader.prefixForward(length); ch = ...
/** * Scan a directive name. Directive names are a series of non-space * characters. * * @see <a href="http://www.yaml.org/spec/1.1/#id895217"></a> */
Scan a directive name. Directive names are a series of non-space characters
scanDirectiveName
{ "repo_name": "ClubObsidian/ObsidianEngine", "path": "src/com/clubobsidian/obsidianengine/snakeyaml/scanner/ScannerImpl.java", "license": "mit", "size": 83726 }
[ "com.clubobsidian.obsidianengine.snakeyaml.error.Mark" ]
import com.clubobsidian.obsidianengine.snakeyaml.error.Mark;
import com.clubobsidian.obsidianengine.snakeyaml.error.*;
[ "com.clubobsidian.obsidianengine" ]
com.clubobsidian.obsidianengine;
1,487,482
public static void biasAdd(MatrixBlock input, MatrixBlock bias, MatrixBlock outputBlock, int numThreads) throws DMLRuntimeException { int N = input.getNumRows(); int K = bias.getNumRows(); int PQ = input.getNumColumns() / K; ConvolutionParameters params = new ConvolutionParameters(N, PQ, -1, -1, K, -1, -1...
static void function(MatrixBlock input, MatrixBlock bias, MatrixBlock outputBlock, int numThreads) throws DMLRuntimeException { int N = input.getNumRows(); int K = bias.getNumRows(); int PQ = input.getNumColumns() / K; ConvolutionParameters params = new ConvolutionParameters(N, PQ, -1, -1, K, -1, -1, -1, -1, -1, -1, nu...
/** * Performs the operation corresponding to the DML script: * ones = matrix(1, rows=1, cols=Hout*Wout) * output = input + matrix(bias %*% ones, rows=1, cols=F*Hout*Wout) * This operation is often followed by conv2d and hence we have introduced bias_add(input, bias) built-in function * * @param input in...
Performs the operation corresponding to the DML script: ones = matrix(1, rows=1, cols=Hout*Wout) output = input + matrix(bias %*% ones, rows=1, cols=F*Hout*Wout) This operation is often followed by conv2d and hence we have introduced bias_add(input, bias) built-in function
biasAdd
{ "repo_name": "fschueler/incubator-systemml", "path": "src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNN.java", "license": "apache-2.0", "size": 49383 }
[ "org.apache.sysml.runtime.DMLRuntimeException" ]
import org.apache.sysml.runtime.DMLRuntimeException;
import org.apache.sysml.runtime.*;
[ "org.apache.sysml" ]
org.apache.sysml;
2,475,945
private void handleEnvEditButtonSelected() { IStructuredSelection sel = (IStructuredSelection) environmentTable.getSelection(); EnvironmentVariable var = (EnvironmentVariable) sel.iterator().next(); if (var == null) { return; } KeyValueInputDialo...
void function() { IStructuredSelection sel = (IStructuredSelection) environmentTable.getSelection(); EnvironmentVariable var = (EnvironmentVariable) sel.iterator().next(); if (var == null) { return; } KeyValueInputDialog dialog = new KeyValueInputDialog(getLabelControl().getShell(), TexlipsePlugin.getResourceString(STR...
/** * Handle edit-button presses. */
Handle edit-button presses
handleEnvEditButtonSelected
{ "repo_name": "rondiplomatico/texlipse", "path": "source/net/sourceforge/texlipse/properties/KeyValueListFieldEditor.java", "license": "epl-1.0", "size": 29607 }
[ "net.sourceforge.texlipse.TexlipsePlugin", "org.eclipse.jface.viewers.IStructuredSelection" ]
import net.sourceforge.texlipse.TexlipsePlugin; import org.eclipse.jface.viewers.IStructuredSelection;
import net.sourceforge.texlipse.*; import org.eclipse.jface.viewers.*;
[ "net.sourceforge.texlipse", "org.eclipse.jface" ]
net.sourceforge.texlipse; org.eclipse.jface;
1,467,462
public void start(BundleContext bc) throws Exception { context = bc; logger.debug("InsteonHub binding has been started."); }
void function(BundleContext bc) throws Exception { context = bc; logger.debug(STR); }
/** * Called whenever the OSGi framework starts our bundle */
Called whenever the OSGi framework starts our bundle
start
{ "repo_name": "Greblys/openhab", "path": "bundles/binding/org.openhab.binding.insteonhub/src/main/java/org/openhab/binding/insteonhub/internal/InsteonHubActivator.java", "license": "epl-1.0", "size": 1354 }
[ "org.osgi.framework.BundleContext" ]
import org.osgi.framework.BundleContext;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
2,503,572
@Override @AfterClass public void tearDown() throws Exception { Iterator<File> i = files.iterator(); while (i.hasNext()) { i.next().delete(); } files.clear(); }
void function() throws Exception { Iterator<File> i = files.iterator(); while (i.hasNext()) { i.next().delete(); } files.clear(); }
/** * Overridden to delete the files. * @see AbstractTest#tearDown() */
Overridden to delete the files
tearDown
{ "repo_name": "ctrueden/bioformats", "path": "components/formats-bsd/test/spec/schema/SchemaCurrent_TO_2003_FC_Test.java", "license": "gpl-2.0", "size": 13278 }
[ "java.io.File", "java.util.Iterator" ]
import java.io.File; import java.util.Iterator;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,449,424
public static ImmutableCollection<Artifact> getAllArtifactsToTest( Iterable<? extends TransitiveInfoCollection> targets) { if (targets == null) { return ImmutableList.of(); } ImmutableList.Builder<Artifact> allTestArtifacts = ImmutableList.builder(); for (TransitiveInfoCollection target : ...
static ImmutableCollection<Artifact> function( Iterable<? extends TransitiveInfoCollection> targets) { if (targets == null) { return ImmutableList.of(); } ImmutableList.Builder<Artifact> allTestArtifacts = ImmutableList.builder(); for (TransitiveInfoCollection target : targets) { allTestArtifacts.addAll(TestProvider.ge...
/** * Utility function to form a list of all test output Artifacts of the given targets to test. */
Utility function to form a list of all test output Artifacts of the given targets to test
getAllArtifactsToTest
{ "repo_name": "damienmg/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/TopLevelArtifactHelper.java", "license": "apache-2.0", "size": 8251 }
[ "com.google.common.collect.ImmutableCollection", "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.test.TestProvider" ]
import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.test.TestProvider;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.test.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
2,412,868
public VectorAssert isEqualTo(Vector3f vector) { // check that actual Vector3f we want to make assertions on is not null. isNotNull(); // we overrides the default error message with a more explicit one String errorMessage = String.format("Expected vector to be <%s> but was <%s>...
VectorAssert function(Vector3f vector) { isNotNull(); String errorMessage = String.format(STR, vector, actual); Assertions.assertThat(actual.epsilonEquals(vector, 0.0001f)).overridingErrorMessage(errorMessage).isTrue(); return this; }
/** * Verifies that the actual vector is (epsilon) equal to the given one. * * @param vector the given vector to compare the actual vector to. * @return this assertion object. * @throws AssertionError - if the actual vector is not equal to the given one. */
Verifies that the actual vector is (epsilon) equal to the given one
isEqualTo
{ "repo_name": "sdp0et/barsuift-simlife", "path": "simLifeDisplay/src/test/java/barsuift/simLife/j3d/assertions/VectorAssert.java", "license": "gpl-3.0", "size": 2765 }
[ "javax.vecmath.Vector3f", "org.fest.assertions.Assertions" ]
import javax.vecmath.Vector3f; import org.fest.assertions.Assertions;
import javax.vecmath.*; import org.fest.assertions.*;
[ "javax.vecmath", "org.fest.assertions" ]
javax.vecmath; org.fest.assertions;
617,327
private void rebuildClusters() { clusters = new Cluster[this.image.getNumOfClusters()]; //[O(p) : p for # of pixels] time complexity, since iterating through all pixels for (int i = 0; i < this.image.getPixelsHeight(); i++) { for (int j = 0; j < this.image.getPixelsWidth(); j++) { int clusterIndex = ...
void function() { clusters = new Cluster[this.image.getNumOfClusters()]; for (int i = 0; i < this.image.getPixelsHeight(); i++) { for (int j = 0; j < this.image.getPixelsWidth(); j++) { int clusterIndex = this.image.getCluster()[i][j]; if (clusters[clusterIndex] == null) { clusters[clusterIndex] = new Cluster(image); }...
/** * Two actions: * 1)adds all the points associated with a certain cluster into that respective cluster * 2)updates the centroids of all of the clusters * [O(p*c + p) : p for # of pixels and c for # of clusters] time complexity */
Two actions: 1)adds all the points associated with a certain cluster into that respective cluster 2)updates the centroids of all of the clusters [O(p*c + p) : p for # of pixels and c for # of clusters] time complexity
rebuildClusters
{ "repo_name": "AbhishekVel/Image-Segmentation", "path": "src/model/Algorithms/KMeansAlgorithm.java", "license": "mit", "size": 4349 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,593,502
public static String [] parse( String s, String delim){ if ( s.trim().equals ("") && !delim.equals(" ")) return new String[]{""}; if ( s.equals ("") ) return new String[]{""}; StringTokenizer st = new StringTokenizer( s, delim); String[] r = new String[ st.countTokens() ]; int i=0; while( st.hasMoreEleme...
static String [] function( String s, String delim){ if ( s.trim().equals (STR STRSTRSTR"}; StringTokenizer st = new StringTokenizer( s, delim); String[] r = new String[ st.countTokens() ]; int i=0; while( st.hasMoreElements() ) { r[i] = (String) st.nextElement(); i++; } return r; }
/** This method is parsing a String using the given delimeter and is * returning the parsed String as String[] * separated by the delimeter. The delimeter is not returned. * @param s String to parse * @param delim String used as delimeter * @return String[] containing the parsed String */
This method is parsing a String using the given delimeter and is returning the parsed String as String[] separated by the delimeter. The delimeter is not returned
parse
{ "repo_name": "hannoman/xxl", "path": "src/xxl/core/util/Strings.java", "license": "lgpl-3.0", "size": 9322 }
[ "java.util.StringTokenizer" ]
import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
1,771,919
public InputStream getInputStream();
InputStream function();
/** * Returns an InputStream to the input. */
Returns an InputStream to the input
getInputStream
{ "repo_name": "moriyoshi/quercus-gae", "path": "src/main/java/com/caucho/quercus/lib/file/BinaryInput.java", "license": "gpl-2.0", "size": 2605 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
502,257
EReference getServiceReferenceType_RequestMessage();
EReference getServiceReferenceType_RequestMessage();
/** * Returns the meta object for the containment reference '{@link net.opengis.ows20.ServiceReferenceType#getRequestMessage <em>Request Message</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Request Message</em>'. * @see net.openg...
Returns the meta object for the containment reference '<code>net.opengis.ows20.ServiceReferenceType#getRequestMessage Request Message</code>'.
getServiceReferenceType_RequestMessage
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.ows/src/net/opengis/ows20/Ows20Package.java", "license": "lgpl-2.1", "size": 356067 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,706,449
public void setPerUserMaxIdle(String username, Integer value) { assertInitializationAllowed(); if (perUserMaxIdle == null) { perUserMaxIdle = new HashMap(); } perUserMaxIdle.put(username, value); }
void function(String username, Integer value) { assertInitializationAllowed(); if (perUserMaxIdle == null) { perUserMaxIdle = new HashMap(); } perUserMaxIdle.put(username, value); }
/** * The maximum number of active connections that can remain idle in the * pool, without extra ones being released, or negative for no limit. * The keys are usernames and the value is the maximum connections. Any * username specified here will override the value of defaultMaxIdle. */
The maximum number of active connections that can remain idle in the pool, without extra ones being released, or negative for no limit. The keys are usernames and the value is the maximum connections. Any username specified here will override the value of defaultMaxIdle
setPerUserMaxIdle
{ "repo_name": "fengshao0907/bbossgroups-3.5", "path": "bboss-persistent/src-jdk6/com/frameworkset/commons/dbcp/datasources/PerUserPoolDataSource.java", "license": "apache-2.0", "size": 21499 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
196,764
public void setPattern(String name, Pattern pattern) { assert pattern != null : "Pattern cannot be null"; set(name, pattern.pattern()); }
void function(String name, Pattern pattern) { assert pattern != null : STR; set(name, pattern.pattern()); }
/** * Set the given property to <code>Pattern</code>. * If the pattern is passed as null, sets the empty pattern which results in * further calls to getPattern(...) returning the default value. * * @param name property name * @param pattern new value */
Set the given property to <code>Pattern</code>. If the pattern is passed as null, sets the empty pattern which results in further calls to getPattern(...) returning the default value
setPattern
{ "repo_name": "intel-hadoop/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java", "license": "apache-2.0", "size": 100529 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,433,905
public void destroyIndexBuffer(@NonNull IndexBuffer indexBuffer) { assertDestroy(nDestroyIndexBuffer(getNativeObject(), indexBuffer.getNativeObject())); indexBuffer.clearNativeObject(); }
void function(@NonNull IndexBuffer indexBuffer) { assertDestroy(nDestroyIndexBuffer(getNativeObject(), indexBuffer.getNativeObject())); indexBuffer.clearNativeObject(); }
/** * Destroys a {@link IndexBuffer} and frees all its associated resources. * @param indexBuffer the {@link IndexBuffer} to destroy */
Destroys a <code>IndexBuffer</code> and frees all its associated resources
destroyIndexBuffer
{ "repo_name": "google/filament", "path": "android/filament-android/src/main/java/com/google/android/filament/Engine.java", "license": "apache-2.0", "size": 27748 }
[ "androidx.annotation.NonNull" ]
import androidx.annotation.NonNull;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,588,726
static void checkAccess(final int access, final int possibleAccess) { if ((access & ~possibleAccess) != 0) { throw new IllegalArgumentException("Invalid access flags: " + access); } int pub = (access & Opcodes.ACC_PUBLIC) == 0 ? 0 : 1; int pri = (acces...
static void checkAccess(final int access, final int possibleAccess) { if ((access & ~possibleAccess) != 0) { throw new IllegalArgumentException(STR + access); } int pub = (access & Opcodes.ACC_PUBLIC) == 0 ? 0 : 1; int pri = (access & Opcodes.ACC_PRIVATE) == 0 ? 0 : 1; int pro = (access & Opcodes.ACC_PROTECTED) == 0 ? ...
/** * Checks that the given access flags do not contain invalid flags. This * method also checks that mutually incompatible flags are not set * simultaneously. * * @param access the access flags to be checked * @param possibleAccess the valid access flags. */
Checks that the given access flags do not contain invalid flags. This method also checks that mutually incompatible flags are not set simultaneously
checkAccess
{ "repo_name": "gstamac/powermock", "path": "powermock-api/powermock-api-mockito2/src/main/java/org/powermock/api/mockito/repackaged/asm/util/CheckClassAdapter.java", "license": "apache-2.0", "size": 18501 }
[ "org.powermock.api.mockito.repackaged.asm.Opcodes" ]
import org.powermock.api.mockito.repackaged.asm.Opcodes;
import org.powermock.api.mockito.repackaged.asm.*;
[ "org.powermock.api" ]
org.powermock.api;
1,772,055
public BigDecimal getAssetBookValueAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AssetBookValueAmt); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AssetBookValueAmt); if (bd == null) return Env.ZERO; return bd; }
/** Get AssetBookValueAmt. @return AssetBookValueAmt */
Get AssetBookValueAmt
getAssetBookValueAmt
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/X_A_Asset_Change.java", "license": "gpl-2.0", "size": 44348 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
1,951,099
public List<FilteredImage> processImageTest(BufferedImage image){ List<FilteredImage> list = new ArrayList<FilteredImage>(); BufferedImage tempImage = image; for (ImageFilter filter : filters) { BufferedImage processedImage = filter.processImage(tempImage); Strin...
List<FilteredImage> function(BufferedImage image){ List<FilteredImage> list = new ArrayList<FilteredImage>(); BufferedImage tempImage = image; for (ImageFilter filter : filters) { BufferedImage processedImage = filter.processImage(tempImage); String filterName = filter.toString(); FilteredImage filteredImage = new Filt...
/** * Returns images of all stages in processing * Used for testing * @param image * @return */
Returns images of all stages in processing Used for testing
processImageTest
{ "repo_name": "automenta/java_dann", "path": "src/syncleus/dann/data/image/filter/ImageFilterChain.java", "license": "agpl-3.0", "size": 2748 }
[ "java.awt.image.BufferedImage", "java.util.ArrayList", "java.util.List" ]
import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.List;
import java.awt.image.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
76,780
@Override public ISource getSource() { return null; }
ISource function() { return null; }
/** * This is a client error message, hence the source will be null. * * @return returns null */
This is a client error message, hence the source will be null
getSource
{ "repo_name": "maxpowa/irc-api", "path": "src/main/java/com/ircclouds/irc/api/domain/messages/ClientErrorMessage.java", "license": "apache-2.0", "size": 1142 }
[ "com.ircclouds.irc.api.domain.messages.interfaces.ISource" ]
import com.ircclouds.irc.api.domain.messages.interfaces.ISource;
import com.ircclouds.irc.api.domain.messages.interfaces.*;
[ "com.ircclouds.irc" ]
com.ircclouds.irc;
2,205,878
public int getDozeScreenState() { return mDozeScreenState; } /** * Sets the screen state to use while dozing. * <p> * The value of this property determines the power state of the primary display * once {@link #startDozing} has been called. The default value is * {@link Dis...
int function() { return mDozeScreenState; } /** * Sets the screen state to use while dozing. * <p> * The value of this property determines the power state of the primary display * once {@link #startDozing} has been called. The default value is * {@link Display#STATE_UNKNOWN} which lets the system decide. * The dream ma...
/** * Gets the screen state to use while dozing. * * @return The screen state to use while dozing, such as {@link Display#STATE_ON}, * {@link Display#STATE_DOZE}, {@link Display#STATE_DOZE_SUSPEND}, * or {@link Display#STATE_OFF}, or {@link Display#STATE_UNKNOWN} for the default * behavior...
Gets the screen state to use while dozing
getDozeScreenState
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/service/dreams/DreamService.java", "license": "gpl-3.0", "size": 40035 }
[ "android.view.Display" ]
import android.view.Display;
import android.view.*;
[ "android.view" ]
android.view;
1,265,565
@Test public void testKeyFlagSelectsCorrectKey() throws Exception { MockEndpoint mockKeyFlag = getMockEndpoint("mock:encrypted_keyflag"); mockKeyFlag.setExpectedMessageCount(1); template.sendBody("direct:keyflag", "Test Message"); assertMockEndpointsSatisfied(); List<Exc...
void function() throws Exception { MockEndpoint mockKeyFlag = getMockEndpoint(STR); mockKeyFlag.setExpectedMessageCount(1); template.sendBody(STR, STR); assertMockEndpointsSatisfied(); List<Exchange> exchanges = mockKeyFlag.getExchanges(); assertEquals(1, exchanges.size()); Exchange exchange = exchanges.get(0); Message...
/** * You get three keys with the UserId "keyflag", a primary key and its two * sub-keys. The sub-key with KeyFlag {@link KeyFlags#SIGN_DATA} should be * used for signing and the sub-key with KeyFlag * {@link KeyFlags#ENCRYPT_COMMS} or {@link KeyFlags#ENCRYPT_COMMS} or * {@link KeyFlags#ENCRYPT...
You get three keys with the UserId "keyflag", a primary key and its two sub-keys. The sub-key with KeyFlag <code>KeyFlags#SIGN_DATA</code> should be used for signing and the sub-key with KeyFlag <code>KeyFlags#ENCRYPT_COMMS</code> or <code>KeyFlags#ENCRYPT_COMMS</code> or <code>KeyFlags#ENCRYPT_STORAGE</code> should be...
testKeyFlagSelectsCorrectKey
{ "repo_name": "kevinearls/camel", "path": "components/camel-crypto/src/test/java/org/apache/camel/converter/crypto/PGPDataFormatTest.java", "license": "apache-2.0", "size": 41095 }
[ "java.util.List", "org.apache.camel.Exchange", "org.apache.camel.Message", "org.apache.camel.component.mock.MockEndpoint" ]
import java.util.List; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.component.mock.MockEndpoint;
import java.util.*; import org.apache.camel.*; import org.apache.camel.component.mock.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
1,535,446
public List<String> getAvailableLanguages() { if (languages == null) { return null; } else { return Collections.unmodifiableList(languages); } }
List<String> function() { if (languages == null) { return null; } else { return Collections.unmodifiableList(languages); } }
/** * Get all the available languages. */
Get all the available languages
getAvailableLanguages
{ "repo_name": "saaconsltd/mina-ftpserver", "path": "core/src/main/java/org/apache/ftpserver/message/impl/DefaultMessageResource.java", "license": "apache-2.0", "size": 8254 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,314,820
public void success(JSONArray message) { sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); }
void function(JSONArray message) { sendPluginResult(new PluginResult(PluginResult.Status.OK, message)); }
/** * Helper for success callbacks that just returns the Status.OK by default * * @param message The message to add to the success result. */
Helper for success callbacks that just returns the Status.OK by default
success
{ "repo_name": "frangucc/gamify", "path": "www/sandbox/pals/platforms/android/CordovaLib/src/org/apache/cordova/CallbackContext.java", "license": "mit", "size": 4736 }
[ "org.apache.cordova.PluginResult", "org.json.JSONArray" ]
import org.apache.cordova.PluginResult; import org.json.JSONArray;
import org.apache.cordova.*; import org.json.*;
[ "org.apache.cordova", "org.json" ]
org.apache.cordova; org.json;
705,838
protected void copyAssets(String subPath) throws IOException { android.content.res.AssetManager assetManager = context.getAssets(); String[] files = assetManager.list(subPath); if (files.length == 0) // It's a file. copyFileToDataDir(assetManager, subPath); else { // Create the new output directory...
void function(String subPath) throws IOException { android.content.res.AssetManager assetManager = context.getAssets(); String[] files = assetManager.list(subPath); if (files.length == 0) copyFileToDataDir(assetManager, subPath); else { File outDir = new File(context.getFilesDir(), subPath); if(!outDir.exists()) outDir...
/** * From here: http://stackoverflow.com/questions/4447477/android-how-to-copy-files-in-assets-to-sdcard * * @param subPath A relative path within the assets. Can be a directory: "pure_data". * @throws IOException */
From here: HREF
copyAssets
{ "repo_name": "manhluong/pd-for-libgdx", "path": "gdx-backend-libpd-android/src/com/luong/gdx/libpd/android/GdxPDAndroid.java", "license": "apache-2.0", "size": 7713 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,990,199
public LocalDateTime getAdler32Date() { return this.adler32Date; }
LocalDateTime function() { return this.adler32Date; }
/** * Gets the adler32 date. * * @return the adler32 date */
Gets the adler32 date
getAdler32Date
{ "repo_name": "Judikael/FreeboxFilePusher", "path": "src/main/java/eu/gaki/ffp/domain/FfpFile.java", "license": "gpl-2.0", "size": 2706 }
[ "java.time.LocalDateTime" ]
import java.time.LocalDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,768,869
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<NetworkInterfaceTapConfigurationInner> createOrUpdateAsync( String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters, Conte...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<NetworkInterfaceTapConfigurationInner> function( String resourceGroupName, String networkInterfaceName, String tapConfigurationName, NetworkInterfaceTapConfigurationInner tapConfigurationParameters, Context context) { return beginCreateOrUpdateAsync( resourceGroupName, n...
/** * Creates or updates a Tap configuration in the specified NetworkInterface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @param tapConfigurationName The name of the tap configuration. * @param tapConfigu...
Creates or updates a Tap configuration in the specified NetworkInterface
createOrUpdateAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkInterfaceTapConfigurationsClientImpl.java", "license": "mit", "size": 61110 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.NetworkInterfaceTapConfigurationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.NetworkInterfaceTapConfigurationInner;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,020,432
public void testConfigRoundtrip() throws Exception { MavenModuleSet m = createMavenProject(); Shell b1 = new Shell("1"); Shell b2 = new Shell("2"); m.getPrebuilders().add(b1); m.getPostbuilders().add(b2); configRoundtrip((Item)m); assertEquals(1, m.getPrebui...
void function() throws Exception { MavenModuleSet m = createMavenProject(); Shell b1 = new Shell("1"); Shell b2 = new Shell("2"); m.getPrebuilders().add(b1); m.getPostbuilders().add(b2); configRoundtrip((Item)m); assertEquals(1, m.getPrebuilders().size()); assertNotSame(b1,m.getPrebuilders().get(Shell.class)); assertEq...
/** * Config roundtrip test around pre/post build step */
Config roundtrip test around pre/post build step
testConfigRoundtrip
{ "repo_name": "aheritier/jenkins", "path": "test/src/test/java/hudson/maven/MavenProjectTest.java", "license": "mit", "size": 9708 }
[ "hudson.model.Item", "hudson.model.Result", "hudson.tasks.Shell" ]
import hudson.model.Item; import hudson.model.Result; import hudson.tasks.Shell;
import hudson.model.*; import hudson.tasks.*;
[ "hudson.model", "hudson.tasks" ]
hudson.model; hudson.tasks;
1,804,453
public IFile getModelFile() { return newFileCreationPage.getModelFile(); }
IFile function() { return newFileCreationPage.getModelFile(); }
/** * Get the file from the page. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Get the file from the page.
getModelFile
{ "repo_name": "EPiCS/soundgates", "path": "software/editor/Soundgates.editor/src/soundgates/presentation/SoundgatesModelWizard.java", "license": "mit", "size": 17819 }
[ "org.eclipse.core.resources.IFile" ]
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.*;
[ "org.eclipse.core" ]
org.eclipse.core;
2,692,038
public void deleteWorkgroup(Workgroup workgroup) throws UnauthorizedException { if (!loaded) { throw new IllegalStateException("Workgroup Manager not loaded yet"); } // Trigger the event that a workgroup is being deleted WorkgroupEventDispatcher.workgroupDeleting(w...
void function(Workgroup workgroup) throws UnauthorizedException { if (!loaded) { throw new IllegalStateException(STR); } WorkgroupEventDispatcher.workgroupDeleting(workgroup); deleteWorkgroup(workgroup.getID()); workgroup.destroy(); workgroupLock.writeLock().lock(); try { workgroups.remove(workgroup.getJID().toBareJID(...
/** * Remove a workgroup from the system. * * @param workgroup the workgroup to remove. * @throws UnauthorizedException if not allowed to delete the workgroup. */
Remove a workgroup from the system
deleteWorkgroup
{ "repo_name": "zhouluoyang/openfire", "path": "src/plugins/fastpath/src/java/org/jivesoftware/xmpp/workgroup/WorkgroupManager.java", "license": "apache-2.0", "size": 38658 }
[ "org.jivesoftware.xmpp.workgroup.event.WorkgroupEventDispatcher" ]
import org.jivesoftware.xmpp.workgroup.event.WorkgroupEventDispatcher;
import org.jivesoftware.xmpp.workgroup.event.*;
[ "org.jivesoftware.xmpp" ]
org.jivesoftware.xmpp;
1,826,348
public static <T> void sort(List<T> list, Comparator<? super T> c) { quickSort(list, 0, list.size() - 1, c); }
static <T> void function(List<T> list, Comparator<? super T> c) { quickSort(list, 0, list.size() - 1, c); }
/** * Sorts the specified list according to the order induced by the specified comparator. * All elements in the list must be <i>mutually comparable</i> using the specified comparator. * * @param <T> the class of the objects in the list. * @param list the list to be sorted. * @param c the ...
Sorts the specified list according to the order induced by the specified comparator. All elements in the list must be mutually comparable using the specified comparator
sort
{ "repo_name": "Devexperts/QD", "path": "dxlib/src/main/java/com/devexperts/util/QuickSort.java", "license": "mpl-2.0", "size": 31160 }
[ "java.util.Comparator", "java.util.List" ]
import java.util.Comparator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,365,551
private Profile updateProfileInternal(Profile profile) throws BusinessException, JAXBException, IOException { String id = profile.getId(); profile.setRevision(profile.getRevision() + 1); Profile local = existingProfiles.replace(id, profile); if (null == local) { existingProfiles.remove(id); throw new B...
Profile function(Profile profile) throws BusinessException, JAXBException, IOException { String id = profile.getId(); profile.setRevision(profile.getRevision() + 1); Profile local = existingProfiles.replace(id, profile); if (null == local) { existingProfiles.remove(id); throw new BusinessException(STR + profile.getName...
/** * Internal process of updating the profile. * * @param profile * Profile being updated. * @return Updated instance. * @throws IOException * If {@link IOException} occurs during save. * @throws JAXBException * If {@link JAXBException} occurs during save. * @thr...
Internal process of updating the profile
updateProfileInternal
{ "repo_name": "andy32323/inspectIT", "path": "CMR/src/info/novatec/inspectit/cmr/ci/ConfigurationInterfaceManager.java", "license": "agpl-3.0", "size": 22068 }
[ "info.novatec.inspectit.ci.Profile", "info.novatec.inspectit.exception.BusinessException", "info.novatec.inspectit.exception.enumeration.ConfigurationInterfaceErrorCodeEnum", "java.io.IOException", "java.nio.file.Files", "java.util.Date", "java.util.Objects", "javax.xml.bind.JAXBException" ]
import info.novatec.inspectit.ci.Profile; import info.novatec.inspectit.exception.BusinessException; import info.novatec.inspectit.exception.enumeration.ConfigurationInterfaceErrorCodeEnum; import java.io.IOException; import java.nio.file.Files; import java.util.Date; import java.util.Objects; import javax.xml.bind.JAX...
import info.novatec.inspectit.ci.*; import info.novatec.inspectit.exception.*; import info.novatec.inspectit.exception.enumeration.*; import java.io.*; import java.nio.file.*; import java.util.*; import javax.xml.bind.*;
[ "info.novatec.inspectit", "java.io", "java.nio", "java.util", "javax.xml" ]
info.novatec.inspectit; java.io; java.nio; java.util; javax.xml;
2,709,677
EClass getBooleanExpression();
EClass getBooleanExpression();
/** * Returns the meta object for class '{@link activitydiagram.BooleanExpression <em>Boolean Expression</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Boolean Expression</em>'. * @see activitydiagram.BooleanExpression * @generated */
Returns the meta object for class '<code>activitydiagram.BooleanExpression Boolean Expression</code>'.
getBooleanExpression
{ "repo_name": "gemoc/activitydiagram", "path": "dev/gemoc_sequential/language_workbench/org.gemoc.activitydiagram.sequential.model/src/activitydiagram/ActivitydiagramPackage.java", "license": "epl-1.0", "size": 91129 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,770,917