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 Writer createSourceFile(String typename) throws IOException; | Writer function(String typename) throws IOException; | /**
* Creates a new binding source file (.java) and returns a writer for it.
*
* @param typename fully qualified type name
* @return a stream to write the type to
* @throws IOException
*/ | Creates a new binding source file (.java) and returns a writer for it | createSourceFile | {
"repo_name": "crow-misia/xmlbeans",
"path": "src/xmlpublic/org/apache/xmlbeans/Filer.java",
"license": "apache-2.0",
"size": 1373
} | [
"java.io.IOException",
"java.io.Writer"
] | import java.io.IOException; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,712,864 |
private void processTable(final Composer<?, S, E> composer, final RenderContext jsfContext, final UIComponent htmlForm) {
this.messagePosition = MessagePosition.getPosition(this.resolveStringValue(PropertyKeys.MESSAGE, jsfContext.getFacesContext()));
this.orientation = this.messagePosition.getOrientation();
St... | void function(final Composer<?, S, E> composer, final RenderContext jsfContext, final UIComponent htmlForm) { this.messagePosition = MessagePosition.getPosition(this.resolveStringValue(PropertyKeys.MESSAGE, jsfContext.getFacesContext())); this.orientation = this.messagePosition.getOrientation(); String layoutType = Htm... | /**
* Process the table.
*
* @param composer
* The composer.
* @param jsfContext
* The context.
* @param htmlForm
* The form.
*/ | Process the table | processTable | {
"repo_name": "lunarray-org/model-gen-jsf",
"path": "src/main/java/org/lunarray/model/generation/jsf/components/form/HtmlGeneratedForm.java",
"license": "lgpl-3.0",
"size": 15193
} | [
"javax.faces.component.UIComponent",
"javax.faces.component.html.HtmlPanelGrid",
"javax.faces.component.html.HtmlPanelGroup",
"org.lunarray.common.check.CheckUtil",
"org.lunarray.model.generation.jsf.render.JsfStyleClasses",
"org.lunarray.model.generation.jsf.render.RenderContext",
"org.lunarray.model.g... | import javax.faces.component.UIComponent; import javax.faces.component.html.HtmlPanelGrid; import javax.faces.component.html.HtmlPanelGroup; import org.lunarray.common.check.CheckUtil; import org.lunarray.model.generation.jsf.render.JsfStyleClasses; import org.lunarray.model.generation.jsf.render.RenderContext; import ... | import javax.faces.component.*; import javax.faces.component.html.*; import org.lunarray.common.check.*; import org.lunarray.model.generation.jsf.render.*; import org.lunarray.model.generation.util.*; | [
"javax.faces",
"org.lunarray.common",
"org.lunarray.model"
] | javax.faces; org.lunarray.common; org.lunarray.model; | 1,649,988 |
public boolean zipRange(RestrictedRange<ContentNode> range, Node userSelection) {
try {
// nodeAfter is 1 further than we need, but meh
return ((ContentElement)range.getContainer()).zipChildrenExcludingFrom(
range.getNodeBefore(), range.getNodeAfter(), userSelection);
} catch (RuntimeExc... | boolean function(RestrictedRange<ContentNode> range, Node userSelection) { try { return ((ContentElement)range.getContainer()).zipChildrenExcludingFrom( range.getNodeBefore(), range.getNodeAfter(), userSelection); } catch (RuntimeException t) { revert(range.getPointBefore(persistentView), range.getPointAfter()); return... | /**
* Zip between the given range
* @see ContentElement#zipChildren(ContentNode, ContentNode, Node)
* @param range
* @param userSelection Node within which the user has their selection. If
* zipping ends up splitting it, we will return true, so we know if we
* need to restore the selection.
*... | Zip between the given range | zipRange | {
"repo_name": "Grasia/swellrt",
"path": "wave/src/main/java/org/waveprotocol/wave/client/editor/extract/Repairer.java",
"license": "apache-2.0",
"size": 13106
} | [
"com.google.gwt.dom.client.Node",
"org.waveprotocol.wave.client.editor.RestrictedRange",
"org.waveprotocol.wave.client.editor.content.ContentElement",
"org.waveprotocol.wave.client.editor.content.ContentNode"
] | import com.google.gwt.dom.client.Node; import org.waveprotocol.wave.client.editor.RestrictedRange; import org.waveprotocol.wave.client.editor.content.ContentElement; import org.waveprotocol.wave.client.editor.content.ContentNode; | import com.google.gwt.dom.client.*; import org.waveprotocol.wave.client.editor.*; import org.waveprotocol.wave.client.editor.content.*; | [
"com.google.gwt",
"org.waveprotocol.wave"
] | com.google.gwt; org.waveprotocol.wave; | 2,507,547 |
private void getSingleTriggered (JSONArray ids, CallbackContext command) {
getOptions(ids.optString(0), Notification.Type.TRIGGERED, command);
}
| void function (JSONArray ids, CallbackContext command) { getOptions(ids.optString(0), Notification.Type.TRIGGERED, command); } | /**
* Options from triggered notification.
*
* @param ids
* Set of local notification IDs
* @param command
* The callback context used when calling back into JavaScript.
*/ | Options from triggered notification | getSingleTriggered | {
"repo_name": "veg512/nWords",
"path": "plugins/de.appplant.cordova.plugin.local-notification/src/android/LocalNotification.java",
"license": "mit",
"size": 19002
} | [
"de.appplant.cordova.plugin.notification.Notification",
"org.apache.cordova.CallbackContext",
"org.json.JSONArray"
] | import de.appplant.cordova.plugin.notification.Notification; import org.apache.cordova.CallbackContext; import org.json.JSONArray; | import de.appplant.cordova.plugin.notification.*; import org.apache.cordova.*; import org.json.*; | [
"de.appplant.cordova",
"org.apache.cordova",
"org.json"
] | de.appplant.cordova; org.apache.cordova; org.json; | 1,123,649 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
} | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "bmaggi/Papyrus-SysML11",
"path": "plugins/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/activities/provider/ProbabilityItemProvider.java",
"license": "epl-1.0",
"size": 6076
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,291,889 |
public int getChannelMessagesCount(ChatChannel channel, String context, Date date);
/**
* Get the number of messages in a given chat channel
* @param channel ChatChannel to find the number of messages
* @return int the number of messages in the passed channel
* @deprecated use {@link #getChann... | int function(ChatChannel channel, String context, Date date); /** * Get the number of messages in a given chat channel * @param channel ChatChannel to find the number of messages * @return int the number of messages in the passed channel * @deprecated use {@link #getChannelMessagesCount(ChatChannel, String, Date)} | /**
* Gets the count of all the messages from the Channel after the passed date
*
* @param channel the ChatChannel to get messages for
* @param context [OPTIONAL] Context of channel and messages to return (only used if the channel is null)
* @param date [OPTIONAL] Date that the messages need to be ... | Gets the count of all the messages from the Channel after the passed date | getChannelMessagesCount | {
"repo_name": "ouit0408/sakai",
"path": "chat/chat-api/api/src/java/org/sakaiproject/chat2/model/ChatManager.java",
"license": "apache-2.0",
"size": 9622
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,900,855 |
public void setUserList(ArrayList userList) {
this.userList = userList;
}
| void function(ArrayList userList) { this.userList = userList; } | /**
* Sets the list of users in this group
*
* @param userList an array of UserListBeans representing the names of individual groups
*/ | Sets the list of users in this group | setUserList | {
"repo_name": "davidlad123/spine",
"path": "spine/build/spine-0.9-src/src/com/zphinx/spine/members/Group.java",
"license": "gpl-3.0",
"size": 5612
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 882,288 |
public Document createDefaultDocument() {
Document doc = super.createDefaultDocument();
doc.putProperty(LpDecoratedTextPane.DimensionProperty,
LpDecoratedTextPane.FORMAT_A4);
doc.putProperty(LpDecoratedTextPane.MarginProperty, new Insets(5, 5, 5,
5));
doc.putProperty(Document.TitleProperty, "Untitled... | Document function() { Document doc = super.createDefaultDocument(); doc.putProperty(LpDecoratedTextPane.DimensionProperty, LpDecoratedTextPane.FORMAT_A4); doc.putProperty(LpDecoratedTextPane.MarginProperty, new Insets(5, 5, 5, 5)); doc.putProperty(Document.TitleProperty, STR); return doc; } | /**
* Ueberschreibt createDefaultDocument um Default-Properties fuer das neue
* Dokument zu setzen.
*
* @return Document
*/ | Ueberschreibt createDefaultDocument um Default-Properties fuer das neue Dokument zu setzen | createDefaultDocument | {
"repo_name": "erdincay/lpclientpc",
"path": "src/com/lp/editor/text/LpStyledEditorKit.java",
"license": "agpl-3.0",
"size": 26068
} | [
"com.lp.editor.ui.LpDecoratedTextPane",
"java.awt.Insets",
"javax.swing.text.Document"
] | import com.lp.editor.ui.LpDecoratedTextPane; import java.awt.Insets; import javax.swing.text.Document; | import com.lp.editor.ui.*; import java.awt.*; import javax.swing.text.*; | [
"com.lp.editor",
"java.awt",
"javax.swing"
] | com.lp.editor; java.awt; javax.swing; | 1,521,547 |
public IncidentOwnerInfo owner() {
return this.innerProperties() == null ? null : this.innerProperties().owner();
} | IncidentOwnerInfo function() { return this.innerProperties() == null ? null : this.innerProperties().owner(); } | /**
* Get the owner property: Describes a user that the incident is assigned to.
*
* @return the owner value.
*/ | Get the owner property: Describes a user that the incident is assigned to | owner | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/IncidentInner.java",
"license": "mit",
"size": 14980
} | [
"com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo"
] | import com.azure.resourcemanager.securityinsights.models.IncidentOwnerInfo; | import com.azure.resourcemanager.securityinsights.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,985,253 |
private void setupSensor()
{
if (mShakeAction == Action.Nothing || (mState & FLAG_PLAYING) == 0) {
if (mSensorManager != null)
mSensorManager.unregisterListener(this);
} else {
if (mSensorManager == null)
mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE);
mSensorManager.registerL... | void function() { if (mShakeAction == Action.Nothing (mState & FLAG_PLAYING) == 0) { if (mSensorManager != null) mSensorManager.unregisterListener(this); } else { if (mSensorManager == null) mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); mSensorManager.registerListener(this, mSensorManager.getDefault... | /**
* Setup the accelerometer.
*/ | Setup the accelerometer | setupSensor | {
"repo_name": "Gordon01/vanilla",
"path": "src/ch/blinkenlights/android/vanilla/PlaybackService.java",
"license": "gpl-3.0",
"size": 63352
} | [
"android.hardware.Sensor",
"android.hardware.SensorManager"
] | import android.hardware.Sensor; import android.hardware.SensorManager; | import android.hardware.*; | [
"android.hardware"
] | android.hardware; | 784,037 |
public Locale getLocale() {
return locale;
} | Locale function() { return locale; } | /**
* Returns current input locale.
*/ | Returns current input locale | getLocale | {
"repo_name": "universsky/openjdk",
"path": "jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java",
"license": "gpl-2.0",
"size": 40354
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,833,283 |
private boolean isCrsSupported(final Crs crs) {
return (CrsTransformer.extractSridFromCrs(crs.getCode()) == 35833)
|| (CrsTransformer.extractSridFromCrs(crs.getCode()) == 5650);
} | boolean function(final Crs crs) { return (CrsTransformer.extractSridFromCrs(crs.getCode()) == 35833) (CrsTransformer.extractSridFromCrs(crs.getCode()) == 5650); } | /**
* DOCUMENT ME!
*
* @param crs DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | isCrsSupported | {
"repo_name": "cismet/cismap-plugin",
"path": "src/main/java/de/cismet/cismap/linearreferencing/TableStationEditor.java",
"license": "lgpl-3.0",
"size": 38035
} | [
"de.cismet.cismap.commons.Crs",
"de.cismet.cismap.commons.CrsTransformer"
] | import de.cismet.cismap.commons.Crs; import de.cismet.cismap.commons.CrsTransformer; | import de.cismet.cismap.commons.*; | [
"de.cismet.cismap"
] | de.cismet.cismap; | 384,089 |
private void validateAndSetAPISecurity(API api) {
String apiSecurity = APIConstants.DEFAULT_API_SECURITY_OAUTH2;
String security = api.getApiSecurity();
if (security!= null) {
apiSecurity = security;
ArrayList<String> securityLevels = selectSecurityLevels(apiSecurity)... | void function(API api) { String apiSecurity = APIConstants.DEFAULT_API_SECURITY_OAUTH2; String security = api.getApiSecurity(); if (security!= null) { apiSecurity = security; ArrayList<String> securityLevels = selectSecurityLevels(apiSecurity); apiSecurity = String.join(",", securityLevels); } if (log.isDebugEnabled())... | /**
* To validate the API Security options and set it.
*
* @param api Relevant API that need to be validated.
*/ | To validate the API Security options and set it | validateAndSetAPISecurity | {
"repo_name": "Rajith90/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java",
"license": "apache-2.0",
"size": 520854
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 707,874 |
private void stopTempNodes() {
Collection<Ignite> toRmv = new ArrayList<>(alive.subList(0, TMP_NODES_CNT));
alive.removeAll(toRmv);
// Remove listeners to avoid receiving events from stopping nodes.
for (Ignite g : toRmv)
g.events().stopLocalListen(lsnr, EventType.EVT_N... | void function() { Collection<Ignite> toRmv = new ArrayList<>(alive.subList(0, TMP_NODES_CNT)); alive.removeAll(toRmv); for (Ignite g : toRmv) g.events().stopLocalListen(lsnr, EventType.EVT_NODE_LEFT, EventType.EVT_NODE_FAILED); for (Iterator<Ignite> itr = toRmv.iterator(); itr.hasNext(); ) { Ignite g = itr.next(); if (... | /**
* Stops temporary nodes.
*/ | Stops temporary nodes | stopTempNodes | {
"repo_name": "afinka77/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAliveCacheSelfTest.java",
"license": "apache-2.0",
"size": 7400
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Iterator",
"org.apache.ignite.Ignite",
"org.apache.ignite.events.EventType",
"org.apache.ignite.internal.util.typedef.G"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import org.apache.ignite.Ignite; import org.apache.ignite.events.EventType; import org.apache.ignite.internal.util.typedef.G; | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.events.*; import org.apache.ignite.internal.util.typedef.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 575,084 |
void checkSingleRowLock(HaeinsaRowTransaction rowState, byte[] row) throws IOException; | void checkSingleRowLock(HaeinsaRowTransaction rowState, byte[] row) throws IOException; | /**
* Read {@link TRowLock} from HBase and compare that lock with prevRowLock.
* If TRowLock is changed, it means transaction is failed, so throw
* {@link ConflictException}.
*
* @throws IOException ConflictException, HBase IOException.
* @throws NullPointerException if oldLock is null (ha... | Read <code>TRowLock</code> from HBase and compare that lock with prevRowLock. If TRowLock is changed, it means transaction is failed, so throw <code>ConflictException</code> | checkSingleRowLock | {
"repo_name": "0mok/haeinsa",
"path": "src/main/java/kr/co/vcnc/haeinsa/HaeinsaTableIfaceInternal.java",
"license": "apache-2.0",
"size": 7338
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,256,027 |
private void popuplateTestGroups(TestControllerConfiguration configuration) {
for (Field field : getClass().getDeclaredFields()) {
Annotation ejbAnnotation = field.getAnnotation(EJB.class);
if (ejbAnnotation != null) {
if (LOGGER.isDebugEnabled()) {
... | void function(TestControllerConfiguration configuration) { for (Field field : getClass().getDeclaredFields()) { Annotation ejbAnnotation = field.getAnnotation(EJB.class); if (ejbAnnotation != null) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(STR + field.getName() + STR + field.getType().getCanonicalName() + ")."); } ... | /**
* Populate the test groups to get all the methods (setup + test)
*
* @param configuration The configuration to handle the test of the tests
*/ | Populate the test groups to get all the methods (setup + test) | popuplateTestGroups | {
"repo_name": "probedock/jee-itf",
"path": "src/main/java/io/probedock/jee/itf/AbstractTestController.java",
"license": "mit",
"size": 21666
} | [
"io.probedock.jee.itf.model.TestGroupDefinition",
"java.lang.annotation.Annotation",
"java.lang.reflect.Field"
] | import io.probedock.jee.itf.model.TestGroupDefinition; import java.lang.annotation.Annotation; import java.lang.reflect.Field; | import io.probedock.jee.itf.model.*; import java.lang.annotation.*; import java.lang.reflect.*; | [
"io.probedock.jee",
"java.lang"
] | io.probedock.jee; java.lang; | 610,381 |
@Override
public State ignorableWhitespace(final char[] ch, final int strt, final int len)
throws SAXException {
flushCharacters();
return super.ignorableWhitespace(ch, strt, len);
} | State function(final char[] ch, final int strt, final int len) throws SAXException { flushCharacters(); return super.ignorableWhitespace(ch, strt, len); } | /**
* Just calls flushCharacters and super.ignorableWhitespace( ... )
*/ | Just calls flushCharacters and super.ignorableWhitespace( ... ) | ignorableWhitespace | {
"repo_name": "joansmith/orbeon-forms",
"path": "src/main/java/org/orbeon/oxf/processor/converter/AbstractRewrite.java",
"license": "lgpl-2.1",
"size": 39658
} | [
"org.orbeon.oxf.xml.saxrewrite.State",
"org.xml.sax.SAXException"
] | import org.orbeon.oxf.xml.saxrewrite.State; import org.xml.sax.SAXException; | import org.orbeon.oxf.xml.saxrewrite.*; import org.xml.sax.*; | [
"org.orbeon.oxf",
"org.xml.sax"
] | org.orbeon.oxf; org.xml.sax; | 1,483,720 |
Properties getCreateHeapProperties()
{
return crf.getCreateHeapProperties();
} | Properties getCreateHeapProperties() { return crf.getCreateHeapProperties(); } | /**
* Get the Properties associated with creating the heap.
*
* @return The Properties associated with creating the heap.
*/ | Get the Properties associated with creating the heap | getCreateHeapProperties | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java",
"license": "apache-2.0",
"size": 34841
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,345,611 |
public void update() {
List<LogRecord> lrecords;
synchronized ( this ) {
lrecords= new ArrayList<>(records);
}
try {
//long t0= System.currentTimeMillis();
int n = lrecords.size();
String st = searchText;
if (st != null && s... | void function() { List<LogRecord> lrecords; synchronized ( this ) { lrecords= new ArrayList<>(records); } try { int n = lrecords.size(); String st = searchText; if (st != null && st.length() == 0) st = null; Pattern p = searchTextPattern; StyledDocument doc = logTextArea.getStyledDocument(); doc.remove(0, doc.getLength... | /**
* note this is generally called from a timer that coalesces events. But
* may be called explicitly in response to a user event as well.
* This should be called on the event thread!
*/ | note this is generally called from a timer that coalesces events. But may be called explicitly in response to a user event as well. This should be called on the event thread | update | {
"repo_name": "autoplot/app",
"path": "Autoplot/src/org/autoplot/scriptconsole/LogConsole.java",
"license": "gpl-2.0",
"size": 35083
} | [
"java.awt.Color",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.logging.Level",
"java.util.logging.LogRecord",
"java.util.regex.Pattern",
"javax.swing.text.AttributeSet",
"javax.swing.text.BadLocationException",
"javax.swing.text.MutableAttributeSet",
"javax.swing.text... | import java.awt.Color; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.regex.Pattern; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.MutableAttri... | import java.awt.*; import java.util.*; import java.util.logging.*; import java.util.regex.*; import javax.swing.text.*; | [
"java.awt",
"java.util",
"javax.swing"
] | java.awt; java.util; javax.swing; | 2,247,103 |
private void checkEnvironments() {
if (CollectionUtils.isEmpty(environments)) {
tableViewer.getTable().setEnabled(false);
addButton.setEnabled(false);
managedForm.getForm().setMessage("No environment exists on the selected CMR, mapping can not be defined.", IMessageProvider.ERROR);
} else {
tableView... | void function() { if (CollectionUtils.isEmpty(environments)) { tableViewer.getTable().setEnabled(false); addButton.setEnabled(false); managedForm.getForm().setMessage(STR, IMessageProvider.ERROR); } else { tableViewer.getTable().setEnabled(true); addButton.setEnabled(true); managedForm.getForm().setMessage(STR + cmrRep... | /**
* Checks if there is environments in the CMR and thus updates the part based on the state.
*/ | Checks if there is environments in the CMR and thus updates the part based on the state | checkEnvironments | {
"repo_name": "pbouillet/inspectIT",
"path": "inspectIT/src/info/novatec/inspectit/rcp/ci/form/part/AgentMappingPart.java",
"license": "agpl-3.0",
"size": 17627
} | [
"org.apache.commons.collections.CollectionUtils",
"org.eclipse.jface.dialogs.IMessageProvider"
] | import org.apache.commons.collections.CollectionUtils; import org.eclipse.jface.dialogs.IMessageProvider; | import org.apache.commons.collections.*; import org.eclipse.jface.dialogs.*; | [
"org.apache.commons",
"org.eclipse.jface"
] | org.apache.commons; org.eclipse.jface; | 2,244,414 |
public Bitmap getBitmapFromMemCache(String data) {
if (mMemoryCache != null) {
final Bitmap memBitmap = mMemoryCache.get(data);
if (memBitmap != null) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "Memory cache hit");
}
... | Bitmap function(String data) { if (mMemoryCache != null) { final Bitmap memBitmap = mMemoryCache.get(data); if (memBitmap != null) { if (BuildConfig.DEBUG) { Log.d(TAG, STR); } return memBitmap; } } return null; } | /**
* Get from memory cache.
*
* @param data Unique identifier for which item to get
* @return The bitmap if found in cache, null otherwise
*/ | Get from memory cache | getBitmapFromMemCache | {
"repo_name": "ysYvonne/KitchenSecret_Android",
"path": "app/src/main/java/com/meetyouatnowhere/kitchensecret_android/util/ImageCache.java",
"license": "gpl-3.0",
"size": 8101
} | [
"android.graphics.Bitmap",
"android.util.Log",
"com.meetyouatnowhere.kitchensecret_android.BuildConfig"
] | import android.graphics.Bitmap; import android.util.Log; import com.meetyouatnowhere.kitchensecret_android.BuildConfig; | import android.graphics.*; import android.util.*; import com.meetyouatnowhere.kitchensecret_android.*; | [
"android.graphics",
"android.util",
"com.meetyouatnowhere.kitchensecret_android"
] | android.graphics; android.util; com.meetyouatnowhere.kitchensecret_android; | 345,432 |
@BeanTagAttribute(name = "refreshTimer")
public int getRefreshTimer() {
return refreshTimer;
}
| @BeanTagAttribute(name = STR) int function() { return refreshTimer; } | /**
* Time in seconds that the component will be automatically refreshed
*
* <p>
* This will invoke the refresh process just like the conditionalRefresh and
* refreshWhenChangedPropertyNames. When using this property methodToCallOnRefresh and id should
* also be specified
* </... | Time in seconds that the component will be automatically refreshed This will invoke the refresh process just like the conditionalRefresh and refreshWhenChangedPropertyNames. When using this property methodToCallOnRefresh and id should also be specified | getRefreshTimer | {
"repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/component/ComponentBase.java",
"license": "apache-2.0",
"size": 74990
} | [
"org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute"
] | import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute; | import org.kuali.rice.krad.datadictionary.parse.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,081,463 |
private void formatButton(JButton b, int mnemonic, String tooltip, int
actionID)
{
b.setMnemonic(mnemonic);
b.setOpaque(false);
b.setToolTipText(tooltip);
b.addActionListener(this);
b.setActionCommand(""+actionID);
} | void function(JButton b, int mnemonic, String tooltip, int actionID) { b.setMnemonic(mnemonic); b.setOpaque(false); b.setToolTipText(tooltip); b.addActionListener(this); b.setActionCommand(""+actionID); } | /**
* Formats the specified button.
*
* @param b The button to format.
* @param mnemonic The key-code that indicates a mnemonic key.
* @param tooltip The button's tooltip.
* @param actionID The action id associated to the passed button.
*/ | Formats the specified button | formatButton | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/MessengerDialog.java",
"license": "gpl-2.0",
"size": 26055
} | [
"javax.swing.JButton"
] | import javax.swing.JButton; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,756,605 |
public IconType<EjbJarType<T>> createIcon(); | IconType<EjbJarType<T>> function(); | /**
* Creates a new <code>icon</code> element
* @return the new created instance of <code>IconType<EjbJarType<T>></code>
*/ | Creates a new <code>icon</code> element | createIcon | {
"repo_name": "forge/javaee-descriptors",
"path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/ejbjar30/EjbJarType.java",
"license": "epl-1.0",
"size": 11836
} | [
"org.jboss.shrinkwrap.descriptor.api.javaee5.IconType"
] | import org.jboss.shrinkwrap.descriptor.api.javaee5.IconType; | import org.jboss.shrinkwrap.descriptor.api.javaee5.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 1,119,162 |
public int generate(byte[] output, byte[] additionalInput, boolean predictionResistant)
{
if (_isTDEA)
{
if (_reseedCounter > TDEA_RESEED_MAX)
{
return -1;
}
if (Utils.isTooLarge(output, TDEA_MAX_BITS_REQUEST / 8))
{
... | int function(byte[] output, byte[] additionalInput, boolean predictionResistant) { if (_isTDEA) { if (_reseedCounter > TDEA_RESEED_MAX) { return -1; } if (Utils.isTooLarge(output, TDEA_MAX_BITS_REQUEST / 8)) { throw new IllegalArgumentException(STR + TDEA_MAX_BITS_REQUEST); } } else { if (_reseedCounter > AES_RESEED_MA... | /**
* Populate a passed in array with random data.
*
* @param output output array for generated bits.
* @param additionalInput additional input to be added to the DRBG in this step.
* @param predictionResistant true if a reseed should be forced, false otherwise.
*
* @return number of ... | Populate a passed in array with random data | generate | {
"repo_name": "ripple/ripple-lib-java",
"path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/crypto/prng/drbg/CTRSP800DRBG.java",
"license": "isc",
"size": 15426
} | [
"org.ripple.bouncycastle.crypto.params.KeyParameter"
] | import org.ripple.bouncycastle.crypto.params.KeyParameter; | import org.ripple.bouncycastle.crypto.params.*; | [
"org.ripple.bouncycastle"
] | org.ripple.bouncycastle; | 2,454,088 |
@Test
public void test1XSFInterface_get_set_int() throws Exception {
int originalValue = fejb1.getIntValue();
fejb1.setIntValue((originalValue + 1));
assertEquals("Set value test was unexpected value", fejb1.getIntValue(), (originalValue + 1));
fejb1.setIntValue(originalValue);
... | void function() throws Exception { int originalValue = fejb1.getIntValue(); fejb1.setIntValue((originalValue + 1)); assertEquals(STR, fejb1.getIntValue(), (originalValue + 1)); fejb1.setIntValue(originalValue); assertEquals(STR, fejb1.getIntValue(), originalValue); } | /**
* (bmg05) Test Stateful remote get/set methods for int value.
*/ | (bmg05) Test Stateful remote get/set methods for int value | test1XSFInterface_get_set_int | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB1XRemoteSpecWeb.war/src/com/ibm/ejb1x/base/spec/sfr/web/SFRemoteInterfaceMethodServlet.java",
"license": "epl-1.0",
"size": 13109
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 369,637 |
public Request getRequest();
| Request function(); | /**
* Gets the request to be received by this node.
*
* @return the request to be received
*/ | Gets the request to be received by this node | getRequest | {
"repo_name": "forgeide/forgeide",
"path": "src/main/java/ch/iserver/ace/algorithm/test/ReceptionNode.java",
"license": "apache-2.0",
"size": 1650
} | [
"ch.iserver.ace.algorithm.Request"
] | import ch.iserver.ace.algorithm.Request; | import ch.iserver.ace.algorithm.*; | [
"ch.iserver.ace"
] | ch.iserver.ace; | 2,800,535 |
public void setThumbnailService(ThumbnailService thumbnailService)
{
this.thumbnailService = thumbnailService;
}
| void function(ThumbnailService thumbnailService) { this.thumbnailService = thumbnailService; } | /**
* Set the thumbnail service
*
* @param thumbnailService the thumbnail service
*/ | Set the thumbnail service | setThumbnailService | {
"repo_name": "deas/alfresco-community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/thumbnail/UpdateThumbnailActionExecuter.java",
"license": "lgpl-3.0",
"size": 8756
} | [
"org.alfresco.service.cmr.thumbnail.ThumbnailService"
] | import org.alfresco.service.cmr.thumbnail.ThumbnailService; | import org.alfresco.service.cmr.thumbnail.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 669,901 |
private void persistPaxosData(long segmentTxId,
PersistedRecoveryPaxosData newData) throws IOException {
File f = storage.getPaxosFile(segmentTxId);
boolean success = false;
AtomicFileOutputStream fos = new AtomicFileOutputStream(f);
try {
newData.writeDelimitedTo(fos);
fos.write('\n... | void function(long segmentTxId, PersistedRecoveryPaxosData newData) throws IOException { File f = storage.getPaxosFile(segmentTxId); boolean success = false; AtomicFileOutputStream fos = new AtomicFileOutputStream(f); try { newData.writeDelimitedTo(fos); fos.write('\n'); OutputStreamWriter writer = new OutputStreamWrit... | /**
* Persist data for recovering the given segment from disk.
*/ | Persist data for recovering the given segment from disk | persistPaxosData | {
"repo_name": "ronny-macmaster/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java",
"license": "apache-2.0",
"size": 41427
} | [
"com.google.common.base.Charsets",
"java.io.File",
"java.io.IOException",
"java.io.OutputStreamWriter",
"org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos",
"org.apache.hadoop.hdfs.util.AtomicFileOutputStream",
"org.apache.hadoop.io.IOUtils"
] | import com.google.common.base.Charsets; import java.io.File; import java.io.IOException; import java.io.OutputStreamWriter; import org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos; import org.apache.hadoop.hdfs.util.AtomicFileOutputStream; import org.apache.hadoop.io.IOUtils; | import com.google.common.base.*; import java.io.*; import org.apache.hadoop.hdfs.qjournal.protocol.*; import org.apache.hadoop.hdfs.util.*; import org.apache.hadoop.io.*; | [
"com.google.common",
"java.io",
"org.apache.hadoop"
] | com.google.common; java.io; org.apache.hadoop; | 1,014,821 |
protected void compareResultsWithR(double epsilon) {
for (int i = 0; i < comparisonFiles.length; i++) {
TestUtils.compareDMLHDFSFileWithRFile(comparisonFiles[i], outputDirectories[i], epsilon);
}
} | void function(double epsilon) { for (int i = 0; i < comparisonFiles.length; i++) { TestUtils.compareDMLHDFSFileWithRFile(comparisonFiles[i], outputDirectories[i], epsilon); } } | /**
* <p>
* Compares the results of the computation with the expected ones with a
* specified tolerance.
* </p>
*
* @param epsilon
* tolerance
*/ | Compares the results of the computation with the expected ones with a specified tolerance. | compareResultsWithR | {
"repo_name": "dusenberrymw/systemml_old",
"path": "system-ml/src/test/java/com/ibm/bi/dml/test/integration/AutomatedTestBase.java",
"license": "apache-2.0",
"size": 46105
} | [
"com.ibm.bi.dml.test.utils.TestUtils"
] | import com.ibm.bi.dml.test.utils.TestUtils; | import com.ibm.bi.dml.test.utils.*; | [
"com.ibm.bi"
] | com.ibm.bi; | 207,106 |
public void setContent(View view) {
mViewAbove.setContent(view);
showContent();
} | void function(View view) { mViewAbove.setContent(view); showContent(); } | /**
* Set the above view content to the given View.
*
* @param view
* The desired content to display.
*/ | Set the above view content to the given View | setContent | {
"repo_name": "ZhouGongZaiShi/MVPDemo",
"path": "slidingmenu/src/main/java/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java",
"license": "apache-2.0",
"size": 31237
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,755,390 |
@Basic
@Column(name = "TOTAL_DAYS_SERVED", precision = 20)
public long getTotalDaysServed() {
return totalDaysServed;
} | @Column(name = STR, precision = 20) long function() { return totalDaysServed; } | /**
* Gets the value of the totalDaysServed property.
*
*/ | Gets the value of the totalDaysServed property | getTotalDaysServed | {
"repo_name": "Hack23/cia",
"path": "model.internal.application.user.impl/src/main/java/com/hack23/cia/model/internal/application/data/party/impl/ViewRiksdagenPartySummary.java",
"license": "apache-2.0",
"size": 26351
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 2,402,221 |
public boolean getVisible() {
return Dispatch.get(object, "Visible").getBoolean();
} | boolean function() { return Dispatch.get(object, STR).getBoolean(); } | /**
* Returns true if the object is visible in the sources list.
* @return True if the object is visible in the sources list.
*/ | Returns true if the object is visible in the sources list | getVisible | {
"repo_name": "Boukefalos/jlibitunes",
"path": "src/main/java/com/dt/iTunesController/ITPlaylist.java",
"license": "gpl-3.0",
"size": 5682
} | [
"com.jacob.com.Dispatch"
] | import com.jacob.com.Dispatch; | import com.jacob.com.*; | [
"com.jacob.com"
] | com.jacob.com; | 2,705,895 |
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<VpnSiteInner> updateTagsAsync(String resourceGroupName, String vpnSiteName, TagsObject vpnSiteParameters); | @ServiceMethod(returns = ReturnType.SINGLE) Mono<VpnSiteInner> updateTagsAsync(String resourceGroupName, String vpnSiteName, TagsObject vpnSiteParameters); | /**
* Updates VpnSite tags.
*
* @param resourceGroupName The resource group name of the VpnSite.
* @param vpnSiteName The name of the VpnSite being updated.
* @param vpnSiteParameters Parameters supplied to update VpnSite tags.
* @throws IllegalArgumentException thrown if parameters fail t... | Updates VpnSite tags | updateTagsAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VpnSitesClient.java",
"license": "mit",
"size": 22869
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.network.fluent.models.VpnSiteInner",
"com.azure.resourcemanager.network.models.TagsObject"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.network.fluent.models.VpnSiteInner; import com.azure.resourcemanager.network.models.TagsObject; | import com.azure.core.annotation.*; import com.azure.resourcemanager.network.fluent.models.*; import com.azure.resourcemanager.network.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,996,404 |
SubscriptionCloudCredentials getCredentials(); | SubscriptionCloudCredentials getCredentials(); | /**
* Gets subscription credentials which uniquely identify Microsoft Azure
* subscription. The subscription ID forms part of the URI for every
* service call.
* @return The Credentials value.
*/ | Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call | getCredentials | {
"repo_name": "flydream2046/azure-sdk-for-java",
"path": "resource-management/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkResourceProviderClient.java",
"license": "apache-2.0",
"size": 10493
} | [
"com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials"
] | import com.microsoft.windowsazure.credentials.SubscriptionCloudCredentials; | import com.microsoft.windowsazure.credentials.*; | [
"com.microsoft.windowsazure"
] | com.microsoft.windowsazure; | 1,594,284 |
@FactoryParameter(obligation = OPTIONAL)
@Deprecated
Boolean getWarnOnClose(); | @FactoryParameter(obligation = OPTIONAL) Boolean getWarnOnClose(); | /**
* Warn on leave page
*/ | Warn on leave page | getWarnOnClose | {
"repo_name": "codenvy/che-core",
"path": "platform-api/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/dto/Actions.java",
"license": "epl-1.0",
"size": 2160
} | [
"org.eclipse.che.api.core.factory.FactoryParameter"
] | import org.eclipse.che.api.core.factory.FactoryParameter; | import org.eclipse.che.api.core.factory.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,140,505 |
protected Query getFuzzyQuery(String field, String termStr, float minSimilarity) throws ParseException
{
if (lowercaseExpandedTerms) {
termStr = termStr.toLowerCase();
}
Term t = new Term(field, termStr);
return new FuzzyQuery(t, minSimilarity, fuzzyPrefixLength);
} | Query function(String field, String termStr, float minSimilarity) throws ParseException { if (lowercaseExpandedTerms) { termStr = termStr.toLowerCase(); } Term t = new Term(field, termStr); return new FuzzyQuery(t, minSimilarity, fuzzyPrefixLength); } | /**
* Factory method for generating a query (similar to
* {@link #getWildcardQuery}). Called when parser parses
* an input term token that has the fuzzy suffix (~) appended.
*
* @param field Name of the field query will use.
* @param termStr Term token to use for building term for the query
*
* ... | Factory method for generating a query (similar to <code>#getWildcardQuery</code>). Called when parser parses an input term token that has the fuzzy suffix (~) appended | getFuzzyQuery | {
"repo_name": "Overruler/retired-apache-sources",
"path": "lucene-2.9.4/contrib/misc/src/java/org/apache/lucene/queryParser/precedence/PrecedenceQueryParser.java",
"license": "apache-2.0",
"size": 41228
} | [
"org.apache.lucene.index.Term",
"org.apache.lucene.search.FuzzyQuery",
"org.apache.lucene.search.Query"
] | import org.apache.lucene.index.Term; import org.apache.lucene.search.FuzzyQuery; import org.apache.lucene.search.Query; | import org.apache.lucene.index.*; import org.apache.lucene.search.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 481,813 |
@Test
public void deleteInode() throws Exception {
createPath(mTree, NESTED_URI, sNestedDirectoryOptions);
// all inodes under root
try (LockedInodePath inodePath = mTree.lockFullInodePath(0, InodeTree.LockMode.WRITE);
LockedInodePathList lockedInodePathList = mTree.lockDescendants(inodePath,
... | void function() throws Exception { createPath(mTree, NESTED_URI, sNestedDirectoryOptions); try (LockedInodePath inodePath = mTree.lockFullInodePath(0, InodeTree.LockMode.WRITE); LockedInodePathList lockedInodePathList = mTree.lockDescendants(inodePath, InodeTree.LockMode.READ)) { assertEquals(2, lockedInodePathList.get... | /**
* Tests deleting a nested inode.
*/ | Tests deleting a nested inode | deleteInode | {
"repo_name": "apc999/alluxio",
"path": "core/server/master/src/test/java/alluxio/master/file/meta/InodeTreeTest.java",
"license": "apache-2.0",
"size": 34913
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 910,904 |
public static UIResults extractCaptureQuery(HttpServletRequest httpRequest)
throws ServletException {
UIResults results = (UIResults) httpRequest.getAttribute(FERRET_NAME);
if (results == null) {
throw new ServletException("No attribute..");
}
if (results.wbRequest == null) {
throw new ServletExce... | static UIResults function(HttpServletRequest httpRequest) throws ServletException { UIResults results = (UIResults) httpRequest.getAttribute(FERRET_NAME); if (results == null) { throw new ServletException(STR); } if (results.wbRequest == null) { throw new ServletException(STR); } if (results.uriConverter == null) { thr... | /**
* Extract a CaptureQuery UIResults from the HttpServletRequest. Probably
* used by a .jsp responsible for actually drawing search results for the
* user.
* @param httpRequest the HttpServletRequest where the UIResults was
* ferreted away
* @return CaptureQuery UIResult with info from httpRequest appl... | Extract a CaptureQuery UIResults from the HttpServletRequest. Probably used by a .jsp responsible for actually drawing search results for the user | extractCaptureQuery | {
"repo_name": "bitzl/openwayback",
"path": "wayback-core/src/main/java/org/archive/wayback/core/UIResults.java",
"license": "apache-2.0",
"size": 24802
} | [
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; | import javax.servlet.*; import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 303,364 |
public void releaseInputStream() throws IOException {
try {
if (in != null) {
// execute MarshalInputStream "done" callbacks
try {
in.done();
} catch (RuntimeException e) {
}
// add save... | void function() throws IOException { try { if (in != null) { try { in.done(); } catch (RuntimeException e) { } in.registerRefs(); in.done(conn); } conn.releaseInputStream(); } finally { in = null; } } | /**
* Release the input stream, this would allow some transports to release
* the channel early.
*/ | Release the input stream, this would allow some transports to release the channel early | releaseInputStream | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/share/classes/sun/rmi/transport/StreamRemoteCall.java",
"license": "mit",
"size": 10906
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,049,781 |
public void removePropertyChangeListener (
final PropertyChangeListener listener)
{
mPropertySupport.removePropertyChangeListener (listener);
} | void function ( final PropertyChangeListener listener) { mPropertySupport.removePropertyChangeListener (listener); } | /**
* Remove a PropertyChangeListener from the listener list.
* This removes a PropertyChangeListener that was registered for all
* properties.
* @param listener The PropertyChangeListener to be removed.
*/ | Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties | removePropertyChangeListener | {
"repo_name": "bbossgroups/bbossgroups-3.5",
"path": "bboss-htmlparser/src/org/htmlparser/lexerapplications/thumbelina/Thumbelina.java",
"license": "apache-2.0",
"size": 46126
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 2,104,829 |
float layerSize(int p_76490_1_)
{
if ((float)p_76490_1_ < (float)this.heightLimit * 0.3F)
{
return -1.0F;
}
else
{
float f = (float)this.heightLimit / 2.0F;
float f1 = f - (float)p_76490_1_;
float f2 = MathHelper.sqrt_float(... | float layerSize(int p_76490_1_) { if ((float)p_76490_1_ < (float)this.heightLimit * 0.3F) { return -1.0F; } else { float f = (float)this.heightLimit / 2.0F; float f1 = f - (float)p_76490_1_; float f2 = MathHelper.sqrt_float(f * f - f1 * f1); if (f1 == 0.0F) { f2 = f; } else if (Math.abs(f1) >= f) { return 0.0F; } retur... | /**
* Gets the rough size of a layer of the tree.
*/ | Gets the rough size of a layer of the tree | layerSize | {
"repo_name": "TorchPowered/CraftBloom",
"path": "src/net/minecraft/world/gen/feature/WorldGenBigTree.java",
"license": "mit",
"size": 12333
} | [
"net.minecraft.util.MathHelper"
] | import net.minecraft.util.MathHelper; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,558,842 |
public CMMsg modify(final MOB source,
final Environmental target,
final Environmental tool,
final int newAllCode,
final String sourceMessage,
final String targetMessage,
final String othersMessage); | CMMsg function(final MOB source, final Environmental target, final Environmental tool, final int newAllCode, final String sourceMessage, final String targetMessage, final String othersMessage); | /**
* Modifies one of more fields in this event.
* @see com.suscipio_solutions.consecro_mud.Common.interfaces.CMMsg#source()
* @see com.suscipio_solutions.consecro_mud.Common.interfaces.CMMsg#target()
* @see com.suscipio_solutions.consecro_mud.Common.interfaces.CMMsg#sourceCode()
* @see com.suscipio_solutions... | Modifies one of more fields in this event | modify | {
"repo_name": "ConsecroMUD/ConsecroMUD",
"path": "com/suscipio_solutions/consecro_mud/Common/interfaces/CMMsg.java",
"license": "apache-2.0",
"size": 72426
} | [
"com.suscipio_solutions.consecro_mud.core.interfaces.Environmental"
] | import com.suscipio_solutions.consecro_mud.core.interfaces.Environmental; | import com.suscipio_solutions.consecro_mud.core.interfaces.*; | [
"com.suscipio_solutions.consecro_mud"
] | com.suscipio_solutions.consecro_mud; | 1,033,071 |
public int provisionVirtualGuest(User loggedInUser, Integer sid,
String guestName, String profileName, Integer memoryMb,
Integer vcpus, Integer storageGb, String macAddress) {
log.debug("provisionVirtualGuest called.");
// Lookup the server so we can validate it exists and th... | int function(User loggedInUser, Integer sid, String guestName, String profileName, Integer memoryMb, Integer vcpus, Integer storageGb, String macAddress) { log.debug(STR); lookupServer(loggedInUser, sid); KickstartData ksdata = KickstartFactory. lookupKickstartDataByLabelAndOrgId(profileName, loggedInUser .getOrg().get... | /**
* Provision a guest on the server specified.
*
* @param loggedInUser The current user
* @param sid of server to provision guest on
* @param guestName to assign to guest
* @param profileName of Kickstart Profile to use.
* @param memoryMb to allocate to the guest (maxMemory)
* ... | Provision a guest on the server specified | provisionVirtualGuest | {
"repo_name": "jdobes/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java",
"license": "gpl-2.0",
"size": 240801
} | [
"com.redhat.rhn.FaultException",
"com.redhat.rhn.common.conf.ConfigDefaults",
"com.redhat.rhn.common.localization.LocalizationService",
"com.redhat.rhn.domain.kickstart.KickstartData",
"com.redhat.rhn.domain.kickstart.KickstartFactory",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.manager.kickstar... | import com.redhat.rhn.FaultException; import com.redhat.rhn.common.conf.ConfigDefaults; import com.redhat.rhn.common.localization.LocalizationService; import com.redhat.rhn.domain.kickstart.KickstartData; import com.redhat.rhn.domain.kickstart.KickstartFactory; import com.redhat.rhn.domain.user.User; import com.redhat.... | import com.redhat.rhn.*; import com.redhat.rhn.common.conf.*; import com.redhat.rhn.common.localization.*; import com.redhat.rhn.domain.kickstart.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.manager.kickstart.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 2,280,011 |
public double vegaUnderlyingPrice(final InterestRateFutureOptionMarginSecurity security,
final BlackSTIRFuturesProviderInterface blackData) {
// Forward sweep
final double priceFutures = METHOD_FUTURE.price(security.getUnderlyingFuture(), blackData);
final double strike = security.getStrike();
... | double function(final InterestRateFutureOptionMarginSecurity security, final BlackSTIRFuturesProviderInterface blackData) { final double priceFutures = METHOD_FUTURE.price(security.getUnderlyingFuture(), blackData); final double strike = security.getStrike(); final double rateStrike = 1.0 - strike; final EuropeanVanill... | /**
* Computes the option security vega. The future price is computed without convexity adjustment.
* @param security The future option security.
* @param blackData The curve and Black volatility data.
* @return Black lognormal vega.
*/ | Computes the option security vega. The future price is computed without convexity adjustment | vegaUnderlyingPrice | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/future/provider/InterestRateFutureOptionMarginSecurityBlackSTIRFuturesMethod.java",
"license": "apache-2.0",
"size": 10769
} | [
"com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureOptionMarginSecurity",
"com.opengamma.analytics.financial.model.option.pricing.analytic.formula.BlackFunctionData",
"com.opengamma.analytics.financial.model.option.pricing.analytic.formula.EuropeanVanillaOption",
"com.opengamm... | import com.opengamma.analytics.financial.interestrate.future.derivative.InterestRateFutureOptionMarginSecurity; import com.opengamma.analytics.financial.model.option.pricing.analytic.formula.BlackFunctionData; import com.opengamma.analytics.financial.model.option.pricing.analytic.formula.EuropeanVanillaOption; import c... | import com.opengamma.analytics.financial.interestrate.future.derivative.*; import com.opengamma.analytics.financial.model.option.pricing.analytic.formula.*; import com.opengamma.analytics.financial.provider.description.interestrate.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 2,493,245 |
public static void setNotificationChannelId(@NonNull String channelName) {
AssertionUtils.notNull(channelName, "channelName");
mChannelId = channelName;
} | static void function(@NonNull String channelName) { AssertionUtils.notNull(channelName, STR); mChannelId = channelName; } | /**
* Set the notification channel name.
*
* @param channelName The channel name.
*/ | Set the notification channel name | setNotificationChannelId | {
"repo_name": "mobgen/halo-android",
"path": "sdk-libs/halo-notifications/src/main/java/com/mobgen/halo/android/notifications/services/NotificationService.java",
"license": "apache-2.0",
"size": 11516
} | [
"android.support.annotation.NonNull",
"com.mobgen.halo.android.framework.common.utils.AssertionUtils"
] | import android.support.annotation.NonNull; import com.mobgen.halo.android.framework.common.utils.AssertionUtils; | import android.support.annotation.*; import com.mobgen.halo.android.framework.common.utils.*; | [
"android.support",
"com.mobgen.halo"
] | android.support; com.mobgen.halo; | 1,466,230 |
public void setJTree(JTree tree) {
this.tree = tree;
} | void function(JTree tree) { this.tree = tree; } | /**
* Sets the JTree attribute of the JMeterTreeListener object.
*
* @param tree
* the new JTree value
*/ | Sets the JTree attribute of the JMeterTreeListener object | setJTree | {
"repo_name": "KemingChen/JMeter-2.13",
"path": "src/core/org/apache/jmeter/gui/tree/JMeterTreeListener.java",
"license": "apache-2.0",
"size": 7931
} | [
"javax.swing.JTree"
] | import javax.swing.JTree; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,385,192 |
private boolean missingTemplates(String batchCorrespondenceTypeCode, String committeeId) {
List<String> missingTemplates = new ArrayList<String>();
BatchCorrespondenceBase batchCorrespondence = lookupBatchCorrespondence(batchCorrespondenceTypeCode);
for (BatchCorrespond... | boolean function(String batchCorrespondenceTypeCode, String committeeId) { List<String> missingTemplates = new ArrayList<String>(); BatchCorrespondenceBase batchCorrespondence = lookupBatchCorrespondence(batchCorrespondenceTypeCode); for (BatchCorrespondenceDetailBase batchCorrespondenceDetail : batchCorrespondence.get... | /**
* Display warning for missing templates.
*/ | Display warning for missing templates | missingTemplates | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/coeus/common/committee/impl/rules/CommitteeActionGenerateBatchCorrespondenceRuleBase.java",
"license": "apache-2.0",
"size": 7433
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.commons.lang3.StringUtils",
"org.kuali.kra.infrastructure.KeyConstants",
"org.kuali.kra.protocol.correspondence.BatchCorrespondenceBase",
"org.kuali.kra.protocol.correspondence.BatchCorrespondenceDetailBase"
] | import java.util.ArrayList; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.kuali.kra.infrastructure.KeyConstants; import org.kuali.kra.protocol.correspondence.BatchCorrespondenceBase; import org.kuali.kra.protocol.correspondence.BatchCorrespondenceDetailBase; | import java.util.*; import org.apache.commons.lang3.*; import org.kuali.kra.infrastructure.*; import org.kuali.kra.protocol.correspondence.*; | [
"java.util",
"org.apache.commons",
"org.kuali.kra"
] | java.util; org.apache.commons; org.kuali.kra; | 1,002,561 |
public void updateInterfaceMap(List<OspfProcess> ospfProcesses) throws Exception {
for (OspfProcess ospfUpdatedProcess : ospfProcesses) {
for (OspfArea updatedArea : ospfUpdatedProcess.areas()) {
for (OspfInterface ospfUpdatedInterface : updatedArea.ospfInterfaceList()) {
... | void function(List<OspfProcess> ospfProcesses) throws Exception { for (OspfProcess ospfUpdatedProcess : ospfProcesses) { for (OspfArea updatedArea : ospfUpdatedProcess.areas()) { for (OspfInterface ospfUpdatedInterface : updatedArea.ospfInterfaceList()) { OspfInterface ospfInterface = ospfInterfaceMap.get(ospfUpdatedIn... | /**
* Updates the interface map with interface details.
*
* @param ospfProcesses updated process instances
* @throws Exception might throws exception
*/ | Updates the interface map with interface details | updateInterfaceMap | {
"repo_name": "Shashikanth-Huawei/bmp",
"path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/OspfInterfaceChannelHandler.java",
"license": "apache-2.0",
"size": 12703
} | [
"java.util.List",
"java.util.Map",
"org.onlab.packet.Ip4Address",
"org.onosproject.ospf.controller.OspfArea",
"org.onosproject.ospf.controller.OspfInterface",
"org.onosproject.ospf.controller.OspfNbr",
"org.onosproject.ospf.controller.OspfProcess",
"org.onosproject.ospf.controller.area.OspfInterfaceIm... | import java.util.List; import java.util.Map; import org.onlab.packet.Ip4Address; import org.onosproject.ospf.controller.OspfArea; import org.onosproject.ospf.controller.OspfInterface; import org.onosproject.ospf.controller.OspfNbr; import org.onosproject.ospf.controller.OspfProcess; import org.onosproject.ospf.controll... | import java.util.*; import org.onlab.packet.*; import org.onosproject.ospf.controller.*; import org.onosproject.ospf.controller.area.*; import org.onosproject.ospf.controller.util.*; import org.onosproject.ospf.protocol.util.*; | [
"java.util",
"org.onlab.packet",
"org.onosproject.ospf"
] | java.util; org.onlab.packet; org.onosproject.ospf; | 1,802,354 |
public static void uninstallHelpContent(final String helpPath) throws SyntaxException, NullPointerException, IllegalArgumentException, IllegalStateException, ContentException, IOException {
if (helpPath == null || helpPath.isEmpty()) {
throw new IllegalArgumentException("Help path can't be null or empty");
... | static void function(final String helpPath) throws SyntaxException, NullPointerException, IllegalArgumentException, IllegalStateException, ContentException, IOException { if (helpPath == null helpPath.isEmpty()) { throw new IllegalArgumentException(STR); } else if (!instance().containsKey(BUILTIN_HELP_PORT)) { throw ne... | /**
* <p>Uninstall help content</p>
* @param helpPath help path in the http://localhost:<port>/<path>
* @throws NullPointerException help when content is null
* @throws IllegalArgumentException when help path is null or empty
* @throws IllegalStateException if help system is not available
* @throws Sy... | Uninstall help content | uninstallHelpContent | {
"repo_name": "chav1961/purelib",
"path": "src/main/java/chav1961/purelib/basic/PureLibSettings.java",
"license": "mit",
"size": 27154
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 224,969 |
public static Properties parseProperties(String propertiesFile, boolean resource) throws IOException {
Properties properties = null;
if (propertiesFile != null) {
properties = new Properties();
InputStream in = null;
if (resource) {
in = FluxParse... | static Properties function(String propertiesFile, boolean resource) throws IOException { Properties properties = null; if (propertiesFile != null) { properties = new Properties(); InputStream in = null; if (resource) { in = FluxParser.class.getResourceAsStream(propertiesFile); } else { in = new FileInputStream(properti... | /**
* Parse filter properties file.
*
* @param propertiesFile properties file for variable substitution
* @param resource whether or not to load properties file from classpath
* @return resulting filter properties
* @throws IOException if there is a problem reading file
*/ | Parse filter properties file | parseProperties | {
"repo_name": "kishorvpatil/incubator-storm",
"path": "flux/flux-core/src/main/java/org/apache/storm/flux/parser/FluxParser.java",
"license": "apache-2.0",
"size": 12190
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.Properties"
] | import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,549,438 |
public void setRawSpatialRDD(JavaRDD<T> rawSpatialRDD)
{
this.rawSpatialRDD = rawSpatialRDD;
} | void function(JavaRDD<T> rawSpatialRDD) { this.rawSpatialRDD = rawSpatialRDD; } | /**
* Sets the raw spatial RDD.
*
* @param rawSpatialRDD the new raw spatial RDD
*/ | Sets the raw spatial RDD | setRawSpatialRDD | {
"repo_name": "Sarwat/GeoSpark",
"path": "core/src/main/java/org/datasyslab/geospark/spatialRDD/SpatialRDD.java",
"license": "mit",
"size": 20880
} | [
"org.apache.spark.api.java.JavaRDD"
] | import org.apache.spark.api.java.JavaRDD; | import org.apache.spark.api.java.*; | [
"org.apache.spark"
] | org.apache.spark; | 677,578 |
private static void initDistributeMenu(JMenu distribute) {
DistributeAction a = new DistributeAction(
DistributeAction.H_SPACING);
a.putValue(Action.SMALL_ICON,
ResourceLoaderWrapper.lookupIcon(
"DistributeHorizontalSpacing"));
J... | static void function(JMenu distribute) { DistributeAction a = new DistributeAction( DistributeAction.H_SPACING); a.putValue(Action.SMALL_ICON, ResourceLoaderWrapper.lookupIcon( STR)); JMenuItem distributeHSpacing = distribute.add(a); setMnemonic(distributeHSpacing, STR); ShortcutMgr.assignAccelerator(distributeHSpacing... | /**
* Initialize submenus of the Distribute menu.
*
* @param distribute
* the Distribute menu
*/ | Initialize submenus of the Distribute menu | initDistributeMenu | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/argouml_diagrams/argouml-app/src/org/argouml/ui/cmd/GenericArgoMenuBar.java",
"license": "gpl-3.0",
"size": 43960
} | [
"javax.swing.Action",
"javax.swing.JMenu",
"javax.swing.JMenuItem",
"org.argouml.application.helpers.ResourceLoaderWrapper",
"org.tigris.gef.base.DistributeAction"
] | import javax.swing.Action; import javax.swing.JMenu; import javax.swing.JMenuItem; import org.argouml.application.helpers.ResourceLoaderWrapper; import org.tigris.gef.base.DistributeAction; | import javax.swing.*; import org.argouml.application.helpers.*; import org.tigris.gef.base.*; | [
"javax.swing",
"org.argouml.application",
"org.tigris.gef"
] | javax.swing; org.argouml.application; org.tigris.gef; | 592,184 |
public void addButton(Widget... buttons) {
for (Widget button : buttons) {
m_buttonPanel.add(button);
}
}
| void function(Widget... buttons) { for (Widget button : buttons) { m_buttonPanel.add(button); } } | /**
* Adds buttons to the view.
*
* @param buttons the buttons that should be added
* */ | Adds buttons to the view | addButton | {
"repo_name": "it-tavis/opencms-core",
"path": "src-gwt/org/opencms/gwt/client/ui/input/category/CmsDataValue.java",
"license": "lgpl-2.1",
"size": 9263
} | [
"com.google.gwt.user.client.ui.Widget"
] | import com.google.gwt.user.client.ui.Widget; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 180,610 |
// set the look and feel to the jgoodies plastic 3d theme
// (looks better across platforms)
try {
UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
} catch (Exception e) {}
| try { UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); } catch (Exception e) {} | /**
* The main method.
*
* @param args the arguments
*/ | The main method | main | {
"repo_name": "ptgrogan/collab",
"path": "src/main/java/edu/mit/collab/DebugMain.java",
"license": "apache-2.0",
"size": 1811
} | [
"com.jgoodies.looks.plastic.Plastic3DLookAndFeel",
"javax.swing.UIManager"
] | import com.jgoodies.looks.plastic.Plastic3DLookAndFeel; import javax.swing.UIManager; | import com.jgoodies.looks.plastic.*; import javax.swing.*; | [
"com.jgoodies.looks",
"javax.swing"
] | com.jgoodies.looks; javax.swing; | 776,565 |
public static void inferAndSetPrimaryKey(long numRows, List<ColStatistics> colStats) {
if (colStats != null) {
for (ColStatistics cs : colStats) {
if (cs != null && cs.getCountDistint() >= numRows) {
cs.setPrimaryKey(true);
}
else if (cs != null && cs.getRange() != null && ... | static void function(long numRows, List<ColStatistics> colStats) { if (colStats != null) { for (ColStatistics cs : colStats) { if (cs != null && cs.getCountDistint() >= numRows) { cs.setPrimaryKey(true); } else if (cs != null && cs.getRange() != null && cs.getRange().minValue != null && cs.getRange().maxValue != null) ... | /**
* Based on the provided column statistics and number of rows, this method infers if the column
* can be primary key. It checks if the difference between the min and max value is equal to
* number of rows specified.
* @param numRows - number of rows
* @param colStats - column statistics
*/ | Based on the provided column statistics and number of rows, this method infers if the column can be primary key. It checks if the difference between the min and max value is equal to number of rows specified | inferAndSetPrimaryKey | {
"repo_name": "nishantmonu51/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java",
"license": "apache-2.0",
"size": 86403
} | [
"java.util.List",
"org.apache.hadoop.hive.ql.plan.ColStatistics"
] | import java.util.List; import org.apache.hadoop.hive.ql.plan.ColStatistics; | import java.util.*; import org.apache.hadoop.hive.ql.plan.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,025,852 |
List<DailyMenu> parse(); | List<DailyMenu> parse(); | /**
* Parses the menu for the whole week
*
* @return parsed weekly menu
*/ | Parses the menu for the whole week | parse | {
"repo_name": "Dominick1993/GD-lunch-Brno",
"path": "src/main/java/com/labuda/gdlunch/parser/WeeklyParser.java",
"license": "gpl-3.0",
"size": 324
} | [
"com.labuda.gdlunch.repository.entity.DailyMenu",
"java.util.List"
] | import com.labuda.gdlunch.repository.entity.DailyMenu; import java.util.List; | import com.labuda.gdlunch.repository.entity.*; import java.util.*; | [
"com.labuda.gdlunch",
"java.util"
] | com.labuda.gdlunch; java.util; | 589,817 |
private void performPackaging(File aarFile)
throws IOException, ArchiverException, ManifestException,
DependencyResolutionRequiredException,
MojoExecutionException {
buildExplodedAar();
// generate aar file
getLog().info("Generating aar " + aarFile.getAb... | void function(File aarFile) throws IOException, ArchiverException, ManifestException, DependencyResolutionRequiredException, MojoExecutionException { buildExplodedAar(); getLog().info(STR + aarFile.getAbsolutePath()); MavenArchiver archiver = new MavenArchiver(); archiver.setArchiver(jarArchiver); archiver.setOutputFil... | /**
* Generates the aar.
*
* @param aarFile the target aar file
* @throws IOException
* @throws ArchiverException
* @throws ManifestException
* @throws DependencyResolutionRequiredException
*
*/ | Generates the aar | performPackaging | {
"repo_name": "apache/axis2-java",
"path": "modules/tool/axis2-aar-maven-plugin/src/main/java/org/apache/axis2/maven2/aar/AarMojo.java",
"license": "apache-2.0",
"size": 4862
} | [
"java.io.File",
"java.io.IOException",
"org.apache.maven.archiver.MavenArchiver",
"org.apache.maven.artifact.Artifact",
"org.apache.maven.artifact.DependencyResolutionRequiredException",
"org.apache.maven.plugin.MojoExecutionException",
"org.codehaus.plexus.archiver.ArchiverException",
"org.codehaus.p... | import java.io.File; import java.io.IOException; import org.apache.maven.archiver.MavenArchiver; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.MojoExecutionException; import org.codehaus.plexus.archiver.ArchiverException... | import java.io.*; import org.apache.maven.archiver.*; import org.apache.maven.artifact.*; import org.apache.maven.plugin.*; import org.codehaus.plexus.archiver.*; import org.codehaus.plexus.archiver.jar.*; | [
"java.io",
"org.apache.maven",
"org.codehaus.plexus"
] | java.io; org.apache.maven; org.codehaus.plexus; | 1,845,416 |
@Test
public void outOfMemoryErrorInLeafExecution() throws Exception {
MyLeaf child = spy(new MyLeaf(UniqueId.root("leaf", "leaf")));
OutOfMemoryError outOfMemoryError = new OutOfMemoryError("in test");
stub(child.execute(rootContext)).toThrow(outOfMemoryError);
root.addChild(child);
Throwable actualExce... | void function() throws Exception { MyLeaf child = spy(new MyLeaf(UniqueId.root("leaf", "leaf"))); OutOfMemoryError outOfMemoryError = new OutOfMemoryError(STR); stub(child.execute(rootContext)).toThrow(outOfMemoryError); root.addChild(child); Throwable actualException = expectThrows(OutOfMemoryError.class, () -> execut... | /**
* Verifies support for blacklisted exceptions.
*/ | Verifies support for blacklisted exceptions | outOfMemoryErrorInLeafExecution | {
"repo_name": "marcphilipp/junit5",
"path": "junit-tests/src/test/java/org/junit/gen5/engine/support/hierarchical/HierarchicalTestExecutorTests.java",
"license": "epl-1.0",
"size": 15427
} | [
"org.junit.gen5.api.Assertions",
"org.junit.gen5.engine.UniqueId",
"org.junit.gen5.engine.support.descriptor.AbstractTestDescriptor",
"org.mockito.Mockito"
] | import org.junit.gen5.api.Assertions; import org.junit.gen5.engine.UniqueId; import org.junit.gen5.engine.support.descriptor.AbstractTestDescriptor; import org.mockito.Mockito; | import org.junit.gen5.api.*; import org.junit.gen5.engine.*; import org.junit.gen5.engine.support.descriptor.*; import org.mockito.*; | [
"org.junit.gen5",
"org.mockito"
] | org.junit.gen5; org.mockito; | 616,289 |
@Test
public void setupPathExplicitPathInfoStrictD2Fail() {
build4RouterTopo(false, false, false, false, 0);
List<ExplicitPathInfo> explicitPathInfoList = Lists.newLinkedList();
ExplicitPathInfo obj = new ExplicitPathInfo(ExplicitPathInfo.Type.STRICT,
D2.deviceId());
... | void function() { build4RouterTopo(false, false, false, false, 0); List<ExplicitPathInfo> explicitPathInfoList = Lists.newLinkedList(); ExplicitPathInfo obj = new ExplicitPathInfo(ExplicitPathInfo.Type.STRICT, D2.deviceId()); explicitPathInfoList.add(obj); boolean result = pceManager.setupPath(D1.deviceId(), D5.deviceI... | /**
* Tests path setup with explicit path with strict node D2 - without reacble
* to src - path fails.
*/ | Tests path setup with explicit path with strict node D2 - without reacble to src - path fails | setupPathExplicitPathInfoStrictD2Fail | {
"repo_name": "donNewtonAlpha/onos",
"path": "apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PceManagerTest.java",
"license": "apache-2.0",
"size": 63054
} | [
"com.google.common.collect.Lists",
"java.util.List",
"org.hamcrest.MatcherAssert",
"org.hamcrest.core.Is"
] | import com.google.common.collect.Lists; import java.util.List; import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; | import com.google.common.collect.*; import java.util.*; import org.hamcrest.*; import org.hamcrest.core.*; | [
"com.google.common",
"java.util",
"org.hamcrest",
"org.hamcrest.core"
] | com.google.common; java.util; org.hamcrest; org.hamcrest.core; | 1,583,384 |
@SafeVarargs
static <T> StreamMessage<T> of(T... objs) {
requireNonNull(objs, "objs");
switch (objs.length) {
case 0:
return of();
case 1:
return of(objs[0]);
case 2:
return of(objs[0], objs[1]);
case... | static <T> StreamMessage<T> of(T... objs) { requireNonNull(objs, "objs"); switch (objs.length) { case 0: return of(); case 1: return of(objs[0]); case 2: return of(objs[0], objs[1]); case 3: return of(objs[0], objs[1], objs[2]); default: for (int i = 0; i < objs.length; i++) { if (objs[i] == null) { throw new NullPoint... | /**
* Creates a new {@link StreamMessage} that will publish the given {@code objs}.
*/ | Creates a new <code>StreamMessage</code> that will publish the given objs | of | {
"repo_name": "kojilin/armeria",
"path": "core/src/main/java/com/linecorp/armeria/common/stream/StreamMessage.java",
"license": "apache-2.0",
"size": 30730
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,251,019 |
public GetEnrollmentOptions sisUserId(List<String> sisUserIds) {
optionsMap.put("sis_user_id[]", sisUserIds);
return this;
} | GetEnrollmentOptions function(List<String> sisUserIds) { optionsMap.put(STR, sisUserIds); return this; } | /**
* Only return enrollments for the specified SIS user IDs.
* @param sisUserIds SIS user Ids
* @return This object to allow adding more options
*/ | Only return enrollments for the specified SIS user IDs | sisUserId | {
"repo_name": "kstateome/canvas-api",
"path": "src/main/java/edu/ksu/canvas/requestOptions/GetEnrollmentOptions.java",
"license": "lgpl-3.0",
"size": 6064
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,655,646 |
public final Property<SecuritySource> securitySource() {
return metaBean().securitySource().createProperty(this);
} | final Property<SecuritySource> function() { return metaBean().securitySource().createProperty(this); } | /**
* Gets the the {@code securitySource} property.
* @return the property, not null
*/ | Gets the the securitySource property | securitySource | {
"repo_name": "McLeodMoores/starling",
"path": "projects/integration/src/main/java/com/opengamma/integration/cashflow/PaymentServiceComponentFactory.java",
"license": "apache-2.0",
"size": 14733
} | [
"com.opengamma.core.security.SecuritySource",
"org.joda.beans.Property"
] | import com.opengamma.core.security.SecuritySource; import org.joda.beans.Property; | import com.opengamma.core.security.*; import org.joda.beans.*; | [
"com.opengamma.core",
"org.joda.beans"
] | com.opengamma.core; org.joda.beans; | 1,094,279 |
Token mSTRING() {
//{setText(getText().substring(1, getText().length()-1));}
boolean sawEscape = false;
StringBuilder buf = new StringBuilder();
buf.append(c);
consume();
while ( c!='"' ) {
if ( c=='\\' ) {
sawEscape = true;
... | Token mSTRING() { boolean sawEscape = false; StringBuilder buf = new StringBuilder(); buf.append(c); consume(); while ( c!='STR', input); re.line = input.getLine(); re.charPositionInLine = input.getCharPositionInLine(); errMgr.lexerError(input.getSourceName(), STR, templateToken, re); break; } } buf.append(c); consume(... | /** <pre>
* STRING : '"'
* ( '\\' '"'
* | '\\' ~'"'
* | ~('\\'|'"')
* )*
* '"'
* ;
* </pre>
*/ | <code> STRING : '"' ( '\\' '"' | '\\' ~'"' | ~('\\'|'"') ) '"' ; </code> | mSTRING | {
"repo_name": "antlr/codebuff",
"path": "output/java8/1.4.13/STLexer.java",
"license": "bsd-2-clause",
"size": 23956
} | [
"org.antlr.runtime.Token"
] | import org.antlr.runtime.Token; | import org.antlr.runtime.*; | [
"org.antlr.runtime"
] | org.antlr.runtime; | 562,776 |
@Private
@VisibleForTesting
public static RetryPolicy createRetryPolicy(Configuration conf) {
long rmConnectWaitMS =
conf.getLong(
YarnConfiguration.RESOURCEMANAGER_CONNECT_MAX_WAIT_MS,
YarnConfiguration.DEFAULT_RESOURCEMANAGER_CONNECT_MAX_WAIT_MS);
long rmConnectionRetryIn... | static RetryPolicy function(Configuration conf) { long rmConnectWaitMS = conf.getLong( YarnConfiguration.RESOURCEMANAGER_CONNECT_MAX_WAIT_MS, YarnConfiguration.DEFAULT_RESOURCEMANAGER_CONNECT_MAX_WAIT_MS); long rmConnectionRetryIntervalMS = conf.getLong( YarnConfiguration.RESOURCEMANAGER_CONNECT_RETRY_INTERVAL_MS, Yarn... | /**
* Fetch retry policy from Configuration
*/ | Fetch retry policy from Configuration | createRetryPolicy | {
"repo_name": "Microsoft-CISL/hadoop-prototype",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/RMProxy.java",
"license": "apache-2.0",
"size": 9981
} | [
"java.io.EOFException",
"java.io.IOException",
"java.net.ConnectException",
"java.net.NoRouteToHostException",
"java.net.SocketException",
"java.net.UnknownHostException",
"java.util.HashMap",
"java.util.Map",
"java.util.concurrent.TimeUnit",
"org.apache.hadoop.conf.Configuration",
"org.apache.h... | import java.io.EOFException; import java.io.IOException; import java.net.ConnectException; import java.net.NoRouteToHostException; import java.net.SocketException; import java.net.UnknownHostException; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; import org.apache.hadoop.conf.Co... | import java.io.*; import java.net.*; import java.util.*; import java.util.concurrent.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.io.retry.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.net.*; import org.apache.hadoop.yarn.conf.*; import org.apache.hadoop.yarn.exceptions.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.hadoop"
] | java.io; java.net; java.util; org.apache.hadoop; | 1,527,152 |
@Override
public Object[] convertCarbonSchemaToSparkSchema(CarbonColumn[] carbonColumns) {
StructField[] fields = new StructField[carbonColumns.length];
for (int i = 0; i < carbonColumns.length; i++) {
CarbonColumn carbonColumn = carbonColumns[i];
if (carbonColumn.isDimension()) {
if (ca... | Object[] function(CarbonColumn[] carbonColumns) { StructField[] fields = new StructField[carbonColumns.length]; for (int i = 0; i < carbonColumns.length; i++) { CarbonColumn carbonColumn = carbonColumns[i]; if (carbonColumn.isDimension()) { if (carbonColumn.hasEncoding(Encoding.DIRECT_DICTIONARY)) { DirectDictionaryGen... | /**
* convert from CarbonColumn array to Spark's StructField array
*/ | convert from CarbonColumn array to Spark's StructField array | convertCarbonSchemaToSparkSchema | {
"repo_name": "jackylk/incubator-carbondata",
"path": "integration/spark/src/main/scala/org/apache/carbondata/converter/SparkDataTypeConverterImpl.java",
"license": "apache-2.0",
"size": 8139
} | [
"org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryGenerator",
"org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryKeyGeneratorFactory",
"org.apache.carbondata.core.metadata.datatype.DataType",
"org.apache.carbondata.core.metadata.encoder.Encoding",
"org.apache.c... | import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryGenerator; import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryKeyGeneratorFactory; import org.apache.carbondata.core.metadata.datatype.DataType; import org.apache.carbondata.core.metadata.encoder.Encoding; impor... | import org.apache.carbondata.core.keygenerator.directdictionary.*; import org.apache.carbondata.core.metadata.datatype.*; import org.apache.carbondata.core.metadata.encoder.*; import org.apache.carbondata.core.metadata.schema.table.column.*; import org.apache.spark.sql.types.*; | [
"org.apache.carbondata",
"org.apache.spark"
] | org.apache.carbondata; org.apache.spark; | 1,460,847 |
public static void turnLeft() {
Robi2.turn(-100);
System.out.println("Rotating anticlockwise");
}
| static void function() { Robi2.turn(-100); System.out.println(STR); } | /**
* Turn left around (anticlockwise).
*/ | Turn left around (anticlockwise) | turnLeft | {
"repo_name": "AaronLeander/runtime-library",
"path": "src/ch/ntb/inf/deep/runtime/mpc555/demo/Robi2MotorDemo.java",
"license": "apache-2.0",
"size": 3719
} | [
"ch.ntb.inf.deep.runtime.mpc555.driver.Robi2"
] | import ch.ntb.inf.deep.runtime.mpc555.driver.Robi2; | import ch.ntb.inf.deep.runtime.mpc555.driver.*; | [
"ch.ntb.inf"
] | ch.ntb.inf; | 2,389,650 |
public Date getUpdated() {
return updated;
} | Date function() { return updated; } | /**
* Returns the time stamp for when the example was last updated.
*
* @return a time stamp of example's last update
*/ | Returns the time stamp for when the example was last updated | getUpdated | {
"repo_name": "JoshSharpe/java-sdk",
"path": "conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/model/workspace/entity/ValueExportResponse.java",
"license": "apache-2.0",
"size": 577
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,682,539 |
@Idempotent
public String getLinkTarget(String path) throws AccessControlException,
FileNotFoundException, IOException; | String function(String path) throws AccessControlException, FileNotFoundException, IOException; | /**
* Return the target of the given symlink. If there is an intermediate
* symlink in the path (ie a symlink leading up to the final path component)
* then the given path is returned with this symlink resolved.
*
* @param path The path with a link that needs resolution.
* @return The path after resol... | Return the target of the given symlink. If there is an intermediate symlink in the path (ie a symlink leading up to the final path component) then the given path is returned with this symlink resolved | getLinkTarget | {
"repo_name": "bysslord/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 58964
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"org.apache.hadoop.security.AccessControlException"
] | import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.security.AccessControlException; | import java.io.*; import org.apache.hadoop.security.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,063,236 |
public static <T> T field(Class<?> cls, String fieldName) throws IgniteCheckedException {
assert cls != null;
assert fieldName != null;
try {
for (Class c = cls; cls != Object.class; cls = cls.getSuperclass()) {
for (Field field : c.getDeclaredFields()) {
... | static <T> T function(Class<?> cls, String fieldName) throws IgniteCheckedException { assert cls != null; assert fieldName != null; try { for (Class c = cls; cls != Object.class; cls = cls.getSuperclass()) { for (Field field : c.getDeclaredFields()) { if (field.getName().equals(fieldName)) { if (!Modifier.isStatic(fiel... | /**
* Gets field value.
*
* @param cls Class.
* @param fieldName Field name.
* @return Field value.
* @throws IgniteCheckedException If static field with given name cannot be retreived.
*/ | Gets field value | field | {
"repo_name": "apache/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 387878
} | [
"java.lang.reflect.Field",
"java.lang.reflect.Modifier",
"org.apache.ignite.IgniteCheckedException"
] | import java.lang.reflect.Field; import java.lang.reflect.Modifier; import org.apache.ignite.IgniteCheckedException; | import java.lang.reflect.*; import org.apache.ignite.*; | [
"java.lang",
"org.apache.ignite"
] | java.lang; org.apache.ignite; | 1,234,849 |
public long tripLength() {
long length = 0;
List<GeoPosition> stops = getDirections();
logger.debug("0th stop is: " + stops.get(0));
for (int i = 0; i < stops.size() - 1; i++) {
logger.debug((i + 1) + "th stop is: " + stops.get(i + 1).toString());
length += stops.get(i).lengthTo(stops.get(i + 1))... | long function() { long length = 0; List<GeoPosition> stops = getDirections(); logger.debug(STR + stops.get(0)); for (int i = 0; i < stops.size() - 1; i++) { logger.debug((i + 1) + STR + stops.get(i + 1).toString()); length += stops.get(i).lengthTo(stops.get(i + 1)); } return length; } | /**
* Calculates the distance, beginning at the start, visiting the pickup
* locations, the dropoff locations, then the end location
*
* @return The optimal distance this trip can be given all its detours as an
* int. What the int represents could be time or distance
*/ | Calculates the distance, beginning at the start, visiting the pickup locations, the dropoff locations, then the end location | tripLength | {
"repo_name": "FDevman/Car-Pool",
"path": "src/main/java/carPool/domain/Trip.java",
"license": "apache-2.0",
"size": 3994
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,770,087 |
public static ViewDragHelper create(ViewGroup forParent, float sensitivity,
Callback cb) {
final ViewDragHelper helper = create(forParent, cb);
helper.mTouchSlop = (int) (helper.mTouchSlop * (1 / sensitivity));
return helper;
}
private ViewDragHelper(Context context, ViewGroup forParent, Callback cb) {... | static ViewDragHelper function(ViewGroup forParent, float sensitivity, Callback cb) { final ViewDragHelper helper = create(forParent, cb); helper.mTouchSlop = (int) (helper.mTouchSlop * (1 / sensitivity)); return helper; } private ViewDragHelper(Context context, ViewGroup forParent, Callback cb) { if (forParent == null... | /**
* Factory method to create a new ViewDragHelper.
*
* @param forParent
* Parent view to monitor
* @param sensitivity
* Multiplier for how sensitive the helper should be about
* detecting the start of a drag. Larger values are more
* sensitive. 1.0f is norm... | Factory method to create a new ViewDragHelper | create | {
"repo_name": "lgtianxiawudi/StudyDemo",
"path": "Commonlibrary/src/main/java/com/example/ligang/commonlibrary/swipeback/ViewDragHelper.java",
"license": "apache-2.0",
"size": 53222
} | [
"android.content.Context",
"android.support.v4.widget.ScrollerCompat",
"android.view.ViewConfiguration",
"android.view.ViewGroup"
] | import android.content.Context; import android.support.v4.widget.ScrollerCompat; import android.view.ViewConfiguration; import android.view.ViewGroup; | import android.content.*; import android.support.v4.widget.*; import android.view.*; | [
"android.content",
"android.support",
"android.view"
] | android.content; android.support; android.view; | 1,035,537 |
public static Configuration createConfiguration(
Collection<Path> jarFiles, Collection<URL> classPaths) {
Configuration config = new Configuration();
ConfigUtils.encodeCollectionToConfig(
config,
PipelineOptions.JARS,
jarFiles,
... | static Configuration function( Collection<Path> jarFiles, Collection<URL> classPaths) { Configuration config = new Configuration(); ConfigUtils.encodeCollectionToConfig( config, PipelineOptions.JARS, jarFiles, MiniClusterPipelineExecutorServiceLoader::getAbsoluteURL); ConfigUtils.encodeCollectionToConfig( config, Pipel... | /**
* Populates a {@link Configuration} that is compatible with this {@link
* MiniClusterPipelineExecutorServiceLoader}.
*/ | Populates a <code>Configuration</code> that is compatible with this <code>MiniClusterPipelineExecutorServiceLoader</code> | createConfiguration | {
"repo_name": "tillrohrmann/flink",
"path": "flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/test/util/MiniClusterPipelineExecutorServiceLoader.java",
"license": "apache-2.0",
"size": 6180
} | [
"java.util.Collection",
"org.apache.flink.configuration.ConfigUtils",
"org.apache.flink.configuration.Configuration",
"org.apache.flink.configuration.DeploymentOptions",
"org.apache.flink.configuration.PipelineOptions",
"org.apache.flink.core.fs.Path"
] | import java.util.Collection; import org.apache.flink.configuration.ConfigUtils; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.DeploymentOptions; import org.apache.flink.configuration.PipelineOptions; import org.apache.flink.core.fs.Path; | import java.util.*; import org.apache.flink.configuration.*; import org.apache.flink.core.fs.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 801,970 |
List<InvocationListener> getInvocationListeners(); | List<InvocationListener> getInvocationListeners(); | /**
* The invocation listeners attached to this mock, see {@link org.mockito.MockSettings#invocationListeners}.
*/ | The invocation listeners attached to this mock, see <code>org.mockito.MockSettings#invocationListeners</code> | getInvocationListeners | {
"repo_name": "GeeChao/mockito",
"path": "src/org/mockito/mock/MockCreationSettings.java",
"license": "mit",
"size": 2181
} | [
"java.util.List",
"org.mockito.listeners.InvocationListener"
] | import java.util.List; import org.mockito.listeners.InvocationListener; | import java.util.*; import org.mockito.listeners.*; | [
"java.util",
"org.mockito.listeners"
] | java.util; org.mockito.listeners; | 1,256,243 |
public JsStatement enable() {
return new JsQuery(getComponent()).$().chain("draggable", "'enable'");
} | JsStatement function() { return new JsQuery(getComponent()).$().chain(STR, STR); } | /**Method to enable the draggable
* @return the associated JsStatement
*/ | Method to enable the draggable | enable | {
"repo_name": "openengsb-attic/forks-org.odlabs.wiquery",
"path": "src/main/java/org/odlabs/wiquery/ui/draggable/DraggableBehavior.java",
"license": "mit",
"size": 24793
} | [
"org.odlabs.wiquery.core.javascript.JsQuery",
"org.odlabs.wiquery.core.javascript.JsStatement"
] | import org.odlabs.wiquery.core.javascript.JsQuery; import org.odlabs.wiquery.core.javascript.JsStatement; | import org.odlabs.wiquery.core.javascript.*; | [
"org.odlabs.wiquery"
] | org.odlabs.wiquery; | 2,866,792 |
@Test
public void testToString() {
BDD<String> bdd = provider.get("a");
String result = bdd.toString();
Assert.assertEquals("<0:1>", result);
} | void function() { BDD<String> bdd = provider.get("a"); String result = bdd.toString(); Assert.assertEquals("<0:1>", result); } | /**
* Tests the {@link toString} method.
*
*/ | Tests the <code>toString</code> method | testToString | {
"repo_name": "felixreimann/jreliability",
"path": "src/test/java/org/jreliability/bdd/AbstractBDDOperatorTest.java",
"license": "lgpl-3.0",
"size": 19205
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 220,809 |
public void addLSStrategyForOneLSInvestor(String secId_1,
String secId_2,
String traderId,
int maSpreadShortTicks,
int maSpreadLongTicks,
int volWindow,
double entryDivergenceSigmas,
double exitConvergenc... | void function(String secId_1, String secId_2, String traderId, int maSpreadShortTicks, int maSpreadLongTicks, int volWindow, double entryDivergenceSigmas, double exitConvergenceSigmas, double exitStopLossSigmas, double capFactor, MultiplierLS multiplier, PositionUpdateLS positionUpdate) { logger.trace(STR + traderId); ... | /**
* Set up the LS investor '{@code traderId}' with an LS strategy. Call this method as
* many times as there are LS strategies for this LS trader.
*
* @param secId_1 the identifier of the first security that constitutes the spread
* @param secId_2 the identifier of the second security t... | Set up the LS investor 'traderId' with an LS strategy. Call this method as many times as there are LS strategies for this LS trader | addLSStrategyForOneLSInvestor | {
"repo_name": "gitwitcho/var-agent-model",
"path": "agentsimulator/src/info/financialecology/finance/abm/model/TrendValueLSAbmSimulator.java",
"license": "apache-2.0",
"size": 62442
} | [
"info.financialecology.finance.abm.model.agent.Trader",
"info.financialecology.finance.abm.model.strategy.LSMABCStrategy",
"info.financialecology.finance.utilities.Assertion"
] | import info.financialecology.finance.abm.model.agent.Trader; import info.financialecology.finance.abm.model.strategy.LSMABCStrategy; import info.financialecology.finance.utilities.Assertion; | import info.financialecology.finance.abm.model.agent.*; import info.financialecology.finance.abm.model.strategy.*; import info.financialecology.finance.utilities.*; | [
"info.financialecology.finance"
] | info.financialecology.finance; | 2,819,177 |
public MaskingTimeline cloneWithUpdatedTimeline(Timeline timeline) {
return new MaskingTimeline(timeline, replacedInternalWindowUid, replacedInternalPeriodUid);
} | MaskingTimeline function(Timeline timeline) { return new MaskingTimeline(timeline, replacedInternalWindowUid, replacedInternalPeriodUid); } | /**
* Returns a copy with an updated timeline. This keeps the existing period replacement.
*
* @param timeline The new timeline.
*/ | Returns a copy with an updated timeline. This keeps the existing period replacement | cloneWithUpdatedTimeline | {
"repo_name": "ened/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaSource.java",
"license": "apache-2.0",
"size": 16231
} | [
"com.google.android.exoplayer2.Timeline"
] | import com.google.android.exoplayer2.Timeline; | import com.google.android.exoplayer2.*; | [
"com.google.android"
] | com.google.android; | 2,867,566 |
public ContractsGrantsInvoiceDocument getContractsGrantsInvoiceDocument() {
return contractsGrantsInvoiceDocument;
} | ContractsGrantsInvoiceDocument function() { return contractsGrantsInvoiceDocument; } | /**
* Gets the contractsGrantsInvoiceDocument attribute.
*
* @return Returns the contractsGrantsInvoiceDocument.
*/ | Gets the contractsGrantsInvoiceDocument attribute | getContractsGrantsInvoiceDocument | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/validation/impl/ContractsGrantsInvoiceDocumentValidation.java",
"license": "agpl-3.0",
"size": 6542
} | [
"org.kuali.kfs.module.ar.document.ContractsGrantsInvoiceDocument"
] | import org.kuali.kfs.module.ar.document.ContractsGrantsInvoiceDocument; | import org.kuali.kfs.module.ar.document.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,313,486 |
@Override
public ItemsVO doCreateItemsTableIfNot(ItemsVO vo) {
String sql = StringUtilsExt.replaceArrayMerge(SQL_CREATE_ITEMS_TABLE_IF_NOT,
new String[] { "#itemsManageTable#", "#colname#", "#coltype#", "#itemsManageTable#" },
new String[] { vo.getItemsManageTable(), vo.g... | ItemsVO function(ItemsVO vo) { String sql = StringUtilsExt.replaceArrayMerge(SQL_CREATE_ITEMS_TABLE_IF_NOT, new String[] { STR, STR, STR, STR }, new String[] { vo.getItemsManageTable(), vo.getColname(), vo.getColtype(), vo.getItemsManageTable() }); logger.debug(STR, sql); Yank.execute(sql, null); return vo; } | /**************
* ITEMS DAOs *
**************/ | ITEMS DAOs | doCreateItemsTableIfNot | {
"repo_name": "cdjackson/openhab",
"path": "bundles/persistence/org.openhab.persistence.jdbc/java/org/openhab/persistence/jdbc/db/JdbcPostgresqlDAO.java",
"license": "epl-1.0",
"size": 9514
} | [
"org.knowm.yank.Yank",
"org.openhab.persistence.jdbc.model.ItemsVO",
"org.openhab.persistence.jdbc.utils.StringUtilsExt"
] | import org.knowm.yank.Yank; import org.openhab.persistence.jdbc.model.ItemsVO; import org.openhab.persistence.jdbc.utils.StringUtilsExt; | import org.knowm.yank.*; import org.openhab.persistence.jdbc.model.*; import org.openhab.persistence.jdbc.utils.*; | [
"org.knowm.yank",
"org.openhab.persistence"
] | org.knowm.yank; org.openhab.persistence; | 939,672 |
public int readNodeIntoIntBuffer(String outputName, IntBuffer dst) {
Tensor t = getTensor(outputName);
if (t == null) {
return -1;
}
t.writeTo(dst);
return 0;
} | int function(String outputName, IntBuffer dst) { Tensor t = getTensor(outputName); if (t == null) { return -1; } t.writeTo(dst); return 0; } | /**
* Read from a Tensor named {@link outputName} and copy the contents into the <b>direct</b> and
* <b>native ordered</b> java.nio buffer {@link dst}. {@link dst} must have capacity greater than
* or equal to that of the source Tensor. This operation will not affect dst's content past the
* source Tensor's... | Read from a Tensor named <code>outputName</code> and copy the contents into the direct and native ordered java.nio buffer <code>dst</code>. <code>dst</code> must have capacity greater than or equal to that of the source Tensor. This operation will not affect dst's content past the source Tensor's size | readNodeIntoIntBuffer | {
"repo_name": "strint/tensorflow",
"path": "tensorflow/contrib/android/java/org/tensorflow/contrib/android/TensorFlowInferenceInterface.java",
"license": "apache-2.0",
"size": 18966
} | [
"java.nio.IntBuffer",
"org.tensorflow.Tensor"
] | import java.nio.IntBuffer; import org.tensorflow.Tensor; | import java.nio.*; import org.tensorflow.*; | [
"java.nio",
"org.tensorflow"
] | java.nio; org.tensorflow; | 1,591,886 |
public static <E> Iterator<E> compose(Iterator<E> iterator, Callback callback) {
return new CallbackIterator<E>(iterator, callback);
} | static <E> Iterator<E> function(Iterator<E> iterator, Callback callback) { return new CallbackIterator<E>(iterator, callback); } | /**
* Returns the composition of the given iterator and callback.
* <p>
* Note: Any changes to the original iterator will cause the returned
* iterator to change and vice versa. But direct changes on the source
* will not be propagated with the callback.
* </p>
*
* @param ... | Returns the composition of the given iterator and callback. Note: Any changes to the original iterator will cause the returned iterator to change and vice versa. But direct changes on the source will not be propagated with the callback. | compose | {
"repo_name": "cosmocode/cosmocode-commons",
"path": "src/main/java/de/cosmocode/collections/callback/Callbacks.java",
"license": "apache-2.0",
"size": 5183
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,860,292 |
private String getArchiveFilePath(AbstractFile archiveFile) {
try {
return archiveFile.getUniquePath();
} catch (TskCoreException ex) {
return archiveFile.getParentPath() + archiveFile.getName();
}
} | String function(AbstractFile archiveFile) { try { return archiveFile.getUniquePath(); } catch (TskCoreException ex) { return archiveFile.getParentPath() + archiveFile.getName(); } } | /**
* Get the archiveFilePath
*
* @param archiveFile the archiveFile to get the path for
*
* @return the archiveFilePath to be used by the unpack method
*/ | Get the archiveFilePath | getArchiveFilePath | {
"repo_name": "millmanorama/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java",
"license": "apache-2.0",
"size": 69615
} | [
"org.sleuthkit.datamodel.AbstractFile",
"org.sleuthkit.datamodel.TskCoreException"
] | import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.TskCoreException; | import org.sleuthkit.datamodel.*; | [
"org.sleuthkit.datamodel"
] | org.sleuthkit.datamodel; | 2,680,055 |
String getNString(String columnLabel) throws InvalidResultSetAccessException; | String getNString(String columnLabel) throws InvalidResultSetAccessException; | /**
* Retrieve the value of the indicated column in the current row
* as a String (for NCHAR, NVARCHAR, LONGNVARCHAR columns).
* @param columnLabel the column label
* @return a String representing the column value
* @see java.sql.ResultSet#getNString(String)
* @since 4.1.3
*/ | Retrieve the value of the indicated column in the current row as a String (for NCHAR, NVARCHAR, LONGNVARCHAR columns) | getNString | {
"repo_name": "shivpun/spring-framework",
"path": "spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java",
"license": "apache-2.0",
"size": 18959
} | [
"org.springframework.jdbc.InvalidResultSetAccessException"
] | import org.springframework.jdbc.InvalidResultSetAccessException; | import org.springframework.jdbc.*; | [
"org.springframework.jdbc"
] | org.springframework.jdbc; | 1,062,350 |
public static List<PointContent> getLocationPoint(POI poi, Term term) {
List<PointContent> list = new ArrayList<PointContent>();
if (poi == null)
return list;
Location location = poi.getLocation();
PointContent point;
if (location.hasPoints()) {
List<Point> points = location.getPoint();
for (Poi... | static List<PointContent> function(POI poi, Term term) { List<PointContent> list = new ArrayList<PointContent>(); if (poi == null) return list; Location location = poi.getLocation(); PointContent point; if (location.hasPoints()) { List<Point> points = location.getPoint(); for (Point p : points) { if (p.getTerm().equals... | /**
* Gets a list of points of the POI object with the given term. It only
* checks the {@link citysdk.tourism.client.poi.base.Point} geometry.
*
* @param poi
* the object to get the data.
* @param term
* the term to be used.
* @return a list (of
* {@link citysdk.tourism... | Gets a list of points of the POI object with the given term. It only checks the <code>citysdk.tourism.client.poi.base.Point</code> geometry | getLocationPoint | {
"repo_name": "CitySDK/tourism_library_java",
"path": "src/main/java/citysdk/tourism/client/parser/DataReader.java",
"license": "gpl-3.0",
"size": 20542
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 308,142 |
public @Nullable Activity getCurrentActivity() {
if (mCurrentActivity == null) {
return null;
}
return mCurrentActivity.get();
} | @Nullable Activity function() { if (mCurrentActivity == null) { return null; } return mCurrentActivity.get(); } | /**
* Get the activity to which this context is currently attached, or {@code null} if not attached.
* DO NOT HOLD LONG-LIVED REFERENCES TO THE OBJECT RETURNED BY THIS METHOD, AS THIS WILL CAUSE
* MEMORY LEAKS.
*/ | Get the activity to which this context is currently attached, or null if not attached. DO NOT HOLD LONG-LIVED REFERENCES TO THE OBJECT RETURNED BY THIS METHOD, AS THIS WILL CAUSE MEMORY LEAKS | getCurrentActivity | {
"repo_name": "mk007sg/threeSeaShells",
"path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java",
"license": "gpl-3.0",
"size": 10138
} | [
"android.app.Activity",
"javax.annotation.Nullable"
] | import android.app.Activity; import javax.annotation.Nullable; | import android.app.*; import javax.annotation.*; | [
"android.app",
"javax.annotation"
] | android.app; javax.annotation; | 1,169,031 |
public void unregisterFromConference(String conferenceKey) {
if (conferenceKeysToAttend.contains(conferenceKey)) {
conferenceKeysToAttend.remove(conferenceKey);
} else {
throw new IllegalArgumentException("Invalid conferenceKey: " + conferenceKey);
}
}
// TOD... | void function(String conferenceKey) { if (conferenceKeysToAttend.contains(conferenceKey)) { conferenceKeysToAttend.remove(conferenceKey); } else { throw new IllegalArgumentException(STR + conferenceKey); } } String userId; public Profile (String userId, String displayName, String mainEmail, TeeShirtSize teeShirtSize) {... | /**
* Remove the conferenceId from conferenceIdsToAttend.
*
* @param conferenceKey a websafe String representation of the Conference Key.
*/ | Remove the conferenceId from conferenceIdsToAttend | unregisterFromConference | {
"repo_name": "adeon96/practsixpom",
"path": "src/main/java/com/google/devrel/training/conference/domain/Profile.java",
"license": "apache-2.0",
"size": 2626
} | [
"com.google.devrel.training.conference.form.ProfileForm"
] | import com.google.devrel.training.conference.form.ProfileForm; | import com.google.devrel.training.conference.form.*; | [
"com.google.devrel"
] | com.google.devrel; | 485,604 |
public Call<ResponseBody> putEmptyAsync(List<String> arrayBody, final ServiceCallback<Void> serviceCallback) {
if (arrayBody == null) {
serviceCallback.failure(new ServiceException(
new IllegalArgumentException("Parameter arrayBody is required and cannot be null.")));
} | Call<ResponseBody> function(List<String> arrayBody, final ServiceCallback<Void> serviceCallback) { if (arrayBody == null) { serviceCallback.failure(new ServiceException( new IllegalArgumentException(STR))); } | /**
* Set array value empty []
*
* @param arrayBody the List<String> value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
*/ | Set array value empty [] | putEmptyAsync | {
"repo_name": "BretJohnson/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyarray/ArrayImpl.java",
"license": "mit",
"size": 128720
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceException",
"com.squareup.okhttp.ResponseBody",
"java.util.List"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceException; import com.squareup.okhttp.ResponseBody; import java.util.List; | import com.microsoft.rest.*; import com.squareup.okhttp.*; import java.util.*; | [
"com.microsoft.rest",
"com.squareup.okhttp",
"java.util"
] | com.microsoft.rest; com.squareup.okhttp; java.util; | 1,406,129 |
public void saveOrUpdate(ExternalVariable var); | void function(ExternalVariable var); | /**
* Inserts or updates variable in db
*
* @param var
* variable to save
*/ | Inserts or updates variable in db | saveOrUpdate | {
"repo_name": "jtux270/translate",
"path": "ovirt/3.6_source/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/ExternalVariableDao.java",
"license": "gpl-3.0",
"size": 941
} | [
"org.ovirt.engine.core.common.ExternalVariable"
] | import org.ovirt.engine.core.common.ExternalVariable; | import org.ovirt.engine.core.common.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 1,140,674 |
public interface InputManagerFuncs {
void setDisplayViewports(DisplayViewport defaultViewport,
DisplayViewport externalTouchViewport);
}
private final class DisplayManagerHandler extends Handler {
public DisplayManagerHandler(Looper looper) {
super(loope... | interface InputManagerFuncs { void function(DisplayViewport defaultViewport, DisplayViewport externalTouchViewport); } private final class DisplayManagerHandler extends Handler { public DisplayManagerHandler(Looper looper) { super(looper, null, true ); } | /**
* Sets information about the displays as needed by the input system.
* The input system should copy this information if required.
*/ | Sets information about the displays as needed by the input system. The input system should copy this information if required | setDisplayViewports | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/android/server/display/DisplayManagerService.java",
"license": "apache-2.0",
"size": 40117
} | [
"android.os.Handler",
"android.os.Looper"
] | import android.os.Handler; import android.os.Looper; | import android.os.*; | [
"android.os"
] | android.os; | 2,289,942 |
public void setExplorerProjectId(CmsUUID value) {
m_explorerProjectId = value;
} | void function(CmsUUID value) { m_explorerProjectId = value; } | /**
* Sets the explorer project id for the project view.<p>
*
* @param value the explorer project id
*/ | Sets the explorer project id for the project view | setExplorerProjectId | {
"repo_name": "serrapos/opencms-core",
"path": "src/org/opencms/workplace/CmsWorkplaceSettings.java",
"license": "lgpl-2.1",
"size": 20680
} | [
"org.opencms.util.CmsUUID"
] | import org.opencms.util.CmsUUID; | import org.opencms.util.*; | [
"org.opencms.util"
] | org.opencms.util; | 2,299,322 |
@SuppressWarnings("UseBulkOperation")
public List<SqlQuery> getCapturedQueries() {
// Make a copy so that we aren't affected by changes to the list outside of the
// synchronized block
ArrayList<SqlQuery> retVal = new ArrayList<>(CAPACITY);
myQueries.forEach(retVal::add);
return Collections.unmodifiableLi... | @SuppressWarnings(STR) List<SqlQuery> function() { ArrayList<SqlQuery> retVal = new ArrayList<>(CAPACITY); myQueries.forEach(retVal::add); return Collections.unmodifiableList(retVal); } | /**
* Index 0 is oldest
*/ | Index 0 is oldest | getCapturedQueries | {
"repo_name": "SingingTree/hapi-fhir",
"path": "hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/util/CircularQueueCaptureQueriesListener.java",
"license": "apache-2.0",
"size": 10866
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,207,833 |
public DateTime requestTracingExpirationTime() {
return this.requestTracingExpirationTime;
} | DateTime function() { return this.requestTracingExpirationTime; } | /**
* Get request tracing expiration time.
*
* @return the requestTracingExpirationTime value
*/ | Get request tracing expiration time | requestTracingExpirationTime | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2016_08_01/src/main/java/com/microsoft/azure/management/appservice/v2016_08_01/implementation/SiteConfigResourceInner.java",
"license": "mit",
"size": 35368
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 1,258,043 |
public static synchronized void restoreToDefault(TPersonBean personBean, Integer filterType, Integer filterID) {
LOGGER.debug("Restore to default layout for person " + personBean.getLabel() + " filterType " + filterType + " filterID "+filterID);
Integer destinationLayoutID = NavigatorLayoutBL.getLayoutID(personB... | static synchronized void function(TPersonBean personBean, Integer filterType, Integer filterID) { LOGGER.debug(STR + personBean.getLabel() + STR + filterType + STR+filterID); Integer destinationLayoutID = NavigatorLayoutBL.getLayoutID(personBean, filterType, filterID, false); LayoutColumnsBL.deleteByLayout(destinationL... | /**
* Restore the person and or filter specific layout to default layout
* @param personID
* @param filterType
* @param filterID
*/ | Restore the person and or filter specific layout to default layout | restoreToDefault | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/itemNavigator/layout/NavigatorLayoutBL.java",
"license": "gpl-3.0",
"size": 28401
} | [
"com.aurel.track.beans.TPersonBean",
"com.aurel.track.itemNavigator.layout.column.LayoutColumnsBL",
"com.aurel.track.itemNavigator.layout.group.LayoutGroupsBL"
] | import com.aurel.track.beans.TPersonBean; import com.aurel.track.itemNavigator.layout.column.LayoutColumnsBL; import com.aurel.track.itemNavigator.layout.group.LayoutGroupsBL; | import com.aurel.track.*; import com.aurel.track.beans.*; | [
"com.aurel.track"
] | com.aurel.track; | 2,856,495 |
protected void setParams(PKIXParameters params)
{
super.setParams(params);
if (params instanceof ExtendedPKIXBuilderParameters)
{
ExtendedPKIXBuilderParameters _params = (ExtendedPKIXBuilderParameters) params;
maxPathLength = _params.maxPathLength;
exc... | void function(PKIXParameters params) { super.setParams(params); if (params instanceof ExtendedPKIXBuilderParameters) { ExtendedPKIXBuilderParameters _params = (ExtendedPKIXBuilderParameters) params; maxPathLength = _params.maxPathLength; excludedCerts = new HashSet(_params.excludedCerts); } if (params instanceof PKIXBu... | /**
* Can alse handle <code>ExtendedPKIXBuilderParameters</code> and
* <code>PKIXBuilderParameters</code>.
*
* @param params Parameters to set.
* @see org.spongycastle.x509.ExtendedPKIXParameters#setParams(java.security.cert.PKIXParameters)
*/ | Can alse handle <code>ExtendedPKIXBuilderParameters</code> and <code>PKIXBuilderParameters</code> | setParams | {
"repo_name": "Skywalker-11/spongycastle",
"path": "prov/src/main/java/org/spongycastle/x509/ExtendedPKIXBuilderParameters.java",
"license": "mit",
"size": 7236
} | [
"java.security.cert.PKIXBuilderParameters",
"java.security.cert.PKIXParameters",
"java.util.HashSet"
] | import java.security.cert.PKIXBuilderParameters; import java.security.cert.PKIXParameters; import java.util.HashSet; | import java.security.cert.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 116,123 |
final UIContext uic = createUIContext();
final SimpleApp app = new SimpleApp();
sendWComponentRequest(app, uic, 0);
sendWComponentRequest(app, uic, 1);
setActiveContext(uic);
Assert.assertEquals("Incorrect property1 value", "p1_1",
((SimpleFormBean) app.container.getBean()).getProperty1());
Assert.as... | final UIContext uic = createUIContext(); final SimpleApp app = new SimpleApp(); sendWComponentRequest(app, uic, 0); sendWComponentRequest(app, uic, 1); setActiveContext(uic); Assert.assertEquals(STR, "p1_1", ((SimpleFormBean) app.container.getBean()).getProperty1()); Assert.assertEquals(STR, "p2_1", ((SimpleFormBean) a... | /**
* Basic sanity-test to ensure that the WComponent implementation is performing all the processing that it should.
*
* @throws java.lang.Exception an exception
*/ | Basic sanity-test to ensure that the WComponent implementation is performing all the processing that it should | testWComponentAppCorrectness | {
"repo_name": "bordertechorg/wcomponents",
"path": "wcomponents-core/src/test/java/com/github/bordertech/wcomponents/WComponentsPerformance_Test.java",
"license": "gpl-3.0",
"size": 8684
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,250,951 |
public void testLibraryAtPreviewInNewerApp_usingMinSdk()
throws ParserConfigurationException, SAXException, IOException {
String main = ""
+ "<manifest\n"
+ " xmlns:android=\"http://schemas.android.com/apk/res/android\"\n"
+ " package=\"com.e... | void function() throws ParserConfigurationException, SAXException, IOException { String main = STR<manifest\nSTR xmlns:android=\STR package=\STR>\nSTR\nSTR <application android:label=\STR />\nSTR <uses-sdk android:minSdkVersion=\STR\"/>\nSTR\nSTR</manifest>"; String library = STR<manifest\nSTR xmlns:android=\STR xmlns:... | /**
* test illegal importation of a preview library (using the minSdk attribute) in a released
* application.
*/ | test illegal importation of a preview library (using the minSdk attribute) in a released application | testLibraryAtPreviewInNewerApp_usingMinSdk | {
"repo_name": "consulo/consulo-android",
"path": "tools-base/build-system/manifest-merger/src/test/java/com/android/manifmerger/XmlDocumentTest.java",
"license": "apache-2.0",
"size": 91745
} | [
"java.io.IOException",
"javax.xml.parsers.ParserConfigurationException",
"org.xml.sax.SAXException"
] | import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; | import java.io.*; import javax.xml.parsers.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.xml.sax"
] | java.io; javax.xml; org.xml.sax; | 1,203,166 |
public void save( RepositoryElementInterface repositoryElement, String versionComment,
ProgressMonitorListener monitor, boolean overwrite ) throws KettleException; | void function( RepositoryElementInterface repositoryElement, String versionComment, ProgressMonitorListener monitor, boolean overwrite ) throws KettleException; | /**
* Save an object to the repository optionally overwriting any associated objects.
*
* @param repositoryElement
* Object to save
* @param versionComment
* Version comment for update
* @param monitor
* Progress Monitor to report feedback to
* @param overwrite
*... | Save an object to the repository optionally overwriting any associated objects | save | {
"repo_name": "a186/pentaho-kettle",
"path": "engine/src/org/pentaho/di/repository/Repository.java",
"license": "apache-2.0",
"size": 28552
} | [
"org.pentaho.di.core.ProgressMonitorListener",
"org.pentaho.di.core.exception.KettleException"
] | import org.pentaho.di.core.ProgressMonitorListener; import org.pentaho.di.core.exception.KettleException; | import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,566,127 |
public static Color multiply(Color c, int dR, int dG, int dB, int dA) throws NullPointerException {
Objects.requireNonNull(c, NULL_COLOR_MSG);
return makeColor(
c.getRed() * dR,
c.getGreen() * dG,
c.getBlue() * dB,
c.getAlpha() * dA
... | static Color function(Color c, int dR, int dG, int dB, int dA) throws NullPointerException { Objects.requireNonNull(c, NULL_COLOR_MSG); return makeColor( c.getRed() * dR, c.getGreen() * dG, c.getBlue() * dB, c.getAlpha() * dA ); } | /**
* Multiplies the specified deltas to their corresponding channel.
* @param c the source color
* @param dR the change for red channel
* @param dG the change for the green channel
* @param dB the change for the blue channel
* @param dA the change for the alpha channel
* @return the ... | Multiplies the specified deltas to their corresponding channel | multiply | {
"repo_name": "paulmjarosch/pj_jcommon",
"path": "src/pj/common/tools/ColorTools.java",
"license": "mit",
"size": 15665
} | [
"java.awt.Color",
"java.util.Objects"
] | import java.awt.Color; import java.util.Objects; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,322,693 |
@Test
public void testInvalidBase64Signature() {
validator = new ChatMessageValidator(buildPubkeyList(0, 1));
ChatMessage message = buildChatMessage("This is a message!", "This is not valid base64...");
assertFalse(validator.validate(message));
} | void function() { validator = new ChatMessageValidator(buildPubkeyList(0, 1)); ChatMessage message = buildChatMessage(STR, STR); assertFalse(validator.validate(message)); } | /**
* Tests that when the signature is not a valid base64 string, the validator
* simply says the message is not valid.
*/ | Tests that when the signature is not a valid base64 string, the validator simply says the message is not valid | testInvalidBase64Signature | {
"repo_name": "kordianbruck/TumCampusApp",
"path": "app/src/androidTest/java/de/tum/in/tumcampusapp/ChatMessageValidatorTestCase.java",
"license": "gpl-2.0",
"size": 6473
} | [
"de.tum.in.tumcampusapp.auxiliary.ChatMessageValidator",
"de.tum.in.tumcampusapp.models.ChatMessage",
"org.junit.Assert"
] | import de.tum.in.tumcampusapp.auxiliary.ChatMessageValidator; import de.tum.in.tumcampusapp.models.ChatMessage; import org.junit.Assert; | import de.tum.in.tumcampusapp.auxiliary.*; import de.tum.in.tumcampusapp.models.*; import org.junit.*; | [
"de.tum.in",
"org.junit"
] | de.tum.in; org.junit; | 1,027,173 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.