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
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/page/ui/com.odcgroup.page.edit/src/generated/java/com/odcgroup/page/model/provider/TranslationItemProvider.java", "license": "epl-1.0", "size": 5416 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,655,384
@Test public void test_fillAndSubmitCredentialForm_formMissingElement() { try { String username = "user"; String password = "password"; setInputValueExpectations(Constants.J_USERNAME, username); setInputValueExpectations(Constants.J_PASSWORD, password); ...
void function() { try { String username = "user"; String password = STR; setInputValueExpectations(Constants.J_USERNAME, username); setInputValueExpectations(Constants.J_PASSWORD, password); mockery.checking(new Expectations() { { one(form).getInputByValue(WebFormUtils.DEFAULT_LOGIN_SUBMIT_BUTTON_VALUE); will(throwExce...
/** * Tests: * - Username: Non-empty * - Password: Non-empty * - Submit button is missing * Expects: * - ElementNotFoundException should be thrown as-is */
Tests: - Username: Non-empty - Password: Non-empty - Submit button is missing Expects: - ElementNotFoundException should be thrown as-is
test_fillAndSubmitCredentialForm_formMissingElement
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.security.fat.common/test/com/ibm/ws/security/fat/common/web/WebFormUtilsTest.java", "license": "epl-1.0", "size": 26481 }
[ "com.gargoylesoftware.htmlunit.ElementNotFoundException", "com.ibm.ws.security.fat.common.Constants", "org.jmock.Expectations", "org.junit.Assert" ]
import com.gargoylesoftware.htmlunit.ElementNotFoundException; import com.ibm.ws.security.fat.common.Constants; import org.jmock.Expectations; import org.junit.Assert;
import com.gargoylesoftware.htmlunit.*; import com.ibm.ws.security.fat.common.*; import org.jmock.*; import org.junit.*;
[ "com.gargoylesoftware.htmlunit", "com.ibm.ws", "org.jmock", "org.junit" ]
com.gargoylesoftware.htmlunit; com.ibm.ws; org.jmock; org.junit;
933,123
@Override protected void draw(final Graphics2D g2d, final int x, final int y, final int width, final int height) { boolean newIgnoreStatus = User.isIgnoring(entity.getName()); if (newIgnoreStatus != ignored) { visibilityChanged = true; ignored = newIgnoreStatus; markChanged(); } super.draw(g2d, ...
void function(final Graphics2D g2d, final int x, final int y, final int width, final int height) { boolean newIgnoreStatus = User.isIgnoring(entity.getName()); if (newIgnoreStatus != ignored) { visibilityChanged = true; ignored = newIgnoreStatus; markChanged(); } super.draw(g2d, x, y, width, height); } //
/** * Draw the entity. * * @param g2d * The graphics to drawn on. */
Draw the entity
draw
{ "repo_name": "sourceress-project/archestica", "path": "src/games/stendhal/client/gui/j2d/entity/Player2DView.java", "license": "gpl-2.0", "size": 7675 }
[ "games.stendhal.client.entity.User", "java.awt.Graphics2D" ]
import games.stendhal.client.entity.User; import java.awt.Graphics2D;
import games.stendhal.client.entity.*; import java.awt.*;
[ "games.stendhal.client", "java.awt" ]
games.stendhal.client; java.awt;
2,289,206
public Component add(Component c) { this.addImpl(c, null, -1, 0); return c; }
Component function(Component c) { this.addImpl(c, null, -1, 0); return c; }
/** * Add the given component to the first group of the panel. * If the component is a JRadioButton, it's also added to the button * group. * * @see java.awt.Container#add(java.awt.Component) */
Add the given component to the first group of the panel. If the component is a JRadioButton, it's also added to the button group
add
{ "repo_name": "SpoonLabs/gumtree-spoon-ast-diff", "path": "src/test/resources/examples/t_214614/right_JXButtonGroupPanel_1.3.java", "license": "apache-2.0", "size": 16003 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
321,109
public static final Resource NAMESPACE = m_model.createResource( NS ); public static final Resource AnalogSignal = m_model.createResource( "http://purl.org/ontology/mo/AnalogSignal" ); public static final Resource Arrangement = m_model.createResource( "http://purl.org/ontology/m...
public static final Resource NAMESPACE = m_model.createResource( NS ); public static final Resource AnalogSignal = m_model.createResource( STRhttp: public static final Resource Arranger = m_model.createResource( STRhttp: public static final Resource CD = m_model.createResource( STRhttp: public static final Resource Com...
/** <p>The namespace of the vocabulary as a string</p> * @see #NS */
The namespace of the vocabulary as a string
getURI
{ "repo_name": "EivindEE/SemFM", "path": "src/main/java/edu/uib/info310/vocabulary/MO.java", "license": "mit", "size": 77723 }
[ "com.hp.hpl.jena.rdf.model.Property", "com.hp.hpl.jena.rdf.model.Resource" ]
import com.hp.hpl.jena.rdf.model.Property; import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.*;
[ "com.hp.hpl" ]
com.hp.hpl;
1,780,297
public Selector getSelector() { return selector; }
Selector function() { return selector; }
/** * Gets the <code>Selector</code>. * * @return The selector */
Gets the <code>Selector</code>
getSelector
{ "repo_name": "MatthewBishop/openRS", "path": "src/net/openrs/net/reactor/ReactorSession.java", "license": "gpl-3.0", "size": 3218 }
[ "java.nio.channels.Selector" ]
import java.nio.channels.Selector;
import java.nio.channels.*;
[ "java.nio" ]
java.nio;
345,347
public LinePlot line(double[] y, Line.Style style, Color color) { return line(null, y, style, color); }
LinePlot function(double[] y, Line.Style style, Color color) { return line(null, y, style, color); }
/** * Adds a poly line plot to this canvas. * @param y a data vector that describes y coordinates of points. The x * coordinates will be [0, n), where n is the length of y. * @param style the stroke style of line. * @param color the color of line. */
Adds a poly line plot to this canvas
line
{ "repo_name": "arehart13/smile", "path": "plot/src/main/java/smile/plot/PlotCanvas.java", "license": "apache-2.0", "size": 72105 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,208,530
private void buildTeamsStatisticsTableForSectionPanel( InstructorFeedbackResultsSectionPanel sectionPanel, Map<String, Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>>> responsesGroupedByTeam, Set<String> teamsInSection) { Map<S...
void function( InstructorFeedbackResultsSectionPanel sectionPanel, Map<String, Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>>> responsesGroupedByTeam, Set<String> teamsInSection) { Map<String, List<InstructorFeedbackResultsQuestionTable>> teamToStatisticsTables = new HashMap<String, List<InstructorFe...
/** * Constructs InstructorFeedbackResultsQuestionTable containing statistics for each team. * The statistics tables are added to the sectionPanel. */
Constructs InstructorFeedbackResultsQuestionTable containing statistics for each team. The statistics tables are added to the sectionPanel
buildTeamsStatisticsTableForSectionPanel
{ "repo_name": "nockc/teammates", "path": "src/main/java/teammates/ui/pagedata/InstructorFeedbackResultsPageData.java", "license": "gpl-2.0", "size": 88658 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Set" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,437,680
public void setTilesInTunnel(List<AiTile> tilesInTunnel) { checkInterruption(); this.tilesInTunnel = new ArrayList<AiTile>(tilesInTunnel); }
void function(List<AiTile> tilesInTunnel) { checkInterruption(); this.tilesInTunnel = new ArrayList<AiTile>(tilesInTunnel); }
/** * Setter for tilesInTunnel * @param tilesInTunnel List of tiles that is in the current tunnel */
Setter for tilesInTunnel
setTilesInTunnel
{ "repo_name": "vlabatut/totalboumboum", "path": "resources/ai/org/totalboumboum/ai/v201314/ais/enginserhantipici/v4/Agent.java", "license": "gpl-2.0", "size": 13103 }
[ "java.util.ArrayList", "java.util.List", "org.totalboumboum.ai.v201314.adapter.data.AiTile" ]
import java.util.ArrayList; import java.util.List; import org.totalboumboum.ai.v201314.adapter.data.AiTile;
import java.util.*; import org.totalboumboum.ai.v201314.adapter.data.*;
[ "java.util", "org.totalboumboum.ai" ]
java.util; org.totalboumboum.ai;
2,265,831
private void $$$setupUI$$$() { contentPane = new JPanel(); contentPane.setLayout( new GridBagLayout() ); final JLabel label1 = new JLabel(); this.$$$loadLabelText$$$( label1, ResourceBundle.getBundle( "org/apache/polygene/envisage/detail/ServiceConfigurationPane" ).getString( "CT...
private void $$$setupUI$$$() { contentPane = new JPanel(); contentPane.setLayout( new GridBagLayout() ); final JLabel label1 = new JLabel(); this.$$$loadLabelText$$$( label1, ResourceBundle.getBundle( STR ).getString( STR ) ); GridBagConstraints gbc; gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anc...
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * */
Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your code
$$$setupUI$$$
{ "repo_name": "Qi4j/qi4j-sdk", "path": "tools/envisage/src/main/java/org/apache/polygene/envisage/detail/ServiceConfigurationPane.java", "license": "apache-2.0", "size": 12136 }
[ "java.awt.GridBagConstraints", "java.awt.GridBagLayout", "java.util.ResourceBundle", "javax.swing.JButton", "javax.swing.JLabel", "javax.swing.JPanel" ]
import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.util.ResourceBundle; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel;
import java.awt.*; import java.util.*; import javax.swing.*;
[ "java.awt", "java.util", "javax.swing" ]
java.awt; java.util; javax.swing;
1,371,043
static void tableInitialization(String[] oldTableName, String tableShortForm, ArrayList<String> joinOnExpression, String[] selectionPart) { String createDeltaP1 = "SELECT subject, predicate, object, provenance FROM " + oldTableName[0] + " WHERE object NOT like '\"%'"; resultFrame = sqlContext.sql(create...
static void tableInitialization(String[] oldTableName, String tableShortForm, ArrayList<String> joinOnExpression, String[] selectionPart) { String createDeltaP1 = STR + oldTableName[0] + STR%'STRdeltaP1STR\nSTR, MIN(CONCAT(STR.provenance, '/', STR.provenance)) AS provenanceSTRSELECT joinTable.subject AS subject, STR jo...
/** * Initialization steps. * * @param oldTableName * @param tableShortForm * @param joinOnExpression * @param selectionPart */
Initialization steps
tableInitialization
{ "repo_name": "visarBoshnjaku/TriAL-QL-Engine", "path": "src/main/java/hybrid/generationExecutionProvenance/KleeneSmartSPARKP.java", "license": "apache-2.0", "size": 12133 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,067,070
@WebMethod @Path("/changeSiteShortDescription") @Produces("text/plain") @GET public String changeSiteShortDescription( @WebParam(name = "sessionid", partName = "sessionid") @QueryParam("sessionid") String sessionid, @WebParam(name = "siteid", partName = "siteid") @QueryParam(...
@Path(STR) @Produces(STR) String function( @WebParam(name = STR, partName = STR) @QueryParam(STR) String sessionid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String siteid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String shortDescription) { Session session = establishSession(sessionid); try {...
/** * Change the short description of a site * * @param sessionid the id of a valid session * @param siteid the id of the site you want to change the title of * @param shortDescription the new short description * @return success or string containing error * @throws Ru...
Change the short description of a site
changeSiteShortDescription
{ "repo_name": "pushyamig/sakai", "path": "webservices/cxf/src/java/org/sakaiproject/webservices/SakaiScript.java", "license": "apache-2.0", "size": 209455 }
[ "javax.jws.WebParam", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "org.sakaiproject.site.api.Site", "org.sakaiproject.tool.api.Session", "org.sakaiproject.util.FormattedText" ]
import javax.jws.WebParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import org.sakaiproject.site.api.Site; import org.sakaiproject.tool.api.Session; import org.sakaiproject.util.FormattedText;
import javax.jws.*; import javax.ws.rs.*; import org.sakaiproject.site.api.*; import org.sakaiproject.tool.api.*; import org.sakaiproject.util.*;
[ "javax.jws", "javax.ws", "org.sakaiproject.site", "org.sakaiproject.tool", "org.sakaiproject.util" ]
javax.jws; javax.ws; org.sakaiproject.site; org.sakaiproject.tool; org.sakaiproject.util;
1,446,616
@Override public List<Principal> getPrincipals(@WebParam(name = "principalIds") List<String> principalIds) { List<Principal> ret = new ArrayList<Principal>(); for(String p: principalIds) { Principal principalInfo = getPrincipal(p); if (principalInfo != null) { ...
List<Principal> function(@WebParam(name = STR) List<String> principalIds) { List<Principal> ret = new ArrayList<Principal>(); for(String p: principalIds) { Principal principalInfo = getPrincipal(p); if (principalInfo != null) { ret.add(principalInfo) ; } } if (!ret.isEmpty()) { return ret; } else { return null; } }
/** * Gets a list of {@link org.kuali.rice.kim.api.identity.principal.Principal} from a string list of principalId. * * <p> * This method will only return principals that exist. It will return null if the none of the principals exist. * </p> * * @param principalIds the unique id to r...
Gets a list of <code>org.kuali.rice.kim.api.identity.principal.Principal</code> from a string list of principalId. This method will only return principals that exist. It will return null if the none of the principals exist.
getPrincipals
{ "repo_name": "mztaylor/rice-git", "path": "rice-middleware/kim/kim-impl/src/main/java/org/kuali/rice/kim/impl/identity/IdentityCurrentAndArchivedServiceImpl.java", "license": "apache-2.0", "size": 22915 }
[ "java.util.ArrayList", "java.util.List", "javax.jws.WebParam", "org.kuali.rice.kim.api.identity.principal.Principal" ]
import java.util.ArrayList; import java.util.List; import javax.jws.WebParam; import org.kuali.rice.kim.api.identity.principal.Principal;
import java.util.*; import javax.jws.*; import org.kuali.rice.kim.api.identity.principal.*;
[ "java.util", "javax.jws", "org.kuali.rice" ]
java.util; javax.jws; org.kuali.rice;
310,367
@SuppressWarnings("unchecked") public void execute(VtiSoapRequest soapRequest, VtiSoapResponse soapResponse) throws Exception { if (logger.isDebugEnabled()) { logger.debug("SOAP method with name " + getName() + " is started."); } // mapping xml namespace to...
@SuppressWarnings(STR) void function(VtiSoapRequest soapRequest, VtiSoapResponse soapResponse) throws Exception { if (logger.isDebugEnabled()) { logger.debug(STR + getName() + STR); } SimpleNamespaceContext nc = new SimpleNamespaceContext(); nc.addNamespace(prefix, namespace); nc.addNamespace(soapUriPrefix, soapUri); X...
/** * Update dws data for site * * @param soapRequest Vti soap request ({@link VtiSoapRequest}) * @param soapResponse Vti soap response ({@link VtiSoapResponse}) */
Update dws data for site
execute
{ "repo_name": "Alfresco/community-edition", "path": "modules/sharepoint/amp/source/java/org/alfresco/module/vti/web/ws/UpdateDwsDataEndpoint.java", "license": "lgpl-3.0", "size": 6271 }
[ "java.util.List", "org.alfresco.module.vti.handler.VtiHandlerException", "org.alfresco.module.vti.handler.alfresco.VtiPathHelper", "org.alfresco.module.vti.metadata.dic.CAMLMethod", "org.alfresco.module.vti.metadata.model.LinkBean", "org.dom4j.Document", "org.dom4j.DocumentHelper", "org.dom4j.Element"...
import java.util.List; import org.alfresco.module.vti.handler.VtiHandlerException; import org.alfresco.module.vti.handler.alfresco.VtiPathHelper; import org.alfresco.module.vti.metadata.dic.CAMLMethod; import org.alfresco.module.vti.metadata.model.LinkBean; import org.dom4j.Document; import org.dom4j.DocumentHelper; im...
import java.util.*; import org.alfresco.module.vti.handler.*; import org.alfresco.module.vti.handler.alfresco.*; import org.alfresco.module.vti.metadata.dic.*; import org.alfresco.module.vti.metadata.model.*; import org.dom4j.*; import org.jaxen.*; import org.jaxen.dom4j.*;
[ "java.util", "org.alfresco.module", "org.dom4j", "org.jaxen", "org.jaxen.dom4j" ]
java.util; org.alfresco.module; org.dom4j; org.jaxen; org.jaxen.dom4j;
2,908,933
public void put(Integer synSeq, P packet) { Lock lock = map.getLock().writeLock(); try { lock.lock(); Map<Integer, P> m = map.getObj(); m.put(synSeq, packet); } catch (Exception e) { throw e; } finally { lock.unlock(); } }
void function(Integer synSeq, P packet) { Lock lock = map.getLock().writeLock(); try { lock.lock(); Map<Integer, P> m = map.getObj(); m.put(synSeq, packet); } catch (Exception e) { throw e; } finally { lock.unlock(); } }
/** * Adds the. * * @param channelContext the channel context */
Adds the
put
{ "repo_name": "tywo45/talent-aio", "path": "core/talent-aio-common/src/main/java/com/talent/aio/common/maintain/Syns.java", "license": "lgpl-2.1", "size": 1714 }
[ "java.util.Map", "java.util.concurrent.locks.Lock" ]
import java.util.Map; import java.util.concurrent.locks.Lock;
import java.util.*; import java.util.concurrent.locks.*;
[ "java.util" ]
java.util;
1,374,648
@SuppressWarnings("unchecked") public List<ObservableProperty> getObservablePropertyObjects(final Session session) { Criteria criteria = session.createCriteria(ObservableProperty.class); LOGGER.debug("QUERY getObservablePropertyObjects(): {}", HibernateHelper.getSqlString(criteria)); ret...
@SuppressWarnings(STR) List<ObservableProperty> function(final Session session) { Criteria criteria = session.createCriteria(ObservableProperty.class); LOGGER.debug(STR, HibernateHelper.getSqlString(criteria)); return criteria.list(); }
/** * Get all observable property objects * * @param session * Hibernate session * @return Observable property objects */
Get all observable property objects
getObservablePropertyObjects
{ "repo_name": "ahuarte47/SOS", "path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/ObservablePropertyDAO.java", "license": "gpl-2.0", "size": 21443 }
[ "java.util.List", "org.hibernate.Criteria", "org.hibernate.Session", "org.n52.sos.ds.hibernate.entities.ObservableProperty", "org.n52.sos.ds.hibernate.util.HibernateHelper" ]
import java.util.List; import org.hibernate.Criteria; import org.hibernate.Session; import org.n52.sos.ds.hibernate.entities.ObservableProperty; import org.n52.sos.ds.hibernate.util.HibernateHelper;
import java.util.*; import org.hibernate.*; import org.n52.sos.ds.hibernate.entities.*; import org.n52.sos.ds.hibernate.util.*;
[ "java.util", "org.hibernate", "org.n52.sos" ]
java.util; org.hibernate; org.n52.sos;
2,516,468
protected void addField(List<MetadataEntry> contents, String key, SectionRenderable renderable) { contents.add(new StdMetadataEntry(getLabel(key), renderable)); }
void function(List<MetadataEntry> contents, String key, SectionRenderable renderable) { contents.add(new StdMetadataEntry(getLabel(key), renderable)); }
/** * To be used inside getMetadata. * * @param contents * @param key * @param value */
To be used inside getMetadata
addField
{ "repo_name": "equella/Equella", "path": "Source/Plugins/Core/com.equella.core/src/com/tle/web/remoterepo/RemoteRepoListEntry.java", "license": "apache-2.0", "size": 4723 }
[ "com.tle.web.itemlist.MetadataEntry", "com.tle.web.itemlist.StdMetadataEntry", "com.tle.web.sections.render.SectionRenderable", "java.util.List" ]
import com.tle.web.itemlist.MetadataEntry; import com.tle.web.itemlist.StdMetadataEntry; import com.tle.web.sections.render.SectionRenderable; import java.util.List;
import com.tle.web.itemlist.*; import com.tle.web.sections.render.*; import java.util.*;
[ "com.tle.web", "java.util" ]
com.tle.web; java.util;
822,688
private boolean doAnEdit() throws IOException { return fs.mkdirs(new Path("/tmp", Integer.toString(editsPerformed++))); }
boolean function() throws IOException { return fs.mkdirs(new Path("/tmp", Integer.toString(editsPerformed++))); }
/** * Do a mutative metadata operation on the file system. * * @return true if the operation was successful, false otherwise. */
Do a mutative metadata operation on the file system
doAnEdit
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLogJournalFailures.java", "license": "apache-2.0", "size": 11242 }
[ "java.io.IOException", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,719,315
public PortableRawWriterEx writer(PlatformOutputStream out);
PortableRawWriterEx function(PlatformOutputStream out);
/** * Get memory writer. * * @param out Output. * @return Writer. */
Get memory writer
writer
{ "repo_name": "agoncharuk/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java", "license": "apache-2.0", "size": 8172 }
[ "org.apache.ignite.internal.portable.PortableRawWriterEx", "org.apache.ignite.internal.processors.platform.memory.PlatformOutputStream" ]
import org.apache.ignite.internal.portable.PortableRawWriterEx; import org.apache.ignite.internal.processors.platform.memory.PlatformOutputStream;
import org.apache.ignite.internal.portable.*; import org.apache.ignite.internal.processors.platform.memory.*;
[ "org.apache.ignite" ]
org.apache.ignite;
858,515
public static <S1, I1, T1, SP1, TP1, S2, I2, T2, SP2, TP2> Mapping<S1, S2> copy(TSTraversalMethod method, UniversalTransitionSystem<S1, ? super I1, T1, ? extends SP1, ? extends TP1> in, ...
static <S1, I1, T1, SP1, TP1, S2, I2, T2, SP2, TP2> Mapping<S1, S2> function(TSTraversalMethod method, UniversalTransitionSystem<S1, ? super I1, T1, ? extends SP1, ? extends TP1> in, int limit, Collection<? extends I1> inputs, MutableAutomaton<S2, I2, T2, ? super SP2, ? super TP2> out, Function<? super I1, ? extends I2...
/** * Copies a {@link UniversalAutomaton} to a {@link MutableAutomaton} with possibly heterogeneous input alphabets and * state and transition properties. * * @param method * the traversal method to use * @param in * the input transition system * @param limit ...
Copies a <code>UniversalAutomaton</code> to a <code>MutableAutomaton</code> with possibly heterogeneous input alphabets and state and transition properties
copy
{ "repo_name": "LearnLib/automatalib", "path": "util/src/main/java/net/automatalib/util/ts/copy/TSCopy.java", "license": "apache-2.0", "size": 25845 }
[ "java.util.Collection", "java.util.function.Function", "java.util.function.Predicate", "net.automatalib.automata.MutableAutomaton", "net.automatalib.commons.util.mappings.Mapping", "net.automatalib.ts.TransitionPredicate", "net.automatalib.ts.UniversalTransitionSystem", "net.automatalib.util.ts.TS", ...
import java.util.Collection; import java.util.function.Function; import java.util.function.Predicate; import net.automatalib.automata.MutableAutomaton; import net.automatalib.commons.util.mappings.Mapping; import net.automatalib.ts.TransitionPredicate; import net.automatalib.ts.UniversalTransitionSystem; import net.aut...
import java.util.*; import java.util.function.*; import net.automatalib.automata.*; import net.automatalib.commons.util.mappings.*; import net.automatalib.ts.*; import net.automatalib.util.ts.*; import net.automatalib.util.ts.traversal.*;
[ "java.util", "net.automatalib.automata", "net.automatalib.commons", "net.automatalib.ts", "net.automatalib.util" ]
java.util; net.automatalib.automata; net.automatalib.commons; net.automatalib.ts; net.automatalib.util;
2,511,890
public void setTabHandle(Component tabHandle) { this.tabHandle = tabHandle; }
void function(Component tabHandle) { this.tabHandle = tabHandle; }
/** * Set the tabhandle * @param tabHandle */
Set the tabhandle
setTabHandle
{ "repo_name": "inversion/ciderspe", "path": "src/cider/client/gui/ETASourceEditorPane.java", "license": "gpl-3.0", "size": 26956 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
482,991
public Matrix getX() { return _xp; }
Matrix function() { return _xp; }
/** * Returns the predicted track state vector. */
Returns the predicted track state vector
getX
{ "repo_name": "GeoffHayes/madmath-java", "path": "various/tracking/KalmanPredictFilter.java", "license": "bsd-3-clause", "size": 4943 }
[ "com.madmath.math.Matrix" ]
import com.madmath.math.Matrix;
import com.madmath.math.*;
[ "com.madmath.math" ]
com.madmath.math;
2,541,730
public static String encodeOAuthHeader(Map<String, Object> entries) { StringBuffer sb = new StringBuffer(); sb.append(OAuth.OAUTH_HEADER_NAME).append(" "); for (Map.Entry<String, Object> entry : entries.entrySet()) { String value = entry.getValue() == null? null: String.valueOf(e...
static String function(Map<String, Object> entries) { StringBuffer sb = new StringBuffer(); sb.append(OAuth.OAUTH_HEADER_NAME).append(" "); for (Map.Entry<String, Object> entry : entries.entrySet()) { String value = entry.getValue() == null? null: String.valueOf(entry.getValue()); if (!OAuthUtils.isEmpty(entry.getKey()...
/** * Construct a WWW-Authenticate or Authorization header with the OAuth challenge/credentials */
Construct a WWW-Authenticate or Authorization header with the OAuth challenge/credentials
encodeOAuthHeader
{ "repo_name": "cdwijayarathna/wso2-amber", "path": "modules/amber/oauth-2.0/oauth2-common/src/main/java/org/apache/amber/oauth2/common/utils/OAuthUtils.java", "license": "apache-2.0", "size": 16200 }
[ "java.util.Map", "org.apache.amber.oauth2.common.OAuth" ]
import java.util.Map; import org.apache.amber.oauth2.common.OAuth;
import java.util.*; import org.apache.amber.oauth2.common.*;
[ "java.util", "org.apache.amber" ]
java.util; org.apache.amber;
242,792
public Map<String, Authentication> getAuthentications() { return authentications; }
Map<String, Authentication> function() { return authentications; }
/** * Get authentications (key: authentication name, value: authentication). * * @return Map of authentication objects */
Get authentications (key: authentication name, value: authentication)
getAuthentications
{ "repo_name": "SDU-Software-Engineering/opn", "path": "ws/BankingJava/src/main/java/dk/sdu/mmmi/opn/swaggerbank/ApiClient.java", "license": "gpl-3.0", "size": 46058 }
[ "dk.sdu.mmmi.opn.swaggerbank.auth.Authentication", "java.util.Map" ]
import dk.sdu.mmmi.opn.swaggerbank.auth.Authentication; import java.util.Map;
import dk.sdu.mmmi.opn.swaggerbank.auth.*; import java.util.*;
[ "dk.sdu.mmmi", "java.util" ]
dk.sdu.mmmi; java.util;
2,083,654
default <T> Routes post(String path, Supplier<T> handler) { return add(HTTP.Method.POST, path, handler); }
default <T> Routes post(String path, Supplier<T> handler) { return add(HTTP.Method.POST, path, handler); }
/** * Adds a route handling a http post request. */
Adds a route handling a http post request
post
{ "repo_name": "leapframework/framework", "path": "web/core/src/main/java/leap/web/route/Routes.java", "license": "apache-2.0", "size": 4983 }
[ "java.util.function.Supplier" ]
import java.util.function.Supplier;
import java.util.function.*;
[ "java.util" ]
java.util;
1,204,932
if (!RhnListTagFunctions.isExpandable(current)) { NetworkDto dto = (NetworkDto) current; if (dto.getInactive() > 0) { return " inactive"; } } return super.getRowClass(current); }
if (!RhnListTagFunctions.isExpandable(current)) { NetworkDto dto = (NetworkDto) current; if (dto.getInactive() > 0) { return STR; } } return super.getRowClass(current); }
/** * get the row style for the current object * @param current the current object that is being rendered * @return the string that is the style to add to the row */
get the row style for the current object
getRowClass
{ "repo_name": "xkollar/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/taglibs/list/row/DuplicateSystemsRowRenderer.java", "license": "gpl-2.0", "size": 1427 }
[ "com.redhat.rhn.frontend.dto.NetworkDto", "com.redhat.rhn.frontend.taglibs.RhnListTagFunctions" ]
import com.redhat.rhn.frontend.dto.NetworkDto; import com.redhat.rhn.frontend.taglibs.RhnListTagFunctions;
import com.redhat.rhn.frontend.dto.*; import com.redhat.rhn.frontend.taglibs.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
1,667,777
private String getCollectionName(String collectionPrefix, String instrumentId) { return checkNotNullOrEmpty(collectionPrefix) + checkNotNullOrEmpty(instrumentId).toUpperCase().replaceAll("[^A-Za-z0-9]", "_"); }
String function(String collectionPrefix, String instrumentId) { return checkNotNullOrEmpty(collectionPrefix) + checkNotNullOrEmpty(instrumentId).toUpperCase().replaceAll(STR, "_"); }
/** * Returns the collection name used by persistence layer or message queues to store and * dispatch prices. */
Returns the collection name used by persistence layer or message queues to store and dispatch prices
getCollectionName
{ "repo_name": "melphi/algobox", "path": "java/algobox/algobox-api/src/main/java/io/algobox/api/module/price/dao/impl/PriceTickDaoImpl.java", "license": "apache-2.0", "size": 4745 }
[ "io.algobox.util.MorePreconditions" ]
import io.algobox.util.MorePreconditions;
import io.algobox.util.*;
[ "io.algobox.util" ]
io.algobox.util;
736,667
public static int readUShort(ByteBuffer buffer) { short s = buffer.getShort(); return s & 0xffff; }
static int function(ByteBuffer buffer) { short s = buffer.getShort(); return s & 0xffff; }
/** * get one unsigned short as int type */
get one unsigned short as int type
readUShort
{ "repo_name": "linchaolong/ApkToolPlus", "path": "lib.ApkParser/src/net/dongliu/apk/parser/utils/Buffers.java", "license": "apache-2.0", "size": 1433 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
168,580
public byte[] getTypesPopped(ClassFile methodClassFile) { byte[] types = {ClassFile.T_DOUBLE, ClassFile.T_DOUBLE}; return types; }
byte[] function(ClassFile methodClassFile) { byte[] types = {ClassFile.T_DOUBLE, ClassFile.T_DOUBLE}; return types; }
/** * Get the types of elements this instruction will pop from the stack. * * @param methodClassFile The class file of the method this instruction belongs to. * @return The types this instruction pops. The length of the arrays reflects the number of * elements pushed in the order they are pushed....
Get the types of elements this instruction will pop from the stack
getTypesPopped
{ "repo_name": "wwu-pi/muggl", "path": "muggl-core/src/de/wwu/muggl/instructions/bytecode/DRem.java", "license": "gpl-3.0", "size": 2659 }
[ "de.wwu.muggl.vm.classfile.ClassFile" ]
import de.wwu.muggl.vm.classfile.ClassFile;
import de.wwu.muggl.vm.classfile.*;
[ "de.wwu.muggl" ]
de.wwu.muggl;
1,487,721
@Transactional public List<DestinoProducto> create(List<DestinoProducto> destinosProductos) { List<DestinoProducto> newDestinoProductos = new ArrayList<DestinoProducto>(); for (DestinoProducto destinoProducto : destinosProductos) { newDestinoProductos.add(destinoProductoDAO .saveDestinoProducto...
List<DestinoProducto> function(List<DestinoProducto> destinosProductos) { List<DestinoProducto> newDestinoProductos = new ArrayList<DestinoProducto>(); for (DestinoProducto destinoProducto : destinosProductos) { newDestinoProductos.add(destinoProductoDAO .saveDestinoProducto(destinoProducto)); } return newDestinoProduc...
/** * Create new Producto/Productos * * @param data * - json data from request * @return created Productos */
Create new Producto/Productos
create
{ "repo_name": "osmaroi/touchBar", "path": "touchbar/src/es/bootools/touchbar/service/DestinoProductoService.java", "license": "gpl-3.0", "size": 2832 }
[ "es.bootools.touchbar.model.DestinoProducto", "java.util.ArrayList", "java.util.List" ]
import es.bootools.touchbar.model.DestinoProducto; import java.util.ArrayList; import java.util.List;
import es.bootools.touchbar.model.*; import java.util.*;
[ "es.bootools.touchbar", "java.util" ]
es.bootools.touchbar; java.util;
51,138
public void clear() { if (encryptedPrivateBytes != null) { Arrays.fill(encryptedPrivateBytes, (byte)0); } if (initialisationVector != null) { Arrays.fill(initialisationVector, (byte)0); } }
void function() { if (encryptedPrivateBytes != null) { Arrays.fill(encryptedPrivateBytes, (byte)0); } if (initialisationVector != null) { Arrays.fill(initialisationVector, (byte)0); } }
/** * Clears all the EncryptedPrivateKey contents from memory (overwriting all data including PRIVATE KEYS). * WARNING - this method irreversibly deletes the private key information. */
Clears all the EncryptedPrivateKey contents from memory (overwriting all data including PRIVATE KEYS). WARNING - this method irreversibly deletes the private key information
clear
{ "repo_name": "habibmasuro/litecoinj", "path": "core/src/main/java/com/google/litecoin/crypto/EncryptedPrivateKey.java", "license": "apache-2.0", "size": 4739 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
207,748
public VisitType getRadiologyVisitType() { return visitService.getVisitTypeByUuid(getGlobalProperty(RadiologyConstants.GP_RADIOLOGY_VISIT_TYPE, true)); }
VisitType function() { return visitService.getVisitTypeByUuid(getGlobalProperty(RadiologyConstants.GP_RADIOLOGY_VISIT_TYPE, true)); }
/** * Get VisitType for RadiologyOrder's * * @return visitType for radiology orders * @should return visit type for radiology orders * @should throw illegal state exception for non existing radiology visit type */
Get VisitType for RadiologyOrder's
getRadiologyVisitType
{ "repo_name": "teleivo/openmrs-module-radiologydcm4chee", "path": "api/src/main/java/org/openmrs/module/radiology/RadiologyProperties.java", "license": "mpl-2.0", "size": 14823 }
[ "org.openmrs.VisitType" ]
import org.openmrs.VisitType;
import org.openmrs.*;
[ "org.openmrs" ]
org.openmrs;
605,418
public void sendRegistrationId() throws AndroidAgentException { DeviceInfo deviceInfo = new DeviceInfo(context); DeviceInfoPayload deviceInfoPayload = new DeviceInfoPayload(context); deviceInfoPayload.build(); String replyPayload = deviceInfoPayload.getDeviceInfoPayload(); String ipSaved = Preference.getS...
void function() throws AndroidAgentException { DeviceInfo deviceInfo = new DeviceInfo(context); DeviceInfoPayload deviceInfoPayload = new DeviceInfoPayload(context); deviceInfoPayload.build(); String replyPayload = deviceInfoPayload.getDeviceInfoPayload(); String ipSaved = Preference.getString(context, Constants.Prefer...
/** * This is used to send the registration Id to MDM server so that the server * can use it as a reference to identify the device when sending messages to * Google server. * * @throws AndroidAgentException */
This is used to send the registration Id to MDM server so that the server can use it as a reference to identify the device when sending messages to Google server
sendRegistrationId
{ "repo_name": "laki88/product-mdm", "path": "modules/mobile-agents/android/client/client/src/main/java/org/wso2/emm/agent/RegistrationActivity.java", "license": "apache-2.0", "size": 12017 }
[ "android.util.Log", "org.wso2.emm.agent.api.DeviceInfo", "org.wso2.emm.agent.beans.ServerConfig", "org.wso2.emm.agent.services.DeviceInfoPayload", "org.wso2.emm.agent.utils.CommonUtils", "org.wso2.emm.agent.utils.Constants", "org.wso2.emm.agent.utils.Preference" ]
import android.util.Log; import org.wso2.emm.agent.api.DeviceInfo; import org.wso2.emm.agent.beans.ServerConfig; import org.wso2.emm.agent.services.DeviceInfoPayload; import org.wso2.emm.agent.utils.CommonUtils; import org.wso2.emm.agent.utils.Constants; import org.wso2.emm.agent.utils.Preference;
import android.util.*; import org.wso2.emm.agent.api.*; import org.wso2.emm.agent.beans.*; import org.wso2.emm.agent.services.*; import org.wso2.emm.agent.utils.*;
[ "android.util", "org.wso2.emm" ]
android.util; org.wso2.emm;
2,406,052
public MessagelistenerType<T> removeId() { childNode.removeAttribute("id"); return this; }
MessagelistenerType<T> function() { childNode.removeAttribute("id"); return this; }
/** * Removes the <code>id</code> attribute * @return the current instance of <code>MessagelistenerType<T></code> */
Removes the <code>id</code> attribute
removeId
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/connector16/MessagelistenerTypeImpl.java", "license": "epl-1.0", "size": 5351 }
[ "org.jboss.shrinkwrap.descriptor.api.connector16.MessagelistenerType" ]
import org.jboss.shrinkwrap.descriptor.api.connector16.MessagelistenerType;
import org.jboss.shrinkwrap.descriptor.api.connector16.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
1,533,661
public static PrivilegeType getPrivilegeType(int value) { PrivilegeType type; switch (value) { case Constants.OBJECT_LEVEL_SECURE_RETRIEVE : type = ObjectLevel; break; case Constants.CLASS_LEVEL_SECURE_RETRIEVE : type = ClassLevel; break; case Constants.INSECURE_RETRIEVE : ...
static PrivilegeType function(int value) { PrivilegeType type; switch (value) { case Constants.OBJECT_LEVEL_SECURE_RETRIEVE : type = ObjectLevel; break; case Constants.CLASS_LEVEL_SECURE_RETRIEVE : type = ClassLevel; break; case Constants.INSECURE_RETRIEVE : default : type = InsecureLevel; break; } return type; }
/** * To get the PrivilegeType for the given value. * @param value The value * @return The PrivilegeType for the given value */
To get the PrivilegeType for the given value
getPrivilegeType
{ "repo_name": "NCIP/cab2b", "path": "software/dependencies/commonpackage/HEAD_TAG_10_Jan_2007_RELEASE_BRANCH_FOR_V11/src/edu/wustl/common/querysuite/security/PrivilegeType.java", "license": "bsd-3-clause", "size": 1279 }
[ "edu.wustl.common.util.global.Constants" ]
import edu.wustl.common.util.global.Constants;
import edu.wustl.common.util.global.*;
[ "edu.wustl.common" ]
edu.wustl.common;
1,851,917
public synchronized VersionedExecutionEnvironment createNewVersion(ColumnShard... updatedColShard) { DelegatingExecutionEnvironment res; if (lastVersionedExecutionEnvironment == null) res = executionEnvironmentFactory.createDelegatingExecutionEnvironment(defaultEnv, Integer.MIN_VALUE); else re...
synchronized VersionedExecutionEnvironment function(ColumnShard... updatedColShard) { DelegatingExecutionEnvironment res; if (lastVersionedExecutionEnvironment == null) res = executionEnvironmentFactory.createDelegatingExecutionEnvironment(defaultEnv, Integer.MIN_VALUE); else res = executionEnvironmentFactory.createDel...
/** * Create a new version of an intermediary {@link ExecutionEnvironment} with the given updated columns. * * @param updatedColShard * The columns that have new values. These columns will override the values the previous intermediary * {@link ExecutionEnvironment} had of those columns...
Create a new version of an intermediary <code>ExecutionEnvironment</code> with the given updated columns
createNewVersion
{ "repo_name": "diqube/diqube", "path": "diqube-execution/src/main/java/org/diqube/execution/ColumnVersionManager.java", "license": "agpl-3.0", "size": 4616 }
[ "org.diqube.data.column.ColumnShard", "org.diqube.data.types.dbl.DoubleColumnShard", "org.diqube.data.types.lng.LongColumnShard", "org.diqube.data.types.str.StringColumnShard", "org.diqube.executionenv.DelegatingExecutionEnvironment", "org.diqube.executionenv.VersionedExecutionEnvironment" ]
import org.diqube.data.column.ColumnShard; import org.diqube.data.types.dbl.DoubleColumnShard; import org.diqube.data.types.lng.LongColumnShard; import org.diqube.data.types.str.StringColumnShard; import org.diqube.executionenv.DelegatingExecutionEnvironment; import org.diqube.executionenv.VersionedExecutionEnvironment...
import org.diqube.data.column.*; import org.diqube.data.types.dbl.*; import org.diqube.data.types.lng.*; import org.diqube.data.types.str.*; import org.diqube.executionenv.*;
[ "org.diqube.data", "org.diqube.executionenv" ]
org.diqube.data; org.diqube.executionenv;
2,820,049
public static boolean needsExternalStorage(Form form, ScopedFile scopedFile) { return isExternalStorageUri(form, resolveFileName(form, scopedFile.getFileName(), scopedFile.getScope())); }
static boolean function(Form form, ScopedFile scopedFile) { return isExternalStorageUri(form, resolveFileName(form, scopedFile.getFileName(), scopedFile.getScope())); }
/** * Check whether the given scoped file will cause access to external storage. This can be used to * determine whether a check for the mount state of the external storage is also needed. Note that * the file need not exist since we may want to create it. * * @param form the Form object to use as the An...
Check whether the given scoped file will cause access to external storage. This can be used to determine whether a check for the mount state of the external storage is also needed. Note that the file need not exist since we may want to create it
needsExternalStorage
{ "repo_name": "jisqyv/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/util/FileUtil.java", "license": "apache-2.0", "size": 54685 }
[ "com.google.appinventor.components.runtime.Form" ]
import com.google.appinventor.components.runtime.Form;
import com.google.appinventor.components.runtime.*;
[ "com.google.appinventor" ]
com.google.appinventor;
209,760
void setVmList(List<Vm> vmList); public static final CloudletToVmMappingHeuristic NULL = new CloudletToVmMappingHeuristicNull(); } class CloudletToVmMappingHeuristicNull extends HeuristicNull<CloudletToVmMappingSolution> implements CloudletToVmMappingHeuristic { @Override public List<Clo...
void setVmList(List<Vm> vmList); public static final CloudletToVmMappingHeuristic NULL = new CloudletToVmMappingHeuristicNull(); } class CloudletToVmMappingHeuristicNull extends HeuristicNull<CloudletToVmMappingSolution> implements CloudletToVmMappingHeuristic { @Override public List<Cloudlet> getCloudletList() { retur...
/** * Sets the list of available Vm's to host Cloudlets. * @param vmList */
Sets the list of available Vm's to host Cloudlets
setVmList
{ "repo_name": "thejotta/CloudSimPlusModificado", "path": "cloudsim-plus/src/main/java/org/cloudsimplus/heuristics/CloudletToVmMappingHeuristic.java", "license": "gpl-3.0", "size": 1806 }
[ "java.util.Collections", "java.util.List", "org.cloudbus.cloudsim.Cloudlet", "org.cloudbus.cloudsim.Vm" ]
import java.util.Collections; import java.util.List; import org.cloudbus.cloudsim.Cloudlet; import org.cloudbus.cloudsim.Vm;
import java.util.*; import org.cloudbus.cloudsim.*;
[ "java.util", "org.cloudbus.cloudsim" ]
java.util; org.cloudbus.cloudsim;
525,218
public void fab(View view) { if (burger == false) { burgerMenu.setVisibility(View.VISIBLE); burgerButton.setImageResource(R.drawable.ic_cross); burger = true; } else { burgerMenu.setVisibility(View.GONE); burgerButton.se...
void function(View view) { if (burger == false) { burgerMenu.setVisibility(View.VISIBLE); burgerButton.setImageResource(R.drawable.ic_cross); burger = true; } else { burgerMenu.setVisibility(View.GONE); burgerButton.setImageResource(R.drawable.ic_burger); burger = false; } }
/** * Method called when burger button is pressed, controls whether butger menu is displayed or not */
Method called when burger button is pressed, controls whether butger menu is displayed or not
fab
{ "repo_name": "t-wheatley/Squad", "path": "app/src/main/java/uk/ac/tees/donut/squad/activities/MapActivity.java", "license": "apache-2.0", "size": 25681 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,449,138
@VisibleForTesting @ThreadCompatible public final synchronized void updateActionInputs(Path execRoot, ArtifactResolver artifactResolver, CppCompileActionContext.Reply reply) throws ActionExecutionException { if (!cppConfiguration.shouldScanIncludes()) { return; } inputsKnown = false;...
final synchronized void function(Path execRoot, ArtifactResolver artifactResolver, CppCompileActionContext.Reply reply) throws ActionExecutionException { if (!cppConfiguration.shouldScanIncludes()) { return; } inputsKnown = false; NestedSetBuilder<Artifact> inputs = NestedSetBuilder.stableOrder(); Profiler.instance().s...
/** * Recalculates this action's live input collection, including sources, middlemen. * * @throws ActionExecutionException iff any errors happen during update. */
Recalculates this action's live input collection, including sources, middlemen
updateActionInputs
{ "repo_name": "joshua0pang/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java", "license": "apache-2.0", "size": 55210 }
[ "com.google.devtools.build.lib.actions.ActionExecutionException", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.actions.ArtifactResolver", "com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder", "com.google.devtools.build.lib.profiler.Profiler", "com.google.d...
import com.google.devtools.build.lib.actions.ActionExecutionException; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.ArtifactResolver; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.profiler.Profiler; im...
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.profiler.*; import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
1,357,269
@Override public Iterator<Element> iterateNonZero() { return iterator(); }
Iterator<Element> function() { return iterator(); }
/** * Iterates over all non-zero elements. <p/> NOTE: Implementations may choose to reuse the Element * returned for performance reasons, so if you need a copy of it, you should call {@link * #getElement(int)} for the given index * * @return An {@link java.util.Iterator} over all non-zero elements */
returned for performance reasons, so if you need a copy of it, you should call <code>#getElement(int)</code> for the given index
iterateNonZero
{ "repo_name": "BigData-Lab-Frankfurt/HiBench-DSE", "path": "common/mahout-distribution-0.7-hadoop1/math/src/main/java/org/apache/mahout/math/ConstantVector.java", "license": "apache-2.0", "size": 3993 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,308,003
public static boolean isGzipSupported(HttpServletRequest request) { String browserEncodings = request.getHeader(HEADER_ACCEPT_ENCODING); return (browserEncodings != null) && (browserEncodings.contains("gzip")); }
static boolean function(HttpServletRequest request) { String browserEncodings = request.getHeader(HEADER_ACCEPT_ENCODING); return (browserEncodings != null) && (browserEncodings.contains("gzip")); }
/** * Returns <code>true</code> if client supports gzip encoding. */
Returns <code>true</code> if client supports gzip encoding
isGzipSupported
{ "repo_name": "wsldl123292/jodd", "path": "jodd-servlet/src/main/java/jodd/servlet/ServletUtil.java", "license": "bsd-3-clause", "size": 23646 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,231,771
for (int i = columns.length - 1; i >= 0; i--) { if (columns[i] < 0) { throw new IllegalArgumentException("Index must be >= 0"); } } } /** * Returns a <code>RowFilter</code> that uses a regular * expression to determine which entries to include. Only en...
for (int i = columns.length - 1; i >= 0; i--) { if (columns[i] < 0) { throw new IllegalArgumentException(STR); } } } /** * Returns a <code>RowFilter</code> that uses a regular * expression to determine which entries to include. Only entries * with at least one matching value are included. For * example, the following c...
/** * Throws an IllegalArgumentException if any of the values in * columns are {@literal <} 0. */
Throws an IllegalArgumentException if any of the values in columns are < 0
checkIndices
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/javax/swing/RowFilter.java", "license": "apache-2.0", "size": 21847 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,106,819
public UpdateResource withTags(Map<String, String> tags) { this.tags = tags; return this; }
UpdateResource function(Map<String, String> tags) { this.tags = tags; return this; }
/** * Set resource tags. * * @param tags the tags value to set * @return the UpdateResource object itself. */
Set resource tags
withTags
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/hybridcompute/mgmt-v2019_12_12/src/main/java/com/microsoft/azure/management/hybridcompute/v2019_12_12/UpdateResource.java", "license": "mit", "size": 976 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,114,838
Builder mapOfStringToSimpleStruct(Map<String, SimpleStruct> mapOfStringToSimpleStruct);
Builder mapOfStringToSimpleStruct(Map<String, SimpleStruct> mapOfStringToSimpleStruct);
/** * Sets the value of the MapOfStringToSimpleStruct property for this object. * * @param mapOfStringToSimpleStruct * The new value for the MapOfStringToSimpleStruct property for this object. * @return Returns a reference to this object so that method calls can be ch...
Sets the value of the MapOfStringToSimpleStruct property for this object
mapOfStringToSimpleStruct
{ "repo_name": "aws/aws-sdk-java-v2", "path": "codegen/src/test/resources/software/amazon/awssdk/codegen/poet/model/alltypesrequest.java", "license": "apache-2.0", "size": 147512 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,282,838
XContentParser createParser(String content) throws IOException;
XContentParser createParser(String content) throws IOException;
/** * Creates a parser over the provided string content. */
Creates a parser over the provided string content
createParser
{ "repo_name": "jprante/elasticsearch-hex", "path": "src/main/java/org/xbib/elasticsearch/common/xcontent/XContent.java", "license": "apache-2.0", "size": 1411 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
428,756
@Override void close() throws IOException;
void close() throws IOException;
/** * Close the provider. Note: it's the provider's responsibility to close any caches it manages */
Close the provider. Note: it's the provider's responsibility to close any caches it manages
close
{ "repo_name": "mosoft521/curator", "path": "curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceProvider.java", "license": "apache-2.0", "size": 2475 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,848,537
public static String getServletContextPath(String processDefinitionId) { ProcessApplicationInfo processApplicationInfo = getProcessApplicationInfo(processDefinitionId); if (processApplicationInfo == null) { return null; } return processApplicationInfo.getProperties().get( ProcessApplicationInfo.PROP_S...
static String function(String processDefinitionId) { ProcessApplicationInfo processApplicationInfo = getProcessApplicationInfo(processDefinitionId); if (processApplicationInfo == null) { return null; } return processApplicationInfo.getProperties().get( ProcessApplicationInfo.PROP_SERVLET_CONTEXT_PATH); }
/** * Retrieve the servlet context path of a process definition from any process engine. */
Retrieve the servlet context path of a process definition from any process engine
getServletContextPath
{ "repo_name": "plexiti/camunda-consulting", "path": "snippets/get-servlet-context-by-process-definition/src/main/java/org/example/get_servlet_context_by_process_definition/ProcessApplicationHelper.java", "license": "apache-2.0", "size": 3644 }
[ "org.camunda.bpm.application.ProcessApplicationInfo" ]
import org.camunda.bpm.application.ProcessApplicationInfo;
import org.camunda.bpm.application.*;
[ "org.camunda.bpm" ]
org.camunda.bpm;
1,469,267
List<Attribute> getAttributes(PerunSession sess, Member member, Group group) throws MemberGroupMismatchException;
List<Attribute> getAttributes(PerunSession sess, Member member, Group group) throws MemberGroupMismatchException;
/** * Get all <b>non-empty</b> attributes associated with the member in the group. * * @param sess perun session * @param member to get the attributes from * @param group group to get the attributes from * @return list of attributes * * @throws InternalErrorException if an exception raise in concrete im...
Get all non-empty attributes associated with the member in the group
getAttributes
{ "repo_name": "zlamalp/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java", "license": "bsd-2-clause", "size": 244560 }
[ "cz.metacentrum.perun.core.api.Attribute", "cz.metacentrum.perun.core.api.Group", "cz.metacentrum.perun.core.api.Member", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.MemberGroupMismatchException", "java.util.List" ]
import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.MemberGroupMismatchException; 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,813,907
public static void putOneTimeTokenAccounts(final RequestContext requestContext, final Collection accounts) { requestContext.getFlowScope().put("registeredDevices", accounts); }
static void function(final RequestContext requestContext, final Collection accounts) { requestContext.getFlowScope().put(STR, accounts); }
/** * Put one time token accounts. * * @param requestContext the request context * @param accounts the accounts */
Put one time token accounts
putOneTimeTokenAccounts
{ "repo_name": "apereo/cas", "path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java", "license": "apache-2.0", "size": 71894 }
[ "java.util.Collection", "org.springframework.webflow.execution.RequestContext" ]
import java.util.Collection; import org.springframework.webflow.execution.RequestContext;
import java.util.*; import org.springframework.webflow.execution.*;
[ "java.util", "org.springframework.webflow" ]
java.util; org.springframework.webflow;
325,140
public void setClip(Path path) { throwNotImplemented(); }
void function(Path path) { throwNotImplemented(); }
/** * Sets the area which can be affected by drawing operations to the * specified <code>Path</code>. * * @param path * the clipping path * @since 3.1 */
Sets the area which can be affected by drawing operations to the specified <code>Path</code>
setClip
{ "repo_name": "archimatetool/archi", "path": "org.eclipse.draw2d/src/org/eclipse/draw2d/Graphics.java", "license": "mit", "size": 35062 }
[ "org.eclipse.swt.graphics.Path" ]
import org.eclipse.swt.graphics.Path;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
168,011
@Override public final int readUnsignedByte() throws IOException { int temp = in.read(); if (temp < 0) { throw new EOFException(); } return temp; }
final int function() throws IOException { int temp = in.read(); if (temp < 0) { throw new EOFException(); } return temp; }
/** * Reads an unsigned 8-bit <code>byte</code> value from this stream and * returns it as an int. * * @return the next unsigned byte value from the source stream. * * @throws IOException * If a problem occurs reading from this DataInputStream. * */
Reads an unsigned 8-bit <code>byte</code> value from this stream and returns it as an int
readUnsignedByte
{ "repo_name": "ty1er/incubator-asterixdb", "path": "asterixdb/asterix-hivecompat/src/main/java/org/apache/asterix/hivecompat/io/NonSyncDataInputBuffer.java", "license": "apache-2.0", "size": 14867 }
[ "java.io.EOFException", "java.io.IOException" ]
import java.io.EOFException; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
203,334
return new CharacterEncodingFilter("UTF-8", true); }
return new CharacterEncodingFilter("UTF-8", true); }
/** * A character encoding filter. * * @return the character encoding filter */
A character encoding filter
a
{ "repo_name": "PetrGasparik/cas", "path": "cas-management-webapp-support/src/main/java/org/jasig/cas/config/CasManagementWebAppConfiguration.java", "license": "apache-2.0", "size": 10523 }
[ "org.springframework.web.filter.CharacterEncodingFilter" ]
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.filter.*;
[ "org.springframework.web" ]
org.springframework.web;
1,872,207
public void validateAttributeValueListKey(AttributeValueListKey attributeValueListKey) { // Validate. Assert.notNull(attributeValueListKey, "An attribute value list key must be specified."); attributeValueListKey.setNamespace(alternateKeyHelper.validateStringParameter("namespace", attrib...
void function(AttributeValueListKey attributeValueListKey) { Assert.notNull(attributeValueListKey, STR); attributeValueListKey.setNamespace(alternateKeyHelper.validateStringParameter(STR, attributeValueListKey.getNamespace())); attributeValueListKey.setAttributeValueListName( alternateKeyHelper.validateStringParameter(...
/** * Validates an attribute value list key. * * @param attributeValueListKey the attribute value list key */
Validates an attribute value list key
validateAttributeValueListKey
{ "repo_name": "kusid/herd", "path": "herd-code/herd-service/src/main/java/org/finra/herd/service/helper/AttributeValueListHelper.java", "license": "apache-2.0", "size": 2233 }
[ "org.finra.herd.model.api.xml.AttributeValueListKey", "org.springframework.util.Assert" ]
import org.finra.herd.model.api.xml.AttributeValueListKey; import org.springframework.util.Assert;
import org.finra.herd.model.api.xml.*; import org.springframework.util.*;
[ "org.finra.herd", "org.springframework.util" ]
org.finra.herd; org.springframework.util;
1,791,091
public void serializeSnapshotSection(OutputStream out) throws IOException { SnapshotManager sm = fsn.getSnapshotManager(); SnapshotSection.Builder b = SnapshotSection.newBuilder() .setSnapshotCounter(sm.getSnapshotCounter()) .setNumSnapshots(sm.getNumSnapshots()); INodeDirecto...
void function(OutputStream out) throws IOException { SnapshotManager sm = fsn.getSnapshotManager(); SnapshotSection.Builder b = SnapshotSection.newBuilder() .setSnapshotCounter(sm.getSnapshotCounter()) .setNumSnapshots(sm.getNumSnapshots()); INodeDirectory[] snapshottables = sm.getSnapshottableDirs(); for (INodeDirecto...
/** * save all the snapshottable directories and snapshots to fsimage */
save all the snapshottable directories and snapshots to fsimage
serializeSnapshotSection
{ "repo_name": "cnfire/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/FSImageFormatPBSnapshot.java", "license": "apache-2.0", "size": 25207 }
[ "com.google.common.base.Preconditions", "com.google.protobuf.ByteString", "java.io.IOException", "java.io.OutputStream", "org.apache.hadoop.hdfs.server.namenode.FSImageFormatPBINode", "org.apache.hadoop.hdfs.server.namenode.FSImageFormatProtobuf", "org.apache.hadoop.hdfs.server.namenode.FsImageProto", ...
import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; import java.io.IOException; import java.io.OutputStream; import org.apache.hadoop.hdfs.server.namenode.FSImageFormatPBINode; import org.apache.hadoop.hdfs.server.namenode.FSImageFormatProtobuf; import org.apache.hadoop.hdfs.server.namen...
import com.google.common.base.*; import com.google.protobuf.*; import java.io.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.hdfs.server.namenode.snapshot.*;
[ "com.google.common", "com.google.protobuf", "java.io", "org.apache.hadoop" ]
com.google.common; com.google.protobuf; java.io; org.apache.hadoop;
1,925,921
public HTable createTable(TableName tableName, byte[] family, byte[][] splitRows) throws IOException { HTableDescriptor desc = new HTableDescriptor(tableName); HColumnDescriptor hcd = new HColumnDescriptor(family); desc.addFamily(hcd); getHBaseAdmin().createTable(desc, splitRows); // HBaseAd...
HTable function(TableName tableName, byte[] family, byte[][] splitRows) throws IOException { HTableDescriptor desc = new HTableDescriptor(tableName); HColumnDescriptor hcd = new HColumnDescriptor(family); desc.addFamily(hcd); getHBaseAdmin().createTable(desc, splitRows); waitUntilAllRegionsAssigned(tableName); return n...
/** * Create a table. * @param tableName * @param family * @param splitRows * @return An HTable instance for the created table. * @throws IOException */
Create a table
createTable
{ "repo_name": "grokcoder/pbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 132664 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.HTable" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.HTable;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
559,663
private void activateOrder(OrderDTO order) { LOG.debug("active Order " + order.getId()); boolean doActivate = false; List<OrderLineDTO> orderLines = order.getLines(); if (orderLines == null) { return; } for (Iterator<OrderLineDTO> it = orderL...
void function(OrderDTO order) { LOG.debug(STR + order.getId()); boolean doActivate = false; List<OrderLineDTO> orderLines = order.getLines(); if (orderLines == null) { return; } for (Iterator<OrderLineDTO> it = orderLines.iterator(); it.hasNext(); ) { OrderLineDTO line = (OrderLineDTO) it.next(); if ((line != null) && ...
/** * each order line will be checked to see if any OrderLineDTO.provisioningStatus == PROVISIONING_STATUS_INACTIVE. * If there are any matches, generate a SubscriptionActiveEvent on that order * @param order */
each order line will be checked to see if any OrderLineDTO.provisioningStatus == PROVISIONING_STATUS_INACTIVE. If there are any matches, generate a SubscriptionActiveEvent on that order
activateOrder
{ "repo_name": "maxdelo77/replyit-master-3.2-final", "path": "src/java/com/sapienter/jbilling/server/provisioning/ProvisioningProcessBL.java", "license": "agpl-3.0", "size": 5795 }
[ "com.sapienter.jbilling.common.Constants", "com.sapienter.jbilling.server.order.db.OrderDTO", "com.sapienter.jbilling.server.order.db.OrderLineDTO", "com.sapienter.jbilling.server.provisioning.event.SubscriptionActiveEvent", "com.sapienter.jbilling.server.system.event.EventManager", "java.util.Iterator", ...
import com.sapienter.jbilling.common.Constants; import com.sapienter.jbilling.server.order.db.OrderDTO; import com.sapienter.jbilling.server.order.db.OrderLineDTO; import com.sapienter.jbilling.server.provisioning.event.SubscriptionActiveEvent; import com.sapienter.jbilling.server.system.event.EventManager; import java...
import com.sapienter.jbilling.common.*; import com.sapienter.jbilling.server.order.db.*; import com.sapienter.jbilling.server.provisioning.event.*; import com.sapienter.jbilling.server.system.event.*; import java.util.*;
[ "com.sapienter.jbilling", "java.util" ]
com.sapienter.jbilling; java.util;
649,566
private boolean isContainValue( Object defaultValue, List list ) { boolean result = false; for ( int i = 0; i < list.size( ); i++ ) { Object obj = ( (IParameterSelectionChoice) ( list.get( i ) ) ).getValue( ); if ( obj != null && obj.equals( defaultValue ) ) { result = true; break; } } ...
boolean function( Object defaultValue, List list ) { boolean result = false; for ( int i = 0; i < list.size( ); i++ ) { Object obj = ( (IParameterSelectionChoice) ( list.get( i ) ) ).getValue( ); if ( obj != null && obj.equals( defaultValue ) ) { result = true; break; } } return result; }
/** * To check that whether the defaultValue is in the value list If in * list,return true;else return false. * * @param defaultValue * @param list * @return */
To check that whether the defaultValue is in the value list If in list,return true;else return false
isContainValue
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/InputParameterDialog.java", "license": "epl-1.0", "size": 43276 }
[ "java.util.List", "org.eclipse.birt.report.engine.api.IParameterSelectionChoice" ]
import java.util.List; import org.eclipse.birt.report.engine.api.IParameterSelectionChoice;
import java.util.*; import org.eclipse.birt.report.engine.api.*;
[ "java.util", "org.eclipse.birt" ]
java.util; org.eclipse.birt;
758,112
EReference getCatchEvent_OutputSet();
EReference getCatchEvent_OutputSet();
/** * Returns the meta object for the containment reference '{@link org.eclipse.bpmn2.CatchEvent#getOutputSet <em>Output Set</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Output Set</em>'. * @see org.eclipse.bpmn2.CatchEvent#getOutputSet...
Returns the meta object for the containment reference '<code>org.eclipse.bpmn2.CatchEvent#getOutputSet Output Set</code>'.
getCatchEvent_OutputSet
{ "repo_name": "Rikkola/kie-wb-common", "path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 929298 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,124,117
public S3FileHandle uploadFileToS3(UserInfo userInfo, String fileName, String fileBody) throws IOException { File temp = File.createTempFile("fileName", ".txt"); try { FileUtils.writeStringToFile(temp, fileBody, StandardCharsets.UTF_8); return fileUploadManager.uploadLocalFile(new LocalFileUploadRequest()....
S3FileHandle function(UserInfo userInfo, String fileName, String fileBody) throws IOException { File temp = File.createTempFile(STR, ".txt"); try { FileUtils.writeStringToFile(temp, fileBody, StandardCharsets.UTF_8); return fileUploadManager.uploadLocalFile(new LocalFileUploadRequest().withFileName(fileName) .withUserI...
/** * Upload an actual file to S3. * * @param userInfo * @param fileName * @param fileBody * @return * @throws IOException */
Upload an actual file to S3
uploadFileToS3
{ "repo_name": "Sage-Bionetworks/Synapse-Repository-Services", "path": "services/workers/src/test/java/org/sagebionetworks/download/worker/DownloadListPackageWorkerIntegrationTest.java", "license": "apache-2.0", "size": 9767 }
[ "java.io.File", "java.io.IOException", "java.nio.charset.StandardCharsets", "org.apache.commons.io.FileUtils", "org.sagebionetworks.repo.manager.file.LocalFileUploadRequest", "org.sagebionetworks.repo.model.StorageLocationDAO", "org.sagebionetworks.repo.model.UserInfo", "org.sagebionetworks.repo.model...
import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; import org.apache.commons.io.FileUtils; import org.sagebionetworks.repo.manager.file.LocalFileUploadRequest; import org.sagebionetworks.repo.model.StorageLocationDAO; import org.sagebionetworks.repo.model.UserInfo; import org.sag...
import java.io.*; import java.nio.charset.*; import org.apache.commons.io.*; import org.sagebionetworks.repo.manager.file.*; import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.file.*;
[ "java.io", "java.nio", "org.apache.commons", "org.sagebionetworks.repo" ]
java.io; java.nio; org.apache.commons; org.sagebionetworks.repo;
2,125,803
void doVolunteerForPrimary() { if (!beginVolunteering()) { return; } boolean dlsDestroyed = false; try { if (logger.isDebugEnabled()) { logger.debug("Begin volunteerForPrimary for {}", BucketAdvisor.this); } DistributedMemberLock thePrimaryLock = nu...
void doVolunteerForPrimary() { if (!beginVolunteering()) { return; } boolean dlsDestroyed = false; try { if (logger.isDebugEnabled()) { logger.debug(STR, BucketAdvisor.this); } DistributedMemberLock thePrimaryLock = null; while (continueVolunteering()) { BucketAdvisor parentBA = parentAdvisor; BucketAdvisor.this.active...
/** * Invoked by the thread that performs the actual volunteering work. */
Invoked by the thread that performs the actual volunteering work
doVolunteerForPrimary
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketAdvisor.java", "license": "apache-2.0", "size": 104869 }
[ "com.gemstone.gemfire.CancelException", "com.gemstone.gemfire.cache.RegionDestroyedException", "com.gemstone.gemfire.distributed.LockServiceDestroyedException", "com.gemstone.gemfire.distributed.internal.locks.DistributedMemberLock", "com.gemstone.gemfire.internal.Assert", "java.util.concurrent.TimeUnit" ...
import com.gemstone.gemfire.CancelException; import com.gemstone.gemfire.cache.RegionDestroyedException; import com.gemstone.gemfire.distributed.LockServiceDestroyedException; import com.gemstone.gemfire.distributed.internal.locks.DistributedMemberLock; import com.gemstone.gemfire.internal.Assert; import java.util.conc...
import com.gemstone.gemfire.*; import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.distributed.*; import com.gemstone.gemfire.distributed.internal.locks.*; import com.gemstone.gemfire.internal.*; import java.util.concurrent.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
1,503,894
public Map<String, List<String>> getStyles() { final StyleAttribute style = getStyle(); final HashMap<String, List<String>> styles = new HashMap<>(); for (final Map.Entry<String, StylePropertyAttribute> entry : style.value.entrySet()) { styles.put(entry.getKey(), new ArrayList<>(...
Map<String, List<String>> function() { final StyleAttribute style = getStyle(); final HashMap<String, List<String>> styles = new HashMap<>(); for (final Map.Entry<String, StylePropertyAttribute> entry : style.value.entrySet()) { styles.put(entry.getKey(), new ArrayList<>(entry.getValue().value)); } return styles; }
/** * Returns map between style name and list of it's values. * * @return */
Returns map between style name and list of it's values
getStyles
{ "repo_name": "fieldenms/tg", "path": "platform-web-ui/src/main/java/ua/com/fielden/platform/dom/DomElement.java", "license": "mit", "size": 9095 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,502,183
public final void pushSubContextList(SubContextList iter) { m_axesIteratorStack.push(iter); }
final void function(SubContextList iter) { m_axesIteratorStack.push(iter); }
/** * Push a TreeWalker on the stack. * * @param iter A sub-context AxesWalker. * @xsl.usage internal */
Push a TreeWalker on the stack
pushSubContextList
{ "repo_name": "axDev-JDK/jaxp", "path": "src/com/sun/org/apache/xpath/internal/XPathContext.java", "license": "gpl-2.0", "size": 41931 }
[ "com.sun.org.apache.xpath.internal.axes.SubContextList" ]
import com.sun.org.apache.xpath.internal.axes.SubContextList;
import com.sun.org.apache.xpath.internal.axes.*;
[ "com.sun.org" ]
com.sun.org;
2,431,351
public Map<String, CurrentState> getCurrentState(String instanceName, String clientSessionId) { return _currentStateCache.getParticipantState(instanceName, clientSessionId); }
Map<String, CurrentState> function(String instanceName, String clientSessionId) { return _currentStateCache.getParticipantState(instanceName, clientSessionId); }
/** * Provides the current state of the node for a given session id, the sessionid can be got from * LiveInstance * @param instanceName * @param clientSessionId * @return */
Provides the current state of the node for a given session id, the sessionid can be got from LiveInstance
getCurrentState
{ "repo_name": "lei-xia/helix", "path": "helix-core/src/main/java/org/apache/helix/controller/dataproviders/BaseControllerDataProvider.java", "license": "apache-2.0", "size": 31852 }
[ "java.util.Map", "org.apache.helix.model.CurrentState" ]
import java.util.Map; import org.apache.helix.model.CurrentState;
import java.util.*; import org.apache.helix.model.*;
[ "java.util", "org.apache.helix" ]
java.util; org.apache.helix;
412,373
EReference getDocumentRoot_ServiceReference();
EReference getDocumentRoot_ServiceReference();
/** * Returns the meta object for the containment reference '{@link net.opengis.ows20.DocumentRoot#getServiceReference <em>Service Reference</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Service Reference</em>'. * @see net.opengis...
Returns the meta object for the containment reference '<code>net.opengis.ows20.DocumentRoot#getServiceReference Service Reference</code>'.
getDocumentRoot_ServiceReference
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.ows/src/net/opengis/ows20/Ows20Package.java", "license": "lgpl-2.1", "size": 356067 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,706,320
private CacheConfiguration createCacheConfig(String cacheName, CacheWriteSynchronizationMode syncMode) { assert nonNull(cacheName); assert nonNull(syncMode); return new CacheConfiguration(cacheName) .setAtomicityMode(TRANSACTIONAL) .setBackups(2) .setAffi...
CacheConfiguration function(String cacheName, CacheWriteSynchronizationMode syncMode) { assert nonNull(cacheName); assert nonNull(syncMode); return new CacheConfiguration(cacheName) .setAtomicityMode(TRANSACTIONAL) .setBackups(2) .setAffinity(new RendezvousAffinityFunction(false, 10)) .setWriteSynchronizationMode(syncM...
/** * Creating a cache configuration. * * @param cacheName Cache name. * @param syncMode Sync mode. * @return Cache configuration. */
Creating a cache configuration
createCacheConfig
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheFastNodeLeftForTransactionTest.java", "license": "apache-2.0", "size": 11126 }
[ "java.util.Objects", "org.apache.ignite.cache.CacheWriteSynchronizationMode", "org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction", "org.apache.ignite.configuration.CacheConfiguration" ]
import java.util.Objects; import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.configuration.CacheConfiguration;
import java.util.*; import org.apache.ignite.cache.*; import org.apache.ignite.cache.affinity.rendezvous.*; import org.apache.ignite.configuration.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,341,697
protected int readLong() throws IOException { return mTiffStream.readInt(); }
int function() throws IOException { return mTiffStream.readInt(); }
/** * Reads value of type {@link ExifTag#TYPE_LONG} from the InputStream. */
Reads value of type <code>ExifTag#TYPE_LONG</code> from the InputStream
readLong
{ "repo_name": "gk969/UltimateImgSpider", "path": "app/src/main/java/com/gk969/gallery/gallery3d/exif/ExifParser.java", "license": "mit", "size": 34327 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,108,179
@Override public PrintWriter append(final char chr) { super.write(chr); return this; }
PrintWriter function(final char chr) { super.write(chr); return this; }
/** * Appends the given character to this XmlStringBuilder. XML values are not escaped. * * @param chr the character to append. * @return this XmlStringBuilder */
Appends the given character to this XmlStringBuilder. XML values are not escaped
append
{ "repo_name": "Joshua-Barclay/wcomponents", "path": "wcomponents-core/src/main/java/com/github/bordertech/wcomponents/XmlStringBuilder.java", "license": "gpl-3.0", "size": 9212 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,497,762
@SuppressWarnings(SUPPRESS_UNCHECKED) public static Set<Runner> toRunnerList(Vector<Object> runnersParams) { Set<Runner> runners = new TreeSet<Runner>(); for (Object runnerParams : runnersParams) { runners.add(toRunner(( Vector<Object> ) runnerParams)); } return runn...
@SuppressWarnings(SUPPRESS_UNCHECKED) static Set<Runner> function(Vector<Object> runnersParams) { Set<Runner> runners = new TreeSet<Runner>(); for (Object runnerParams : runnersParams) { runners.add(toRunner(( Vector<Object> ) runnerParams)); } return runners; }
/** * Rebuild a List of runners based on the vector of runners parameters. * </p> * * @param runnersParams * @return a List of runners based on the vector of runners parameters. * @see toRunner(Vector<Object> runnerParams) */
Rebuild a List of runners based on the vector of runners parameters.
toRunnerList
{ "repo_name": "benhamidene/livingdoc-core", "path": "livingdoc-client/src/main/java/info/novatec/testit/livingdoc/server/rpc/xmlrpc/XmlRpcDataMarshaller.java", "license": "gpl-3.0", "size": 32364 }
[ "info.novatec.testit.livingdoc.server.domain.Runner", "java.util.Set", "java.util.TreeSet", "java.util.Vector" ]
import info.novatec.testit.livingdoc.server.domain.Runner; import java.util.Set; import java.util.TreeSet; import java.util.Vector;
import info.novatec.testit.livingdoc.server.domain.*; import java.util.*;
[ "info.novatec.testit", "java.util" ]
info.novatec.testit; java.util;
2,538,759
List<? extends ResourceConfig> getResourceList(String key);
List<? extends ResourceConfig> getResourceList(String key);
/** * Returns a list of the referenced configs given a particular key. */
Returns a list of the referenced configs given a particular key
getResourceList
{ "repo_name": "romanzenka/swift", "path": "lib/config/src/main/java/edu/mayo/mprc/config/ConfigReader.java", "license": "apache-2.0", "size": 765 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
979,607
public PartitionV1 getPartitionApi() { return partitionApi; }
PartitionV1 function() { return partitionApi; }
/** * Return an API instance that can be used to interact with the metacat server for partitions. * * @return An instance api conforming to PartitionV1 interface */
Return an API instance that can be used to interact with the metacat server for partitions
getPartitionApi
{ "repo_name": "ajoymajumdar/metacat", "path": "metacat-client/src/main/java/com/netflix/metacat/client/Client.java", "license": "apache-2.0", "size": 11290 }
[ "com.netflix.metacat.client.api.PartitionV1" ]
import com.netflix.metacat.client.api.PartitionV1;
import com.netflix.metacat.client.api.*;
[ "com.netflix.metacat" ]
com.netflix.metacat;
1,943,661
public User checkLogin(User user, boolean isSocial) { if (!isSocial) return checkLogin(user.getUsername(), user.getPassword()); else return checkLoginSN(user.getSocialId()); }
User function(User user, boolean isSocial) { if (!isSocial) return checkLogin(user.getUsername(), user.getPassword()); else return checkLoginSN(user.getSocialId()); }
/** * Verify user login information * * @param user * @param isSocial * @return */
Verify user login information
checkLogin
{ "repo_name": "hainguyen1989/oauthsample", "path": "src/main/java/com/haint/oauth/dao/UserDAO.java", "license": "apache-2.0", "size": 4787 }
[ "com.haint.oauth.model.User" ]
import com.haint.oauth.model.User;
import com.haint.oauth.model.*;
[ "com.haint.oauth" ]
com.haint.oauth;
732,122
Observable<DataLakeAnalyticsAccount> updateAsync(String resourceGroupName, String accountName);
Observable<DataLakeAnalyticsAccount> updateAsync(String resourceGroupName, String accountName);
/** * Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object. * * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. * @param accountName The name of the Data Lake Analytics account...
Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object
updateAsync
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Accounts.java", "license": "mit", "size": 41301 }
[ "com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount" ]
import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount;
import com.microsoft.azure.management.datalake.analytics.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,691,011
void markChildrenRead() { // If a property is in propertiesSet, it has been added to the queue and processed, // it will not be added to the queue again. Set<Property> propertiesSet = new HashSet<>(children); Queue<Property> propertyQueue = new ArrayDeque<>(propertiesSet); // Ensure w...
void markChildrenRead() { Set<Property> propertiesSet = new HashSet<>(children); Queue<Property> propertyQueue = new ArrayDeque<>(propertiesSet); propertiesSet.add(this); while (!propertyQueue.isEmpty()) { Property childProperty = propertyQueue.remove(); childProperty.markLastWriteRead(); for (Property grandchildProper...
/** * Marks all children of this property as read. */
Marks all children of this property as read
markChildrenRead
{ "repo_name": "monetate/closure-compiler", "path": "src/com/google/javascript/jscomp/DeadPropertyAssignmentElimination.java", "license": "apache-2.0", "size": 14103 }
[ "java.util.ArrayDeque", "java.util.HashSet", "java.util.Queue", "java.util.Set" ]
import java.util.ArrayDeque; import java.util.HashSet; import java.util.Queue; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
47,491
private static String generateUniqueName(final String suffix) { String name = UUID.randomUUID().toString().replaceAll("-", ""); if (suffix != null) name += suffix; return name; }
static String function(final String suffix) { String name = UUID.randomUUID().toString().replaceAll("-", ""); if (suffix != null) name += suffix; return name; }
/** * Generate a unique file name, used by createTempName() and commitStoreFile() * @param suffix extra information to append to the generated name * @return Unique file name */
Generate a unique file name, used by createTempName() and commitStoreFile()
generateUniqueName
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java", "license": "apache-2.0", "size": 49337 }
[ "java.util.UUID" ]
import java.util.UUID;
import java.util.*;
[ "java.util" ]
java.util;
1,207,375
private HandshakeStatus runTasks() { Runnable runnable; while ((runnable = sslEngine.getDelegatedTask()) != null) { if (log.isDebugEnabled()) log.debug("Running SSL engine task [task=" + runnable + ", ses=" + ses + ']'); runnable.run(); } if...
HandshakeStatus function() { Runnable runnable; while ((runnable = sslEngine.getDelegatedTask()) != null) { if (log.isDebugEnabled()) log.debug(STR + runnable + STR + ses + ']'); runnable.run(); } if (log.isDebugEnabled()) log.debug(STR + sslEngine.getHandshakeStatus() + STR + ses + ']'); return sslEngine.getHandshakeS...
/** * Runs all tasks needed to continue SSL work. * * @return Handshake status after running all tasks. */
Runs all tasks needed to continue SSL work
runTasks
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/nio/ssl/GridNioSslHandler.java", "license": "apache-2.0", "size": 23491 }
[ "javax.net.ssl.SSLEngineResult" ]
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
2,023,251
@Override public void executeSymbolically(Frame frame) { // References cannot be symbolic. Just execute the instruction. execute(frame); }
void function(Frame frame) { execute(frame); }
/** * Execute the inheriting instruction symbolically.<br /> * <br /> * Simply call the non-symbolic execution routine. There are no symbolic reference values. * * @param frame The currently executed frame. */
Execute the inheriting instruction symbolically. Simply call the non-symbolic execution routine. There are no symbolic reference values
executeSymbolically
{ "repo_name": "wwu-pi/muggl", "path": "muggl-core/src/de/wwu/muggl/instructions/general/If_acmp.java", "license": "gpl-3.0", "size": 4542 }
[ "de.wwu.muggl.vm.Frame" ]
import de.wwu.muggl.vm.Frame;
import de.wwu.muggl.vm.*;
[ "de.wwu.muggl" ]
de.wwu.muggl;
2,425,621
public synchronized void showPopupMenu(int reactTag, ReadableArray items, Callback success, Callback error) { UiThreadUtil.assertOnUiThread(); View anchor = mTagsToViews.get(reactTag); if (anchor == null) { error.invoke("Can't display popup. Could not find view with tag " + react...
synchronized void function(int reactTag, ReadableArray items, Callback success, Callback error) { UiThreadUtil.assertOnUiThread(); View anchor = mTagsToViews.get(reactTag); if (anchor == null) { error.invoke(STR + reactTag); return; } mPopupMenu = new PopupMenu(getReactContextForView(reactTag), anchor); Menu menu = mPo...
/** * Show a {@link PopupMenu}. * * @param reactTag the tag of the anchor view (the PopupMenu is displayed next to this view); this * needs to be the tag of a native view (shadow views can not be anchors) * @param items the menu items as an array of strings * @param success will be called with the...
Show a <code>PopupMenu</code>
showPopupMenu
{ "repo_name": "exponent/exponent", "path": "android/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java", "license": "bsd-3-clause", "size": 34684 }
[ "android.view.Menu", "android.view.View", "android.widget.PopupMenu", "com.facebook.react.bridge.Callback", "com.facebook.react.bridge.ReadableArray", "com.facebook.react.bridge.UiThreadUtil" ]
import android.view.Menu; import android.view.View; import android.widget.PopupMenu; import com.facebook.react.bridge.Callback; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.UiThreadUtil;
import android.view.*; import android.widget.*; import com.facebook.react.bridge.*;
[ "android.view", "android.widget", "com.facebook.react" ]
android.view; android.widget; com.facebook.react;
2,474,024
public static RelDataType extractLastNFields(RelDataTypeFactory typeFactory, RelDataType type, int numToKeep) { assert type.isStruct(); assert type.getFieldCount() >= numToKeep; final int fieldsCnt = type.getFieldCount(); return typeFactory.createStructType( type.getFieldList().subList(f...
static RelDataType function(RelDataTypeFactory typeFactory, RelDataType type, int numToKeep) { assert type.isStruct(); assert type.getFieldCount() >= numToKeep; final int fieldsCnt = type.getFieldCount(); return typeFactory.createStructType( type.getFieldList().subList(fieldsCnt - numToKeep, fieldsCnt)); }
/** * Keeps only the last N fields and returns the new struct type. */
Keeps only the last N fields and returns the new struct type
extractLastNFields
{ "repo_name": "vlsi/calcite", "path": "core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java", "license": "apache-2.0", "size": 53459 }
[ "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rel.type.RelDataTypeFactory" ]
import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeFactory;
import org.apache.calcite.rel.type.*;
[ "org.apache.calcite" ]
org.apache.calcite;
714,366
public static ItemStack createMagCard() { ItemStack magCard = new ItemStack(ModItems.PLASTIC_CARD); NBTTagCompound magTag = new NBTTagCompound(); magTag.setString("0", ""); magTag.setString("1", ""); magTag.setString("2", ""); NBTTagCompound tag = new NBTTagCompound()...
static ItemStack function() { ItemStack magCard = new ItemStack(ModItems.PLASTIC_CARD); NBTTagCompound magTag = new NBTTagCompound(); magTag.setString("0", STR1", STR2STR"); NBTTagCompound tag = new NBTTagCompound(); tag.setTag(MAG_TAG, magTag); magCard.setTagCompound(tag); magCard.setTranslatableName(ItemPlasticCard.N...
/** * Create a blank mag card * @return mag card */
Create a blank mag card
createMagCard
{ "repo_name": "rolandoislas/PeripheralsPlusPlus", "path": "src/main/java/com/austinv11/peripheralsplusplus/tiles/TileEntityMagReaderWriter.java", "license": "gpl-2.0", "size": 9188 }
[ "com.austinv11.peripheralsplusplus.init.ModItems", "com.austinv11.peripheralsplusplus.items.ItemPlasticCard", "net.minecraft.item.ItemStack", "net.minecraft.nbt.NBTTagCompound" ]
import com.austinv11.peripheralsplusplus.init.ModItems; import com.austinv11.peripheralsplusplus.items.ItemPlasticCard; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound;
import com.austinv11.peripheralsplusplus.init.*; import com.austinv11.peripheralsplusplus.items.*; import net.minecraft.item.*; import net.minecraft.nbt.*;
[ "com.austinv11.peripheralsplusplus", "net.minecraft.item", "net.minecraft.nbt" ]
com.austinv11.peripheralsplusplus; net.minecraft.item; net.minecraft.nbt;
2,787,750
String getResolvedUrl(ClientLibraryDef clientLibrary);
String getResolvedUrl(ClientLibraryDef clientLibrary);
/** * * Resolves url for client library that didn't specify url. * * @param clientLibrary client library * @return resolved url */
Resolves url for client library that didn't specify url
getResolvedUrl
{ "repo_name": "madmax983/aura", "path": "aura/src/main/java/org/auraframework/clientlibrary/ClientLibraryService.java", "license": "apache-2.0", "size": 2084 }
[ "org.auraframework.def.ClientLibraryDef" ]
import org.auraframework.def.ClientLibraryDef;
import org.auraframework.def.*;
[ "org.auraframework.def" ]
org.auraframework.def;
540,394
private void handlePullResults(final Map<Repository, Object> resultsMap, Shell shell) { for (Entry<Repository, Object> entry : resultsMap.entrySet()) { Object result = entry.getValue(); if (result instanceof PullResult) { PullResult pullResult = (PullResult) result; if (pullResult.getRebaseResult(...
void function(final Map<Repository, Object> resultsMap, Shell shell) { for (Entry<Repository, Object> entry : resultsMap.entrySet()) { Object result = entry.getValue(); if (result instanceof PullResult) { PullResult pullResult = (PullResult) result; if (pullResult.getRebaseResult() != null && RebaseResult.Status.UNCOMM...
/** * Post-process the pull results, allowing the user to deal with uncommitted * changes and re-pull if the initial pull failed because of these changes * * @param resultsMap * a copy of the initial pull results * @param shell */
Post-process the pull results, allowing the user to deal with uncommitted changes and re-pull if the initial pull failed because of these changes
handlePullResults
{ "repo_name": "collaborative-modeling/egit", "path": "org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/pull/PullOperationUI.java", "license": "epl-1.0", "size": 10443 }
[ "java.util.Map", "org.eclipse.core.runtime.Status", "org.eclipse.jgit.api.PullResult", "org.eclipse.jgit.api.RebaseResult", "org.eclipse.jgit.lib.Repository", "org.eclipse.swt.widgets.Shell" ]
import java.util.Map; import org.eclipse.core.runtime.Status; import org.eclipse.jgit.api.PullResult; import org.eclipse.jgit.api.RebaseResult; import org.eclipse.jgit.lib.Repository; import org.eclipse.swt.widgets.Shell;
import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.jgit.api.*; import org.eclipse.jgit.lib.*; import org.eclipse.swt.widgets.*;
[ "java.util", "org.eclipse.core", "org.eclipse.jgit", "org.eclipse.swt" ]
java.util; org.eclipse.core; org.eclipse.jgit; org.eclipse.swt;
2,363,380
view.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); return view.getMeasuredWidth(); }
view.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); return view.getMeasuredWidth(); }
/** * Get view width * This is not applicable if you set the view width in params * @param view * @return */
Get view width This is not applicable if you set the view width in params
getViewWidth
{ "repo_name": "lauroabogne/android-table-with-fixed-header-and-column", "path": "app/src/main/java/table_1/ViewSizeUtils.java", "license": "gpl-3.0", "size": 3128 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,670,691
@ApiModelProperty(value = "A url to the backup management page") public String getBackupManagementUrl() { return backupManagementUrl; }
@ApiModelProperty(value = STR) String function() { return backupManagementUrl; }
/** * A url to the backup management page * @return backupManagementUrl **/
A url to the backup management page
getBackupManagementUrl
{ "repo_name": "iterate-ch/cyberduck", "path": "storegate/src/main/java/ch/cyberduck/core/storegate/io/swagger/client/model/WebUrls.java", "license": "gpl-3.0", "size": 8612 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,868,584
@Test public void test08() { EntityManager em = emf.createEntityManager(); EntityTransaction txn = em.getTransaction(); txn.begin(); Query q = em.createQuery("select p from Person p"); List<Person> list = q.getResultList(); assertEquals(4, list.size()); }
void function() { EntityManager em = emf.createEntityManager(); EntityTransaction txn = em.getTransaction(); txn.begin(); Query q = em.createQuery(STR); List<Person> list = q.getResultList(); assertEquals(4, list.size()); }
/** * Load supertype from db */
Load supertype from db
test08
{ "repo_name": "lunifera/lunifera-dsl", "path": "org.lunifera.dsl.entity.xtext.tests/src/org/lunifera/dsl/entity/xtext/tests/model/testcarstore2/Carstore2Tests.java", "license": "epl-1.0", "size": 9828 }
[ "java.util.List", "javax.persistence.EntityManager", "javax.persistence.EntityTransaction", "javax.persistence.Query", "org.junit.Assert" ]
import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityTransaction; import javax.persistence.Query; import org.junit.Assert;
import java.util.*; import javax.persistence.*; import org.junit.*;
[ "java.util", "javax.persistence", "org.junit" ]
java.util; javax.persistence; org.junit;
321,920
public Scenario valuationTime(String valuationTime) { try { LocalDateTime localTime = LocalDateTime.parse(valuationTime, s_dateFormatter); _valuationTime = ZonedDateTime.of(localTime, OpenGammaClock.getZone()).toInstant(); } catch (DateTimeParseException e) { throw new IllegalArgumentExcepti...
Scenario function(String valuationTime) { try { LocalDateTime localTime = LocalDateTime.parse(valuationTime, s_dateFormatter); _valuationTime = ZonedDateTime.of(localTime, OpenGammaClock.getZone()).toInstant(); } catch (DateTimeParseException e) { throw new IllegalArgumentException(STR + STR + valuationTime); } return ...
/** * Updates this scenario to use the specified valuation time. * @param valuationTime The valuation time * @return The modified scenario */
Updates this scenario to use the specified valuation time
valuationTime
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Integration/src/main/java/com/opengamma/integration/marketdata/manipulator/dsl/Scenario.java", "license": "apache-2.0", "size": 9068 }
[ "com.opengamma.util.OpenGammaClock", "org.threeten.bp.LocalDateTime", "org.threeten.bp.ZonedDateTime", "org.threeten.bp.format.DateTimeParseException" ]
import com.opengamma.util.OpenGammaClock; import org.threeten.bp.LocalDateTime; import org.threeten.bp.ZonedDateTime; import org.threeten.bp.format.DateTimeParseException;
import com.opengamma.util.*; import org.threeten.bp.*; import org.threeten.bp.format.*;
[ "com.opengamma.util", "org.threeten.bp" ]
com.opengamma.util; org.threeten.bp;
2,522,779
public void flush() throws IOException { out.flush(); }
void function() throws IOException { out.flush(); }
/** * Flush the stream. * */
Flush the stream
flush
{ "repo_name": "apache/velocity-tools", "path": "velocity-tools-view-jsp/src/main/java/org/apache/velocity/tools/view/jsp/jspimpl/JspWriterImpl.java", "license": "apache-2.0", "size": 12620 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,873,079
public List queryForList(String query, Map params) { return queryForList(query, new ObjectMapper(false), params); }
List function(String query, Map params) { return queryForList(query, new ObjectMapper(false), params); }
/** * EXPERIMENTAL: Runs the query, and returns a the single value in * each row. */
each row
queryForList
{ "repo_name": "ontopia/ontopia", "path": "ontopia-engine/src/main/java/net/ontopia/topicmaps/query/utils/QueryWrapper.java", "license": "apache-2.0", "size": 11573 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,154,663
public Reward_observation_terminal env_step(Action theAction) { int a = theAction.intArray[0]; if (a > 2 || a < 0) { System.err.println("Invalid action selected in mountainCar: " + a); a = randomGenerator.nextInt(3); } theState.update(a); return ma...
Reward_observation_terminal function(Action theAction) { int a = theAction.intArray[0]; if (a > 2 a < 0) { System.err.println(STR + a); a = randomGenerator.nextInt(3); } theState.update(a); return makeRewardObservation(theState.getReward(), theState.inGoalRegion()); }
/** * Takes a step. If an invalid action is selected, choose a random action. * @param theAction * @return */
Takes a step. If an invalid action is selected, choose a random action
env_step
{ "repo_name": "chaostrigger/rl-library", "path": "projects/environments/mountainCar/src/org/rlcommunity/environments/mountaincar/MountainCar.java", "license": "apache-2.0", "size": 12235 }
[ "org.rlcommunity.rlglue.codec.types.Action" ]
import org.rlcommunity.rlglue.codec.types.Action;
import org.rlcommunity.rlglue.codec.types.*;
[ "org.rlcommunity.rlglue" ]
org.rlcommunity.rlglue;
741,430
public void transferAcceptedSocket (SocketChannel channel) { _acceptedq.append(channel); }
void function (SocketChannel channel) { _acceptedq.append(channel); }
/** * Introduces a new active socket into Presents from off the ConnectionManager thread. If * Presents is embedded in another framework that handles socket acceptance, this will be * called by its socket acceptor to get the socket into Presents to start authorization. */
Introduces a new active socket into Presents from off the ConnectionManager thread. If Presents is embedded in another framework that handles socket acceptance, this will be called by its socket acceptor to get the socket into Presents to start authorization
transferAcceptedSocket
{ "repo_name": "threerings/narya", "path": "core/src/main/java/com/threerings/nio/conman/ConnectionManager.java", "license": "lgpl-2.1", "size": 25370 }
[ "java.nio.channels.SocketChannel" ]
import java.nio.channels.SocketChannel;
import java.nio.channels.*;
[ "java.nio" ]
java.nio;
2,252,193
@Override protected void addButtons() { Label msgCell = new Label(dialog, SWT.NONE); Font fnt = msgCell.getFont(); msgCell.setFont(FontUtils.getAdjustedFont(fnt, 14, SWT.BOLD)); msgCell.setText(L10N.get("CGTL.CreateOrOpen", ...
void function() { Label msgCell = new Label(dialog, SWT.NONE); Font fnt = msgCell.getFont(); msgCell.setFont(FontUtils.getAdjustedFont(fnt, 14, SWT.BOLD)); msgCell.setText(L10N.get(STR, STR)); GridData msgCellLayout = new GridData(); msgCellLayout.horizontalSpan = 4; msgCellLayout.grabExcessHorizontalSpace = true; msgC...
/** * Construct the contents of the dialog window. * <p> * First, the question/instructions, if specified.<br> * * @author mlh */
Construct the contents of the dialog window. First, the question/instructions, if specified
addButtons
{ "repo_name": "cogtool/cogtool", "path": "java/edu/cmu/cs/hcii/cogtool/ui/ProjectInteraction.java", "license": "lgpl-2.1", "size": 53390 }
[ "edu.cmu.cs.hcii.cogtool.CogToolPref", "edu.cmu.cs.hcii.cogtool.util.FontUtils", "edu.cmu.cs.hcii.cogtool.util.OSUtils", "edu.cmu.cs.hcii.cogtool.view.MenuFactory", "org.eclipse.swt.graphics.Font", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Combo", ...
import edu.cmu.cs.hcii.cogtool.CogToolPref; import edu.cmu.cs.hcii.cogtool.util.FontUtils; import edu.cmu.cs.hcii.cogtool.util.OSUtils; import edu.cmu.cs.hcii.cogtool.view.MenuFactory; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; import org.eclipse...
import edu.cmu.cs.hcii.cogtool.*; import edu.cmu.cs.hcii.cogtool.util.*; import edu.cmu.cs.hcii.cogtool.view.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "edu.cmu.cs", "org.eclipse.swt" ]
edu.cmu.cs; org.eclipse.swt;
972,193
@Deprecated public void setClearThreadLocals(boolean b) { this.clearJavaLangThreadLocals = b; if (b) { Tr.warning(tc, "WSVR0623W", this.name); } }
void function(boolean b) { this.clearJavaLangThreadLocals = b; if (b) { Tr.warning(tc, STR, this.name); } }
/** * Controls the pool's behavior with respect to thread local. * <p> * <b>WARNING:</b> Altering this attribute when work has already been dispatched to the thread pool will result in undefined behavior. * * @param b * when true, thread locals will be cleared after * ...
Controls the pool's behavior with respect to thread local.
setClearThreadLocals
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.container.service.compat/src/com/ibm/ws/util/ThreadPool.java", "license": "epl-1.0", "size": 66962 }
[ "com.ibm.ejs.ras.Tr" ]
import com.ibm.ejs.ras.Tr;
import com.ibm.ejs.ras.*;
[ "com.ibm.ejs" ]
com.ibm.ejs;
317,071
private Stream<Lab> readLabs() { XSSFSheet sheet = this.workbook.getSheet("eLABS"); Iterator<Row> rows = sheet.rowIterator(); rows.next(); // skip header row Stream<Row> stream = StreamSupport.stream(Spliterators.spliteratorUnknownSize(rows, Spliterator.ORDERED), false); retu...
Stream<Lab> function() { XSSFSheet sheet = this.workbook.getSheet("eLABS"); Iterator<Row> rows = sheet.rowIterator(); rows.next(); Stream<Row> stream = StreamSupport.stream(Spliterators.spliteratorUnknownSize(rows, Spliterator.ORDERED), false); return stream.map(row -> { Lab lab = new Lab(); lab.setId(XlsxDataProvider....
/** * Parse the stream of labs present in the workbook's "eLABS" worksheet. * * @return A stream of {@link Lab} objects. */
Parse the stream of labs present in the workbook's "eLABS" worksheet
readLabs
{ "repo_name": "arpost/protempa", "path": "protempa-test-suite/src/test/java/org/protempa/test/XlsxDataProvider.java", "license": "apache-2.0", "size": 16649 }
[ "java.util.Iterator", "java.util.Spliterator", "java.util.Spliterators", "java.util.stream.Stream", "java.util.stream.StreamSupport", "org.apache.poi.ss.usermodel.Row", "org.apache.poi.xssf.usermodel.XSSFSheet" ]
import java.util.Iterator; import java.util.Spliterator; import java.util.Spliterators; import java.util.stream.Stream; import java.util.stream.StreamSupport; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFSheet;
import java.util.*; import java.util.stream.*; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.*;
[ "java.util", "org.apache.poi" ]
java.util; org.apache.poi;
2,067,620
@SuppressWarnings("unchecked") public void validate(Object object, List<Class> groupsClasses) throws ConstraintViolationException { if (object == null) { throw new IllegalArgumentException("Object is null"); } if (factory == null) initValidatorFactory(); Valida...
@SuppressWarnings(STR) void function(Object object, List<Class> groupsClasses) throws ConstraintViolationException { if (object == null) { throw new IllegalArgumentException(STR); } if (factory == null) initValidatorFactory(); Validator v = factory.usingContext().traversableResolver(new JCATraversableResolver()).getVal...
/** * Validate the object against the Bean Validation specification (JSR-303). * The object must be fully initialized * @param object The object that should be validated * @param groupsClasses groups targeted for validation * @exception ConstraintViolationException Thrown if the object can't be vali...
Validate the object against the Bean Validation specification (JSR-303). The object must be fully initialized
validate
{ "repo_name": "ironjacamar/ironjacamar", "path": "deployers/common/src/main/java/org/jboss/jca/deployers/common/BeanValidation.java", "license": "lgpl-2.1", "size": 4615 }
[ "java.util.Arrays", "java.util.List", "java.util.Set", "javax.validation.ConstraintViolationException", "javax.validation.Validator", "javax.validation.groups.Default" ]
import java.util.Arrays; import java.util.List; import java.util.Set; import javax.validation.ConstraintViolationException; import javax.validation.Validator; import javax.validation.groups.Default;
import java.util.*; import javax.validation.*; import javax.validation.groups.*;
[ "java.util", "javax.validation" ]
java.util; javax.validation;
2,869,545
public static EntityMetadata createEntityMetadata( String backend, JsonNode node, List<? extends EntityConstraint> entityConstraints, Map<String, ? extends FieldConstraintParser<JsonNode>> fieldConstraintParsers) { JSONMetadataParser jsonParser = createJSONMe...
static EntityMetadata function( String backend, JsonNode node, List<? extends EntityConstraint> entityConstraints, Map<String, ? extends FieldConstraintParser<JsonNode>> fieldConstraintParsers) { JSONMetadataParser jsonParser = createJSONMetadataParser(backend, fieldConstraintParsers); EntityMetadata entityMetadata = j...
/** * Creates an instance of {@link EntityMetadata} for testing purposes. * @param backend - Name of backend to use. * @param node - Json node to parse metadata from. * @param entityConstraints - <i>(optional)</i> {@link EntityConstraint}s to set on the {@link EntityMetadata}. * If <code>null</...
Creates an instance of <code>EntityMetadata</code> for testing purposes
createEntityMetadata
{ "repo_name": "BVulaj/lightblue-core", "path": "test/src/main/java/com/redhat/lightblue/test/MetadataUtil.java", "license": "gpl-3.0", "size": 4112 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.redhat.lightblue.metadata.EntityConstraint", "com.redhat.lightblue.metadata.EntityMetadata", "com.redhat.lightblue.metadata.parser.FieldConstraintParser", "com.redhat.lightblue.metadata.parser.JSONMetadataParser", "java.util.ArrayList", "java.util.List", ...
import com.fasterxml.jackson.databind.JsonNode; import com.redhat.lightblue.metadata.EntityConstraint; import com.redhat.lightblue.metadata.EntityMetadata; import com.redhat.lightblue.metadata.parser.FieldConstraintParser; import com.redhat.lightblue.metadata.parser.JSONMetadataParser; import java.util.ArrayList; impor...
import com.fasterxml.jackson.databind.*; import com.redhat.lightblue.metadata.*; import com.redhat.lightblue.metadata.parser.*; import java.util.*;
[ "com.fasterxml.jackson", "com.redhat.lightblue", "java.util" ]
com.fasterxml.jackson; com.redhat.lightblue; java.util;
1,669,398
//////////////////////////////////////////////////////////// ///////////// MEASURE /////////////////////////////////// ///////////////////////////////////////////////////////// public Measure addMease(String username, Measure measure, String token){ try{ Measure u = service.path("measure").path(username).que...
Measure function(String username, Measure measure, String token){ try{ Measure u = service.path(STR).path(username).queryParam(STR, token).type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).post(Measure.class, measure); return u; }catch(UniformInterfaceException e){ ClientResponse response = e.getRespo...
/** * adds a new measure for a user * * @param username id of a user * @param token authentication token generated while the user logs in * @param measure * @return measure information if added, Response 401 if not authenticated, Response 204 otherwise */
adds a new measure for a user
addMease
{ "repo_name": "keme686/LifeCoachService", "path": "it.unitn.lifecoach.service.process.selfmonitoring.adapter/src/it/unitn/lifecoach/service/process/selfmonitoring/adapter/SelfMonitoringProcessAdapter.java", "license": "gpl-2.0", "size": 17909 }
[ "com.sun.jersey.api.client.ClientResponse", "com.sun.jersey.api.client.UniformInterfaceException", "it.unitn.lifecoach.model.Measure", "javax.ws.rs.core.MediaType" ]
import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.UniformInterfaceException; import it.unitn.lifecoach.model.Measure; import javax.ws.rs.core.MediaType;
import com.sun.jersey.api.client.*; import it.unitn.lifecoach.model.*; import javax.ws.rs.core.*;
[ "com.sun.jersey", "it.unitn.lifecoach", "javax.ws" ]
com.sun.jersey; it.unitn.lifecoach; javax.ws;
1,834,411
@Test public void testDoClose() throws InterruptedException, JMSException { consumer = new SQSMessageConsumer(sqsConnection, sqsSession, sqsSessionRunnable, destination, acknowledger, negativeAcknowledger, threadFactory, sqsMessageConsumerPrefetch); consumer.doClose();...
void function() throws InterruptedException, JMSException { consumer = new SQSMessageConsumer(sqsConnection, sqsSession, sqsSessionRunnable, destination, acknowledger, negativeAcknowledger, threadFactory, sqsMessageConsumerPrefetch); consumer.doClose(); verify(sqsSession).removeConsumer(consumer); verify(sqsMessageCons...
/** * Test do close */
Test do close
testDoClose
{ "repo_name": "awslabs/amazon-sqs-java-messaging-lib", "path": "src/test/java/com/amazon/sqs/javamessaging/SQSMessageConsumerTest.java", "license": "apache-2.0", "size": 16137 }
[ "com.amazon.sqs.javamessaging.SQSMessageConsumer", "javax.jms.JMSException", "org.mockito.Mockito" ]
import com.amazon.sqs.javamessaging.SQSMessageConsumer; import javax.jms.JMSException; import org.mockito.Mockito;
import com.amazon.sqs.javamessaging.*; import javax.jms.*; import org.mockito.*;
[ "com.amazon.sqs", "javax.jms", "org.mockito" ]
com.amazon.sqs; javax.jms; org.mockito;
2,055,097
public Handler[] setHandlers(final Handler[] newHandlers) throws SecurityException { if (newHandlers == null) { throw new IllegalArgumentException("newHandlers is null"); } if (newHandlers.length == 0) { return clearHandlers(); } else { checkAccess...
Handler[] function(final Handler[] newHandlers) throws SecurityException { if (newHandlers == null) { throw new IllegalArgumentException(STR); } if (newHandlers.length == 0) { return clearHandlers(); } else { checkAccess(this); final Handler[] handlers = handlersUpdater.getAndSet(this, newHandlers); return handlers.len...
/** * A convenience method to atomically get and replace the sub-handler array. * * @param newHandlers the new sub-handlers * @return the old sub-handler array * * @throws SecurityException if a security manager exists and if the caller does not have {@code * ...
A convenience method to atomically get and replace the sub-handler array
setHandlers
{ "repo_name": "seeburger-ag/jboss-logmanager", "path": "src/main/java/org/jboss/logmanager/ExtHandler.java", "license": "lgpl-2.1", "size": 12470 }
[ "java.util.logging.Handler" ]
import java.util.logging.Handler;
import java.util.logging.*;
[ "java.util" ]
java.util;
654,539
@Override public Profile verifyResponse(final Map<String, String> requestParams) throws Exception { return doVerifyResponse(requestParams); }
Profile function(final Map<String, String> requestParams) throws Exception { return doVerifyResponse(requestParams); }
/** * Verifies the user when the external provider redirects back to our * application. * * @return Profile object containing the profile information * @param requestParams * Request Parameters, received from the provider * @throws Exception */
Verifies the user when the external provider redirects back to our application
verifyResponse
{ "repo_name": "vpablos/FleSe", "path": "flese/src/org/brickred/socialauth/provider/FourSquareImpl.java", "license": "gpl-2.0", "size": 13142 }
[ "java.util.Map", "org.brickred.socialauth.Profile" ]
import java.util.Map; import org.brickred.socialauth.Profile;
import java.util.*; import org.brickred.socialauth.*;
[ "java.util", "org.brickred.socialauth" ]
java.util; org.brickred.socialauth;
2,380,717
private JPanel createClassnamePanel() { List<String> possibleClasses = new ArrayList<String>(); try { // Find all the classes which implement the JavaSamplerClient // interface. possibleClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(...
JPanel function() { List<String> possibleClasses = new ArrayList<String>(); try { possibleClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { JavaSamplerClient.class }); possibleClasses.remove(JavaSampler.class.getName() + STR); } catch (Exception e) { log.debug(STR, e); } JLabel lab...
/** * Create a panel with GUI components allowing the user to select a test * class. * * @return a panel containing the relevant components */
Create a panel with GUI components allowing the user to select a test class
createClassnamePanel
{ "repo_name": "botelhojp/apache-jmeter-2.10", "path": "src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java", "license": "apache-2.0", "size": 10577 }
[ "java.util.ArrayList", "java.util.List", "javax.swing.JComboBox", "javax.swing.JLabel", "javax.swing.JPanel", "org.apache.jmeter.gui.util.HorizontalPanel", "org.apache.jmeter.protocol.java.sampler.JavaSampler", "org.apache.jmeter.protocol.java.sampler.JavaSamplerClient", "org.apache.jmeter.util.JMet...
import java.util.ArrayList; import java.util.List; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JPanel; import org.apache.jmeter.gui.util.HorizontalPanel; import org.apache.jmeter.protocol.java.sampler.JavaSampler; import org.apache.jmeter.protocol.java.sampler.JavaSamplerClient; import o...
import java.util.*; import javax.swing.*; import org.apache.jmeter.gui.util.*; import org.apache.jmeter.protocol.java.sampler.*; import org.apache.jmeter.util.*; import org.apache.jorphan.reflect.*;
[ "java.util", "javax.swing", "org.apache.jmeter", "org.apache.jorphan" ]
java.util; javax.swing; org.apache.jmeter; org.apache.jorphan;
2,781,927