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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
protected ArrayList<SmsRawData> buildValidRawData(ArrayList<byte[]> messages) {
int count = messages.size();
ArrayList<SmsRawData> ret;
ret = new ArrayList<SmsRawData>(count);
for (int i = 0; i < count; i++) {
byte[] ba = messages.get(i);
if (ba[0] == STATUS... | ArrayList<SmsRawData> function(ArrayList<byte[]> messages) { int count = messages.size(); ArrayList<SmsRawData> ret; ret = new ArrayList<SmsRawData>(count); for (int i = 0; i < count; i++) { byte[] ba = messages.get(i); if (ba[0] == STATUS_ON_ICC_FREE) { ret.add(null); } else { ret.add(new SmsRawData(messages.get(i)));... | /**
* create SmsRawData lists from all sms record byte[]
* Use null to indicate "free" record
*
* @param messages List of message records from EF_SMS.
* @return SmsRawData list of all in-used records
*/ | create SmsRawData lists from all sms record byte[] Use null to indicate "free" record | buildValidRawData | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/frameworks/opt/telephony/src/java/com/android/internal/telephony/IccSmsInterfaceManager.java",
"license": "apache-2.0",
"size": 31411
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,559,587 |
@Nullable
HCOptGroup getOptionGroupAtIndex (@Nonnegative int nIndex); | HCOptGroup getOptionGroupAtIndex (@Nonnegative int nIndex); | /**
* Get the option group at the specified index
*
* @param nIndex
* The index to retrieve. Should always be ≥ 0.
* @return <code>null</code> if no option group is available for the specified
* index.
*/ | Get the option group at the specified index | getOptionGroupAtIndex | {
"repo_name": "phax/ph-oton",
"path": "ph-oton-html/src/main/java/com/helger/html/hc/html/forms/IHCSelect.java",
"license": "apache-2.0",
"size": 6561
} | [
"javax.annotation.Nonnegative"
] | import javax.annotation.Nonnegative; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 792,305 |
if (scope instanceof CaesarScope) {
onType = ((CaesarScope) scope).getSuperRegisterType();
}
try {
super.resolveBindings(scope, bindings);
} catch (Exception e) {
onType = null;
scope.message(IMessage.ERROR, this, "Can't find referenced pointcut");
return;
}
} | if (scope instanceof CaesarScope) { onType = ((CaesarScope) scope).getSuperRegisterType(); } try { super.resolveBindings(scope, bindings); } catch (Exception e) { onType = null; scope.message(IMessage.ERROR, this, STR); return; } } | /**
* Resolve the bindings. If we are in a caesar scope, we try to
* resolve the pointcut in the super type. Otherwise, we just use
* the regular resolving.
*/ | Resolve the bindings. If we are in a caesar scope, we try to resolve the pointcut in the super type. Otherwise, we just use the regular resolving | resolveBindings | {
"repo_name": "tud-stg-lang/caesar-compiler",
"path": "src/org/caesarj/compiler/aspectj/CaesarSuperPointcut.java",
"license": "gpl-2.0",
"size": 2344
} | [
"org.aspectj.bridge.IMessage"
] | import org.aspectj.bridge.IMessage; | import org.aspectj.bridge.*; | [
"org.aspectj.bridge"
] | org.aspectj.bridge; | 1,483,520 |
private Pointer getRmvarPointer(String opcode, long size) {
if (rmvarGPUPointers.containsKey(size)) {
if(LOG.isTraceEnabled())
LOG.trace("Getting rmvar-ed pointers for size:" + size);
long t0 = opcode != null && DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;
Pointer A = remove(rmvarGPUPoin... | Pointer function(String opcode, long size) { if (rmvarGPUPointers.containsKey(size)) { if(LOG.isTraceEnabled()) LOG.trace(STR + size); long t0 = opcode != null && DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0; Pointer A = remove(rmvarGPUPointers, size); addMiscTime(opcode, GPUInstruction.MISC_TIMER_REUSE, t0... | /**
* Get any pointer of the given size from rmvar-ed pointers (applicable if eager cudaFree is set to false)
*
* @param opcode opcode
* @param size size in bytes
* @return pointer
*/ | Get any pointer of the given size from rmvar-ed pointers (applicable if eager cudaFree is set to false) | getRmvarPointer | {
"repo_name": "dusenberrymw/systemml",
"path": "src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUMemoryManager.java",
"license": "apache-2.0",
"size": 19831
} | [
"org.apache.sysml.api.DMLScript",
"org.apache.sysml.runtime.instructions.gpu.GPUInstruction"
] | import org.apache.sysml.api.DMLScript; import org.apache.sysml.runtime.instructions.gpu.GPUInstruction; | import org.apache.sysml.api.*; import org.apache.sysml.runtime.instructions.gpu.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 2,597,332 |
public final Property<String> leftExtrapolatorName() {
return metaBean().leftExtrapolatorName().createProperty(this);
} | final Property<String> function() { return metaBean().leftExtrapolatorName().createProperty(this); } | /**
* Gets the the {@code leftExtrapolatorName} property.
* @return the property, not null
*/ | Gets the the leftExtrapolatorName property | leftExtrapolatorName | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/curve/InterpolatedCurveDefinition.java",
"license": "apache-2.0",
"size": 12758
} | [
"org.joda.beans.Property"
] | import org.joda.beans.Property; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 851,212 |
void setParams(HttpParams params); | void setParams(HttpParams params); | /**
* Provides parameters to be used for the processing of this message.
* @param params the parameters
*/ | Provides parameters to be used for the processing of this message | setParams | {
"repo_name": "alinvasile/httpcore",
"path": "httpcore/src/main/java/org/apache/http/HttpMessage.java",
"license": "apache-2.0",
"size": 6869
} | [
"org.apache.http.params.HttpParams"
] | import org.apache.http.params.HttpParams; | import org.apache.http.params.*; | [
"org.apache.http"
] | org.apache.http; | 2,257,876 |
protected Object readExternalFormFromDisk(final String path) throws IOException, ClassNotFoundException {
final FileInputStream stream = new FileInputStream(path);
return readExternalFormFromStream(stream);
} | Object function(final String path) throws IOException, ClassNotFoundException { final FileInputStream stream = new FileInputStream(path); return readExternalFormFromStream(stream); } | /**
* Reads a Serialized or Externalized Object from disk.
* Useful for creating compatibility tests between
* different SVN versions of the same class
*
* @param path path to the serialized Object
* @return the Object at the given path
* @exception IOException
* @exception Class... | Reads a Serialized or Externalized Object from disk. Useful for creating compatibility tests between different SVN versions of the same class | readExternalFormFromDisk | {
"repo_name": "krivachy/compgs03_mutation_testing",
"path": "src/test/java/org/apache/commons/collections4/AbstractObjectTest.java",
"license": "apache-2.0",
"size": 12303
} | [
"java.io.FileInputStream",
"java.io.IOException"
] | import java.io.FileInputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 419,764 |
private int getFileAttributes(File file) throws ZipException {
if (file == null) {
throw new ZipException("input file is null, cannot get file attributes");
}
if (!file.exists()) {
return 0;
}
if (file.isDirectory()) {
if (file.isHidden()) {
return InternalZipConstants.FOLDER_... | int function(File file) throws ZipException { if (file == null) { throw new ZipException(STR); } if (!file.exists()) { return 0; } if (file.isDirectory()) { if (file.isHidden()) { return InternalZipConstants.FOLDER_MODE_HIDDEN; } else { return InternalZipConstants.FOLDER_MODE_NONE; } } else { if (!file.canWrite() && fi... | /**
* Checks the file attributes and returns an integer
* @param file
* @return
* @throws ZipException
*/ | Checks the file attributes and returns an integer | getFileAttributes | {
"repo_name": "blinkboxbooks/android-ePub-Library",
"path": "src/main/java/net/lingala/zip4j/io/CipherOutputStream.java",
"license": "mit",
"size": 20480
} | [
"java.io.File",
"net.lingala.zip4j.exception.ZipException",
"net.lingala.zip4j.util.InternalZipConstants"
] | import java.io.File; import net.lingala.zip4j.exception.ZipException; import net.lingala.zip4j.util.InternalZipConstants; | import java.io.*; import net.lingala.zip4j.exception.*; import net.lingala.zip4j.util.*; | [
"java.io",
"net.lingala.zip4j"
] | java.io; net.lingala.zip4j; | 1,389,664 |
private void addLockedRelatedResources(String resName, CmsLockFilter filter, Set<String> lockedResources) {
try {
// get and iterate over all related resources
Iterator<CmsRelation> itRelations = getCms().getRelationsForResource(
resName,
CmsRelationF... | void function(String resName, CmsLockFilter filter, Set<String> lockedResources) { try { Iterator<CmsRelation> itRelations = getCms().getRelationsForResource( resName, CmsRelationFilter.TARGETS.filterStrong().filterIncludeChildren()).iterator(); while (itRelations.hasNext()) { CmsRelation relation = itRelations.next();... | /**
* Returns a set of locked unpublished related resources.<p>
*
* @param resName the resource to check the related resources for
* @param filter the lock filter to use
* @param lockedResources a set of site relative paths, of locked resources to exclude
*/ | Returns a set of locked unpublished related resources | addLockedRelatedResources | {
"repo_name": "sbonoc/opencms-core",
"path": "src/org/opencms/workplace/commons/CmsLock.java",
"license": "lgpl-2.1",
"size": 37364
} | [
"java.util.Iterator",
"java.util.Set",
"org.opencms.file.CmsResource",
"org.opencms.file.CmsResourceFilter",
"org.opencms.lock.CmsLockFilter",
"org.opencms.main.CmsException",
"org.opencms.relations.CmsRelation",
"org.opencms.relations.CmsRelationFilter"
] | import java.util.Iterator; import java.util.Set; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.lock.CmsLockFilter; import org.opencms.main.CmsException; import org.opencms.relations.CmsRelation; import org.opencms.relations.CmsRelationFilter; | import java.util.*; import org.opencms.file.*; import org.opencms.lock.*; import org.opencms.main.*; import org.opencms.relations.*; | [
"java.util",
"org.opencms.file",
"org.opencms.lock",
"org.opencms.main",
"org.opencms.relations"
] | java.util; org.opencms.file; org.opencms.lock; org.opencms.main; org.opencms.relations; | 2,266,128 |
public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) {
} | void function(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) { } | /**
* Sets the raw JSON object
*
* @param serializer the serializer
* @param json the JSON object to set this object to
*/ | Sets the raw JSON object | setRawObject | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/models/WorkbookChartDataLabels.java",
"license": "mit",
"size": 3819
} | [
"com.google.gson.JsonObject",
"com.microsoft.graph.serializer.ISerializer",
"javax.annotation.Nonnull"
] | import com.google.gson.JsonObject; import com.microsoft.graph.serializer.ISerializer; import javax.annotation.Nonnull; | import com.google.gson.*; import com.microsoft.graph.serializer.*; import javax.annotation.*; | [
"com.google.gson",
"com.microsoft.graph",
"javax.annotation"
] | com.google.gson; com.microsoft.graph; javax.annotation; | 432,333 |
public void clear(Context context){
claims.clear();
notifyViews(context);
} | void function(Context context){ claims.clear(); notifyViews(context); } | /**
* Clears the map between claims and id
*
* @param context Needed for file IO
*/ | Clears the map between claims and id | clear | {
"repo_name": "CMPUT301W15T05/TrackerExpress",
"path": "TrackerExpress/src/group5/trackerexpress/ClaimList.java",
"license": "mit",
"size": 7592
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,787,180 |
public VtiSortField getSortFieldValue(String sortFieldValue)
{
return VtiSortField.value(sortFieldValue);
}
| VtiSortField function(String sortFieldValue) { return VtiSortField.value(sortFieldValue); } | /**
* <p>Cast String to VtiSortField</p>
*
* @param sortFieldValue
* @return
*/ | Cast String to VtiSortField | getSortFieldValue | {
"repo_name": "loftuxab/community-edition-old",
"path": "modules/sharepoint/amp/source/java/org/alfresco/module/vti/metadata/dialog/DialogUtils.java",
"license": "lgpl-3.0",
"size": 3305
} | [
"org.alfresco.module.vti.metadata.dic.VtiSortField"
] | import org.alfresco.module.vti.metadata.dic.VtiSortField; | import org.alfresco.module.vti.metadata.dic.*; | [
"org.alfresco.module"
] | org.alfresco.module; | 1,779,532 |
@Before
public void setup() {
this.jobPersistenceService = Mockito.mock(JobPersistenceService.class);
this.jobKillService = Mockito.mock(JobKillService.class);
this.jobStateService = Mockito.mock(JobStateService.class);
this.jobSearchService = Mockito.mock(JobSearchService.class)... | void function() { this.jobPersistenceService = Mockito.mock(JobPersistenceService.class); this.jobKillService = Mockito.mock(JobKillService.class); this.jobStateService = Mockito.mock(JobStateService.class); this.jobSearchService = Mockito.mock(JobSearchService.class); this.jobsProperties = new JobsProperties(); this.j... | /**
* Setup for the tests.
*/ | Setup for the tests | setup | {
"repo_name": "irontable/genie",
"path": "genie-core/src/test/java/com/netflix/genie/core/services/impl/JobCoordinatorServiceImplUnitTests.java",
"license": "apache-2.0",
"size": 35652
} | [
"com.google.common.collect.Lists",
"com.netflix.genie.core.properties.JobsProperties",
"com.netflix.genie.core.services.ApplicationService",
"com.netflix.genie.core.services.ClusterLoadBalancer",
"com.netflix.genie.core.services.ClusterService",
"com.netflix.genie.core.services.CommandService",
"com.net... | import com.google.common.collect.Lists; import com.netflix.genie.core.properties.JobsProperties; import com.netflix.genie.core.services.ApplicationService; import com.netflix.genie.core.services.ClusterLoadBalancer; import com.netflix.genie.core.services.ClusterService; import com.netflix.genie.core.services.CommandSer... | import com.google.common.collect.*; import com.netflix.genie.core.properties.*; import com.netflix.genie.core.services.*; import com.netflix.spectator.api.*; import org.mockito.*; | [
"com.google.common",
"com.netflix.genie",
"com.netflix.spectator",
"org.mockito"
] | com.google.common; com.netflix.genie; com.netflix.spectator; org.mockito; | 1,634,156 |
if(core !=null){
try {
core.sendSMS(number, messages);
} catch (InvalidConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} | if(core !=null){ try { core.sendSMS(number, messages); } catch (InvalidConfigurationException e) { e.printStackTrace(); } } } | /**
* method that allow you to send SMS
* @param number destination phone number
* @param messages text message
*
*/ | method that allow you to send SMS | sendSmS | {
"repo_name": "daloji/UsbDongle",
"path": "src/com/daloji/dongle/UsbDongle.java",
"license": "gpl-3.0",
"size": 1637
} | [
"com.daloji.dongle.InvalidConfigurationException"
] | import com.daloji.dongle.InvalidConfigurationException; | import com.daloji.dongle.*; | [
"com.daloji.dongle"
] | com.daloji.dongle; | 430,622 |
@NotAuditable
public List<String> getInvitationServiceWorkflowNames();
@Auditable(parameters = {"inviteeUserName",
"resourceType",
"resourceName",
"inviteeRole",
"acceptUrl",
"rejectUrl"})
| List<String> function(); @Auditable(parameters = {STR, STR, STR, STR, STR, STR}) | /**
* Get the names of the workflows managed by the invitation service.
*
* @return the names of the workkflows managed by the invitation service.
*/ | Get the names of the workflows managed by the invitation service | getInvitationServiceWorkflowNames | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/repository/source/java/org/alfresco/service/cmr/invitation/InvitationService.java",
"license": "lgpl-3.0",
"size": 9656
} | [
"java.util.List",
"org.alfresco.service.Auditable"
] | import java.util.List; import org.alfresco.service.Auditable; | import java.util.*; import org.alfresco.service.*; | [
"java.util",
"org.alfresco.service"
] | java.util; org.alfresco.service; | 1,629,346 |
protected void setNodeConcurrentToNodes(Node n, Collection<Node> nodes) {
for(Node n2 : nodes) {
setNodesConcurrent(n,n2);
}
}
| void function(Node n, Collection<Node> nodes) { for(Node n2 : nodes) { setNodesConcurrent(n,n2); } } | /**
* Set all a node and all nodes in a collection concurrent.
* @param a single node
* @param a collection of nodes
*/ | Set all a node and all nodes in a collection concurrent | setNodeConcurrentToNodes | {
"repo_name": "jbpt/codebase",
"path": "jbpt-petri/src/main/java/org/jbpt/petri/behavior/ConcurrencyRelation.java",
"license": "lgpl-3.0",
"size": 9352
} | [
"java.util.Collection",
"org.jbpt.petri.Node"
] | import java.util.Collection; import org.jbpt.petri.Node; | import java.util.*; import org.jbpt.petri.*; | [
"java.util",
"org.jbpt.petri"
] | java.util; org.jbpt.petri; | 2,292,287 |
public static ims.core.vo.PatientCoreClinicalDataVo insert(DomainObjectMap map, ims.core.vo.PatientCoreClinicalDataVo valueObject, ims.core.clinical.domain.objects.PatientCoreClinicalData domainObject)
{
if (null == domainObject)
{
return valueObject;
}
if (null == map)
{
map = new ... | static ims.core.vo.PatientCoreClinicalDataVo function(DomainObjectMap map, ims.core.vo.PatientCoreClinicalDataVo valueObject, ims.core.clinical.domain.objects.PatientCoreClinicalData domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_Pat... | /**
* Update the ValueObject with the Domain Object.
* @param map DomainObjectMap of DomainObjects to already created ValueObjects.
* @param valueObject to be updated
* @param domainObject ims.core.clinical.domain.objects.PatientCoreClinicalData
*/ | Update the ValueObject with the Domain Object | insert | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/PatientCoreClinicalDataVoAssembler.java",
"license": "agpl-3.0",
"size": 27512
} | [
"org.hibernate.proxy.HibernateProxy"
] | import org.hibernate.proxy.HibernateProxy; | import org.hibernate.proxy.*; | [
"org.hibernate.proxy"
] | org.hibernate.proxy; | 2,467,105 |
public Document passwordDecrypt(Document cryptedDocument); | Document function(Document cryptedDocument); | /**
* Symmetrical decrypting of a XML document, using local password.
*
* @param cryptedDocument an XML document, encrypted using local password.
*
* @return the uncrypted XML document.
*/ | Symmetrical decrypting of a XML document, using local password | passwordDecrypt | {
"repo_name": "jbgi/replics",
"path": "src/replics/data/ISecurityProvider.java",
"license": "gpl-3.0",
"size": 3683
} | [
"org.w3c.dom.Document"
] | import org.w3c.dom.Document; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,416,916 |
public static <T> Collection<T> copy(Collection<T> to, Iterable<? extends T> from,
@Nullable IgnitePredicate<? super T>... p) {
A.notNull(to, "to", from, "from");
if (!isAlwaysFalse(p)) {
for (T t : from) {
if (isAll(t, p))
to.add(t);
... | static <T> Collection<T> function(Collection<T> to, Iterable<? extends T> from, @Nullable IgnitePredicate<? super T>... p) { A.notNull(to, "to", from, "from"); if (!isAlwaysFalse(p)) { for (T t : from) { if (isAll(t, p)) to.add(t); } } return to; } | /**
* Adds (copies) to given collection using provided predicates. Element is copied if all
* predicates evaluate to {@code true}.
*
* @param to Collection to copy to.
* @param from Collection to copy from.
* @param p Optional set of predicates to use for filtration.
* @param <T> Type... | Adds (copies) to given collection using provided predicates. Element is copied if all predicates evaluate to true | copy | {
"repo_name": "dlnufox/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java",
"license": "apache-2.0",
"size": 157742
} | [
"java.util.Collection",
"org.apache.ignite.internal.util.typedef.internal.A",
"org.apache.ignite.lang.IgnitePredicate",
"org.jetbrains.annotations.Nullable"
] | import java.util.Collection; import org.apache.ignite.internal.util.typedef.internal.A; import org.apache.ignite.lang.IgnitePredicate; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.apache.ignite",
"org.jetbrains.annotations"
] | java.util; org.apache.ignite; org.jetbrains.annotations; | 1,670,046 |
@Override
public void onNothingSelected(AdapterView<?> parent) {
if (DBG) {
Log.d(LOG_TAG, "onNothingSelected()");
}
}
}; | void function(AdapterView<?> parent) { if (DBG) { Log.d(LOG_TAG, STR); } } }; | /**
* Implements OnItemSelectedListener
*/ | Implements OnItemSelectedListener | onNothingSelected | {
"repo_name": "the-diamond-dogs-group-oss/ActionBarSherlock",
"path": "actionbarsherlock/src/com/actionbarsherlock/widget/SearchView.java",
"license": "apache-2.0",
"size": 62724
} | [
"android.util.Log",
"android.widget.AdapterView"
] | import android.util.Log; import android.widget.AdapterView; | import android.util.*; import android.widget.*; | [
"android.util",
"android.widget"
] | android.util; android.widget; | 1,668,748 |
long getStreamPosition() throws IOException; | long getStreamPosition() throws IOException; | /**
* Returns the current byte position of the stream. The next read
* will take place starting at this offset.
*
* @return a long containing the position of the stream.
*
* @exception IOException if an I/O error occurs.
*/ | Returns the current byte position of the stream. The next read will take place starting at this offset | getStreamPosition | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/javax/imageio/stream/ImageInputStream.java",
"license": "apache-2.0",
"size": 38898
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,368,109 |
@Override
public void getFeedbackStrings(IContainer container, Point screenPoint,
Point2D.Double worldPoint, List<String> feedbackStrings) {
super.getFeedbackStrings(container, screenPoint, worldPoint,
feedbackStrings);
} | void function(IContainer container, Point screenPoint, Point2D.Double worldPoint, List<String> feedbackStrings) { super.getFeedbackStrings(container, screenPoint, worldPoint, feedbackStrings); } | /**
* Some view specific feedback. Should always call super.getFeedbackStrings
* first.
*
* Currently does not do anything but use the super call.
*
* @param container
* the base container for the view.
* @param screenPoint
* the pixel point
* @param worldPoint
* ... | Some view specific feedback. Should always call super.getFeedbackStrings first. Currently does not do anything but use the super call | getFeedbackStrings | {
"repo_name": "licastra/bed",
"path": "src/infn/bed/view/BarSideView.java",
"license": "mit",
"size": 8398
} | [
"java.awt.Point",
"java.awt.geom.Point2D",
"java.util.List"
] | import java.awt.Point; import java.awt.geom.Point2D; import java.util.List; | import java.awt.*; import java.awt.geom.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 325,402 |
public synchronized Plugin[] globalHookFetch(String event)
{
ArrayList<Plugin> result = registerGlobalEvents.get(event);
return result == null ? new Plugin[0] : result.toArray(new Plugin[result.size()]);
} | synchronized Plugin[] function(String event) { ArrayList<Plugin> result = registerGlobalEvents.get(event); return result == null ? new Plugin[0] : result.toArray(new Plugin[result.size()]); } | /**
* Fetches all of the plugins hooked to an event.
*
* @param event The name of the global event.
* @return All of the plugins registered to an event, or an empty array.
* @since 1.0
*/ | Fetches all of the plugins hooked to an event | globalHookFetch | {
"repo_name": "limpygnome/pals",
"path": "Base/src/pals/base/PluginManager.java",
"license": "mit",
"size": 31892
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 700,028 |
public static <T> DataSet<Tuple2<T, Long>> groupByFromTuple(DataSet<Tuple1<T>> dataSet) {
return dataSet
.map(new Tuple2FromTupleWithObjectAnd1L<>())
.groupBy(0)
.sum(1);
} | static <T> DataSet<Tuple2<T, Long>> function(DataSet<Tuple1<T>> dataSet) { return dataSet .map(new Tuple2FromTupleWithObjectAnd1L<>()) .groupBy(0) .sum(1); } | /**
* Groups the input dataset by the contained elements and counts the elements
* per group. Returns a {@link Tuple2} containing the group element and the corresponding
* count value.
*
* @param dataSet input dataset containing tuples
* @param <T> element type in input dataset
* @return {@link Tup... | Groups the input dataset by the contained elements and counts the elements per group. Returns a <code>Tuple2</code> containing the group element and the corresponding count value | groupByFromTuple | {
"repo_name": "p3et/gradoop",
"path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/count/Count.java",
"license": "apache-2.0",
"size": 3447
} | [
"org.apache.flink.api.java.DataSet",
"org.apache.flink.api.java.tuple.Tuple1",
"org.apache.flink.api.java.tuple.Tuple2",
"org.gradoop.flink.model.impl.operators.count.functions.Tuple2FromTupleWithObjectAnd1L"
] | import org.apache.flink.api.java.DataSet; import org.apache.flink.api.java.tuple.Tuple1; import org.apache.flink.api.java.tuple.Tuple2; import org.gradoop.flink.model.impl.operators.count.functions.Tuple2FromTupleWithObjectAnd1L; | import org.apache.flink.api.java.*; import org.apache.flink.api.java.tuple.*; import org.gradoop.flink.model.impl.operators.count.functions.*; | [
"org.apache.flink",
"org.gradoop.flink"
] | org.apache.flink; org.gradoop.flink; | 669,693 |
public static void deleteNodeRecursively(ZooKeeperWatcher zkw, String node)
throws KeeperException {
try {
List<String> children = ZKUtil.listChildrenNoWatch(zkw, node);
// the node is already deleted, so we just finish
if (children == null) return;
if(!children.isEmpty()) {
for... | static void function(ZooKeeperWatcher zkw, String node) throws KeeperException { try { List<String> children = ZKUtil.listChildrenNoWatch(zkw, node); if (children == null) return; if(!children.isEmpty()) { for(String child : children) { deleteNodeRecursively(zkw, joinZNode(node, child)); } } zkw.getRecoverableZooKeeper... | /**
* Delete the specified node and all of it's children.
* <p>
* If the node does not exist, just returns.
* <p>
* Sets no watches. Throws all exceptions besides dealing with deletion of
* children.
*/ | Delete the specified node and all of it's children. If the node does not exist, just returns. Sets no watches. Throws all exceptions besides dealing with deletion of children | deleteNodeRecursively | {
"repo_name": "JichengSong/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java",
"license": "apache-2.0",
"size": 60570
} | [
"java.util.List",
"org.apache.zookeeper.KeeperException"
] | import java.util.List; import org.apache.zookeeper.KeeperException; | import java.util.*; import org.apache.zookeeper.*; | [
"java.util",
"org.apache.zookeeper"
] | java.util; org.apache.zookeeper; | 1,316,328 |
public String removeLeadingPath(File leading, File path) {
String l = normalize(leading.getAbsolutePath()).getAbsolutePath();
String p = normalize(path.getAbsolutePath()).getAbsolutePath();
if (l.equals(p)) {
return "";
}
// ensure that l ends with a /
// ... | String function(File leading, File path) { String l = normalize(leading.getAbsolutePath()).getAbsolutePath(); String p = normalize(path.getAbsolutePath()).getAbsolutePath(); if (l.equals(p)) { return ""; } if (!l.endsWith(File.separator)) { l += File.separator; } return (p.startsWith(l)) ? p.substring(l.length()) : p; ... | /**
* Removes a leading path from a second path.
*
* @param leading The leading path, must not be null, must be absolute.
* @param path The path to remove from, must not be null, must be absolute.
*
* @return path's normalized absolute if it doesn't start with leading; path's path with lea... | Removes a leading path from a second path | removeLeadingPath | {
"repo_name": "sirkkalap/DependencyCheck",
"path": "dependency-check-utils/src/main/java/org/owasp/dependencycheck/org/apache/tools/ant/util/FileUtils.java",
"license": "apache-2.0",
"size": 67828
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,975,201 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
lblTitle = new javax.swing.JLabel();
showInMapButton = new javax.swing.JButton();
... | @SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); showInMapButton = new javax.swing.JButton(); csoTableScrollPane = new javax.swing.JScrollPane(); csoTable = new javax.swing.JTable(); setOpaque(false); setLayout(new java.awt.GridBagLayout()); l... | /**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The
* content of this method is always regenerated by the Form Editor.
*/ | content of this method is always regenerated by the Form Editor | initComponents | {
"repo_name": "cismet/cids-custom-sudplan-linz",
"path": "src/main/java/de/cismet/cids/custom/sudplan/linz/SwmmOutputManagerUI.java",
"license": "lgpl-3.0",
"size": 12911
} | [
"java.awt.Color",
"javax.swing.JTable",
"org.openide.util.NbBundle"
] | import java.awt.Color; import javax.swing.JTable; import org.openide.util.NbBundle; | import java.awt.*; import javax.swing.*; import org.openide.util.*; | [
"java.awt",
"javax.swing",
"org.openide.util"
] | java.awt; javax.swing; org.openide.util; | 2,677,653 |
protected void sequence_ShiftExpression(EObject context, ShiftExpression semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(EObject context, ShiftExpression semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Constraint:
* (leftExpr=AdditiveExpression (op=SHIFT_OPERATION rightExpr=ShiftExpression)?)
*/ | Constraint: (leftExpr=AdditiveExpression (op=SHIFT_OPERATION rightExpr=ShiftExpression)?) | sequence_ShiftExpression | {
"repo_name": "StephaneSeyvoz/mindEd",
"path": "org.ow2.mindEd.itf.editor.textual.model/src-gen/org/ow2/mindEd/itf/editor/textual/serializer/FractalItfSemanticSequencer.java",
"license": "lgpl-3.0",
"size": 26338
} | [
"org.eclipse.emf.ecore.EObject",
"org.ow2.mindEd.itf.editor.textual.fractalIDL.ShiftExpression"
] | import org.eclipse.emf.ecore.EObject; import org.ow2.mindEd.itf.editor.textual.fractalIDL.ShiftExpression; | import org.eclipse.emf.ecore.*; import org.ow2.*; | [
"org.eclipse.emf",
"org.ow2"
] | org.eclipse.emf; org.ow2; | 480,658 |
//
// private static Location tempLoc;
public static void manageData() {
try {
Iterator<TRLimiter> it = limiters.iteratorLOCKED(false);
while (it.hasNext()){
final TRLimiter lb = it.next();
boolean changed = false;
for (final TRLimit l : lb.itemlimits) {
try {
final Iterator<TRLocat... | static void function() { try { Iterator<TRLimiter> it = limiters.iteratorLOCKED(false); while (it.hasNext()){ final TRLimiter lb = it.next(); boolean changed = false; for (final TRLimit l : lb.itemlimits) { try { final Iterator<TRLocation> it2 = l.placedBlock.iterator(); while (it2.hasNext()){ final TRLocation loc = it... | /**
* Manages and removes bad data.
* Determines if the limit exists at a location. If not, remove it.
* Called by limiter manager
*/ | Manages and removes bad data. Determines if the limit exists at a location. If not, remove it. Called by limiter manager | manageData | {
"repo_name": "EterniaLogic/TekkitRestrict",
"path": "TekkitRestrict/src/nl/taico/tekkitrestrict/functions/TRLimiter.java",
"license": "gpl-3.0",
"size": 25987
} | [
"java.util.ConcurrentModificationException",
"java.util.Iterator",
"nl.taico.tekkitrestrict.objects.TRLimit",
"nl.taico.tekkitrestrict.objects.TRLocation",
"org.bukkit.Chunk",
"org.bukkit.block.Block"
] | import java.util.ConcurrentModificationException; import java.util.Iterator; import nl.taico.tekkitrestrict.objects.TRLimit; import nl.taico.tekkitrestrict.objects.TRLocation; import org.bukkit.Chunk; import org.bukkit.block.Block; | import java.util.*; import nl.taico.tekkitrestrict.objects.*; import org.bukkit.*; import org.bukkit.block.*; | [
"java.util",
"nl.taico.tekkitrestrict",
"org.bukkit",
"org.bukkit.block"
] | java.util; nl.taico.tekkitrestrict; org.bukkit; org.bukkit.block; | 1,645,277 |
public StringDataValue getClobDataValue(String value,
StringDataValue previous, int collationType)
throws StandardException
{
if (collationType == StringDataValue.COLLATION_TYPE_UCS_BASIC)
return getClobDataValue(value, previous);
... | StringDataValue function(String value, StringDataValue previous, int collationType) throws StandardException { if (collationType == StringDataValue.COLLATION_TYPE_UCS_BASIC) return getClobDataValue(value, previous); if (previous == null) return new CollatorSQLClob(value, getCharacterCollator(collationType)); previous.s... | /**
* Return a StringDataValue to represent a SQL CLOB
* with the given collation re-using previous if not null.
*/ | Return a StringDataValue to represent a SQL CLOB with the given collation re-using previous if not null | getClobDataValue | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.engine/org/apache/derby/iapi/types/DataValueFactoryImpl.java",
"license": "apache-2.0",
"size": 43682
} | [
"org.apache.derby.shared.common.error.StandardException"
] | import org.apache.derby.shared.common.error.StandardException; | import org.apache.derby.shared.common.error.*; | [
"org.apache.derby"
] | org.apache.derby; | 2,393,635 |
@Test
public void lsReportMessageTest10() throws PcepParseException, PcepOutOfBoundMessageException {
byte[] lsReportMsg = new byte[]{0x20, (byte) 0xE0, 0x00, 0x68, // common header
(byte) 0xE0, 0x10, 0x00, 0x64, // LS Object Header
0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x... | void function() throws PcepParseException, PcepOutOfBoundMessageException { byte[] lsReportMsg = new byte[]{0x20, (byte) 0xE0, 0x00, 0x68, (byte) 0xE0, 0x10, 0x00, 0x64, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, (byte) 0xFF, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,... | /**
* This test case checks for
* LS Object (Routing Universe TLV,Local Node Descriptors TLV(AutonomousSystemSubTlv, BGPLSidentifierSubTlv
* OSPFareaIDsubTlv, IgpRouterIdSubTlv), RemoteNodeDescriptorsTLV(BGPLSidentifierSubTlv
* OSPFareaIDsubTlv, IgpRouterIdSubTlv))
* in PcLSRpt message.
*/ | This test case checks for LS Object (Routing Universe TLV,Local Node Descriptors TLV(AutonomousSystemSubTlv, BGPLSidentifierSubTlv OSPFareaIDsubTlv, IgpRouterIdSubTlv), RemoteNodeDescriptorsTLV(BGPLSidentifierSubTlv OSPFareaIDsubTlv, IgpRouterIdSubTlv)) in PcLSRpt message | lsReportMessageTest10 | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepLSReportMsgTest.java",
"license": "apache-2.0",
"size": 73490
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.hamcrest.core.Is",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException",
"org.onosproject.pcepio.exceptions.PcepParseException"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcepio.exceptions.PcepParseException; | import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*; | [
"org.hamcrest",
"org.hamcrest.core",
"org.jboss.netty",
"org.onosproject.pcepio"
] | org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio; | 1,653,744 |
private static String resolveIdentity(ResourceAddress address, Subject subject) {
IdentityResolver resolver = address.getOption(IDENTITY_RESOLVER);
ResourceAddress transport = address.getTransport();
if (resolver != null) {
return resolver.resolve(subject);
}
if (... | static String function(ResourceAddress address, Subject subject) { IdentityResolver resolver = address.getOption(IDENTITY_RESOLVER); ResourceAddress transport = address.getTransport(); if (resolver != null) { return resolver.resolve(subject); } if (transport != null) { return resolveIdentity(transport, subject); } retu... | /**
* Method attempting to perform identity resolution based on the provided subject parameter and transport
* It is attempted to perform the resolution from the highest to the lowest layer, recursively.
* @param address
* @param subject
* @return
*/ | Method attempting to perform identity resolution based on the provided subject parameter and transport It is attempted to perform the resolution from the highest to the lowest layer, recursively | resolveIdentity | {
"repo_name": "justinma246/gateway",
"path": "transport/spi/src/main/java/org/kaazing/gateway/transport/LoggingFilter.java",
"license": "apache-2.0",
"size": 19651
} | [
"javax.security.auth.Subject",
"org.kaazing.gateway.resource.address.IdentityResolver",
"org.kaazing.gateway.resource.address.ResourceAddress"
] | import javax.security.auth.Subject; import org.kaazing.gateway.resource.address.IdentityResolver; import org.kaazing.gateway.resource.address.ResourceAddress; | import javax.security.auth.*; import org.kaazing.gateway.resource.address.*; | [
"javax.security",
"org.kaazing.gateway"
] | javax.security; org.kaazing.gateway; | 1,359,866 |
public DateTime revertActionInitiatedTime() {
return this.revertActionInitiatedTime;
} | DateTime function() { return this.revertActionInitiatedTime; } | /**
* Get gets the time when this recommended action was approved for revert.
*
* @return the revertActionInitiatedTime value
*/ | Get gets the time when this recommended action was approved for revert | revertActionInitiatedTime | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/sql/mgmt-v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/RecommendedActionInner.java",
"license": "mit",
"size": 14322
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 1,964,209 |
@SuppressWarnings("unchecked")
public static <T> T[] insert(T[] old, int oldSize, int pos, T x) {
T[] result;
if (old.length > oldSize) {
result = old;
} else {
// according to a test, this is as fast as "new Row[..]"
result = (T[]) Array.newInstance(o... | @SuppressWarnings(STR) static <T> T[] function(T[] old, int oldSize, int pos, T x) { T[] result; if (old.length > oldSize) { result = old; } else { result = (T[]) Array.newInstance(old.getClass().getComponentType(), oldSize + 1 + COPY_THRESHOLD); if (pos > 0) { System.arraycopy(old, 0, result, 0, pos); } } if (oldSize ... | /**
* Insert a value in an array. A new array is created if required.
*
* @param old the old array
* @param oldSize the old size
* @param pos the position
* @param x the value to insert
* @return the (new) array
*/ | Insert a value in an array. A new array is created if required | insert | {
"repo_name": "titus08/frostwire-desktop",
"path": "lib/jars-src/h2-1.3.164/org/h2/store/Page.java",
"license": "gpl-3.0",
"size": 7482
} | [
"java.lang.reflect.Array"
] | import java.lang.reflect.Array; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,130,152 |
public void startLdapServer() throws Exception {
LdapsInitializer.setAndLockRecorder(recorder);
directoryService = DSAnnotationProcessor.getDirectoryService();
final SchemaManager schemaManager = directoryService.getSchemaManager();
try (LdifReader ldifReader = ne... | void function() throws Exception { LdapsInitializer.setAndLockRecorder(recorder); directoryService = DSAnnotationProcessor.getDirectoryService(); final SchemaManager schemaManager = directoryService.getSchemaManager(); try (LdifReader ldifReader = new LdifReader(OutboundLdapConnectionTestCase.class.getResourceAsStream(... | /**
* Creates directory services, starts LDAP server and KDCServer.
*/ | Creates directory services, starts LDAP server and KDCServer | startLdapServer | {
"repo_name": "tomazzupan/wildfly",
"path": "testsuite/integration/manualmode/src/test/java/org/jboss/as/test/manualmode/security/OutboundLdapConnectionTestCase.java",
"license": "lgpl-2.1",
"size": 20542
} | [
"org.apache.commons.lang.StringUtils",
"org.apache.directory.api.ldap.model.entry.DefaultEntry",
"org.apache.directory.api.ldap.model.ldif.LdifEntry",
"org.apache.directory.api.ldap.model.ldif.LdifReader",
"org.apache.directory.api.ldap.model.schema.SchemaManager",
"org.apache.directory.server.annotations... | import org.apache.commons.lang.StringUtils; import org.apache.directory.api.ldap.model.entry.DefaultEntry; import org.apache.directory.api.ldap.model.ldif.LdifEntry; import org.apache.directory.api.ldap.model.ldif.LdifReader; import org.apache.directory.api.ldap.model.schema.SchemaManager; import org.apache.directory.s... | import org.apache.commons.lang.*; import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.ldif.*; import org.apache.directory.api.ldap.model.schema.*; import org.apache.directory.server.annotations.*; import org.apache.directory.server.core.annotations.*; import org.apache.directo... | [
"org.apache.commons",
"org.apache.directory",
"org.jboss.as",
"org.junit"
] | org.apache.commons; org.apache.directory; org.jboss.as; org.junit; | 2,597,126 |
public int getRegionX()
{
return x >>> Perspective.LOCAL_COORD_BITS;
} | int function() { return x >>> Perspective.LOCAL_COORD_BITS; } | /**
* Returns the X coordinate in Scene space (tiles)
*/ | Returns the X coordinate in Scene space (tiles) | getRegionX | {
"repo_name": "kfricilone/runelite",
"path": "runelite-api/src/main/java/net/runelite/api/coords/LocalPoint.java",
"license": "bsd-2-clause",
"size": 3374
} | [
"net.runelite.api.Perspective"
] | import net.runelite.api.Perspective; | import net.runelite.api.*; | [
"net.runelite.api"
] | net.runelite.api; | 808,812 |
protected LiveDataSubscriptionResponse buildErrorResponse(
LiveDataSpecification liveDataSpecificationFromClient, Throwable throwable) {
return buildErrorMessageResponse(liveDataSpecificationFromClient, LiveDataSubscriptionResult.INTERNAL_ERROR, throwable.toString());
} | LiveDataSubscriptionResponse function( LiveDataSpecification liveDataSpecificationFromClient, Throwable throwable) { return buildErrorMessageResponse(liveDataSpecificationFromClient, LiveDataSubscriptionResult.INTERNAL_ERROR, throwable.toString()); } | /**
* Helper to build an error response.
*
* @param liveDataSpecificationFromClient the original specification
* @param throwable the error, not null
* @return the response, not null
*/ | Helper to build an error response | buildErrorResponse | {
"repo_name": "ChinaQuants/OG-Platform",
"path": "projects/OG-LiveData/src/main/java/com/opengamma/livedata/server/StandardLiveDataServer.java",
"license": "apache-2.0",
"size": 52480
} | [
"com.opengamma.livedata.LiveDataSpecification",
"com.opengamma.livedata.msg.LiveDataSubscriptionResponse",
"com.opengamma.livedata.msg.LiveDataSubscriptionResult"
] | import com.opengamma.livedata.LiveDataSpecification; import com.opengamma.livedata.msg.LiveDataSubscriptionResponse; import com.opengamma.livedata.msg.LiveDataSubscriptionResult; | import com.opengamma.livedata.*; import com.opengamma.livedata.msg.*; | [
"com.opengamma.livedata"
] | com.opengamma.livedata; | 508,546 |
public void setLoginMessage(CmsObject cms, CmsLoginMessage message) throws CmsRoleViolationException {
if (OpenCms.getRunLevel() >= OpenCms.RUNLEVEL_3_SHELL_ACCESS) {
// during configuration phase no permission check id required
OpenCms.getRoleManager().checkRole(cms, CmsRole.RO... | void function(CmsObject cms, CmsLoginMessage message) throws CmsRoleViolationException { if (OpenCms.getRunLevel() >= OpenCms.RUNLEVEL_3_SHELL_ACCESS) { OpenCms.getRoleManager().checkRole(cms, CmsRole.ROOT_ADMIN); } m_loginMessage = message; if (m_loginMessage != null) { m_loginMessage.setFrozen(); } } | /**
* Sets the login message to display if a user logs in.<p>
*
* This operation requires that the current user has role permissions of <code>{@link CmsRole#ROOT_ADMIN}</code>.<p>
*
* @param cms the current OpenCms user context
* @param message the message to set
*
* @... | Sets the login message to display if a user logs in. This operation requires that the current user has role permissions of <code><code>CmsRole#ROOT_ADMIN</code></code> | setLoginMessage | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/db/CmsLoginManager.java",
"license": "lgpl-2.1",
"size": 13073
} | [
"org.opencms.file.CmsObject",
"org.opencms.main.OpenCms",
"org.opencms.security.CmsRole",
"org.opencms.security.CmsRoleViolationException"
] | import org.opencms.file.CmsObject; import org.opencms.main.OpenCms; import org.opencms.security.CmsRole; import org.opencms.security.CmsRoleViolationException; | import org.opencms.file.*; import org.opencms.main.*; import org.opencms.security.*; | [
"org.opencms.file",
"org.opencms.main",
"org.opencms.security"
] | org.opencms.file; org.opencms.main; org.opencms.security; | 2,668,515 |
public void getData()
{
for (int i=0;i<input.getFieldName().length;i++)
{
if (input.getFieldName()[i]!=null)
{
TableItem item = wFields.table.getItem(i);
item.setText(1, input.getFieldName()[i]);
String type = Value.getTyp... | void function() { for (int i=0;i<input.getFieldName().length;i++) { if (input.getFieldName()[i]!=null) { TableItem item = wFields.table.getItem(i); item.setText(1, input.getFieldName()[i]); String type = Value.getTypeDesc(input.getFieldType()[i]); int length = input.getFieldLength()[i]; int prec = input.getFieldPrecisi... | /**
* Copy information from the meta-data input to the dialog fields.
*/ | Copy information from the meta-data input to the dialog fields | getData | {
"repo_name": "ontometrics/ontokettle",
"path": "src/be/ibridge/kettle/trans/step/mappingoutput/MappingOutputDialog.java",
"license": "lgpl-2.1",
"size": 11028
} | [
"be.ibridge.kettle.core.value.Value",
"org.eclipse.swt.widgets.TableItem"
] | import be.ibridge.kettle.core.value.Value; import org.eclipse.swt.widgets.TableItem; | import be.ibridge.kettle.core.value.*; import org.eclipse.swt.widgets.*; | [
"be.ibridge.kettle",
"org.eclipse.swt"
] | be.ibridge.kettle; org.eclipse.swt; | 454,388 |
public static ComponentUI getUI(JComponent component, Class expectedUIClass) {
maybeInitialize();
// solve issue with ClassLoader not able to find classes
String uiClassname = (String)UIManager.get(component.getUIClassID());
try {
Class uiClass = Class.forName(uiClassname);
UIManager.put(... | static ComponentUI function(JComponent component, Class expectedUIClass) { maybeInitialize(); String uiClassname = (String)UIManager.get(component.getUIClassID()); try { Class uiClass = Class.forName(uiClassname); UIManager.put(uiClassname, uiClass); } catch (Exception e) { } ComponentUI ui = UIManager.getUI(component)... | /**
* Workaround for IDE mixing up with classloaders and Applets environments.
* Consider this method as API private. It must not be called directly.
*
* @param component
* @param expectedUIClass
* @return an instance of expectedUIClass
*/ | Workaround for IDE mixing up with classloaders and Applets environments. Consider this method as API private. It must not be called directly | getUI | {
"repo_name": "sdwolf/CodenameOne",
"path": "CodenameOneDesigner/src/com/l2fprod/common/swing/plaf/LookAndFeelAddons.java",
"license": "gpl-2.0",
"size": 12428
} | [
"java.lang.reflect.Method",
"javax.swing.JComponent",
"javax.swing.UIManager",
"javax.swing.plaf.ComponentUI"
] | import java.lang.reflect.Method; import javax.swing.JComponent; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; | import java.lang.reflect.*; import javax.swing.*; import javax.swing.plaf.*; | [
"java.lang",
"javax.swing"
] | java.lang; javax.swing; | 670,133 |
public Style getAllStyles() {
if(allStyles == null) {
allStyles = Style.createProxyStyle(getUnselectedStyle(), getSelectedStyle(), getPressedStyle(), getDisabledStyle());
}
return allStyles;
} | Style function() { if(allStyles == null) { allStyles = Style.createProxyStyle(getUnselectedStyle(), getSelectedStyle(), getPressedStyle(), getDisabledStyle()); } return allStyles; } | /**
* Returns a "meta style" that allows setting styles once to all the different Style objects, the getters for this
* style will be meaningless and will return 0 values. Usage:
*
* <script src="https://gist.github.com/codenameone/31a32bdcf014a9e55a95.js"></script>
* @return a unified style o... | Returns a "meta style" that allows setting styles once to all the different Style objects, the getters for this style will be meaningless and will return 0 values. Usage: | getAllStyles | {
"repo_name": "saeder/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/Component.java",
"license": "gpl-2.0",
"size": 259841
} | [
"com.codename1.ui.plaf.Style"
] | import com.codename1.ui.plaf.Style; | import com.codename1.ui.plaf.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 201,545 |
BulkOperationResults<String, TaskanaException> setCallbackStateForTasks(
List<String> externalIds, CallbackState state); | BulkOperationResults<String, TaskanaException> setCallbackStateForTasks( List<String> externalIds, CallbackState state); | /**
* Sets the callback state on a list of tasks. Note: this method is primarily intended to be used
* by the TaskanaAdapter
*
* @param externalIds the EXTERNAL_IDs of the tasks on which the callback state is set.
* @param state the callback state that is to be set on the tasks
* @return the result of... | Sets the callback state on a list of tasks. Note: this method is primarily intended to be used by the TaskanaAdapter | setCallbackStateForTasks | {
"repo_name": "BVier/Taskana",
"path": "lib/taskana-core/src/main/java/pro/taskana/TaskService.java",
"license": "apache-2.0",
"size": 17066
} | [
"java.util.List",
"pro.taskana.exceptions.TaskanaException"
] | import java.util.List; import pro.taskana.exceptions.TaskanaException; | import java.util.*; import pro.taskana.exceptions.*; | [
"java.util",
"pro.taskana.exceptions"
] | java.util; pro.taskana.exceptions; | 2,278,569 |
public static boolean pathEquals(String path1, String path2) {
return cleanPath(path1).equals(cleanPath(path2));
}
/**
* Parse the given {@code localeString} value into a {@link Locale}.
* <p>This is the inverse operation of {@link Locale#toString Locale's toString}.
* @param localeString the locale {@cod... | static boolean function(String path1, String path2) { return cleanPath(path1).equals(cleanPath(path2)); } /** * Parse the given {@code localeString} value into a {@link Locale}. * <p>This is the inverse operation of {@link Locale#toString Locale's toString}. * @param localeString the locale {@code String}, following {@... | /**
* Compare two paths after normalization of them.
* @param path1 first path for comparison
* @param path2 second path for comparison
* @return whether the two paths are equivalent after normalization
*/ | Compare two paths after normalization of them | pathEquals | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/spring/org/springframework/util/StringUtils.java",
"license": "gpl-2.0",
"size": 41266
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,383,071 |
public GroupKey groupKey(ImmutableBitSet groupSet, boolean indicator,
ImmutableList<ImmutableBitSet> groupSets) {
if (groupSet.length() > peek().getRowType().getFieldCount()) {
throw new IllegalArgumentException("out of bounds: " + groupSet);
}
if (groupSets == null) {
groupSets = Immuta... | GroupKey function(ImmutableBitSet groupSet, boolean indicator, ImmutableList<ImmutableBitSet> groupSets) { if (groupSet.length() > peek().getRowType().getFieldCount()) { throw new IllegalArgumentException(STR + groupSet); } if (groupSets == null) { groupSets = ImmutableList.of(groupSet); } | /** Creates a group key with grouping sets, both identified by field positions
* in the underlying relational expression.
*
* <p>This method of creating a group key does not allow you to group on new
* expressions, only column projections, but is efficient, especially when you
* are coming from an existi... | Creates a group key with grouping sets, both identified by field positions in the underlying relational expression. This method of creating a group key does not allow you to group on new expressions, only column projections, but is efficient, especially when you | groupKey | {
"repo_name": "sreev/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/tools/RelBuilder.java",
"license": "apache-2.0",
"size": 64409
} | [
"com.google.common.collect.ImmutableList",
"org.apache.calcite.util.ImmutableBitSet"
] | import com.google.common.collect.ImmutableList; import org.apache.calcite.util.ImmutableBitSet; | import com.google.common.collect.*; import org.apache.calcite.util.*; | [
"com.google.common",
"org.apache.calcite"
] | com.google.common; org.apache.calcite; | 387,110 |
private String getLoginUserName(String userID) throws APIManagementException {
String primaryLogin = userID;
if (isSecondaryLogin(userID)) {
primaryLogin = getPrimaryLoginFromSecondary(userID);
}
return primaryLogin;
} | String function(String userID) throws APIManagementException { String primaryLogin = userID; if (isSecondaryLogin(userID)) { primaryLogin = getPrimaryLoginFromSecondary(userID); } return primaryLogin; } | /**
* identify the login username is primary or secondary
*
* @param userID
* @return
* @throws APIManagementException
*/ | identify the login username is primary or secondary | getLoginUserName | {
"repo_name": "charithag/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 345861
} | [
"org.wso2.carbon.apimgt.api.APIManagementException"
] | import org.wso2.carbon.apimgt.api.APIManagementException; | import org.wso2.carbon.apimgt.api.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,010,665 |
protected void spawnPoAmendmentForUnorderedItems(ReceivingDocument receivingDocument, PurchaseOrderDocument po){
//if receiving line document
if (receivingDocument instanceof LineItemReceivingDocument) {
LineItemReceivingDocument rlDoc = (LineItemReceivingDocument)receivingDocument;... | void function(ReceivingDocument receivingDocument, PurchaseOrderDocument po){ if (receivingDocument instanceof LineItemReceivingDocument) { LineItemReceivingDocument rlDoc = (LineItemReceivingDocument)receivingDocument; if( hasNewUnorderedItem((LineItemReceivingDocument)receivingDocument) ){ String newSessionUserId = K... | /**
* Spawns PO amendments for new unordered items on a receiving document.
*
* @param receivingDocument
* @param po
*/ | Spawns PO amendments for new unordered items on a receiving document | spawnPoAmendmentForUnorderedItems | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/purap/document/service/impl/ReceivingServiceImpl.java",
"license": "apache-2.0",
"size": 45711
} | [
"org.kuali.kfs.module.purap.document.LineItemReceivingDocument",
"org.kuali.kfs.module.purap.document.PurchaseOrderDocument",
"org.kuali.kfs.module.purap.document.ReceivingDocument",
"org.kuali.kfs.sys.KFSConstants"
] | import org.kuali.kfs.module.purap.document.LineItemReceivingDocument; import org.kuali.kfs.module.purap.document.PurchaseOrderDocument; import org.kuali.kfs.module.purap.document.ReceivingDocument; import org.kuali.kfs.sys.KFSConstants; | import org.kuali.kfs.module.purap.document.*; import org.kuali.kfs.sys.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,610,547 |
private JSDocInfo.Marker assertAnnotationMarker(JSDocInfo jsdoc,
String annotationName,
int startLineno,
int startCharno,
... | JSDocInfo.Marker function(JSDocInfo jsdoc, String annotationName, int startLineno, int startCharno, int index) { Collection<JSDocInfo.Marker> markers = jsdoc.getMarkers(); assertThat(markers).isNotEmpty(); int counter = 0; for (JSDocInfo.Marker marker : markers) { if (marker.getAnnotation() != null) { if (annotationNam... | /**
* Asserts that the index-th annotation marker of a given annotation name
* is found in the given JSDocInfo.
*
* @param jsdoc The JSDocInfo in which to search for the annotation marker.
* @param annotationName The name/type of the annotation for which to
* search. Example: "author" for an "@autho... | Asserts that the index-th annotation marker of a given annotation name is found in the given JSDocInfo | assertAnnotationMarker | {
"repo_name": "sromano87/trikc",
"path": "it.unibas.trikc/test_resources/closure-compiler-master/test/com/google/javascript/jscomp/parsing/JsDocInfoParserTest.java",
"license": "apache-2.0",
"size": 161872
} | [
"com.google.common.truth.Truth",
"com.google.javascript.rhino.JSDocInfo",
"java.util.Collection"
] | import com.google.common.truth.Truth; import com.google.javascript.rhino.JSDocInfo; import java.util.Collection; | import com.google.common.truth.*; import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.common",
"com.google.javascript",
"java.util"
] | com.google.common; com.google.javascript; java.util; | 933,804 |
public boolean setArgumentValues(CalculatedValue[] argumentValues)
{
this.argumentValues = argumentValues;
return this.argumentValues != null;
} | boolean function(CalculatedValue[] argumentValues) { this.argumentValues = argumentValues; return this.argumentValues != null; } | /**
* Procedure sets the list of argument values
*/ | Procedure sets the list of argument values | setArgumentValues | {
"repo_name": "mkulesh/microMathematics",
"path": "app/src/main/java/com/mkulesh/micromath/formula/Equation.java",
"license": "gpl-3.0",
"size": 20093
} | [
"com.mkulesh.micromath.math.CalculatedValue"
] | import com.mkulesh.micromath.math.CalculatedValue; | import com.mkulesh.micromath.math.*; | [
"com.mkulesh.micromath"
] | com.mkulesh.micromath; | 726,913 |
public ArrayList<RMNodeEvent> getNodesEvents() {
return this.nodesList;
} | ArrayList<RMNodeEvent> function() { return this.nodesList; } | /**
* Returns the 'to release' Nodes list.
* @return the 'to release' Nodes list.
*/ | Returns the 'to release' Nodes list | getNodesEvents | {
"repo_name": "yinan-liu/scheduling",
"path": "rm/rm-client/src/main/java/org/ow2/proactive/resourcemanager/common/event/RMInitialState.java",
"license": "agpl-3.0",
"size": 3843
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,884,664 |
public static void cleanup(Object o) {
try {
if(o instanceof OutputStream) {
((OutputStream)o).close();
return;
}
if(o instanceof InputStream) {
((InputStream)o).close();
return;
}
} catch... | static void function(Object o) { try { if(o instanceof OutputStream) { ((OutputStream)o).close(); return; } if(o instanceof InputStream) { ((InputStream)o).close(); return; } } catch(IOException err) { err.printStackTrace(); } } | /**
* Closes the object (connection, stream etc.) without throwing any exception, even if the
* object is null
*
* @param o Connection, Stream or other closeable object
*/ | Closes the object (connection, stream etc.) without throwing any exception, even if the object is null | cleanup | {
"repo_name": "diamonddevgroup/CodenameOne",
"path": "vm/ByteCodeTranslator/src/com/codename1/tools/translator/ByteCodeTranslator.java",
"license": "gpl-2.0",
"size": 29968
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 398,015 |
public void setCookies(FileSystemOptions opts, Cookie[] cookies)
{
setParam(opts, "cookies", cookies);
} | void function(FileSystemOptions opts, Cookie[] cookies) { setParam(opts, STR, cookies); } | /**
* The cookies to add to the request.
* @param opts The FileSystem options.
* @param cookies An array of Cookies.
*/ | The cookies to add to the request | setCookies | {
"repo_name": "raviu/wso2-commons-vfs",
"path": "core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java",
"license": "apache-2.0",
"size": 8275
} | [
"org.apache.commons.httpclient.Cookie",
"org.apache.commons.vfs2.FileSystemOptions"
] | import org.apache.commons.httpclient.Cookie; import org.apache.commons.vfs2.FileSystemOptions; | import org.apache.commons.httpclient.*; import org.apache.commons.vfs2.*; | [
"org.apache.commons"
] | org.apache.commons; | 676,983 |
if (ArrayUtils.isNotEmpty(this.filterMapping)) {
String resource = resourceInfo.getResourceClass().getName();
String method = resourceInfo.getResourceMethod().getName();
for (String row : this.filterMapping) {
String[] mapping = row.split(EQ);
if (Arra... | if (ArrayUtils.isNotEmpty(this.filterMapping)) { String resource = resourceInfo.getResourceClass().getName(); String method = resourceInfo.getResourceMethod().getName(); for (String row : this.filterMapping) { String[] mapping = row.split(EQ); if (ArrayUtils.getLength(mapping) == 2) { if (resource.equals(mapping[0]) &&... | /**
* Registers the {@link DynamicJwtClaimsIntrospectionFilter} for interception
* in case of a match of configured resource class and methods.
* <p>
* See documentation on {@link JwtDynamicFeature#filterMapping} to know how the algo will work.
*
* @param resourceInfo containing the resour... | Registers the <code>DynamicJwtClaimsIntrospectionFilter</code> for interception in case of a match of configured resource class and methods. See documentation on <code>JwtDynamicFeature#filterMapping</code> to know how the algo will work | configure | {
"repo_name": "AdeptJ/adeptj-modules",
"path": "jaxrs/core/src/main/java/com/adeptj/modules/jaxrs/core/jwt/feature/JwtDynamicFeature.java",
"license": "apache-2.0",
"size": 5643
} | [
"org.apache.commons.lang3.ArrayUtils",
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 382,048 |
void updateStore(byte[] encodedRegionName, byte[] familyName, Long sequenceId,
boolean onlyIfGreater) {
if (sequenceId == null) {
return;
}
Long highest = this.highestSequenceIds.get(encodedRegionName);
if (highest == null || sequenceId > highest) {
this.highestSequenceIds.put(encode... | void updateStore(byte[] encodedRegionName, byte[] familyName, Long sequenceId, boolean onlyIfGreater) { if (sequenceId == null) { return; } Long highest = this.highestSequenceIds.get(encodedRegionName); if (highest == null sequenceId > highest) { this.highestSequenceIds.put(encodedRegionName, sequenceId); } ImmutableBy... | /**
* Update the store sequence id, e.g., upon executing in-memory compaction
*/ | Update the store sequence id, e.g., upon executing in-memory compaction | updateStore | {
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SequenceIdAccounting.java",
"license": "apache-2.0",
"size": 20664
} | [
"java.util.concurrent.ConcurrentMap",
"org.apache.hadoop.hbase.util.ImmutableByteArray"
] | import java.util.concurrent.ConcurrentMap; import org.apache.hadoop.hbase.util.ImmutableByteArray; | import java.util.concurrent.*; import org.apache.hadoop.hbase.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,391,513 |
private static String getVMsAsXML() throws CoreException {
FASTDefinitionsContainer container = new FASTDefinitionsContainer();
container.setDefaultVMInstallCompositeID(getDefaultVMId());
container.setDefaultVMInstallConnectorTypeID(getDefaultVMConnectorId());
IFASTInstallType[] vmTypes = getFASTInstallTypes... | static String function() throws CoreException { FASTDefinitionsContainer container = new FASTDefinitionsContainer(); container.setDefaultVMInstallCompositeID(getDefaultVMId()); container.setDefaultVMInstallConnectorTypeID(getDefaultVMConnectorId()); IFASTInstallType[] vmTypes = getFASTInstallTypes(); IFASTInstall[] vms... | /**
* Returns the listing of currently installed VMs as a single XML file
* @return an XML representation of all of the currently installed VMs
* @throws CoreException
*/ | Returns the listing of currently installed VMs as a single XML file | getVMsAsXML | {
"repo_name": "cooked/NDT",
"path": "sc.ndt.launching.fast/src/sc/nrel/nwtc/fast/launching/FASTRuntime.java",
"license": "gpl-3.0",
"size": 107858
} | [
"org.eclipse.core.runtime.CoreException"
] | import org.eclipse.core.runtime.CoreException; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 1,167,623 |
public InnerHitBuilder innerHit() {
return innerHitBuilder;
} | InnerHitBuilder function() { return innerHitBuilder; } | /**
* Returns inner hit definition in the scope of this query and reusing the defined type and query.
*/ | Returns inner hit definition in the scope of this query and reusing the defined type and query | innerHit | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "modules/parent-join/src/main/java/org/elasticsearch/join/query/HasParentQueryBuilder.java",
"license": "apache-2.0",
"size": 12524
} | [
"org.elasticsearch.index.query.InnerHitBuilder"
] | import org.elasticsearch.index.query.InnerHitBuilder; | import org.elasticsearch.index.query.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 1,683,634 |
public Session getParent();
| Session function(); | /**
* Gets the Session that is the parent of the Stream
*
* @return parent Session
* @since org.openntf.domino 1.0.0
*/ | Gets the Session that is the parent of the Stream | getParent | {
"repo_name": "OpenNTF/org.openntf.domino",
"path": "domino/core/src/main/java/org/openntf/domino/ext/Stream.java",
"license": "apache-2.0",
"size": 1013
} | [
"org.openntf.domino.Session"
] | import org.openntf.domino.Session; | import org.openntf.domino.*; | [
"org.openntf.domino"
] | org.openntf.domino; | 2,487,632 |
@Test
public void testConstructorInputStreamCharsetDecoderInt() throws IOException {
InputStream stream = new FileInputStream(file);
CharsetDecoder decoder = Charset.defaultCharset().newDecoder();
PlateReaderInteger plateReader = new PlateReaderInteger(stream, decoder, 1000);
asse... | void function() throws IOException { InputStream stream = new FileInputStream(file); CharsetDecoder decoder = Charset.defaultCharset().newDecoder(); PlateReaderInteger plateReader = new PlateReaderInteger(stream, decoder, 1000); assertTrue(plateReader != null); plateReader.close(); } | /**
* Tests the reader constructor.
* @throws IOException
*/ | Tests the reader constructor | testConstructorInputStreamCharsetDecoderInt | {
"repo_name": "jessemull/MicroFlex",
"path": "src/test/java/com/github/jessemull/microflex/io/iointeger/PlateReaderIntegerTest.java",
"license": "apache-2.0",
"size": 10662
} | [
"com.github.jessemull.microflex.integerflex.io.PlateReaderInteger",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.nio.charset.Charset",
"java.nio.charset.CharsetDecoder",
"org.junit.Assert"
] | import com.github.jessemull.microflex.integerflex.io.PlateReaderInteger; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import org.junit.Assert; | import com.github.jessemull.microflex.integerflex.io.*; import java.io.*; import java.nio.charset.*; import org.junit.*; | [
"com.github.jessemull",
"java.io",
"java.nio",
"org.junit"
] | com.github.jessemull; java.io; java.nio; org.junit; | 264,522 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(MinMaxExpression.class)) {
case ExpressionsPackage.MIN_MAX_EXPRESSION__OPERATOR:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(MinMaxExpression.class)) { case ExpressionsPackage.MIN_MAX_EXPRESSION__OPERATOR: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(noti... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "uppaal-emf/uppaal",
"path": "metamodel/org.muml.uppaal.edit/src/org/muml/uppaal/expressions/provider/MinMaxExpressionItemProvider.java",
"license": "epl-1.0",
"size": 4964
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification",
"org.muml.uppaal.expressions.ExpressionsPackage",
"org.muml.uppaal.expressions.MinMaxExpression"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; import org.muml.uppaal.expressions.ExpressionsPackage; import org.muml.uppaal.expressions.MinMaxExpression; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; import org.muml.uppaal.expressions.*; | [
"org.eclipse.emf",
"org.muml.uppaal"
] | org.eclipse.emf; org.muml.uppaal; | 1,951,753 |
public static MozuClient<List<com.mozu.api.contracts.commerceruntime.orders.OrderValidationResult>> getValidationResultsClient(String orderId) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.orders.OrderValidationResultUrl.getValidationResultsUrl(orderId);
String verb = "GET";
Class<?> clz = n... | static MozuClient<List<com.mozu.api.contracts.commerceruntime.orders.OrderValidationResult>> function(String orderId) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.orders.OrderValidationResultUrl.getValidationResultsUrl(orderId); String verb = "GET"; Class<?> clz = new ArrayList<com.mozu.api.contracts.com... | /**
* Retrieves a list of the validation results associated with the order.
* <p><pre><code>
* MozuClient<List<com.mozu.api.contracts.commerceruntime.orders.OrderValidationResult>> mozuClient=GetValidationResultsClient( orderId);
* client.setBaseAddress(url);
* client.executeRequest();
* OrderValidati... | Retrieves a list of the validation results associated with the order. <code><code> MozuClient> mozuClient=GetValidationResultsClient( orderId); client.setBaseAddress(url); client.executeRequest(); OrderValidationResult orderValidationResult = client.Result(); </code></code> | getValidationResultsClient | {
"repo_name": "johngatti/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/orders/OrderValidationResultClient.java",
"license": "mit",
"size": 5056
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl",
"java.util.ArrayList",
"java.util.List"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; import java.util.ArrayList; import java.util.List; | import com.mozu.api.*; import java.util.*; | [
"com.mozu.api",
"java.util"
] | com.mozu.api; java.util; | 2,878,480 |
protected void pushFragment(Fragment fragment) {
if (fragment == null)
return;
FragmentManager fragmentManager = getFragmentManager();
if (fragmentManager != null) {
FragmentTransaction ft = fragmentManager.beginTransaction();
if (ft != null) {
... | void function(Fragment fragment) { if (fragment == null) return; FragmentManager fragmentManager = getFragmentManager(); if (fragmentManager != null) { FragmentTransaction ft = fragmentManager.beginTransaction(); if (ft != null) { ft.replace(R.id.rootLayout, fragment); ft.commit(); } } } | /**
* Method to push any fragment into given id.
*
* @param fragment An instance of Fragment to show into the given id.
*/ | Method to push any fragment into given id | pushFragment | {
"repo_name": "bparish628/iFarm-Health",
"path": "Android/iFarmHealth/app/src/main/java/com/unmc/ifarmhealth/MainActivity.java",
"license": "apache-2.0",
"size": 4385
} | [
"android.app.Fragment",
"android.app.FragmentManager",
"android.app.FragmentTransaction"
] | import android.app.Fragment; import android.app.FragmentManager; import android.app.FragmentTransaction; | import android.app.*; | [
"android.app"
] | android.app; | 866,886 |
public Observable<Host> hostByIp(String ip) {
if (ip == null || ip.isEmpty()) {
throw new IllegalArgumentException("Ip can't be null or empty");
}
return apiService.hostByIp(ip, apiKey);
} | Observable<Host> function(String ip) { if (ip == null ip.isEmpty()) { throw new IllegalArgumentException(STR); } return apiService.hostByIp(ip, apiKey); } | /**
* Returns all services that have been found on the given host IP.
*
* @param ip Host IP address
*/ | Returns all services that have been found on the given host IP | hostByIp | {
"repo_name": "fooock/jshodan",
"path": "src/main/java/com/fooock/shodan/ShodanRestApi.java",
"license": "mit",
"size": 17938
} | [
"com.fooock.shodan.model.host.Host",
"io.reactivex.Observable"
] | import com.fooock.shodan.model.host.Host; import io.reactivex.Observable; | import com.fooock.shodan.model.host.*; import io.reactivex.*; | [
"com.fooock.shodan",
"io.reactivex"
] | com.fooock.shodan; io.reactivex; | 2,133,789 |
private void setupRootFragment(final PlanFragment rootFragment, final FragmentRoot rootOperator)
throws ExecutionSetupException {
@SuppressWarnings("resource")
final FragmentContext rootContext = new FragmentContext(drillbitContext, rootFragment, queryContext,
initiatingClient, drillbitContext.g... | void function(final PlanFragment rootFragment, final FragmentRoot rootOperator) throws ExecutionSetupException { @SuppressWarnings(STR) final FragmentContext rootContext = new FragmentContext(drillbitContext, rootFragment, queryContext, initiatingClient, drillbitContext.getFunctionImplementationRegistry()); @SuppressWa... | /**
* Set up the root fragment (which will run locally), and submit it for execution.
*
* @param rootFragment
* @param rootOperator
* @throws ExecutionSetupException
*/ | Set up the root fragment (which will run locally), and submit it for execution | setupRootFragment | {
"repo_name": "sudheeshkatkam/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java",
"license": "apache-2.0",
"size": 52257
} | [
"org.apache.drill.common.exceptions.ExecutionSetupException",
"org.apache.drill.exec.ops.FragmentContext",
"org.apache.drill.exec.physical.base.FragmentRoot",
"org.apache.drill.exec.proto.BitControl",
"org.apache.drill.exec.rpc.control.ControlTunnel",
"org.apache.drill.exec.work.batch.IncomingBuffers",
... | import org.apache.drill.common.exceptions.ExecutionSetupException; import org.apache.drill.exec.ops.FragmentContext; import org.apache.drill.exec.physical.base.FragmentRoot; import org.apache.drill.exec.proto.BitControl; import org.apache.drill.exec.rpc.control.ControlTunnel; import org.apache.drill.exec.work.batch.Inc... | import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.ops.*; import org.apache.drill.exec.physical.base.*; import org.apache.drill.exec.proto.*; import org.apache.drill.exec.rpc.control.*; import org.apache.drill.exec.work.batch.*; import org.apache.drill.exec.work.fragment.*; | [
"org.apache.drill"
] | org.apache.drill; | 898,413 |
public void assign()
{
for(int i : series(data.size()))
{
int bestCluster = -1;
double bestDistance = Double.POSITIVE_INFINITY;
for(int cluster : series(numClusters))
{
double distance = distance(i, medioids.get(cluster));
if(distance < bestDistance)
{
bestDistance = dista... | void function() { for(int i : series(data.size())) { int bestCluster = -1; double bestDistance = Double.POSITIVE_INFINITY; for(int cluster : series(numClusters)) { double distance = distance(i, medioids.get(cluster)); if(distance < bestDistance) { bestDistance = distance; bestCluster = cluster; } } data.setClass(i, bes... | /**
* Assign each point to its closest medioid.
*/ | Assign each point to its closest medioid | assign | {
"repo_name": "Data2Semantics/nodes",
"path": "nodes/src/main/java/org/nodes/clustering/KMedioids.java",
"license": "mit",
"size": 3015
} | [
"nl.peterbloem.kit.Series"
] | import nl.peterbloem.kit.Series; | import nl.peterbloem.kit.*; | [
"nl.peterbloem.kit"
] | nl.peterbloem.kit; | 2,133,527 |
public String getCopyCommand( ) throws KettleException {
DatabaseMeta dm = meta.getDatabaseMeta();
StringBuilder contents = new StringBuilder( 500 );
String tableName =
dm.getQuotedSchemaTableCombination(
environmentSubstitute( meta.getSchemaName() ), environmentSubstitute( meta.getTableNa... | String function( ) throws KettleException { DatabaseMeta dm = meta.getDatabaseMeta(); StringBuilder contents = new StringBuilder( 500 ); String tableName = dm.getQuotedSchemaTableCombination( environmentSubstitute( meta.getSchemaName() ), environmentSubstitute( meta.getTableName() ) ); contents.append( STR ); contents.... | /**
* Get the contents of the control file as specified in the meta object
*
* @return a string containing the control file contents
*/ | Get the contents of the control file as specified in the meta object | getCopyCommand | {
"repo_name": "e-cuellar/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/steps/pgbulkloader/PGBulkLoader.java",
"license": "apache-2.0",
"size": 17482
} | [
"org.pentaho.di.core.Const",
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.core.exception.KettleException"
] | import org.pentaho.di.core.Const; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleException; | import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 231,262 |
public void setInstanceEnabledForPartition(String partitionName, boolean enabled) {
List<String> list =
_record.getListField(InstanceConfigProperty.HELIX_DISABLED_PARTITION.toString());
Set<String> disabledPartitions = new HashSet<String>();
if (list != null) {
disabledPartitions.addAll(list... | void function(String partitionName, boolean enabled) { List<String> list = _record.getListField(InstanceConfigProperty.HELIX_DISABLED_PARTITION.toString()); Set<String> disabledPartitions = new HashSet<String>(); if (list != null) { disabledPartitions.addAll(list); } if (enabled) { disabledPartitions.remove(partitionNa... | /**
* Set the enabled state for a partition on this instance
* @param partitionName the partition to set
* @param enabled true to enable, false to disable
*/ | Set the enabled state for a partition on this instance | setInstanceEnabledForPartition | {
"repo_name": "Teino1978-Corp/Teino1978-Corp-helix",
"path": "helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java",
"license": "apache-2.0",
"size": 11046
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 925,193 |
public List<SgpSubareas> getSubAreasConocimiento(int area) {
List<SgpSubareas> subareas = null;
Session sesion = null;
try {
sesion = db.abrirSesion();
subareas = sesion.createCriteria(SgpSubareas.class).add(Restrictions.sqlRestriction("estaactivo = 'S' and area_id= "... | List<SgpSubareas> function(int area) { List<SgpSubareas> subareas = null; Session sesion = null; try { sesion = db.abrirSesion(); subareas = sesion.createCriteria(SgpSubareas.class).add(Restrictions.sqlRestriction(STR + area)).list(); } catch (Exception e) { subareas = null; } finally { db.cerrarSesion(); } return suba... | /**
* funcion que devuleve una lista de sub areas de conocimiento
*
* @return lista subareas
*/ | funcion que devuleve una lista de sub areas de conocimiento | getSubAreasConocimiento | {
"repo_name": "newdigicash/WSPosgrado",
"path": "src/java/negocio/cursos.java",
"license": "gpl-2.0",
"size": 38569
} | [
"java.util.List",
"org.hibernate.Session",
"org.hibernate.criterion.Restrictions"
] | import java.util.List; import org.hibernate.Session; import org.hibernate.criterion.Restrictions; | import java.util.*; import org.hibernate.*; import org.hibernate.criterion.*; | [
"java.util",
"org.hibernate",
"org.hibernate.criterion"
] | java.util; org.hibernate; org.hibernate.criterion; | 2,329,556 |
TimeSeriesURLGenerator g = new TimeSeriesURLGenerator();
DefaultXYDataset dataset = new DefaultXYDataset();
dataset.addSeries("Series '1'", new double[][] {{1.0, 2.0},
{3.0, 4.0}});
String s = g.generateURL(dataset, 0, 0);
assertTrue(s.startsWith("index.html?series=Series... | TimeSeriesURLGenerator g = new TimeSeriesURLGenerator(); DefaultXYDataset dataset = new DefaultXYDataset(); dataset.addSeries(STR, new double[][] {{1.0, 2.0}, {3.0, 4.0}}); String s = g.generateURL(dataset, 0, 0); assertTrue(s.startsWith(STR)); } | /**
* A basic check for the generateURL() method.
*/ | A basic check for the generateURL() method | testGenerateURL | {
"repo_name": "GitoMat/jfreechart",
"path": "src/test/java/org/jfree/chart/urls/TimeSeriesURLGeneratorTest.java",
"license": "lgpl-2.1",
"size": 4970
} | [
"org.jfree.data.xy.DefaultXYDataset",
"org.junit.Assert"
] | import org.jfree.data.xy.DefaultXYDataset; import org.junit.Assert; | import org.jfree.data.xy.*; import org.junit.*; | [
"org.jfree.data",
"org.junit"
] | org.jfree.data; org.junit; | 2,267,156 |
public byte [] toDelimitedByteArray() throws IOException {
return ProtobufUtil.toDelimitedByteArray(convert());
}
/**
* Extract a HRegionInfo and ServerName from catalog table {@link Result}.
* @param r Result to pull from
* @return A pair of the {@link HRegionInfo} and the {@link ServerName} | byte [] function() throws IOException { return ProtobufUtil.toDelimitedByteArray(convert()); } /** * Extract a HRegionInfo and ServerName from catalog table {@link Result}. * @param r Result to pull from * @return A pair of the {@link HRegionInfo} and the {@link ServerName} | /**
* Use this instead of {@link #toByteArray()} when writing to a stream and you want to use
* the pb mergeDelimitedFrom (w/o the delimiter, pb reads to EOF which may not be what you want).
* @return This instance serialized as a delimited protobuf w/ a magic pb prefix.
* @throws IOException
* @see #toB... | Use this instead of <code>#toByteArray()</code> when writing to a stream and you want to use the pb mergeDelimitedFrom (w/o the delimiter, pb reads to EOF which may not be what you want) | toDelimitedByteArray | {
"repo_name": "intel-hadoop/hbase-rhino",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java",
"license": "apache-2.0",
"size": 40088
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.client.Result",
"org.apache.hadoop.hbase.protobuf.ProtobufUtil"
] | import java.io.IOException; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.protobuf.ProtobufUtil; | import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.protobuf.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,287,891 |
Vector<AbstractSignal> signals = new Vector<AbstractSignal>();
for ( AbstractSignal sig : childrens ) {
if ( !(sig instanceof Scope) ) {
signals.add( sig );
}
}
return signals;
}
| Vector<AbstractSignal> signals = new Vector<AbstractSignal>(); for ( AbstractSignal sig : childrens ) { if ( !(sig instanceof Scope) ) { signals.add( sig ); } } return signals; } | /**
* Return a signals in this scope
*/ | Return a signals in this scope | getSignals | {
"repo_name": "Rubbiroid/VVIDE",
"path": "src/vvide/signal/Scope.java",
"license": "gpl-3.0",
"size": 4328
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,218,712 |
public PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator() {
String docTypeName = getDocumentHeader().getWorkflowDocument().getDocumentTypeName();
DocumentEntry documentEntry = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry(docTypeName);... | PropertySerializabilityEvaluator function() { String docTypeName = getDocumentHeader().getWorkflowDocument().getDocumentTypeName(); DocumentEntry documentEntry = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry(docTypeName); WorkflowProperties workflowProperties = documentEntry.getW... | /**
* If workflowProperties have been defined within the data dictionary for this document, then it returns an instance of
* {@link BusinessObjectPropertySerializibilityEvaluator} initialized with the properties. If none have been defined, then returns
* {@link AlwaysTruePropertySerializibilityEvaluator... | If workflowProperties have been defined within the data dictionary for this document, then it returns an instance of <code>BusinessObjectPropertySerializibilityEvaluator</code> initialized with the properties. If none have been defined, then returns <code>AlwaysTruePropertySerializibilityEvaluator</code> | getDocumentPropertySerizabilityEvaluator | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-kns/src/main/java/org/kuali/kfs/krad/document/DocumentBase.java",
"license": "agpl-3.0",
"size": 24542
} | [
"org.kuali.kfs.krad.datadictionary.DocumentEntry",
"org.kuali.kfs.krad.datadictionary.WorkflowAttributes",
"org.kuali.kfs.krad.datadictionary.WorkflowProperties",
"org.kuali.kfs.krad.service.KRADServiceLocatorWeb",
"org.kuali.kfs.krad.util.documentserializer.PropertySerializabilityEvaluator"
] | import org.kuali.kfs.krad.datadictionary.DocumentEntry; import org.kuali.kfs.krad.datadictionary.WorkflowAttributes; import org.kuali.kfs.krad.datadictionary.WorkflowProperties; import org.kuali.kfs.krad.service.KRADServiceLocatorWeb; import org.kuali.kfs.krad.util.documentserializer.PropertySerializabilityEvaluator; | import org.kuali.kfs.krad.datadictionary.*; import org.kuali.kfs.krad.service.*; import org.kuali.kfs.krad.util.documentserializer.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 264,183 |
private static synchronized native long create(String cmdstr,
String envblock,
String dir,
long[] stdHandles,
boolean redirectErrorStream)
throws IOExceptio... | static synchronized native long function(String cmdstr, String envblock, String dir, long[] stdHandles, boolean redirectErrorStream) throws IOException; | /**
* Create a process using the win32 function CreateProcess.
* The method is synchronized due to MS kb315939 problem.
* All native handles should restore the inherit flag at the end of call.
*
* @param cmdstr the Windows command line
* @param envblock NUL-separated, double-NUL-terminated... | Create a process using the win32 function CreateProcess. The method is synchronized due to MS kb315939 problem. All native handles should restore the inherit flag at the end of call | create | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java",
"license": "gpl-2.0",
"size": 24347
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,227,547 |
public void setIgnoreModifiers(boolean ignoreModifiers) {
this.ignoreModifiers = ignoreModifiers;
}
private static class ScopeState {
private int currentScopeState = STATE_STATIC_VARIABLE_DEF;
private Scope declarationAccess = Scope.PUBLIC;
} | void function(boolean ignoreModifiers) { this.ignoreModifiers = ignoreModifiers; } private static class ScopeState { private int currentScopeState = STATE_STATIC_VARIABLE_DEF; private Scope declarationAccess = Scope.PUBLIC; } | /**
* Sets whether to ignore modifiers.
* @param ignoreModifiers whether to ignore modifiers.
*/ | Sets whether to ignore modifiers | setIgnoreModifiers | {
"repo_name": "autermann/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/DeclarationOrderCheck.java",
"license": "lgpl-2.1",
"size": 8997
} | [
"com.puppycrawl.tools.checkstyle.api.Scope"
] | import com.puppycrawl.tools.checkstyle.api.Scope; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 2,331,521 |
public void compare(String sourcePath, int level) {
Node source = null;
Node target = null;
// get the source path
try {
source = (Node) session.getItem(sourcePath);
} catch (RepositoryException e) {
fail("Could not read source node " + sourcePath + "... | void function(String sourcePath, int level) { Node source = null; Node target = null; try { source = (Node) session.getItem(sourcePath); } catch (RepositoryException e) { fail(STR + sourcePath + STR + e.getMessage()); } String targetPath = getTargetPath(sourcePath); try { session.getItem(targetFolder); } catch (Reposit... | /**
* Compares two nodes in the source and target tree
*
* @param sourcePath The path of the node in the source tree
* @param level The level of depth in the tree
*/ | Compares two nodes in the source and target tree | compare | {
"repo_name": "jalkanen/Priha",
"path": "tests/tck/org/apache/jackrabbit/test/api/TreeComparator.java",
"license": "apache-2.0",
"size": 20965
} | [
"javax.jcr.Node",
"javax.jcr.NodeIterator",
"javax.jcr.RepositoryException"
] | import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; | import javax.jcr.*; | [
"javax.jcr"
] | javax.jcr; | 554,879 |
public Iterator getIterator(Object obj, Info i)
{
if (obj != null)
{
SecureIntrospectorControl sic = (SecureIntrospectorControl)introspector;
if (sic.checkObjectExecutePermission(obj.getClass(), null))
{
return super.getIterator(obj, i);
... | Iterator function(Object obj, Info i) { if (obj != null) { SecureIntrospectorControl sic = (SecureIntrospectorControl)introspector; if (sic.checkObjectExecutePermission(obj.getClass(), null)) { return super.getIterator(obj, i); } else { log.warn(STR, obj.getClass().getName()); } } return null; } | /**
* Get an iterator from the given object. Since the superclass method
* this secure version checks for execute permission.
*
* @param obj object to iterate over
* @param i line, column, template info
* @return Iterator for object
*/ | Get an iterator from the given object. Since the superclass method this secure version checks for execute permission | getIterator | {
"repo_name": "apache/velocity-engine",
"path": "velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureUberspector.java",
"license": "apache-2.0",
"size": 2973
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,058,871 |
File getBackupDirectory() {
String backupDirectory = property(BACKUP_DIRECTORY);
if (backupDirectory != null) {
return new File(backupDirectory);
}
return new File(getRepositoryHome(), appendRole("segmentstore-backup"));
} | File getBackupDirectory() { String backupDirectory = property(BACKUP_DIRECTORY); if (backupDirectory != null) { return new File(backupDirectory); } return new File(getRepositoryHome(), appendRole(STR)); } | /**
* Creates a new sub-directory relative to {@link #getRepositoryHome()} for
* storing repository backups.
*
* @return directory for storing repository backups.
*/ | Creates a new sub-directory relative to <code>#getRepositoryHome()</code> for storing repository backups | getBackupDirectory | {
"repo_name": "yesil/jackrabbit-oak",
"path": "oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeStoreService.java",
"license": "apache-2.0",
"size": 43169
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,002,369 |
public CreatedSession create() {
final HttpResponse response;
try {
response = httpClient.execute(HttpMethod.POST, String.format(Endpoints.SESSION_CREATE,
pagSeguro.getHost()), null, null);
} catch (IOException e) {
throw new PagSeguroLibException(e);
}
return response.parse... | CreatedSession function() { final HttpResponse response; try { response = httpClient.execute(HttpMethod.POST, String.format(Endpoints.SESSION_CREATE, pagSeguro.getHost()), null, null); } catch (IOException e) { throw new PagSeguroLibException(e); } return response.parseXMLContent(pagSeguro, CreatedSessionXML.class); } | /**
* Create seller session
*
* @return Response of session create
* @see CreatedSession
*/ | Create seller session | create | {
"repo_name": "girinoboy/lojacasamento",
"path": "pagseguro-api/src/main/java/br/com/uol/pagseguro/api/session/SessionResource.java",
"license": "mit",
"size": 2744
} | [
"br.com.uol.pagseguro.api.Endpoints",
"br.com.uol.pagseguro.api.exception.PagSeguroLibException",
"br.com.uol.pagseguro.api.http.HttpMethod",
"br.com.uol.pagseguro.api.http.HttpResponse",
"java.io.IOException"
] | import br.com.uol.pagseguro.api.Endpoints; import br.com.uol.pagseguro.api.exception.PagSeguroLibException; import br.com.uol.pagseguro.api.http.HttpMethod; import br.com.uol.pagseguro.api.http.HttpResponse; import java.io.IOException; | import br.com.uol.pagseguro.api.*; import br.com.uol.pagseguro.api.exception.*; import br.com.uol.pagseguro.api.http.*; import java.io.*; | [
"br.com.uol",
"java.io"
] | br.com.uol; java.io; | 2,837,968 |
private ObjectFields getObjectFields(String pid)
throws UnrecognizedFieldException, ObjectIntegrityException,
RepositoryConfigurationException, StreamIOException,
ServerException {
DOReader r =
m_repoReader.getReader(Server.USE_DEFINITIVE_STORE,
... | ObjectFields function(String pid) throws UnrecognizedFieldException, ObjectIntegrityException, RepositoryConfigurationException, StreamIOException, ServerException { DOReader r = m_repoReader.getReader(Server.USE_DEFINITIVE_STORE, ReadOnlyContext.EMPTY, pid); ObjectFields f; Datastream dcmd = null; try { dcmd = r.GetDa... | /**
* For the given pid, get a reader on the object from the repository and
* return an ObjectFields object with resultFields fields populated.
*
* @param pid
* the unique identifier of the object for which the information is
* requested.
* @return ObjectFields populated... | For the given pid, get a reader on the object from the repository and return an ObjectFields object with resultFields fields populated | getObjectFields | {
"repo_name": "andreasnef/fcrepo",
"path": "fcrepo-server/src/main/java/org/fcrepo/server/search/FieldSearchResultSQLImpl.java",
"license": "apache-2.0",
"size": 28689
} | [
"org.fcrepo.server.ReadOnlyContext",
"org.fcrepo.server.Server",
"org.fcrepo.server.errors.ObjectIntegrityException",
"org.fcrepo.server.errors.RepositoryConfigurationException",
"org.fcrepo.server.errors.ServerException",
"org.fcrepo.server.errors.StreamIOException",
"org.fcrepo.server.errors.Unrecogni... | import org.fcrepo.server.ReadOnlyContext; import org.fcrepo.server.Server; import org.fcrepo.server.errors.ObjectIntegrityException; import org.fcrepo.server.errors.RepositoryConfigurationException; import org.fcrepo.server.errors.ServerException; import org.fcrepo.server.errors.StreamIOException; import org.fcrepo.ser... | import org.fcrepo.server.*; import org.fcrepo.server.errors.*; import org.fcrepo.server.storage.*; import org.fcrepo.server.storage.types.*; | [
"org.fcrepo.server"
] | org.fcrepo.server; | 1,963,554 |
public void setLocked(boolean locked)
{
getCOSObject().setFlag(COSName.F, FLAG_LOCKED, locked);
} | void function(boolean locked) { getCOSObject().setFlag(COSName.F, FLAG_LOCKED, locked); } | /**
* Set the locked flag.
*
* @param locked The new locked flag.
*/ | Set the locked flag | setLocked | {
"repo_name": "TomRoush/PdfBox-Android",
"path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java",
"license": "apache-2.0",
"size": 22980
} | [
"com.tom_roush.pdfbox.cos.COSName"
] | import com.tom_roush.pdfbox.cos.COSName; | import com.tom_roush.pdfbox.cos.*; | [
"com.tom_roush.pdfbox"
] | com.tom_roush.pdfbox; | 1,583,709 |
public static SubstitutedLine parseOperationRequestLine(String commandLine,
final CommandLineParser.CallbackHandler handler, CommandContext ctx) throws CommandFormatException {
if (commandLine == null) {
return null;
}
final ParsingStateCallbackHandler callbackHandler... | static SubstitutedLine function(String commandLine, final CommandLineParser.CallbackHandler handler, CommandContext ctx) throws CommandFormatException { if (commandLine == null) { return null; } final ParsingStateCallbackHandler callbackHandler = getCallbackHandler(handler); handler.setFormat(OperationFormat.INSTANCE);... | /**
* Returns the string which was actually parsed with all the substitutions
* performed
*/ | Returns the string which was actually parsed with all the substitutions performed | parseOperationRequestLine | {
"repo_name": "luck3y/wildfly-core",
"path": "cli/src/main/java/org/jboss/as/cli/parsing/ParserUtil.java",
"license": "lgpl-2.1",
"size": 19058
} | [
"org.jboss.as.cli.CommandContext",
"org.jboss.as.cli.CommandFormatException",
"org.jboss.as.cli.operation.CommandLineParser",
"org.jboss.as.cli.parsing.StateParser",
"org.jboss.as.cli.parsing.operation.OperationFormat",
"org.jboss.as.cli.parsing.operation.OperationRequestState"
] | import org.jboss.as.cli.CommandContext; import org.jboss.as.cli.CommandFormatException; import org.jboss.as.cli.operation.CommandLineParser; import org.jboss.as.cli.parsing.StateParser; import org.jboss.as.cli.parsing.operation.OperationFormat; import org.jboss.as.cli.parsing.operation.OperationRequestState; | import org.jboss.as.cli.*; import org.jboss.as.cli.operation.*; import org.jboss.as.cli.parsing.*; import org.jboss.as.cli.parsing.operation.*; | [
"org.jboss.as"
] | org.jboss.as; | 289,967 |
public static SAXFrequencyData ts2saxZnormByCuts(Timeseries ts, int windowSize, int paaSize,
double[] cuts) throws TSException, CloneNotSupportedException {
// Initialize symbolic result data
SAXFrequencyData res = new SAXFrequencyData();
String previousString = "";
... | static SAXFrequencyData function(Timeseries ts, int windowSize, int paaSize, double[] cuts) throws TSException, CloneNotSupportedException { SAXFrequencyData res = new SAXFrequencyData(); String previousString = STRUnable to clone: " + StackTrace.toString(e)); } char[] currentString = TSUtils.ts2StringWithNaNByCuts(paa... | /**
* Convert the timeseries into SAX string representation, normalizes each of
* the pieces before SAX conversion. Not all SAX words reported, if the new
* SAX word is the same as current it will not be reported.
*
* @param ts The timeseries given.
* @param windowSize The sliding wi... | Convert the timeseries into SAX string representation, normalizes each of the pieces before SAX conversion. Not all SAX words reported, if the new SAX word is the same as current it will not be reported | ts2saxZnormByCuts | {
"repo_name": "ianmalcolm/HOTSAX",
"path": "src/SAXFactory/SAXFactory.java",
"license": "gpl-2.0",
"size": 25126
} | [
"edu.hawaii.jmotif.sax.datastructures.SAXFrequencyData",
"edu.hawaii.jmotif.timeseries.TSException",
"edu.hawaii.jmotif.timeseries.TSUtils",
"edu.hawaii.jmotif.timeseries.Timeseries",
"org.hackystat.utilities.stacktrace.StackTrace"
] | import edu.hawaii.jmotif.sax.datastructures.SAXFrequencyData; import edu.hawaii.jmotif.timeseries.TSException; import edu.hawaii.jmotif.timeseries.TSUtils; import edu.hawaii.jmotif.timeseries.Timeseries; import org.hackystat.utilities.stacktrace.StackTrace; | import edu.hawaii.jmotif.sax.datastructures.*; import edu.hawaii.jmotif.timeseries.*; import org.hackystat.utilities.stacktrace.*; | [
"edu.hawaii.jmotif",
"org.hackystat.utilities"
] | edu.hawaii.jmotif; org.hackystat.utilities; | 1,724,155 |
public HmValueItem getState(HomematicBindingConfig bindingConfig) {
HmValueItem hmValueItem = ccuDatapoints.get(bindingConfig);
if (hmValueItem == null) {
hmValueItem = ccuVariables.get(bindingConfig);
}
return hmValueItem;
} | HmValueItem function(HomematicBindingConfig bindingConfig) { HmValueItem hmValueItem = ccuDatapoints.get(bindingConfig); if (hmValueItem == null) { hmValueItem = ccuVariables.get(bindingConfig); } return hmValueItem; } | /**
* Returns the cached HmValueItem.
*/ | Returns the cached HmValueItem | getState | {
"repo_name": "gregfinley/openhab",
"path": "bundles/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/communicator/CcuStateHolder.java",
"license": "epl-1.0",
"size": 7485
} | [
"org.openhab.binding.homematic.internal.config.binding.HomematicBindingConfig",
"org.openhab.binding.homematic.internal.model.HmValueItem"
] | import org.openhab.binding.homematic.internal.config.binding.HomematicBindingConfig; import org.openhab.binding.homematic.internal.model.HmValueItem; | import org.openhab.binding.homematic.internal.config.binding.*; import org.openhab.binding.homematic.internal.model.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 873,471 |
super.newpress(index);
if (getTouch().objectTouched(door)) { // Was the door touched?
// Show the "switching rooms!" splash screen.
Intent switching = new Intent(getActivity().getApplicationContext(), SplashScreens2.class);
getActivity().startActivity(switching);
// Go to room 2
getView().goToRoom... | super.newpress(index); if (getTouch().objectTouched(door)) { Intent switching = new Intent(getActivity().getApplicationContext(), SplashScreens2.class); getActivity().startActivity(switching); getView().goToRoom(GameView.room2); } } | /**
* Newpress input event. See touchInput for more information.
* @param index
*/ | Newpress input event. See touchInput for more information | newpress | {
"repo_name": "ac-opensource/BobEngine",
"path": "Android Studio Project/BobEngine/splashscreensandrooms/src/main/java/com/bobbyloujo/splashscreensandrooms/Room1.java",
"license": "lgpl-2.1",
"size": 1083
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 2,265,137 |
public int indexOf(XYDataset dataset) {
int result = -1;
for (int i = 0; i < this.datasets.size(); i++) {
if (dataset == this.datasets.get(i)) {
result = i;
break;
}
}
return result;
} | int function(XYDataset dataset) { int result = -1; for (int i = 0; i < this.datasets.size(); i++) { if (dataset == this.datasets.get(i)) { result = i; break; } } return result; } | /**
* Returns the index of the specified dataset, or <code>-1</code> if the
* dataset does not belong to the plot.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The index.
*
* @since 1.0.14
*/ | Returns the index of the specified dataset, or <code>-1</code> if the dataset does not belong to the plot | indexOf | {
"repo_name": "hongliangpan/manydesigns.cn",
"path": "trunk/portofino-chart/jfreechat.src/org/jfree/chart/plot/PolarPlot.java",
"license": "lgpl-3.0",
"size": 71134
} | [
"org.jfree.data.xy.XYDataset"
] | import org.jfree.data.xy.XYDataset; | import org.jfree.data.xy.*; | [
"org.jfree.data"
] | org.jfree.data; | 800,523 |
public String getRealm()
throws CustomRegistryException,
RemoteException; | String function() throws CustomRegistryException, RemoteException; | /**
* Returns the realm of the registry.
*
* @return the realm. The realm is a registry-specific string indicating
* the <i>realm</i> or <i>domain</i> for which this registry
* applies. For example, for OS400 or AIX this would be the
* host name of the system whose... | Returns the realm of the registry | getRealm | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.websphere.security/src/com/ibm/websphere/security/UserRegistry.java",
"license": "epl-1.0",
"size": 21154
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 975,476 |
@Idempotent
ContentSummary getContentSummary(String path) throws IOException;
/**
* Set the quota for a directory.
* @param path The string representation of the path to the directory
* @param namespaceQuota Limit on the number of names in the tree rooted
* at the directory
... | ContentSummary getContentSummary(String path) throws IOException; /** * Set the quota for a directory. * @param path The string representation of the path to the directory * @param namespaceQuota Limit on the number of names in the tree rooted * at the directory * @param storagespaceQuota Limit on storage space occupie... | /**
* Get {@link ContentSummary} rooted at the specified directory.
* @param path The string representation of the path
*
* @throws org.apache.hadoop.security.AccessControlException permission denied
* @throws java.io.FileNotFoundException file <code>path</code> is not found
* @throws org.apache.hadoo... | Get <code>ContentSummary</code> rooted at the specified directory | getContentSummary | {
"repo_name": "IBYoung/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 57388
} | [
"java.io.IOException",
"org.apache.hadoop.fs.ContentSummary",
"org.apache.hadoop.fs.StorageType"
] | import java.io.IOException; import org.apache.hadoop.fs.ContentSummary; import org.apache.hadoop.fs.StorageType; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,982,473 |
public static final CriteriaQuery<SuperClassTableInheritanceValueEntity>
findAllWithValue(final EntityManager entityManager,
final Integer value) {
final CriteriaBuilder builder; // Builder
final CriteriaQuery<SuperClassTableInheritanceValueEntity> quer... | static final CriteriaQuery<SuperClassTableInheritanceValueEntity> function(final EntityManager entityManager, final Integer value) { final CriteriaBuilder builder; final CriteriaQuery<SuperClassTableInheritanceValueEntity> query; final Root<SuperClassTableInheritanceValueEntity> entity; builder = entityManager.getCrite... | /**
* Generates a query to find all the entities where the value is the equal
* to the received one.
*
* @param entityManager
* the entity manager with the entity's data
* @param value
* the value to search for
* @return the query to find all the entities wi... | Generates a query to find all the entities where the value is the equal to the received one | findAllWithValue | {
"repo_name": "Bernardo-MG/jpa-example",
"path": "src/test/java/com/bernardomg/example/jpa/test/config/criteria/inheritance/superclass/SuperClassTableInheritanceValueEntityCriteriaFactory.java",
"license": "mit",
"size": 3605
} | [
"com.bernardomg.example.jpa.model.inheritance.superclass.SuperClassTableInheritanceValueEntity",
"javax.persistence.EntityManager",
"javax.persistence.criteria.CriteriaBuilder",
"javax.persistence.criteria.CriteriaQuery",
"javax.persistence.criteria.Root"
] | import com.bernardomg.example.jpa.model.inheritance.superclass.SuperClassTableInheritanceValueEntity; import javax.persistence.EntityManager; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; | import com.bernardomg.example.jpa.model.inheritance.superclass.*; import javax.persistence.*; import javax.persistence.criteria.*; | [
"com.bernardomg.example",
"javax.persistence"
] | com.bernardomg.example; javax.persistence; | 2,799,981 |
protected boolean contains(Vector2 a, Vector2 b, Vector2 c, Vector2 p) {
// create a vector representing edge ab
Vector2 ab = a.to(b);
// create a vector representing edge ac
Vector2 ac = a.to(c);
// create a vector from a to the point
Vector2 pa = a.to(p);
double dot00 = ac.dot(ac);
double dot01 ... | boolean function(Vector2 a, Vector2 b, Vector2 c, Vector2 p) { Vector2 ab = a.to(b); Vector2 ac = a.to(c); Vector2 pa = a.to(p); double dot00 = ac.dot(ac); double dot01 = ac.dot(ab); double dot02 = ac.dot(pa); double dot11 = ab.dot(ab); double dot12 = ab.dot(pa); double denominator = dot00 * dot11 - dot01 * dot01; doub... | /**
* Returns true if the given point, p, is contained in the triangle created
* by a, b, and c.
* @param a the first point of the triangle
* @param b the second point of the triangle
* @param c the third point of the triangle
* @param p the point to test for containment
* @return boolean true if the give... | Returns true if the given point, p, is contained in the triangle created by a, b, and c | contains | {
"repo_name": "dmitrykolesnikovich/dyn4j",
"path": "src/org/dyn4j/geometry/decompose/EarClipping.java",
"license": "bsd-3-clause",
"size": 10476
} | [
"org.dyn4j.geometry.Vector2"
] | import org.dyn4j.geometry.Vector2; | import org.dyn4j.geometry.*; | [
"org.dyn4j.geometry"
] | org.dyn4j.geometry; | 992,851 |
private void calcTotalBoundingBox(){
totalMinX = Float.MAX_VALUE;
totalMaxX = -Float.MAX_VALUE;
totalMinY = Float.MAX_VALUE;
totalMaxY = -Float.MAX_VALUE;
Point2D.Double origin = label.getOrigin();
Rectangle2D bounds = label.getLayout().getBounds();
... | void function(){ totalMinX = Float.MAX_VALUE; totalMaxX = -Float.MAX_VALUE; totalMinY = Float.MAX_VALUE; totalMaxY = -Float.MAX_VALUE; Point2D.Double origin = label.getOrigin(); Rectangle2D bounds = label.getLayout().getBounds(); for ( int i = 0; i < 4; i++){ double px = origin.x + displacementX * displacmentMultiplica... | /**
* Calculates the bounding box around all possible label positions
*/ | Calculates the bounding box around all possible label positions | calcTotalBoundingBox | {
"repo_name": "deegree/deegree3",
"path": "deegree-core/deegree-core-rendering-2d/src/main/java/org/deegree/rendering/r2d/labelplacement/PointLabelPositionOptions.java",
"license": "lgpl-2.1",
"size": 10550
} | [
"java.awt.geom.Point2D",
"java.awt.geom.Rectangle2D"
] | import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,252,212 |
public static Dimensions getPaddedInputDimensionsRealToComplex(
final boolean fast, final Dimensions inputDimensions)
{
final long[] paddedSize = new long[inputDimensions.numDimensions()];
final long[] fftSize = new long[inputDimensions.numDimensions()];
dimensionsRealToComplex(fast, inputDimensions, padde... | static Dimensions function( final boolean fast, final Dimensions inputDimensions) { final long[] paddedSize = new long[inputDimensions.numDimensions()]; final long[] fftSize = new long[inputDimensions.numDimensions()]; dimensionsRealToComplex(fast, inputDimensions, paddedSize, fftSize); return new FinalDimensions(padde... | /**
* Calculates padding size size for real to complex FFT
*
* @param fast if true calculate size for fast FFT
* @param inputDimensions original real dimensions
* @return padded real dimensions
*/ | Calculates padding size size for real to complex FFT | getPaddedInputDimensionsRealToComplex | {
"repo_name": "imagej/imagej-ops",
"path": "src/main/java/net/imagej/ops/filter/fft/FFTMethodsUtility.java",
"license": "bsd-2-clause",
"size": 3585
} | [
"net.imglib2.Dimensions",
"net.imglib2.FinalDimensions"
] | import net.imglib2.Dimensions; import net.imglib2.FinalDimensions; | import net.imglib2.*; | [
"net.imglib2"
] | net.imglib2; | 452,724 |
@Override
public void onPrepareNextItemShowInScreen(View next) {
View descriptionLayout = next.findViewById(R.id.description_layout);
if (descriptionLayout != null) {
next.findViewById(R.id.description_layout).setVisibility(View.INVISIBLE);
}
} | void function(View next) { View descriptionLayout = next.findViewById(R.id.description_layout); if (descriptionLayout != null) { next.findViewById(R.id.description_layout).setVisibility(View.INVISIBLE); } } | /**
* When next item is coming to show, let's hide the description layout.
*
* @param next
*/ | When next item is coming to show, let's hide the description layout | onPrepareNextItemShowInScreen | {
"repo_name": "13922841464/MarkRepos",
"path": "Source/MarkAndroid/MZLibrary/src/main/java/com/markzhai/library/widget/slider/Animations/DescriptionAnimation.java",
"license": "apache-2.0",
"size": 2041
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,908,060 |
@Test
public void testDEGEN2() {
CuteNetlibCase.doTest("DEGEN2.SIF", "-1435.1779999999999", "-1226.12", NumberContext.of(7, 4));
} | void function() { CuteNetlibCase.doTest(STR, STR, STR, NumberContext.of(7, 4)); } | /**
* <pre>
* 2019-02-13: Objective obtained/verified by CPLEX
* </pre>
*/ | <code> 2019-02-13: Objective obtained/verified by CPLEX </code> | testDEGEN2 | {
"repo_name": "optimatika/ojAlgo",
"path": "src/test/java/org/ojalgo/optimisation/linear/CuteNetlibCase.java",
"license": "mit",
"size": 42381
} | [
"org.ojalgo.type.context.NumberContext"
] | import org.ojalgo.type.context.NumberContext; | import org.ojalgo.type.context.*; | [
"org.ojalgo.type"
] | org.ojalgo.type; | 1,383,474 |
public JobMeta loadJob( ObjectId id_job, String versionLabel ) throws KettleException; | JobMeta function( ObjectId id_job, String versionLabel ) throws KettleException; | /**
* Load a job from the repository by id
*
* @param id_job
* the id of the job
* @param versionLabel
* version to load. Specify null to load the last version.
*/ | Load a job from the repository by id | loadJob | {
"repo_name": "roboguy/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/repository/Repository.java",
"license": "apache-2.0",
"size": 30305
} | [
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.job.JobMeta"
] | import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.job.JobMeta; | import org.pentaho.di.core.exception.*; import org.pentaho.di.job.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,315,092 |
protected void init ()
{
helperClass = entry.name () + "Helper";
if (entry instanceof ValueBoxEntry)
{
ValueBoxEntry v = (ValueBoxEntry) entry;
TypedefEntry member = ((InterfaceState) v.state ().elementAt (0)).entry;
SymtabEntry mType = member.type ();
if (mType instanceof Prim... | void function () { helperClass = entry.name () + STR; if (entry instanceof ValueBoxEntry) { ValueBoxEntry v = (ValueBoxEntry) entry; TypedefEntry member = ((InterfaceState) v.state ().elementAt (0)).entry; SymtabEntry mType = member.type (); if (mType instanceof PrimitiveEntry) helperType = Util.javaName (entry); else ... | /**
* Initialize variables unique to this generator.
**/ | Initialize variables unique to this generator | init | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Helper.java",
"license": "gpl-2.0",
"size": 23028
} | [
"com.sun.tools.corba.se.idl.InterfaceState",
"com.sun.tools.corba.se.idl.PrimitiveEntry",
"com.sun.tools.corba.se.idl.SymtabEntry",
"com.sun.tools.corba.se.idl.TypedefEntry",
"com.sun.tools.corba.se.idl.ValueBoxEntry"
] | import com.sun.tools.corba.se.idl.InterfaceState; import com.sun.tools.corba.se.idl.PrimitiveEntry; import com.sun.tools.corba.se.idl.SymtabEntry; import com.sun.tools.corba.se.idl.TypedefEntry; import com.sun.tools.corba.se.idl.ValueBoxEntry; | import com.sun.tools.corba.se.idl.*; | [
"com.sun.tools"
] | com.sun.tools; | 1,264,346 |
public boolean usesLocalFiles() throws SQLException {
return false;
}
| boolean function() throws SQLException { return false; } | /**
* Does the database store tables in a local file?
*
* @return true if so
* @throws SQLException
* DOCUMENT ME!
*/ | Does the database store tables in a local file | usesLocalFiles | {
"repo_name": "lukearndt/CommunityRosterSystem",
"path": "lib/mysql-connector-java-5.1.21/src/com/mysql/jdbc/DatabaseMetaData.java",
"license": "mit",
"size": 264384
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 222,829 |
public HttpCookie getCookie(String name)
{
for (HttpCookie cookie : getCookieStore().get(URI.create(getURL())))
{
if (name.equals(cookie.getName()))
return cookie;
}
return null;
} | HttpCookie function(String name) { for (HttpCookie cookie : getCookieStore().get(URI.create(getURL()))) { if (name.equals(cookie.getName())) return cookie; } return null; } | /**
* <p>Retrieves the first cookie with the given name, if available.</p>
* <p>Note that currently only HTTP transports support cookies.</p>
*
* @param name the cookie name
* @return the cookie, or null if no such cookie is found
* @see #putCookie(HttpCookie)
*/ | Retrieves the first cookie with the given name, if available. Note that currently only HTTP transports support cookies | getCookie | {
"repo_name": "ghoullier/cometd",
"path": "cometd-java/cometd-java-client/src/main/java/org/cometd/client/BayeuxClient.java",
"license": "apache-2.0",
"size": 56280
} | [
"java.net.HttpCookie",
"java.net.URI"
] | import java.net.HttpCookie; import java.net.URI; | import java.net.*; | [
"java.net"
] | java.net; | 218,407 |
public interface MuxingItem extends Comparable<MuxingItem> {
public Path getPath();
| interface MuxingItem extends Comparable<MuxingItem> { public Path function(); | /**
* Gets filesystem location of track or container item is included in.
* @return path to mediafile containing muxing item
*/ | Gets filesystem location of track or container item is included in | getPath | {
"repo_name": "hrnr/MatroskaBatch",
"path": "common/src/main/java/cz/hrnr/matroskabatch/track/MuxingItem.java",
"license": "mit",
"size": 2348
} | [
"java.nio.file.Path"
] | import java.nio.file.Path; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 927,739 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Void>> deleteWithResponseAsync(
String resourceGroupName, String automationAccountName, UUID jobScheduleId) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new Illegal... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function( String resourceGroupName, String automationAccountName, UUID jobScheduleId) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgu... | /**
* Delete the job schedule identified by job schedule name.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param automationAccountName The name of the automation account.
* @param jobScheduleId The job schedule name.
* @throws IllegalArgumentException thrown if paramet... | Delete the job schedule identified by job schedule name | deleteWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/automation/azure-resourcemanager-automation/src/main/java/com/azure/resourcemanager/automation/implementation/JobSchedulesClientImpl.java",
"license": "mit",
"size": 45704
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,397,236 |
@Test
public void testDraftAssetsIgnored() throws RepositoryBackendException, RepositoryResourceException, URISyntaxException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException, InstantiationException {
EsaResou... | void function() throws RepositoryBackendException, RepositoryResourceException, URISyntaxException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException, InstantiationException { EsaResourceImpl draft = new EsaResourceImpl(repoConn... | /**
* Test if you have a draft asset with the same vanity URL then it is ignored
*/ | Test if you have a draft asset with the same vanity URL then it is ignored | testDraftAssetsIgnored | {
"repo_name": "Azquelt/tool.lars",
"path": "client-lib-tests/src/fat/java/com/ibm/ws/repository/strategies/test/AddThenHideOldStrategyTest.java",
"license": "apache-2.0",
"size": 45924
} | [
"com.ibm.ws.lars.testutils.BasicChecks",
"com.ibm.ws.repository.common.enums.DisplayPolicy",
"com.ibm.ws.repository.common.enums.State",
"com.ibm.ws.repository.exceptions.RepositoryBackendException",
"com.ibm.ws.repository.exceptions.RepositoryResourceException",
"com.ibm.ws.repository.resources.Repositor... | import com.ibm.ws.lars.testutils.BasicChecks; import com.ibm.ws.repository.common.enums.DisplayPolicy; import com.ibm.ws.repository.common.enums.State; import com.ibm.ws.repository.exceptions.RepositoryBackendException; import com.ibm.ws.repository.exceptions.RepositoryResourceException; import com.ibm.ws.repository.re... | import com.ibm.ws.lars.testutils.*; import com.ibm.ws.repository.common.enums.*; import com.ibm.ws.repository.exceptions.*; import com.ibm.ws.repository.resources.*; import com.ibm.ws.repository.resources.internal.*; import com.ibm.ws.repository.resources.writeable.*; import com.ibm.ws.repository.strategies.writeable.*... | [
"com.ibm.ws",
"java.lang",
"java.net",
"java.util",
"org.junit"
] | com.ibm.ws; java.lang; java.net; java.util; org.junit; | 142,488 |
@Override
public Map<byte[], byte[]> hgetAll(final byte[] key) {
checkIsInMultiOrPipeline();
client.hgetAll(key);
final List<byte[]> flatHash = client.getBinaryMultiBulkReply();
final Map<byte[], byte[]> hash = new JedisByteHashMap();
final Iterator<byte[]> iterator = flatHash.iterator();
wh... | Map<byte[], byte[]> function(final byte[] key) { checkIsInMultiOrPipeline(); client.hgetAll(key); final List<byte[]> flatHash = client.getBinaryMultiBulkReply(); final Map<byte[], byte[]> hash = new JedisByteHashMap(); final Iterator<byte[]> iterator = flatHash.iterator(); while (iterator.hasNext()) { hash.put(iterator... | /**
* Return all the fields and associated values in a hash.
* <p>
* <b>Time complexity:</b> O(N), where N is the total number of entries
* @param key
* @return All the fields and values contained into a hash.
*/ | Return all the fields and associated values in a hash. Time complexity: O(N), where N is the total number of entries | hgetAll | {
"repo_name": "RedisLabs/jedis",
"path": "src/main/java/redis/clients/jedis/BinaryJedis.java",
"license": "mit",
"size": 141545
} | [
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"redis.clients.jedis.util.JedisByteHashMap"
] | import java.util.Iterator; import java.util.List; import java.util.Map; import redis.clients.jedis.util.JedisByteHashMap; | import java.util.*; import redis.clients.jedis.util.*; | [
"java.util",
"redis.clients.jedis"
] | java.util; redis.clients.jedis; | 1,355,161 |
public OffsetDateTime getExpiresOn() {
if (this.expiresOn == null) {
return null;
}
return this.expiresOn;
} | OffsetDateTime function() { if (this.expiresOn == null) { return null; } return this.expiresOn; } | /**
* Get the Secret Expiry time in UTC.
*
* @return the expires UTC time.
*/ | Get the Secret Expiry time in UTC | getExpiresOn | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/models/SecretProperties.java",
"license": "mit",
"size": 9877
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 2,632,103 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.