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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Preconditions.checkNotNull(win, "win was null");
this.wins.add(win);
} | Preconditions.checkNotNull(win, STR); this.wins.add(win); } | /**
* Adds a win to this player's wins. This should always be used to add a winning card.
*
* @param win BaseCard that won a point for this player
*/ | Adds a win to this player's wins. This should always be used to add a winning card | addWin | {
"repo_name": "RoyalDev/TheHumanity",
"path": "src/main/java/org/royaldev/thehumanity/player/TheHumanityPlayer.java",
"license": "gpl-3.0",
"size": 3883
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,893,304 |
@Override
public Container[] findChildren() {
synchronized (children) {
Container results[] = new Container[children.size()];
return children.values().toArray(results);
}
} | Container[] function() { synchronized (children) { Container results[] = new Container[children.size()]; return children.values().toArray(results); } } | /**
* Return the set of children Containers associated with this Container.
* If this Container has no children, a zero-length array is returned.
*/ | Return the set of children Containers associated with this Container. If this Container has no children, a zero-length array is returned | findChildren | {
"repo_name": "zzsoszz/codegen3",
"path": "opensource_embedtomcat/org/apache/catalina/core/ContainerBase.java",
"license": "apache-2.0",
"size": 44262
} | [
"org.apache.catalina.Container"
] | import org.apache.catalina.Container; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 915,480 |
private int findPrimeInRow(byte[] zeroMask, int row, IntFixedList sequence) {
final int start = row * cols;
final int end = start + cols;
for (int i = start; i < end; i++) {
if (zeroMask[i] == PRIME) {
sequence.add(i);
return i - start;
}
}
// Should not reach here.
... | int function(byte[] zeroMask, int row, IntFixedList sequence) { final int start = row * cols; final int end = start + cols; for (int i = start; i < end; i++) { if (zeroMask[i] == PRIME) { sequence.add(i); return i - start; } } throw new AssertionError(STR); } | /**
* Find the primed zero (0') in the row and add it to the sequence.
*
* @param zeroMask the zero mask
* @param row the row
* @param sequence the sequence
* @return the column
*/ | Find the primed zero (0') in the row and add it to the sequence | findPrimeInRow | {
"repo_name": "aherbert/GDSC-Core",
"path": "src/main/java/uk/ac/sussex/gdsc/core/match/KuhnMunkresAssignment.java",
"license": "gpl-3.0",
"size": 19002
} | [
"uk.ac.sussex.gdsc.core.utils.IntFixedList"
] | import uk.ac.sussex.gdsc.core.utils.IntFixedList; | import uk.ac.sussex.gdsc.core.utils.*; | [
"uk.ac.sussex"
] | uk.ac.sussex; | 2,468,332 |
public static void linkToActiveTIM(String filePath)
{
try
{
// Create the link
AddCodeElementAction act = AddCodeElementAction.getInstance();
act.createLink(new File(filePath));
}
catch (IllegalArgumentException e)
{
EclipsePlatformUtils.showErrorMessage("Error", "No item is selected to link!"... | static void function(String filePath) { try { AddCodeElementAction act = AddCodeElementAction.getInstance(); act.createLink(new File(filePath)); } catch (IllegalArgumentException e) { EclipsePlatformUtils.showErrorMessage("Error", STR); } catch (NullPointerException e) { EclipsePlatformUtils.showErrorMessage("Error", S... | /*******************************************************
* Links the CompilationUnit whose absolute file path is given to the
* currently active element in the currently active TIM. It will handle all the
* exceptions (if any) and report errors as error dialogs.
*
* @param filePath
* The absolut... | Links the CompilationUnit whose absolute file path is given to the currently active element in the currently active TIM. It will handle all the exceptions (if any) and report errors as error dialogs | linkToActiveTIM | {
"repo_name": "SoftwareEngineeringToolDemos/FSE-2014-Archie-Smart-IDE",
"path": "src/archie/timstorage/LinkToTim.java",
"license": "lgpl-3.0",
"size": 1933
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,156,380 |
public File save(DataSet dataset, File saveDirectory) throws IOException,
XMLStreamException {
String filename = createFileName(dataset);
logger.debug("save to " + filename + " in " + saveDirectory.toString());
saveDirectory.mkdirs();
File outFile = new File(saveDirectory... | File function(DataSet dataset, File saveDirectory) throws IOException, XMLStreamException { String filename = createFileName(dataset); logger.debug(STR + filename + STR + saveDirectory.toString()); saveDirectory.mkdirs(); File outFile = new File(saveDirectory, filename); createFile(dataset, saveDirectory, outFile); log... | /**
* Saves the given dataset to an xml file in the given directory. The file
* is returned.
*/ | Saves the given dataset to an xml file in the given directory. The file is returned | save | {
"repo_name": "crotwell/fissuresUtil",
"path": "src/main/java/edu/sc/seis/fissuresUtil/xml/DataSetToXMLStAX.java",
"license": "gpl-2.0",
"size": 8287
} | [
"java.io.File",
"java.io.IOException",
"javax.xml.stream.XMLStreamException"
] | import java.io.File; import java.io.IOException; import javax.xml.stream.XMLStreamException; | import java.io.*; import javax.xml.stream.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 1,987,522 |
Assert.fail( "Test 'StaffService_getAccountsTest.testSuccessPath()}' not implemented." );
}
| Assert.fail( STR ); } | /**
* Test succes path for service method <code>getAccounts</code>
*
* Tests expected behaviour of service method.
*/ | Test succes path for service method <code>getAccounts</code> Tests expected behaviour of service method | testSuccessPath | {
"repo_name": "phoenixctms/ctsms",
"path": "core/src/test/java/org/phoenixctms/ctsms/service/staff/test/StaffService_getAccountsTest.java",
"license": "lgpl-2.1",
"size": 1264
} | [
"org.testng.Assert"
] | import org.testng.Assert; | import org.testng.*; | [
"org.testng"
] | org.testng; | 2,552,540 |
Specification createSpecification(Specification specification, String identifier) throws GreenPepperServerException; | Specification createSpecification(Specification specification, String identifier) throws GreenPepperServerException; | /**
* Creates the Specification
* <p/>
*
* @param specification a {@link com.greenpepper.server.domain.Specification} object.
* @param identifier a {@link java.lang.String} object.
* @return the new Specification
* @throws com.greenpepper.server.GreenPepperServerException if any.
... | Creates the Specification | createSpecification | {
"repo_name": "strator-dev/greenpepper",
"path": "greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/rpc/RpcClientService.java",
"license": "apache-2.0",
"size": 23525
} | [
"com.greenpepper.server.GreenPepperServerException",
"com.greenpepper.server.domain.Specification"
] | import com.greenpepper.server.GreenPepperServerException; import com.greenpepper.server.domain.Specification; | import com.greenpepper.server.*; import com.greenpepper.server.domain.*; | [
"com.greenpepper.server"
] | com.greenpepper.server; | 215,763 |
public void setKsPackages(Set<KickstartPackage> p) {
this.ksPackages = p;
} | void function(Set<KickstartPackage> p) { this.ksPackages = p; } | /**
* Setter for ksPackages
* @param p The KickstartPackage set to set.
*/ | Setter for ksPackages | setKsPackages | {
"repo_name": "renner/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java",
"license": "gpl-2.0",
"size": 48300
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,804,503 |
private ClassLoader getDataSourceClassLoader(ConditionContext context) {
Class<?> dataSourceClass = new DataSourceBuilder(context.getClassLoader())
.findType();
return (dataSourceClass == null ? null : dataSourceClass.getClassLoader());
}
}
static class EmbeddedDatabaseCondition extends SpringBoo... | ClassLoader function(ConditionContext context) { Class<?> dataSourceClass = new DataSourceBuilder(context.getClassLoader()) .findType(); return (dataSourceClass == null ? null : dataSourceClass.getClassLoader()); } } static class EmbeddedDatabaseCondition extends SpringBootCondition { private final SpringBootCondition ... | /**
* Returns the class loader for the {@link DataSource} class. Used to ensure that
* the driver class can actually be loaded by the data source.
* @param context the condition context
* @return the class loader
*/ | Returns the class loader for the <code>DataSource</code> class. Used to ensure that the driver class can actually be loaded by the data source | getDataSourceClassLoader | {
"repo_name": "herau/spring-boot",
"path": "spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration.java",
"license": "apache-2.0",
"size": 8132
} | [
"org.springframework.boot.autoconfigure.condition.SpringBootCondition",
"org.springframework.context.annotation.ConditionContext"
] | import org.springframework.boot.autoconfigure.condition.SpringBootCondition; import org.springframework.context.annotation.ConditionContext; | import org.springframework.boot.autoconfigure.condition.*; import org.springframework.context.annotation.*; | [
"org.springframework.boot",
"org.springframework.context"
] | org.springframework.boot; org.springframework.context; | 1,069,024 |
public Point2D getPoint2D(Point2D srcPt, Point2D dstPt); | Point2D function(Point2D srcPt, Point2D dstPt); | /**
* Returns the location of the corresponding destination point given a
* point in the source image. If <CODE>dstPt</CODE> is specified, it
* is used to hold the return value.
* @param srcPt the <code>Point2D</code> that represents the point in
* the source image
* @param dstPt The <COD... | Returns the location of the corresponding destination point given a point in the source image. If <code>dstPt</code> is specified, it is used to hold the return value | getPoint2D | {
"repo_name": "wangsongpeng/jdk-src",
"path": "src/main/java/java/awt/image/BufferedImageOp.java",
"license": "apache-2.0",
"size": 4631
} | [
"java.awt.geom.Point2D"
] | import java.awt.geom.Point2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,031,677 |
protected void updateState(SessionState state, HttpServletRequest req, HttpServletResponse res)
{
}
protected static final String ALERT_ATTR = "sakai.alert"; | void function(SessionState state, HttpServletRequest req, HttpServletResponse res) { } protected static final String ALERT_ATTR = STR; | /**
* Update for this request processing the session state. If overridden in a sub-class, make sure to call super.
*
* @param state
* The session state.
* @param req
* The current request.
* @param res
* The current response.
*/ | Update for this request processing the session state. If overridden in a sub-class, make sure to call super | updateState | {
"repo_name": "OpenCollabZA/sakai",
"path": "velocity/tool/src/java/org/sakaiproject/cheftool/ToolServlet.java",
"license": "apache-2.0",
"size": 22169
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.sakaiproject.event.api.SessionState"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.sakaiproject.event.api.SessionState; | import javax.servlet.http.*; import org.sakaiproject.event.api.*; | [
"javax.servlet",
"org.sakaiproject.event"
] | javax.servlet; org.sakaiproject.event; | 1,050,373 |
public static <E> boolean exists(List<? extends E> list,
Predicate1<E> predicate) {
for (E e : list) {
if (predicate.apply(e)) {
return true;
}
}
return false;
} | static <E> boolean function(List<? extends E> list, Predicate1<E> predicate) { for (E e : list) { if (predicate.apply(e)) { return true; } } return false; } | /** Returns whether there is an element in {@code list} for which
* {@code predicate} is true. */ | Returns whether there is an element in list for which | exists | {
"repo_name": "devth/calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/function/Functions.java",
"license": "apache-2.0",
"size": 17714
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 203,001 |
private ContentHostingService contentHostingService;
public void setContentHostingService(ContentHostingService service)
{
contentHostingService = service;
}
| ContentHostingService contentHostingService; public void function(ContentHostingService service) { contentHostingService = service; } | /**
* Dependency: contentHostingService.
*
* @param service
* The NotificationService.
*/ | Dependency: contentHostingService | setContentHostingService | {
"repo_name": "harfalm/Sakai-10.1",
"path": "announcement/announcement-impl/impl/src/java/org/sakaiproject/announcement/impl/BaseAnnouncementService.java",
"license": "apache-2.0",
"size": 63688
} | [
"org.sakaiproject.content.api.ContentHostingService"
] | import org.sakaiproject.content.api.ContentHostingService; | import org.sakaiproject.content.api.*; | [
"org.sakaiproject.content"
] | org.sakaiproject.content; | 2,664,761 |
@SuppressWarnings("unchecked")
void initExisting() throws IOException {
LOG.info("Initializing Existing Jobs...");
List<FileStatus> timestampedDirList = findTimestampedDirectories();
// Sort first just so insertion is in a consistent order
Collections.sort(timestampedDirList);
for (FileStatus fs... | @SuppressWarnings(STR) void initExisting() throws IOException { LOG.info(STR); List<FileStatus> timestampedDirList = findTimestampedDirectories(); Collections.sort(timestampedDirList); for (FileStatus fs : timestampedDirList) { addDirectoryToSerialNumberIndex(fs.getPath()); } for (int i= timestampedDirList.size() - 1; ... | /**
* Populates index data structures. Should only be called at initialization
* times.
*/ | Populates index data structures. Should only be called at initialization times | initExisting | {
"repo_name": "an3m0na/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java",
"license": "apache-2.0",
"size": 38386
} | [
"java.io.IOException",
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.fs.FileStatus"
] | import java.io.IOException; import java.util.Collections; import java.util.List; import org.apache.hadoop.fs.FileStatus; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,373,756 |
public Set<VarType<?>> getTypeVariables(); | Set<VarType<?>> function(); | /**
* Returns the type variables local to the type.
*/ | Returns the type variables local to the type | getTypeVariables | {
"repo_name": "baratine/baratine",
"path": "framework/src/main/java/com/caucho/v5/config/reflect/BaseTypeAnnotated.java",
"license": "gpl-2.0",
"size": 1701
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,597,220 |
void openExtendedPlayerInventory(AbstractPlayerEntity player, IInventory inventory, int containerWidth, Consumer<IInventory> onClosed, ItemContainer.ISlotCallback slotCallback); | void openExtendedPlayerInventory(AbstractPlayerEntity player, IInventory inventory, int containerWidth, Consumer<IInventory> onClosed, ItemContainer.ISlotCallback slotCallback); | /**
* Opens the player inventory with an additional inventory on the top.
* @param player The player opening the container.
* @param inventory The extra inventory.
* @param containerWidth The amount of slots horizontally before wrapping to next line.
* @param onClosed The action to take when th... | Opens the player inventory with an additional inventory on the top | openExtendedPlayerInventory | {
"repo_name": "RockBottomGame/API",
"path": "src/main/java/de/ellpeck/rockbottom/api/IApiHandler.java",
"license": "lgpl-3.0",
"size": 12621
} | [
"de.ellpeck.rockbottom.api.entity.player.AbstractPlayerEntity",
"de.ellpeck.rockbottom.api.gui.container.ItemContainer",
"de.ellpeck.rockbottom.api.inventory.IInventory",
"java.util.function.Consumer"
] | import de.ellpeck.rockbottom.api.entity.player.AbstractPlayerEntity; import de.ellpeck.rockbottom.api.gui.container.ItemContainer; import de.ellpeck.rockbottom.api.inventory.IInventory; import java.util.function.Consumer; | import de.ellpeck.rockbottom.api.entity.player.*; import de.ellpeck.rockbottom.api.gui.container.*; import de.ellpeck.rockbottom.api.inventory.*; import java.util.function.*; | [
"de.ellpeck.rockbottom",
"java.util"
] | de.ellpeck.rockbottom; java.util; | 2,743,963 |
void addAllSupportedHostFeature(Guid hostId, Set<String> features); | void addAllSupportedHostFeature(Guid hostId, Set<String> features); | /**
* Add all the given features to the supported_host_features table.
*/ | Add all the given features to the supported_host_features table | addAllSupportedHostFeature | {
"repo_name": "OpenUniversity/ovirt-engine",
"path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/SupportedHostFeatureDao.java",
"license": "apache-2.0",
"size": 775
} | [
"java.util.Set",
"org.ovirt.engine.core.compat.Guid"
] | import java.util.Set; import org.ovirt.engine.core.compat.Guid; | import java.util.*; import org.ovirt.engine.core.compat.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 1,510,503 |
public void setAdditionalInfos(List<String> additionalInfos) {
this.additionalInfos = additionalInfos;
}
| void function(List<String> additionalInfos) { this.additionalInfos = additionalInfos; } | /**
* Sets the list of additionalInfos two structure elements must
* both have or not have in order to have a non zero similarity
*
* @param additionalInfos the additionalInfos to set
*/ | Sets the list of additionalInfos two structure elements must both have or not have in order to have a non zero similarity | setAdditionalInfos | {
"repo_name": "SAG-KeLP/kelp-additional-kernels",
"path": "src/main/java/it/uniroma2/sag/kelp/data/representation/structure/similarity/SameAdditionalInfoStructureElementSimilarity.java",
"license": "apache-2.0",
"size": 3338
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,121,356 |
public void write(JobProcessing job_processing, byte[] pes_packet, int pes_packetoffset, int pes_payloadlength, boolean pes_hasHeader)
{
boolean pes_isAligned = false;
int pes_extensionlength = 0;
int offset = pes_packetoffset;
int _es_streamtype = CommonParsing.AC3_AUDIO;
pack++;
if (pes_hasHeader)
... | void function(JobProcessing job_processing, byte[] pes_packet, int pes_packetoffset, int pes_payloadlength, boolean pes_hasHeader) { boolean pes_isAligned = false; int pes_extensionlength = 0; int offset = pes_packetoffset; int _es_streamtype = CommonParsing.AC3_AUDIO; pack++; if (pes_hasHeader) { if (CommonParsing.val... | /**
* process nonvideo data = 1 pespacket from demux
*/ | process nonvideo data = 1 pespacket from demux | write | {
"repo_name": "vladimir-zahradnik/Project-X",
"path": "src/sk/vzahradn/dvb/projectx/parser/StreamDemultiplexer.java",
"license": "gpl-2.0",
"size": 38394
} | [
"java.io.IOException",
"sk.vzahradn.dvb.projectx.common.Common",
"sk.vzahradn.dvb.projectx.common.JobProcessing",
"sk.vzahradn.dvb.projectx.common.Resource"
] | import java.io.IOException; import sk.vzahradn.dvb.projectx.common.Common; import sk.vzahradn.dvb.projectx.common.JobProcessing; import sk.vzahradn.dvb.projectx.common.Resource; | import java.io.*; import sk.vzahradn.dvb.projectx.common.*; | [
"java.io",
"sk.vzahradn.dvb"
] | java.io; sk.vzahradn.dvb; | 197,230 |
public synchronized void clear(Object key) {
Stack stack = (Stack)(_pools.remove(key));
destroyStack(key,stack);
} | synchronized void function(Object key) { Stack stack = (Stack)(_pools.remove(key)); destroyStack(key,stack); } | /**
* Clears the specified pool, removing all pooled instances corresponding to the given <code>key</code>.
*
* @param key the key to clear
*/ | Clears the specified pool, removing all pooled instances corresponding to the given <code>key</code> | clear | {
"repo_name": "ZJU-Shaonian-Biancheng-Tuan/bbossgroups-3.5",
"path": "bboss-persistent/src-jdk6/com/frameworkset/commons/pool/impl/StackKeyedObjectPool.java",
"license": "apache-2.0",
"size": 18090
} | [
"java.util.Stack"
] | import java.util.Stack; | import java.util.*; | [
"java.util"
] | java.util; | 2,197,644 |
EList<IfcFaceBound> getBounds(); | EList<IfcFaceBound> getBounds(); | /**
* Returns the value of the '<em><b>Bounds</b></em>' reference list.
* The list contents are of type {@link cn.dlb.bim.models.ifc2x3tc1.IfcFaceBound}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Bounds</em>' reference list isn't clear,
* there really should be more of a description here.... | Returns the value of the 'Bounds' reference list. The list contents are of type <code>cn.dlb.bim.models.ifc2x3tc1.IfcFaceBound</code>. If the meaning of the 'Bounds' reference list isn't clear, there really should be more of a description here... | getBounds | {
"repo_name": "shenan4321/BIMplatform",
"path": "generated/cn/dlb/bim/models/ifc2x3tc1/IfcFace.java",
"license": "agpl-3.0",
"size": 1827
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,939,982 |
public EpollServerChannelConfig setTcpFastopen(int pendingFastOpenRequestsThreshold) {
checkPositiveOrZero(this.pendingFastOpenRequestsThreshold, "pendingFastOpenRequestsThreshold");
this.pendingFastOpenRequestsThreshold = pendingFastOpenRequestsThreshold;
return this;
} | EpollServerChannelConfig function(int pendingFastOpenRequestsThreshold) { checkPositiveOrZero(this.pendingFastOpenRequestsThreshold, STR); this.pendingFastOpenRequestsThreshold = pendingFastOpenRequestsThreshold; return this; } | /**
* Enables tcpFastOpen on the server channel. If the underlying os doesn't support TCP_FASTOPEN setting this has no
* effect. This has to be set before doing listen on the socket otherwise this takes no effect.
*
* @param pendingFastOpenRequestsThreshold number of requests to be pending for fasto... | Enables tcpFastOpen on the server channel. If the underlying os doesn't support TCP_FASTOPEN setting this has no effect. This has to be set before doing listen on the socket otherwise this takes no effect | setTcpFastopen | {
"repo_name": "netty/netty",
"path": "transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollServerChannelConfig.java",
"license": "apache-2.0",
"size": 7731
} | [
"io.netty.util.internal.ObjectUtil"
] | import io.netty.util.internal.ObjectUtil; | import io.netty.util.internal.*; | [
"io.netty.util"
] | io.netty.util; | 2,794,356 |
public ResourceBundle getNumberFormatData(Locale locale) {
return getBundle(type.getTextResourcesPackage() + ".FormatData", locale);
} | ResourceBundle function(Locale locale) { return getBundle(type.getTextResourcesPackage() + STR, locale); } | /**
* Gets a number format data resource bundle, using privileges
* to allow accessing a sun.* package.
*/ | Gets a number format data resource bundle, using privileges to allow accessing a sun.* package | getNumberFormatData | {
"repo_name": "JetBrains/jdk8u_jdk",
"path": "src/share/classes/sun/util/resources/LocaleData.java",
"license": "gpl-2.0",
"size": 12224
} | [
"java.util.Locale",
"java.util.ResourceBundle"
] | import java.util.Locale; import java.util.ResourceBundle; | import java.util.*; | [
"java.util"
] | java.util; | 1,972,872 |
public Boolean insertDrugBatch(TrnDrugsSupplied b,int drugSrNo,int drugQty,int qty)
{
Boolean status = false;
try
{
tx = session.beginTransaction();
MstDrugsNew drug = (MstDrugsNew) session.get(MstDrugsNew.class,drugSrNo);
drug.setdQty(drugQty + qty);
sess... | Boolean function(TrnDrugsSupplied b,int drugSrNo,int drugQty,int qty) { Boolean status = false; try { tx = session.beginTransaction(); MstDrugsNew drug = (MstDrugsNew) session.get(MstDrugsNew.class,drugSrNo); drug.setdQty(drugQty + qty); session.update(drug); session.save(b); status = true; tx.commit(); } catch(Hiberna... | /**
* Inserts a new batch of a particular drug
* @author Vishwa
* @param b
* @param drugSrNo
* @param drugQty
* @param qty
* @return
*/ | Inserts a new batch of a particular drug | insertDrugBatch | {
"repo_name": "SLIIT-FacultyOfComputing/Digital-Pulz-for-Hospitals",
"path": "HIS_Latest_Project_29-07-2016/Backend/NewWorkspace_2016/HIS_API/src/main/java/lib/driver/pharmacy/driver_class/DrugDBDriver.java",
"license": "apache-2.0",
"size": 36328
} | [
"org.hibernate.HibernateException"
] | import org.hibernate.HibernateException; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 1,113,414 |
public void setEventsRestClient(EventsRestClient eventsRestClient) {
mEventsRestClient = eventsRestClient;
} | void function(EventsRestClient eventsRestClient) { mEventsRestClient = eventsRestClient; } | /**
* Update the events Rest client.
*
* @param eventsRestClient the events client
*/ | Update the events Rest client | setEventsRestClient | {
"repo_name": "matrix-org/matrix-android-sdk",
"path": "matrix-sdk/src/main/java/org/matrix/androidsdk/MXDataHandler.java",
"license": "apache-2.0",
"size": 79460
} | [
"org.matrix.androidsdk.rest.client.EventsRestClient"
] | import org.matrix.androidsdk.rest.client.EventsRestClient; | import org.matrix.androidsdk.rest.client.*; | [
"org.matrix.androidsdk"
] | org.matrix.androidsdk; | 753,551 |
private void loadLexerRules(String lexersFilename) {
LexiconUnmarshaller unmarshaller = new LexiconUnmarshaller();
Corpus corpus = unmarshaller.unmarshal(lexersFilename);
ArrayList<LexerRule> ruleList = new ArrayList<LexerRule>();
List<W> lexers = corpus.getBody().getW();
for (W w : lexers) {
LexerRule ... | void function(String lexersFilename) { LexiconUnmarshaller unmarshaller = new LexiconUnmarshaller(); Corpus corpus = unmarshaller.unmarshal(lexersFilename); ArrayList<LexerRule> ruleList = new ArrayList<LexerRule>(); List<W> lexers = corpus.getBody().getW(); for (W w : lexers) { LexerRule lr = new LexerRule(w.getMsd(),... | /**
* Load lexer specification file. This text file contains lexical rules to
* tokenize a text
*
* @param lexersFilename
* specification file
*/ | Load lexer specification file. This text file contains lexical rules to tokenize a text | loadLexerRules | {
"repo_name": "heartsmile/VietSemtimentDemo2",
"path": "VietSentiment/src/main/java/vn/hus/nlp/tokenizer/Tokenizer.java",
"license": "gpl-2.0",
"size": 17449
} | [
"java.util.ArrayList",
"java.util.List",
"vn.hus.nlp.lexicon.LexiconUnmarshaller",
"vn.hus.nlp.lexicon.jaxb.Corpus",
"vn.hus.nlp.tokenizer.tokens.LexerRule"
] | import java.util.ArrayList; import java.util.List; import vn.hus.nlp.lexicon.LexiconUnmarshaller; import vn.hus.nlp.lexicon.jaxb.Corpus; import vn.hus.nlp.tokenizer.tokens.LexerRule; | import java.util.*; import vn.hus.nlp.lexicon.*; import vn.hus.nlp.lexicon.jaxb.*; import vn.hus.nlp.tokenizer.tokens.*; | [
"java.util",
"vn.hus.nlp"
] | java.util; vn.hus.nlp; | 1,299,488 |
protected void computeLayout(int w, int h) {
mLayout.prepareLayout();
if (shouldRecalculateScrollWhenComputingLayout) {
computeViewPort(mLayout);
}
Map<Object, FreeFlowItem> oldFrames = frames;
frames = new LinkedHashMap<Object, FreeFlowItem>();
copyFrames(mLayout.getItemProxies(viewPortX, viewPortY)... | void function(int w, int h) { mLayout.prepareLayout(); if (shouldRecalculateScrollWhenComputingLayout) { computeViewPort(mLayout); } Map<Object, FreeFlowItem> oldFrames = frames; frames = new LinkedHashMap<Object, FreeFlowItem>(); copyFrames(mLayout.getItemProxies(viewPortX, viewPortY), frames); dispatchLayoutComputed(... | /**
* The heart of the system. Calls the layout to get the frames needed,
* decides which view should be kept in focus if view transitions are going
* to happen and then kicks off animation changes if things have changed
*
* @param w
* Width of the viewport. Since right now we don't support
* ... | The heart of the system. Calls the layout to get the frames needed, decides which view should be kept in focus if view transitions are going to happen and then kicks off animation changes if things have changed | computeLayout | {
"repo_name": "predator11/FreeFlow-2-",
"path": "FreeFlow/src/com/comcast/freeflow/core/FreeFlowContainer.java",
"license": "apache-2.0",
"size": 52657
} | [
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,630,103 |
public boolean isPreciousMetal()
{
return false;
}
/**
* Get the {@link Currency} instance that corresponds to
* this currency code.
*
* <p>
* This method is an alias of {@link Currency}{@code .}{@link
* Currency#getInstance(String) getInstance}{@code (this.name()... | boolean function() { return false; } /** * Get the {@link Currency} instance that corresponds to * this currency code. * * <p> * This method is an alias of {@link Currency}{@code .}{ * Currency#getInstance(String) getInstance}{@code (this.name())}. * The only difference is that this method returns {@code null} | /**
* Check if this currency code represents a precious metal.
*
* <p>
* {@code CurrencyCode} instances listed below return {@code true}.
* </p>
*
* <ul>
* <li>{@link #XAG} Silver
* <li>{@link #XAU} Gold
* <li>{@link #XPD} Palladium
* <li>{@link #XPT} Platinum
... | Check if this currency code represents a precious metal. CurrencyCode instances listed below return true. <code>#XAG</code> Silver <code>#XAU</code> Gold <code>#XPD</code> Palladium <code>#XPT</code> Platinum | isPreciousMetal | {
"repo_name": "TakahikoKawasaki/nv-i18n",
"path": "src/main/java/com/neovisionaries/i18n/CurrencyCode.java",
"license": "apache-2.0",
"size": 79951
} | [
"java.util.Currency"
] | import java.util.Currency; | import java.util.*; | [
"java.util"
] | java.util; | 226,170 |
@Description(
"The Compute Engine zone "
+ "(https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which worker "
+ "processing should occur, e.g. \"us-west1-a\". Mutually exclusive with workerRegion. "
+ "If neither workerRegion nor workerZone is specified, the Dat... | @Description( STR + STRprocessing should occur, e.g. \STR. Mutually exclusive with workerRegion. STRIf neither workerRegion nor workerZone is specified, the Dataflow service will choose STRa zone in region based on available capacity.") String getWorkerZone(); | /**
* The Compute Engine zone (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
* which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with {@link
* #getWorkerRegion()}. If neither workerRegion nor workerZone is specified, the Dataflow service
* will choose a zone... | The Compute Engine zone (HREF) in which worker processing should occur, e.g. "us-west1-a". Mutually exclusive with <code>#getWorkerRegion()</code>. If neither workerRegion nor workerZone is specified, the Dataflow service will choose a zone in region based on available capacity | getWorkerZone | {
"repo_name": "RyanSkraba/beam",
"path": "sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/options/GcpOptions.java",
"license": "apache-2.0",
"size": 20182
} | [
"org.apache.beam.sdk.options.Description"
] | import org.apache.beam.sdk.options.Description; | import org.apache.beam.sdk.options.*; | [
"org.apache.beam"
] | org.apache.beam; | 2,788,590 |
public static void invokeAndWait(final Runnable runnable) {
if(runnable != null) {
try {
SwingUtilities.invokeAndWait(runnable);
} catch(final InvocationTargetException | InterruptedException e) {
// Do nothing.
}
}
}
| static void function(final Runnable runnable) { if(runnable != null) { try { SwingUtilities.invokeAndWait(runnable); } catch(final InvocationTargetException InterruptedException e) { } } } | /**
* Invokes {@code runnable} in the Event Dispatch Thread and waits for its execution to complete.
* <p>
* This method is similar to the one provided by {@code SwingUtilities}. But it differs in that you don't have to catch its checked {@code Exception}s. It simply ignores them.
* <p>
* If {@code runnable} ... | Invokes runnable in the Event Dispatch Thread and waits for its execution to complete. This method is similar to the one provided by SwingUtilities. But it differs in that you don't have to catch its checked Exceptions. It simply ignores them. If runnable is null, nothing will happen | invokeAndWait | {
"repo_name": "macroing/OpenRC",
"path": "src/main/java/org/macroing/gdt/openrc/swing/SwingUtilities2.java",
"license": "lgpl-3.0",
"size": 5268
} | [
"java.lang.reflect.InvocationTargetException",
"javax.swing.SwingUtilities"
] | import java.lang.reflect.InvocationTargetException; import javax.swing.SwingUtilities; | import java.lang.reflect.*; import javax.swing.*; | [
"java.lang",
"javax.swing"
] | java.lang; javax.swing; | 2,238,467 |
public List<SubResource> httpListeners() {
return this.httpListeners;
} | List<SubResource> function() { return this.httpListeners; } | /**
* Get a collection of references to application gateway http listeners.
*
* @return the httpListeners value
*/ | Get a collection of references to application gateway http listeners | httpListeners | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/WebApplicationFirewallPolicyInner.java",
"license": "mit",
"size": 7002
} | [
"com.microsoft.azure.SubResource",
"java.util.List"
] | import com.microsoft.azure.SubResource; import java.util.List; | import com.microsoft.azure.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 1,493,812 |
protected Comparator<?> getInitialBeanSortComparator() {
if (initialBeanSortComparator == NO_COMPARATOR) {
DeprPmTableCfg tableCfg = AnnotationUtil.findAnnotation(this, DeprPmTableCfg.class);
initialBeanSortComparator = (tableCfg != null && tableCfg.initialBeanSortComparator() != Comparator.class)
... | Comparator<?> function() { if (initialBeanSortComparator == NO_COMPARATOR) { DeprPmTableCfg tableCfg = AnnotationUtil.findAnnotation(this, DeprPmTableCfg.class); initialBeanSortComparator = (tableCfg != null && tableCfg.initialBeanSortComparator() != Comparator.class) ? (Comparator<?>) ClassUtil.newInstance(tableCfg.in... | /**
* Defines a bean comparator that provides the initial table sort order.
* <p>
* The default implementation provides the comparator defined in {@link DeprPmTableCfg#initialBeanSortComparator()}.
*
* @return The bean sort comparator. May be <code>null</code>.
*/ | Defines a bean comparator that provides the initial table sort order. The default implementation provides the comparator defined in <code>DeprPmTableCfg#initialBeanSortComparator()</code> | getInitialBeanSortComparator | {
"repo_name": "pm4j/org.pm4j",
"path": "pm4j-deprecated/src/main/java/org/pm4j/deprecated/core/pm/impl/DeprPmTableImpl.java",
"license": "bsd-2-clause",
"size": 27288
} | [
"java.util.Comparator",
"org.pm4j.common.util.reflection.ClassUtil",
"org.pm4j.core.pm.impl.AnnotationUtil",
"org.pm4j.deprecated.core.pm.annotation.DeprPmTableCfg"
] | import java.util.Comparator; import org.pm4j.common.util.reflection.ClassUtil; import org.pm4j.core.pm.impl.AnnotationUtil; import org.pm4j.deprecated.core.pm.annotation.DeprPmTableCfg; | import java.util.*; import org.pm4j.common.util.reflection.*; import org.pm4j.core.pm.impl.*; import org.pm4j.deprecated.core.pm.annotation.*; | [
"java.util",
"org.pm4j.common",
"org.pm4j.core",
"org.pm4j.deprecated"
] | java.util; org.pm4j.common; org.pm4j.core; org.pm4j.deprecated; | 2,744,674 |
protected int nextInContent() throws IOException, XMLException {
switch (current) {
case -1:
return LexicalUnits.EOF;
case '&':
return readReference();
case '<':
switch (nextChar()) {
case '?':
context = PI_CONTEXT;
... | int function() throws IOException, XMLException { switch (current) { case -1: return LexicalUnits.EOF; case '&': return readReference(); case '<': switch (nextChar()) { case '?': context = PI_CONTEXT; return readPIStart(); case '!': switch (nextChar()) { case '-': return readComment(); case '[': context = CDATA_SECTION... | /**
* Returns the next lexical unit in the context of an element content.
*/ | Returns the next lexical unit in the context of an element content | nextInContent | {
"repo_name": "apache/batik",
"path": "batik-xml/src/main/java/org/apache/batik/xml/XMLScanner.java",
"license": "apache-2.0",
"size": 60774
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 562,662 |
private List<AlluxioURI> startupCheckConsistency(final ExecutorService service)
throws InterruptedException, IOException {
final long completionMarker = -1;
final BlockingQueue<Long> dirsToCheck = new LinkedBlockingQueue<>();
final class StartupConsistencyChecker implements Callable<... | List<AlluxioURI> function(final ExecutorService service) throws InterruptedException, IOException { final long completionMarker = -1; final BlockingQueue<Long> dirsToCheck = new LinkedBlockingQueue<>(); final class StartupConsistencyChecker implements Callable<List<AlluxioURI>> { private final Long mFileId; private Sta... | /**
* Checks the consistency of the root in a multi-threaded and incremental fashion. This method
* will only READ lock the directories and files actively being checked and release them after the
* check on the file / directory is complete.
*
* @return a list of paths in Alluxio which are not consistent ... | Checks the consistency of the root in a multi-threaded and incremental fashion. This method will only READ lock the directories and files actively being checked and release them after the check on the file / directory is complete | startupCheckConsistency | {
"repo_name": "Reidddddd/mo-alluxio",
"path": "core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java",
"license": "apache-2.0",
"size": 129113
} | [
"java.io.IOException",
"java.util.List",
"java.util.concurrent.BlockingQueue",
"java.util.concurrent.Callable",
"java.util.concurrent.ExecutorService",
"java.util.concurrent.LinkedBlockingQueue"
] | import java.io.IOException; import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingQueue; | import java.io.*; import java.util.*; import java.util.concurrent.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,538,863 |
public final Index createIndex(Session session, HsqlName name,
int[] columns, boolean[] descending,
boolean[] nullsLast, boolean unique,
boolean constraint, boolean forward) {
Index newIndex = createAnd... | final Index function(Session session, HsqlName name, int[] columns, boolean[] descending, boolean[] nullsLast, boolean unique, boolean constraint, boolean forward) { Index newIndex = createAndAddIndexStructure(name, columns, descending, nullsLast, unique, constraint, forward); return newIndex; } | /**
* Create new memory-resident index. For MEMORY and TEXT tables.
*/ | Create new memory-resident index. For MEMORY and TEXT tables | createIndex | {
"repo_name": "ggorsontanguy/pocHSQLDB",
"path": "hsqldb-2.2.9/hsqldb/src/org/hsqldb/TableBase.java",
"license": "gpl-3.0",
"size": 17056
} | [
"org.hsqldb.HsqlNameManager",
"org.hsqldb.index.Index"
] | import org.hsqldb.HsqlNameManager; import org.hsqldb.index.Index; | import org.hsqldb.*; import org.hsqldb.index.*; | [
"org.hsqldb",
"org.hsqldb.index"
] | org.hsqldb; org.hsqldb.index; | 1,292,902 |
@Generated(hash = 128553479)
public void delete() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.delete(this);
} | @Generated(hash = 128553479) void function() { if (myDao == null) { throw new DaoException(STR); } myDao.delete(this); } | /**
* Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
* Entity must attached to an entity context.
*/ | Convenient call for <code>org.greenrobot.greendao.AbstractDao#delete(Object)</code>. Entity must attached to an entity context | delete | {
"repo_name": "diaus/TimeTracker",
"path": "app/src/main/java/com/andrew/timetracker/database/Timeline.java",
"license": "gpl-3.0",
"size": 4161
} | [
"org.greenrobot.greendao.DaoException",
"org.greenrobot.greendao.annotation.Generated"
] | import org.greenrobot.greendao.DaoException; import org.greenrobot.greendao.annotation.Generated; | import org.greenrobot.greendao.*; import org.greenrobot.greendao.annotation.*; | [
"org.greenrobot.greendao"
] | org.greenrobot.greendao; | 2,867,121 |
public List<Application> listApplications( String exactName ) throws ManagementWsException {
if( exactName != null )
this.logger.finer( "List/finding the application named " + exactName + "." );
else
this.logger.finer( "Listing all the applications." );
WebResource path = this.resource.path( UrlConstan... | List<Application> function( String exactName ) throws ManagementWsException { if( exactName != null ) this.logger.finer( STR + exactName + "." ); else this.logger.finer( STR ); WebResource path = this.resource.path( UrlConstants.APPLICATIONS ); if( exactName != null ) path = path.queryParam( "name", exactName ); List<A... | /**
* Lists applications.
* @param exactName if not null, the result list will contain at most one application (with this name)
* @return a non-null list of applications
* @throws ManagementWsException if a problem occurred with the applications management
*/ | Lists applications | listApplications | {
"repo_name": "gibello/roboconf",
"path": "miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ManagementWsDelegate.java",
"license": "apache-2.0",
"size": 13690
} | [
"com.sun.jersey.api.client.GenericType",
"com.sun.jersey.api.client.WebResource",
"java.util.ArrayList",
"java.util.List",
"javax.ws.rs.core.MediaType",
"net.roboconf.core.model.beans.Application",
"net.roboconf.dm.rest.client.exceptions.ManagementWsException",
"net.roboconf.dm.rest.commons.UrlConstan... | import com.sun.jersey.api.client.GenericType; import com.sun.jersey.api.client.WebResource; import java.util.ArrayList; import java.util.List; import javax.ws.rs.core.MediaType; import net.roboconf.core.model.beans.Application; import net.roboconf.dm.rest.client.exceptions.ManagementWsException; import net.roboconf.dm.... | import com.sun.jersey.api.client.*; import java.util.*; import javax.ws.rs.core.*; import net.roboconf.core.model.beans.*; import net.roboconf.dm.rest.client.exceptions.*; import net.roboconf.dm.rest.commons.*; | [
"com.sun.jersey",
"java.util",
"javax.ws",
"net.roboconf.core",
"net.roboconf.dm"
] | com.sun.jersey; java.util; javax.ws; net.roboconf.core; net.roboconf.dm; | 1,433,068 |
public void beforeFirst() throws SQLException {
synchronized (checkClosed().getConnectionMutex()) {
if (this.onInsertRow) {
this.onInsertRow = false;
}
if (this.doingUpdates) {
this.doingUpdates = false;
}
if (thi... | void function() throws SQLException { synchronized (checkClosed().getConnectionMutex()) { if (this.onInsertRow) { this.onInsertRow = false; } if (this.doingUpdates) { this.doingUpdates = false; } if (this.rowData.size() == 0) { return; } if (this.thisRow != null) { this.thisRow.closeOpenStreams(); } this.rowData.before... | /**
* JDBC 2.0
*
* <p>
* Moves to the front of the result set, just before the first row. Has no effect if the result set contains no rows.
* </p>
*
* @exception SQLException
* if a database-access error occurs, or result set type is
* TYPE_FO... | JDBC 2.0 Moves to the front of the result set, just before the first row. Has no effect if the result set contains no rows. | beforeFirst | {
"repo_name": "martingh15/TPJava",
"path": "TPJavaNotebook/mysql-connector-java-5.1.39/src/com/mysql/jdbc/ResultSetImpl.java",
"license": "mpl-2.0",
"size": 288777
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 695,145 |
private void setColumns(String xID, String yID, SeriesData s) throws GraphException, JSONException {
JSONArray xValues = new JSONArray();
JSONArray yValues = new JSONArray();
xValues.put(xID);
yValues.put(yID);
int barIndex = 0;
boolean addBarLabels = mData.ge... | void function(String xID, String yID, SeriesData s) throws GraphException, JSONException { JSONArray xValues = new JSONArray(); JSONArray yValues = new JSONArray(); xValues.put(xID); yValues.put(yID); int barIndex = 0; boolean addBarLabels = mData.getType().equals(GraphUtil.TYPE_BAR) && mBarLabels.length() == 1; JSONAr... | /**
* Set up data: x, y, and radius values
*
* @param xID ID of the x-values array
* @param yID ID of the y-values array
* @param s The SeriesData providing the data
*/ | Set up data: x, y, and radius values | setColumns | {
"repo_name": "dimagi/commcare",
"path": "src/main/java/org/commcare/core/graph/c3/DataConfiguration.java",
"license": "apache-2.0",
"size": 19504
} | [
"org.commcare.core.graph.model.BubblePointData",
"org.commcare.core.graph.model.SeriesData",
"org.commcare.core.graph.model.XYPointData",
"org.commcare.core.graph.util.GraphException",
"org.commcare.core.graph.util.GraphUtil",
"org.json.JSONArray",
"org.json.JSONException"
] | import org.commcare.core.graph.model.BubblePointData; import org.commcare.core.graph.model.SeriesData; import org.commcare.core.graph.model.XYPointData; import org.commcare.core.graph.util.GraphException; import org.commcare.core.graph.util.GraphUtil; import org.json.JSONArray; import org.json.JSONException; | import org.commcare.core.graph.model.*; import org.commcare.core.graph.util.*; import org.json.*; | [
"org.commcare.core",
"org.json"
] | org.commcare.core; org.json; | 1,995,537 |
private Class getClassFromString(String repositoryIDString,
String codebaseURL)
{
RepositoryIdInterface repositoryID
= repIdStrs.getFromString(repositoryIDString);
for (int i = 0; i < 3; i++) {
try {
switch (i)
... | Class function(String repositoryIDString, String codebaseURL) { RepositoryIdInterface repositoryID = repIdStrs.getFromString(repositoryIDString); for (int i = 0; i < 3; i++) { try { switch (i) { case 0: return repositoryID.getClassFromType(); case 1: break; case 2: codebaseURL = getCodeBase().implementation(repositoryI... | /**
* Attempts to find the class described by the given
* repository ID string. At most, three attempts are made:
* Try to find it locally, through the provided URL, and
* finally, via a URL from the remote CodeBase.
*/ | Attempts to find the class described by the given repository ID string. At most, three attempts are made: Try to find it locally, through the provided URL, and finally, via a URL from the remote CodeBase | getClassFromString | {
"repo_name": "JetBrains/jdk8u_corba",
"path": "src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java",
"license": "gpl-2.0",
"size": 82746
} | [
"com.sun.corba.se.impl.orbutil.RepositoryIdInterface",
"java.net.MalformedURLException",
"org.omg.CORBA"
] | import com.sun.corba.se.impl.orbutil.RepositoryIdInterface; import java.net.MalformedURLException; import org.omg.CORBA; | import com.sun.corba.se.impl.orbutil.*; import java.net.*; import org.omg.*; | [
"com.sun.corba",
"java.net",
"org.omg"
] | com.sun.corba; java.net; org.omg; | 1,015,161 |
private static void validateIpFamilyPolicy(Set<String> errors, GenericKafkaListener listener) {
if (KafkaListenerType.INTERNAL == listener.getType()
&& listener.getConfiguration().getIpFamilyPolicy() != null) {
errors.add("listener " + listener.getName() + " cannot configure i... | static void function(Set<String> errors, GenericKafkaListener listener) { if (KafkaListenerType.INTERNAL == listener.getType() && listener.getConfiguration().getIpFamilyPolicy() != null) { errors.add(STR + listener.getName() + STR); } } | /**
* Validates that ipFamilyPolicy is used only with external listeners
*
* @param errors List where any found errors will be added
* @param listener Listener which needs to be validated
*/ | Validates that ipFamilyPolicy is used only with external listeners | validateIpFamilyPolicy | {
"repo_name": "ppatierno/kaas",
"path": "cluster-operator/src/main/java/io/strimzi/operator/cluster/model/ListenersValidator.java",
"license": "apache-2.0",
"size": 29986
} | [
"io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListener",
"io.strimzi.api.kafka.model.listener.arraylistener.KafkaListenerType",
"java.util.Set"
] | import io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListener; import io.strimzi.api.kafka.model.listener.arraylistener.KafkaListenerType; import java.util.Set; | import io.strimzi.api.kafka.model.listener.arraylistener.*; import java.util.*; | [
"io.strimzi.api",
"java.util"
] | io.strimzi.api; java.util; | 820,987 |
@Override
public synchronized void reportForeignHostFailed(int hostId) {
long initiatorSiteId = CoreUtils.getHSIdFromHostAndSite(hostId, AGREEMENT_SITE_ID);
m_agreementSite.reportFault(initiatorSiteId);
if (!m_shuttingDown) {
logger.warn(String.format("Host %d failed", hostId... | synchronized void function(int hostId) { long initiatorSiteId = CoreUtils.getHSIdFromHostAndSite(hostId, AGREEMENT_SITE_ID); m_agreementSite.reportFault(initiatorSiteId); if (!m_shuttingDown) { logger.warn(String.format(STR, hostId)); } } | /**
* Synchronization protects m_knownFailedHosts and ensures that every failed host is only reported
* once
*/ | Synchronization protects m_knownFailedHosts and ensures that every failed host is only reported once | reportForeignHostFailed | {
"repo_name": "wolffcm/voltdb",
"path": "src/frontend/org/voltcore/messaging/HostMessenger.java",
"license": "agpl-3.0",
"size": 40921
} | [
"org.voltcore.utils.CoreUtils"
] | import org.voltcore.utils.CoreUtils; | import org.voltcore.utils.*; | [
"org.voltcore.utils"
] | org.voltcore.utils; | 2,494,104 |
private String calCommentRating(String comment){
int pos = 0;
int neg = 0;
int neu = 0;
Set<String> words = new HashSet<String>();
String delims = "[ \t\n.,?!\"]+";
String[] tokens = comment.split(delims);
for (int i = 0; i < tokens.length; i++){
if (!words.contains(tokens[i]))
word... | String function(String comment){ int pos = 0; int neg = 0; int neu = 0; Set<String> words = new HashSet<String>(); String delims = STR]+STRNeutralSTRPositiveSTRNegativeSTRNeutral"; } | /**
* Cal comment rating.
*
* @param comment the comment
* @return the string
*/ | Cal comment rating | calCommentRating | {
"repo_name": "CS3343G20/moviereviewsystem",
"path": "MovieReview/src/MovieReview/Database.java",
"license": "apache-2.0",
"size": 7144
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 528,282 |
static void acceptTermsOfService(boolean allowCrashUpload) {
UmaSessionStats.changeMetricsReportingConsent(allowCrashUpload);
SharedPreferencesManager.getInstance().writeBoolean(
ChromePreferenceKeys.FIRST_RUN_CACHED_TOS_ACCEPTED, true);
setEulaAccepted();
} | static void acceptTermsOfService(boolean allowCrashUpload) { UmaSessionStats.changeMetricsReportingConsent(allowCrashUpload); SharedPreferencesManager.getInstance().writeBoolean( ChromePreferenceKeys.FIRST_RUN_CACHED_TOS_ACCEPTED, true); setEulaAccepted(); } | /**
* Sets the EULA/Terms of Services state as "ACCEPTED".
* @param allowCrashUpload True if the user allows to upload crash dumps and collect stats.
*/ | Sets the EULA/Terms of Services state as "ACCEPTED" | acceptTermsOfService | {
"repo_name": "scheib/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java",
"license": "bsd-3-clause",
"size": 6545
} | [
"org.chromium.chrome.browser.metrics.UmaSessionStats",
"org.chromium.chrome.browser.preferences.ChromePreferenceKeys",
"org.chromium.chrome.browser.preferences.SharedPreferencesManager"
] | import org.chromium.chrome.browser.metrics.UmaSessionStats; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.preferences.SharedPreferencesManager; | import org.chromium.chrome.browser.metrics.*; import org.chromium.chrome.browser.preferences.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 346,102 |
public int getType() throws SQLException {
return ResultSet.TYPE_SCROLL_INSENSITIVE;
} | int function() throws SQLException { return ResultSet.TYPE_SCROLL_INSENSITIVE; } | /**
* Retrieves the type of this <code>ResultSet</code> object.
* The type is determined by the <code>Statement</code> object
* that created the result set.
*
* @return <code>ResultSet.TYPE_FORWARD_ONLY</code>,
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>,
* or <code>ResultSet.TYPE_S... | Retrieves the type of this <code>ResultSet</code> object. The type is determined by the <code>Statement</code> object that created the result set | getType | {
"repo_name": "OpenBD/openbd-core",
"path": "src/com/naryx/tagfusion/cfm/engine/cfQueryResultData.java",
"license": "gpl-3.0",
"size": 154192
} | [
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 720,226 |
renderInFrame = true;
bindEntityTexture(entity);
random.setSeed(187L);
ItemStack itemstack = entity.getEntityItem();
if (itemstack.getItem() != null) {
GL11.glPushMatrix();
float f2 = 0F;
float f3 = 0F;
byte b0 = getMiniBlockCount(itemstack... | renderInFrame = true; bindEntityTexture(entity); random.setSeed(187L); ItemStack itemstack = entity.getEntityItem(); if (itemstack.getItem() != null) { GL11.glPushMatrix(); float f2 = 0F; float f3 = 0F; byte b0 = getMiniBlockCount(itemstack); GL11.glTranslatef((float) par2, (float) par4 + f2, (float) par6); GL11.glEnab... | /**
* Renders the item
*/ | Renders the item | doRenderItem | {
"repo_name": "svgorbunov/Mariculture",
"path": "src/main/java/mariculture/core/render/RenderFakeItem.java",
"license": "mit",
"size": 21598
} | [
"net.minecraft.block.Block",
"net.minecraft.client.renderer.RenderBlocks",
"net.minecraft.item.ItemBlock",
"net.minecraft.item.ItemStack",
"net.minecraft.util.IIcon",
"net.minecraftforge.client.ForgeHooksClient"
] | import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraftforge.client.ForgeHooksClient; | import net.minecraft.block.*; import net.minecraft.client.renderer.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraftforge.client.*; | [
"net.minecraft.block",
"net.minecraft.client",
"net.minecraft.item",
"net.minecraft.util",
"net.minecraftforge.client"
] | net.minecraft.block; net.minecraft.client; net.minecraft.item; net.minecraft.util; net.minecraftforge.client; | 2,708,851 |
private void walk(TreeNode<T> element, List<TreeNode<T>> list) {
list.add(element);
for (TreeNode<T> data : element.getChildren()) {
walk(data, list);
}
} | void function(TreeNode<T> element, List<TreeNode<T>> list) { list.add(element); for (TreeNode<T> data : element.getChildren()) { walk(data, list); } } | /**
* Walks the Tree in pre-order style. This is a recursive method, and is
* called from the toList() method with the root element as the first
* argument. It appends to the second argument, which is passed by reference * as it recurses down the tree.
* @param element the starting element.
... | Walks the Tree in pre-order style. This is a recursive method, and is called from the toList() method with the root element as the first argument. It appends to the second argument, which is passed by reference * as it recurses down the tree | walk | {
"repo_name": "dhmay/msInspect",
"path": "src/org/fhcrc/cpl/toolbox/datastructure/Tree.java",
"license": "apache-2.0",
"size": 3027
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,243,564 |
@Test
public void testUnorderedWaitTimeoutHandling() throws Exception {
testTimeoutExceptionHandling(AsyncDataStream.OutputMode.UNORDERED);
} | void function() throws Exception { testTimeoutExceptionHandling(AsyncDataStream.OutputMode.UNORDERED); } | /**
* FLINK-6435
*
* <p>Tests that timeout exceptions are properly handled in ordered output mode. The proper handling means that
* a StreamElementQueueEntry is completed in case of a timeout exception.
*/ | FLINK-6435 Tests that timeout exceptions are properly handled in ordered output mode. The proper handling means that a StreamElementQueueEntry is completed in case of a timeout exception | testUnorderedWaitTimeoutHandling | {
"repo_name": "shaoxuan-wang/flink",
"path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/async/AsyncWaitOperatorTest.java",
"license": "apache-2.0",
"size": 38289
} | [
"org.apache.flink.streaming.api.datastream.AsyncDataStream"
] | import org.apache.flink.streaming.api.datastream.AsyncDataStream; | import org.apache.flink.streaming.api.datastream.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,529,738 |
@TruffleBoundary
public final InternalByteArray getInternalByteArrayUncached(TruffleString.Encoding expectedEncoding) {
return TruffleString.GetInternalByteArrayNode.getUncached().execute(this, expectedEncoding);
} | final InternalByteArray function(TruffleString.Encoding expectedEncoding) { return TruffleString.GetInternalByteArrayNode.getUncached().execute(this, expectedEncoding); } | /**
* Shorthand for calling the uncached version of {@link TruffleString.GetInternalByteArrayNode}.
*
* @since 22.1
*/ | Shorthand for calling the uncached version of <code>TruffleString.GetInternalByteArrayNode</code> | getInternalByteArrayUncached | {
"repo_name": "smarr/Truffle",
"path": "truffle/src/com.oracle.truffle.api.strings/src/com/oracle/truffle/api/strings/AbstractTruffleString.java",
"license": "gpl-2.0",
"size": 49225
} | [
"com.oracle.truffle.api.strings.TruffleString"
] | import com.oracle.truffle.api.strings.TruffleString; | import com.oracle.truffle.api.strings.*; | [
"com.oracle.truffle"
] | com.oracle.truffle; | 874,431 |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
view.setBackground(background);
} else {
view.setBackgroundDrawable(background);
}
} | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { view.setBackground(background); } else { view.setBackgroundDrawable(background); } } | /**
* Allows to set the background for the given view.
*
* @param view that has to be updated.
* @param background that has to be set.
*/ | Allows to set the background for the given view | setBackground | {
"repo_name": "SimoneCasagranda/android-wear-tutorial",
"path": "common/src/main/java/com/alchemiasoft/common/util/ViewUtil.java",
"license": "apache-2.0",
"size": 1394
} | [
"android.os.Build"
] | import android.os.Build; | import android.os.*; | [
"android.os"
] | android.os; | 1,236,964 |
if (in == null) {
return -1;
}
mDb.beginTransaction();
long ret = -1;
try {
if (!exists(in.getKey())) {
if (lastModified != null
&& (in.getLastModified() == null || lastModified > in.getLastModified())) {
in.... | if (in == null) { return -1; } mDb.beginTransaction(); long ret = -1; try { if (!exists(in.getKey())) { if (lastModified != null && (in.getLastModified() == null lastModified > in.getLastModified())) { in.setLastModified(lastModified); } else if (in.getLastModified() == null) { in.setLastModified(0L); } ret = mDb.inser... | /**
* Adds a model to the database, if it doesn't already exist
* If the model is already entered, update the existing row via
* {@link #update(TbaDatabaseModel, Long)}
* If the insert was successful, call {@link #insertCallback(TbaDatabaseModel)}
* @param in Model to be added
* @param las... | Adds a model to the database, if it doesn't already exist If the model is already entered, update the existing row via <code>#update(TbaDatabaseModel, Long)</code> If the insert was successful, call <code>#insertCallback(TbaDatabaseModel)</code> | add | {
"repo_name": "phil-lopreiato/the-blue-alliance-android",
"path": "android/src/main/java/com/thebluealliance/androidclient/database/ModelTable.java",
"license": "mit",
"size": 12398
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 892,742 |
public int ask(String question, List<Integer> ranges) {
int key = Integer.valueOf(this.ask(question));
boolean exist = false;
for (int value : ranges) {
if (value == key) {
exist = true;
break;
}
}
if (exist) {
... | int function(String question, List<Integer> ranges) { int key = Integer.valueOf(this.ask(question)); boolean exist = false; for (int value : ranges) { if (value == key) { exist = true; break; } } if (exist) { return key; } else { throw new MenuOutException(STR); } } | /**
* Method ask() for qustion.
* @param question question.
* @param ranges List ranges.
* @return int key.
*/ | Method ask() for qustion | ask | {
"repo_name": "evgenymatveev/Task",
"path": "chapter_002/src/main/java/ru/ematveev/start/StubInput.java",
"license": "apache-2.0",
"size": 1237
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,506,917 |
private SplittingPair doSplit(LogicalExpression subExpression,
List<Variable> argumentOrder) {
// The h expression
final Variable rootArg = originalLambda.getArgument();
// Create variables for the objects we will pull out
final List<Variable> newVars = new LinkedList<Variable>();
// The variable ... | SplittingPair function(LogicalExpression subExpression, List<Variable> argumentOrder) { final Variable rootArg = originalLambda.getArgument(); final List<Variable> newVars = new LinkedList<Variable>(); newVars.add(rootArg); newVars.addAll(argumentOrder); final LogicalExpression g = SplittingServices.makeExpression(newV... | /**
* Extract the entire subExpression
*
* @param subExpression
* @param argumentOrder
* The free variables in subExpression except the first variables
* in originalLambda, which is assumed to be in subExpression as
* well.
* @return
*/ | Extract the entire subExpression | doSplit | {
"repo_name": "PriyankaKhante/nlp_spf",
"path": "genlex.ccg.unification/src/edu/uw/cs/lil/tiny/genlex/ccg/unification/split/MakeCompositionSplits.java",
"license": "gpl-2.0",
"size": 18976
} | [
"edu.uw.cs.lil.tiny.genlex.ccg.unification.split.SplittingServices",
"edu.uw.cs.lil.tiny.mr.lambda.Lambda",
"edu.uw.cs.lil.tiny.mr.lambda.LogicLanguageServices",
"edu.uw.cs.lil.tiny.mr.lambda.LogicalExpression",
"edu.uw.cs.lil.tiny.mr.lambda.Variable",
"edu.uw.cs.lil.tiny.mr.lambda.visitor.GetAllFreeVaria... | import edu.uw.cs.lil.tiny.genlex.ccg.unification.split.SplittingServices; import edu.uw.cs.lil.tiny.mr.lambda.Lambda; import edu.uw.cs.lil.tiny.mr.lambda.LogicLanguageServices; import edu.uw.cs.lil.tiny.mr.lambda.LogicalExpression; import edu.uw.cs.lil.tiny.mr.lambda.Variable; import edu.uw.cs.lil.tiny.mr.lambda.visito... | import edu.uw.cs.lil.tiny.genlex.ccg.unification.split.*; import edu.uw.cs.lil.tiny.mr.lambda.*; import edu.uw.cs.lil.tiny.mr.lambda.visitor.*; import java.util.*; | [
"edu.uw.cs",
"java.util"
] | edu.uw.cs; java.util; | 1,603,940 |
public void internalError(final Exception cause) {
logError("Internal Server Error on " + request().getUri(), cause);
sendStatusOnly(HttpResponseStatus.INTERNAL_SERVER_ERROR);
} | void function(final Exception cause) { logError(STR + request().getUri(), cause); sendStatusOnly(HttpResponseStatus.INTERNAL_SERVER_ERROR); } | /**
* Sends <code>500/Internal Server Error</code> to the client.
* @param cause The unexpected exception that caused this error.
*/ | Sends <code>500/Internal Server Error</code> to the client | internalError | {
"repo_name": "geoffreyanderson/opentsdb",
"path": "src/tsd/AbstractHttpQuery.java",
"license": "gpl-3.0",
"size": 17287
} | [
"org.jboss.netty.handler.codec.http.HttpResponseStatus"
] | import org.jboss.netty.handler.codec.http.HttpResponseStatus; | import org.jboss.netty.handler.codec.http.*; | [
"org.jboss.netty"
] | org.jboss.netty; | 109,951 |
private void routeAroundSelfForClosestDistance(Connection conn,
PointList newLine) {
Point ptOrig = newLine.getPoint(newLine.size() - 2);
Point ptTerm = newLine.getLastPoint();
if (NORMALIZE_ON_HORIZONTAL_CENTER == normalizeBehavior
|| NORMALIZE_ON_HORIZONTAL_EXCEPT_FIRST_SEG == normalizeBehavior) ... | void function(Connection conn, PointList newLine) { Point ptOrig = newLine.getPoint(newLine.size() - 2); Point ptTerm = newLine.getLastPoint(); if (NORMALIZE_ON_HORIZONTAL_CENTER == normalizeBehavior NORMALIZE_ON_HORIZONTAL_EXCEPT_FIRST_SEG == normalizeBehavior) { int tolerance = MapModeUtil.getMapMode(conn).DPtoLP(3);... | /**
* Called for closest distance. Applies a custom algorithm for sequence edge
* to make sure that if the connection goes from right to left it goes
* around the source and target shapes.
*
* @param conn
* @param newLine
*/ | Called for closest distance. Applies a custom algorithm for sequence edge to make sure that if the connection goes from right to left it goes around the source and target shapes | routeAroundSelfForClosestDistance | {
"repo_name": "StephaneSeyvoz/mindEd",
"path": "org.ow2.mindEd.adl.editor.graphic.ui/customsrc/org/ow2/mindEd/adl/editor/graphic/ui/custom/layouts/RectilinearRouterEx.java",
"license": "lgpl-3.0",
"size": 32826
} | [
"org.eclipse.draw2d.Connection",
"org.eclipse.draw2d.IFigure",
"org.eclipse.draw2d.geometry.Dimension",
"org.eclipse.draw2d.geometry.Point",
"org.eclipse.draw2d.geometry.PointList",
"org.eclipse.draw2d.geometry.Rectangle",
"org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil",
"org.ow2.mindEd.adl.ed... | import org.eclipse.draw2d.Connection; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.PointList; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeUtil; impor... | import org.eclipse.draw2d.*; import org.eclipse.draw2d.geometry.*; import org.eclipse.gmf.runtime.draw2d.ui.mapmode.*; import org.ow2.*; | [
"org.eclipse.draw2d",
"org.eclipse.gmf",
"org.ow2"
] | org.eclipse.draw2d; org.eclipse.gmf; org.ow2; | 1,179,007 |
public static File createUniqueDirectory(File parent) {
String uniqueName = UUID.randomUUID().toString();
File directory = new File(parent, uniqueName);
directory.mkdirs();
return directory;
} | static File function(File parent) { String uniqueName = UUID.randomUUID().toString(); File directory = new File(parent, uniqueName); directory.mkdirs(); return directory; } | /**
* Create a directory with a unique name inside a given parnet directory.
*
* @param parent Parent directory
* @return Newly created directory
*/ | Create a directory with a unique name inside a given parnet directory | createUniqueDirectory | {
"repo_name": "zippy1978/shift",
"path": "src/main/java/org/shiftedit/util/FileUtils.java",
"license": "lgpl-3.0",
"size": 4808
} | [
"java.io.File",
"java.util.UUID"
] | import java.io.File; import java.util.UUID; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 279,830 |
HandlerRegistration addAppendRowClickHandler( final ClickHandler handler ); | HandlerRegistration addAppendRowClickHandler( final ClickHandler handler ); | /**
* Adds a handler for when the User, interacting with the View, requests a row to be appended.
* @param handler
* @return
*/ | Adds a handler for when the User, interacting with the View, requests a row to be appended | addAppendRowClickHandler | {
"repo_name": "Salaboy/uberfire",
"path": "uberfire-extensions/uberfire-wires/uberfire-wires-core/uberfire-wires-core-grids/src/main/java/org/uberfire/ext/wires/core/grids/client/demo/WiresGridsDemoView.java",
"license": "apache-2.0",
"size": 3754
} | [
"com.google.gwt.event.dom.client.ClickHandler",
"com.google.gwt.event.shared.HandlerRegistration"
] | import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.shared.HandlerRegistration; | import com.google.gwt.event.dom.client.*; import com.google.gwt.event.shared.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,823,386 |
void serveFile(StaplerRequest request, URL res) throws ServletException, IOException; | void serveFile(StaplerRequest request, URL res) throws ServletException, IOException; | /**
* Serves a static resource.
*
* <p>
* This method sets content type, HTTP status code, sends the complete data
* and closes the response. This method also handles cache-control HTTP headers
* like "If-Modified-Since" and others.
*/ | Serves a static resource. This method sets content type, HTTP status code, sends the complete data and closes the response. This method also handles cache-control HTTP headers like "If-Modified-Since" and others | serveFile | {
"repo_name": "eclipse/hudson.stapler",
"path": "stapler-core/src/main/java/org/kohsuke/stapler/StaplerResponse.java",
"license": "apache-2.0",
"size": 7729
} | [
"java.io.IOException",
"javax.servlet.ServletException"
] | import java.io.IOException; import javax.servlet.ServletException; | import java.io.*; import javax.servlet.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 527,895 |
public void insertAttributeValue(String attributeName, String value, int index) {
if (m_simpleAttributes.containsKey(attributeName)) {
m_simpleAttributes.get(attributeName).add(index, value);
} else {
setAttributeValue(attributeName, value);
}
fireChan... | void function(String attributeName, String value, int index) { if (m_simpleAttributes.containsKey(attributeName)) { m_simpleAttributes.get(attributeName).add(index, value); } else { setAttributeValue(attributeName, value); } fireChange(ChangeType.add); } | /**
* Inserts a new attribute value at the given index.<p>
*
* @param attributeName the attribute name
* @param value the attribute value
* @param index the value index
*/ | Inserts a new attribute value at the given index | insertAttributeValue | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/acacia/shared/CmsEntity.java",
"license": "lgpl-2.1",
"size": 27138
} | [
"org.opencms.acacia.shared.CmsEntityChangeEvent"
] | import org.opencms.acacia.shared.CmsEntityChangeEvent; | import org.opencms.acacia.shared.*; | [
"org.opencms.acacia"
] | org.opencms.acacia; | 1,286,515 |
public void setRenderer(WaferMapRenderer renderer) {
if (this.renderer != null) {
this.renderer.removeChangeListener(this);
}
this.renderer = renderer;
if (renderer != null) {
renderer.setPlot(this);
}
fireChangeEvent();
}
| void function(WaferMapRenderer renderer) { if (this.renderer != null) { this.renderer.removeChangeListener(this); } this.renderer = renderer; if (renderer != null) { renderer.setPlot(this); } fireChangeEvent(); } | /**
* Sets the item renderer, and notifies all listeners of a change to the
* plot. If the renderer is set to {@code null}, no chart will be
* drawn.
*
* @param renderer the new renderer ({@code null} permitted).
*/ | Sets the item renderer, and notifies all listeners of a change to the plot. If the renderer is set to null, no chart will be drawn | setRenderer | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/chart/plot/WaferMapPlot.java",
"license": "lgpl-2.1",
"size": 14432
} | [
"org.jfree.chart.renderer.WaferMapRenderer"
] | import org.jfree.chart.renderer.WaferMapRenderer; | import org.jfree.chart.renderer.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 530,316 |
@Override
public void sendDownlink(DownlinkRequest request) throws DownlinkException {
if (!isRunning)
throw new ClientNotRunningException();
else
{
try {
String accessToken = authenticator.getAccessToken();
super.encode(request);
... | void function(DownlinkRequest request) throws DownlinkException { if (!isRunning) throw new ClientNotRunningException(); else { try { String accessToken = authenticator.getAccessToken(); super.encode(request); URL url = new URL(this.buildDownlinkUrl(request)); logger.debug(STR, url.toString()); HttpURLConnection con = ... | /**
* sends downlink message to device through proximus
* @param request The DownlinkRequest, either ProximusDownlinkRequest or TTNDownlinkRequest
* @throws DownlinkException
*/ | sends downlink message to device through proximus | sendDownlink | {
"repo_name": "YangSkyL/lora_weather_station",
"path": "demo/weather_station/common/src/msf4j/src/main/java/be/i8c/wso2/msf4j/lora/services/proximus/LoRaProximusHTTPService.java",
"license": "apache-2.0",
"size": 6822
} | [
"be.i8c.wso2.msf4j.lora.models.common.DownlinkRequest",
"be.i8c.wso2.msf4j.lora.services.common.exceptions.ClientNotRunningException",
"be.i8c.wso2.msf4j.lora.services.common.exceptions.DownlinkException",
"com.google.api.client.auth.oauth2.TokenResponseException",
"java.io.DataOutputStream",
"java.io.IOE... | import be.i8c.wso2.msf4j.lora.models.common.DownlinkRequest; import be.i8c.wso2.msf4j.lora.services.common.exceptions.ClientNotRunningException; import be.i8c.wso2.msf4j.lora.services.common.exceptions.DownlinkException; import com.google.api.client.auth.oauth2.TokenResponseException; import java.io.DataOutputStream; i... | import be.i8c.wso2.msf4j.lora.models.common.*; import be.i8c.wso2.msf4j.lora.services.common.exceptions.*; import com.google.api.client.auth.oauth2.*; import java.io.*; import java.net.*; | [
"be.i8c.wso2",
"com.google.api",
"java.io",
"java.net"
] | be.i8c.wso2; com.google.api; java.io; java.net; | 711,761 |
@SuppressWarnings("WeakerAccess")
@UiThread
public boolean popToTag(@NonNull String tag, @Nullable ControllerChangeHandler changeHandler) {
ThreadUtils.ensureMainThread();
for (RouterTransaction transaction : backstack) {
if (tag.equals(transaction.tag())) {
popT... | @SuppressWarnings(STR) boolean function(@NonNull String tag, @Nullable ControllerChangeHandler changeHandler) { ThreadUtils.ensureMainThread(); for (RouterTransaction transaction : backstack) { if (tag.equals(transaction.tag())) { popToTransaction(transaction, changeHandler); return true; } } return false; } | /**
* Pops all {@link Controller}s until the {@link Controller} with the passed tag is at the top
*
* @param tag The tag being popped to
* @param changeHandler The {@link ControllerChangeHandler} to handle this transaction
* @return Whether or not the {@link Controller} with the passe... | Pops all <code>Controller</code>s until the <code>Controller</code> with the passed tag is at the top | popToTag | {
"repo_name": "bluelinelabs/Conductor",
"path": "conductor/src/main/java/com/bluelinelabs/conductor/Router.java",
"license": "apache-2.0",
"size": 43569
} | [
"androidx.annotation.NonNull",
"androidx.annotation.Nullable",
"com.bluelinelabs.conductor.internal.ThreadUtils"
] | import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.bluelinelabs.conductor.internal.ThreadUtils; | import androidx.annotation.*; import com.bluelinelabs.conductor.internal.*; | [
"androidx.annotation",
"com.bluelinelabs.conductor"
] | androidx.annotation; com.bluelinelabs.conductor; | 611,276 |
static boolean isCoordinateAxis(final String name) {
return CharSequences.startsWith(name, LATITUDE, true)
|| CharSequences.startsWith(name, LONGITUDE, true);
} | static boolean isCoordinateAxis(final String name) { return CharSequences.startsWith(name, LATITUDE, true) CharSequences.startsWith(name, LONGITUDE, true); } | /**
* Returns {@code true} if a variable of the given name is a coordinate axis.
*/ | Returns true if a variable of the given name is a coordinate axis | isCoordinateAxis | {
"repo_name": "apache/sis",
"path": "profiles/sis-japan-profile/src/main/java/org/apache/sis/internal/earth/netcdf/GCOM_W.java",
"license": "apache-2.0",
"size": 13205
} | [
"org.apache.sis.util.CharSequences"
] | import org.apache.sis.util.CharSequences; | import org.apache.sis.util.*; | [
"org.apache.sis"
] | org.apache.sis; | 2,195,031 |
@SuppressWarnings("unchecked")
public static void resolveRawParameterValues(Map<String, Object> parameters) {
for (Map.Entry<String, Object> entry : parameters.entrySet()) {
if (entry.getValue() != null) {
// if the value is a list then we need to iterate
Obje... | @SuppressWarnings(STR) static void function(Map<String, Object> parameters) { for (Map.Entry<String, Object> entry : parameters.entrySet()) { if (entry.getValue() != null) { Object value = entry.getValue(); if (value instanceof List) { List list = (List) value; for (int i = 0; i < list.size(); i++) { Object obj = list.... | /**
* Traverses the given parameters, and resolve any parameter values which uses the RAW token
* syntax: <tt>key=RAW(value)</tt>. This method will then remove the RAW tokens, and replace
* the content of the value, with just the value.
*
* @param parameters the uri parameters
* @see #pars... | Traverses the given parameters, and resolve any parameter values which uses the RAW token syntax: key=RAW(value). This method will then remove the RAW tokens, and replace the content of the value, with just the value | resolveRawParameterValues | {
"repo_name": "onders86/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/URISupport.java",
"license": "apache-2.0",
"size": 26689
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 944,893 |
protected static String copyResourceTo(String inDir, String name, String outDir) throws Exception {
String result;
String resource;
InputStream is;
BufferedInputStream bis;
String outFull;
File out;
FileOutputStream fos;
BufferedOutputStream bos;
result = null;
... | static String function(String inDir, String name, String outDir) throws Exception { String result; String resource; InputStream is; BufferedInputStream bis; String outFull; File out; FileOutputStream fos; BufferedOutputStream bos; result = null; is = null; bis = null; fos = null; bos = null; try { resource = inDir; if ... | /**
* Copies the specified resource to the output directory.
*
* @param inDir the resource directory to use
* @param name the name of the resource
* @param outDir the output directory
* @return the full path
*/ | Copies the specified resource to the output directory | copyResourceTo | {
"repo_name": "fracpete/rsync4j",
"path": "rsync4j-core/src/main/java/com/github/fracpete/rsync4j/core/Binaries.java",
"license": "gpl-3.0",
"size": 11297
} | [
"java.io.BufferedInputStream",
"java.io.BufferedOutputStream",
"java.io.File",
"java.io.FileOutputStream",
"java.io.InputStream",
"java.util.logging.Level",
"org.apache.commons.io.IOUtils"
] | import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.util.logging.Level; import org.apache.commons.io.IOUtils; | import java.io.*; import java.util.logging.*; import org.apache.commons.io.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 263,930 |
@DELETE
@Path("/{path:.*}")
@Produces("application/json")
@ApiOperation(value = "Delete a resource",
httpMethod = "DELETE",
notes = "Delete a resource")
@ApiResponses(value = { @ApiResponse(code = 204, message = "Resource deleted successfully"),
... | @Path(STR) @Produces(STR) @ApiOperation(value = STR, httpMethod = STR, notes = STR) @ApiResponses(value = { @ApiResponse(code = 204, message = STR), @ApiResponse(code = 401, message = STR), @ApiResponse(code = 404, message = STR), @ApiResponse(code = 500, message = STR)}) Response function(@PathParam("path") List<PathS... | /**
* This method delete the requested resource.
*
* @param path - path segment of the resource path
* @return Response - HTTP 204 No Content.
*/ | This method delete the requested resource | deleteResource | {
"repo_name": "sameerak/carbon-registry",
"path": "components/registry/org.wso2.carbon.registry.rest.api/src/main/java/org/wso2/carbon/registry/rest/api/Artifact.java",
"license": "apache-2.0",
"size": 11242
} | [
"com.wordnik.swagger.annotations.ApiOperation",
"com.wordnik.swagger.annotations.ApiResponse",
"com.wordnik.swagger.annotations.ApiResponses",
"java.util.List",
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.PathSegment",
"javax.ws... | import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiResponse; import com.wordnik.swagger.annotations.ApiResponses; import java.util.List; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core... | import com.wordnik.swagger.annotations.*; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.wso2.carbon.context.*; import org.wso2.carbon.registry.core.*; import org.wso2.carbon.registry.core.exceptions.*; import org.wso2.carbon.registry.rest.api.security.*; | [
"com.wordnik.swagger",
"java.util",
"javax.ws",
"org.wso2.carbon"
] | com.wordnik.swagger; java.util; javax.ws; org.wso2.carbon; | 1,670,128 |
@Test
public void shouldAnswerWithTrue()
{
assertTrue( true );
}
| void function() { assertTrue( true ); } | /**
* Rigorous Test :-)
*/ | Rigorous Test :-) | shouldAnswerWithTrue | {
"repo_name": "zhonghuasheng/JAVA",
"path": "rabbitmq/src/test/java/com/zhonghuasheng/rabbitmq/AppTest.java",
"license": "gpl-3.0",
"size": 318
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,238,227 |
List<T> getPermutation( BigInteger permutationIndex ); | List<T> getPermutation( BigInteger permutationIndex ); | /**
* Calculate the given permutation.
* If the class is accessed as an iterator after fetching a specific permutation,
* then the iteration should start immediately after the requested permutation.
* @param permutationIndex The zero-indexed permutation to generate.
* @return The requested permutation, as a... | Calculate the given permutation. If the class is accessed as an iterator after fetching a specific permutation, then the iteration should start immediately after the requested permutation | getPermutation | {
"repo_name": "JonnyANYC/permutations",
"path": "src/com/angelajonhome/algorithms/permutations/PermutationGenerator.java",
"license": "apache-2.0",
"size": 626
} | [
"java.math.BigInteger",
"java.util.List"
] | import java.math.BigInteger; import java.util.List; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 1,397,874 |
List<Crif> sensitivities = Arrays.asList(JS_IR_47, JS_IR_48);
SimmpleConfig config = SimmpleConfig.Builder()
.calculationCurrency("USD")
.holdingPeriod(HoldingPeriod.TEN_DAY)
.imRole(ImRole.SECURED)
.simmCalculationType(SimmCalculationType.TOTAL)
.build();
BigDecimal amount = Simmp... | List<Crif> sensitivities = Arrays.asList(JS_IR_47, JS_IR_48); SimmpleConfig config = SimmpleConfig.Builder() .calculationCurrency("USD") .holdingPeriod(HoldingPeriod.TEN_DAY) .imRole(ImRole.SECURED) .simmCalculationType(SimmCalculationType.TOTAL) .build(); BigDecimal amount = Simmple.calculateWorstOf(sensitivities, con... | /**
* Required Passes: None
* Element Tested: IR Risk Weight with each sensitivity having a unique applicable regulation
* Risk Measure: Delta
* Group: Rates & Fx
*/ | Required Passes: None Element Tested: IR Risk Weight with each sensitivity having a unique applicable regulation Risk Measure: Delta Group: Rates & Fx | testJ1 | {
"repo_name": "AcadiaSoft/simm-lib",
"path": "simm-ple/src/test/java/com/acadiasoft/im/simmple/SimmOptionalTenDayTest.java",
"license": "mit",
"size": 9084
} | [
"com.acadiasoft.im.simm.config.HoldingPeriod",
"com.acadiasoft.im.simm.config.SimmCalculationType",
"com.acadiasoft.im.simmple.config.ImRole",
"com.acadiasoft.im.simmple.config.SimmpleConfig",
"com.acadiasoft.im.simmple.engine.Simmple",
"com.acadiasoft.im.simmple.model.Crif",
"java.math.BigDecimal",
"... | import com.acadiasoft.im.simm.config.HoldingPeriod; import com.acadiasoft.im.simm.config.SimmCalculationType; import com.acadiasoft.im.simmple.config.ImRole; import com.acadiasoft.im.simmple.config.SimmpleConfig; import com.acadiasoft.im.simmple.engine.Simmple; import com.acadiasoft.im.simmple.model.Crif; import java.m... | import com.acadiasoft.im.simm.config.*; import com.acadiasoft.im.simmple.config.*; import com.acadiasoft.im.simmple.engine.*; import com.acadiasoft.im.simmple.model.*; import java.math.*; import java.util.*; import org.junit.*; | [
"com.acadiasoft.im",
"java.math",
"java.util",
"org.junit"
] | com.acadiasoft.im; java.math; java.util; org.junit; | 874,072 |
public List<DataflowContraint<V>> getDependent() {
return dependent;
} | List<DataflowContraint<V>> function() { return dependent; } | /**
* Returns list of dependent constraints that have to
* be re-evaluated when this constraint has been changed.
*/ | Returns list of dependent constraints that have to be re-evaluated when this constraint has been changed | getDependent | {
"repo_name": "rla/while",
"path": "src/com/infdot/analysis/solver/DataflowContraint.java",
"license": "mit",
"size": 1778
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,383,335 |
public interface WorkspaceManagedIdentitySqlControlSettingsClient {
@ServiceMethod(returns = ReturnType.SINGLE)
ManagedIdentitySqlControlSettingsModelInner get(String resourceGroupName, String workspaceName); | interface WorkspaceManagedIdentitySqlControlSettingsClient { @ServiceMethod(returns = ReturnType.SINGLE) ManagedIdentitySqlControlSettingsModelInner function(String resourceGroupName, String workspaceName); | /**
* Get Managed Identity Sql Control Settings.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.cor... | Get Managed Identity Sql Control Settings | get | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/WorkspaceManagedIdentitySqlControlSettingsClient.java",
"license": "mit",
"size": 6754
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.synapse.fluent.models.ManagedIdentitySqlControlSettingsModelInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.synapse.fluent.models.ManagedIdentitySqlControlSettingsModelInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.synapse.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 477,795 |
protected ActionForward cancelled(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
return null;
}
// ----------------------------------------------------- Protected Methods | ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return null; } | /**
* Method which is dispatched to when the request is a cancel button submit.
* Subclasses of <code>DispatchAction</code> should override this method if
* they wish to provide default behavior different than returning null.
*
* @param mapping
* The ActionMapping used to select this instance
... | Method which is dispatched to when the request is a cancel button submit. Subclasses of <code>DispatchAction</code> should override this method if they wish to provide default behavior different than returning null | cancelled | {
"repo_name": "jreadstone/zsyproject",
"path": "src/org/g4studio/core/mvc/xstruts/actions/DispatchAction.java",
"license": "gpl-2.0",
"size": 10477
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.g4studio.core.mvc.xstruts.action.ActionForm",
"org.g4studio.core.mvc.xstruts.action.ActionForward",
"org.g4studio.core.mvc.xstruts.action.ActionMapping"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.g4studio.core.mvc.xstruts.action.ActionForm; import org.g4studio.core.mvc.xstruts.action.ActionForward; import org.g4studio.core.mvc.xstruts.action.ActionMapping; | import javax.servlet.http.*; import org.g4studio.core.mvc.xstruts.action.*; | [
"javax.servlet",
"org.g4studio.core"
] | javax.servlet; org.g4studio.core; | 1,735,168 |
public Cluster getCluster() {
return cluster;
} | Cluster function() { return cluster; } | /**
* Get the cluster that was used to obtain this projected database.
* @return the Cluster or null if none is associated.
*/ | Get the cluster that was used to obtain this projected database | getCluster | {
"repo_name": "YinYanfei/CadalWorkspace",
"path": "ca/pfv/spmf/algorithms/sequentialpatterns/fournier2008/PseudoSequenceDatabase.java",
"license": "gpl-3.0",
"size": 3445
} | [
"ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008.kmeans_for_fournier08.Cluster"
] | import ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008.kmeans_for_fournier08.Cluster; | import ca.pfv.spmf.algorithms.sequentialpatterns.fournier2008.kmeans_for_fournier08.*; | [
"ca.pfv.spmf"
] | ca.pfv.spmf; | 205,122 |
public static <I> Predicate<I> asPredicate(FailablePredicate<I,?> pPredicate) {
return (pInput) -> {
try {
return pPredicate.test(pInput);
} catch (Throwable t) {
throw Exceptions.show(t);
}
};
}
| static <I> Predicate<I> function(FailablePredicate<I,?> pPredicate) { return (pInput) -> { try { return pPredicate.test(pInput); } catch (Throwable t) { throw Exceptions.show(t); } }; } | /**
* Converts the given {@link FailablePredicate} into a standard {@link Predicate}.
* @param <I> The predicates input type (both, the parameter predicate, and the
* result)
* @param pPredicate The failable predicate to convert.
* @return A proxy predicate, which is implemented by invoking {@code pPre... | Converts the given <code>FailablePredicate</code> into a standard <code>Predicate</code> | asPredicate | {
"repo_name": "jochenw/afw",
"path": "afw-core/src/main/java/com/github/jochenw/afw/core/util/Functions.java",
"license": "apache-2.0",
"size": 38438
} | [
"java.util.function.Predicate"
] | import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 186,920 |
EntityResolver getEntityResolver(); | EntityResolver getEntityResolver(); | /**
* DOCUMENT ME!
*
* @return the EntityResolver used to find resolve URIs such as for DTDs, or
* XML Schema documents
*/ | DOCUMENT ME | getEntityResolver | {
"repo_name": "raedle/univis",
"path": "lib/dom4j-1.6.1/src/org/dom4j/Document.java",
"license": "lgpl-2.1",
"size": 6161
} | [
"org.xml.sax.EntityResolver"
] | import org.xml.sax.EntityResolver; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,549,116 |
@VisibleForTesting
boolean isIntact() {
for (int i = 1; i < size; i++) {
if (!heapForIndex(i).verifyIndex(i)) {
return false;
}
}
return true;
}
@WeakOuter
private class Heap {
final Ordering<E> ordering;
@MonotonicNonNullDecl @Weak Heap otherHeap;
Heap(Orderin... | boolean isIntact() { for (int i = 1; i < size; i++) { if (!heapForIndex(i).verifyIndex(i)) { return false; } } return true; } private class Heap { final Ordering<E> ordering; @MonotonicNonNullDecl @Weak Heap otherHeap; Heap(Ordering<E> ordering) { this.ordering = ordering; } | /**
* Returns {@code true} if the MinMax heap structure holds. This is only used in testing.
*
* <p>TODO(kevinb): move to the test class?
*/ | Returns true if the MinMax heap structure holds. This is only used in testing. TODO(kevinb): move to the test class | isIntact | {
"repo_name": "Xaerxess/guava",
"path": "guava/src/com/google/common/collect/MinMaxPriorityQueue.java",
"license": "apache-2.0",
"size": 33450
} | [
"com.google.j2objc.annotations.Weak",
"org.checkerframework.checker.nullness.compatqual.MonotonicNonNullDecl"
] | import com.google.j2objc.annotations.Weak; import org.checkerframework.checker.nullness.compatqual.MonotonicNonNullDecl; | import com.google.j2objc.annotations.*; import org.checkerframework.checker.nullness.compatqual.*; | [
"com.google.j2objc",
"org.checkerframework.checker"
] | com.google.j2objc; org.checkerframework.checker; | 948,022 |
public static void overScrollBy(final PullToRefreshBase<?> view, final int deltaX, final int scrollX,
final int deltaY, final int scrollY, final boolean isTouchEvent) {
OverscrollHelper.overScrollBy(view, deltaX, scrollX, deltaY, scrollY, 0, isTouchEvent);
}
/**
... | static void function(final PullToRefreshBase<?> view, final int deltaX, final int scrollX, final int deltaY, final int scrollY, final boolean isTouchEvent) { OverscrollHelper.overScrollBy(view, deltaX, scrollX, deltaY, scrollY, 0, isTouchEvent); } /** * This version of the call is used for Views that need to specify a ... | /**
* This should only be used on AdapterView's such as ListView as it just
* calls through to overScrollBy() with the scrollRange = 0.
* AdapterView's do not have a scroll range (i.e. getScrollY() doesn't work).
*
* @param view PullToRefreshView that is calling this
* @param deltaX change... | This should only be used on AdapterView's such as ListView as it just calls through to overScrollBy() with the scrollRange = 0. AdapterView's do not have a scroll range (i.e. getScrollY() doesn't work) | overScrollBy | {
"repo_name": "OneWorld0neDream/QingQiQiu",
"path": "MagicArenaPullToRefresh/src/main/java/com/framework/magicarena/pulltorefresh/OverscrollHelper.java",
"license": "apache-2.0",
"size": 9619
} | [
"android.view.View",
"android.widget.ScrollView"
] | import android.view.View; import android.widget.ScrollView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 471,970 |
public boolean addAll(Collection c) {
createCollection();
return imageCollection.addAll(c);
} | boolean function(Collection c) { createCollection(); return imageCollection.addAll(c); } | /**
* Creates the <code>Collection</code> rendering if none yet exists, and
* adds all of the elements in the specified <code>Collection</code>
* to this <code>Collection</code>.
*/ | Creates the <code>Collection</code> rendering if none yet exists, and adds all of the elements in the specified <code>Collection</code> to this <code>Collection</code> | addAll | {
"repo_name": "MarinnaCole/LightZone",
"path": "lightcrafts/extsrc/com/lightcrafts/mediax/jai/CollectionOp.java",
"license": "bsd-3-clause",
"size": 60710
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,816,393 |
public static AccessControlProtos.UsersAndPermissions toUserTablePermissions(
ListMultimap<String, TablePermission> perm) {
AccessControlProtos.UsersAndPermissions.Builder builder =
AccessControlProtos.UsersAndPermissions.newBuilder();
for (Map.Entry<String, Collection<TablePermission>... | static AccessControlProtos.UsersAndPermissions function( ListMultimap<String, TablePermission> perm) { AccessControlProtos.UsersAndPermissions.Builder builder = AccessControlProtos.UsersAndPermissions.newBuilder(); for (Map.Entry<String, Collection<TablePermission>> entry : perm.asMap().entrySet()) { AccessControlProto... | /**
* Convert a ListMultimap<String, TablePermission> where key is username
* to a protobuf UserPermission
*
* @param perm the list of user and table permissions
* @return the protobuf UserTablePermissions
*/ | Convert a ListMultimap where key is username to a protobuf UserPermission | toUserTablePermissions | {
"repo_name": "drewpope/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java",
"license": "apache-2.0",
"size": 114457
} | [
"com.google.common.collect.ListMultimap",
"com.google.protobuf.ByteString",
"java.util.Collection",
"java.util.Map",
"org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos",
"org.apache.hadoop.hbase.security.access.TablePermission"
] | import com.google.common.collect.ListMultimap; import com.google.protobuf.ByteString; import java.util.Collection; import java.util.Map; import org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos; import org.apache.hadoop.hbase.security.access.TablePermission; | import com.google.common.collect.*; import com.google.protobuf.*; import java.util.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.security.access.*; | [
"com.google.common",
"com.google.protobuf",
"java.util",
"org.apache.hadoop"
] | com.google.common; com.google.protobuf; java.util; org.apache.hadoop; | 106,045 |
public void displayGUIDispenser(TileEntityDispenser par1TileEntityDispenser)
{
this.incrementWindowID();
this.playerNetServerHandler.sendPacketToPlayer(new Packet100OpenWindow(this.currentWindowId, par1TileEntityDispenser instanceof TileEntityDropper ? 10 : 3, par1TileEntityDispenser.getInvName(... | void function(TileEntityDispenser par1TileEntityDispenser) { this.incrementWindowID(); this.playerNetServerHandler.sendPacketToPlayer(new Packet100OpenWindow(this.currentWindowId, par1TileEntityDispenser instanceof TileEntityDropper ? 10 : 3, par1TileEntityDispenser.getInvName(), par1TileEntityDispenser.getSizeInventor... | /**
* Displays the dipsenser GUI for the passed in dispenser entity. Args: TileEntityDispenser
*/ | Displays the dipsenser GUI for the passed in dispenser entity. Args: TileEntityDispenser | displayGUIDispenser | {
"repo_name": "HATB0T/RuneCraftery",
"path": "forge/mcp/src/minecraft/net/minecraft/entity/player/EntityPlayerMP.java",
"license": "lgpl-3.0",
"size": 42595
} | [
"net.minecraft.inventory.ContainerDispenser",
"net.minecraft.network.packet.Packet100OpenWindow",
"net.minecraft.tileentity.TileEntityDispenser",
"net.minecraft.tileentity.TileEntityDropper"
] | import net.minecraft.inventory.ContainerDispenser; import net.minecraft.network.packet.Packet100OpenWindow; import net.minecraft.tileentity.TileEntityDispenser; import net.minecraft.tileentity.TileEntityDropper; | import net.minecraft.inventory.*; import net.minecraft.network.packet.*; import net.minecraft.tileentity.*; | [
"net.minecraft.inventory",
"net.minecraft.network",
"net.minecraft.tileentity"
] | net.minecraft.inventory; net.minecraft.network; net.minecraft.tileentity; | 2,190,654 |
Stream<VscConverterStation> getVscConverterStationStream(); | Stream<VscConverterStation> getVscConverterStationStream(); | /**
* Get all VSC converter stations connected to this voltage level.
* @return all VSC converter stations connected to this voltage level
*/ | Get all VSC converter stations connected to this voltage level | getVscConverterStationStream | {
"repo_name": "itesla/ipst-core",
"path": "iidm/iidm-api/src/main/java/eu/itesla_project/iidm/network/VoltageLevel.java",
"license": "mpl-2.0",
"size": 24958
} | [
"java.util.stream.Stream"
] | import java.util.stream.Stream; | import java.util.stream.*; | [
"java.util"
] | java.util; | 1,016,059 |
public static Resource PomBase() {
return ResourceFactory.createResource("http://www.pombase.org/spombe/result/");
} | static Resource function() { return ResourceFactory.createResource("http: } | /**
* Returns the link-out URI for objects of "PomBase".
*/ | Returns the link-out URI for objects of "PomBase" | PomBase | {
"repo_name": "BioInterchange/BioInterchange",
"path": "supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/GOXRef.java",
"license": "mit",
"size": 41277
} | [
"com.hp.hpl.jena.rdf.model.Resource",
"com.hp.hpl.jena.rdf.model.ResourceFactory"
] | import com.hp.hpl.jena.rdf.model.Resource; import com.hp.hpl.jena.rdf.model.ResourceFactory; | import com.hp.hpl.jena.rdf.model.*; | [
"com.hp.hpl"
] | com.hp.hpl; | 2,193,434 |
public void writeTo(OutputStream os)
throws IOException
{
DataOutputStream dos = new DataOutputStream(os);
dos.writeInt(N);
dos.writeInt(q);
dos.writeInt(d);
dos.writeInt(d1);
dos.writeInt(d2);
dos.writeInt(d3);
dos.writeInt(B);
dos... | void function(OutputStream os) throws IOException { DataOutputStream dos = new DataOutputStream(os); dos.writeInt(N); dos.writeInt(q); dos.writeInt(d); dos.writeInt(d1); dos.writeInt(d2); dos.writeInt(d3); dos.writeInt(B); dos.writeDouble(beta); dos.writeDouble(normBound); dos.writeInt(signFailTolerance); dos.writeInt(... | /**
* Writes the parameter set to an output stream
*
* @param os an output stream
* @throws IOException
*/ | Writes the parameter set to an output stream | writeTo | {
"repo_name": "xdv/ripple-lib-java",
"path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/pqc/crypto/ntru/NTRUSigningParameters.java",
"license": "isc",
"size": 8452
} | [
"java.io.DataOutputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.DataOutputStream; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,540,534 |
public void updateLocation(Location location) {
sendMessage(UPDATE_LOCATION, 0, location);
} | void function(Location location) { sendMessage(UPDATE_LOCATION, 0, location); } | /**
* This is called to inform us when another location provider returns a location.
* Someday we might use this for network location injection to aid the GPS
*/ | This is called to inform us when another location provider returns a location. Someday we might use this for network location injection to aid the GPS | updateLocation | {
"repo_name": "mateor/pdroid",
"path": "android-4.0.3_r1/trunk/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java",
"license": "gpl-3.0",
"size": 64310
} | [
"android.location.Location"
] | import android.location.Location; | import android.location.*; | [
"android.location"
] | android.location; | 2,640,655 |
@SuppressWarnings("unused")
@Test(expected = IllegalArgumentException.class)
public void testParamWithNoName () {
new Parameter(null, new ArrayList<String>(), false, "does not matter", 0, null);
}
| @SuppressWarnings(STR) @Test(expected = IllegalArgumentException.class) void function () { new Parameter(null, new ArrayList<String>(), false, STR, 0, null); } | /**
* Test that a parameter cannot be created with no name.
*/ | Test that a parameter cannot be created with no name | testParamWithNoName | {
"repo_name": "AlexRNL/Commons",
"path": "src/test/java/com/alexrnl/commons/arguments/ParameterTest.java",
"license": "bsd-3-clause",
"size": 5472
} | [
"java.util.ArrayList",
"org.junit.Test"
] | import java.util.ArrayList; import org.junit.Test; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,428,293 |
public List<Element> getMarkupHeadElements() {
List<Element> markupHeadElements = null;
if (markupHeaders != null) {
markupHeadElements = markupHeaders.get("javax.portlet.markup.head.element");
}
return markupHeadElements == null ? Collections.EMPTY_LIST : markupHeadElements;
} | List<Element> function() { List<Element> markupHeadElements = null; if (markupHeaders != null) { markupHeadElements = markupHeaders.get(STR); } return markupHeadElements == null ? Collections.EMPTY_LIST : markupHeadElements; } | /**
* Returns the list of DOM Elements that are set by the portlet using addProperty method of
* PortletResponse with the property name as "javax.portlet.markup.head.element". If there is no
* DOM elements, it returns an empty list.
* @return the list of the DOM Elements that set by the portlet
*/ | Returns the list of DOM Elements that are set by the portlet using addProperty method of PortletResponse with the property name as "javax.portlet.markup.head.element". If there is no DOM elements, it returns an empty list | getMarkupHeadElements | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Core",
"path": "web-core/src/main/java/com/sun/portal/portletcontainer/invoker/ResponseProperties.java",
"license": "agpl-3.0",
"size": 3979
} | [
"java.util.Collections",
"java.util.List",
"org.w3c.dom.Element"
] | import java.util.Collections; import java.util.List; import org.w3c.dom.Element; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 853,965 |
public void requestClusterDelete(String clusterId, Account account, ClusterOperationRequest request)
throws IOException, IllegalAccessException, MissingEntityException, MissingFieldsException {
Lock lock = lockService.getClusterLock(account.getTenantId(), clusterId);
lock.lock();
try {
Cluster c... | void function(String clusterId, Account account, ClusterOperationRequest request) throws IOException, IllegalAccessException, MissingEntityException, MissingFieldsException { Lock lock = lockService.getClusterLock(account.getTenantId(), clusterId); lock.lock(); try { Cluster cluster = getCluster(clusterId, account); Jo... | /**
* Request deletion of a given cluster that the user has permission to delete.
*
* @param clusterId Id of the cluster to delete.
* @param account Account of the user making the request.
* @param request Request to delete the cluster, containing optional provider fields.
* @throws IOException if the... | Request deletion of a given cluster that the user has permission to delete | requestClusterDelete | {
"repo_name": "caskdata/coopr",
"path": "coopr-server/src/main/java/co/cask/coopr/cluster/ClusterService.java",
"license": "apache-2.0",
"size": 39562
} | [
"co.cask.coopr.account.Account",
"co.cask.coopr.common.queue.Element",
"co.cask.coopr.http.request.ClusterOperationRequest",
"co.cask.coopr.scheduler.ClusterAction",
"co.cask.coopr.scheduler.task.ClusterJob",
"co.cask.coopr.scheduler.task.JobId",
"co.cask.coopr.scheduler.task.MissingEntityException",
... | import co.cask.coopr.account.Account; import co.cask.coopr.common.queue.Element; import co.cask.coopr.http.request.ClusterOperationRequest; import co.cask.coopr.scheduler.ClusterAction; import co.cask.coopr.scheduler.task.ClusterJob; import co.cask.coopr.scheduler.task.JobId; import co.cask.coopr.scheduler.task.Missing... | import co.cask.coopr.account.*; import co.cask.coopr.common.queue.*; import co.cask.coopr.http.request.*; import co.cask.coopr.scheduler.*; import co.cask.coopr.scheduler.task.*; import java.io.*; import java.util.concurrent.locks.*; | [
"co.cask.coopr",
"java.io",
"java.util"
] | co.cask.coopr; java.io; java.util; | 284,949 |
CauseOfBlockage getCauseOfBlockage(); | CauseOfBlockage getCauseOfBlockage(); | /**
* If the execution of this task should be blocked for temporary reasons,
* this method returns a non-null object explaining why.
*
* <p>
* Otherwise this method returns null, indicating that the build can proceed right away.
*
* <p>
* This can ... | If the execution of this task should be blocked for temporary reasons, this method returns a non-null object explaining why. Otherwise this method returns null, indicating that the build can proceed right away. This can be used to define mutual exclusion that goes beyond <code>#getResourceList()</code> | getCauseOfBlockage | {
"repo_name": "alvarolobato/jenkins",
"path": "core/src/main/java/hudson/model/Queue.java",
"license": "mit",
"size": 108236
} | [
"hudson.model.queue.CauseOfBlockage"
] | import hudson.model.queue.CauseOfBlockage; | import hudson.model.queue.*; | [
"hudson.model.queue"
] | hudson.model.queue; | 1,476,292 |
public static String[] getActiveProfiles(Environment env) {
String[] profiles = env.getActiveProfiles();
if (profiles.length == 0) {
return env.getDefaultProfiles();
}
return profiles;
} | static String[] function(Environment env) { String[] profiles = env.getActiveProfiles(); if (profiles.length == 0) { return env.getDefaultProfiles(); } return profiles; } | /**
* Get the profiles that are applied else get default profiles.
*
* @param env spring environment
* @return profiles
*/ | Get the profiles that are applied else get default profiles | getActiveProfiles | {
"repo_name": "RADAR-CNS/ManagementPortal",
"path": "src/main/java/org/radarcns/management/config/DefaultProfileUtil.java",
"license": "apache-2.0",
"size": 1747
} | [
"org.springframework.core.env.Environment"
] | import org.springframework.core.env.Environment; | import org.springframework.core.env.*; | [
"org.springframework.core"
] | org.springframework.core; | 186,907 |
@Test
public void getWindingList() {
List<Vector2> points = new ArrayList<Vector2>();
points.add(new Vector2(-1.0, -1.0));
points.add(new Vector2(1.0, -1.0));
points.add(new Vector2(1.0, 1.0));
points.add(new Vector2(-1.0, 1.0));
TestCase.assertTrue(Geometry.getWinding(points) > 0);
Collec... | void function() { List<Vector2> points = new ArrayList<Vector2>(); points.add(new Vector2(-1.0, -1.0)); points.add(new Vector2(1.0, -1.0)); points.add(new Vector2(1.0, 1.0)); points.add(new Vector2(-1.0, 1.0)); TestCase.assertTrue(Geometry.getWinding(points) > 0); Collections.reverse(points); TestCase.assertTrue(Geomet... | /**
* Tests the getWinding method passing a list.
*/ | Tests the getWinding method passing a list | getWindingList | {
"repo_name": "satishbabusee/dyn4j",
"path": "junit/org/dyn4j/geometry/GeometryTest.java",
"license": "bsd-3-clause",
"size": 54121
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"junit.framework.TestCase",
"org.dyn4j.geometry.Geometry",
"org.dyn4j.geometry.Vector2"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; import junit.framework.TestCase; import org.dyn4j.geometry.Geometry; import org.dyn4j.geometry.Vector2; | import java.util.*; import junit.framework.*; import org.dyn4j.geometry.*; | [
"java.util",
"junit.framework",
"org.dyn4j.geometry"
] | java.util; junit.framework; org.dyn4j.geometry; | 2,796,637 |
public static Graph createDefaultGraph() {
return helper.createDefaultGraph();
} | static Graph function() { return helper.createDefaultGraph(); } | /**
* Creates a new Graph. By default this will deliver a plain in-memory graph,
* but other implementations may deliver graphs with concurrency support and
* other features.
* @return a default graph
* @see #createDefaultModel()
*/ | Creates a new Graph. By default this will deliver a plain in-memory graph, but other implementations may deliver graphs with concurrency support and other features | createDefaultGraph | {
"repo_name": "TopQuadrant/shacl",
"path": "src/main/java/org/topbraid/jenax/util/JenaUtil.java",
"license": "apache-2.0",
"size": 38680
} | [
"org.apache.jena.graph.Graph"
] | import org.apache.jena.graph.Graph; | import org.apache.jena.graph.*; | [
"org.apache.jena"
] | org.apache.jena; | 2,494,848 |
public static TreeDriver getTreeDriver(ComponentOperator operator) {
return (TreeDriver) getDriver(TREE_DRIVER_ID, operator.getClass());
} | static TreeDriver function(ComponentOperator operator) { return (TreeDriver) getDriver(TREE_DRIVER_ID, operator.getClass()); } | /**
* Returns {@code TREE_DRIVER_ID} driver.
*
* @param operator Operator to find driver for.
* @return a driver
* @see #setTreeDriver
*/ | Returns TREE_DRIVER_ID driver | getTreeDriver | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/drivers/DriverManager.java",
"license": "gpl-2.0",
"size": 24726
} | [
"org.netbeans.jemmy.operators.ComponentOperator"
] | import org.netbeans.jemmy.operators.ComponentOperator; | import org.netbeans.jemmy.operators.*; | [
"org.netbeans.jemmy"
] | org.netbeans.jemmy; | 413,341 |
@SuppressWarnings("unchecked")
public void findStartTime() throws CalendarException {
CalendarManagerBean cmb = ControllerUtil.getCalendarManagerBean();
AonCalendar aonCalendar = cmb.getCalendar( this.resource.getCalendar() );
ComponentList cl = aonCalendar.getVEvents(EventCategory.WORK);
if ( cl.si... | @SuppressWarnings(STR) void function() throws CalendarException { CalendarManagerBean cmb = ControllerUtil.getCalendarManagerBean(); AonCalendar aonCalendar = cmb.getCalendar( this.resource.getCalendar() ); ComponentList cl = aonCalendar.getVEvents(EventCategory.WORK); if ( cl.size() > 0 ) { Iterator it = cl.iterator()... | /**
* Finds current resource working start time.
*
* @throws CalendarException
*/ | Finds current resource working start time | findStartTime | {
"repo_name": "Esleelkartea/aon-employee",
"path": "aonemployee_v2.3.0_src/paquetes descomprimidos/aon.ui.planner-2.1.5-sources/com/code/aon/ui/planner/IncidencesController.java",
"license": "gpl-2.0",
"size": 21884
} | [
"com.code.aon.calendar.AonCalendar",
"com.code.aon.calendar.CalendarException",
"com.code.aon.calendar.CalendarUtil",
"com.code.aon.calendar.enumeration.EventCategory",
"java.util.Calendar",
"java.util.Date",
"java.util.Iterator",
"net.fortuna.ical4j.model.ComponentList",
"net.fortuna.ical4j.model.D... | import com.code.aon.calendar.AonCalendar; import com.code.aon.calendar.CalendarException; import com.code.aon.calendar.CalendarUtil; import com.code.aon.calendar.enumeration.EventCategory; import java.util.Calendar; import java.util.Date; import java.util.Iterator; import net.fortuna.ical4j.model.ComponentList; import ... | import com.code.aon.calendar.*; import com.code.aon.calendar.enumeration.*; import java.util.*; import net.fortuna.ical4j.model.*; import net.fortuna.ical4j.model.component.*; | [
"com.code.aon",
"java.util",
"net.fortuna.ical4j"
] | com.code.aon; java.util; net.fortuna.ical4j; | 1,249,488 |
public void setSyncAnchor(SyncAnchor anchor) {
config.setSyncAnchor(anchor);
} | void function(SyncAnchor anchor) { config.setSyncAnchor(anchor); } | /**
* Set the value of the Last Anchor for this source
*/ | Set the value of the Last Anchor for this source | setSyncAnchor | {
"repo_name": "zhangdakun/funasyn",
"path": "externals/java-sdk/sync/src/main/java/com/funambol/sync/client/BaseSyncSource.java",
"license": "agpl-3.0",
"size": 27040
} | [
"com.funambol.sync.SyncAnchor"
] | import com.funambol.sync.SyncAnchor; | import com.funambol.sync.*; | [
"com.funambol.sync"
] | com.funambol.sync; | 1,704,827 |
public static void greaterZero(String name, Integer value)
throws NullPointerException, IllegalArgumentException {
if (Objects.requireNonNull(value, name) <= 0) {
throw new IllegalArgumentException(name + " may not less or equal 0!");
}
} | static void function(String name, Integer value) throws NullPointerException, IllegalArgumentException { if (Objects.requireNonNull(value, name) <= 0) { throw new IllegalArgumentException(name + STR); } } | /**
* Throws a {@code NullPointerExceptions} if value is null or a {@code IllegalArgumentException} if value is <= 0.
*
* @param name the name of the value
* @param value the value to check
*
* @throws NullPointerException if value is null
* @throws IllegalArgumentException if va... | Throws a NullPointerExceptions if value is null or a IllegalArgumentException if value is <= 0 | greaterZero | {
"repo_name": "autermann/SOS",
"path": "core/api/src/main/java/org/n52/sos/cache/CacheValidation.java",
"license": "gpl-2.0",
"size": 4836
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 400,584 |
public int toCharMarshalCost()
{
return Marshal.COST_TO_CHAR;
} | int function() { return Marshal.COST_TO_CHAR; } | /**
* Cost to convert to a character
*/ | Cost to convert to a character | toCharMarshalCost | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/quercus/env/Value.java",
"license": "gpl-2.0",
"size": 58000
} | [
"com.caucho.quercus.marshal.Marshal"
] | import com.caucho.quercus.marshal.Marshal; | import com.caucho.quercus.marshal.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 2,441,487 |
public ServiceFuture<ImageInner> updateAsync(String resourceGroupName, String imageName, ImageUpdate parameters, final ServiceCallback<ImageInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, imageName, parameters), serviceCallback);
} | ServiceFuture<ImageInner> function(String resourceGroupName, String imageName, ImageUpdate parameters, final ServiceCallback<ImageInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, imageName, parameters), serviceCallback); } | /**
* Update an image.
*
* @param resourceGroupName The name of the resource group.
* @param imageName The name of the image.
* @param parameters Parameters supplied to the Update Image operation.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.... | Update an image | updateAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2019_03_01/src/main/java/com/microsoft/azure/management/compute/v2019_03_01/implementation/ImagesInner.java",
"license": "mit",
"size": 66881
} | [
"com.microsoft.azure.management.compute.v2019_03_01.ImageUpdate",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.management.compute.v2019_03_01.ImageUpdate; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.management.compute.v2019_03_01.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,530,380 |
@Test
public void noMinifiedResourceAvailable()
{
MinCountingResourceStreamLocator locator = new MinCountingResourceStreamLocator();
Application.get().getResourceSettings().setResourceStreamLocator(locator);
Application.get().getResourceSettings().setUseMinifiedResources(true);
ResourceReference referenc... | void function() { MinCountingResourceStreamLocator locator = new MinCountingResourceStreamLocator(); Application.get().getResourceSettings().setResourceStreamLocator(locator); Application.get().getResourceSettings().setUseMinifiedResources(true); ResourceReference reference = new JavaScriptResourceReference( MinifiedAw... | /**
* Tests fallback to normal resource when pre-minified is not available
*/ | Tests fallback to normal resource when pre-minified is not available | noMinifiedResourceAvailable | {
"repo_name": "mafulafunk/wicket",
"path": "wicket-core/src/test/java/org/apache/wicket/request/resource/MinifiedAwareResourceReferenceTest.java",
"license": "apache-2.0",
"size": 3194
} | [
"org.apache.wicket.Application",
"org.apache.wicket.core.util.resource.locator.ResourceStreamLocator"
] | import org.apache.wicket.Application; import org.apache.wicket.core.util.resource.locator.ResourceStreamLocator; | import org.apache.wicket.*; import org.apache.wicket.core.util.resource.locator.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 174,432 |
private void parseMagicBranch(ReceiveCommand cmd) throws PermissionBackendException {
logger.atFine().log("Found magic branch %s", cmd.getRefName());
MagicBranchInput magicBranch = new MagicBranchInput(user, cmd, labelTypes, notesMigration);
String ref;
magicBranch.cmdLineParser = optionParserFactory... | void function(ReceiveCommand cmd) throws PermissionBackendException { logger.atFine().log(STR, cmd.getRefName()); MagicBranchInput magicBranch = new MagicBranchInput(user, cmd, labelTypes, notesMigration); String ref; magicBranch.cmdLineParser = optionParserFactory.create(magicBranch); try { ref = magicBranch.parse(rep... | /**
* Parse the magic branch data (refs/for/BRANCH/OPTIONALTOPIC%OPTIONS) into the magicBranch
* member.
*
* <p>Assumes we are handling a magic branch here.
*/ | Parse the magic branch data (refs/for/BRANCH/OPTIONALTOPIC%OPTIONS) into the magicBranch member. Assumes we are handling a magic branch here | parseMagicBranch | {
"repo_name": "WANdisco/gerrit",
"path": "java/com/google/gerrit/server/git/receive/ReceiveCommits.java",
"license": "apache-2.0",
"size": 127680
} | [
"com.google.common.collect.Lists",
"com.google.gerrit.extensions.restapi.AuthException",
"com.google.gerrit.reviewdb.client.BooleanProjectConfig",
"com.google.gerrit.reviewdb.client.Branch",
"com.google.gerrit.reviewdb.client.RefNames",
"com.google.gerrit.server.ChangeUtil",
"com.google.gerrit.server.gi... | import com.google.common.collect.Lists; import com.google.gerrit.extensions.restapi.AuthException; import com.google.gerrit.reviewdb.client.BooleanProjectConfig; import com.google.gerrit.reviewdb.client.Branch; import com.google.gerrit.reviewdb.client.RefNames; import com.google.gerrit.server.ChangeUtil; import com.goo... | import com.google.common.collect.*; import com.google.gerrit.extensions.restapi.*; import com.google.gerrit.reviewdb.client.*; import com.google.gerrit.server.*; import com.google.gerrit.server.git.validators.*; import com.google.gerrit.server.permissions.*; import java.io.*; import java.util.*; import org.eclipse.jgit... | [
"com.google.common",
"com.google.gerrit",
"java.io",
"java.util",
"org.eclipse.jgit",
"org.kohsuke.args4j"
] | com.google.common; com.google.gerrit; java.io; java.util; org.eclipse.jgit; org.kohsuke.args4j; | 1,840,429 |
public void randomTick(World worldIn, BlockPos pos, IBlockState state, Random random)
{
} | void function(World worldIn, BlockPos pos, IBlockState state, Random random) { } | /**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/ | Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.) | randomTick | {
"repo_name": "TorchPowered/Thallium",
"path": "src/main/java/net/minecraft/block/BlockRedstoneTorch.java",
"license": "mit",
"size": 6379
} | [
"java.util.Random",
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.BlockPos",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.world.World; | import java.util.*; import net.minecraft.block.state.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.util",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.util; net.minecraft.world; | 635,433 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.