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
public Adapter createModelAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link org.eclipse.xtext.serializer.sequencertest.Model <em>Model</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyw...
Creates a new adapter for an object of class '<code>org.eclipse.xtext.serializer.sequencertest.Model Model</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createModelAdapter
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/serializer/sequencertest/util/SequencertestAdapterFactory.java", "license": "epl-1.0", "size": 39311 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
256,678
protected Object[] getKeys(EventBean[] eventsPerStream) { Object[] keyValues = new Object[propertyGetters.length]; for (int i = 0; i < propertyGetters.length; i++) { int streamNum = keyStreamNums[i]; EventBean theEvent = eventsPerStream[streamNum]; key...
Object[] function(EventBean[] eventsPerStream) { Object[] keyValues = new Object[propertyGetters.length]; for (int i = 0; i < propertyGetters.length; i++) { int streamNum = keyStreamNums[i]; EventBean theEvent = eventsPerStream[streamNum]; keyValues[i] = propertyGetters[i].get(theEvent); } return keyValues; }
/** * Get the index lookup keys. * @param eventsPerStream is the events for each stream * @return key object */
Get the index lookup keys
getKeys
{ "repo_name": "b-cuts/esper", "path": "esper/src/main/java/com/espertech/esper/epl/lookup/SubordIndexedTableLookupStrategyProp.java", "license": "gpl-2.0", "size": 3555 }
[ "com.espertech.esper.client.EventBean" ]
import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.*;
[ "com.espertech.esper" ]
com.espertech.esper;
2,442,784
public static Item findItem(String modId, String name) { return GameData.findItem(modId, name); }
static Item function(String modId, String name) { return GameData.findItem(modId, name); }
/** * Look up a mod item in the global "named item list" * @param modId The modid owning the item * @param name The name of the item itself * @return The item or null if not found */
Look up a mod item in the global "named item list"
findItem
{ "repo_name": "LiamWA11/RandomStuffMod", "path": "Random Stuff By LiamWA11/build/unpacked/src/main/java/cpw/mods/fml/common/registry/GameRegistry.java", "license": "lgpl-3.0", "size": 14404 }
[ "net.minecraft.item.Item" ]
import net.minecraft.item.Item;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
925,942
public InnerHitBuilder addDocValueField(String field) { if (docValueFields == null) { docValueFields = new ArrayList<>(); } docValueFields.add(field); return this; }
InnerHitBuilder function(String field) { if (docValueFields == null) { docValueFields = new ArrayList<>(); } docValueFields.add(field); return this; }
/** * Adds a field to load from the docvalue and return. */
Adds a field to load from the docvalue and return
addDocValueField
{ "repo_name": "qwerty4030/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/query/InnerHitBuilder.java", "license": "apache-2.0", "size": 20485 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,795,982
public Date getCreationTime() { return _creationTime; }
Date function() { return _creationTime; }
/** * Gets the creation instant. * * @return the creation instant, not null */
Gets the creation instant
getCreationTime
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-LiveData/src/main/java/com/opengamma/livedata/server/Subscription.java", "license": "apache-2.0", "size": 9589 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
298,978
public void deleteLocation(ModelLocation location) { SQLiteDatabase db = this.getWritableDatabase(); db.delete( TABLE_LOCATIONS, KEY_ID + " = ?", new String[] {String.valueOf(location.getId())} ); Log.d("deleteLocation", location.toString()); db.close(); }
void function(ModelLocation location) { SQLiteDatabase db = this.getWritableDatabase(); db.delete( TABLE_LOCATIONS, KEY_ID + STR, new String[] {String.valueOf(location.getId())} ); Log.d(STR, location.toString()); db.close(); }
/** * Delete a location from DB. * * @param {LocationModel} location * @api public */
Delete a location from DB
deleteLocation
{ "repo_name": "yoshuawuyts/whereApp", "path": "src/com/yoshuawuyts/whereapp/HelperSQL.java", "license": "mit", "size": 4509 }
[ "android.database.sqlite.SQLiteDatabase", "android.util.Log", "com.yoshuawuyts.whereapp.ModelLocation" ]
import android.database.sqlite.SQLiteDatabase; import android.util.Log; import com.yoshuawuyts.whereapp.ModelLocation;
import android.database.sqlite.*; import android.util.*; import com.yoshuawuyts.whereapp.*;
[ "android.database", "android.util", "com.yoshuawuyts.whereapp" ]
android.database; android.util; com.yoshuawuyts.whereapp;
1,665,290
//TODO: Setup error reporting on this function private void initGame() { this.logger.log(this.logger.DEBUG, "Initializing Game"); new MainMenuScene(); getSceneManager().switchScene("Main Menu"); }
void function() { this.logger.log(this.logger.DEBUG, STR); new MainMenuScene(); getSceneManager().switchScene(STR); }
/** * This is where the game initializes (After setting up rendering) * All code that needs to be run at the beginning and only once should be put here. */
This is where the game initializes (After setting up rendering) All code that needs to be run at the beginning and only once should be put here
initGame
{ "repo_name": "spanishtech/RGGE-snake", "path": "src/me/soxey6/engine/main/Game.java", "license": "gpl-2.0", "size": 11923 }
[ "me.soxey6.game.scenes.MainMenuScene" ]
import me.soxey6.game.scenes.MainMenuScene;
import me.soxey6.game.scenes.*;
[ "me.soxey6.game" ]
me.soxey6.game;
1,551,568
@Test public void testConstructorWhenSubclassIsParameterized() { dao = new JpaDaoImpl<MockEntity, MockEntity, Long>() { // do nothing }; assertEquals(MockEntity.class, dao.entityClass()); }
void function() { dao = new JpaDaoImpl<MockEntity, MockEntity, Long>() { }; assertEquals(MockEntity.class, dao.entityClass()); }
/** * Verifies the bean constructor is able to extract the * {@link java.lang.reflect.ParameterizedType parameterized type} stored on * the subclass. */
Verifies the bean constructor is able to extract the <code>java.lang.reflect.ParameterizedType parameterized type</code> stored on the subclass
testConstructorWhenSubclassIsParameterized
{ "repo_name": "SacredScriptureFoundation/commons", "path": "entity/src/test/java/org/sacredscripturefoundation/commons/entity/dao/JpaDaoImplTest.java", "license": "apache-2.0", "size": 6540 }
[ "org.junit.Assert", "org.sacredscripturefoundation.commons.entity.MockEntity" ]
import org.junit.Assert; import org.sacredscripturefoundation.commons.entity.MockEntity;
import org.junit.*; import org.sacredscripturefoundation.commons.entity.*;
[ "org.junit", "org.sacredscripturefoundation.commons" ]
org.junit; org.sacredscripturefoundation.commons;
1,420,520
public List<Notification> getNotifications(IRepositoryIdProvider repository) throws IOException { return getAll(pageNotifications(repository)); }
List<Notification> function(IRepositoryIdProvider repository) throws IOException { return getAll(pageNotifications(repository)); }
/** * Get notifications for currently authenticated user * * @param repository interface to provide an id for a repository * @return non-null but possibly empty list of notifications * @throws IOException if something went wrong */
Get notifications for currently authenticated user
getNotifications
{ "repo_name": "edyesed/gh4a", "path": "github-api/src/main/java/org/eclipse/egit/github/core/service/NotificationService.java", "license": "apache-2.0", "size": 16939 }
[ "java.io.IOException", "java.util.List", "org.eclipse.egit.github.core.IRepositoryIdProvider", "org.eclipse.egit.github.core.Notification" ]
import java.io.IOException; import java.util.List; import org.eclipse.egit.github.core.IRepositoryIdProvider; import org.eclipse.egit.github.core.Notification;
import java.io.*; import java.util.*; import org.eclipse.egit.github.core.*;
[ "java.io", "java.util", "org.eclipse.egit" ]
java.io; java.util; org.eclipse.egit;
852,705
public void updateRecordMetrics() { for (Optional<Fork> fork : this.forks) { if (fork.isPresent()) { fork.get().updateRecordMetrics(); } } }
void function() { for (Optional<Fork> fork : this.forks) { if (fork.isPresent()) { fork.get().updateRecordMetrics(); } } }
/** * Update record-level metrics. */
Update record-level metrics
updateRecordMetrics
{ "repo_name": "liyinan926/gobblin", "path": "gobblin-runtime/src/main/java/gobblin/runtime/Task.java", "license": "apache-2.0", "size": 19972 }
[ "com.google.common.base.Optional" ]
import com.google.common.base.Optional;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,056,703
public void addExterns(FileList list) { this.externFileLists.add(list); }
void function(FileList list) { this.externFileLists.add(list); }
/** * Sets the externs file. */
Sets the externs file
addExterns
{ "repo_name": "anomaly/closure-compiler", "path": "src/com/google/javascript/jscomp/ant/CompileTask.java", "license": "apache-2.0", "size": 23931 }
[ "org.apache.tools.ant.types.FileList" ]
import org.apache.tools.ant.types.FileList;
import org.apache.tools.ant.types.*;
[ "org.apache.tools" ]
org.apache.tools;
2,107,030
private static boolean isXLargeTablet(Context context) { return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE; }
static boolean function(Context context) { return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE; }
/** * Helper method to determine if the device has an extra-large screen. For * example, 10" tablets are extra-large. */
Helper method to determine if the device has an extra-large screen. For example, 10" tablets are extra-large
isXLargeTablet
{ "repo_name": "sahilshekhawat/Pocket-Hacker-News", "path": "app/src/main/java/io/github/sahilshekhawat/pockethackernews/Activities/SettingsActivity.java", "license": "gpl-3.0", "size": 10561 }
[ "android.content.Context", "android.content.res.Configuration" ]
import android.content.Context; import android.content.res.Configuration;
import android.content.*; import android.content.res.*;
[ "android.content" ]
android.content;
1,378,972
private static void doProppatch(Process process, Store store) throws IOException, ParserConfigurationException { Document document; Element root; Node change; Node remove; Properties changes; Properties properties; ...
static void function(Process process, Store store) throws IOException, ParserConfigurationException { Document document; Element root; Node change; Node remove; Properties changes; Properties properties; Stream stream; String path; String space; String resource; int bits; space = Connector.DEFAULT_XML_NAMESPACE; path =...
/** * Setz die per XML &uuml;bermittelten Eigenschaften f&uuml;r die * entsprechend im Request angegebenen Ressourcen. Im Fehlerfall wird ein * Multistatus als Fehlerbericht erstellt.<br> * Hinweis - die Methode ist derzeit nicht implementiert. * @param process Process * @para...
Setz die per XML &uuml;bermittelten Eigenschaften f&uuml;r die entsprechend im Request angegebenen Ressourcen. Im Fehlerfall wird ein Multistatus als Fehlerbericht erstellt. Hinweis - die Methode ist derzeit nicht implementiert
doProppatch
{ "repo_name": "seanox/webdav", "path": "sources/com/seanox/webdav/Connector.java", "license": "gpl-2.0", "size": 86927 }
[ "com.seanox.module.http.Process", "com.seanox.webdav.storage.Store", "com.seanox.xml.Stream", "java.io.BufferedOutputStream", "java.io.IOException", "javax.xml.parsers.ParserConfigurationException", "org.w3c.dom.Document", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.xml.sax.SAXException" ]
import com.seanox.module.http.Process; import com.seanox.webdav.storage.Store; import com.seanox.xml.Stream; import java.io.BufferedOutputStream; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import or...
import com.seanox.module.http.*; import com.seanox.webdav.storage.*; import com.seanox.xml.*; import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "com.seanox.module", "com.seanox.webdav", "com.seanox.xml", "java.io", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
com.seanox.module; com.seanox.webdav; com.seanox.xml; java.io; javax.xml; org.w3c.dom; org.xml.sax;
1,901,241
public ArrayList<String> loadPosts() { SAVE_FILE = PUSH_POSTS; ArrayList<String> posts = loadIds(); return posts; }
ArrayList<String> function() { SAVE_FILE = PUSH_POSTS; ArrayList<String> posts = loadIds(); return posts; }
/** * Loads a list of question ID's of questions that were made while offline. * * @return A list of strings pertaining to question IDs */
Loads a list of question ID's of questions that were made while offline
loadPosts
{ "repo_name": "CMPUT301F14T03/lotsofcodingkitty", "path": "cmput301t03app/src/ca/ualberta/cs/cmput301t03app/datamanagers/LocalDataManager.java", "license": "apache-2.0", "size": 12464 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
544,943
public void saveIntegrityCheckUpdate(IntegrityCheckAssignment integrityCheckUpdate) throws DAOException;
void function(IntegrityCheckAssignment integrityCheckUpdate) throws DAOException;
/** * Note: This function is not used yet * Save a new integrity check updated object * @param integrityCheckUpdate integrity check updated to be saved * @throws DAOException */
Note: This function is not used yet Save a new integrity check updated object
saveIntegrityCheckUpdate
{ "repo_name": "openmrs/openmrs-module-dataintegrityworkflow", "path": "api/src/main/java/org/openmrs/module/dataintegrityworkflow/DataIntegrityWorkflowService.java", "license": "mpl-2.0", "size": 13605 }
[ "org.openmrs.api.db.DAOException" ]
import org.openmrs.api.db.DAOException;
import org.openmrs.api.db.*;
[ "org.openmrs.api" ]
org.openmrs.api;
1,785,301
private void aggiornaSchermo() { Graphics g = offScreenImage.getGraphics(); g.setColor(this.backgroundColor); g.fillRect(0, 0, getSize().width, getSize().height); g.setColor(Color.black); g.drawRect(0, 0, getSize().width, getSize().height); g.dispose(); this.clear = true; repaint(); }
void function() { Graphics g = offScreenImage.getGraphics(); g.setColor(this.backgroundColor); g.fillRect(0, 0, getSize().width, getSize().height); g.setColor(Color.black); g.drawRect(0, 0, getSize().width, getSize().height); g.dispose(); this.clear = true; repaint(); }
/** * Aggirna il displ;ay */
Aggirna il displ;ay
aggiornaSchermo
{ "repo_name": "marcosperanza/logo", "path": "src/main/java/org/logo/viewer/logo/graphic/frontend/InterfaceDisplay.java", "license": "apache-2.0", "size": 5071 }
[ "java.awt.Color", "java.awt.Graphics" ]
import java.awt.Color; import java.awt.Graphics;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,597,929
public void setParticipantMedicalIdentifierCollection( Collection<ParticipantMedicalIdentifier> participantMedicalIdentifierCollection) { this.participantMedicalIdentifierCollection = participantMedicalIdentifierCollection; } private Collection<ParticipantRecordEntry> participantRecordEntryCollectio...
void function( Collection<ParticipantMedicalIdentifier> participantMedicalIdentifierCollection) { this.participantMedicalIdentifierCollection = participantMedicalIdentifierCollection; } private Collection<ParticipantRecordEntry> participantRecordEntryCollection;
/** * Sets the value of participantMedicalIdentifierCollection attribute **/
Sets the value of participantMedicalIdentifierCollection attribute
setParticipantMedicalIdentifierCollection
{ "repo_name": "NCIP/catissue-core", "path": "software/caTissue/modules/core/src/main/java/edu/wustl/catissuecore/domain/Participant.java", "license": "bsd-3-clause", "size": 10860 }
[ "edu.wustl.catissuecore.domain.deintegration.ParticipantRecordEntry", "java.util.Collection" ]
import edu.wustl.catissuecore.domain.deintegration.ParticipantRecordEntry; import java.util.Collection;
import edu.wustl.catissuecore.domain.deintegration.*; import java.util.*;
[ "edu.wustl.catissuecore", "java.util" ]
edu.wustl.catissuecore; java.util;
757,662
void processMessage(WorldClient worldClient, TEProgressMessage message) { int x = message.getTEX(); int y = message.getTEY(); int z = message.getTEZ(); ITileEntityProgress te = (ITileEntityProgress) worldClient.getTileEntity(new BlockPos(x, y, z)); if (te == null) return; ...
void processMessage(WorldClient worldClient, TEProgressMessage message) { int x = message.getTEX(); int y = message.getTEY(); int z = message.getTEZ(); ITileEntityProgress te = (ITileEntityProgress) worldClient.getTileEntity(new BlockPos(x, y, z)); if (te == null) return; te.setProgress(message.getProgress()); }
/** * Process the message * * @param worldClient The world to process the message with * @param message The message */
Process the message
processMessage
{ "repo_name": "JasonILTG/Minecraft-Modding", "path": "src/main/java/com/JasonILTG/ScienceMod/messages/TEProgressMessageHandler.java", "license": "lgpl-2.1", "size": 1645 }
[ "net.minecraft.client.multiplayer.WorldClient", "net.minecraft.util.BlockPos" ]
import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.util.BlockPos;
import net.minecraft.client.multiplayer.*; import net.minecraft.util.*;
[ "net.minecraft.client", "net.minecraft.util" ]
net.minecraft.client; net.minecraft.util;
2,143,010
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(SubprogramBody.class)) { case DeclarationPackage.SUBPROGRAM_BODY__DECLARATION: case DeclarationPackage.SUBPROGRAM_BODY__STATEMENT: fireNotifyChanged(new ViewerNotification(...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(SubprogramBody.class)) { case DeclarationPackage.SUBPROGRAM_BODY__DECLARATION: case DeclarationPackage.SUBPROGRAM_BODY__STATEMENT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),...
/** * 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": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl.edit/src-gen/net/mlanoe/language/vhdl/declaration/provider/SubprogramBodyItemProvider.java", "license": "gpl-3.0", "size": 14105 }
[ "net.mlanoe.language.vhdl.declaration.DeclarationPackage", "net.mlanoe.language.vhdl.declaration.SubprogramBody", "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import net.mlanoe.language.vhdl.declaration.DeclarationPackage; import net.mlanoe.language.vhdl.declaration.SubprogramBody; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import net.mlanoe.language.vhdl.declaration.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "net.mlanoe.language", "org.eclipse.emf" ]
net.mlanoe.language; org.eclipse.emf;
2,301,528
@Override public long getLength() throws OperatorException { // There is no easier way to receive the length, as the underlying BlobEntry only supports // an InputStream return getFile().length(); }
long function() throws OperatorException { return getFile().length(); }
/** * Firstly, this method calls {@link #getFile()}. As the file usually exists in the repository, * it is simply accessed. If it does not exist, a temporary file is created. Secondly, the * length of the file is returned. */
Firstly, this method calls <code>#getFile()</code>. As the file usually exists in the repository, it is simply accessed. If it does not exist, a temporary file is created. Secondly, the length of the file is returned
getLength
{ "repo_name": "aborg0/rapidminer-studio", "path": "src/main/java/com/rapidminer/operator/nio/file/RepositoryBlobObject.java", "license": "agpl-3.0", "size": 4376 }
[ "com.rapidminer.operator.OperatorException" ]
import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.*;
[ "com.rapidminer.operator" ]
com.rapidminer.operator;
1,808,318
protected void setRegexPropagationList(Context context) { // ENTESB-6525: Ensure thread safe access to this list if(_includeRegexes!=null) { return; } else { _includeRegexes = new ArrayList<Pattern>(); if (!_prefixPropagationSet) { if (context...
void function(Context context) { if(_includeRegexes!=null) { return; } else { _includeRegexes = new ArrayList<Pattern>(); if (!_prefixPropagationSet) { if (context.getProperty(SERVICE_REFERENCE_PROPERTY) != null) { ServiceDomain domain = ((ServiceReference)context.getProperty(SERVICE_REFERENCE_PROPERTY).getValue()).get...
/** * Set the list of regexes of properties that need to be propagated. * * @param context context */
Set the list of regexes of properties that need to be propagated
setRegexPropagationList
{ "repo_name": "bfitzpat/switchyard", "path": "components/common/common/src/main/java/org/switchyard/component/common/composer/BaseRegexContextMapper.java", "license": "apache-2.0", "size": 6653 }
[ "java.util.ArrayList", "java.util.regex.Pattern", "org.switchyard.Context", "org.switchyard.ServiceDomain", "org.switchyard.ServiceReference", "org.switchyard.common.property.PropertyConstants" ]
import java.util.ArrayList; import java.util.regex.Pattern; import org.switchyard.Context; import org.switchyard.ServiceDomain; import org.switchyard.ServiceReference; import org.switchyard.common.property.PropertyConstants;
import java.util.*; import java.util.regex.*; import org.switchyard.*; import org.switchyard.common.property.*;
[ "java.util", "org.switchyard", "org.switchyard.common" ]
java.util; org.switchyard; org.switchyard.common;
1,835,745
private void setDisplay() { StringBuffer display = new StringBuffer(); if (serNoField != null && serNoField.getValue().toString().length() > 0) display.append(serNoField.getValue().toString() + "-"); if (lotField != null && lotField.getValue().toString().length() > 0) display.append(lotField.getVa...
void function() { StringBuffer display = new StringBuffer(); if (serNoField != null && serNoField.getValue().toString().length() > 0) display.append(serNoField.getValue().toString() + "-"); if (lotField != null && lotField.getValue().toString().length() > 0) display.append(lotField.getValue().toString() + "-"); if (lot...
/** * Set the display text */
Set the display text
setDisplay
{ "repo_name": "erpcya/adempierePOS", "path": "zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java", "license": "gpl-2.0", "size": 26087 }
[ "org.adempiere.webui.component.Listbox", "org.adempiere.webui.component.NumberBox", "org.zkoss.zk.ui.Component", "org.zkoss.zul.Textbox" ]
import org.adempiere.webui.component.Listbox; import org.adempiere.webui.component.NumberBox; import org.zkoss.zk.ui.Component; import org.zkoss.zul.Textbox;
import org.adempiere.webui.component.*; import org.zkoss.zk.ui.*; import org.zkoss.zul.*;
[ "org.adempiere.webui", "org.zkoss.zk", "org.zkoss.zul" ]
org.adempiere.webui; org.zkoss.zk; org.zkoss.zul;
2,195,576
public T fromIterableInternal(Iterable<WindowedValue<?>> contents);
T function(Iterable<WindowedValue<?>> contents);
/** * For internal use only. */
For internal use only
fromIterableInternal
{ "repo_name": "chamikaramj/MyDataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/values/PCollectionView.java", "license": "apache-2.0", "size": 1724 }
[ "com.google.cloud.dataflow.sdk.util.WindowedValue" ]
import com.google.cloud.dataflow.sdk.util.WindowedValue;
import com.google.cloud.dataflow.sdk.util.*;
[ "com.google.cloud" ]
com.google.cloud;
2,118,539
public void testIntegration3() { boolean res; int originalAppIdValue = mAppIdValue; int originalContentTypeValue = mContentTypeValue; String originalAppIdName = mAppIdName; String originalContentTypeName = mContentTypeName; String originalClassName = mClassName; ...
void function() { boolean res; int originalAppIdValue = mAppIdValue; int originalContentTypeValue = mContentTypeValue; String originalAppIdName = mAppIdName; String originalContentTypeName = mContentTypeName; String originalClassName = mClassName; byte[] originalMessageBody = mMessageBody; Random rd = new Random(); IWa...
/** * Integration test 3, iterate OmaApplication ID, random binary content type */
Integration test 3, iterate OmaApplication ID, random binary content type
testIntegration3
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/base/packages/WAPPushManager/tests/src/com/android/smspush/unitTests/WapPushTest.java", "license": "gpl-2.0", "size": 92181 }
[ "android.os.RemoteException", "android.util.Log", "com.android.internal.telephony.IWapPushManager", "com.android.internal.telephony.WapPushManagerParams", "com.android.internal.telephony.WspTypeDecoder", "java.util.Random" ]
import android.os.RemoteException; import android.util.Log; import com.android.internal.telephony.IWapPushManager; import com.android.internal.telephony.WapPushManagerParams; import com.android.internal.telephony.WspTypeDecoder; import java.util.Random;
import android.os.*; import android.util.*; import com.android.internal.telephony.*; import java.util.*;
[ "android.os", "android.util", "com.android.internal", "java.util" ]
android.os; android.util; com.android.internal; java.util;
152,424
private void parseAcceptLanguage(String value) { // Store the accumulated languages that have been requested in // a local collection, sorted by the quality value (so we can // add Locales in descending order). The values will be ArrayLists // containing the corresponding Locales to be added Tre...
void function(String value) { TreeMap locales = new TreeMap(); int white = value.indexOf(' '); if (white < 0) white = value.indexOf('\t'); if (white >= 0) { StringBuffer sb = new StringBuffer(); int len = value.length(); for (int i = 0; i < len; i++) { char ch = value.charAt(i); if ((ch != ' ') && (ch != '\t')) sb.appe...
/** * Parse the value of an <code>Accept-Language</code> header, and add * the corresponding Locales to the current request. * * @param value The value of the <code>Accept-Language</code> header. */
Parse the value of an <code>Accept-Language</code> header, and add the corresponding Locales to the current request
parseAcceptLanguage
{ "repo_name": "NorthFacing/step-by-Java", "path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/connector/http/HttpProcessor.java", "license": "gpl-2.0", "size": 33427 }
[ "java.util.TreeMap" ]
import java.util.TreeMap;
import java.util.*;
[ "java.util" ]
java.util;
1,633,490
public ValidationResult isGlusterSupportedInDC() { if (!storagePool.isLocal() && !Config.<Boolean> getValue(ConfigValues.GlusterFsStorageEnabled, storagePool.getCompatibilityVersion().toString())) { return new ValidationResult(EngineMessage.DATA_CENTER_GLU...
ValidationResult function() { if (!storagePool.isLocal() && !Config.<Boolean> getValue(ConfigValues.GlusterFsStorageEnabled, storagePool.getCompatibilityVersion().toString())) { return new ValidationResult(EngineMessage.DATA_CENTER_GLUSTER_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION); } return ValidationResult.VALID; }
/** * Checks that the DC compatibility version supports Gluster domains. * In case there is mismatch, a proper canDoAction message will be added * * @return true if the version matches */
Checks that the DC compatibility version supports Gluster domains. In case there is mismatch, a proper canDoAction message will be added
isGlusterSupportedInDC
{ "repo_name": "jtux270/translate", "path": "ovirt/3.6_source/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StorageDomainToPoolRelationValidator.java", "license": "gpl-3.0", "size": 8952 }
[ "org.ovirt.engine.core.bll.ValidationResult", "org.ovirt.engine.core.common.config.Config", "org.ovirt.engine.core.common.config.ConfigValues", "org.ovirt.engine.core.common.errors.EngineMessage" ]
import org.ovirt.engine.core.bll.ValidationResult; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.common.errors.EngineMessage;
import org.ovirt.engine.core.bll.*; import org.ovirt.engine.core.common.config.*; import org.ovirt.engine.core.common.errors.*;
[ "org.ovirt.engine" ]
org.ovirt.engine;
612,262
private int getDecimalCount(double value) { String strValue = BigDecimal.valueOf(Math.abs(value)).toPlainString(); int integerPlaces = strValue.indexOf('.'); int decimalPlaces = 0; if (-1 != integerPlaces) { decimalPlaces = strValue.length() - integerPlaces - 1; } return decimalPlaces; ...
int function(double value) { String strValue = BigDecimal.valueOf(Math.abs(value)).toPlainString(); int integerPlaces = strValue.indexOf('.'); int decimalPlaces = 0; if (-1 != integerPlaces) { decimalPlaces = strValue.length() - integerPlaces - 1; } return decimalPlaces; }
/** * return no of digit after decimal */
return no of digit after decimal
getDecimalCount
{ "repo_name": "ksimar/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PageStatistics.java", "license": "apache-2.0", "size": 4122 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
75,141
@Nullable default LineSeparator getLineSeparator() { return null; }
default LineSeparator getLineSeparator() { return null; }
/** * Provides a way to open given text place in editor */
Provides a way to open given text place in editor
getNavigatable
{ "repo_name": "vvv1559/intellij-community", "path": "platform/diff-api/src/com/intellij/diff/contents/DocumentContent.java", "license": "apache-2.0", "size": 2225 }
[ "com.intellij.util.LineSeparator" ]
import com.intellij.util.LineSeparator;
import com.intellij.util.*;
[ "com.intellij.util" ]
com.intellij.util;
646,370
private void handleBlockComment(Comment comment) { String value = comment.getValue(); if (value.indexOf("/* @") != -1 || value.indexOf("\n * @") != -1) { errorReporter.warning( SUSPICIOUS_COMMENT_WARNING, sourceName, comment.getLineno(), "", 0); } }
void function(Comment comment) { String value = comment.getValue(); if (value.indexOf(STR) != -1 value.indexOf(STR) != -1) { errorReporter.warning( SUSPICIOUS_COMMENT_WARNING, sourceName, comment.getLineno(), "", 0); } }
/** * Check to see if the given block comment looks like it should be JSDoc. */
Check to see if the given block comment looks like it should be JSDoc
handleBlockComment
{ "repo_name": "leapingbrainlabs/closure-compiler", "path": "src/com/google/javascript/jscomp/parsing/IRFactory.java", "license": "apache-2.0", "size": 52828 }
[ "com.google.javascript.rhino.head.ast.Comment" ]
import com.google.javascript.rhino.head.ast.Comment;
import com.google.javascript.rhino.head.ast.*;
[ "com.google.javascript" ]
com.google.javascript;
942,951
Attribute fillAttribute(PerunSession sess, UserExtSource ues, Attribute attribute) throws InternalErrorException, WrongAttributeAssignmentException;
Attribute fillAttribute(PerunSession sess, UserExtSource ues, Attribute attribute) throws InternalErrorException, WrongAttributeAssignmentException;
/** * This method tries to fill value of the user external source attribute. This value is automatically generated, but not all attributes can be filled this way * @param sess * @param ues * @param attribute attribute to fill. If attributes already have set value, this value won't be overwritten. This means the...
This method tries to fill value of the user external source attribute. This value is automatically generated, but not all attributes can be filled this way
fillAttribute
{ "repo_name": "jirmauritz/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java", "license": "bsd-2-clause", "size": 193360 }
[ "cz.metacentrum.perun.core.api.Attribute", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.UserExtSource", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException" ]
import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.UserExtSource; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
1,296,594
public static void testMavenRepo1() throws Exception { Maven maven = new Maven(null); MavenRemoteRepository mr = new MavenRemoteRepository(); mr.setMaven(maven); MavenEntry me = maven.getEntry("org.apache.commons", "com.springsource.org.apache.commons.beanutils", "1.6.1"); me.remove(); me = maven.getEn...
static void function() throws Exception { Maven maven = new Maven(null); MavenRemoteRepository mr = new MavenRemoteRepository(); mr.setMaven(maven); MavenEntry me = maven.getEntry(STR, STR, "1.6.1"); me.remove(); me = maven.getEntry(STR, STR, "2.1.1"); me.remove(); me = maven.getEntry(STR, STR, "1.0.4"); me.remove(); m...
/** * Test the maven remote repository */
Test the maven remote repository
testMavenRepo1
{ "repo_name": "magnet/bnd", "path": "biz.aQute.bndlib.tests/src/test/MavenTest.java", "license": "apache-2.0", "size": 15937 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,285,960
com.google.gwt.user.client.Event.sinkEvents(RootPanel.getBodyElement(), com.google.gwt.user.client.Event.ONCONTEXTMENU);
com.google.gwt.user.client.Event.sinkEvents(RootPanel.getBodyElement(), com.google.gwt.user.client.Event.ONCONTEXTMENU);
/** * Add a handler to block browser content menu. */
Add a handler to block browser content menu
blockBrowserMenu
{ "repo_name": "codenvy/che-core", "path": "ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/menu/ContextMenu.java", "license": "epl-1.0", "size": 5297 }
[ "com.google.gwt.user.client.ui.RootPanel" ]
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
1,933,052
@NotNull PsiClass createClassFromText(@NotNull @NonNls String text, PsiElement context) throws IncorrectOperationException;
PsiClass createClassFromText(@NotNull @NonNls String text, PsiElement context) throws IncorrectOperationException;
/** * Creates a Java class from the specified text. * * @param text the text of the class to create. * @param context the PSI element used as context for resolving references which cannot be resolved * within the class. * @return the created class instance. * @throws com.intellij....
Creates a Java class from the specified text
createClassFromText
{ "repo_name": "jexp/idea2", "path": "java/openapi/src/com/intellij/psi/PsiJavaParserFacade.java", "license": "apache-2.0", "size": 9079 }
[ "com.intellij.util.IncorrectOperationException", "org.jetbrains.annotations.NonNls", "org.jetbrains.annotations.NotNull" ]
import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull;
import com.intellij.util.*; import org.jetbrains.annotations.*;
[ "com.intellij.util", "org.jetbrains.annotations" ]
com.intellij.util; org.jetbrains.annotations;
2,566,842
public StatusBar getStatusbar() { return statusbar; }
StatusBar function() { return statusbar; }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getStatusbar
{ "repo_name": "cismet/belis-client", "path": "src/main/java/de/cismet/belis/broker/BelisBroker.java", "license": "gpl-3.0", "size": 138018 }
[ "de.cismet.cismap.commons.gui.statusbar.StatusBar" ]
import de.cismet.cismap.commons.gui.statusbar.StatusBar;
import de.cismet.cismap.commons.gui.statusbar.*;
[ "de.cismet.cismap" ]
de.cismet.cismap;
69,614
@WebMethod @WebResult(name = "rval", targetNamespace = "https://adwords.google.com/api/adwords/video/v201402") @RequestWrapper(localName = "mutateCallToAction", targetNamespace = "https://adwords.google.com/api/adwords/video/v201402", className = "com.google.api.ads.adwords.jaxws.v201402.video.VideoServiceI...
@WebResult(name = "rval", targetNamespace = STRmutateCallToActionSTRhttps: @ResponseWrapper(localName = "mutateCallToActionResponseSTRhttps: VideoReturnValue function( @WebParam(name = "operationsSTRhttps: List<VideoCallToActionOperation> operations) throws ApiException ;
/** * * Updates existing call-to-action overlays. * * * @param operations * @return * returns com.google.api.ads.adwords.jaxws.v201402.video.VideoReturnValue * @throws ApiException */
Updates existing call-to-action overlays
mutateCallToAction
{ "repo_name": "nafae/developer", "path": "modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201402/video/VideoServiceInterface.java", "license": "apache-2.0", "size": 4666 }
[ "java.util.List", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.ResponseWrapper" ]
import java.util.List; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper;
import java.util.*; import javax.jws.*; import javax.xml.ws.*;
[ "java.util", "javax.jws", "javax.xml" ]
java.util; javax.jws; javax.xml;
2,702,376
public T callWithoutRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException { // The code of this method should be shared with withRetries. this.globalStartTime = EnvironmentEdgeManager.currentTime(); try { callable.prepare(false); return callable.call(cal...
T function(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException { this.globalStartTime = EnvironmentEdgeManager.currentTime(); try { callable.prepare(false); return callable.call(callTimeout); } catch (Throwable t) { Throwable t2 = translateException(t); ExceptionUtil.rethrowIfInterrupt(t...
/** * Call the server once only. * {@link RetryingCallable} has a strange shape so we can do retrys. Use this invocation if you * want to do a single call only (A call to {@link RetryingCallable#call(int)} will not likely * succeed). * @return an object of type T * @throws IOException if a remote or ...
Call the server once only. <code>RetryingCallable</code> has a strange shape so we can do retrys. Use this invocation if you want to do a single call only (A call to <code>RetryingCallable#call(int)</code> will not likely succeed)
callWithoutRetries
{ "repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/RpcRetryingCaller.java", "license": "apache-2.0", "size": 9850 }
[ "java.io.IOException", "org.apache.hadoop.hbase.util.EnvironmentEdgeManager", "org.apache.hadoop.hbase.util.ExceptionUtil" ]
import java.io.IOException; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; import org.apache.hadoop.hbase.util.ExceptionUtil;
import java.io.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,509,848
private boolean processEvent(UpdatableProcessInstance instance, String stepId, State state) throws WorkflowException { // Get the process instance and process model associated to this event event.getProcessModel(); WorkflowHub.getProcessInstanceManager(); UpdatableHistoryStep step = (UpdatableH...
boolean function(UpdatableProcessInstance instance, String stepId, State state) throws WorkflowException { event.getProcessModel(); WorkflowHub.getProcessInstanceManager(); UpdatableHistoryStep step = (UpdatableHistoryStep) instance.getHistoryStep(stepId); instance.updateHistoryStep(step); if (event.getDataRecord() != ...
/** * Method declaration */
Method declaration
processEvent
{ "repo_name": "ebonnet/Silverpeas-Core", "path": "core-services/workflow/src/main/java/org/silverpeas/core/workflow/engine/WorkflowEngineThread.java", "license": "agpl-3.0", "size": 39455 }
[ "org.silverpeas.core.workflow.api.WorkflowException", "org.silverpeas.core.workflow.api.event.QuestionEvent", "org.silverpeas.core.workflow.api.event.TaskSavedEvent", "org.silverpeas.core.workflow.api.instance.UpdatableHistoryStep", "org.silverpeas.core.workflow.api.instance.UpdatableProcessInstance", "or...
import org.silverpeas.core.workflow.api.WorkflowException; import org.silverpeas.core.workflow.api.event.QuestionEvent; import org.silverpeas.core.workflow.api.event.TaskSavedEvent; import org.silverpeas.core.workflow.api.instance.UpdatableHistoryStep; import org.silverpeas.core.workflow.api.instance.UpdatableProcessIn...
import org.silverpeas.core.workflow.api.*; import org.silverpeas.core.workflow.api.event.*; import org.silverpeas.core.workflow.api.instance.*; import org.silverpeas.core.workflow.api.model.*; import org.silverpeas.core.workflow.engine.model.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
1,298,476
protected PduResponse sendRequestAndGetResponse(PduRequest requestPdu, long timeoutInMillis) throws RecoverablePduException, UnrecoverablePduException, SmppTimeoutException, SmppChannelException, InterruptedException { WindowFuture<Integer,PduRequest,PduResponse> future = sendRequestPdu(requestPdu, timeoutI...
PduResponse function(PduRequest requestPdu, long timeoutInMillis) throws RecoverablePduException, UnrecoverablePduException, SmppTimeoutException, SmppChannelException, InterruptedException { WindowFuture<Integer,PduRequest,PduResponse> future = sendRequestPdu(requestPdu, timeoutInMillis, true); boolean completedWithin...
/** * Sends a PDU request and gets a PDU response that matches its sequence #. * NOTE: This PDU response may not be the actual response the caller was * expecting, it needs to verify it afterwards. */
Sends a PDU request and gets a PDU response that matches its sequence #. expecting, it needs to verify it afterwards
sendRequestAndGetResponse
{ "repo_name": "andreasschmidtjensen/cloudhopper-smpp", "path": "src/main/java/com/cloudhopper/smpp/impl/DefaultSmppSession.java", "license": "apache-2.0", "size": 43511 }
[ "com.cloudhopper.commons.util.windowing.WindowFuture", "com.cloudhopper.smpp.pdu.PduRequest", "com.cloudhopper.smpp.pdu.PduResponse", "com.cloudhopper.smpp.type.RecoverablePduException", "com.cloudhopper.smpp.type.SmppChannelException", "com.cloudhopper.smpp.type.SmppTimeoutException", "com.cloudhopper....
import com.cloudhopper.commons.util.windowing.WindowFuture; import com.cloudhopper.smpp.pdu.PduRequest; import com.cloudhopper.smpp.pdu.PduResponse; import com.cloudhopper.smpp.type.RecoverablePduException; import com.cloudhopper.smpp.type.SmppChannelException; import com.cloudhopper.smpp.type.SmppTimeoutException; imp...
import com.cloudhopper.commons.util.windowing.*; import com.cloudhopper.smpp.pdu.*; import com.cloudhopper.smpp.type.*; import java.nio.channels.*;
[ "com.cloudhopper.commons", "com.cloudhopper.smpp", "java.nio" ]
com.cloudhopper.commons; com.cloudhopper.smpp; java.nio;
2,025,327
private void updateSearchIndex(BlogEntry blogEntry) { blogEntry.getBlog().getSearchIndex().index(blogEntry); }
void function(BlogEntry blogEntry) { blogEntry.getBlog().getSearchIndex().index(blogEntry); }
/** * Updates the search index to reflect the new/changed/removed blog entry. */
Updates the search index to reflect the new/changed/removed blog entry
updateSearchIndex
{ "repo_name": "arshadalisoomro/pebble", "path": "src/main/java/net/sourceforge/pebble/index/SearchIndexListener.java", "license": "bsd-3-clause", "size": 3601 }
[ "net.sourceforge.pebble.domain.BlogEntry" ]
import net.sourceforge.pebble.domain.BlogEntry;
import net.sourceforge.pebble.domain.*;
[ "net.sourceforge.pebble" ]
net.sourceforge.pebble;
443,090
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); Constraint.verify(principals); }
void function(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); Constraint.verify(principals); }
/** * Verifies that there is at least one principal, that none of the * principals is <code>null</code>, and that there are no duplicates. * * @throws java.io.InvalidObjectException if there are no principals, * or any principal is <code>null</code>, or if there are duplicate * principals ...
Verifies that there is at least one principal, that none of the principals is <code>null</code>, and that there are no duplicates
readObject
{ "repo_name": "trasukg/river-qa-2.2", "path": "src/net/jini/core/constraint/ClientMinPrincipal.java", "license": "apache-2.0", "size": 6264 }
[ "java.io.IOException", "java.io.ObjectInputStream" ]
import java.io.IOException; import java.io.ObjectInputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,547,201
Dimension getPreferredSize(int rows, int columns);
Dimension getPreferredSize(int rows, int columns);
/** * Returns the preferred size of a textarea with the specified number of * columns and rows. * * @param rows the number of rows * @param columns the number of columns * * @return the preferred size of a textarea * * @see TextArea#getPreferredSize(int, int) */
Returns the preferred size of a textarea with the specified number of columns and rows
getPreferredSize
{ "repo_name": "stain/jdk8u", "path": "src/share/classes/java/awt/peer/TextAreaPeer.java", "license": "gpl-2.0", "size": 3001 }
[ "java.awt.Dimension" ]
import java.awt.Dimension;
import java.awt.*;
[ "java.awt" ]
java.awt;
303,479
@SimpleFunction(description = "Saves a picture of this Canvas to the device's " + "external storage in the file " + "named fileName. fileName must end with one of .jpg, .jpeg, or .png, " + "which determines the file type.") public String SaveAs(String fileName) { // Figure out desired file format ...
@SimpleFunction(description = STR + STR + STR + STR) String function(String fileName) { Bitmap.CompressFormat format; if (fileName.endsWith(".jpg") fileName.endsWith(".jpeg")) { format = Bitmap.CompressFormat.JPEG; } else if (fileName.endsWith(".png")) { format = Bitmap.CompressFormat.PNG; } else if (!fileName.contains...
/** * Saves a picture of this Canvas to the device's external storage in the file * named fileName. fileName must end with one of ".jpg", ".jpeg", or ".png" * (which determines the file type: JPEG, or PNG). * * @return the full path name of the saved file, or the empty string if the * save fai...
Saves a picture of this Canvas to the device's external storage in the file named fileName. fileName must end with one of ".jpg", ".jpeg", or ".png" (which determines the file type: JPEG, or PNG)
SaveAs
{ "repo_name": "shilpamagrawal15/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Canvas.java", "license": "mit", "size": 50230 }
[ "android.graphics.Bitmap", "com.google.appinventor.components.annotations.SimpleFunction", "com.google.appinventor.components.runtime.util.ErrorMessages", "com.google.appinventor.components.runtime.util.FileUtil", "java.io.File", "java.io.IOException" ]
import android.graphics.Bitmap; import com.google.appinventor.components.annotations.SimpleFunction; import com.google.appinventor.components.runtime.util.ErrorMessages; import com.google.appinventor.components.runtime.util.FileUtil; import java.io.File; import java.io.IOException;
import android.graphics.*; import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*; import java.io.*;
[ "android.graphics", "com.google.appinventor", "java.io" ]
android.graphics; com.google.appinventor; java.io;
1,801,794
private ResultCollector executeOnMultipleNodes(final Function function, final PartitionedRegionFunctionExecutor execution, ResultCollector rc, boolean isPRSingleHop, boolean isBucketSetAsFilter) { final Set routingKeys = execution.getFilter(); final boolean primaryMembersNeeded = function.optimize...
ResultCollector function(final Function function, final PartitionedRegionFunctionExecutor execution, ResultCollector rc, boolean isPRSingleHop, boolean isBucketSetAsFilter) { final Set routingKeys = execution.getFilter(); final boolean primaryMembersNeeded = function.optimizeForWrite(); final boolean hasRoutingObjects ...
/** * Executes function on multiple nodes * * @param function * @param execution */
Executes function on multiple nodes
executeOnMultipleNodes
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java", "license": "apache-2.0", "size": 403335 }
[ "com.gemstone.gemfire.cache.execute.Function", "com.gemstone.gemfire.cache.execute.FunctionException", "com.gemstone.gemfire.cache.execute.ResultCollector", "com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember", "com.gemstone.gemfire.internal.cache.BucketAdvisor", "com.gemstone....
import com.gemstone.gemfire.cache.execute.Function; import com.gemstone.gemfire.cache.execute.FunctionException; import com.gemstone.gemfire.cache.execute.ResultCollector; import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; import com.gemstone.gemfire.internal.cache.BucketAdvisor; imp...
import com.gemstone.gemfire.cache.execute.*; import com.gemstone.gemfire.distributed.internal.membership.*; import com.gemstone.gemfire.internal.cache.*; import com.gemstone.gemfire.internal.cache.execute.*; import com.gemstone.gemfire.internal.i18n.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
172,097
private void unpackMiniBlock() throws IOException { Arrays.fill(this.unpackedValuesBuffer, 0); BytePackerForLong packer = Packer.LITTLE_ENDIAN.newBytePackerForLong( bitWidths[currentMiniBlock]); for (int j = 0; j < miniBlockSizeInValues; j += 8) { ByteBuffer buffer = in.slice(packer.getBitWi...
void function() throws IOException { Arrays.fill(this.unpackedValuesBuffer, 0); BytePackerForLong packer = Packer.LITTLE_ENDIAN.newBytePackerForLong( bitWidths[currentMiniBlock]); for (int j = 0; j < miniBlockSizeInValues; j += 8) { ByteBuffer buffer = in.slice(packer.getBitWidth()); packer.unpack8Values(buffer, buffer...
/** * mini block has a size of 8*n, unpack 32 value each time * * see org.apache.parquet.column.values.delta.DeltaBinaryPackingValuesReader#unpackMiniBlock */
mini block has a size of 8*n, unpack 32 value each time see org.apache.parquet.column.values.delta.DeltaBinaryPackingValuesReader#unpackMiniBlock
unpackMiniBlock
{ "repo_name": "shaneknapp/spark", "path": "sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedDeltaBinaryPackedReader.java", "license": "apache-2.0", "size": 10874 }
[ "java.io.IOException", "java.nio.ByteBuffer", "java.util.Arrays", "org.apache.parquet.column.values.bitpacking.BytePackerForLong", "org.apache.parquet.column.values.bitpacking.Packer" ]
import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays; import org.apache.parquet.column.values.bitpacking.BytePackerForLong; import org.apache.parquet.column.values.bitpacking.Packer;
import java.io.*; import java.nio.*; import java.util.*; import org.apache.parquet.column.values.bitpacking.*;
[ "java.io", "java.nio", "java.util", "org.apache.parquet" ]
java.io; java.nio; java.util; org.apache.parquet;
1,944,209
public Match getMatch() { return match; }
Match function() { return match; }
/** * Get the match the players are in */
Get the match the players are in
getMatch
{ "repo_name": "redwallhp/AthenaGM", "path": "src/main/java/io/github/redwallhp/athenagm/events/PlayerDamagePlayerEvent.java", "license": "lgpl-3.0", "size": 2997 }
[ "io.github.redwallhp.athenagm.matches.Match" ]
import io.github.redwallhp.athenagm.matches.Match;
import io.github.redwallhp.athenagm.matches.*;
[ "io.github.redwallhp" ]
io.github.redwallhp;
1,706,537
@Override public void addListener(String key, String group, ConfigurationListener listener) { cacheListener.addListener(getPathKey(group, key), listener); }
void function(String key, String group, ConfigurationListener listener) { cacheListener.addListener(getPathKey(group, key), listener); }
/** * For service governance, multi group is not supported by this implementation. So group is not used at present. */
For service governance, multi group is not supported by this implementation. So group is not used at present
addListener
{ "repo_name": "qtvbwfn/dubbo", "path": "dubbo-configcenter/dubbo-configcenter-zookeeper/src/main/java/org/apache/dubbo/configcenter/support/zookeeper/ZookeeperDynamicConfiguration.java", "license": "apache-2.0", "size": 5450 }
[ "org.apache.dubbo.common.config.configcenter.ConfigurationListener" ]
import org.apache.dubbo.common.config.configcenter.ConfigurationListener;
import org.apache.dubbo.common.config.configcenter.*;
[ "org.apache.dubbo" ]
org.apache.dubbo;
557,734
public Date getDateNextProc() { return dateNextProc; }
Date function() { return dateNextProc; }
/** * Get the date of the next processing. * * @return the date of the next processing. */
Get the date of the next processing
getDateNextProc
{ "repo_name": "EaW1805/data", "path": "src/main/java/com/eaw1805/data/model/Game.java", "license": "mit", "size": 29318 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,747,685
private void addBagValuesFromIds(Collection<Integer> ids) { if (profileId != null) { List<BagValue> values = getContentsFromOsb(ids); addBagValues(values); } }
void function(Collection<Integer> ids) { if (profileId != null) { List<BagValue> values = getContentsFromOsb(ids); addBagValues(values); } }
/** * Save the key field values identified by the ids given in input into bagvalues table */
Save the key field values identified by the ids given in input into bagvalues table
addBagValuesFromIds
{ "repo_name": "elsiklab/intermine", "path": "intermine/api/main/src/org/intermine/api/profile/InterMineBag.java", "license": "lgpl-2.1", "size": 32953 }
[ "java.util.Collection", "java.util.List" ]
import java.util.Collection; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
952,633
public RiverState river(String name) { for (RiverState river : rivers) { if (name.equals(river.getName())) { return river; } } return null; } public static class Factory implements MetaData.Custom.Factory<RiverStatesMetaData> {
RiverState function(String name) { for (RiverState river : rivers) { if (name.equals(river.getName())) { return river; } } return null; } public static class Factory implements MetaData.Custom.Factory<RiverStatesMetaData> {
/** * Returns a river state with a given name or null if such river doesn't exist * * @param name name of river * @return river metadata */
Returns a river state with a given name or null if such river doesn't exist
river
{ "repo_name": "szwork2013/elasticsearch-sentiment", "path": "elasticsearch-jdbc/src/main/java/org/xbib/elasticsearch/action/river/jdbc/state/RiverStatesMetaData.java", "license": "apache-2.0", "size": 7251 }
[ "org.elasticsearch.cluster.metadata.MetaData" ]
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.metadata.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
2,185,698
@Test public void shouldCalculateHashes() { List<Statement> statements = createStatementsFromStrings("aaaaaa", "bbbbbb", "cccccc", "dddddd", "eeeeee"); BlockChunker blockChunker = createChunkerWithBlockSize(3); List<Block> blocks = blockChunker.chunk("resource", statements); assertThat(blocks.get(0)...
void function() { List<Statement> statements = createStatementsFromStrings(STR, STR, STR, STR, STR); BlockChunker blockChunker = createChunkerWithBlockSize(3); List<Block> blocks = blockChunker.chunk(STR, statements); assertThat(blocks.get(0).getBlockHash(), equalTo(hash(STR, STR, STR))); assertThat(blocks.get(1).getBl...
/** * Rolling hash must produce exactly the same values as without rolling behavior. * Moreover those values must always be the same (without dependency on JDK). */
Rolling hash must produce exactly the same values as without rolling behavior. Moreover those values must always be the same (without dependency on JDK)
shouldCalculateHashes
{ "repo_name": "SonarSource/sonarqube", "path": "sonar-duplications/src/test/java/org/sonar/duplications/block/BlockChunkerTest.java", "license": "lgpl-3.0", "size": 2496 }
[ "java.util.List", "org.hamcrest.CoreMatchers", "org.junit.Assert", "org.sonar.duplications.statement.Statement" ]
import java.util.List; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.sonar.duplications.statement.Statement;
import java.util.*; import org.hamcrest.*; import org.junit.*; import org.sonar.duplications.statement.*;
[ "java.util", "org.hamcrest", "org.junit", "org.sonar.duplications" ]
java.util; org.hamcrest; org.junit; org.sonar.duplications;
2,494,209
public void testGetFirstMillisecond() { Locale saved = Locale.getDefault(); Locale.setDefault(Locale.UK); TimeZone savedZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone("Europe/London")); Hour h = new Hour(15, 1, 4, 2006); assertEquals(1143900000...
void function() { Locale saved = Locale.getDefault(); Locale.setDefault(Locale.UK); TimeZone savedZone = TimeZone.getDefault(); TimeZone.setDefault(TimeZone.getTimeZone(STR)); Hour h = new Hour(15, 1, 4, 2006); assertEquals(1143900000000L, h.getFirstMillisecond()); Locale.setDefault(saved); TimeZone.setDefault(savedZon...
/** * Some checks for the getFirstMillisecond() method. */
Some checks for the getFirstMillisecond() method
testGetFirstMillisecond
{ "repo_name": "JSansalone/JFreeChart", "path": "tests/org/jfree/data/time/junit/HourTests.java", "license": "lgpl-2.1", "size": 12693 }
[ "java.util.Locale", "java.util.TimeZone", "org.jfree.data.time.Hour" ]
import java.util.Locale; import java.util.TimeZone; import org.jfree.data.time.Hour;
import java.util.*; import org.jfree.data.time.*;
[ "java.util", "org.jfree.data" ]
java.util; org.jfree.data;
708,340
public boolean matches(String resource, String token, String etag) { log.debug("matches: Trying to match token="+token+", etag="+etag); for (IfList il : this) { if (il.match(token, etag)) { log.debug("matches: Found match with " + il); ...
boolean function(String resource, String token, String etag) { log.debug(STR+token+STR+etag); for (IfList il : this) { if (il.match(token, etag)) { log.debug(STR + il); return true; } } return false; } } private static class IfHeaderMap extends HashMap<String, IfHeaderList> implements IfHeaderInterface {
/** * Matches a list of {@link IfList}s against the token and etag. If any of * the {@link IfList}s matches, the method returns <code>true</code>. * On the other hand <code>false</code> is only returned if non of the * {@link IfList}s match. * * @param resource The ...
Matches a list of <code>IfList</code>s against the token and etag. If any of the <code>IfList</code>s matches, the method returns <code>true</code>. On the other hand <code>false</code> is only returned if non of the <code>IfList</code>s match
matches
{ "repo_name": "apache/jackrabbit", "path": "jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/header/IfHeader.java", "license": "apache-2.0", "size": 32247 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,735,585
public void setvLongListObj(List<Long> vLongListObj) { this.vLongListObj = vLongListObj; }
void function(List<Long> vLongListObj) { this.vLongListObj = vLongListObj; }
/** * Setter method for vLongListObj * @param vLongListObj the vLongListObj to set */
Setter method for vLongListObj
setvLongListObj
{ "repo_name": "SpartaTech/sparta-spring-web-utils", "path": "src/test/java/org/sparta/springwebutils/entity/TestEntityLong.java", "license": "apache-2.0", "size": 1855 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
900,914
public List<String> getTrendingHashTags(String sd, String ed){ Date startDate = parseDate(sd); Date endDate = parseDate(ed); List<String> ret = new ArrayList<String>(counts.size()); int numOfDays = getDateDiffInDays(startDate, endDate); int start = ...
List<String> function(String sd, String ed){ Date startDate = parseDate(sd); Date endDate = parseDate(ed); List<String> ret = new ArrayList<String>(counts.size()); int numOfDays = getDateDiffInDays(startDate, endDate); int start = getDateDiffInDays(corpusStartDate, startDate); List<Score> scores = new ArrayList<Score>(...
/** * Method to get top-k trending hashtags * * Note: The date format expected is "yyyy-MM-dd'T'HH:mm:ss'Z'" * * @param sd Start date * @param ed End date * @return */
Method to get top-k trending hashtags
getTrendingHashTags
{ "repo_name": "jaideepcoder/IR_System", "path": "IR_code/HashTagTrends.java", "license": "mit", "size": 8073 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.Date", "java.util.List", "java.util.Set" ]
import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
419,842
public static int executeProcessWithExitCode(String[] params) { try { Process pr = executeProcess(params); BufferedReader reader = new BufferedReader(new InputStreamReader(pr.getInputStream())); String line; while ((line = reader.readLine()) != null) { ...
static int function(String[] params) { try { Process pr = executeProcess(params); BufferedReader reader = new BufferedReader(new InputStreamReader(pr.getInputStream())); String line; while ((line = reader.readLine()) != null) { logger.info(line); } try { pr.waitFor(); } catch (InterruptedException e) { } return pr.exit...
/** * Execute process with exit code. * * @param params the params * @return the int */
Execute process with exit code
executeProcessWithExitCode
{ "repo_name": "biomojo/biomojo", "path": "BioMojoLib/src/main/java/org/biomojo/util/ProcessUtil.java", "license": "gpl-3.0", "size": 3495 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "org.java0.core.exception.UncheckedException" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.java0.core.exception.UncheckedException;
import java.io.*; import org.java0.core.exception.*;
[ "java.io", "org.java0.core" ]
java.io; org.java0.core;
1,211,683
public Status removeStaticFlow(FlowConfig config);
Status function(FlowConfig config);
/** * Remove a flow specified by the {@code FlowConfig} object on the current * container * * @param config * the {@code FlowConfig} object representing the static flow * @return the {@code Status} object indicating the result of this action */
Remove a flow specified by the FlowConfig object on the current container
removeStaticFlow
{ "repo_name": "lbchen/ODL", "path": "opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/IForwardingRulesManager.java", "license": "epl-1.0", "size": 16202 }
[ "org.opendaylight.controller.sal.utils.Status" ]
import org.opendaylight.controller.sal.utils.Status;
import org.opendaylight.controller.sal.utils.*;
[ "org.opendaylight.controller" ]
org.opendaylight.controller;
1,817,306
public ScriptEngine getScriptEngine(final String[] args) { checkConfigPermission(); return new NashornScriptEngine(this, args, getAppClassLoader()); }
ScriptEngine function(final String[] args) { checkConfigPermission(); return new NashornScriptEngine(this, args, getAppClassLoader()); }
/** * Create a new Script engine initialized by given arguments. * * @param args arguments array passed to script engine. * @return newly created script engine. */
Create a new Script engine initialized by given arguments
getScriptEngine
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngineFactory.java", "license": "mit", "size": 7788 }
[ "javax.script.ScriptEngine" ]
import javax.script.ScriptEngine;
import javax.script.*;
[ "javax.script" ]
javax.script;
826,303
public EReference getTender_Card() { return (EReference)getTender().getEStructuralFeatures().get(3); }
EReference function() { return (EReference)getTender().getEStructuralFeatures().get(3); }
/** * Returns the meta object for the reference '{@link CIM15.IEC61968.PaymentMetering.Tender#getCard <em>Card</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Card</em>'. * @see CIM15.IEC61968.PaymentMetering.Tender#getCard() * @see #getTender() *...
Returns the meta object for the reference '<code>CIM15.IEC61968.PaymentMetering.Tender#getCard Card</code>'.
getTender_Card
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61968/PaymentMetering/PaymentMeteringPackage.java", "license": "apache-2.0", "size": 290630 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,148,484
public void setFile(CommonsMultipartFile file) { this.file = file; }
void function(CommonsMultipartFile file) { this.file = file; }
/** * Sets the uploaded file as a CommonsMultipartFile file. * * @param file The CommonsMultipartFile file. */
Sets the uploaded file as a CommonsMultipartFile file
setFile
{ "repo_name": "Unidata/rosetta", "path": "src/main/java/edu/ucar/unidata/rosetta/domain/wizard/UploadedFile.java", "license": "bsd-3-clause", "size": 3366 }
[ "org.springframework.web.multipart.commons.CommonsMultipartFile" ]
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import org.springframework.web.multipart.commons.*;
[ "org.springframework.web" ]
org.springframework.web;
40,439
public void waitNoPendingTasksOnAll() throws Exception { assertNoTimeout(client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).get()); assertBusy(() -> { for (Client client : clients()) { ClusterHealthResponse clusterHealth = client.admin().cluster...
void function() throws Exception { assertNoTimeout(client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).get()); assertBusy(() -> { for (Client client : clients()) { ClusterHealthResponse clusterHealth = client.admin().cluster().prepareHealth().setLocal(true).get(); assertThat(STR + client + STR...
/** * Waits until all nodes have no pending tasks. */
Waits until all nodes have no pending tasks
waitNoPendingTasksOnAll
{ "repo_name": "jimczi/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java", "license": "apache-2.0", "size": 105023 }
[ "org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse", "org.elasticsearch.action.admin.cluster.tasks.PendingClusterTasksResponse", "org.elasticsearch.client.Client", "org.elasticsearch.common.Priority", "org.elasticsearch.test.hamcrest.ElasticsearchAssertions", "org.hamcrest.Matchers" ]
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.cluster.tasks.PendingClusterTasksResponse; import org.elasticsearch.client.Client; import org.elasticsearch.common.Priority; import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; import org.hamcre...
import org.elasticsearch.action.admin.cluster.health.*; import org.elasticsearch.action.admin.cluster.tasks.*; import org.elasticsearch.client.*; import org.elasticsearch.common.*; import org.elasticsearch.test.hamcrest.*; import org.hamcrest.*;
[ "org.elasticsearch.action", "org.elasticsearch.client", "org.elasticsearch.common", "org.elasticsearch.test", "org.hamcrest" ]
org.elasticsearch.action; org.elasticsearch.client; org.elasticsearch.common; org.elasticsearch.test; org.hamcrest;
2,210,370
@Test public void testPushAggregateThroughOuterJoin12() { final HepProgram preProgram = new HepProgramBuilder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .build(); final String sql = "select e.job\n" + "from (select * from sales.emp where ename = 'A') as e\n" + "righ...
@Test void function() { final HepProgram preProgram = new HepProgramBuilder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .build(); final String sql = STR + STR + STR + STR; sql(sql).withPre(preProgram) .withRule(AggregateJoinTransposeRule.EXTENDED) .check(); }
/** Test case for * right outer join, group by on key same as join key, group by on (left)null generating side */
Test case for
testPushAggregateThroughOuterJoin12
{ "repo_name": "xhoong/incubator-calcite", "path": "core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java", "license": "apache-2.0", "size": 255036 }
[ "org.apache.calcite.plan.hep.HepProgram", "org.apache.calcite.plan.hep.HepProgramBuilder", "org.apache.calcite.rel.rules.AggregateJoinTransposeRule", "org.apache.calcite.rel.rules.AggregateProjectMergeRule", "org.junit.Test" ]
import org.apache.calcite.plan.hep.HepProgram; import org.apache.calcite.plan.hep.HepProgramBuilder; import org.apache.calcite.rel.rules.AggregateJoinTransposeRule; import org.apache.calcite.rel.rules.AggregateProjectMergeRule; import org.junit.Test;
import org.apache.calcite.plan.hep.*; import org.apache.calcite.rel.rules.*; import org.junit.*;
[ "org.apache.calcite", "org.junit" ]
org.apache.calcite; org.junit;
2,617,445
public void setConnectionFactory(XAConnectionFactory connectionFactory) { this.connectionFactory = connectionFactory; setClassName(DirectXAConnectionFactory.class.getName()); setDriverProperties(new Properties()); }
void function(XAConnectionFactory connectionFactory) { this.connectionFactory = connectionFactory; setClassName(DirectXAConnectionFactory.class.getName()); setDriverProperties(new Properties()); }
/** * Set the {@link XAConnectionFactory} directly, instead of calling * {@link #setClassName(String)}. * @param connectionFactory the connection factory to use */
Set the <code>XAConnectionFactory</code> directly, instead of calling <code>#setClassName(String)</code>
setConnectionFactory
{ "repo_name": "jbovet/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/jta/bitronix/PoolingConnectionFactoryBean.java", "license": "apache-2.0", "size": 4592 }
[ "java.util.Properties", "javax.jms.XAConnectionFactory" ]
import java.util.Properties; import javax.jms.XAConnectionFactory;
import java.util.*; import javax.jms.*;
[ "java.util", "javax.jms" ]
java.util; javax.jms;
821,281
private void setButtonDefault(JButton button) { button.setRolloverEnabled(false); button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); }
void function(JButton button) { button.setRolloverEnabled(false); button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); }
/** * Removes border and margin for the specified button and sets the default * cursor to {@link Cursor#HAND_CURSOR}. * * @param button The button to set the default for. */
Removes border and margin for the specified button and sets the default cursor to <code>Cursor#HAND_CURSOR</code>
setButtonDefault
{ "repo_name": "dpwrussell/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/login/ScreenLogin.java", "license": "gpl-2.0", "size": 41801 }
[ "java.awt.Cursor", "javax.swing.JButton" ]
import java.awt.Cursor; import javax.swing.JButton;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,334,448
private TimeInstantType createTimeInstantType(TimeInstant timeInstant, TimeInstantType timeInstantType) throws OwsExceptionReport { // create time instant if (timeInstantType == null) { timeInstantType = TimeInstantType.Factory.newInstance(XmlOptionsHelper.getInstance().g...
TimeInstantType function(TimeInstant timeInstant, TimeInstantType timeInstantType) throws OwsExceptionReport { if (timeInstantType == null) { timeInstantType = TimeInstantType.Factory.newInstance(XmlOptionsHelper.getInstance().getXmlOptions()); } if (timeInstant.isSetGmlId()) { timeInstantType.setId(timeInstant.getGmlI...
/** * Creates a XML TimeInstant from the SOS time object. * * @param timeInstant * SOS time object * @param timeInstantType * @param xbTime * @return XML TimeInstant * * * @throws OwsExceptionReport * * if an error occurs. ...
Creates a XML TimeInstant from the SOS time object
createTimeInstantType
{ "repo_name": "geomatico/52n-sos-4.0", "path": "coding/sensorML-v101/src/main/java/org/n52/sos/encode/GmlEncoderv311.java", "license": "gpl-2.0", "size": 26417 }
[ "net.opengis.gml.TimeInstantType", "net.opengis.gml.TimePositionType", "org.joda.time.DateTime", "org.n52.sos.ogc.OGCConstants", "org.n52.sos.ogc.gml.time.TimeInstant", "org.n52.sos.ogc.ows.OwsExceptionReport", "org.n52.sos.util.DateTimeHelper", "org.n52.sos.util.XmlOptionsHelper" ]
import net.opengis.gml.TimeInstantType; import net.opengis.gml.TimePositionType; import org.joda.time.DateTime; import org.n52.sos.ogc.OGCConstants; import org.n52.sos.ogc.gml.time.TimeInstant; import org.n52.sos.ogc.ows.OwsExceptionReport; import org.n52.sos.util.DateTimeHelper; import org.n52.sos.util.XmlOptionsHelpe...
import net.opengis.gml.*; import org.joda.time.*; import org.n52.sos.ogc.*; import org.n52.sos.ogc.gml.time.*; import org.n52.sos.ogc.ows.*; import org.n52.sos.util.*;
[ "net.opengis.gml", "org.joda.time", "org.n52.sos" ]
net.opengis.gml; org.joda.time; org.n52.sos;
2,270,417
@Override public String toString() { return "SBN_NodePortStatus [total_nodes=" + total_nodes + ", total_ports=" + total_ports + ", ports_down=" + ports_down + ", ports_active=" + ports_active + ", ports_disabled=" + ports_disabled + ", ports_1X=" + ports_1X + ", ports_4X=" + ports_4X + ", ports_...
String function() { return STR + total_nodes + STR + total_ports + STR + ports_down + STR + ports_active + STR + ports_disabled + STR + ports_1X + STR + ports_4X + STR + ports_8X + STR + ports_12X + STR + ports_unknown_width + STR + ports_reduced_width + STR + ports_sdr + STR + ports_ddr + STR + ports_qdr + STR + ports...
/** * Describe the method here * * @see java.lang.Object#toString() * * @return ***********************************************************/
Describe the method here
toString
{ "repo_name": "meier/opensm-client-server", "path": "src/main/java/gov/llnl/lc/infiniband/opensm/plugin/data/SBN_NodePortStatus.java", "license": "gpl-2.0", "size": 14009 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,275,656
@DataProvider(name = "testEnsureNotNullElements4") public Object[][] getTestEnsureNotNullElements4() { return new Object[][] { new Object[] { "a", "b", "c", "d", false }, new Object[] { null, "b", "c", "d", true }, new Object[] { "a", null, "c", "d", true }, new Object[] { "a", "b"...
@DataProvider(name = STR) Object[][] function() { return new Object[][] { new Object[] { "a", "b", "c", "d", false }, new Object[] { null, "b", "c", "d", true }, new Object[] { "a", null, "c", "d", true }, new Object[] { "a", "b", null, "d", true }, new Object[] { null, null, "c", "d", true }, new Object[] { null, "b",...
/** * Provides a set of test elements to use when testing the * {@code ensureNotNull} method variant that takes four arguments. * * @return A set of test elements to use when testing the * {@code ensureNotNull} method variant that takes four arguments. */
Provides a set of test elements to use when testing the ensureNotNull method variant that takes four arguments
getTestEnsureNotNullElements4
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/util/ValidatorTestCase.java", "license": "gpl-2.0", "size": 22669 }
[ "org.testng.annotations.DataProvider" ]
import org.testng.annotations.DataProvider;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
1,004,471
// Need the @SuppressWarnings because Java doesn't like varargs arrays // of generic types. @SuppressWarnings({"rawtypes", "unchecked"}) private boolean hasNodeTypes(SoyFileNode soyFile, Class... nodeTypes) { return new HasNodeTypesVisitor(nodeTypes).exec(soyFile); }
@SuppressWarnings({STR, STR}) boolean function(SoyFileNode soyFile, Class... nodeTypes) { return new HasNodeTypesVisitor(nodeTypes).exec(soyFile); }
/** * Returns true if the file contains any nodes of the listed types. * @param soyFile The soy file. * @param nodeTypes The types to look for */
Returns true if the file contains any nodes of the listed types
hasNodeTypes
{ "repo_name": "SerkanSipahi/closure-templates", "path": "java/src/com/google/template/soy/jssrc/internal/GenJsCodeVisitor.java", "license": "apache-2.0", "size": 66655 }
[ "com.google.template.soy.shared.internal.HasNodeTypesVisitor", "com.google.template.soy.soytree.SoyFileNode" ]
import com.google.template.soy.shared.internal.HasNodeTypesVisitor; import com.google.template.soy.soytree.SoyFileNode;
import com.google.template.soy.shared.internal.*; import com.google.template.soy.soytree.*;
[ "com.google.template" ]
com.google.template;
2,592,817
private void addSeparator(Composite parent) { Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL); separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); }
void function(Composite parent) { Label separator = new Label(parent, SWT.SEPARATOR SWT.HORIZONTAL); separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); }
/** * Add separator. * * @param parent */
Add separator
addSeparator
{ "repo_name": "angelozerr/angularjs-eclipse", "path": "org.eclipse.angularjs.ui/src/org/eclipse/angularjs/internal/ui/properties/DirectivesPropertyPage.java", "license": "epl-1.0", "size": 7500 }
[ "org.eclipse.swt.layout.GridData", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Label" ]
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,098,133
@NotNull(message = "{NotNull.gov.nih.nci.calims2.domain.administration.Word.status}") public gov.nih.nci.calims2.domain.administration.enumeration.WordStatus getStatus() { return status; }
@NotNull(message = STR) gov.nih.nci.calims2.domain.administration.enumeration.WordStatus function() { return status; }
/** * Retrieves the value of the status attribute. * @return status **/
Retrieves the value of the status attribute
getStatus
{ "repo_name": "NCIP/calims", "path": "calims2-model/src/java/gov/nih/nci/calims2/domain/administration/Word.java", "license": "bsd-3-clause", "size": 7400 }
[ "javax.validation.constraints.NotNull" ]
import javax.validation.constraints.NotNull;
import javax.validation.constraints.*;
[ "javax.validation" ]
javax.validation;
1,883,902
public BodyRowContainer getBody() { return body; }
BodyRowContainer function() { return body; }
/** * Returns the row container for the body in this Escalator. * * @return the body. Never <code>null</code> */
Returns the row container for the body in this Escalator
getBody
{ "repo_name": "Darsstar/framework", "path": "client/src/main/java/com/vaadin/client/widgets/Escalator.java", "license": "apache-2.0", "size": 280287 }
[ "com.vaadin.client.widget.escalator.RowContainer" ]
import com.vaadin.client.widget.escalator.RowContainer;
import com.vaadin.client.widget.escalator.*;
[ "com.vaadin.client" ]
com.vaadin.client;
1,807,264
public static RenderedOp create(RenderedImage source0, Integer width, Integer height, RenderingHints hints) { ParameterBlockJAI pb = new ParameterBlockJAI("Pattern", ...
static RenderedOp function(RenderedImage source0, Integer width, Integer height, RenderingHints hints) { ParameterBlockJAI pb = new ParameterBlockJAI(STR, RenderedRegistryMode.MODE_NAME); pb.setSource(STR, source0); pb.setParameter("width", width); pb.setParameter(STR, height); return JAI.create(STR, pb, hints); }
/** * Defines an image with a repeated pattern. * * <p>Creates a <code>ParameterBlockJAI</code> from all * supplied arguments except <code>hints</code> and invokes * {@link JAI#create(String,ParameterBlock,RenderingHints)}. * * @see JAI * @see ParameterBlockJAI * @s...
Defines an image with a repeated pattern. Creates a <code>ParameterBlockJAI</code> from all supplied arguments except <code>hints</code> and invokes <code>JAI#create(String,ParameterBlock,RenderingHints)</code>
create
{ "repo_name": "RoProducts/rastertheque", "path": "JAILibrary/src/javax/media/jai/operator/PatternDescriptor.java", "license": "gpl-2.0", "size": 5446 }
[ "java.awt.RenderingHints", "java.awt.image.RenderedImage", "javax.media.jai.JAI", "javax.media.jai.ParameterBlockJAI", "javax.media.jai.RenderedOp", "javax.media.jai.registry.RenderedRegistryMode" ]
import java.awt.RenderingHints; import java.awt.image.RenderedImage; import javax.media.jai.JAI; import javax.media.jai.ParameterBlockJAI; import javax.media.jai.RenderedOp; import javax.media.jai.registry.RenderedRegistryMode;
import java.awt.*; import java.awt.image.*; import javax.media.jai.*; import javax.media.jai.registry.*;
[ "java.awt", "javax.media" ]
java.awt; javax.media;
1,827,093
@Test @Specification({ "intermediary.must.accept.authority.form.connect.request/request", "intermediary.must.accept.authority.form.connect.request/response" }) @Ignore("Not Implemented") public void intermediaryMustAcceptAuthorityFormConnectRequest() throws Exception { k3po.finis...
@Specification({ STR, STR }) @Ignore(STR) void function() throws Exception { k3po.finish(); }
/** * See <a href="https://tools.ietf.org/html/rfc7230#section-5.3">RFC 7230 section 5.3: Request Target</a>. * * CONNECT www.example.com:80 HTTP/1.1 */
See RFC 7230 section 5.3: Request Target. CONNECT www.example.com:80 HTTP/1.1
intermediaryMustAcceptAuthorityFormConnectRequest
{ "repo_name": "StCostea/k3po", "path": "specification/http/src/test/java/org/kaazing/specification/http/rfc7230/MessageRoutingIT.java", "license": "apache-2.0", "size": 11653 }
[ "org.junit.Ignore", "org.kaazing.k3po.junit.annotation.Specification" ]
import org.junit.Ignore; import org.kaazing.k3po.junit.annotation.Specification;
import org.junit.*; import org.kaazing.k3po.junit.annotation.*;
[ "org.junit", "org.kaazing.k3po" ]
org.junit; org.kaazing.k3po;
880,410
final public Bundle getArguments() { return mArguments; }
final Bundle function() { return mArguments; }
/** * Return the arguments supplied when the fragment was instantiated, * if any. */
Return the arguments supplied when the fragment was instantiated, if any
getArguments
{ "repo_name": "Xomo/ActionBarSherlock", "path": "library/src/android/support/v4/app/Fragment.java", "license": "apache-2.0", "size": 50203 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
338,912
protected List<Pixels> importFile(File file, String format, IObject target) throws Throwable { return importFile(importer, file, format, false, target); }
List<Pixels> function(File file, String format, IObject target) throws Throwable { return importFile(importer, file, format, false, target); }
/** * Imports the specified OME-XML file and returns the pixels set if * successfully imported. * * @param importer * The metadataStore to use. * @param file * The file to import. * @param target * The container where to import the image. ...
Imports the specified OME-XML file and returns the pixels set if successfully imported
importFile
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/AbstractServerTest.java", "license": "gpl-2.0", "size": 80750 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,613,560
protected TransactionalEditingDomain getEditingDomain() { // try adapting the workbench part IWorkbenchPart part = getWorkbenchPart(); if (part != null) { IEditingDomainProvider edProvider = (IEditingDomainProvider) part.getAdapter(IEditingDomainProvider.class); if (edProvider != null) { EditingDom...
TransactionalEditingDomain function() { IWorkbenchPart part = getWorkbenchPart(); if (part != null) { IEditingDomainProvider edProvider = (IEditingDomainProvider) part.getAdapter(IEditingDomainProvider.class); if (edProvider != null) { EditingDomain domain = edProvider.getEditingDomain(); if (domain instanceof Transact...
/** * Utility method for calculating the editing domain. * * @return editing domain for this action. */
Utility method for calculating the editing domain
getEditingDomain
{ "repo_name": "sohaniwso2/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.visualdatamapper.diagram/src/org/wso2/developerstudio/datamapper/diagram/custom/action/SplitManyAction.java", "license": "apache-2.0", "size": 3670 }
[ "org.eclipse.emf.edit.domain.EditingDomain", "org.eclipse.emf.edit.domain.IEditingDomainProvider", "org.eclipse.emf.transaction.TransactionalEditingDomain", "org.eclipse.ui.IWorkbenchPart" ]
import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.domain.IEditingDomainProvider; import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.emf.edit.domain.*; import org.eclipse.emf.transaction.*; import org.eclipse.ui.*;
[ "org.eclipse.emf", "org.eclipse.ui" ]
org.eclipse.emf; org.eclipse.ui;
465,203
@SuppressWarnings("ConstantConditions") private void sendAtMessage(String content){ if(chatType != EaseConstant.CHATTYPE_GROUP){ EMLog.e(TAG, "only support group chat message"); return; } EMMessage message = EMMessage.createTxtSendMessage(content, toChatUsername);...
@SuppressWarnings(STR) void function(String content){ if(chatType != EaseConstant.CHATTYPE_GROUP){ EMLog.e(TAG, STR); return; } EMMessage message = EMMessage.createTxtSendMessage(content, toChatUsername); EMGroup group = EMClient.getInstance().groupManager().getGroup(toChatUsername); if(EMClient.getInstance().getCurren...
/** * send @ message, only support group chat message * @param content */
send @ message, only support group chat message
sendAtMessage
{ "repo_name": "Lee-Wills/wills", "path": "bang/app/src/main/java/com/wills/help/message/ui/EaseChatFragment.java", "license": "apache-2.0", "size": 42433 }
[ "com.hyphenate.chat.EMClient", "com.hyphenate.chat.EMGroup", "com.hyphenate.chat.EMMessage", "com.hyphenate.util.EMLog", "com.wills.help.message.EaseConstant", "com.wills.help.message.model.EaseAtMessageHelper" ]
import com.hyphenate.chat.EMClient; import com.hyphenate.chat.EMGroup; import com.hyphenate.chat.EMMessage; import com.hyphenate.util.EMLog; import com.wills.help.message.EaseConstant; import com.wills.help.message.model.EaseAtMessageHelper;
import com.hyphenate.chat.*; import com.hyphenate.util.*; import com.wills.help.message.*; import com.wills.help.message.model.*;
[ "com.hyphenate.chat", "com.hyphenate.util", "com.wills.help" ]
com.hyphenate.chat; com.hyphenate.util; com.wills.help;
433,372
void addList(Node firstInList, int[] skipIndexes) { int nextSlot = 0; int nextSkipSlot = 0; for (Node n = firstInList; n != null; n = n.getNext()) { while (skipIndexes != null && nextSkipSlot < skipIndexes.length) { if (nextSlot == skipIndexes[nextSkipSlot]) { cc.listSeparator(); ...
void addList(Node firstInList, int[] skipIndexes) { int nextSlot = 0; int nextSkipSlot = 0; for (Node n = firstInList; n != null; n = n.getNext()) { while (skipIndexes != null && nextSkipSlot < skipIndexes.length) { if (nextSlot == skipIndexes[nextSkipSlot]) { cc.listSeparator(); nextSlot++; nextSkipSlot++; } else { br...
/** * This function adds a comma-separated list as is specified by an ARRAYLIT * node with the associated skipIndexes array. This is a space optimization * since we avoid creating a whole Node object for each empty array literal * slot. * @param firstInList The first in the node list (chained through th...
This function adds a comma-separated list as is specified by an ARRAYLIT node with the associated skipIndexes array. This is a space optimization since we avoid creating a whole Node object for each empty array literal slot
addList
{ "repo_name": "olegshnitko/closure-compiler", "path": "src/com/google/javascript/jscomp/CodeGenerator.java", "license": "apache-2.0", "size": 34246 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
377,739
FileTree src = getProject().files(new ArrayList<Object>(this.source)).getAsFileTree(); return src == null ? getProject().files().getAsFileTree() : src.matching(patternSet); }
FileTree src = getProject().files(new ArrayList<Object>(this.source)).getAsFileTree(); return src == null ? getProject().files().getAsFileTree() : src.matching(patternSet); }
/** * Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist. * * @return The source. */
Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist
getSource
{ "repo_name": "cams7/gradle-samples", "path": "plugin/core/src/main/groovy/org/gradle/api/tasks/SourceTask.java", "license": "gpl-2.0", "size": 4322 }
[ "java.util.ArrayList", "org.gradle.api.file.FileTree" ]
import java.util.ArrayList; import org.gradle.api.file.FileTree;
import java.util.*; import org.gradle.api.file.*;
[ "java.util", "org.gradle.api" ]
java.util; org.gradle.api;
1,301,138
public void resumeTx(GridNearTxLocal tx, long threadId) throws IgniteCheckedException { assert tx != null && !tx.system() : tx; if (!tx.state(ACTIVE)) { throw new IgniteCheckedException("Trying to resume transaction with incorrect state " + "[expected=" + SUSPENDED + ", ...
void function(GridNearTxLocal tx, long threadId) throws IgniteCheckedException { assert tx != null && !tx.system() : tx; if (!tx.state(ACTIVE)) { throw new IgniteCheckedException(STR + STR + SUSPENDED + STR + tx.state() + ']'); } assert !threadMap.containsValue(tx) : tx; assert !haveSystemTxForThread(Thread.currentThre...
/** * Resume transaction in current thread. * Please don't use directly. Use tx.resume() instead. * * @param tx Transaction to be resumed. * @param threadId Thread id to restore. * * @see #suspendTx(GridNearTxLocal) * @see GridNearTxLocal#suspend() * @see GridNearTxLocal#res...
Resume transaction in current thread. Please don't use directly. Use tx.resume() instead
resumeTx
{ "repo_name": "andrey-kuznetsov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java", "license": "apache-2.0", "size": 116196 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.distributed.near.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,354,696
protected ServiceResponse<DynamicCodeCodeListMsg> invoke(ServiceRequest<DynamicCodeCodeListMsg> rq) throws LinkException { ServiceResponse<DynamicCodeCodeListMsg> rs; DynamicCodeCodeListMsg msg; try { this.validateRequest(rq); this.setContext(rq.getContext...
ServiceResponse<DynamicCodeCodeListMsg> function(ServiceRequest<DynamicCodeCodeListMsg> rq) throws LinkException { ServiceResponse<DynamicCodeCodeListMsg> rs; DynamicCodeCodeListMsg msg; try { this.validateRequest(rq); this.setContext(rq.getContext()); msg = this.linkDynamicCodeCode(rq.getRequestMessage()); if ((msg ==...
/** * Invokes the service handler method. * * @param rq the ServiceRequest<DynamicCodeCodeListMsg>. * @return the ServiceResponse<DynamicCodeCodeListMsg>. * @throws LinkException */
Invokes the service handler method
invoke
{ "repo_name": "NABUCCO/org.nabucco.framework.common.dynamiccode", "path": "org.nabucco.framework.common.dynamiccode.impl.service/src/main/gen/org/nabucco/framework/common/dynamiccode/impl/service/link/LinkDynamicCodeCodeServiceHandler.java", "license": "epl-1.0", "size": 3814 }
[ "org.nabucco.framework.base.facade.exception.NabuccoException", "org.nabucco.framework.base.facade.exception.service.LinkException", "org.nabucco.framework.base.facade.message.ServiceRequest", "org.nabucco.framework.base.facade.message.ServiceResponse", "org.nabucco.framework.common.dynamiccode.facade.messa...
import org.nabucco.framework.base.facade.exception.NabuccoException; import org.nabucco.framework.base.facade.exception.service.LinkException; import org.nabucco.framework.base.facade.message.ServiceRequest; import org.nabucco.framework.base.facade.message.ServiceResponse; import org.nabucco.framework.common.dynamiccod...
import org.nabucco.framework.base.facade.exception.*; import org.nabucco.framework.base.facade.exception.service.*; import org.nabucco.framework.base.facade.message.*; import org.nabucco.framework.common.dynamiccode.facade.message.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
1,841,678
Double sumNullableDouble(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector);
Double sumNullableDouble(Queryable<T> source, FunctionExpression<NullableDoubleFunction1<T>> selector);
/** * Computes the sum of the sequence of nullable * Double values that is obtained by invoking a projection * function on each element of the input sequence. */
Computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence
sumNullableDouble
{ "repo_name": "YrAuYong/incubator-calcite", "path": "linq4j/src/main/java/org/apache/calcite/linq4j/QueryableFactory.java", "license": "apache-2.0", "size": 27890 }
[ "org.apache.calcite.linq4j.function.NullableDoubleFunction1", "org.apache.calcite.linq4j.tree.FunctionExpression" ]
import org.apache.calcite.linq4j.function.NullableDoubleFunction1; import org.apache.calcite.linq4j.tree.FunctionExpression;
import org.apache.calcite.linq4j.function.*; import org.apache.calcite.linq4j.tree.*;
[ "org.apache.calcite" ]
org.apache.calcite;
2,326,822
public void serialize( DocumentFragment frag ) throws IOException { reset(); prepare(); serializeNode( frag ); cleanup(); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
void function( DocumentFragment frag ) throws IOException { reset(); prepare(); serializeNode( frag ); cleanup(); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
/** * Serializes the DOM document fragmnt using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param frag The document fragment to serialize * @throws IOException An I/O exception occured while * se...
Serializes the DOM document fragmnt using the previously specified writer and output format. Throws an exception only if an I/O exception occured while serializing
serialize
{ "repo_name": "lostdj/Jaklin-OpenJDK-JAXP", "path": "src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java", "license": "gpl-2.0", "size": 65847 }
[ "java.io.IOException", "org.w3c.dom.DocumentFragment" ]
import java.io.IOException; import org.w3c.dom.DocumentFragment;
import java.io.*; import org.w3c.dom.*;
[ "java.io", "org.w3c.dom" ]
java.io; org.w3c.dom;
2,369,997
protected NodeRef createCounterApp() { String fullyAuthenticatedUser = AuthenticationUtil.getFullyAuthenticatedUser(); AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.SYSTEM_USER_NAME); ChildAssociationRef createNode = nodeService.createNode(getDataDictionaryNode(), ContentModel.ASSOC_CONT...
NodeRef function() { String fullyAuthenticatedUser = AuthenticationUtil.getFullyAuthenticatedUser(); AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.SYSTEM_USER_NAME); ChildAssociationRef createNode = nodeService.createNode(getDataDictionaryNode(), ContentModel.ASSOC_CONTAINS, QName.createQName(Namespac...
/** * Create the counter app folder * * @return NodeRef */
Create the counter app folder
createCounterApp
{ "repo_name": "Redpill-Linpro/alfresco-numbering", "path": "repo/src/main/java/org/redpill/alfresco/numbering/storage/NodeNumberingStorageImpl.java", "license": "lgpl-3.0", "size": 12698 }
[ "org.alfresco.model.ContentModel", "org.alfresco.repo.security.authentication.AuthenticationUtil", "org.alfresco.service.cmr.repository.ChildAssociationRef", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.namespace.NamespaceService", "org.alfresco.service.namespace.QName" ]
import org.alfresco.model.ContentModel; import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.namespace.Q...
import org.alfresco.model.*; import org.alfresco.repo.security.authentication.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*;
[ "org.alfresco.model", "org.alfresco.repo", "org.alfresco.service" ]
org.alfresco.model; org.alfresco.repo; org.alfresco.service;
2,773,774
private void declareDependency(DependencyResolverImpl dependerResolver, ModuleIdentifier dependentName) { JmxAttribute dummyAttribute = new JmxAttribute("dummy"); dependerResolver.resolveInstance(Object.class, ObjectNameUtil.createReadOnlyModuleON(dependentName), ...
void function(DependencyResolverImpl dependerResolver, ModuleIdentifier dependentName) { JmxAttribute dummyAttribute = new JmxAttribute("dummy"); dependerResolver.resolveInstance(Object.class, ObjectNameUtil.createReadOnlyModuleON(dependentName), dummyAttribute); }
/** * Simulate dependentResolver resolving its dependency identified by * dependentName. */
Simulate dependentResolver resolving its dependency identified by dependentName
declareDependency
{ "repo_name": "aryantaheri/controller", "path": "opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DependencyResolverManagerTest.java", "license": "epl-1.0", "size": 4941 }
[ "org.opendaylight.controller.config.api.JmxAttribute", "org.opendaylight.controller.config.api.ModuleIdentifier", "org.opendaylight.controller.config.api.jmx.ObjectNameUtil" ]
import org.opendaylight.controller.config.api.JmxAttribute; import org.opendaylight.controller.config.api.ModuleIdentifier; import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
import org.opendaylight.controller.config.api.*; import org.opendaylight.controller.config.api.jmx.*;
[ "org.opendaylight.controller" ]
org.opendaylight.controller;
2,846,930
public Item withNumber(String attrName, BigDecimal val) { checkInvalidAttribute(attrName, val); attributes.put(attrName, val); return this; }
Item function(String attrName, BigDecimal val) { checkInvalidAttribute(attrName, val); attributes.put(attrName, val); return this; }
/** * Sets the value of the specified attribute in the current item to the * given value. */
Sets the value of the specified attribute in the current item to the given value
withNumber
{ "repo_name": "mahaliachante/aws-sdk-java", "path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java", "license": "apache-2.0", "size": 52160 }
[ "com.amazonaws.services.dynamodbv2.document.internal.InternalUtils", "java.math.BigDecimal" ]
import com.amazonaws.services.dynamodbv2.document.internal.InternalUtils; import java.math.BigDecimal;
import com.amazonaws.services.dynamodbv2.document.internal.*; import java.math.*;
[ "com.amazonaws.services", "java.math" ]
com.amazonaws.services; java.math;
169,805
private String streamToString(Reader o) throws SQLException, IOException { if (null == o) { return null; } StringBuffer sBuf = new StringBuffer(); int size = 512; char[] cArray = new char[size]; int nchars = o.read(cArray, 0, size); while (nchars > 0) { sBuf.append(cArray, 0, ...
String function(Reader o) throws SQLException, IOException { if (null == o) { return null; } StringBuffer sBuf = new StringBuffer(); int size = 512; char[] cArray = new char[size]; int nchars = o.read(cArray, 0, size); while (nchars > 0) { sBuf.append(cArray, 0, nchars); nchars = o.read(cArray, 0, size); } return sBuf....
/** * Fills InputStream from TEXT into String. The function is internaly used to * read database TEXT type values from stream. * * @param o * Reader * @return String with the content of the stream * @exception SQLException * if an error occurs * @exception IOException ...
Fills InputStream from TEXT into String. The function is internaly used to read database TEXT type values from stream
streamToString
{ "repo_name": "elminsterjimmy/java", "path": "EasyDaoFramework/src/main/java/com/elminster/easydao/db/query/Query.java", "license": "apache-2.0", "size": 51492 }
[ "java.io.IOException", "java.io.Reader", "java.sql.SQLException" ]
import java.io.IOException; import java.io.Reader; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
2,050,518
@Test public void checkVisitation() { // Create a new component to visit. MassFlowInlet component = new MassFlowInlet(); // Create an invalid visitor, and try to visit the component. FakeComponentVisitor visitor = null; component.accept(visitor); // Check that the component wasn't visited yet. asse...
void function() { MassFlowInlet component = new MassFlowInlet(); FakeComponentVisitor visitor = null; component.accept(visitor); assertFalse(wasVisited); visitor = new FakeComponentVisitor(); component.accept(visitor); assertTrue(wasVisited); Component visitorComponent = visitor.component; assertTrue(component == visit...
/** * <p> * Checks the visitation routine of the component. * </p> * */
Checks the visitation routine of the component.
checkVisitation
{ "repo_name": "gorindn/ice", "path": "tests/org.eclipse.ice.reactor.plant.test/src/org/eclipse/ice/reactor/plant/test/MassFlowInletTester.java", "license": "epl-1.0", "size": 8620 }
[ "org.eclipse.ice.datastructures.ICEObject", "org.eclipse.ice.datastructures.componentVisitor.IReactorComponent", "org.eclipse.ice.datastructures.componentVisitor.SelectiveComponentVisitor", "org.eclipse.ice.reactor.plant.MassFlowInlet", "org.eclipse.ice.reactor.plant.PlantComponent", "org.junit.Assert" ]
import org.eclipse.ice.datastructures.ICEObject; import org.eclipse.ice.datastructures.componentVisitor.IReactorComponent; import org.eclipse.ice.datastructures.componentVisitor.SelectiveComponentVisitor; import org.eclipse.ice.reactor.plant.MassFlowInlet; import org.eclipse.ice.reactor.plant.PlantComponent; import org...
import org.eclipse.ice.datastructures.*; import org.eclipse.ice.reactor.plant.*; import org.junit.*;
[ "org.eclipse.ice", "org.junit" ]
org.eclipse.ice; org.junit;
156,395
PlanTable planTable = initPlanTable(); while (planTable.size() > 1) { PlanTable newPlans = evaluateJoins(planTable); if (newPlans.size() == 0) { // No new plans where generated by joining but there are still multiple disconnected // query graph components. In this case we need to do a ...
PlanTable planTable = initPlanTable(); while (planTable.size() > 1) { PlanTable newPlans = evaluateJoins(planTable); if (newPlans.size() == 0) { newPlans = evaluateCartesianProducts(planTable); } newPlans = evaluateFilter(newPlans); newPlans = evaluateProjection(newPlans); PlanTableEntry bestEntry = newPlans.min(); pla...
/** * Computes the {@link PlanTableEntry} that wraps the {@link QueryPlan} with the minimum costs * according to the greedy optimization algorithm. * * @return entry with minimum execution costs */
Computes the <code>PlanTableEntry</code> that wraps the <code>QueryPlan</code> with the minimum costs according to the greedy optimization algorithm
plan
{ "repo_name": "smee/gradoop", "path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/matching/single/cypher/planning/planner/greedy/GreedyPlanner.java", "license": "apache-2.0", "size": 24467 }
[ "org.gradoop.flink.model.impl.operators.matching.single.cypher.planning.plantable.PlanTable", "org.gradoop.flink.model.impl.operators.matching.single.cypher.planning.plantable.PlanTableEntry" ]
import org.gradoop.flink.model.impl.operators.matching.single.cypher.planning.plantable.PlanTable; import org.gradoop.flink.model.impl.operators.matching.single.cypher.planning.plantable.PlanTableEntry;
import org.gradoop.flink.model.impl.operators.matching.single.cypher.planning.plantable.*;
[ "org.gradoop.flink" ]
org.gradoop.flink;
972,560
public void setBlockAnchor(RectangleAnchor anchor) { if (anchor == null) { throw new IllegalArgumentException("Null 'anchor' argument."); } if (this.blockAnchor.equals(anchor)) { return; // no change } this.blockAnchor = anchor; update...
void function(RectangleAnchor anchor) { if (anchor == null) { throw new IllegalArgumentException(STR); } if (this.blockAnchor.equals(anchor)) { return; } this.blockAnchor = anchor; updateOffsets(); fireChangeEvent(); }
/** * Sets the anchor point used to align a block at its (x, y) location and * sends a {@link RendererChangeEvent} to all registered listeners. * * @param anchor the anchor. * * @see #getBlockAnchor() */
Sets the anchor point used to align a block at its (x, y) location and sends a <code>RendererChangeEvent</code> to all registered listeners
setBlockAnchor
{ "repo_name": "greearb/jfreechart-fse-ct", "path": "src/main/java/org/jfree/chart/renderer/xy/XYBlockRenderer.java", "license": "lgpl-2.1", "size": 15342 }
[ "org.jfree.chart.ui.RectangleAnchor" ]
import org.jfree.chart.ui.RectangleAnchor;
import org.jfree.chart.ui.*;
[ "org.jfree.chart" ]
org.jfree.chart;
434,899
void unregister(QName pid) throws BpelEngineException;
void unregister(QName pid) throws BpelEngineException;
/** * Unregister a process from the server. * @param pid process to unregister * @throws BpelEngineException */
Unregister a process from the server
unregister
{ "repo_name": "dinkelaker/hbs4ode", "path": "bpel-api/src/main/java/org/apache/ode/bpel/iapi/BpelServer.java", "license": "apache-2.0", "size": 3652 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
2,732,780
public void setOptions(Collection<KickstartCommand> optionsIn) { replaceSet(this.getOptions(), optionsIn); }
void function(Collection<KickstartCommand> optionsIn) { replaceSet(this.getOptions(), optionsIn); }
/** * remove old options and replace with new * @param optionsIn to replace old with. */
remove old options and replace with new
setOptions
{ "repo_name": "lhellebr/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java", "license": "gpl-2.0", "size": 48289 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
151,594
private static Method getGetNumCurrentReplicas(final FSDataOutputStream os) { // TODO: Remove all this and use the now publically available // HdfsDataOutputStream#getCurrentBlockReplication() Method m = null; if (os != null) { Class<? extends OutputStream> wrappedStreamClass = os.getWrappedStre...
static Method function(final FSDataOutputStream os) { Method m = null; if (os != null) { Class<? extends OutputStream> wrappedStreamClass = os.getWrappedStream().getClass(); try { m = wrappedStreamClass.getDeclaredMethod(STR, new Class<?>[] {}); m.setAccessible(true); } catch (NoSuchMethodException e) { LOG.info(STR + ...
/** * Find the 'getNumCurrentReplicas' on the passed <code>os</code> stream. * @return Method or null. */
Find the 'getNumCurrentReplicas' on the passed <code>os</code> stream
getGetNumCurrentReplicas
{ "repo_name": "intel-hadoop/hbase-rhino", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java", "license": "apache-2.0", "size": 85725 }
[ "java.io.OutputStream", "java.lang.reflect.Method", "org.apache.hadoop.fs.FSDataOutputStream" ]
import java.io.OutputStream; import java.lang.reflect.Method; import org.apache.hadoop.fs.FSDataOutputStream;
import java.io.*; import java.lang.reflect.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.lang", "org.apache.hadoop" ]
java.io; java.lang; org.apache.hadoop;
2,553,445
public LeitungstypCustomBean getLastLeitungstyp() { return lastLeitungstyp; }
LeitungstypCustomBean function() { return lastLeitungstyp; }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getLastLeitungstyp
{ "repo_name": "cismet/belis-client", "path": "src/main/java/de/cismet/belis/broker/BelisBroker.java", "license": "gpl-3.0", "size": 138018 }
[ "de.cismet.cids.custom.beans.belis2.LeitungstypCustomBean" ]
import de.cismet.cids.custom.beans.belis2.LeitungstypCustomBean;
import de.cismet.cids.custom.beans.belis2.*;
[ "de.cismet.cids" ]
de.cismet.cids;
69,646
BigInteger getP();
BigInteger getP();
/** * Returns the prime, or 'p' value * * @return The DSA prime value */
Returns the prime, or 'p' value
getP
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/security/interfaces/DSAParams.java", "license": "gpl-2.0", "size": 2373 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,826,800
@Deprecated public C[] getCaptions() { return C.values(); }
C[] function() { return C.values(); }
/** * Use C.[caption] instead * * @return C * * @see com.intellectualcrafters.plot.config.C */
Use C.[caption] instead
getCaptions
{ "repo_name": "confuser/PlotSquared", "path": "src/main/java/com/intellectualcrafters/plot/api/PlotAPI.java", "license": "gpl-3.0", "size": 23829 }
[ "com.intellectualcrafters.plot.config.C" ]
import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.config.*;
[ "com.intellectualcrafters.plot" ]
com.intellectualcrafters.plot;
931,502
public static Build assertBuildCompletes(ForgeClient forgeClient, String projectName) throws Exception { return assertBuildCompletes(forgeClient, projectName, DEFAULT_TIMEOUT_MILLIS); }
static Build function(ForgeClient forgeClient, String projectName) throws Exception { return assertBuildCompletes(forgeClient, projectName, DEFAULT_TIMEOUT_MILLIS); }
/** * Asserts that a Build is created and that it completes successfully within the default time period */
Asserts that a Build is created and that it completes successfully within the default time period
assertBuildCompletes
{ "repo_name": "fabric8io/fabric8-forge", "path": "fabric8-forge-rest-client/src/test/java/io/fabric8/forge/rest/client/ForgeClientAsserts.java", "license": "apache-2.0", "size": 12695 }
[ "com.offbytwo.jenkins.model.Build" ]
import com.offbytwo.jenkins.model.Build;
import com.offbytwo.jenkins.model.*;
[ "com.offbytwo.jenkins" ]
com.offbytwo.jenkins;
1,732,421
@Test @Timeout(value = TIMEOUT_VALUE + TIMEOUT_TOLERANCE, unit = TimeUnit.MILLISECONDS) public void testReceiveLong() { consumer.receive(TIMEOUT_VALUE); }
@Timeout(value = TIMEOUT_VALUE + TIMEOUT_TOLERANCE, unit = TimeUnit.MILLISECONDS) void function() { consumer.receive(TIMEOUT_VALUE); }
/** * Tests whether <code>receive(long)</code> honours the <code>timeout</code> parameter. */
Tests whether <code>receive(long)</code> honours the <code>timeout</code> parameter
testReceiveLong
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400DataQueueConsumerTest.java", "license": "apache-2.0", "size": 4001 }
[ "java.util.concurrent.TimeUnit", "org.junit.jupiter.api.Timeout" ]
import java.util.concurrent.TimeUnit; import org.junit.jupiter.api.Timeout;
import java.util.concurrent.*; import org.junit.jupiter.api.*;
[ "java.util", "org.junit.jupiter" ]
java.util; org.junit.jupiter;
1,429,092
@Override public void windowDeiconified(WindowEvent e) {}
public void windowDeiconified(WindowEvent e) {}
/** * Metodo par realizar acciones al minimizar la ventana */
Metodo par realizar acciones al minimizar la ventana
windowIconified
{ "repo_name": "Cesarfr/desarrollo-aplicaciones", "path": "04-AreasPerimetros/src/controlador/AreaCirculo.java", "license": "mit", "size": 2451 }
[ "java.awt.event.WindowEvent" ]
import java.awt.event.WindowEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,561,049
private static void checkDevice(UsbDevice usbDevice, List<AdbDevice> adbDevices) { UsbDeviceDescriptor deviceDesc = usbDevice.getUsbDeviceDescriptor(); // Ignore devices from Non-ADB vendors if (!isAdbVendor(deviceDesc.idVendor())) return; // Check interfaces of device ...
static void function(UsbDevice usbDevice, List<AdbDevice> adbDevices) { UsbDeviceDescriptor deviceDesc = usbDevice.getUsbDeviceDescriptor(); if (!isAdbVendor(deviceDesc.idVendor())) return; UsbConfiguration config = usbDevice.getActiveUsbConfiguration(); for (UsbInterface iface: (List<UsbInterface>) config.getUsbInterf...
/** * Checks if the specified USB device is a ADB device and adds it to the * list if it is. * * @param usbDevice * The USB device to check. * @param adbDevices * The list of ADB devices to add the USB device to when it is an * ADB device. *...
Checks if the specified USB device is a ADB device and adds it to the list if it is
checkDevice
{ "repo_name": "usb4java/usb4java-javax-examples", "path": "src/main/java/org/usb4java/javax/examples/adb/Adb.java", "license": "unlicense", "size": 8973 }
[ "java.util.List", "javax.usb.UsbConfiguration", "javax.usb.UsbConst", "javax.usb.UsbDevice", "javax.usb.UsbDeviceDescriptor", "javax.usb.UsbEndpoint", "javax.usb.UsbEndpointDescriptor", "javax.usb.UsbInterface" ]
import java.util.List; import javax.usb.UsbConfiguration; import javax.usb.UsbConst; import javax.usb.UsbDevice; import javax.usb.UsbDeviceDescriptor; import javax.usb.UsbEndpoint; import javax.usb.UsbEndpointDescriptor; import javax.usb.UsbInterface;
import java.util.*; import javax.usb.*;
[ "java.util", "javax.usb" ]
java.util; javax.usb;
2,003,754
public IWorkspace getWorkspace() { return ResourcesPlugin.getWorkspace(); }
IWorkspace function() { return ResourcesPlugin.getWorkspace(); }
/** * Returns the workbench associated with this object. */
Returns the workbench associated with this object
getWorkspace
{ "repo_name": "dhuebner/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/internal/core/JavaModel.java", "license": "epl-1.0", "size": 15589 }
[ "org.eclipse.core.resources.IWorkspace", "org.eclipse.core.resources.ResourcesPlugin" ]
import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.resources.*;
[ "org.eclipse.core" ]
org.eclipse.core;
415,737