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 NodeFigure createMainFigure() {
NodeFigure figure = createNodePlate();
figure.setLayoutManager(new StackLayout());
IFigure shape = createNodeShape();
figure.add(shape);
contentPane = setupContentPane(shape);
addLayoutListner(figure);
return figure;
} | NodeFigure function() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); addLayoutListner(figure); return figure; } | /**
* Creates figure for this edit part.
*
* Body of this method does not depend on settings in generation model
* so you may safely remove <i>generated</i> tag and modify it.
*
* @generated NOT
*/ | Creates figure for this edit part. Body of this method does not depend on settings in generation model so you may safely remove generated tag and modify it | createMainFigure | {
"repo_name": "harsha1979/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/parts/CacheMediatorEditPart.java",
"license": "apache-2.0",
"size": 12522
} | [
"org.eclipse.draw2d.IFigure",
"org.eclipse.draw2d.StackLayout",
"org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure"
] | import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.StackLayout; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; | import org.eclipse.draw2d.*; import org.eclipse.gmf.runtime.gef.ui.figures.*; | [
"org.eclipse.draw2d",
"org.eclipse.gmf"
] | org.eclipse.draw2d; org.eclipse.gmf; | 2,915,810 |
public static java.util.List extractICPActionList(ims.domain.ILightweightDomainFactory domainFactory, ims.icp.vo.ICPActionVoCollection voCollection)
{
return extractICPActionList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.icp.vo.ICPActionVoCollection voCollection) { return extractICPActionList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.icps.configuration.domain.objects.ICPAction 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.icps.configuration.domain.objects.ICPAction list from the value object collection | extractICPActionList | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/icp/vo/domain/ICPActionVoAssembler.java",
"license": "agpl-3.0",
"size": 28676
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,051,276 |
default void error(String message) {
log(Level.ERROR, Optional.empty(), message);
} | default void error(String message) { log(Level.ERROR, Optional.empty(), message); } | /**
* Logs a <tt>message</tt> at level
* {@link com.speedment.fika.logger.Level#ERROR}.
*
* @param message the message to log
* @throws java.lang.NullPointerException whenever <tt>level</tt> or
* <tt>message</tt> is null
*/ | Logs a message at level <code>com.speedment.fika.logger.Level#ERROR</code> | error | {
"repo_name": "speedment/fika",
"path": "logger/src/main/java/com/speedment/fika/logger/Logger.java",
"license": "apache-2.0",
"size": 47672
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,025,614 |
private static void readString(HashSet<Long> destination, String toRead) {
if(toRead == null || toRead.equals("")) return;
final String[] split = toRead.split(",");
for(String val : split) {
try{ destination.add(Long.parseLong(val));
} catch(NumberFormatException igno... | static void function(HashSet<Long> destination, String toRead) { if(toRead == null toRead.equals(STR,"); for(String val : split) { try{ destination.add(Long.parseLong(val)); } catch(NumberFormatException ignored) {} } } | /** Read a string of long values into a HashSet.
* @param destination Where the values in the string will be stored.
* @param toRead The string to read into the HashSet.
* Formatted as comma separated long values. */ | Read a string of long values into a HashSet | readString | {
"repo_name": "Mark-Lauman/DominionPicker",
"path": "app/src/main/java/ca/marklauman/dominionpicker/userinterface/recyclerview/AdapterCardsFilter.java",
"license": "mit",
"size": 5813
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 793,416 |
protected View view(final int id) {
assertNotNull(getActivity());
View view = getActivity().findViewById(id);
assertNotNull(view);
return view;
} | View function(final int id) { assertNotNull(getActivity()); View view = getActivity().findViewById(id); assertNotNull(view); return view; } | /**
* Get view with id
*
* @param id
* @return edit text
*/ | Get view with id | view | {
"repo_name": "KishorAndroid/PocketHub",
"path": "app/src/androidTest/java/com/github/pockethub/android/tests/ActivityTest.java",
"license": "apache-2.0",
"size": 2355
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 678,854 |
public void removeFromClusterNodeLabels(Collection<String> labelsToRemove)
throws IOException {
if (!nodeLabelsEnabled) {
LOG.error(NODE_LABELS_NOT_ENABLED_ERR);
throw new IOException(NODE_LABELS_NOT_ENABLED_ERR);
}
labelsToRemove = normalizeLabels(labelsToRemove);
checkRem... | void function(Collection<String> labelsToRemove) throws IOException { if (!nodeLabelsEnabled) { LOG.error(NODE_LABELS_NOT_ENABLED_ERR); throw new IOException(NODE_LABELS_NOT_ENABLED_ERR); } labelsToRemove = normalizeLabels(labelsToRemove); checkRemoveFromClusterNodeLabels(labelsToRemove); internalRemoveFromClusterNodeL... | /**
* Remove multiple node labels from repository
*
* @param labelsToRemove
* node labels to remove
* @throws IOException
*/ | Remove multiple node labels from repository | removeFromClusterNodeLabels | {
"repo_name": "bitmybytes/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/nodelabels/CommonNodeLabelsManager.java",
"license": "apache-2.0",
"size": 36021
} | [
"java.io.IOException",
"java.util.Collection"
] | import java.io.IOException; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,263,668 |
public final void removeTriangles(final List<Triangle> list) {
for (Triangle t : list) {
this.removeTriangle(t);
}
} | final void function(final List<Triangle> list) { for (Triangle t : list) { this.removeTriangle(t); } } | /**
* Removes the list of triangles from the attribute list of triangles.
* @param list
* the list of triangles to remove
*/ | Removes the list of triangles from the attribute list of triangles | removeTriangles | {
"repo_name": "DanielLefevre/Nantes-1900-Maven",
"path": "src/main/java/fr/nantes1900/models/basis/Edge.java",
"license": "gpl-3.0",
"size": 13861
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,824,988 |
public Sort getIndexSort() {
return indexSortSupplier.get();
} | Sort function() { return indexSortSupplier.get(); } | /**
* Return the sort order of this index, or null if the index has no sort.
*/ | Return the sort order of this index, or null if the index has no sort | getIndexSort | {
"repo_name": "gingerwizard/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 174872
} | [
"org.apache.lucene.search.Sort"
] | import org.apache.lucene.search.Sort; | import org.apache.lucene.search.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,634,067 |
public ArrayList findByDocumentHeaderId(Class clazz, String documentHeaderId) throws DataAccessException {
Criteria criteria = new Criteria();
criteria.addEqualTo("FDOC_NBR", documentHeaderId);
if (MetadataManager.getInstance().getRepository().getDescriptorFor(clazz).getFieldDescriptorByName... | ArrayList function(Class clazz, String documentHeaderId) throws DataAccessException { Criteria criteria = new Criteria(); criteria.addEqualTo(STR, documentHeaderId); if (MetadataManager.getInstance().getRepository().getDescriptorFor(clazz).getFieldDescriptorByName(STR) != null) { if (SourceAccountingLine.class.isAssign... | /**
* Retrieves accounting lines associate with a given document header ID using OJB.
*
* @param classname
* @param id
* @return
*/ | Retrieves accounting lines associate with a given document header ID using OJB | findByDocumentHeaderId | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/sys/dataaccess/impl/AccountingLineDaoOjb.java",
"license": "apache-2.0",
"size": 3260
} | [
"java.util.ArrayList",
"java.util.Collection",
"org.apache.ojb.broker.metadata.MetadataManager",
"org.apache.ojb.broker.query.Criteria",
"org.apache.ojb.broker.query.QueryByCriteria",
"org.apache.ojb.broker.query.QueryFactory",
"org.kuali.kfs.sys.KFSConstants",
"org.kuali.kfs.sys.businessobject.Source... | import java.util.ArrayList; import java.util.Collection; import org.apache.ojb.broker.metadata.MetadataManager; import org.apache.ojb.broker.query.Criteria; import org.apache.ojb.broker.query.QueryByCriteria; import org.apache.ojb.broker.query.QueryFactory; import org.kuali.kfs.sys.KFSConstants; import org.kuali.kfs.sy... | import java.util.*; import org.apache.ojb.broker.metadata.*; import org.apache.ojb.broker.query.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.businessobject.*; import org.springframework.dao.*; | [
"java.util",
"org.apache.ojb",
"org.kuali.kfs",
"org.springframework.dao"
] | java.util; org.apache.ojb; org.kuali.kfs; org.springframework.dao; | 2,867,875 |
return rawType.toLowerCase().startsWith("string");
}
public MibPropertyAttributeType(ResourceType resourceType, MibObjProperty property, AttributeGroupType groupType) {
super(resourceType, null, null, groupType);
this.property = property;
} | return rawType.toLowerCase().startsWith(STR); } public MibPropertyAttributeType(ResourceType resourceType, MibObjProperty property, AttributeGroupType groupType) { super(resourceType, null, null, groupType); this.property = property; } | /**
* Supports type.
*
* @param rawType the raw type
* @return true, if successful
*/ | Supports type | supportsType | {
"repo_name": "aihua/opennms",
"path": "opennms-services/src/main/java/org/opennms/netmgt/collectd/MibPropertyAttributeType.java",
"license": "agpl-3.0",
"size": 3561
} | [
"org.opennms.netmgt.collection.api.AttributeGroupType",
"org.opennms.netmgt.config.datacollection.MibObjProperty"
] | import org.opennms.netmgt.collection.api.AttributeGroupType; import org.opennms.netmgt.config.datacollection.MibObjProperty; | import org.opennms.netmgt.collection.api.*; import org.opennms.netmgt.config.datacollection.*; | [
"org.opennms.netmgt"
] | org.opennms.netmgt; | 1,710,158 |
@Test
public void testContainsNone_StringWithSupplementaryChars() {
assertFalse(StringUtils.containsNone(CharU20000 + CharU20001, CharU20000));
assertFalse(StringUtils.containsNone(CharU20000 + CharU20001, CharU20001));
assertFalse(StringUtils.containsNone(CharU20000, CharU20000));
... | void function() { assertFalse(StringUtils.containsNone(CharU20000 + CharU20001, CharU20000)); assertFalse(StringUtils.containsNone(CharU20000 + CharU20001, CharU20001)); assertFalse(StringUtils.containsNone(CharU20000, CharU20000)); assertEquals(-1, CharU20000.indexOf(CharU20001)); assertEquals(0, CharU20000.indexOf(Ch... | /**
* See http://www.oracle.com/technetwork/articles/javase/supplementary-142654.html
*/ | See HREF | testContainsNone_StringWithSupplementaryChars | {
"repo_name": "longestname1/commonslang",
"path": "src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java",
"license": "apache-2.0",
"size": 58724
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,458,072 |
public SelectItem[] getDispItemNums() {
SelectItem[] dispItemNums = new SelectItem[4];
dispItemNums[0] = new SelectItem("10");
dispItemNums[1] = new SelectItem("25");
dispItemNums[2] = new SelectItem("50");
dispItemNums[3] = new SelectItem("100");
return dispItemNums;
} | SelectItem[] function() { SelectItem[] dispItemNums = new SelectItem[4]; dispItemNums[0] = new SelectItem("10"); dispItemNums[1] = new SelectItem("25"); dispItemNums[2] = new SelectItem("50"); dispItemNums[3] = new SelectItem("100"); return dispItemNums; } | /**
* Gets the options for number of displaying items for QC Result.
*
* @return array of predefined numbers for displaying search result
*/ | Gets the options for number of displaying items for QC Result | getDispItemNums | {
"repo_name": "NCIP/national-biomedical-image-archive",
"path": "software/nbia-web/src/gov/nih/nci/nbia/beans/customserieslist/EditCustomSeriesListBean.java",
"license": "bsd-3-clause",
"size": 15112
} | [
"javax.faces.model.SelectItem"
] | import javax.faces.model.SelectItem; | import javax.faces.model.*; | [
"javax.faces"
] | javax.faces; | 2,192,401 |
Operation setMachineType(String zone, String instance, String machineTypeUrl,
Map<Option, ?> options); | Operation setMachineType(String zone, String instance, String machineTypeUrl, Map<Option, ?> options); | /**
* Sets the machine type for the provided instance. Instance must be in {@code TERMINATED} state
* to be able to set its machine type.
*
* @param zone name of the zone in which the instance resides
* @param instance name of the instance
* @param machineTypeUrl full or partial URL of the machine typ... | Sets the machine type for the provided instance. Instance must be in TERMINATED state to be able to set its machine type | setMachineType | {
"repo_name": "mbrukman/gcloud-java",
"path": "google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/spi/v1/ComputeRpc.java",
"license": "apache-2.0",
"size": 20843
} | [
"com.google.api.services.compute.model.Operation",
"java.util.Map"
] | import com.google.api.services.compute.model.Operation; import java.util.Map; | import com.google.api.services.compute.model.*; import java.util.*; | [
"com.google.api",
"java.util"
] | com.google.api; java.util; | 1,031,706 |
private Bitmap processBitmap(int resId) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "processBitmap - " + resId);
}
return decodeSampledBitmapFromResource(mResources, resId, mImageWidth, mImageHeight);
} | Bitmap function(int resId) { if (BuildConfig.DEBUG) { Log.d(TAG, STR + resId); } return decodeSampledBitmapFromResource(mResources, resId, mImageWidth, mImageHeight); } | /**
* The main processing method. This happens in a background task. In this case we are just
* sampling down the bitmap and returning it from a resource.
*
* @param resId
* @return
*/ | The main processing method. This happens in a background task. In this case we are just sampling down the bitmap and returning it from a resource | processBitmap | {
"repo_name": "nishizawa23/AndroidAppDemo",
"path": "bitmapfun/src/com/example/android/bitmapfun/util/ImageResizer.java",
"license": "gpl-2.0",
"size": 8774
} | [
"android.graphics.Bitmap",
"android.util.Log",
"com.example.android.bitmapfun.BuildConfig"
] | import android.graphics.Bitmap; import android.util.Log; import com.example.android.bitmapfun.BuildConfig; | import android.graphics.*; import android.util.*; import com.example.android.bitmapfun.*; | [
"android.graphics",
"android.util",
"com.example.android"
] | android.graphics; android.util; com.example.android; | 710,883 |
public void setDictionaryValidationService(DictionaryValidationService dictionaryValidationService) {
this.dictionaryValidationService = dictionaryValidationService;
}
| void function(DictionaryValidationService dictionaryValidationService) { this.dictionaryValidationService = dictionaryValidationService; } | /**
* Sets the dictionaryValidationService attribute value.
* @param dictionaryValidationService The dictionaryValidationService to set.
*/ | Sets the dictionaryValidationService attribute value | setDictionaryValidationService | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/fp/document/validation/impl/DisbursementVoucherNonEmployeeTravelValidation.java",
"license": "agpl-3.0",
"size": 20886
} | [
"org.kuali.rice.kns.service.DictionaryValidationService"
] | import org.kuali.rice.kns.service.DictionaryValidationService; | import org.kuali.rice.kns.service.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,222,841 |
public void remove(AgentEventListener subscriber, Class eventType)
{
if (subscriber == null)
throw new NullPointerException("No subscriber.");
if (eventType == null)
throw new NullPointerException("No event type.");
LinkedList evNotifList = deMultiplexTable.get(eventType);
if (evNotifList != null) {... | void function(AgentEventListener subscriber, Class eventType) { if (subscriber == null) throw new NullPointerException(STR); if (eventType == null) throw new NullPointerException(STR); LinkedList evNotifList = deMultiplexTable.get(eventType); if (evNotifList != null) { evNotifList.remove(subscriber); if (evNotifList.is... | /**
* Implemented as specified by {@link EventBus}.
* @see EventBus#remove(AgentEventListener, Class)
*/ | Implemented as specified by <code>EventBus</code> | remove | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/event/EventBusImpl.java",
"license": "gpl-2.0",
"size": 7433
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 637,783 |
EAttribute getExpressionExecutable_Exprstr(); | EAttribute getExpressionExecutable_Exprstr(); | /**
* Returns the meta object for the attribute '{@link org.eclipse.xtext.parser.epatch.epatchTestLanguage.ExpressionExecutable#getExprstr <em>Exprstr</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Exprstr</em>'.
* @see org.eclipse.xtext.parser.... | Returns the meta object for the attribute '<code>org.eclipse.xtext.parser.epatch.epatchTestLanguage.ExpressionExecutable#getExprstr Exprstr</code>'. | getExpressionExecutable_Exprstr | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parser/epatch/epatchTestLanguage/EpatchTestLanguagePackage.java",
"license": "epl-1.0",
"size": 81411
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 199,399 |
public void google(View view) {
Log.i(CLASS_TAG, "google in ResultActivity called");
Uri uri = Uri.parse("http://www.google.com/#q=" + this.selectedText +
"&hl=" + this.target.trim() +
"&lr=lang_" + this.target.trim());
Intent intent = new Intent(Intent.ACTI... | void function(View view) { Log.i(CLASS_TAG, STR); Uri uri = Uri.parse(STR&hl=STR&lr=lang_" + this.target.trim()); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); } | /**
* Opens a browser and a google search for the selected text.
*/ | Opens a browser and a google search for the selected text | google | {
"repo_name": "2lastview/haello-Android-Application",
"path": "app/src/main/java/com/example/moritztomasi/clicklesstextenricherapplication/activities/ResultActivity.java",
"license": "apache-2.0",
"size": 26001
} | [
"android.content.Intent",
"android.net.Uri",
"android.util.Log",
"android.view.View"
] | import android.content.Intent; import android.net.Uri; import android.util.Log; import android.view.View; | import android.content.*; import android.net.*; import android.util.*; import android.view.*; | [
"android.content",
"android.net",
"android.util",
"android.view"
] | android.content; android.net; android.util; android.view; | 2,566,471 |
private void drawWholeCircle(Canvas c) {
mArcPaint.setAlpha(mDimAlpha);
float r = getRadius();
c.drawCircle(getWidth() / 2, getHeight() / 2, r, mArcPaint);
} | void function(Canvas c) { mArcPaint.setAlpha(mDimAlpha); float r = getRadius(); c.drawCircle(getWidth() / 2, getHeight() / 2, r, mArcPaint); } | /**
* draws the background circle with less alpha
*
* @param c
*/ | draws the background circle with less alpha | drawWholeCircle | {
"repo_name": "rusinikita/movies-shmoovies",
"path": "app/src/main/kotlin/com/nikita/movies_shmoovies/common/widgets/CircleDisplay.java",
"license": "apache-2.0",
"size": 21329
} | [
"android.graphics.Canvas"
] | import android.graphics.Canvas; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 928,303 |
public void redrawState() {
ensureImageAvailable();
// nothing to draw into? Must stop here.
if (screenImage == null) return;
// clear the image.
Graphics sc = screenImage.getGraphics();
sc.setColor(Color.white);
sc.fillRect(0, 0, this.getWidth(), this.getHeight());
drawState(sc);
... | void function() { ensureImageAvailable(); if (screenImage == null) return; Graphics sc = screenImage.getGraphics(); sc.setColor(Color.white); sc.fillRect(0, 0, this.getWidth(), this.getHeight()); drawState(sc); if (root != null) { root.draw(sc); } repaint(); } | /**
* Draws the current state to an off-screen buffer and then requests
* a repaint of the canvas to show it to the user.
*/ | Draws the current state to an off-screen buffer and then requests a repaint of the canvas to show it to the user | redrawState | {
"repo_name": "heineman/algorithms-nutshell-2ed",
"path": "Examples/src/algs/example/gui/canvas/ElementCanvas.java",
"license": "mit",
"size": 3866
} | [
"java.awt.Color",
"java.awt.Graphics"
] | import java.awt.Color; import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,800,646 |
@NotNull
PsiMethod createMethodFromText(@NotNull @NonNls String text, @Nullable PsiElement context, LanguageLevel languageLevel) throws IncorrectOperationException; | PsiMethod createMethodFromText(@NotNull @NonNls String text, @Nullable PsiElement context, LanguageLevel languageLevel) throws IncorrectOperationException; | /**
* Creates a Java method from the specified text with the specified language level.
*
* @param text the text of the method to create.
* @param context the PSI element used as context for resolving references from the method.
* @param languageLevel the language level used for creating th... | Creates a Java method from the specified text with the specified language level | createMethodFromText | {
"repo_name": "kdwink/intellij-community",
"path": "java/java-psi-api/src/com/intellij/psi/PsiJavaParserFacade.java",
"license": "apache-2.0",
"size": 10615
} | [
"com.intellij.pom.java.LanguageLevel",
"com.intellij.util.IncorrectOperationException",
"org.jetbrains.annotations.NonNls",
"org.jetbrains.annotations.NotNull",
"org.jetbrains.annotations.Nullable"
] | import com.intellij.pom.java.LanguageLevel; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; | import com.intellij.pom.java.*; import com.intellij.util.*; import org.jetbrains.annotations.*; | [
"com.intellij.pom",
"com.intellij.util",
"org.jetbrains.annotations"
] | com.intellij.pom; com.intellij.util; org.jetbrains.annotations; | 1,213,437 |
public void markAsContacted(final Address[] addresses) {
//TODO: Optimize! Potentially a lot of database queries
for (final Address address : addresses) {
final Cursor c = getContactByAddress(address.getAddress());
if (c != null) {
if (c.getCount() > 0) {
... | void function(final Address[] addresses) { for (final Address address : addresses) { final Cursor c = getContactByAddress(address.getAddress()); if (c != null) { if (c.getCount() > 0) { c.moveToFirst(); final long personId = c.getLong(CONTACT_ID_INDEX); ContactsContract.Contacts.markAsContacted(mContentResolver, person... | /**
* Mark contacts with the provided email addresses as contacted.
*
* @param addresses Array of {@link Address} objects describing the
* contacts to be marked as contacted.
*/ | Mark contacts with the provided email addresses as contacted | markAsContacted | {
"repo_name": "cketti/k-9",
"path": "app/core/src/main/java/com/fsck/k9/helper/Contacts.java",
"license": "apache-2.0",
"size": 9473
} | [
"android.database.Cursor",
"android.provider.ContactsContract",
"com.fsck.k9.mail.Address"
] | import android.database.Cursor; import android.provider.ContactsContract; import com.fsck.k9.mail.Address; | import android.database.*; import android.provider.*; import com.fsck.k9.mail.*; | [
"android.database",
"android.provider",
"com.fsck.k9"
] | android.database; android.provider; com.fsck.k9; | 1,207,654 |
void handleEmpty(AppliedPTransform<?, ?, ?> transform); | void handleEmpty(AppliedPTransform<?, ?, ?> transform); | /**
* Handle an input bundle that did not require processing.
*
* <p>This occurs when a Source has no splits that can currently produce outputs.
*/ | Handle an input bundle that did not require processing. This occurs when a Source has no splits that can currently produce outputs | handleEmpty | {
"repo_name": "amitsela/incubator-beam",
"path": "runners/direct-java/src/main/java/org/apache/beam/runners/direct/CompletionCallback.java",
"license": "apache-2.0",
"size": 1642
} | [
"org.apache.beam.sdk.transforms.AppliedPTransform"
] | import org.apache.beam.sdk.transforms.AppliedPTransform; | import org.apache.beam.sdk.transforms.*; | [
"org.apache.beam"
] | org.apache.beam; | 2,406,255 |
public Enumeration enumurateQueue(){
Vector elements = new Vector();
synchronized(LOCK) {
Enumeration e = pending.elements();
while(e.hasMoreElements()){
elements.addElement(e.nextElement());
}
}
return elements.elements();
} | Enumeration function(){ Vector elements = new Vector(); synchronized(LOCK) { Enumeration e = pending.elements(); while(e.hasMoreElements()){ elements.addElement(e.nextElement()); } } return elements.elements(); } | /**
* This method returns all pending ConnectioRequest connections.
* @return the queue elements
*/ | This method returns all pending ConnectioRequest connections | enumurateQueue | {
"repo_name": "shannah/CodenameOne",
"path": "CodenameOne/src/com/codename1/io/NetworkManager.java",
"license": "gpl-2.0",
"size": 34488
} | [
"java.util.Enumeration",
"java.util.Vector"
] | import java.util.Enumeration; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,925,313 |
public void commit() throws IOException {
// Make sure there isn't an old save file around.
saveFile.delete();
// Keep the original file in case the replace fails.
if(realFile.exists() && !realFile.renameTo(saveFile)) {
throw new IOException("Unable to overwrite file '" + realFile + "'.");
}
... | void function() throws IOException { saveFile.delete(); if(realFile.exists() && !realFile.renameTo(saveFile)) { throw new IOException(STR + realFile + "'."); } if(tempFile.renameTo(realFile)) { saveFile.delete(); } else { saveFile.renameTo(realFile); throw new IOException(STR + realFile + "'."); } } | /**
* Replace the original file with the temporary file.
*/ | Replace the original file with the temporary file | commit | {
"repo_name": "deleidos/digitaledge-platform",
"path": "commons-core/src/main/java/com/deleidos/rtws/commons/util/file/TransactedFile.java",
"license": "apache-2.0",
"size": 18360
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,765,011 |
@Override
public Map<String, Object> next() {
if (hasNext()) {
try {
parser.nextToken();
Map<String, Object> next = parser.readValueAs(mapReference);
parser.nextToken();
return next;
... | Map<String, Object> function() { if (hasNext()) { try { parser.nextToken(); Map<String, Object> next = parser.readValueAs(mapReference); parser.nextToken(); return next; } catch (Exception e) { logger.error(e.getMessage(), e); } } return null; } | /**
* Retrieve the next row in the file.
*
* @return The next row.
*/ | Retrieve the next row in the file | next | {
"repo_name": "krotscheck/data-file-reader",
"path": "data-file-reader-bson/src/main/java/net/krotscheck/dfr/bson/BSONDataDecoder.java",
"license": "apache-2.0",
"size": 3992
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,139,332 |
@Override
public void handleMouseClicked(ChartCanvas canvas, MouseEvent e) {
if (this.mousePressedPoint == null) {
return;
}
Point2D currPt = new Point2D.Double(e.getX(), e.getY());
if (this.mousePressedPoint.distance(currPt) < 2) {
canvas.dispatchMouseCli... | void function(ChartCanvas canvas, MouseEvent e) { if (this.mousePressedPoint == null) { return; } Point2D currPt = new Point2D.Double(e.getX(), e.getY()); if (this.mousePressedPoint.distance(currPt) < 2) { canvas.dispatchMouseClickedEvent(currPt, e); } this.mousePressedPoint = null; } | /**
* Handles a mouse clicked event by setting the anchor point for the
* canvas and redrawing the chart (the anchor point is a reference point
* used by the chart to determine crosshair lines).
*
* @param canvas the chart canvas (<code>null</code> not permitted).
* @param e the mouse e... | Handles a mouse clicked event by setting the anchor point for the canvas and redrawing the chart (the anchor point is a reference point used by the chart to determine crosshair lines) | handleMouseClicked | {
"repo_name": "informatik-mannheim/Moduro-Toolbox",
"path": "src/main/java/de/hs/mannheim/modUro/controller/diagram/fx/interaction/DispatchHandlerFX.java",
"license": "apache-2.0",
"size": 3973
} | [
"de.hs.mannheim.modUro.controller.diagram.fx.ChartCanvas",
"java.awt.geom.Point2D"
] | import de.hs.mannheim.modUro.controller.diagram.fx.ChartCanvas; import java.awt.geom.Point2D; | import de.hs.mannheim.*; import java.awt.geom.*; | [
"de.hs.mannheim",
"java.awt"
] | de.hs.mannheim; java.awt; | 2,299,474 |
if (comparator == null) {
throw new IllegalArgumentException("comparator cannot be null");
}
this.comparator = comparator;
Collections.sort(things, comparator);
fireContentsChanged(this, 0, things.size() - 1);
} | if (comparator == null) { throw new IllegalArgumentException(STR); } this.comparator = comparator; Collections.sort(things, comparator); fireContentsChanged(this, 0, things.size() - 1); } | /**
* Set the comparator sorting this model.
*
* @param comparator The new comparator.
*
* @throws IllegalArgumentException if <code>comparator</code> is null.
*/ | Set the comparator sorting this model | setComparator | {
"repo_name": "drhee/toxoMine",
"path": "intermine/MineManager/common/src/main/java/org/intermine/common/swing/GenericMutableComboBoxModel.java",
"license": "lgpl-2.1",
"size": 13570
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 2,390,600 |
void syrk(char Order, char Uplo, char Trans, IComplexNumber alpha, IComplexNDArray A, IComplexNumber beta,
IComplexNDArray C); | void syrk(char Order, char Uplo, char Trans, IComplexNumber alpha, IComplexNDArray A, IComplexNumber beta, IComplexNDArray C); | /**
* syrk performs a rank-n update of an n-by-n symmetric matrix c, that is, one of the following operations:
c := alpha*a*a' + beta*c for trans = 'N'or'n'
c := alpha*a'*a + beta*c for trans = 'T'or't','C'or'c',
where c is an n-by-n symmetric matrix;
a is an n-by-k matrix, if trans = 'N'or'n... | syrk performs a rank-n update of an n-by-n symmetric matrix c, that is, one of the following operations: a*a' + beta*c for trans = 'N'or'n' a'*a + beta*c for trans = 'T'or't','C'or'c' | syrk | {
"repo_name": "smarthi/nd4j",
"path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/Level3.java",
"license": "apache-2.0",
"size": 10742
} | [
"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; | 1,605,535 |
public Output<? extends TType> handle() {
return handle;
} | Output<? extends TType> function() { return handle; } | /**
* Gets handle.
*
* @return handle.
*/ | Gets handle | handle | {
"repo_name": "tensorflow/java",
"path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/MaxIntraOpParallelismDataset.java",
"license": "apache-2.0",
"size": 4772
} | [
"org.tensorflow.Output",
"org.tensorflow.types.family.TType"
] | import org.tensorflow.Output; import org.tensorflow.types.family.TType; | import org.tensorflow.*; import org.tensorflow.types.family.*; | [
"org.tensorflow",
"org.tensorflow.types"
] | org.tensorflow; org.tensorflow.types; | 466,181 |
public void setPass(final Collection<? extends PlatformPass> newValues) {
pass = writeCollection(newValues, pass, PlatformPass.class);
} | void function(final Collection<? extends PlatformPass> newValues) { pass = writeCollection(newValues, pass, PlatformPass.class); } | /**
* Sets the pass of the platform over the objective.
*
* @param newValues the new pass values.
*/ | Sets the pass of the platform over the objective | setPass | {
"repo_name": "apache/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultObjective.java",
"license": "apache-2.0",
"size": 13858
} | [
"java.util.Collection",
"org.opengis.metadata.acquisition.PlatformPass"
] | import java.util.Collection; import org.opengis.metadata.acquisition.PlatformPass; | import java.util.*; import org.opengis.metadata.acquisition.*; | [
"java.util",
"org.opengis.metadata"
] | java.util; org.opengis.metadata; | 968,235 |
@Override
public boolean tryAssignPayload(Payload payload) {
Preconditions.checkNotNull(payload);
// check that we can actually run in this slot
if (isCanceled()) {
return false;
}
// atomically assign the vertex
if (!PAYLOAD_UPDATER.compareAndSet(this, null, payload)) {
return false;
}
// ... | boolean function(Payload payload) { Preconditions.checkNotNull(payload); if (isCanceled()) { return false; } if (!PAYLOAD_UPDATER.compareAndSet(this, null, payload)) { return false; } if (isCanceled()) { this.payload = null; return false; } return true; } | /**
* Atomically sets the executed vertex, if no vertex has been assigned to this slot so far.
*
* @param payload The vertex to assign to this slot.
* @return True, if the vertex was assigned, false, otherwise.
*/ | Atomically sets the executed vertex, if no vertex has been assigned to this slot so far | tryAssignPayload | {
"repo_name": "mylog00/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/instance/SimpleSlot.java",
"license": "apache-2.0",
"size": 9634
} | [
"org.apache.flink.util.Preconditions"
] | import org.apache.flink.util.Preconditions; | import org.apache.flink.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,863,931 |
@Test
public void testCloning() {
DefaultStatisticalCategoryDataset d1
= new DefaultStatisticalCategoryDataset();
d1.add(1.1, 2.2, "R1", "C1");
d1.add(3.3, 4.4, "R1", "C2");
d1.add(null, new Double(5.5), "R1", "C3");
d1.add(new Double(6.6), null, "R2", "C3... | void function() { DefaultStatisticalCategoryDataset d1 = new DefaultStatisticalCategoryDataset(); d1.add(1.1, 2.2, "R1", "C1"); d1.add(3.3, 4.4, "R1", "C2"); d1.add(null, new Double(5.5), "R1", "C3"); d1.add(new Double(6.6), null, "R2", "C3"); DefaultStatisticalCategoryDataset d2 = null; try { d2 = (DefaultStatisticalC... | /**
* Some checks for cloning.
*/ | Some checks for cloning | testCloning | {
"repo_name": "raincs13/phd",
"path": "tests/org/jfree/data/statistics/DefaultStatisticalCategoryDatasetTest.java",
"license": "lgpl-2.1",
"size": 10005
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,209,587 |
@Override
public void markPotentiallyUnknownBit(LocalVariableBinding local) {
// protected from non-object locals in calling methods
if (this != DEAD_END) {
this.tagBits |= NULL_FLAG_MASK;
int position;
long mask;
if ((position = local.id + this.maxFieldCount) < BitCacheSize) {
/... | void function(LocalVariableBinding local) { if (this != DEAD_END) { this.tagBits = NULL_FLAG_MASK; int position; long mask; if ((position = local.id + this.maxFieldCount) < BitCacheSize) { mask = 1L << position; isTrue((this.nullBit1 & mask) == 0, STR); this.nullBit4 = mask; if (COVERAGE_TEST_FLAG) { if(CoverageTestId ... | /**
* Mark a local as potentially having been assigned to an unknown value.
* @param local the local to mark
*/ | Mark a local as potentially having been assigned to an unknown value | markPotentiallyUnknownBit | {
"repo_name": "Niky4000/UsefulUtils",
"path": "projects/others/eclipse-platform-parent/eclipse.jdt.core-master/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java",
"license": "gpl-3.0",
"size": 76992
} | [
"org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding"
] | import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding; | import org.eclipse.jdt.internal.compiler.lookup.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,797,806 |
protected void afterPrototypeCreation(String beanName) {
Object curVal = this.prototypesCurrentlyInCreation.get();
if (curVal instanceof String) {
this.prototypesCurrentlyInCreation.set(null);
}
else if (curVal instanceof Set) {
Set beanNameSet = (Set) curVal;
beanNameSet.remove(beanName);
if (be... | void function(String beanName) { Object curVal = this.prototypesCurrentlyInCreation.get(); if (curVal instanceof String) { this.prototypesCurrentlyInCreation.set(null); } else if (curVal instanceof Set) { Set beanNameSet = (Set) curVal; beanNameSet.remove(beanName); if (beanNameSet.isEmpty()) { this.prototypesCurrently... | /**
* Callback after prototype creation.
* <p>The default implementation marks the prototype as not in creation anymore.
* @param beanName the name of the prototype that has been created
* @see #isPrototypeCurrentlyInCreation
*/ | Callback after prototype creation. The default implementation marks the prototype as not in creation anymore | afterPrototypeCreation | {
"repo_name": "mattxia/spring-2.5-analysis",
"path": "src/org/springframework/beans/factory/support/AbstractBeanFactory.java",
"license": "apache-2.0",
"size": 59550
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,791,528 |
public Interpolator getInterpolator() {
return mInterpolator;
}
/**
* The type evaluator to be used when calculating the animated values of this animation.
* The system will automatically assign a float or int evaluator based on the type
* of <code>startValue</code> and <code>endValu... | Interpolator function() { return mInterpolator; } /** * The type evaluator to be used when calculating the animated values of this animation. * The system will automatically assign a float or int evaluator based on the type * of <code>startValue</code> and <code>endValue</code> in the constructor. But if these values *... | /**
* Returns the timing interpolator that this ValueAnimator uses.
*
* @return The timing interpolator for this ValueAnimator.
*/ | Returns the timing interpolator that this ValueAnimator uses | getInterpolator | {
"repo_name": "yesterdaylike/DailyLady",
"path": "src/com/yesterday/like/ActionBar/internal/nineoldandroids/animation/ValueAnimator.java",
"license": "apache-2.0",
"size": 53264
} | [
"android.view.animation.Interpolator"
] | import android.view.animation.Interpolator; | import android.view.animation.*; | [
"android.view"
] | android.view; | 2,095,401 |
public TextBounds setWrappedText (CharSequence str, float x, float y, float wrapWidth) {
clear();
return addWrappedText(str, x, y, wrapWidth, HAlignment.LEFT);
} | TextBounds function (CharSequence str, float x, float y, float wrapWidth) { clear(); return addWrappedText(str, x, y, wrapWidth, HAlignment.LEFT); } | /** Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n) and is automatically
* wrapped within the specified width.
* @see #addWrappedText(CharSequence, float, float, float, HAlignment) */ | Clears any cached glyphs and adds glyphs for the specified text, which may contain newlines (\n) and is automatically wrapped within the specified width | setWrappedText | {
"repo_name": "0359xiaodong/libgdx",
"path": "gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java",
"license": "apache-2.0",
"size": 25910
} | [
"com.badlogic.gdx.graphics.g2d.BitmapFont"
] | import com.badlogic.gdx.graphics.g2d.BitmapFont; | import com.badlogic.gdx.graphics.g2d.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 2,241,650 |
Builder rotate(Rotation rotation); | Builder rotate(Rotation rotation); | /**
* Performs a rotation about the provided {@link Axis} around the given
* {@link #origin(Vector3d) origin} around the {@link Axis#Y y-axis}.
*
* @param rotation The {@link Rotation} to perform
* @return This builder, for chaining
*/ | Performs a rotation about the provided <code>Axis</code> around the given <code>#origin(Vector3d) origin</code> around the <code>Axis#Y y-axis</code> | rotate | {
"repo_name": "SpongePowered/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/util/transformation/Transformation.java",
"license": "mit",
"size": 9992
} | [
"org.spongepowered.api.util.rotation.Rotation"
] | import org.spongepowered.api.util.rotation.Rotation; | import org.spongepowered.api.util.rotation.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 163,257 |
private int readSBits(int numBits) throws IOException {
// Get the number as an unsigned value.
long uBits = readUBits(numBits);
// Is the number negative?
if ((uBits & (1L << (numBits - 1))) != 0) {
// Yes. Extend the sign.
uBits |= -1L << numBits;
}
return (int) uBits;
}
| int function(int numBits) throws IOException { long uBits = readUBits(numBits); if ((uBits & (1L << (numBits - 1))) != 0) { uBits = -1L << numBits; } return (int) uBits; } | /**
* Read a signed value from the given number of bits
*/ | Read a signed value from the given number of bits | readSBits | {
"repo_name": "Bryllyant/kona-commons",
"path": "src/main/java/com/bryllyant/kona/media/util/KImageInfo.java",
"license": "apache-2.0",
"size": 40110
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 664,007 |
public String generateFilename(IScope scope, String name, GenerationType type);
| String function(IScope scope, String name, GenerationType type); | /**
* Generate a filename without an extension.
*
* @param scope Scope to use
* @param name Stream name
* @param type Generation strategy (either playback or record)
* @return Full filename
*/ | Generate a filename without an extension | generateFilename | {
"repo_name": "OpenCorrelate/red5load",
"path": "red5/src/main/java/org/red5/server/api/stream/IStreamFilenameGenerator.java",
"license": "lgpl-3.0",
"size": 2811
} | [
"org.red5.server.api.IScope"
] | import org.red5.server.api.IScope; | import org.red5.server.api.*; | [
"org.red5.server"
] | org.red5.server; | 2,899,097 |
public Color getSelectedBackground() {
return selectedBackground;
} | Color function() { return selectedBackground; } | /**
* Returns the selected background color of this <code>ColorHighlighter</code>.
*
* @return the selected background color of this <code>ColorHighlighter</code>,
* or null, if no selected background color has been set
*/ | Returns the selected background color of this <code>ColorHighlighter</code> | getSelectedBackground | {
"repo_name": "syncer/swingx",
"path": "swingx-core/src/main/java/org/jdesktop/swingx/decorator/ColorHighlighter.java",
"license": "lgpl-2.1",
"size": 9792
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,335,708 |
public static void reset() {
if(audioPlayer != null) {
try {
pause();
} catch(Exception e) {
Main.warn(e);
}
audioPlayer.playingUrl = null;
}
}
private AudioPlayer() {
state = State.INITIALIZING;
... | static void function() { if(audioPlayer != null) { try { pause(); } catch(Exception e) { Main.warn(e); } audioPlayer.playingUrl = null; } } private AudioPlayer() { state = State.INITIALIZING; command = new Execute(); playingUrl = null; leadIn = Main.pref.getDouble(STR, 1.0 ); calibration = Main.pref.getDouble(STR, 1.0 ... | /**
* Resets the audio player.
*/ | Resets the audio player | reset | {
"repo_name": "jonathanrcarter/divv-amsterdam-parkingapi",
"path": "src-josm/org/openstreetmap/josm/tools/AudioPlayer.java",
"license": "gpl-2.0",
"size": 14327
} | [
"org.openstreetmap.josm.Main"
] | import org.openstreetmap.josm.Main; | import org.openstreetmap.josm.*; | [
"org.openstreetmap.josm"
] | org.openstreetmap.josm; | 1,665,422 |
public Configurable withPolicy(HttpPipelinePolicy policy) {
this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
return this;
} | Configurable function(HttpPipelinePolicy policy) { this.policies.add(Objects.requireNonNull(policy, STR)); return this; } | /**
* Adds the pipeline policy to the HTTP pipeline.
*
* @param policy the HTTP pipeline policy.
* @return the configurable object itself.
*/ | Adds the pipeline policy to the HTTP pipeline | withPolicy | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/RecoveryServicesManager.java",
"license": "mit",
"size": 12696
} | [
"com.azure.core.http.policy.HttpPipelinePolicy",
"java.util.Objects"
] | import com.azure.core.http.policy.HttpPipelinePolicy; import java.util.Objects; | import com.azure.core.http.policy.*; import java.util.*; | [
"com.azure.core",
"java.util"
] | com.azure.core; java.util; | 1,120,920 |
ModelBuildingRequest setSystemProperties( Properties systemProperties ); | ModelBuildingRequest setSystemProperties( Properties systemProperties ); | /**
* Sets the system properties to use for interpolation and profile activation. The system properties are collected
* from the runtime environment like {@link System#getProperties()} and environment variables.
*
* @param systemProperties The system properties, may be {@code null}.
* @return T... | Sets the system properties to use for interpolation and profile activation. The system properties are collected from the runtime environment like <code>System#getProperties()</code> and environment variables | setSystemProperties | {
"repo_name": "olamy/maven",
"path": "maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java",
"license": "apache-2.0",
"size": 13450
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,638,342 |
public final void fireTransferAliveEvents() {
for (ITransferStatusListener listener : transferStatusListeners.toArray(new ITransferStatusListener[transferStatusListeners.size()])) {
listener.fireTransferAliveEvent();
}
} | final void function() { for (ITransferStatusListener listener : transferStatusListeners.toArray(new ITransferStatusListener[transferStatusListeners.size()])) { listener.fireTransferAliveEvent(); } } | /**
* Notify all transfer status listeners on alive transfer.
*/ | Notify all transfer status listeners on alive transfer | fireTransferAliveEvents | {
"repo_name": "kit-data-manager/base",
"path": "Staging/DataTransferClient/src/main/java/edu/kit/dama/transfer/client/impl/AbstractTransferClient.java",
"license": "apache-2.0",
"size": 44750
} | [
"edu.kit.dama.transfer.client.interfaces.ITransferStatusListener"
] | import edu.kit.dama.transfer.client.interfaces.ITransferStatusListener; | import edu.kit.dama.transfer.client.interfaces.*; | [
"edu.kit.dama"
] | edu.kit.dama; | 2,783,329 |
public List<com.mozu.api.contracts.productadmin.AttributeInProductType> getProperties(Integer productTypeId) throws Exception
{
MozuClient<List<com.mozu.api.contracts.productadmin.AttributeInProductType>> client = com.mozu.api.clients.commerce.catalog.admin.attributedefinition.producttypes.ProductTypePropertyCl... | List<com.mozu.api.contracts.productadmin.AttributeInProductType> function(Integer productTypeId) throws Exception { MozuClient<List<com.mozu.api.contracts.productadmin.AttributeInProductType>> client = com.mozu.api.clients.commerce.catalog.admin.attributedefinition.producttypes.ProductTypePropertyClient.getPropertiesCl... | /**
* Retrieves a list of product property attributes defined for a product type.
* <p><pre><code>
* ProductTypeProperty producttypeproperty = new ProductTypeProperty();
* AttributeInProductType attributeInProductType = producttypeproperty.getProperties( productTypeId);
* </code></pre></p>
* @param pr... | Retrieves a list of product property attributes defined for a product type. <code><code> ProductTypeProperty producttypeproperty = new ProductTypeProperty(); AttributeInProductType attributeInProductType = producttypeproperty.getProperties( productTypeId); </code></code> | getProperties | {
"repo_name": "johngatti/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/attributedefinition/producttypes/ProductTypePropertyResource.java",
"license": "mit",
"size": 21485
} | [
"com.mozu.api.MozuClient",
"java.util.List"
] | import com.mozu.api.MozuClient; import java.util.List; | import com.mozu.api.*; import java.util.*; | [
"com.mozu.api",
"java.util"
] | com.mozu.api; java.util; | 167,946 |
public void testFileCreationSyncOnClose() throws IOException {
System.out.println("test testFileCreationSyncOnClose start");
final int DATANODE_NUM = 3;
Configuration conf = new Configuration();
conf.setBoolean("dfs.datanode.synconclose", true);
MiniDFSCluster cluster = new MiniDFSCluster(conf, DA... | void function() throws IOException { System.out.println(STR); final int DATANODE_NUM = 3; Configuration conf = new Configuration(); conf.setBoolean(STR, true); MiniDFSCluster cluster = new MiniDFSCluster(conf, DATANODE_NUM, true, null); try { FileSystem fs = cluster.getFileSystem(); Path[] p = {new Path("/foo"), new Pa... | /**
* Test creating a file whose data gets sync when closed
*/ | Test creating a file whose data gets sync when closed | testFileCreationSyncOnClose | {
"repo_name": "iVCE/RDFS",
"path": "src/test/org/apache/hadoop/hdfs/TestFileCreation.java",
"license": "apache-2.0",
"size": 35446
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FSDataInputStream",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,576,012 |
public void removeMasterHost(String hostPortPair) throws SQLException {
this.removeMasterHost(hostPortPair, true);
} | void function(String hostPortPair) throws SQLException { this.removeMasterHost(hostPortPair, true); } | /**
* Removes a host from the masters hosts list.
*
* @see #removeMasterHost(String, boolean)
*/ | Removes a host from the masters hosts list | removeMasterHost | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/mysql-connector/com/mysql/cj/jdbc/ha/ReplicationConnectionGroup.java",
"license": "gpl-2.0",
"size": 9510
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 148,062 |
public OutputStream getOutput() throws IOException {
if (sink == null) {
//System.out must not be closed
return new FilterOutputStream(System.out) {
@Override
public void close() {} | OutputStream function() throws IOException { if (sink == null) { return new FilterOutputStream(System.out) { public void close() {} | /**
* Creates a new output writer.
*
* @return a new output writer
* @throws IOException if an error occurs
*
* @see #setSink
*/ | Creates a new output writer | getOutput | {
"repo_name": "javaprog/sparqlytics",
"path": "src/main/java/de/tud/inf/db/sparqlytics/model/Session.java",
"license": "gpl-2.0",
"size": 9783
} | [
"java.io.FilterOutputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,169,630 |
public PDTristimulus getBlackPoint()
{
COSArray bp = (COSArray)dictionary.getDictionaryObject( COSName.BLACK_POINT );
if( bp == null )
{
bp = new COSArray();
bp.add( new COSFloat( 0.0f ) );
bp.add( new COSFloat( 0.0f ) );
bp.add( new COSFlo... | PDTristimulus function() { COSArray bp = (COSArray)dictionary.getDictionaryObject( COSName.BLACK_POINT ); if( bp == null ) { bp = new COSArray(); bp.add( new COSFloat( 0.0f ) ); bp.add( new COSFloat( 0.0f ) ); bp.add( new COSFloat( 0.0f ) ); dictionary.setItem( COSName.BLACK_POINT, bp ); } return new PDTristimulus( bp ... | /**
* This will return the BlackPoint tristimulus. This is an optional field but
* has defaults so this will never return null.
* A default of 0,0,0 will be returned if the pdf does not have any values yet.
*
* @return The blackpoint tristimulus.
*/ | This will return the BlackPoint tristimulus. This is an optional field but has defaults so this will never return null. A default of 0,0,0 will be returned if the pdf does not have any values yet | getBlackPoint | {
"repo_name": "myrridin/qz-print",
"path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/graphics/color/PDLab.java",
"license": "lgpl-2.1",
"size": 8519
} | [
"org.apache.pdfbox.cos.COSArray",
"org.apache.pdfbox.cos.COSFloat",
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSArray; import org.apache.pdfbox.cos.COSFloat; import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 2,455,252 |
public void setSeriesItemLabelGenerator(int series,
CategoryItemLabelGenerator generator) {
this.itemLabelGeneratorList.set(series, generator);
fireChangeEvent();
}
| void function(int series, CategoryItemLabelGenerator generator) { this.itemLabelGeneratorList.set(series, generator); fireChangeEvent(); } | /**
* Sets the item label generator for a series and sends a
* {@link RendererChangeEvent} to all registered listeners.
*
* @param series the series index (zero based).
* @param generator the generator (<code>null</code> permitted).
*
* @see #getSeriesItemLabelGenerator(int)
... | Sets the item label generator for a series and sends a <code>RendererChangeEvent</code> to all registered listeners | setSeriesItemLabelGenerator | {
"repo_name": "fluidware/Eastwood-Charts",
"path": "source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java",
"license": "lgpl-2.1",
"size": 70834
} | [
"org.jfree.chart.labels.CategoryItemLabelGenerator"
] | import org.jfree.chart.labels.CategoryItemLabelGenerator; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,324,438 |
public static Handle getPressedHandle(float x,
float y,
float left,
float top,
float right,
float bottom,
... | static Handle function(float x, float y, float left, float top, float right, float bottom, float targetRadius) { Handle pressedHandle = null; if (HandleUtil.isInCornerTargetZone(x, y, left, top, targetRadius)) { pressedHandle = Handle.TOP_LEFT; } else if (HandleUtil.isInCornerTargetZone(x, y, right, top, targetRadius))... | /**
* Determines which, if any, of the handles are pressed given the touch
* coordinates, the bounding box, and the touch radius.
*
* @param x the x-coordinate of the touch point
* @param y the y-coordinate of the touch point
* @param left the x-coordinate of the left bound
* @param ... | Determines which, if any, of the handles are pressed given the touch coordinates, the bounding box, and the touch radius | getPressedHandle | {
"repo_name": "cymcsg/UltimateAndroid",
"path": "deprecated/UltimateAndroidNormal/UltimateAndroidUi/src/com/marshalchen/common/uimodule/cropperimage/util/HandleUtil.java",
"license": "apache-2.0",
"size": 11954
} | [
"com.marshalchen.common.uimodule.cropperimage.cropwindow.handle.Handle"
] | import com.marshalchen.common.uimodule.cropperimage.cropwindow.handle.Handle; | import com.marshalchen.common.uimodule.cropperimage.cropwindow.handle.*; | [
"com.marshalchen.common"
] | com.marshalchen.common; | 1,865,984 |
public FindDataObjectsRequestBuilder<T> withMinimumAccessLevel(AccessLevel level) {
Preconditions.checkState(this.level == null,
"Cannot call withMinimumAccessLevel more than once");
Preconditions.checkNotNull(level, "level may not be null");
Preconditions... | FindDataObjectsRequestBuilder<T> function(AccessLevel level) { Preconditions.checkState(this.level == null, STR); Preconditions.checkNotNull(level, STR); Preconditions.checkArgument(!level.equals(AccessLevel.NONE), STR); this.level = level; return this; } | /**
* Only returns data objects to which the requesting user has at least the specified level
* of permission in some project.
*
* @param level project access level (must be greater than NONE)
*
* @return the same data object
*/ | Only returns data objects to which the requesting user has at least the specified level of permission in some project | withMinimumAccessLevel | {
"repo_name": "jhuttner/dx-toolkit",
"path": "src/java/src/main/java/com/dnanexus/DXSearch.java",
"license": "apache-2.0",
"size": 101349
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 574,497 |
ServiceCall getEmptyErrorAsync(final ServiceCallback<Boolean> serviceCallback) throws IllegalArgumentException; | ServiceCall getEmptyErrorAsync(final ServiceCallback<Boolean> serviceCallback) throws IllegalArgumentException; | /**
* Get empty error form server.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link ServiceCall} object
*/ | Get empty error form server | getEmptyErrorAsync | {
"repo_name": "stankovski/AutoRest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/http/HttpFailureOperations.java",
"license": "mit",
"size": 2257
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,098,704 |
public Vector getPointerParts() {
return fXPointerParts;
}
private final class Tokens {
private static final int XPTRTOKEN_OPEN_PAREN = 0,
XPTRTOKEN_CLOSE_PAREN = 1, XPTRTOKEN_SHORTHAND = 2,
XPTRTOKEN_SCHEMENAME = 3, XPTRTOKEN_SCHEMEDATA = 4;
... | Vector function() { return fXPointerParts; } private final class Tokens { private static final int XPTRTOKEN_OPEN_PAREN = 0, XPTRTOKEN_CLOSE_PAREN = 1, XPTRTOKEN_SHORTHAND = 2, XPTRTOKEN_SCHEMENAME = 3, XPTRTOKEN_SCHEMEDATA = 4; private final String[] fgTokenNames = { STR, STR, STR, STR, STR }; private static final int... | /**
* Returns a Vector of XPointerPart objects
*
* @return A Vector of XPointerPart objects.
*/ | Returns a Vector of XPointerPart objects | getPointerParts | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java",
"license": "apache-2.0",
"size": 46643
} | [
"com.sun.org.apache.xerces.internal.util.SymbolTable",
"java.util.Hashtable",
"java.util.Vector"
] | import com.sun.org.apache.xerces.internal.util.SymbolTable; import java.util.Hashtable; import java.util.Vector; | import com.sun.org.apache.xerces.internal.util.*; import java.util.*; | [
"com.sun.org",
"java.util"
] | com.sun.org; java.util; | 2,861,119 |
public int getTaskIndex(ReadOnlyTask targetTask) {
List<ReadOnlyTask> tasksInList = getListView().getItems();
for (int i = 0; i < tasksInList.size(); i++) {
if(tasksInList.get(i).getName().equals(targetTask.getName())){
return i;
}
}
return NOT... | int function(ReadOnlyTask targetTask) { List<ReadOnlyTask> tasksInList = getListView().getItems(); for (int i = 0; i < tasksInList.size(); i++) { if(tasksInList.get(i).getName().equals(targetTask.getName())){ return i; } } return NOT_FOUND; } | /**
* Returns the position of the task given, {@code NOT_FOUND} if not found in the list.
*/ | Returns the position of the task given, NOT_FOUND if not found in the list | getTaskIndex | {
"repo_name": "CS2103AUG2016-T11-C3/main",
"path": "src/test/java/guitests/guihandles/UndatedListPanelHandle.java",
"license": "mit",
"size": 5785
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 596,428 |
public void setAmazonSESClient(AmazonSimpleEmailService amazonSESClient) {
this.amazonSESClient = amazonSESClient;
} | void function(AmazonSimpleEmailService amazonSESClient) { this.amazonSESClient = amazonSESClient; } | /**
* To use the AmazonSimpleEmailService as the client
*/ | To use the AmazonSimpleEmailService as the client | setAmazonSESClient | {
"repo_name": "adessaigne/camel",
"path": "components/camel-aws-ses/src/main/java/org/apache/camel/component/aws/ses/SesConfiguration.java",
"license": "apache-2.0",
"size": 6367
} | [
"com.amazonaws.services.simpleemail.AmazonSimpleEmailService"
] | import com.amazonaws.services.simpleemail.AmazonSimpleEmailService; | import com.amazonaws.services.simpleemail.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 1,083,419 |
public static ServeReturnedDataEntryDistributionBuilder serveReturnedData(int id, DistributionAction actionType) {
return new ServeReturnedDataEntryDistributionBuilder(id, actionType);
}
public static class ServeSentDataEntryDistributionBuilder extends ServeRequestBuilder {
public ServeSentDataEntryDi... | static ServeReturnedDataEntryDistributionBuilder function(int id, DistributionAction actionType) { return new ServeReturnedDataEntryDistributionBuilder(id, actionType); } public static class ServeSentDataEntryDistributionBuilder extends ServeRequestBuilder { public ServeSentDataEntryDistributionBuilder(int id, Distribu... | /**
* Serves entry distribution returned data
*
* @param id
* @param actionType
*/ | Serves entry distribution returned data | serveReturnedData | {
"repo_name": "kaltura/KalturaGeneratedAPIClientsJava",
"path": "src/main/java/com/kaltura/client/services/EntryDistributionService.java",
"license": "agpl-3.0",
"size": 11708
} | [
"com.kaltura.client.enums.DistributionAction",
"com.kaltura.client.utils.request.ServeRequestBuilder"
] | import com.kaltura.client.enums.DistributionAction; import com.kaltura.client.utils.request.ServeRequestBuilder; | import com.kaltura.client.enums.*; import com.kaltura.client.utils.request.*; | [
"com.kaltura.client"
] | com.kaltura.client; | 1,881,481 |
public static Field getFieldIgnoreCase(Class c, String name) throws NoSuchFieldException {
Field[] fields = c.getFields();
for (int i = 0; i < fields.length; i++) {
Field f = fields[i];
// Same Name
if (f.getName().equalsIgnoreCase(name)) {
return f;
}
}
throw new NoSuchFieldException("Fie... | static Field function(Class c, String name) throws NoSuchFieldException { Field[] fields = c.getFields(); for (int i = 0; i < fields.length; i++) { Field f = fields[i]; if (f.getName().equalsIgnoreCase(name)) { return f; } } throw new NoSuchFieldException(STR); } | /**
* same like method getField from Class but ignore case from field name
*
* @param c class to search the field
* @param name name to search
* @return Matching Field
* @throws NoSuchFieldException
*/ | same like method getField from Class but ignore case from field name | getFieldIgnoreCase | {
"repo_name": "jzuijlek/Lucee",
"path": "core/src/main/java/lucee/runtime/reflection/Invoker.java",
"license": "lgpl-2.1",
"size": 15152
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,978,624 |
public List<RuleConditionElement> getNestedElements(); | List<RuleConditionElement> function(); | /**
* Returs a list of RuleConditionElement's that are nested
* inside the current element
* @return
*/ | Returs a list of RuleConditionElement's that are nested inside the current element | getNestedElements | {
"repo_name": "wmedvede/drools",
"path": "drools-core/src/main/java/org/drools/core/rule/RuleConditionElement.java",
"license": "apache-2.0",
"size": 2129
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,870,937 |
public void pixelsToValue(float[] pixels) {
Matrix tmp = new Matrix();
// invert all matrixes to convert back to the original value
mMatrixOffset.invert(tmp);
tmp.mapPoints(pixels);
mMatrixTouch.invert(tmp);
tmp.mapPoints(pixels);
mMatrixValueToPx.invert(t... | void function(float[] pixels) { Matrix tmp = new Matrix(); mMatrixOffset.invert(tmp); tmp.mapPoints(pixels); mMatrixTouch.invert(tmp); tmp.mapPoints(pixels); mMatrixValueToPx.invert(tmp); tmp.mapPoints(pixels); } | /**
* Transforms the given array of touch positions (pixels) (x, y, x, y, ...)
* into values on the chart.
*
* @param pixels
*/ | Transforms the given array of touch positions (pixels) (x, y, x, y, ...) into values on the chart | pixelsToValue | {
"repo_name": "Fgabz/XivelyAndroid",
"path": "XivelyViewerProject/MPChartLib/src/com/github/mikephil/charting/renderer/Transformer.java",
"license": "gpl-2.0",
"size": 15765
} | [
"android.graphics.Matrix"
] | import android.graphics.Matrix; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,122,606 |
protected Object deserialize(byte[] in) {
Object rv = null;
ByteArrayInputStream bis = null;
ObjectInputStream is = null;
try {
if (in != null) {
bis = new ByteArrayInputStream(in);
is = new ObjectInputStream(bis);
r... | Object function(byte[] in) { Object rv = null; ByteArrayInputStream bis = null; ObjectInputStream is = null; try { if (in != null) { bis = new ByteArrayInputStream(in); is = new ObjectInputStream(bis); rv = is.readObject(); } } catch (IOException e) { log.error(STR + in.length + STR, e); } catch (ClassNotFoundException... | /**
* Get the object represented by the given serialized bytes.
*/ | Get the object represented by the given serialized bytes | deserialize | {
"repo_name": "ellios/hedwig",
"path": "hedwig-redis-client/src/main/java/me/ellios/jedis/transcoders/BaseSerializingTranscoder.java",
"license": "apache-2.0",
"size": 6865
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.io.ObjectInputStream"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,413,196 |
default AdvancedAhcEndpointBuilder clientConfigRealmOptions(Map values) {
doSetMultiValueProperties("clientConfigRealmOptions", "clientConfig.realm.", values);
return this;
}
} | default AdvancedAhcEndpointBuilder clientConfigRealmOptions(Map values) { doSetMultiValueProperties(STR, STR, values); return this; } } | /**
* To configure the AsyncHttpClientConfig Realm using the key/values
* from the Map.
*
* The option is a: <code>java.util.Map<java.lang.String,
* java.lang.Object></code> type.
* The option is multivalued, and you can use the
* clientConfigRealmOp... | To configure the AsyncHttpClientConfig Realm using the key/values from the Map. The option is a: <code>java.util.Map<java.lang.String, java.lang.Object></code> type. The option is multivalued, and you can use the clientConfigRealmOptions(String, Object) method to add a value (call the method multiple times to set... | clientConfigRealmOptions | {
"repo_name": "nicolaferraro/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AhcEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 21272
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 35,715 |
public static void copy(String in, Charset charset, OutputStream out) throws IOException {
Writer writer = new OutputStreamWriter(out, charset);
writer.write(in);
writer.flush();
}
| static void function(String in, Charset charset, OutputStream out) throws IOException { Writer writer = new OutputStreamWriter(out, charset); writer.write(in); writer.flush(); } | /**
* Copy the contents of the given String to the given output OutputStream.
* Leaves the stream open when done.
* @param in the String to copy from
* @param charset the Charset
* @param out the OutputStream to copy to
* @throws IOException in case of I/O errors
*/ | Copy the contents of the given String to the given output OutputStream. Leaves the stream open when done | copy | {
"repo_name": "moyq5/weixin-popular",
"path": "src/main/java/weixin/popular/util/StreamUtils.java",
"license": "apache-2.0",
"size": 4402
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.io.OutputStreamWriter",
"java.io.Writer",
"java.nio.charset.Charset"
] | import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,692,279 |
public final void writeCharSequence(CharSequence val) {
TextUtils.writeToParcel(val, this, 0);
} | final void function(CharSequence val) { TextUtils.writeToParcel(val, this, 0); } | /**
* Write a CharSequence value into the parcel at the current dataPosition(),
* growing dataCapacity() if needed.
* @hide
*/ | Write a CharSequence value into the parcel at the current dataPosition(), growing dataCapacity() if needed | writeCharSequence | {
"repo_name": "mateor/PDroidHistory",
"path": "frameworks/base/core/java/android/os/Parcel.java",
"license": "gpl-3.0",
"size": 72041
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 2,761,257 |
ContainerWithPipeline getMatchingContainerWithPipeline(long size,
String owner, ReplicationType type, ReplicationFactor factor,
LifeCycleState state) throws IOException; | ContainerWithPipeline getMatchingContainerWithPipeline(long size, String owner, ReplicationType type, ReplicationFactor factor, LifeCycleState state) throws IOException; | /**
* Returns the ContainerWithPipeline.
* @return NodeManager
*/ | Returns the ContainerWithPipeline | getMatchingContainerWithPipeline | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/Mapping.java",
"license": "apache-2.0",
"size": 4885
} | [
"java.io.IOException",
"org.apache.hadoop.hdds.protocol.proto.HddsProtos",
"org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline"
] | import java.io.IOException; import org.apache.hadoop.hdds.protocol.proto.HddsProtos; import org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline; | import java.io.*; import org.apache.hadoop.hdds.protocol.proto.*; import org.apache.hadoop.hdds.scm.container.common.helpers.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,950,105 |
public static File getExternalStorageAndroidDataDir() {
throwIfSystem();
return sCurrentUser.getExternalStorageAndroidDataDir();
} | static File function() { throwIfSystem(); return sCurrentUser.getExternalStorageAndroidDataDir(); } | /**
* Returns the path for android-specific data on the SD card.
* @hide
*/ | Returns the path for android-specific data on the SD card | getExternalStorageAndroidDataDir | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/base/core/java/android/os/Environment.java",
"license": "gpl-2.0",
"size": 26167
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 121,177 |
EntityManager getEntityManager(); | EntityManager getEntityManager(); | /**
* Entity Manager used for the query.
*/ | Entity Manager used for the query | getEntityManager | {
"repo_name": "struberg/deltaspike",
"path": "deltaspike/modules/data/api/src/main/java/org/apache/deltaspike/data/spi/QueryInvocationContext.java",
"license": "apache-2.0",
"size": 1720
} | [
"javax.persistence.EntityManager"
] | import javax.persistence.EntityManager; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 2,100,328 |
@JSFunction
public void tunnelRemoteBind(String remotehost, int remoteport, String localhost, int localport) throws JSchException {
session.setPortForwardingR(remotehost, remoteport, localhost, localport);
}
| void function(String remotehost, int remoteport, String localhost, int localport) throws JSchException { session.setPortForwardingR(remotehost, remoteport, localhost, localport); } | /**
* <odoc>
* <key>SSH.tunnelRemoteBind(aRemoteInterface, aRemotePort, aLocalAddress, aLocalPort)</key>
* Creates a TCP tunnel, on the aRemoteInterface only, between a local host and port to be accessed from a remote
* port over the SSH connection.
* </odoc>
*/ | SSH.tunnelRemoteBind(aRemoteInterface, aRemotePort, aLocalAddress, aLocalPort) Creates a TCP tunnel, on the aRemoteInterface only, between a local host and port to be accessed from a remote port over the SSH connection. | tunnelRemoteBind | {
"repo_name": "OpenAF/openaf",
"path": "src/openaf/plugins/SSH.java",
"license": "apache-2.0",
"size": 32314
} | [
"com.jcraft.jsch.JSchException",
"java.lang.String"
] | import com.jcraft.jsch.JSchException; import java.lang.String; | import com.jcraft.jsch.*; import java.lang.*; | [
"com.jcraft.jsch",
"java.lang"
] | com.jcraft.jsch; java.lang; | 862,468 |
@Override
public void outputConfigurationHeader(IThreadContext threadContext,
IHTTPOutput out, Locale locale, ConfigParams parameters, List<String> tabsArray)
throws ManifoldCFException, IOException {
// Add the Server tab
tabsArray.add(Messages.getString(locale, GOOGLEDRIVE_SERVER_TAB_PROPERTY)... | void function(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters, List<String> tabsArray) throws ManifoldCFException, IOException { tabsArray.add(Messages.getString(locale, GOOGLEDRIVE_SERVER_TAB_PROPERTY)); Map<String, Object> paramMap = new HashMap<String, Object>(); fillInServerCon... | /**
*
* Output the configuration header section. This method is called in the
* head section of the connector's configuration page. Its purpose is to add
* the required tabs to the list, and to output any javascript methods that
* might be needed by the configuration editing HTML.
*
* @param thread... | Output the configuration header section. This method is called in the head section of the connector's configuration page. Its purpose is to add the required tabs to the list, and to output any javascript methods that might be needed by the configuration editing HTML | outputConfigurationHeader | {
"repo_name": "kishorejangid/manifoldcf",
"path": "connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java",
"license": "apache-2.0",
"size": 59614
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.List",
"java.util.Locale",
"java.util.Map",
"org.apache.manifoldcf.core.interfaces.ConfigParams",
"org.apache.manifoldcf.core.interfaces.IHTTPOutput",
"org.apache.manifoldcf.core.interfaces.IThreadContext",
"org.apache.manifoldcf.core.interfaces... | import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import org.apache.manifoldcf.core.interfaces.ConfigParams; import org.apache.manifoldcf.core.interfaces.IHTTPOutput; import org.apache.manifoldcf.core.interfaces.IThreadContext; import org.apache.... | import java.io.*; import java.util.*; import org.apache.manifoldcf.core.interfaces.*; | [
"java.io",
"java.util",
"org.apache.manifoldcf"
] | java.io; java.util; org.apache.manifoldcf; | 240,168 |
List<Institution> getAll(); | List<Institution> getAll(); | /**
* Shows all institutions
* @return An array of institutions
*/ | Shows all institutions | getAll | {
"repo_name": "jsuarezb/paw-2016-4",
"path": "interfaces/src/main/java/ar/edu/itba/paw/services/InstitutionService.java",
"license": "mit",
"size": 670
} | [
"ar.edu.itba.paw.models.Institution",
"java.util.List"
] | import ar.edu.itba.paw.models.Institution; import java.util.List; | import ar.edu.itba.paw.models.*; import java.util.*; | [
"ar.edu.itba",
"java.util"
] | ar.edu.itba; java.util; | 2,552,035 |
@Nullable
public DeviceManagementExchangeConnector patch(@Nonnull final DeviceManagementExchangeConnector sourceDeviceManagementExchangeConnector) throws ClientException {
return send(HttpMethod.PATCH, sourceDeviceManagementExchangeConnector);
} | DeviceManagementExchangeConnector function(@Nonnull final DeviceManagementExchangeConnector sourceDeviceManagementExchangeConnector) throws ClientException { return send(HttpMethod.PATCH, sourceDeviceManagementExchangeConnector); } | /**
* Patches this DeviceManagementExchangeConnector with a source
*
* @param sourceDeviceManagementExchangeConnector the source object with updates
* @return the updated DeviceManagementExchangeConnector
* @throws ClientException this exception occurs if the request was unable to complete for ... | Patches this DeviceManagementExchangeConnector with a source | patch | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/DeviceManagementExchangeConnectorRequest.java",
"license": "mit",
"size": 7006
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.DeviceManagementExchangeConnector",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.DeviceManagementExchangeConnector; import javax.annotation.Nonnull; | import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 2,056,479 |
List<String> findEmployeesWithPayType(Map<Integer, Set<String>> payPeriods, List<String> balanceTypes, Map<String, Set<String>> earnCodePayGroupMap); | List<String> findEmployeesWithPayType(Map<Integer, Set<String>> payPeriods, List<String> balanceTypes, Map<String, Set<String>> earnCodePayGroupMap); | /**
* find the employees who were paid based on a set of specified pay type within the given report periods. Here, a pay type can
* be determined by earn code and pay group.
*
* @param payPeriods the given pay periods
* @param balanceTypes the specified balance type codes
* @param earnCod... | find the employees who were paid based on a set of specified pay type within the given report periods. Here, a pay type can be determined by earn code and pay group | findEmployeesWithPayType | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/ld/service/LaborLedgerEntryService.java",
"license": "apache-2.0",
"size": 3761
} | [
"java.util.List",
"java.util.Map",
"java.util.Set"
] | import java.util.List; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 901,247 |
T read(VirtualHost vhost, String id);
| T read(VirtualHost vhost, String id); | /**
* Return a new entity from the id
* @param vhost
* @param id
* @return
*/ | Return a new entity from the id | read | {
"repo_name": "core9/module-database",
"path": "src/api/java/io/core9/plugin/database/repository/CrudRepository.java",
"license": "mit",
"size": 3291
} | [
"io.core9.plugin.server.VirtualHost"
] | import io.core9.plugin.server.VirtualHost; | import io.core9.plugin.server.*; | [
"io.core9.plugin"
] | io.core9.plugin; | 1,249,268 |
protected void saveProperties(WsdlEndpointFormPage endpointFormPage,
org.apache.synapse.endpoints.WSDLEndpoint synapseHttpEP) {
for (EndPointProperty property : endpointFormPage.endpointPropertyList) {
MediatorProperty mediatorProperty = new MediatorProperty();
mediatorP... | void function(WsdlEndpointFormPage endpointFormPage, org.apache.synapse.endpoints.WSDLEndpoint synapseHttpEP) { for (EndPointProperty property : endpointFormPage.endpointPropertyList) { MediatorProperty mediatorProperty = new MediatorProperty(); mediatorProperty.setName(property.getName()); if (property.getValueType().... | /**
* Save endpoint properties
*
* @param model
* @param endpoint
*/ | Save endpoint properties | saveProperties | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.persistence/src/org/wso2/developerstudio/eclipse/gmf/esb/internal/persistence/WSDLEndPointTransformer.java",
"license": "apache-2.0",
"size": 8864
} | [
"org.apache.synapse.endpoints.WSDLEndpoint",
"org.apache.synapse.mediators.MediatorProperty",
"org.apache.synapse.util.xpath.SynapseXPath",
"org.jaxen.JaxenException",
"org.wso2.developerstudio.eclipse.gmf.esb.EndPointProperty",
"org.wso2.developerstudio.esb.form.editors.article.rcp.endpoints.WsdlEndpoint... | import org.apache.synapse.endpoints.WSDLEndpoint; import org.apache.synapse.mediators.MediatorProperty; import org.apache.synapse.util.xpath.SynapseXPath; import org.jaxen.JaxenException; import org.wso2.developerstudio.eclipse.gmf.esb.EndPointProperty; import org.wso2.developerstudio.esb.form.editors.article.rcp.endpo... | import org.apache.synapse.endpoints.*; import org.apache.synapse.mediators.*; import org.apache.synapse.util.xpath.*; import org.jaxen.*; import org.wso2.developerstudio.eclipse.gmf.esb.*; import org.wso2.developerstudio.esb.form.editors.article.rcp.endpoints.*; | [
"org.apache.synapse",
"org.jaxen",
"org.wso2.developerstudio"
] | org.apache.synapse; org.jaxen; org.wso2.developerstudio; | 2,535,194 |
public FormEntryCaption getCaptionPrompt() {
return mFormEntryController.getModel().getCaptionPrompt();
} | FormEntryCaption function() { return mFormEntryController.getModel().getCaptionPrompt(); } | /**
* Return the caption for the current FormIndex. This is usually used for a repeat prompt.
*
* @return
*/ | Return the caption for the current FormIndex. This is usually used for a repeat prompt | getCaptionPrompt | {
"repo_name": "smap-consulting/ODK1.4_lib",
"path": "src/org/odk/collect/android/logic/FormController.java",
"license": "apache-2.0",
"size": 44030
} | [
"org.javarosa.form.api.FormEntryCaption"
] | import org.javarosa.form.api.FormEntryCaption; | import org.javarosa.form.api.*; | [
"org.javarosa.form"
] | org.javarosa.form; | 2,060,288 |
private PersistedRecoveryPaxosData getPersistedPaxosData(long segmentTxId)
throws IOException {
File f = storage.getPaxosFile(segmentTxId);
if (!f.exists()) {
// Default instance has no fields filled in (they're optional)
return null;
}
InputStream in = Files.newInputStream(f.to... | PersistedRecoveryPaxosData function(long segmentTxId) throws IOException { File f = storage.getPaxosFile(segmentTxId); if (!f.exists()) { return null; } InputStream in = Files.newInputStream(f.toPath()); try { PersistedRecoveryPaxosData ret = PersistedRecoveryPaxosData.parseDelimitedFrom(in); Preconditions.checkState(r... | /**
* Retrieve the persisted data for recovering the given segment from disk.
*/ | Retrieve the persisted data for recovering the given segment from disk | getPersistedPaxosData | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java",
"license": "apache-2.0",
"size": 46038
} | [
"com.google.common.base.Preconditions",
"java.io.File",
"java.io.IOException",
"java.io.InputStream",
"java.nio.file.Files",
"org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos",
"org.apache.hadoop.io.IOUtils"
] | import com.google.common.base.Preconditions; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos; import org.apache.hadoop.io.IOUtils; | import com.google.common.base.*; import java.io.*; import java.nio.file.*; import org.apache.hadoop.hdfs.qjournal.protocol.*; import org.apache.hadoop.io.*; | [
"com.google.common",
"java.io",
"java.nio",
"org.apache.hadoop"
] | com.google.common; java.io; java.nio; org.apache.hadoop; | 106,087 |
public void dispose() {
// for some reason not in framework.
getSelectionSynchronizer().removeViewer(getGraphicalViewer());
getCommandStack().removeCommandStackListener(this);
disposePalette();
ScrollingGraphicalViewer viewer = (ScrollingGraphicalViewer) getGraphicalViewer(... | void function() { getSelectionSynchronizer().removeViewer(getGraphicalViewer()); getCommandStack().removeCommandStackListener(this); disposePalette(); ScrollingGraphicalViewer viewer = (ScrollingGraphicalViewer) getGraphicalViewer(); if (viewer != null) { Object p = viewer.getRootEditPart(); if (p instanceof URNRootEdi... | /**
* Disposes the editor.
*/ | Disposes the editor | dispose | {
"repo_name": "McGill-DP-Group/seg.jUCMNav",
"path": "src/seg/jUCMNav/editors/UrnEditor.java",
"license": "epl-1.0",
"size": 22093
} | [
"java.util.Iterator",
"org.eclipse.gef.EditPart",
"org.eclipse.gef.editparts.SimpleRootEditPart",
"org.eclipse.gef.ui.parts.ScrollingGraphicalViewer",
"org.eclipse.ui.internal.PopupMenuExtender",
"org.eclipse.ui.part.MultiPageEditorSite"
] | import java.util.Iterator; import org.eclipse.gef.EditPart; import org.eclipse.gef.editparts.SimpleRootEditPart; import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer; import org.eclipse.ui.internal.PopupMenuExtender; import org.eclipse.ui.part.MultiPageEditorSite; | import java.util.*; import org.eclipse.gef.*; import org.eclipse.gef.editparts.*; import org.eclipse.gef.ui.parts.*; import org.eclipse.ui.internal.*; import org.eclipse.ui.part.*; | [
"java.util",
"org.eclipse.gef",
"org.eclipse.ui"
] | java.util; org.eclipse.gef; org.eclipse.ui; | 506,583 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
| void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "KAMP-Research/KAMP4APS",
"path": "edu.kit.ipd.sdq.kamp4aps.aps.edit/src/edu/kit/ipd/sdq/kamp4aps/model/aPS/ComponentRepository/provider/PowerSplitterItemProvider.java",
"license": "apache-2.0",
"size": 3723
} | [
"org.eclipse.emf.common.notify.Notification"
] | import org.eclipse.emf.common.notify.Notification; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 725,027 |
public StoredProcedureQuery setParameter(String name, Date value, TemporalType temporalType) {
entityManager.verifyOpenWithSetRollbackOnly();
return setParameter(name, convertTemporalType(value, temporalType));
} | StoredProcedureQuery function(String name, Date value, TemporalType temporalType) { entityManager.verifyOpenWithSetRollbackOnly(); return setParameter(name, convertTemporalType(value, temporalType)); } | /**
* Bind an instance of java.util.Date to a named parameter.
*
* @param name
* @param value
* @param temporalType
* @return the same query instance
* @throws IllegalArgumentException if the parameter name does not
* correspond to a parameter of the query or if the value argumen... | Bind an instance of java.util.Date to a named parameter | setParameter | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/StoredProcedureQueryImpl.java",
"license": "epl-1.0",
"size": 46352
} | [
"java.util.Date",
"javax.persistence.StoredProcedureQuery",
"javax.persistence.TemporalType"
] | import java.util.Date; import javax.persistence.StoredProcedureQuery; import javax.persistence.TemporalType; | import java.util.*; import javax.persistence.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 2,602,447 |
EList<Block> getFrom(); | EList<Block> getFrom(); | /**
* Returns the value of the '<em><b>From</b></em>' reference list.
* The list contents are of type {@link mutatorenvironment.Block}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>From</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!--... | Returns the value of the 'From' reference list. The list contents are of type <code>mutatorenvironment.Block</code>. If the meaning of the 'From' reference list isn't clear, there really should be more of a description here... | getFrom | {
"repo_name": "gomezabajo/Wodel",
"path": "wodel.models/src/mutatorenvironment/Block.java",
"license": "epl-1.0",
"size": 6956
} | [
"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,129,916 |
protected static Object newInstance(Class c, Class[] argTypes, Object[] args)
throws Fault
{
try {
return c.getConstructor(argTypes).newInstance(args);
}
catch (IllegalAccessException e) {
throw new Fault(i18n, "ts.illegalAccess",
... | static Object function(Class c, Class[] argTypes, Object[] args) throws Fault { try { return c.getConstructor(argTypes).newInstance(args); } catch (IllegalAccessException e) { throw new Fault(i18n, STR, new Object[] { c.getName(), e }); } catch (InstantiationException e) { throw new Fault(i18n, STR, new Object[] { c.ge... | /**
* Create a new instance of a class using a non-default constructor,
* translating any exceptions that may arise into Fault.
* @param c the class to be instantiated
* @param argTypes the types of the argument to be passed to the constructor,
* (thus implying the constructor to be used.)
... | Create a new instance of a class using a non-default constructor, translating any exceptions that may arise into Fault | newInstance | {
"repo_name": "Distrotech/icedtea7",
"path": "test/jtreg/com/sun/javatest/TestSuite.java",
"license": "gpl-2.0",
"size": 52273
} | [
"java.lang.reflect.InvocationTargetException"
] | import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,244,398 |
public ServiceResponse<Sku> putNonResource(Sku sku) throws CloudException, IOException, InterruptedException {
Response<ResponseBody> result = service.putNonResource(sku, this.client.getAcceptLanguage()).execute();
return client.getAzureClient().getPutOrPatchResult(result, new TypeToken<Sku>() { }.g... | ServiceResponse<Sku> function(Sku sku) throws CloudException, IOException, InterruptedException { Response<ResponseBody> result = service.putNonResource(sku, this.client.getAcceptLanguage()).execute(); return client.getAzureClient().getPutOrPatchResult(result, new TypeToken<Sku>() { }.getType()); } | /**
* Long running put request with non resource.
*
* @param sku sku to put
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws InterruptedException exception thrown when long running operation is inte... | Long running put request with non resource | putNonResource | {
"repo_name": "vulcansteel/autorest",
"path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROsOperationsImpl.java",
"license": "mit",
"size": 77838
} | [
"com.google.common.reflect.TypeToken",
"com.microsoft.azure.CloudException",
"com.microsoft.rest.ServiceResponse",
"com.squareup.okhttp.ResponseBody",
"java.io.IOException"
] | import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponse; import com.squareup.okhttp.ResponseBody; import java.io.IOException; | import com.google.common.reflect.*; import com.microsoft.azure.*; import com.microsoft.rest.*; import com.squareup.okhttp.*; import java.io.*; | [
"com.google.common",
"com.microsoft.azure",
"com.microsoft.rest",
"com.squareup.okhttp",
"java.io"
] | com.google.common; com.microsoft.azure; com.microsoft.rest; com.squareup.okhttp; java.io; | 1,178,500 |
private Map<String, VariantSet> getVariants(ResourceBrowser rsBrowser,
String rootDir, String defaultSkinName, String defaultLocaleName,
boolean mappingSkinLocale) {
Set<String> paths = rsBrowser.getResourceNames(rootDir);
Set<String> skinNames = new HashSet<String>();
Set<String> localeVariants = new Ha... | Map<String, VariantSet> function(ResourceBrowser rsBrowser, String rootDir, String defaultSkinName, String defaultLocaleName, boolean mappingSkinLocale) { Set<String> paths = rsBrowser.getResourceNames(rootDir); Set<String> skinNames = new HashSet<String>(); Set<String> localeVariants = new HashSet<String>(); for (Iter... | /**
* Initialize the skinMapping from the parent path
*
* @param rsBrowser
* the resource browser
* @param rootDir
* the skin root dir path
* @param defaultSkinName
* the default skin name
* @param defaultLocaleName
* the default locale name
*/ | Initialize the skinMapping from the parent path | getVariants | {
"repo_name": "diorcety/jawr",
"path": "jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/variant/css/CssSkinGenerator.java",
"license": "apache-2.0",
"size": 26006
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.Map",
"java.util.Set",
"net.jawr.web.resource.bundle.factory.util.PathNormalizer",
"net.jawr.web.resource.bundle.locale.LocaleUtils",
"net.jawr.web.resource.bundle.variant.VariantSet",
"net.jawr.web.resource.handler.reader.ResourceBrowser"
] | import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import net.jawr.web.resource.bundle.factory.util.PathNormalizer; import net.jawr.web.resource.bundle.locale.LocaleUtils; import net.jawr.web.resource.bundle.variant.VariantSet; import net.jawr.web.resource.handler.reader.Re... | import java.util.*; import net.jawr.web.resource.bundle.factory.util.*; import net.jawr.web.resource.bundle.locale.*; import net.jawr.web.resource.bundle.variant.*; import net.jawr.web.resource.handler.reader.*; | [
"java.util",
"net.jawr.web"
] | java.util; net.jawr.web; | 2,594,179 |
public EnumJvmJITCompilerTimeMonitoring getJvmJITCompilerTimeMonitoring() throws SnmpStatusException; | EnumJvmJITCompilerTimeMonitoring function() throws SnmpStatusException; | /**
* Getter for the "JvmJITCompilerTimeMonitoring" variable.
*/ | Getter for the "JvmJITCompilerTimeMonitoring" variable | getJvmJITCompilerTimeMonitoring | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmCompilationMBean.java",
"license": "mit",
"size": 2055
} | [
"com.sun.jmx.snmp.SnmpStatusException"
] | import com.sun.jmx.snmp.SnmpStatusException; | import com.sun.jmx.snmp.*; | [
"com.sun.jmx"
] | com.sun.jmx; | 670,198 |
if (SystemUtils.IS_OS_WINDOWS) {
File jvmExecutableDir = new File(parent, BIN_DIR);
return new File(jvmExecutableDir, JAVA_EXECUTABLE);
}
if (SystemUtils.IS_OS_LINUX) {
File jvmExecutableDir = new File(parent, BIN_DIR);
return new File(jvmExecutableDir, JAVA_EXECUTABLE);
}
throw new ... | if (SystemUtils.IS_OS_WINDOWS) { File jvmExecutableDir = new File(parent, BIN_DIR); return new File(jvmExecutableDir, JAVA_EXECUTABLE); } if (SystemUtils.IS_OS_LINUX) { File jvmExecutableDir = new File(parent, BIN_DIR); return new File(jvmExecutableDir, JAVA_EXECUTABLE); } throw new NotImplementedException(STR); } | /**
* Resolve OS specific name for Java executable without extension.
*
* @param parent
* Parent directory.
*
* @return OS specific Java executable name without extension.
*/ | Resolve OS specific name for Java executable without extension | resolveJavaExecutable | {
"repo_name": "athrane/pineapple",
"path": "modules/pineapple-api/src/main/java/com/alpha/javautils/ExecutableNameUtils.java",
"license": "gpl-3.0",
"size": 4318
} | [
"java.io.File",
"org.apache.commons.lang3.NotImplementedException",
"org.apache.commons.lang3.SystemUtils"
] | import java.io.File; import org.apache.commons.lang3.NotImplementedException; import org.apache.commons.lang3.SystemUtils; | import java.io.*; import org.apache.commons.lang3.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 729,234 |
public ServiceRefType<EntityBeanType<T>> getOrCreateServiceRef(); | ServiceRefType<EntityBeanType<T>> function(); | /**
* If not already created, a new <code>service-ref</code> element will be created and returned.
* Otherwise, the first existing <code>service-ref</code> element will be returned.
* @return the instance defined for the element <code>service-ref</code>
*/ | If not already created, a new <code>service-ref</code> element will be created and returned. Otherwise, the first existing <code>service-ref</code> element will be returned | getOrCreateServiceRef | {
"repo_name": "forge/javaee-descriptors",
"path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/ejbjar30/EntityBeanType.java",
"license": "epl-1.0",
"size": 41067
} | [
"org.jboss.shrinkwrap.descriptor.api.javaeewebservicesclient12.ServiceRefType"
] | import org.jboss.shrinkwrap.descriptor.api.javaeewebservicesclient12.ServiceRefType; | import org.jboss.shrinkwrap.descriptor.api.javaeewebservicesclient12.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,047,778 |
private static String constructName(List<String> strings) {
// The name is composed of the repository name and then the optional workflowname split with a '/'
StringJoiner joiner = new StringJoiner("/");
for (String string : strings) {
if (!Strings.isNullOrEmpty(string)) {
... | static String function(List<String> strings) { StringJoiner joiner = new StringJoiner("/"); for (String string : strings) { if (!Strings.isNullOrEmpty(string)) { joiner.add(string); } } return joiner.toString(); } | /**
* Construct the workflow/tool full name
*
* @param strings The components that make up the full name (repository name + optional workflow/tool name)
* @return The full workflow/tool name
*/ | Construct the workflow/tool full name | constructName | {
"repo_name": "CancerCollaboratory/dockstore",
"path": "dockstore-webservice/src/main/java/io/swagger/api/impl/ToolsImplCommon.java",
"license": "gpl-2.0",
"size": 27187
} | [
"com.google.common.base.Strings",
"java.util.List",
"java.util.StringJoiner"
] | import com.google.common.base.Strings; import java.util.List; import java.util.StringJoiner; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 41,662 |
private static void tryToCreateSymlink(final Context context) {
boolean success = true;
try {
// symlink to /system/etc/hosts, based on target
if (PreferenceHelper.getApplyMethod(context).equals("writeToDataData")) {
ApplyUtils.createSymlink(Constants.ANDROID... | static void function(final Context context) { boolean success = true; try { if (PreferenceHelper.getApplyMethod(context).equals(STR)) { ApplyUtils.createSymlink(Constants.ANDROID_DATA_DATA_HOSTS); } else if (PreferenceHelper.getApplyMethod(context).equals(STR)) { ApplyUtils.createSymlink(Constants.ANDROID_DATA_HOSTS); ... | /**
* Trying to create symlink and displays dialogs on fail
*/ | Trying to create symlink and displays dialogs on fail | tryToCreateSymlink | {
"repo_name": "Hainish/ad-away",
"path": "AdAway/src/main/java/org/adaway/helper/ResultHelper.java",
"license": "gpl-3.0",
"size": 20832
} | [
"android.content.Context",
"org.adaway.ui.BaseActivity",
"org.adaway.util.ApplyUtils",
"org.adaway.util.CommandException",
"org.adaway.util.Constants",
"org.adaway.util.Log",
"org.adaway.util.RemountException",
"org.adaway.util.Utils"
] | import android.content.Context; import org.adaway.ui.BaseActivity; import org.adaway.util.ApplyUtils; import org.adaway.util.CommandException; import org.adaway.util.Constants; import org.adaway.util.Log; import org.adaway.util.RemountException; import org.adaway.util.Utils; | import android.content.*; import org.adaway.ui.*; import org.adaway.util.*; | [
"android.content",
"org.adaway.ui",
"org.adaway.util"
] | android.content; org.adaway.ui; org.adaway.util; | 1,152,195 |
EList<Project> getSubProjects();
| EList<Project> getSubProjects(); | /**
* Returns the value of the '<em><b>Sub Projects</b></em>' reference list.
* The list contents are of type {@link org.bimserver.models.store.Project}.
* It is bidirectional and its opposite is '{@link org.bimserver.models.store.Project#getParent <em>Parent</em>}'.
* <!-- begin-user-doc -->
* <p>
* ... | Returns the value of the 'Sub Projects' reference list. The list contents are of type <code>org.bimserver.models.store.Project</code>. It is bidirectional and its opposite is '<code>org.bimserver.models.store.Project#getParent Parent</code>'. If the meaning of the 'Sub Projects' reference list isn't clear, there really... | getSubProjects | {
"repo_name": "opensourceBIM/BIMserver",
"path": "PluginBase/generated/org/bimserver/models/store/Project.java",
"license": "agpl-3.0",
"size": 25634
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,115,228 |
public boolean checkBoundarySpec(ECBoundarySpec boundarySpec) throws ECSpecValidationException {
// boundaries parameter of ECSpec is null or omitted
if (boundarySpec == null) {
throw logAndCreateECSpecValidationException("The boundaries parameter of ECSpec is null.");
}
// start and stop tiggers
ch... | boolean function(ECBoundarySpec boundarySpec) throws ECSpecValidationException { if (boundarySpec == null) { throw logAndCreateECSpecValidationException(STR); } checkTrigger(boundarySpec.getStartTrigger()); checkTrigger(boundarySpec.getStopTrigger()); checkTimeNotNegative(boundarySpec.getDuration(), STR); checkTimeNotN... | /**
* verifies the boundary spec of an ECSpec.
* @param boundarySpec the boundary spec to verify.
* @throws ECSpecValidationException if the specification does not meet the specification.
* @return true if OK, throws exception otherwise.
*/ | verifies the boundary spec of an ECSpec | checkBoundarySpec | {
"repo_name": "kyle0311/oliot-fc",
"path": "fc-server/src/main/java/org/fosstrak/ale/server/util/ECSpecValidator.java",
"license": "lgpl-2.1",
"size": 18117
} | [
"org.fosstrak.ale.exception.ECSpecValidationException",
"org.fosstrak.ale.xsd.ale.epcglobal.ECBoundarySpec"
] | import org.fosstrak.ale.exception.ECSpecValidationException; import org.fosstrak.ale.xsd.ale.epcglobal.ECBoundarySpec; | import org.fosstrak.ale.exception.*; import org.fosstrak.ale.xsd.ale.epcglobal.*; | [
"org.fosstrak.ale"
] | org.fosstrak.ale; | 1,852,257 |
@ReportableProperty(order = 3, value="IFD entries.")
public List<IFDEntry> getIFDEntries() {
Map<Integer, IFDEntry> sortedEntries = new TreeMap<Integer, IFDEntry>(entries);
List<IFDEntry> sortedList = new ArrayList<IFDEntry>(sortedEntries.values());
return sortedList;
}
| @ReportableProperty(order = 3, value=STR) List<IFDEntry> function() { Map<Integer, IFDEntry> sortedEntries = new TreeMap<Integer, IFDEntry>(entries); List<IFDEntry> sortedList = new ArrayList<IFDEntry>(sortedEntries.values()); return sortedList; } | /**
* Sort the entries in the HashMap and then return only the IFDEntries
* @return List<IFDEntry>
*/ | Sort the entries in the HashMap and then return only the IFDEntries | getIFDEntries | {
"repo_name": "opf-labs/jhove2",
"path": "src/main/java/org/jhove2/module/format/tiff/IFD.java",
"license": "bsd-2-clause",
"size": 10738
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"java.util.TreeMap",
"org.jhove2.annotation.ReportableProperty"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.jhove2.annotation.ReportableProperty; | import java.util.*; import org.jhove2.annotation.*; | [
"java.util",
"org.jhove2.annotation"
] | java.util; org.jhove2.annotation; | 1,075,385 |
public CodeDimension getCode() {
return code;
} | CodeDimension function() { return code; } | /**
* Gets the beginning and end of this code segment.
*
* @return CodeDimension containing startindex and endindex of the String
*/ | Gets the beginning and end of this code segment | getCode | {
"repo_name": "jurkov/j-algo-mod",
"path": "src/org/jalgo/module/hoare/model/VerificationFormula.java",
"license": "gpl-2.0",
"size": 21076
} | [
"org.jalgo.module.hoare.constants.CodeDimension"
] | import org.jalgo.module.hoare.constants.CodeDimension; | import org.jalgo.module.hoare.constants.*; | [
"org.jalgo.module"
] | org.jalgo.module; | 1,708,412 |
void setClassResolver(ClassResolver resolver); | void setClassResolver(ClassResolver resolver); | /**
* Sets the class resolver to be use
*
* @param resolver the resolver
*/ | Sets the class resolver to be use | setClassResolver | {
"repo_name": "borcsokj/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 68766
} | [
"org.apache.camel.spi.ClassResolver"
] | import org.apache.camel.spi.ClassResolver; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,456,478 |
public static Color getColor(String color) {
try {
return getColor(new JSONObject(color));
} catch (JSONException e) {
e.printStackTrace();
return null;
}
} | static Color function(String color) { try { return getColor(new JSONObject(color)); } catch (JSONException e) { e.printStackTrace(); return null; } } | /**
* Get a Color from a JSON string.
*
* @param color The string to decode from.
* @return The color constructed, null if an error occurred.
*/ | Get a Color from a JSON string | getColor | {
"repo_name": "sgdc3/PerWorldInventory",
"path": "src/main/java/com/kill3rtaco/tacoserialization/ColorSerialization.java",
"license": "gpl-3.0",
"size": 4038
} | [
"org.bukkit.Color",
"org.json.JSONException",
"org.json.JSONObject"
] | import org.bukkit.Color; import org.json.JSONException; import org.json.JSONObject; | import org.bukkit.*; import org.json.*; | [
"org.bukkit",
"org.json"
] | org.bukkit; org.json; | 1,223,421 |
void setBase_InstanceSpecification(InstanceSpecification value); | void setBase_InstanceSpecification(InstanceSpecification value); | /**
* Sets the value of the '{@link org.eclipse.papyrus.sysml.blocks.Dimension#getBase_InstanceSpecification <em>Base Instance Specification</em>}'
* reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @param value
* the new value of the '<em>Base Instance Specification</em>' refer... | Sets the value of the '<code>org.eclipse.papyrus.sysml.blocks.Dimension#getBase_InstanceSpecification Base Instance Specification</code>' reference. | setBase_InstanceSpecification | {
"repo_name": "bmaggi/Papyrus-SysML11",
"path": "plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/blocks/Dimension.java",
"license": "epl-1.0",
"size": 2289
} | [
"org.eclipse.uml2.uml.InstanceSpecification"
] | import org.eclipse.uml2.uml.InstanceSpecification; | import org.eclipse.uml2.uml.*; | [
"org.eclipse.uml2"
] | org.eclipse.uml2; | 681,579 |
public long readFixed64() throws IOException
{
return readRawLittleEndian64();
} | long function() throws IOException { return readRawLittleEndian64(); } | /**
* Read a {@code fixed64} field value from the internal buffer.
*/ | Read a fixed64 field value from the internal buffer | readFixed64 | {
"repo_name": "protostuff/protostuff-me",
"path": "src/main/java/io/protostuff/me/ByteArrayInput.java",
"license": "apache-2.0",
"size": 15548
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,272,050 |
@Experimental(Kind.SCHEMAS)
public static <T> Read<T> readAvrosWithBeamSchema(Class<T> clazz) {
if (clazz.equals(GenericRecord.class)) {
throw new IllegalArgumentException("For GenericRecord, please call readAvroGenericRecords");
}
org.apache.avro.Schema avroSchema = ReflectData.get().getSchema(cl... | @Experimental(Kind.SCHEMAS) static <T> Read<T> function(Class<T> clazz) { if (clazz.equals(GenericRecord.class)) { throw new IllegalArgumentException(STR); } org.apache.avro.Schema avroSchema = ReflectData.get().getSchema(clazz); AvroCoder<T> coder = AvroCoder.of(clazz); Schema schema = AvroUtils.getSchema(clazz, null)... | /**
* Returns a {@link PTransform} that continuously reads binary encoded Avro messages of the
* specific type.
*
* <p>Beam will infer a schema for the Avro schema. This allows the output to be used by SQL and
* by the schema-transform library.
*/ | Returns a <code>PTransform</code> that continuously reads binary encoded Avro messages of the specific type. Beam will infer a schema for the Avro schema. This allows the output to be used by SQL and by the schema-transform library | readAvrosWithBeamSchema | {
"repo_name": "lukecwik/incubator-beam",
"path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java",
"license": "apache-2.0",
"size": 47470
} | [
"org.apache.avro.generic.GenericRecord",
"org.apache.avro.reflect.ReflectData",
"org.apache.beam.sdk.annotations.Experimental",
"org.apache.beam.sdk.coders.AvroCoder",
"org.apache.beam.sdk.schemas.Schema",
"org.apache.beam.sdk.schemas.SchemaCoder",
"org.apache.beam.sdk.schemas.utils.AvroUtils",
"org.a... | import org.apache.avro.generic.GenericRecord; import org.apache.avro.reflect.ReflectData; import org.apache.beam.sdk.annotations.Experimental; import org.apache.beam.sdk.coders.AvroCoder; import org.apache.beam.sdk.schemas.Schema; import org.apache.beam.sdk.schemas.SchemaCoder; import org.apache.beam.sdk.schemas.utils.... | import org.apache.avro.generic.*; import org.apache.avro.reflect.*; import org.apache.beam.sdk.annotations.*; import org.apache.beam.sdk.coders.*; import org.apache.beam.sdk.schemas.*; import org.apache.beam.sdk.schemas.utils.*; import org.apache.beam.sdk.values.*; | [
"org.apache.avro",
"org.apache.beam"
] | org.apache.avro; org.apache.beam; | 1,021,743 |
public DefaultErrorHandlerBuilder log(Class<?> log) {
return log(LoggerFactory.getLogger(log));
} | DefaultErrorHandlerBuilder function(Class<?> log) { return log(LoggerFactory.getLogger(log)); } | /**
* Sets the log used for caught exceptions
*
* @param log the log class
* @return the builder
*/ | Sets the log used for caught exceptions | log | {
"repo_name": "nikhilvibhav/camel",
"path": "core/camel-core-model/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java",
"license": "apache-2.0",
"size": 26031
} | [
"org.slf4j.LoggerFactory"
] | import org.slf4j.LoggerFactory; | import org.slf4j.*; | [
"org.slf4j"
] | org.slf4j; | 2,065,638 |
public ArrayList<ChannelStructure> getSnoops(){
dataReady = false;
if(first)
return secondList.getData();
else
return firstList.getData();
} | ArrayList<ChannelStructure> function(){ dataReady = false; if(first) return secondList.getData(); else return firstList.getData(); } | /**
* Returns snoops received as ArrayList<DataStructure>
*
* @return Arraylist of received snoops
*/ | Returns snoops received as ArrayList | getSnoops | {
"repo_name": "ControlSystemStudio/org.csstudio.iter",
"path": "plugins/org.csstudio.iter.utility.caSnooperUi/src/org/csstudio/iter/utility/caSnooperUi/parser/ChannelCollector.java",
"license": "epl-1.0",
"size": 4384
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,126,087 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.