method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
protected final ASTNode addCompilationErrorAndAdvanceParser(Exception e , IParseContext context) { return addCompilationErrorAndAdvanceParser( wrapException( e , context ) , context ); }
final ASTNode function(Exception e , IParseContext context) { return addCompilationErrorAndAdvanceParser( wrapException( e , context ) , context ); }
/** * Add compilation error and switch parser to recovery mode if it isn't already. * * See {@link #addCompilationErrorAndAdvanceParser(String, int, Exception, IParseContext)} for a description of how this method works. * * @param e * @param context * @return {@link UnparsedCon...
Add compilation error and switch parser to recovery mode if it isn't already. See <code>#addCompilationErrorAndAdvanceParser(String, int, Exception, IParseContext)</code> for a description of how this method works
addCompilationErrorAndAdvanceParser
{ "repo_name": "toby1984/jASM_16", "path": "src/main/java/de/codesourcery/jasm16/ast/ASTNode.java", "license": "apache-2.0", "size": 39594 }
[ "de.codesourcery.jasm16.parser.IParseContext" ]
import de.codesourcery.jasm16.parser.IParseContext;
import de.codesourcery.jasm16.parser.*;
[ "de.codesourcery.jasm16" ]
de.codesourcery.jasm16;
1,351,366
public Container getContainer() { return mContainer; }
Container function() { return mContainer; }
/** * Return the container to be used to launch the executable * * @return */
Return the container to be used to launch the executable
getContainer
{ "repo_name": "pegasus-isi/pegasus", "path": "src/edu/isi/pegasus/planner/catalog/transformation/TransformationCatalogEntry.java", "license": "apache-2.0", "size": 32053 }
[ "edu.isi.pegasus.planner.catalog.transformation.classes.Container" ]
import edu.isi.pegasus.planner.catalog.transformation.classes.Container;
import edu.isi.pegasus.planner.catalog.transformation.classes.*;
[ "edu.isi.pegasus" ]
edu.isi.pegasus;
2,610,528
public void setCropImg(BufferedImage cropImg) { this.cropImg = cropImg; }
void function(BufferedImage cropImg) { this.cropImg = cropImg; }
/** * Sets crop img. * * @param cropImg the crop img */
Sets crop img
setCropImg
{ "repo_name": "buni-rock/Pixie", "path": "04_Software/03_Development/02_SourceCode/java/src/gui/support/CroppedImage.java", "license": "mit", "size": 2964 }
[ "java.awt.image.BufferedImage" ]
import java.awt.image.BufferedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
1,651,790
protected void sequence_VersionPart(ISerializationContext context, VersionPart semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(ISerializationContext context, VersionPart semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Contexts: * VersionPart returns VersionPart * * Constraint: * (wildcard?=WILDCARD | numberRaw=DIGITS) */
Contexts: VersionPart returns VersionPart Constraint: (wildcard?=WILDCARD | numberRaw=DIGITS)
sequence_VersionPart
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js.semver/src-gen/org/eclipse/n4js/semver/serializer/SemverSemanticSequencer.java", "license": "epl-1.0", "size": 11523 }
[ "org.eclipse.n4js.semver.Semver", "org.eclipse.xtext.serializer.ISerializationContext" ]
import org.eclipse.n4js.semver.Semver; import org.eclipse.xtext.serializer.ISerializationContext;
import org.eclipse.n4js.semver.*; import org.eclipse.xtext.serializer.*;
[ "org.eclipse.n4js", "org.eclipse.xtext" ]
org.eclipse.n4js; org.eclipse.xtext;
722,137
@Override public void testMBeansRegistered() throws Exception { assertDefaultDomain(); resolveMandatoryEndpoint("mock:end", MockEndpoint.class); Set<ObjectName> s = mbsc.queryNames(new ObjectName(domainName + ":type=endpoints,*"), null); assertEquals("Could not find 2 en...
void function() throws Exception { assertDefaultDomain(); resolveMandatoryEndpoint(STR, MockEndpoint.class); Set<ObjectName> s = mbsc.queryNames(new ObjectName(domainName + STR), null); assertEquals(STR + s, 2, s.size()); s = mbsc.queryNames(new ObjectName(domainName + STR), null); assertEquals(STR + s, 1, s.size()); s...
/** * It retrieves a mbean for each "to" processor instance in the query ":type=processor" */
It retrieves a mbean for each "to" processor instance in the query ":type=processor"
testMBeansRegistered
{ "repo_name": "everttigchelaar/camel-svn", "path": "camel-core/src/test/java/org/apache/camel/management/MultiInstanceProcessorTest.java", "license": "apache-2.0", "size": 3190 }
[ "java.util.Set", "javax.management.ObjectName", "org.apache.camel.component.mock.MockEndpoint" ]
import java.util.Set; import javax.management.ObjectName; import org.apache.camel.component.mock.MockEndpoint;
import java.util.*; import javax.management.*; import org.apache.camel.component.mock.*;
[ "java.util", "javax.management", "org.apache.camel" ]
java.util; javax.management; org.apache.camel;
2,795,614
public void topFloatValueChanged(short unit, float value) throws DOMException { final Value val = getValue(); String text = "rect(" + FloatValue.getCssText(unit, value) + ", " + val.getRight().getCssText() + ", " + val.getBottom...
void function(short unit, float value) throws DOMException { final Value val = getValue(); String text = "rect(" + FloatValue.getCssText(unit, value) + STR + val.getRight().getCssText() + STR + val.getBottom().getCssText() + STR + val.getLeft().getCssText() + ')'; textChanged(text); }
/** * Called when the top float value has changed. */
Called when the top float value has changed
topFloatValueChanged
{ "repo_name": "apache/batik", "path": "batik-css/src/main/java/org/apache/batik/css/dom/CSSOMValue.java", "license": "apache-2.0", "size": 46315 }
[ "org.apache.batik.css.engine.value.FloatValue", "org.apache.batik.css.engine.value.Value", "org.w3c.dom.DOMException" ]
import org.apache.batik.css.engine.value.FloatValue; import org.apache.batik.css.engine.value.Value; import org.w3c.dom.DOMException;
import org.apache.batik.css.engine.value.*; import org.w3c.dom.*;
[ "org.apache.batik", "org.w3c.dom" ]
org.apache.batik; org.w3c.dom;
1,823,881
void calculateStats(List<ROIShape> shapeList) { component.analyseShapeList(shapeList); }
void calculateStats(List<ROIShape> shapeList) { component.analyseShapeList(shapeList); }
/** * Calculate the stats for the roi in the shapelist. * * @param shapeList see above. */
Calculate the stats for the roi in the shapelist
calculateStats
{ "repo_name": "dominikl/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerModel.java", "license": "gpl-2.0", "size": 49600 }
[ "java.util.List", "org.openmicroscopy.shoola.util.roi.model.ROIShape" ]
import java.util.List; import org.openmicroscopy.shoola.util.roi.model.ROIShape;
import java.util.*; import org.openmicroscopy.shoola.util.roi.model.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
1,800,281
void setDomain(DomainInfo domain);
void setDomain(DomainInfo domain);
/** * Set the context under which this plugin is running. * * @param context * the new context */
Set the context under which this plugin is running
setDomain
{ "repo_name": "solmix/datax", "path": "generator/core/src/main/java/org/solmix/generator/api/Plugin.java", "license": "lgpl-2.1", "size": 72918 }
[ "org.solmix.generator.config.DomainInfo" ]
import org.solmix.generator.config.DomainInfo;
import org.solmix.generator.config.*;
[ "org.solmix.generator" ]
org.solmix.generator;
123,809
@Override public void onStart() { if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) { Log.d(Logging.LOG_TAG, "AccountSetupExchangeFragment onStart"); } super.onStart(); mStarted = true; loadSettings(SetupData.getAccount()); }
void function() { if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) { Log.d(Logging.LOG_TAG, STR); } super.onStart(); mStarted = true; loadSettings(SetupData.getAccount()); }
/** * Called when the Fragment is visible to the user. */
Called when the Fragment is visible to the user
onStart
{ "repo_name": "craigacgomez/flaming_monkey_packages_apps_Email", "path": "src/com/android/email/activity/setup/AccountSetupExchangeFragment.java", "license": "apache-2.0", "size": 17888 }
[ "android.util.Log", "com.android.email.Email", "com.android.emailcommon.Logging" ]
import android.util.Log; import com.android.email.Email; import com.android.emailcommon.Logging;
import android.util.*; import com.android.email.*; import com.android.emailcommon.*;
[ "android.util", "com.android.email", "com.android.emailcommon" ]
android.util; com.android.email; com.android.emailcommon;
2,823,303
public void addFocusListener(FocusListener listener) { editorComponent.addFocusListener(listener); } } private final CellEditorListener editorListener; private final ValueEditor recordEditor; p...
void function(FocusListener listener) { editorComponent.addFocusListener(listener); } } private final CellEditorListener editorListener; private final ValueEditor recordEditor; private final RowHeaderOwner headerOwner; private final RecordFieldModel recordFieldModel; RowHeader(ValueEditor recordEditor, JTable table, Ro...
/** * Adds the specified focus listener to the editor component * @param listener */
Adds the specified focus listener to the editor component
addFocusListener
{ "repo_name": "levans/Open-Quark", "path": "src/Quark_Gems/src/org/openquark/gems/client/valueentry/RecordValueEditor.java", "license": "bsd-3-clause", "size": 94830 }
[ "java.awt.event.FocusListener", "javax.swing.JTable", "javax.swing.event.CellEditorListener", "javax.swing.table.DefaultTableModel", "javax.swing.table.TableCellEditor", "javax.swing.table.TableCellRenderer" ]
import java.awt.event.FocusListener; import javax.swing.JTable; import javax.swing.event.CellEditorListener; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer;
import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.table.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,865,748
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, resources.getDisplayMetrics()); return (int) px; }
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, resources.getDisplayMetrics()); return (int) px; }
/** * Convert Dp to Pixel */
Convert Dp to Pixel
dpToPx
{ "repo_name": "msoftware/aio-video-downloader", "path": "Material Libs/src/com/gc/materialdesign/utils/Utils.java", "license": "mit", "size": 1001 }
[ "android.util.TypedValue" ]
import android.util.TypedValue;
import android.util.*;
[ "android.util" ]
android.util;
2,164,743
public boolean hasPeriods() { List<DimensionalItemObject> dimOpts = getDimensionOptions( PERIOD_DIM_ID ); List<DimensionalItemObject> filterOpts = getFilterOptions( PERIOD_DIM_ID ); return !dimOpts.isEmpty() || !filterOpts.isEmpty(); }
boolean function() { List<DimensionalItemObject> dimOpts = getDimensionOptions( PERIOD_DIM_ID ); List<DimensionalItemObject> filterOpts = getFilterOptions( PERIOD_DIM_ID ); return !dimOpts.isEmpty() !filterOpts.isEmpty(); }
/** * Indicates whether periods are present as a dimension or as a filter. If * not this object is in an illegal state. */
Indicates whether periods are present as a dimension or as a filter. If not this object is in an illegal state
hasPeriods
{ "repo_name": "EyeSeeTea/dhis2", "path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java", "license": "gpl-3.0", "size": 60770 }
[ "java.util.List", "org.hisp.dhis.common.DimensionalItemObject" ]
import java.util.List; import org.hisp.dhis.common.DimensionalItemObject;
import java.util.*; import org.hisp.dhis.common.*;
[ "java.util", "org.hisp.dhis" ]
java.util; org.hisp.dhis;
544,377
public AppendChildCommand createAppendChildCommand(Node parent, Node child) { return new AppendChildCommand (getAppendChildCommandName(parent, child), parent, child); } public static class AppendChildCommand extends AbstractUnd...
AppendChildCommand function(Node parent, Node child) { return new AppendChildCommand (getAppendChildCommandName(parent, child), parent, child); } public static class AppendChildCommand extends AbstractUndoableCommand { protected Node oldParentNode; protected Node oldNextSibling; protected Node parentNode; protected Nod...
/** * Creates and return the AppendChild command. * * @param parent * The given parent * @param child * The node to be appended * @return the AppendChild command */
Creates and return the AppendChild command
createAppendChildCommand
{ "repo_name": "git-moss/Push2Display", "path": "lib/batik-1.8/sources/org/apache/batik/apps/svgbrowser/HistoryBrowserInterface.java", "license": "lgpl-3.0", "size": 42497 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
401,821
public void mutateNext() { I nnind = parentsBuffer.get(parentsCounter); INeuralNet neuralNet = nnind.getGenotype(); double fitness = ((SimpleValueFitness) nnind.getFitness()).getValue(); double temper = Math.pow(1-fitness, temperExponent); //System.out.println(temper); ...
void function() { I nnind = parentsBuffer.get(parentsCounter); INeuralNet neuralNet = nnind.getGenotype(); double fitness = ((SimpleValueFitness) nnind.getFitness()).getValue(); double temper = Math.pow(1-fitness, temperExponent); boolean mutated = false; boolean initial = true; int mutation = 0; while(!mutated) { if((...
/** * <p> * Mutates the next individual * </p> */
Mutates the next individual
mutateNext
{ "repo_name": "adofsauron/KEEL", "path": "src/keel/Algorithms/Neural_Networks/NNEP_Common/mutators/structural/StructuralMutator.java", "license": "gpl-3.0", "size": 36377 }
[ "net.sf.jclec.fitness.SimpleValueFitness" ]
import net.sf.jclec.fitness.SimpleValueFitness;
import net.sf.jclec.fitness.*;
[ "net.sf.jclec" ]
net.sf.jclec;
2,205,446
String readString(long byteCount, Charset charset) throws IOException;
String readString(long byteCount, Charset charset) throws IOException;
/** * Removes {@code byteCount} bytes from this, decodes them as {@code charset}, * and returns the string. */
Removes byteCount bytes from this, decodes them as charset, and returns the string
readString
{ "repo_name": "UrQA/UrQA-Client-Android-Gradle", "path": "app/src/main/java/com/urqa/externallibrary/okio/BufferedSource.java", "license": "mit", "size": 10290 }
[ "java.io.IOException", "java.nio.charset.Charset" ]
import java.io.IOException; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,244,623
@ServiceMethod(returns = ReturnType.SINGLE) Response<PricingListInner> listWithResponse(Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<PricingListInner> listWithResponse(Context context);
/** * Lists Security Center pricing configurations in the subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the r...
Lists Security Center pricing configurations in the subscription
listWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/fluent/PricingsClient.java", "license": "mit", "size": 4795 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.security.fluent.models.PricingListInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.PricingListInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.security.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,360,925
public void getHeaderBuffers(String name, ArrayList<CharSegment> resultList) { String value = getHeader(name); if (value != null) resultList.add(new CharBuffer(value)); }
void function(String name, ArrayList<CharSegment> resultList) { String value = getHeader(name); if (value != null) resultList.add(new CharBuffer(value)); }
/** * Fills the result with a list of the header values as * CharSegment values. Most implementations will * implement this directly. * * @param name the header name * @param resultList the resulting buffer */
Fills the result with a list of the header values as CharSegment values. Most implementations will implement this directly
getHeaderBuffers
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/server/http/AbstractHttpRequest.java", "license": "gpl-2.0", "size": 40926 }
[ "com.caucho.util.CharBuffer", "com.caucho.util.CharSegment", "java.util.ArrayList" ]
import com.caucho.util.CharBuffer; import com.caucho.util.CharSegment; import java.util.ArrayList;
import com.caucho.util.*; import java.util.*;
[ "com.caucho.util", "java.util" ]
com.caucho.util; java.util;
1,060,513
@Override public String getDefault() { OdfElement parentElement = (OdfElement)getOwnerElement(); String defaultValue = null; if (parentElement != null) { defaultValue=DEFAULT_VALUE; } return defaultValue; }
String function() { OdfElement parentElement = (OdfElement)getOwnerElement(); String defaultValue = null; if (parentElement != null) { defaultValue=DEFAULT_VALUE; } return defaultValue; }
/** * Returns the default value of {@odf.attribute form:ignore-result}. * * @return the default value as <code>String</code> dependent of its element name * return <code>null</code> if the default value does not exist */
Returns the default value of
getDefault
{ "repo_name": "jbjonesjr/geoproponis", "path": "external/odfdom-java-0.8.10-incubating-sources/org/odftoolkit/odfdom/dom/attribute/form/FormIgnoreResultAttribute.java", "license": "gpl-2.0", "size": 3755 }
[ "org.odftoolkit.odfdom.pkg.OdfElement" ]
import org.odftoolkit.odfdom.pkg.OdfElement;
import org.odftoolkit.odfdom.pkg.*;
[ "org.odftoolkit.odfdom" ]
org.odftoolkit.odfdom;
620,497
protected void addValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DateAttributeType_value_feature"), getString("_UI_PropertyDescriptor_...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), GenericsPackage.Literals.DATE_ATTRIBUTE_TYPE__VALUE, true, false, false, ItemPropertyDescriptor.G...
/** * This adds a property descriptor for the Value feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Value feature.
addValuePropertyDescriptor
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/citygml/generics/provider/DateAttributeTypeItemProvider.java", "license": "apache-2.0", "size": 4403 }
[ "net.opengis.citygml.generics.GenericsPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import net.opengis.citygml.generics.GenericsPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import net.opengis.citygml.generics.*; import org.eclipse.emf.edit.provider.*;
[ "net.opengis.citygml", "org.eclipse.emf" ]
net.opengis.citygml; org.eclipse.emf;
138,660
public List<CmsContainerElement> getElements() { return m_elements; }
List<CmsContainerElement> function() { return m_elements; }
/** * Returns the list of the contained elements id's.<p> * * @return the list of the contained elements id's */
Returns the list of the contained elements id's
getElements
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/ade/containerpage/shared/CmsContainer.java", "license": "lgpl-2.1", "size": 10278 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
675,685
@Override public void onDisable() { if (Gunsmith.getServiceManager().isRunning()) { Gunsmith.getServiceManager().shutdown(); } }
void function() { if (Gunsmith.getServiceManager().isRunning()) { Gunsmith.getServiceManager().shutdown(); } }
/** * The disabling sequence */
The disabling sequence
onDisable
{ "repo_name": "LinkBR/VoxelSniper", "path": "src/main/java/com/voxelplugineering/voxelsniper/bukkit/VoxelSniperBukkit.java", "license": "mit", "size": 2189 }
[ "com.voxelplugineering.voxelsniper.Gunsmith" ]
import com.voxelplugineering.voxelsniper.Gunsmith;
import com.voxelplugineering.voxelsniper.*;
[ "com.voxelplugineering.voxelsniper" ]
com.voxelplugineering.voxelsniper;
775,946
public void onOrientationChange() { if (!mIsInitialized) return; hideContextualSearch(StateChangeReason.UNKNOWN); }
void function() { if (!mIsInitialized) return; hideContextualSearch(StateChangeReason.UNKNOWN); }
/** * Called when the orientation of the device changes. */
Called when the orientation of the device changes
onOrientationChange
{ "repo_name": "Pluto-tv/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java", "license": "bsd-3-clause", "size": 57913 }
[ "org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel" ]
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel;
import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
2,801,057
EList<Contained> getContainments();
EList<Contained> getContainments();
/** * Returns the value of the '<em><b>Containments</b></em>' containment reference list. * The list contents are of type {@link org.eclipse.xtext.parser.antlr.bug289524ExTest.Contained}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Containments</em>' containment reference list isn't clea...
Returns the value of the 'Containments' containment reference list. The list contents are of type <code>org.eclipse.xtext.parser.antlr.bug289524ExTest.Contained</code>. If the meaning of the 'Containments' containment reference list isn't clear, there really should be more of a description here...
getContainments
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parser/antlr/bug289524ExTest/ModelElement.java", "license": "epl-1.0", "size": 2106 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,526,581
@Override public boolean onScaleBegin(ScaleGestureDetector detector) { return true; } /** * Responds to the end of a scale gesture. Reported by existing * pointers going up. * <p/> * Once a scale has ended, {@link ScaleGestureDetector#getF...
boolean function(ScaleGestureDetector detector) { return true; } /** * Responds to the end of a scale gesture. Reported by existing * pointers going up. * <p/> * Once a scale has ended, {@link ScaleGestureDetector#getFocusX()}
/** * Responds to the beginning of a scaling gesture. Reported by * new pointers going down. * * @param detector The detector reporting the event - use this to * retrieve extended info about event state. * @return Whether or not the detector should c...
Responds to the beginning of a scaling gesture. Reported by new pointers going down
onScaleBegin
{ "repo_name": "iamMehedi/MVBarcodeReader", "path": "mvbarcodereader/src/main/java/devliving/online/mvbarcodereader/BarcodeCaptureFragment.java", "license": "apache-2.0", "size": 23596 }
[ "android.view.ScaleGestureDetector" ]
import android.view.ScaleGestureDetector;
import android.view.*;
[ "android.view" ]
android.view;
1,490,629
public void addJoinLeaveListener(JoinLeaveListener observer) { synchronized (this.listenersLock) { final Set oldListeners = this.listeners; if (!oldListeners.contains(observer)) { final Set newListeners = new HashSet(oldListeners); newListeners.add(observer); this.listeners = n...
void function(JoinLeaveListener observer) { synchronized (this.listenersLock) { final Set oldListeners = this.listeners; if (!oldListeners.contains(observer)) { final Set newListeners = new HashSet(oldListeners); newListeners.add(observer); this.listeners = newListeners; } } }
/** * Registers a <code>JoinLeaveListener</code>. on this agent that is notified when membership in * the distributed system changes. */
Registers a <code>JoinLeaveListener</code>. on this agent that is notified when membership in the distributed system changes
addJoinLeaveListener
{ "repo_name": "pdxrunner/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteGfManagerAgent.java", "license": "apache-2.0", "size": 47337 }
[ "java.util.HashSet", "java.util.Set", "org.apache.geode.internal.admin.JoinLeaveListener" ]
import java.util.HashSet; import java.util.Set; import org.apache.geode.internal.admin.JoinLeaveListener;
import java.util.*; import org.apache.geode.internal.admin.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
215,665
public void incrementWater(View view) { if (mToast != null) mToast.cancel(); mToast = Toast.makeText(this, R.string.water_chug_toast, Toast.LENGTH_SHORT); mToast.show(); // DONE (15) Create an explicit intent for WaterReminderIntentService Intent intent = new Intent(this, Wat...
void function(View view) { if (mToast != null) mToast.cancel(); mToast = Toast.makeText(this, R.string.water_chug_toast, Toast.LENGTH_SHORT); mToast.show(); Intent intent = new Intent(this, WaterReminderIntentService.class); intent.setAction(ReminderTasks.ACTION_INCREMENT_WATER_COUNT); startService(intent); }
/** * Adds one to the water count and shows a toast */
Adds one to the water count and shows a toast
incrementWater
{ "repo_name": "Madeyedexter/ud851-exercises-student", "path": "Lesson10-Hydration-Reminder/T10.01-Exercise-IntentServices/app/src/main/java/com/example/android/background/MainActivity.java", "license": "apache-2.0", "size": 4424 }
[ "android.content.Intent", "android.view.View", "android.widget.Toast", "com.example.android.background.sync.ReminderTasks", "com.example.android.background.sync.WaterReminderIntentService" ]
import android.content.Intent; import android.view.View; import android.widget.Toast; import com.example.android.background.sync.ReminderTasks; import com.example.android.background.sync.WaterReminderIntentService;
import android.content.*; import android.view.*; import android.widget.*; import com.example.android.background.sync.*;
[ "android.content", "android.view", "android.widget", "com.example.android" ]
android.content; android.view; android.widget; com.example.android;
662,089
public List<TProject> getTProjects() throws TorqueException { if (collTProjects == null) { collTProjects = getTProjects(new Criteria(10)); } return collTProjects; }
List<TProject> function() throws TorqueException { if (collTProjects == null) { collTProjects = getTProjects(new Criteria(10)); } return collTProjects; }
/** * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * getTProjects(new Criteria()) * * @return the collection of associated objects * @throws TorqueException */
If this collection has already been initialized, returns the collection. Otherwise returns the results of getTProjects(new Criteria())
getTProjects
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTState.java", "license": "gpl-3.0", "size": 188907 }
[ "java.util.List", "org.apache.torque.TorqueException", "org.apache.torque.util.Criteria" ]
import java.util.List; import org.apache.torque.TorqueException; import org.apache.torque.util.Criteria;
import java.util.*; import org.apache.torque.*; import org.apache.torque.util.*;
[ "java.util", "org.apache.torque" ]
java.util; org.apache.torque;
1,729,476
@Test public void matchIPDstTest() { Criterion criterion = Criteria.matchIPDst(ipPrefix4); ObjectNode result = criterionCodec.encode(criterion, context); assertThat(result, matchesCriterion(criterion)); }
void function() { Criterion criterion = Criteria.matchIPDst(ipPrefix4); ObjectNode result = criterionCodec.encode(criterion, context); assertThat(result, matchesCriterion(criterion)); }
/** * Tests IP destination criterion. */
Tests IP destination criterion
matchIPDstTest
{ "repo_name": "donNewtonAlpha/onos", "path": "core/common/src/test/java/org/onosproject/codec/impl/CriterionCodecTest.java", "license": "apache-2.0", "size": 14744 }
[ "com.fasterxml.jackson.databind.node.ObjectNode", "org.hamcrest.MatcherAssert", "org.onosproject.codec.impl.CriterionJsonMatcher", "org.onosproject.net.flow.criteria.Criteria", "org.onosproject.net.flow.criteria.Criterion" ]
import com.fasterxml.jackson.databind.node.ObjectNode; import org.hamcrest.MatcherAssert; import org.onosproject.codec.impl.CriterionJsonMatcher; import org.onosproject.net.flow.criteria.Criteria; import org.onosproject.net.flow.criteria.Criterion;
import com.fasterxml.jackson.databind.node.*; import org.hamcrest.*; import org.onosproject.codec.impl.*; import org.onosproject.net.flow.criteria.*;
[ "com.fasterxml.jackson", "org.hamcrest", "org.onosproject.codec", "org.onosproject.net" ]
com.fasterxml.jackson; org.hamcrest; org.onosproject.codec; org.onosproject.net;
2,070,962
private static Map<String, SpendProfileUser> listUsersInMap() { // call SAM to get the users + policies for the WSM default spend profile resource List<AccessPolicyResponseEntry> accessPolicies = SpendProfileManagerService.fromContext().listUsersOfDefaultSpendProfile(); // convert the SAM objects...
static Map<String, SpendProfileUser> function() { List<AccessPolicyResponseEntry> accessPolicies = SpendProfileManagerService.fromContext().listUsersOfDefaultSpendProfile(); Map<String, SpendProfileUser> spendProfileUsers = new HashMap<>(); accessPolicies.forEach( accessPolicy -> { SpendProfilePolicy spendPolicy = Spen...
/** * Get the users of the default WSM spend profile in a map, to make it easy to lookup a particular * user. * * @return a map of email -> spend profile user object */
Get the users of the default WSM spend profile in a map, to make it easy to lookup a particular user
listUsersInMap
{ "repo_name": "DataBiosphere/terra-cli", "path": "src/main/java/bio/terra/cli/businessobject/SpendProfileUser.java", "license": "bsd-3-clause", "size": 4809 }
[ "bio.terra.cli.service.SpendProfileManagerService", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.broadinstitute.dsde.workbench.client.sam.model.AccessPolicyResponseEntry" ]
import bio.terra.cli.service.SpendProfileManagerService; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.broadinstitute.dsde.workbench.client.sam.model.AccessPolicyResponseEntry;
import bio.terra.cli.service.*; import java.util.*; import org.broadinstitute.dsde.workbench.client.sam.model.*;
[ "bio.terra.cli", "java.util", "org.broadinstitute.dsde" ]
bio.terra.cli; java.util; org.broadinstitute.dsde;
519,242
public String getNextStateForTransition(String fromState, String toState) { Map<String, String> map = _stateTransitionTable.get(fromState); if (map != null) { return map.get(toState); } return null; }
String function(String fromState, String toState) { Map<String, String> map = _stateTransitionTable.get(fromState); if (map != null) { return map.get(toState); } return null; }
/** * Get the intermediate state required to transition from one state to the other * @param fromState the source * @param toState the destination * @return the intermediate state */
Get the intermediate state required to transition from one state to the other
getNextStateForTransition
{ "repo_name": "apache/helix", "path": "helix-core/src/main/java/org/apache/helix/model/StateModelDefinition.java", "license": "apache-2.0", "size": 17098 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,375,214
private void verifyDirUsingMkdir(File dir) throws IOException { String randomDirName = RandomStringUtils.randomAlphanumeric(5); File target = new File(dir, randomDirName); int i = 0; while (target.exists()) { randomDirName = RandomStringUtils.randomAlphanumeric(5) + i; target = new File(...
void function(File dir) throws IOException { String randomDirName = RandomStringUtils.randomAlphanumeric(5); File target = new File(dir, randomDirName); int i = 0; while (target.exists()) { randomDirName = RandomStringUtils.randomAlphanumeric(5) + i; target = new File(dir, randomDirName); i++; } try { diskValidator.che...
/** * Function to test whether a dir is working correctly by actually creating a * random directory. * * @param dir * the dir to test */
Function to test whether a dir is working correctly by actually creating a random directory
verifyDirUsingMkdir
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DirectoryCollection.java", "license": "apache-2.0", "size": 19871 }
[ "java.io.File", "java.io.IOException", "org.apache.commons.io.FileUtils", "org.apache.commons.lang.RandomStringUtils" ]
import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.RandomStringUtils;
import java.io.*; import org.apache.commons.io.*; import org.apache.commons.lang.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,410,000
public Iterable<Integer> getStateEpsilons(int state) { List<Integer> list = m_stateEpsilons.get(state); return (list != null ? list : Collections.emptyList()); }
Iterable<Integer> function(int state) { List<Integer> list = m_stateEpsilons.get(state); return (list != null ? list : Collections.emptyList()); }
/** * Get all the epsilon transitions from a state * * @param state the state number * @return An iterable over all transitions out of the given state */
Get all the epsilon transitions from a state
getStateEpsilons
{ "repo_name": "mtimmerm/dfalex", "path": "src/com/nobigsoftware/dfalex/Nfa.java", "license": "apache-2.0", "size": 7876 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
743,104
protected void setWorkingDirectory(File dir) { this.dir = dir; }
void function(File dir) { this.dir = dir; }
/** set the working directory * @param dir The directory where the command would be executed */
set the working directory
setWorkingDirectory
{ "repo_name": "ExactTargetDev/zookeeper", "path": "src/java/main/org/apache/zookeeper/Shell.java", "license": "apache-2.0", "size": 15337 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
18,256
protected final MethodHandle getContinuousElementGetter(final MethodHandle get, final Class<?> returnType, final int programPoint) { return getContinuousElementGetter(getClass(), get, returnType, programPoint); }
final MethodHandle function(final MethodHandle get, final Class<?> returnType, final int programPoint) { return getContinuousElementGetter(getClass(), get, returnType, programPoint); }
/** * Look up a continuous array element getter * @param get getter, sometimes combined with a has check that throws CCE on failure for relink * @param returnType return type * @param programPoint program point * @return array getter */
Look up a continuous array element getter
getContinuousElementGetter
{ "repo_name": "hazzik/nashorn", "path": "src/jdk/nashorn/internal/runtime/arrays/ContinuousArrayData.java", "license": "gpl-2.0", "size": 11887 }
[ "java.lang.invoke.MethodHandle" ]
import java.lang.invoke.MethodHandle;
import java.lang.invoke.*;
[ "java.lang" ]
java.lang;
740,188
byte[] encrypt(char[] password, byte[] plaintext) throws CryptException;
byte[] encrypt(char[] password, byte[] plaintext) throws CryptException;
/** * Encrypts the given plaintext bytes into a byte array of ciphertext using * an encryption key derived from the password. * * @param password * Basis for encryption. * @param plaintext * Input plaintext bytes. * * @return Ciphertext resulting from plaintext encryption. * ...
Encrypts the given plaintext bytes into a byte array of ciphertext using an encryption key derived from the password
encrypt
{ "repo_name": "shivam091/Java-Security", "path": "crypt/src/main/java/org/security/crypt/pbe/EncryptionScheme.java", "license": "mit", "size": 2660 }
[ "org.security.crypt.CryptException" ]
import org.security.crypt.CryptException;
import org.security.crypt.*;
[ "org.security.crypt" ]
org.security.crypt;
1,585,070
public void readExif(String inFileName) throws FileNotFoundException, IOException { if (inFileName == null) { throw new IllegalArgumentException(NULL_ARGUMENT_STRING); } InputStream is = null; try { is = new BufferedInputStream(new FileInputStream(inFileName))...
void function(String inFileName) throws FileNotFoundException, IOException { if (inFileName == null) { throw new IllegalArgumentException(NULL_ARGUMENT_STRING); } InputStream is = null; try { is = new BufferedInputStream(new FileInputStream(inFileName)); readExif(is); } catch (IOException e) { closeSilently(is); throw ...
/** * Reads the exif tags from a file, clearing this ExifInterface object's * existing exif tags. * * @param inFileName a string representing the filepath to jpeg file. * @throws FileNotFoundException * @throws IOException */
Reads the exif tags from a file, clearing this ExifInterface object's existing exif tags
readExif
{ "repo_name": "bmaupin/android-sms-plus", "path": "src/com/android/mms/exif/ExifInterface.java", "license": "apache-2.0", "size": 92509 }
[ "java.io.BufferedInputStream", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.io.InputStream" ]
import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
905,015
public void closeConnection(Connection c) { if (c != null) { try { if (CHECKCONNECTIONONCLOSE) { try { setReadOnly(c, !c.isReadOnly()); setReadOnly(c, !c.isReadOnly()); } catch (SQLException e...
void function(Connection c) { if (c != null) { try { if (CHECKCONNECTIONONCLOSE) { try { setReadOnly(c, !c.isReadOnly()); setReadOnly(c, !c.isReadOnly()); } catch (SQLException ex2) { LOG.error(STR, ex2); throw new DocumentStoreException(STR, ex2); } } c.close(); } catch (SQLException ex) { LOG.error(STR, ex); } } }
/** * Close the {@link Connection}. */
Close the <code>Connection</code>
closeConnection
{ "repo_name": "ieb/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBConnectionHandler.java", "license": "apache-2.0", "size": 7434 }
[ "java.sql.Connection", "java.sql.SQLException", "org.apache.jackrabbit.oak.plugins.document.DocumentStoreException" ]
import java.sql.Connection; import java.sql.SQLException; import org.apache.jackrabbit.oak.plugins.document.DocumentStoreException;
import java.sql.*; import org.apache.jackrabbit.oak.plugins.document.*;
[ "java.sql", "org.apache.jackrabbit" ]
java.sql; org.apache.jackrabbit;
1,997,664
@Deprecated public static String toUniqueName(CommandSender sender) { if (sender instanceof Player) { return (sender).getName(); } else { return "*Console*"; } }
static String function(CommandSender sender) { if (sender instanceof Player) { return (sender).getName(); } else { return STR; } }
/** * Gets the name of a command sender. This is a unique name and this * method should never return a "display name". * * @param sender * @return */
Gets the name of a command sender. This is a unique name and this method should never return a "display name"
toUniqueName
{ "repo_name": "elBukkit/commandbook", "path": "src/main/java/com/sk89q/commandbook/util/ChatUtil.java", "license": "lgpl-3.0", "size": 7099 }
[ "org.bukkit.command.CommandSender", "org.bukkit.entity.Player" ]
import org.bukkit.command.CommandSender; import org.bukkit.entity.Player;
import org.bukkit.command.*; import org.bukkit.entity.*;
[ "org.bukkit.command", "org.bukkit.entity" ]
org.bukkit.command; org.bukkit.entity;
1,507,246
@Override public synchronized boolean saveSettings(Map<String, String> settings) { String content = FileUtils.readContent(propertiesFile, "\n"); for (Map.Entry<String, String> setting:settings.entrySet()) { String regex = "(?m)^(" + regExEscape(setting.getKey()) + "\\s*+=\\s*+)" + "(?:[^\r\n\\\\...
synchronized boolean function(Map<String, String> settings) { String content = FileUtils.readContent(propertiesFile, "\n"); for (Map.Entry<String, String> setting:settings.entrySet()) { String regex = STR + regExEscape(setting.getKey()) + STR + STR; String oldContent = content; content = content.replaceAll(regex, setti...
/** * Updates the specified settings in the settings file. */
Updates the specified settings in the settings file
saveSettings
{ "repo_name": "firateren52/gitblit", "path": "src/main/java/com/gitblit/FileSettings.java", "license": "apache-2.0", "size": 4988 }
[ "com.gitblit.utils.FileUtils", "java.util.Map" ]
import com.gitblit.utils.FileUtils; import java.util.Map;
import com.gitblit.utils.*; import java.util.*;
[ "com.gitblit.utils", "java.util" ]
com.gitblit.utils; java.util;
1,340,898
public Builder skipSettingMediaSources() { assertThat(timeline).isNull(); assertThat(manifest).isNull(); assertThat(mediaSources).isEmpty(); skipSettingMediaSources = true; return this; }
Builder function() { assertThat(timeline).isNull(); assertThat(manifest).isNull(); assertThat(mediaSources).isEmpty(); skipSettingMediaSources = true; return this; }
/** * Skips calling {@link com.google.android.exoplayer2.ExoPlayer#setMediaSources(List)} before * preparing. Calling this method is not allowed after calls to {@link * #setMediaSources(MediaSource...)}, {@link #setTimeline(Timeline)} and/or {@link * #setManifest(Object)}. * * @return This...
Skips calling <code>com.google.android.exoplayer2.ExoPlayer#setMediaSources(List)</code> before preparing. Calling this method is not allowed after calls to <code>#setMediaSources(MediaSource...)</code>, <code>#setTimeline(Timeline)</code> and/or <code>#setManifest(Object)</code>
skipSettingMediaSources
{ "repo_name": "stari4ek/ExoPlayer", "path": "testutils/src/main/java/com/google/android/exoplayer2/testutil/ExoPlayerTestRunner.java", "license": "apache-2.0", "size": 24452 }
[ "com.google.common.truth.Truth" ]
import com.google.common.truth.Truth;
import com.google.common.truth.*;
[ "com.google.common" ]
com.google.common;
1,409,812
public void detachSharedDiskToComputeNode(String diskName, String cnName) throws InvalidElementException { ComputeNodeType cn = getComputeNode(cnName); if (cn != null) { AttachedDisksListType disks = getAttachedSharedDisks(cn); if (disks != null) { for (int i...
void function(String diskName, String cnName) throws InvalidElementException { ComputeNodeType cn = getComputeNode(cnName); if (cn != null) { AttachedDisksListType disks = getAttachedSharedDisks(cn); if (disks != null) { for (int i = 0; i < disks.getAttachedDisk().size(); i++) { if (disks.getAttachedDisk().get(i).getNa...
/** * Detached Shared disk to compute node. * * @param diskName Shared disk name * @param cnName Compute node name * @throws InvalidElementException Error invalid data */
Detached Shared disk to compute node
detachSharedDiskToComputeNode
{ "repo_name": "mF2C/COMPSs", "path": "compss/runtime/config/xml/resources/src/main/java/es/bsc/compss/types/resources/ResourcesFile.java", "license": "apache-2.0", "size": 130588 }
[ "es.bsc.compss.types.resources.exceptions.InvalidElementException", "es.bsc.compss.types.resources.jaxb.AttachedDisksListType", "es.bsc.compss.types.resources.jaxb.ComputeNodeType" ]
import es.bsc.compss.types.resources.exceptions.InvalidElementException; import es.bsc.compss.types.resources.jaxb.AttachedDisksListType; import es.bsc.compss.types.resources.jaxb.ComputeNodeType;
import es.bsc.compss.types.resources.exceptions.*; import es.bsc.compss.types.resources.jaxb.*;
[ "es.bsc.compss" ]
es.bsc.compss;
56,495
void setThenBranch(@NotNull PsiStatement statement) throws IncorrectOperationException;
void setThenBranch(@NotNull PsiStatement statement) throws IncorrectOperationException;
/** * Sets the statement which is executed when the condition is true to the specified value. * Adds the parentheses if required. * * @param statement the statement to use as the then branch. * @throws IncorrectOperationException if the modification fails for some reason (for example, * the containing...
Sets the statement which is executed when the condition is true to the specified value. Adds the parentheses if required
setThenBranch
{ "repo_name": "jwren/intellij-community", "path": "java/java-psi-api/src/com/intellij/psi/PsiIfStatement.java", "license": "apache-2.0", "size": 3086 }
[ "com.intellij.util.IncorrectOperationException", "org.jetbrains.annotations.NotNull" ]
import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull;
import com.intellij.util.*; import org.jetbrains.annotations.*;
[ "com.intellij.util", "org.jetbrains.annotations" ]
com.intellij.util; org.jetbrains.annotations;
723,898
public void writeConfigInit( IndentedWriter targetWriter) { getCertConfigWriter().ifPresent( cert -> cert.writeConfigInit( targetWriter)); }
void function( IndentedWriter targetWriter) { getCertConfigWriter().ifPresent( cert -> cert.writeConfigInit( targetWriter)); }
/** * Writes server configuration initializations to the given stream. */
Writes server configuration initializations to the given stream
writeConfigInit
{ "repo_name": "Cornutum/tcases", "path": "tcases-moco/src/main/java/org/cornutum/tcases/openapi/moco/MocoServerTestWriter.java", "license": "mit", "size": 17985 }
[ "org.cornutum.tcases.io.IndentedWriter" ]
import org.cornutum.tcases.io.IndentedWriter;
import org.cornutum.tcases.io.*;
[ "org.cornutum.tcases" ]
org.cornutum.tcases;
2,098,507
public NotificationArea readNotificationArea(InputStream in) throws ConversionException, IOException { JSONObject json = parseObject(in); NotificationArea ret = new NotificationArea(); ret.registrationsURL = readStringInternal(json.get(N_REGISTRATIONS)); ret.serverRegistrationsURL = ...
NotificationArea function(InputStream in) throws ConversionException, IOException { JSONObject json = parseObject(in); NotificationArea ret = new NotificationArea(); ret.registrationsURL = readStringInternal(json.get(N_REGISTRATIONS)); ret.serverRegistrationsURL = readStringInternal(json.get(N_SERVERREGISTRATIONS)); re...
/** * Decode a JSON document to retrieve a NotificationArea instance. * * @param in The stream to read JSON from * @return The decoded NotificationArea instance * @throws ConversionException If JSON uses unexpected structure/format * @throws IOException If an I/O error occurs or if JSON is...
Decode a JSON document to retrieve a NotificationArea instance
readNotificationArea
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java", "license": "epl-1.0", "size": 184410 }
[ "com.ibm.json.java.JSONObject", "com.ibm.ws.jmx.connector.datatypes.ConversionException", "com.ibm.ws.jmx.connector.datatypes.NotificationArea", "com.ibm.ws.jmx.connector.datatypes.NotificationRegistration", "java.io.IOException", "java.io.InputStream", "javax.management.NotificationFilter", "javax.ma...
import com.ibm.json.java.JSONObject; import com.ibm.ws.jmx.connector.datatypes.ConversionException; import com.ibm.ws.jmx.connector.datatypes.NotificationArea; import com.ibm.ws.jmx.connector.datatypes.NotificationRegistration; import java.io.IOException; import java.io.InputStream; import javax.management.Notification...
import com.ibm.json.java.*; import com.ibm.ws.jmx.connector.datatypes.*; import java.io.*; import javax.management.*;
[ "com.ibm.json", "com.ibm.ws", "java.io", "javax.management" ]
com.ibm.json; com.ibm.ws; java.io; javax.management;
2,671,635
public static int getItemBurnTime(ItemStack par0ItemStack) { if (par0ItemStack == null) return 0; else { int i = par0ItemStack.getItem().itemID; if (i == Materials.ingotRedSilver.itemID) return 1600; if (i == Materials.dustRedSilver.itemID) return 1200; if (i == Item.redstone.itemID) ...
static int function(ItemStack par0ItemStack) { if (par0ItemStack == null) return 0; else { int i = par0ItemStack.getItem().itemID; if (i == Materials.ingotRedSilver.itemID) return 1600; if (i == Materials.dustRedSilver.itemID) return 1200; if (i == Item.redstone.itemID) return 800; return 0; } }
/** * Returns the number of ticks that the supplied fuel item will keep the * furnace burning, or 0 if the item isn't fuel */
Returns the number of ticks that the supplied fuel item will keep the furnace burning, or 0 if the item isn't fuel
getItemBurnTime
{ "repo_name": "Morton00000/CivCraft", "path": "common/civcraft/tiles/machines/TileCrusher1.java", "license": "gpl-3.0", "size": 12813 }
[ "net.minecraft.item.Item", "net.minecraft.item.ItemStack" ]
import net.minecraft.item.Item; import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
2,151,779
return generateDomainUserID(this.subDomain()); }
return generateDomainUserID(this.subDomain()); }
/** * Gets the {@link BankAccount} ID for the current subdomain. It will only works properly when * the controller is in a subdomain. * * @return The {@link BankAccount} ID for the current subdomain account. */
Gets the <code>BankAccount</code> ID for the current subdomain. It will only works properly when the controller is in a subdomain
domainBankAccount
{ "repo_name": "fesl/figgo", "path": "src/main/java/br/octahedron/figgo/modules/bank/controller/AbstractBankController.java", "license": "gpl-3.0", "size": 1427 }
[ "br.octahedron.figgo.util.DomainUtil" ]
import br.octahedron.figgo.util.DomainUtil;
import br.octahedron.figgo.util.*;
[ "br.octahedron.figgo" ]
br.octahedron.figgo;
1,462,694
setActivityIntent(new Intent().putExtra(EXTRA_TEXT, "gist content")); View createMenu = view(R.id.m_apply); assertTrue(createMenu.isEnabled()); EditText content = editText(R.id.et_gist_content); assertEquals("gist content", content.getText().toString()); }
setActivityIntent(new Intent().putExtra(EXTRA_TEXT, STR)); View createMenu = view(R.id.m_apply); assertTrue(createMenu.isEnabled()); EditText content = editText(R.id.et_gist_content); assertEquals(STR, content.getText().toString()); }
/** * Create Gist with initial text */
Create Gist with initial text
testCreateWithInitialText
{ "repo_name": "DeLaSalleUniversity-Manila/ForkHub-macexcel", "path": "app/src/androidTest/java/com/github/zion/tests/gist/CreateGistActivityTest.java", "license": "apache-2.0", "size": 1948 }
[ "android.content.Intent", "android.view.View", "android.widget.EditText" ]
import android.content.Intent; import android.view.View; import android.widget.EditText;
import android.content.*; import android.view.*; import android.widget.*;
[ "android.content", "android.view", "android.widget" ]
android.content; android.view; android.widget;
2,865,295
// build test data final OsgpMeterValue osgpMeterValue = new OsgpMeterValue(VALUE, OSGP_UNIT); final MeterReadsGas meterReadsGas = new MeterReadsGas(DATE, osgpMeterValue, DATE); // actual mapping final ActualMeterReadsGasResponse actualMeterReadsGasResponse = this.monitoringMapp...
final OsgpMeterValue osgpMeterValue = new OsgpMeterValue(VALUE, OSGP_UNIT); final MeterReadsGas meterReadsGas = new MeterReadsGas(DATE, osgpMeterValue, DATE); final ActualMeterReadsGasResponse actualMeterReadsGasResponse = this.monitoringMapper.map(meterReadsGas, ActualMeterReadsGasResponse.class); assertNotNull(actual...
/** * Tests if a MeterReadsGas object can be mapped */
Tests if a MeterReadsGas object can be mapped
testMeterReadsGasMapping
{ "repo_name": "OSGP/Platform", "path": "osgp-adapter-ws-smartmetering/src/test/java/org/opensmartgridplatform/adapter/ws/smartmetering/application/mapping/MeterReadsGasMappingTest.java", "license": "apache-2.0", "size": 2488 }
[ "org.junit.Assert", "org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.ActualMeterReadsGasResponse", "org.opensmartgridplatform.domain.core.valueobjects.smartmetering.MeterReadsGas", "org.opensmartgridplatform.domain.core.valueobjects.smartmetering.OsgpMeterValue" ]
import org.junit.Assert; import org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.ActualMeterReadsGasResponse; import org.opensmartgridplatform.domain.core.valueobjects.smartmetering.MeterReadsGas; import org.opensmartgridplatform.domain.core.valueobjects.smartmetering.OsgpMeterValue;
import org.junit.*; import org.opensmartgridplatform.adapter.ws.schema.smartmetering.monitoring.*; import org.opensmartgridplatform.domain.core.valueobjects.smartmetering.*;
[ "org.junit", "org.opensmartgridplatform.adapter", "org.opensmartgridplatform.domain" ]
org.junit; org.opensmartgridplatform.adapter; org.opensmartgridplatform.domain;
459,353
Application getApplicationByUuid(String uuid) throws APIManagementException;
Application getApplicationByUuid(String uuid) throws APIManagementException;
/** * Retrieve an application given the uuid. * * @param uuid UUID of the application. * @return Application object of the given uuid * @throws APIManagementException If failed to get the application. */
Retrieve an application given the uuid
getApplicationByUuid
{ "repo_name": "Minoli/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/api/APIStore.java", "license": "apache-2.0", "size": 24087 }
[ "org.wso2.carbon.apimgt.core.exception.APIManagementException", "org.wso2.carbon.apimgt.core.models.Application" ]
import org.wso2.carbon.apimgt.core.exception.APIManagementException; import org.wso2.carbon.apimgt.core.models.Application;
import org.wso2.carbon.apimgt.core.exception.*; import org.wso2.carbon.apimgt.core.models.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,660,781
public DataNode setDescription(IDataset description);
DataNode function(IDataset description);
/** * Description of aperture * * @param description the description */
Description of aperture
setDescription
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXaperture.java", "license": "epl-1.0", "size": 6548 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode", "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.january.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.january.dataset.*;
[ "org.eclipse.dawnsci", "org.eclipse.january" ]
org.eclipse.dawnsci; org.eclipse.january;
2,110,311
public Object parseJSON(String json) { try { if (json.startsWith("{")) return new JSONObject(json); else return new JSONArray(json); } catch (JSONException e) { return null; } }
Object function(String json) { try { if (json.startsWith("{")) return new JSONObject(json); else return new JSONArray(json); } catch (JSONException e) { return null; } }
/** * Parses a JSON string into a JSONObject or JSONArray * @param json the String to parse * @return JSONObject or JSONArray (depending on the given string) if parse succeeds. Otherwise {@code null}. */
Parses a JSON string into a JSONObject or JSONArray
parseJSON
{ "repo_name": "phil-brown/javaQuery", "path": "src/self/philbrown/javaQuery/$.java", "license": "apache-2.0", "size": 101555 }
[ "org.json.JSONArray", "org.json.JSONException", "org.json.JSONObject" ]
import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
1,774,514
int updateSchedulerState(Connection conn, String instanceId, long checkInTime) throws SQLException;
int updateSchedulerState(Connection conn, String instanceId, long checkInTime) throws SQLException;
/** * <p> * Update a scheduler-instance state record. * </p> * * @param conn * the DB Connection * @return the number of updated rows. */
Update a scheduler-instance state record.
updateSchedulerState
{ "repo_name": "optivo-org/quartz-1.8.3-optivo", "path": "quartz/src/main/java/org/quartz/impl/jdbcjobstore/DriverDelegate.java", "license": "apache-2.0", "size": 41989 }
[ "java.sql.Connection", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,855,080
public void testRemoveAllRandomAccess() { Multimap<String, Integer> multimap = create(); multimap.put("foo", 1); multimap.put("foo", 3); assertTrue(multimap.removeAll("foo") instanceof RandomAccess); assertTrue(multimap.removeAll("bar") instanceof RandomAccess); }
void function() { Multimap<String, Integer> multimap = create(); multimap.put("foo", 1); multimap.put("foo", 3); assertTrue(multimap.removeAll("foo") instanceof RandomAccess); assertTrue(multimap.removeAll("bar") instanceof RandomAccess); }
/** * Confirm that removeAll() returns a List implementing RandomAccess. */
Confirm that removeAll() returns a List implementing RandomAccess
testRemoveAllRandomAccess
{ "repo_name": "aiyanbo/guava", "path": "guava-tests/test/com/google/common/collect/ArrayListMultimapTest.java", "license": "apache-2.0", "size": 6556 }
[ "java.util.RandomAccess" ]
import java.util.RandomAccess;
import java.util.*;
[ "java.util" ]
java.util;
2,232,138
EAttribute getContainer_Shadow();
EAttribute getContainer_Shadow();
/** * Returns the meta object for the attribute '{@link fr.obeo.dsl.game.Container#isShadow <em>Shadow</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Shadow</em>'. * @see fr.obeo.dsl.game.Container#isShadow() * @see #getContainer() * @generated ...
Returns the meta object for the attribute '<code>fr.obeo.dsl.game.Container#isShadow Shadow</code>'.
getContainer_Shadow
{ "repo_name": "Obeo/Game-Designer", "path": "plugins/fr.obeo.dsl.game/src-gen/fr/obeo/dsl/game/GamePackage.java", "license": "epl-1.0", "size": 149639 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,371,716
public boolean hasUnsupportedCriticalExtension() { Set extns = getCriticalExtensionOIDs(); if(extns == null) { return false; } extns.remove(RFC3280CertPathUtilities.ISSUING_DISTRIBUTION_POINT); extns.remove(RFC3280CertPathUtilities.DELTA_CRL_INDICATOR); return !extns.isEmpty(); }
boolean function() { Set extns = getCriticalExtensionOIDs(); if(extns == null) { return false; } extns.remove(RFC3280CertPathUtilities.ISSUING_DISTRIBUTION_POINT); extns.remove(RFC3280CertPathUtilities.DELTA_CRL_INDICATOR); return !extns.isEmpty(); }
/** * Will return true if any extensions are present and marked * as critical as we currently dont handle any extensions! */
Will return true if any extensions are present and marked as critical as we currently dont handle any extensions
hasUnsupportedCriticalExtension
{ "repo_name": "SafetyCulture/DroidText", "path": "app/src/main/java/bouncycastle/repack/org/bouncycastle/jce/provider/X509CRLObject.java", "license": "lgpl-3.0", "size": 12435 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,340,322
void copy(INDArray x,INDArray y);
void copy(INDArray x,INDArray y);
/** * copy a vector to another vector. * @param x * @param y */
copy a vector to another vector
copy
{ "repo_name": "GeorgeMe/nd4j", "path": "nd4j-api/src/main/java/org/nd4j/linalg/api/blas/Level1.java", "license": "apache-2.0", "size": 6438 }
[ "org.nd4j.linalg.api.ndarray.INDArray" ]
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ndarray.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
2,388,767
protected void configureColumnType(Column column, ResultSet rs) throws SQLException { column.setDataType(rs.getInt("DATA_TYPE")); column.setColumnSize(rs.getInt("COLUMN_SIZE")); column.setDecimalDigits(rs.getInt("DECIMAL_DIGITS")); // Set true, if precision should be initialize column.setInitPrecision(!((...
void function(Column column, ResultSet rs) throws SQLException { column.setDataType(rs.getInt(STR)); column.setColumnSize(rs.getInt(STR)); column.setDecimalDigits(rs.getInt(STR)); column.setInitPrecision(!((column.getDataType() == Types.DECIMAL column.getDataType() == Types.NUMERIC column .getDataType() == Types.REAL) ...
/** * Configuration of column's type. * * @param column Column to configure * @param rs Result set, used as a property resource. * @throws java.sql.SQLException wrong Result Set content */
Configuration of column's type
configureColumnType
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-database/liquibase/snapshot/jvm/JdbcDatabaseSnapshotGenerator.java", "license": "lgpl-3.0", "size": 34510 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Types" ]
import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,613,862
@FIXVersion(introduced="4.3") @TagNumRef(tagNum=TagNum.SecurityReqID, required=true) public String getSecurityReqID() { return securityReqID; }
@FIXVersion(introduced="4.3") @TagNumRef(tagNum=TagNum.SecurityReqID, required=true) String function() { return securityReqID; }
/** * Message field getter. * @return field value */
Message field getter
getSecurityReqID
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/DerivativeSecurityListMsg.java", "license": "gpl-3.0", "size": 23172 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,604,101
public IplImage filter(IplImage sourceImage);
IplImage function(IplImage sourceImage);
/** * Takes an image as input and applies a filter from SciFY's legacy ICSee * filters. * * @param sourceImage The source image. * @return The filtered image. */
Takes an image as input and applies a filter from SciFY's legacy ICSee filters
filter
{ "repo_name": "ellak-monades-aristeias/ICStudy-v1", "path": "ICStudy_Client/src/main/java/org/scify/icstudy/filters/ICSeeFilter.java", "license": "apache-2.0", "size": 989 }
[ "org.bytedeco.javacpp.opencv_core.IplImage" ]
import org.bytedeco.javacpp.opencv_core.IplImage;
import org.bytedeco.javacpp.opencv_core.*;
[ "org.bytedeco.javacpp" ]
org.bytedeco.javacpp;
10,762
private String getTopologyFromRandomNodeWithRetry(Set<Host> activeHosts) { int count = NUM_RETRIES_PER_NODE; String nodeResponse; Exception lastEx; final Host randomHost = getRandomHost(activeHosts); do { try { lastEx = null; nodeResponse = getResponseViaHttp(randomHost.getHostName()); if (...
String function(Set<Host> activeHosts) { int count = NUM_RETRIES_PER_NODE; String nodeResponse; Exception lastEx; final Host randomHost = getRandomHost(activeHosts); do { try { lastEx = null; nodeResponse = getResponseViaHttp(randomHost.getHostName()); if (nodeResponse != null) { Logger.info(STR + randomHost); return n...
/** * Tries multiple nodes, and it only bubbles up the last node's exception. * We want to bubble up the exception in order for the last node to be * removed from the connection pool. * * @param activeHosts * @return the topology from cluster_describe */
Tries multiple nodes, and it only bubbles up the last node's exception. We want to bubble up the exception in order for the last node to be removed from the connection pool
getTopologyFromRandomNodeWithRetry
{ "repo_name": "balajivenki/dyno", "path": "dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/lb/HttpEndpointBasedTokenMapSupplier.java", "license": "apache-2.0", "size": 6374 }
[ "com.netflix.dyno.connectionpool.Host", "com.netflix.dyno.connectionpool.exception.DynoException", "com.netflix.dyno.connectionpool.exception.TimeoutException", "java.util.Set", "org.apache.http.conn.ConnectTimeoutException", "org.slf4j.Logger" ]
import com.netflix.dyno.connectionpool.Host; import com.netflix.dyno.connectionpool.exception.DynoException; import com.netflix.dyno.connectionpool.exception.TimeoutException; import java.util.Set; import org.apache.http.conn.ConnectTimeoutException; import org.slf4j.Logger;
import com.netflix.dyno.connectionpool.*; import com.netflix.dyno.connectionpool.exception.*; import java.util.*; import org.apache.http.conn.*; import org.slf4j.*;
[ "com.netflix.dyno", "java.util", "org.apache.http", "org.slf4j" ]
com.netflix.dyno; java.util; org.apache.http; org.slf4j;
2,396,074
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) public void showProgress(final boolean show) { // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow // for very easy animations. If available, use these APIs to fade-in // the progress spinner. if (Build.VERSION.SDK_...
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) void function(final boolean show) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);
/** * Shows the progress UI and hides the form. Taken from login form sample. */
Shows the progress UI and hides the form. Taken from login form sample
showProgress
{ "repo_name": "azavea/AndroidValidatedForms", "path": "androidvalidatedforms/src/main/java/com/azavea/androidvalidatedforms/FormWithAppCompatActivity.java", "license": "apache-2.0", "size": 7975 }
[ "android.annotation.TargetApi", "android.os.Build" ]
import android.annotation.TargetApi; import android.os.Build;
import android.annotation.*; import android.os.*;
[ "android.annotation", "android.os" ]
android.annotation; android.os;
2,006,369
public StringTable getEvents_Directories() { Timing StopWatch1=new Timing(); StopWatch1.start(); // TODO Auto-generated method stub StringTable Temp= genericSelect("SELECT Directory,Email_TO,Email_CC,Subject,Body " + "FROM Events;"); if(StopWatchPerformance)System.out.println(this.getClass().getName(...
StringTable function() { Timing StopWatch1=new Timing(); StopWatch1.start(); StringTable Temp= genericSelect(STR + STR); if(StopWatchPerformance)System.out.println(this.getClass().getName()+STR+StopWatch1.sec_ms(StopWatch1.stop_SecDouble())); return Temp; }
/** * Gets the events_ directories. * * @return the events_ directories */
Gets the events_ directories
getEvents_Directories
{ "repo_name": "mannyrivera2010/tu-grant-processor", "path": "src/org/database/DataView.java", "license": "gpl-2.0", "size": 13582 }
[ "org.shared.StringTable", "org.shared.performance.Timing" ]
import org.shared.StringTable; import org.shared.performance.Timing;
import org.shared.*; import org.shared.performance.*;
[ "org.shared", "org.shared.performance" ]
org.shared; org.shared.performance;
2,686,724
@Generated @Selector("documentURL") public native NSURL documentURL();
@Selector(STR) native NSURL function();
/** * May return NULL if the document was created from NSData. */
May return NULL if the document was created from NSData
documentURL
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/pdfkit/PDFDocument.java", "license": "apache-2.0", "size": 19433 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
122,045
public List<String> getRecords() { return this.records; }
List<String> function() { return this.records; }
/** * <p>Getter for the field <code>records</code>.</p> * * @return a {@link java.util.List} object. */
Getter for the field <code>records</code>
getRecords
{ "repo_name": "NotFound403/WePay", "path": "src/main/java/cn/felord/wepay/ali/sdk/api/domain/AlipayOfflineTrade.java", "license": "apache-2.0", "size": 4514 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,564,468
@Authorized(PrivilegeConstants.GET_CONCEPTS) public Integer getCountOfConcepts(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept ...
@Authorized(PrivilegeConstants.GET_CONCEPTS) Integer function(String phrase, List<Locale> locales, boolean includeRetired, List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes, Concept answersToConcept);
/** * Return the number of concepts matching a search phrase and the specified arguments * * @param phrase matched to the start of any word in any of the names of a concept * @param locales List&lt;Locale&gt; to restrict to * @param includeRetired Specifies whether to include retired concepts * @param requ...
Return the number of concepts matching a search phrase and the specified arguments
getCountOfConcepts
{ "repo_name": "preethi29/openmrs-core", "path": "api/src/main/java/org/openmrs/api/ConceptService.java", "license": "mpl-2.0", "size": 72694 }
[ "java.util.List", "java.util.Locale", "org.openmrs.Concept", "org.openmrs.ConceptClass", "org.openmrs.ConceptDatatype", "org.openmrs.annotation.Authorized", "org.openmrs.util.PrivilegeConstants" ]
import java.util.List; import java.util.Locale; import org.openmrs.Concept; import org.openmrs.ConceptClass; import org.openmrs.ConceptDatatype; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants;
import java.util.*; import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*;
[ "java.util", "org.openmrs", "org.openmrs.annotation", "org.openmrs.util" ]
java.util; org.openmrs; org.openmrs.annotation; org.openmrs.util;
806,033
public static java.util.List extractProfileList(ims.domain.ILightweightDomainFactory domainFactory, ims.dtomove.vo.ProfileVoCollection voCollection) { return extractProfileList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.dtomove.vo.ProfileVoCollection voCollection) { return extractProfileList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.dto_move.domain.objects.Profile list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.dto_move.domain.objects.Profile list from the value object collection
extractProfileList
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/dtomove/vo/domain/ProfileVoAssembler.java", "license": "agpl-3.0", "size": 46086 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
129,681
public int getRow (float y) { Array<Cell> cells = this.cells; int row = 0; y += getPadTop(); int i = 0, n = cells.size; if (n == 0) return -1; if (n == 1) return 0; while (i < n) { Cell c = cells.get(i++); if (c.actorY + c.computedPadTop < y) break; if (c.endRow) row++; } retur...
int function (float y) { Array<Cell> cells = this.cells; int row = 0; y += getPadTop(); int i = 0, n = cells.size; if (n == 0) return -1; if (n == 1) return 0; while (i < n) { Cell c = cells.get(i++); if (c.actorY + c.computedPadTop < y) break; if (c.endRow) row++; } return row; }
/** Returns the row index for the y coordinate, or -1 if there are no cells. * @param y The y coordinate, where 0 is the top of the table. */
Returns the row index for the y coordinate, or -1 if there are no cells
getRow
{ "repo_name": "codepoke/libgdx", "path": "gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Table.java", "license": "apache-2.0", "size": 43795 }
[ "com.badlogic.gdx.utils.Array" ]
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
36,780
private void splitVarDeclarations(Node n) { for (Node next, c = n.getFirstChild(); c != null; c = next) { next = c.getNext(); if (c.getType() == Token.VAR) { if (assertOnChange && !c.hasChildren()) { throw new IllegalStateException("Empty VAR node."); } ...
void function(Node n) { for (Node next, c = n.getFirstChild(); c != null; c = next) { next = c.getNext(); if (c.getType() == Token.VAR) { if (assertOnChange && !c.hasChildren()) { throw new IllegalStateException(STR); } while (c.getFirstChild() != c.getLastChild()) { Node name = c.getFirstChild(); c.removeChild(name); ...
/** * Split a var node such as: * var a, b; * into individual statements: * var a; * var b; * @param n The whose children we should inspect. */
Split a var node such as: var a, b; into individual statements: var a; var b
splitVarDeclarations
{ "repo_name": "110035/kissy", "path": "tools/module-compiler/src/com/google/javascript/jscomp/Normalize.java", "license": "mit", "size": 27748 }
[ "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;
1,558,643
public Map<String, SearchHitField> getFields() { return fields == null ? emptyMap() : fields; }
Map<String, SearchHitField> function() { return fields == null ? emptyMap() : fields; }
/** * A map of hit fields (from field name to hit fields) if additional fields * were required to be loaded. */
A map of hit fields (from field name to hit fields) if additional fields were required to be loaded
getFields
{ "repo_name": "jprante/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/SearchHit.java", "license": "apache-2.0", "size": 35767 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,695,348
public static TermDepositCurveNode of(TermDepositTemplate template, ObservableId rateId, double additionalSpread) { return builder() .template(template) .rateId(rateId) .additionalSpread(additionalSpread) .build(); }
static TermDepositCurveNode function(TermDepositTemplate template, ObservableId rateId, double additionalSpread) { return builder() .template(template) .rateId(rateId) .additionalSpread(additionalSpread) .build(); }
/** * Returns a curve node for a term deposit using the specified instrument template, rate key and spread. * <p> * A suitable default label will be created. * * @param template the template defining the node instrument * @param rateId the identifier of the market data providing the rate for the nod...
Returns a curve node for a term deposit using the specified instrument template, rate key and spread. A suitable default label will be created
of
{ "repo_name": "OpenGamma/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/curve/node/TermDepositCurveNode.java", "license": "apache-2.0", "size": 26096 }
[ "com.opengamma.strata.data.ObservableId", "com.opengamma.strata.product.deposit.type.TermDepositTemplate" ]
import com.opengamma.strata.data.ObservableId; import com.opengamma.strata.product.deposit.type.TermDepositTemplate;
import com.opengamma.strata.data.*; import com.opengamma.strata.product.deposit.type.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
408,376
static void addExpandedArtifacts( Iterable<Artifact> artifacts, Collection<? super Artifact> output, ArtifactExpander artifactExpander) { addExpandedArtifacts(artifacts, output, Functions.<Artifact>identity(), artifactExpander); }
static void addExpandedArtifacts( Iterable<Artifact> artifacts, Collection<? super Artifact> output, ArtifactExpander artifactExpander) { addExpandedArtifacts(artifacts, output, Functions.<Artifact>identity(), artifactExpander); }
/** * Adds a collection of artifacts to a given collection, with {@link * MiddlemanType#AGGREGATING_MIDDLEMAN} middleman actions expanded once. */
Adds a collection of artifacts to a given collection, with <code>MiddlemanType#AGGREGATING_MIDDLEMAN</code> middleman actions expanded once
addExpandedArtifacts
{ "repo_name": "safarmer/bazel", "path": "src/main/java/com/google/devtools/build/lib/actions/Artifact.java", "license": "apache-2.0", "size": 60142 }
[ "com.google.common.base.Functions", "java.util.Collection" ]
import com.google.common.base.Functions; import java.util.Collection;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,625,162
@Override protected void rename( List<HadoopResourceId> srcResourceIds, List<HadoopResourceId> destResourceIds) throws IOException { for (int i = 0; i < srcResourceIds.size(); ++i) { Path src = srcResourceIds.get(i).toPath(); Path dest = destResourceIds.get(i).toPath(); // rename...
void function( List<HadoopResourceId> srcResourceIds, List<HadoopResourceId> destResourceIds) throws IOException { for (int i = 0; i < srcResourceIds.size(); ++i) { Path src = srcResourceIds.get(i).toPath(); Path dest = destResourceIds.get(i).toPath(); mkdirs(dest); boolean success = fileSystem.rename(src, dest); if (!...
/** * Renames a {@link List} of file-like resources from one location to another. * * <p>The number of source resources must equal the number of destination resources. Destination * resources will be created recursively. * * @param srcResourceIds the references of the source resources * @param dest...
Renames a <code>List</code> of file-like resources from one location to another. The number of source resources must equal the number of destination resources. Destination resources will be created recursively
rename
{ "repo_name": "rangadi/beam", "path": "sdks/java/io/hadoop-file-system/src/main/java/org/apache/beam/sdk/io/hdfs/HadoopFileSystem.java", "license": "apache-2.0", "size": 13643 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.nio.file.FileAlreadyExistsException", "java.util.List", "org.apache.hadoop.fs.Path" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.FileAlreadyExistsException; import java.util.List; import org.apache.hadoop.fs.Path;
import java.io.*; import java.nio.file.*; import java.util.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.nio", "java.util", "org.apache.hadoop" ]
java.io; java.nio; java.util; org.apache.hadoop;
1,553,598
private DatePicker getDatePicker() { final DatePicker picker = new DatePicker() { private static final long serialVersionUID = 4166072895162221956L;
DatePicker function() { final DatePicker picker = new DatePicker() { private static final long serialVersionUID = 4166072895162221956L;
/** * Setup a DatePicker component. */
Setup a DatePicker component
getDatePicker
{ "repo_name": "massx1/syncope", "path": "client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/DateTextFieldPanel.java", "license": "apache-2.0", "size": 2985 }
[ "org.apache.wicket.extensions.yui.calendar.DatePicker" ]
import org.apache.wicket.extensions.yui.calendar.DatePicker;
import org.apache.wicket.extensions.yui.calendar.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,169,998
if (fields == null) return null; if (columns == null) return new LinkedHashMap<String, Object>(fields); LinkedHashMap<String, Object> result = new LinkedHashMap<String, Object>(); for (DataColumn column : columns) { String columnId = column.getId(); if (fields.containsKe...
if (fields == null) return null; if (columns == null) return new LinkedHashMap<String, Object>(fields); LinkedHashMap<String, Object> result = new LinkedHashMap<String, Object>(); for (DataColumn column : columns) { String columnId = column.getId(); if (fields.containsKey(columnId)) { JsonElement valueElement = fields....
/** * Order the resulting fields and its values from <code>fields</code> map as the order defined by the resulting dataset columns in <code>columnss/code> list. * * @param fields The fields to order. * @param columns The resulting columns definition order. * @return The ordered fields/values m...
Order the resulting fields and its values from <code>fields</code> map as the order defined by the resulting dataset columns in <code>columnss/code> list
orderAndParseFields
{ "repo_name": "Salaboy/dashbuilder", "path": "dashbuilder-backend/dashbuilder-dataset-elasticsearch/src/main/java/org/dashbuilder/dataprovider/backend/elasticsearch/rest/client/impl/jest/gson/AbstractAdapter.java", "license": "apache-2.0", "size": 2854 }
[ "com.google.gson.JsonElement", "java.util.LinkedHashMap", "org.dashbuilder.dataprovider.backend.elasticsearch.rest.client.impl.jest.ElasticSearchJestClient", "org.dashbuilder.dataset.DataColumn" ]
import com.google.gson.JsonElement; import java.util.LinkedHashMap; import org.dashbuilder.dataprovider.backend.elasticsearch.rest.client.impl.jest.ElasticSearchJestClient; import org.dashbuilder.dataset.DataColumn;
import com.google.gson.*; import java.util.*; import org.dashbuilder.dataprovider.backend.elasticsearch.rest.client.impl.jest.*; import org.dashbuilder.dataset.*;
[ "com.google.gson", "java.util", "org.dashbuilder.dataprovider", "org.dashbuilder.dataset" ]
com.google.gson; java.util; org.dashbuilder.dataprovider; org.dashbuilder.dataset;
2,745,284
public void append(IRegion... region) { for (IRegion r : region) { Assert.isLegal(r.getLength() >= 0, "Negative region length"); //$NON-NLS-1$ if (r.getLength() == 0) { continue; } boolean hasOverlaps; do { hasOverlaps = false; IRegion left = NavigableSetFloor(regions, r); IRegion ri...
void function(IRegion... region) { for (IRegion r : region) { Assert.isLegal(r.getLength() >= 0, STR); if (r.getLength() == 0) { continue; } boolean hasOverlaps; do { hasOverlaps = false; IRegion left = NavigableSetFloor(regions, r); IRegion right = NavigableSetCeiling(regions, r); if (overlap(left, r)) { regions.remov...
/** * Append regions * * @param region */
Append regions
append
{ "repo_name": "shakaran/studio3", "path": "plugins/com.aptana.editor.common/src/com/aptana/editor/common/Regions.java", "license": "gpl-3.0", "size": 7139 }
[ "org.eclipse.core.runtime.Assert", "org.eclipse.jface.text.IRegion" ]
import org.eclipse.core.runtime.Assert; import org.eclipse.jface.text.IRegion;
import org.eclipse.core.runtime.*; import org.eclipse.jface.text.*;
[ "org.eclipse.core", "org.eclipse.jface" ]
org.eclipse.core; org.eclipse.jface;
1,464,559
public void read(InputStream ins) throws IOException { DataInputStream in = new DataInputStream(ins); attributes = in.readByte(); int len = in.readUnsignedShort(); data = new byte[len]; in.readFully(data); }
void function(InputStream ins) throws IOException { DataInputStream in = new DataInputStream(ins); attributes = in.readByte(); int len = in.readUnsignedShort(); data = new byte[len]; in.readFully(data); }
/** * Read the necessary data to create a PDB from the {@code InputStream}. * * @param ins The {@code InputStream} to read data from in order to * restore the {@code object}. * * @throws IOException If any I/O error occurs. */
Read the necessary data to create a PDB from the InputStream
read
{ "repo_name": "beppec56/core", "path": "xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java", "license": "gpl-3.0", "size": 5184 }
[ "java.io.DataInputStream", "java.io.IOException", "java.io.InputStream" ]
import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,047,140
public Packet on_sendable() throws NothingToSend { // tx_requests take precedence if (!this.tx_requests.isEmpty()) return this.tx_requests.pollLast(); switch (this.retransmission_mode) { case RTM_MANUAL: // two cases are possible - either a new packet can be dispatched // or retransmission should b...
Packet function() throws NothingToSend { if (!this.tx_requests.isEmpty()) return this.tx_requests.pollLast(); switch (this.retransmission_mode) { case RTM_MANUAL: if (this.packs_in_transit.size() == 0) { if (this.buffer.isEmpty()) throw new NothingToSend(); byte[] data_to_send = this.buffer.pollLast(); Packet pkt = new...
/** * Called when something can be sent. * Returns a packet when this class wants something to be sent. That thing * should be sent ASAP. */
Called when something can be sent. Returns a packet when this class wants something to be sent. That thing should be sent ASAP
on_sendable
{ "repo_name": "piotrmaslanka/lnx2", "path": "java/pl/com/henrietta/lnx2/Channel.java", "license": "mit", "size": 9121 }
[ "pl.com.henrietta.lnx2.Packet", "pl.com.henrietta.lnx2.exceptions.NothingToSend" ]
import pl.com.henrietta.lnx2.Packet; import pl.com.henrietta.lnx2.exceptions.NothingToSend;
import pl.com.henrietta.lnx2.*; import pl.com.henrietta.lnx2.exceptions.*;
[ "pl.com.henrietta" ]
pl.com.henrietta;
1,134,505
public Drawable getForeground() { return mForeground; }
Drawable function() { return mForeground; }
/** * Returns the drawable used as the foreground of this FrameLayout. The * foreground drawable, if non-null, is always drawn on top of the children. * * @return A Drawable or null if no foreground was set. */
Returns the drawable used as the foreground of this FrameLayout. The foreground drawable, if non-null, is always drawn on top of the children
getForeground
{ "repo_name": "DrizzleSuite/DrizzleSMS", "path": "src/org/grovecity/drizzlesms/components/ForegroundImageView.java", "license": "gpl-3.0", "size": 6674 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
720,110
@Test @SuppressWarnings("unchecked") public void parallelChannelsTest() throws Exception { final Random rnd = new Random(SEED); final AbstractInvokable memOwner = new DummyInvokable(); FileIOChannel.ID[] ids = new FileIOChannel.ID[NUM_CHANNELS]; BlockChannelWriter<MemorySegment>[] writers = new BlockCha...
@SuppressWarnings(STR) void function() throws Exception { final Random rnd = new Random(SEED); final AbstractInvokable memOwner = new DummyInvokable(); FileIOChannel.ID[] ids = new FileIOChannel.ID[NUM_CHANNELS]; BlockChannelWriter<MemorySegment>[] writers = new BlockChannelWriter[NUM_CHANNELS]; BlockChannelReader<Memo...
/** * This test instantiates multiple channels and writes to them in parallel and re-reads the data in * parallel. It is designed to check the ability of the IO manager to correctly handle multiple threads. */
This test instantiates multiple channels and writes to them in parallel and re-reads the data in parallel. It is designed to check the ability of the IO manager to correctly handle multiple threads
parallelChannelsTest
{ "repo_name": "hequn8128/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/IOManagerITCase.java", "license": "apache-2.0", "size": 8278 }
[ "java.io.EOFException", "java.io.File", "java.util.List", "java.util.Random", "org.apache.flink.core.memory.MemorySegment", "org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable", "org.apache.flink.runtime.operators.testutils.DummyInvokable", "org.junit.Assert" ]
import java.io.EOFException; import java.io.File; import java.util.List; import java.util.Random; import org.apache.flink.core.memory.MemorySegment; import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable; import org.apache.flink.runtime.operators.testutils.DummyInvokable; import org.junit.Assert;
import java.io.*; import java.util.*; import org.apache.flink.core.memory.*; import org.apache.flink.runtime.jobgraph.tasks.*; import org.apache.flink.runtime.operators.testutils.*; import org.junit.*;
[ "java.io", "java.util", "org.apache.flink", "org.junit" ]
java.io; java.util; org.apache.flink; org.junit;
2,171,010
public T caseEvent(Event object) { return null; }
T function(Event object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Event</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpret...
Returns the result of interpreting the object as an instance of 'Event'. This implementation returns null; returning a non-null result will terminate the switch.
caseEvent
{ "repo_name": "romartin/kie-wb-common", "path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/util/Bpmn2Switch.java", "license": "apache-2.0", "size": 144865 }
[ "org.eclipse.bpmn2.Event" ]
import org.eclipse.bpmn2.Event;
import org.eclipse.bpmn2.*;
[ "org.eclipse.bpmn2" ]
org.eclipse.bpmn2;
1,340,574
@TargetApi(Build.VERSION_CODES.HONEYCOMB) public void setActivateOnItemClick(boolean activateOnItemClick) { // When setting CHOICE_MODE_SINGLE, ListView will automatically // give items the 'activated' state when touched. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { ...
@TargetApi(Build.VERSION_CODES.HONEYCOMB) void function(boolean activateOnItemClick) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { mGridView.setChoiceMode(activateOnItemClick ? ListView.CHOICE_MODE_SINGLE : ListView.CHOICE_MODE_NONE); } }
/** * Turns on activate-on-click mode. When this mode is on, list items will be * given the 'activated' state when touched. */
Turns on activate-on-click mode. When this mode is on, list items will be given the 'activated' state when touched
setActivateOnItemClick
{ "repo_name": "cymcsg/UltimateAndroid", "path": "deprecated/UltimateAndroidNormal/DemoOfUI/src/com/marshalchen/common/demoofui/stickygridheadersexample/StickGridItemListFragment.java", "license": "apache-2.0", "size": 10322 }
[ "android.annotation.TargetApi", "android.os.Build", "android.widget.ListView" ]
import android.annotation.TargetApi; import android.os.Build; import android.widget.ListView;
import android.annotation.*; import android.os.*; import android.widget.*;
[ "android.annotation", "android.os", "android.widget" ]
android.annotation; android.os; android.widget;
2,844,397
private static void executeForNonServiceFailure(final ModelControllerClient client, final ModelNode operation) { try { final ModelNode result = client.execute(operation); if (! result.hasDefined("outcome") && ! ModelDescriptionConstants.FAILED.equals(result.get("outcome").asString())...
static void function(final ModelControllerClient client, final ModelNode operation) { try { final ModelNode result = client.execute(operation); if (! result.hasDefined(STR) && ! ModelDescriptionConstants.FAILED.equals(result.get(STR).asString())) { Assert.fail(STR + result.get(STR).asString()); } System.out.println(STR...
/** * Assert that the operation failed, but not with the failure message that indicates a service start problem. * Use this to check that problems that should be detected in the OSH and not in the service are properly * detected. * * @param client the client to use to execute the operation ...
Assert that the operation failed, but not with the failure message that indicates a service start problem. Use this to check that problems that should be detected in the OSH and not in the service are properly detected
executeForNonServiceFailure
{ "repo_name": "JiriOndrusek/wildfly-core", "path": "server/src/test/java/org/jboss/as/server/test/InterfaceManagementUnitTestCase.java", "license": "lgpl-2.1", "size": 24688 }
[ "java.io.IOException", "org.jboss.as.controller.client.ModelControllerClient", "org.jboss.as.controller.descriptions.ModelDescriptionConstants", "org.jboss.as.controller.logging.ControllerLogger", "org.jboss.dmr.ModelNode", "org.junit.Assert" ]
import java.io.IOException; import org.jboss.as.controller.client.ModelControllerClient; import org.jboss.as.controller.descriptions.ModelDescriptionConstants; import org.jboss.as.controller.logging.ControllerLogger; import org.jboss.dmr.ModelNode; import org.junit.Assert;
import java.io.*; import org.jboss.as.controller.client.*; import org.jboss.as.controller.descriptions.*; import org.jboss.as.controller.logging.*; import org.jboss.dmr.*; import org.junit.*;
[ "java.io", "org.jboss.as", "org.jboss.dmr", "org.junit" ]
java.io; org.jboss.as; org.jboss.dmr; org.junit;
1,860,156
@Test public void testCacheEvalCollnWithIn() throws Exception { Cache cache = CacheUtils.getCache(); AttributesFactory attributesFactory = new AttributesFactory(); RegionAttributes regionAttributes = attributesFactory.create(); QueryService qs = cache.getQueryService(); Region customersRegion = ...
void function() throws Exception { Cache cache = CacheUtils.getCache(); AttributesFactory attributesFactory = new AttributesFactory(); RegionAttributes regionAttributes = attributesFactory.create(); QueryService qs = cache.getQueryService(); Region customersRegion = cache.createRegionFactory(regionAttributes).create(ST...
/** * Tests optimization of compiled in where we no longer evaluate on every iteration The set is * saved off into the query context and reused Each query should have it's own query context */
Tests optimization of compiled in where we no longer evaluate on every iteration The set is saved off into the query context and reused Each query should have it's own query context
testCacheEvalCollnWithIn
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/INOperatorJUnitTest.java", "license": "apache-2.0", "size": 15371 }
[ "org.apache.geode.cache.AttributesFactory", "org.apache.geode.cache.Cache", "org.apache.geode.cache.Region", "org.apache.geode.cache.RegionAttributes", "org.apache.geode.cache.query.CacheUtils", "org.apache.geode.cache.query.Query", "org.apache.geode.cache.query.QueryService", "org.apache.geode.cache....
import org.apache.geode.cache.AttributesFactory; import org.apache.geode.cache.Cache; import org.apache.geode.cache.Region; import org.apache.geode.cache.RegionAttributes; import org.apache.geode.cache.query.CacheUtils; import org.apache.geode.cache.query.Query; import org.apache.geode.cache.query.QueryService; import ...
import org.apache.geode.cache.*; import org.apache.geode.cache.query.*; import org.assertj.core.api.*;
[ "org.apache.geode", "org.assertj.core" ]
org.apache.geode; org.assertj.core;
1,804,780
@Test public void jaxbUnmarshalling() throws JAXBException, XPathExpressionException { // Create the Unmarshaller needed. JAXBContext jaxbContext = JAXBContext.newInstance(PostgreSqlProvisioningTarget.class); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); // Get the XML to be converted. UR...
void function() throws JAXBException, XPathExpressionException { JAXBContext jaxbContext = JAXBContext.newInstance(PostgreSqlProvisioningTarget.class); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); URL sourceXmlUrl = Thread.currentThread().getContextClassLoader() .getResource(STR); PostgreSqlProvisionin...
/** * Ensures that {@link PostgreSqlProvisioningTarget} instances can be * unmarshalled. * * @throws JAXBException * (shouldn't be thrown if things are working) * @throws XPathExpressionException * (shouldn't be thrown if things are working) */
Ensures that <code>PostgreSqlProvisioningTarget</code> instances can be unmarshalled
jaxbUnmarshalling
{ "repo_name": "karlmdavis/jessentials", "path": "jessentials-misc/src/test/java/com/justdavis/karl/misc/datasources/provisioners/postgresql/PostgreSqlProvisioningTargetTest.java", "license": "apache-2.0", "size": 3377 }
[ "javax.xml.bind.JAXBContext", "javax.xml.bind.JAXBException", "javax.xml.bind.Unmarshaller", "javax.xml.xpath.XPathExpressionException", "org.junit.Assert" ]
import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import javax.xml.xpath.XPathExpressionException; import org.junit.Assert;
import javax.xml.bind.*; import javax.xml.xpath.*; import org.junit.*;
[ "javax.xml", "org.junit" ]
javax.xml; org.junit;
998,784
public static BranchUniversalObject getReferredBranchUniversalObject() { BranchUniversalObject branchUniversalObject = null; Branch branchInstance = Branch.getInstance(); try { if (branchInstance != null && branchInstance.getLatestReferringParams() != null) { // C...
static BranchUniversalObject function() { BranchUniversalObject branchUniversalObject = null; Branch branchInstance = Branch.getInstance(); try { if (branchInstance != null && branchInstance.getLatestReferringParams() != null) { if (branchInstance.getLatestReferringParams().has(STR) && branchInstance.getLatestReferring...
/** * Get the {@link BranchUniversalObject} associated with the latest deep linking. This should retrieve the * exact object used for creating the deep link. This should be called only after initialising Branch Session. * * @return A {@link BranchUniversalObject} used to create the deep link that st...
Get the <code>BranchUniversalObject</code> associated with the latest deep linking. This should retrieve the exact object used for creating the deep link. This should be called only after initialising Branch Session
getReferredBranchUniversalObject
{ "repo_name": "BranchMetrics/android-branch-deep-linking", "path": "Branch-SDK/src/main/java/io/branch/indexing/BranchUniversalObject.java", "license": "mit", "size": 42772 }
[ "io.branch.referral.Branch" ]
import io.branch.referral.Branch;
import io.branch.referral.*;
[ "io.branch.referral" ]
io.branch.referral;
1,299,333
@CanIgnoreReturnValue public static <T> T checkNotNull( @CheckForNull T obj, String errorMessageTemplate, long p1, int p2) { if (obj == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } return obj; }
static <T> T function( @CheckForNull T obj, String errorMessageTemplate, long p1, int p2) { if (obj == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1, p2)); } return obj; }
/** * Ensures that an object reference passed as a parameter to the calling method is not null. * * <p>See {@link #checkNotNull(Object, String, Object...)} for details. * * @since 20.0 (varargs overload since 2.0) */
Ensures that an object reference passed as a parameter to the calling method is not null. See <code>#checkNotNull(Object, String, Object...)</code> for details
checkNotNull
{ "repo_name": "mosoft521/guava", "path": "guava/src/com/google/common/base/Preconditions.java", "license": "apache-2.0", "size": 52784 }
[ "javax.annotation.CheckForNull" ]
import javax.annotation.CheckForNull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
458,129
public Feature copyFeature(Object source, Object classifier) { if (!(source instanceof Feature && classifier instanceof Classifier)) { throw new IllegalArgumentException("source: " + source + ",classifier: " + classifier); } Feature f = null; ...
Feature function(Object source, Object classifier) { if (!(source instanceof Feature && classifier instanceof Classifier)) { throw new IllegalArgumentException(STR + source + STR + classifier); } Feature f = null; if (source instanceof Attribute) { Attribute attr = createAttribute(); doCopyAttribute((Attribute) source,...
/** * Copies a feature from one classifier to another. * * @param source is the feature to copy. * @param classifier is the classifier to put the copy in. * @return a newly created feature. */
Copies a feature from one classifier to another
copyFeature
{ "repo_name": "ckaestne/LEADT", "path": "workspace/argouml_critics/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java", "license": "gpl-3.0", "size": 79696 }
[ "org.omg.uml.behavioralelements.commonbehavior.Reception", "org.omg.uml.foundation.core.Attribute", "org.omg.uml.foundation.core.Classifier", "org.omg.uml.foundation.core.Feature", "org.omg.uml.foundation.core.Method", "org.omg.uml.foundation.core.Operation" ]
import org.omg.uml.behavioralelements.commonbehavior.Reception; import org.omg.uml.foundation.core.Attribute; import org.omg.uml.foundation.core.Classifier; import org.omg.uml.foundation.core.Feature; import org.omg.uml.foundation.core.Method; import org.omg.uml.foundation.core.Operation;
import org.omg.uml.behavioralelements.commonbehavior.*; import org.omg.uml.foundation.core.*;
[ "org.omg.uml" ]
org.omg.uml;
870,477
void gemm(char Order, char TransA, char TransB, IComplexNumber alpha, IComplexNDArray A, IComplexNDArray B, IComplexNumber beta, IComplexNDArray C);
void gemm(char Order, char TransA, char TransB, IComplexNumber alpha, IComplexNDArray A, IComplexNDArray B, IComplexNumber beta, IComplexNDArray C);
/** * gemm performs a matrix-matrix operation c := alpha*op(a)*op(b) + beta*c, where c is an m-by-n matrix, op(a) is an m-by-k matrix, op(b) is a k-by-n matrix. * @param Order * @param TransA * @param TransB * @param alpha * @param A * @param B * @param beta ...
gemm performs a matrix-matrix operation op(a)*op(b) + beta*c
gemm
{ "repo_name": "huitseeker/nd4j", "path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/Level3.java", "license": "apache-2.0", "size": 10740 }
[ "org.nd4j.linalg.api.complex.IComplexNDArray", "org.nd4j.linalg.api.complex.IComplexNumber" ]
import org.nd4j.linalg.api.complex.IComplexNDArray; import org.nd4j.linalg.api.complex.IComplexNumber;
import org.nd4j.linalg.api.complex.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
2,778,665
public static void clearXslCache( ) { XmlTransformer.cleanTransformerList( ); }
static void function( ) { XmlTransformer.cleanTransformerList( ); }
/** * This method clean XSL transformer cache */
This method clean XSL transformer cache
clearXslCache
{ "repo_name": "rzara/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/html/XmlTransformerService.java", "license": "bsd-3-clause", "size": 8126 }
[ "fr.paris.lutece.util.xml.XmlTransformer" ]
import fr.paris.lutece.util.xml.XmlTransformer;
import fr.paris.lutece.util.xml.*;
[ "fr.paris.lutece" ]
fr.paris.lutece;
70,457
public void testConstructor_int_int_int_int_int_int_int_nullChronology() throws Throwable { MutableDateTime test = new MutableDateTime(2002, 6, 9, 1, 0, 0, 0, (Chronology) null); // +01:00 assertEquals(ISOChronology.getInstance(), test.getChronology()); assertEquals(TEST_TIME_NOW, test.g...
void function() throws Throwable { MutableDateTime test = new MutableDateTime(2002, 6, 9, 1, 0, 0, 0, (Chronology) null); assertEquals(ISOChronology.getInstance(), test.getChronology()); assertEquals(TEST_TIME_NOW, test.getMillis()); }
/** * Test constructor (int, int, int, Chronology=null) */
Test constructor (int, int, int, Chronology=null)
testConstructor_int_int_int_int_int_int_int_nullChronology
{ "repo_name": "likecool21/joda-time-2.3-Testing", "path": "src/test/java/org/joda/time/TestMutableDateTime_Constructors.java", "license": "apache-2.0", "size": 23628 }
[ "org.joda.time.chrono.ISOChronology" ]
import org.joda.time.chrono.ISOChronology;
import org.joda.time.chrono.*;
[ "org.joda.time" ]
org.joda.time;
2,344,471
@ServiceMethod(returns = ReturnType.SINGLE) DatastoreInner get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName);
@ServiceMethod(returns = ReturnType.SINGLE) DatastoreInner get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName);
/** * Get a datastore in a private cloud cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster in the private cloud. * @param datastoreName Name of th...
Get a datastore in a private cloud cluster
get
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java", "license": "mit", "size": 12470 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.avs.fluent.models.DatastoreInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.avs.fluent.models.DatastoreInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.avs.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,303,605
private static List<AppResult> getSchedulerApplications(String username, int maxApplications) { List<AppResult> results = AppResult.find.select("*").where().eq(AppResult.TABLE.USERNAME, username).ne(AppResult.TABLE.FLOW_EXEC_ID, null) .ne(AppResult.TABLE.FLOW_EXEC_ID, "").order().desc(AppResul...
static List<AppResult> function(String username, int maxApplications) { List<AppResult> results = AppResult.find.select("*").where().eq(AppResult.TABLE.USERNAME, username).ne(AppResult.TABLE.FLOW_EXEC_ID, null) .ne(AppResult.TABLE.FLOW_EXEC_ID, "").order().desc(AppResult.TABLE.FINISH_TIME).setMaxRows(maxApplications) ....
/** * Returns the list of AppResults scheduled by a scheduler for the given username limit by maxApplications. * @param username The username for which applications need to be fetched. * @param maxApplications The max number of applications that should be fetched * @return The list of Applications scheduled...
Returns the list of AppResults scheduled by a scheduler for the given username limit by maxApplications
getSchedulerApplications
{ "repo_name": "qubole/dr-elephant", "path": "app/controllers/api/v1/Web.java", "license": "apache-2.0", "size": 53600 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,186,172
private void execute(final Connection conn, final long id, final List<String> sqls, final int tries) { Statement stmt = null; try { // Tell the connection to wait to commit the transaction until we're // done conn.setAutoCommit(false); stmt = conn.createStatement(); // Add all the SQL statemen...
void function(final Connection conn, final long id, final List<String> sqls, final int tries) { Statement stmt = null; try { conn.setAutoCommit(false); stmt = conn.createStatement(); for (final String sql : sqls) { stmt.addBatch(sql); } logFinest(STR + id + "."); stmt.executeBatch(); logFinest(STR + id + "."); conn.com...
/** * Runs a list of SQL statements as a single transaction over the given * connection, allowing <code>tries</code> retries if the database is too * busy. * * @param conn * @param id * @param sqls */
Runs a list of SQL statements as a single transaction over the given connection, allowing <code>tries</code> retries if the database is too busy
execute
{ "repo_name": "rmachedo/MEater", "path": "src/edu/umd/rhsmith/diads/meater/modules/tweater/storage/legacy/MySqlStatusEater.java", "license": "gpl-3.0", "size": 15635 }
[ "edu.umd.rhsmith.diads.meater.util.Util", "java.sql.Connection", "java.sql.SQLException", "java.sql.Statement", "java.util.List" ]
import edu.umd.rhsmith.diads.meater.util.Util; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import java.util.List;
import edu.umd.rhsmith.diads.meater.util.*; import java.sql.*; import java.util.*;
[ "edu.umd.rhsmith", "java.sql", "java.util" ]
edu.umd.rhsmith; java.sql; java.util;
74,284
public void testFromXContent() throws IOException { AF testAgg = createTestAggregatorFactory(); AggregatorFactories.Builder factoriesBuilder = AggregatorFactories.builder().skipResolveOrder().addPipelineAggregator(testAgg); logger.info("Content string: {}", factoriesBuilder); XConten...
void function() throws IOException { AF testAgg = createTestAggregatorFactory(); AggregatorFactories.Builder factoriesBuilder = AggregatorFactories.builder().skipResolveOrder().addPipelineAggregator(testAgg); logger.info(STR, factoriesBuilder); XContentBuilder builder = XContentFactory.contentBuilder(randomFrom(XConten...
/** * Generic test that creates new AggregatorFactory from the test * AggregatorFactory and checks both for equality and asserts equality on * the two queries. */
Generic test that creates new AggregatorFactory from the test AggregatorFactory and checks both for equality and asserts equality on the two queries
testFromXContent
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/test/java/org/elasticsearch/search/aggregations/BasePipelineAggregationTestCase.java", "license": "apache-2.0", "size": 8701 }
[ "java.io.IOException", "org.elasticsearch.common.xcontent.ToXContent", "org.elasticsearch.common.xcontent.XContentBuilder", "org.elasticsearch.common.xcontent.XContentFactory", "org.elasticsearch.common.xcontent.XContentParser", "org.elasticsearch.common.xcontent.XContentType" ]
import java.io.IOException; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType;
import java.io.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
2,886,808
public static String resolveSymlink(File link, TaskListener listener) { if (Functions.isWindows()) { return null; } try { return NativeUtils.getInstance().resolveSymlink(link); } catch (NativeAccessException exc) { listener.getLogger().print("Nat...
static String function(File link, TaskListener listener) { if (Functions.isWindows()) { return null; } try { return NativeUtils.getInstance().resolveSymlink(link); } catch (NativeAccessException exc) { listener.getLogger().print(STR); } return null; }
/** * Resolves symlink, if the given file is a symlink. Otherwise return null. * <p> If the resolution fails, report an error. * * @param listener If we rely on an external command to resolve symlink, * this is it. (TODO: try readlink(1) available on some platforms) */
Resolves symlink, if the given file is a symlink. Otherwise return null. If the resolution fails, report an error
resolveSymlink
{ "repo_name": "eclipse/hudson.core", "path": "hudson-core/src/main/java/hudson/Util.java", "license": "apache-2.0", "size": 44657 }
[ "hudson.model.TaskListener", "java.io.File", "org.eclipse.hudson.jna.NativeAccessException", "org.eclipse.hudson.jna.NativeUtils" ]
import hudson.model.TaskListener; import java.io.File; import org.eclipse.hudson.jna.NativeAccessException; import org.eclipse.hudson.jna.NativeUtils;
import hudson.model.*; import java.io.*; import org.eclipse.hudson.jna.*;
[ "hudson.model", "java.io", "org.eclipse.hudson" ]
hudson.model; java.io; org.eclipse.hudson;
500,960
public void setViewParameters(ViewFactoryContext viewFactoryContext, List<ExprNode> viewParameters) throws ViewParameterException;
void function(ViewFactoryContext viewFactoryContext, List<ExprNode> viewParameters) throws ViewParameterException;
/** * Indicates user EPL query view parameters to the view factory. * @param viewFactoryContext supplied context information for the view factory * @param viewParameters is the objects representing the view parameters * @throws ViewParameterException if the parameters don't match view parameter need...
Indicates user EPL query view parameters to the view factory
setViewParameters
{ "repo_name": "b-cuts/esper", "path": "esper/src/main/java/com/espertech/esper/view/ViewFactory.java", "license": "gpl-2.0", "size": 3702 }
[ "com.espertech.esper.epl.expression.core.ExprNode", "java.util.List" ]
import com.espertech.esper.epl.expression.core.ExprNode; import java.util.List;
import com.espertech.esper.epl.expression.core.*; import java.util.*;
[ "com.espertech.esper", "java.util" ]
com.espertech.esper; java.util;
1,655,572
public Point getCenter() { return center; }
Point function() { return center; }
/** * Returns the center of the painting region. * @return The center of the painting region */
Returns the center of the painting region
getCenter
{ "repo_name": "GerdHolz/TOVAL", "path": "src/de/invation/code/toval/graphic/diagrams/panels/ScatterChartPanel.java", "license": "bsd-3-clause", "size": 25066 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,198,858
private static String getSystemOut() { return new String(baos.toByteArray(), StandardCharsets.UTF_8); }
static String function() { return new String(baos.toByteArray(), StandardCharsets.UTF_8); }
/** * Gets content of standard output buffer. */
Gets content of standard output buffer
getSystemOut
{ "repo_name": "mdogan/hazelcast", "path": "hazelcast/src/test/java/com/hazelcast/console/ConsoleAppTest.java", "license": "apache-2.0", "size": 6373 }
[ "java.nio.charset.StandardCharsets" ]
import java.nio.charset.StandardCharsets;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,562,276
public SensorML generateProcedureDescription( Procedure procedure, Session session) throws OwsExceptionReport { final SensorML sml = new SensorML(); // 2 try to get position from entity if (procedure.isSpatial()) { // 2.1 if position is available -> system -> own clas...
SensorML function( Procedure procedure, Session session) throws OwsExceptionReport { final SensorML sml = new SensorML(); if (procedure.isSpatial()) { sml.addMember(createSmlSystem(procedure, session)); } else { sml.addMember(createSmlProcessModel(procedure, session)); } return sml; }
/** * Generate procedure description from Hibernate procedure entity if no * description (file, XML text) is available * * @param procedure Hibernate procedure entity * @param session the session * * @return Generated procedure description * * @throws OwsExceptionReport If...
Generate procedure description from Hibernate procedure entity if no description (file, XML text) is available
generateProcedureDescription
{ "repo_name": "sauloperez/sos", "path": "src/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/procedure/HibernateProcedureDescriptionGenerator.java", "license": "apache-2.0", "size": 25643 }
[ "org.hibernate.Session", "org.n52.sos.ds.hibernate.entities.Procedure", "org.n52.sos.ogc.ows.OwsExceptionReport", "org.n52.sos.ogc.sensorML.SensorML" ]
import org.hibernate.Session; import org.n52.sos.ds.hibernate.entities.Procedure; import org.n52.sos.ogc.ows.OwsExceptionReport; import org.n52.sos.ogc.sensorML.SensorML;
import org.hibernate.*; import org.n52.sos.ds.hibernate.entities.*; import org.n52.sos.ogc.*; import org.n52.sos.ogc.ows.*;
[ "org.hibernate", "org.n52.sos" ]
org.hibernate; org.n52.sos;
1,727,336
@Test public void testListChildren() throws LoginException { ResourceResolver resourceResolver = resourceResolverFactory.getResourceResolver(null); buildResource("/single/test/withchildren", buildChildResources("/single/test/withchildren"), resourceResolver, resourceProvider ); Resourc...
void function() throws LoginException { ResourceResolver resourceResolver = resourceResolverFactory.getResourceResolver(null); buildResource(STR, buildChildResources(STR), resourceResolver, resourceProvider ); Resource resource = resourceResolver.getResource(STR); Assert.assertNotNull(resource); Iterator<Resource> reso...
/** * Tests list children via the resource (NB, this doesn't really test the * resource resolver at all, but validates this unit test.) * * @throws LoginException */
Tests list children via the resource (NB, this doesn't really test the resource resolver at all, but validates this unit test.)
testListChildren
{ "repo_name": "Nimco/sling", "path": "bundles/resourceresolver/src/test/java/org/apache/sling/resourceresolver/impl/MockedResourceResolverImplTest.java", "license": "apache-2.0", "size": 27024 }
[ "java.util.Iterator", "org.apache.sling.api.resource.LoginException", "org.apache.sling.api.resource.Resource", "org.apache.sling.api.resource.ResourceResolver", "org.junit.Assert" ]
import java.util.Iterator; import org.apache.sling.api.resource.LoginException; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceResolver; import org.junit.Assert;
import java.util.*; import org.apache.sling.api.resource.*; import org.junit.*;
[ "java.util", "org.apache.sling", "org.junit" ]
java.util; org.apache.sling; org.junit;
448,271