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
private void checkFailures() { for (SwimMember member : members.values()) { if (member.getState() == State.SUSPECT && System.currentTimeMillis() - member.getUpdated() > config.getFailureTimeout().toMillis()) { member.setState(State.DEAD); if (!config.isRetainTombstones()) { members...
void function() { for (SwimMember member : members.values()) { if (member.getState() == State.SUSPECT && System.currentTimeMillis() - member.getUpdated() > config.getFailureTimeout().toMillis()) { member.setState(State.DEAD); if (!config.isRetainTombstones()) { members.remove(member.id()); } randomMembers.remove(member...
/** * Checks suspect nodes for failures. */
Checks suspect nodes for failures
checkFailures
{ "repo_name": "kuujo/copycat", "path": "cluster/src/main/java/io/atomix/cluster/protocol/SwimMembershipProtocol.java", "license": "apache-2.0", "size": 37184 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
2,176,923
Iv2InFlight findHandle(long ciHandle) { assert(!shouldCheckThreadIdAssertion() || m_expectedThreadId == Thread.currentThread().getId()); //Check read only encoded bit final boolean readOnly = getReadBit(ciHandle); //Remove read only encoding so comparison works ciHandle =...
Iv2InFlight findHandle(long ciHandle) { assert(!shouldCheckThreadIdAssertion() m_expectedThreadId == Thread.currentThread().getId()); final boolean readOnly = getReadBit(ciHandle); ciHandle = unsetReadBit(ciHandle); Iv2InFlight inflight = m_shortCircuitReads.remove(ciHandle); if (inflight != null) { m_acg.reduceBackpre...
/** * Retrieve the client information for the specified handle */
Retrieve the client information for the specified handle
findHandle
{ "repo_name": "paulmartel/voltdb", "path": "src/frontend/org/voltdb/ClientInterfaceHandleManager.java", "license": "agpl-3.0", "size": 19174 }
[ "java.nio.ByteBuffer", "java.util.Deque" ]
import java.nio.ByteBuffer; import java.util.Deque;
import java.nio.*; import java.util.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
218,234
public boolean do_NullCheck(Operand ref) { if (gc.noNullChecks()) { return false; } if (ref.isDefinitelyNull()) { if (DBG_CF) db("generating definite exception: null_check of definitely null"); endOfBasicBlock = true; rectifyStateWithNullPtrExceptionHandler(); appendInstructi...
boolean function(Operand ref) { if (gc.noNullChecks()) { return false; } if (ref.isDefinitelyNull()) { if (DBG_CF) db(STR); endOfBasicBlock = true; rectifyStateWithNullPtrExceptionHandler(); appendInstruction(Trap.create(TRAP, gc.temps.makeTempValidation(), TrapCodeOperand.NullPtr())); return true; } if (ref instanceof...
/** * Generate a null-check instruction for the given operand. * @return true if an unconditional throw is generated, false otherwise */
Generate a null-check instruction for the given operand
do_NullCheck
{ "repo_name": "ut-osa/laminar", "path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java", "license": "bsd-3-clause", "size": 233116 }
[ "org.jikesrvm.compilers.opt.ir.NullCheck", "org.jikesrvm.compilers.opt.ir.Trap", "org.jikesrvm.compilers.opt.ir.operand.Operand", "org.jikesrvm.compilers.opt.ir.operand.RegisterOperand", "org.jikesrvm.compilers.opt.ir.operand.TrapCodeOperand", "org.jikesrvm.compilers.opt.ir.operand.TrueGuardOperand" ]
import org.jikesrvm.compilers.opt.ir.NullCheck; import org.jikesrvm.compilers.opt.ir.Trap; import org.jikesrvm.compilers.opt.ir.operand.Operand; import org.jikesrvm.compilers.opt.ir.operand.RegisterOperand; import org.jikesrvm.compilers.opt.ir.operand.TrapCodeOperand; import org.jikesrvm.compilers.opt.ir.operand.TrueGu...
import org.jikesrvm.compilers.opt.ir.*; import org.jikesrvm.compilers.opt.ir.operand.*;
[ "org.jikesrvm.compilers" ]
org.jikesrvm.compilers;
1,813,268
public String substitutePropertyExpressions(final Component component, final String string, final IModel<?> model) { if ((string != null) && (model != null)) { final IConverterLocator locator; final Locale locale; if (component == null) { locator = Application.get().getConverterLocator(); i...
String function(final Component component, final String string, final IModel<?> model) { if ((string != null) && (model != null)) { final IConverterLocator locator; final Locale locale; if (component == null) { locator = Application.get().getConverterLocator(); if (Session.exists()) { locale = Session.get().getLocale()...
/** * Helper method to handle property variable substitution in strings. * * @param component * The component requesting a model value or {@code null] * @param string * The string to substitute into * @param model * The model * @return The resulting string */
Helper method to handle property variable substitution in strings
substitutePropertyExpressions
{ "repo_name": "zwsong/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/Localizer.java", "license": "apache-2.0", "size": 18877 }
[ "java.util.Locale", "org.apache.wicket.core.util.string.interpolator.ConvertingPropertyVariableInterpolator", "org.apache.wicket.model.IModel" ]
import java.util.Locale; import org.apache.wicket.core.util.string.interpolator.ConvertingPropertyVariableInterpolator; import org.apache.wicket.model.IModel;
import java.util.*; import org.apache.wicket.core.util.string.interpolator.*; import org.apache.wicket.model.*;
[ "java.util", "org.apache.wicket" ]
java.util; org.apache.wicket;
743,285
private void returnMsgUndeliverable(Msg message) { // Is there a valid receiver? PID sourcePid = message.getFromPid(); if (sourcePid != null) { // we check that the source address is a valid queue MsgQueue q2 = getQueue(sourcePid); if (q2 != null) { ...
void function(Msg message) { PID sourcePid = message.getFromPid(); if (sourcePid != null) { MsgQueue q2 = getQueue(sourcePid); if (q2 != null) { Msg error = MsgErrUndeliverable.build(message.getFromPid(), message); q2.push(error); } else { logger.error(STR, message, sourcePid); } } else { logger.debug(STR, message); } ...
/** * Returns a message to the sender. * We make sure that there is a valid received. * * @param message */
Returns a message to the sender. We make sure that there is a valid received
returnMsgUndeliverable
{ "repo_name": "l3nz/SlicedBread", "path": "classes/ch/loway/oss/slicedbread/MessagingConsole.java", "license": "lgpl-3.0", "size": 12416 }
[ "ch.loway.oss.slicedbread.containers.MsgQueue", "ch.loway.oss.slicedbread.messages.Msg", "ch.loway.oss.slicedbread.messages.error.MsgErrUndeliverable" ]
import ch.loway.oss.slicedbread.containers.MsgQueue; import ch.loway.oss.slicedbread.messages.Msg; import ch.loway.oss.slicedbread.messages.error.MsgErrUndeliverable;
import ch.loway.oss.slicedbread.containers.*; import ch.loway.oss.slicedbread.messages.*; import ch.loway.oss.slicedbread.messages.error.*;
[ "ch.loway.oss" ]
ch.loway.oss;
588,071
public int deleteCell(int cellId) { Log.i(TAG, mTAG + ": Deleted CID: " + cellId); // TODO Instead we need to delete this cell from DBi_measure, since: // we are using foreign_key enforced DB, that doesn't allow you to // remove Dbi_bts without corresponding DBi_measures that uses th...
int function(int cellId) { Log.i(TAG, mTAG + STR + cellId); return mDb.delete(STR,"CID=" + cellId, null); }
/** * Description: This is used in the AIMSICD framework Tests to delete cells. * see: ../src/androidTest/java/com.SecUpwN.test/. * * Issues: TODO: See comments below! * * @param cellId This method deletes a cell with CID from CELL_TABLE * * @retu...
Description: This is used in the AIMSICD framework Tests to delete cells. see: ../src/androidTest/java/com.SecUpwN.test/
deleteCell
{ "repo_name": "nonconforme/Android-IMSI-Catcher-Detector", "path": "app/src/main/java/com/SecUpwN/AIMSICD/adapters/AIMSICDDbAdapter.java", "license": "gpl-3.0", "size": 113415 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,665,025
public String getRichContents() { return getStringOrStream(annot.getDictionaryObject(COSName.RC)); }
String function() { return getStringOrStream(annot.getDictionaryObject(COSName.RC)); }
/** * This will retrieve the rich text stream which is displayed in the popup window. * * @return the rich text stream. */
This will retrieve the rich text stream which is displayed in the popup window
getRichContents
{ "repo_name": "benmccann/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotation.java", "license": "apache-2.0", "size": 27440 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,788,759
public void updateChoreography(String chorId, ChoreographySpec spec) throws DeploymentException, ChoreographyNotFoundException;
void function(String chorId, ChoreographySpec spec) throws DeploymentException, ChoreographyNotFoundException;
/** * Updates a choreography * * @param chorId * the choreography id * @return choreography representation, including information about deployed * services * @throws ChoreographyNotFoundException * if <code>chorId</code> does not exist * @thro...
Updates a choreography
updateChoreography
{ "repo_name": "choreos/enactment_engine", "path": "EnactmentEngineAPI/src/main/java/org/ow2/choreos/chors/EnactmentEngine.java", "license": "mpl-2.0", "size": 2100 }
[ "org.ow2.choreos.chors.datamodel.ChoreographySpec" ]
import org.ow2.choreos.chors.datamodel.ChoreographySpec;
import org.ow2.choreos.chors.datamodel.*;
[ "org.ow2.choreos" ]
org.ow2.choreos;
1,020,916
public void updateInsets(double n, double w, double s, double e) { plot.setInsets(new Insets2D.Double(n, w, s, e)); }
void function(double n, double w, double s, double e) { plot.setInsets(new Insets2D.Double(n, w, s, e)); }
/** * Dynamically change insets of plot * @param n north * @param w west * @param s south * @param e east */
Dynamically change insets of plot
updateInsets
{ "repo_name": "anthonyjchriste/knowledge-is-power", "path": "src/software/main/java/kip/client/ui/RealTimePlot.java", "license": "gpl-3.0", "size": 5109 }
[ "de.erichseifert.gral.util.Insets2D" ]
import de.erichseifert.gral.util.Insets2D;
import de.erichseifert.gral.util.*;
[ "de.erichseifert.gral" ]
de.erichseifert.gral;
1,559,276
void propertyChanged(@NotNull PsiTreeChangeEvent event); ProjectExtensionPointName<PsiTreeChangeListener> EP = new ProjectExtensionPointName<>("com.intellij.psi.treeChangeListener");
void propertyChanged(@NotNull PsiTreeChangeEvent event); ProjectExtensionPointName<PsiTreeChangeListener> EP = new ProjectExtensionPointName<>(STR);
/** * Invoked just after changing of some property of an element.<br> * Element, whose property has changed is returned by {@code event.getElement()}.<br> * The property name is returned by {@code event.getPropertyName()}.<br> * The old property value is returned by {@code event.getOldValue()}.<br> * The...
Invoked just after changing of some property of an element. Element, whose property has changed is returned by event.getElement(). The property name is returned by event.getPropertyName(). The old property value is returned by event.getOldValue(). The new property value is returned by event.getNewValue()
propertyChanged
{ "repo_name": "dahlstrom-g/intellij-community", "path": "platform/core-api/src/com/intellij/psi/PsiTreeChangeListener.java", "license": "apache-2.0", "size": 6219 }
[ "com.intellij.openapi.extensions.ProjectExtensionPointName", "org.jetbrains.annotations.NotNull" ]
import com.intellij.openapi.extensions.ProjectExtensionPointName; import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.extensions.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "org.jetbrains.annotations" ]
com.intellij.openapi; org.jetbrains.annotations;
895,844
public static void showToast(Context context, String msg) { Toast.makeText(context, msg, Toast.LENGTH_LONG).show(); }
static void function(Context context, String msg) { Toast.makeText(context, msg, Toast.LENGTH_LONG).show(); }
/** * Shows a (long) toast */
Shows a (long) toast
showToast
{ "repo_name": "sentinelweb/LanTV", "path": "tvmod/src/main/java/uk/co/sentinelweb/tvmod/util/Utils.java", "license": "apache-2.0", "size": 2606 }
[ "android.content.Context", "android.widget.Toast" ]
import android.content.Context; import android.widget.Toast;
import android.content.*; import android.widget.*;
[ "android.content", "android.widget" ]
android.content; android.widget;
1,543,377
private String getScopeString(String[] scopes) { return StringUtils.join(scopes, " "); }
String function(String[] scopes) { return StringUtils.join(scopes, " "); }
/** * Returns a single string containing the provided array of scopes. * * @param scopes The array of scopes. * @return String Single string containing the provided array of scopes. */
Returns a single string containing the provided array of scopes
getScopeString
{ "repo_name": "jaadds/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/AbstractAPIManager.java", "license": "apache-2.0", "size": 193784 }
[ "org.apache.commons.lang3.StringUtils" ]
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
1,465,808
public List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty> addExtendedProperties(List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty> extendedProperties, String orderId, String updateMode, String version) throws Exception { MozuClient<List<com.mozu.api.contracts.commerceruntim...
List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty> function(List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty> extendedProperties, String orderId, String updateMode, String version) throws Exception { MozuClient<List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedPropert...
/** * Create an extended property for the order. * <p><pre><code> * ExtendedProperty extendedproperty = new ExtendedProperty(); * ExtendedProperty extendedProperty = extendedproperty.addExtendedProperties( extendedProperties, orderId, updateMode, version); * </code></pre></p> * @param orderId Unique iden...
Create an extended property for the order. <code><code> ExtendedProperty extendedproperty = new ExtendedProperty(); ExtendedProperty extendedProperty = extendedproperty.addExtendedProperties( extendedProperties, orderId, updateMode, version); </code></code>
addExtendedProperties
{ "repo_name": "bhewett/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/orders/ExtendedPropertyResource.java", "license": "mit", "size": 14903 }
[ "com.mozu.api.MozuClient", "java.util.List" ]
import com.mozu.api.MozuClient; import java.util.List;
import com.mozu.api.*; import java.util.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
1,700,778
public RadioConnection getConnection() { return conn; } }
RadioConnection function() { return conn; } }
/** * Returns radio connection * * @return radio connection */
Returns radio connection
getConnection
{ "repo_name": "arurke/contiki", "path": "tools/cooja/java/org/contikios/cooja/plugins/skins/TrafficVisualizerSkin.java", "license": "bsd-3-clause", "size": 8770 }
[ "org.contikios.cooja.RadioConnection" ]
import org.contikios.cooja.RadioConnection;
import org.contikios.cooja.*;
[ "org.contikios.cooja" ]
org.contikios.cooja;
479,890
public void setSerialNumber(BigInteger serialNumber) { this.serialNumber = serialNumber; }
void function(BigInteger serialNumber) { this.serialNumber = serialNumber; }
/** * Sets the serial number the attribute certificate must have. If * <code>null</code> is given any will do. * * @param serialNumber The serialNumber to set. */
Sets the serial number the attribute certificate must have. If <code>null</code> is given any will do
setSerialNumber
{ "repo_name": "Skywalker-11/spongycastle", "path": "pkix/src/main/java/org/spongycastle/cert/selector/X509AttributeCertificateHolderSelectorBuilder.java", "license": "mit", "size": 6165 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
198,949
@Override public ParameterValueGroup getParameterValues() { return null; }
ParameterValueGroup function() { return null; }
/** * Returns the parameter values for this math transform. * * @return A copy of the parameter values for this math transform. */
Returns the parameter values for this math transform
getParameterValues
{ "repo_name": "geotools/geotools", "path": "modules/library/referencing/src/main/java/org/geotools/referencing/operation/transform/NTv2Transform.java", "license": "lgpl-2.1", "size": 15899 }
[ "org.opengis.parameter.ParameterValueGroup" ]
import org.opengis.parameter.ParameterValueGroup;
import org.opengis.parameter.*;
[ "org.opengis.parameter" ]
org.opengis.parameter;
405,501
public RuleConditionElement build(final RuleBuildContext context, final BaseDescr descr, final Pattern prefixPattern) { boolean typesafe = context.isTypesafe(); // it must be an EvalDescr final EvalDescr evalDescr = ...
RuleConditionElement function(final RuleBuildContext context, final BaseDescr descr, final Pattern prefixPattern) { boolean typesafe = context.isTypesafe(); final EvalDescr evalDescr = (EvalDescr) descr; try { MVELDialect dialect = (MVELDialect) context.getDialect( context.getDialect().getId() ); Map<String, Declaratio...
/** * Builds and returns an Eval Conditional Element * * @param context The current build context * @param utils The current build utils instance * @param patternBuilder not used by EvalBuilder * @param descr The Eval Descriptor to build the eval conditional element from * * @r...
Builds and returns an Eval Conditional Element
build
{ "repo_name": "bxf12315/drools", "path": "drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/mvel/MVELEvalBuilder.java", "license": "apache-2.0", "size": 5997 }
[ "java.util.Arrays", "java.util.Map", "org.drools.compiler.compiler.AnalysisResult", "org.drools.compiler.compiler.BoundIdentifiers", "org.drools.compiler.compiler.DescrBuildError", "org.drools.compiler.lang.descr.BaseDescr", "org.drools.compiler.lang.descr.EvalDescr", "org.drools.compiler.rule.builder...
import java.util.Arrays; import java.util.Map; import org.drools.compiler.compiler.AnalysisResult; import org.drools.compiler.compiler.BoundIdentifiers; import org.drools.compiler.compiler.DescrBuildError; import org.drools.compiler.lang.descr.BaseDescr; import org.drools.compiler.lang.descr.EvalDescr; import org.drool...
import java.util.*; import org.drools.compiler.compiler.*; import org.drools.compiler.lang.descr.*; import org.drools.compiler.rule.builder.*; import org.drools.compiler.rule.builder.dialect.*; import org.drools.core.base.mvel.*; import org.drools.core.reteoo.*; import org.drools.core.rule.*; import org.drools.core.spi...
[ "java.util", "org.drools.compiler", "org.drools.core", "org.kie.internal" ]
java.util; org.drools.compiler; org.drools.core; org.kie.internal;
2,888,084
public void expectOperations() { expect(storeProvider.getTaskStore()).andReturn(taskStore).anyTimes(); expect(storeProvider.getQuotaStore()).andReturn(quotaStore).anyTimes(); expect(storeProvider.getAttributeStore()).andReturn(attributeStore).anyTimes(); expect(storeProvider.getCronJobStore()).andRetu...
void function() { expect(storeProvider.getTaskStore()).andReturn(taskStore).anyTimes(); expect(storeProvider.getQuotaStore()).andReturn(quotaStore).anyTimes(); expect(storeProvider.getAttributeStore()).andReturn(attributeStore).anyTimes(); expect(storeProvider.getCronJobStore()).andReturn(jobStore).anyTimes(); expect(s...
/** * Expects any number of read or write operations. */
Expects any number of read or write operations
expectOperations
{ "repo_name": "shahankhatch/aurora", "path": "src/test/java/org/apache/aurora/scheduler/storage/testing/StorageTestUtil.java", "license": "apache-2.0", "size": 5969 }
[ "org.easymock.EasyMock" ]
import org.easymock.EasyMock;
import org.easymock.*;
[ "org.easymock" ]
org.easymock;
2,841,895
@SuppressWarnings("WeakerAccess") public void setLocale(Locale locale) { mLocale = locale; mWeekStart = Calendar.getInstance(mTimezone, mLocale).getFirstDayOfWeek(); YEAR_FORMAT = new SimpleDateFormat("yyyy", locale); MONTH_FORMAT = new SimpleDateFormat("MMM", locale); DA...
@SuppressWarnings(STR) void function(Locale locale) { mLocale = locale; mWeekStart = Calendar.getInstance(mTimezone, mLocale).getFirstDayOfWeek(); YEAR_FORMAT = new SimpleDateFormat("yyyy", locale); MONTH_FORMAT = new SimpleDateFormat("MMM", locale); DAY_FORMAT = new SimpleDateFormat("dd", locale); }
/** * Set a custom locale to be used when generating various strings in the picker * @param locale Locale */
Set a custom locale to be used when generating various strings in the picker
setLocale
{ "repo_name": "wdullaer/MaterialDateTimePicker", "path": "library/src/main/java/com/wdullaer/materialdatetimepicker/date/DatePickerDialog.java", "license": "apache-2.0", "size": 43909 }
[ "java.text.SimpleDateFormat", "java.util.Calendar", "java.util.Locale" ]
import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,822,438
Point32 getLocalOrientation();
Point32 getLocalOrientation();
/** * Returns the value of the '<em><b>Local Orientation</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Local Orientation</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @retur...
Returns the value of the 'Local Orientation' containment reference. If the meaning of the 'Local Orientation' containment reference isn't clear, there really should be more of a description here...
getLocalOrientation
{ "repo_name": "RobotML/RobotML-SDK-Juno", "path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/RoboticSystem.java", "license": "epl-1.0", "size": 2795 }
[ "org.eclipse.papyrus.RobotMLLibraries" ]
import org.eclipse.papyrus.RobotMLLibraries;
import org.eclipse.papyrus.*;
[ "org.eclipse.papyrus" ]
org.eclipse.papyrus;
1,299,386
@Override public void stop(BundleContext bc) throws Exception { context = null; logger.debug("neohub binding has been stopped."); }
void function(BundleContext bc) throws Exception { context = null; logger.debug(STR); }
/** * Called whenever the OSGi framework stops our bundle. */
Called whenever the OSGi framework stops our bundle
stop
{ "repo_name": "paolodenti/openhab", "path": "bundles/binding/org.openhab.binding.neohub/src/main/java/org/openhab/binding/neohub/internal/NeoHubActivator.java", "license": "epl-1.0", "size": 1456 }
[ "org.osgi.framework.BundleContext" ]
import org.osgi.framework.BundleContext;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
1,570,937
switch (error.getCode()) { case DatabaseError.INVALID_TOKEN: subscriber.onError(new FirebaseInvalidTokenException(error.getMessage())); break; case DatabaseError.EXPIRED_TOKEN: subscriber.onError(new FirebaseExpiredTokenException(error.getMessage())); break; case Databa...
switch (error.getCode()) { case DatabaseError.INVALID_TOKEN: subscriber.onError(new FirebaseInvalidTokenException(error.getMessage())); break; case DatabaseError.EXPIRED_TOKEN: subscriber.onError(new FirebaseExpiredTokenException(error.getMessage())); break; case DatabaseError.NETWORK_ERROR: subscriber.onError(new Fire...
/** * This method add to subsriber the proper error according to the * * @param subscriber {@link rx.Subscriber} * @param error {@link DatabaseError} * @param <T> generic subscriber */
This method add to subsriber the proper error according to the
buildError
{ "repo_name": "eurosecom/Attendance", "path": "app/src/main/java/com/eusecom/attendance/rxfirebase2/database/FirebaseDatabaseErrorFactory.java", "license": "apache-2.0", "size": 2061 }
[ "com.eusecom.attendance.rxfirebase2.exception.FirebaseExpiredTokenException", "com.eusecom.attendance.rxfirebase2.exception.FirebaseGeneralException", "com.eusecom.attendance.rxfirebase2.exception.FirebaseInvalidTokenException", "com.eusecom.attendance.rxfirebase2.exception.FirebaseNetworkErrorException", "...
import com.eusecom.attendance.rxfirebase2.exception.FirebaseExpiredTokenException; import com.eusecom.attendance.rxfirebase2.exception.FirebaseGeneralException; import com.eusecom.attendance.rxfirebase2.exception.FirebaseInvalidTokenException; import com.eusecom.attendance.rxfirebase2.exception.FirebaseNetworkErrorExce...
import com.eusecom.attendance.rxfirebase2.exception.*; import com.google.firebase.database.*;
[ "com.eusecom.attendance", "com.google.firebase" ]
com.eusecom.attendance; com.google.firebase;
2,657,845
@SmallTest public void testAddTab() throws Exception { setupDocumentTabModel(); assertEquals(0, mTabModel.getCount()); Intent badIntent = new Intent(); badIntent.setData(Uri.parse("http://toteslegit.com")); Tab badTab = new Tab(Tab.INVALID_TAB_ID, false, null); m...
void function() throws Exception { setupDocumentTabModel(); assertEquals(0, mTabModel.getCount()); Intent badIntent = new Intent(); badIntent.setData(Uri.parse(STRdocument: Tab legitTab = new Tab(11684, false, null); mTabModel.addTab(legitIntent, legitTab); assertEquals(1, mTabModel.getCount()); }
/** * Test that we don't add information about a Tab that's not valid for a DocumentActivity. */
Test that we don't add information about a Tab that's not valid for a DocumentActivity
testAddTab
{ "repo_name": "Workday/OpenFrame", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/document/DocumentTabModelImplTest.java", "license": "bsd-3-clause", "size": 20307 }
[ "android.content.Intent", "android.net.Uri", "org.chromium.chrome.browser.tab.Tab" ]
import android.content.Intent; import android.net.Uri; import org.chromium.chrome.browser.tab.Tab;
import android.content.*; import android.net.*; import org.chromium.chrome.browser.tab.*;
[ "android.content", "android.net", "org.chromium.chrome" ]
android.content; android.net; org.chromium.chrome;
200,909
BulkRequestBuilder prepareBulk(@Nullable String globalIndex);
BulkRequestBuilder prepareBulk(@Nullable String globalIndex);
/** * Executes a bulk of index / delete operations with default index */
Executes a bulk of index / delete operations with default index
prepareBulk
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/client/Client.java", "license": "apache-2.0", "size": 15096 }
[ "org.elasticsearch.action.bulk.BulkRequestBuilder", "org.elasticsearch.core.Nullable" ]
import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.core.Nullable;
import org.elasticsearch.action.bulk.*; import org.elasticsearch.core.*;
[ "org.elasticsearch.action", "org.elasticsearch.core" ]
org.elasticsearch.action; org.elasticsearch.core;
1,424,248
@Test public final void testGetRemoteXBeeDeviceFromPackeRX16Packet802Dot15Dot4DeviceAlreadyInNetwork() throws XBeeException { // Setup the resources for the test. Mockito.when(xbeeDevice.getXBeeProtocol()).thenReturn(XBeeProtocol.RAW_802_15_4); String ni = "myRemote802.15.4"; XBee64BitAddress addr64 = ne...
final void function() throws XBeeException { Mockito.when(xbeeDevice.getXBeeProtocol()).thenReturn(XBeeProtocol.RAW_802_15_4); String ni = STR; XBee64BitAddress addr64 = new XBee64BitAddress(STR); XBee16BitAddress addr16 = new XBee16BitAddress("6589"); RX16Packet packet = new RX16Packet(addr16, 0x49, XBeeReceiveOptions...
/** * Test method for {@link com.digi.xbee.api.XBeeDevice#getRemoteXBeeDeviceFromPacket(com.digi.xbee.api.packet.XBeeAPIPacket)}. * * @throws XBeeException */
Test method for <code>com.digi.xbee.api.XBeeDevice#getRemoteXBeeDeviceFromPacket(com.digi.xbee.api.packet.XBeeAPIPacket)</code>
testGetRemoteXBeeDeviceFromPackeRX16Packet802Dot15Dot4DeviceAlreadyInNetwork
{ "repo_name": "digidotcom/XBeeJavaLibrary", "path": "library/src/test/java/com/digi/xbee/api/connection/DataReaderGetRemoteXBeeDeviceFromPacketTest.java", "license": "mpl-2.0", "size": 47956 }
[ "com.digi.xbee.api.RemoteRaw802Device", "com.digi.xbee.api.RemoteXBeeDevice", "com.digi.xbee.api.exceptions.XBeeException", "com.digi.xbee.api.models.XBee16BitAddress", "com.digi.xbee.api.models.XBee64BitAddress", "com.digi.xbee.api.models.XBeeProtocol", "com.digi.xbee.api.models.XBeeReceiveOptions", ...
import com.digi.xbee.api.RemoteRaw802Device; import com.digi.xbee.api.RemoteXBeeDevice; import com.digi.xbee.api.exceptions.XBeeException; import com.digi.xbee.api.models.XBee16BitAddress; import com.digi.xbee.api.models.XBee64BitAddress; import com.digi.xbee.api.models.XBeeProtocol; import com.digi.xbee.api.models.XBe...
import com.digi.xbee.api.*; import com.digi.xbee.api.exceptions.*; import com.digi.xbee.api.models.*; import com.digi.xbee.api.packet.raw.*; import org.hamcrest.core.*; import org.junit.*; import org.mockito.*;
[ "com.digi.xbee", "org.hamcrest.core", "org.junit", "org.mockito" ]
com.digi.xbee; org.hamcrest.core; org.junit; org.mockito;
1,624,946
public void stop() { if (serverSocket != null) { try { serverSocket.close(); logger.info("Server stopped"); } catch (IOException ex) { logger.severe("Couldn't stop web server: " + ex.getMessage()); } } try {...
void function() { if (serverSocket != null) { try { serverSocket.close(); logger.info(STR); } catch (IOException ex) { logger.severe(STR + ex.getMessage()); } } try { threadPool.shutdown(); threadPool.awaitTermination(5, TimeUnit.SECONDS); } catch (InterruptedException ex) { logger.warning(STR); } finally { threadPool....
/** * Closes the server and thread pool. */
Closes the server and thread pool
stop
{ "repo_name": "Tzupy/MT-web-server", "path": "src/com/tzupy/webserver/WebServer.java", "license": "mit", "size": 4981 }
[ "java.io.IOException", "java.util.concurrent.TimeUnit" ]
import java.io.IOException; import java.util.concurrent.TimeUnit;
import java.io.*; import java.util.concurrent.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,022,615
EClass getWebService();
EClass getWebService();
/** * Returns the meta object for class '{@link fr.eyal.lib.datalib.genmodel.android.datalib.WebService <em>Web Service</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Web Service</em>'. * @see fr.eyal.lib.datalib.genmodel.android.datalib.WebService * @gene...
Returns the meta object for class '<code>fr.eyal.lib.datalib.genmodel.android.datalib.WebService Web Service</code>'.
getWebService
{ "repo_name": "eyal-lezmy/Android-DataLib", "path": "Android-DataLib-Generator/fr.eyal.datalib.generator/src/fr/eyal/lib/datalib/genmodel/android/datalib/DatalibPackage.java", "license": "apache-2.0", "size": 19274 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,169,919
EList<SwitchCaseBranchOutputConnector> getCaseBranches();
EList<SwitchCaseBranchOutputConnector> getCaseBranches();
/** * Returns the value of the '<em><b>Case Branches</b></em>' containment reference list. * The list contents are of type {@link org.wso2.developerstudio.eclipse.gmf.esb.SwitchCaseBranchOutputConnector}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Case Branches</em>' containment reference li...
Returns the value of the 'Case Branches' containment reference list. The list contents are of type <code>org.wso2.developerstudio.eclipse.gmf.esb.SwitchCaseBranchOutputConnector</code>. If the meaning of the 'Case Branches' containment reference list isn't clear, there really should be more of a description here...
getCaseBranches
{ "repo_name": "nwnpallewela/developer-studio", "path": "esb/plugins/org.wso2.developerstudio.eclipse.gmf.esb/src/org/wso2/developerstudio/eclipse/gmf/esb/SwitchMediator.java", "license": "apache-2.0", "size": 10152 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,253,673
public boolean parse() { try { SAXParser parser = sParserFactory.newSAXParser(); mHandler = new KmlHandler(); parser.parse(new InputSource(new FileReader(mFileName)), mHandler); return mHandler.getSuccess(); } catch (Exception e) { GPLog...
boolean function() { try { SAXParser parser = sParserFactory.newSAXParser(); mHandler = new KmlHandler(); parser.parse(new InputSource(new FileReader(mFileName)), mHandler); return mHandler.getSuccess(); } catch (Exception e) { GPLog.error(this, null, e); } return false; }
/** * Parses the KML file. * * @return <code>true</code> if success. */
Parses the KML file
parse
{ "repo_name": "tghoward/geopaparazzi", "path": "geopaparazzilibrary/src/main/java/eu/geopaparazzi/library/gpx/parser/KmlParser.java", "license": "gpl-3.0", "size": 7056 }
[ "eu.geopaparazzi.library.database.GPLog", "java.io.FileReader", "javax.xml.parsers.SAXParser", "org.xml.sax.InputSource" ]
import eu.geopaparazzi.library.database.GPLog; import java.io.FileReader; import javax.xml.parsers.SAXParser; import org.xml.sax.InputSource;
import eu.geopaparazzi.library.database.*; import java.io.*; import javax.xml.parsers.*; import org.xml.sax.*;
[ "eu.geopaparazzi.library", "java.io", "javax.xml", "org.xml.sax" ]
eu.geopaparazzi.library; java.io; javax.xml; org.xml.sax;
748,943
@Test public void exVegaTest() { int nStrikes = STRIKES_INPUT.length; int nVols = VOLS.length; double inf = Double.POSITIVE_INFINITY; for (int i = 0; i < nStrikes; ++i) { for (int j = 0; j < nVols; ++j) { double strike = STRIKES_INPUT[i]; double vol = VOLS[j]; doubl...
void function() { int nStrikes = STRIKES_INPUT.length; int nVols = VOLS.length; double inf = Double.POSITIVE_INFINITY; for (int i = 0; i < nStrikes; ++i) { for (int j = 0; j < nVols; ++j) { double strike = STRIKES_INPUT[i]; double vol = VOLS[j]; double resC1 = BlackFormulaRepository.vega(1.e-12 * strike, strike, TIME_T...
/** * large/small input */
large/small input
exVegaTest
{ "repo_name": "OpenGamma/Strata", "path": "modules/pricer/src/test/java/com/opengamma/strata/pricer/impl/option/BlackFormulaRepositoryTest.java", "license": "apache-2.0", "size": 446198 }
[ "org.assertj.core.api.Assertions", "org.assertj.core.data.Offset" ]
import org.assertj.core.api.Assertions; import org.assertj.core.data.Offset;
import org.assertj.core.api.*; import org.assertj.core.data.*;
[ "org.assertj.core" ]
org.assertj.core;
69,917
public ErrorKind getKind() { final JsonElement value = json.get("kind"); try { return value == null ? ErrorKind.Unknown : ErrorKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { return ErrorKind.Unknown; } }
ErrorKind function() { final JsonElement value = json.get("kind"); try { return value == null ? ErrorKind.Unknown : ErrorKind.valueOf(value.getAsString()); } catch (IllegalArgumentException e) { return ErrorKind.Unknown; } }
/** * What kind of error is this? */
What kind of error is this
getKind
{ "repo_name": "dart-archive/vm_service_drivers", "path": "java/src/org/dartlang/vm/service/element/ErrorObj.java", "license": "bsd-3-clause", "size": 2040 }
[ "com.google.gson.JsonElement" ]
import com.google.gson.JsonElement;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
1,106,452
// ///////////////// // LABEL METHODS // // ///////////////// private boolean synchronizeSockets() { boolean changed = false; List<ConnectorTag> newSocketTags = new ArrayList<ConnectorTag>(); for (ConnectorTag tag : socketTags) { if (tag.getLabel() != null) { this.remove(tag.getLabel().getJComponent(...
boolean function() { boolean changed = false; List<ConnectorTag> newSocketTags = new ArrayList<ConnectorTag>(); for (ConnectorTag tag : socketTags) { if (tag.getLabel() != null) { this.remove(tag.getLabel().getJComponent()); } } for (int i = 0; i < getBlock().getNumSockets(); i++) { BlockConnector socket = getBlock().g...
/** * Synchronizes this RenderableBlock's socket components (including tags, * labels) with the associated Block's list of sockets. Complexity: Running * time for n Block sockets and m Renderable tags: O(m+nm)=O(nm) * * @effects for every socket in Block: (1) check/add corresponding tag * structur...
Synchronizes this RenderableBlock's socket components (including tags, labels) with the associated Block's list of sockets. Complexity: Running time for n Block sockets and m Renderable tags: O(m+nm)=O(nm)
synchronizeSockets
{ "repo_name": "Safety-Harbor-Robotics/TurtleBots", "path": "Arduino/Dev/ArduBlock/openblocks/src/main/java/edu/mit/blocks/renderable/RenderableBlock.java", "license": "artistic-2.0", "size": 76070 }
[ "edu.mit.blocks.codeblocks.BlockConnector", "java.util.ArrayList", "java.util.List" ]
import edu.mit.blocks.codeblocks.BlockConnector; import java.util.ArrayList; import java.util.List;
import edu.mit.blocks.codeblocks.*; import java.util.*;
[ "edu.mit.blocks", "java.util" ]
edu.mit.blocks; java.util;
787,488
public BatchListPresenter getPresenter() { return batchListPresenter; }
BatchListPresenter function() { return batchListPresenter; }
/** * To get presenter. * * @return BatchListPresenter */
To get presenter
getPresenter
{ "repo_name": "kuzavas/ephesoft", "path": "dcma-gwt/dcma-gwt-home/src/main/java/com/ephesoft/dcma/gwt/home/client/BatchListController.java", "license": "agpl-3.0", "size": 3957 }
[ "com.ephesoft.dcma.gwt.home.client.presenter.BatchListPresenter" ]
import com.ephesoft.dcma.gwt.home.client.presenter.BatchListPresenter;
import com.ephesoft.dcma.gwt.home.client.presenter.*;
[ "com.ephesoft.dcma" ]
com.ephesoft.dcma;
1,167,766
boolean updateTaskTrackerStatus(String trackerName, TaskTrackerStatus status) { TaskTracker tt = getTaskTracker(trackerName); TaskTrackerStatus oldStatus = (tt == null) ? null : tt.getStatus(); if (oldStatus != null) { totalMaps -= oldStatus.countMapTasks();...
boolean updateTaskTrackerStatus(String trackerName, TaskTrackerStatus status) { TaskTracker tt = getTaskTracker(trackerName); TaskTrackerStatus oldStatus = (tt == null) ? null : tt.getStatus(); if (oldStatus != null) { totalMaps -= oldStatus.countMapTasks(); totalReduces -= oldStatus.countReduceTasks(); occupiedMapSlot...
/** * Update the last recorded status for the given task tracker. * It assumes that the taskTrackers are locked on entry. * @param trackerName The name of the tracker * @param status The new status for the task tracker * @return Was an old status found? */
Update the last recorded status for the given task tracker. It assumes that the taskTrackers are locked on entry
updateTaskTrackerStatus
{ "repo_name": "leonhong/hadoop-20-warehouse", "path": "src/mapred/org/apache/hadoop/mapred/JobTracker.java", "license": "apache-2.0", "size": 177914 }
[ "java.util.Iterator", "java.util.List", "org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker" ]
import java.util.Iterator; import java.util.List; import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker;
import java.util.*; import org.apache.hadoop.mapreduce.server.jobtracker.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
979,250
Future<WebSiteAsyncOperationResponse> getOperationAsync(String resourceGroupName, String webSiteName, String slotName, String operationId);
Future<WebSiteAsyncOperationResponse> getOperationAsync(String resourceGroupName, String webSiteName, String slotName, String operationId);
/** * You can retrieve details for a web site by issuing an HTTP GET request. * (see http://msdn.microsoft.com/en-us/library/windowsazure/dn167007.aspx * for more information) * * @param resourceGroupName Required. The name of the resource group. * @param webSiteName Required. The name of the we...
You can retrieve details for a web site by issuing an HTTP GET request. (see HREF for more information)
getOperationAsync
{ "repo_name": "southworkscom/azure-sdk-for-java", "path": "resource-management/azure-mgmt-websites/src/main/java/com/microsoft/azure/management/websites/WebSiteOperations.java", "license": "apache-2.0", "size": 60715 }
[ "com.microsoft.azure.management.websites.models.WebSiteAsyncOperationResponse", "java.util.concurrent.Future" ]
import com.microsoft.azure.management.websites.models.WebSiteAsyncOperationResponse; import java.util.concurrent.Future;
import com.microsoft.azure.management.websites.models.*; import java.util.concurrent.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
1,280,656
ReadableUser findById(Long id, MerchantStore store, Language lang);
ReadableUser findById(Long id, MerchantStore store, Language lang);
/** * Find user by id * @param id * @param store * @param lang * @return */
Find user by id
findById
{ "repo_name": "shopizer-ecommerce/shopizer", "path": "sm-shop-model/src/main/java/com/salesmanager/shop/store/controller/user/facade/UserFacade.java", "license": "apache-2.0", "size": 4129 }
[ "com.salesmanager.core.model.merchant.MerchantStore", "com.salesmanager.core.model.reference.language.Language", "com.salesmanager.shop.model.user.ReadableUser" ]
import com.salesmanager.core.model.merchant.MerchantStore; import com.salesmanager.core.model.reference.language.Language; import com.salesmanager.shop.model.user.ReadableUser;
import com.salesmanager.core.model.merchant.*; import com.salesmanager.core.model.reference.language.*; import com.salesmanager.shop.model.user.*;
[ "com.salesmanager.core", "com.salesmanager.shop" ]
com.salesmanager.core; com.salesmanager.shop;
1,652,242
boolean GetDiskFreeSpaceEx(String lpDirectoryName, LongByReference lpFreeBytesAvailable, LongByReference lpTotalNumberOfBytes, LongByReference lpTotalNumberOfFreeBytes);
boolean GetDiskFreeSpaceEx(String lpDirectoryName, LongByReference lpFreeBytesAvailable, LongByReference lpTotalNumberOfBytes, LongByReference lpTotalNumberOfFreeBytes);
/** * Retrieves information about the amount of space that is available on a disk volume, which is the total amount of * space, the total amount of free space, and the total amount of free space available to the user that is * associated with the calling thread. * * @param lpDirectoryNam...
Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space, the total amount of free space, and the total amount of free space available to the user that is associated with the calling thread
GetDiskFreeSpaceEx
{ "repo_name": "paburk/jna", "path": "contrib/platform/src/com/sun/jna/platform/win32/WinNT.java", "license": "lgpl-2.1", "size": 127617 }
[ "com.sun.jna.ptr.LongByReference" ]
import com.sun.jna.ptr.LongByReference;
import com.sun.jna.ptr.*;
[ "com.sun.jna" ]
com.sun.jna;
2,847,276
public void changedUpdate(DocumentEvent e) {}
public void changedUpdate(DocumentEvent e) {}
/** * Enables the save button depending on the value entered for the name. * @see DocumentListener#removeUpdate(DocumentEvent) */
Enables the save button depending on the value entered for the name
removeUpdate
{ "repo_name": "tp81/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/ui/EditorDialog.java", "license": "gpl-2.0", "size": 24518 }
[ "javax.swing.event.DocumentEvent" ]
import javax.swing.event.DocumentEvent;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
2,456,792
protected void transformKeys() throws IOException { keyPos = -1; keys.clear(); final Key prefixKey = super.hasTop() ? new Key(super.getTopKey()) : null; transformRange(new RangeIterator(getSource(), prefixKey, getKeyPrefix()), new KVBuffer() { long appened = 0;
void function() throws IOException { keyPos = -1; keys.clear(); final Key prefixKey = super.hasTop() ? new Key(super.getTopKey()) : null; transformRange(new RangeIterator(getSource(), prefixKey, getKeyPrefix()), new KVBuffer() { long appened = 0;
/** * Reads all keys matching the first key's prefix from the source iterator, transforms them, and * sorts the resulting keys. Transformed keys that fall outside of our seek range or can't be seen * by the user are excluded. */
Reads all keys matching the first key's prefix from the source iterator, transforms them, and sorts the resulting keys. Transformed keys that fall outside of our seek range or can't be seen by the user are excluded
transformKeys
{ "repo_name": "phrocker/accumulo-1", "path": "core/src/main/java/org/apache/accumulo/core/iterators/user/TransformingIterator.java", "license": "apache-2.0", "size": 30130 }
[ "java.io.IOException", "org.apache.accumulo.core.data.Key" ]
import java.io.IOException; import org.apache.accumulo.core.data.Key;
import java.io.*; import org.apache.accumulo.core.data.*;
[ "java.io", "org.apache.accumulo" ]
java.io; org.apache.accumulo;
2,569,066
@ThriftMethod("trinoListSchemaNames") List<String> listSchemaNames() throws TrinoThriftServiceException, TException; /** * Returns tables for the given schema name. * * @param schemaNameOrNull a structure containing schema name or {@literal null}
@ThriftMethod(STR) List<String> listSchemaNames() throws TrinoThriftServiceException, TException; /** * Returns tables for the given schema name. * * @param schemaNameOrNull a structure containing schema name or {@literal null}
/** * Returns available schema names. */
Returns available schema names
listSchemaNames
{ "repo_name": "losipiuk/presto", "path": "plugin/trino-thrift-api/src/main/java/io/trino/plugin/thrift/api/TrinoThriftService.java", "license": "apache-2.0", "size": 5882 }
[ "io.airlift.drift.TException", "io.airlift.drift.annotations.ThriftMethod", "java.util.List" ]
import io.airlift.drift.TException; import io.airlift.drift.annotations.ThriftMethod; import java.util.List;
import io.airlift.drift.*; import io.airlift.drift.annotations.*; import java.util.*;
[ "io.airlift.drift", "java.util" ]
io.airlift.drift; java.util;
2,365,782
private void checkForInvalidPlaceholders(String message) throws IllegalArgumentException { Matcher matcher = PATTERN.matcher(message); while (matcher.find()) { String match = matcher.group(); if (!ALLOWED_PLACEHOLDERS.contains(match)) { throw new IllegalArgumentException("Placeholder [" + match + "] is...
void function(String message) throws IllegalArgumentException { Matcher matcher = PATTERN.matcher(message); while (matcher.find()) { String match = matcher.group(); if (!ALLOWED_PLACEHOLDERS.contains(match)) { throw new IllegalArgumentException(STR + match + STR); } } }
/** * Checks to see if the supplied <code>String</code> has any placeholders * that are not specified as constants on this class and throws an * <code>IllegalArgumentException</code> if so. */
Checks to see if the supplied <code>String</code> has any placeholders that are not specified as constants on this class and throws an <code>IllegalArgumentException</code> if so
checkForInvalidPlaceholders
{ "repo_name": "cbeams-archive/spring-framework-2.5.x", "path": "src/org/springframework/aop/interceptor/CustomizableTraceInterceptor.java", "license": "apache-2.0", "size": 17105 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,924,963
void returnOutputBuffer(BufferObjectDataOutput out);
void returnOutputBuffer(BufferObjectDataOutput out);
/** * Returns a BufferObjectDataOutput back to the pool. * * The implementation is free to not return the instance to the pool but just close it. * * @param out the BufferObjectDataOutput. */
Returns a BufferObjectDataOutput back to the pool. The implementation is free to not return the instance to the pool but just close it
returnOutputBuffer
{ "repo_name": "mdogan/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/bufferpool/BufferPool.java", "license": "apache-2.0", "size": 2322 }
[ "com.hazelcast.internal.nio.BufferObjectDataOutput" ]
import com.hazelcast.internal.nio.BufferObjectDataOutput;
import com.hazelcast.internal.nio.*;
[ "com.hazelcast.internal" ]
com.hazelcast.internal;
2,336,940
void preStopRegionServer( final ObserverContext<RegionServerCoprocessorEnvironment> env) throws IOException;
void preStopRegionServer( final ObserverContext<RegionServerCoprocessorEnvironment> env) throws IOException;
/** * Called before stopping region server. * @param env An instance of RegionServerCoprocessorEnvironment * @throws IOException Signals that an I/O exception has occurred. */
Called before stopping region server
preStopRegionServer
{ "repo_name": "toshimasa-nasu/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionServerObserver.java", "license": "apache-2.0", "size": 5053 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,576,310
public static int getDimensionForDevice(Context ctx, int phoneResId, int tabletResId, int xlargeTabletResId) { return getDimensionForDevice(ctx, phoneResId, phoneResId, tabletResId, tabletResId, xlargeTabletResId, xlargeTabletResId); }
static int function(Context ctx, int phoneResId, int tabletResId, int xlargeTabletResId) { return getDimensionForDevice(ctx, phoneResId, phoneResId, tabletResId, tabletResId, xlargeTabletResId, xlargeTabletResId); }
/** * Retrieves resources that are constant regardless of the current configuration of the device. */
Retrieves resources that are constant regardless of the current configuration of the device
getDimensionForDevice
{ "repo_name": "xorware/android_frameworks_base", "path": "packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java", "license": "apache-2.0", "size": 57317 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,297,163
public static Boolean nullAttribute(HttpServletRequest request, String name) { HttpSession session = request.getSession(false); if (session != null && name != null) { return (session.getAttribute(name) == null); } return true; }
static Boolean function(HttpServletRequest request, String name) { HttpSession session = request.getSession(false); if (session != null && name != null) { return (session.getAttribute(name) == null); } return true; }
/** * returns true if a given attribute is null * * @param request * @param name * */
returns true if a given attribute is null
nullAttribute
{ "repo_name": "feesa/easyrec-parent", "path": "easyrec-core/src/main/java/org/easyrec/util/core/Security.java", "license": "apache-2.0", "size": 8459 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpSession" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,128,338
public void render() { if (items.size != 0 && items.get(0).getTexture() != null) { batch.begin(); batch.draw((items.get(0)).getTexture(), x, y, width, height); batch.end(); batch.begin(); font.draw(batch, Integer.toString(items.size), x + 20, y + 1...
void function() { if (items.size != 0 && items.get(0).getTexture() != null) { batch.begin(); batch.draw((items.get(0)).getTexture(), x, y, width, height); batch.end(); batch.begin(); font.draw(batch, Integer.toString(items.size), x + 20, y + 10); batch.end(); } if (isColliding(Input.getX(), Input.getY())) { String name...
/** * Render the ItemStack */
Render the ItemStack
render
{ "repo_name": "JonnyXDA/Station-Defender", "path": "core/src/com/aston/group/stationdefender/gamesetting/items/helpers/ItemStack.java", "license": "gpl-3.0", "size": 4407 }
[ "com.aston.group.stationdefender.utils.Input", "com.badlogic.gdx.graphics.Color" ]
import com.aston.group.stationdefender.utils.Input; import com.badlogic.gdx.graphics.Color;
import com.aston.group.stationdefender.utils.*; import com.badlogic.gdx.graphics.*;
[ "com.aston.group", "com.badlogic.gdx" ]
com.aston.group; com.badlogic.gdx;
1,629,119
public static String crypt(final String original) { return crypt(original.getBytes(StandardCharsets.UTF_8)); }
static String function(final String original) { return crypt(original.getBytes(StandardCharsets.UTF_8)); }
/** * Generates a crypt(3) compatible hash using the DES algorithm. * <p> * A salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using * {@link SecureRandom} to generate your own salts and calling {@link #crypt(String, String)}. * </p> * * @param...
Generates a crypt(3) compatible hash using the DES algorithm. A salt is generated for you using <code>ThreadLocalRandom</code>; for more secure salts consider using <code>SecureRandom</code> to generate your own salts and calling <code>#crypt(String, String)</code>.
crypt
{ "repo_name": "apache/commons-codec", "path": "src/main/java/org/apache/commons/codec/digest/UnixCrypt.java", "license": "apache-2.0", "size": 24143 }
[ "java.nio.charset.StandardCharsets" ]
import java.nio.charset.StandardCharsets;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
1,260,641
@javax.annotation.Nullable @ApiModelProperty(value = "") public V1alpha2IssuerSpecAcmeDns01Route53 getRoute53() { return route53; }
@javax.annotation.Nullable @ApiModelProperty(value = "") V1alpha2IssuerSpecAcmeDns01Route53 function() { return route53; }
/** * Get route53 * * @return route53 */
Get route53
getRoute53
{ "repo_name": "kubernetes-client/java", "path": "client-java-contrib/cert-manager/src/main/java/io/cert/manager/models/V1alpha2IssuerSpecAcmeDns01.java", "license": "apache-2.0", "size": 11821 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,248,243
public void start(Point point) { first = point; bounds = new Rectangle(first); }
void function(Point point) { first = point; bounds = new Rectangle(first); }
/** * Starts the rubberband selection at the given point. */
Starts the rubberband selection at the given point
start
{ "repo_name": "3w3rt0n/AmeacasInternas", "path": "src/com/mxgraph/swing/handler/mxRubberband.java", "license": "apache-2.0", "size": 7184 }
[ "java.awt.Point", "java.awt.Rectangle" ]
import java.awt.Point; import java.awt.Rectangle;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,685,679
public static FontMetrics[] loadFontMetrics(Graphics g, Font[] font) { // Creates the font metrics from a font parsed into the method and returns a FontMetrics Array. fm = new FontMetrics[3]; fm[0] = g.getFontMetrics(font[0]); fm[1] = g.getFontMetrics(font[1]); fm[2] = g.getFontMetrics(font[2]); return f...
static FontMetrics[] function(Graphics g, Font[] font) { fm = new FontMetrics[3]; fm[0] = g.getFontMetrics(font[0]); fm[1] = g.getFontMetrics(font[1]); fm[2] = g.getFontMetrics(font[2]); return fm; }
/** * <i><b>loadFontMetrics</b></i> * <pre> public static FontMetrics[] loadFontMetrics(Graphics g, * Font[] font)</pre> * <p>This method used the parsed values to create a FontMetrics array, that has each one of the states (e.g. italics, bold, basic).</p> * @para...
loadFontMetrics <code> public static FontMetrics[] loadFontMetrics(Graphics g, Font[] font)</code> This method used the parsed values to create a FontMetrics array, that has each one of the states (e.g. italics, bold, basic)
loadFontMetrics
{ "repo_name": "VilePoison/JavaGame", "path": "Game/src/dev/lucas/game/gfx/FontLoader.java", "license": "gpl-3.0", "size": 2587 }
[ "java.awt.Font", "java.awt.FontMetrics", "java.awt.Graphics" ]
import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,436,839
private String addDataHandler(DataHandler dh, boolean isSWA) { String cid = null; OMText textNode = null; // If this is an MTOMXMLStreamWriter then inform the writer // that it must write out this attachment (I guess we should do this // even if the attachment...
String function(DataHandler dh, boolean isSWA) { String cid = null; OMText textNode = null; if (isSWA) { if (log.isDebugEnabled()){ log.debug(STR); } textNode = new OMTextImpl(dh, null); cid = textNode.getContentID(); addDataHandler(dh, cid); } else { if (log.isDebugEnabled()){ log.debug(STR); } if (writer instanceof M...
/** * Add the DataHandler to the writer and context * @param dh * @return */
Add the DataHandler to the writer and context
addDataHandler
{ "repo_name": "manuranga/wso2-axis2", "path": "modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java", "license": "apache-2.0", "size": 10929 }
[ "javax.activation.DataHandler", "org.apache.axiom.om.OMText", "org.apache.axiom.om.impl.MTOMXMLStreamWriter", "org.apache.axiom.om.impl.llom.OMTextImpl" ]
import javax.activation.DataHandler; import org.apache.axiom.om.OMText; import org.apache.axiom.om.impl.MTOMXMLStreamWriter; import org.apache.axiom.om.impl.llom.OMTextImpl;
import javax.activation.*; import org.apache.axiom.om.*; import org.apache.axiom.om.impl.*; import org.apache.axiom.om.impl.llom.*;
[ "javax.activation", "org.apache.axiom" ]
javax.activation; org.apache.axiom;
2,819,641
public PermissionsSystemType setup() { // Define the plugin manager final PluginManager pm = this.server.getPluginManager(); // Reset used permissions system type permsType = PermissionsSystemType.NONE; // PermissionsEx, check if it's available try { Plu...
PermissionsSystemType function() { final PluginManager pm = this.server.getPluginManager(); permsType = PermissionsSystemType.NONE; try { Plugin pex = pm.getPlugin(STR); if (pex != null) { PermissionManager pexPerms = PermissionsEx.getPermissionManager(); if (pexPerms != null) { permsType = PermissionsSystemType.PERMIS...
/** * Setup and hook into the permissions systems. * * @return The detected permissions system. */
Setup and hook into the permissions systems
setup
{ "repo_name": "sgdc3/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/permission/PermissionsManager.java", "license": "gpl-3.0", "size": 34063 }
[ "com.nijikokun.bukkit.Permissions", "net.milkbowl.vault.permission.Permission", "org.anjocaido.groupmanager.GroupManager", "org.bukkit.Bukkit", "org.bukkit.plugin.Plugin", "org.bukkit.plugin.PluginManager", "org.bukkit.plugin.RegisteredServiceProvider", "org.tyrannyofheaven.bukkit.zPermissions.ZPermis...
import com.nijikokun.bukkit.Permissions; import net.milkbowl.vault.permission.Permission; import org.anjocaido.groupmanager.GroupManager; import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.RegisteredServiceProvider; import org.tyrannyofheaven.bukk...
import com.nijikokun.bukkit.*; import net.milkbowl.vault.permission.*; import org.anjocaido.groupmanager.*; import org.bukkit.*; import org.bukkit.plugin.*; import org.tyrannyofheaven.bukkit.*; import ru.tehkode.permissions.*; import ru.tehkode.permissions.bukkit.*;
[ "com.nijikokun.bukkit", "net.milkbowl.vault", "org.anjocaido.groupmanager", "org.bukkit", "org.bukkit.plugin", "org.tyrannyofheaven.bukkit", "ru.tehkode.permissions" ]
com.nijikokun.bukkit; net.milkbowl.vault; org.anjocaido.groupmanager; org.bukkit; org.bukkit.plugin; org.tyrannyofheaven.bukkit; ru.tehkode.permissions;
878,841
Image img = new Image(imageResource); DOM.insertChild(getElement(), img.getElement(), 0); }
Image img = new Image(imageResource); DOM.insertChild(getElement(), img.getElement(), 0); }
/** * Attach an ImageResource to the button. * * @param imageResource imageResource */
Attach an ImageResource to the button
setResource
{ "repo_name": "geomajas/geomajas-project-sld-editor", "path": "expert-gwt2/src/main/java/org/geomajas/sld/editor/expert/gwt2/client/SldEditorToolBarButton.java", "license": "agpl-3.0", "size": 1433 }
[ "com.google.gwt.user.client.DOM", "com.google.gwt.user.client.ui.Image" ]
import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.*; import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
2,434,841
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<VMResourcesInner>> listVMHostsSinglePageAsync( String resourceGroupName, String monitorName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentEx...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<VMResourcesInner>> function( String resourceGroupName, String monitorName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalAr...
/** * List the compute resources currently being monitored by the Logz main account resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the v...
List the compute resources currently being monitored by the Logz main account resource
listVMHostsSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsClientImpl.java", "license": "mit", "size": 40237 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.logz.fluent.models.VMResourcesInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.logz.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
849,417
@NotNull private static IgniteCache<Integer, double[]> fillTrainingData(Ignite ignite, CacheConfiguration<Integer, double[]> trainingSetCfg) { IgniteCache<Integer, double[]> trainingSet = ignite.getOrCreateCache(trainingSetCfg); for (int i = -50; i <= 50; i++) { double x = ((doub...
@NotNull static IgniteCache<Integer, double[]> function(Ignite ignite, CacheConfiguration<Integer, double[]> trainingSetCfg) { IgniteCache<Integer, double[]> trainingSet = ignite.getOrCreateCache(trainingSetCfg); for (int i = -50; i <= 50; i++) { double x = ((double)i) / 10.0; double y = Math.sin(x) < 0 ? 0.0 : 1.0; tr...
/** * Fill meander-like training data. * * @param ignite Ignite instance. * @param trainingSetCfg Training set config. */
Fill meander-like training data
fillTrainingData
{ "repo_name": "NSAmelchev/ignite", "path": "examples/src/main/java/org/apache/ignite/examples/ml/inference/exchange/GDBOnTreesClassificationExportImportExample.java", "license": "apache-2.0", "size": 6401 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.IgniteCache", "org.apache.ignite.configuration.CacheConfiguration", "org.jetbrains.annotations.NotNull" ]
import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.CacheConfiguration; import org.jetbrains.annotations.NotNull;
import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
769,974
private boolean authenticateLocally ( String userName, String userPassword, String databaseName ) throws StandardException, SQLException { userName = IdUtil.getUserAuthorizationId( userName ) ; // // Special bootstrap code. If we are creat...
boolean function ( String userName, String userPassword, String databaseName ) throws StandardException, SQLException { userName = IdUtil.getUserAuthorizationId( userName ) ; { _creatingCredentialsDB = false; TransactionController tc = getTransaction(); SystemProcedures.addUser( userName, userPassword, tc ); tc.commit(...
/** * Authenticate the passed-in credentials against the local database. * * @param userName The user's name used to connect to JBMS system * @param userPassword The user's password used to connect to JBMS system * @param databaseName The database which the user wants to connect to. */
Authenticate the passed-in credentials against the local database
authenticateLocally
{ "repo_name": "trejkaz/derby", "path": "java/engine/org/apache/derby/impl/jdbc/authentication/NativeAuthenticationServiceImpl.java", "license": "apache-2.0", "size": 22981 }
[ "java.sql.SQLException", "java.util.Arrays", "org.apache.derby.catalog.SystemProcedures", "org.apache.derby.iapi.error.SQLWarningFactory", "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.reference.Property", "org.apache.derby.iapi.reference.SQLState", "org.apache.derby.iapi.sql...
import java.sql.SQLException; import java.util.Arrays; import org.apache.derby.catalog.SystemProcedures; import org.apache.derby.iapi.error.SQLWarningFactory; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.reference.Property; import org.apache.derby.iapi.reference.SQLState; import or...
import java.sql.*; import java.util.*; import org.apache.derby.catalog.*; import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.reference.*; import org.apache.derby.iapi.sql.dictionary.*; import org.apache.derby.iapi.store.access.*; import org.apache.derby.iapi.util.*;
[ "java.sql", "java.util", "org.apache.derby" ]
java.sql; java.util; org.apache.derby;
1,625,567
private IgniteFuture<Void> loadCacheAsync0(BinaryRawReaderEx reader, boolean loc) { PlatformCacheEntryFilter filter = createPlatformCacheEntryFilter(reader); Object[] args = readLoadCacheArgs(reader); if (loc) return cache.localLoadCacheAsync(filter, args); else ...
IgniteFuture<Void> function(BinaryRawReaderEx reader, boolean loc) { PlatformCacheEntryFilter filter = createPlatformCacheEntryFilter(reader); Object[] args = readLoadCacheArgs(reader); if (loc) return cache.localLoadCacheAsync(filter, args); else return cache.loadCacheAsync(filter, args); }
/** * Asynchronously loads cache via localLoadCacheAsync or loadCacheAsync. * * @param reader Binary reader. * @param loc Local flag. * @return Cache async operation future. */
Asynchronously loads cache via localLoadCacheAsync or loadCacheAsync
loadCacheAsync0
{ "repo_name": "SomeFire/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java", "license": "apache-2.0", "size": 57541 }
[ "org.apache.ignite.internal.binary.BinaryRawReaderEx", "org.apache.ignite.lang.IgniteFuture" ]
import org.apache.ignite.internal.binary.BinaryRawReaderEx; import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.internal.binary.*; import org.apache.ignite.lang.*;
[ "org.apache.ignite" ]
org.apache.ignite;
552,307
List<Actoah> selectByExample(ActoahExample example);
List<Actoah> selectByExample(ActoahExample example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ACTOAH * * @mbggenerated Sun Nov 21 21:36:05 CST 2010 */
This method was generated by MyBatis Generator. This method corresponds to the database table ACTOAH
selectByExample
{ "repo_name": "rongshang/fbi-cbs2", "path": "common/main/java/cbs/repository/account/maininfo/dao/ActoahMapper.java", "license": "unlicense", "size": 2010 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,561,753
@BeanTagAttribute(name = "calculationFunctionExtraData") public String getCalculationFunctionExtraData() { return calculationFunctionExtraData; }
@BeanTagAttribute(name = STR) String function() { return calculationFunctionExtraData; }
/** * This specifies extra data to be sent to the calculation function. This can be any valid javascript value * (number, string, JSON - for passing multiple settings, etc). * <br/> * <b>The function specified by calculationFunctionName MUST take a second parameter when using this option.</b> ...
This specifies extra data to be sent to the calculation function. This can be any valid javascript value (number, string, JSON - for passing multiple settings, etc). The function specified by calculationFunctionName MUST take a second parameter when using this option
getCalculationFunctionExtraData
{ "repo_name": "ricepanda/rice-git3", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/util/ColumnCalculationInfo.java", "license": "apache-2.0", "size": 12463 }
[ "org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute" ]
import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
import org.kuali.rice.krad.datadictionary.parse.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,737,428
public boolean isConfigurableMandatory(String key, PageContext pageContext) { // TODO get is mandatory or not from the cache. Map mandatoryMap = (Map) pageContext.getSession().getAttribute("ConfigurableMandatory"); if (mandatoryMap == null) { return false; } retu...
boolean function(String key, PageContext pageContext) { Map mandatoryMap = (Map) pageContext.getSession().getAttribute(STR); if (mandatoryMap == null) { return false; } return mandatoryMap.containsKey(key); }
/** * The method is used to check, if the element associated with the key is * configurable mandatory or not. * * @param key * -- The key used to determine if the element associated with is * configurable mandatory or not * @return true if the element associated ...
The method is used to check, if the element associated with the key is configurable mandatory or not
isConfigurableMandatory
{ "repo_name": "vorburger/mifos-head", "path": "application/src/main/java/org/mifos/framework/util/helpers/LabelTagUtils.java", "license": "apache-2.0", "size": 7468 }
[ "java.util.Map", "javax.servlet.jsp.PageContext" ]
import java.util.Map; import javax.servlet.jsp.PageContext;
import java.util.*; import javax.servlet.jsp.*;
[ "java.util", "javax.servlet" ]
java.util; javax.servlet;
169,435
public void computeInfoflow(String appPath, String libPath, IEntryPointCreator entryPointCreator, List<String> sources, List<String> sinks);
void function(String appPath, String libPath, IEntryPointCreator entryPointCreator, List<String> sources, List<String> sinks);
/** * Computes the information flow on a list of entry point methods. This list * is used to construct an artificial main method following the Android * life cycle for all methods that are detected to be part of Android's * application infrastructure (e.g. android.app.Activity.onCreate) * @param appPath The p...
Computes the information flow on a list of entry point methods. This list is used to construct an artificial main method following the Android life cycle for all methods that are detected to be part of Android's application infrastructure (e.g. android.app.Activity.onCreate)
computeInfoflow
{ "repo_name": "secure-software-engineering/soot-infoflow", "path": "src/soot/jimple/infoflow/IInfoflow.java", "license": "lgpl-2.1", "size": 7853 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,640,851
@VisibleForTesting public RemoteIterator<S3ALocatedFileStatus> createLocatedFileStatusIterator( RemoteIterator<S3AFileStatus> statusIterator) { return RemoteIterators.mappingRemoteIterator( statusIterator, listingOperationCallbacks::toLocatedFileStatus); }
RemoteIterator<S3ALocatedFileStatus> function( RemoteIterator<S3AFileStatus> statusIterator) { return RemoteIterators.mappingRemoteIterator( statusIterator, listingOperationCallbacks::toLocatedFileStatus); }
/** * Create a located status iterator over a file status iterator. * @param statusIterator an iterator over the remote status entries * @return a new remote iterator */
Create a located status iterator over a file status iterator
createLocatedFileStatusIterator
{ "repo_name": "nandakumar131/hadoop", "path": "hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/Listing.java", "license": "apache-2.0", "size": 38679 }
[ "org.apache.hadoop.fs.RemoteIterator", "org.apache.hadoop.util.functional.RemoteIterators" ]
import org.apache.hadoop.fs.RemoteIterator; import org.apache.hadoop.util.functional.RemoteIterators;
import org.apache.hadoop.fs.*; import org.apache.hadoop.util.functional.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
173,735
public ServiceFuture<Void> resetServicePrincipalProfileAsync(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(resetServicePrincipalProfileWithServiceResponseAsync(resourceGroupNam...
ServiceFuture<Void> function(String resourceGroupName, String resourceName, ManagedClusterServicePrincipalProfile parameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(resetServicePrincipalProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters), serviceCallbac...
/** * Reset Service Principal Profile of a managed cluster. * Update the service principal Profile for a managed cluster. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. * @param parameters Parameters supplied to ...
Reset Service Principal Profile of a managed cluster. Update the service principal Profile for a managed cluster
resetServicePrincipalProfileAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerservice/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_04_01/implementation/ManagedClustersInner.java", "license": "mit", "size": 126956 }
[ "com.microsoft.azure.management.containerservice.v2019_04_01.ManagedClusterServicePrincipalProfile", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.containerservice.v2019_04_01.ManagedClusterServicePrincipalProfile; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.containerservice.v2019_04_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,471,185
public static Status.TermIndexStatus testPostings(AtomicReader reader, PrintStream infoStream) throws IOException { return testPostings(reader, infoStream, false, false); }
static Status.TermIndexStatus function(AtomicReader reader, PrintStream infoStream) throws IOException { return testPostings(reader, infoStream, false, false); }
/** * Test the term index. * @lucene.experimental */
Test the term index
testPostings
{ "repo_name": "smartan/lucene", "path": "src/main/java/org/apache/lucene/index/CheckIndex.java", "license": "apache-2.0", "size": 84355 }
[ "java.io.IOException", "java.io.PrintStream" ]
import java.io.IOException; import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
710,296
public void setHostServices(Optional<HostServices> hostServices) { this.hostServices = hostServices.orElse(null); }
void function(Optional<HostServices> hostServices) { this.hostServices = hostServices.orElse(null); }
/** * The host services of the application, used for things like showing web pages. * * @param hostServices * Application's host services. */
The host services of the application, used for things like showing web pages
setHostServices
{ "repo_name": "MelvinWM/Various", "path": "CircleFractal/JavaFX/circle-fractal-javafx/src/main/java/org/melvinwm/circlefractal/javafx/CircleFractalMainController.java", "license": "mit", "size": 8258 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
231,696
public ByteBuffer get(byte[] array) throws ModeChangeException { if (_mode == BufferMode.READ) { return _buffer.get(array); } else { throw new ModeChangeException("get(byte[] array)", _mode); } }
ByteBuffer function(byte[] array) throws ModeChangeException { if (_mode == BufferMode.READ) { return _buffer.get(array); } else { throw new ModeChangeException(STR, _mode); } }
/** * Read byte array * * @param array * @return * @throws ModeChangeException */
Read byte array
get
{ "repo_name": "docbender/openhab", "path": "bundles/binding/org.openhab.binding.simplebinary/src/main/java/org/openhab/binding/simplebinary/internal/SimpleBinaryByteBuffer.java", "license": "epl-1.0", "size": 5669 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,067,649
public Operator getOperator() { return operator; }
Operator function() { return operator; }
/** * Liefert das Attribut operator * * @return Wert von operator */
Liefert das Attribut operator
getOperator
{ "repo_name": "junit-tools-team/junit-tools", "path": "org.junit.tools/src/org/junit/tools/generator/TestCasesGenerator.java", "license": "apache-2.0", "size": 22881 }
[ "org.eclipse.jdt.core.dom.InfixExpression" ]
import org.eclipse.jdt.core.dom.InfixExpression;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
559,736
public boolean popDirname() { mDirectories.remove(mDirectories.getItem(0)); return !mDirectories.isEmpty(); } // Custom array adapter to override text colors private class CustomArrayAdapter<T> extends ArrayAdapter<T> { public CustomArrayAdapter(FileDisplayActivity ctx, int vie...
boolean function() { mDirectories.remove(mDirectories.getItem(0)); return !mDirectories.isEmpty(); } private class CustomArrayAdapter<T> extends ArrayAdapter<T> { public CustomArrayAdapter(FileDisplayActivity ctx, int view) { super(ctx, view); }
/** * Pops a directory name from the drop down list * @return True, unless the stack is empty */
Pops a directory name from the drop down list
popDirname
{ "repo_name": "Godine/android", "path": "src/com/owncloud/android/ui/activity/FileDisplayActivity.java", "license": "gpl-2.0", "size": 81163 }
[ "android.widget.ArrayAdapter" ]
import android.widget.ArrayAdapter;
import android.widget.*;
[ "android.widget" ]
android.widget;
235,835
public synchronized JInternalFrame getCurrentInternalFrame() { JInternalFrame internalFrame; JInternalFrame[] frames; internalFrame = _desktop.getSelectedFrame(); if (internalFrame == null) { frames = _desktop.getAllFrames(); if (frames.length > 0) { try { frames[0].setS...
synchronized JInternalFrame function() { JInternalFrame internalFrame; JInternalFrame[] frames; internalFrame = _desktop.getSelectedFrame(); if (internalFrame == null) { frames = _desktop.getAllFrames(); if (frames.length > 0) { try { frames[0].setSelected(true); internalFrame = frames[0]; } catch (PropertyVetoExceptio...
/** * Returns the currently selected internal frame If none is selected, then the * first one will be selected. * * @return JInternalFrame */
Returns the currently selected internal frame If none is selected, then the first one will be selected
getCurrentInternalFrame
{ "repo_name": "pgdurand/jGAF", "path": "src/com/plealog/genericapp/ui/desktop/GDesktopPane.java", "license": "apache-2.0", "size": 3051 }
[ "java.beans.PropertyVetoException", "javax.swing.JInternalFrame" ]
import java.beans.PropertyVetoException; import javax.swing.JInternalFrame;
import java.beans.*; import javax.swing.*;
[ "java.beans", "javax.swing" ]
java.beans; javax.swing;
868,809
protected void removeDuplicates(final List<TupleStoreName> localTables) throws StorageManagerException { // No local table is known, so no configuration is known if(localTables.isEmpty()) { return; } final TupleStoreManager storageManager = clientConnectionHandler .getStorageRegistry() .getTuple...
void function(final List<TupleStoreName> localTables) throws StorageManagerException { if(localTables.isEmpty()) { return; } final TupleStoreManager storageManager = clientConnectionHandler .getStorageRegistry() .getTupleStoreManager(localTables.get(0)); final DuplicateResolver<Tuple> duplicateResolver = TupleDuplicate...
/** * Remove the duplicates for the given key * @param localTables * @throws StorageManagerException */
Remove the duplicates for the given key
removeDuplicates
{ "repo_name": "jnidzwetzki/bboxdb", "path": "bboxdb-server/src/main/java/org/bboxdb/network/server/query/KeyClientQuery.java", "license": "apache-2.0", "size": 7194 }
[ "java.util.List", "org.bboxdb.commons.DuplicateResolver", "org.bboxdb.storage.StorageManagerException", "org.bboxdb.storage.entity.Tuple", "org.bboxdb.storage.entity.TupleStoreName", "org.bboxdb.storage.sstable.duplicateresolver.TupleDuplicateResolverFactory", "org.bboxdb.storage.tuplestore.manager.Tupl...
import java.util.List; import org.bboxdb.commons.DuplicateResolver; import org.bboxdb.storage.StorageManagerException; import org.bboxdb.storage.entity.Tuple; import org.bboxdb.storage.entity.TupleStoreName; import org.bboxdb.storage.sstable.duplicateresolver.TupleDuplicateResolverFactory; import org.bboxdb.storage.tup...
import java.util.*; import org.bboxdb.commons.*; import org.bboxdb.storage.*; import org.bboxdb.storage.entity.*; import org.bboxdb.storage.sstable.duplicateresolver.*; import org.bboxdb.storage.tuplestore.manager.*;
[ "java.util", "org.bboxdb.commons", "org.bboxdb.storage" ]
java.util; org.bboxdb.commons; org.bboxdb.storage;
2,598,884
static boolean isGetProp(Node n) { return n.getType() == Token.GETPROP; }
static boolean isGetProp(Node n) { return n.getType() == Token.GETPROP; }
/** * Is this a GETPROP node? */
Is this a GETPROP node
isGetProp
{ "repo_name": "nuxleus/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeUtil.java", "license": "apache-2.0", "size": 89782 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
193,517
public Map<byte[], Long> getMaxStoreSeqIdForLogReplay() { return this.maxSeqIdInStores; }
Map<byte[], Long> function() { return this.maxSeqIdInStores; }
/** * Gets max sequence ids of stores that was read from storage when this region was opened. WAL * Edits with smaller or equal sequence number will be skipped from replay. */
Gets max sequence ids of stores that was read from storage when this region was opened. WAL Edits with smaller or equal sequence number will be skipped from replay
getMaxStoreSeqIdForLogReplay
{ "repo_name": "intel-hadoop/hbase-rhino", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java", "license": "apache-2.0", "size": 236546 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
903,484
EAttribute getEPatch_Name();
EAttribute getEPatch_Name();
/** * Returns the meta object for the attribute '{@link org.eclipse.xtext.parser.epatch.epatchTestLanguage.EPatch#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see org.eclipse.xtext.parser.epatch.epatchTestLangua...
Returns the meta object for the attribute '<code>org.eclipse.xtext.parser.epatch.epatchTestLanguage.EPatch#getName Name</code>'.
getEPatch_Name
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parser/epatch/epatchTestLanguage/EpatchTestLanguagePackage.java", "license": "epl-1.0", "size": 81411 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
199,335
private void addManyKassenzeichenToList(final List<Integer> kassenzeichenList) { addManyKassenzeichenToList(kassenzeichenList, !jCheckBox1.isSelected()); }
void function(final List<Integer> kassenzeichenList) { addManyKassenzeichenToList(kassenzeichenList, !jCheckBox1.isSelected()); }
/** * DOCUMENT ME! * * @param kassenzeichenList DOCUMENT ME! */
DOCUMENT ME
addManyKassenzeichenToList
{ "repo_name": "cismet/verdis", "path": "src/main/java/de/cismet/verdis/gui/KassenzeichenListPanel.java", "license": "gpl-3.0", "size": 66008 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,212,085
public ArrayList<ReleaseTask> getTasksForTaskGroup( final String project, final int releaseId, final int environmentId, final int releaseDeployPhaseId) { final UUID locationId = UUID.fromString("4259191d-4b0a-4409-9fb3-09f22ab9bc47"); //$NON-NLS-1$ final ApiResou...
ArrayList<ReleaseTask> function( final String project, final int releaseId, final int environmentId, final int releaseDeployPhaseId) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); r...
/** * [Preview API 3.1-preview.2] * * @param project * Project ID or project name * @param releaseId * * @param environmentId * * @param releaseDeployPhaseId * * @return ArrayList&lt;ReleaseTask&gt; */
[Preview API 3.1-preview.2]
getTasksForTaskGroup
{ "repo_name": "Microsoft/vso-httpclient-java", "path": "Rest/alm-releasemanagement-client/src/main/generated/com/microsoft/alm/visualstudio/services/releasemanagement/webapi/ReleaseHttpClientBase.java", "license": "mit", "size": 186198 }
[ "com.fasterxml.jackson.core.type.TypeReference", "com.microsoft.alm.client.HttpMethod", "com.microsoft.alm.client.VssMediaTypes", "com.microsoft.alm.client.VssRestRequest", "com.microsoft.alm.visualstudio.services.releasemanagement.webapi.ReleaseTask", "com.microsoft.alm.visualstudio.services.webapi.ApiRe...
import com.fasterxml.jackson.core.type.TypeReference; import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.ReleaseTask; import com.microsoft.alm.visualstudio.serv...
import com.fasterxml.jackson.core.type.*; import com.microsoft.alm.client.*; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*;
[ "com.fasterxml.jackson", "com.microsoft.alm", "java.util" ]
com.fasterxml.jackson; com.microsoft.alm; java.util;
321,899
private SendfileState processSendfile(SocketWrapperBase<?> socketWrapper) { openSocket = keepAlive; // Done is equivalent to sendfile not being used SendfileState result = SendfileState.DONE; // Do sendfile as needed: add socket to sendfile and end if (sendfileData != null &&...
SendfileState function(SocketWrapperBase<?> socketWrapper) { openSocket = keepAlive; SendfileState result = SendfileState.DONE; if (sendfileData != null && !getErrorState().isError()) { if (keepAlive) { if (available(false) == 0) { sendfileData.keepAliveState = SendfileKeepAliveState.OPEN; } else { sendfileData.keepAli...
/** * Trigger sendfile processing if required. * * @return The state of send file processing */
Trigger sendfile processing if required
processSendfile
{ "repo_name": "apache/tomcat", "path": "java/org/apache/coyote/http11/Http11Processor.java", "license": "apache-2.0", "size": 55568 }
[ "org.apache.coyote.ErrorState", "org.apache.tomcat.util.net.SendfileKeepAliveState", "org.apache.tomcat.util.net.SendfileState", "org.apache.tomcat.util.net.SocketWrapperBase" ]
import org.apache.coyote.ErrorState; import org.apache.tomcat.util.net.SendfileKeepAliveState; import org.apache.tomcat.util.net.SendfileState; import org.apache.tomcat.util.net.SocketWrapperBase;
import org.apache.coyote.*; import org.apache.tomcat.util.net.*;
[ "org.apache.coyote", "org.apache.tomcat" ]
org.apache.coyote; org.apache.tomcat;
2,004,702
public Builder addHeaders(Iterable<Artifact> headers) { this.headers.addAll(headers); return this; }
Builder function(Iterable<Artifact> headers) { this.headers.addAll(headers); return this; }
/** * Adds to the header files of this target. It needs not to include the header files of * dependencies. */
Adds to the header files of this target. It needs not to include the header files of dependencies
addHeaders
{ "repo_name": "UrbanCompass/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/XcodeProvider.java", "license": "apache-2.0", "size": 34466 }
[ "com.google.devtools.build.lib.actions.Artifact" ]
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
2,757,819
public Image getImage( String location, int width, int height ) { return getImage( location, null, width, height ); }
Image function( String location, int width, int height ) { return getImage( location, null, width, height ); }
/** * Loads an image from a location once. The second time, the image comes from a cache. Because of this, it's important * to never dispose of the image you get from here. (easy!) The images are automatically disposed when the application * ends. * * @param location the location of the image resource to...
Loads an image from a location once. The second time, the image comes from a cache. Because of this, it's important to never dispose of the image you get from here. (easy!) The images are automatically disposed when the application ends
getImage
{ "repo_name": "HiromuHota/pentaho-kettle", "path": "ui/src/main/java/org/pentaho/di/ui/core/gui/GUIResource.java", "license": "apache-2.0", "size": 79871 }
[ "org.eclipse.swt.graphics.Image" ]
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,539,199
public Iterator<HUDComponent> getComponents();
Iterator<HUDComponent> function();
/** * Gets an interator for the set of managed components * @return an iterator for managed HUDComponents */
Gets an interator for the set of managed components
getComponents
{ "repo_name": "AsherBond/MondocosmOS", "path": "wonderland/core/src/classes/org/jdesktop/wonderland/client/hud/HUDComponentManager.java", "license": "agpl-3.0", "size": 3481 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,730,764
@Nonnull public ItemStack getItemStack() { return itemStack; }
ItemStack function() { return itemStack; }
/** * The {@link ItemStack} with the tooltip. */
The <code>ItemStack</code> with the tooltip
getItemStack
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraftforge/event/entity/player/ItemTooltipEvent.java", "license": "lgpl-2.1", "size": 2099 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
77,740
EClass getMServo();
EClass getMServo();
/** * Returns the meta object for class '{@link org.openhab.binding.tinkerforge.internal.model.MServo <em>MServo</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>MServo</em>'. * @see org.openhab.binding.tinkerforge.internal.model.MServo * @generated ...
Returns the meta object for class '<code>org.openhab.binding.tinkerforge.internal.model.MServo MServo</code>'.
getMServo
{ "repo_name": "gregfinley/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/ModelPackage.java", "license": "epl-1.0", "size": 665067 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
64,056
public static final <T extends Calendar> Function<T[], Period> calendarFieldArrayToPeriod() { return new CalendarFieldArrayToPeriod<T>(); } /** * <p> * It creates a {@link Period} with the specified {@link Chronology}. The input received by the {@link Function} * must have size 2 and repre...
static final <T extends Calendar> Function<T[], Period> function() { return new CalendarFieldArrayToPeriod<T>(); } /** * <p> * It creates a {@link Period} with the specified {@link Chronology}. The input received by the {@link Function} * must have size 2 and represents the start and end instants of the {@link Period}
/** * <p> * It creates a {@link Period} represented by the given start and end instants * </p> * * @return the {@link Period} created from the input */
It creates a <code>Period</code> represented by the given start and end instants
calendarFieldArrayToPeriod
{ "repo_name": "op4j/op4j-jodatime", "path": "src/main/java/org/op4j/jodatime/functions/FnPeriod.java", "license": "apache-2.0", "size": 65255 }
[ "java.util.Calendar", "org.joda.time.Chronology", "org.joda.time.Period", "org.op4j.functions.Function" ]
import java.util.Calendar; import org.joda.time.Chronology; import org.joda.time.Period; import org.op4j.functions.Function;
import java.util.*; import org.joda.time.*; import org.op4j.functions.*;
[ "java.util", "org.joda.time", "org.op4j.functions" ]
java.util; org.joda.time; org.op4j.functions;
2,278,416
void setDataFormats(Map<String, DataFormatDefinition> dataFormats);
void setDataFormats(Map<String, DataFormatDefinition> dataFormats);
/** * Sets the data formats that can be referenced in the routes. * * @param dataFormats the data formats */
Sets the data formats that can be referenced in the routes
setDataFormats
{ "repo_name": "askannon/camel", "path": "camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java", "license": "apache-2.0", "size": 6532 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,675,757
String prefix = cseId+"/"+ Constants.CSE_NAME + "/" + appId; // oBIX Obj obj = new Obj(); obj.add(new Str("type",Lamp.TYPE)); obj.add(new Str("location",Lamp.LOCATION)); obj.add(new Str("appId",appId)); // OP GetState from SCL DataBase Op opState = new Op(); opState.setName("getState"); opState.setH...
String prefix = cseId+"/"+ Constants.CSE_NAME + "/" + appId; Obj obj = new Obj(); obj.add(new Str("type",Lamp.TYPE)); obj.add(new Str(STR,Lamp.LOCATION)); obj.add(new Str("appId",appId)); Op opState = new Op(); opState.setName(STR); opState.setHref(new Uri(prefix +"/"+stateCont+"/"+ ShortName.LATEST)); opState.setIs(ne...
/** * Returns an obix XML representation describing the lamp. * @param cseId - SclBase id * @param appId - Application Id * @param stateCont - the STATE container id * @return Obix XML representation */
Returns an obix XML representation describing the lamp
getDescriptorRep
{ "repo_name": "huanpc/IoT-1", "path": "docker/oneM2M/CSE_IPE/org.eclipse.om2m/org.eclipse.om2m.ipe.sample/src/main/java/org/eclipse/om2m/ipe/sample/util/ObixUtil.java", "license": "mit", "size": 4984 }
[ "org.eclipse.om2m.commons.constants.Constants", "org.eclipse.om2m.commons.constants.ShortName", "org.eclipse.om2m.commons.obix.Contract", "org.eclipse.om2m.commons.obix.Obj", "org.eclipse.om2m.commons.obix.Op", "org.eclipse.om2m.commons.obix.Str", "org.eclipse.om2m.commons.obix.Uri", "org.eclipse.om2m...
import org.eclipse.om2m.commons.constants.Constants; import org.eclipse.om2m.commons.constants.ShortName; import org.eclipse.om2m.commons.obix.Contract; import org.eclipse.om2m.commons.obix.Obj; import org.eclipse.om2m.commons.obix.Op; import org.eclipse.om2m.commons.obix.Str; import org.eclipse.om2m.commons.obix.Uri; ...
import org.eclipse.om2m.commons.constants.*; import org.eclipse.om2m.commons.obix.*; import org.eclipse.om2m.commons.obix.io.*; import org.eclipse.om2m.ipe.sample.constants.*; import org.eclipse.om2m.ipe.sample.model.*;
[ "org.eclipse.om2m" ]
org.eclipse.om2m;
129,587
@SuppressWarnings( "unchecked" ) private void readObject( ObjectInputStream aStream ) throws IOException, ClassNotFoundException { absolute = aStream.readBoolean(); normalized = aStream.readBoolean(); segments = (List<Path.Segment>)aStream.readObject(); }
@SuppressWarnings( STR ) void function( ObjectInputStream aStream ) throws IOException, ClassNotFoundException { absolute = aStream.readBoolean(); normalized = aStream.readBoolean(); segments = (List<Path.Segment>)aStream.readObject(); }
/** * Custom deserialization is needed, since the 'segments' list may not be serializable (e.g., java.util.RandomAccessSubList). * * @param aStream the input stream to which this object should be serialized; never null * @throws IOException if there is a problem reading from the stream * @thro...
Custom deserialization is needed, since the 'segments' list may not be serializable (e.g., java.util.RandomAccessSubList)
readObject
{ "repo_name": "weebl2000/modeshape", "path": "modeshape-jcr/src/main/java/org/modeshape/jcr/value/basic/BasicPath.java", "license": "apache-2.0", "size": 4775 }
[ "java.io.IOException", "java.io.ObjectInputStream", "java.util.List", "org.modeshape.jcr.value.Path" ]
import java.io.IOException; import java.io.ObjectInputStream; import java.util.List; import org.modeshape.jcr.value.Path;
import java.io.*; import java.util.*; import org.modeshape.jcr.value.*;
[ "java.io", "java.util", "org.modeshape.jcr" ]
java.io; java.util; org.modeshape.jcr;
2,535,769
public synchronized JoystickButton getDriveBackwardButton() { if (driveBackwardButton == null) { driveBackwardButton = new JoystickButton(getLeftDriveJoystick(), DRIVE_BACKWARD_BUTTON, false); } return driveBackwardButton; }
synchronized JoystickButton function() { if (driveBackwardButton == null) { driveBackwardButton = new JoystickButton(getLeftDriveJoystick(), DRIVE_BACKWARD_BUTTON, false); } return driveBackwardButton; }
/** * Gets the JoystickButton that indicates that drive operation should be in the backward direction. * @return The JoystickButton that indicates that drive operation should be in the backward direction */
Gets the JoystickButton that indicates that drive operation should be in the backward direction
getDriveBackwardButton
{ "repo_name": "TaylorRobotics/TitanRobot2014", "path": "eclipse/TitanRobot2015/src/org/usfirst/frc/team1760/robot/stores/JoystickStore.java", "license": "bsd-3-clause", "size": 7759 }
[ "org.usfirst.frc.team1760.robot.components.JoystickButton" ]
import org.usfirst.frc.team1760.robot.components.JoystickButton;
import org.usfirst.frc.team1760.robot.components.*;
[ "org.usfirst.frc" ]
org.usfirst.frc;
2,447,059
@Test public void testGetUsers() throws Exception { loginTenantAdmin(tenantAdminDto.getUsername()); List<UserDto> users = new ArrayList<UserDto>(10); for (int i=0;i<10;i++) { UserDto user = createUser(tenantAdminDto, i%2==0 ? KaaAuthorityDto.TENANT_DEVELOPER : KaaAuthorityDt...
void function() throws Exception { loginTenantAdmin(tenantAdminDto.getUsername()); List<UserDto> users = new ArrayList<UserDto>(10); for (int i=0;i<10;i++) { UserDto user = createUser(tenantAdminDto, i%2==0 ? KaaAuthorityDto.TENANT_DEVELOPER : KaaAuthorityDto.TENANT_USER); users.add(user); } Collections.sort(users, new...
/** * Test get users. * * @throws Exception the exception */
Test get users
testGetUsers
{ "repo_name": "Deepnekroz/kaa", "path": "server/node/src/test/java/org/kaaproject/kaa/server/control/ControlServerUserIT.java", "license": "apache-2.0", "size": 4567 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.junit.Assert", "org.kaaproject.kaa.common.dto.KaaAuthorityDto", "org.kaaproject.kaa.common.dto.admin.UserDto" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.junit.Assert; import org.kaaproject.kaa.common.dto.KaaAuthorityDto; import org.kaaproject.kaa.common.dto.admin.UserDto;
import java.util.*; import org.junit.*; import org.kaaproject.kaa.common.dto.*; import org.kaaproject.kaa.common.dto.admin.*;
[ "java.util", "org.junit", "org.kaaproject.kaa" ]
java.util; org.junit; org.kaaproject.kaa;
303,148
@Override() public java.lang.Class getJavaClass( ) { return org.chocolate_milk.model.ListFilter.class; }
@Override() java.lang.Class function( ) { return org.chocolate_milk.model.ListFilter.class; }
/** * Method getJavaClass. * * @return the Java class represented by this descriptor. */
Method getJavaClass
getJavaClass
{ "repo_name": "galleon1/chocolate-milk", "path": "src/org/chocolate_milk/model/descriptors/ListFilterDescriptor.java", "license": "lgpl-3.0", "size": 13796 }
[ "org.chocolate_milk.model.ListFilter" ]
import org.chocolate_milk.model.ListFilter;
import org.chocolate_milk.model.*;
[ "org.chocolate_milk.model" ]
org.chocolate_milk.model;
2,625,054
public static String removeXmlMarkup(String str) { String markupFree = str.replaceAll("\\<.*?>", StringUtils.EMPTY).trim(); return StringEscapeUtils.unescapeXml(markupFree); } private StringEscapeHelper() { }
static String function(String str) { String markupFree = str.replaceAll(STR, StringUtils.EMPTY).trim(); return StringEscapeUtils.unescapeXml(markupFree); } private StringEscapeHelper() { }
/** * Removes XML markup from a string and unescapes XML entities (only gt, lt, quot, amp, apos). * * @param str * the string to modify * @return the input string with all markup (tags) removed and XML entities unescaped */
Removes XML markup from a string and unescapes XML entities (only gt, lt, quot, amp, apos)
removeXmlMarkup
{ "repo_name": "Communote/communote-server", "path": "communote/commons/src/main/java/com/communote/common/string/StringEscapeHelper.java", "license": "apache-2.0", "size": 7834 }
[ "org.apache.commons.lang3.StringEscapeUtils", "org.apache.commons.lang3.StringUtils" ]
import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
898,155
private BindingOperationFault assertHasFault(BindingOperation operation, String faultName) throws Exception { List<BindingOperationFaultTarget> faults = operation.getFault(); for (BindingOperationFaultTarget t : faults) { BindingOperationFault fault = (BindingOperationFault) getArtifactByTarget(t); if (fau...
BindingOperationFault function(BindingOperation operation, String faultName) throws Exception { List<BindingOperationFaultTarget> faults = operation.getFault(); for (BindingOperationFaultTarget t : faults) { BindingOperationFault fault = (BindingOperationFault) getArtifactByTarget(t); if (fault.getNCName().equals(fault...
/** * Asserts that the operation contains a valid reference to a fault with * the given name. Returns the fault or throws if any assertions fail. * @param operation * @param faultName * @throws Exception */
Asserts that the operation contains a valid reference to a fault with the given name. Returns the fault or throws if any assertions fail
assertHasFault
{ "repo_name": "brmeyer/s-ramp", "path": "repository/test/src/test/java/org/artificer/repository/test/WsdlDocumentPersistenceTest.java", "license": "apache-2.0", "size": 15285 }
[ "java.util.List", "org.junit.Assert", "org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperation", "org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationFault", "org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationFaultTarget" ]
import java.util.List; import org.junit.Assert; import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperation; import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationFault; import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.BindingOperationFaultTarget;
import java.util.*; import org.junit.*; import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.*;
[ "java.util", "org.junit", "org.oasis_open.docs" ]
java.util; org.junit; org.oasis_open.docs;
873,419
UserRole installUserRole(UserGroup userGroup, Service service, String extension);
UserRole installUserRole(UserGroup userGroup, Service service, String extension);
/** * Install an UserRole, if does not exist. * * @param userGroup * @param service * @param extension */
Install an UserRole, if does not exist
installUserRole
{ "repo_name": "eldevanjr/helianto", "path": "helianto-core/src/main/java/org/helianto/user/UserMgr.java", "license": "apache-2.0", "size": 4500 }
[ "org.helianto.core.domain.Service", "org.helianto.user.domain.UserGroup", "org.helianto.user.domain.UserRole" ]
import org.helianto.core.domain.Service; import org.helianto.user.domain.UserGroup; import org.helianto.user.domain.UserRole;
import org.helianto.core.domain.*; import org.helianto.user.domain.*;
[ "org.helianto.core", "org.helianto.user" ]
org.helianto.core; org.helianto.user;
1,966,268
@WebMethod(operationName = "GetGeoIPContext", action = "http://www.webservicex.net/GetGeoIPContext") @RequestWrapper(localName = "GetGeoIPContext", targetNamespace = "http://www.webservicex.net/", className = "net.webservicex.GetGeoIPContext") @ResponseWrapper(localName = "GetGeoIPContextResponse", targetNa...
@WebMethod(operationName = STR, action = "http: @RequestWrapper(localName = STR, targetNamespace = "http: @ResponseWrapper(localName = "GetGeoIPContextResponseSTRhttp: @WebResult(name = "GetGeoIPContextResultSTRhttp: net.webservicex.GeoIP function();
/** * GeoIPService - GetGeoIPContext enables you to easily look up countries by Context */
GeoIPService - GetGeoIPContext enables you to easily look up countries by Context
getGeoIPContext
{ "repo_name": "emmaviento/training_java_for_testing", "path": "soap-sample/src/main/java/net/webservicex/GeoIPServiceSoap.java", "license": "apache-2.0", "size": 1955 }
[ "javax.jws.WebMethod", "javax.jws.WebResult", "javax.xml.ws.RequestWrapper", "javax.xml.ws.ResponseWrapper" ]
import javax.jws.WebMethod; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper;
import javax.jws.*; import javax.xml.ws.*;
[ "javax.jws", "javax.xml" ]
javax.jws; javax.xml;
322,722
public SnmpOid getEntryOid();
SnmpOid function();
/** * Return the part of the OID identifying the table entry involved. * <p> * * @return {@link com.sun.jmx.snmp.SnmpOid} or <CODE>null</CODE> * if the request is not directed to an entry. */
Return the part of the OID identifying the table entry involved.
getEntryOid
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibSubRequest.java", "license": "mit", "size": 9088 }
[ "com.sun.jmx.snmp.SnmpOid" ]
import com.sun.jmx.snmp.SnmpOid;
import com.sun.jmx.snmp.*;
[ "com.sun.jmx" ]
com.sun.jmx;
80,780
boolean delete(String src, boolean recursive, boolean logRetryCache) throws IOException { waitForLoadingFSImage(); BlocksMapUpdateInfo toRemovedBlocks = null; writeLock(); boolean ret = false; try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot delete " +...
boolean delete(String src, boolean recursive, boolean logRetryCache) throws IOException { waitForLoadingFSImage(); BlocksMapUpdateInfo toRemovedBlocks = null; writeLock(); boolean ret = false; try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode(STR + src); toRemovedBlocks = FSDirDeleteOp.delete( this, ...
/** * Remove the indicated file from namespace. * * @see ClientProtocol#delete(String, boolean) for detailed description and * description of exceptions */
Remove the indicated file from namespace
delete
{ "repo_name": "jiayuhan-it/yarn-jyhtest", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 298813 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.server.namenode.INode", "org.apache.hadoop.hdfs.server.namenode.NameNode", "org.apache.hadoop.security.AccessControlException" ]
import java.io.IOException; import org.apache.hadoop.hdfs.server.namenode.INode; import org.apache.hadoop.hdfs.server.namenode.NameNode; import org.apache.hadoop.security.AccessControlException;
import java.io.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.security.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,455,185
private void setSplayPaintClino( DBlock blk, Paint h_paint, Paint v_paint ) { if ( setSplayPaintDefault( blk, h_paint, v_paint ) ) return; if (blk.mClino > TDSetting.mVertSplay ) { // TDLog.v("paint DOT clino " + blk.mClino + " " + TDSetting.mVertSplay ); mPaint= BrushManager.paintSplayXBdot; ...
void function( DBlock blk, Paint h_paint, Paint v_paint ) { if ( setSplayPaintDefault( blk, h_paint, v_paint ) ) return; if (blk.mClino > TDSetting.mVertSplay ) { mPaint= BrushManager.paintSplayXBdot; } else if (blk.mClino < -TDSetting.mVertSplay) { mPaint= BrushManager.paintSplayXBdash; } }
/** set splay paint according to the clino (profile) * @param h_paint H-splay paint * @param v_paint V-splay paint * @note called by DrawingCommandManager when TDSetting.mDashSplay == DASHING_CLINO, or DASHING_VIEW for plan */
set splay paint according to the clino (profile)
setSplayPaintClino
{ "repo_name": "marcocorvi/topodroid", "path": "src/com/topodroid/DistoX/DrawingSplayPath.java", "license": "gpl-3.0", "size": 12021 }
[ "android.graphics.Paint", "com.topodroid.prefs.TDSetting" ]
import android.graphics.Paint; import com.topodroid.prefs.TDSetting;
import android.graphics.*; import com.topodroid.prefs.*;
[ "android.graphics", "com.topodroid.prefs" ]
android.graphics; com.topodroid.prefs;
1,143,334
void notImplemented(); } private final class IncomingResultHandler implements BinaryReply { private final Result callback; IncomingResultHandler(Result callback) { this.callback = callback; }
void notImplemented(); } private final class IncomingResultHandler implements BinaryReply { private final Result callback; IncomingResultHandler(Result callback) { this.callback = callback; }
/** * Handles a call to an unimplemented method. */
Handles a call to an unimplemented method
notImplemented
{ "repo_name": "krisgiesing/sky_engine", "path": "shell/platform/android/io/flutter/plugin/common/MethodChannel.java", "license": "bsd-3-clause", "size": 9058 }
[ "io.flutter.plugin.common.BinaryMessenger" ]
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.*;
[ "io.flutter.plugin" ]
io.flutter.plugin;
1,865,535
RepositorySortingMethod getSortingMethod() { return sortingMethod; }
RepositorySortingMethod getSortingMethod() { return sortingMethod; }
/** * Gets the {@link RepositorySortingMethod} with which this {@link RepositoryTreeModel} is * sorted * * @since 7.4 */
Gets the <code>RepositorySortingMethod</code> with which this <code>RepositoryTreeModel</code> is sorted
getSortingMethod
{ "repo_name": "boob-sbcm/3838438", "path": "src/main/java/com/rapidminer/repository/gui/RepositoryTreeModel.java", "license": "agpl-3.0", "size": 19620 }
[ "com.rapidminer.repository.RepositorySortingMethod" ]
import com.rapidminer.repository.RepositorySortingMethod;
import com.rapidminer.repository.*;
[ "com.rapidminer.repository" ]
com.rapidminer.repository;
900,524
public boolean processAwardReportTermBusinessRules(Document document) { AwardDocument awardDocument = (AwardDocument) document; AwardReportTerm awardReportTermItem = awardDocument.getAward().getAwardReportTermItems().isEmpty() ? null : awardDocument.getAward().getAwardReportTermItems().get(0); ...
boolean function(Document document) { AwardDocument awardDocument = (AwardDocument) document; AwardReportTerm awardReportTermItem = awardDocument.getAward().getAwardReportTermItems().isEmpty() ? null : awardDocument.getAward().getAwardReportTermItems().get(0); AwardReportTermRuleEvent event = new AwardReportTermRuleEve...
/** * * This method... * @param document * @return */
This method..
processAwardReportTermBusinessRules
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/award/AwardDocumentRule.java", "license": "apache-2.0", "size": 48363 }
[ "org.kuali.kra.award.document.AwardDocument", "org.kuali.kra.award.paymentreports.awardreports.AwardReportTerm", "org.kuali.kra.award.paymentreports.awardreports.AwardReportTermRuleEvent", "org.kuali.rice.krad.document.Document" ]
import org.kuali.kra.award.document.AwardDocument; import org.kuali.kra.award.paymentreports.awardreports.AwardReportTerm; import org.kuali.kra.award.paymentreports.awardreports.AwardReportTermRuleEvent; import org.kuali.rice.krad.document.Document;
import org.kuali.kra.award.document.*; import org.kuali.kra.award.paymentreports.awardreports.*; import org.kuali.rice.krad.document.*;
[ "org.kuali.kra", "org.kuali.rice" ]
org.kuali.kra; org.kuali.rice;
2,656,097
public Collection<URL> getRequiredClasspaths() { return jobInformation.getRequiredClasspathURLs(); } // --------------------------------------------------------------------------------------------
Collection<URL> function() { return jobInformation.getRequiredClasspathURLs(); }
/** * Returns a list of classpaths referring to the directories/JAR files required to run this job * @return list of classpaths referring to the directories/JAR files required to run this job */
Returns a list of classpaths referring to the directories/JAR files required to run this job
getRequiredClasspaths
{ "repo_name": "hongyuhong/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java", "license": "apache-2.0", "size": 61384 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,869,608
protected void writeEmbeddedPrimaryKeysStmt(Table table) throws IOException { Column[] primaryKeyColumns = table.getPrimaryKeyColumns(); if ((primaryKeyColumns.length > 0) && shouldGeneratePrimaryKeys(primaryKeyColumns)) { printStartOfEmbeddedStatement(); writePr...
void function(Table table) throws IOException { Column[] primaryKeyColumns = table.getPrimaryKeyColumns(); if ((primaryKeyColumns.length > 0) && shouldGeneratePrimaryKeys(primaryKeyColumns)) { printStartOfEmbeddedStatement(); writePrimaryKeyStmt(table, primaryKeyColumns); } }
/** * Writes the primary key constraints of the table inside its definition. * * @param table The table */
Writes the primary key constraints of the table inside its definition
writeEmbeddedPrimaryKeysStmt
{ "repo_name": "etiago/apache-ddlutils", "path": "src/java/org/apache/ddlutils/platform/SqlBuilder.java", "license": "apache-2.0", "size": 99834 }
[ "java.io.IOException", "org.apache.ddlutils.model.Column", "org.apache.ddlutils.model.Table" ]
import java.io.IOException; import org.apache.ddlutils.model.Column; import org.apache.ddlutils.model.Table;
import java.io.*; import org.apache.ddlutils.model.*;
[ "java.io", "org.apache.ddlutils" ]
java.io; org.apache.ddlutils;
1,417,620