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
private void createNewTab(String tabName, String tabBody) { WebElement element = findDomElement(By.xpath("//button[contains(@class,'addTab')]")); element.click(); element = findDomElement(ACTIVE_LI_LOCATOR); assertTrue("Correct element was not found", element.getText().contains(tabN...
void function(String tabName, String tabBody) { WebElement element = findDomElement(By.xpath(STRCorrect element was not foundSTRThe body of the section is not what it should be", tabBody, element.getText()); NUMBER_OF_TABS++; }
/** * Function that will create a tab, tab and verify its contents * * @param tabName - Name of the tab * @param tabBody - Body of the tab */
Function that will create a tab, tab and verify its contents
createNewTab
{ "repo_name": "badlogicmanpreet/aura", "path": "aura-integration-test/src/test/java/org/auraframework/integration/test/components/ui/tabset/TabsetUITest.java", "license": "apache-2.0", "size": 18694 }
[ "org.openqa.selenium.By", "org.openqa.selenium.WebElement" ]
import org.openqa.selenium.By; import org.openqa.selenium.WebElement;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,134,641
TRoleBean loadByPrimaryKey(Integer objectID);
TRoleBean loadByPrimaryKey(Integer objectID);
/** * Loads a roleBean by primary key * @param objectID * @return */
Loads a roleBean by primary key
loadByPrimaryKey
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/dao/RoleDAO.java", "license": "gpl-3.0", "size": 3074 }
[ "com.aurel.track.beans.TRoleBean" ]
import com.aurel.track.beans.TRoleBean;
import com.aurel.track.beans.*;
[ "com.aurel.track" ]
com.aurel.track;
2,743,006
public void addSubTree(int index, List<Node> children) { List<NodeDescriptor> nodeDescriptors = convertTreeNodesHelper(children); roots.addChildren(index, nodeDescriptors); List<Node> nodes = new ArrayList<>(); for (NodeDescriptor child : nodeDescriptors) { nodes.add(chi...
void function(int index, List<Node> children) { List<NodeDescriptor> nodeDescriptors = convertTreeNodesHelper(children); roots.addChildren(index, nodeDescriptors); List<Node> nodes = new ArrayList<>(); for (NodeDescriptor child : nodeDescriptors) { nodes.add(child.getNode()); } if (!nodes.isEmpty()) { fireEvent(new Sto...
/** * Imports a list of subtrees at the given position in the root of the tree. * * @param index * @param children */
Imports a list of subtrees at the given position in the root of the tree
addSubTree
{ "repo_name": "codenvy/che-core", "path": "ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/TreeNodeStorage.java", "license": "epl-1.0", "size": 25153 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.che.ide.api.project.node.Node", "org.eclipse.che.ide.ui.smartTree.event.StoreAddEvent" ]
import java.util.ArrayList; import java.util.List; import org.eclipse.che.ide.api.project.node.Node; import org.eclipse.che.ide.ui.smartTree.event.StoreAddEvent;
import java.util.*; import org.eclipse.che.ide.api.project.node.*; import org.eclipse.che.ide.ui.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
296,964
public void parserError(Throwable error, IAdaptable file, IDocument doc) { editToReparse.getParser().removeParseListener(this); //we'll only listen for this single parse doFindIfLast(); }
void function(Throwable error, IAdaptable file, IDocument doc) { editToReparse.getParser().removeParseListener(this); doFindIfLast(); }
/** * We want to work in the event of parse errors too. */
We want to work in the event of parse errors too
parserError
{ "repo_name": "aptana/Pydev", "path": "bundles/com.python.pydev.refactoring/src/com/python/pydev/refactoring/actions/PyGoToDefinition.java", "license": "epl-1.0", "size": 15948 }
[ "org.eclipse.core.runtime.IAdaptable", "org.eclipse.jface.text.IDocument" ]
import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.text.IDocument;
import org.eclipse.core.runtime.*; import org.eclipse.jface.text.*;
[ "org.eclipse.core", "org.eclipse.jface" ]
org.eclipse.core; org.eclipse.jface;
2,303,729
Logger logger = Logger.getLogger("foo.bar.zot"); HtmlPage page = j.createWebClient().goTo("log/levels"); HtmlForm form = page.getFormByName("configLogger"); form.getInputByName("name").setValueAttribute("foo.bar.zot"); form.getSelectByName("level").getOptionByValue("finest").setSelected...
Logger logger = Logger.getLogger(STR); HtmlPage page = j.createWebClient().goTo(STR); HtmlForm form = page.getFormByName(STR); form.getInputByName("name").setValueAttribute(STR); form.getSelectByName("level").getOptionByValue(STR).setSelected(true); j.submit(form); assertEquals(logger.getLevel(), Level.FINEST); }
/** * Makes sure that the logger configuration works. */
Makes sure that the logger configuration works
loggerConfig
{ "repo_name": "damianszczepanik/jenkins", "path": "test/src/test/java/hudson/logging/LogRecorderManagerTest.java", "license": "mit", "size": 7085 }
[ "com.gargoylesoftware.htmlunit.html.HtmlForm", "com.gargoylesoftware.htmlunit.html.HtmlPage", "java.util.logging.Level", "java.util.logging.Logger", "org.junit.Assert" ]
import com.gargoylesoftware.htmlunit.html.HtmlForm; import com.gargoylesoftware.htmlunit.html.HtmlPage; import java.util.logging.Level; import java.util.logging.Logger; import org.junit.Assert;
import com.gargoylesoftware.htmlunit.html.*; import java.util.logging.*; import org.junit.*;
[ "com.gargoylesoftware.htmlunit", "java.util", "org.junit" ]
com.gargoylesoftware.htmlunit; java.util; org.junit;
1,619,081
public CcLibraryHelper addLinkstamps(Iterable<? extends TransitiveInfoCollection> linkstamps) { for (TransitiveInfoCollection linkstamp : linkstamps) { Iterables.addAll(this.linkstamps, linkstamp.getProvider(FileProvider.class).getFilesToBuild()); } return this; }
CcLibraryHelper function(Iterable<? extends TransitiveInfoCollection> linkstamps) { for (TransitiveInfoCollection linkstamp : linkstamps) { Iterables.addAll(this.linkstamps, linkstamp.getProvider(FileProvider.class).getFilesToBuild()); } return this; }
/** * Adds the given linkstamps. Note that linkstamps are usually not compiled at the library level, * but only in the dependent binary rules. */
Adds the given linkstamps. Note that linkstamps are usually not compiled at the library level, but only in the dependent binary rules
addLinkstamps
{ "repo_name": "wakashige/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java", "license": "apache-2.0", "size": 40893 }
[ "com.google.common.collect.Iterables", "com.google.devtools.build.lib.analysis.FileProvider", "com.google.devtools.build.lib.analysis.TransitiveInfoCollection" ]
import com.google.common.collect.Iterables; import com.google.devtools.build.lib.analysis.FileProvider; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
2,760
public Storage getStorage(String storageId) throws IOException, JAXBException { String url = getContextBaseUrl() + "/configuration/strongbox/storages/" + storageId; WebTarget resource = getClientInstance().target(url); setupAuthentication(resource); final Response r...
Storage function(String storageId) throws IOException, JAXBException { String url = getContextBaseUrl() + STR + storageId; WebTarget resource = getClientInstance().target(url); setupAuthentication(resource); final Response response = resource.request(MediaType.APPLICATION_XML).get(); Storage storage = null; if (respons...
/** * Looks up a storage by it's ID. * * @param storageId * @return * @throws IOException */
Looks up a storage by it's ID
getStorage
{ "repo_name": "ivanursul/strongbox", "path": "strongbox-rest-client/src/main/java/org/carlspring/strongbox/client/RestClient.java", "license": "apache-2.0", "size": 18274 }
[ "java.io.ByteArrayInputStream", "java.io.IOException", "javax.ws.rs.client.WebTarget", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "javax.xml.bind.JAXBException", "org.carlspring.strongbox.storage.Storage", "org.carlspring.strongbox.xml.parsers.GenericParser" ]
import java.io.ByteArrayInputStream; import java.io.IOException; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.xml.bind.JAXBException; import org.carlspring.strongbox.storage.Storage; import org.carlspring.strongbox.xml.parsers.GenericParser;
import java.io.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*; import javax.xml.bind.*; import org.carlspring.strongbox.storage.*; import org.carlspring.strongbox.xml.parsers.*;
[ "java.io", "javax.ws", "javax.xml", "org.carlspring.strongbox" ]
java.io; javax.ws; javax.xml; org.carlspring.strongbox;
721,341
public void writeState(FacesContext facesContext) throws IOException { facesContext.getResponseWriter().write(FORM_STATE_MARKER); }
void function(FacesContext facesContext) throws IOException { facesContext.getResponseWriter().write(FORM_STATE_MARKER); }
/** * Writes a state marker that is replaced later by one or more hidden form * inputs. * * @param facesContext * @throws IOException */
Writes a state marker that is replaced later by one or more hidden form inputs
writeState
{ "repo_name": "GIP-RECIA/esco-grouper-ui", "path": "ext/bundles/myfaces-impl/src/main/java/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java", "license": "apache-2.0", "size": 15282 }
[ "java.io.IOException", "javax.faces.context.FacesContext" ]
import java.io.IOException; import javax.faces.context.FacesContext;
import java.io.*; import javax.faces.context.*;
[ "java.io", "javax.faces" ]
java.io; javax.faces;
1,801,453
@Authorized(PrivilegeConstants.GET_CONCEPT_REFERENCE_TERMS) public ConceptReferenceTerm getConceptReferenceTerm(Integer conceptReferenceTermId) throws APIException;
@Authorized(PrivilegeConstants.GET_CONCEPT_REFERENCE_TERMS) ConceptReferenceTerm function(Integer conceptReferenceTermId) throws APIException;
/** * Gets the concept reference term with the specified concept reference term id * * @param conceptReferenceTermId the concept reference term id to search against * @return the concept reference term object with the given concept reference term id * @since 1.9 * @throws APIException */
Gets the concept reference term with the specified concept reference term id
getConceptReferenceTerm
{ "repo_name": "michaelhofer/openmrs-core", "path": "api/src/main/java/org/openmrs/api/ConceptService.java", "license": "mpl-2.0", "size": 72165 }
[ "org.openmrs.ConceptReferenceTerm", "org.openmrs.annotation.Authorized", "org.openmrs.util.PrivilegeConstants" ]
import org.openmrs.ConceptReferenceTerm; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants;
import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*;
[ "org.openmrs", "org.openmrs.annotation", "org.openmrs.util" ]
org.openmrs; org.openmrs.annotation; org.openmrs.util;
513,231
@Override public void setCharacterStream(String parameterName, Reader x, long length) throws SQLException { setCharacterStream(getIndexForName(parameterName), x, length); }
void function(String parameterName, Reader x, long length) throws SQLException { setCharacterStream(getIndexForName(parameterName), x, length); }
/** * Sets the value of a parameter as a character stream. * This method does not close the reader. * The reader may be closed after executing the statement. * * @param parameterName the parameter name * @param x the value * @param length the maximum number of characters * @throw...
Sets the value of a parameter as a character stream. This method does not close the reader. The reader may be closed after executing the statement
setCharacterStream
{ "repo_name": "vdr007/ThriftyPaxos", "path": "src/applications/h2/src/main/org/h2/jdbc/JdbcCallableStatement.java", "license": "apache-2.0", "size": 53148 }
[ "java.io.Reader", "java.sql.SQLException" ]
import java.io.Reader; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
2,447,721
public boolean next( ) throws DataException { if ( this.isEmpty ) return false; try { if ( this.currentBoundary == null ) { return false; } while ( docIt.next( ) ) { this.getDocumentIterator( ) .getExprResultSet( ) .getDataSetResultSet( ) .next( ); if ( docIt.ge...
boolean function( ) throws DataException { if ( this.isEmpty ) return false; try { if ( this.currentBoundary == null ) { return false; } while ( docIt.next( ) ) { this.getDocumentIterator( ) .getExprResultSet( ) .getDataSetResultSet( ) .next( ); if ( docIt.getRowIndex( ) < this.currentBoundary.start ) { docIt.moveTo( t...
/** * Move to next qualified row. * * @return * @throws DataException */
Move to next qualified row
next
{ "repo_name": "sguan-actuate/birt", "path": "data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/document/PLSDataPopulator2.java", "license": "epl-1.0", "size": 6056 }
[ "org.eclipse.birt.core.exception.BirtException", "org.eclipse.birt.data.engine.core.DataException" ]
import org.eclipse.birt.core.exception.BirtException; import org.eclipse.birt.data.engine.core.DataException;
import org.eclipse.birt.core.exception.*; import org.eclipse.birt.data.engine.core.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
2,410,678
public static HashMap<String,String> parseFeatures(String featureString) { HashMap<String, String> features = new HashMap<String, String>(); if (! featureString.equals("_")) { String[] featValPairs = featureString.split("\\|"); for (String p : featValPairs) { String[] featValPair = p.split...
static HashMap<String,String> function(String featureString) { HashMap<String, String> features = new HashMap<String, String>(); if (! featureString.equals("_")) { String[] featValPairs = featureString.split(STR); for (String p : featValPairs) { String[] featValPair = p.split("="); features.put(featValPair[0], featValP...
/** * Parses the value of the feature column in a CoNLL-U file * and returns them in a HashMap with the feature names as keys * and the feature values as values. * * @param featureString * @return A HashMap<String,String> with the feature values. */
Parses the value of the feature column in a CoNLL-U file and returns them in a HashMap with the feature names as keys and the feature values as values
parseFeatures
{ "repo_name": "gshlsh17/CoreNLP", "path": "src/edu/stanford/nlp/trees/CoNLLUDocumentReader.java", "license": "gpl-2.0", "size": 5540 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
703,390
public double calculateRowWidth() { return getCalculatedColumnsWidth(Range.between(0, getColumnCount())); }
double function() { return getCalculatedColumnsWidth(Range.between(0, getColumnCount())); }
/** * Calculate the width of a row, as the sum of columns' widths. * * @return the width of a row, in pixels */
Calculate the width of a row, as the sum of columns' widths
calculateRowWidth
{ "repo_name": "mittop/vaadin", "path": "client/src/com/vaadin/client/widgets/Escalator.java", "license": "apache-2.0", "size": 271337 }
[ "com.vaadin.shared.ui.grid.Range" ]
import com.vaadin.shared.ui.grid.Range;
import com.vaadin.shared.ui.grid.*;
[ "com.vaadin.shared" ]
com.vaadin.shared;
690,624
public void setJavaIdentifierTransformer( JavaIdentifierTransformer javaIdentifierTransformer ) { this.javaIdentifierTransformer = javaIdentifierTransformer == null ? DEFAULT_JAVA_IDENTIFIER_TRANSFORMER : javaIdentifierTransformer; }
void function( JavaIdentifierTransformer javaIdentifierTransformer ) { this.javaIdentifierTransformer = javaIdentifierTransformer == null ? DEFAULT_JAVA_IDENTIFIER_TRANSFORMER : javaIdentifierTransformer; }
/** * Sets the JavaIdentifierTransformer to use.<br> * Will set default value (JavaIdentifierTransformer.NOOP) if null.<br> * [JSON -&gt; Java] */
Sets the JavaIdentifierTransformer to use. Will set default value (JavaIdentifierTransformer.NOOP) if null. [JSON -&gt; Java]
setJavaIdentifierTransformer
{ "repo_name": "kohsuke/Json-lib", "path": "src/main/java/net/sf/json/JsonConfig.java", "license": "apache-2.0", "size": 49405 }
[ "net.sf.json.util.JavaIdentifierTransformer" ]
import net.sf.json.util.JavaIdentifierTransformer;
import net.sf.json.util.*;
[ "net.sf.json" ]
net.sf.json;
2,130,885
private synchronized boolean isRestoringTable(final TableName tableName) { SnapshotSentinel sentinel = this.restoreHandlers.get(tableName); return(sentinel != null && !sentinel.isFinished()); }
synchronized boolean function(final TableName tableName) { SnapshotSentinel sentinel = this.restoreHandlers.get(tableName); return(sentinel != null && !sentinel.isFinished()); }
/** * Verify if the restore of the specified table is in progress. * * @param tableName table under restore * @return <tt>true</tt> if there is a restore in progress of the specified table. */
Verify if the restore of the specified table is in progress
isRestoringTable
{ "repo_name": "tobegit3hub/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java", "license": "apache-2.0", "size": 43955 }
[ "org.apache.hadoop.hbase.TableName", "org.apache.hadoop.hbase.master.SnapshotSentinel" ]
import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.master.SnapshotSentinel;
import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.master.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
891,372
public List<String> queryActiveBackends() throws IOException;
List<String> function() throws IOException;
/** * Retrieve a list of hostnames of currently active backends. * * @return the list of active backends * @throws IOException * if there is a communication or protocol error * * @since 72 */
Retrieve a list of hostnames of currently active backends
queryActiveBackends
{ "repo_name": "syphr42/libmythtv-java", "path": "protocol/src/main/java/org/syphr/mythtv/protocol/Protocol.java", "license": "apache-2.0", "size": 50355 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
112,697
public void setEdgesImage(BufferedImage edgesImage) { this.edgesImage = edgesImage; }
void function(BufferedImage edgesImage) { this.edgesImage = edgesImage; }
/** * Sets the edges image. Calling this method will not change the operation * of the edge detector in any way. It is intended to provide a means by * which the memory referenced by the detector object may be reduced. * * @param edgesImage expected (though not required) to be null */
Sets the edges image. Calling this method will not change the operation of the edge detector in any way. It is intended to provide a means by which the memory referenced by the detector object may be reduced
setEdgesImage
{ "repo_name": "tesseract4java/tesseract-gui", "path": "tools/src/main/java/de/vorb/tesseract/tools/preprocessing/CannyEdgeDetector.java", "license": "gpl-3.0", "size": 21839 }
[ "java.awt.image.BufferedImage" ]
import java.awt.image.BufferedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
973,061
public SlidingWindows every(Duration period) { return new SlidingWindows(period, size, offset); }
SlidingWindows function(Duration period) { return new SlidingWindows(period, size, offset); }
/** * Returns a new {@code SlidingWindows} with the original size, that assigns * timestamps into half-open intervals of the form * [N * period, N * period + size), where 0 is the epoch. */
Returns a new SlidingWindows with the original size, that assigns timestamps into half-open intervals of the form [N * period, N * period + size), where 0 is the epoch
every
{ "repo_name": "haonaturel/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/transforms/windowing/SlidingWindows.java", "license": "apache-2.0", "size": 4655 }
[ "org.joda.time.Duration" ]
import org.joda.time.Duration;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
479,923
public Plot getPlot() { return this.plot; }
Plot function() { return this.plot; }
/** * Returns the plot for the chart. The plot is a class responsible for * coordinating the visual representation of the data, including the axes * (if any). * * @return The plot. */
Returns the plot for the chart. The plot is a class responsible for coordinating the visual representation of the data, including the axes (if any)
getPlot
{ "repo_name": "simon04/jfreechart", "path": "src/main/java/org/jfree/chart/JFreeChart.java", "license": "lgpl-2.1", "size": 71522 }
[ "org.jfree.chart.plot.Plot" ]
import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,772,730
@Nullable public List<String> getKeywords() { final String[] array = getStringArray(IptcDirectory.TAG_KEYWORDS); if (array==null) return null; return Arrays.asList(array); }
List<String> function() { final String[] array = getStringArray(IptcDirectory.TAG_KEYWORDS); if (array==null) return null; return Arrays.asList(array); }
/** * Returns any keywords contained in the IPTC data. This value may be <code>null</code>. */
Returns any keywords contained in the IPTC data. This value may be <code>null</code>
getKeywords
{ "repo_name": "Darpholgshon/metadata-extractor", "path": "src/main/java/com/drew/metadata/iptc/IptcDirectory.java", "license": "apache-2.0", "size": 13455 }
[ "java.util.Arrays", "java.util.List" ]
import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
122,597
public final <S, T> void registerUnmarshaller(ConverterKey<S,T> key, FromUnmarshaller<S, T> converter) { registerConverter(key.invert(), new FromUnmarshallerConverter<S,T>(converter)); }
final <S, T> void function(ConverterKey<S,T> key, FromUnmarshaller<S, T> converter) { registerConverter(key.invert(), new FromUnmarshallerConverter<S,T>(converter)); }
/** * Register an UnMarshaller with the given source and target class. * The unmarshaller is used as follows: Instances of the source can be marshalled into the target class. * @param key Converter Key to use * @param converter The FromUnmarshaller to be registered */
Register an UnMarshaller with the given source and target class. The unmarshaller is used as follows: Instances of the source can be marshalled into the target class
registerUnmarshaller
{ "repo_name": "HerrB92/obp", "path": "OpenBeaconPackage/libraries/jadira.parent-3.1.0.CR8/jadira/bindings/src/main/java/org/jadira/bindings/core/binder/BasicBinder.java", "license": "mit", "size": 53794 }
[ "org.jadira.bindings.core.api.FromUnmarshaller", "org.jadira.bindings.core.general.converter.FromUnmarshallerConverter" ]
import org.jadira.bindings.core.api.FromUnmarshaller; import org.jadira.bindings.core.general.converter.FromUnmarshallerConverter;
import org.jadira.bindings.core.api.*; import org.jadira.bindings.core.general.converter.*;
[ "org.jadira.bindings" ]
org.jadira.bindings;
140,317
default void duplicateGroup(List<File> duplicateFiles) {}
default void duplicateGroup(List<File> duplicateFiles) {}
/** * Wird aufgerufen, sobald eine einzigartige Datei erkannt wurde * @param uniqueFile File ohne Duplikat */
Wird aufgerufen, sobald eine einzigartige Datei erkannt wurde
uniqueFile
{ "repo_name": "mkymikky/DupFinder", "path": "src/main/java/de/b0n/dir/processor/DuplicateContentFinderCallback.java", "license": "gpl-3.0", "size": 921 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,588,115
protected void checkIcmpv6NsMatchAndResponderFlow(Uint64 dpnId, int lportTag, final IVirtualPort intf, int action) { if (!ipv6ServiceEosHandler.isClusterOwner()) { LOG.trace("checkIcmpv6NsMatchAndResponderFlow: Not a cluster Owner, skip flow ...
void function(Uint64 dpnId, int lportTag, final IVirtualPort intf, int action) { if (!ipv6ServiceEosHandler.isClusterOwner()) { LOG.trace(STR); return; } VirtualNetwork vnet = getNetwork(intf.getNetworkID()); Collection<VirtualNetwork.DpnInterfaceInfo> dpnIfaceList = Collections.emptyList(); if (vnet != null) { dpnIfac...
/** * Check ICMPv6 NS related match. * * @param dpnId DPN ID * @param lportTag VM Lport Tag * @param intf Virtual Interface * @param action ADD or DEL */
Check ICMPv6 NS related match
checkIcmpv6NsMatchAndResponderFlow
{ "repo_name": "opendaylight/netvirt", "path": "ipv6service/impl/src/main/java/org/opendaylight/netvirt/ipv6service/IfMgr.java", "license": "epl-1.0", "size": 66023 }
[ "java.util.Collection", "java.util.Collections", "java.util.List", "org.opendaylight.genius.mdsalutil.MDSALUtil", "org.opendaylight.netvirt.ipv6service.api.IVirtualPort", "org.opendaylight.netvirt.ipv6service.utils.Ipv6ServiceConstants", "org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ine...
import java.util.Collection; import java.util.Collections; import java.util.List; import org.opendaylight.genius.mdsalutil.MDSALUtil; import org.opendaylight.netvirt.ipv6service.api.IVirtualPort; import org.opendaylight.netvirt.ipv6service.utils.Ipv6ServiceConstants; import org.opendaylight.yang.gen.v1.urn.ietf.params....
import java.util.*; import org.opendaylight.genius.mdsalutil.*; import org.opendaylight.netvirt.ipv6service.api.*; import org.opendaylight.netvirt.ipv6service.utils.*; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.*; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns....
[ "java.util", "org.opendaylight.genius", "org.opendaylight.netvirt", "org.opendaylight.yang", "org.opendaylight.yangtools" ]
java.util; org.opendaylight.genius; org.opendaylight.netvirt; org.opendaylight.yang; org.opendaylight.yangtools;
1,046,597
EAttribute getSendTask_Implementation();
EAttribute getSendTask_Implementation();
/** * Returns the meta object for the attribute '{@link org.eclipse.bpmn2.SendTask#getImplementation <em>Implementation</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Implementation</em>'. * @see org.eclipse.bpmn2.SendTask#getImplement...
Returns the meta object for the attribute '<code>org.eclipse.bpmn2.SendTask#getImplementation Implementation</code>'.
getSendTask_Implementation
{ "repo_name": "lqjack/fixflow", "path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 1014933 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,408,336
void publishEvent(@Nonnull String eventName);
void publishEvent(@Nonnull String eventName);
/** * Publishes an event.<p> * Listeners will be notified in the same thread as the publisher. * * @param eventName the name of the event */
Publishes an event. Listeners will be notified in the same thread as the publisher
publishEvent
{ "repo_name": "tschulte/griffon", "path": "subprojects/griffon-core/src/main/java/griffon/core/event/EventPublisher.java", "license": "apache-2.0", "size": 6185 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,173,296
public void inject(Object instance) throws KevoreeCoreException { List<Field> fields = ReflectUtils.getAllFieldsWithAnnotation(instance.getClass(), injectAnnotationClass); for (Field field : fields) { Object impl = this.registry.get(field.getType()); if (impl != null) { ...
void function(Object instance) throws KevoreeCoreException { List<Field> fields = ReflectUtils.getAllFieldsWithAnnotation(instance.getClass(), injectAnnotationClass); for (Field field : fields) { Object impl = this.registry.get(field.getType()); if (impl != null) { boolean isAccessible = field.isAccessible(); if (!isAc...
/** * Injects all available registered services on the field annotated with the Annotation class given in this injector * @param instance the instance to inject services to * * @throws KevoreeCoreException when unable to inject service into field */
Injects all available registered services on the field annotated with the Annotation class given in this injector
inject
{ "repo_name": "kevoree/kevoree", "path": "api/src/main/java/org/kevoree/reflect/Injector.java", "license": "lgpl-3.0", "size": 3929 }
[ "java.lang.reflect.Field", "java.util.List", "org.kevoree.KevoreeCoreException" ]
import java.lang.reflect.Field; import java.util.List; import org.kevoree.KevoreeCoreException;
import java.lang.reflect.*; import java.util.*; import org.kevoree.*;
[ "java.lang", "java.util", "org.kevoree" ]
java.lang; java.util; org.kevoree;
1,131,335
@Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndview) throws Exception { // do nothing }
void function(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndview) throws Exception { }
/** * This overridden method ... * * @see org.springframework.web.servlet.HandlerInterceptor#postHandle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, org.springframework.web.servlet.ModelAndView) */
This overridden method ..
postHandle
{ "repo_name": "ua-eas/ua-rice-2.1.9", "path": "krad/krad-web-framework/src/main/java/org/kuali/rice/krad/web/controller/ModuleLockingHandlerInterceptor.java", "license": "apache-2.0", "size": 5950 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.springframework.web.servlet.ModelAndView" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.*; import org.springframework.web.servlet.*;
[ "javax.servlet", "org.springframework.web" ]
javax.servlet; org.springframework.web;
2,038,522
private void prepareToCreateNewRepo(final String originalAddress, final String fingerprint) { addRepoDialog.findViewById(R.id.add_repo_form).setVisibility(View.GONE); addRepoDialog.getButton(AlertDialog.BUTTON_POSITIVE).setVisibility(View.GONE); final TextView textSearching...
void function(final String originalAddress, final String fingerprint) { addRepoDialog.findViewById(R.id.add_repo_form).setVisibility(View.GONE); addRepoDialog.getButton(AlertDialog.BUTTON_POSITIVE).setVisibility(View.GONE); final TextView textSearching = (TextView) addRepoDialog.findViewById(R.id.text_searching_for_rep...
/** * Adds a new repo to the database. */
Adds a new repo to the database
prepareToCreateNewRepo
{ "repo_name": "JTechMe/AppHub", "path": "f-droid/src/com/jtechme/apphub/views/ManageReposActivity.java", "license": "gpl-2.0", "size": 34180 }
[ "android.os.AsyncTask", "android.support.v7.app.AlertDialog", "android.view.View", "android.widget.TextView" ]
import android.os.AsyncTask; import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.TextView;
import android.os.*; import android.support.v7.app.*; import android.view.*; import android.widget.*;
[ "android.os", "android.support", "android.view", "android.widget" ]
android.os; android.support; android.view; android.widget;
2,764,481
public Observable<ServiceResponse<SecretBundle>> updateSecretWithServiceResponseAsync(String vaultBaseUrl, String secretName, String secretVersion, String contentType, SecretAttributes secretAttributes, Map<String, String> tags) { if (vaultBaseUrl == null) { throw new IllegalArgumentException("P...
Observable<ServiceResponse<SecretBundle>> function(String vaultBaseUrl, String secretName, String secretVersion, String contentType, SecretAttributes secretAttributes, Map<String, String> tags) { if (vaultBaseUrl == null) { throw new IllegalArgumentException(STR); } if (secretName == null) { throw new IllegalArgumentEx...
/** * Updates the attributes associated with a specified secret in a given key vault. * * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param secretName The name of the secret. * @param secretVersion The version of the secret. * @param contentType Type...
Updates the attributes associated with a specified secret in a given key vault
updateSecretWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java", "license": "mit", "size": 398315 }
[ "com.microsoft.azure.keyvault.models.SecretAttributes", "com.microsoft.azure.keyvault.models.SecretBundle", "com.microsoft.rest.ServiceResponse", "java.util.Map" ]
import com.microsoft.azure.keyvault.models.SecretAttributes; import com.microsoft.azure.keyvault.models.SecretBundle; import com.microsoft.rest.ServiceResponse; import java.util.Map;
import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.microsoft.azure; com.microsoft.rest; java.util;
2,375,028
public void initPanel(Map<Integer, Dictionary> dictionary) { panelMap = new TreeMap<String, VariablesExportDetailsPanel>(); // Remove all variable mappings panel.removeAll(); // DatabaseVariablesListElement[] patientVariablesInDB = canreg.common.Tools.getVariableListElements(CanRegCl...
void function(Map<Integer, Dictionary> dictionary) { panelMap = new TreeMap<String, VariablesExportDetailsPanel>(); panel.removeAll(); for (DatabaseVariablesListElement variable : variablesInTable) { VariablesExportDetailsPanel ved = new VariablesExportDetailsPanel(); ved.setDictionary(dictionary.get(variable.getDictio...
/** * Initialize the variable panel, i.e. fill it with VariablesExportDetailsPanels. * @param dictionary */
Initialize the variable panel, i.e. fill it with VariablesExportDetailsPanels
initPanel
{ "repo_name": "CRC-IRAN/CanReg5", "path": "src/canreg/client/gui/components/VariablesChooserPanel.java", "license": "gpl-3.0", "size": 9875 }
[ "java.util.Map", "java.util.TreeMap" ]
import java.util.Map; import java.util.TreeMap;
import java.util.*;
[ "java.util" ]
java.util;
246,804
public static Level toLevel(int val) { if (val == BOTLOG_INT) { return BOTLOG; } return (Level) toLevel(val, Level.DEBUG); }
static Level function(int val) { if (val == BOTLOG_INT) { return BOTLOG; } return (Level) toLevel(val, Level.DEBUG); }
/** * Checks whether val is BotLog#BOTLOG_INT. If yes then * returns BotLog#BOTLOG, else calls * BotLog#toLevel(int, Level) passing it Level#DEBUG as the * defaultLevel * @param val * @return level to go to */
Checks whether val is BotLog#BOTLOG_INT. If yes then returns BotLog#BOTLOG, else calls BotLog#toLevel(int, Level) passing it Level#DEBUG as the defaultLevel
toLevel
{ "repo_name": "eishub/BW4T", "path": "bw4t-server/src/main/java/nl/tudelft/bw4t/server/logging/BotLog.java", "license": "gpl-3.0", "size": 2642 }
[ "org.apache.log4j.Level" ]
import org.apache.log4j.Level;
import org.apache.log4j.*;
[ "org.apache.log4j" ]
org.apache.log4j;
2,325,272
@Deprecated public World getWorld();
World function();
/** * Get the crop's world. * @deprecated This method causes a MethodNotFoundException in a obfuscated environment. * Use {@link #getWorldObj()} instead * * @return Crop world */
Get the crop's world
getWorld
{ "repo_name": "XFireEyeZ/Magical-Tech", "path": "src/main/java/ic2/api/crops/ICropTile.java", "license": "lgpl-2.1", "size": 6144 }
[ "net.minecraft.world.World" ]
import net.minecraft.world.World;
import net.minecraft.world.*;
[ "net.minecraft.world" ]
net.minecraft.world;
2,865,132
public SSLContext createSslContext() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException { // initialize the ssl context final SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.i...
SSLContext function() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException, KeyManagementException { final SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(keyManagers, trustManagers, new SecureRandom()); sslContext.getDefaultSSLParameter...
/** * Creates a SSLContext instance using the given information. * * * @return a SSLContext instance * @throws java.security.KeyStoreException * @throws java.io.IOException * @throws java.security.NoSuchAlgorithmException * @throws java.security.cert.CertificateException * @...
Creates a SSLContext instance using the given information
createSslContext
{ "repo_name": "rdblue/incubator-nifi", "path": "commons/nifi-socket-utils/src/main/java/org/apache/nifi/io/socket/SSLContextFactory.java", "license": "apache-2.0", "size": 4437 }
[ "java.io.IOException", "java.security.KeyManagementException", "java.security.KeyStoreException", "java.security.NoSuchAlgorithmException", "java.security.SecureRandom", "java.security.UnrecoverableKeyException", "java.security.cert.CertificateException", "javax.net.ssl.SSLContext" ]
import java.io.IOException; import java.security.KeyManagementException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.security.UnrecoverableKeyException; import java.security.cert.CertificateException; import javax.net.ssl.SSLConte...
import java.io.*; import java.security.*; import java.security.cert.*; import javax.net.ssl.*;
[ "java.io", "java.security", "javax.net" ]
java.io; java.security; javax.net;
2,172,052
public WifProject createWMSLayer(final WifProject project, final String username, final String tableName, final CoordinateReferenceSystem crs) throws WifInvalidInputException, DataStoreUnavailableException, GeoServerConfigException { final GSFeatureTypeEncoder ftEnc = new GSFeatureTypeEncoder(); ...
WifProject function(final WifProject project, final String username, final String tableName, final CoordinateReferenceSystem crs) throws WifInvalidInputException, DataStoreUnavailableException, GeoServerConfigException { final GSFeatureTypeEncoder ftEnc = new GSFeatureTypeEncoder(); LOGGER.info(STR, tableName); ftEnc.s...
/** * Creates the wms layer. * * @param project * the project * @param username * the username * @param tableName * the table name * @param crs * the crs * @return the wif project * @throws WifInvalidInputException * the wif invalid in...
Creates the wms layer
createWMSLayer
{ "repo_name": "AURIN/online-whatif", "path": "src/main/java/au/org/aurin/wif/impl/ProjectServiceImpl.java", "license": "mit", "size": 71517 }
[ "au.org.aurin.wif.exception.config.GeoServerConfigException", "au.org.aurin.wif.exception.io.DataStoreUnavailableException", "au.org.aurin.wif.exception.validate.WifInvalidInputException", "au.org.aurin.wif.model.WifProject", "it.geosolutions.geoserver.rest.encoder.GSLayerEncoder", "it.geosolutions.geoser...
import au.org.aurin.wif.exception.config.GeoServerConfigException; import au.org.aurin.wif.exception.io.DataStoreUnavailableException; import au.org.aurin.wif.exception.validate.WifInvalidInputException; import au.org.aurin.wif.model.WifProject; import it.geosolutions.geoserver.rest.encoder.GSLayerEncoder; import it.ge...
import au.org.aurin.wif.exception.config.*; import au.org.aurin.wif.exception.io.*; import au.org.aurin.wif.exception.validate.*; import au.org.aurin.wif.model.*; import it.geosolutions.geoserver.rest.encoder.*; import it.geosolutions.geoserver.rest.encoder.feature.*; import org.geotools.referencing.*; import org.openg...
[ "au.org.aurin", "it.geosolutions.geoserver", "org.geotools.referencing", "org.opengis.referencing" ]
au.org.aurin; it.geosolutions.geoserver; org.geotools.referencing; org.opengis.referencing;
475,609
public void writePacketData(PacketBuffer p_148840_1_) throws IOException { p_148840_1_.writeByte(this.field_149186_a); p_148840_1_.writeShort(this.field_149184_b); p_148840_1_.writeShort(this.field_149185_c); }
void function(PacketBuffer p_148840_1_) throws IOException { p_148840_1_.writeByte(this.field_149186_a); p_148840_1_.writeShort(this.field_149184_b); p_148840_1_.writeShort(this.field_149185_c); }
/** * Writes the raw packet data to the data stream. */
Writes the raw packet data to the data stream
writePacketData
{ "repo_name": "CheeseL0ver/Ore-TTM", "path": "build/tmp/recompSrc/net/minecraft/network/play/server/S31PacketWindowProperty.java", "license": "lgpl-2.1", "size": 2194 }
[ "java.io.IOException", "net.minecraft.network.PacketBuffer" ]
import java.io.IOException; import net.minecraft.network.PacketBuffer;
import java.io.*; import net.minecraft.network.*;
[ "java.io", "net.minecraft.network" ]
java.io; net.minecraft.network;
454,381
public static void setupDepts(HttpServletRequest request, Long sessionId) throws Exception { request.setAttribute(Department.DEPT_ATTR_NAME, Department.findAll(sessionId)); }
static void function(HttpServletRequest request, Long sessionId) throws Exception { request.setAttribute(Department.DEPT_ATTR_NAME, Department.findAll(sessionId)); }
/** * Get All Depts and store it in request object * @param request * @throws Exception */
Get All Depts and store it in request object
setupDepts
{ "repo_name": "maciej-zygmunt/unitime", "path": "JavaSource/org/unitime/timetable/util/LookupTables.java", "license": "apache-2.0", "size": 17845 }
[ "javax.servlet.http.HttpServletRequest", "org.unitime.timetable.model.Department" ]
import javax.servlet.http.HttpServletRequest; import org.unitime.timetable.model.Department;
import javax.servlet.http.*; import org.unitime.timetable.model.*;
[ "javax.servlet", "org.unitime.timetable" ]
javax.servlet; org.unitime.timetable;
1,772,126
public void delete(List<CalendarReminder> calendarReminders) throws DotDataException ;
void function(List<CalendarReminder> calendarReminders) throws DotDataException ;
/** * Delete a List of Calendar Reminder * @param calendarReminders List of CalendarReminder to delete * @throws DotDataException */
Delete a List of Calendar Reminder
delete
{ "repo_name": "zhiqinghuang/core", "path": "src/com/dotmarketing/portlets/calendar/business/CalendarReminderAPI.java", "license": "gpl-3.0", "size": 2144 }
[ "com.dotmarketing.exception.DotDataException", "com.dotmarketing.portlets.calendar.model.CalendarReminder", "java.util.List" ]
import com.dotmarketing.exception.DotDataException; import com.dotmarketing.portlets.calendar.model.CalendarReminder; import java.util.List;
import com.dotmarketing.exception.*; import com.dotmarketing.portlets.calendar.model.*; import java.util.*;
[ "com.dotmarketing.exception", "com.dotmarketing.portlets", "java.util" ]
com.dotmarketing.exception; com.dotmarketing.portlets; java.util;
1,362,406
@ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String namespaceName, String eventHubName) { deleteAsync(resourceGroupName, namespaceName, eventHubName).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) void function(String resourceGroupName, String namespaceName, String eventHubName) { deleteAsync(resourceGroupName, namespaceName, eventHubName).block(); }
/** * Deletes an Event Hub from the specified Namespace and resource group. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown ...
Deletes an Event Hub from the specified Namespace and resource group
delete
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsClientImpl.java", "license": "mit", "size": 114749 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
1,998,416
public DefaultHeaders<K, V, T> copy() { DefaultHeaders<K, V, T> copy = new DefaultHeaders<K, V, T>( hashingStrategy, valueConverter, nameValidator, entries.length); copy.addImpl(this); return copy; } private final class HeaderIterator implements Iterator<Map.Entry<K,...
DefaultHeaders<K, V, T> function() { DefaultHeaders<K, V, T> copy = new DefaultHeaders<K, V, T>( hashingStrategy, valueConverter, nameValidator, entries.length); copy.addImpl(this); return copy; } private final class HeaderIterator implements Iterator<Map.Entry<K, V>> { private HeaderEntry<K, V> current = head;
/** * Returns a deep copy of this instance. */
Returns a deep copy of this instance
copy
{ "repo_name": "carl-mastrangelo/netty", "path": "codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java", "license": "apache-2.0", "size": 31159 }
[ "java.util.Iterator", "java.util.Map" ]
import java.util.Iterator; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,419,833
XYAreaRenderer r1 = new XYAreaRenderer(); XYAreaRenderer r2 = new XYAreaRenderer(); assertEquals(r1, r2); r1 = new XYAreaRenderer(XYAreaRenderer.AREA_AND_SHAPES); assertFalse(r1.equals(r2)); r2 = new XYAreaRenderer(XYAreaRenderer.AREA_AND_SHAPES); assertTrue(r1.equals(r2...
XYAreaRenderer r1 = new XYAreaRenderer(); XYAreaRenderer r2 = new XYAreaRenderer(); assertEquals(r1, r2); r1 = new XYAreaRenderer(XYAreaRenderer.AREA_AND_SHAPES); assertFalse(r1.equals(r2)); r2 = new XYAreaRenderer(XYAreaRenderer.AREA_AND_SHAPES); assertTrue(r1.equals(r2)); r1 = new XYAreaRenderer(XYAreaRenderer.AREA);...
/** * Check that the equals() method distinguishes all fields. */
Check that the equals() method distinguishes all fields
testEquals
{ "repo_name": "aaronc/jfreechart", "path": "tests/org/jfree/chart/renderer/xy/XYAreaRendererTest.java", "license": "lgpl-2.1", "size": 8678 }
[ "java.awt.geom.Rectangle2D", "org.jfree.ui.GradientPaintTransformType", "org.jfree.ui.StandardGradientPaintTransformer", "org.junit.Assert" ]
import java.awt.geom.Rectangle2D; import org.jfree.ui.GradientPaintTransformType; import org.jfree.ui.StandardGradientPaintTransformer; import org.junit.Assert;
import java.awt.geom.*; import org.jfree.ui.*; import org.junit.*;
[ "java.awt", "org.jfree.ui", "org.junit" ]
java.awt; org.jfree.ui; org.junit;
2,214,475
List<Destination> addDestinationsForAllServicesOnFacility(PerunSession perunSession, Facility facility, Destination destination) throws InternalErrorException, DestinationAlreadyAssignedException;
List<Destination> addDestinationsForAllServicesOnFacility(PerunSession perunSession, Facility facility, Destination destination) throws InternalErrorException, DestinationAlreadyAssignedException;
/** * Adds destination for all services defined on the facility. * * @param perunSession * @param facility * @param destination * @return list of added destinations * @throws InternalErrorException * @throws DestinationAlreadyAssignedException */
Adds destination for all services defined on the facility
addDestinationsForAllServicesOnFacility
{ "repo_name": "Natrezim/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/ServicesManagerBl.java", "license": "bsd-2-clause", "size": 21959 }
[ "cz.metacentrum.perun.core.api.Destination", "cz.metacentrum.perun.core.api.Facility", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.DestinationAlreadyAssignedException", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "java.util.List" ]
import cz.metacentrum.perun.core.api.Destination; import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.DestinationAlreadyAssignedException; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.uti...
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,161,759
public static final Set<CompatibilityOption> of(Stage stage) { switch (stage) { case Strawman: return EnumSet.of(DoExpression); case Proposal: return EnumSet.of(ArrayBufferTransfer, AsyncGenerator, ExportFrom, Decorator, StringTrim, StringMatchAll, ...
static final Set<CompatibilityOption> function(Stage stage) { switch (stage) { case Strawman: return EnumSet.of(DoExpression); case Proposal: return EnumSet.of(ArrayBufferTransfer, AsyncGenerator, ExportFrom, Decorator, StringTrim, StringMatchAll, StaticClassProperties, CallConstructor, Observable, SystemGlobal); case ...
/** * Returns a set of all options for proposed stage extensions. * * @param stage * the requested staging level * @return the options set for proposed stage extensions */
Returns a set of all options for proposed stage extensions
of
{ "repo_name": "jugglinmike/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/internal/CompatibilityOption.java", "license": "mit", "size": 12721 }
[ "java.util.EnumSet", "java.util.Set" ]
import java.util.EnumSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
656,090
@SuppressFBWarnings("NP_BOOLEAN_RETURN_NULL") public static Boolean dispatchKeyEvent(KeyEvent event, ChromeActivity activity, boolean uiInitialized) { int keyCode = event.getKeyCode(); if (!uiInitialized) { if (keyCode == KeyEvent.KEYCODE_SEARCH || keyCode == KeyEvent.KEY...
@SuppressFBWarnings(STR) static Boolean function(KeyEvent event, ChromeActivity activity, boolean uiInitialized) { int keyCode = event.getKeyCode(); if (!uiInitialized) { if (keyCode == KeyEvent.KEYCODE_SEARCH keyCode == KeyEvent.KEYCODE_MENU) return true; return null; } switch (keyCode) { case KeyEvent.KEYCODE_SEARCH:...
/** * This should be called from the Activity's dispatchKeyEvent() to handle keyboard shortcuts. * * Note: dispatchKeyEvent() is called before the active view or web page gets a chance to handle * the key event. So the keys handled here cannot be overridden by any view or web page. * * @pa...
This should be called from the Activity's dispatchKeyEvent() to handle keyboard shortcuts. Note: dispatchKeyEvent() is called before the active view or web page gets a chance to handle the key event. So the keys handled here cannot be overridden by any view or web page
dispatchKeyEvent
{ "repo_name": "js0701/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java", "license": "bsd-3-clause", "size": 11959 }
[ "android.view.KeyEvent", "org.chromium.base.annotations.SuppressFBWarnings" ]
import android.view.KeyEvent; import org.chromium.base.annotations.SuppressFBWarnings;
import android.view.*; import org.chromium.base.annotations.*;
[ "android.view", "org.chromium.base" ]
android.view; org.chromium.base;
934,964
// Register to receive notifications when the system settings change. Uri uri = Settings.Secure.getUriFor(Settings.Secure.ALLOWED_GEOLOCATION_ORIGINS); mContext.getContentResolver().registerContentObserver(uri, false, mSettingObserver); // Read and apply the setting if needed. maybeAppl...
Uri uri = Settings.Secure.getUriFor(Settings.Secure.ALLOWED_GEOLOCATION_ORIGINS); mContext.getContentResolver().registerContentObserver(uri, false, mSettingObserver); maybeApplySettingAsync(); }
/** * Checks whether the setting has changed and installs an observer to listen for * future changes. Must be called on the application main thread. */
Checks whether the setting has changed and installs an observer to listen for future changes. Must be called on the application main thread
start
{ "repo_name": "xjwangliang/android_source_note", "path": "Browser_2.3/BrowserActivity/src/com/android/browser/SystemAllowGeolocationOrigins.java", "license": "apache-2.0", "size": 6717 }
[ "android.net.Uri", "android.provider.Settings" ]
import android.net.Uri; import android.provider.Settings;
import android.net.*; import android.provider.*;
[ "android.net", "android.provider" ]
android.net; android.provider;
457,154
private static List<WelcomeActivityContent> getWelcomeFragments() { return new ArrayList<WelcomeActivityContent>(Arrays.asList( new TosFragment(), new ConductFragment(), new AttendingFragment(), new AccountFragment() )); }
static List<WelcomeActivityContent> function() { return new ArrayList<WelcomeActivityContent>(Arrays.asList( new TosFragment(), new ConductFragment(), new AttendingFragment(), new AccountFragment() )); }
/** * Get all WelcomeFragments for the WelcomeActivity. * * @return the List of WelcomeFragments. */
Get all WelcomeFragments for the WelcomeActivity
getWelcomeFragments
{ "repo_name": "wellcao/Google-IO-2015", "path": "android/src/main/java/com/google/samples/apps/iosched/welcome/WelcomeActivity.java", "license": "apache-2.0", "size": 6353 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,531,313
@SuppressWarnings("unchecked") private ArrayList<GlossaryItem> loadGlossaryItemListFromFile(VFSLeaf glossaryFile) { ArrayList<GlossaryItem> glossaryItemList = new ArrayList<GlossaryItem>(); if (glossaryFile == null) { return new ArrayList<GlossaryItem>(); } XStream xstream = XStreamHelper.createXStreamInstanc...
@SuppressWarnings(STR) ArrayList<GlossaryItem> function(VFSLeaf glossaryFile) { ArrayList<GlossaryItem> glossaryItemList = new ArrayList<GlossaryItem>(); if (glossaryFile == null) { return new ArrayList<GlossaryItem>(); } XStream xstream = XStreamHelper.createXStreamInstance(); xstream.alias(XML_GLOSSARY_ITEM_NAME, Glo...
/** * load a list of glossaryItem from glossary.xml - File * * @param glossaryFile * @return list with GlossaryItem's */
load a list of glossaryItem from glossary.xml - File
loadGlossaryItemListFromFile
{ "repo_name": "RLDevOps/Demo", "path": "src/main/java/org/olat/core/commons/modules/glossary/GlossaryItemManager.java", "license": "apache-2.0", "size": 14092 }
[ "com.thoughtworks.xstream.XStream", "java.util.ArrayList", "java.util.Collections", "org.olat.core.util.vfs.VFSLeaf", "org.olat.core.util.xml.XStreamHelper" ]
import com.thoughtworks.xstream.XStream; import java.util.ArrayList; import java.util.Collections; import org.olat.core.util.vfs.VFSLeaf; import org.olat.core.util.xml.XStreamHelper;
import com.thoughtworks.xstream.*; import java.util.*; import org.olat.core.util.vfs.*; import org.olat.core.util.xml.*;
[ "com.thoughtworks.xstream", "java.util", "org.olat.core" ]
com.thoughtworks.xstream; java.util; org.olat.core;
662,574
private void setSize() { // Width int width = m_width + 10; // slack if (width <= 10) width = 120; // default size // Height int height = LINE_HEIGHT; int lines = m_lines.length; if (lines < 2) height *= 10; // default else height *= lines; height += HEADING; // Di...
void function() { int width = m_width + 10; if (width <= 10) width = 120; int height = LINE_HEIGHT; int lines = m_lines.length; if (lines < 2) height *= 10; else height *= lines; height += HEADING; Dimension size = new Dimension(width, height); setPreferredSize(size); setMinimumSize(size); setMaximumSize(size); }
/** * Calculate & Set Size */
Calculate & Set Size
setSize
{ "repo_name": "armenrz/adempiere", "path": "client/src/org/compiere/apps/search/VScheduleTimePanel.java", "license": "gpl-2.0", "size": 8717 }
[ "java.awt.Dimension" ]
import java.awt.Dimension;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,436,311
public static String epochToISO8601DateTime(long epochMilliSeconds, ZoneId zoneId) { // returns ISO 8601 format, e.g. 2014-02-15T01:02:03Z return Instant.ofEpochMilli(epochMilliSeconds).atZone(zoneId).toString(); }
static String function(long epochMilliSeconds, ZoneId zoneId) { return Instant.ofEpochMilli(epochMilliSeconds).atZone(zoneId).toString(); }
/** * Converts time in millis to ISO-8601 date time format * * @param epochMilliSeconds time in milli seconds * @return time in ISO 8601 format */
Converts time in millis to ISO-8601 date time format
epochToISO8601DateTime
{ "repo_name": "Minoli/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.commons/src/main/java/org/wso2/carbon/apimgt/rest/api/common/util/RestApiUtil.java", "license": "apache-2.0", "size": 24664 }
[ "java.time.Instant", "java.time.ZoneId" ]
import java.time.Instant; import java.time.ZoneId;
import java.time.*;
[ "java.time" ]
java.time;
1,778,876
public final void setResponsePage(final IRequestablePage page) { getRequestCycle().setResponsePage(page); }
final void function(final IRequestablePage page) { getRequestCycle().setResponsePage(page); }
/** * Sets the page that will respond to this request * * @param page * The response page * * @see RequestCycle#setResponsePage(org.apache.wicket.request.component.IRequestablePage) */
Sets the page that will respond to this request
setResponsePage
{ "repo_name": "klopfdreh/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/Component.java", "license": "apache-2.0", "size": 135583 }
[ "org.apache.wicket.request.component.IRequestablePage" ]
import org.apache.wicket.request.component.IRequestablePage;
import org.apache.wicket.request.component.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,259,969
public List<KemidBenefittingOrganization> getBenefittingOrganizations(List<String> kemids);
List<KemidBenefittingOrganization> function(List<String> kemids);
/** * Gets KemidBenefittingOrganizations by kemids * * @param kemids * @return */
Gets KemidBenefittingOrganizations by kemids
getBenefittingOrganizations
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/endow/dataaccess/KemidBenefittingOrganizationDao.java", "license": "apache-2.0", "size": 2757 }
[ "java.util.List", "org.kuali.kfs.module.endow.businessobject.KemidBenefittingOrganization" ]
import java.util.List; import org.kuali.kfs.module.endow.businessobject.KemidBenefittingOrganization;
import java.util.*; import org.kuali.kfs.module.endow.businessobject.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
293,543
protected static HashMap<String, String> createInitialSubscribedStreamsToLastDiscoveredShardsState(List<String> streams) { HashMap<String, String> initial = new HashMap<>(); for (String stream : streams) { initial.put(stream, null); } return initial; }
static HashMap<String, String> function(List<String> streams) { HashMap<String, String> initial = new HashMap<>(); for (String stream : streams) { initial.put(stream, null); } return initial; }
/** * Utility function to create an initial map of the last discovered shard id of each subscribed stream, set to null; * This is called in the constructor; correct values will be set later on by calling advanceLastDiscoveredShardOfStream(). * * @param streams the list of subscribed streams * @return the init...
Utility function to create an initial map of the last discovered shard id of each subscribed stream, set to null; This is called in the constructor; correct values will be set later on by calling advanceLastDiscoveredShardOfStream()
createInitialSubscribedStreamsToLastDiscoveredShardsState
{ "repo_name": "ueshin/apache-flink", "path": "flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/KinesisDataFetcher.java", "license": "apache-2.0", "size": 41948 }
[ "java.util.HashMap", "java.util.List" ]
import java.util.HashMap; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
694,405
public Map<String, Integer> getInstanceCapacityMap() { Map<String, String> capacityData = _record.getMapField(InstanceConfigProperty.INSTANCE_CAPACITY_MAP.name()); if (capacityData != null) { return capacityData.entrySet().stream().collect( Collectors.toMap(entry -> entry.getKey(), en...
Map<String, Integer> function() { Map<String, String> capacityData = _record.getMapField(InstanceConfigProperty.INSTANCE_CAPACITY_MAP.name()); if (capacityData != null) { return capacityData.entrySet().stream().collect( Collectors.toMap(entry -> entry.getKey(), entry -> Integer.parseInt(entry.getValue()))); } return Co...
/** * Get the instance capacity information from the map fields. * @return data map if it exists, or empty map */
Get the instance capacity information from the map fields
getInstanceCapacityMap
{ "repo_name": "apache/helix", "path": "helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java", "license": "apache-2.0", "size": 23389 }
[ "java.util.Collections", "java.util.Map", "java.util.stream.Collectors" ]
import java.util.Collections; import java.util.Map; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
106,239
public static StreamObserver<HandshakeRequest> wrapHandshake(ServerAuthHandler authHandler, StreamObserver<HandshakeResponse> responseObserver, ExecutorService executors) { // stream started. AuthObserver observer = new AuthObserver(responseObserver); final Runnable r = () -> { try { ...
static StreamObserver<HandshakeRequest> function(ServerAuthHandler authHandler, StreamObserver<HandshakeResponse> responseObserver, ExecutorService executors) { AuthObserver observer = new AuthObserver(responseObserver); final Runnable r = () -> { try { if (authHandler.authenticate(observer.sender, observer.iter)) { re...
/** * Wrap the auth handler for handshake purposes. * * @param authHandler Authentication handler * @param responseObserver Observer for handshake response * @param executors ExecutorService * @return AuthObserver */
Wrap the auth handler for handshake purposes
wrapHandshake
{ "repo_name": "cpcloud/arrow", "path": "java/flight/flight-core/src/main/java/org/apache/arrow/flight/auth/ServerAuthWrapper.java", "license": "apache-2.0", "size": 4582 }
[ "io.grpc.stub.StreamObserver", "java.util.concurrent.ExecutorService", "java.util.concurrent.Future", "java.util.concurrent.LinkedBlockingQueue", "org.apache.arrow.flight.CallStatus", "org.apache.arrow.flight.grpc.StatusUtils", "org.apache.arrow.flight.impl.Flight" ]
import io.grpc.stub.StreamObserver; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.concurrent.LinkedBlockingQueue; import org.apache.arrow.flight.CallStatus; import org.apache.arrow.flight.grpc.StatusUtils; import org.apache.arrow.flight.impl.Flight;
import io.grpc.stub.*; import java.util.concurrent.*; import org.apache.arrow.flight.*; import org.apache.arrow.flight.grpc.*; import org.apache.arrow.flight.impl.*;
[ "io.grpc.stub", "java.util", "org.apache.arrow" ]
io.grpc.stub; java.util; org.apache.arrow;
2,574,354
public RobotAccountData registerOrUpdate(ParticipantId robotId, String location) throws RobotRegistrationException, PersistenceException;
RobotAccountData function(ParticipantId robotId, String location) throws RobotRegistrationException, PersistenceException;
/** * Registers a new robot or re-registers an existing robot in order to update the robot location. * * @param robotId the robot id. * @param location the new location of the robot (URI). * @return the updated robot account. * @throws RobotRegistrationException if the id to re-register exist but is n...
Registers a new robot or re-registers an existing robot in order to update the robot location
registerOrUpdate
{ "repo_name": "wisebaldone/incubator-wave", "path": "wave/src/main/java/org/waveprotocol/box/server/robots/register/RobotRegistrar.java", "license": "apache-2.0", "size": 3424 }
[ "org.waveprotocol.box.server.account.RobotAccountData", "org.waveprotocol.box.server.persistence.PersistenceException", "org.waveprotocol.box.server.robots.util.RobotsUtil", "org.waveprotocol.wave.model.wave.ParticipantId" ]
import org.waveprotocol.box.server.account.RobotAccountData; import org.waveprotocol.box.server.persistence.PersistenceException; import org.waveprotocol.box.server.robots.util.RobotsUtil; import org.waveprotocol.wave.model.wave.ParticipantId;
import org.waveprotocol.box.server.account.*; import org.waveprotocol.box.server.persistence.*; import org.waveprotocol.box.server.robots.util.*; import org.waveprotocol.wave.model.wave.*;
[ "org.waveprotocol.box", "org.waveprotocol.wave" ]
org.waveprotocol.box; org.waveprotocol.wave;
1,754,113
public static RegressionDataSet getLinearRegression(int dataSetSize, Random rand, Vec coef) { RegressionDataSet rds = new RegressionDataSet(coef.length(), new CategoricalData[0]); for(int i = 0; i < dataSetSize; i++) { Vec s = new DenseVector(coef.length()); ...
static RegressionDataSet function(int dataSetSize, Random rand, Vec coef) { RegressionDataSet rds = new RegressionDataSet(coef.length(), new CategoricalData[0]); for(int i = 0; i < dataSetSize; i++) { Vec s = new DenseVector(coef.length()); for(int j = 0; j < s.length(); j++) s.set(j, rand.nextDouble()); rds.addDataPoi...
/** * Generates a regression problem that can be solved by linear regression methods * @param dataSetSize the number of data points to get * @param rand the randomness to use * @param coef the coefficients to use for the linear regression * @return a regression data set */
Generates a regression problem that can be solved by linear regression methods
getLinearRegression
{ "repo_name": "EdwardRaff/JSAT", "path": "JSAT/test/jsat/FixedProblems.java", "license": "gpl-3.0", "size": 10263 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,422,366
public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException { return createManager(uri); }
DeploymentManager function(String uri) throws DeploymentManagerCreationException { return createManager(uri); }
/** * Returns a deployment manager for the URI. */
Returns a deployment manager for the URI
getDisconnectedDeploymentManager
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/j2ee/deployclient/DeploymentFactoryImpl.java", "license": "gpl-2.0", "size": 2949 }
[ "javax.enterprise.deploy.spi.DeploymentManager", "javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException" ]
import javax.enterprise.deploy.spi.DeploymentManager; import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
import javax.enterprise.deploy.spi.*; import javax.enterprise.deploy.spi.exceptions.*;
[ "javax.enterprise" ]
javax.enterprise;
715,465
OFFlowMod buildIntermediateIngressRule(DatapathId dpid, int port) throws SwitchNotFoundException;
OFFlowMod buildIntermediateIngressRule(DatapathId dpid, int port) throws SwitchNotFoundException;
/** * Build intermidiate flowmod for ingress rule. * * @param dpid switch id * @param port port * @return modification command */
Build intermidiate flowmod for ingress rule
buildIntermediateIngressRule
{ "repo_name": "jonvestal/open-kilda", "path": "src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/switchmanager/ISwitchManager.java", "license": "apache-2.0", "size": 31727 }
[ "org.openkilda.floodlight.error.SwitchNotFoundException", "org.projectfloodlight.openflow.protocol.OFFlowMod", "org.projectfloodlight.openflow.types.DatapathId" ]
import org.openkilda.floodlight.error.SwitchNotFoundException; import org.projectfloodlight.openflow.protocol.OFFlowMod; import org.projectfloodlight.openflow.types.DatapathId;
import org.openkilda.floodlight.error.*; import org.projectfloodlight.openflow.protocol.*; import org.projectfloodlight.openflow.types.*;
[ "org.openkilda.floodlight", "org.projectfloodlight.openflow" ]
org.openkilda.floodlight; org.projectfloodlight.openflow;
171,199
@Override public void setText(Object bean, QName name, String value) throws ConfigException { setValue(bean, name, _type.valueOf(value)); }
void function(Object bean, QName name, String value) throws ConfigException { setValue(bean, name, _type.valueOf(value)); }
/** * Sets the value of the attribute */
Sets the value of the attribute
setText
{ "repo_name": "headius/quercus", "path": "src/main/java/com/caucho/config/attribute/EnvironmentAttribute.java", "license": "gpl-2.0", "size": 2377 }
[ "com.caucho.config.ConfigException", "com.caucho.xml.QName" ]
import com.caucho.config.ConfigException; import com.caucho.xml.QName;
import com.caucho.config.*; import com.caucho.xml.*;
[ "com.caucho.config", "com.caucho.xml" ]
com.caucho.config; com.caucho.xml;
1,615,154
Resource result = new ExtensionsResourceImpl(uri); return result; }
Resource result = new ExtensionsResourceImpl(uri); return result; }
/** * Creates an instance of the resource. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Creates an instance of the resource.
createResource
{ "repo_name": "ifml/ifml-editor", "path": "plugins/IFMLEditor/src/IFML/Extensions/util/ExtensionsResourceFactoryImpl.java", "license": "mit", "size": 957 }
[ "org.eclipse.emf.ecore.resource.Resource" ]
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
621,380
public void setRecordDelimiter(String recordDelimiter) { if (processingStarted) { throw new JRRuntimeException("Cannot modify data source properties after data reading has started"); } this.recordDelimiter = recordDelimiter; }
void function(String recordDelimiter) { if (processingStarted) { throw new JRRuntimeException(STR); } this.recordDelimiter = recordDelimiter; }
/** * Sets the record delimiter string. The default is line feed (\n). * @param recordDelimiter */
Sets the record delimiter string. The default is line feed (\n)
setRecordDelimiter
{ "repo_name": "juniormesquitadandao/report4all", "path": "lib/src/net/sf/jasperreports/engine/data/JRCsvDataSource.java", "license": "mit", "size": 20062 }
[ "net.sf.jasperreports.engine.JRRuntimeException" ]
import net.sf.jasperreports.engine.JRRuntimeException;
import net.sf.jasperreports.engine.*;
[ "net.sf.jasperreports" ]
net.sf.jasperreports;
2,129,042
private RecordNumbers readRecordNumberOffsets() { int recordNumberCount = data.getRecordReferencesCount(); if (recordNumberCount == 0) { return EMPTY_RECORD_NUMBERS; } int maxIndex = data.getRecordReferenceNumber(recordNumberCount - 1); byte[] types = new byte[...
RecordNumbers function() { int recordNumberCount = data.getRecordReferencesCount(); if (recordNumberCount == 0) { return EMPTY_RECORD_NUMBERS; } int maxIndex = data.getRecordReferenceNumber(recordNumberCount - 1); byte[] types = new byte[maxIndex + 1]; int[] offsets = new int[maxIndex + 1]; fill(offsets, -1); for (int ...
/** * Read the serialized table mapping record numbers to offsets. * * @return An instance of {@link RecordNumbers}, never {@code null}. */
Read the serialized table mapping record numbers to offsets
readRecordNumberOffsets
{ "repo_name": "francescomari/jackrabbit-oak", "path": "oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/Segment.java", "license": "apache-2.0", "size": 22381 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,420,495
public static Map getTestMap(TileType tileType) { MapBuilder builder = new MapBuilder(getGame()); builder.setBaseTileType(tileType); return builder.build(); }
static Map function(TileType tileType) { MapBuilder builder = new MapBuilder(getGame()); builder.setBaseTileType(tileType); return builder.build(); }
/** * Creates a standardized map on which all fields have the same given type. * * Uses the getGame() method to access the currently running game. * * Does not call Game.setMap(Map) with the returned map. The map * is unexplored. * * @param tileType The type of land with which to...
Creates a standardized map on which all fields have the same given type. Uses the getGame() method to access the currently running game. Does not call Game.setMap(Map) with the returned map. The map is unexplored
getTestMap
{ "repo_name": "edijman/SOEN_6431_Colonization_Game", "path": "test/src/net/sf/freecol/util/test/FreeColTestCase.java", "license": "gpl-2.0", "size": 24424 }
[ "net.sf.freecol.common.model.Map", "net.sf.freecol.common.model.TileType" ]
import net.sf.freecol.common.model.Map; import net.sf.freecol.common.model.TileType;
import net.sf.freecol.common.model.*;
[ "net.sf.freecol" ]
net.sf.freecol;
809,659
public static void openHomeActivity(Context context, Uri url) { Intent myIntent = new Intent(context, MainActivity.class); myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP|Intent.FLAG_ACTIVITY_CLEAR_TOP); myIntent.setData(url); context.startActivity(myIntent); }
static void function(Context context, Uri url) { Intent myIntent = new Intent(context, MainActivity.class); myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP Intent.FLAG_ACTIVITY_CLEAR_TOP); myIntent.setData(url); context.startActivity(myIntent); }
/** * Helper method to open the Contact history activity. If the home * Activity is already open - it should be brought to the from of * the call stack * * @param context The calling context * @param url Uri the the calling activity parses to cary the intent data * @return N/A */
Helper method to open the Contact history activity. If the home Activity is already open - it should be brought to the from of the call stack
openHomeActivity
{ "repo_name": "rhill345/PlaceChase", "path": "app/src/main/java/com/android/placechase/utils/GeneralUtils.java", "license": "apache-2.0", "size": 3862 }
[ "android.content.Context", "android.content.Intent", "android.net.Uri", "com.android.placechase.MainActivity" ]
import android.content.Context; import android.content.Intent; import android.net.Uri; import com.android.placechase.MainActivity;
import android.content.*; import android.net.*; import com.android.placechase.*;
[ "android.content", "android.net", "com.android.placechase" ]
android.content; android.net; com.android.placechase;
250,660
public static void repl( StringBuilder str, String code, String repl ) { if ( ( code == null ) || ( repl == null ) || ( str == null ) ) { return; // do nothing } String aString = str.toString(); str.setLength( 0 ); str.append( aString.replaceAll( Pattern.quote( code ), Matcher.quoteReplaceme...
static void function( StringBuilder str, String code, String repl ) { if ( ( code == null ) ( repl == null ) ( str == null ) ) { return; } String aString = str.toString(); str.setLength( 0 ); str.append( aString.replaceAll( Pattern.quote( code ), Matcher.quoteReplacement( repl ) ) ); }
/** * Alternate faster version of string replace using a stringbuilder as input (non-synchronized). * * 33% Faster using replaceAll this way than original method * * @param str * The string where we want to replace in * @param code * The code to search for * @param repl *...
Alternate faster version of string replace using a stringbuilder as input (non-synchronized). 33% Faster using replaceAll this way than original method
repl
{ "repo_name": "mkambol/pentaho-kettle", "path": "core/src/main/java/org/pentaho/di/core/Const.java", "license": "apache-2.0", "size": 121415 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,908,869
public BigDecimal getPayAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PayAmt); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PayAmt); if (bd == null) return Env.ZERO; return bd; }
/** Get Payment amount. @return Amount being paid */
Get Payment amount
getPayAmt
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/X_I_Payment.java", "license": "gpl-2.0", "size": 29914 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
801,451
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException { try { // Handle naming for both repository and XML bases resources... // String baseName; String originalPath;...
String function(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException { try { String originalPath; String fullname; String extension="ktr"; if (Const.isEmpty(getFilename())) { baseName = getName(); fullname = dire...
/** * Exports the specified objects to a flat-file system, adding content with filename keys to a * set of definitions. The supplied resource naming interface allows the object to name appropriately * without worrying about those parts of the implementation specific details. * * @param space the variable sp...
Exports the specified objects to a flat-file system, adding content with filename keys to a set of definitions. The supplied resource naming interface allows the object to name appropriately without worrying about those parts of the implementation specific details
exportResources
{ "repo_name": "lihongqiang/kettle-4.4.0-stable", "path": "src/org/pentaho/di/trans/TransMeta.java", "license": "apache-2.0", "size": 249634 }
[ "java.util.Map", "org.pentaho.di.core.Const", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.variables.VariableSpace", "org.pentaho.di.repository.Repository", "org.pentaho.di.repository.RepositoryDirectory", "org.pentaho.di.resource.ResourceDefinition", "org.pentaho.di.resource....
import java.util.Map; import org.pentaho.di.core.Const; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.variables.VariableSpace; import org.pentaho.di.repository.Repository; import org.pentaho.di.repository.RepositoryDirectory; import org.pentaho.di.resource.ResourceDefinition; import o...
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.variables.*; import org.pentaho.di.repository.*; import org.pentaho.di.resource.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
643,510
private Package getAndVerifyPackage(String pn, Manifest man, URL url) { Package pkg = getDefinedPackage(pn); if (pkg != null) { if (pkg.isSealed()) { if (!pkg.isSealed(url)) { throw new SecurityException( "sealing violation: pac...
Package function(String pn, Manifest man, URL url) { Package pkg = getDefinedPackage(pn); if (pkg != null) { if (pkg.isSealed()) { if (!pkg.isSealed(url)) { throw new SecurityException( STR + pn + STR); } } else { if ((man != null) && isSealed(pn, man)) { throw new SecurityException( STR + pn + STR); } } } return pkg; ...
/** * Gets the Package with the specified package name. If defined * then verifies it against the manifest and code source. * * @throws SecurityException if there is a sealing violation (JAR spec) */
Gets the Package with the specified package name. If defined then verifies it against the manifest and code source
getAndVerifyPackage
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/jdk/internal/loader/BuiltinClassLoader.java", "license": "apache-2.0", "size": 38210 }
[ "java.util.jar.Manifest" ]
import java.util.jar.Manifest;
import java.util.jar.*;
[ "java.util" ]
java.util;
1,710,181
List<AdministrativeDivision> selectByExample(AdministrativeDivisionExample example);
List<AdministrativeDivision> selectByExample(AdministrativeDivisionExample example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table administrative_division * * @mbg.generated Mon Jun 05 17:51:45 CST 2017 */
This method was generated by MyBatis Generator. This method corresponds to the database table administrative_division
selectByExample
{ "repo_name": "apo-soft/administrative-division", "path": "administrative-division-parent/aposoft-administrative-division-management/src/main/java/cn/aposoft/administrativedivision/db/mappers/AdministrativeDivisionMapper.java", "license": "apache-2.0", "size": 3560 }
[ "cn.aposoft.administrativedivision.db.AdministrativeDivision", "cn.aposoft.administrativedivision.db.AdministrativeDivisionExample", "java.util.List" ]
import cn.aposoft.administrativedivision.db.AdministrativeDivision; import cn.aposoft.administrativedivision.db.AdministrativeDivisionExample; import java.util.List;
import cn.aposoft.administrativedivision.db.*; import java.util.*;
[ "cn.aposoft.administrativedivision", "java.util" ]
cn.aposoft.administrativedivision; java.util;
1,616,679
public static void main(String args[]) { try { userWindow window = new userWindow(); window.setBlockOnOpen(true); window.open(); Display.getCurrent().dispose(); } catch (Exception e) { e.printStackTrace(); } }
static void function(String args[]) { try { userWindow window = new userWindow(); window.setBlockOnOpen(true); window.open(); Display.getCurrent().dispose(); } catch (Exception e) { e.printStackTrace(); } }
/** * Launch the application. * * @param args */
Launch the application
main
{ "repo_name": "DamianMcNulty/accounting-nua", "path": "GUILayer/userWindow.java", "license": "gpl-3.0", "size": 10821 }
[ "org.eclipse.swt.widgets.Display" ]
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
919,568
private static Pair<double[], double[]> transform(Pair<double[], double[]> rule, double a, double b) { final double[] points = rule.getFirst(); final double[] weights = rule.getSecond(); ...
static Pair<double[], double[]> function(Pair<double[], double[]> rule, double a, double b) { final double[] points = rule.getFirst(); final double[] weights = rule.getSecond(); final double scale = (b - a) / 2; final double shift = a + scale; for (int i = 0; i < points.length; i++) { points[i] = points[i] * scale + sh...
/** * Performs a change of variable so that the integration can be performed * on an arbitrary interval {@code [a, b]}. * It is assumed that the natural interval is {@code [-1, 1]}. * * @param rule Original points and weights. * @param a Lower bound of the integration interval. * @par...
Performs a change of variable so that the integration can be performed on an arbitrary interval [a, b]. It is assumed that the natural interval is [-1, 1]
transform
{ "repo_name": "happyjack27/autoredistrict", "path": "src/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java", "license": "gpl-3.0", "size": 7483 }
[ "org.apache.commons.math3.util.Pair" ]
import org.apache.commons.math3.util.Pair;
import org.apache.commons.math3.util.*;
[ "org.apache.commons" ]
org.apache.commons;
2,027,563
public static <T> Set<T> minus(Set<T> set1, Set<T> set2) { if (set1.isEmpty()) { return set1; } else if (set2.isEmpty()) { return set1; } else { Set<T> set = new HashSet<>(set1); set.removeAll(set2); return set; } }
static <T> Set<T> function(Set<T> set1, Set<T> set2) { if (set1.isEmpty()) { return set1; } else if (set2.isEmpty()) { return set1; } else { Set<T> set = new HashSet<>(set1); set.removeAll(set2); return set; } }
/** * Returns a set of the elements which are in <code>set1</code> but not in * <code>set2</code>, without modifying either. */
Returns a set of the elements which are in <code>set1</code> but not in <code>set2</code>, without modifying either
minus
{ "repo_name": "yeongwei/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/util/Util.java", "license": "apache-2.0", "size": 70186 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,866,855
List<Object> tempList; int index = header.indexOf(oldHeader); header.set(index, newHeader); tempList = data.remove(oldHeader); data.put(newHeader, tempList); }
List<Object> tempList; int index = header.indexOf(oldHeader); header.set(index, newHeader); tempList = data.remove(oldHeader); data.put(newHeader, tempList); }
/** * Replaces the given header name with a new header name. * * @param oldHeader * Old header name. * @param newHeader * New header name. */
Replaces the given header name with a new header name
replaceHeader
{ "repo_name": "llllewicki/jmeter-diff", "path": "src/jorphan/org/apache/jorphan/collections/Data.java", "license": "apache-2.0", "size": 20678 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
325,824
public Date getDatelastmaint() { return datelastmaint; }
Date function() { return datelastmaint; }
/** * This method was generated by MyBatis Generator. * This method returns the value of the database column prod.datelastmaint * * @return the value of prod.datelastmaint * * @mbggenerated Wed Oct 17 17:54:47 CST 2018 */
This method was generated by MyBatis Generator. This method returns the value of the database column prod.datelastmaint
getDatelastmaint
{ "repo_name": "408657544/springbank", "path": "springbank-dao/src/main/java/com/springbank/dao/generate/model/Prod.java", "license": "gpl-3.0", "size": 4146 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,230,913
void onItemClick(View view, Object item, Segment segment);
void onItemClick(View view, Object item, Segment segment);
/** * Called every time an item inside a ListView or GridView is clicked * * @param view the clicked view * @param item the Object which corresponds to the click * @param segment the {@link Segment} which contains the clicked item */
Called every time an item inside a ListView or GridView is clicked
onItemClick
{ "repo_name": "tomahawk-player/tomahawk-android", "path": "app/src/main/java/org/tomahawk/tomahawk_android/listeners/MultiColumnClickListener.java", "license": "gpl-3.0", "size": 1675 }
[ "android.view.View", "org.tomahawk.tomahawk_android.adapters.Segment" ]
import android.view.View; import org.tomahawk.tomahawk_android.adapters.Segment;
import android.view.*; import org.tomahawk.tomahawk_android.adapters.*;
[ "android.view", "org.tomahawk.tomahawk_android" ]
android.view; org.tomahawk.tomahawk_android;
1,271,460
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<StartCallRecordingResultInternal> startRecordingAsync( String serverCallId, StartCallRecordingRequest request) { return startRecordingWithResponseAsync(serverCallId, request) .flatMap( (Response<S...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<StartCallRecordingResultInternal> function( String serverCallId, StartCallRecordingRequest request) { return startRecordingWithResponseAsync(serverCallId, request) .flatMap( (Response<StartCallRecordingResultInternal> res) -> { if (res.getValue() != null) { return Mono.j...
/** * Start recording of the call. * * @param serverCallId The server call id. * @param request The request body of start call recording request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request...
Start recording of the call
startRecordingAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/ServerCallsImpl.java", "license": "mit", "size": 58837 }
[ "com.azure.communication.callingserver.implementation.models.StartCallRecordingRequest", "com.azure.communication.callingserver.implementation.models.StartCallRecordingResultInternal", "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response" ]
import com.azure.communication.callingserver.implementation.models.StartCallRecordingRequest; import com.azure.communication.callingserver.implementation.models.StartCallRecordingResultInternal; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest....
import com.azure.communication.callingserver.implementation.models.*; import com.azure.core.annotation.*; import com.azure.core.http.rest.*;
[ "com.azure.communication", "com.azure.core" ]
com.azure.communication; com.azure.core;
275,181
protected void updateMailingList(MailingList value, String xmlTag, Counter counter, Element element) { Element root = element; Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null); findAndReplaceSimpleElement...
void function(MailingList value, String xmlTag, Counter counter, Element element) { Element root = element; Counter innerCount = new Counter(counter.getDepth() + 1); findAndReplaceSimpleElement(innerCount, root, "name", value.getName(), null); findAndReplaceSimpleElement(innerCount, root, STR, value.getSubscribe(), nul...
/** * Method updateMailingList. * * @param value * @param element * @param counter * @param xmlTag */
Method updateMailingList
updateMailingList
{ "repo_name": "jerr/jbossforge-core", "path": "maven/impl/src/main/java/org/jboss/forge/addon/maven/util/MavenJDOMWriter.java", "license": "epl-1.0", "size": 84577 }
[ "org.apache.maven.model.MailingList", "org.jdom.Element" ]
import org.apache.maven.model.MailingList; import org.jdom.Element;
import org.apache.maven.model.*; import org.jdom.*;
[ "org.apache.maven", "org.jdom" ]
org.apache.maven; org.jdom;
1,669,336
public void setUserAttributes(SparseBooleanMatrix s);
void function(SparseBooleanMatrix s);
/** * Setter for binary user attributes */
Setter for binary user attributes
setUserAttributes
{ "repo_name": "GaoZhenGit/UISMF", "path": "MyMediaLite/src/org/mymedialite/IUserAttributeAwareRecommender.java", "license": "gpl-3.0", "size": 1373 }
[ "org.mymedialite.datatype.SparseBooleanMatrix" ]
import org.mymedialite.datatype.SparseBooleanMatrix;
import org.mymedialite.datatype.*;
[ "org.mymedialite.datatype" ]
org.mymedialite.datatype;
188,347
public ParsedSymbol yylex() throws java.io.IOException, ActionParseException { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char[] zzBufferL = zzBuffer; char[] zzCMapL = ZZ_CMAP; ...
ParsedSymbol function() throws java.io.IOException, ActionParseException { int zzInput; int zzAction; int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char[] zzBufferL = zzBuffer; char[] zzCMapL = ZZ_CMAP; int[] zzTransL = ZZ_TRANS; int[] zzRowMapL = ZZ_ROWMAP; int[] zzAttrL = ZZ_ATTRIBUTE; while (true)...
/** * Resumes scanning until the next regular expression is matched, * the end of input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs */
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs
yylex
{ "repo_name": "Jackkal/jpexs-decompiler", "path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java", "license": "gpl-3.0", "size": 116399 }
[ "com.jpexs.decompiler.flash.action.parser.ActionParseException" ]
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
import com.jpexs.decompiler.flash.action.parser.*;
[ "com.jpexs.decompiler" ]
com.jpexs.decompiler;
674,496
private final int getMax(List l, final int maxNumber) { int listSize = l.size(); if (listSize < maxNumber) { return listSize; } else { return maxNumber; } }
final int function(List l, final int maxNumber) { int listSize = l.size(); if (listSize < maxNumber) { return listSize; } else { return maxNumber; } }
/** * Returns the maximum between the supplied list's size or the maximum * amount of tags we are allowed to show * @param l list to check * @return */
Returns the maximum between the supplied list's size or the maximum amount of tags we are allowed to show
getMax
{ "repo_name": "SunLabsAST/AURA", "path": "WebMusicExplaura/src/java/com/sun/labs/aura/music/wsitm/server/DataManager.java", "license": "gpl-2.0", "size": 58070 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
397,993
public void setImageUrl(String url, ImageLoader imageLoader) { mPhoto.setImageUrl(url, imageLoader); }
void function(String url, ImageLoader imageLoader) { mPhoto.setImageUrl(url, imageLoader); }
/** * Set image url to be requested. Consider calling {@code resetColors()} first in case view was * used in a {@link android.widget.ListView}. * * @param url Image url. * @param imageLoader Image loader queue. */
Set image url to be requested. Consider calling resetColors() first in case view was used in a <code>android.widget.ListView</code>
setImageUrl
{ "repo_name": "ymow/soas", "path": "app/src/main/java/com/meg7/soas/ui/view/PhotoView.java", "license": "apache-2.0", "size": 4739 }
[ "com.android.volley.toolbox.ImageLoader" ]
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.*;
[ "com.android.volley" ]
com.android.volley;
2,526,829
void setSharedLibraryLinkFile(File sharedLibraryLinkFile); /** * {@inheritDoc}
void setSharedLibraryLinkFile(File sharedLibraryLinkFile); /** * {@inheritDoc}
/** * The shared library link file. */
The shared library link file
setSharedLibraryLinkFile
{ "repo_name": "gstevey/gradle", "path": "subprojects/platform-native/src/main/java/org/gradle/nativeplatform/SharedLibraryBinarySpec.java", "license": "apache-2.0", "size": 1681 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,588,198
public void consumeAsync(Purchase purchase, OnConsumeFinishedListener listener) { checkSetupDone("consume"); List<Purchase> purchases = new ArrayList<Purchase>(); purchases.add(purchase); consumeAsyncInternal(purchases, listener, null); }
void function(Purchase purchase, OnConsumeFinishedListener listener) { checkSetupDone(STR); List<Purchase> purchases = new ArrayList<Purchase>(); purchases.add(purchase); consumeAsyncInternal(purchases, listener, null); }
/** * Asynchronous wrapper to item consumption. Works like {@link #consume}, but * performs the consumption in the background and notifies completion through * the provided listener. This method is safe to call from a UI thread. * * @param purchase The purchase to be consumed. * @param lis...
Asynchronous wrapper to item consumption. Works like <code>#consume</code>, but performs the consumption in the background and notifies completion through the provided listener. This method is safe to call from a UI thread
consumeAsync
{ "repo_name": "onepf/OpenIAB", "path": "library/src/main/java/org/onepf/oms/appstore/googleUtils/IabHelper.java", "license": "apache-2.0", "size": 50654 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,767,467
public static void syncImmediately(Context context) { Bundle bundle = new Bundle(); bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true); bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true); ContentResolver.requestSync(getSyncAccount(context), contex...
static void function(Context context) { Bundle bundle = new Bundle(); bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true); bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true); ContentResolver.requestSync(getSyncAccount(context), context.getString(R.string.content_authority), bundle); }
/** * Helper method to have the sync adapter sync immediately * @param context The context used to access the account service */
Helper method to have the sync adapter sync immediately
syncImmediately
{ "repo_name": "koolkoda/Advanced_Android_Development", "path": "common/src/main/java/myudacityproject/com/common/sync/SunshineSyncAdapter.java", "license": "apache-2.0", "size": 28967 }
[ "android.content.ContentResolver", "android.content.Context", "android.os.Bundle" ]
import android.content.ContentResolver; import android.content.Context; import android.os.Bundle;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
2,727,299
@Test public void testImportMain() throws Exception { PrintStream oldPrintStream = System.err; SecurityManager SECURITY_MANAGER = System.getSecurityManager(); LauncherSecurityManager newSecurityManager = new LauncherSecurityManager(); System.setSecurityManager(newSecurityManager); ByteArra...
void function() throws Exception { PrintStream oldPrintStream = System.err; SecurityManager SECURITY_MANAGER = System.getSecurityManager(); LauncherSecurityManager newSecurityManager = new LauncherSecurityManager(); System.setSecurityManager(newSecurityManager); ByteArrayOutputStream data = new ByteArrayOutputStream();...
/** * test main method. Import should print help and call System.exit */
test main method. Import should print help and call System.exit
testImportMain
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestRowCounter.java", "license": "apache-2.0", "size": 10214 }
[ "java.io.ByteArrayOutputStream", "java.io.PrintStream", "org.apache.hadoop.hbase.util.LauncherSecurityManager", "org.junit.Assert" ]
import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.apache.hadoop.hbase.util.LauncherSecurityManager; import org.junit.Assert;
import java.io.*; import org.apache.hadoop.hbase.util.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
1,842,603
public IpAddressGroup withIpv4Addresses(List<CidrIpAddress> ipv4Addresses) { this.ipv4Addresses = ipv4Addresses; return this; }
IpAddressGroup function(List<CidrIpAddress> ipv4Addresses) { this.ipv4Addresses = ipv4Addresses; return this; }
/** * Set the ipv4Addresses property: The list of ip v4 addresses. * * @param ipv4Addresses the ipv4Addresses value to set. * @return the IpAddressGroup object itself. */
Set the ipv4Addresses property: The list of ip v4 addresses
withIpv4Addresses
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/IpAddressGroup.java", "license": "mit", "size": 3140 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,430,757
private boolean handleDraggedFiles(List<File> files, final int dropRow) { final List<String> fileNames = new ArrayList<>(); for (File file : files) { fileNames.add(file.getAbsolutePath()); } // Try to load BIB files normally, and import the rest into the current /...
boolean function(List<File> files, final int dropRow) { final List<String> fileNames = new ArrayList<>(); for (File file : files) { fileNames.add(file.getAbsolutePath()); } JabRefExecutorService.INSTANCE.execute(() -> { final ImportPdfFilesResult importRes = new PdfImporter(frame, panel, entryTable, dropRow) .importPdf...
/** * Handle a List containing File objects for a set of files to import. * * @param files A List containing File instances pointing to files. * @param dropRow @param dropRow The row in the table where the files were dragged. * @return success status for the operation */
Handle a List containing File objects for a set of files to import
handleDraggedFiles
{ "repo_name": "bartsch-dev/jabref", "path": "src/main/java/org/jabref/gui/groups/EntryTableTransferHandler.java", "license": "mit", "size": 14563 }
[ "java.io.File", "java.util.ArrayList", "java.util.List", "org.jabref.JabRefExecutorService", "org.jabref.pdfimport.PdfImporter" ]
import java.io.File; import java.util.ArrayList; import java.util.List; import org.jabref.JabRefExecutorService; import org.jabref.pdfimport.PdfImporter;
import java.io.*; import java.util.*; import org.jabref.*; import org.jabref.pdfimport.*;
[ "java.io", "java.util", "org.jabref", "org.jabref.pdfimport" ]
java.io; java.util; org.jabref; org.jabref.pdfimport;
1,319,955
public void shareVariablesWith( VariableSpace space ) { variables = space; }
void function( VariableSpace space ) { variables = space; }
/** * Shares a variable space from another variable space. This means that the object should take over the space used as * argument. * * @param space * the variable space * @see org.pentaho.di.core.variables.VariableSpace#shareVariablesWith(org.pentaho.di.core.variables.VariableSpace) */
Shares a variable space from another variable space. This means that the object should take over the space used as argument
shareVariablesWith
{ "repo_name": "gretchiemoran/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 194677 }
[ "org.pentaho.di.core.variables.VariableSpace" ]
import org.pentaho.di.core.variables.VariableSpace;
import org.pentaho.di.core.variables.*;
[ "org.pentaho.di" ]
org.pentaho.di;
602,841
private Host resolveHost(final Contentlet contentlet) { return Try .of(() -> Host.SYSTEM_HOST.equals(contentlet.getHost()) ? APILocator.getHostAPI().findDefaultHost(APILocator.systemUser(), false) : APILocator.getHostAPI().find(contentlet.getHost(), APILocator.systemUser(), false)) .ge...
Host function(final Contentlet contentlet) { return Try .of(() -> Host.SYSTEM_HOST.equals(contentlet.getHost()) ? APILocator.getHostAPI().findDefaultHost(APILocator.systemUser(), false) : APILocator.getHostAPI().find(contentlet.getHost(), APILocator.systemUser(), false)) .getOrElse(APILocator.systemHost()); }
/** * Best efforts to determine the HOST of the content * @param contentlet * @return */
Best efforts to determine the HOST of the content
resolveHost
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/dotmarketing/portlets/workflows/actionlet/SendFormEmailActionlet.java", "license": "gpl-3.0", "size": 9476 }
[ "com.dotmarketing.beans.Host", "com.dotmarketing.business.APILocator", "com.dotmarketing.portlets.contentlet.model.Contentlet", "io.vavr.control.Try" ]
import com.dotmarketing.beans.Host; import com.dotmarketing.business.APILocator; import com.dotmarketing.portlets.contentlet.model.Contentlet; import io.vavr.control.Try;
import com.dotmarketing.beans.*; import com.dotmarketing.business.*; import com.dotmarketing.portlets.contentlet.model.*; import io.vavr.control.*;
[ "com.dotmarketing.beans", "com.dotmarketing.business", "com.dotmarketing.portlets", "io.vavr.control" ]
com.dotmarketing.beans; com.dotmarketing.business; com.dotmarketing.portlets; io.vavr.control;
357,677
private void updateProperty(EMFStoreProperty property) { EMFStoreProperty prop = findProperty(property.getKey()); if (prop == null) { prop = createProperty(property.getKey(), property.getValue(), property.getVersion() != 0); prop.setType(EMFStorePropertyType.SHARED); projectSpace.getProperties().add(p...
void function(EMFStoreProperty property) { EMFStoreProperty prop = findProperty(property.getKey()); if (prop == null) { prop = createProperty(property.getKey(), property.getValue(), property.getVersion() != 0); prop.setType(EMFStorePropertyType.SHARED); projectSpace.getProperties().add(prop); } else { prop.setValue(pro...
/** * Updates a shared versioned property within the project space to the one * given, i.e. the name of the property is first used to look it up within * the project space. If found, the value and version attributes are * updated, otherwise the property will be created. * * @param property * t...
Updates a shared versioned property within the project space to the one given, i.e. the name of the property is first used to look it up within the project space. If found, the value and version attributes are updated, otherwise the property will be created
updateProperty
{ "repo_name": "edgarmueller/emfstore-rest", "path": "bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/properties/PropertyManager.java", "license": "epl-1.0", "size": 14870 }
[ "org.eclipse.emf.emfstore.internal.common.model.EMFStoreProperty", "org.eclipse.emf.emfstore.internal.common.model.EMFStorePropertyType" ]
import org.eclipse.emf.emfstore.internal.common.model.EMFStoreProperty; import org.eclipse.emf.emfstore.internal.common.model.EMFStorePropertyType;
import org.eclipse.emf.emfstore.internal.common.model.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,083,276
try { JAXBContext jaxbContext = JAXBContext.newInstance(DataXmlDTO.class); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); unmarshaller.unmarshal(inputStream); } catch (JAXBException e) { throw new RuntimeException(e); } }
try { JAXBContext jaxbContext = JAXBContext.newInstance(DataXmlDTO.class); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); unmarshaller.unmarshal(inputStream); } catch (JAXBException e) { throw new RuntimeException(e); } }
/** * Parses permissions and/or roles from XML. * * @param inputStream The input stream to read the XML from. */
Parses permissions and/or roles from XML
parseKimXml
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/rice/kim/impl/jaxb/KimXmlUtil.java", "license": "apache-2.0", "size": 2969 }
[ "javax.xml.bind.JAXBContext", "javax.xml.bind.JAXBException", "javax.xml.bind.Unmarshaller", "org.kuali.rice.core.impl.jaxb.DataXmlDTO" ]
import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import org.kuali.rice.core.impl.jaxb.DataXmlDTO;
import javax.xml.bind.*; import org.kuali.rice.core.impl.jaxb.*;
[ "javax.xml", "org.kuali.rice" ]
javax.xml; org.kuali.rice;
2,171,925
public void write(byte[] b) throws IOException { write(b, 0, b.length); }
void function(byte[] b) throws IOException { write(b, 0, b.length); }
/** * Writes <code>b.length</code> bytes from the specified byte array to this * output stream. The general contract for <code>write(b)</code> is that * it should have exactly the same effect as the call <code>write(b, 0, * b.length)</code>. * * @param b The bytes to be written. **/
Writes <code>b.length</code> bytes from the specified byte array to this output stream. The general contract for <code>write(b)</code> is that it should have exactly the same effect as the call <code>write(b, 0, b.length)</code>
write
{ "repo_name": "TeamCohen/MinorThird", "path": "src/main/java/LBJ2/io/HexOutputStream.java", "license": "bsd-3-clause", "size": 4130 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,556,003
ListenableFuture<ExecuteEntityIdsResponse> executeEntityIds( Context ctx, ExecuteEntityIdsRequest request) throws SQLException;
ListenableFuture<ExecuteEntityIdsResponse> executeEntityIds( Context ctx, ExecuteEntityIdsRequest request) throws SQLException;
/** * Sends a query with a set of entity IDs. * * <p>See the * <a href="https://github.com/youtube/vitess/blob/master/proto/vtgateservice.proto">proto</a> * definition for canonical documentation on this VTGate API. */
Sends a query with a set of entity IDs. See the proto definition for canonical documentation on this VTGate API
executeEntityIds
{ "repo_name": "danielmt/vshard", "path": "vendor/github.com/youtube/vitess/java/client/src/main/java/com/youtube/vitess/client/RpcClient.java", "license": "mit", "size": 9232 }
[ "com.google.common.util.concurrent.ListenableFuture", "com.youtube.vitess.proto.Vtgate", "java.sql.SQLException" ]
import com.google.common.util.concurrent.ListenableFuture; import com.youtube.vitess.proto.Vtgate; import java.sql.SQLException;
import com.google.common.util.concurrent.*; import com.youtube.vitess.proto.*; import java.sql.*;
[ "com.google.common", "com.youtube.vitess", "java.sql" ]
com.google.common; com.youtube.vitess; java.sql;
1,494,637
public void testDescendingGet_NullPointerException() { try { ConcurrentNavigableMap c = dmap5(); c.get(null); shouldThrow(); } catch (NullPointerException success) {} }
void function() { try { ConcurrentNavigableMap c = dmap5(); c.get(null); shouldThrow(); } catch (NullPointerException success) {} }
/** * get(null) of empty map throws NPE */
get(null) of empty map throws NPE
testDescendingGet_NullPointerException
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "jsr166-tests/src/test/java/jsr166/ConcurrentSkipListSubMapTest.java", "license": "gpl-2.0", "size": 42185 }
[ "java.util.concurrent.ConcurrentNavigableMap" ]
import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,605,827
@ObjectiveCName("completeWebActionWithHash:withUrl:") public Command<Boolean> completeWebAction(final String actionHash, final String url) { return modules.getExternalModule().completeWebAction(actionHash, url); } ////////////////////////////////////// // Raw api //////////...
@ObjectiveCName(STR) Command<Boolean> function(final String actionHash, final String url) { return modules.getExternalModule().completeWebAction(actionHash, url); }
/** * Command for completing web action * * @param actionHash web action name * @param url completion url * @return Command for execution */
Command for completing web action
completeWebAction
{ "repo_name": "EaglesoftZJ/actor-platform", "path": "actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java", "license": "agpl-3.0", "size": 86315 }
[ "com.google.j2objc.annotations.ObjectiveCName", "im.actor.core.viewmodel.Command" ]
import com.google.j2objc.annotations.ObjectiveCName; import im.actor.core.viewmodel.Command;
import com.google.j2objc.annotations.*; import im.actor.core.viewmodel.*;
[ "com.google.j2objc", "im.actor.core" ]
com.google.j2objc; im.actor.core;
1,247,423
@Test(expected = NotEnoughGasException.class) public void buyGas_NotEnough_ExpectedGasNotEnoughGasException() throws NotEnoughGasException, GasTooExpensiveException { // request double priceRequest = 1.60; double amountRequest = 100; //check gasStation.buyGas(GasType.SUPER, amountRequest, priceRequest...
@Test(expected = NotEnoughGasException.class) void function() throws NotEnoughGasException, GasTooExpensiveException { double priceRequest = 1.60; double amountRequest = 100; gasStation.buyGas(GasType.SUPER, amountRequest, priceRequest); gasStation.buyGas(GasType.SUPER, amountRequest, priceRequest); }
/** * Buy gas_ too expensive_ expected gas too expensive exception. * * @throws NotEnoughGasException * the not enough gas exception * @throws GasTooExpensiveException * the gas too expensive exception */
Buy gas_ too expensive_ expected gas too expensive exception
buyGas_NotEnough_ExpectedGasNotEnoughGasException
{ "repo_name": "mattiamascia/gasstation", "path": "src/test/java/net/bigpoint/assessment/gasstation/test/GasStationTest.java", "license": "apache-2.0", "size": 6592 }
[ "net.bigpoint.assessment.gasstation.GasType", "net.bigpoint.assessment.gasstation.exceptions.GasTooExpensiveException", "net.bigpoint.assessment.gasstation.exceptions.NotEnoughGasException", "org.junit.Test" ]
import net.bigpoint.assessment.gasstation.GasType; import net.bigpoint.assessment.gasstation.exceptions.GasTooExpensiveException; import net.bigpoint.assessment.gasstation.exceptions.NotEnoughGasException; import org.junit.Test;
import net.bigpoint.assessment.gasstation.*; import net.bigpoint.assessment.gasstation.exceptions.*; import org.junit.*;
[ "net.bigpoint.assessment", "org.junit" ]
net.bigpoint.assessment; org.junit;
88,203
public List<String> destinationPortRanges() { return this.destinationPortRanges; }
List<String> function() { return this.destinationPortRanges; }
/** * Get the destination port ranges. * * @return the destinationPortRanges value */
Get the destination port ranges
destinationPortRanges
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/SecurityRuleInner.java", "license": "mit", "size": 17798 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
542,879
public PropertyDescriptor[] getPropertyDescriptors() { try { Vector descriptors = new Vector(); PropertyDescriptor descriptor = null; try { descriptor = new PropertyDescriptor("selectedFont", com.l2fprod.common.swing.JFontChooser.class); } ...
PropertyDescriptor[] function() { try { Vector descriptors = new Vector(); PropertyDescriptor descriptor = null; try { descriptor = new PropertyDescriptor(STR, com.l2fprod.common.swing.JFontChooser.class); } catch (IntrospectionException e) { descriptor = new PropertyDescriptor(STR, com.l2fprod.common.swing.JFontChoose...
/** * Gets the Property Descriptors * * @return The propertyDescriptors value */
Gets the Property Descriptors
getPropertyDescriptors
{ "repo_name": "mstritt/orbit-image-analysis", "path": "src/main/java/com/l2fprod/common/swing/JFontChooserBeanInfo.java", "license": "gpl-3.0", "size": 5620 }
[ "java.beans.IntrospectionException", "java.beans.PropertyDescriptor", "java.util.Vector" ]
import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; import java.util.Vector;
import java.beans.*; import java.util.*;
[ "java.beans", "java.util" ]
java.beans; java.util;
706,309
public static void main(String[] args) throws Exception { //read in the file System.out.println("Reading prime numbers from file ..."); BufferedReader br = new BufferedReader(new InputStreamReader( Primes.class.getResourceAsStream("primes.txt"))); String line; long i = 5; List<Integer> primes = new ...
static void function(String[] args) throws Exception { System.out.println(STR); BufferedReader br = new BufferedReader(new InputStreamReader( Primes.class.getResourceAsStream(STR))); String line; long i = 5; List<Integer> primes = new ArrayList<Integer>(); while ((line = br.readLine()) != null) { if (line.isEmpty()) { ...
/** * This method has been used to calculate the array of prime numbers. * It reads in a file created by primegen-0.97 (http://cr.yp.to/primegen.html). * primegen uses the Sieve of Atkin and is hence quite fast. * The file should contain all prime numbers from 0..Integer.MAX_VALUE * @param args the program ar...
This method has been used to calculate the array of prime numbers. It reads in a file created by primegen-0.97 (HREF). primegen uses the Sieve of Atkin and is hence quite fast. The file should contain all prime numbers from 0..Integer.MAX_VALUE
main
{ "repo_name": "igd-geo/mongomvcc", "path": "src/main/java/de/fhg/igd/mongomvcc/helper/Primes.java", "license": "lgpl-3.0", "size": 5446 }
[ "java.io.BufferedReader", "java.io.InputStreamReader", "java.util.ArrayList", "java.util.List" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,958,491
public TagCompound toTag() { return new DefaultCompound(this.recipe.id(), Tag.UNKNOWN).create(Tags.RECIPE_UNLOCKED.create(this.unlocked), Tags.RECIPE_DISPLAYED.create(this.displayed)); }
TagCompound function() { return new DefaultCompound(this.recipe.id(), Tag.UNKNOWN).create(Tags.RECIPE_UNLOCKED.create(this.unlocked), Tags.RECIPE_DISPLAYED.create(this.displayed)); }
/** Converts this Player Recipe to a NBT Tag. * * @param container - The template for the container Tag. * @return The Compound container tag. */
Converts this Player Recipe to a NBT Tag
toTag
{ "repo_name": "Cubiccl/Command-Generator", "path": "src/fr/cubiccl/generator/gameobject/PlayerRecipe.java", "license": "gpl-3.0", "size": 3140 }
[ "fr.cubiccl.generator.gameobject.tags.Tag", "fr.cubiccl.generator.gameobject.tags.TagCompound", "fr.cubiccl.generator.gameobject.templatetags.Tags", "fr.cubiccl.generator.gameobject.templatetags.TemplateCompound" ]
import fr.cubiccl.generator.gameobject.tags.Tag; import fr.cubiccl.generator.gameobject.tags.TagCompound; import fr.cubiccl.generator.gameobject.templatetags.Tags; import fr.cubiccl.generator.gameobject.templatetags.TemplateCompound;
import fr.cubiccl.generator.gameobject.tags.*; import fr.cubiccl.generator.gameobject.templatetags.*;
[ "fr.cubiccl.generator" ]
fr.cubiccl.generator;
817,682
public Expression getSelectionCriteria() { return getSelectionQuery().getSelectionCriteria(); }
Expression function() { return getSelectionQuery().getSelectionCriteria(); }
/** * INTERNAL: * Returns the selection criteria stored in the mapping selection query. This criteria * is used to read reference objects from the database. It will return null before * initialization. To obtain the selection criteria before initialization (e.g., in a * customizer) you can us...
Returns the selection criteria stored in the mapping selection query. This criteria is used to read reference objects from the database. It will return null before initialization. To obtain the selection criteria before initialization (e.g., in a customizer) you can use the buildSelectionCriteria() method defined by so...
getSelectionCriteria
{ "repo_name": "gameduell/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/mappings/ForeignReferenceMapping.java", "license": "epl-1.0", "size": 115540 }
[ "org.eclipse.persistence.expressions.Expression" ]
import org.eclipse.persistence.expressions.Expression;
import org.eclipse.persistence.expressions.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
1,608,664