method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
protected void processPage(PDPage page) throws IOException { createNewDocumentIfNecessary(); PDPage imported = getDestinationDocument().importPage(page); if (page.getResources() != null && !page.getCOSObject().containsKey(COSName.RESOURCES)) { imported.setRes...
void function(PDPage page) throws IOException { createNewDocumentIfNecessary(); PDPage imported = getDestinationDocument().importPage(page); if (page.getResources() != null && !page.getCOSObject().containsKey(COSName.RESOURCES)) { imported.setResources(page.getResources()); LOG.info(STR); } processAnnotations(imported)...
/** * Interface to start processing a new page. * * @param page The page that is about to get processed. * * @throws IOException If there is an error creating the new document. */
Interface to start processing a new page
processPage
{ "repo_name": "apache/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/multipdf/Splitter.java", "license": "apache-2.0", "size": 11562 }
[ "java.io.IOException", "org.apache.pdfbox.cos.COSName", "org.apache.pdfbox.pdmodel.PDPage" ]
import java.io.IOException; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.pdmodel.PDPage;
import java.io.*; import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.*;
[ "java.io", "org.apache.pdfbox" ]
java.io; org.apache.pdfbox;
2,678,675
public ArrayList<Estabelecimento> findAllE() { ArrayList<Estabelecimento> lista = new ArrayList<Estabelecimento>(); try{ statement = con.createStatement(); result = statement.executeQuery("SELECT * FROM Estabelecimento"); while (result.next()) { Estabelecimen...
ArrayList<Estabelecimento> function() { ArrayList<Estabelecimento> lista = new ArrayList<Estabelecimento>(); try{ statement = con.createStatement(); result = statement.executeQuery(STR); while (result.next()) { Estabelecimento e = new Estabelecimento(Integer.parseInt(result.getString(STR)), result.getString("email"), r...
/** * Procura todos os estabelecimentos. * * @return lista de todos os estabelecimentos existentes */
Procura todos os estabelecimentos
findAllE
{ "repo_name": "Sphincz/Eat-Drink", "path": "src/BaseDados/DBConnector.java", "license": "gpl-2.0", "size": 33500 }
[ "java.sql.SQLException", "java.util.ArrayList", "javax.swing.JOptionPane" ]
import java.sql.SQLException; import java.util.ArrayList; import javax.swing.JOptionPane;
import java.sql.*; import java.util.*; import javax.swing.*;
[ "java.sql", "java.util", "javax.swing" ]
java.sql; java.util; javax.swing;
2,140,697
public BeanManagerBean getManagerBean() { return new BeanManagerBean(webBeansContext); }
BeanManagerBean function() { return new BeanManagerBean(webBeansContext); }
/** * Creates a new manager bean instance. * @return new manager bean instance */
Creates a new manager bean instance
getManagerBean
{ "repo_name": "apache/openwebbeans", "path": "webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java", "license": "apache-2.0", "size": 69989 }
[ "org.apache.webbeans.component.BeanManagerBean" ]
import org.apache.webbeans.component.BeanManagerBean;
import org.apache.webbeans.component.*;
[ "org.apache.webbeans" ]
org.apache.webbeans;
2,691,261
public AndroidResourcesInfo toInfo( Label label, ProcessedAndroidManifest manifest, Artifact rTxt) { if (neverlink) { return ResourceDependencies.empty().toInfo(label, manifest, rTxt); } return new AndroidResourcesInfo( label, manifest.toProvider(), rTxt, transi...
AndroidResourcesInfo function( Label label, ProcessedAndroidManifest manifest, Artifact rTxt) { if (neverlink) { return ResourceDependencies.empty().toInfo(label, manifest, rTxt); } return new AndroidResourcesInfo( label, manifest.toProvider(), rTxt, transitiveResourceContainers, directResourceContainers, transitiveRes...
/** * Create a new AndroidResourcesInfo from the dependencies of this library. * * <p>When a library doesn't export resources it should simply forward the current transitive and * direct resources to the consuming rule. This allows the consuming rule to make decisions about * the resource merging as if t...
Create a new AndroidResourcesInfo from the dependencies of this library. When a library doesn't export resources it should simply forward the current transitive and direct resources to the consuming rule. This allows the consuming rule to make decisions about the resource merging as if this library didn't exist
toInfo
{ "repo_name": "ulfjack/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/android/ResourceDependencies.java", "license": "apache-2.0", "size": 17165 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.cmdline.Label" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.cmdline.*;
[ "com.google.devtools" ]
com.google.devtools;
1,840,962
protected void addMergeHistory(List<PurchasingAccountsPayableActionHistory> actionsTakenHistory, String actionTypeCode, PurchasingAccountsPayableItemAsset sourceItem, PurchasingAccountsPayableItemAsset targetItem) { // create action history records for each account from the source lines. for (Purcha...
void function(List<PurchasingAccountsPayableActionHistory> actionsTakenHistory, String actionTypeCode, PurchasingAccountsPayableItemAsset sourceItem, PurchasingAccountsPayableItemAsset targetItem) { for (PurchasingAccountsPayableLineAssetAccount sourceAccount : sourceItem.getPurchasingAccountsPayableLineAssetAccounts()...
/** * Add merge action to the action history. * * @param purApLineSession * @param isMergeAllAction * @param firstItem * @param item */
Add merge action to the action history
addMergeHistory
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/cab/document/service/impl/PurApLineServiceImpl.java", "license": "apache-2.0", "size": 62162 }
[ "java.util.List", "org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableActionHistory", "org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset", "org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableLineAssetAccount" ]
import java.util.List; import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableActionHistory; import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset; import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableLineAssetAccount;
import java.util.*; import org.kuali.kfs.module.cab.businessobject.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
2,664,708
public boolean areInSameAxis(int tId1, int tId2) { if (tId1==tId2) return true; if (axisAngles== null) calcRotAxesAndAngles(); if (getAxisFoldType(tId1)==1 && getAxisFoldType(tId2)==1) return true; // we can't deal yet with improper rotations: we return false whenever either of them is improper if (getA...
boolean function(int tId1, int tId2) { if (tId1==tId2) return true; if (axisAngles== null) calcRotAxesAndAngles(); if (getAxisFoldType(tId1)==1 && getAxisFoldType(tId2)==1) return true; if (getAxisFoldType(tId1)<0 getAxisFoldType(tId2)<0) return false; Vector3d axis1 = new Vector3d(axisAngles[tId1].x, axisAngles[tId1]....
/** * Returns true if both given transform ids belong to the same crystallographic axis (a, b or c) * For two non-rotation transformations (i.e. identity operators) it returns true * @param tId1 * @param tId2 * @return */
Returns true if both given transform ids belong to the same crystallographic axis (a, b or c) For two non-rotation transformations (i.e. identity operators) it returns true
areInSameAxis
{ "repo_name": "heuermh/biojava", "path": "biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/SpaceGroup.java", "license": "lgpl-2.1", "size": 20379 }
[ "javax.vecmath.Vector3d" ]
import javax.vecmath.Vector3d;
import javax.vecmath.*;
[ "javax.vecmath" ]
javax.vecmath;
612,022
public void releaseLease(String leaseID, String blobKey) throws Exception { AccessCondition accessCondition = new AccessCondition(); accessCondition.setLeaseID(leaseID); getBlobReference(blobKey).releaseLease(accessCondition); }
void function(String leaseID, String blobKey) throws Exception { AccessCondition accessCondition = new AccessCondition(); accessCondition.setLeaseID(leaseID); getBlobReference(blobKey).releaseLease(accessCondition); }
/** * Releases the lease on the container. * * @param leaseID * The lease ID. */
Releases the lease on the container
releaseLease
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/AzureBlobStorageTestAccount.java", "license": "gpl-3.0", "size": 30928 }
[ "com.microsoft.azure.storage.AccessCondition" ]
import com.microsoft.azure.storage.AccessCondition;
import com.microsoft.azure.storage.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,671,770
public synchronized Cookie retrievePacoAuthCookie() { String name = authTokenPreferences.getString(AUTH_TOKEN_PREFERENCE_NAME_KEY, null); String expiry = authTokenPreferences.getString(AUTH_TOKEN_PREFERENCE_EXPIRE_KEY, null); if (!isPacoAuthCookieSetAndValid(name, expiry)) { throw new IllegalStateEx...
synchronized Cookie function() { String name = authTokenPreferences.getString(AUTH_TOKEN_PREFERENCE_NAME_KEY, null); String expiry = authTokenPreferences.getString(AUTH_TOKEN_PREFERENCE_EXPIRE_KEY, null); if (!isPacoAuthCookieSetAndValid(name, expiry)) { throw new IllegalStateException(STR); } try { Date expirationDate...
/** * Retrieve the stored Paco appengine server login cookie. * * @return Cookie */
Retrieve the stored Paco appengine server login cookie
retrievePacoAuthCookie
{ "repo_name": "BobEvans/omgpaco", "path": "PacoAndroidLib/src/com/google/sampling/experiential/android/lib/GoogleAccountLoginHelper.java", "license": "apache-2.0", "size": 10618 }
[ "java.text.SimpleDateFormat", "java.util.Date", "org.apache.http.cookie.Cookie" ]
import java.text.SimpleDateFormat; import java.util.Date; import org.apache.http.cookie.Cookie;
import java.text.*; import java.util.*; import org.apache.http.cookie.*;
[ "java.text", "java.util", "org.apache.http" ]
java.text; java.util; org.apache.http;
1,632,293
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; queryPanel = new javax.swing.JPanel(); queryPanelInner = new javax.swing.JPanel();...
@SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; queryPanel = new javax.swing.JPanel(); queryPanelInner = new javax.swing.JPanel(); selectQueryPanel = new javax.swing.JPanel(); queryComboBox = new SimpleComboBox(); addQueryButton = new SimpleButton(); delQueryButton = new SimpleB...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "wandora-team/wandora", "path": "src/org/wandora/application/gui/search/QueryPanel.java", "license": "gpl-3.0", "size": 29433 }
[ "javax.swing.JScrollPane", "org.wandora.application.gui.simple.SimpleButton", "org.wandora.application.gui.simple.SimpleComboBox", "org.wandora.application.gui.simple.SimpleLabel", "org.wandora.application.gui.simple.SimpleScrollPane" ]
import javax.swing.JScrollPane; import org.wandora.application.gui.simple.SimpleButton; import org.wandora.application.gui.simple.SimpleComboBox; import org.wandora.application.gui.simple.SimpleLabel; import org.wandora.application.gui.simple.SimpleScrollPane;
import javax.swing.*; import org.wandora.application.gui.simple.*;
[ "javax.swing", "org.wandora.application" ]
javax.swing; org.wandora.application;
2,731,441
public DocumentListEntry getDocsListEntry(String resourceId) throws IOException, MalformedURLException, ServiceException, DocumentListException { if (resourceId == null) { throw new DocumentListException("null resourceId"); } URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId); return ...
DocumentListEntry function(String resourceId) throws IOException, MalformedURLException, ServiceException, DocumentListException { if (resourceId == null) { throw new DocumentListException(STR); } URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId); return service.getEntry(url, DocumentListEntry.class...
/** * Gets the entry for the provided object id. * * @param resourceId the resource id of the object to fetch an entry for. * * @throws IOException * @throws MalformedURLException * @throws ServiceException * @throws DocumentListException */
Gets the entry for the provided object id
getDocsListEntry
{ "repo_name": "Letractively/red-piranha", "path": "src/net/firstpartners/google/docs/GoogleDocumentList.java", "license": "gpl-2.0", "size": 33049 }
[ "com.google.gdata.data.docs.DocumentListEntry", "com.google.gdata.util.ServiceException", "java.io.IOException", "java.net.MalformedURLException" ]
import com.google.gdata.data.docs.DocumentListEntry; import com.google.gdata.util.ServiceException; import java.io.IOException; import java.net.MalformedURLException;
import com.google.gdata.data.docs.*; import com.google.gdata.util.*; import java.io.*; import java.net.*;
[ "com.google.gdata", "java.io", "java.net" ]
com.google.gdata; java.io; java.net;
330,635
public void putMemoryBlock(final byte[] blockData) { this.segment.getLock().writeLock().lock(); try { long freeSpace = this.segment.getFreeSpace() - (blockData.length + MemoryArch.OFFSET_BLOCK); int capacity = this.segment.getCapacity() + 1; ...
void function(final byte[] blockData) { this.segment.getLock().writeLock().lock(); try { long freeSpace = this.segment.getFreeSpace() - (blockData.length + MemoryArch.OFFSET_BLOCK); int capacity = this.segment.getCapacity() + 1; if (freeSpace > 0 && (capacity <= Configure.BUFFER_SEGMENT_CAPACITY)) { ByteMapper byteMapp...
/** * Create memory block and put data into memory block * * @param blockData data */
Create memory block and put data into memory block
putMemoryBlock
{ "repo_name": "xreload/tesseractdb", "path": "src/main/java/org/tesseractdb/mapper/MemoryMapper.java", "license": "gpl-2.0", "size": 8690 }
[ "org.tesseractdb.engine.Configure", "org.tesseractdb.memory.MemoryArch", "org.tesseractdb.memory.MemoryBlock" ]
import org.tesseractdb.engine.Configure; import org.tesseractdb.memory.MemoryArch; import org.tesseractdb.memory.MemoryBlock;
import org.tesseractdb.engine.*; import org.tesseractdb.memory.*;
[ "org.tesseractdb.engine", "org.tesseractdb.memory" ]
org.tesseractdb.engine; org.tesseractdb.memory;
582,886
@Override Set<N> adjacentNodes(N node);
Set<N> adjacentNodes(N node);
/** * Returns the nodes which have an incident edge in common with {@code node} in this graph. * * <p>This is equal to the union of {@link #predecessors(Object)} and {@link #successors(Object)}. * * @throws IllegalArgumentException if {@code node} is not an element of this graph */
Returns the nodes which have an incident edge in common with node in this graph. This is equal to the union of <code>#predecessors(Object)</code> and <code>#successors(Object)</code>
adjacentNodes
{ "repo_name": "mosoft521/guava", "path": "guava/src/com/google/common/graph/ValueGraph.java", "license": "apache-2.0", "size": 14257 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,953,254
public Builder setToolchainProvider(CcToolchainProvider toolchain) { this.toolchain = toolchain; return this; }
Builder function(CcToolchainProvider toolchain) { this.toolchain = toolchain; return this; }
/** * Sets {@link CcToolchainProvider} for the calling target. * * <p>This is needed if it can't correctly be inferred directly from the rule context. Setting * to null causes the default to be used as if this was never called. */
Sets <code>CcToolchainProvider</code> for the calling target. This is needed if it can't correctly be inferred directly from the rule context. Setting to null causes the default to be used as if this was never called
setToolchainProvider
{ "repo_name": "dropbox/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java", "license": "apache-2.0", "size": 82429 }
[ "com.google.devtools.build.lib.rules.cpp.CcToolchainProvider" ]
import com.google.devtools.build.lib.rules.cpp.CcToolchainProvider;
import com.google.devtools.build.lib.rules.cpp.*;
[ "com.google.devtools" ]
com.google.devtools;
2,483,504
private String render(OWLClassExpression e) { if (e instanceof OWLClass) { return ((OWLClass)e).getIRI().getFragment(); } else if (e instanceof OWLObjectIntersectionOf) { String r = "("; int i=0; for (OWLClassExpression se : ((OWLObjectIntersectionOf)e).getOperands()) { r += (i>0) ? " and " + ren...
String function(OWLClassExpression e) { if (e instanceof OWLClass) { return ((OWLClass)e).getIRI().getFragment(); } else if (e instanceof OWLObjectIntersectionOf) { String r = "("; int i=0; for (OWLClassExpression se : ((OWLObjectIntersectionOf)e).getOperands()) { r += (i>0) ? STR + render(se) : render(se); i++; } retu...
/** * Prints a concept as string. * * @param e The concept to print * @return string representation of the concept */
Prints a concept as string
render
{ "repo_name": "julianmendez/gel", "path": "gel/src/main/java/de/tudresden/inf/lat/gel/LcsView.java", "license": "apache-2.0", "size": 6910 }
[ "org.semanticweb.owlapi.model.OWLClass", "org.semanticweb.owlapi.model.OWLClassExpression", "org.semanticweb.owlapi.model.OWLObjectIntersectionOf", "org.semanticweb.owlapi.model.OWLObjectPropertyExpression", "org.semanticweb.owlapi.model.OWLObjectSomeValuesFrom" ]
import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLClassExpression; import org.semanticweb.owlapi.model.OWLObjectIntersectionOf; import org.semanticweb.owlapi.model.OWLObjectPropertyExpression; import org.semanticweb.owlapi.model.OWLObjectSomeValuesFrom;
import org.semanticweb.owlapi.model.*;
[ "org.semanticweb.owlapi" ]
org.semanticweb.owlapi;
2,110,999
public Collection<GridCacheMvccCandidate> localCandidates() { Collection<GridCacheMvccCandidate> locCands = new ArrayList<>(); for (GridDistributedCacheEntry entry : locked()) { try { locCands.addAll(entry.localCandidates()); } catch (GridCacheEnt...
Collection<GridCacheMvccCandidate> function() { Collection<GridCacheMvccCandidate> locCands = new ArrayList<>(); for (GridDistributedCacheEntry entry : locked()) { try { locCands.addAll(entry.localCandidates()); } catch (GridCacheEntryRemovedException ignore) { } } return locCands; }
/** * This method has poor performance, so use with care. It is currently only used by {@code DGC}. * * @return Local candidates. */
This method has poor performance, so use with care. It is currently only used by DGC
localCandidates
{ "repo_name": "psadusumilli/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java", "license": "apache-2.0", "size": 46448 }
[ "java.util.ArrayList", "java.util.Collection", "org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry" ]
import java.util.ArrayList; import java.util.Collection; import org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry;
import java.util.*; import org.apache.ignite.internal.processors.cache.distributed.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,518,060
@javax.annotation.Nullable @ApiModelProperty( value = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/s...
@javax.annotation.Nullable @ApiModelProperty( value = "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https: String function() { return apiVersion; }
/** * APIVersion defines the versioned schema of this representation of an object. Servers should * convert recognized schemas to the latest internal value, and may reject unrecognized values. * More info: * https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources * ...
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: HREF
getApiVersion
{ "repo_name": "kubernetes-client/java", "path": "kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1JobList.java", "license": "apache-2.0", "size": 5782 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,340,353
private void saveData(){ Match match = new Match(); match.setDateStarted(); match.setOpponentsName(etOpponentsName.getText().toString()); //match.setCourtLength(sbCourtLength.getProgress()); match.setNotes(etNotes.getText().toString()); //Send the data to the match. if(matchListener != null){ ...
void function(){ Match match = new Match(); match.setDateStarted(); match.setOpponentsName(etOpponentsName.getText().toString()); match.setNotes(etNotes.getText().toString()); if(matchListener != null){ matchListener.newMatchObject(match); }else{ Log.e(TAG, STR); } }
/** * Save the currently entered data into a new Match object. * Pass the match object to the Match fragment. */
Save the currently entered data into a new Match object. Pass the match object to the Match fragment
saveData
{ "repo_name": "Sam-Hendriksen/SquashT", "path": "Android/Gradle/SquashTracker/app/src/main/java/com/hendriksen/fragments/NewMatchDialogFragment.java", "license": "mit", "size": 6450 }
[ "android.util.Log", "com.hendriksen.model.Match" ]
import android.util.Log; import com.hendriksen.model.Match;
import android.util.*; import com.hendriksen.model.*;
[ "android.util", "com.hendriksen.model" ]
android.util; com.hendriksen.model;
2,844,421
@Deprecated RetryDecision onReadTimeout( @NonNull Request request, @NonNull ConsistencyLevel cl, int blockFor, int received, boolean dataPresent, int retryCount);
RetryDecision onReadTimeout( @NonNull Request request, @NonNull ConsistencyLevel cl, int blockFor, int received, boolean dataPresent, int retryCount);
/** * Whether to retry when the server replied with a {@code READ_TIMEOUT} error; this indicates a * <b>server-side</b> timeout during a read query, i.e. some replicas did not reply to the * coordinator in time. * * @param request the request that timed out. * @param cl the requested consistency level...
Whether to retry when the server replied with a READ_TIMEOUT error; this indicates a server-side timeout during a read query, i.e. some replicas did not reply to the coordinator in time
onReadTimeout
{ "repo_name": "datastax/java-driver", "path": "core/src/main/java/com/datastax/oss/driver/api/core/retry/RetryPolicy.java", "license": "apache-2.0", "size": 16258 }
[ "com.datastax.oss.driver.api.core.ConsistencyLevel", "com.datastax.oss.driver.api.core.session.Request", "edu.umd.cs.findbugs.annotations.NonNull" ]
import com.datastax.oss.driver.api.core.ConsistencyLevel; import com.datastax.oss.driver.api.core.session.Request; import edu.umd.cs.findbugs.annotations.NonNull;
import com.datastax.oss.driver.api.core.*; import com.datastax.oss.driver.api.core.session.*; import edu.umd.cs.findbugs.annotations.*;
[ "com.datastax.oss", "edu.umd.cs" ]
com.datastax.oss; edu.umd.cs;
586,209
public boolean forceBatchExpirationForTests(int count, long timeout, TimeUnit unit) throws InterruptedException { return this.replicatedTombstoneSweeper.testHook_forceExpiredTombstoneGC(count, timeout, unit); }
boolean function(int count, long timeout, TimeUnit unit) throws InterruptedException { return this.replicatedTombstoneSweeper.testHook_forceExpiredTombstoneGC(count, timeout, unit); }
/** * For test purposes only, force the expiration of a number of tombstones for replicated regions. * * @param count Number of tombstones to expire * @param timeout the maximum time to wait * @param unit the time unit of the {@code timeout} argument * * @return true if the expiration occurred *...
For test purposes only, force the expiration of a number of tombstones for replicated regions
forceBatchExpirationForTests
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/TombstoneService.java", "license": "apache-2.0", "size": 39079 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,847,440
void addExtractDirectoryInstruction(@NotNull File jarFile, @NotNull String pathInJar, @NotNull Condition<String> pathInJarFilter);
void addExtractDirectoryInstruction(@NotNull File jarFile, @NotNull String pathInJar, @NotNull Condition<String> pathInJarFilter);
/** * Add instruction to extract directory from a jar file into the current place in the artifact layout. * @param jarFile jar file to extract * @param pathInJar relative path to directory inside {@code jarFile} which need to be extracted. Use "/" to extract the whole jar contents * @param pathInJarFilter a...
Add instruction to extract directory from a jar file into the current place in the artifact layout
addExtractDirectoryInstruction
{ "repo_name": "leafclick/intellij-community", "path": "jps/jps-builders/src/org/jetbrains/jps/incremental/artifacts/instructions/ArtifactCompilerInstructionCreator.java", "license": "apache-2.0", "size": 3063 }
[ "com.intellij.openapi.util.Condition", "java.io.File", "org.jetbrains.annotations.NotNull" ]
import com.intellij.openapi.util.Condition; import java.io.File; import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.util.*; import java.io.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "java.io", "org.jetbrains.annotations" ]
com.intellij.openapi; java.io; org.jetbrains.annotations;
1,541,293
public static int getRequiredWidthBoundingClientRect( com.google.gwt.dom.client.Element element) { return (int) Math .ceil(getRequiredWidthBoundingClientRectDouble(element)); }
static int function( com.google.gwt.dom.client.Element element) { return (int) Math .ceil(getRequiredWidthBoundingClientRectDouble(element)); }
/** * Calculates the width of the element's bounding rectangle. * <p> * In case the browser doesn't support bounding rectangles, the returned * value is the offset width. * * @param element * the element of which to calculate the width * @return the width of the elemen...
Calculates the width of the element's bounding rectangle. In case the browser doesn't support bounding rectangles, the returned value is the offset width
getRequiredWidthBoundingClientRect
{ "repo_name": "Darsstar/framework", "path": "client/src/main/java/com/vaadin/client/WidgetUtil.java", "license": "apache-2.0", "size": 64915 }
[ "com.google.gwt.dom.client.Element" ]
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.*;
[ "com.google.gwt" ]
com.google.gwt;
745,849
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); overridePendingTransition(R.anim.activity_prev_in, R.anim.activity_prev_out); return true; case R.id.itemLinksmenuAdd: showAddEditLinkDialog(null); return true; defaul...
boolean function(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); overridePendingTransition(R.anim.activity_prev_in, R.anim.activity_prev_out); return true; case R.id.itemLinksmenuAdd: showAddEditLinkDialog(null); return true; default: return (super.onOptionsItemSelected(item)); } }
/** * Called if item in option menu is selected. * * @param item * The chosen menu item * @return boolean true/false */
Called if item in option menu is selected
onOptionsItemSelected
{ "repo_name": "TheNephilim88/andlytics", "path": "src/com/github/andlyticsproject/AppInfoActivity.java", "license": "apache-2.0", "size": 11686 }
[ "android.view.MenuItem" ]
import android.view.MenuItem;
import android.view.*;
[ "android.view" ]
android.view;
2,403,562
public void testCase2_testMultiOne2OneChatMessage() throws Throwable { if (getTestedMessageCount() > 0) { clearMmsDataBase(); } final IpTextMessage mockMessage = new IpTextMessage(); mockMessage.setTo(MOCK_NUMBER + "," + MOCK_NUMBER); mockMessage.setBody(MOCK_SENT...
void function() throws Throwable { if (getTestedMessageCount() > 0) { clearMmsDataBase(); } final IpTextMessage mockMessage = new IpTextMessage(); mockMessage.setTo(MOCK_NUMBER + "," + MOCK_NUMBER); mockMessage.setBody(MOCK_SENT_MESSAGE); assertTrue(mMessageManager.saveIpMsg(mockMessage, 0) > 0); assertEquals(1, getTes...
/** * Test for sending 1-2-1 chat message to multiply contacts * @throws Throwable */
Test for sending 1-2-1 chat message to multiply contacts
testCase2_testMultiOne2OneChatMessage
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/packages/apps/RCSe/core/tests/src/com/mediatek/rcse/test/plugin/MessageManagerTest.java", "license": "gpl-2.0", "size": 47038 }
[ "com.mediatek.mms.ipmessage.message.IpTextMessage" ]
import com.mediatek.mms.ipmessage.message.IpTextMessage;
import com.mediatek.mms.ipmessage.message.*;
[ "com.mediatek.mms" ]
com.mediatek.mms;
1,743,847
protected String getWebAppsPath() throws IOException { URL url = getClass().getClassLoader().getResource("webapps"); if (url == null) throw new IOException("webapps not found in CLASSPATH"); return url.toString(); }
String function() throws IOException { URL url = getClass().getClassLoader().getResource(STR); if (url == null) throw new IOException(STR); return url.toString(); }
/** * Get the pathname to the webapps files. * @return the pathname as a URL * @throws IOException if 'webapps' directory cannot be found on CLASSPATH. */
Get the pathname to the webapps files
getWebAppsPath
{ "repo_name": "shakamunyi/hadoop-20", "path": "src/core/org/apache/hadoop/http/HttpServer.java", "license": "apache-2.0", "size": 30649 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,193,052
TimeData getTimeDataTo(T anotherDatable);
TimeData getTimeDataTo(T anotherDatable);
/** * Compute the time between the datable instance and another one. * @return the time between the datable instance and another one represented by {@link TimeData}. */
Compute the time between the datable instance and another one
getTimeDataTo
{ "repo_name": "CecileBONIN/Silverpeas-Core", "path": "lib-core/src/main/java/com/silverpeas/calendar/Datable.java", "license": "agpl-3.0", "size": 12387 }
[ "org.silverpeas.util.time.TimeData" ]
import org.silverpeas.util.time.TimeData;
import org.silverpeas.util.time.*;
[ "org.silverpeas.util" ]
org.silverpeas.util;
1,754,844
@Test(groups = "wso2.das4mb.publish", description = "Test queue subscriber count data publishing") public void testQueueSubscriberData() throws XPathExpressionException, MalformedObjectNameException, IOException, AnalyticsIndexException, InterruptedException { int metricsRecordsCount = this....
@Test(groups = STR, description = STR) void function() throws XPathExpressionException, MalformedObjectNameException, IOException, AnalyticsIndexException, InterruptedException { int metricsRecordsCount = this.analyticsDataAPI.searchCount(-1234, TestConstants.ORG_WSO2_METRICS_STREAM_GAUGE, "*:*"); int mbRecordsCount = ...
/** * Publish queue subscriber count data to ORG_WSO2_METRICS_STREAM_GAUGE stream * FilterStreamExecutionPlan should insert record to ORG_WSO2_MB_ANALYTICS_STREAM_GAUGE_STATS_MINUTE table if published data match * with filtering criteria * Wait 10 seconds until processing execution complete * A...
Publish queue subscriber count data to ORG_WSO2_METRICS_STREAM_GAUGE stream FilterStreamExecutionPlan should insert record to ORG_WSO2_MB_ANALYTICS_STREAM_GAUGE_STATS_MINUTE table if published data match with filtering criteria Wait 10 seconds until processing execution complete Assert both table and verify records add...
testQueueSubscriberData
{ "repo_name": "indikasampath2000/analytics-mb", "path": "product/integration/tests-integration/src/test/java/org/wso2/das/integration/tests/mb/MBAnalyticsDataPublishingAndSiddhiExecutionTestCase.java", "license": "apache-2.0", "size": 25588 }
[ "java.io.IOException", "javax.management.MalformedObjectNameException", "javax.xml.xpath.XPathExpressionException", "org.testng.annotations.Test", "org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException", "org.wso2.das.integration.common.utils.TestConstants" ]
import java.io.IOException; import javax.management.MalformedObjectNameException; import javax.xml.xpath.XPathExpressionException; import org.testng.annotations.Test; import org.wso2.carbon.analytics.dataservice.commons.exception.AnalyticsIndexException; import org.wso2.das.integration.common.utils.TestConstants;
import java.io.*; import javax.management.*; import javax.xml.xpath.*; import org.testng.annotations.*; import org.wso2.carbon.analytics.dataservice.commons.exception.*; import org.wso2.das.integration.common.utils.*;
[ "java.io", "javax.management", "javax.xml", "org.testng.annotations", "org.wso2.carbon", "org.wso2.das" ]
java.io; javax.management; javax.xml; org.testng.annotations; org.wso2.carbon; org.wso2.das;
1,000,509
public Environment getEnvironment() { return environment; }
Environment function() { return environment; }
/** * Returns the environment of the node */
Returns the environment of the node
getEnvironment
{ "repo_name": "trangvh/elasticsearch", "path": "core/src/main/java/org/elasticsearch/node/Node.java", "license": "apache-2.0", "size": 27792 }
[ "org.elasticsearch.env.Environment" ]
import org.elasticsearch.env.Environment;
import org.elasticsearch.env.*;
[ "org.elasticsearch.env" ]
org.elasticsearch.env;
204,579
Date getLastModifiedTime();
Date getLastModifiedTime();
/** * Return the last modified time * * @return the last modified time */
Return the last modified time
getLastModifiedTime
{ "repo_name": "cbaenziger/oozie", "path": "client/src/main/java/org/apache/oozie/client/CoordinatorAction.java", "license": "apache-2.0", "size": 4219 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
694,920
public final void testHandleNotification() { Hello h = new Hello(); h.addNotificationListener(this, null, handback); h.sayHello(); assertTrue("The handleNotification() method not invoked!", h.isHandleNotifInvoked); }
final void function() { Hello h = new Hello(); h.addNotificationListener(this, null, handback); h.sayHello(); assertTrue(STR, h.isHandleNotifInvoked); }
/** * Test for the method * handleNotification(javax.management.NotificationListener, * javax.management.Notification, java.lang.Object) * * @see javax.management.NotificationBroadcasterSupport#handleNotification(javax.management.NotificationListener, * javax.management.Notification,...
Test for the method handleNotification(javax.management.NotificationListener, javax.management.Notification, java.lang.Object)
testHandleNotification
{ "repo_name": "freeVM/freeVM", "path": "enhanced/buildtest/tests/functional/src/test/functional/org/apache/harmony/test/func/api/javax/management/NotificationBroadcasterSupportTest.java", "license": "apache-2.0", "size": 9376 }
[ "org.apache.harmony.test.func.api.javax.management.share.Hello" ]
import org.apache.harmony.test.func.api.javax.management.share.Hello;
import org.apache.harmony.test.func.api.javax.management.share.*;
[ "org.apache.harmony" ]
org.apache.harmony;
540,188
public void setFromCursor(Cursor c) { if (column.length() > 0 && !doNoFetch) { try { mAccessor.set(this, c); } catch (android.database.CursorIndexOutOfBoundsException e) { throw new RuntimeException("Column '" + this.column + "' not found in cursor",e); } } } }
void function(Cursor c) { if (column.length() > 0 && !doNoFetch) { try { mAccessor.set(this, c); } catch (android.database.CursorIndexOutOfBoundsException e) { throw new RuntimeException(STR + this.column + STR,e); } } } }
/** * Set the value of this field from the passed cursor. Useful for getting access to * raw data values from the database. * * @param c */
Set the value of this field from the passed cursor. Useful for getting access to raw data values from the database
setFromCursor
{ "repo_name": "bdunogier/Book-Catalogue", "path": "src/com/eleybourn/bookcatalogue/Fields.java", "license": "gpl-3.0", "size": 38592 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
1,980,777
@Test public void test_getAndSetPasswordField_passwordInputElementNotFound() { try { final String password = "some value"; mockery.checking(new Expectations() { { one(form).getInputsByName(Constants.J_PASSWORD); will(throwEx...
void function() { try { final String password = STR; mockery.checking(new Expectations() { { one(form).getInputsByName(Constants.J_PASSWORD); will(throwException(new ElementNotFoundException(Constants.J_PASSWORD, STR, password))); } }); try { utils.getAndSetPasswordField(form, password); fail(STR); } catch (ElementNotF...
/** * Tests: * - Password: Non-empty * - Input with the specified name does not exist * Expects: * - ElementNotFoundException should be thrown as-is */
Tests: - Password: Non-empty - Input with the specified name does not exist Expects: - ElementNotFoundException should be thrown as-is
test_getAndSetPasswordField_passwordInputElementNotFound
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.fat.common/test/com/ibm/ws/security/fat/common/web/WebFormUtilsTest.java", "license": "epl-1.0", "size": 26977 }
[ "com.gargoylesoftware.htmlunit.ElementNotFoundException", "com.ibm.ws.security.fat.common.Constants", "org.jmock.Expectations", "org.junit.Assert" ]
import com.gargoylesoftware.htmlunit.ElementNotFoundException; import com.ibm.ws.security.fat.common.Constants; import org.jmock.Expectations; import org.junit.Assert;
import com.gargoylesoftware.htmlunit.*; import com.ibm.ws.security.fat.common.*; import org.jmock.*; import org.junit.*;
[ "com.gargoylesoftware.htmlunit", "com.ibm.ws", "org.jmock", "org.junit" ]
com.gargoylesoftware.htmlunit; com.ibm.ws; org.jmock; org.junit;
2,083,382
public String toString(int indentFactor) throws JSONException { StringWriter sw = new StringWriter(); synchronized (sw.getBuffer()) { return this.write(sw, indentFactor, 0).toString(); } }
String function(int indentFactor) throws JSONException { StringWriter sw = new StringWriter(); synchronized (sw.getBuffer()) { return this.write(sw, indentFactor, 0).toString(); } }
/** * Make a prettyprinted JSON text of this JSONArray. Warning: This method * assumes that the data structure is acyclical. * * @param indentFactor * The number of spaces to add to each level of indentation. * @return a printable, displayable, transmittable representation...
Make a prettyprinted JSON text of this JSONArray. Warning: This method assumes that the data structure is acyclical
toString
{ "repo_name": "MrabEzreb/Normal-Speech-Translation", "path": "External Apis/org/json/JSONArray.java", "license": "mit", "size": 33170 }
[ "java.io.StringWriter" ]
import java.io.StringWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,563,253
Future<UserBean> getAnonymousUser() throws URISyntaxException;
Future<UserBean> getAnonymousUser() throws URISyntaxException;
/** * Get the Anonymous User * * @return Future with the UserBean * @throws java.net.URISyntaxException (never thrown due to future) */
Get the Anonymous User
getAnonymousUser
{ "repo_name": "MartinBoehmer/ConfluenceRestClient", "path": "src/main/java/de/itboehmer/confluence/rest/client/UserClient.java", "license": "apache-2.0", "size": 2028 }
[ "de.itboehmer.confluence.rest.core.domain.UserBean", "java.net.URISyntaxException", "java.util.concurrent.Future" ]
import de.itboehmer.confluence.rest.core.domain.UserBean; import java.net.URISyntaxException; import java.util.concurrent.Future;
import de.itboehmer.confluence.rest.core.domain.*; import java.net.*; import java.util.concurrent.*;
[ "de.itboehmer.confluence", "java.net", "java.util" ]
de.itboehmer.confluence; java.net; java.util;
1,692,020
public void setBusy(final boolean isBusy) { if (EventQueue.isDispatchThread()) { this.lblProgress.setBusy(isBusy); this.lblProgress.setVisible(isBusy); } else { EventQueue.invokeLater(new Runnable() {
void function(final boolean isBusy) { if (EventQueue.isDispatchThread()) { this.lblProgress.setBusy(isBusy); this.lblProgress.setVisible(isBusy); } else { EventQueue.invokeLater(new Runnable() {
/** * DOCUMENT ME! * * @param isBusy DOCUMENT ME! */
DOCUMENT ME
setBusy
{ "repo_name": "cismet/cids-custom-sudplan", "path": "src/main/java/de/cismet/cids/custom/sudplan/StatusPanel.java", "license": "lgpl-3.0", "size": 3649 }
[ "java.awt.EventQueue" ]
import java.awt.EventQueue;
import java.awt.*;
[ "java.awt" ]
java.awt;
188,472
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (XALPackage.eINSTANCE.getDocumentRoot_AddressDetails(), XALFactory.eINSTANCE.crea...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (XALPackage.eINSTANCE.getDocumentRoot_AddressDetails(), XALFactory.eINSTANCE.createAddressDetails())); newChildDescriptors.add (createChildP...
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore.edit/src/org/oasis/xAL/provider/DocumentRootItemProvider.java", "license": "apache-2.0", "size": 9961 }
[ "java.util.Collection", "org.oasis.xAL.XALFactory", "org.oasis.xAL.XALPackage" ]
import java.util.Collection; import org.oasis.xAL.XALFactory; import org.oasis.xAL.XALPackage;
import java.util.*; import org.oasis.*;
[ "java.util", "org.oasis" ]
java.util; org.oasis;
1,950,141
@Deprecated public boolean isValid() { try { validate(); } catch (ValidationException vex) { return false; } return true; }
boolean function() { try { validate(); } catch (ValidationException vex) { return false; } return true; }
/** * Method isValid. * * @return true if this object is valid according to the schema */
Method isValid
isValid
{ "repo_name": "opennms-forge/poc-nms-core", "path": "opennms-config-model/src/main/java/org/opennms/netmgt/config/poller/outages/Node.java", "license": "gpl-2.0", "size": 5971 }
[ "org.exolab.castor.xml.ValidationException" ]
import org.exolab.castor.xml.ValidationException;
import org.exolab.castor.xml.*;
[ "org.exolab.castor" ]
org.exolab.castor;
383,774
public static String validateInputs(String containerName, String fileName) { if (containerName.length() == 0) { return "File container must be specified"; } IPath containerPath = PlatformTools.buildPath(containerName); IResource container = WorkspaceTools.buildWorkspaceResource(containerPath);...
static String function(String containerName, String fileName) { if (containerName.length() == 0) { return STR; } IPath containerPath = PlatformTools.buildPath(containerName); IResource container = WorkspaceTools.buildWorkspaceResource(containerPath); if (container == null (container.getType() & (IResource.PROJECT IReso...
/** * Determine if the inputs are consistent. * * @return error string if problems exist, or null if inputs are valid */
Determine if the inputs are consistent
validateInputs
{ "repo_name": "google/depan", "path": "DepanPlatformUI/prod/src/com/google/devtools/depan/resource_doc/eclipse/ui/widgets/ProjectResourceControl.java", "license": "apache-2.0", "size": 7048 }
[ "com.google.devtools.depan.platform.PlatformTools", "com.google.devtools.depan.platform.WorkspaceTools", "org.eclipse.core.resources.IResource", "org.eclipse.core.runtime.IPath" ]
import com.google.devtools.depan.platform.PlatformTools; import com.google.devtools.depan.platform.WorkspaceTools; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IPath;
import com.google.devtools.depan.platform.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*;
[ "com.google.devtools", "org.eclipse.core" ]
com.google.devtools; org.eclipse.core;
421,785
public String getKeystoreFile() throws Exception { Object keystoreFileObj = null; Class coyoteConnectorCls = Class.forName("org.apache.coyote.tomcat4.CoyoteConnector"); if (coyoteConnectorCls.isInstance(this.resource)) { // get keystoreFile Method...
String function() throws Exception { Object keystoreFileObj = null; Class coyoteConnectorCls = Class.forName(STR); if (coyoteConnectorCls.isInstance(this.resource)) { Method meth1 = coyoteConnectorCls.getMethod(STR, null); Object factory = meth1.invoke(this.resource, null); Class coyoteServerSocketFactoryCls = Class.fo...
/** * Return keystoreFile * * @exception Exception if an MBean cannot be created or registered */
Return keystoreFile
getKeystoreFile
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/mbeans/ConnectorMBean.java", "license": "apache-2.0", "size": 11320 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
312,300
public void addSeries(Comparable seriesKey, double[][] data) { ParamChecks.nullNotPermitted(seriesKey, "seriesKey"); ParamChecks.nullNotPermitted(seriesKey, "data"); if (data.length != 6) { throw new IllegalArgumentException( "The 'data' array must have length...
void function(Comparable seriesKey, double[][] data) { ParamChecks.nullNotPermitted(seriesKey, STR); ParamChecks.nullNotPermitted(seriesKey, "data"); if (data.length != 6) { throw new IllegalArgumentException( STR); } int length = data[0].length; if (length != data[1].length length != data[2].length length != data[3].l...
/** * Adds a series or if a series with the same key already exists replaces * the data for that series, then sends a {@link DatasetChangeEvent} to * all registered listeners. * * @param seriesKey the series key (<code>null</code> not permitted). * @param data the data (must be an array ...
Adds a series or if a series with the same key already exists replaces the data for that series, then sends a <code>DatasetChangeEvent</code> to all registered listeners
addSeries
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/main/java/org/jfree/data/xy/DefaultIntervalXYDataset.java", "license": "gpl-3.0", "size": 18528 }
[ "org.jfree.chart.util.ParamChecks", "org.jfree.data.general.DatasetChangeEvent" ]
import org.jfree.chart.util.ParamChecks; import org.jfree.data.general.DatasetChangeEvent;
import org.jfree.chart.util.*; import org.jfree.data.general.*;
[ "org.jfree.chart", "org.jfree.data" ]
org.jfree.chart; org.jfree.data;
646,954
@Override public String loadFromAppRootFile(String file, Map<String, String> properties) { return applyProperties(appRootFileContent.get(file), properties); }
String function(String file, Map<String, String> properties) { return applyProperties(appRootFileContent.get(file), properties); }
/** * load content from a fake file and apply properties * @param file * @param properties * @return */
load content from a fake file and apply properties
loadFromAppRootFile
{ "repo_name": "johnhurt/orgama", "path": "core/orgama-test/src/main/java/org/orgama/server/mock/MockResourceLoader.java", "license": "mit", "size": 2259 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,743,417
public void openTray(DialogTray tray) throws IllegalStateException, UnsupportedOperationException { if (tray == null) { throw new NullPointerException("Tray was null"); //$NON-NLS-1$ } if (getTray() != null) { throw new IllegalStateException("Tray was already open"); //$NON-NLS-1$ } if (!isCompatible...
void function(DialogTray tray) throws IllegalStateException, UnsupportedOperationException { if (tray == null) { throw new NullPointerException(STR); } if (getTray() != null) { throw new IllegalStateException(STR); } if (!isCompatibleLayout(getShell().getLayout())) { throw new UnsupportedOperationException(STR); } fina...
/** * Constructs the tray's widgets and displays the tray in this dialog. The * dialog's size will be adjusted to accommodate the tray. * * @param tray the tray to show in this dialog * @throws IllegalStateException if the dialog already has a tray open * @throws UnsupportedOperationException if the dialog...
Constructs the tray's widgets and displays the tray in this dialog. The dialog's size will be adjusted to accommodate the tray
openTray
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/jface/dialogs/TrayDialog.java", "license": "epl-1.0", "size": 16713 }
[ "org.eclipse.swt.widgets.Control", "org.eclipse.swt.widgets.Shell" ]
import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,277,846
public static JSONArray getUniversalsJSON(Dashboard dashboard) { try { Universal root = Universal.getRoot(); List<ValueObject> countries = dashboard.getCountries(); DashboardMap map = dashboard.getMap(); JSONArray array = new JSONArray(); Map<String, JSONObject> options = new...
static JSONArray function(Dashboard dashboard) { try { Universal root = Universal.getRoot(); List<ValueObject> countries = dashboard.getCountries(); DashboardMap map = dashboard.getMap(); JSONArray array = new JSONArray(); Map<String, JSONObject> options = new LinkedHashMap<String, JSONObject>(); for (ValueObject count...
/** * Returns the reference layer options. * * @return */
Returns the reference layer options
getUniversalsJSON
{ "repo_name": "terraframe/geodashboard", "path": "geoprism-server/src/main/java-gen/stub/net/geoprism/dashboard/layer/DashboardReferenceLayer.java", "license": "gpl-3.0", "size": 10101 }
[ "com.runwaysdk.business.ontology.Term", "com.runwaysdk.dataaccess.ProgrammingErrorException", "com.runwaysdk.dataaccess.ValueObject", "com.runwaysdk.system.gis.geo.AllowedIn", "com.runwaysdk.system.gis.geo.Universal", "java.util.LinkedHashMap", "java.util.List", "java.util.Map", "net.geoprism.dashbo...
import com.runwaysdk.business.ontology.Term; import com.runwaysdk.dataaccess.ProgrammingErrorException; import com.runwaysdk.dataaccess.ValueObject; import com.runwaysdk.system.gis.geo.AllowedIn; import com.runwaysdk.system.gis.geo.Universal; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; ...
import com.runwaysdk.business.ontology.*; import com.runwaysdk.dataaccess.*; import com.runwaysdk.system.gis.geo.*; import java.util.*; import net.geoprism.dashboard.*; import org.json.*;
[ "com.runwaysdk.business", "com.runwaysdk.dataaccess", "com.runwaysdk.system", "java.util", "net.geoprism.dashboard", "org.json" ]
com.runwaysdk.business; com.runwaysdk.dataaccess; com.runwaysdk.system; java.util; net.geoprism.dashboard; org.json;
2,555,150
public List<MicrosoftGraphCalendar> calendars() { return this.calendars; }
List<MicrosoftGraphCalendar> function() { return this.calendars; }
/** * Get the calendars property: The calendars in the calendar group. Navigation property. Read-only. Nullable. * * @return the calendars value. */
Get the calendars property: The calendars in the calendar group. Navigation property. Read-only. Nullable
calendars
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/MicrosoftGraphCalendarGroup.java", "license": "mit", "size": 5573 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,973,106
BareJID nodeJID = BareJID.bareJIDInstanceNS(null, node); // connectedNodes must be synchronized here. If it is executed concurrently, // then most likely only one connected node will endup in the collection synchronized (connectedNodes) { if (!connectedNodes.contains(nodeJID)) { connectedNodes.add(nodeJ...
BareJID nodeJID = BareJID.bareJIDInstanceNS(null, node); synchronized (connectedNodes) { if (!connectedNodes.contains(nodeJID)) { connectedNodes.add(nodeJID); BareJID[] arr_list = connectedNodes.toArray(new BareJID[connectedNodes.size()]); Arrays.sort(arr_list); connectedNodes = new CopyOnWriteArrayList<BareJID>(arr_li...
/** * Method description * * * @param node */
Method description
nodeConnected
{ "repo_name": "zooldk/tigase-server", "path": "src/main/java/tigase/cluster/BoshConnectionClustered.java", "license": "agpl-3.0", "size": 3572 }
[ "java.util.Arrays", "java.util.concurrent.CopyOnWriteArrayList" ]
import java.util.Arrays; import java.util.concurrent.CopyOnWriteArrayList;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,092,556
private byte[] getBytes(InputStream in) throws IOException { ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); byte[] temp = new byte[1024]; int count = in.read(temp); while (count > 0) { byteOut.write(temp, 0, count); count = in.read(temp); } in.close(); byteOut.close(); return byte...
byte[] function(InputStream in) throws IOException { ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); byte[] temp = new byte[1024]; int count = in.read(temp); while (count > 0) { byteOut.write(temp, 0, count); count = in.read(temp); } in.close(); byteOut.close(); return byteOut.toByteArray(); }
/** * Reads the given InputStream to the end and stores the bytes read in a * byte array. * * @param in * The InputStream to read the bytes from * @return The byte array containing the bytes from the InputStream * @throws IOException * In case an error occurs during reading */
Reads the given InputStream to the end and stores the bytes read in a byte array
getBytes
{ "repo_name": "tectronics/xenogeddon", "path": "src/com/jmex/model/converters/DTDResolver.java", "license": "gpl-2.0", "size": 5319 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
993,903
private List<SemanticError> check(DataType dataType) { logger.finer("Checking semantic constraints on datatype " + dataType.name); final List<SemanticError> errors = new ArrayList<SemanticError>(); final Set<String> constructorNames = new HashSet<String>(); for(Constructor cons...
List<SemanticError> function(DataType dataType) { logger.finer(STR + dataType.name); final List<SemanticError> errors = new ArrayList<SemanticError>(); final Set<String> constructorNames = new HashSet<String>(); for(Constructor constructor : dataType.constructors) { logger.finest(STR + constructor.name + STR + dataType...
/** * Checks a data type for duplicate constructor names or constructors having the same name * as the data type * * @param dataType DataType to check * @return Set<SemanticError> with the problems or empty set if there are none */
Checks a data type for duplicate constructor names or constructors having the same name as the data type
check
{ "repo_name": "JamesIry/jADT", "path": "jADT-core/src/main/java/com/pogofish/jadt/checker/StandardChecker.java", "license": "apache-2.0", "size": 5726 }
[ "com.pogofish.jadt.ast.Constructor", "com.pogofish.jadt.ast.DataType", "com.pogofish.jadt.errors.SemanticError", "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import com.pogofish.jadt.ast.Constructor; import com.pogofish.jadt.ast.DataType; import com.pogofish.jadt.errors.SemanticError; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set;
import com.pogofish.jadt.ast.*; import com.pogofish.jadt.errors.*; import java.util.*;
[ "com.pogofish.jadt", "java.util" ]
com.pogofish.jadt; java.util;
2,460,272
public String generateItemsAndGroups() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException { groups = new StringBuilder(); items = new StringBuilder(); rooms = new LinkedHashMap<String, LinkedList<SiteItem>>(); ligh...
String function() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException { groups = new StringBuilder(); items = new StringBuilder(); rooms = new LinkedHashMap<String, LinkedList<SiteItem>>(); lights = new LinkedList<SiteItem>(); thermos = new LinkedList<SiteItem>()...
/** * This generates a item and sitemap configuration. * * @return * @throws IOException * @throws OmniNotConnectedException * @throws OmniInvalidResponseException * @throws OmniUnknownMessageTypeException */
This generates a item and sitemap configuration
generateItemsAndGroups
{ "repo_name": "openhab/openhab", "path": "bundles/binding/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/ui/OmnilinkItemGenerator.java", "license": "epl-1.0", "size": 34783 }
[ "com.digitaldan.jomnilinkII.OmniInvalidResponseException", "com.digitaldan.jomnilinkII.OmniNotConnectedException", "com.digitaldan.jomnilinkII.OmniUnknownMessageTypeException", "java.io.IOException", "java.util.ArrayList", "java.util.LinkedHashMap", "java.util.LinkedList" ]
import com.digitaldan.jomnilinkII.OmniInvalidResponseException; import com.digitaldan.jomnilinkII.OmniNotConnectedException; import com.digitaldan.jomnilinkII.OmniUnknownMessageTypeException; import java.io.IOException; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.LinkedList;
import com.digitaldan.*; import java.io.*; import java.util.*;
[ "com.digitaldan", "java.io", "java.util" ]
com.digitaldan; java.io; java.util;
2,257,743
public PublicIPAddressInner withPublicIPAllocationMethod(IPAllocationMethod publicIPAllocationMethod) { this.publicIPAllocationMethod = publicIPAllocationMethod; return this; }
PublicIPAddressInner function(IPAllocationMethod publicIPAllocationMethod) { this.publicIPAllocationMethod = publicIPAllocationMethod; return this; }
/** * Set the publicIPAllocationMethod value. * * @param publicIPAllocationMethod the publicIPAllocationMethod value to set * @return the PublicIPAddressInner object itself. */
Set the publicIPAllocationMethod value
withPublicIPAllocationMethod
{ "repo_name": "herveyw/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressInner.java", "license": "mit", "size": 6853 }
[ "com.microsoft.azure.management.network.IPAllocationMethod" ]
import com.microsoft.azure.management.network.IPAllocationMethod;
import com.microsoft.azure.management.network.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,775,048
@MXBeanDescription("Local TCP port range.") public int getLocalPortRange();
@MXBeanDescription(STR) int function();
/** * Gets local TCP port range. * * @return Local port range. */
Gets local TCP port range
getLocalPortRange
{ "repo_name": "ilantukh/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java", "license": "apache-2.0", "size": 8612 }
[ "org.apache.ignite.mxbean.MXBeanDescription" ]
import org.apache.ignite.mxbean.MXBeanDescription;
import org.apache.ignite.mxbean.*;
[ "org.apache.ignite" ]
org.apache.ignite;
443,059
private static boolean isTypeDerivation(StructureElement struct) { return struct.children().size() == 0 && !struct.hasName() && !struct.hasProperty() && !struct.isOptional() && (struct.getDeclaredType() != null || struct.getEffectiveMapping() != null); }
static boolean function(StructureElement struct) { return struct.children().size() == 0 && !struct.hasName() && !struct.hasProperty() && !struct.isOptional() && (struct.getDeclaredType() != null struct.getEffectiveMapping() != null); }
/** * Check if a &lt;structure> element represents a type derivation. If the element is empty, has no name or property, * is required, and is a mapping reference, then it can be handled as a type derivation. * * @param struct * @return <code>true</code> if a type derivation, <code>false</code>...
Check if a &lt;structure> element represents a type derivation. If the element is empty, has no name or property, is required, and is a mapping reference, then it can be handled as a type derivation
isTypeDerivation
{ "repo_name": "vkorbut/jibx", "path": "jibx/build/src/org/jibx/schema/generator/DetailDirectory.java", "license": "bsd-3-clause", "size": 21006 }
[ "org.jibx.binding.model.StructureElement" ]
import org.jibx.binding.model.StructureElement;
import org.jibx.binding.model.*;
[ "org.jibx.binding" ]
org.jibx.binding;
1,413,450
public void test(TestHarness harness) { // create instance of a class Double Object o = new Integer(42); // get a runtime class of an object "o" Class c = o.getClass(); harness.check(c.getSimpleName(), "Integer"); }
void function(TestHarness harness) { Object o = new Integer(42); Class c = o.getClass(); harness.check(c.getSimpleName(), STR); }
/** * Runs the test using the specified harness. * * @param harness the test harness (<code>null</code> not permitted). */
Runs the test using the specified harness
test
{ "repo_name": "niloc132/mauve-gwt", "path": "src/main/java/gnu/testlet/java/lang/Integer/classInfo/getSimpleName.java", "license": "gpl-2.0", "size": 1544 }
[ "gnu.testlet.TestHarness", "java.lang.Integer" ]
import gnu.testlet.TestHarness; import java.lang.Integer;
import gnu.testlet.*; import java.lang.*;
[ "gnu.testlet", "java.lang" ]
gnu.testlet; java.lang;
386,058
public synchronized void getCookie() { if (phoneUtils.isTestingServer(phoneUtils.getServerUrl())) { Logger.i("Setting fakeAuthCookie"); authCookie = getFakeAuthCookie(); return; } if (this.accountSelector == null) { accountSelector = new AccountSelector(context); } try...
synchronized void function() { if (phoneUtils.isTestingServer(phoneUtils.getServerUrl())) { Logger.i(STR); authCookie = getFakeAuthCookie(); return; } if (this.accountSelector == null) { accountSelector = new AccountSelector(context); } try { if (accountSelector.getCheckinFuture() == null) { accountSelector.authenticat...
/** * Initiates the process to get the authentication cookie for the user account. * Returns immediately. */
Initiates the process to get the authentication cookie for the user account. Returns immediately
getCookie
{ "repo_name": "laoyaosniper/Mobilyzer", "path": "Mobilyzer/src/com/mobilyzer/Checkin.java", "license": "apache-2.0", "size": 15252 }
[ "android.accounts.AuthenticatorException", "android.accounts.OperationCanceledException", "com.mobilyzer.util.Logger", "java.io.IOException" ]
import android.accounts.AuthenticatorException; import android.accounts.OperationCanceledException; import com.mobilyzer.util.Logger; import java.io.IOException;
import android.accounts.*; import com.mobilyzer.util.*; import java.io.*;
[ "android.accounts", "com.mobilyzer.util", "java.io" ]
android.accounts; com.mobilyzer.util; java.io;
2,800,568
public void resetEntitySkin(LivingEntity target) { SpoutManager.getPlayerManager().getGlobalInfo().setEntitySkin(target, null); ArrayList<LivingEntity> entities = new ArrayList<LivingEntity>(1); entities.add(target); for (SpoutPlayer player : getOnlinePlayers()) { player.updateEntitySkins(entities); } ...
void function(LivingEntity target) { SpoutManager.getPlayerManager().getGlobalInfo().setEntitySkin(target, null); ArrayList<LivingEntity> entities = new ArrayList<LivingEntity>(1); entities.add(target); for (SpoutPlayer player : getOnlinePlayers()) { player.updateEntitySkins(entities); } }
/** * Resets the entity skin for the target entity. * * @param target to reset the skin for */
Resets the entity skin for the target entity
resetEntitySkin
{ "repo_name": "Sleaker/SpoutPluginAPI", "path": "src/org/getspout/spoutapi/SpoutServer.java", "license": "lgpl-3.0", "size": 11361 }
[ "java.util.ArrayList", "org.bukkit.entity.LivingEntity", "org.getspout.spoutapi.player.SpoutPlayer" ]
import java.util.ArrayList; import org.bukkit.entity.LivingEntity; import org.getspout.spoutapi.player.SpoutPlayer;
import java.util.*; import org.bukkit.entity.*; import org.getspout.spoutapi.player.*;
[ "java.util", "org.bukkit.entity", "org.getspout.spoutapi" ]
java.util; org.bukkit.entity; org.getspout.spoutapi;
2,434,922
public byte setSleepTime(byte seconds) throws IOException { byte[] request = {SYSTEM_COMMAND_REPLY, NXJ_SET_SLEEP_TIME, seconds}; byte [] reply = nxtComm.sendRequest(request, 3); return reply[2]; }
byte function(byte seconds) throws IOException { byte[] request = {SYSTEM_COMMAND_REPLY, NXJ_SET_SLEEP_TIME, seconds}; byte [] reply = nxtComm.sendRequest(request, 3); return reply[2]; }
/** * leJOS-specific command to the the sleep time for the menu * @param seconds the number of seconds before shutdown * @return the status (0 = success) * @throws IOException */
leJOS-specific command to the the sleep time for the menu
setSleepTime
{ "repo_name": "SnakeSVx/ev3", "path": "Lejos/src/main/java/lejos/remote/nxt/NXTCommand.java", "license": "gpl-3.0", "size": 34231 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,157,471
default boolean isNonNegativeResult() { return AbstractAssumptions.assumeNonNegative(this); }
default boolean isNonNegativeResult() { return AbstractAssumptions.assumeNonNegative(this); }
/** * Test if this expression has a non-negative result (i.e. greater equal 0) or is assumed to be * non-negative. * * @return <code>true</code>, if the given expression is a non-negative function or value. * @see #isRealResult() */
Test if this expression has a non-negative result (i.e. greater equal 0) or is assumed to be non-negative
isNonNegativeResult
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/interfaces/IExpr.java", "license": "gpl-3.0", "size": 152649 }
[ "org.matheclipse.core.eval.util.AbstractAssumptions" ]
import org.matheclipse.core.eval.util.AbstractAssumptions;
import org.matheclipse.core.eval.util.*;
[ "org.matheclipse.core" ]
org.matheclipse.core;
72,101
@Test(timeout = 60000) public void testDetachedPerJobYarnCluster() throws Exception { runTest(() -> { LOG.info("Starting testDetachedPerJobYarnCluster()"); File exampleJarLocation = getTestJarPath("BatchWordCount.jar"); testDetachedPerJobYarnClusterInternal(exampleJarLocation.getAbsolutePath()); LO...
@Test(timeout = 60000) void function() throws Exception { runTest(() -> { LOG.info(STR); File exampleJarLocation = getTestJarPath(STR); testDetachedPerJobYarnClusterInternal(exampleJarLocation.getAbsolutePath()); LOG.info(STR); }); }
/** * Test a fire-and-forget job submission to a YARN cluster. */
Test a fire-and-forget job submission to a YARN cluster
testDetachedPerJobYarnCluster
{ "repo_name": "mbode/flink", "path": "flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java", "license": "apache-2.0", "size": 26677 }
[ "java.io.File", "org.apache.flink.yarn.util.YarnTestUtils", "org.junit.Test" ]
import java.io.File; import org.apache.flink.yarn.util.YarnTestUtils; import org.junit.Test;
import java.io.*; import org.apache.flink.yarn.util.*; import org.junit.*;
[ "java.io", "org.apache.flink", "org.junit" ]
java.io; org.apache.flink; org.junit;
2,686,084
public void setFile(File file) { this.file = file; }
void function(File file) { this.file = file; }
/** * Sets the file. * * @param file The file to set */
Sets the file
setFile
{ "repo_name": "christophd/citrus", "path": "core/citrus-base/src/main/java/com/consol/citrus/condition/FileCondition.java", "license": "apache-2.0", "size": 3304 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
243,631
public ListenableFuture<ApiResponse<Success>> removeAccounts(int orgId, List<Integer> accountIds);
ListenableFuture<ApiResponse<Success>> function(int orgId, List<Integer> accountIds);
/** * Remove a list of accounts from an org. * * @param orgId * the org to remove accounts for * @param accountIds * the list of account ids to remove * @return a future to the response */
Remove a list of accounts from an org
removeAccounts
{ "repo_name": "orgsync/orgsync-api-java", "path": "src/main/java/com/orgsync/api/OrgsResource.java", "license": "apache-2.0", "size": 3172 }
[ "com.ning.http.client.ListenableFuture", "com.orgsync.api.model.Success", "java.util.List" ]
import com.ning.http.client.ListenableFuture; import com.orgsync.api.model.Success; import java.util.List;
import com.ning.http.client.*; import com.orgsync.api.model.*; import java.util.*;
[ "com.ning.http", "com.orgsync.api", "java.util" ]
com.ning.http; com.orgsync.api; java.util;
2,042,805
public List<TTemplatePerson> getTTemplatePersons(Connection con) throws TorqueException { if (collTTemplatePersons == null) { collTTemplatePersons = getTTemplatePersons(new Criteria(10), con); } return collTTemplatePersons; }
List<TTemplatePerson> function(Connection con) throws TorqueException { if (collTTemplatePersons == null) { collTTemplatePersons = getTTemplatePersons(new Criteria(10), con); } return collTTemplatePersons; }
/** * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * getTTemplatePersons(new Criteria(),Connection) * This method takes in the Connection also as input so that * referenced objects can also be obtained using a Connection * that...
If this collection has already been initialized, returns the collection. Otherwise returns the results of getTTemplatePersons(new Criteria(),Connection) This method takes in the Connection also as input so that referenced objects can also be obtained using a Connection that is taken as input
getTTemplatePersons
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTPerson.java", "license": "gpl-3.0", "size": 1013508 }
[ "java.sql.Connection", "java.util.List", "org.apache.torque.TorqueException", "org.apache.torque.util.Criteria" ]
import java.sql.Connection; import java.util.List; import org.apache.torque.TorqueException; import org.apache.torque.util.Criteria;
import java.sql.*; import java.util.*; import org.apache.torque.*; import org.apache.torque.util.*;
[ "java.sql", "java.util", "org.apache.torque" ]
java.sql; java.util; org.apache.torque;
1,206,980
public final void setPersistenceService(PersistenceService persistenceService) { this.persistenceService = persistenceService; }
final void function(PersistenceService persistenceService) { this.persistenceService = persistenceService; }
/** * Sets the persistenceService attribute value. * * @param persistenceService The persistenceService to set. */
Sets the persistenceService attribute value
setPersistenceService
{ "repo_name": "mztaylor/rice-git", "path": "rice-middleware/kns/src/main/java/org/kuali/rice/krad/service/impl/BusinessObjectServiceImpl.java", "license": "apache-2.0", "size": 21777 }
[ "org.kuali.rice.krad.service.PersistenceService" ]
import org.kuali.rice.krad.service.PersistenceService;
import org.kuali.rice.krad.service.*;
[ "org.kuali.rice" ]
org.kuali.rice;
925,094
protected String getEntityDescription(String prefix, String descriptionkey, Locale locale) { String value = null; if (locale == null) { locale = entityProperties.getLocale(); } // get from EP first if possible DescribeDefineable describer = entityProviderManager.g...
String function(String prefix, String descriptionkey, Locale locale) { String value = null; if (locale == null) { locale = entityProperties.getLocale(); } DescribeDefineable describer = entityProviderManager.getProviderByPrefixAndCapability(prefix, DescribeDefineable.class); if (describer != null) { value = describer.g...
/** * Get the descriptions for an entity OR its capabilities OR custom actions * @param prefix an entity prefix * @param descriptionkey (optional) the key (simplename for capability, action.actionkey for actions) * @param locale the Locale to use for translations * @return the description (may ...
Get the descriptions for an entity OR its capabilities OR custom actions
getEntityDescription
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "entitybroker/rest/src/java/org/sakaiproject/entitybroker/rest/EntityDescriptionManager.java", "license": "apache-2.0", "size": 62576 }
[ "java.util.Locale", "org.sakaiproject.entitybroker.entityprovider.capabilities.DescribeDefineable" ]
import java.util.Locale; import org.sakaiproject.entitybroker.entityprovider.capabilities.DescribeDefineable;
import java.util.*; import org.sakaiproject.entitybroker.entityprovider.capabilities.*;
[ "java.util", "org.sakaiproject.entitybroker" ]
java.util; org.sakaiproject.entitybroker;
1,337,337
public Object remove(Object key, Object item) { Collection valuesForKey = getCollection(key); if (valuesForKey == null) { return null; } boolean removed = valuesForKey.remove(item); if (removed == false) { return null; } // rem...
Object function(Object key, Object item) { Collection valuesForKey = getCollection(key); if (valuesForKey == null) { return null; } boolean removed = valuesForKey.remove(item); if (removed == false) { return null; } if (valuesForKey.isEmpty()){ remove(key); } return item; }
/** * Removes a specific value from map. * <p> * The item is removed from the collection mapped to the specified key. * Other values attached to that key are unaffected. * <p> * If the last value for a key is removed, <code>null</code> will be returned * from a subsequant <code...
Removes a specific value from map. The item is removed from the collection mapped to the specified key. Other values attached to that key are unaffected. If the last value for a key is removed, <code>null</code> will be returned from a subsequant <code>get(key)</code>
remove
{ "repo_name": "leodmurillo/sonar", "path": "plugins/sonar-squid-java-plugin/test-resources/commons-collections-3.2.1/src/org/apache/commons/collections/MultiHashMap.java", "license": "lgpl-3.0", "size": 16519 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,302,770
if(Is.empty(bytes)) return; try { os.write(bytes); os.flush(); } catch(Exception e) { throw new IllegalArgumentException("Unable to transfer bytes", e); } }
if(Is.empty(bytes)) return; try { os.write(bytes); os.flush(); } catch(Exception e) { throw new IllegalArgumentException(STR, e); } }
/** * Transfers bytes to stream * @param bytes - bytes to be transfered * @param os - stream to be filled */
Transfers bytes to stream
toStream
{ "repo_name": "antonsjava/jaul", "path": "src/main/java/sk/antons/jaul/binary/Bytes.java", "license": "apache-2.0", "size": 3297 }
[ "sk.antons.jaul.Is" ]
import sk.antons.jaul.Is;
import sk.antons.jaul.*;
[ "sk.antons.jaul" ]
sk.antons.jaul;
1,417,525
public static final List<String> getKeys() { return Statics.getKeys(Direction.values()); }
static final List<String> function() { return Statics.getKeys(Direction.values()); }
/** * Return list of enum keys. * * @return */
Return list of enum keys
getKeys
{ "repo_name": "psiroky/dashbuilder", "path": "dashbuilder-client/dashbuilder-lienzo/dashbuilder-lienzo-core/src/main/java/com/ait/lienzo/shared/core/types/Direction.java", "license": "apache-2.0", "size": 1986 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,432,804
void majorCompactRegion(final byte[] regionName, final byte[] columnFamily) throws IOException;
void majorCompactRegion(final byte[] regionName, final byte[] columnFamily) throws IOException;
/** * Major compact a column family within region. Asynchronous operation. * * @param regionName egion to major compact * @param columnFamily column family within a region * @throws IOException if a remote or network exception occurs */
Major compact a column family within region. Asynchronous operation
majorCompactRegion
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 97415 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
90,707
public void selectAllChannels(boolean selection) { String cm = model.getColorModel(); if (ImViewer.GREY_SCALE_MODEL.equals(cm)) return; for (int i = 0; i < model.getMaxC(); i++) { model.setChannelActive(i, selection); firePropertyChange(CHANNEL_ACTIVE_PROPERTY, Integer.valueOf(i-1), Integer.valueO...
void function(boolean selection) { String cm = model.getColorModel(); if (ImViewer.GREY_SCALE_MODEL.equals(cm)) return; for (int i = 0; i < model.getMaxC(); i++) { model.setChannelActive(i, selection); firePropertyChange(CHANNEL_ACTIVE_PROPERTY, Integer.valueOf(i-1), Integer.valueOf(i)); model.setSelectedChannel(i); } ...
/** * Implemented as specified by the {@link ImViewer} interface. * @see ImViewer#selectAllChannels(boolean) */
Implemented as specified by the <code>ImViewer</code> interface
selectAllChannels
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java", "license": "gpl-2.0", "size": 99058 }
[ "org.openmicroscopy.shoola.agents.events.iviewer.ChannelSelection" ]
import org.openmicroscopy.shoola.agents.events.iviewer.ChannelSelection;
import org.openmicroscopy.shoola.agents.events.iviewer.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
2,913,038
public void removeListener(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); }
void function(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); }
/** * This removes a listener. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This removes a listener.
removeListener
{ "repo_name": "kopl/SPLevo", "path": "VPM/org.splevo.vpm.edit/src-gen/org/splevo/vpm/software/provider/SoftwareItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 8382 }
[ "org.eclipse.emf.edit.provider.INotifyChangedListener" ]
import org.eclipse.emf.edit.provider.INotifyChangedListener;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,159,646
@JsonProperty("mac_address") public void setMacAddress( List<String> macAddress ) { this.macAddress = macAddress; }
@JsonProperty(STR) public void setMacAddress( List<String> macAddress ) { this.macAddress = macAddress; }
/** * Gets mac address. * * @return the mac address */
Gets mac address
getMacAddress
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/assetImport/models/AssetImport.java", "license": "mit", "size": 9399 }
[ "com.fasterxml.jackson.annotation.JsonProperty", "java.util.List" ]
import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List;
import com.fasterxml.jackson.annotation.*; import java.util.*;
[ "com.fasterxml.jackson", "java.util" ]
com.fasterxml.jackson; java.util;
705,885
public BigDecimal getActualQty(); public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
BigDecimal function(); public static final String COLUMNNAME_AD_Client_ID = STR;
/** Get Actual Quantity. * The actual quantity */
Get Actual Quantity. The actual quantity
getActualQty
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_C_CommissionDetail.java", "license": "gpl-2.0", "size": 7040 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
625,396
@Message(id = 78, value = "The scoped role '%s' can not be removed as a role mapping still exists.") OperationFailedException roleMappingRemaining(String roleName);
@Message(id = 78, value = STR) OperationFailedException roleMappingRemaining(String roleName);
/** * Error message if the name of a scoped role can not be removed as the role mapping remains. * * @param roleName - The name of the role. * * @return an {@link OperationFailedException} for the error. */
Error message if the name of a scoped role can not be removed as the role mapping remains
roleMappingRemaining
{ "repo_name": "aloubyansky/wildfly-core", "path": "domain-management/src/main/java/org/jboss/as/domain/management/logging/DomainManagementLogger.java", "license": "lgpl-2.1", "size": 66389 }
[ "org.jboss.as.controller.OperationFailedException", "org.jboss.logging.annotations.Message" ]
import org.jboss.as.controller.OperationFailedException; import org.jboss.logging.annotations.Message;
import org.jboss.as.controller.*; import org.jboss.logging.annotations.*;
[ "org.jboss.as", "org.jboss.logging" ]
org.jboss.as; org.jboss.logging;
1,817,678
private List<Double> roulettePercent() { int i, sum = 0, tempSum = 0; double tempPercent; // calculate the sum of twu value of each 1-HTWUIs for (i = 0; i < twuPattern.size(); i++) { sum = sum + mapItemToTWU.get(twuPattern.get(i)); } // calculate the portation of twu value of each item in sum...
List<Double> function() { int i, sum = 0, tempSum = 0; double tempPercent; for (i = 0; i < twuPattern.size(); i++) { sum = sum + mapItemToTWU.get(twuPattern.get(i)); } for (i = 0; i < twuPattern.size(); i++) { tempSum = tempSum + mapItemToTWU.get(twuPattern.get(i)); tempPercent = tempSum / (sum + 0.0); percentage.add(t...
/** * Method to initial percentage * * @return percentage */
Method to initial percentage
roulettePercent
{ "repo_name": "qualitified/qualitified-crm", "path": "qualitified-crm-core/src/main/java/ca/pfv/spmf/algorithms/frequentpatterns/HUIM_GA_tree/AlgoHUIM_GA_tree.java", "license": "gpl-3.0", "size": 24758 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,231,885
protected String evaluateAndReplaceExpressionValues(String row, int index, Object model, Map<String, Object> expandedContext, Pattern expressionPattern, ExpressionEvaluator expressionEvaluator) { Matcher matcher = expressionPattern.matcher(row); while (matcher.find()) { ...
String function(String row, int index, Object model, Map<String, Object> expandedContext, Pattern expressionPattern, ExpressionEvaluator expressionEvaluator) { Matcher matcher = expressionPattern.matcher(row); while (matcher.find()) { String matchingGroup = matcher.group(1); String expression = expressionConversionMap....
/** * Evaluate expressions and replace content found by the expressionPattern in the row * * @param row the row being modified * @param index the line index * @param model the model * @param expandedContext the context to evaluate expressions against * @param expressionPattern ...
Evaluate expressions and replace content found by the expressionPattern in the row
evaluateAndReplaceExpressionValues
{ "repo_name": "bhutchinson/rice", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/container/LightTable.java", "license": "apache-2.0", "size": 31503 }
[ "java.util.Map", "java.util.regex.Matcher", "java.util.regex.Pattern", "org.kuali.rice.krad.uif.UifConstants", "org.kuali.rice.krad.uif.view.ExpressionEvaluator" ]
import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.kuali.rice.krad.uif.UifConstants; import org.kuali.rice.krad.uif.view.ExpressionEvaluator;
import java.util.*; import java.util.regex.*; import org.kuali.rice.krad.uif.*; import org.kuali.rice.krad.uif.view.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
1,798,188
@Deprecated void trace(Marker marker, MessageSupplier msgSupplier);
void trace(Marker marker, MessageSupplier msgSupplier);
/** * Logs a message which is only to be constructed if the logging level is the {@link Level#TRACE TRACE} level with * the specified Marker. The {@code MessageSupplier} may or may not use the {@link MessageFactory} to construct the * {@code Message}. * * @param marker the marker data specific ...
Logs a message which is only to be constructed if the logging level is the <code>Level#TRACE TRACE</code> level with the specified Marker. The MessageSupplier may or may not use the <code>MessageFactory</code> to construct the Message
trace
{ "repo_name": "lburgazzoli/apache-logging-log4j2", "path": "log4j-api/src/main/java/org/apache/logging/log4j/Logger.java", "license": "apache-2.0", "size": 84950 }
[ "org.apache.logging.log4j.util.MessageSupplier" ]
import org.apache.logging.log4j.util.MessageSupplier;
import org.apache.logging.log4j.util.*;
[ "org.apache.logging" ]
org.apache.logging;
692,824
public APIResult updateClusterDependents(String clusterName, String colo, Boolean skipDryRun) { checkColo(colo); try { verifySuperUser(); Cluster cluster = EntityUtil.getEntity(EntityType.CLUSTER, clusterName); verifySafemodeOperation(cluster, EntityUtil.ENTITY_OP...
APIResult function(String clusterName, String colo, Boolean skipDryRun) { checkColo(colo); try { verifySuperUser(); Cluster cluster = EntityUtil.getEntity(EntityType.CLUSTER, clusterName); verifySafemodeOperation(cluster, EntityUtil.ENTITY_OPERATION.UPDATE_CLUSTER_DEPENDENTS); int clusterVersion = cluster.getVersion();...
/** * Updates scheduled dependent entities of a cluster. * * @param clusterName Name of cluster * @param colo colo * @param skipDryRun Skip dry run during update if set to true * @return APIResult */
Updates scheduled dependent entities of a cluster
updateClusterDependents
{ "repo_name": "InMobi/falcon", "path": "prism/src/main/java/org/apache/falcon/resource/AbstractEntityManager.java", "license": "apache-2.0", "size": 64241 }
[ "javax.ws.rs.core.Response", "org.apache.falcon.FalconWebException", "org.apache.falcon.Pair", "org.apache.falcon.entity.EntityUtil", "org.apache.falcon.entity.v0.Entity", "org.apache.falcon.entity.v0.EntityIntegrityChecker", "org.apache.falcon.entity.v0.EntityType", "org.apache.falcon.entity.v0.clust...
import javax.ws.rs.core.Response; import org.apache.falcon.FalconWebException; import org.apache.falcon.Pair; import org.apache.falcon.entity.EntityUtil; import org.apache.falcon.entity.v0.Entity; import org.apache.falcon.entity.v0.EntityIntegrityChecker; import org.apache.falcon.entity.v0.EntityType; import org.apache...
import javax.ws.rs.core.*; import org.apache.falcon.*; import org.apache.falcon.entity.*; import org.apache.falcon.entity.v0.*; import org.apache.falcon.entity.v0.cluster.*; import org.apache.falcon.entity.v0.feed.*; import org.apache.falcon.entity.v0.process.*; import org.apache.falcon.resource.*;
[ "javax.ws", "org.apache.falcon" ]
javax.ws; org.apache.falcon;
1,712,391
public Observable<ServiceResponse<Void>> purgeContentWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, List<String> contentPaths) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be...
Observable<ServiceResponse<Void>> function(String resourceGroupName, String profileName, String endpointName, List<String> contentPaths) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (profileName == null) { throw new IllegalArgumentException(STR); } if (endpointName == null) { throw n...
/** * Removes a content from CDN. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the CDN profile which is unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally....
Removes a content from CDN
purgeContentWithServiceResponseAsync
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-mgmt-cdn/src/main/java/com/microsoft/azure/management/cdn/implementation/EndpointsInner.java", "license": "mit", "size": 136317 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.azure.management.cdn.PurgeParameters", "com.microsoft.rest.ServiceResponse", "com.microsoft.rest.Validator", "java.util.List" ]
import com.google.common.reflect.TypeToken; import com.microsoft.azure.management.cdn.PurgeParameters; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.util.List;
import com.google.common.reflect.*; import com.microsoft.azure.management.cdn.*; import com.microsoft.rest.*; import java.util.*;
[ "com.google.common", "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.google.common; com.microsoft.azure; com.microsoft.rest; java.util;
1,333,820
Map<String, List<ColumnStatisticsObj>> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames) throws NoSuchObjectException, MetaException, TException;
Map<String, List<ColumnStatisticsObj>> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames) throws NoSuchObjectException, MetaException, TException;
/** * Get partitions column statistics given dbName, tableName, multiple partitions and colName-s * @return ColumnStatistics struct for a given db, table and columns */
Get partitions column statistics given dbName, tableName, multiple partitions and colName-s
getPartitionColumnStatistics
{ "repo_name": "scalingdata/Impala", "path": "thirdparty/hive-1.2.1.2.3.0.0-2557/src/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java", "license": "apache-2.0", "size": 55997 }
[ "java.util.List", "java.util.Map", "org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj", "org.apache.hadoop.hive.metastore.api.MetaException", "org.apache.hadoop.hive.metastore.api.NoSuchObjectException", "org.apache.thrift.TException" ]
import java.util.List; import java.util.Map; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.thrift.TException;
import java.util.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.thrift.*;
[ "java.util", "org.apache.hadoop", "org.apache.thrift" ]
java.util; org.apache.hadoop; org.apache.thrift;
530,917
public static Test suite() { TestSuite suite = new TestSuite(); suite.setName(TestAxis.class.getName()); suite.addTest(new TestAxis("testSetRangePolicyFixedViewPort")); suite.addTest(new TestAxis("testTransformPxToValue")); suite.addTest(new TestAxis("testTransformValueToPx")); return suite...
static Test function() { TestSuite suite = new TestSuite(); suite.setName(TestAxis.class.getName()); suite.addTest(new TestAxis(STR)); suite.addTest(new TestAxis(STR)); suite.addTest(new TestAxis(STR)); return suite; } public TestAxis(final String testname) { super(testname); }
/** * Test suite for this test class. * <p> * * @return the test suite */
Test suite for this test class.
suite
{ "repo_name": "cheshirekow/codebase", "path": "third_party/lcm/lcm-java/jchart2d-code/test/info/monitorenter/gui/chart/axis/TestAxis.java", "license": "gpl-3.0", "size": 6799 }
[ "junit.framework.Test", "junit.framework.TestSuite" ]
import junit.framework.Test; import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,989,323
public static boolean isValidDigitString(String str) { int c; int i = 0; UCharacterIterator it = UCharacterIterator.getInstance(str); it.setToStart(); while ( (c = it.nextCodePoint()) != UCharacterIterator.DONE) { if ( UCharacter.isSupplementary(c)) { // Digits ...
static boolean function(String str) { int c; int i = 0; UCharacterIterator it = UCharacterIterator.getInstance(str); it.setToStart(); while ( (c = it.nextCodePoint()) != UCharacterIterator.DONE) { if ( UCharacter.isSupplementary(c)) { return false; } i++; } if ( i != 10 ) { return false; } return true; }
/** * Convenience method to determine if a given digit string is valid for use as a * descriptor of a numeric ( non-algorithmic ) numbering system. In order for * a digit string to be valid, it must meet the following criteria: * 1. Digits must be in Unicode's basic multilingual plane. * @sta...
Convenience method to determine if a given digit string is valid for use as a descriptor of a numeric ( non-algorithmic ) numbering system. In order for a digit string to be valid, it must meet the following criteria: 1. Digits must be in Unicode's basic multilingual plane
isValidDigitString
{ "repo_name": "UweTrottmann/QuickDic-Dictionary", "path": "jars/icu4j-4_8_1_1/main/classes/core/src/com/ibm/icu/text/NumberingSystem.java", "license": "apache-2.0", "size": 11286 }
[ "com.ibm.icu.lang.UCharacter" ]
import com.ibm.icu.lang.UCharacter;
import com.ibm.icu.lang.*;
[ "com.ibm.icu" ]
com.ibm.icu;
1,586,387
EventQueue.invokeLater(new Runnable() {
EventQueue.invokeLater(new Runnable() {
/** * Launch the application. */
Launch the application
launch
{ "repo_name": "SubiRUN/WechatTestTool", "path": "src/org/outstudio/wxtest/ui/RawPostFrame.java", "license": "apache-2.0", "size": 3566 }
[ "java.awt.EventQueue" ]
import java.awt.EventQueue;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,352,948
public void clipPath(Path path) { throwNotImplemented(); }
void function(Path path) { throwNotImplemented(); }
/** * Sets the clip region to the given rectangle. Anything outside this * rectangle will not be drawn. Takes into account current clipping area set * on the graphics. * * @param path * the clip path * * @since 3.6 */
Sets the clip region to the given rectangle. Anything outside this rectangle will not be drawn. Takes into account current clipping area set on the graphics
clipPath
{ "repo_name": "archimatetool/archi", "path": "org.eclipse.draw2d/src/org/eclipse/draw2d/Graphics.java", "license": "mit", "size": 35062 }
[ "org.eclipse.swt.graphics.Path" ]
import org.eclipse.swt.graphics.Path;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
167,999
@EJB private ProductDAO productDAO; protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ArrayList<Product> list = productDAO.getAllProducts(); request.setAttribute("list", list); request.getReque...
@EJB ProductDAO productDAO; protected void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ArrayList<Product> list = productDAO.getAllProducts(); request.setAttribute("list", list); request.getRequestDispatcher(STR).forward(request, response); }
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "avoajaugochukwu/productCRUD", "path": "src/java/com/enigma/controller/AllProducts.java", "license": "mit", "size": 2663 }
[ "com.enigma.DAO", "com.enigma.model.Product", "java.io.IOException", "java.util.ArrayList", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import com.enigma.DAO; import com.enigma.model.Product; import java.io.IOException; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import com.enigma.*; import com.enigma.model.*; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*;
[ "com.enigma", "com.enigma.model", "java.io", "java.util", "javax.servlet" ]
com.enigma; com.enigma.model; java.io; java.util; javax.servlet;
770,338
private static int getLength(byte [] bytes, int offset) { return ROW_OFFSET + Bytes.toInt(bytes, offset) + Bytes.toInt(bytes, offset + Bytes.SIZEOF_INT); }
static int function(byte [] bytes, int offset) { return ROW_OFFSET + Bytes.toInt(bytes, offset) + Bytes.toInt(bytes, offset + Bytes.SIZEOF_INT); }
/** * Determines the total length of the KeyValue stored in the specified * byte array and offset. Includes all headers. * @param bytes byte array * @param offset offset to start of the KeyValue * @return length of entire KeyValue, in bytes */
Determines the total length of the KeyValue stored in the specified byte array and offset. Includes all headers
getLength
{ "repo_name": "JichengSong/hbase", "path": "src/main/java/org/apache/hadoop/hbase/KeyValue.java", "license": "apache-2.0", "size": 78013 }
[ "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,488,106
public void setTargetBytecode(String version) { if (CompilerConfiguration.PRE_JDK5.equals(version) || CompilerConfiguration.POST_JDK5.equals(version)) { this.targetBytecode = version; } }
void function(String version) { if (CompilerConfiguration.PRE_JDK5.equals(version) CompilerConfiguration.POST_JDK5.equals(version)) { this.targetBytecode = version; } }
/** * Sets the bytecode compatibility mode * * @param version the bytecode compatibility mode */
Sets the bytecode compatibility mode
setTargetBytecode
{ "repo_name": "OpenBEL/bel-nav", "path": "tools/groovy/src/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java", "license": "apache-2.0", "size": 44199 }
[ "org.codehaus.groovy.control.CompilerConfiguration" ]
import org.codehaus.groovy.control.CompilerConfiguration;
import org.codehaus.groovy.control.*;
[ "org.codehaus.groovy" ]
org.codehaus.groovy;
1,926,343
public ArrayList<AcmeHistoryEntry> getAcmeHistoryEntries(File file) { ArrayList<AcmeHistoryEntry> entries = new ArrayList<AcmeHistoryEntry>(); if (!file.exists()) { return entries; } try { BufferedReader br = new BufferedReader(new FileReader(file)); //Read the commented lines String lin...
ArrayList<AcmeHistoryEntry> function(File file) { ArrayList<AcmeHistoryEntry> entries = new ArrayList<AcmeHistoryEntry>(); if (!file.exists()) { return entries; } try { BufferedReader br = new BufferedReader(new FileReader(file)); String line; while ((line = br.readLine()) != null && !line.isEmpty() && line.startsWith(...
/** * Read the ACME history file and return all * AcmeHistoryEntries. * @param file The ACME file to pull directoryURIs from. * @return A list of AcmeHistoryEntries from the ACME file. */
Read the ACME history file and return all AcmeHistoryEntries
getAcmeHistoryEntries
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.acme/src/com/ibm/ws/security/acme/internal/AcmeHistory.java", "license": "epl-1.0", "size": 11978 }
[ "com.ibm.websphere.ras.Tr", "java.io.BufferedReader", "java.io.File", "java.io.FileReader", "java.util.ArrayList", "java.util.StringTokenizer" ]
import com.ibm.websphere.ras.Tr; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.util.ArrayList; import java.util.StringTokenizer;
import com.ibm.websphere.ras.*; import java.io.*; import java.util.*;
[ "com.ibm.websphere", "java.io", "java.util" ]
com.ibm.websphere; java.io; java.util;
320,755
public void serialize(DataOutput dataOutput) throws IOException { int firstLevelSize = containerArrays.size(); dataOutput.writeInt(Integer.reverseBytes(firstLevelSize)); for (int i = 0; i < firstLevelSize; i++) { Container[] containers = containerArrays.get(i); int secondLevelSize = containers...
void function(DataOutput dataOutput) throws IOException { int firstLevelSize = containerArrays.size(); dataOutput.writeInt(Integer.reverseBytes(firstLevelSize)); for (int i = 0; i < firstLevelSize; i++) { Container[] containers = containerArrays.get(i); int secondLevelSize = containers.length; dataOutput.writeByte(NOT_...
/** * Serialize the Containers * * @param dataOutput The destination DataOutput * @throws IOException Signals that an I/O exception has occurred. */
Serialize the Containers
serialize
{ "repo_name": "RoaringBitmap/RoaringBitmap", "path": "RoaringBitmap/src/main/java/org/roaringbitmap/art/Containers.java", "license": "apache-2.0", "size": 14259 }
[ "java.io.DataOutput", "java.io.IOException", "org.roaringbitmap.Container" ]
import java.io.DataOutput; import java.io.IOException; import org.roaringbitmap.Container;
import java.io.*; import org.roaringbitmap.*;
[ "java.io", "org.roaringbitmap" ]
java.io; org.roaringbitmap;
2,123,269
public DateTime created() { return this.created; }
DateTime function() { return this.created; }
/** * Get the exact time the StreamingEndpoint was created. * * @return the created value */
Get the exact time the StreamingEndpoint was created
created
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "mediaservices/resource-manager/v2018_30_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_30_30_preview/implementation/StreamingEndpointInner.java", "license": "mit", "size": 10280 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,341,406
Format getFormat(String name, String arguments, Locale locale);
Format getFormat(String name, String arguments, Locale locale);
/** * Create or retrieve a format instance. * * @param name The format type name * @param arguments Arguments used to create the format instance. This allows the * <code>FormatFactory</code> to implement the "format style" * concept from <code>java.text.Me...
Create or retrieve a format instance
getFormat
{ "repo_name": "wspeirs/sop4j-base", "path": "src/main/java/com/sop4j/base/apache/lang3/text/FormatFactory.java", "license": "apache-2.0", "size": 1555 }
[ "java.text.Format", "java.util.Locale" ]
import java.text.Format; import java.util.Locale;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,338,681
CompletableFuture<Map.Entry<String, Versioned<V>>> floorEntry(String key);
CompletableFuture<Map.Entry<String, Versioned<V>>> floorEntry(String key);
/** * Returns the entry associated with the greatest key less than or equal * to key. * * @param key the key * @return the entry or null if no suitable key exists */
Returns the entry associated with the greatest key less than or equal to key
floorEntry
{ "repo_name": "Shashikanth-Huawei/bmp", "path": "core/api/src/main/java/org/onosproject/store/service/AsyncConsistentTreeMap.java", "license": "apache-2.0", "size": 5678 }
[ "java.util.Map", "java.util.concurrent.CompletableFuture" ]
import java.util.Map; import java.util.concurrent.CompletableFuture;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
985,056
private void setHistoryOrigins(Predicate<Relatable> pHistory) { try { Collection<Entity> rOrigins = EntityManager.getDistinct(HistoryRecord.ORIGIN, new QueryPredicate<>(HistoryRecord.class, pHistory)); aHistoryOrigins.clear(); for (Entity rOrigin : rOrigins) { ...
void function(Predicate<Relatable> pHistory) { try { Collection<Entity> rOrigins = EntityManager.getDistinct(HistoryRecord.ORIGIN, new QueryPredicate<>(HistoryRecord.class, pHistory)); aHistoryOrigins.clear(); for (Entity rOrigin : rOrigins) { if (rOrigin != null) { aHistoryOrigins.put(EntityFunctions.format(rOrigin), ...
/*************************************** * Sets the selectable distinct history origins from a history query. * * @param pHistory The history filter predicate */
Sets the selectable distinct history origins from a history query
setHistoryOrigins
{ "repo_name": "esoco/esoco-business", "path": "src/main/java/de/esoco/process/step/entity/DisplayEntityHistory.java", "license": "apache-2.0", "size": 29989 }
[ "de.esoco.entity.Entity", "de.esoco.entity.EntityFunctions", "de.esoco.entity.EntityManager", "de.esoco.history.HistoryRecord", "de.esoco.lib.event.EditListener", "de.esoco.lib.expression.Predicate", "de.esoco.lib.property.Updatable", "de.esoco.process.step.EditText", "de.esoco.process.step.Interact...
import de.esoco.entity.Entity; import de.esoco.entity.EntityFunctions; import de.esoco.entity.EntityManager; import de.esoco.history.HistoryRecord; import de.esoco.lib.event.EditListener; import de.esoco.lib.expression.Predicate; import de.esoco.lib.property.Updatable; import de.esoco.process.step.EditText; import de.e...
import de.esoco.entity.*; import de.esoco.history.*; import de.esoco.lib.event.*; import de.esoco.lib.expression.*; import de.esoco.lib.property.*; import de.esoco.process.step.*; import de.esoco.storage.*; import java.util.*; import org.obrel.core.*;
[ "de.esoco.entity", "de.esoco.history", "de.esoco.lib", "de.esoco.process", "de.esoco.storage", "java.util", "org.obrel.core" ]
de.esoco.entity; de.esoco.history; de.esoco.lib; de.esoco.process; de.esoco.storage; java.util; org.obrel.core;
2,803,605
void logRename(String src, String dst, long timestamp, boolean toLogRpcIds, Options.Rename... options) { RenameOp op = RenameOp.getInstance(cache.get()) .setSource(src) .setDestination(dst) .setTimestamp(timestamp) .setOptions(options); logRpcIds(op, toLogRpcIds); logEdit(op)...
void logRename(String src, String dst, long timestamp, boolean toLogRpcIds, Options.Rename... options) { RenameOp op = RenameOp.getInstance(cache.get()) .setSource(src) .setDestination(dst) .setTimestamp(timestamp) .setOptions(options); logRpcIds(op, toLogRpcIds); logEdit(op); }
/** * Add rename record to edit log. * * The destination should be the file name, not the destination directory. */
Add rename record to edit log. The destination should be the file name, not the destination directory
logRename
{ "repo_name": "baishuo/hadoop-2.6.0-cdh5.4.7_baishuo", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java", "license": "apache-2.0", "size": 52343 }
[ "org.apache.hadoop.fs.Options", "org.apache.hadoop.hdfs.server.namenode.FSEditLogOp" ]
import org.apache.hadoop.fs.Options; import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.namenode.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,530,583
public void testClassPathRollback() throws SQLException, MalformedURLException { getConnection().setAutoCommit(false); replaceJar("dcl_emc2.jar", "EMC.MAIL_APP"); // This version checks the e-mail address. CallableStatement cs = prepareCall("CALL EMC.ADDCONTACT(...
void function() throws SQLException, MalformedURLException { getConnection().setAutoCommit(false); replaceJar(STR, STR); CallableStatement cs = prepareCall(STR); cs.setInt(1, 99); cs.setString(2, STR); cs.executeUpdate(); Statement s = createStatement(); JDBC.assertFullResultSet( s.executeQuery(STR), new String[][] { {...
/** * check the roll back of class loading. * install a new jar in a transaction, see * that the new class is used and then rollback * the old class should be used after the rollback. * @throws SQLException * @throws MalformedURLException */
check the roll back of class loading. install a new jar in a transaction, see that the new class is used and then rollback the old class should be used after the rollback
testClassPathRollback
{ "repo_name": "kavin256/Derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java", "license": "apache-2.0", "size": 46217 }
[ "java.net.MalformedURLException", "java.sql.CallableStatement", "java.sql.SQLException", "java.sql.Statement", "org.apache.derbyTesting.junit.JDBC" ]
import java.net.MalformedURLException; import java.sql.CallableStatement; import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC;
import java.net.*; import java.sql.*; import org.apache.*;
[ "java.net", "java.sql", "org.apache" ]
java.net; java.sql; org.apache;
1,382,031
public QuerySegment<T> match(Iterator<List<T>> sets, Optional<QueryNodeListRater> rater);
QuerySegment<T> function(Iterator<List<T>> sets, Optional<QueryNodeListRater> rater);
/** * Allows Matcher to iterate over different Collections of ExternalSets to find an optimal combination of matching ExternalSets. * Returns the QuerySegment whose node list has a minimum Rating according to either specified or default QueryNodeListRater. * * @param sets - Iterator over Lists of E...
Allows Matcher to iterate over different Collections of ExternalSets to find an optimal combination of matching ExternalSets. Returns the QuerySegment whose node list has a minimum Rating according to either specified or default QueryNodeListRater
match
{ "repo_name": "kchilton2/incubator-rya", "path": "extras/indexing/src/main/java/org/apache/rya/indexing/external/matching/ExternalSetMatcher.java", "license": "apache-2.0", "size": 4066 }
[ "com.google.common.base.Optional", "java.util.Iterator", "java.util.List" ]
import com.google.common.base.Optional; import java.util.Iterator; import java.util.List;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,069,301
public String getStyle(RowReference rowReference); } public interface CellStyleGenerator extends Serializable {
String function(RowReference rowReference); } public interface CellStyleGenerator extends Serializable {
/** * Called by Grid to generate a style name for a row * * @param rowReference * The row to generate a style for * @return the style name to add to this row, or {@code null} to not set * any style */
Called by Grid to generate a style name for a row
getStyle
{ "repo_name": "mittop/vaadin", "path": "server/src/com/vaadin/ui/Grid.java", "license": "apache-2.0", "size": 222421 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,486,635
public boolean loadPlugin(String pathToJar) { try { File jar = new File(pathToJar); ClassLoader loader = new ParentLastURLClassLoader(new URL[]{jar.toURI().toURL()}, classLoader); String name = pathToJar.substring(pathToJar.lastIndexOf("/") + 1, pathToJar.lastIndexOf(".")...
boolean function(String pathToJar) { try { File jar = new File(pathToJar); ClassLoader loader = new ParentLastURLClassLoader(new URL[]{jar.toURI().toURL()}, classLoader); String name = pathToJar.substring(pathToJar.lastIndexOf("/") + 1, pathToJar.lastIndexOf(".")); if (load(loader.getResourceAsStream("s3f/" + name.toLo...
/** * Carrega um novo plugin... * * @param pathToJar * @param parent * @return */
Carrega um novo plugin..
loadPlugin
{ "repo_name": "anderson-/S3F", "path": "src/s3f/core/plugin/PluginManager.java", "license": "gpl-3.0", "size": 25799 }
[ "java.io.File", "java.net.MalformedURLException" ]
import java.io.File; import java.net.MalformedURLException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,313,463
public boolean isClassFactoryCall(Node callNode);
boolean function(Node callNode);
/** * Checks if the given method is a call to a class factory, such a factory returns a * unique class. * * @param callNode A CALL node. */
Checks if the given method is a call to a class factory, such a factory returns a unique class
isClassFactoryCall
{ "repo_name": "Yannic/closure-compiler", "path": "src/com/google/javascript/jscomp/CodingConvention.java", "license": "apache-2.0", "size": 20398 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,710,748
@Override public void purge(EmrMonitorServer delegate, RequestContext context) throws ResponseException { }
void function(EmrMonitorServer delegate, RequestContext context) throws ResponseException { }
/** * Purge delegate from persistent storage. Subclasses need to override this method, which is * called internally by {@link #purge(String, org.openmrs.module.webservices.rest.web.RequestContext)}. * * @param delegate * @param context * @throws org.openmrs.module.webservices.rest.web.resp...
Purge delegate from persistent storage. Subclasses need to override this method, which is called internally by <code>#purge(String, org.openmrs.module.webservices.rest.web.RequestContext)</code>
purge
{ "repo_name": "rubailly/openmrs-module-emrmonitor", "path": "omod/src/main/java/org/openmrs/module/emrmonitor/rest/resource/openmrs/EmrMonitorConnectResource.java", "license": "mpl-2.0", "size": 5008 }
[ "org.openmrs.module.emrmonitor.EmrMonitorServer", "org.openmrs.module.webservices.rest.web.RequestContext", "org.openmrs.module.webservices.rest.web.response.ResponseException" ]
import org.openmrs.module.emrmonitor.EmrMonitorServer; import org.openmrs.module.webservices.rest.web.RequestContext; import org.openmrs.module.webservices.rest.web.response.ResponseException;
import org.openmrs.module.emrmonitor.*; import org.openmrs.module.webservices.rest.web.*; import org.openmrs.module.webservices.rest.web.response.*;
[ "org.openmrs.module" ]
org.openmrs.module;
284,110
public Map<String, String> tags() { return this.tags; }
Map<String, String> function() { return this.tags; }
/** * Get the tags attached to the resource group. * * @return the tags value */
Get the tags attached to the resource group
tags
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resources/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/resources/v2019_05_01/ResourceGroupPatchable.java", "license": "mit", "size": 2949 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
918,083
public void setActionListener(ActionListener l) { this.startB.addActionListener(l); this.cancelB.addActionListener(l); this.selectAllChB.addActionListener(l); this.addB.addActionListener(l); this.deleteB.addActionListener(l); }
void function(ActionListener l) { this.startB.addActionListener(l); this.cancelB.addActionListener(l); this.selectAllChB.addActionListener(l); this.addB.addActionListener(l); this.deleteB.addActionListener(l); }
/** * sets an ActionListener * * @param l * the ActionListener */
sets an ActionListener
setActionListener
{ "repo_name": "cf86/MP3ToolKit", "path": "src/main/java/view/subview/id3/FieldReplacerView.java", "license": "gpl-3.0", "size": 11652 }
[ "java.awt.event.ActionListener" ]
import java.awt.event.ActionListener;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,280,231
public String command(Pin pin) { return format(command(), pin.getCode()); } }
String function(Pin pin) { return format(command(), pin.getCode()); } }
/** * Returns sys command of the command for the given Pin. * * @return */
Returns sys command of the command for the given Pin
command
{ "repo_name": "serayuzgur/heartbeat", "path": "heartbeat-pin/src/main/java/com/heartbeat/pin/command/chip/ChipSystemPinCommand.java", "license": "mit", "size": 4823 }
[ "com.heartbeat.pin.Pin", "java.lang.String" ]
import com.heartbeat.pin.Pin; import java.lang.String;
import com.heartbeat.pin.*; import java.lang.*;
[ "com.heartbeat.pin", "java.lang" ]
com.heartbeat.pin; java.lang;
323,957
protected boolean processSocket(Socket socket) { // Process the request from this socket try { SocketWrapper<Socket> wrapper = new SocketWrapper<>(socket); wrapper.setKeepAliveLeft(getMaxKeepAliveRequests()); wrapper.setSecure(isSSLEnabled()); // Durin...
boolean function(Socket socket) { try { SocketWrapper<Socket> wrapper = new SocketWrapper<>(socket); wrapper.setKeepAliveLeft(getMaxKeepAliveRequests()); wrapper.setSecure(isSSLEnabled()); if (!running) { return false; } getExecutor().execute(new SocketProcessor(wrapper)); } catch (RejectedExecutionException x) { log.w...
/** * Process a new connection from a new client. Wraps the socket so * keep-alive and other attributes can be tracked and then passes the socket * to the executor for processing. * * @param socket The socket associated with the client. * * @return <code>true</code> if the...
Process a new connection from a new client. Wraps the socket so keep-alive and other attributes can be tracked and then passes the socket to the executor for processing
processSocket
{ "repo_name": "plumer/codana", "path": "tomcat_files/8.0.22/JIoEndpoint.java", "license": "mit", "size": 18957 }
[ "java.net.Socket", "java.util.concurrent.RejectedExecutionException", "org.apache.tomcat.util.ExceptionUtils" ]
import java.net.Socket; import java.util.concurrent.RejectedExecutionException; import org.apache.tomcat.util.ExceptionUtils;
import java.net.*; import java.util.concurrent.*; import org.apache.tomcat.util.*;
[ "java.net", "java.util", "org.apache.tomcat" ]
java.net; java.util; org.apache.tomcat;
1,073,689