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
@Test public void testEventNotificationManager() { final TaskEventHandler evm = new TaskEventHandler(); final TestEventListener listener = new TestEventListener(); evm.subscribe(listener, StringTaskEvent.class); final StringTaskEvent stringTaskEvent1 = new StringTaskEvent("Test 1"); final StringTaskEve...
void function() { final TaskEventHandler evm = new TaskEventHandler(); final TestEventListener listener = new TestEventListener(); evm.subscribe(listener, StringTaskEvent.class); final StringTaskEvent stringTaskEvent1 = new StringTaskEvent(STR); final StringTaskEvent stringTaskEvent2 = new StringTaskEvent(STR); evm.pub...
/** * Tests the publish/subscribe mechanisms implemented in the {@link TaskEventHandler}. */
Tests the publish/subscribe mechanisms implemented in the <code>TaskEventHandler</code>
testEventNotificationManager
{ "repo_name": "WangTaoTheTonic/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/util/event/TaskEventHandlerTest.java", "license": "apache-2.0", "size": 3067 }
[ "org.apache.flink.runtime.event.task.IntegerTaskEvent", "org.apache.flink.runtime.event.task.StringTaskEvent", "org.apache.flink.runtime.io.network.api.TaskEventHandler", "org.junit.Assert" ]
import org.apache.flink.runtime.event.task.IntegerTaskEvent; import org.apache.flink.runtime.event.task.StringTaskEvent; import org.apache.flink.runtime.io.network.api.TaskEventHandler; import org.junit.Assert;
import org.apache.flink.runtime.event.task.*; import org.apache.flink.runtime.io.network.api.*; import org.junit.*;
[ "org.apache.flink", "org.junit" ]
org.apache.flink; org.junit;
648,859
protected Object readResolve() throws ObjectStreamException { return prj.message(); }
Object function() throws ObjectStreamException { return prj.message(); }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */
Reconstructs object on unmarshalling
readResolve
{ "repo_name": "agura/incubator-ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/IgniteMessagingImpl.java", "license": "apache-2.0", "size": 6909 }
[ "java.io.ObjectStreamException" ]
import java.io.ObjectStreamException;
import java.io.*;
[ "java.io" ]
java.io;
2,801,970
public void useFolder(String folderName) { closeFolderIfOpened(); try { folder = store.getFolder(folderName); } catch (MessagingException msex) { throw new MailException("Failed to connect to folder: " + folderName, msex); } try { folder.open(Folder.READ_WRITE); } catch (MessagingExcept...
void function(String folderName) { closeFolderIfOpened(); try { folder = store.getFolder(folderName); } catch (MessagingException msex) { throw new MailException(STR + folderName, msex); } try { folder.open(Folder.READ_WRITE); } catch (MessagingException ignore) { try { folder.open(Folder.READ_ONLY); } catch (Messaging...
/** * Opens new folder and closes previously opened folder. */
Opens new folder and closes previously opened folder
useFolder
{ "repo_name": "vilmospapp/jodd", "path": "jodd-mail/src/main/java/jodd/mail/ReceiveMailSession.java", "license": "bsd-2-clause", "size": 8363 }
[ "javax.mail.Folder", "javax.mail.MessagingException" ]
import javax.mail.Folder; import javax.mail.MessagingException;
import javax.mail.*;
[ "javax.mail" ]
javax.mail;
2,255,198
@Override public Iterator<E> iterator() { return new Iterator<E>() { private volatile Node<E> x = first; private volatile int it = -1;
Iterator<E> function() { return new Iterator<E>() { private volatile Node<E> x = first; private volatile int it = -1;
/** * Gets iterator. * @return Iterator. */
Gets iterator
iterator
{ "repo_name": "misterflud/aoleynikov", "path": "chapter_007/monitoreSynchronizy/src/main/java/ru/aoleynikov/LinkedContainerConcurrent.java", "license": "apache-2.0", "size": 3869 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
65,238
public CompositeData remove(Object[] key) { if (!(isKeyValid(key))) throw new InvalidKeyException("The key does not match the " + "tabular type of this instance."); return (CompositeData) dataMap.remove(key); } /** * Private method to set the internal {@link...
CompositeData function(Object[] key) { if (!(isKeyValid(key))) throw new InvalidKeyException(STR + STR); return (CompositeData) dataMap.remove(key); } /** * Private method to set the internal {@link java.util.Map}
/** * Removes the {@link CompositeData} value located at the * specified index. <code>null</code> is returned if the * value does not exist. Otherwise, the removed value is * returned. * * @param key the key of the value to remove. * @return the removed value, or <code>null</code> if * ...
Removes the <code>CompositeData</code> value located at the specified index. <code>null</code> is returned if the value does not exist. Otherwise, the removed value is returned
remove
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/management/openmbean/TabularDataSupport.java", "license": "gpl-2.0", "size": 23592 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
529,607
// calculate the starting and entry point of the y-labels (depending on // zoom / contentrect bounds) if (mViewPortHandler.contentWidth() > 10 && !mViewPortHandler.isFullyZoomedOutY()) { PointD p1 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.conten...
if (mViewPortHandler.contentWidth() > 10 && !mViewPortHandler.isFullyZoomedOutY()) { PointD p1 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentTop()); PointD p2 = mTrans.getValuesByTouchPoint(mViewPortHandler.contentLeft(), mViewPortHandler.contentBottom()); if (!mYAxis.isInverted...
/** * Computes the axis values. * * @param yMin - the minimum y-value in the data object for this axis * @param yMax - the maximum y-value in the data object for this axis */
Computes the axis values
computeAxis
{ "repo_name": "Stonesjtu/HEMS", "path": "app/libs/mplib/src/com/github/mikephil/charting/renderer/YAxisRenderer.java", "license": "gpl-2.0", "size": 12461 }
[ "com.github.mikephil.charting.utils.PointD" ]
import com.github.mikephil.charting.utils.PointD;
import com.github.mikephil.charting.utils.*;
[ "com.github.mikephil" ]
com.github.mikephil;
2,328,531
public YangString getRefEntityTagValue() throws JNCException { return (YangString)getValue("ref-entity-tag"); }
YangString function() throws JNCException { return (YangString)getValue(STR); }
/** * Gets the value for child leaf "ref-entity-tag". * @return The value of the leaf. */
Gets the value for child leaf "ref-entity-tag"
getRefEntityTagValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/statistics/gprsMm/General.java", "license": "apache-2.0", "size": 11341 }
[ "com.tailf.jnc.YangString" ]
import com.tailf.jnc.YangString;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
583,326
SlingRepository newSlingRepository();
SlingRepository newSlingRepository();
/** * Get SlingRepository instance. Can be null if a resource resolver factory * is provided, in this case the method * {@link #newResourceResolverFactory()} has to return a value. * @return Sling repository instance or null */
Get SlingRepository instance. Can be null if a resource resolver factory is provided, in this case the method <code>#newResourceResolverFactory()</code> has to return a value
newSlingRepository
{ "repo_name": "dulvac/sling", "path": "testing/mocks/sling-mock/src/main/java/org/apache/sling/testing/mock/sling/spi/ResourceResolverTypeAdapter.java", "license": "apache-2.0", "size": 1759 }
[ "org.apache.sling.jcr.api.SlingRepository" ]
import org.apache.sling.jcr.api.SlingRepository;
import org.apache.sling.jcr.api.*;
[ "org.apache.sling" ]
org.apache.sling;
1,928,477
interface WithVnetName { WithCreate withVnetName(String vnetName); } interface WithCreate extends Creatable<SiteVnetGateway>, DefinitionStages.WithKind, DefinitionStages.WithVnetName { } } interface Update extends Appliable<SiteVnetGateway>...
interface WithVnetName { WithCreate withVnetName(String vnetName); } interface WithCreate extends Creatable<SiteVnetGateway>, DefinitionStages.WithKind, DefinitionStages.WithVnetName { } } interface Update extends Appliable<SiteVnetGateway>, UpdateStages.WithKind, UpdateStages.WithVnetName { }
/** * Specifies vnetName. * @param vnetName The Virtual Network name * @return the next definition stage */
Specifies vnetName
withVnetName
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/appservice/mgmt-v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/SiteVnetGateway.java", "license": "mit", "size": 5416 }
[ "com.microsoft.azure.arm.model.Appliable", "com.microsoft.azure.arm.model.Creatable" ]
import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.model.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,143,970
public static void setDelegateRepaintManager(JComponent component, RepaintManager repaintManager) { AppContext.getAppContext().put(DELEGATE_REPAINT_MANAGER_KEY, Boolean.TRUE); component.putClientProperty...
static void function(JComponent component, RepaintManager repaintManager) { AppContext.getAppContext().put(DELEGATE_REPAINT_MANAGER_KEY, Boolean.TRUE); component.putClientProperty(DELEGATE_REPAINT_MANAGER_KEY, repaintManager); } private static final Map<Container, Boolean> vsyncedMap = Collections.synchronizedMap(new W...
/** * Registers delegate RepaintManager for {@code JComponent}. */
Registers delegate RepaintManager for JComponent
setDelegateRepaintManager
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/com/sun/java/swing/SwingUtilities3.java", "license": "gpl-2.0", "size": 5473 }
[ "java.applet.Applet", "java.awt.Container", "java.awt.Window", "java.util.Collections", "java.util.Map", "java.util.WeakHashMap", "javax.swing.JComponent", "javax.swing.RepaintManager" ]
import java.applet.Applet; import java.awt.Container; import java.awt.Window; import java.util.Collections; import java.util.Map; import java.util.WeakHashMap; import javax.swing.JComponent; import javax.swing.RepaintManager;
import java.applet.*; import java.awt.*; import java.util.*; import javax.swing.*;
[ "java.applet", "java.awt", "java.util", "javax.swing" ]
java.applet; java.awt; java.util; javax.swing;
941,636
private void sendHandShakeMessage(OFType type) throws IOException { // Send initial Features Request List<OFMessage> msglist = new ArrayList<OFMessage>(1); msglist.add(factory.getMessage(type)); channel.write(msglist); }
void function(OFType type) throws IOException { List<OFMessage> msglist = new ArrayList<OFMessage>(1); msglist.add(factory.getMessage(type)); channel.write(msglist); }
/** * Send initial switch setup information that we need before adding * the switch * @throws IOException */
Send initial switch setup information that we need before adding the switch
sendHandShakeMessage
{ "repo_name": "Aliced3645/DataCenterMarketing", "path": "src/main/java/net/floodlightcontroller/core/internal/Controller.java", "license": "apache-2.0", "size": 88361 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.openflow.protocol.OFMessage", "org.openflow.protocol.OFType" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.openflow.protocol.OFMessage; import org.openflow.protocol.OFType;
import java.io.*; import java.util.*; import org.openflow.protocol.*;
[ "java.io", "java.util", "org.openflow.protocol" ]
java.io; java.util; org.openflow.protocol;
896,078
EAttribute getLocatedElement_Row();
EAttribute getLocatedElement_Row();
/** * Returns the meta object for the attribute '{@link org.eclectic.frontend.core.LocatedElement#getRow <em>Row</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Row</em>'. * @see org.eclectic.frontend.core.LocatedElement#getRow() * @see #getLocatedE...
Returns the meta object for the attribute '<code>org.eclectic.frontend.core.LocatedElement#getRow Row</code>'.
getLocatedElement_Row
{ "repo_name": "jesusc/eclectic", "path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/core/CorePackage.java", "license": "gpl-3.0", "size": 187193 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,635,827
private static <R> R invoke(GridCacheContext cctx, long link, MvccClosure<R> clo, MvccSnapshot snapshot) throws IgniteCheckedException { assert cctx.mvccEnabled(); PageMemory pageMem = cctx.dataRegion().pageMemory(); int grpId = cctx.groupId(); int pageSize = pageMem.realPa...
static <R> R function(GridCacheContext cctx, long link, MvccClosure<R> clo, MvccSnapshot snapshot) throws IgniteCheckedException { assert cctx.mvccEnabled(); PageMemory pageMem = cctx.dataRegion().pageMemory(); int grpId = cctx.groupId(); int pageSize = pageMem.realPageSize(grpId); long pageId = pageId(link); int itemI...
/** * Encapsulates common logic for working with row mvcc info: page locking/unlocking, checks and other. * Strategy pattern. * * @param cctx Cache group. * @param link Row link. * @param clo Closure to apply. * @param snapshot Mvcc snapshot. * @param <R> Return type. * @ret...
Encapsulates common logic for working with row mvcc info: page locking/unlocking, checks and other. Strategy pattern
invoke
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUtils.java", "license": "apache-2.0", "size": 36938 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.pagemem.PageIdUtils", "org.apache.ignite.internal.pagemem.PageMemory", "org.apache.ignite.internal.processors.cache.GridCacheContext", "org.apache.ignite.internal.processors.cache.persistence.tree.io.DataPageIO" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.pagemem.PageIdUtils; import org.apache.ignite.internal.pagemem.PageMemory; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.persistence.tree.io.DataPageIO;
import org.apache.ignite.*; import org.apache.ignite.internal.pagemem.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.persistence.tree.io.*;
[ "org.apache.ignite" ]
org.apache.ignite;
235,721
public DatagramSender withTimeToLive(int timeToLive) { Contract.checkState(state == STOPPED, "Sender has already been started"); Contract.checkArgument(timeToLive > 0, "Time to live must be positive: {0}", timeToLive); this.timeToLive = timeToLive; return this; } /** * Sets the traffic class of datagr...
DatagramSender function(int timeToLive) { Contract.checkState(state == STOPPED, STR); Contract.checkArgument(timeToLive > 0, STR, timeToLive); this.timeToLive = timeToLive; return this; } /** * Sets the traffic class of datagrams sent by this sender. * * @throws IllegalArgumentException if {@code trafficClass} is {@cod...
/** * Sets the TTL of multicast packets sent by this sender. * * @throws IllegalArgumentException if {@code timeToLive} is not positive * @throws IllegalStateException if this sender has already been started * * @since 1.0 */
Sets the TTL of multicast packets sent by this sender
withTimeToLive
{ "repo_name": "petrzelenka/sellcom-java", "path": "src/main/java/org/sellcom/core/net/DatagramSender.java", "license": "apache-2.0", "size": 14944 }
[ "org.sellcom.core.Contract" ]
import org.sellcom.core.Contract;
import org.sellcom.core.*;
[ "org.sellcom.core" ]
org.sellcom.core;
2,330,370
private int registerCluster(final OCluster cluster) throws IOException { final int id; if (cluster != null) { // CHECK FOR DUPLICATION OF NAMES if (clusterMap.containsKey(cluster.getName().toLowerCase())) throw new OConfigurationException("Cannot add cluster '" + cluster.getName() ...
int function(final OCluster cluster) throws IOException { final int id; if (cluster != null) { if (clusterMap.containsKey(cluster.getName().toLowerCase())) throw new OConfigurationException(STR + cluster.getName() + STR + name + "'"); clusterMap.put(cluster.getName().toLowerCase(), cluster); id = cluster.getId(); } els...
/** * Register the cluster internally. * * @param cluster * OCluster implementation * @return The id (physical position into the array) of the new cluster just created. First is 0. * @throws IOException */
Register the cluster internally
registerCluster
{ "repo_name": "DiceHoldingsInc/orientdb", "path": "core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OAbstractPaginatedStorage.java", "license": "apache-2.0", "size": 77245 }
[ "com.orientechnologies.orient.core.exception.OConfigurationException", "com.orientechnologies.orient.core.storage.OCluster", "java.io.IOException" ]
import com.orientechnologies.orient.core.exception.OConfigurationException; import com.orientechnologies.orient.core.storage.OCluster; import java.io.IOException;
import com.orientechnologies.orient.core.exception.*; import com.orientechnologies.orient.core.storage.*; import java.io.*;
[ "com.orientechnologies.orient", "java.io" ]
com.orientechnologies.orient; java.io;
661,490
jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); imageDirectory = new javax.swing.JTextField(); pickDirectory = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); uiidCombo = new javax.swing.JComboBox(); jLabel4 = new javax.swing...
jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); imageDirectory = new javax.swing.JTextField(); pickDirectory = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); uiidCombo = new javax.swing.JComboBox(); jLabel4 = new javax.swing.JLabel(); styleState = new javax.swing.JComboBox(); jPa...
/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. always regenerated by the Form Editor
initComponents
{ "repo_name": "sdwolf/CodenameOne", "path": "CodenameOneDesigner/src/com/codename1/designer/Import9Patch.java", "license": "gpl-2.0", "size": 22415 }
[ "javax.swing.DefaultComboBoxModel", "javax.swing.JComboBox" ]
import javax.swing.DefaultComboBoxModel; import javax.swing.JComboBox;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,126,758
public void setGlobalNamingContext (javax.naming.Context globalNamingContext) { this.globalNamingContext = globalNamingContext; }
void function (javax.naming.Context globalNamingContext) { this.globalNamingContext = globalNamingContext; }
/** * Set the global naming resources context. * * @param globalNamingContext The new global naming resource context */
Set the global naming resources context
setGlobalNamingContext
{ "repo_name": "WhiteBearSolutions/WBSAirback", "path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/catalina/core/StandardServer.java", "license": "apache-2.0", "size": 24448 }
[ "org.apache.catalina.Context" ]
import org.apache.catalina.Context;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,778,740
public List<T> findByNamedQuery(String namedQuery, Object... parametersValues) { return createTypedQuery(namedQuery, NO_LIMIT, parametersValues).getResultList(); }
List<T> function(String namedQuery, Object... parametersValues) { return createTypedQuery(namedQuery, NO_LIMIT, parametersValues).getResultList(); }
/** * Query database utilizing the parameterized named query * * @param namedQuery * @param parametersValues optional parameters values specified by named * query * @return result list of executed query */
Query database utilizing the parameterized named query
findByNamedQuery
{ "repo_name": "DesenvolvedoresGoogle/ExpenseMe", "path": "backend/src/main/java/br/com/expenseme/core/GenericCRUDService.java", "license": "apache-2.0", "size": 4649 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,321,579
animateDismiss(Arrays.asList(position)); }
animateDismiss(Arrays.asList(position)); }
/** * Animate dismissal of the item at given position. */
Animate dismissal of the item at given position
animateDismiss
{ "repo_name": "0359xiaodong/android-open-project-demo", "path": "listview-animations-demo/ListviewAnimationLib/src/com/nhaarman/listviewanimations/itemmanipulation/AnimateDismissAdapter.java", "license": "apache-2.0", "size": 5376 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
497,815
private void depthFirstSearch(Content root, ContentCallback callback) { Iterable<Content> children = root.listChildren(); if (children != null) { for (Content child : children) { depthFirstSearch(child, callback); } } callback.callback(root); }
void function(Content root, ContentCallback callback) { Iterable<Content> children = root.listChildren(); if (children != null) { for (Content child : children) { depthFirstSearch(child, callback); } } callback.callback(root); }
/** * Perform a depth-first search, hitting the {@code callback} when a new node is hit. * * @param root * @param callback */
Perform a depth-first search, hitting the callback when a new node is hit
depthFirstSearch
{ "repo_name": "dylanswartz/nakamura", "path": "bundles/resource/src/main/java/org/sakaiproject/nakamura/resource/lite/servlet/post/operations/SakaiDocPagePublishOperation.java", "license": "apache-2.0", "size": 8910 }
[ "org.sakaiproject.nakamura.api.lite.content.Content" ]
import org.sakaiproject.nakamura.api.lite.content.Content;
import org.sakaiproject.nakamura.api.lite.content.*;
[ "org.sakaiproject.nakamura" ]
org.sakaiproject.nakamura;
579,571
public static MozuUrl deleteAccountUrl(Integer accountId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}"); formatter.formatUrl("accountId", accountId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
static MozuUrl function(Integer accountId) { UrlFormatter formatter = new UrlFormatter(STR); formatter.formatUrl(STR, accountId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
/** * Get Resource Url for DeleteAccount * @param accountId Unique identifier of the customer account. * @return String Resource Url */
Get Resource Url for DeleteAccount
deleteAccountUrl
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java", "license": "mit", "size": 13535 }
[ "com.mozu.api.MozuUrl", "com.mozu.api.utils.UrlFormatter" ]
import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter;
import com.mozu.api.*; import com.mozu.api.utils.*;
[ "com.mozu.api" ]
com.mozu.api;
2,667,114
public CodeListValue readCIRoleCode(XMLStreamReader reader) throws XMLStreamException { boolean found = checkElementName(reader, "CI_RoleCode"); if (!found) throw new XMLStreamException(ERROR_INVALID_ELT + reader.getName() + errorLocationString(reader)); return ns1Bi...
CodeListValue function(XMLStreamReader reader) throws XMLStreamException { boolean found = checkElementName(reader, STR); if (!found) throw new XMLStreamException(ERROR_INVALID_ELT + reader.getName() + errorLocationString(reader)); return ns1Bindings.readCodeListValueType(reader); }
/** * Read method for CIRoleCode elements */
Read method for CIRoleCode elements
readCIRoleCode
{ "repo_name": "sensiasoft/lib-sensorml", "path": "sensorml-core/src/main/java/org/isotc211/v2005/gmd/bind/XMLStreamBindings.java", "license": "mpl-2.0", "size": 80004 }
[ "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamReader", "org.isotc211.v2005.gco.CodeListValue" ]
import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.isotc211.v2005.gco.CodeListValue;
import javax.xml.stream.*; import org.isotc211.v2005.gco.*;
[ "javax.xml", "org.isotc211.v2005" ]
javax.xml; org.isotc211.v2005;
2,643,633
try { return (ApplicationConfig)new ApplicationConfigDAO() .getSession() .createCriteria(ApplicationConfig.class) .add(Restrictions.eq("key", key)) .setCacheable(true) .uniqueResult(); } catch (Exception e) { Debug.error...
try { return (ApplicationConfig)new ApplicationConfigDAO() .getSession() .createCriteria(ApplicationConfig.class) .add(Restrictions.eq("key", key)) .setCacheable(true) .uniqueResult(); } catch (Exception e) { Debug.error(e); return null; } }
/** * Get the config object for a given key * @param key Configuration key * @return Object if found, null otherwise */
Get the config object for a given key
getConfig
{ "repo_name": "UniTime/unitime", "path": "JavaSource/org/unitime/timetable/model/ApplicationConfig.java", "license": "apache-2.0", "size": 4478 }
[ "org.hibernate.criterion.Restrictions", "org.unitime.commons.Debug", "org.unitime.timetable.model.dao.ApplicationConfigDAO" ]
import org.hibernate.criterion.Restrictions; import org.unitime.commons.Debug; import org.unitime.timetable.model.dao.ApplicationConfigDAO;
import org.hibernate.criterion.*; import org.unitime.commons.*; import org.unitime.timetable.model.dao.*;
[ "org.hibernate.criterion", "org.unitime.commons", "org.unitime.timetable" ]
org.hibernate.criterion; org.unitime.commons; org.unitime.timetable;
2,471,296
CallbackRegistry callbackRegistry = getCallbackRegistry(); callbackRegistry.addCallback(discoveryCallback); }
CallbackRegistry callbackRegistry = getCallbackRegistry(); callbackRegistry.addCallback(discoveryCallback); }
/** * This method is executed after the instanciation of the whole class. It is used to initialize * the implemented callbacks and make them known to the HiveMQ core. */
This method is executed after the instanciation of the whole class. It is used to initialize the implemented callbacks and make them known to the HiveMQ core
postConstruct
{ "repo_name": "hivemq/s3-cluster-discovery-plugin", "path": "src/main/java/com/hivemq/plugin/plugin/S3DiscoveryPluginEntryPoint.java", "license": "apache-2.0", "size": 1792 }
[ "com.hivemq.spi.callback.registry.CallbackRegistry" ]
import com.hivemq.spi.callback.registry.CallbackRegistry;
import com.hivemq.spi.callback.registry.*;
[ "com.hivemq.spi" ]
com.hivemq.spi;
1,862,974
public void setAttribute(String name, String value, String facet) throws JspException { if (name != null) { if (name.equals(VALUE)) { String s = Bundle.getString("Tags_AttributeMayNotBeSet", new Object[]{name}); registerTagError(s, null); ...
void function(String name, String value, String facet) throws JspException { if (name != null) { if (name.equals(VALUE)) { String s = Bundle.getString(STR, new Object[]{name}); registerTagError(s, null); } } super.setAttribute(name, value, facet); }
/** * Base support for the attribute tag. This is overridden to prevent setting the <code>value</code> * attribute. * @param name The name of the attribute * @param value The value of the attribute */
Base support for the attribute tag. This is overridden to prevent setting the <code>value</code> attribute
setAttribute
{ "repo_name": "moparisthebest/beehive", "path": "beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/SelectOption.java", "license": "apache-2.0", "size": 11950 }
[ "javax.servlet.jsp.JspException", "org.apache.beehive.netui.util.Bundle" ]
import javax.servlet.jsp.JspException; import org.apache.beehive.netui.util.Bundle;
import javax.servlet.jsp.*; import org.apache.beehive.netui.util.*;
[ "javax.servlet", "org.apache.beehive" ]
javax.servlet; org.apache.beehive;
2,407,109
private void createChildren() { if (m_database.isLoaded()) { for (final INaviModule module : m_database.getContent().getModules()) { add(new CModuleNode(module, m_model, m_actionProvider)); } } }
void function() { if (m_database.isLoaded()) { for (final INaviModule module : m_database.getContent().getModules()) { add(new CModuleNode(module, m_model, m_actionProvider)); } } }
/** * Creates one child node for each module in the database. */
Creates one child node for each module in the database
createChildren
{ "repo_name": "guiquanz/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/FunctionSelection/CRootNode.java", "license": "apache-2.0", "size": 2669 }
[ "com.google.security.zynamics.binnavi.disassembly.INaviModule" ]
import com.google.security.zynamics.binnavi.disassembly.INaviModule;
import com.google.security.zynamics.binnavi.disassembly.*;
[ "com.google.security" ]
com.google.security;
2,249,064
public static BufferedImage loadCompatibleImage(URL resource) throws IOException { BufferedImage image = ImageIO.read(resource); return toCompatibleImage(image); }
static BufferedImage function(URL resource) throws IOException { BufferedImage image = ImageIO.read(resource); return toCompatibleImage(image); }
/** * <p>Returns a new compatible image from a URL. The image is loaded from the * specified location and then turned, if necessary into a compatible * image.</p> * * @see #createCompatibleImage(java.awt.image.BufferedImage) * @see #createCompatibleImage(java.awt.image.BufferedImage, int, ...
Returns a new compatible image from a URL. The image is loaded from the specified location and then turned, if necessary into a compatible image
loadCompatibleImage
{ "repo_name": "szabob94/vedes4", "path": "jxmap_osm/src/main/java/org/jxmapviewer/util/GraphicsUtilities.java", "license": "gpl-3.0", "size": 36241 }
[ "java.awt.image.BufferedImage", "java.io.IOException", "javax.imageio.ImageIO" ]
import java.awt.image.BufferedImage; import java.io.IOException; import javax.imageio.ImageIO;
import java.awt.image.*; import java.io.*; import javax.imageio.*;
[ "java.awt", "java.io", "javax.imageio" ]
java.awt; java.io; javax.imageio;
2,470,644
public ArrayList<Photo> getPhotosetsPhotos(String photosetId, String userId){ String _url = Uri.parse(END_POINT).buildUpon() .appendQueryParameter("method", PHOTOSET_PHOTOS_METHOD) .appendQueryParameter("api_key", API_KEY) .appendQueryParameter("format", OUTPU...
ArrayList<Photo> function(String photosetId, String userId){ String _url = Uri.parse(END_POINT).buildUpon() .appendQueryParameter(STR, PHOTOSET_PHOTOS_METHOD) .appendQueryParameter(STR, API_KEY) .appendQueryParameter(STR, OUTPUT_FORMAT) .appendQueryParameter(STR, photosetId) .appendQueryParameter(STR, userId) .appendQu...
/** * A method to get photoset photos * @param photosetId photo set id * @param userId user id * @return a list of photo */
A method to get photoset photos
getPhotosetsPhotos
{ "repo_name": "TwentySevenC/Flickr-Photos", "path": "FlichrPhotos/app/src/main/java/com/android/liujian/flichrphotos/control/Flickr.java", "license": "lgpl-3.0", "size": 15960 }
[ "android.net.Uri", "com.android.liujian.flichrphotos.model.Photo", "java.util.ArrayList" ]
import android.net.Uri; import com.android.liujian.flichrphotos.model.Photo; import java.util.ArrayList;
import android.net.*; import com.android.liujian.flichrphotos.model.*; import java.util.*;
[ "android.net", "com.android.liujian", "java.util" ]
android.net; com.android.liujian; java.util;
279,854
public List<Pair<DataType<?>, Double>> getMatchingDataTypes(ImportWizardModelColumn column) { if (wizardColumns.indexOf(column) == -1) { throw new IllegalArgumentException(Resources.getMessage("ImportWizardModel.0")); //$NON-NLS-1$ } Data data = Data.create(getPreview...
List<Pair<DataType<?>, Double>> function(ImportWizardModelColumn column) { if (wizardColumns.indexOf(column) == -1) { throw new IllegalArgumentException(Resources.getMessage(STR)); } Data data = Data.create(getPreviewData()); int columnIndex = -1; ImportColumn c = column.getColumn(); if (c instanceof ImportColumnIndexe...
/** * Returns a list of matching data types * @param column */
Returns a list of matching data types
getMatchingDataTypes
{ "repo_name": "COWYARD/arx", "path": "src/gui/org/deidentifier/arx/gui/view/impl/wizard/ImportWizardModel.java", "license": "apache-2.0", "size": 12087 }
[ "java.util.List", "org.apache.commons.math3.util.Pair", "org.deidentifier.arx.Data", "org.deidentifier.arx.DataType", "org.deidentifier.arx.gui.resources.Resources", "org.deidentifier.arx.io.ImportColumn", "org.deidentifier.arx.io.ImportColumnIndexed", "org.deidentifier.arx.io.ImportColumnJDBC" ]
import java.util.List; import org.apache.commons.math3.util.Pair; import org.deidentifier.arx.Data; import org.deidentifier.arx.DataType; import org.deidentifier.arx.gui.resources.Resources; import org.deidentifier.arx.io.ImportColumn; import org.deidentifier.arx.io.ImportColumnIndexed; import org.deidentifier.arx.io.I...
import java.util.*; import org.apache.commons.math3.util.*; import org.deidentifier.arx.*; import org.deidentifier.arx.gui.resources.*; import org.deidentifier.arx.io.*;
[ "java.util", "org.apache.commons", "org.deidentifier.arx" ]
java.util; org.apache.commons; org.deidentifier.arx;
488,717
public RoutingAllocation.Result applyFailedShards(ClusterState clusterState, List<FailedRerouteAllocation.FailedShard> failedShards) { RoutingNodes routingNodes = getMutableRoutingNodes(clusterState); // shuffle the unassigned nodes, just so we won't have things like poison failed shards rou...
RoutingAllocation.Result function(ClusterState clusterState, List<FailedRerouteAllocation.FailedShard> failedShards) { RoutingNodes routingNodes = getMutableRoutingNodes(clusterState); routingNodes.unassigned().shuffle(); FailedRerouteAllocation allocation = new FailedRerouteAllocation(allocationDeciders, routingNodes,...
/** * Applies the failed shards. Note, shards can be called several times within this method. * <p> * If the same instance of the routing table is returned, then no change has been made.</p> */
Applies the failed shards. Note, shards can be called several times within this method. If the same instance of the routing table is returned, then no change has been made
applyFailedShards
{ "repo_name": "tebriel/elasticsearch", "path": "core/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java", "license": "apache-2.0", "size": 31718 }
[ "java.util.ArrayList", "java.util.Comparator", "java.util.List", "org.elasticsearch.cluster.ClusterState", "org.elasticsearch.cluster.health.ClusterStateHealth", "org.elasticsearch.cluster.routing.RoutingNodes", "org.elasticsearch.cluster.routing.UnassignedInfo" ]
import java.util.ArrayList; import java.util.Comparator; import java.util.List; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.health.ClusterStateHealth; import org.elasticsearch.cluster.routing.RoutingNodes; import org.elasticsearch.cluster.routing.UnassignedInfo;
import java.util.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.health.*; import org.elasticsearch.cluster.routing.*;
[ "java.util", "org.elasticsearch.cluster" ]
java.util; org.elasticsearch.cluster;
2,630,119
public void addProject(final ProjectDef projectDef) { if (projectDef == null) { throw new NullPointerException("projectDef"); } this.projects.addElement(projectDef); }
void function(final ProjectDef projectDef) { if (projectDef == null) { throw new NullPointerException(STR); } this.projects.addElement(projectDef); }
/** * Specifies the generation of IDE project file. Experimental. * * @param projectDef * project file generation specification */
Specifies the generation of IDE project file. Experimental
addProject
{ "repo_name": "markjohndoyle/nar-maven-plugin", "path": "src/main/java/com/github/maven_nar/cpptasks/CCTask.java", "license": "apache-2.0", "size": 55290 }
[ "com.github.maven_nar.cpptasks.ide.ProjectDef" ]
import com.github.maven_nar.cpptasks.ide.ProjectDef;
import com.github.maven_nar.cpptasks.ide.*;
[ "com.github.maven_nar" ]
com.github.maven_nar;
683,006
public void pauseTriggerGroup(String groupName) throws SchedulerException { sched.pauseTriggerGroup(schedCtxt, groupName); }
void function(String groupName) throws SchedulerException { sched.pauseTriggerGroup(schedCtxt, groupName); }
/** * <p> * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>, * passing the <code>SchedulingContext</code> associated with this * instance. * </p> */
Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>, passing the <code>SchedulingContext</code> associated with this instance.
pauseTriggerGroup
{ "repo_name": "feigeai/opensymphony-quartz-backup", "path": "trunk/src/java/org/quartz/impl/StdScheduler.java", "license": "apache-2.0", "size": 24746 }
[ "org.quartz.SchedulerException" ]
import org.quartz.SchedulerException;
import org.quartz.*;
[ "org.quartz" ]
org.quartz;
2,465,523
EList<EPlanChild> getChildren();
EList<EPlanChild> getChildren();
/** * Returns the value of the '<em><b>Children</b></em>' containment reference list. * The list contents are of type {@link gov.nasa.ensemble.core.model.plan.EPlanChild}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Children</em>' containment reference list isn't clear, * there really shoul...
Returns the value of the 'Children' containment reference list. The list contents are of type <code>gov.nasa.ensemble.core.model.plan.EPlanChild</code>. If the meaning of the 'Children' containment reference list isn't clear, there really should be more of a description here... A plan parent node may own any number of ...
getChildren
{ "repo_name": "nasa/OpenSPIFe", "path": "gov.nasa.ensemble.core.model.plan/src/gov/nasa/ensemble/core/model/plan/EPlanParent.java", "license": "apache-2.0", "size": 2445 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,264,976
public static synchronized StringTokenizer sendNewWaypoint(double x, double y) throws CommandExecException { SocketUtility.show("Sending waypoint: x= " + x + " y= : " + y); String controlMessage = "newwp " + x + " " + y;//newwp <X> <Y> return sendCmdAndGetResponse(controlMessage); }
static synchronized StringTokenizer function(double x, double y) throws CommandExecException { SocketUtility.show(STR + x + STR + y); String controlMessage = STR + x + " " + y; return sendCmdAndGetResponse(controlMessage); }
/** * Command to create a visual reference (e.g. arrow) at a specific point * within the server environment and expressed in Cartesian coordinate * system (x,y). Each point within the server environment is called a * "waypoint" * * @param x abscissa of the point * @param y ordinate of...
Command to create a visual reference (e.g. arrow) at a specific point within the server environment and expressed in Cartesian coordinate system (x,y). Each point within the server environment is called a "waypoint"
sendNewWaypoint
{ "repo_name": "CST-Group/WS3DProxy", "path": "src/main/java/ws3dproxy/CommandUtility.java", "license": "apache-2.0", "size": 53808 }
[ "java.util.StringTokenizer" ]
import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
2,048,744
public static void writeError(HttpServletResponse response, int httpErrorCode, Throwable t) throws IOException { response.setStatus(httpErrorCode); response.setContentType("text/html"); PrintWriter pw = response.getWriter(); if(t == null){ pw.println(Templates.getErrorMessage(GENERIC_ERROR_MSG, "Unknown e...
static void function(HttpServletResponse response, int httpErrorCode, Throwable t) throws IOException { response.setStatus(httpErrorCode); response.setContentType(STR); PrintWriter pw = response.getWriter(); if(t == null){ pw.println(Templates.getErrorMessage(GENERIC_ERROR_MSG, STR, null)); }else{ pw.println(Templates....
/** * Writes an error (HTML) from an exception. * @param response communication handler. * @param httpErrorCode http status code. * @param t exception (can be null). * @throws IOException */
Writes an error (HTML) from an exception
writeError
{ "repo_name": "esdc-esac-esa-int/gaia", "path": "sl/tags/gaia-sl-tap-0.5.3-20150629/src/java/esac/archive/gacs/sl/services/admin/ManagerUtils.java", "license": "lgpl-3.0", "size": 9880 }
[ "java.io.IOException", "java.io.PrintWriter", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.io.PrintWriter; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,063,522
private InputStream openContentStream() { String contents = "This is the initial file contents for *.adb file that should be word-sorted in the Preview page of the multi-page editor"; return new ByteArrayInputStream(contents.getBytes()); }
InputStream function() { String contents = STR; return new ByteArrayInputStream(contents.getBytes()); }
/** * We will initialize file contents with a sample text. */
We will initialize file contents with a sample text
openContentStream
{ "repo_name": "veltzer/demos-java", "path": "projects/RcpView/src/com/example/addressbook/view/wizards/AddressBookWizard.java", "license": "gpl-3.0", "size": 5269 }
[ "java.io.ByteArrayInputStream", "java.io.InputStream" ]
import java.io.ByteArrayInputStream; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,992,164
public void onChange(ConfigChangeEvent changeEvent);
void function(ConfigChangeEvent changeEvent);
/** * Invoked when there is any config change for the namespace. * @param changeEvent the event for this change */
Invoked when there is any config change for the namespace
onChange
{ "repo_name": "anycrane/apollo", "path": "apollo-client/src/main/java/com/ctrip/framework/apollo/ConfigChangeListener.java", "license": "apache-2.0", "size": 368 }
[ "com.ctrip.framework.apollo.model.ConfigChangeEvent" ]
import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.ctrip.framework.apollo.model.*;
[ "com.ctrip.framework" ]
com.ctrip.framework;
2,179,364
public List<String> getNamespaces() { List<String> namespaceList = new ArrayList<String>(); java.util.Map<String, String> attributes = model.getAttributes(); for (Entry<String, String> e : attributes.entrySet()) { final String name = e.getKey(); final String value = e.get...
List<String> function() { List<String> namespaceList = new ArrayList<String>(); java.util.Map<String, String> attributes = model.getAttributes(); for (Entry<String, String> e : attributes.entrySet()) { final String name = e.getKey(); final String value = e.getValue(); if (value != null && value.startsWith(STR=" + value...
/** * Returns all defined namespaces. * @return all defined namespaces */
Returns all defined namespaces
getNamespaces
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar31/EjbJarDescriptorImpl.java", "license": "epl-1.0", "size": 21195 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,840,352
public Hashtable getDeclaredEntities() { return fEntities; } // getDeclaredEntities():Hashtable
Hashtable function() { return fEntities; }
/** * Returns the hashtable of declared entities. * <p> * <strong>REVISIT:</strong> * This should be done the "right" way by designing a better way to * enumerate the declared entities. For now, this method is needed * by the constructor that takes an XMLEntityManager parameter. * XXX...
Returns the hashtable of declared entities. This should be done the "right" way by designing a better way to enumerate the declared entities. For now, this method is needed by the constructor that takes an XMLEntityManager parameter. XXX Making this method public, return all the declared entities
getDeclaredEntities
{ "repo_name": "samskivert/ikvm-openjdk", "path": "build/linux-amd64/impsrc/com/sun/xml/internal/stream/XMLEntityStorage.java", "license": "gpl-2.0", "size": 22773 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,092,476
public Range getDefaultAutoRange() { return this.defaultAutoRange; }
Range function() { return this.defaultAutoRange; }
/** * Returns the default auto range. * * @return The default auto range (never <code>null</code>). * * @see #setDefaultAutoRange(Range) * * @since 1.0.5 */
Returns the default auto range
getDefaultAutoRange
{ "repo_name": "Mr-Steve/LTSpice_Library_Manager", "path": "libs/jfreechart-1.0.16/source/org/jfree/chart/axis/ValueAxis.java", "license": "gpl-2.0", "size": 60039 }
[ "org.jfree.data.Range" ]
import org.jfree.data.Range;
import org.jfree.data.*;
[ "org.jfree.data" ]
org.jfree.data;
2,684,837
public List<Long> getNextNMessageIdsInDLC(final String dlcQueueName, long startMessageId, int messageLimit) throws AndesException { return MessagingEngine.getInstance().getNextNMessageIdsInDLC(dlcQueueName, startMessageId, messageLimit); }
List<Long> function(final String dlcQueueName, long startMessageId, int messageLimit) throws AndesException { return MessagingEngine.getInstance().getNextNMessageIdsInDLC(dlcQueueName, startMessageId, messageLimit); }
/*** * Get message IDs in DLC starting from given startMessageId up to the given message count. * * @param dlcQueueName Queue name of the Dead Letter Channel * @param startMessageId last message ID returned from invoking this method. * @return List<Long> of message IDs moved to the DLC from the...
Get message IDs in DLC starting from given startMessageId up to the given message count
getNextNMessageIdsInDLC
{ "repo_name": "ramith/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/Andes.java", "license": "apache-2.0", "size": 35104 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,776,927
public List<Group> getAdminGroups(PerunSession sess, Vo vo, Role role) throws InternalErrorException;
List<Group> function(PerunSession sess, Vo vo, Role role) throws InternalErrorException;
/** * Get list of group administrators of the given VO for specific role. * * @param sess * @param vo * @return List of groups, who are administrators of the Vo with specific role. Returns empty list if there is no such authorized group. * @throws InternalErrorException */
Get list of group administrators of the given VO for specific role
getAdminGroups
{ "repo_name": "licehammer/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/VosManagerImplApi.java", "license": "bsd-2-clause", "size": 6990 }
[ "cz.metacentrum.perun.core.api.Group", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.Role", "cz.metacentrum.perun.core.api.Vo", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "java.util.List" ]
import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Role; import cz.metacentrum.perun.core.api.Vo; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.List;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,709,614
public void setClassIdentityQuery(String classIdentityQuery) { Assert.hasText(classIdentityQuery, "New classIdentityQuery query is required"); this.classIdentityQuery = classIdentityQuery; }
void function(String classIdentityQuery) { Assert.hasText(classIdentityQuery, STR); this.classIdentityQuery = classIdentityQuery; }
/** * Sets the query that will be used to retrieve the identity of a newly created row in the <tt>acl_class</tt> * table. * * @param classIdentityQuery the query, which should return the identifier. Defaults to <tt>call identity()</tt> */
Sets the query that will be used to retrieve the identity of a newly created row in the acl_class table
setClassIdentityQuery
{ "repo_name": "vitorgv/spring-security", "path": "acl/src/main/java/org/springframework/security/acls/jdbc/JdbcMutableAclService.java", "license": "apache-2.0", "size": 20003 }
[ "org.springframework.util.Assert" ]
import org.springframework.util.Assert;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
1,897,888
public static String getFormattedMonthDay(Context context, long dateInMillis ) { Time time = new Time(); time.setToNow(); SimpleDateFormat dbDateFormat = new SimpleDateFormat(Utility.DATE_FORMAT); SimpleDateFormat monthDayFormat = new SimpleDateFormat("MMMM dd"); String month...
static String function(Context context, long dateInMillis ) { Time time = new Time(); time.setToNow(); SimpleDateFormat dbDateFormat = new SimpleDateFormat(Utility.DATE_FORMAT); SimpleDateFormat monthDayFormat = new SimpleDateFormat(STR); String monthDayString = monthDayFormat.format(dateInMillis); return monthDayStrin...
/** * Converts db date format to the format "Month day", e.g "June 24". * @param context Context to use for resource localization * @param dateInMillis The db formatted date string, expected to be of the form specified * in Utility.DATE_FORMAT * @return The day in the form of a s...
Converts db date format to the format "Month day", e.g "June 24"
getFormattedMonthDay
{ "repo_name": "rizkyekoputra/SunshineAdvance", "path": "app/src/main/java/com/example/android/sunshine/app/Utility.java", "license": "apache-2.0", "size": 12131 }
[ "android.content.Context", "android.text.format.Time", "java.text.SimpleDateFormat" ]
import android.content.Context; import android.text.format.Time; import java.text.SimpleDateFormat;
import android.content.*; import android.text.format.*; import java.text.*;
[ "android.content", "android.text", "java.text" ]
android.content; android.text; java.text;
136,214
synchronized public ConfigurationManager getConfigManForFlow(String flowid) { return flows.get(flowid); }
synchronized ConfigurationManager function(String flowid) { return flows.get(flowid); }
/** * Only for testing */
Only for testing
getConfigManForFlow
{ "repo_name": "hammer/flume", "path": "src/java/com/cloudera/flume/master/flows/FlowConfigManager.java", "license": "apache-2.0", "size": 11000 }
[ "com.cloudera.flume.master.ConfigurationManager" ]
import com.cloudera.flume.master.ConfigurationManager;
import com.cloudera.flume.master.*;
[ "com.cloudera.flume" ]
com.cloudera.flume;
1,801,212
private CommandSpec addWarpToGroupSubCommand() { return CommandSpec.builder().permission("blwarps.group.add").description(Texts.of("Add a warp to a group")) .executor(new AddWarpToGroupExecutor(this.plugin)) .arguments(new WarpCommandElement(this.plugin, Texts.of("warp")), ne...
CommandSpec function() { return CommandSpec.builder().permission(STR).description(Texts.of(STR)) .executor(new AddWarpToGroupExecutor(this.plugin)) .arguments(new WarpCommandElement(this.plugin, Texts.of("warp")), new WarpGroupCommandElement(this.plugin, Texts.of("group"))) .build(); }
/** * Command: "/warp group add <warp name> <group name> * * @return */
Command: "/warp group add
addWarpToGroupSubCommand
{ "repo_name": "nalimleinad/BLWarps", "path": "src/main/java/com/blocklaunch/blwarps/commands/WarpCommandGenerator.java", "license": "mit", "size": 10832 }
[ "com.blocklaunch.blwarps.commands.elements.WarpCommandElement", "com.blocklaunch.blwarps.commands.elements.WarpGroupCommandElement", "com.blocklaunch.blwarps.commands.executors.group.AddWarpToGroupExecutor", "org.spongepowered.api.text.Texts", "org.spongepowered.api.util.command.spec.CommandSpec" ]
import com.blocklaunch.blwarps.commands.elements.WarpCommandElement; import com.blocklaunch.blwarps.commands.elements.WarpGroupCommandElement; import com.blocklaunch.blwarps.commands.executors.group.AddWarpToGroupExecutor; import org.spongepowered.api.text.Texts; import org.spongepowered.api.util.command.spec.CommandSp...
import com.blocklaunch.blwarps.commands.elements.*; import com.blocklaunch.blwarps.commands.executors.group.*; import org.spongepowered.api.text.*; import org.spongepowered.api.util.command.spec.*;
[ "com.blocklaunch.blwarps", "org.spongepowered.api" ]
com.blocklaunch.blwarps; org.spongepowered.api;
1,114,951
public void enableWrites(boolean enable) { final Thread waiter; synchronized (this) { writesEnabled = enable; waiter = writeWaiter; } if (waiter != null) { LockSupport.unpark(waiter); } }
void function(boolean enable) { final Thread waiter; synchronized (this) { writesEnabled = enable; waiter = writeWaiter; } if (waiter != null) { LockSupport.unpark(waiter); } }
/** * Enables and disables write operations. If write operations are disabled, write will always return 0. * <p> * Write operations are enabled by default. * * @param enable {@code false} for disabling writes, {@code true} for enabling. */
Enables and disables write operations. If write operations are disabled, write will always return 0. Write operations are enabled by default
enableWrites
{ "repo_name": "dmlloyd/xnio", "path": "api/src/test/java/org/xnio/mock/ConduitMock.java", "license": "apache-2.0", "size": 28551 }
[ "java.util.concurrent.locks.LockSupport" ]
import java.util.concurrent.locks.LockSupport;
import java.util.concurrent.locks.*;
[ "java.util" ]
java.util;
1,629,564
DesireKey getAssociatedDesireKey();
DesireKey getAssociatedDesireKey();
/** * Get desire key associated with desire * * @return */
Get desire key associated with desire
getAssociatedDesireKey
{ "repo_name": "honzaMaly/kusanagi", "path": "mas-framework/src/main/java/cz/jan/maly/model/planing/heap/DesireNodeInterface.java", "license": "mit", "size": 732 }
[ "cz.jan.maly.model.metadata.DesireKey" ]
import cz.jan.maly.model.metadata.DesireKey;
import cz.jan.maly.model.metadata.*;
[ "cz.jan.maly" ]
cz.jan.maly;
326,276
public static <T> Iterator<T> singleElementIterator(final T element) { return new Iterator<T>() { private boolean mHasNext = true;
static <T> Iterator<T> function(final T element) { return new Iterator<T>() { private boolean mHasNext = true;
/** * Returns an iterator that iterates on a single element. * * @param element the element * @param <T> the type of the element * @return the iterator */
Returns an iterator that iterates on a single element
singleElementIterator
{ "repo_name": "maboelhassan/alluxio", "path": "core/common/src/main/java/alluxio/util/CommonUtils.java", "license": "apache-2.0", "size": 21994 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,338,877
void checkCanDropView(Identity identity, SchemaTableName viewName);
void checkCanDropView(Identity identity, SchemaTableName viewName);
/** * Check if identity is allowed to drop the specified view in this catalog. * @throws AccessDeniedException if not allowed */
Check if identity is allowed to drop the specified view in this catalog
checkCanDropView
{ "repo_name": "lingochamp/presto", "path": "presto-spi/src/main/java/com/facebook/presto/spi/security/ConnectorAccessControl.java", "license": "apache-2.0", "size": 4126 }
[ "com.facebook.presto.spi.SchemaTableName" ]
import com.facebook.presto.spi.SchemaTableName;
import com.facebook.presto.spi.*;
[ "com.facebook.presto" ]
com.facebook.presto;
2,850,724
EAttribute getEntryRelationship_TypeCode();
EAttribute getEntryRelationship_TypeCode();
/** * Returns the meta object for the attribute '{@link org.openhealthtools.mdht.uml.cda.core.profile.EntryRelationship#getTypeCode <em>Type Code</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Type Code</em>'. * @see org.openhealthtools.mdht.uml...
Returns the meta object for the attribute '<code>org.openhealthtools.mdht.uml.cda.core.profile.EntryRelationship#getTypeCode Type Code</code>'.
getEntryRelationship_TypeCode
{ "repo_name": "sarpkayanehta/mdht", "path": "cda/plugins/org.openhealthtools.mdht.uml.cda.core/src/org/openhealthtools/mdht/uml/cda/core/profile/CDAPackage.java", "license": "epl-1.0", "size": 105536 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,683,972
public void setLocale(Locale l) { ResourceBundle b = ResourceBundle.getBundle(UI_RESOURCE_BUNDLE_NAME,l); formatter = new StringFormatter(b,l); }
void function(Locale l) { ResourceBundle b = ResourceBundle.getBundle(UI_RESOURCE_BUNDLE_NAME,l); formatter = new StringFormatter(b,l); }
/** * Set the Locale for the request, which impacts UI Strings * @param l */
Set the Locale for the request, which impacts UI Strings
setLocale
{ "repo_name": "ato/wayback", "path": "wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java", "license": "lgpl-2.1", "size": 25597 }
[ "java.util.Locale", "java.util.ResourceBundle", "org.archive.wayback.util.StringFormatter" ]
import java.util.Locale; import java.util.ResourceBundle; import org.archive.wayback.util.StringFormatter;
import java.util.*; import org.archive.wayback.util.*;
[ "java.util", "org.archive.wayback" ]
java.util; org.archive.wayback;
516,522
void apply(Entity entity);
void apply(Entity entity);
/** * Alters an entity in some way. * @param entity entity to alter */
Alters an entity in some way
apply
{ "repo_name": "kkorolyov/Pancake", "path": "pancake-platform/src/main/java/dev/kkorolyov/pancake/platform/action/Action.java", "license": "bsd-3-clause", "size": 303 }
[ "dev.kkorolyov.pancake.platform.entity.Entity" ]
import dev.kkorolyov.pancake.platform.entity.Entity;
import dev.kkorolyov.pancake.platform.entity.*;
[ "dev.kkorolyov.pancake" ]
dev.kkorolyov.pancake;
1,536,696
private void writeBytes(byte[]... stuff) throws IOException { for (byte[] bytes : stuff) { out.write(bytes); } }
void function(byte[]... stuff) throws IOException { for (byte[] bytes : stuff) { out.write(bytes); } }
/** * Utility method for generating control sequences. Takes a collection of byte * arrays, which contain the components of a control sequence, concatenates * them, and prints them to the terminal. * * @param stuff the byte arrays that make up the sequence to be sent to the * terminal */
Utility method for generating control sequences. Takes a collection of byte arrays, which contain the components of a control sequence, concatenates them, and prints them to the terminal
writeBytes
{ "repo_name": "variac/bazel", "path": "src/main/java/com/google/devtools/build/lib/util/io/AnsiTerminal.java", "license": "apache-2.0", "size": 6138 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,245,471
public Timestamp getUpdated(); public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR;
/** Get Updated. * Date this record was updated */
Get Updated. Date this record was updated
getUpdated
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/I_AD_Registration.java", "license": "gpl-2.0", "size": 9932 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,683,326
public static List<TestProperty> getTestProperties(String inheritanceCSV, Properties properties) { // Get property inheritance order TreeSet<String> inheritance = getInheritance(inheritanceCSV); if (inheritance.size() == 0) { logger.error("The property inheritance set...
static List<TestProperty> function(String inheritanceCSV, Properties properties) { TreeSet<String> inheritance = getInheritance(inheritanceCSV); if (inheritance.size() == 0) { logger.error(STR + inheritanceCSV); } Set<String> allPropNames = new HashSet<String>(113); getPropertyAndProjectNames(properties, allPropNames, ...
/** * Convert Java properties into instances of {@link TestProperty} instances. * * @param inheritanceCSV comma-separated list of project property namespaces to inherit * @param properties Java properties with values defining defaults, types, etc * @return ...
Convert Java properties into instances of <code>TestProperty</code> instances
getTestProperties
{ "repo_name": "AlfrescoBenchmark/alfresco-benchmark", "path": "server/src/main/java/org/alfresco/bm/test/prop/TestPropertyFactory.java", "license": "lgpl-3.0", "size": 11332 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Properties", "java.util.Set", "java.util.TreeSet", "java.util.regex.Matcher" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Properties; import java.util.Set; import java.util.TreeSet; import java.util.regex.Matcher;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
1,150,800
private static void divide(BigInteger x, BigInteger y, BigInteger quotient, BigInteger remainder, int rounding_mode) { if ((x.words == null || x.ival <= 2) && (y.words == null || y.ival <= 2)) { long x_l = x.longValue(); long y_l = y.longValue(); if (x_l != Long.MIN_VALUE && y_l != Lon...
static void function(BigInteger x, BigInteger y, BigInteger quotient, BigInteger remainder, int rounding_mode) { if ((x.words == null x.ival <= 2) && (y.words == null y.ival <= 2)) { long x_l = x.longValue(); long y_l = y.longValue(); if (x_l != Long.MIN_VALUE && y_l != Long.MIN_VALUE) { divide(x_l, y_l, quotient, rema...
/** Divide two integers, yielding quotient and remainder. * @param x the numerator in the division * @param y the denominator in the division * @param quotient is set to the quotient of the result (iff quotient!=null) * @param remainder is set to the remainder of the result * (iff remainder!=null) * ...
Divide two integers, yielding quotient and remainder
divide
{ "repo_name": "aosm/gccfast", "path": "libjava/java/math/BigInteger.java", "license": "gpl-2.0", "size": 56766 }
[ "gnu.java.math.MPN" ]
import gnu.java.math.MPN;
import gnu.java.math.*;
[ "gnu.java.math" ]
gnu.java.math;
1,210,647
private void focusOnSelectedMarker(Integer lastSelectedMarker) { if (map != null) { if (lastSelectedMarker != null) { markers.get(lastSelectedMarker).hideInfoWindow(); } CameraUpdate cameraUpdate; if (selectedMarker == null) { cameraUpdate = CameraUpdateFactory.newLatLngBounds( allPointsB...
void function(Integer lastSelectedMarker) { if (map != null) { if (lastSelectedMarker != null) { markers.get(lastSelectedMarker).hideInfoWindow(); } CameraUpdate cameraUpdate; if (selectedMarker == null) { cameraUpdate = CameraUpdateFactory.newLatLngBounds( allPointsBounds, BOUNDS_PADDING); initSelectedStep(null, null)...
/** * Zooms in to the {@link #selectedMarker}, or show all if null. Requires * map to be fully drawn. */
Zooms in to the <code>#selectedMarker</code>, or show all if null. Requires map to be fully drawn
focusOnSelectedMarker
{ "repo_name": "UiiLabsDev/smartpublictransport-as", "path": "app/src/main/java/travel/kiri/smarttransportapp/DirectionActivity.java", "license": "mit", "size": 19769 }
[ "com.google.android.gms.maps.CameraUpdate", "com.google.android.gms.maps.CameraUpdateFactory" ]
import com.google.android.gms.maps.CameraUpdate; import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.*;
[ "com.google.android" ]
com.google.android;
2,692,008
public void testToCogxels() { SemanticLabel a = new DefaultSemanticLabel("a"); SemanticLabel b = new DefaultSemanticLabel("b"); SemanticLabel c = new DefaultSemanticLabel("c"); SemanticLabel d = new DefaultSemanticLabel("d"); SemanticLabel e = new DefaultSemanticLabel("e"...
void function() { SemanticLabel a = new DefaultSemanticLabel("a"); SemanticLabel b = new DefaultSemanticLabel("b"); SemanticLabel c = new DefaultSemanticLabel("c"); SemanticLabel d = new DefaultSemanticLabel("d"); SemanticLabel e = new DefaultSemanticLabel("e"); SemanticIdentifierMap map = new DefaultSemanticIdentifier...
/** * Test of toCogxels method, of class gov.sandia.cognition.framework.learning.InputOutputPairCogxelConverter. */
Test of toCogxels method, of class gov.sandia.cognition.framework.learning.InputOutputPairCogxelConverter
testToCogxels
{ "repo_name": "codeaudit/Foundry", "path": "Components/FrameworkLearning/Test/gov/sandia/cognition/framework/learning/converter/CogxelInputOutputPairConverterTest.java", "license": "bsd-3-clause", "size": 14606 }
[ "gov.sandia.cognition.framework.CogxelState", "gov.sandia.cognition.framework.DefaultSemanticIdentifierMap", "gov.sandia.cognition.framework.DefaultSemanticLabel", "gov.sandia.cognition.framework.SemanticIdentifierMap", "gov.sandia.cognition.framework.SemanticLabel", "gov.sandia.cognition.framework.lite.C...
import gov.sandia.cognition.framework.CogxelState; import gov.sandia.cognition.framework.DefaultSemanticIdentifierMap; import gov.sandia.cognition.framework.DefaultSemanticLabel; import gov.sandia.cognition.framework.SemanticIdentifierMap; import gov.sandia.cognition.framework.SemanticLabel; import gov.sandia.cognition...
import gov.sandia.cognition.framework.*; import gov.sandia.cognition.framework.lite.*; import gov.sandia.cognition.learning.data.*; import gov.sandia.cognition.math.matrix.*; import gov.sandia.cognition.math.matrix.mtj.*;
[ "gov.sandia.cognition" ]
gov.sandia.cognition;
251,659
public static final double haversineFormula(Point point1, Point point2) { //Based on Haversine formula: https://en.wikipedia.org/wiki/Great-circle_distance double lat1 = point1.getY(); double lon1 = point1.getX(); double lat2 = point2.getY(); double lon2 = point2.getX(); ...
static final double function(Point point1, Point point2) { double lat1 = point1.getY(); double lon1 = point1.getX(); double lat2 = point2.getY(); double lon2 = point2.getX(); return vincentyFormula(lat1, lon1, lat2, lon2); }
/** * Great circle distance between Points (x is Lon, y is Lat) using Haversine * formula. * * @param point1 Point in degrees. * @param point2 Point in degrees. * @return Distance in metres. */
Great circle distance between Points (x is Lon, y is Lat) using Haversine formula
haversineFormula
{ "repo_name": "apache/jena", "path": "jena-geosparql/src/main/java/org/apache/jena/geosparql/implementation/great_circle/GreatCircleDistance.java", "license": "apache-2.0", "size": 7306 }
[ "org.locationtech.jts.geom.Point" ]
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.*;
[ "org.locationtech.jts" ]
org.locationtech.jts;
1,833,428
protected void generateValidatorSubMenusAndActions() { validatorMenuManager = new MenuManager(DSActionConstants.ADD_VALIDATOR_ACTION); for (IAction action : validatorActions) { validatorMenuManager.add(action); } }
void function() { validatorMenuManager = new MenuManager(DSActionConstants.ADD_VALIDATOR_ACTION); for (IAction action : validatorActions) { validatorMenuManager.add(action); } }
/** * Generate validator sub menus and actions. */
Generate validator sub menus and actions
generateValidatorSubMenusAndActions
{ "repo_name": "harsha1979/developer-studio", "path": "data-services/org.wso2.developerstudio.eclipse.ds.editor/src/org/wso2/developerstudio/eclipse/ds/presentation/DsActionBarContributor.java", "license": "apache-2.0", "size": 51618 }
[ "org.eclipse.jface.action.IAction", "org.eclipse.jface.action.MenuManager", "org.wso2.developerstudio.eclipse.ds.actions.DSActionConstants" ]
import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.MenuManager; import org.wso2.developerstudio.eclipse.ds.actions.DSActionConstants;
import org.eclipse.jface.action.*; import org.wso2.developerstudio.eclipse.ds.actions.*;
[ "org.eclipse.jface", "org.wso2.developerstudio" ]
org.eclipse.jface; org.wso2.developerstudio;
1,680,794
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<GeoBackupPolicyInner> getAsync( String resourceGroupName, String workspaceName, String sqlPoolName, GeoBackupPolicyName geoBackupPolicyName) { return getWithResponseAsync(resourceGroupName, workspaceName, sqlPoolName, geoBackupPolicyName) ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<GeoBackupPolicyInner> function( String resourceGroupName, String workspaceName, String sqlPoolName, GeoBackupPolicyName geoBackupPolicyName) { return getWithResponseAsync(resourceGroupName, workspaceName, sqlPoolName, geoBackupPolicyName) .flatMap( (Response<GeoBackupPol...
/** * Get the specified SQL pool geo backup policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param sqlPoolName SQL pool name. * @param geoBackupPolicyName The name of the geo backup polic...
Get the specified SQL pool geo backup policy
getAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolGeoBackupPoliciesClientImpl.java", "license": "mit", "size": 34949 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.synapse.fluent.models.GeoBackupPolicyInner", "com.azure.resourcemanager.synapse.models.GeoBackupPolicyName" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.synapse.fluent.models.GeoBackupPolicyInner; import com.azure.resourcemanager.synapse.models.GeoBackupPolicyName;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.synapse.fluent.models.*; import com.azure.resourcemanager.synapse.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
723,981
public boolean onError(MediaPlayer mp, int what, int extra) { Log_OC.e(TAG, "Error in audio playback, what = " + what + ", extra = " + extra); String message = getMessageForMediaError(this, what, extra); Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show(); ...
boolean function(MediaPlayer mp, int what, int extra) { Log_OC.e(TAG, STR + what + STR + extra); String message = getMessageForMediaError(this, what, extra); Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show(); processStopRequest(true); return true; } /** * Called by the system when another app ...
/** * Called when there's an error playing media. * * Warns the user about the error and resets the media player. */
Called when there's an error playing media. Warns the user about the error and resets the media player
onError
{ "repo_name": "CEREMA/com.cerema.cloud", "path": "src/com/cerema/cloud/media/MediaService.java", "license": "gpl-2.0", "size": 26280 }
[ "android.media.MediaPlayer", "android.widget.Toast" ]
import android.media.MediaPlayer; import android.widget.Toast;
import android.media.*; import android.widget.*;
[ "android.media", "android.widget" ]
android.media; android.widget;
1,065,536
private void setUserInterfaceActive(boolean active) { Shell[] shells = getDisplay().getShells(); if (active) { for (int i = 0; i < shells.length; i++) { if (!shells[i].isDisposed()) { shells[i].setEnabled(active); } } } else { // Deactive shells in reverse order for (int i = shells.len...
void function(boolean active) { Shell[] shells = getDisplay().getShells(); if (active) { for (int i = 0; i < shells.length; i++) { if (!shells[i].isDisposed()) { shells[i].setEnabled(active); } } } else { for (int i = shells.length - 1; i >= 0; i--) { if (!shells[i].isDisposed()) { shells[i].setEnabled(active); } } } }
/** * Iterate through all of the windows and set them to be disabled or enabled * as appropriate.' * * @param active * The set the windows will be set to. */
Iterate through all of the windows and set them to be disabled or enabled as appropriate.'
setUserInterfaceActive
{ "repo_name": "termsuite/termsuite-ui", "path": "bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressServiceImpl.java", "license": "apache-2.0", "size": 9990 }
[ "org.eclipse.swt.widgets.Shell" ]
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,876,545
public static Timestamp trunc (Timestamp p_dateTime) { Timestamp time = p_dateTime; if (time == null) time = new Timestamp(System.currentTimeMillis()); // GregorianCalendar cal = new GregorianCalendar(); cal.setTimeInMillis(time.getTime()); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calenda...
static Timestamp function (Timestamp p_dateTime) { Timestamp time = p_dateTime; if (time == null) time = new Timestamp(System.currentTimeMillis()); GregorianCalendar cal = new GregorianCalendar(); cal.setTimeInMillis(time.getTime()); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND...
/** * Truncate Date * @deprecated * @param p_dateTime date * @return day */
Truncate Date
trunc
{ "repo_name": "erpcya/adempierePOS", "path": "sqlj/src/org/compiere/sqlj/Adempiere.java", "license": "gpl-2.0", "size": 16233 }
[ "java.sql.Timestamp", "java.util.Calendar", "java.util.GregorianCalendar" ]
import java.sql.Timestamp; import java.util.Calendar; import java.util.GregorianCalendar;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,147,116
@Test public void longConstructorSetsLengthCorrectly() { Assert.assertEquals(segment.getLength(), LENGTH); }
void function() { Assert.assertEquals(segment.getLength(), LENGTH); }
/** * The long constructor should set the length correctly. */
The long constructor should set the length correctly
longConstructorSetsLengthCorrectly
{ "repo_name": "filipvanlaenen/jCRK", "path": "src/test/java/net/filipvanlaenen/jcrk/SegmentLongConstructorTest.java", "license": "gpl-3.0", "size": 4935 }
[ "org.testng.Assert" ]
import org.testng.Assert;
import org.testng.*;
[ "org.testng" ]
org.testng;
2,230,680
public static void setCustomStateMapper(Block block, IStateMapper mapper) { customStateMappers.put(block.delegate, mapper); }
static void function(Block block, IStateMapper mapper) { customStateMappers.put(block.delegate, mapper); }
/** * Adds a custom IBlockState -> model variant logic. */
Adds a custom IBlockState -> model variant logic
setCustomStateMapper
{ "repo_name": "aebert1/BigTransport", "path": "build/tmp/recompileMc/sources/net/minecraftforge/client/model/ModelLoader.java", "license": "gpl-3.0", "size": 50584 }
[ "net.minecraft.block.Block", "net.minecraft.client.renderer.block.statemap.IStateMapper" ]
import net.minecraft.block.Block; import net.minecraft.client.renderer.block.statemap.IStateMapper;
import net.minecraft.block.*; import net.minecraft.client.renderer.block.statemap.*;
[ "net.minecraft.block", "net.minecraft.client" ]
net.minecraft.block; net.minecraft.client;
1,265,547
public void reset(final ActionMapping mapping, final HttpServletRequest request) { super.reset(mapping, request); try { request.setCharacterEncoding("UTF-8"); } catch(Exception e) { } setFolder(null); setFilter(""); setF...
void function(final ActionMapping mapping, final HttpServletRequest request) { super.reset(mapping, request); try { request.setCharacterEncoding("UTF-8"); } catch(Exception e) { } setFolder(null); setFilter(""); setFilterType(null); setSort(DATEDN); setPage(ONE); }
/** * Resets the <code>ActionForm</code> and then resets <code>folder</code> to * <code>null</code> and the filter to an empty string. * * @param mapping The mapping used to select this instance * @param request The servlet request we are processing */
Resets the <code>ActionForm</code> and then resets <code>folder</code> to <code>null</code> and the filter to an empty string
reset
{ "repo_name": "springdeveloper/roflcopters", "path": "src/java/edu/ufl/osg/webmail/forms/FolderForm.java", "license": "gpl-2.0", "size": 4993 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.struts.action.ActionMapping" ]
import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionMapping;
import javax.servlet.http.*; import org.apache.struts.action.*;
[ "javax.servlet", "org.apache.struts" ]
javax.servlet; org.apache.struts;
1,942,095
public boolean sendUnicode (char unicodeChar, int additionalMetaState) { KeyCharacterMap fullKmap = KeyCharacterMap.load(KeyCharacterMap.FULL); KeyCharacterMap virtualKmap = KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD); char[] s = new char[1]; s[0] = unicodeChar; ...
boolean function (char unicodeChar, int additionalMetaState) { KeyCharacterMap fullKmap = KeyCharacterMap.load(KeyCharacterMap.FULL); KeyCharacterMap virtualKmap = KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD); char[] s = new char[1]; s[0] = unicodeChar; KeyEvent[] events = fullKmap.getEvents(s); if (events ==...
/** * Tries to convert a unicode character to a KeyEvent and if successful sends with keyEvent(). * @param unicodeChar * @param metaState */
Tries to convert a unicode character to a KeyEvent and if successful sends with keyEvent()
sendUnicode
{ "repo_name": "runsoftdev/bVnc", "path": "bVNC/src/com/iiordanov/runsoft/bVNC/input/RemoteKeyboard.java", "license": "gpl-3.0", "size": 11720 }
[ "android.view.KeyCharacterMap", "android.view.KeyEvent" ]
import android.view.KeyCharacterMap; import android.view.KeyEvent;
import android.view.*;
[ "android.view" ]
android.view;
838,390
public IpAddress peerAddress() { return peerAddress; }
IpAddress function() { return peerAddress; }
/** * Gets the IP point-to-point interface peer address. * * @return the IP point-to-point interface peer address */
Gets the IP point-to-point interface peer address
peerAddress
{ "repo_name": "maxkondr/onos-porta", "path": "core/api/src/main/java/org/onosproject/net/host/InterfaceIpAddress.java", "license": "apache-2.0", "size": 5661 }
[ "org.onlab.packet.IpAddress" ]
import org.onlab.packet.IpAddress;
import org.onlab.packet.*;
[ "org.onlab.packet" ]
org.onlab.packet;
2,604,144
protected static void assertIndex(QueryTypeDescriptorImpl typeDesc, String idxName, int inlineSize, IgniteBiTuple<String, Boolean>... fields) { QueryIndexDescriptorImpl idxDesc = typeDesc.index(idxName); assertNotNull(idxDesc); assertEquals(idxName, idxDesc.name()); assertE...
static void function(QueryTypeDescriptorImpl typeDesc, String idxName, int inlineSize, IgniteBiTuple<String, Boolean>... fields) { QueryIndexDescriptorImpl idxDesc = typeDesc.index(idxName); assertNotNull(idxDesc); assertEquals(idxName, idxDesc.name()); assertEquals(typeDesc, idxDesc.typeDescriptor()); assertEquals(Que...
/** * Assert index state. * * @param typeDesc Type descriptor. * @param idxName Index name. * @param inlineSize Inline size. * @param fields Fields (order is important). */
Assert index state
assertIndex
{ "repo_name": "WilliamDo/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java", "license": "apache-2.0", "size": 20428 }
[ "java.util.ArrayList", "java.util.List", "org.apache.ignite.cache.QueryIndexType", "org.apache.ignite.internal.processors.query.QueryIndexDescriptorImpl", "org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl", "org.apache.ignite.lang.IgniteBiTuple" ]
import java.util.ArrayList; import java.util.List; import org.apache.ignite.cache.QueryIndexType; import org.apache.ignite.internal.processors.query.QueryIndexDescriptorImpl; import org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl; import org.apache.ignite.lang.IgniteBiTuple;
import java.util.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.lang.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,889,750
protected final int shiftKeys( int pos ) { // Shift entries with the same hash. int last, slot; for(;;) { pos = ( ( last = pos ) + 1 ) & mask; while( used[ pos ] ) { slot = ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (key[ pos ]) ) ) & mask; if ( last <= pos ? last >= slot || slot > pos...
final int function( int pos ) { int last, slot; for(;;) { pos = ( ( last = pos ) + 1 ) & mask; while( used[ pos ] ) { slot = ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (key[ pos ]) ) ) & mask; if ( last <= pos ? last >= slot slot > pos : last >= slot && slot > pos ) break; pos = ( pos + 1 ) & mask; } if ( ! used[ ...
/** Shifts left entries with the specified hash code, starting at the specified position, * and empties the resulting free entry. If any entry wraps around the table, instantiates * lazily {@link #wrapped} and stores the entry key. * * @param pos a starting position. * @return the position cleared by the...
Shifts left entries with the specified hash code, starting at the specified position, and empties the resulting free entry. If any entry wraps around the table, instantiates lazily <code>#wrapped</code> and stores the entry key
shiftKeys
{ "repo_name": "karussell/fastutil", "path": "src/it/unimi/dsi/fastutil/bytes/Byte2LongOpenHashMap.java", "license": "apache-2.0", "size": 28955 }
[ "it.unimi.dsi.fastutil.HashCommon" ]
import it.unimi.dsi.fastutil.HashCommon;
import it.unimi.dsi.fastutil.*;
[ "it.unimi.dsi" ]
it.unimi.dsi;
2,806,112
@Override protected void openFiles(List<IFile> filesSelected) { for (IFile f : filesSelected) { PythonPathHelper.markAsPyDevFileIfDetected(f); try { IDE.openEditor(page, f); } catch (PartInitException e) { Log.log(e); } ...
void function(List<IFile> filesSelected) { for (IFile f : filesSelected) { PythonPathHelper.markAsPyDevFileIfDetected(f); try { IDE.openEditor(page, f); } catch (PartInitException e) { Log.log(e); } } }
/** * Overridden to open the given files with the match provided by the platform. */
Overridden to open the given files with the match provided by the platform
openFiles
{ "repo_name": "smkr/pyclipse", "path": "plugins/org.python.pydev/src_navigator/org/python/pydev/navigator/actions/PyOpenResourceAction.java", "license": "epl-1.0", "size": 4920 }
[ "java.util.List", "org.eclipse.core.resources.IFile", "org.eclipse.ui.PartInitException", "org.eclipse.ui.ide.IDE", "org.python.pydev.core.log.Log", "org.python.pydev.editor.codecompletion.revisited.PythonPathHelper" ]
import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.ui.PartInitException; import org.eclipse.ui.ide.IDE; import org.python.pydev.core.log.Log; import org.python.pydev.editor.codecompletion.revisited.PythonPathHelper;
import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.ui.*; import org.eclipse.ui.ide.*; import org.python.pydev.core.log.*; import org.python.pydev.editor.codecompletion.revisited.*;
[ "java.util", "org.eclipse.core", "org.eclipse.ui", "org.python.pydev" ]
java.util; org.eclipse.core; org.eclipse.ui; org.python.pydev;
2,885,027
public void lockCashDrawer(CashDrawer cd, String documentId);
void function(CashDrawer cd, String documentId);
/** * Locks the given cash drawer, if it is open * * @param cd The cash drawer to open * @param documentId The document id which is locking the cash drawer */
Locks the given cash drawer, if it is open
lockCashDrawer
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/service/CashDrawerService.java", "license": "agpl-3.0", "size": 5104 }
[ "org.kuali.kfs.fp.businessobject.CashDrawer" ]
import org.kuali.kfs.fp.businessobject.CashDrawer;
import org.kuali.kfs.fp.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
525,381
public void setKeywordProtectionSymbol(String symbol) { if (!Strings.isNullOrEmpty(symbol)) { this.protectionSymbol = symbol; } }
void function(String symbol) { if (!Strings.isNullOrEmpty(symbol)) { this.protectionSymbol = symbol; } }
/** Change the symbol for protected keywords. * * @param symbol the symbol. */
Change the symbol for protected keywords
setKeywordProtectionSymbol
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessConfig.java", "license": "apache-2.0", "size": 3703 }
[ "com.google.common.base.Strings" ]
import com.google.common.base.Strings;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,835,342
private long getNonNegative(String key, int defaultValue) { int flushOffsetIntervalMillis = properties.getInt(key, defaultValue); if (flushOffsetIntervalMillis < 0) { throw new MetricsException("The " + key + " property must be " + "non-negative. Value was " + flushOffsetIntervalMillis); ...
long function(String key, int defaultValue) { int flushOffsetIntervalMillis = properties.getInt(key, defaultValue); if (flushOffsetIntervalMillis < 0) { throw new MetricsException(STR + key + STR + STR + flushOffsetIntervalMillis); } return flushOffsetIntervalMillis; }
/** * Return the property value if it's non-negative and throw an exception if * it's not. * * @param key the property key * @param defaultValue the default value */
Return the property value if it's non-negative and throw an exception if it's not
getNonNegative
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/sink/RollingFileSystemSink.java", "license": "apache-2.0", "size": 35623 }
[ "org.apache.hadoop.metrics2.MetricsException" ]
import org.apache.hadoop.metrics2.MetricsException;
import org.apache.hadoop.metrics2.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,389,280
public DateHolder setDay(final Calendar src) { calendar.set(Calendar.YEAR, src.get(Calendar.YEAR)); calendar.set(Calendar.MONTH, src.get(Calendar.MONTH)); calendar.set(Calendar.DAY_OF_MONTH, src.get(Calendar.DAY_OF_MONTH)); computeTime(); return this; }
DateHolder function(final Calendar src) { calendar.set(Calendar.YEAR, src.get(Calendar.YEAR)); calendar.set(Calendar.MONTH, src.get(Calendar.MONTH)); calendar.set(Calendar.DAY_OF_MONTH, src.get(Calendar.DAY_OF_MONTH)); computeTime(); return this; }
/** * Setting the date from the given object (only year, month, day). Hours, minutes, seconds etc. will be preserved. * @param src The calendar from which to copy the values. * @see #ensurePrecision() */
Setting the date from the given object (only year, month, day). Hours, minutes, seconds etc. will be preserved
setDay
{ "repo_name": "FlowsenAusMonotown/projectforge", "path": "projectforge-business/src/main/java/org/projectforge/framework/time/DateHolder.java", "license": "gpl-3.0", "size": 21661 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,698,714
private static byte[] readBytes(final InputStream input, final int size) throws IOException { final byte[] bytes = new byte[size]; int bytesRemaining = size; int offset = 0; while (bytesRemaining > 0) { final int readCount = input.read(bytes, offset, bytesRemaining); ...
static byte[] function(final InputStream input, final int size) throws IOException { final byte[] bytes = new byte[size]; int bytesRemaining = size; int offset = 0; while (bytesRemaining > 0) { final int readCount = input.read(bytes, offset, bytesRemaining); if (readCount > 0) { offset += readCount; bytesRemaining -= r...
/** * Read bytes continuously until the desired amount has been collected. * * @param input the byte source. * @param size number of bytes to collect. * @return byte array. * @throws IOException if reading from input fails. */
Read bytes continuously until the desired amount has been collected
readBytes
{ "repo_name": "EasternEdgeRobotics/2016", "path": "src/main/java/com/easternedgerobotics/rov/io/arduino/ArduinoReader.java", "license": "mit", "size": 4696 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,909,343
public void xmppStreamOpen(final String data) { try { if (log.isLoggable(Level.FINEST)) { log.log(Level.FINEST, "{0}, Sending data: {1}", new Object[] { toString(), data }); } writeRawData(data); assert debug(data, "--SENT:"); } catch (IOException e) { log.log(Level.WARNING, "{0}, Error ...
void function(final String data) { try { if (log.isLoggable(Level.FINEST)) { log.log(Level.FINEST, STR, new Object[] { toString(), data }); } writeRawData(data); assert debug(data, STR); } catch (IOException e) { log.log(Level.WARNING, STR, new Object[] { toString(), e }); forceStop(); } }
/** * Method description * * * @param data */
Method description
xmppStreamOpen
{ "repo_name": "nate-sentjens/tigase-xmpp-java", "path": "src/main/java/tigase/xmpp/XMPPIOService.java", "license": "agpl-3.0", "size": 21920 }
[ "java.io.IOException", "java.util.logging.Level" ]
import java.io.IOException; import java.util.logging.Level;
import java.io.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,865,898
@Nullable public SharedDriveItem patch(@Nonnull final SharedDriveItem sourceSharedDriveItem) throws ClientException { return send(HttpMethod.PATCH, sourceSharedDriveItem); }
SharedDriveItem function(@Nonnull final SharedDriveItem sourceSharedDriveItem) throws ClientException { return send(HttpMethod.PATCH, sourceSharedDriveItem); }
/** * Patches this SharedDriveItem with a source * * @param sourceSharedDriveItem the source object with updates * @return the updated SharedDriveItem * @throws ClientException this exception occurs if the request was unable to complete for any reason */
Patches this SharedDriveItem with a source
patch
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/SharedDriveItemRequest.java", "license": "mit", "size": 6304 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.SharedDriveItem", "javax.annotation.Nonnull" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.SharedDriveItem; import javax.annotation.Nonnull;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
20,964
public void addElement(String key, String value) throws UnsupportedEncodingException, IOException { if (key == null || key.trim().length() == 0) { throw new IllegalArgumentException("Argument 'key' cannot be null or an empty String."); } addString(key); addString(value); }
void function(String key, String value) throws UnsupportedEncodingException, IOException { if (key == null key.trim().length() == 0) { throw new IllegalArgumentException(STR); } addString(key); addString(value); }
/** * Add key/value pair to buffer. Note: this method is NOT thread safe. The Yahoo network accepts empty values, and * therefore they are accepted by this method. Empty keys are not, and will cause an * {@link IllegalArgumentException} to be thrown. * @param key The identifier (cannot be <tt>null</tt> or empty...
Add key/value pair to buffer. Note: this method is NOT thread safe. The Yahoo network accepts empty values, and therefore they are accepted by this method. Empty keys are not, and will cause an <code>IllegalArgumentException</code> to be thrown
addElement
{ "repo_name": "OpenYMSG/openymsg", "path": "src/main/java/org/openymsg/legacy/network/PacketBodyBuffer.java", "license": "gpl-2.0", "size": 3487 }
[ "java.io.IOException", "java.io.UnsupportedEncodingException" ]
import java.io.IOException; import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,065,549
void attemptRestoreRemovedStorage() { // if directory is "alive" - copy the images there... if(!restoreFailedStorage || removedStorageDirs.size() == 0) { return; //nothing to restore } synchronized (this.restorationLock) { LOG.info("NNStorage.attemptRestoreRemovedStorage: check remove...
void attemptRestoreRemovedStorage() { if(!restoreFailedStorage removedStorageDirs.size() == 0) { return; } synchronized (this.restorationLock) { LOG.info(STR+ STR, removedStorageDirs.size()); for (StorageDirectory sd : this.removedStorageDirs) { File root = sd.getRoot(); LOG.info(STR, root .getAbsolutePath(), sd.getSto...
/** * See if any of removed storages is "writable" again, and can be returned * into service. */
See if any of removed storages is "writable" again, and can be returned into service
attemptRestoreRemovedStorage
{ "repo_name": "nandakumar131/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java", "license": "apache-2.0", "size": 39931 }
[ "java.io.File", "org.apache.hadoop.fs.FileUtil" ]
import java.io.File; import org.apache.hadoop.fs.FileUtil;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
274,304
User newUser(String userId);
User newUser(String userId);
/** * Creates a new user. The user is transient and must be saved using * {@link #saveUser(User)}. * @param userId id for the new user, cannot be null. */
Creates a new user. The user is transient and must be saved using <code>#saveUser(User)</code>
newUser
{ "repo_name": "iotsap/FiWare-Template-Handler", "path": "ExecutionEnvironment/modules/activiti-engine/src/main/java/org/activiti/engine/IdentityService.java", "license": "bsd-3-clause", "size": 5233 }
[ "org.activiti.engine.identity.User" ]
import org.activiti.engine.identity.User;
import org.activiti.engine.identity.*;
[ "org.activiti.engine" ]
org.activiti.engine;
1,258,016
protected void processTask(Row row) { Integer uniqueID = row.getInteger("TASK_UID"); if (uniqueID != null && uniqueID.intValue() >= 0) { Task task = m_project.addTask(); TimeUnit durationFormat = MPDUtility.getDurationTimeUnits(row.getInt("TASK_DUR_FMT")); task.setAct...
void function(Row row) { Integer uniqueID = row.getInteger(STR); if (uniqueID != null && uniqueID.intValue() >= 0) { Task task = m_project.addTask(); TimeUnit durationFormat = MPDUtility.getDurationTimeUnits(row.getInt(STR)); task.setActualCost(row.getCurrency(STR)); task.setActualDuration(MPDUtility.getAdjustedDuratio...
/** * Process a task. * * @param row task data */
Process a task
processTask
{ "repo_name": "tmyroadctfig/mpxj", "path": "net/sf/mpxj/mpd/MPD9AbstractReader.java", "license": "lgpl-2.1", "size": 52048 }
[ "net.sf.mpxj.AccrueType", "net.sf.mpxj.ConstraintType", "net.sf.mpxj.Priority", "net.sf.mpxj.Task", "net.sf.mpxj.TaskType", "net.sf.mpxj.TimeUnit", "net.sf.mpxj.utility.NumberUtility" ]
import net.sf.mpxj.AccrueType; import net.sf.mpxj.ConstraintType; import net.sf.mpxj.Priority; import net.sf.mpxj.Task; import net.sf.mpxj.TaskType; import net.sf.mpxj.TimeUnit; import net.sf.mpxj.utility.NumberUtility;
import net.sf.mpxj.*; import net.sf.mpxj.utility.*;
[ "net.sf.mpxj" ]
net.sf.mpxj;
940,484
public V deserialize( JsonReader reader, JsonDeserializationContext ctx ) { return getDeserializer().deserialize( reader, ctx, getParameters() ); }
V function( JsonReader reader, JsonDeserializationContext ctx ) { return getDeserializer().deserialize( reader, ctx, getParameters() ); }
/** * Deserializes the property defined for this instance. * * @param reader reader * @param ctx context of the deserialization process * @return a V object. */
Deserializes the property defined for this instance
deserialize
{ "repo_name": "nmorel/gwt-jackson", "path": "gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/client/deser/bean/HasDeserializerAndParameters.java", "license": "apache-2.0", "size": 2177 }
[ "com.github.nmorel.gwtjackson.client.JsonDeserializationContext", "com.github.nmorel.gwtjackson.client.stream.JsonReader" ]
import com.github.nmorel.gwtjackson.client.JsonDeserializationContext; import com.github.nmorel.gwtjackson.client.stream.JsonReader;
import com.github.nmorel.gwtjackson.client.*; import com.github.nmorel.gwtjackson.client.stream.*;
[ "com.github.nmorel" ]
com.github.nmorel;
2,603,458
public StoredProcedureQuery setParameter(String name, Calendar value, TemporalType temporalType) { entityManager.verifyOpenWithSetRollbackOnly(); return setParameter(name, convertTemporalType(value, temporalType)); }
StoredProcedureQuery function(String name, Calendar value, TemporalType temporalType) { entityManager.verifyOpenWithSetRollbackOnly(); return setParameter(name, convertTemporalType(value, temporalType)); }
/** * Bind an instance of java.util.Calendar to a named parameter. * * @param name * @param value * @param temporalType * @return the same query instance * @throws IllegalArgumentException if the parameter name does not * correspond to a parameter of the query or if the value arg...
Bind an instance of java.util.Calendar to a named parameter
setParameter
{ "repo_name": "gameduell/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/StoredProcedureQueryImpl.java", "license": "epl-1.0", "size": 46352 }
[ "java.util.Calendar", "javax.persistence.StoredProcedureQuery", "javax.persistence.TemporalType" ]
import java.util.Calendar; import javax.persistence.StoredProcedureQuery; import javax.persistence.TemporalType;
import java.util.*; import javax.persistence.*;
[ "java.util", "javax.persistence" ]
java.util; javax.persistence;
2,602,446
public static Map<String, Object> runEntityIndexing(ServiceContext ctx) { Collection<String> entityNames = ctx.attr("entityNames"); if (UtilValidate.isEmpty(entityNames)) { String entityName = ctx.attr("entityName"); if (UtilValidate.isEmpty(entityName)) { ret...
static Map<String, Object> function(ServiceContext ctx) { Collection<String> entityNames = ctx.attr(STR); if (UtilValidate.isEmpty(entityNames)) { String entityName = ctx.attr(STR); if (UtilValidate.isEmpty(entityName)) { return ServiceUtil.returnError(STR); } entityNames = UtilMisc.toList(entityName); } for(String ent...
/** * Runs entity indexing for an entity/indexer IF not already started; if started does nothing for that indexer. * Must be run as an async service to let the job manager determine best time to run processing. * NOTE: This must strictly be an async service without transaction because the thread may get ...
Runs entity indexing for an entity/indexer IF not already started; if started does nothing for that indexer. Must be run as an async service to let the job manager determine best time to run processing. a maximum. runAsync with single entityName
runEntityIndexing
{ "repo_name": "ilscipio/scipio-erp", "path": "applications/solr/src/com/ilscipio/scipio/solr/EntityIndexer.java", "license": "apache-2.0", "size": 65953 }
[ "java.util.Collection", "java.util.Map", "org.ofbiz.base.util.Debug", "org.ofbiz.base.util.UtilMisc", "org.ofbiz.base.util.UtilValidate", "org.ofbiz.service.GenericServiceException", "org.ofbiz.service.ServiceContext", "org.ofbiz.service.ServiceOptions", "org.ofbiz.service.ServiceUtil" ]
import java.util.Collection; import java.util.Map; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.service.GenericServiceException; import org.ofbiz.service.ServiceContext; import org.ofbiz.service.ServiceOptions; import org.ofbiz.service....
import java.util.*; import org.ofbiz.base.util.*; import org.ofbiz.service.*;
[ "java.util", "org.ofbiz.base", "org.ofbiz.service" ]
java.util; org.ofbiz.base; org.ofbiz.service;
981,844
private void bindAttributes(Attribute[] att) { for (int i = 0; i < att.length; i++) { glBindAttribLocation(programID, att[i].getId(), att[i].getName()); } }
void function(Attribute[] att) { for (int i = 0; i < att.length; i++) { glBindAttribLocation(programID, att[i].getId(), att[i].getName()); } }
/** * Bind array of attributes * * @param inVariables * Array */
Bind array of attributes
bindAttributes
{ "repo_name": "Guerra24/NanoUI", "path": "nanoui-core/src/main/java/net/luxvacuos/nanoui/rendering/shaders/ShaderProgram.java", "license": "gpl-3.0", "size": 7219 }
[ "net.luxvacuos.nanoui.rendering.GL", "net.luxvacuos.nanoui.rendering.shaders.data.Attribute" ]
import net.luxvacuos.nanoui.rendering.GL; import net.luxvacuos.nanoui.rendering.shaders.data.Attribute;
import net.luxvacuos.nanoui.rendering.*; import net.luxvacuos.nanoui.rendering.shaders.data.*;
[ "net.luxvacuos.nanoui" ]
net.luxvacuos.nanoui;
2,411,720
public void sendEvent(String topicName, Map<String, Serializable> properties) { if (topicName == null) { LOGGER.error("CELLAR EVENT: failed to send event"); return; } final Event event = new Event(topicName, properties); eventAdmin.sendEvent(event); }
void function(String topicName, Map<String, Serializable> properties) { if (topicName == null) { LOGGER.error(STR); return; } final Event event = new Event(topicName, properties); eventAdmin.sendEvent(event); }
/** * Send events via {@link EventAdmin}. * * @param topicName the topic name. * @param properties the event properties. */
Send events via <code>EventAdmin</code>
sendEvent
{ "repo_name": "3cky/karaf-cellar", "path": "event/src/main/java/org/apache/karaf/cellar/event/EventSupport.java", "license": "apache-2.0", "size": 3507 }
[ "java.io.Serializable", "java.util.Map", "org.osgi.service.event.Event" ]
import java.io.Serializable; import java.util.Map; import org.osgi.service.event.Event;
import java.io.*; import java.util.*; import org.osgi.service.event.*;
[ "java.io", "java.util", "org.osgi.service" ]
java.io; java.util; org.osgi.service;
244,861
public JavaProfile addClassPath(File... jarOrDirs) { checkValidProperty("classpath"); for (File jarOrDir : jarOrDirs) { if (!jarOrDir.exists()) { throw new WebDriverException(String.format("But unable to locate the requested jar or folder: %s", jarOrDir)); } ...
JavaProfile function(File... jarOrDirs) { checkValidProperty(STR); for (File jarOrDir : jarOrDirs) { if (!jarOrDir.exists()) { throw new WebDriverException(String.format(STR, jarOrDir)); } classPathEntries.add(jarOrDir.getAbsolutePath()); } return this; }
/** * Add the given Files to the class path * * @param jarOrDirs * one or more {@link java.io.File} objects - either JARs or * Folders. * @return this */
Add the given Files to the class path
addClassPath
{ "repo_name": "jalian-systems/marathonv5", "path": "marathon-java/marathon-java-driver/src/main/java/net/sourceforge/marathon/javadriver/JavaProfile.java", "license": "apache-2.0", "size": 49404 }
[ "java.io.File", "org.openqa.selenium.WebDriverException" ]
import java.io.File; import org.openqa.selenium.WebDriverException;
import java.io.*; import org.openqa.selenium.*;
[ "java.io", "org.openqa.selenium" ]
java.io; org.openqa.selenium;
951,469
public void sendImportedExpenseNotification(Integer travelerProfileId, List<HistoricalTravelExpense> expensesOfTraveler);
void function(Integer travelerProfileId, List<HistoricalTravelExpense> expensesOfTraveler);
/** * send notifications to the given traveler of newly imported or unused imported expenses from corporate card, CTS, or pre-trip * payments that need to be reconciled * * @param travelerProfileId the profile id of a traveler * @param expensesOfTraveler the expenses of the given traveler...
send notifications to the given traveler of newly imported or unused imported expenses from corporate card, CTS, or pre-trip payments that need to be reconciled
sendImportedExpenseNotification
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/tem/batch/service/TravelImportedExpenseNotificationService.java", "license": "agpl-3.0", "size": 2116 }
[ "java.util.List", "org.kuali.kfs.module.tem.businessobject.HistoricalTravelExpense" ]
import java.util.List; import org.kuali.kfs.module.tem.businessobject.HistoricalTravelExpense;
import java.util.*; import org.kuali.kfs.module.tem.businessobject.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
1,416,088
public Map<Long, Long> getVCPUsCPU(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "VM_metrics.get_VCPUs_CPU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.t...
Map<Long, Long> function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object ...
/** * Get the VCPUs/CPU field of the given VM_metrics. * * @return value of the field */
Get the VCPUs/CPU field of the given VM_metrics
getVCPUsCPU
{ "repo_name": "guzy/OnceCenter", "path": "src/com/once/xenapi/VMMetrics.java", "license": "apache-2.0", "size": 18952 }
[ "com.once.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.once.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.once.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.once.xenapi", "java.util", "org.apache.xmlrpc" ]
com.once.xenapi; java.util; org.apache.xmlrpc;
1,545,130
public static ims.nursing.assessment.domain.objects.BowelOstomy extractBowelOstomy(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.BowelOstomyVo valueObject) { return extractBowelOstomy(domainFactory, valueObject, new HashMap()); }
static ims.nursing.assessment.domain.objects.BowelOstomy function(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.BowelOstomyVo valueObject) { return extractBowelOstomy(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractBowelOstomy
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/nursing/vo/domain/BowelOstomyVoAssembler.java", "license": "agpl-3.0", "size": 18748 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,026,199
public EnvVars overrideExpandingAll(Map<String,String> all) { for (String key : new OverrideOrderCalculator(this, all).getOrderedVariableNames()) { override(key, expand(all.get(key))); } return this; }
EnvVars function(Map<String,String> all) { for (String key : new OverrideOrderCalculator(this, all).getOrderedVariableNames()) { override(key, expand(all.get(key))); } return this; }
/** * Overrides all values in the map by the given map. Expressions in values will be expanded. * See {@link #override(String, String)}. * @return this */
Overrides all values in the map by the given map. Expressions in values will be expanded. See <code>#override(String, String)</code>
overrideExpandingAll
{ "repo_name": "synopsys-arc-oss/jenkins", "path": "core/src/main/java/hudson/EnvVars.java", "license": "mit", "size": 16441 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,471,865
private void setStatementParameters(Aggregate aggregate) { EventKey eventKey = aggregate.getEventKey(); int ddID = eventKey.getDimensionDescriptorID(); int aggID = eventKey.getAggregatorID(); LOG.info("Setting statement params {} {}", ddID, aggID); FieldsDescriptor keyFD = schema.getDimension...
void function(Aggregate aggregate) { EventKey eventKey = aggregate.getEventKey(); int ddID = eventKey.getDimensionDescriptorID(); int aggID = eventKey.getAggregatorID(); LOG.info(STR, ddID, aggID); FieldsDescriptor keyFD = schema.getDimensionsDescriptorIDToKeyDescriptor().get(ddID); FieldsDescriptor aggFD = schema.getD...
/** * Sets the parameters on the {@link java.sql.PreparedStatement} based on the * values in the given {@link Aggregate}. * * @param aggregate * The {@link Aggregate} whose values will be set on the * corresponding {@link java.sql.PreparedStatement}. */
Sets the parameters on the <code>java.sql.PreparedStatement</code> based on the values in the given <code>Aggregate</code>
setStatementParameters
{ "repo_name": "sandeep-n/incubator-apex-malhar", "path": "library/src/main/java/com/datatorrent/lib/db/jdbc/JDBCDimensionalOutputOperator.java", "license": "apache-2.0", "size": 14564 }
[ "com.datatorrent.lib.appdata.gpo.GPOMutable", "com.datatorrent.lib.appdata.schemas.FieldsDescriptor", "java.sql.PreparedStatement", "java.sql.SQLException", "org.apache.apex.malhar.lib.dimensions.DimensionsEvent" ]
import com.datatorrent.lib.appdata.gpo.GPOMutable; import com.datatorrent.lib.appdata.schemas.FieldsDescriptor; import java.sql.PreparedStatement; import java.sql.SQLException; import org.apache.apex.malhar.lib.dimensions.DimensionsEvent;
import com.datatorrent.lib.appdata.gpo.*; import com.datatorrent.lib.appdata.schemas.*; import java.sql.*; import org.apache.apex.malhar.lib.dimensions.*;
[ "com.datatorrent.lib", "java.sql", "org.apache.apex" ]
com.datatorrent.lib; java.sql; org.apache.apex;
1,616,809
@Override public List<String> getOutrosProcedimentos() { return instancia.getOutrosProcedimentos(); }
List<String> function() { return instancia.getOutrosProcedimentos(); }
/** * Procedimentos SIGTAP registrados no atendimento. * @return Lista com os procedimentos SIGTAP do atendimento. */
Procedimentos SIGTAP registrados no atendimento
getOutrosProcedimentos
{ "repo_name": "Eddyosos/integracao201701", "path": "src/main/java/com/github/Eddyosos/integracao20171/esus/cds/atendimentodomiciliar/FichaAtendimentoDomiciliarChild.java", "license": "mit", "size": 26779 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
679,614
public static Collection<ComponentConfig.WebappInfo> getAppBarWebInfos(Security security, GenericValue userLogin, String serverName, String menuName) { Collection<ComponentConfig.WebappInfo> allInfos = ComponentConfig.getAppBarWebInfos(serverName, menuName); Collection<ComponentConfig.WebappInfo> al...
static Collection<ComponentConfig.WebappInfo> function(Security security, GenericValue userLogin, String serverName, String menuName) { Collection<ComponentConfig.WebappInfo> allInfos = ComponentConfig.getAppBarWebInfos(serverName, menuName); Collection<ComponentConfig.WebappInfo> allowedInfos = new ArrayList<Component...
/** * Returns a <code>Collection</code> of <code>WebappInfo</code> instances that the specified * user is authorized to access. * @param security * @param userLogin * @param serverName * @param menuName * @return A <code>Collection</code> <code>WebappInfo</code> instances that the spe...
Returns a <code>Collection</code> of <code>WebappInfo</code> instances that the specified user is authorized to access
getAppBarWebInfos
{ "repo_name": "yuri0x7c1/ofbiz-explorer", "path": "src/test/resources/apache-ofbiz-17.12.04/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java", "license": "apache-2.0", "size": 61594 }
[ "java.util.ArrayList", "java.util.Collection", "org.apache.ofbiz.base.component.ComponentConfig", "org.apache.ofbiz.entity.GenericValue", "org.apache.ofbiz.security.Security" ]
import java.util.ArrayList; import java.util.Collection; import org.apache.ofbiz.base.component.ComponentConfig; import org.apache.ofbiz.entity.GenericValue; import org.apache.ofbiz.security.Security;
import java.util.*; import org.apache.ofbiz.base.component.*; import org.apache.ofbiz.entity.*; import org.apache.ofbiz.security.*;
[ "java.util", "org.apache.ofbiz" ]
java.util; org.apache.ofbiz;
720,755
interface WithEndTime { Update withEndTime(DateTime endTime); }
interface WithEndTime { Update withEndTime(DateTime endTime); }
/** * Specifies endTime. */
Specifies endTime
withEndTime
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "mediaservices/resource-manager/v2018_30_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_30_30_preview/StreamingLocator.java", "license": "mit", "size": 7690 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
768,130
public RequestHandle get(Context context, String url, ResponseHandlerInterface responseHandler) { return get(context, url, null, responseHandler); }
RequestHandle function(Context context, String url, ResponseHandlerInterface responseHandler) { return get(context, url, null, responseHandler); }
/** * Perform a HTTP GET request without any parameters and track the Android Context which * initiated the request. * * @param context the Android Context which initiated the request. * @param url the URL to send the request to. * @param responseHandler the response ha...
Perform a HTTP GET request without any parameters and track the Android Context which initiated the request
get
{ "repo_name": "blackdargn/AndroidUtil", "path": "ext/asyn-http-library/src/main/java/com/loopj/android/http/AsyncHttpClient.java", "license": "apache-2.0", "size": 53797 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,621,094
@Override public Collection<Attribute> getRequiredAttributes() { return getFactory().getRequiredAttributes(); }
Collection<Attribute> function() { return getFactory().getRequiredAttributes(); }
/** * Returns the collection of required {@link Attribute} for this object. * * @return Collection&lt;Attribute&gt; */
Returns the collection of required <code>Attribute</code> for this object
getRequiredAttributes
{ "repo_name": "ahome-it/lienzo-core", "path": "src/main/java/com/ait/lienzo/client/core/shape/Node.java", "license": "apache-2.0", "size": 32141 }
[ "com.ait.lienzo.client.core.Attribute", "java.util.Collection" ]
import com.ait.lienzo.client.core.Attribute; import java.util.Collection;
import com.ait.lienzo.client.core.*; import java.util.*;
[ "com.ait.lienzo", "java.util" ]
com.ait.lienzo; java.util;
956,205