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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
@RequestMapping(value = "/{settingsId}/save/", method = RequestMethod.PUT)
public String saveConfirmed(Model model, @PathVariable("settingsId") String settingsId) throws UnsupportedEncodingException {
Settings settings = settingsService.loadSettings(settingsId);
Errors errors = new BeanPropertyBindingResult(settings, "settings");
settings.validate(settings, errors);
if (errors.hasErrors()) {
// if there are errors, the user should not be here.
// send user home to display errors
return "redirect:/app/" + UriUtils.encodePathSegment(settingsId, "UTF-8") + "/";
}
try {
settingsService.saveSettings(settingsId);
model.addAttribute("message", "saved-to-server");
return "redirect:/app/" + UriUtils.encodePathSegment(settingsId, "UTF-8") + "/";
} catch (SettingsLoaderException e) {
model.addAttribute("error", e.getMessage());
model.addAttribute("settings", settingsService.loadSettings(settingsId));
model.addAttribute("changePending", settingsService.isChangePending(settingsId));
model.addAttribute("restartPending", settingsService.isRestartPending(settingsId));
return "home/save";
}
}
|
@RequestMapping(value = STR, method = RequestMethod.PUT) String function(Model model, @PathVariable(STR) String settingsId) throws UnsupportedEncodingException { Settings settings = settingsService.loadSettings(settingsId); Errors errors = new BeanPropertyBindingResult(settings, STR); settings.validate(settings, errors); if (errors.hasErrors()) { return STR + UriUtils.encodePathSegment(settingsId, "UTF-8") + "/"; } try { settingsService.saveSettings(settingsId); model.addAttribute(STR, STR); return STR + UriUtils.encodePathSegment(settingsId, "UTF-8") + "/"; } catch (SettingsLoaderException e) { model.addAttribute("error", e.getMessage()); model.addAttribute(STR, settingsService.loadSettings(settingsId)); model.addAttribute(STR, settingsService.isChangePending(settingsId)); model.addAttribute(STR, settingsService.isRestartPending(settingsId)); return STR; } }
|
/**
* Push settings back to the tc Runtime instance. The request will be rejected if there are any validation errors.
*
* @param model
* @param settingsId the tc Runtime instance id
* @return
* @throws UnsupportedEncodingException
*/
|
Push settings back to the tc Runtime instance. The request will be rejected if there are any validation errors
|
saveConfirmed
|
{
"repo_name": "pivotal/tcs-hq-management-plugin",
"path": "com.springsource.hq.plugin.tcserver.serverconfig.web/src/main/java/com/springsource/hq/plugin/tcserver/serverconfig/web/controllers/HomeController.java",
"license": "gpl-2.0",
"size": 16427
}
|
[
"com.springsource.hq.plugin.tcserver.serverconfig.Settings",
"com.springsource.hq.plugin.tcserver.serverconfig.web.support.SettingsLoaderException",
"java.io.UnsupportedEncodingException",
"org.springframework.ui.Model",
"org.springframework.validation.BeanPropertyBindingResult",
"org.springframework.validation.Errors",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod",
"org.springframework.web.util.UriUtils"
] |
import com.springsource.hq.plugin.tcserver.serverconfig.Settings; import com.springsource.hq.plugin.tcserver.serverconfig.web.support.SettingsLoaderException; import java.io.UnsupportedEncodingException; import org.springframework.ui.Model; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.Errors; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.util.UriUtils;
|
import com.springsource.hq.plugin.tcserver.serverconfig.*; import com.springsource.hq.plugin.tcserver.serverconfig.web.support.*; import java.io.*; import org.springframework.ui.*; import org.springframework.validation.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.util.*;
|
[
"com.springsource.hq",
"java.io",
"org.springframework.ui",
"org.springframework.validation",
"org.springframework.web"
] |
com.springsource.hq; java.io; org.springframework.ui; org.springframework.validation; org.springframework.web;
| 2,785,124
|
public static ArrayList<Symlink> getSymlinks(final String path) throws Exception {
return getInternals().getSymlinks(path);
}
public static String getWorkingToolbox() { return getInternals().getWorkingToolbox(); }
|
static ArrayList<Symlink> function(final String path) throws Exception { return getInternals().getSymlinks(path); } public static String getWorkingToolbox() { return getInternals().getWorkingToolbox(); }
|
/**
* This will return an ArrayList of the class Symlink. The class Symlink contains the following
* property's: path SymplinkPath
* <p/>
* These will provide you with any Symlinks in the given path.
*
* @param path path to search for Symlinks.
* @return <code>ArrayList<Symlink></code> an ArrayList of the class Symlink.
* @throws Exception if we cannot return the Symlinks.
*/
|
This will return an ArrayList of the class Symlink. The class Symlink contains the following property's: path SymplinkPath These will provide you with any Symlinks in the given path
|
getSymlinks
|
{
"repo_name": "TeamBliss-LP/android_packages_apps_DeviceControl",
"path": "app/src/main/java/com/stericson/roottools/RootTools.java",
"license": "gpl-3.0",
"size": 20069
}
|
[
"com.stericson.roottools.containers.Symlink",
"java.util.ArrayList"
] |
import com.stericson.roottools.containers.Symlink; import java.util.ArrayList;
|
import com.stericson.roottools.containers.*; import java.util.*;
|
[
"com.stericson.roottools",
"java.util"
] |
com.stericson.roottools; java.util;
| 2,784,555
|
public MamQueryResult pageBefore(Jid chatJid, String messageUid, int max) throws XMPPErrorException,
NotLoggedInException, NotConnectedException, InterruptedException, NoResponseException {
RSMSet rsmSet = new RSMSet(null, messageUid, -1, -1, null, max, null, -1);
DataForm dataForm = getNewMamForm();
addWithJid(chatJid, dataForm);
return page(null, dataForm, rsmSet);
}
|
MamQueryResult function(Jid chatJid, String messageUid, int max) throws XMPPErrorException, NotLoggedInException, NotConnectedException, InterruptedException, NoResponseException { RSMSet rsmSet = new RSMSet(null, messageUid, -1, -1, null, max, null, -1); DataForm dataForm = getNewMamForm(); addWithJid(chatJid, dataForm); return page(null, dataForm, rsmSet); }
|
/**
* Obtain page before the first message saved (specific chat).
* <p>
* Note that the messageUid is the XEP-0313 UID and <b>not</> the stanza ID of the message.
* </p>
*
* @param chatJid
* @param messageUid the UID of the message of which messages before should be received.
* @param max
* @return the MAM query result
* @throws XMPPErrorException
* @throws NotLoggedInException
* @throws NotConnectedException
* @throws InterruptedException
* @throws NoResponseException
*/
|
Obtain page before the first message saved (specific chat). Note that the messageUid is the XEP-0313 UID and not the stanza ID of the message.
|
pageBefore
|
{
"repo_name": "esl/Smack",
"path": "smack-experimental/src/main/java/org/jivesoftware/smackx/mam/MamManager.java",
"license": "apache-2.0",
"size": 26054
}
|
[
"org.jivesoftware.smack.SmackException",
"org.jivesoftware.smack.XMPPException",
"org.jivesoftware.smackx.rsm.packet.RSMSet",
"org.jivesoftware.smackx.xdata.packet.DataForm",
"org.jxmpp.jid.Jid"
] |
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.rsm.packet.RSMSet; import org.jivesoftware.smackx.xdata.packet.DataForm; import org.jxmpp.jid.Jid;
|
import org.jivesoftware.smack.*; import org.jivesoftware.smackx.rsm.packet.*; import org.jivesoftware.smackx.xdata.packet.*; import org.jxmpp.jid.*;
|
[
"org.jivesoftware.smack",
"org.jivesoftware.smackx",
"org.jxmpp.jid"
] |
org.jivesoftware.smack; org.jivesoftware.smackx; org.jxmpp.jid;
| 618,484
|
public Observable<ServiceResponse<ApplicationGatewayInner>> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, Map<String, String> tags) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (applicationGatewayName == null) {
throw new IllegalArgumentException("Parameter applicationGatewayName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
|
Observable<ServiceResponse<ApplicationGatewayInner>> function(String resourceGroupName, String applicationGatewayName, Map<String, String> tags) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (applicationGatewayName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); }
|
/**
* Updates the specified application gateway tags.
*
* @param resourceGroupName The name of the resource group.
* @param applicationGatewayName The name of the application gateway.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ApplicationGatewayInner object
*/
|
Updates the specified application gateway tags
|
beginUpdateTagsWithServiceResponseAsync
|
{
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/ApplicationGatewaysInner.java",
"license": "mit",
"size": 144677
}
|
[
"com.microsoft.rest.ServiceResponse",
"java.util.Map"
] |
import com.microsoft.rest.ServiceResponse; import java.util.Map;
|
import com.microsoft.rest.*; import java.util.*;
|
[
"com.microsoft.rest",
"java.util"
] |
com.microsoft.rest; java.util;
| 433,795
|
public ApplicationInstance load(String name, String vdc) throws EntityNotFoundException {
Query query = getEntityManager().createQuery(
"select p from ApplicationInstance p where p.name = :name and p.vdc = :vdc");
query.setParameter("name", name);
query.setParameter("vdc", vdc);
if (vdc == null) {
query.setParameter("vdc", "");
} else {
query.setParameter("vdc", vdc);
}
ApplicationInstance app = null;
try {
app = (ApplicationInstance) query.getSingleResult();
} catch (NoResultException e) {
String message = " No app found in the database with id: "
+ name + " and vdc " + vdc + " Exception: " + e.getMessage();
throw new EntityNotFoundException(Network.class, "name", name);
}
return app;
}
|
ApplicationInstance function(String name, String vdc) throws EntityNotFoundException { Query query = getEntityManager().createQuery( STR); query.setParameter("name", name); query.setParameter("vdc", vdc); if (vdc == null) { query.setParameter("vdc", STRvdcSTR No app found in the database with id: STR and vdc STR Exception: STRname", name); } return app; }
|
/**
* Get an application instance given its name and vdc.
* @param name
* @param vdc
* @return
* @throws EntityNotFoundException
*/
|
Get an application instance given its name and vdc
|
load
|
{
"repo_name": "telefonicaid/fiware-paas",
"path": "core/src/main/java/com/telefonica/euro_iaas/paasmanager/dao/impl/ApplicationInstanceDaoJpaImpl.java",
"license": "apache-2.0",
"size": 7497
}
|
[
"com.telefonica.euro_iaas.paasmanager.model.ApplicationInstance",
"com.telefonica.fiware.commons.dao.EntityNotFoundException",
"javax.persistence.Query"
] |
import com.telefonica.euro_iaas.paasmanager.model.ApplicationInstance; import com.telefonica.fiware.commons.dao.EntityNotFoundException; import javax.persistence.Query;
|
import com.telefonica.euro_iaas.paasmanager.model.*; import com.telefonica.fiware.commons.dao.*; import javax.persistence.*;
|
[
"com.telefonica.euro_iaas",
"com.telefonica.fiware",
"javax.persistence"
] |
com.telefonica.euro_iaas; com.telefonica.fiware; javax.persistence;
| 111,022
|
@FunctionalInterface
public interface FileMatchProcessor {
public void processMatch(String relativePath, InputStream inputStream, long lengthBytes) throws IOException;
|
interface FileMatchProcessor { public void function(String relativePath, InputStream inputStream, long lengthBytes) throws IOException;
|
/**
* Process a matching file.
*
* @param relativePath
* The path of the matching file relative to the classpath element that contained the match.
* @param inputStream
* An InputStream (either a FileInputStream or a ZipEntry InputStream) opened on the file. You do not
* need to close this InputStream before returning, it is closed by the caller.
* @param lengthBytes
* The length of the InputStream in bytes.
*/
|
Process a matching file
|
processMatch
|
{
"repo_name": "CiNC0/Cartier",
"path": "cartier-classpath-scanner/src/main/java/xyz/vopen/cartier/classpathscanner/matchprocessor/FileMatchProcessor.java",
"license": "apache-2.0",
"size": 2188
}
|
[
"java.io.IOException",
"java.io.InputStream"
] |
import java.io.IOException; import java.io.InputStream;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 2,881,367
|
//---------//
// getStep //
//---------//
public NoteStep getStep ()
{
AbstractChordInter chord = getChord();
Measure measure = chord.getMeasure();
ClefInter clef = measure.getClefBefore(getCenter(), staff);
return ClefInter.noteStepOf(clef, getIntegerPitch());
}
|
NoteStep function () { AbstractChordInter chord = getChord(); Measure measure = chord.getMeasure(); ClefInter clef = measure.getClefBefore(getCenter(), staff); return ClefInter.noteStepOf(clef, getIntegerPitch()); }
|
/**
* Report the note step (within the octave).
*
* @return the note step
*/
|
Report the note step (within the octave)
|
getStep
|
{
"repo_name": "Audiveris/audiveris",
"path": "src/main/org/audiveris/omr/sig/inter/AbstractNoteInter.java",
"license": "agpl-3.0",
"size": 10931
}
|
[
"org.audiveris.omr.sheet.rhythm.Measure"
] |
import org.audiveris.omr.sheet.rhythm.Measure;
|
import org.audiveris.omr.sheet.rhythm.*;
|
[
"org.audiveris.omr"
] |
org.audiveris.omr;
| 1,308,863
|
public Collection<Slice> getSlices() {
return slices.values();
}
|
Collection<Slice> function() { return slices.values(); }
|
/**
* Gets the list of all slices for this collection.
*/
|
Gets the list of all slices for this collection
|
getSlices
|
{
"repo_name": "visouza/solr-5.0.0",
"path": "solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java",
"license": "apache-2.0",
"size": 6314
}
|
[
"java.util.Collection"
] |
import java.util.Collection;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,493,968
|
final public void putInt( int value ) throws IOException
{
ensureLength( index+4 );
if (littleEndian)
{
buffer[index++] = (byte) value;
buffer[index++] = (byte) (value >> 8);
buffer[index++] = (byte) (value >> 16);
buffer[index++] = (byte) (value >> 24);
}
else
{
buffer[index++] = (byte) (value >>> 24);
buffer[index++] = (byte) (value >>> 16);
buffer[index++] = (byte) (value >>> 8);
buffer[index++] = (byte) value;
}
fixLength();
}
|
final void function( int value ) throws IOException { ensureLength( index+4 ); if (littleEndian) { buffer[index++] = (byte) value; buffer[index++] = (byte) (value >> 8); buffer[index++] = (byte) (value >> 16); buffer[index++] = (byte) (value >> 24); } else { buffer[index++] = (byte) (value >>> 24); buffer[index++] = (byte) (value >>> 16); buffer[index++] = (byte) (value >>> 8); buffer[index++] = (byte) value; } fixLength(); }
|
/**
* Puts the int as the next 4 bytes. Little-endian.
* @param value
* @throws IOException
*/
|
Puts the int as the next 4 bytes. Little-endian
|
putInt
|
{
"repo_name": "OBIGOGIT/etch",
"path": "util/src/main/java/org/apache/etch/util/FlexBuffer.java",
"license": "apache-2.0",
"size": 18868
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 2,524,654
|
EClass getErrorEventDefinition();
|
EClass getErrorEventDefinition();
|
/**
* Returns the meta object for class '{@link org.eclipse.bpmn2.ErrorEventDefinition <em>Error Event Definition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Error Event Definition</em>'.
* @see org.eclipse.bpmn2.ErrorEventDefinition
* @generated
*/
|
Returns the meta object for class '<code>org.eclipse.bpmn2.ErrorEventDefinition Error Event Definition</code>'.
|
getErrorEventDefinition
|
{
"repo_name": "lqjack/fixflow",
"path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 1014933
}
|
[
"org.eclipse.emf.ecore.EClass"
] |
import org.eclipse.emf.ecore.EClass;
|
import org.eclipse.emf.ecore.*;
|
[
"org.eclipse.emf"
] |
org.eclipse.emf;
| 1,408,106
|
public static final CustomerFeedServiceClient create(CustomerFeedServiceSettings settings)
throws IOException {
return new CustomerFeedServiceClient(settings);
}
|
static final CustomerFeedServiceClient function(CustomerFeedServiceSettings settings) throws IOException { return new CustomerFeedServiceClient(settings); }
|
/**
* Constructs an instance of CustomerFeedServiceClient, using the given settings. The channels are
* created based on the settings passed in, or defaults for any settings that are not set.
*/
|
Constructs an instance of CustomerFeedServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set
|
create
|
{
"repo_name": "googleads/google-ads-java",
"path": "google-ads-stubs-v10/src/main/java/com/google/ads/googleads/v10/services/CustomerFeedServiceClient.java",
"license": "apache-2.0",
"size": 11450
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 1,655,118
|
static <E> void addNonMiddlemanArtifacts(Iterable<Artifact> artifacts,
Collection<? super E> output, Function<? super Artifact, E> outputFormatter) {
for (Artifact artifact : artifacts) {
if (MIDDLEMAN_FILTER.apply(artifact)) {
output.add(outputFormatter.apply(artifact));
}
}
}
|
static <E> void addNonMiddlemanArtifacts(Iterable<Artifact> artifacts, Collection<? super E> output, Function<? super Artifact, E> outputFormatter) { for (Artifact artifact : artifacts) { if (MIDDLEMAN_FILTER.apply(artifact)) { output.add(outputFormatter.apply(artifact)); } } }
|
/**
* Converts a collection of artifacts into the outputs computed by
* outputFormatter and adds them to a given collection. Middleman artifacts
* are ignored.
*/
|
Converts a collection of artifacts into the outputs computed by outputFormatter and adds them to a given collection. Middleman artifacts are ignored
|
addNonMiddlemanArtifacts
|
{
"repo_name": "rzagabe/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/Artifact.java",
"license": "apache-2.0",
"size": 26120
}
|
[
"com.google.common.base.Function",
"java.util.Collection"
] |
import com.google.common.base.Function; import java.util.Collection;
|
import com.google.common.base.*; import java.util.*;
|
[
"com.google.common",
"java.util"
] |
com.google.common; java.util;
| 2,847,718
|
public static List<PartitionDescriptor> fromPartitionJsonList(String jsonList) {
return Descriptor.GSON.fromJson(jsonList, DESCRIPTOR_LIST_TYPE);
}
|
static List<PartitionDescriptor> function(String jsonList) { return Descriptor.GSON.fromJson(jsonList, DESCRIPTOR_LIST_TYPE); }
|
/**
* Deserialize the string, resulted from {@link #toPartitionJsonList(List)}, to a list of partition descriptors
*/
|
Deserialize the string, resulted from <code>#toPartitionJsonList(List)</code>, to a list of partition descriptors
|
fromPartitionJsonList
|
{
"repo_name": "jack-moseley/gobblin",
"path": "gobblin-api/src/main/java/org/apache/gobblin/dataset/PartitionDescriptor.java",
"license": "apache-2.0",
"size": 2684
}
|
[
"java.util.List"
] |
import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,665,804
|
@SuppressWarnings("unchecked")
public IgniteInternalFuture<HadoopJobId> submit(HadoopJobId jobId, HadoopJobInfo info) {
if (!busyLock.tryReadLock()) {
return new GridFinishedFuture<>(new IgniteCheckedException("Failed to execute map-reduce job " +
"(grid is stopping): " + info));
}
try {
long jobPrepare = U.currentTimeMillis();
if (jobs.containsKey(jobId) || jobMetaCache().containsKey(jobId))
throw new IgniteCheckedException("Failed to submit job. Job with the same ID already exists: " + jobId);
HadoopJob job = job(jobId, info);
HadoopMapReducePlan mrPlan = mrPlanner.preparePlan(job, ctx.nodes(), null);
HadoopJobMetadata meta = new HadoopJobMetadata(ctx.localNodeId(), jobId, info);
meta.mapReducePlan(mrPlan);
meta.pendingSplits(allSplits(mrPlan));
meta.pendingReducers(allReducers(mrPlan));
GridFutureAdapter<HadoopJobId> completeFut = new GridFutureAdapter<>();
GridFutureAdapter<HadoopJobId> old = activeFinishFuts.put(jobId, completeFut);
assert old == null : "Duplicate completion future [jobId=" + jobId + ", old=" + old + ']';
if (log.isDebugEnabled())
log.debug("Submitting job metadata [jobId=" + jobId + ", meta=" + meta + ']');
long jobStart = U.currentTimeMillis();
HadoopPerformanceCounter perfCntr = HadoopPerformanceCounter.getCounter(meta.counters(),
ctx.localNodeId());
perfCntr.clientSubmissionEvents(info);
perfCntr.onJobPrepare(jobPrepare);
perfCntr.onJobStart(jobStart);
if (jobMetaCache().getAndPutIfAbsent(jobId, meta) != null)
throw new IgniteCheckedException("Failed to submit job. Job with the same ID already exists: " + jobId);
return completeFut;
}
catch (IgniteCheckedException e) {
U.error(log, "Failed to submit job: " + jobId, e);
return new GridFinishedFuture<>(e);
}
finally {
busyLock.readUnlock();
}
}
|
@SuppressWarnings(STR) IgniteInternalFuture<HadoopJobId> function(HadoopJobId jobId, HadoopJobInfo info) { if (!busyLock.tryReadLock()) { return new GridFinishedFuture<>(new IgniteCheckedException(STR + STR + info)); } try { long jobPrepare = U.currentTimeMillis(); if (jobs.containsKey(jobId) jobMetaCache().containsKey(jobId)) throw new IgniteCheckedException(STR + jobId); HadoopJob job = job(jobId, info); HadoopMapReducePlan mrPlan = mrPlanner.preparePlan(job, ctx.nodes(), null); HadoopJobMetadata meta = new HadoopJobMetadata(ctx.localNodeId(), jobId, info); meta.mapReducePlan(mrPlan); meta.pendingSplits(allSplits(mrPlan)); meta.pendingReducers(allReducers(mrPlan)); GridFutureAdapter<HadoopJobId> completeFut = new GridFutureAdapter<>(); GridFutureAdapter<HadoopJobId> old = activeFinishFuts.put(jobId, completeFut); assert old == null : STR + jobId + STR + old + ']'; if (log.isDebugEnabled()) log.debug(STR + jobId + STR + meta + ']'); long jobStart = U.currentTimeMillis(); HadoopPerformanceCounter perfCntr = HadoopPerformanceCounter.getCounter(meta.counters(), ctx.localNodeId()); perfCntr.clientSubmissionEvents(info); perfCntr.onJobPrepare(jobPrepare); perfCntr.onJobStart(jobStart); if (jobMetaCache().getAndPutIfAbsent(jobId, meta) != null) throw new IgniteCheckedException(STR + jobId); return completeFut; } catch (IgniteCheckedException e) { U.error(log, STR + jobId, e); return new GridFinishedFuture<>(e); } finally { busyLock.readUnlock(); } }
|
/**
* Submits execution of Hadoop job to grid.
*
* @param jobId Job ID.
* @param info Job info.
* @return Job completion future.
*/
|
Submits execution of Hadoop job to grid
|
submit
|
{
"repo_name": "f7753/ignite",
"path": "modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/jobtracker/HadoopJobTracker.java",
"license": "apache-2.0",
"size": 57890
}
|
[
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.IgniteInternalFuture",
"org.apache.ignite.internal.processors.hadoop.HadoopJob",
"org.apache.ignite.internal.processors.hadoop.HadoopJobId",
"org.apache.ignite.internal.processors.hadoop.HadoopJobInfo",
"org.apache.ignite.internal.processors.hadoop.HadoopMapReducePlan",
"org.apache.ignite.internal.processors.hadoop.counter.HadoopPerformanceCounter",
"org.apache.ignite.internal.util.future.GridFinishedFuture",
"org.apache.ignite.internal.util.future.GridFutureAdapter",
"org.apache.ignite.internal.util.typedef.internal.U"
] |
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.hadoop.HadoopJob; import org.apache.ignite.internal.processors.hadoop.HadoopJobId; import org.apache.ignite.internal.processors.hadoop.HadoopJobInfo; import org.apache.ignite.internal.processors.hadoop.HadoopMapReducePlan; import org.apache.ignite.internal.processors.hadoop.counter.HadoopPerformanceCounter; import org.apache.ignite.internal.util.future.GridFinishedFuture; import org.apache.ignite.internal.util.future.GridFutureAdapter; import org.apache.ignite.internal.util.typedef.internal.U;
|
import org.apache.ignite.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.hadoop.*; import org.apache.ignite.internal.processors.hadoop.counter.*; import org.apache.ignite.internal.util.future.*; import org.apache.ignite.internal.util.typedef.internal.*;
|
[
"org.apache.ignite"
] |
org.apache.ignite;
| 612,050
|
private Map<String, Serializable> auditInvocationBefore(
final String serviceName,
final String methodName,
final Map<String, Serializable> namedArguments)
{
String rootPath;
Map<String, Serializable> auditData;
if (namedArguments == null || namedArguments.isEmpty())
{
rootPath = AuditApplication.buildPath(AUDIT_PATH_API_PRE, serviceName, methodName);
auditData = new HashMap<String, Serializable>(1);
auditData.put(AUDIT_SNIPPET_ARGS, null);
}
else
{
rootPath = AuditApplication.buildPath(AUDIT_PATH_API_PRE, serviceName, methodName, AUDIT_SNIPPET_ARGS);
auditData = namedArguments;
}
// Audit in a read-write txn
Map<String, Serializable> auditedData = auditComponent.recordAuditValues(rootPath, auditData);
// Done
if (logger.isDebugEnabled() && auditedData.size() > 0)
{
logger.debug(
"Audited before invocation: \n" +
" Values: " + auditedData);
}
return auditedData;
}
|
Map<String, Serializable> function( final String serviceName, final String methodName, final Map<String, Serializable> namedArguments) { String rootPath; Map<String, Serializable> auditData; if (namedArguments == null namedArguments.isEmpty()) { rootPath = AuditApplication.buildPath(AUDIT_PATH_API_PRE, serviceName, methodName); auditData = new HashMap<String, Serializable>(1); auditData.put(AUDIT_SNIPPET_ARGS, null); } else { rootPath = AuditApplication.buildPath(AUDIT_PATH_API_PRE, serviceName, methodName, AUDIT_SNIPPET_ARGS); auditData = namedArguments; } Map<String, Serializable> auditedData = auditComponent.recordAuditValues(rootPath, auditData); if (logger.isDebugEnabled() && auditedData.size() > 0) { logger.debug( STR + STR + auditedData); } return auditedData; }
|
/**
* Audit values before the invocation
*
* @param serviceName the service name
* @param methodName the method name
* @param namedArguments the named arguments passed to the invocation
*
* @since 3.2
*/
|
Audit values before the invocation
|
auditInvocationBefore
|
{
"repo_name": "Alfresco/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/audit/AuditMethodInterceptor.java",
"license": "lgpl-3.0",
"size": 21477
}
|
[
"java.io.Serializable",
"java.util.HashMap",
"java.util.Map",
"org.alfresco.repo.audit.model.AuditApplication"
] |
import java.io.Serializable; import java.util.HashMap; import java.util.Map; import org.alfresco.repo.audit.model.AuditApplication;
|
import java.io.*; import java.util.*; import org.alfresco.repo.audit.model.*;
|
[
"java.io",
"java.util",
"org.alfresco.repo"
] |
java.io; java.util; org.alfresco.repo;
| 1,909,485
|
public EntityTransaction getTransaction()
{
if (_isXA)
throw new IllegalStateException(L.l("Cannot call EntityManager.getTransaction() inside a distributed transaction."));
if (_trans == null)
_trans = new EntityTransactionImpl();
return _trans;
}
|
EntityTransaction function() { if (_isXA) throw new IllegalStateException(L.l(STR)); if (_trans == null) _trans = new EntityTransactionImpl(); return _trans; }
|
/**
* Returns the transaction.
*/
|
Returns the transaction
|
getTransaction
|
{
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/amber/manager/AmberConnection.java",
"license": "gpl-2.0",
"size": 89822
}
|
[
"javax.persistence.EntityTransaction"
] |
import javax.persistence.EntityTransaction;
|
import javax.persistence.*;
|
[
"javax.persistence"
] |
javax.persistence;
| 2,569,511
|
private void validateConstants(final Class c)
throws IDLTypeException {
Field[] fields = null;
|
void function(final Class c) throws IDLTypeException { Field[] fields = null;
|
/**
* Implements 1.2.3 #6
*/
|
Implements 1.2.3 #6
|
validateConstants
|
{
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/corba/se/impl/presentation/rmi/IDLTypesUtil.java",
"license": "apache-2.0",
"size": 19121
}
|
[
"java.lang.reflect.Field"
] |
import java.lang.reflect.Field;
|
import java.lang.reflect.*;
|
[
"java.lang"
] |
java.lang;
| 2,319,823
|
public SolrPingResponse ping() throws IOException, SolrServerException;
|
SolrPingResponse function() throws IOException, SolrServerException;
|
/**
* Issues a ping request to check if the server is alive
*
* @throws IOException
* If there is a low-level I/O error.
*/
|
Issues a ping request to check if the server is alive
|
ping
|
{
"repo_name": "yuzhu712/cdk",
"path": "cdk-morphlines/cdk-morphlines-solr-core/src/main/java/com/cloudera/cdk/morphline/solr/DocumentLoader.java",
"license": "apache-2.0",
"size": 2563
}
|
[
"java.io.IOException",
"org.apache.solr.client.solrj.SolrServerException",
"org.apache.solr.client.solrj.response.SolrPingResponse"
] |
import java.io.IOException; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.response.SolrPingResponse;
|
import java.io.*; import org.apache.solr.client.solrj.*; import org.apache.solr.client.solrj.response.*;
|
[
"java.io",
"org.apache.solr"
] |
java.io; org.apache.solr;
| 2,243,895
|
private static void intitializeHelpSet(Extension ext) {
HelpBroker hb = ExtensionHelp.getHelpBroker();
if (hb == null) {
return;
}
URL helpSetUrl = getExtensionHelpSetUrl(ext);
if (helpSetUrl != null) {
try {
log.debug("Load help files for extension '" + ext.getName() + "' and merge with core help.");
HelpSet extHs = new HelpSet(ext.getClass().getClassLoader(), helpSetUrl);
hb.getHelpSet().add(extHs);
} catch (HelpSetException e) {
log.error("An error occured while adding help file of extension '" + ext.getName() + "': " + e.getMessage(), e);
}
}
}
|
static void function(Extension ext) { HelpBroker hb = ExtensionHelp.getHelpBroker(); if (hb == null) { return; } URL helpSetUrl = getExtensionHelpSetUrl(ext); if (helpSetUrl != null) { try { log.debug(STR + ext.getName() + STR); HelpSet extHs = new HelpSet(ext.getClass().getClassLoader(), helpSetUrl); hb.getHelpSet().add(extHs); } catch (HelpSetException e) { log.error(STR + ext.getName() + STR + e.getMessage(), e); } } }
|
/**
* If there are help files within the extension, they are loaded and merged
* with existing help files if the core help was correctly loaded.
* @param ext the extension being initialised
*/
|
If there are help files within the extension, they are loaded and merged with existing help files if the core help was correctly loaded
|
intitializeHelpSet
|
{
"repo_name": "GillesMoris/OSS",
"path": "src/org/zaproxy/zap/control/ExtensionFactory.java",
"license": "apache-2.0",
"size": 20340
}
|
[
"javax.help.HelpBroker",
"javax.help.HelpSet",
"javax.help.HelpSetException",
"org.parosproxy.paros.extension.Extension",
"org.zaproxy.zap.extension.help.ExtensionHelp"
] |
import javax.help.HelpBroker; import javax.help.HelpSet; import javax.help.HelpSetException; import org.parosproxy.paros.extension.Extension; import org.zaproxy.zap.extension.help.ExtensionHelp;
|
import javax.help.*; import org.parosproxy.paros.extension.*; import org.zaproxy.zap.extension.help.*;
|
[
"javax.help",
"org.parosproxy.paros",
"org.zaproxy.zap"
] |
javax.help; org.parosproxy.paros; org.zaproxy.zap;
| 1,851,595
|
MongoNamespace getNamespace();
|
MongoNamespace getNamespace();
|
/**
* Gets the namespace of this collection.
*
* @return the namespace
*/
|
Gets the namespace of this collection
|
getNamespace
|
{
"repo_name": "rozza/mongo-java-driver",
"path": "driver-sync/src/main/com/mongodb/client/MongoCollection.java",
"license": "apache-2.0",
"size": 102106
}
|
[
"com.mongodb.MongoNamespace"
] |
import com.mongodb.MongoNamespace;
|
import com.mongodb.*;
|
[
"com.mongodb"
] |
com.mongodb;
| 1,840,990
|
public LegendItem getLegendItem(int datasetIndex, int series) {
// if the renderer isn't assigned to a plot, then we don't have a
// dataset...
XYPlot plot = getPlot();
if (plot == null) {
return null;
}
XYDataset dataset = plot.getDataset(datasetIndex);
if (dataset == null) {
return null;
}
LegendItem result = null;
if (getItemVisible(series, 0)) {
String label = getLegendItemLabelGenerator().generateLabel(dataset,
series);
String description = label;
String toolTipText = null;
if (getLegendItemToolTipGenerator() != null) {
toolTipText = getLegendItemToolTipGenerator().generateLabel(
dataset, series);
}
String urlText = null;
if (getLegendItemURLGenerator() != null) {
urlText = getLegendItemURLGenerator().generateLabel(
dataset, series);
}
Paint fillPaint = lookupSeriesPaint(series);
result = new LegendItem(label, description, toolTipText, urlText,
getLegendShape(), fillPaint);
result.setLabelFont(lookupLegendTextFont(series));
Paint labelPaint = lookupLegendTextPaint(series);
if (labelPaint != null) {
result.setLabelPaint(labelPaint);
}
result.setSeriesKey(dataset.getSeriesKey(series));
result.setSeriesIndex(series);
result.setDataset(dataset);
result.setDatasetIndex(datasetIndex);
}
return result;
}
|
LegendItem function(int datasetIndex, int series) { XYPlot plot = getPlot(); if (plot == null) { return null; } XYDataset dataset = plot.getDataset(datasetIndex); if (dataset == null) { return null; } LegendItem result = null; if (getItemVisible(series, 0)) { String label = getLegendItemLabelGenerator().generateLabel(dataset, series); String description = label; String toolTipText = null; if (getLegendItemToolTipGenerator() != null) { toolTipText = getLegendItemToolTipGenerator().generateLabel( dataset, series); } String urlText = null; if (getLegendItemURLGenerator() != null) { urlText = getLegendItemURLGenerator().generateLabel( dataset, series); } Paint fillPaint = lookupSeriesPaint(series); result = new LegendItem(label, description, toolTipText, urlText, getLegendShape(), fillPaint); result.setLabelFont(lookupLegendTextFont(series)); Paint labelPaint = lookupLegendTextPaint(series); if (labelPaint != null) { result.setLabelPaint(labelPaint); } result.setSeriesKey(dataset.getSeriesKey(series)); result.setSeriesIndex(series); result.setDataset(dataset); result.setDatasetIndex(datasetIndex); } return result; }
|
/**
* Returns a legend item for the specified series.
*
* @param datasetIndex the dataset index (zero-based).
* @param series the series index (zero-based).
*
* @return A legend item for the series (possibly <code>null</code>).
*/
|
Returns a legend item for the specified series
|
getLegendItem
|
{
"repo_name": "SOCR/HTML5_WebSite",
"path": "SOCR2.8/src/jfreechart/org/jfree/chart/renderer/xy/XYDotRenderer.java",
"license": "lgpl-3.0",
"size": 13601
}
|
[
"java.awt.Paint",
"org.jfree.chart.LegendItem",
"org.jfree.chart.plot.XYPlot",
"org.jfree.data.xy.XYDataset"
] |
import java.awt.Paint; import org.jfree.chart.LegendItem; import org.jfree.chart.plot.XYPlot; import org.jfree.data.xy.XYDataset;
|
import java.awt.*; import org.jfree.chart.*; import org.jfree.chart.plot.*; import org.jfree.data.xy.*;
|
[
"java.awt",
"org.jfree.chart",
"org.jfree.data"
] |
java.awt; org.jfree.chart; org.jfree.data;
| 1,689,165
|
ServiceResponse<Void> head204() throws CloudException, IOException;
|
ServiceResponse<Void> head204() throws CloudException, IOException;
|
/**
* Return 204 status code if successful.
*
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the {@link ServiceResponse} object if successful.
*/
|
Return 204 status code if successful
|
head204
|
{
"repo_name": "John-Hart/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/headexceptions/HeadExceptions.java",
"license": "mit",
"size": 2897
}
|
[
"com.microsoft.azure.CloudException",
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] |
import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponse; import java.io.IOException;
|
import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*;
|
[
"com.microsoft.azure",
"com.microsoft.rest",
"java.io"
] |
com.microsoft.azure; com.microsoft.rest; java.io;
| 480,227
|
public static TaskExecution createAndStoreTaskExecutionNoParams(
TaskRepository taskRepository) {
TaskExecution expectedTaskExecution = taskRepository.createTaskExecution();
return expectedTaskExecution;
}
|
static TaskExecution function( TaskRepository taskRepository) { TaskExecution expectedTaskExecution = taskRepository.createTaskExecution(); return expectedTaskExecution; }
|
/**
* Creates a sample TaskExecution and stores it in the taskRepository.
* @param taskRepository the taskRepository where the taskExecution should be stored.
* @return the taskExecution created.
*/
|
Creates a sample TaskExecution and stores it in the taskRepository
|
createAndStoreTaskExecutionNoParams
|
{
"repo_name": "mminella/spring-cloud-task",
"path": "spring-cloud-task-core/src/test/java/org/springframework/cloud/task/util/TaskExecutionCreator.java",
"license": "apache-2.0",
"size": 3195
}
|
[
"org.springframework.cloud.task.repository.TaskExecution",
"org.springframework.cloud.task.repository.TaskRepository"
] |
import org.springframework.cloud.task.repository.TaskExecution; import org.springframework.cloud.task.repository.TaskRepository;
|
import org.springframework.cloud.task.repository.*;
|
[
"org.springframework.cloud"
] |
org.springframework.cloud;
| 1,644,221
|
public ByteBuffer append(String str) {
if (str != null)
return append(DocWriter.getISOBytes(str));
return this;
}
|
ByteBuffer function(String str) { if (str != null) return append(DocWriter.getISOBytes(str)); return this; }
|
/**
* Appends a <CODE>String</CODE> to the buffer. The <CODE>String</CODE> is
* converted according to the encoding ISO-8859-1.
* @param str the <CODE>String</CODE> to be appended
* @return a reference to this <CODE>ByteBuffer</CODE> object
*/
|
Appends a <code>String</code> to the buffer. The <code>String</code> is converted according to the encoding ISO-8859-1
|
append
|
{
"repo_name": "bullda/DroidText",
"path": "src/core/com/lowagie/text/pdf/ByteBuffer.java",
"license": "lgpl-3.0",
"size": 21637
}
|
[
"com.lowagie.text.DocWriter"
] |
import com.lowagie.text.DocWriter;
|
import com.lowagie.text.*;
|
[
"com.lowagie.text"
] |
com.lowagie.text;
| 1,861,128
|
private String getDatabaseProduct(DatabaseMetaData meta) {
try {
return meta.getDatabaseProductName() + " - " + meta.getDatabaseProductVersion();
} catch (SQLException exc) {
return "";
}
}
|
String function(DatabaseMetaData meta) { try { return meta.getDatabaseProductName() + STR + meta.getDatabaseProductVersion(); } catch (SQLException exc) { return ""; } }
|
/**
* Copy / paste from Database, but we can't use Database here...
*
* @param meta DatabaseMetaData
* @return String
*/
|
Copy / paste from Database, but we can't use Database here..
|
getDatabaseProduct
|
{
"repo_name": "phil-pona/schemaspy",
"path": "src/main/java/net/sourceforge/schemaspy/view/HtmlMultipleSchemasIndexPage.java",
"license": "gpl-2.0",
"size": 2754
}
|
[
"java.sql.DatabaseMetaData",
"java.sql.SQLException"
] |
import java.sql.DatabaseMetaData; import java.sql.SQLException;
|
import java.sql.*;
|
[
"java.sql"
] |
java.sql;
| 2,636,696
|
public Origin origin() {
return this.origin;
}
|
Origin function() { return this.origin; }
|
/**
* Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
* audit logs UX. Default value is "user,system".
*
* @return the origin value.
*/
|
Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
|
origin
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/edgeorder/azure-resourcemanager-edgeorder/src/main/java/com/azure/resourcemanager/edgeorder/fluent/models/OperationInner.java",
"license": "mit",
"size": 4132
}
|
[
"com.azure.resourcemanager.edgeorder.models.Origin"
] |
import com.azure.resourcemanager.edgeorder.models.Origin;
|
import com.azure.resourcemanager.edgeorder.models.*;
|
[
"com.azure.resourcemanager"
] |
com.azure.resourcemanager;
| 1,306,006
|
private void writeObject(ObjectOutputStream s) throws IOException {
s.defaultWriteObject();
int rgb = -1; // No Paint -> Use JTextComponent's selection color
if (paint != null) {
// NOTE: We cheat and always serialize the Paint as a Color.
// This is (practically) always the case anyway.
Color c = (paint instanceof Color) ? ((Color) paint) :
SystemColor.textHighlight;
rgb = c.getRGB();
}
s.writeInt(rgb);
}
|
void function(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); int rgb = -1; if (paint != null) { Color c = (paint instanceof Color) ? ((Color) paint) : SystemColor.textHighlight; rgb = c.getRGB(); } s.writeInt(rgb); }
|
/**
* Serializes this painter.
*
* @param s
* The stream to write to.
* @throws IOException
* If an IO error occurs.
*/
|
Serializes this painter
|
writeObject
|
{
"repo_name": "kevinmcgoldrick/Tank",
"path": "tools/script_filter/src/main/java/org/fife/ui/rtextarea/ChangeableHighlightPainter.java",
"license": "epl-1.0",
"size": 13661
}
|
[
"java.awt.Color",
"java.awt.SystemColor",
"java.io.IOException",
"java.io.ObjectOutputStream"
] |
import java.awt.Color; import java.awt.SystemColor; import java.io.IOException; import java.io.ObjectOutputStream;
|
import java.awt.*; import java.io.*;
|
[
"java.awt",
"java.io"
] |
java.awt; java.io;
| 2,166,618
|
public Collection<Alignment> distances(Sequence pattern, int maxDistance);
|
Collection<Alignment> function(Sequence pattern, int maxDistance);
|
/**
* Return the set of distances for each text Sequence within the maximum for the given pattern Sequence
*
* @param pattern the target Sequence
* @param maxDistance the maximum shortestDistance that will be considered
* @return the tuples of parent Sequences and the shortestDistance lists
*/
|
Return the set of distances for each text Sequence within the maximum for the given pattern Sequence
|
distances
|
{
"repo_name": "JMBattista/Bioinformatics",
"path": "alignment/src/main/java/com/vitreoussoftware/bioinformatics/alignment/TextFirstAligner.java",
"license": "mit",
"size": 6559
}
|
[
"com.vitreoussoftware.bioinformatics.sequence.Sequence",
"java.util.Collection"
] |
import com.vitreoussoftware.bioinformatics.sequence.Sequence; import java.util.Collection;
|
import com.vitreoussoftware.bioinformatics.sequence.*; import java.util.*;
|
[
"com.vitreoussoftware.bioinformatics",
"java.util"
] |
com.vitreoussoftware.bioinformatics; java.util;
| 594,229
|
protected boolean validateDepreciationData(Asset asset) {
//do not run the validation if the total cost amount is negative.
//see KFSMI-9266 for details.
if (ObjectUtils.isNotNull(asset.getTotalCostAmount()) && asset.getTotalCostAmount().compareTo(KualiDecimal.ZERO) < 0) {
return true;
}
if (asset.getSalvageAmount() == null) {
asset.setSalvageAmount(KualiDecimal.ZERO);
}
if (asset.getBaseAmount() == null) {
asset.setBaseAmount(KualiDecimal.ZERO);
}
// If the salvage amount is greater than the base amount, then data is invalid
if (asset.getSalvageAmount().compareTo(asset.getBaseAmount()) > 0) {
GlobalVariables.getMessageMap().putWarning(MAINTAINABLE_ERROR_PREFIX + CamsPropertyConstants.Asset.SALVAGE_AMOUNT, CamsKeyConstants.Asset.ERROR_INVALID_SALVAGE_AMOUNT);
}
// If book value is negative then depreciation data is invalid.
if (asset.getBookValue().compareTo(KualiDecimal.ZERO) < 0) {
putFieldError(CamsPropertyConstants.Asset.BOOK_VALUE, CamsKeyConstants.Asset.ERROR_INVALID_BOOKVALUE_AMOUNT);
return false;
}
return true;
}
|
boolean function(Asset asset) { if (ObjectUtils.isNotNull(asset.getTotalCostAmount()) && asset.getTotalCostAmount().compareTo(KualiDecimal.ZERO) < 0) { return true; } if (asset.getSalvageAmount() == null) { asset.setSalvageAmount(KualiDecimal.ZERO); } if (asset.getBaseAmount() == null) { asset.setBaseAmount(KualiDecimal.ZERO); } if (asset.getSalvageAmount().compareTo(asset.getBaseAmount()) > 0) { GlobalVariables.getMessageMap().putWarning(MAINTAINABLE_ERROR_PREFIX + CamsPropertyConstants.Asset.SALVAGE_AMOUNT, CamsKeyConstants.Asset.ERROR_INVALID_SALVAGE_AMOUNT); } if (asset.getBookValue().compareTo(KualiDecimal.ZERO) < 0) { putFieldError(CamsPropertyConstants.Asset.BOOK_VALUE, CamsKeyConstants.Asset.ERROR_INVALID_BOOKVALUE_AMOUNT); return false; } return true; }
|
/**
* validates depreciation data
*
* @param asset
* @return boolean
*/
|
validates depreciation data
|
validateDepreciationData
|
{
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/document/validation/impl/AssetRule.java",
"license": "agpl-3.0",
"size": 35887
}
|
[
"org.kuali.kfs.krad.util.GlobalVariables",
"org.kuali.kfs.krad.util.ObjectUtils",
"org.kuali.kfs.module.cam.CamsKeyConstants",
"org.kuali.kfs.module.cam.CamsPropertyConstants",
"org.kuali.kfs.module.cam.businessobject.Asset",
"org.kuali.rice.core.api.util.type.KualiDecimal"
] |
import org.kuali.kfs.krad.util.GlobalVariables; import org.kuali.kfs.krad.util.ObjectUtils; import org.kuali.kfs.module.cam.CamsKeyConstants; import org.kuali.kfs.module.cam.CamsPropertyConstants; import org.kuali.kfs.module.cam.businessobject.Asset; import org.kuali.rice.core.api.util.type.KualiDecimal;
|
import org.kuali.kfs.krad.util.*; import org.kuali.kfs.module.cam.*; import org.kuali.kfs.module.cam.businessobject.*; import org.kuali.rice.core.api.util.type.*;
|
[
"org.kuali.kfs",
"org.kuali.rice"
] |
org.kuali.kfs; org.kuali.rice;
| 773,968
|
@Nonnull
public String getMainPath() {
String p = getPath();
if (p.startsWith("p")) {
p = PathUtils.getAncestorPath(p, 2);
if (p.length() == 1) {
return "/";
} else {
return p.substring(1);
}
} else {
return p;
}
}
|
String function() { String p = getPath(); if (p.startsWith("p")) { p = PathUtils.getAncestorPath(p, 2); if (p.length() == 1) { return "/"; } else { return p.substring(1); } } else { return p; } }
|
/**
* Returns the path of the main document if this document is part of a _prev
* history tree. Otherwise this method simply returns {@link #getPath()}.
*
* @return the path of the main document.
*/
|
Returns the path of the main document if this document is part of a _prev history tree. Otherwise this method simply returns <code>#getPath()</code>
|
getMainPath
|
{
"repo_name": "ieb/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/NodeDocument.java",
"license": "apache-2.0",
"size": 78791
}
|
[
"org.apache.jackrabbit.oak.commons.PathUtils"
] |
import org.apache.jackrabbit.oak.commons.PathUtils;
|
import org.apache.jackrabbit.oak.commons.*;
|
[
"org.apache.jackrabbit"
] |
org.apache.jackrabbit;
| 232,410
|
public void append(AminoAcidPattern otherPattern) {
int patternLength = length();
HashMap<Integer, ArrayList<Character>> otherTargetedMap = otherPattern.getAaTargeted();
if (otherTargetedMap != null) {
if (residueTargeted == null) {
residueTargeted = new HashMap<>(otherTargetedMap.size());
}
for (int i : otherTargetedMap.keySet()) {
int index = patternLength + i;
residueTargeted.put(index, (ArrayList<Character>) otherTargetedMap.get(i).clone());
}
}
length = patternLength + otherPattern.length();
}
|
void function(AminoAcidPattern otherPattern) { int patternLength = length(); HashMap<Integer, ArrayList<Character>> otherTargetedMap = otherPattern.getAaTargeted(); if (otherTargetedMap != null) { if (residueTargeted == null) { residueTargeted = new HashMap<>(otherTargetedMap.size()); } for (int i : otherTargetedMap.keySet()) { int index = patternLength + i; residueTargeted.put(index, (ArrayList<Character>) otherTargetedMap.get(i).clone()); } } length = patternLength + otherPattern.length(); }
|
/**
* Appends another pattern at the end of this pattern.
*
* @param otherPattern the other pattern to append.
*/
|
Appends another pattern at the end of this pattern
|
append
|
{
"repo_name": "compomics/compomics-utilities",
"path": "src/main/java/com/compomics/util/experiment/biology/aminoacids/sequence/AminoAcidPattern.java",
"license": "apache-2.0",
"size": 45666
}
|
[
"java.util.ArrayList",
"java.util.HashMap"
] |
import java.util.ArrayList; import java.util.HashMap;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,793,305
|
File getConfigFile();
|
File getConfigFile();
|
/**
* Theme config file.
*
* @return theme configutation file
*/
|
Theme config file
|
getConfigFile
|
{
"repo_name": "wswenyue/opoopress",
"path": "api/src/main/java/org/opoo/press/Theme.java",
"license": "apache-2.0",
"size": 1659
}
|
[
"java.io.File"
] |
import java.io.File;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 318,483
|
public void seed() {
int seedLength = Math.max((keccack1600.getCapacitityBits() >> 4) + 1, MIN_SEED_LENGTH_BYTES);
byte[] seed = new byte[seedLength];
synchronized (seedGenerator) {
seedGenerator.getBytes(seed, 0, seed.length);
seedGenerator.forget();
}
feed(seed, 0, seed.length);
Arrays.fill(seed, (byte) 0);
seed = null;
}
|
void function() { int seedLength = Math.max((keccack1600.getCapacitityBits() >> 4) + 1, MIN_SEED_LENGTH_BYTES); byte[] seed = new byte[seedLength]; synchronized (seedGenerator) { seedGenerator.getBytes(seed, 0, seed.length); seedGenerator.forget(); } feed(seed, 0, seed.length); Arrays.fill(seed, (byte) 0); seed = null; }
|
/**
* (Re)seed using the internal seed generator
*
*/
|
(Re)seed using the internal seed generator
|
seed
|
{
"repo_name": "jcryptool/crypto",
"path": "org.jcryptool.visual.sphincsplus/src/com/github/aelstad/keccakj/core/DuplexRandom.java",
"license": "epl-1.0",
"size": 5126
}
|
[
"java.util.Arrays"
] |
import java.util.Arrays;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,883,931
|
@Override
public ApiTopUsersListDTO getTopApiUsers(String apiName, String version, String tenantDomain, String fromDate,
String toDate, int start, int limit) throws APIMgtUsageQueryServiceClientException {
List<ApiTopUsersDTO> tenantFilteredTopUsersDTOs = getTopApiUsers(
APIUsageStatisticsClientConstants.API_REQUEST_SUMMARY, apiName, tenantDomain, version, fromDate,
toDate);
//filter based on pagination
List<ApiTopUsersDTO> paginationFilteredTopUsersDTOs = new ArrayList<ApiTopUsersDTO>();
ApiTopUsersListDTO apiTopUsersListDTO = new ApiTopUsersListDTO();
int end = (start + limit) <= tenantFilteredTopUsersDTOs.size() ? (start + limit) : tenantFilteredTopUsersDTOs.size();
for (int i = start; i < end; i++) {
paginationFilteredTopUsersDTOs.add(tenantFilteredTopUsersDTOs.get(i));
}
apiTopUsersListDTO.setApiTopUsersDTOs(paginationFilteredTopUsersDTOs);
apiTopUsersListDTO.setLimit(limit);
apiTopUsersListDTO.setOffset(start);
apiTopUsersListDTO.setTotalRecordCount(tenantFilteredTopUsersDTOs.size());
return apiTopUsersListDTO;
}
|
ApiTopUsersListDTO function(String apiName, String version, String tenantDomain, String fromDate, String toDate, int start, int limit) throws APIMgtUsageQueryServiceClientException { List<ApiTopUsersDTO> tenantFilteredTopUsersDTOs = getTopApiUsers( APIUsageStatisticsClientConstants.API_REQUEST_SUMMARY, apiName, tenantDomain, version, fromDate, toDate); List<ApiTopUsersDTO> paginationFilteredTopUsersDTOs = new ArrayList<ApiTopUsersDTO>(); ApiTopUsersListDTO apiTopUsersListDTO = new ApiTopUsersListDTO(); int end = (start + limit) <= tenantFilteredTopUsersDTOs.size() ? (start + limit) : tenantFilteredTopUsersDTOs.size(); for (int i = start; i < end; i++) { paginationFilteredTopUsersDTOs.add(tenantFilteredTopUsersDTOs.get(i)); } apiTopUsersListDTO.setApiTopUsersDTOs(paginationFilteredTopUsersDTOs); apiTopUsersListDTO.setLimit(limit); apiTopUsersListDTO.setOffset(start); apiTopUsersListDTO.setTotalRecordCount(tenantFilteredTopUsersDTOs.size()); return apiTopUsersListDTO; }
|
/**
* this method return the top users for the for the provided API.
*
* @param apiName API name
* @param version version of the required API
* @param fromDate Start date of the time span
* @param toDate End date of time span
* @param start starting index of the result
* @param limit number of results to return
* @return a collection containing the data related to Api usage
* @throws APIMgtUsageQueryServiceClientException
*/
|
this method return the top users for the for the provided API
|
getTopApiUsers
|
{
"repo_name": "pubudu538/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.usage/org.wso2.carbon.apimgt.usage.client/src/main/java/org/wso2/carbon/apimgt/usage/client/impl/APIUsageStatisticsRdbmsClientImpl.java",
"license": "apache-2.0",
"size": 165547
}
|
[
"java.util.ArrayList",
"java.util.List",
"org.wso2.carbon.apimgt.usage.client.APIUsageStatisticsClientConstants",
"org.wso2.carbon.apimgt.usage.client.dto.ApiTopUsersDTO",
"org.wso2.carbon.apimgt.usage.client.dto.ApiTopUsersListDTO",
"org.wso2.carbon.apimgt.usage.client.exception.APIMgtUsageQueryServiceClientException"
] |
import java.util.ArrayList; import java.util.List; import org.wso2.carbon.apimgt.usage.client.APIUsageStatisticsClientConstants; import org.wso2.carbon.apimgt.usage.client.dto.ApiTopUsersDTO; import org.wso2.carbon.apimgt.usage.client.dto.ApiTopUsersListDTO; import org.wso2.carbon.apimgt.usage.client.exception.APIMgtUsageQueryServiceClientException;
|
import java.util.*; import org.wso2.carbon.apimgt.usage.client.*; import org.wso2.carbon.apimgt.usage.client.dto.*; import org.wso2.carbon.apimgt.usage.client.exception.*;
|
[
"java.util",
"org.wso2.carbon"
] |
java.util; org.wso2.carbon;
| 769,099
|
@Generated
@Selector("preferredMediaChunkAlignment")
@NInt
public native long preferredMediaChunkAlignment();
|
@Selector(STR) native long function();
|
/**
* [@property] preferredMediaChunkAlignment
* <p>
* For file types that support media chunk alignment, the boundary for media chunk alignment (in bytes).
* <p>
* The default value is 0, which means that no padding should be used to achieve chunk alignment. It is an error to set a negative value for chunk alignment.
*/
|
[@property] preferredMediaChunkAlignment For file types that support media chunk alignment, the boundary for media chunk alignment (in bytes). The default value is 0, which means that no padding should be used to achieve chunk alignment. It is an error to set a negative value for chunk alignment
|
preferredMediaChunkAlignment
|
{
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/avfoundation/AVMutableMovieTrack.java",
"license": "apache-2.0",
"size": 31103
}
|
[
"org.moe.natj.objc.ann.Selector"
] |
import org.moe.natj.objc.ann.Selector;
|
import org.moe.natj.objc.ann.*;
|
[
"org.moe.natj"
] |
org.moe.natj;
| 781,851
|
protected String getScalarOutParameterName() {
return this.callMetaDataContext.getScalarOutParameterName();
}
/**
* Match the provided in parameter values with registered parameters and
* parameters defined via metadata processing.
* @param parameterSource the parameter vakues provided as a {@link SqlParameterSource}
|
String function() { return this.callMetaDataContext.getScalarOutParameterName(); } /** * Match the provided in parameter values with registered parameters and * parameters defined via metadata processing. * @param parameterSource the parameter vakues provided as a {@link SqlParameterSource}
|
/**
* Get the name of a single out parameter or return value.
* Used for functions or procedures with one out parameter.
*/
|
Get the name of a single out parameter or return value. Used for functions or procedures with one out parameter
|
getScalarOutParameterName
|
{
"repo_name": "cbeams-archive/spring-framework-2.5.x",
"path": "tiger/src/org/springframework/jdbc/core/simple/AbstractJdbcCall.java",
"license": "apache-2.0",
"size": 13519
}
|
[
"org.springframework.jdbc.core.namedparam.SqlParameterSource"
] |
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
|
import org.springframework.jdbc.core.namedparam.*;
|
[
"org.springframework.jdbc"
] |
org.springframework.jdbc;
| 1,400,645
|
ExecutorService getExecutorService();
|
ExecutorService getExecutorService();
|
/**
* The service used to run asynchronous or parallel tasks for the
* {@link IRelation}.
*/
|
The service used to run asynchronous or parallel tasks for the <code>IRelation</code>
|
getExecutorService
|
{
"repo_name": "blazegraph/database",
"path": "bigdata-core/bigdata/src/java/com/bigdata/relation/IRelation.java",
"license": "gpl-2.0",
"size": 14086
}
|
[
"java.util.concurrent.ExecutorService"
] |
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.*;
|
[
"java.util"
] |
java.util;
| 2,428,654
|
public List<HumanEntity> getViewers() {
return transaction.getTopInventory().getViewers();
}
|
List<HumanEntity> function() { return transaction.getTopInventory().getViewers(); }
|
/**
* Gets the list of players viewing the primary (upper) inventory involved
* in this event
*
* @return A list of people viewing.
*/
|
Gets the list of players viewing the primary (upper) inventory involved in this event
|
getViewers
|
{
"repo_name": "Scrik/Cauldron-1",
"path": "eclipse/cauldron/src/main/java/org/bukkit/event/inventory/InventoryEvent.java",
"license": "gpl-3.0",
"size": 1373
}
|
[
"java.util.List",
"org.bukkit.entity.HumanEntity"
] |
import java.util.List; import org.bukkit.entity.HumanEntity;
|
import java.util.*; import org.bukkit.entity.*;
|
[
"java.util",
"org.bukkit.entity"
] |
java.util; org.bukkit.entity;
| 882,659
|
public Builder importLdif(final InputStream ldif) throws Exception {
assertNotStarted();
if (directoryService == null) {
throw new IllegalStateException("The Directory service has not been created.");
}
CoreSession adminSession = directoryService.getAdminSession();
SchemaManager schemaManager = directoryService.getSchemaManager();
LdifReader ldifReader = new LdifReader(ldif);
for (LdifEntry ldifEntry : ldifReader) {
adminSession.add(new DefaultEntry(schemaManager, ldifEntry.getEntry()));
}
ldifReader.close();
ldif.close();
return this;
}
|
Builder function(final InputStream ldif) throws Exception { assertNotStarted(); if (directoryService == null) { throw new IllegalStateException(STR); } CoreSession adminSession = directoryService.getAdminSession(); SchemaManager schemaManager = directoryService.getSchemaManager(); LdifReader ldifReader = new LdifReader(ldif); for (LdifEntry ldifEntry : ldifReader) { adminSession.add(new DefaultEntry(schemaManager, ldifEntry.getEntry())); } ldifReader.close(); ldif.close(); return this; }
|
/**
* Import all of the entries from the provided LDIF stream.
*
* Note: The whole stream is read
*
* @param ldif - Stream containing the LDIF.
* @return This Builder for subsequent changes.
*/
|
Import all of the entries from the provided LDIF stream. Note: The whole stream is read
|
importLdif
|
{
"repo_name": "girirajsharma/wildfly-elytron",
"path": "src/test/java/org/wildfly/security/apacheds/LdapService.java",
"license": "apache-2.0",
"size": 8963
}
|
[
"java.io.InputStream",
"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.core.api.CoreSession"
] |
import java.io.InputStream; 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.server.core.api.CoreSession;
|
import java.io.*; 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.core.api.*;
|
[
"java.io",
"org.apache.directory"
] |
java.io; org.apache.directory;
| 224,326
|
@Override
public JobStatus getJobStatus(final JobId jobId) {
final ZooKeeperClient client = provider.get("getJobStatus");
final Job job = getJob(client, jobId);
if (job == null) {
return null;
}
final List<String> hosts;
try {
hosts = listJobHosts(client, jobId);
} catch (JobDoesNotExistException e) {
return null;
}
final ImmutableMap.Builder<String, Deployment> deployments = ImmutableMap.builder();
final ImmutableMap.Builder<String, TaskStatus> taskStatuses = ImmutableMap.builder();
for (final String host : hosts) {
final TaskStatus taskStatus = getTaskStatus(client, host, jobId);
if (taskStatus != null) {
taskStatuses.put(host, taskStatus);
}
final Deployment deployment = getDeployment(host, jobId);
if (deployment != null) {
deployments.put(host, deployment);
}
}
final Map<String, Deployment> deploymentsMap = deployments.build();
return JobStatus.newBuilder()
.setJob(job)
.setDeployments(deploymentsMap)
.setTaskStatuses(taskStatuses.build())
.build();
}
|
JobStatus function(final JobId jobId) { final ZooKeeperClient client = provider.get(STR); final Job job = getJob(client, jobId); if (job == null) { return null; } final List<String> hosts; try { hosts = listJobHosts(client, jobId); } catch (JobDoesNotExistException e) { return null; } final ImmutableMap.Builder<String, Deployment> deployments = ImmutableMap.builder(); final ImmutableMap.Builder<String, TaskStatus> taskStatuses = ImmutableMap.builder(); for (final String host : hosts) { final TaskStatus taskStatus = getTaskStatus(client, host, jobId); if (taskStatus != null) { taskStatuses.put(host, taskStatus); } final Deployment deployment = getDeployment(host, jobId); if (deployment != null) { deployments.put(host, deployment); } } final Map<String, Deployment> deploymentsMap = deployments.build(); return JobStatus.newBuilder() .setJob(job) .setDeployments(deploymentsMap) .setTaskStatuses(taskStatuses.build()) .build(); }
|
/**
* Returns the current job status as a {@link JobStatus} object.
*/
|
Returns the current job status as a <code>JobStatus</code> object
|
getJobStatus
|
{
"repo_name": "stewnorriss/helios",
"path": "helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java",
"license": "apache-2.0",
"size": 67602
}
|
[
"com.google.common.collect.ImmutableMap",
"com.spotify.helios.common.descriptors.Deployment",
"com.spotify.helios.common.descriptors.Job",
"com.spotify.helios.common.descriptors.JobId",
"com.spotify.helios.common.descriptors.JobStatus",
"com.spotify.helios.common.descriptors.TaskStatus",
"com.spotify.helios.servicescommon.coordination.ZooKeeperClient",
"java.util.List",
"java.util.Map"
] |
import com.google.common.collect.ImmutableMap; import com.spotify.helios.common.descriptors.Deployment; import com.spotify.helios.common.descriptors.Job; import com.spotify.helios.common.descriptors.JobId; import com.spotify.helios.common.descriptors.JobStatus; import com.spotify.helios.common.descriptors.TaskStatus; import com.spotify.helios.servicescommon.coordination.ZooKeeperClient; import java.util.List; import java.util.Map;
|
import com.google.common.collect.*; import com.spotify.helios.common.descriptors.*; import com.spotify.helios.servicescommon.coordination.*; import java.util.*;
|
[
"com.google.common",
"com.spotify.helios",
"java.util"
] |
com.google.common; com.spotify.helios; java.util;
| 211,139
|
protected static LabelValueBean lv(String label, String value) {
return new LabelValueBean(label, value);
}
|
static LabelValueBean function(String label, String value) { return new LabelValueBean(label, value); }
|
/**
* Construct a LabelValueBean with specified label and value
* @param label to use
* @param value value of selection
* @return LabelValueBean instance
*/
|
Construct a LabelValueBean with specified label and value
|
lv
|
{
"repo_name": "colloquium/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/struts/RhnAction.java",
"license": "gpl-2.0",
"size": 10847
}
|
[
"org.apache.struts.util.LabelValueBean"
] |
import org.apache.struts.util.LabelValueBean;
|
import org.apache.struts.util.*;
|
[
"org.apache.struts"
] |
org.apache.struts;
| 1,091,218
|
public void setAmt (BigDecimal Amt);
|
void function (BigDecimal Amt);
|
/** Set Amount.
* Amount
*/
|
Set Amount. Amount
|
setAmt
|
{
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/I_C_DunningRunEntry.java",
"license": "gpl-2.0",
"size": 7915
}
|
[
"java.math.BigDecimal"
] |
import java.math.BigDecimal;
|
import java.math.*;
|
[
"java.math"
] |
java.math;
| 1,632,399
|
private String getLikesDislikes(String divID){
Elements resultLinks = doc.select(divID);
String tempLikes = resultLinks.text();
String likes = tempLikes.split("\\s")[0];
return likes;
}
|
String function(String divID){ Elements resultLinks = doc.select(divID); String tempLikes = resultLinks.text(); String likes = tempLikes.split("\\s")[0]; return likes; }
|
/**
* Gets likes/dislikes based on the div ID . Scrapes the DOM.
* @param divID the div ID for the like/dislike button
* @return the amount of likes/dislikes
*/
|
Gets likes/dislikes based on the div ID . Scrapes the DOM
|
getLikesDislikes
|
{
"repo_name": "arocketman/arocketmanbot",
"path": "src/core/YoutubeVideo.java",
"license": "gpl-2.0",
"size": 2166
}
|
[
"org.jsoup.select.Elements"
] |
import org.jsoup.select.Elements;
|
import org.jsoup.select.*;
|
[
"org.jsoup.select"
] |
org.jsoup.select;
| 2,690,218
|
public final Schema getWriter() {
return _writer;
}
|
final Schema function() { return _writer; }
|
/**
* Gets the writer {@link Schema} used by {@link #serialize(GenericRecord)}.
*/
|
Gets the writer <code>Schema</code> used by <code>#serialize(GenericRecord)</code>
|
getWriter
|
{
"repo_name": "ferdiknight/krati",
"path": "krati-avro/src/main/java/krati/store/avro/AvroGenericRecordResolvingSerializer.java",
"license": "apache-2.0",
"size": 4496
}
|
[
"org.apache.avro.Schema"
] |
import org.apache.avro.Schema;
|
import org.apache.avro.*;
|
[
"org.apache.avro"
] |
org.apache.avro;
| 1,528,167
|
private void makeLoopHeader(BciBlock block) {
if (!block.isLoopHeader) {
block.isLoopHeader = true;
if (block.isExceptionEntry) {
// Loops that are implicitly formed by an exception handler lead to all sorts of
// corner cases.
// Don't compile such methods for now, until we see a concrete case that allows
// checking for correctness.
throw new BailoutException("Loop formed by an exception handler");
}
if (nextLoop >= LOOP_HEADER_MAX_CAPACITY) {
// This restriction can be removed by using a fall-back to a BitSet in case we have
// more than 64 loops
// Don't compile such methods for now, until we see a concrete case that allows
// checking for correctness.
throw new BailoutException("Too many loops in method");
}
assert block.loops == 0;
block.loops = 1L << nextLoop;
Debug.log("makeLoopHeader(%s) -> %x", block, block.loops);
if (loopHeaders == null) {
loopHeaders = new BciBlock[LOOP_HEADER_INITIAL_CAPACITY];
} else if (nextLoop >= loopHeaders.length) {
loopHeaders = Arrays.copyOf(loopHeaders, LOOP_HEADER_MAX_CAPACITY);
}
loopHeaders[nextLoop] = block;
block.loopId = nextLoop;
nextLoop++;
}
assert Long.bitCount(block.loops) == 1;
}
|
void function(BciBlock block) { if (!block.isLoopHeader) { block.isLoopHeader = true; if (block.isExceptionEntry) { throw new BailoutException(STR); } if (nextLoop >= LOOP_HEADER_MAX_CAPACITY) { throw new BailoutException(STR); } assert block.loops == 0; block.loops = 1L << nextLoop; Debug.log(STR, block, block.loops); if (loopHeaders == null) { loopHeaders = new BciBlock[LOOP_HEADER_INITIAL_CAPACITY]; } else if (nextLoop >= loopHeaders.length) { loopHeaders = Arrays.copyOf(loopHeaders, LOOP_HEADER_MAX_CAPACITY); } loopHeaders[nextLoop] = block; block.loopId = nextLoop; nextLoop++; } assert Long.bitCount(block.loops) == 1; }
|
/**
* Mark the block as a loop header, using the next available loop number. Also checks for corner
* cases that we don't want to compile.
*/
|
Mark the block as a loop header, using the next available loop number. Also checks for corner cases that we don't want to compile
|
makeLoopHeader
|
{
"repo_name": "smarr/GraalCompiler",
"path": "graal/com.oracle.graal.java/src/com/oracle/graal/java/BciBlockMapping.java",
"license": "gpl-2.0",
"size": 40038
}
|
[
"com.oracle.graal.debug.Debug",
"java.util.Arrays"
] |
import com.oracle.graal.debug.Debug; import java.util.Arrays;
|
import com.oracle.graal.debug.*; import java.util.*;
|
[
"com.oracle.graal",
"java.util"
] |
com.oracle.graal; java.util;
| 2,021,643
|
RoleClassManufacturedProduct getClassCode();
|
RoleClassManufacturedProduct getClassCode();
|
/**
* Returns the value of the '<em><b>Class Code</b></em>' attribute.
* The default value is <code>"MANU"</code>.
* The literals are from the enumeration {@link org.openhealthtools.mdht.uml.hl7.vocab.RoleClassManufacturedProduct}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Class Code</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Class Code</em>' attribute.
* @see org.openhealthtools.mdht.uml.hl7.vocab.RoleClassManufacturedProduct
* @see #isSetClassCode()
* @see #unsetClassCode()
* @see #setClassCode(RoleClassManufacturedProduct)
* @see org.openhealthtools.mdht.uml.cda.CDAPackage#getManufacturedProduct_ClassCode()
* @model default="MANU" unsettable="true" ordered="false"
* @generated
*/
|
Returns the value of the 'Class Code' attribute. The default value is <code>"MANU"</code>. The literals are from the enumeration <code>org.openhealthtools.mdht.uml.hl7.vocab.RoleClassManufacturedProduct</code>. If the meaning of the 'Class Code' attribute isn't clear, there really should be more of a description here...
|
getClassCode
|
{
"repo_name": "drbgfc/mdht",
"path": "cda/plugins/org.openhealthtools.mdht.uml.cda/src/org/openhealthtools/mdht/uml/cda/ManufacturedProduct.java",
"license": "epl-1.0",
"size": 14707
}
|
[
"org.openhealthtools.mdht.uml.hl7.vocab.RoleClassManufacturedProduct"
] |
import org.openhealthtools.mdht.uml.hl7.vocab.RoleClassManufacturedProduct;
|
import org.openhealthtools.mdht.uml.hl7.vocab.*;
|
[
"org.openhealthtools.mdht"
] |
org.openhealthtools.mdht;
| 2,144,465
|
public void setAddresses(Set<CassandraEntityAddressUni1ToM> addresses)
{
this.addresses = addresses;
}
|
void function(Set<CassandraEntityAddressUni1ToM> addresses) { this.addresses = addresses; }
|
/**
* Sets the addresses.
*
* @param addresses
* the addresses to set
*/
|
Sets the addresses
|
setAddresses
|
{
"repo_name": "ravisund/Kundera",
"path": "src/kundera-cassandra/cassandra-core/src/test/java/com/impetus/client/schemamanager/entites/CassandraEntityPersonUni1ToM.java",
"license": "apache-2.0",
"size": 3798
}
|
[
"java.util.Set"
] |
import java.util.Set;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 543,415
|
@Test
public void testHeartBeat() throws Exception {
int startTicks = BukkitTester._currentTick;
long end = System.currentTimeMillis() + (10 * 50); // end in 10 ticks
while (System.currentTimeMillis() < end) {
BukkitTester.heartBeat();
}
assertTrue(BukkitTester._currentTick > startTicks + 8 &&
BukkitTester._currentTick < startTicks + 12 );
}
|
void function() throws Exception { int startTicks = BukkitTester._currentTick; long end = System.currentTimeMillis() + (10 * 50); while (System.currentTimeMillis() < end) { BukkitTester.heartBeat(); } assertTrue(BukkitTester._currentTick > startTicks + 8 && BukkitTester._currentTick < startTicks + 12 ); }
|
/**
* Make sure {@link #heartBear} works correctly.
*/
|
Make sure <code>#heartBear</code> works correctly
|
testHeartBeat
|
{
"repo_name": "JCThePants/BukkitTestMock",
"path": "tests/com/jcwhatever/v1_8_R3/BukkitTestTest.java",
"license": "mit",
"size": 8458
}
|
[
"org.junit.Assert"
] |
import org.junit.Assert;
|
import org.junit.*;
|
[
"org.junit"
] |
org.junit;
| 2,616,427
|
public Drive getDriveService() {
Drive service = new Drive.Builder(
AndroidHttp.newCompatibleTransport(),
new GsonFactory(), mCredentials)
.setApplicationName(mContext.getApplicationInfo().name)
.build();
return service;
}
|
Drive function() { Drive service = new Drive.Builder( AndroidHttp.newCompatibleTransport(), new GsonFactory(), mCredentials) .setApplicationName(mContext.getApplicationInfo().name) .build(); return service; }
|
/**
* Constructs a Drive service in the current context and with the
* credentials use to initiate AppdataPreferences instance.
* @return Drive service instance.
*/
|
Constructs a Drive service in the current context and with the credentials use to initiate AppdataPreferences instance
|
getDriveService
|
{
"repo_name": "paug/iosched",
"path": "android/src/main/java/fr/paug/droidcon/sync/userdata/http/HTTPUserDataSyncHelper.java",
"license": "apache-2.0",
"size": 8274
}
|
[
"com.google.api.client.extensions.android.http.AndroidHttp",
"com.google.api.client.json.gson.GsonFactory",
"com.google.api.services.drive.Drive"
] |
import com.google.api.client.extensions.android.http.AndroidHttp; import com.google.api.client.json.gson.GsonFactory; import com.google.api.services.drive.Drive;
|
import com.google.api.client.extensions.android.http.*; import com.google.api.client.json.gson.*; import com.google.api.services.drive.*;
|
[
"com.google.api"
] |
com.google.api;
| 35,590
|
public FtpFileType getFileType(final FileSystemOptions opts) {
return getEnum(FtpFileType.class, opts, FILE_TYPE);
}
|
FtpFileType function(final FileSystemOptions opts) { return getEnum(FtpFileType.class, opts, FILE_TYPE); }
|
/**
* Gets the file type parameter.
*
* @param opts The FileSystemOptions.
* @return A FtpFileType
* @since 2.1
*/
|
Gets the file type parameter
|
getFileType
|
{
"repo_name": "seeburger-ag/commons-vfs",
"path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java",
"license": "apache-2.0",
"size": 17410
}
|
[
"org.apache.commons.vfs2.FileSystemOptions"
] |
import org.apache.commons.vfs2.FileSystemOptions;
|
import org.apache.commons.vfs2.*;
|
[
"org.apache.commons"
] |
org.apache.commons;
| 664,132
|
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public long getRet() {
return ret;
}
|
@Generated(value = STR, date = STR, comments = STR) long function() { return ret; }
|
/**
* Gets the value of the ret property.
*
*/
|
Gets the value of the ret property
|
getRet
|
{
"repo_name": "kanonirov/lanb-client",
"path": "src/main/java/ru/lanbilling/webservice/wsdl/ActivateHybridEquipmentResponse.java",
"license": "mit",
"size": 1737
}
|
[
"javax.annotation.Generated"
] |
import javax.annotation.Generated;
|
import javax.annotation.*;
|
[
"javax.annotation"
] |
javax.annotation;
| 1,394,368
|
int encodev(int best, float[] a, Buffer b) {
for (int k = 0; k < dim; k++) {
a[k] = valuelist[best * dim + k];
}
return (encode(best, b));
}
|
int encodev(int best, float[] a, Buffer b) { for (int k = 0; k < dim; k++) { a[k] = valuelist[best * dim + k]; } return (encode(best, b)); }
|
/**
* Encode v.
* @param best best flag
* @param a output array
* @param b output biffer
* @return the number of bits and *modifies a* to the quantization value
*/
|
Encode v
|
encodev
|
{
"repo_name": "akarnokd/open-ig",
"path": "src/com/jcraft/jorbis/CodeBook.java",
"license": "lgpl-3.0",
"size": 18644
}
|
[
"com.jcraft.jogg.Buffer"
] |
import com.jcraft.jogg.Buffer;
|
import com.jcraft.jogg.*;
|
[
"com.jcraft.jogg"
] |
com.jcraft.jogg;
| 1,869,541
|
protected Set<?> getInvisibleQualifiers() {
return new HashSet<>();
}
// TODO: support for checker-defined visitor
|
Set<?> function() { return new HashSet<>(); }
|
/**
* Return a list of qualifiers that should not be printed unless printAllQualifiers is enabled.
*/
|
Return a list of qualifiers that should not be printed unless printAllQualifiers is enabled
|
getInvisibleQualifiers
|
{
"repo_name": "Jianchu/checker-framework",
"path": "framework/src/org/checkerframework/qualframework/base/Checker.java",
"license": "gpl-2.0",
"size": 3616
}
|
[
"java.util.HashSet",
"java.util.Set"
] |
import java.util.HashSet; import java.util.Set;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,531,836
|
public AggregationStrategy getAggregationStrategy() {
return aggregationStrategy;
}
|
AggregationStrategy function() { return aggregationStrategy; }
|
/**
* Use {@link #getAggregationStrategy(org.apache.camel.Exchange)} instead.
*/
|
Use <code>#getAggregationStrategy(org.apache.camel.Exchange)</code> instead
|
getAggregationStrategy
|
{
"repo_name": "jamesnetherton/camel",
"path": "camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java",
"license": "apache-2.0",
"size": 63368
}
|
[
"org.apache.camel.processor.aggregate.AggregationStrategy"
] |
import org.apache.camel.processor.aggregate.AggregationStrategy;
|
import org.apache.camel.processor.aggregate.*;
|
[
"org.apache.camel"
] |
org.apache.camel;
| 2,374,833
|
public WebResponse invokeAppPasswordsEndpoint_create(String testCase, WebConversation wc, TestSettings settings, String accessToken, String appName, String usedBy,
List<validationData> expectations) throws Exception {
return invokeAppPasswordsEndpoint_create(testCase, wc, settings, accessToken, appName, usedBy, Constants.HEADER, expectations);
}
|
WebResponse function(String testCase, WebConversation wc, TestSettings settings, String accessToken, String appName, String usedBy, List<validationData> expectations) throws Exception { return invokeAppPasswordsEndpoint_create(testCase, wc, settings, accessToken, appName, usedBy, Constants.HEADER, expectations); }
|
/**
* Invoke the app-passwords endpoint method to create an app-password
* This method requests that the clientId/clientSecret be passed in the header
*
* @param testCase
* - the testCase name
* @param wc
* - the conversation
* @param settings
* - current testSettings
* @param accessToken
* - the access_token to use to generate the app-password
* @param appName
* - the app name to register the app-password with
* @param usedBy
* - the client_d that will be allowed to use the tokens created from the app-password created
* @param expectations
* - the expected results/output from invoking the endpoint
* @return - returns the response from the invocation (could contain the app-password, or error/failure information
* @throws Exception
* - this method should NOT result in an exception - if one is thrown, the calling test case should report an
* error
*/
|
Invoke the app-passwords endpoint method to create an app-password This method requests that the clientId/clientSecret be passed in the header
|
invokeAppPasswordsEndpoint_create
|
{
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.security.oauth.oidc_fat.common/src/com/ibm/ws/security/oauth_oidc/fat/commonTest/CommonTest.java",
"license": "epl-1.0",
"size": 157313
}
|
[
"com.meterware.httpunit.WebConversation",
"com.meterware.httpunit.WebResponse",
"java.util.List"
] |
import com.meterware.httpunit.WebConversation; import com.meterware.httpunit.WebResponse; import java.util.List;
|
import com.meterware.httpunit.*; import java.util.*;
|
[
"com.meterware.httpunit",
"java.util"
] |
com.meterware.httpunit; java.util;
| 484,605
|
ITreeNode<CTag> insertTag(final ITreeNode<CTag> parent, final String name)
throws CouldntSaveDataException;
|
ITreeNode<CTag> insertTag(final ITreeNode<CTag> parent, final String name) throws CouldntSaveDataException;
|
/**
* Inserts a tag after a given parent tag. All original child tags of the parent tag are child
* tags of the new tag once insertion is complete.
*
* @param parent The parent tag of the new tag.
* @param name The name of the new tag.
*
* @return The new tag.
*
* @throws CouldntSaveDataException Thrown if the new tag could not be stored to the database.
*/
|
Inserts a tag after a given parent tag. All original child tags of the parent tag are child tags of the new tag once insertion is complete
|
insertTag
|
{
"repo_name": "mayl8822/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Tagging/ITagTreeManager.java",
"license": "apache-2.0",
"size": 3048
}
|
[
"com.google.security.zynamics.binnavi.Database",
"com.google.security.zynamics.zylib.types.trees.ITreeNode"
] |
import com.google.security.zynamics.binnavi.Database; import com.google.security.zynamics.zylib.types.trees.ITreeNode;
|
import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.zylib.types.trees.*;
|
[
"com.google.security"
] |
com.google.security;
| 1,577,517
|
@Generated
@CFunction
@NUInt
public static native long NSDecimalPower(VoidPtr result, VoidPtr number, @NUInt long power,
@NUInt long roundingMode);
|
static native long function(VoidPtr result, VoidPtr number, @NUInt long power, @NUInt long roundingMode);
|
/**
* Division could be silently inexact;
* Exact operations. result may be a pointer to same space as leftOperand or rightOperand
*/
|
Division could be silently inexact; Exact operations. result may be a pointer to same space as leftOperand or rightOperand
|
NSDecimalPower
|
{
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/foundation/c/Foundation.java",
"license": "apache-2.0",
"size": 156135
}
|
[
"org.moe.natj.general.ann.NUInt",
"org.moe.natj.general.ptr.VoidPtr"
] |
import org.moe.natj.general.ann.NUInt; import org.moe.natj.general.ptr.VoidPtr;
|
import org.moe.natj.general.ann.*; import org.moe.natj.general.ptr.*;
|
[
"org.moe.natj"
] |
org.moe.natj;
| 2,657,917
|
private JsonArray<String> buildPrefix(@Nonnull CodeBlock codeBlock) {
Preconditions.checkNotNull(codeBlock);
CodeBlock current = codeBlock;
JsonArray<String> prefix = JsonCollections.createArray();
while (current != null && Type.VALUE_FILE != current.getBlockType()) {
prefix.add(current.getName());
current = contextFile.getReferences().getParent(current);
}
prefix.reverse();
return prefix;
}
|
JsonArray<String> function(@Nonnull CodeBlock codeBlock) { Preconditions.checkNotNull(codeBlock); CodeBlock current = codeBlock; JsonArray<String> prefix = JsonCollections.createArray(); while (current != null && Type.VALUE_FILE != current.getBlockType()) { prefix.add(current.getName()); current = contextFile.getReferences().getParent(current); } prefix.reverse(); return prefix; }
|
/**
* Builds sequence on names that represents path to given {@link CodeBlock}.
*
* <p>Given block name is the last item in resulting sequence.
*/
|
Builds sequence on names that represents path to given <code>CodeBlock</code>. Given block name is the last item in resulting sequence
|
buildPrefix
|
{
"repo_name": "WeTheInternet/collide",
"path": "client/src/main/java/com/google/collide/client/code/autocomplete/codegraph/ScopeTrieBuilder.java",
"license": "apache-2.0",
"size": 6983
}
|
[
"com.google.collide.dto.CodeBlock",
"com.google.collide.json.shared.JsonArray",
"com.google.collide.shared.util.JsonCollections",
"com.google.common.base.Preconditions",
"javax.annotation.Nonnull"
] |
import com.google.collide.dto.CodeBlock; import com.google.collide.json.shared.JsonArray; import com.google.collide.shared.util.JsonCollections; import com.google.common.base.Preconditions; import javax.annotation.Nonnull;
|
import com.google.collide.dto.*; import com.google.collide.json.shared.*; import com.google.collide.shared.util.*; import com.google.common.base.*; import javax.annotation.*;
|
[
"com.google.collide",
"com.google.common",
"javax.annotation"
] |
com.google.collide; com.google.common; javax.annotation;
| 831,735
|
public void overrideItemsChBChecked() {
logger.log(Level.FINER, "override item checkbox checked: " + window.isOverrideItemsChBChecked());
Config.getInstance().setOverrideItems(window.isOverrideItemsChBChecked());
window.setItemsEnabled(window.isOverrideItemsChBChecked());
}
|
void function() { logger.log(Level.FINER, STR + window.isOverrideItemsChBChecked()); Config.getInstance().setOverrideItems(window.isOverrideItemsChBChecked()); window.setItemsEnabled(window.isOverrideItemsChBChecked()); }
|
/**
* override item shortcuts checked
*/
|
override item shortcuts checked
|
overrideItemsChBChecked
|
{
"repo_name": "cf86/LoLToolKit",
"path": "src/main/java/controller/SmartcastController.java",
"license": "gpl-3.0",
"size": 9348
}
|
[
"java.util.logging.Level"
] |
import java.util.logging.Level;
|
import java.util.logging.*;
|
[
"java.util"
] |
java.util;
| 897,977
|
private Path getInputPath() throws IOException {
if (sanitizedInputPath == null) {
// No need to query Hadoop more than once as this shouldn't change mid-run,
// thus, we can lazily initialize and cache the result.
Path path = new Path(props.getString(BUILD_INPUT_PATH));
sanitizedInputPath = HadoopUtils.getSanitizedPath(path);
}
return sanitizedInputPath;
}
|
Path function() throws IOException { if (sanitizedInputPath == null) { Path path = new Path(props.getString(BUILD_INPUT_PATH)); sanitizedInputPath = HadoopUtils.getSanitizedPath(path); } return sanitizedInputPath; }
|
/**
* Get the sanitized input path. At the moment of writing, this means the
* #LATEST tag is expanded.
*/
|
Get the sanitized input path. At the moment of writing, this means the #LATEST tag is expanded
|
getInputPath
|
{
"repo_name": "null-exception/voldemort",
"path": "contrib/hadoop-store-builder/src/java/voldemort/store/readonly/mr/azkaban/VoldemortBuildAndPushJob.java",
"license": "apache-2.0",
"size": 65853
}
|
[
"java.io.IOException",
"org.apache.hadoop.fs.Path"
] |
import java.io.IOException; import org.apache.hadoop.fs.Path;
|
import java.io.*; import org.apache.hadoop.fs.*;
|
[
"java.io",
"org.apache.hadoop"
] |
java.io; org.apache.hadoop;
| 2,843,701
|
private void addFieldID(int tenantId, String path, String rawContent, SolrInputDocument solrInputDocument) {
// Generate the solr Document id
String id = generateId(tenantId, path);
if (id == null) {
id = IndexingConstants.FIELD_ID + rawContent.hashCode();
}
solrInputDocument.addField(IndexingConstants.FIELD_ID, id, 1.0f);
}
|
void function(int tenantId, String path, String rawContent, SolrInputDocument solrInputDocument) { String id = generateId(tenantId, path); if (id == null) { id = IndexingConstants.FIELD_ID + rawContent.hashCode(); } solrInputDocument.addField(IndexingConstants.FIELD_ID, id, 1.0f); }
|
/**
* Method for add Solr document id
* @param tenantId tenant id
* @param path resource path
* @param rawContent raw content
* @param solrInputDocument solr InputDocument
*/
|
Method for add Solr document id
|
addFieldID
|
{
"repo_name": "daneshk/carbon-registry",
"path": "components/registry/org.wso2.carbon.registry.indexing/src/main/java/org/wso2/carbon/registry/indexing/solr/SolrClient.java",
"license": "apache-2.0",
"size": 69901
}
|
[
"org.apache.solr.common.SolrInputDocument",
"org.wso2.carbon.registry.indexing.IndexingConstants"
] |
import org.apache.solr.common.SolrInputDocument; import org.wso2.carbon.registry.indexing.IndexingConstants;
|
import org.apache.solr.common.*; import org.wso2.carbon.registry.indexing.*;
|
[
"org.apache.solr",
"org.wso2.carbon"
] |
org.apache.solr; org.wso2.carbon;
| 1,806,803
|
@ApiModelProperty(example = "Sample calculator application", value = "")
public String getDescription() {
return description;
}
|
@ApiModelProperty(example = STR, value = "") String function() { return description; }
|
/**
* Get description
* @return description
**/
|
Get description
|
getDescription
|
{
"repo_name": "jaadds/product-apim",
"path": "modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/ApplicationDTO.java",
"license": "apache-2.0",
"size": 5611
}
|
[
"io.swagger.annotations.ApiModelProperty"
] |
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.*;
|
[
"io.swagger.annotations"
] |
io.swagger.annotations;
| 1,470,842
|
public void executeQuery(IMiniTable miniTable)
{
int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx());
String sql = "";
sql = getOrderSQL();
log.fine(sql);
// reset table
int row = 0;
miniTable.setRowCount(row);
// Execute
try
{
PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null);
pstmt.setInt(1, AD_Client_ID);
ResultSet rs = pstmt.executeQuery();
//
while (rs.next())
{
// extend table
miniTable.setRowCount(row+1);
// set values
miniTable.setValueAt(new IDColumn(rs.getInt(1)), row, 0); // C_Order_ID
miniTable.setValueAt(rs.getString(2), row, 1); // Org
miniTable.setValueAt(rs.getString(3), row, 2); // DocType
miniTable.setValueAt(rs.getString(4), row, 3); // Doc No
miniTable.setValueAt(rs.getString(5), row, 4); // BPartner
row++;
}
rs.close();
pstmt.close();
}
catch (SQLException e)
{
log.log(Level.SEVERE, sql.toString(), e);
}
//
miniTable.autoSize();
} // executeQuery
|
void function(IMiniTable miniTable) { int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx()); String sql = ""; sql = getOrderSQL(); log.fine(sql); int row = 0; miniTable.setRowCount(row); try { PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null); pstmt.setInt(1, AD_Client_ID); ResultSet rs = pstmt.executeQuery(); while (rs.next()) { miniTable.setRowCount(row+1); miniTable.setValueAt(new IDColumn(rs.getInt(1)), row, 0); miniTable.setValueAt(rs.getString(2), row, 1); miniTable.setValueAt(rs.getString(3), row, 2); miniTable.setValueAt(rs.getString(4), row, 3); miniTable.setValueAt(rs.getString(5), row, 4); row++; } rs.close(); pstmt.close(); } catch (SQLException e) { log.log(Level.SEVERE, sql.toString(), e); } miniTable.autoSize(); }
|
/**
* Query Info
*/
|
Query Info
|
executeQuery
|
{
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiereLibero/extension/eevolution/libero/src/main/java/org/eevolution/form/OrderDistribution.java",
"license": "gpl-2.0",
"size": 8482
}
|
[
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.logging.Level",
"org.compiere.minigrid.IDColumn",
"org.compiere.minigrid.IMiniTable",
"org.compiere.util.DB",
"org.compiere.util.Env"
] |
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import org.compiere.minigrid.IDColumn; import org.compiere.minigrid.IMiniTable; import org.compiere.util.DB; import org.compiere.util.Env;
|
import java.sql.*; import java.util.logging.*; import org.compiere.minigrid.*; import org.compiere.util.*;
|
[
"java.sql",
"java.util",
"org.compiere.minigrid",
"org.compiere.util"
] |
java.sql; java.util; org.compiere.minigrid; org.compiere.util;
| 1,215,905
|
public static ConversationRenderer create(RendererHelper generator, ConversationView model) {
return new ConversationRenderer(ConversationStructure.of(model), generator);
}
|
static ConversationRenderer function(RendererHelper generator, ConversationView model) { return new ConversationRenderer(ConversationStructure.of(model), generator); }
|
/**
* Creates a renderer.
*
* @param generator rendering generator
* @param model model to render
*/
|
Creates a renderer
|
create
|
{
"repo_name": "vega113/incubator-wave",
"path": "wave/src/main/java/org/waveprotocol/wave/client/render/ConversationRenderer.java",
"license": "apache-2.0",
"size": 5252
}
|
[
"org.waveprotocol.wave.model.conversation.ConversationStructure",
"org.waveprotocol.wave.model.conversation.ConversationView"
] |
import org.waveprotocol.wave.model.conversation.ConversationStructure; import org.waveprotocol.wave.model.conversation.ConversationView;
|
import org.waveprotocol.wave.model.conversation.*;
|
[
"org.waveprotocol.wave"
] |
org.waveprotocol.wave;
| 2,109,774
|
// [TARGET listMonitoredResourceDescriptors(ListOption...)]
public Page<MonitoredResourceDescriptor> listMonitoredResourceDescriptors() {
// [START listMonitoredResourceDescriptors]
Page<MonitoredResourceDescriptor> descriptors =
logging.listMonitoredResourceDescriptors(ListOption.pageSize(100));
for (MonitoredResourceDescriptor descriptor : descriptors.iterateAll()) {
// do something with the descriptor
}
// [END listMonitoredResourceDescriptors]
return descriptors;
}
|
Page<MonitoredResourceDescriptor> function() { Page<MonitoredResourceDescriptor> descriptors = logging.listMonitoredResourceDescriptors(ListOption.pageSize(100)); for (MonitoredResourceDescriptor descriptor : descriptors.iterateAll()) { } return descriptors; }
|
/**
* Example of listing monitored resource descriptors, specifying the page size.
*/
|
Example of listing monitored resource descriptors, specifying the page size
|
listMonitoredResourceDescriptors
|
{
"repo_name": "mbrukman/gcloud-java",
"path": "google-cloud-examples/src/main/java/com/google/cloud/examples/logging/snippets/LoggingSnippets.java",
"license": "apache-2.0",
"size": 15856
}
|
[
"com.google.api.gax.paging.Page",
"com.google.cloud.MonitoredResourceDescriptor",
"com.google.cloud.logging.Logging"
] |
import com.google.api.gax.paging.Page; import com.google.cloud.MonitoredResourceDescriptor; import com.google.cloud.logging.Logging;
|
import com.google.api.gax.paging.*; import com.google.cloud.*; import com.google.cloud.logging.*;
|
[
"com.google.api",
"com.google.cloud"
] |
com.google.api; com.google.cloud;
| 2,447,274
|
public String getXMLDocString () {
StringWriter writer = new StringWriter();
try {
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
transformer.setOutputProperty(OutputKeys.MEDIA_TYPE, "text/xml");
transformer.setOutputProperty(OutputKeys.METHOD, "xml");
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
transformer.setOutputProperty(OutputKeys.STANDALONE, "no");
transformer.setOutputProperty(OutputKeys.VERSION, "1.0");
transformer.transform(new DOMSource(getXMLDoc()), new StreamResult(writer));
} catch (TransformerException ex) {
throw new IllegalStateException("Unexpected TransformerException: " + ex.getMessage());
} finally {
try {
writer.close();
} catch (IOException ignore) {}
}
return writer.toString();
}
|
String function () { StringWriter writer = new StringWriter(); try { TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty(STRtext/xmlSTRxmlSTRnoSTRnoSTR1.0STRUnexpected TransformerException: " + ex.getMessage()); } finally { try { writer.close(); } catch (IOException ignore) {} } return writer.toString(); }
|
/**
* Gets query as an XML document in string format.
*
* @return The query as an XML document in string format.
*/
|
Gets query as an XML document in string format
|
getXMLDocString
|
{
"repo_name": "lewismc/oodt",
"path": "xmlquery/src/main/java/org/apache/oodt/xmlquery/XMLQuery.java",
"license": "apache-2.0",
"size": 31811
}
|
[
"java.io.IOException",
"java.io.StringWriter",
"javax.xml.transform.OutputKeys",
"javax.xml.transform.Transformer",
"javax.xml.transform.TransformerException",
"javax.xml.transform.TransformerFactory"
] |
import java.io.IOException; import java.io.StringWriter; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory;
|
import java.io.*; import javax.xml.transform.*;
|
[
"java.io",
"javax.xml"
] |
java.io; javax.xml;
| 1,253,895
|
public static String getNimbusLogLink(String host, Map<String, Object> config) {
if (isSecureLogviewer(config)) {
return UIHelpers.urlFormat("https://%s:%s/api/v1/daemonlog?file=nimbus.log",
host, config.get(DaemonConfig.LOGVIEWER_HTTPS_PORT));
}
return UIHelpers.urlFormat("http://%s:%s/api/v1/daemonlog?file=nimbus.log",
host, config.get(DaemonConfig.LOGVIEWER_PORT));
}
|
static String function(String host, Map<String, Object> config) { if (isSecureLogviewer(config)) { return UIHelpers.urlFormat(STRhttp: host, config.get(DaemonConfig.LOGVIEWER_PORT)); }
|
/**
* Get log link to nimbus log.
* @param host nimbus host name
* @param config storm config
* @return log link.
*/
|
Get log link to nimbus log
|
getNimbusLogLink
|
{
"repo_name": "hmcl/storm-apache",
"path": "storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java",
"license": "apache-2.0",
"size": 106901
}
|
[
"java.util.Map",
"org.apache.storm.DaemonConfig"
] |
import java.util.Map; import org.apache.storm.DaemonConfig;
|
import java.util.*; import org.apache.storm.*;
|
[
"java.util",
"org.apache.storm"
] |
java.util; org.apache.storm;
| 2,435,236
|
private MetaData randomIndices(MetaData metaData) {
return randomParts(metaData, "index", new RandomPart<IndexMetaData>() {
|
MetaData function(MetaData metaData) { return randomParts(metaData, "index", new RandomPart<IndexMetaData>() {
|
/**
* Randomly add, deletes or updates indices in the metadata
*/
|
Randomly add, deletes or updates indices in the metadata
|
randomIndices
|
{
"repo_name": "Collaborne/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/cluster/ClusterStateDiffIT.java",
"license": "apache-2.0",
"size": 31451
}
|
[
"org.elasticsearch.cluster.metadata.IndexMetaData",
"org.elasticsearch.cluster.metadata.MetaData"
] |
import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MetaData;
|
import org.elasticsearch.cluster.metadata.*;
|
[
"org.elasticsearch.cluster"
] |
org.elasticsearch.cluster;
| 28,861
|
public static final ErrorGroupServiceApi create(ErrorGroupServiceSettings settings)
throws IOException {
return new ErrorGroupServiceApi(settings);
}
protected ErrorGroupServiceApi(ErrorGroupServiceSettings settings) throws IOException {
this.settings = settings;
this.executor = settings.getExecutorProvider().getOrBuildExecutor();
this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor);
this.getGroupCallable =
ApiCallable.create(settings.getGroupSettings(), this.channel, this.executor);
this.updateGroupCallable =
ApiCallable.create(settings.updateGroupSettings(), this.channel, this.executor);
|
static final ErrorGroupServiceApi function(ErrorGroupServiceSettings settings) throws IOException { return new ErrorGroupServiceApi(settings); } protected ErrorGroupServiceApi(ErrorGroupServiceSettings settings) throws IOException { this.settings = settings; this.executor = settings.getExecutorProvider().getOrBuildExecutor(); this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor); this.getGroupCallable = ApiCallable.create(settings.getGroupSettings(), this.channel, this.executor); this.updateGroupCallable = ApiCallable.create(settings.updateGroupSettings(), this.channel, this.executor);
|
/**
* Constructs an instance of ErrorGroupServiceApi, using the given settings.
* The channels are created based on the settings passed in, or defaults for any
* settings that are not set.
*/
|
Constructs an instance of ErrorGroupServiceApi, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set
|
create
|
{
"repo_name": "ethanbao/api-client-staging-1",
"path": "generated/java/google-devtools-clouderrorreporting-v1beta1/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceApi.java",
"license": "bsd-3-clause",
"size": 12284
}
|
[
"com.google.api.gax.grpc.ApiCallable",
"java.io.IOException"
] |
import com.google.api.gax.grpc.ApiCallable; import java.io.IOException;
|
import com.google.api.gax.grpc.*; import java.io.*;
|
[
"com.google.api",
"java.io"
] |
com.google.api; java.io;
| 1,835,487
|
public void updateAll (Iterator ids, Iterator objects) {
container.updateAll(ids, objects);
}
|
void function (Iterator ids, Iterator objects) { container.updateAll(ids, objects); }
|
/**
* Overwrites the elements of a container whose identifiers are given
* by iterator <tt>ids</tt>.
*
* @param ids an iterator of identifiers
* @param objects an iterator of objects
* @throws NoSuchElementException if an object with an identifier
* of <tt>ids</tt> does not exist in the container.
*/
|
Overwrites the elements of a container whose identifiers are given by iterator ids
|
updateAll
|
{
"repo_name": "hannoman/xxl",
"path": "src/xxl/core/collections/containers/DecoratorContainer.java",
"license": "lgpl-3.0",
"size": 20142
}
|
[
"java.util.Iterator"
] |
import java.util.Iterator;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,096,119
|
public AccountSasParameters withSharedAccessStartTime(DateTime sharedAccessStartTime) {
this.sharedAccessStartTime = sharedAccessStartTime;
return this;
}
|
AccountSasParameters function(DateTime sharedAccessStartTime) { this.sharedAccessStartTime = sharedAccessStartTime; return this; }
|
/**
* Set the time at which the SAS becomes valid.
*
* @param sharedAccessStartTime the sharedAccessStartTime value to set
* @return the AccountSasParameters object itself.
*/
|
Set the time at which the SAS becomes valid
|
withSharedAccessStartTime
|
{
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storage/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/storage/v2017_10_01/AccountSasParameters.java",
"license": "mit",
"size": 8179
}
|
[
"org.joda.time.DateTime"
] |
import org.joda.time.DateTime;
|
import org.joda.time.*;
|
[
"org.joda.time"
] |
org.joda.time;
| 1,860,997
|
public static String toNamesObj(BitSet extent)
{
StringBuilder sb = new StringBuilder();
int cnt = 0;
sb.append("{");
for (int i = extent.nextSetBit(0); i >= 0; i = extent.nextSetBit(i+1))
{
if (++cnt > 1) sb.append(", ");
sb.append(getObj(i));
}
sb.append("}");
return sb.toString();
}
|
static String function(BitSet extent) { StringBuilder sb = new StringBuilder(); int cnt = 0; sb.append("{"); for (int i = extent.nextSetBit(0); i >= 0; i = extent.nextSetBit(i+1)) { if (++cnt > 1) sb.append(STR); sb.append(getObj(i)); } sb.append("}"); return sb.toString(); }
|
/**
* Gets a bitset of object numbers, and replaces numbers with their names.
*
* @param extent A bitset of object numbers.
* @return Returns a string in which the object numbers are replaced by object names.
*/
|
Gets a bitset of object numbers, and replaces numbers with their names
|
toNamesObj
|
{
"repo_name": "jabbalaci/Talky-G",
"path": "src/main/java/fr/loria/coronsys/coron/helper/Database.java",
"license": "gpl-3.0",
"size": 28726
}
|
[
"java.util.BitSet"
] |
import java.util.BitSet;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,053,568
|
public BlockType getBlockType() {
return getExtent().getBlockType(getBlockPosition());
}
|
BlockType function() { return getExtent().getBlockType(getBlockPosition()); }
|
/**
* Get the base type of block.
*
* <p>The type does not include block data such as the contents of
* inventories.</p>
*
* @return The type of block
*/
|
Get the base type of block. The type does not include block data such as the contents of inventories
|
getBlockType
|
{
"repo_name": "jonk1993/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/world/Location.java",
"license": "mit",
"size": 26724
}
|
[
"org.spongepowered.api.block.BlockType"
] |
import org.spongepowered.api.block.BlockType;
|
import org.spongepowered.api.block.*;
|
[
"org.spongepowered.api"
] |
org.spongepowered.api;
| 227,407
|
public static List<Node> getChildren(Node node) {
NodeList nlist = node.getChildNodes();
List<Node> nodes = new ArrayList<Node>();
for (int i = 0; i < nlist.getLength(); i++) {
Node child = nlist.item(i);
nodes.add(child);
}
return nodes;
}
|
static List<Node> function(Node node) { NodeList nlist = node.getChildNodes(); List<Node> nodes = new ArrayList<Node>(); for (int i = 0; i < nlist.getLength(); i++) { Node child = nlist.item(i); nodes.add(child); } return nodes; }
|
/**
* Gets the (immediate) child nodes of the given node.
* @param node the node from where children are found.
* @return an empty list when the node has no child.
*/
|
Gets the (immediate) child nodes of the given node
|
getChildren
|
{
"repo_name": "tatemura/congenio",
"path": "src/main/java/com/nec/congenio/xml/Xml.java",
"license": "apache-2.0",
"size": 16694
}
|
[
"java.util.ArrayList",
"java.util.List",
"org.w3c.dom.Node",
"org.w3c.dom.NodeList"
] |
import java.util.ArrayList; import java.util.List; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
|
import java.util.*; import org.w3c.dom.*;
|
[
"java.util",
"org.w3c.dom"
] |
java.util; org.w3c.dom;
| 2,046,238
|
@Override
public boolean wasFailureCommunicationBased(SQLException exception,
Connection connection, AbstractSession sessionForProfile) {
return false;
}
|
boolean function(SQLException exception, Connection connection, AbstractSession sessionForProfile) { return false; }
|
/**
* Fail-over is not implemented on platform. This method returns false no
* matter what caused the failure.
*
* @returns false
*/
|
Fail-over is not implemented on platform. This method returns false no matter what caused the failure
|
wasFailureCommunicationBased
|
{
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/database/SymfowarePlatform.java",
"license": "epl-1.0",
"size": 53301
}
|
[
"java.sql.Connection",
"java.sql.SQLException",
"org.eclipse.persistence.internal.sessions.AbstractSession"
] |
import java.sql.Connection; import java.sql.SQLException; import org.eclipse.persistence.internal.sessions.AbstractSession;
|
import java.sql.*; import org.eclipse.persistence.internal.sessions.*;
|
[
"java.sql",
"org.eclipse.persistence"
] |
java.sql; org.eclipse.persistence;
| 1,663,150
|
@POST
@Path("api_trade_v1.php")
@Consumes(MediaType.APPLICATION_JSON)
BTCChinaGetStopOrderResponse getStopOrder(@HeaderParam("Authorization") ParamsDigest authorization,
@HeaderParam("Json-Rpc-Tonce") SynchronizedValueFactory<Long> jsonRpcTonce, BTCChinaGetStopOrderRequest request) throws IOException;
|
@Path(STR) @Consumes(MediaType.APPLICATION_JSON) BTCChinaGetStopOrderResponse getStopOrder(@HeaderParam(STR) ParamsDigest authorization, @HeaderParam(STR) SynchronizedValueFactory<Long> jsonRpcTonce, BTCChinaGetStopOrderRequest request) throws IOException;
|
/**
* Get a stop order.
*/
|
Get a stop order
|
getStopOrder
|
{
"repo_name": "SovietBear/xchange-clean",
"path": "xchange-btcchina/src/main/java/com/xeiam/xchange/btcchina/BTCChina.java",
"license": "mit",
"size": 14553
}
|
[
"com.xeiam.xchange.btcchina.dto.trade.request.BTCChinaGetStopOrderRequest",
"com.xeiam.xchange.btcchina.dto.trade.response.BTCChinaGetStopOrderResponse",
"java.io.IOException",
"javax.ws.rs.Consumes",
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.core.MediaType",
"si.mazi.rescu.ParamsDigest",
"si.mazi.rescu.SynchronizedValueFactory"
] |
import com.xeiam.xchange.btcchina.dto.trade.request.BTCChinaGetStopOrderRequest; import com.xeiam.xchange.btcchina.dto.trade.response.BTCChinaGetStopOrderResponse; import java.io.IOException; import javax.ws.rs.Consumes; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.core.MediaType; import si.mazi.rescu.ParamsDigest; import si.mazi.rescu.SynchronizedValueFactory;
|
import com.xeiam.xchange.btcchina.dto.trade.request.*; import com.xeiam.xchange.btcchina.dto.trade.response.*; import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import si.mazi.rescu.*;
|
[
"com.xeiam.xchange",
"java.io",
"javax.ws",
"si.mazi.rescu"
] |
com.xeiam.xchange; java.io; javax.ws; si.mazi.rescu;
| 475,633
|
private CarbonFactDataWriter getFactDataWriter() {
return CarbonDataWriterFactory.getInstance().getFactDataWriter(version, model);
}
|
CarbonFactDataWriter function() { return CarbonDataWriterFactory.getInstance().getFactDataWriter(version, model); }
|
/**
* Below method will be used to get the fact data writer instance
*
* @return data writer instance
*/
|
Below method will be used to get the fact data writer instance
|
getFactDataWriter
|
{
"repo_name": "ravipesala/incubator-carbondata",
"path": "processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerColumnar.java",
"license": "apache-2.0",
"size": 23864
}
|
[
"org.apache.carbondata.processing.store.writer.CarbonFactDataWriter"
] |
import org.apache.carbondata.processing.store.writer.CarbonFactDataWriter;
|
import org.apache.carbondata.processing.store.writer.*;
|
[
"org.apache.carbondata"
] |
org.apache.carbondata;
| 1,298,181
|
private void persistAccessibilityData(ExperimentProviderUtil experimentProviderUtil,
Experiment experiment, List<ExperimentGroup> groupsListening,
Bundle payload) {
if (payload == null) {
Log.v(PacoConstants.TAG, "No accessibility data for this trigger.");
return;
}
Log.v(PacoConstants.TAG, "Persisting accessibility data for experiment " + experiment.getExperimentDAO().getTitle());
long nowMillis = new DateTime().getMillis();
for (ExperimentGroup experimentGroup : groupsListening) {
Event event = EventUtil.createEvent(experiment, experimentGroup.getName(), nowMillis, null, null, null);
persistEventBundle(experimentProviderUtil, event, payload);
}
notifySyncService();
}
|
void function(ExperimentProviderUtil experimentProviderUtil, Experiment experiment, List<ExperimentGroup> groupsListening, Bundle payload) { if (payload == null) { Log.v(PacoConstants.TAG, STR); return; } Log.v(PacoConstants.TAG, STR + experiment.getExperimentDAO().getTitle()); long nowMillis = new DateTime().getMillis(); for (ExperimentGroup experimentGroup : groupsListening) { Event event = EventUtil.createEvent(experiment, experimentGroup.getName(), nowMillis, null, null, null); persistEventBundle(experimentProviderUtil, event, payload); } notifySyncService(); }
|
/**
* Persist data related to accessibility events, sent along as part of the
* PACO_ACTION_ACCESSIBILITY_PAYLOAD bundle.
* @param experimentProviderUtil an initialized ExperimentProviderUtil
* @param experiment the experiment for which to save the events
* @param payload the PACO_ACTION_ACCESSIBILITY_PAYLOAD bundle
*/
|
Persist data related to accessibility events, sent along as part of the PACO_ACTION_ACCESSIBILITY_PAYLOAD bundle
|
persistAccessibilityData
|
{
"repo_name": "h/paco",
"path": "Paco/src/com/pacoapp/paco/sensors/android/BroadcastTriggerService.java",
"license": "apache-2.0",
"size": 10583
}
|
[
"android.os.Bundle",
"android.util.Log",
"com.pacoapp.paco.PacoConstants",
"com.pacoapp.paco.model.Event",
"com.pacoapp.paco.model.EventUtil",
"com.pacoapp.paco.model.Experiment",
"com.pacoapp.paco.model.ExperimentProviderUtil",
"com.pacoapp.paco.shared.model2.ExperimentGroup",
"java.util.List",
"org.joda.time.DateTime"
] |
import android.os.Bundle; import android.util.Log; import com.pacoapp.paco.PacoConstants; import com.pacoapp.paco.model.Event; import com.pacoapp.paco.model.EventUtil; import com.pacoapp.paco.model.Experiment; import com.pacoapp.paco.model.ExperimentProviderUtil; import com.pacoapp.paco.shared.model2.ExperimentGroup; import java.util.List; import org.joda.time.DateTime;
|
import android.os.*; import android.util.*; import com.pacoapp.paco.*; import com.pacoapp.paco.model.*; import com.pacoapp.paco.shared.model2.*; import java.util.*; import org.joda.time.*;
|
[
"android.os",
"android.util",
"com.pacoapp.paco",
"java.util",
"org.joda.time"
] |
android.os; android.util; com.pacoapp.paco; java.util; org.joda.time;
| 279,970
|
public void handleEvent(Event evt) {
evt = EventSupport.getUltimateOriginalEvent(evt);
listener.subtreeModified((Node) evt.getTarget());
}
}
protected class DOMCharacterDataModifiedListenerWrapper
implements EventListener {
protected CSSNavigableDocumentListener listener;
public DOMCharacterDataModifiedListenerWrapper
(CSSNavigableDocumentListener l) {
listener = l;
}
|
void function(Event evt) { evt = EventSupport.getUltimateOriginalEvent(evt); listener.subtreeModified((Node) evt.getTarget()); } } protected class DOMCharacterDataModifiedListenerWrapper implements EventListener { protected CSSNavigableDocumentListener listener; public DOMCharacterDataModifiedListenerWrapper (CSSNavigableDocumentListener l) { listener = l; }
|
/**
* Handles the event.
*/
|
Handles the event
|
handleEvent
|
{
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/dom/svg/SVGOMDocument.java",
"license": "apache-2.0",
"size": 25289
}
|
[
"org.apache.batik.css.engine.CSSNavigableDocumentListener",
"org.apache.batik.dom.events.EventSupport",
"org.w3c.dom.Node",
"org.w3c.dom.events.Event",
"org.w3c.dom.events.EventListener"
] |
import org.apache.batik.css.engine.CSSNavigableDocumentListener; import org.apache.batik.dom.events.EventSupport; import org.w3c.dom.Node; import org.w3c.dom.events.Event; import org.w3c.dom.events.EventListener;
|
import org.apache.batik.css.engine.*; import org.apache.batik.dom.events.*; import org.w3c.dom.*; import org.w3c.dom.events.*;
|
[
"org.apache.batik",
"org.w3c.dom"
] |
org.apache.batik; org.w3c.dom;
| 877,215
|
public SharedObjects getSharedObjects() {
if ( sharedObjects == null ) {
try {
String soFile = environmentSubstitute( sharedObjectsFile );
sharedObjects = new SharedObjects( soFile );
} catch ( KettleException e ) {
LogChannel.GENERAL.logDebug( e.getMessage(), e );
}
}
return sharedObjects;
}
|
SharedObjects function() { if ( sharedObjects == null ) { try { String soFile = environmentSubstitute( sharedObjectsFile ); sharedObjects = new SharedObjects( soFile ); } catch ( KettleException e ) { LogChannel.GENERAL.logDebug( e.getMessage(), e ); } } return sharedObjects; }
|
/**
* Gets the shared objects.
*
* @return the sharedObjects
*/
|
Gets the shared objects
|
getSharedObjects
|
{
"repo_name": "nicoben/pentaho-kettle",
"path": "engine/src/org/pentaho/di/base/AbstractMeta.java",
"license": "apache-2.0",
"size": 46352
}
|
[
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.core.logging.LogChannel",
"org.pentaho.di.shared.SharedObjects"
] |
import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.logging.LogChannel; import org.pentaho.di.shared.SharedObjects;
|
import org.pentaho.di.core.exception.*; import org.pentaho.di.core.logging.*; import org.pentaho.di.shared.*;
|
[
"org.pentaho.di"
] |
org.pentaho.di;
| 1,611,934
|
List<X> getResultList();
|
List<X> getResultList();
|
/**
* Execute a SELECT query and return the query results
* as a typed List.
* @return a list of the results
* @throws IllegalStateException if called for a Java
* Persistence query language UPDATE or DELETE statement
* @throws QueryTimeoutException if the query execution exceeds
* the query timeout value set and only the statement is
* rolled back
* @throws TransactionRequiredException if a lock mode other than
* <code>NONE</code> has been set and there is no transaction
* or the persistence context has not been joined to the
* transaction
* @throws PessimisticLockException if pessimistic locking
* fails and the transaction is rolled back
* @throws LockTimeoutException if pessimistic locking
* fails and only the statement is rolled back
* @throws PersistenceException if the query execution exceeds
* the query timeout value set and the transaction
* is rolled back
*/
|
Execute a SELECT query and return the query results as a typed List
|
getResultList
|
{
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/persistence-api/javax/persistence/TypedQuery.java",
"license": "gpl-2.0",
"size": 11583
}
|
[
"java.util.List"
] |
import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,518,371
|
Trigger trigger = Hardware.makeTrigger(currentSensor::isTriggered);
trigger.whenActive(command);
return trigger;
}
|
Trigger trigger = Hardware.makeTrigger(currentSensor::isTriggered); trigger.whenActive(command); return trigger; }
|
/**
* Runs a command when the current is too high
* @param currentSensor the high current sensor
* @param command the command to run
* @return the trigger that is binded to the high current sensor (was set to automatically start command already)
*/
|
Runs a command when the current is too high
|
whenHighCurrent
|
{
"repo_name": "Gongoliers/Library-of-Gongolierium",
"path": "src/main/java/com/thegongoliers/commands/SafetyCommands.java",
"license": "mit",
"size": 2927
}
|
[
"com.thegongoliers.hardware.Hardware",
"edu.wpi.first.wpilibj2.command.button.Trigger"
] |
import com.thegongoliers.hardware.Hardware; import edu.wpi.first.wpilibj2.command.button.Trigger;
|
import com.thegongoliers.hardware.*; import edu.wpi.first.wpilibj2.command.button.*;
|
[
"com.thegongoliers.hardware",
"edu.wpi.first"
] |
com.thegongoliers.hardware; edu.wpi.first;
| 1,006,445
|
private void updateSensorSubscriptions() {
Log.d(TAG, "Triggering non-GPS sensor subscription update...");
handler_.removeCallbacks(this);
handler_.post(this);
}
|
void function() { Log.d(TAG, STR); handler_.removeCallbacks(this); handler_.post(this); }
|
/**
* Trigger an update to this object's sensor subscriptions. This causes
* run() to be executed in the main thread. Should be called after each
* change to enabled_sensors_.
*/
|
Trigger an update to this object's sensor subscriptions. This causes run() to be executed in the main thread. Should be called after each change to enabled_sensors_
|
updateSensorSubscriptions
|
{
"repo_name": "rdunning0823/tophat",
"path": "android/src/NonGPSSensors.java",
"license": "gpl-2.0",
"size": 10951
}
|
[
"android.util.Log"
] |
import android.util.Log;
|
import android.util.*;
|
[
"android.util"
] |
android.util;
| 1,108,333
|
public static IRestResponse handleAllException(Exception e, IResponseFactory responseFactory) {
logger.error(e.getMessage(), e);
IRestResponse restResponse = responseFactory.createResponse(RestResponseStatus.ERROR,
"Error: " + e.getMessage());
return restResponse;
}
|
static IRestResponse function(Exception e, IResponseFactory responseFactory) { logger.error(e.getMessage(), e); IRestResponse restResponse = responseFactory.createResponse(RestResponseStatus.ERROR, STR + e.getMessage()); return restResponse; }
|
/**
* Handle given exception by logging and creating error response.
*
* @param e
* @param responseFactory
* @return
*/
|
Handle given exception by logging and creating error response
|
handleAllException
|
{
"repo_name": "Pardus-LiderAhenk/lider",
"path": "lider-web/src/main/java/tr/org/liderahenk/web/controller/utils/ControllerUtils.java",
"license": "lgpl-3.0",
"size": 2128
}
|
[
"tr.org.liderahenk.lider.core.api.rest.IResponseFactory",
"tr.org.liderahenk.lider.core.api.rest.enums.RestResponseStatus",
"tr.org.liderahenk.lider.core.api.rest.responses.IRestResponse"
] |
import tr.org.liderahenk.lider.core.api.rest.IResponseFactory; import tr.org.liderahenk.lider.core.api.rest.enums.RestResponseStatus; import tr.org.liderahenk.lider.core.api.rest.responses.IRestResponse;
|
import tr.org.liderahenk.lider.core.api.rest.*; import tr.org.liderahenk.lider.core.api.rest.enums.*; import tr.org.liderahenk.lider.core.api.rest.responses.*;
|
[
"tr.org.liderahenk"
] |
tr.org.liderahenk;
| 2,736,088
|
int countByExample(DriveInfoExample example);
|
int countByExample(DriveInfoExample example);
|
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table m_ecm_driveinfo
*
* @mbggenerated Mon Sep 21 13:52:03 ICT 2015
*/
|
This method was generated by MyBatis Generator. This method corresponds to the database table m_ecm_driveinfo
|
countByExample
|
{
"repo_name": "maduhu/mycollab",
"path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/ecm/dao/DriveInfoMapper.java",
"license": "agpl-3.0",
"size": 4743
}
|
[
"com.esofthead.mycollab.module.ecm.domain.DriveInfoExample"
] |
import com.esofthead.mycollab.module.ecm.domain.DriveInfoExample;
|
import com.esofthead.mycollab.module.ecm.domain.*;
|
[
"com.esofthead.mycollab"
] |
com.esofthead.mycollab;
| 1,606,571
|
@SuppressWarnings({ "JavaDoc" })
public void set(PreparedStatement st, T value, int index) throws HibernateException, SQLException;
|
@SuppressWarnings({ STR }) void function(PreparedStatement st, T value, int index) throws HibernateException, SQLException;
|
/**
* DO NOT USE THIS FORM!
*
* @deprecated Use {@link #set(PreparedStatement, Object, int, SessionImplementor)} instead.
*/
|
DO NOT USE THIS FORM
|
set
|
{
"repo_name": "codeApeFromChina/resource",
"path": "frame_packages/java_libs/hibernate-distribution-3.6.10.Final/project/hibernate-core/src/main/java/org/hibernate/type/SingleColumnType.java",
"license": "unlicense",
"size": 4641
}
|
[
"java.sql.PreparedStatement",
"java.sql.SQLException",
"org.hibernate.HibernateException"
] |
import java.sql.PreparedStatement; import java.sql.SQLException; import org.hibernate.HibernateException;
|
import java.sql.*; import org.hibernate.*;
|
[
"java.sql",
"org.hibernate"
] |
java.sql; org.hibernate;
| 2,106,133
|
@SuppressWarnings("unchecked")
protected void rehash( final int newN ) {
int i = 0, pos;
final boolean used[] = this.used;
K k;
final K key[] = this.key;
final int value[] = this.value;
final int newMask = newN - 1;
final K newKey[] = (K[]) new Object[ newN ];
final int newValue[] = new int[newN];
final boolean newUsed[] = new boolean[ newN ];
for( int j = size; j-- != 0; ) {
while( ! used[ i ] ) i++;
k = key[ i ];
pos = ( (k) == null ? 0x87fcd5c : it.unimi.dsi.fastutil.HashCommon.murmurHash3( System.identityHashCode(k) ) ) & newMask;
while ( newUsed[ pos ] ) pos = ( pos + 1 ) & newMask;
newUsed[ pos ] = true;
newKey[ pos ] = k;
newValue[ pos ] = value[ i ];
i++;
}
n = newN;
mask = newMask;
maxFill = maxFill( n, f );
this.key = newKey;
this.value = newValue;
this.used = newUsed;
}
|
@SuppressWarnings(STR) void function( final int newN ) { int i = 0, pos; final boolean used[] = this.used; K k; final K key[] = this.key; final int value[] = this.value; final int newMask = newN - 1; final K newKey[] = (K[]) new Object[ newN ]; final int newValue[] = new int[newN]; final boolean newUsed[] = new boolean[ newN ]; for( int j = size; j-- != 0; ) { while( ! used[ i ] ) i++; k = key[ i ]; pos = ( (k) == null ? 0x87fcd5c : it.unimi.dsi.fastutil.HashCommon.murmurHash3( System.identityHashCode(k) ) ) & newMask; while ( newUsed[ pos ] ) pos = ( pos + 1 ) & newMask; newUsed[ pos ] = true; newKey[ pos ] = k; newValue[ pos ] = value[ i ]; i++; } n = newN; mask = newMask; maxFill = maxFill( n, f ); this.key = newKey; this.value = newValue; this.used = newUsed; }
|
/** Resizes the map.
*
* <P>This method implements the basic rehashing strategy, and may be
* overriden by subclasses implementing different rehashing strategies (e.g.,
* disk-based rehashing). However, you should not override this method
* unless you understand the internal workings of this class.
*
* @param newN the new size
*/
|
Resizes the map. This method implements the basic rehashing strategy, and may be overriden by subclasses implementing different rehashing strategies (e.g., disk-based rehashing). However, you should not override this method unless you understand the internal workings of this class
|
rehash
|
{
"repo_name": "karussell/fastutil",
"path": "src/it/unimi/dsi/fastutil/objects/Reference2IntOpenCustomHashMap.java",
"license": "apache-2.0",
"size": 30805
}
|
[
"it.unimi.dsi.fastutil.HashCommon"
] |
import it.unimi.dsi.fastutil.HashCommon;
|
import it.unimi.dsi.fastutil.*;
|
[
"it.unimi.dsi"
] |
it.unimi.dsi;
| 1,906,779
|
public HashMap<String, QueueInfo> getQueueMedatada() {
return queueInfo;
}
|
HashMap<String, QueueInfo> function() { return queueInfo; }
|
/**
* Returns an HashMap that contains all the information about the
* configuration of the <u>queue.xml</u> file used to configure the queues.
*
* @return an HashMap that contains all the info of the queues setting by
* the <u>queue.xml</u> file.
*/
|
Returns an HashMap that contains all the information about the configuration of the queue.xml file used to configure the queues
|
getQueueMedatada
|
{
"repo_name": "deib-polimi/modaclouds-cpim-library",
"path": "src/main/java/it/polimi/modaclouds/cpimlibrary/CloudMetadata.java",
"license": "apache-2.0",
"size": 30059
}
|
[
"java.util.HashMap"
] |
import java.util.HashMap;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 661,463
|
public PlanarYUVLuminanceSource buildLuminanceSource(byte[] data,
int width, int height) {
Rect rect = getFramingRectInPreview();
if (rect == null) {
return null;
}
// Go ahead and assume it's YUV rather than die.
return new PlanarYUVLuminanceSource(data, width, height, rect.left,
rect.top, rect.width(), rect.height(), false);
}
|
PlanarYUVLuminanceSource function(byte[] data, int width, int height) { Rect rect = getFramingRectInPreview(); if (rect == null) { return null; } return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top, rect.width(), rect.height(), false); }
|
/**
* A factory method to build the appropriate LuminanceSource object based on
* the format of the preview buffers, as described by Camera.Parameters.
*
* @param data
* A preview frame.
* @param width
* The width of the image.
* @param height
* The height of the image.
* @return A PlanarYUVLuminanceSource instance.
*/
|
A factory method to build the appropriate LuminanceSource object based on the format of the preview buffers, as described by Camera.Parameters
|
buildLuminanceSource
|
{
"repo_name": "Waynehfut/EasyConnect",
"path": "app/src/main/java/com/waynehfut/zxing/camera/CameraManager.java",
"license": "mit",
"size": 11026
}
|
[
"android.graphics.Rect",
"com.google.zxing.PlanarYUVLuminanceSource"
] |
import android.graphics.Rect; import com.google.zxing.PlanarYUVLuminanceSource;
|
import android.graphics.*; import com.google.zxing.*;
|
[
"android.graphics",
"com.google.zxing"
] |
android.graphics; com.google.zxing;
| 1,875,707
|
private byte[] getClassData(File f) throws IOException
{
FileInputStream stream = null;
ByteArrayOutputStream out = null;
try
{
stream = new FileInputStream(f);
out = new ByteArrayOutputStream(1000);
byte[] b = new byte[1000];
int n;
while ((n = stream.read(b)) != -1)
out.write(b, 0, n);
out.close();
return out.toByteArray();
} finally {
if (stream != null) {
stream.close();
}
if (out != null) {
out.close();
}
}
}
|
byte[] function(File f) throws IOException { FileInputStream stream = null; ByteArrayOutputStream out = null; try { stream = new FileInputStream(f); out = new ByteArrayOutputStream(1000); byte[] b = new byte[1000]; int n; while ((n = stream.read(b)) != -1) out.write(b, 0, n); out.close(); return out.toByteArray(); } finally { if (stream != null) { stream.close(); } if (out != null) { out.close(); } } }
|
/**
* Reads the file and sents the raw data in byte array.
* @param f File to be read.
* @return byte[] representing the class.
* @throws IOException
*/
|
Reads the file and sents the raw data in byte array
|
getClassData
|
{
"repo_name": "MastekLtd/JBEAM",
"path": "supporting_libraries/AdvancedPRE/pre/src/main/java/stg/customclassloader/CCustomClassLoader.java",
"license": "lgpl-3.0",
"size": 13957
}
|
[
"java.io.ByteArrayOutputStream",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException"
] |
import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 615,520
|
protected Image _image(Object modelElement) {
return labelProvider.getImage(modelElement);
}
|
Image function(Object modelElement) { return labelProvider.getImage(modelElement); }
|
/**
* Default for imageDispatcher
*/
|
Default for imageDispatcher
|
_image
|
{
"repo_name": "JKatzwinkel/bts",
"path": "org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/editor/outline/impl/DefaultOutlineTreeProvider.java",
"license": "lgpl-3.0",
"size": 8568
}
|
[
"org.eclipse.swt.graphics.Image"
] |
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.*;
|
[
"org.eclipse.swt"
] |
org.eclipse.swt;
| 2,613,499
|
public void createVariant(com.google.genomics.v1.CreateVariantRequest request,
io.grpc.stub.StreamObserver<com.google.genomics.v1.Variant> responseObserver) {
asyncUnimplementedUnaryCall(METHOD_CREATE_VARIANT, responseObserver);
}
|
void function(com.google.genomics.v1.CreateVariantRequest request, io.grpc.stub.StreamObserver<com.google.genomics.v1.Variant> responseObserver) { asyncUnimplementedUnaryCall(METHOD_CREATE_VARIANT, responseObserver); }
|
/**
* <pre>
* Creates a new variant.
* For the definitions of variants and other genomics resources, see
* [Fundamentals of Google
* Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
* </pre>
*/
|
<code> Creates a new variant. For the definitions of variants and other genomics resources, see [Fundamentals of Google Genomics](HREF) </code>
|
createVariant
|
{
"repo_name": "speedycontrol/googleapis",
"path": "output/com/google/genomics/v1/VariantServiceV1Grpc.java",
"license": "apache-2.0",
"size": 86208
}
|
[
"io.grpc.stub.ServerCalls"
] |
import io.grpc.stub.ServerCalls;
|
import io.grpc.stub.*;
|
[
"io.grpc.stub"
] |
io.grpc.stub;
| 1,559,962
|
@NotNull()
private Random getRandom(@NotNull final byte[] value)
{
Random r = randoms.get();
if (r == null)
{
r = new Random(randomSeed + Arrays.hashCode(value));
randoms.set(r);
}
else
{
r.setSeed(randomSeed + Arrays.hashCode(value));
}
return r;
}
/**
* {@inheritDoc}
|
@NotNull() Random function(@NotNull final byte[] value) { Random r = randoms.get(); if (r == null) { r = new Random(randomSeed + Arrays.hashCode(value)); randoms.set(r); } else { r.setSeed(randomSeed + Arrays.hashCode(value)); } return r; } /** * {@inheritDoc}
|
/**
* Retrieves a random number generator to use in the course of generating a
* value. It will be reset with the random seed so that it should yield
* repeatable output for the same input.
*
* @param value The value that will be scrambled. It will contribute to the
* random seed that is ultimately used for the random number
* generator.
*
* @return A random number generator to use in the course of generating a
* value.
*/
|
Retrieves a random number generator to use in the course of generating a value. It will be reset with the random seed so that it should yield repeatable output for the same input
|
getRandom
|
{
"repo_name": "UnboundID/ldapsdk",
"path": "src/com/unboundid/ldap/sdk/transformations/ScrambleAttributeTransformation.java",
"license": "gpl-2.0",
"size": 45357
}
|
[
"com.unboundid.util.NotNull",
"java.util.Arrays",
"java.util.Random"
] |
import com.unboundid.util.NotNull; import java.util.Arrays; import java.util.Random;
|
import com.unboundid.util.*; import java.util.*;
|
[
"com.unboundid.util",
"java.util"
] |
com.unboundid.util; java.util;
| 1,048,419
|
public boolean containscurrent_threat_assessment_cats(long pk)
throws SystemException {
if (getcurrent_threat_assessment_catsSize(pk) > 0) {
return true;
}
else {
return false;
}
}
|
boolean function(long pk) throws SystemException { if (getcurrent_threat_assessment_catsSize(pk) > 0) { return true; } else { return false; } }
|
/**
* Returns <code>true</code> if the assessing_threats_current has any current_threat_assessment_cats associated with it.
*
* @param pk the primary key of the assessing_threats_current to check for associations with current_threat_assessment_cats
* @return <code>true</code> if the assessing_threats_current has any current_threat_assessment_cats associated with it; <code>false</code> otherwise
* @throws SystemException if a system exception occurred
*/
|
Returns <code>true</code> if the assessing_threats_current has any current_threat_assessment_cats associated with it
|
containscurrent_threat_assessment_cats
|
{
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/persistence/assessing_threats_currentPersistenceImpl.java",
"license": "gpl-2.0",
"size": 78477
}
|
[
"com.liferay.portal.kernel.exception.SystemException"
] |
import com.liferay.portal.kernel.exception.SystemException;
|
import com.liferay.portal.kernel.exception.*;
|
[
"com.liferay.portal"
] |
com.liferay.portal;
| 1,213,796
|
protected Command getReorientRelationshipCommand(
ReorientRelationshipRequest req) {
switch (getVisualID(req)) {
case EsbLinkEditPart.VISUAL_ID:
return getGEFWrapper(new EsbLinkReorientCommand(req));
}
return super.getReorientRelationshipCommand(req);
}
|
Command function( ReorientRelationshipRequest req) { switch (getVisualID(req)) { case EsbLinkEditPart.VISUAL_ID: return getGEFWrapper(new EsbLinkReorientCommand(req)); } return super.getReorientRelationshipCommand(req); }
|
/**
* Returns command to reorient EClass based link. New link target or source
* should be the domain model element associated with this node.
*
* @generated
*/
|
Returns command to reorient EClass based link. New link target or source should be the domain model element associated with this node
|
getReorientRelationshipCommand
|
{
"repo_name": "rajeevanv89/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/policies/TransactionMediatorOutputConnectorItemSemanticEditPolicy.java",
"license": "apache-2.0",
"size": 3894
}
|
[
"org.eclipse.gef.commands.Command",
"org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest",
"org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.commands.EsbLinkReorientCommand",
"org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.parts.EsbLinkEditPart"
] |
import org.eclipse.gef.commands.Command; import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest; import org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.commands.EsbLinkReorientCommand; import org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.parts.EsbLinkEditPart;
|
import org.eclipse.gef.commands.*; import org.eclipse.gmf.runtime.emf.type.core.requests.*; import org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.commands.*; import org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.parts.*;
|
[
"org.eclipse.gef",
"org.eclipse.gmf",
"org.wso2.developerstudio"
] |
org.eclipse.gef; org.eclipse.gmf; org.wso2.developerstudio;
| 1,286,869
|
public ModuleType<T> removeJava()
{
childNode.removeChildren("java");
return this;
}
// --------------------------------------------------------------------------------------------------------||
// ClassName: ModuleType ElementName: javaee:webType ElementType : web
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
|
ModuleType<T> function() { childNode.removeChildren("java"); return this; }
|
/**
* Removes the <code>java</code> element
* @return the current instance of <code>ModuleType<T></code>
*/
|
Removes the <code>java</code> element
|
removeJava
|
{
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/application6/ModuleTypeImpl.java",
"license": "epl-1.0",
"size": 8242
}
|
[
"org.jboss.shrinkwrap.descriptor.api.application6.ModuleType"
] |
import org.jboss.shrinkwrap.descriptor.api.application6.ModuleType;
|
import org.jboss.shrinkwrap.descriptor.api.application6.*;
|
[
"org.jboss.shrinkwrap"
] |
org.jboss.shrinkwrap;
| 2,282,303
|
Map<String, DataObject> getDataObjects(String taskId);
|
Map<String, DataObject> getDataObjects(String taskId);
|
/**
* All DataObjects visible from the given execution scope (including parent scopes).
*
* @param taskId
* id of task, cannot be null.
* @return the DataObjects or an empty map if no such variables are found.
* @throws FlowableObjectNotFoundException
* when no task is found for the given taskId.
*/
|
All DataObjects visible from the given execution scope (including parent scopes)
|
getDataObjects
|
{
"repo_name": "zwets/flowable-engine",
"path": "modules/flowable-engine/src/main/java/org/flowable/engine/TaskService.java",
"license": "apache-2.0",
"size": 35848
}
|
[
"java.util.Map",
"org.flowable.engine.runtime.DataObject"
] |
import java.util.Map; import org.flowable.engine.runtime.DataObject;
|
import java.util.*; import org.flowable.engine.runtime.*;
|
[
"java.util",
"org.flowable.engine"
] |
java.util; org.flowable.engine;
| 303,190
|
private void linkAnnotation(DataObject data, AnnotationData annotation)
throws DSOutOfServiceException, DSAccessException
{
String ioType = gateway.convertPojos(data).getName();
IObject ho = gateway.findIObject(ioType, data.getId());
ModelMapper.unloadCollections(ho);
IObject link = null;
boolean exist = false;
//Annotation an = (Annotation) gateway.findIObject(gateway.convertPojos(
// annotation.getClass()), annotation.getId());
//ModelMapper.unloadCollections(an);
Annotation an = annotation.asAnnotation();
ExperimenterData exp = getUserDetails();
if (annotation instanceof TagAnnotationData) {
TagAnnotationData tag = (TagAnnotationData) annotation;
//tag a tag.
if (TagAnnotationData.class.equals(data.getClass())) {
link = gateway.findAnnotationLink(
AnnotationData.class, tag.getId(),
ho.getId().getValue(), exp.getId());
if (link == null)
link = ModelMapper.linkAnnotation(an, (Annotation) ho);
else exist = true;
} else {
link = gateway.findAnnotationLink(ho.getClass(),
ho.getId().getValue(), tag.getId(), exp.getId());
if (link == null)
link = ModelMapper.linkAnnotation(ho, an);
else {
updateAnnotationData(tag);
exist = true;
}
}
} else if (annotation instanceof RatingAnnotationData) {
clearAnnotation(data.getClass(), data.getId(),
RatingAnnotationData.class);
link = ModelMapper.linkAnnotation(ho, an);
} else {
link = ModelMapper.linkAnnotation(ho, an);
}
if (link != null && !exist)
gateway.createObject(link);
}
|
void function(DataObject data, AnnotationData annotation) throws DSOutOfServiceException, DSAccessException { String ioType = gateway.convertPojos(data).getName(); IObject ho = gateway.findIObject(ioType, data.getId()); ModelMapper.unloadCollections(ho); IObject link = null; boolean exist = false; Annotation an = annotation.asAnnotation(); ExperimenterData exp = getUserDetails(); if (annotation instanceof TagAnnotationData) { TagAnnotationData tag = (TagAnnotationData) annotation; if (TagAnnotationData.class.equals(data.getClass())) { link = gateway.findAnnotationLink( AnnotationData.class, tag.getId(), ho.getId().getValue(), exp.getId()); if (link == null) link = ModelMapper.linkAnnotation(an, (Annotation) ho); else exist = true; } else { link = gateway.findAnnotationLink(ho.getClass(), ho.getId().getValue(), tag.getId(), exp.getId()); if (link == null) link = ModelMapper.linkAnnotation(ho, an); else { updateAnnotationData(tag); exist = true; } } } else if (annotation instanceof RatingAnnotationData) { clearAnnotation(data.getClass(), data.getId(), RatingAnnotationData.class); link = ModelMapper.linkAnnotation(ho, an); } else { link = ModelMapper.linkAnnotation(ho, an); } if (link != null && !exist) gateway.createObject(link); }
|
/**
* Links the annotation and the data object.
*
* @param data The data object to annotate.
* @param annotation The annotation to link.
* @throws DSOutOfServiceException If the connection is broken, or logged in
* @throws DSAccessException If an error occurred while trying to
* retrieve data from OMEDS service.
*/
|
Links the annotation and the data object
|
linkAnnotation
|
{
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OmeroMetadataServiceImpl.java",
"license": "gpl-2.0",
"size": 61398
}
|
[
"org.openmicroscopy.shoola.env.data.util.ModelMapper"
] |
import org.openmicroscopy.shoola.env.data.util.ModelMapper;
|
import org.openmicroscopy.shoola.env.data.util.*;
|
[
"org.openmicroscopy.shoola"
] |
org.openmicroscopy.shoola;
| 1,490,028
|
@Override
public void detailFragEvent(String minTemp, String maxTemp, int icon, boolean b) {
min = minTemp;
max = maxTemp;
weatherIcon = icon;
isToday = b;
Log.i("Interface", "Got info from detail fragment " + minTemp + " " + maxTemp);
}
|
void function(String minTemp, String maxTemp, int icon, boolean b) { min = minTemp; max = maxTemp; weatherIcon = icon; isToday = b; Log.i(STR, STR + minTemp + " " + maxTemp); }
|
/**
* Obtaining information from the fragment
* @param minTemp
* @param maxTemp
* @param icon
*/
|
Obtaining information from the fragment
|
detailFragEvent
|
{
"repo_name": "aevangelist/SunshineWear",
"path": "app/src/main/java/com/example/android/sunshine/app/DetailActivity.java",
"license": "apache-2.0",
"size": 6489
}
|
[
"android.util.Log"
] |
import android.util.Log;
|
import android.util.*;
|
[
"android.util"
] |
android.util;
| 10,054
|
public ConditionFactory atMost(long timeout, TimeUnit unit) {
return new ConditionFactory(alias, new Duration(timeout, unit), pollInterval, pollDelay,
catchUncaughtExceptions);
}
|
ConditionFactory function(long timeout, TimeUnit unit) { return new ConditionFactory(alias, new Duration(timeout, unit), pollInterval, pollDelay, catchUncaughtExceptions); }
|
/**
* Await at most <code>timeout</code> before throwing a timeout exception.
*
* @param timeout
* the timeout
* @param unit
* the unit
* @return the condition factory
*/
|
Await at most <code>timeout</code> before throwing a timeout exception
|
atMost
|
{
"repo_name": "szpak/awaitility",
"path": "awaitility/src/main/java/com/jayway/awaitility/core/ConditionFactory.java",
"license": "apache-2.0",
"size": 20731
}
|
[
"com.jayway.awaitility.Duration",
"java.util.concurrent.TimeUnit"
] |
import com.jayway.awaitility.Duration; import java.util.concurrent.TimeUnit;
|
import com.jayway.awaitility.*; import java.util.concurrent.*;
|
[
"com.jayway.awaitility",
"java.util"
] |
com.jayway.awaitility; java.util;
| 1,618,665
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.