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
@Override public org.openntf.red.Database getXPageSharedDesignTemplate() throws FileNotFoundException { // TODO Auto-generated method stub return null; }
org.openntf.red.Database function() throws FileNotFoundException { return null; }
/** * Not implemented yet. */
Not implemented yet
getXPageSharedDesignTemplate
{ "repo_name": "hyarthi/project-red", "path": "src/java/org.openntf.red.main/src/org/openntf/red/impl/Database.java", "license": "apache-2.0", "size": 36930 }
[ "java.io.FileNotFoundException" ]
import java.io.FileNotFoundException;
import java.io.*;
[ "java.io" ]
java.io;
2,729,983
void OnBlockDeviceClick(MXDeviceInfo aDeviceInfo); } // layout info private final LayoutInflater mLayoutInflater; // account info private final MXSession mSession; // used layouts private final int mItemLayoutResourceId; // the events listener private IDevicesAdapterListe...
void OnBlockDeviceClick(MXDeviceInfo aDeviceInfo); } private final LayoutInflater mLayoutInflater; private final MXSession mSession; private final int mItemLayoutResourceId; private IDevicesAdapterListener mActivityListener; final private String myDeviceId; public VectorMemberDetailsDevicesAdapter(Context aContext, int...
/** * Block device button handler * @param aDeviceInfo device info */
Block device button handler
OnBlockDeviceClick
{ "repo_name": "riot-spanish/riot-android", "path": "vector/src/main/java/im/vector/adapters/VectorMemberDetailsDevicesAdapter.java", "license": "apache-2.0", "size": 7463 }
[ "android.content.Context", "android.view.LayoutInflater", "org.matrix.androidsdk.MXSession", "org.matrix.androidsdk.crypto.data.MXDeviceInfo" ]
import android.content.Context; import android.view.LayoutInflater; import org.matrix.androidsdk.MXSession; import org.matrix.androidsdk.crypto.data.MXDeviceInfo;
import android.content.*; import android.view.*; import org.matrix.androidsdk.*; import org.matrix.androidsdk.crypto.data.*;
[ "android.content", "android.view", "org.matrix.androidsdk" ]
android.content; android.view; org.matrix.androidsdk;
2,141,254
Sampler.RenderTarget[] copy = (targets == null ? new Sampler.RenderTarget[0] : Arrays.copyOf(targets, targets.length)); return new TextureSurfaceOptions(width, height, depthRenderBuffer, copy, depthStencilTarget); }
Sampler.RenderTarget[] copy = (targets == null ? new Sampler.RenderTarget[0] : Arrays.copyOf(targets, targets.length)); return new TextureSurfaceOptions(width, height, depthRenderBuffer, copy, depthStencilTarget); }
/** * Set the initial color render target attachments for the texture surface. The targets must satisfy the * same constraints as if they were to be passed into {@link HardwareAccessLayer#setActiveSurface(TextureSurface, * com.ferox.renderer.Sampler.RenderTarget[], com.ferox.renderer.Sampler.RenderTarget...
Set the initial color render target attachments for the texture surface. The targets must satisfy the same constraints as if they were to be passed into <code>HardwareAccessLayer#setActiveSurface(TextureSurface, com.ferox.renderer.Sampler.RenderTarget[], com.ferox.renderer.Sampler.RenderTarget)</code> as the color buff...
colorBuffers
{ "repo_name": "geronimo-iia/ferox", "path": "ferox-renderer/src/main/java/com/ferox/renderer/TextureSurfaceOptions.java", "license": "bsd-2-clause", "size": 7450 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,959,044
tempFile = File.createTempFile(getClass().getName(), "tempmetadatafile"); }
tempFile = File.createTempFile(getClass().getName(), STR); }
/** * Creates a temp file for this class to use. * * @throws IOException when the file couldn't be created. */
Creates a temp file for this class to use
setup
{ "repo_name": "ProgrammingLife2016/PL2-2016", "path": "PL2/PL2-parser/src/test/java/nl/tudelft/pl2016gr2/parser/controller/MetaDataReaderTest.java", "license": "apache-2.0", "size": 1264 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,086,281
public TableLevelSharingProperties withTablesToExclude(List<String> tablesToExclude) { this.tablesToExclude = tablesToExclude; return this; }
TableLevelSharingProperties function(List<String> tablesToExclude) { this.tablesToExclude = tablesToExclude; return this; }
/** * Set the tablesToExclude property: List of tables to exclude from the follower database. * * @param tablesToExclude the tablesToExclude value to set. * @return the TableLevelSharingProperties object itself. */
Set the tablesToExclude property: List of tables to exclude from the follower database
withTablesToExclude
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/TableLevelSharingProperties.java", "license": "mit", "size": 6350 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,085,647
return Uri.parse("android.resource://" + Utils.getApp().getPackageName() + "/" + resPath); }
return Uri.parse("android.resource: }
/** * Resource to uri. * <p>res2Uri([res type]/[res name]) -> res2Uri(drawable/icon), res2Uri(raw/icon)</p> * <p>res2Uri([resource_id]) -> res2Uri(R.drawable.icon)</p> * * @param resPath The path of res. * @return uri */
Resource to uri. res2Uri([res type]/[res name]) -> res2Uri(drawable/icon), res2Uri(raw/icon) res2Uri([resource_id]) -> res2Uri(R.drawable.icon)
res2Uri
{ "repo_name": "didi/DoraemonKit", "path": "Android/dokit-util/src/main/java/com/didichuxing/doraemonkit/util/UriUtils.java", "license": "apache-2.0", "size": 14775 }
[ "android.net.Uri" ]
import android.net.Uri;
import android.net.*;
[ "android.net" ]
android.net;
2,699,998
public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof KeyToGroupMap)) { return false; } KeyToGroupMap that = (KeyToGroupMap) obj; if (!ObjectUtilities.equal(this.defaultGroup, that.defaultGroup)) { ...
boolean function(Object obj) { if (obj == this) { return true; } if (!(obj instanceof KeyToGroupMap)) { return false; } KeyToGroupMap that = (KeyToGroupMap) obj; if (!ObjectUtilities.equal(this.defaultGroup, that.defaultGroup)) { return false; } if (!this.keyToGroupMap.equals(that.keyToGroupMap)) { return false; } retu...
/** * Tests the map for equality against an arbitrary object. * * @param obj the object to test against (<code>null</code> permitted). * * @return A boolean. */
Tests the map for equality against an arbitrary object
equals
{ "repo_name": "Mr-Steve/LTSpice_Library_Manager", "path": "libs/jfreechart-1.0.16/source/org/jfree/data/KeyToGroupMap.java", "license": "gpl-2.0", "size": 10277 }
[ "org.jfree.util.ObjectUtilities" ]
import org.jfree.util.ObjectUtilities;
import org.jfree.util.*;
[ "org.jfree.util" ]
org.jfree.util;
2,808,718
public void backupToStream(OutputStream os) throws IOException { raf.seek(0); final byte[] buf = new byte[4096]; int len; while ((len = raf.read(buf)) > 0) { os.write(buf, 0, len); } }
void function(OutputStream os) throws IOException { raf.seek(0); final byte[] buf = new byte[4096]; int len; while ((len = raf.read(buf)) > 0) { os.write(buf, 0, len); } }
/** * Backup the entire contents of the underlying file to * an output stream. * * @param os * @throws IOException */
Backup the entire contents of the underlying file to an output stream
backupToStream
{ "repo_name": "MjAbuz/exist", "path": "src/org/exist/storage/btree/Paged.java", "license": "lgpl-2.1", "size": 38934 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
159,782
public void disconnect() throws IOException { if (!connected) { return; } try { oos.writeObject(DisconnectCommand.DISCONNECT_COMMAND); try { // Read disconnect response ois.readObject(); } catch (ClassNotFoundEx...
void function() throws IOException { if (!connected) { return; } try { oos.writeObject(DisconnectCommand.DISCONNECT_COMMAND); try { ois.readObject(); } catch (ClassNotFoundException e) { } shutdown(); } catch (SocketException e) { } catch (EOFException e) { } }
/** * Method disconnect. * * @throws IOException if something goes wrong */
Method disconnect
disconnect
{ "repo_name": "antlibs/ant-contrib", "path": "src/main/java/net/sf/antcontrib/antserver/client/Client.java", "license": "apache-2.0", "size": 6228 }
[ "java.io.EOFException", "java.io.IOException", "java.net.SocketException", "net.sf.antcontrib.antserver.commands.DisconnectCommand" ]
import java.io.EOFException; import java.io.IOException; import java.net.SocketException; import net.sf.antcontrib.antserver.commands.DisconnectCommand;
import java.io.*; import java.net.*; import net.sf.antcontrib.antserver.commands.*;
[ "java.io", "java.net", "net.sf.antcontrib" ]
java.io; java.net; net.sf.antcontrib;
2,912,821
public ReducedQueryPhase reducedQueryPhase(Collection<? extends SearchPhaseResult> queryResults, boolean isScrollRequest, boolean trackTotalHits) { return reducedQueryPhase(queryResults, null, new ArrayList<>(), new TopDocsStats(trackTotalHits), 0, isScrollRequest); }
ReducedQueryPhase function(Collection<? extends SearchPhaseResult> queryResults, boolean isScrollRequest, boolean trackTotalHits) { return reducedQueryPhase(queryResults, null, new ArrayList<>(), new TopDocsStats(trackTotalHits), 0, isScrollRequest); }
/** * Reduces the given query results and consumes all aggregations and profile results. * @param queryResults a list of non-null query shard results */
Reduces the given query results and consumes all aggregations and profile results
reducedQueryPhase
{ "repo_name": "shreejay/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/search/SearchPhaseController.java", "license": "apache-2.0", "size": 41146 }
[ "java.util.ArrayList", "java.util.Collection", "org.elasticsearch.search.SearchPhaseResult" ]
import java.util.ArrayList; import java.util.Collection; import org.elasticsearch.search.SearchPhaseResult;
import java.util.*; import org.elasticsearch.search.*;
[ "java.util", "org.elasticsearch.search" ]
java.util; org.elasticsearch.search;
2,422,844
protected boolean areDuplicatesPresent(Budget budget, BudgetCostShare testBudgetCostShare) { boolean duplicate = false; if (testBudgetCostShare == null) { return duplicate; } for (BudgetCostShare budgetCostShare : budget.getBudgetCostShares()) { duplicate = c...
boolean function(Budget budget, BudgetCostShare testBudgetCostShare) { boolean duplicate = false; if (testBudgetCostShare == null) { return duplicate; } for (BudgetCostShare budgetCostShare : budget.getBudgetCostShares()) { duplicate = checkForDuplicateFields(testBudgetCostShare, budgetCostShare); if (duplicate) { brea...
/** * This method ensures that an added BudgetCostShare won't duplicate another. A duplicate record would have the same source * account, share amount, and fiscal year as another already in the list. * * @param testBudgetCostShare * @return */
This method ensures that an added BudgetCostShare won't duplicate another. A duplicate record would have the same source account, share amount, and fiscal year as another already in the list
areDuplicatesPresent
{ "repo_name": "sanjupolus/kc-coeus-1508.3", "path": "coeus-impl/src/main/java/org/kuali/coeus/common/budget/impl/distribution/BudgetCostShareRule.java", "license": "agpl-3.0", "size": 3812 }
[ "org.kuali.coeus.common.budget.framework.core.Budget", "org.kuali.coeus.common.budget.framework.distribution.BudgetCostShare" ]
import org.kuali.coeus.common.budget.framework.core.Budget; import org.kuali.coeus.common.budget.framework.distribution.BudgetCostShare;
import org.kuali.coeus.common.budget.framework.core.*; import org.kuali.coeus.common.budget.framework.distribution.*;
[ "org.kuali.coeus" ]
org.kuali.coeus;
1,476,390
public HTable createTable(byte[] tableName, byte[] family, byte[][] splitRows) throws IOException{ return createTable(TableName.valueOf(tableName), family, splitRows); }
HTable function(byte[] tableName, byte[] family, byte[][] splitRows) throws IOException{ return createTable(TableName.valueOf(tableName), family, splitRows); }
/** * Create a table. * @param tableName * @param family * @param splitRows * @return An HTable instance for the created table. * @throws IOException */
Create a table
createTable
{ "repo_name": "toshimasa-nasu/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 134883 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.HTable" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.HTable;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,981,107
private void addToAns() { for (int i = 0; i < outputFieldMapping.size(); ++i) { MutableTupleBuffer hashTable = tables[outputFieldMapping.get(i).table]; int row = iterators[outputFieldMapping.get(i).table].getRowOfCurrentField(); ansTBB.append(hashTable, outputFieldMapping.get(i).column, row); ...
void function() { for (int i = 0; i < outputFieldMapping.size(); ++i) { MutableTupleBuffer hashTable = tables[outputFieldMapping.get(i).table]; int row = iterators[outputFieldMapping.get(i).table].getRowOfCurrentField(); ansTBB.append(hashTable, outputFieldMapping.get(i).column, row); } }
/** * add result to answer. */
add result to answer
addToAns
{ "repo_name": "uwescience/myria", "path": "src/edu/washington/escience/myria/operator/LeapFrogJoin.java", "license": "bsd-3-clause", "size": 37860 }
[ "edu.washington.escience.myria.storage.MutableTupleBuffer" ]
import edu.washington.escience.myria.storage.MutableTupleBuffer;
import edu.washington.escience.myria.storage.*;
[ "edu.washington.escience" ]
edu.washington.escience;
2,903,581
void onRemoved(Iterable<CacheEntryEvent<? extends K, ? extends V>> events); public static enum EventType { CREATED, UPDATED, REMOVED, EXPIRED } public static class CacheEntryEvent<K, V> extends EventObject { protect...
void onRemoved(Iterable<CacheEntryEvent<? extends K, ? extends V>> events); public static enum EventType { CREATED, UPDATED, REMOVED, EXPIRED } public static class CacheEntryEvent<K, V> extends EventObject { protected K key; protected V value; protected EventType eventType; protected V oldValue; public CacheEntryEvent(...
/** * Called after one or more entries have been removed. If no entry existed for * a key an event is not raised for it. * * @param events The entries just removed. * @throws java.lang.RuntimeException if there is problem executing the listener */
Called after one or more entries have been removed. If no entry existed for a key an event is not raised for it
onRemoved
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "kernel/api/src/main/java/org/sakaiproject/memory/api/CacheEventListener.java", "license": "apache-2.0", "size": 6837 }
[ "java.util.EventObject" ]
import java.util.EventObject;
import java.util.*;
[ "java.util" ]
java.util;
94,894
private MemStoreSize dropMemStoreContentsForSeqId(long seqId, HStore store) throws IOException { MemStoreSizing totalFreedSize = new NonThreadSafeMemStoreSizing(); this.updatesLock.writeLock().lock(); try { long currentSeqId = mvcc.getReadPoint(); if (seqId >= currentSeqId) { // then ...
MemStoreSize function(long seqId, HStore store) throws IOException { MemStoreSizing totalFreedSize = new NonThreadSafeMemStoreSizing(); this.updatesLock.writeLock().lock(); try { long currentSeqId = mvcc.getReadPoint(); if (seqId >= currentSeqId) { LOG.info(getRegionInfo().getEncodedName() + STR + STR + seqId + STR + c...
/** * Drops the memstore contents after replaying a flush descriptor or region open event replay * if the memstore edits have seqNums smaller than the given seq id * @throws IOException */
Drops the memstore contents after replaying a flush descriptor or region open event replay if the memstore edits have seqNums smaller than the given seq id
dropMemStoreContentsForSeqId
{ "repo_name": "ultratendency/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java", "license": "apache-2.0", "size": 357314 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,471,198
HTablePool getTablePool() { return tablePool; }
HTablePool getTablePool() { return tablePool; }
/** * Get The HBase Table Pool * * @return String */
Get The HBase Table Pool
getTablePool
{ "repo_name": "prazanna/kite", "path": "kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/impl/EntityScannerBuilder.java", "license": "apache-2.0", "size": 10732 }
[ "org.apache.hadoop.hbase.client.HTablePool" ]
import org.apache.hadoop.hbase.client.HTablePool;
import org.apache.hadoop.hbase.client.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,075,524
public static final int dateToTimestampBytes(byte[] buffer, int offset, // GemStone changes BEGIN java.sql.Date date, java.util.Calendar cal) throws SqlException, Un...
static final int function(byte[] buffer, int offset, java.sql.Date date, java.util.Calendar cal) throws SqlException, UnsupportedEncodingException { cal = getCleanCalendar(cal); cal.setTime(date); int year = cal.get(Calendar.YEAR); if (year > 9999) { throw new SqlException(null, new ClientMessageId(SQLState.YEAR_EXCEED...
/** * java.sql.Date is converted to character representation that is in DERBY string * representation of a timestamp:<code>yyyy-mm-dd-hh.mm.ss.ffffff</code> and then * converted to bytes using UTF8 encoding and written out to the buffer * @param buffer * @param offset offset in buffer to star...
java.sql.Date is converted to character representation that is in DERBY string representation of a timestamp:<code>yyyy-mm-dd-hh.mm.ss.ffffff</code> and then converted to bytes using UTF8 encoding and written out to the buffer
dateToTimestampBytes
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/client/src/main/java/com/pivotal/gemfirexd/internal/client/am/DateTime.java", "license": "apache-2.0", "size": 41938 }
[ "com.pivotal.gemfirexd.internal.client.net.Typdef", "com.pivotal.gemfirexd.internal.shared.common.reference.SQLState", "java.io.UnsupportedEncodingException", "java.util.Calendar" ]
import com.pivotal.gemfirexd.internal.client.net.Typdef; import com.pivotal.gemfirexd.internal.shared.common.reference.SQLState; import java.io.UnsupportedEncodingException; import java.util.Calendar;
import com.pivotal.gemfirexd.internal.client.net.*; import com.pivotal.gemfirexd.internal.shared.common.reference.*; import java.io.*; import java.util.*;
[ "com.pivotal.gemfirexd", "java.io", "java.util" ]
com.pivotal.gemfirexd; java.io; java.util;
2,004,882
Preconditions.checkArgument( partitionSizeBytes > 0, "Invalid partitionSizeBytes: " + partitionSizeBytes); this.partitionSizeBytes = partitionSizeBytes; return this; }
Preconditions.checkArgument( partitionSizeBytes > 0, STR + partitionSizeBytes); this.partitionSizeBytes = partitionSizeBytes; return this; }
/** * The desired data size for each partition generated. This is only a hint. The actual size of * each partition may be smaller or larger than this size request. * * @param partitionSizeBytes configuration for size of the partitions returned */
The desired data size for each partition generated. This is only a hint. The actual size of each partition may be smaller or larger than this size request
setPartitionSizeBytes
{ "repo_name": "looker-open-source/java-spanner", "path": "google-cloud-spanner/src/main/java/com/google/cloud/spanner/PartitionOptions.java", "license": "apache-2.0", "size": 4135 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
298,404
@ParameterizedTest @MethodSource("deletingPathVisitors") public void testDeleteFolders1FileSize0(final DeletingPathVisitor visitor) throws IOException { PathUtils.copyDirectory(Paths.get("src/test/resources/org/apache/commons/io/dirs-1-file-size-0"), tempDir); assertCounts(1, 1, 0, PathUtils...
@MethodSource(STR) void function(final DeletingPathVisitor visitor) throws IOException { PathUtils.copyDirectory(Paths.get(STR), tempDir); assertCounts(1, 1, 0, PathUtils.visitFileTree(visitor, tempDir)); Files.deleteIfExists(tempDir); }
/** * Tests a directory with one file of size 0. */
Tests a directory with one file of size 0
testDeleteFolders1FileSize0
{ "repo_name": "apache/commons-io", "path": "src/test/java/org/apache/commons/io/file/DeletingPathVisitorTest.java", "license": "apache-2.0", "size": 5046 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Paths", "org.apache.commons.io.file.CounterAssertions", "org.junit.jupiter.params.provider.MethodSource" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import org.apache.commons.io.file.CounterAssertions; import org.junit.jupiter.params.provider.MethodSource;
import java.io.*; import java.nio.file.*; import org.apache.commons.io.file.*; import org.junit.jupiter.params.provider.*;
[ "java.io", "java.nio", "org.apache.commons", "org.junit.jupiter" ]
java.io; java.nio; org.apache.commons; org.junit.jupiter;
2,452,060
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<QueryTextInner> listByServer(String resourceGroupName, String serverName, List<String> queryIds);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<QueryTextInner> listByServer(String resourceGroupName, String serverName, List<String> queryIds);
/** * Retrieve the Query-Store query texts for specified queryIds. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param queryIds The query identifiers. * @throws IllegalArgumentException thrown if pa...
Retrieve the Query-Store query texts for specified queryIds
listByServer
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/fluent/QueryTextsClient.java", "license": "mit", "size": 3980 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.resourcemanager.mysql.fluent.models.QueryTextInner", "java.util.List" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.mysql.fluent.models.QueryTextInner; import java.util.List;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.mysql.fluent.models.*; import java.util.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.util" ]
com.azure.core; com.azure.resourcemanager; java.util;
2,452,682
public boolean unclaim() { if (!this.hasOwner()) { return false; } for (Plot current : getConnectedPlots()) { List<PlotPlayer<?>> players = current.getPlayersInPlot(); for (PlotPlayer<?> pp : players) { this.plotListener.plotExit(pp, curren...
boolean function() { if (!this.hasOwner()) { return false; } for (Plot current : getConnectedPlots()) { List<PlotPlayer<?>> players = current.getPlayersInPlot(); for (PlotPlayer<?> pp : players) { this.plotListener.plotExit(pp, current); } if (Settings.Backup.DELETE_ON_UNCLAIM) { Objects.requireNonNull(PlotSquared.plat...
/** * Unclaim the plot (does not modify terrain). Changes made to this plot will not be reflected in unclaimed plot objects. * * @return {@code false} if the Plot has no owner, otherwise {@code true}. */
Unclaim the plot (does not modify terrain). Changes made to this plot will not be reflected in unclaimed plot objects
unclaim
{ "repo_name": "IntellectualSites/PlotSquared", "path": "Core/src/main/java/com/plotsquared/core/plot/Plot.java", "license": "gpl-3.0", "size": 117872 }
[ "com.plotsquared.core.PlotSquared", "com.plotsquared.core.configuration.Settings", "com.plotsquared.core.database.DBFunc", "com.plotsquared.core.player.PlotPlayer", "java.util.List", "java.util.Objects" ]
import com.plotsquared.core.PlotSquared; import com.plotsquared.core.configuration.Settings; import com.plotsquared.core.database.DBFunc; import com.plotsquared.core.player.PlotPlayer; import java.util.List; import java.util.Objects;
import com.plotsquared.core.*; import com.plotsquared.core.configuration.*; import com.plotsquared.core.database.*; import com.plotsquared.core.player.*; import java.util.*;
[ "com.plotsquared.core", "java.util" ]
com.plotsquared.core; java.util;
1,659,164
RevisionInternal getParentRevision(RevisionInternal rev);
RevisionInternal getParentRevision(RevisionInternal rev);
/** * Retrieves the parent revision of a revision, or returns nil if there is no parent. */
Retrieves the parent revision of a revision, or returns nil if there is no parent
getParentRevision
{ "repo_name": "mariosotil/couchbase-lite-java-core", "path": "src/main/java/com/couchbase/lite/store/Store.java", "license": "apache-2.0", "size": 15738 }
[ "com.couchbase.lite.internal.RevisionInternal" ]
import com.couchbase.lite.internal.RevisionInternal;
import com.couchbase.lite.internal.*;
[ "com.couchbase.lite" ]
com.couchbase.lite;
386,932
public Iterator getRecoveryNames();
Iterator function();
/** * Get the names of all <em>recovery</em> attributes whose values are * defined in this context. */
Get the names of all recovery attributes whose values are defined in this context
getRecoveryNames
{ "repo_name": "andreasnef/fcrepo", "path": "fcrepo-server/src/main/java/org/fcrepo/server/RecoveryContext.java", "license": "apache-2.0", "size": 1083 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
52,575
protected Map<SnmpObjId, HwEntityAttributeType> getVendorAttributeMap() { return m_vendorAttributes; }
Map<SnmpObjId, HwEntityAttributeType> function() { return m_vendorAttributes; }
/** * Gets the vendor attribute map. * * @return the vendor attribute map */
Gets the vendor attribute map
getVendorAttributeMap
{ "repo_name": "rdkgit/opennms", "path": "integrations/opennms-snmp-hardware-inventory-provisioning-adapter/src/main/java/org/opennms/netmgt/provision/SnmpHardwareInventoryProvisioningAdapter.java", "license": "agpl-3.0", "size": 16906 }
[ "java.util.Map", "org.opennms.netmgt.model.HwEntityAttributeType", "org.opennms.netmgt.snmp.SnmpObjId" ]
import java.util.Map; import org.opennms.netmgt.model.HwEntityAttributeType; import org.opennms.netmgt.snmp.SnmpObjId;
import java.util.*; import org.opennms.netmgt.model.*; import org.opennms.netmgt.snmp.*;
[ "java.util", "org.opennms.netmgt" ]
java.util; org.opennms.netmgt;
1,177,540
public static void doClick(String name) { List<AbstractButton> list = allButtons.get(name); if (list == null) return; AbstractButton b = list.get(0); b.doClick(); }
static void function(String name) { List<AbstractButton> list = allButtons.get(name); if (list == null) return; AbstractButton b = list.get(0); b.doClick(); }
/** * Act as if ToolBarButton named <code>name</code> was clicked * @param name the name of the button */
Act as if ToolBarButton named <code>name</code> was clicked
doClick
{ "repo_name": "imr/Electric8", "path": "com/sun/electric/tool/user/ui/ToolBarButton.java", "license": "gpl-3.0", "size": 11121 }
[ "java.util.List", "javax.swing.AbstractButton" ]
import java.util.List; import javax.swing.AbstractButton;
import java.util.*; import javax.swing.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
484,915
public LinkedHashMap mapProjInfo() { projParameters = new LinkedHashMap(); String projinfo = getProjInfo(); String[] infos = projinfo.split("\\+"); for (int i = 0; i < infos.length - 1; i++) { String[] pairs = infos[i + 1].split("="); if (pairs.length == 1 && pairs[0].equals("no_def...
LinkedHashMap function() { projParameters = new LinkedHashMap(); String projinfo = getProjInfo(); String[] infos = projinfo.split("\\+"); for (int i = 0; i < infos.length - 1; i++) { String[] pairs = infos[i + 1].split("="); if (pairs.length == 1 && pairs[0].equals(STR)) { projParameters.put(pairs[0].trim(), STR); } el...
/** * return all the proj info into a Linked Hashmap */
return all the proj info into a Linked Hashmap
mapProjInfo
{ "repo_name": "zhm/node-spatialite", "path": "src/spatialite/deps/proj/proj/jniwrap/org/proj4/Projections.java", "license": "bsd-3-clause", "size": 9448 }
[ "java.util.LinkedHashMap" ]
import java.util.LinkedHashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,088,660
public void revertReceivedTo(Relationship r, Throwable t) { for (FlowFile f : toDrop.values()) { session.remove(f); } String errorMessage = Throwables.getMessage(t, null, 950); String stackTrace = Throwables.stringStackTrace(t); for (FlowFile f : toFail) { ...
void function(Relationship r, Throwable t) { for (FlowFile f : toDrop.values()) { session.remove(f); } String errorMessage = Throwables.getMessage(t, null, 950); String stackTrace = Throwables.stringStackTrace(t); for (FlowFile f : toFail) { if (t != null && r != null) { f = session.putAttribute(f, ERROR_MESSAGE, error...
/** * transfers all input files to relationship and drops other files. * * @param r where to transfer flow files, when null then transfers to input with penalize. * @param t the cause why we do this transfer, when relationship specified then additional properties populated: ERROR_MESSAGE and ERROR_S...
transfers all input files to relationship and drops other files
revertReceivedTo
{ "repo_name": "MikeThomsen/nifi", "path": "nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/src/main/java/org/apache/nifi/processors/groovyx/flow/ProcessSessionWrap.java", "license": "apache-2.0", "size": 50090 }
[ "org.apache.nifi.flowfile.FlowFile", "org.apache.nifi.processor.Relationship", "org.apache.nifi.processors.groovyx.util.Throwables" ]
import org.apache.nifi.flowfile.FlowFile; import org.apache.nifi.processor.Relationship; import org.apache.nifi.processors.groovyx.util.Throwables;
import org.apache.nifi.flowfile.*; import org.apache.nifi.processor.*; import org.apache.nifi.processors.groovyx.util.*;
[ "org.apache.nifi" ]
org.apache.nifi;
348,874
private static boolean isAbsolute(@Nonnull String rel) { return rel.startsWith("/") || DRIVE_PATTERN.matcher(rel).matches() || UNC_PATTERN.matcher(rel).matches(); } private static final Pattern DRIVE_PATTERN = Pattern.compile("[A-Za-z]:[\\\\/].*"), UNC_PATTERN = Pattern.compile("^\\\\\\...
static boolean function(@Nonnull String rel) { return rel.startsWith("/") DRIVE_PATTERN.matcher(rel).matches() UNC_PATTERN.matcher(rel).matches(); } private static final Pattern DRIVE_PATTERN = Pattern.compile(STR), UNC_PATTERN = Pattern.compile(STR), ABSOLUTE_PREFIX_PATTERN = Pattern.compile(STR);
/** * Is the given path name an absolute path? */
Is the given path name an absolute path
isAbsolute
{ "repo_name": "batmat/jenkins", "path": "core/src/main/java/hudson/FilePath.java", "license": "mit", "size": 132867 }
[ "java.util.regex.Pattern", "javax.annotation.Nonnull" ]
import java.util.regex.Pattern; import javax.annotation.Nonnull;
import java.util.regex.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
558,570
@Override public void visitBinary(EBinary userBinaryNode, SemanticScope semanticScope) { Operation operation = userBinaryNode.getOperation(); if (semanticScope.getCondition(userBinaryNode, Write.class)) { throw userBinaryNode.createError(new IllegalArgumentException( ...
void function(EBinary userBinaryNode, SemanticScope semanticScope) { Operation operation = userBinaryNode.getOperation(); if (semanticScope.getCondition(userBinaryNode, Write.class)) { throw userBinaryNode.createError(new IllegalArgumentException( STR + operation.name + STR + "[" + operation.symbol + "]")); } if (seman...
/** * Visits a binary expression which covers all the mathematical operators. * Checks: type validation */
Visits a binary expression which covers all the mathematical operators. Checks: type validation
visitBinary
{ "repo_name": "nknize/elasticsearch", "path": "modules/lang-painless/src/main/java/org/elasticsearch/painless/phase/DefaultSemanticAnalysisPhase.java", "license": "apache-2.0", "size": 149793 }
[ "java.util.regex.Pattern", "org.elasticsearch.painless.AnalyzerCaster", "org.elasticsearch.painless.Operation", "org.elasticsearch.painless.lookup.PainlessLookupUtility", "org.elasticsearch.painless.node.AExpression", "org.elasticsearch.painless.node.EBinary", "org.elasticsearch.painless.symbol.Decorati...
import java.util.regex.Pattern; import org.elasticsearch.painless.AnalyzerCaster; import org.elasticsearch.painless.Operation; import org.elasticsearch.painless.lookup.PainlessLookupUtility; import org.elasticsearch.painless.node.AExpression; import org.elasticsearch.painless.node.EBinary; import org.elasticsearch.pain...
import java.util.regex.*; import org.elasticsearch.painless.*; import org.elasticsearch.painless.lookup.*; import org.elasticsearch.painless.node.*; import org.elasticsearch.painless.symbol.*;
[ "java.util", "org.elasticsearch.painless" ]
java.util; org.elasticsearch.painless;
470,056
static synchronized String getResource(String resourcePath) { try { File file = resources.get(resourcePath); if (file == null) { String basename = PathUtil.basename(resourcePath); String prefix; String suffix; int lastDot = basename.lastIndexOf("."); if (lastDot...
static synchronized String getResource(String resourcePath) { try { File file = resources.get(resourcePath); if (file == null) { String basename = PathUtil.basename(resourcePath); String prefix; String suffix; int lastDot = basename.lastIndexOf("."); if (lastDot != -1) { prefix = basename.substring(0, lastDot); suffix ...
/** * Writes out the given resource as a temp file and returns the absolute path. * Caches the location of the files, so we can reuse them. * * @param resourcePath the name of the resource */
Writes out the given resource as a temp file and returns the absolute path. Caches the location of the files, so we can reuse them
getResource
{ "repo_name": "bxie/appinventor-sources", "path": "appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java", "license": "apache-2.0", "size": 52222 }
[ "com.google.common.io.Files", "com.google.common.io.Resources", "java.io.File", "java.io.IOException" ]
import com.google.common.io.Files; import com.google.common.io.Resources; import java.io.File; import java.io.IOException;
import com.google.common.io.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
1,740,021
private void addSpecificPairRank(Card.Rank pairRank, Set<Long> range) { Card.Suit[] suits = Card.Suit.values(); for (int i = 0; i < suits.length; i++) { Card card1 = new Card(pairRank, suits[i]); for (int j = i+1; j < suits.length; j++) { Card card2 = new Card(pairRank, suits[j]); range.add(Card.c...
void function(Card.Rank pairRank, Set<Long> range) { Card.Suit[] suits = Card.Suit.values(); for (int i = 0; i < suits.length; i++) { Card card1 = new Card(pairRank, suits[i]); for (int j = i+1; j < suits.length; j++) { Card card2 = new Card(pairRank, suits[j]); range.add(Card.cardsToLong(new Card[] {card1,card2})); } ...
/** * Adds specific pair rank to the range (for all suits). For example, * if rank is Card.Rank.Ace, add all 6 pairs of Aces. * * @param pairRank * @param range */
Adds specific pair rank to the range (for all suits). For example, if rank is Card.Rank.Ace, add all 6 pairs of Aces
addSpecificPairRank
{ "repo_name": "rdanek/poker-harrison", "path": "src/com/pkrharrison/ranges/PairParser.java", "license": "mit", "size": 2628 }
[ "com.pkrharrison.gameplay.Card", "java.util.Set" ]
import com.pkrharrison.gameplay.Card; import java.util.Set;
import com.pkrharrison.gameplay.*; import java.util.*;
[ "com.pkrharrison.gameplay", "java.util" ]
com.pkrharrison.gameplay; java.util;
259,223
public Token createContainerToken(ContainerId containerId, int containerVersion, NodeId nodeId, String appSubmitter, Resource capability, Priority priority, long createTime, LogAggregationContext logAggregationContext, String nodeLabelExpression, ContainerType containerType, ExecutionType exec...
Token function(ContainerId containerId, int containerVersion, NodeId nodeId, String appSubmitter, Resource capability, Priority priority, long createTime, LogAggregationContext logAggregationContext, String nodeLabelExpression, ContainerType containerType, ExecutionType execType, long allocationRequestId) { byte[] pass...
/** * Helper function for creating ContainerTokens. * * @param containerId Container Id * @param containerVersion Container version * @param nodeId Node Id * @param appSubmitter App Submitter * @param capability Capability * @param priority Priority * @param createTime Create Time * @param...
Helper function for creating ContainerTokens
createContainerToken
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/RMContainerTokenSecretManager.java", "license": "apache-2.0", "size": 8581 }
[ "org.apache.hadoop.yarn.api.records.ContainerId", "org.apache.hadoop.yarn.api.records.ExecutionType", "org.apache.hadoop.yarn.api.records.LogAggregationContext", "org.apache.hadoop.yarn.api.records.NodeId", "org.apache.hadoop.yarn.api.records.Priority", "org.apache.hadoop.yarn.api.records.Resource", "or...
import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.api.records.ExecutionType; import org.apache.hadoop.yarn.api.records.LogAggregationContext; import org.apache.hadoop.yarn.api.records.NodeId; import org.apache.hadoop.yarn.api.records.Priority; import org.apache.hadoop.yarn.api.records...
import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.security.*; import org.apache.hadoop.yarn.server.api.*; import org.apache.hadoop.yarn.server.resourcemanager.*; import org.apache.hadoop.yarn.server.utils.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,835,208
private static void checkThirdPartyRuleHasLicense(Rule rule, Package.Builder pkgBuilder, EventHandler eventHandler) { if (rule.getLabel().getPackageName().startsWith("third_party/")) { License license = rule.getLicense(); if (license == null) { license = pkgBuilder.getDefaultLicense(); ...
static void function(Rule rule, Package.Builder pkgBuilder, EventHandler eventHandler) { if (rule.getLabel().getPackageName().startsWith(STR)) { License license = rule.getLicense(); if (license == null) { license = pkgBuilder.getDefaultLicense(); } if (license == License.NO_LICENSE) { rule.reportError(STR + rule.getLab...
/** * Reports an error against the specified rule if it's beneath third_party * but does not have a declared license. */
Reports an error against the specified rule if it's beneath third_party but does not have a declared license
checkThirdPartyRuleHasLicense
{ "repo_name": "rzagabe/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/RuleClass.java", "license": "apache-2.0", "size": 60830 }
[ "com.google.devtools.build.lib.events.EventHandler" ]
import com.google.devtools.build.lib.events.EventHandler;
import com.google.devtools.build.lib.events.*;
[ "com.google.devtools" ]
com.google.devtools;
309,959
@Override public final Jid getJid() { return jid; }
final Jid function() { return jid; }
/** * Gets the JabberID of the StreamHost for communication over XMPP. * * @return The JID. */
Gets the JabberID of the StreamHost for communication over XMPP
getJid
{ "repo_name": "jeozey/XmppServerTester", "path": "xmpp-extensions/src/main/java/rocks/xmpp/extensions/bytestreams/s5b/model/StreamHost.java", "license": "mit", "size": 2888 }
[ "rocks.xmpp.addr.Jid" ]
import rocks.xmpp.addr.Jid;
import rocks.xmpp.addr.*;
[ "rocks.xmpp.addr" ]
rocks.xmpp.addr;
686,810
private void saveQueryCache(QueryCache cache) { Query data = cache; xml.print(out, "<query"); printCommonAttributes(cache); printAttribute("zoom", data.getZoomLevel()); printAttribute("streaming-row-limit", data.getStreamingRowLimit()); printAttribute("row-limit", data.getRowLimit()); printAttribute...
void function(QueryCache cache) { Query data = cache; xml.print(out, STR); printCommonAttributes(cache); printAttribute("zoom", data.getZoomLevel()); printAttribute(STR, data.getStreamingRowLimit()); printAttribute(STR, data.getRowLimit()); printAttribute(STR, Boolean.toString(data.isGroupingEnabled())); printAttribute...
/** * This saves a query cache. This will not close the print writer passed into the constructor. * If this save method is used to export the query cache somewhere then close should be * called on it to flush the print writer and close it. */
This saves a query cache. This will not close the print writer passed into the constructor. If this save method is used to export the query cache somewhere then close should be called on it to flush the print writer and close it
saveQueryCache
{ "repo_name": "iyerdude/wabit", "path": "src/main/java/ca/sqlpower/wabit/dao/WorkspaceXMLDAO.java", "license": "gpl-3.0", "size": 36346 }
[ "ca.sqlpower.query.Container", "ca.sqlpower.query.Item", "ca.sqlpower.query.Query", "ca.sqlpower.query.TableContainer", "ca.sqlpower.wabit.rs.query.QueryCache", "java.util.HashMap", "java.util.Map" ]
import ca.sqlpower.query.Container; import ca.sqlpower.query.Item; import ca.sqlpower.query.Query; import ca.sqlpower.query.TableContainer; import ca.sqlpower.wabit.rs.query.QueryCache; import java.util.HashMap; import java.util.Map;
import ca.sqlpower.query.*; import ca.sqlpower.wabit.rs.query.*; import java.util.*;
[ "ca.sqlpower.query", "ca.sqlpower.wabit", "java.util" ]
ca.sqlpower.query; ca.sqlpower.wabit; java.util;
657,986
public String getCallerString() { StringBuilder result = new StringBuilder(); SrcPos sourcePosition; result.append("[caller: "); if (fCallerExpression != null) { fCallerExpression.toString(result); sourcePosition = fCallerExpression.getSourcePosition(); } else if (fCallerStatement != null)...
String function() { StringBuilder result = new StringBuilder(); SrcPos sourcePosition; result.append(STR); if (fCallerExpression != null) { fCallerExpression.toString(result); sourcePosition = fCallerExpression.getSourcePosition(); } else if (fCallerStatement != null) { result.append(fCallerStatement.toString()); sourc...
/** * Returns a String with information about the caller. * <p>The String has the following form:<br/> * <b>[caller: </b> <code>(callerExpression|callerStatement|<b>&lt;unknown&gt;</b>)</code><b>@</b><code>(sourcePos|<b>&lt;unknown&gt;)</b></code><b>]</b></p> * @return */
Returns a String with information about the caller. The String has the following form: [caller: <code>(callerExpression|callerStatement|&lt;unknown&gt;)</code>@<code>(sourcePos|&lt;unknown&gt;)</code>]
getCallerString
{ "repo_name": "classicwuhao/maxuse", "path": "src/main/org/tzi/use/uml/sys/MOperationCall.java", "license": "gpl-2.0", "size": 18056 }
[ "org.tzi.use.parser.SrcPos" ]
import org.tzi.use.parser.SrcPos;
import org.tzi.use.parser.*;
[ "org.tzi.use" ]
org.tzi.use;
2,294,108
if (!registered) { Plugin plugin = menu.getPlugin(); plugin.getServer().getPluginManager().registerEvents(new InvMenuListener(), plugin); registered = true; } }
if (!registered) { Plugin plugin = menu.getPlugin(); plugin.getServer().getPluginManager().registerEvents(new InvMenuListener(), plugin); registered = true; } }
/** * Makes sure there is a listener in place to notify given menu about events. * * @param menu the menu requesting the action */
Makes sure there is a listener in place to notify given menu about events
register
{ "repo_name": "xxyy/xyc", "path": "bukkit/src/main/java/li/l1t/common/inventory/gui/util/InvMenuListener.java", "license": "mit", "size": 4639 }
[ "org.bukkit.plugin.Plugin" ]
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.*;
[ "org.bukkit.plugin" ]
org.bukkit.plugin;
2,202,630
public List<String> getAllDescription() { List<String> result = new ArrayList<String>(); List<Node> nodes = childNode.get("description"); for (Node node : nodes) { result.add(node.getText()); } return result; }
List<String> function() { List<String> result = new ArrayList<String>(); List<Node> nodes = childNode.get(STR); for (Node node : nodes) { result.add(node.getText()); } return result; }
/** * Returns all <code>description</code> elements * @return list of <code>description</code> */
Returns all <code>description</code> elements
getAllDescription
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/portletapp20/CustomPortletModeTypeImpl.java", "license": "epl-1.0", "size": 7650 }
[ "java.util.ArrayList", "java.util.List", "org.jboss.shrinkwrap.descriptor.spi.node.Node" ]
import java.util.ArrayList; import java.util.List; import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import java.util.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;
[ "java.util", "org.jboss.shrinkwrap" ]
java.util; org.jboss.shrinkwrap;
1,259,384
protected static void appendStderr(Path stdOut, Path stdErr) throws IOException { FileStatus stat = stdErr.statNullable(); OutputStream out = null; InputStream in = null; if (stat != null) { try { if (stat.getSize() > 0) { if (stdOut.exists()) { stdOut.setWritable(t...
static void function(Path stdOut, Path stdErr) throws IOException { FileStatus stat = stdErr.statNullable(); OutputStream out = null; InputStream in = null; if (stat != null) { try { if (stat.getSize() > 0) { if (stdOut.exists()) { stdOut.setWritable(true); } out = stdOut.getOutputStream(true); in = stdErr.getInputStre...
/** * In rare cases, we might write something to stderr. Append it to the real test.log. */
In rare cases, we might write something to stderr. Append it to the real test.log
appendStderr
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/test/TestStrategy.java", "license": "apache-2.0", "size": 18575 }
[ "com.google.common.io.ByteStreams", "com.google.common.io.Closeables", "com.google.devtools.build.lib.util.io.FileWatcher", "com.google.devtools.build.lib.util.io.OutErr", "com.google.devtools.build.lib.vfs.FileStatus", "com.google.devtools.build.lib.vfs.Path", "java.io.Closeable", "java.io.IOExceptio...
import com.google.common.io.ByteStreams; import com.google.common.io.Closeables; import com.google.devtools.build.lib.util.io.FileWatcher; import com.google.devtools.build.lib.util.io.OutErr; import com.google.devtools.build.lib.vfs.FileStatus; import com.google.devtools.build.lib.vfs.Path; import java.io.Closeable; im...
import com.google.common.io.*; import com.google.devtools.build.lib.util.io.*; import com.google.devtools.build.lib.vfs.*; import java.io.*;
[ "com.google.common", "com.google.devtools", "java.io" ]
com.google.common; com.google.devtools; java.io;
1,849,994
public void execute() throws JurpeException { this.autoRecovery(); switch (command.getCommand()) { case AIM: this.aim(); break; case SAYTIME: break; case DIG: this.dig(); break; case ENTER_INN: this.enterInn(); break; case ENTER_SHOP: this.enterShop(); ...
void function() throws JurpeException { this.autoRecovery(); switch (command.getCommand()) { case AIM: this.aim(); break; case SAYTIME: break; case DIG: this.dig(); break; case ENTER_INN: this.enterInn(); break; case ENTER_SHOP: this.enterShop(); break; case ENTER_TRAINER: this.enterTrainer(); break; case ENTER_MAGESGU...
/** * Execute the command. Every command advances game time by 1 minute * * @throws JurpeException */
Execute the command. Every command advances game time by 1 minute
execute
{ "repo_name": "guildenstern70/jurpe", "path": "jurpedemo/src/main/java/net/littlelite/jurpedemo/logic/DungeonCommander.java", "license": "gpl-2.0", "size": 13878 }
[ "net.littlelite.jurpe.system.JurpeException" ]
import net.littlelite.jurpe.system.JurpeException;
import net.littlelite.jurpe.system.*;
[ "net.littlelite.jurpe" ]
net.littlelite.jurpe;
2,518,680
public void axisChanged(AxisChangeEvent event) { if (this.axis == event.getAxis()) { notifyListeners(new TitleChangeEvent(this)); } }
void function(AxisChangeEvent event) { if (this.axis == event.getAxis()) { notifyListeners(new TitleChangeEvent(this)); } }
/** * Receives notification of an axis change event and responds by firing * a title change event. * * @param event the event. * * @since 1.0.13 */
Receives notification of an axis change event and responds by firing a title change event
axisChanged
{ "repo_name": "apetresc/JFreeChart", "path": "src/main/java/org/jfree/chart/title/PaintScaleLegend.java", "license": "lgpl-2.1", "size": 26376 }
[ "org.jfree.chart.event.AxisChangeEvent", "org.jfree.chart.event.TitleChangeEvent" ]
import org.jfree.chart.event.AxisChangeEvent; import org.jfree.chart.event.TitleChangeEvent;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,426,043
private HtmlElementMetadataP getTemplateMetadataForStaticCall( TemplateNode template, String callee, SourceLocation calleeSourceLocation, Map<String, TemplateNode> templatesInLibrary, Set<TemplateNode> visited) { HtmlElementMetadataP calleeMetadata = null; boolean isCalleeSoyEle...
HtmlElementMetadataP function( TemplateNode template, String callee, SourceLocation calleeSourceLocation, Map<String, TemplateNode> templatesInLibrary, Set<TemplateNode> visited) { HtmlElementMetadataP calleeMetadata = null; boolean isCalleeSoyElement = false; TemplateMetadata templateMetadata = templateRegistryFromDep...
/** * The templates processed here have exactly one (static) call, which may or may not be an HTML * template. */
The templates processed here have exactly one (static) call, which may or may not be an HTML template
getTemplateMetadataForStaticCall
{ "repo_name": "google/closure-templates", "path": "java/src/com/google/template/soy/passes/SoyElementPass.java", "license": "apache-2.0", "size": 18903 }
[ "com.google.template.soy.base.SourceLocation", "com.google.template.soy.soytree.HtmlElementMetadataP", "com.google.template.soy.soytree.TemplateElementNode", "com.google.template.soy.soytree.TemplateMetadata", "com.google.template.soy.soytree.TemplateNode", "java.util.Map", "java.util.Set" ]
import com.google.template.soy.base.SourceLocation; import com.google.template.soy.soytree.HtmlElementMetadataP; import com.google.template.soy.soytree.TemplateElementNode; import com.google.template.soy.soytree.TemplateMetadata; import com.google.template.soy.soytree.TemplateNode; import java.util.Map; import java.uti...
import com.google.template.soy.base.*; import com.google.template.soy.soytree.*; import java.util.*;
[ "com.google.template", "java.util" ]
com.google.template; java.util;
2,560,017
private void advance() { nextEntry = null; while (delegate.hasNext()) { HashEntry<K, V> n = delegate.next(); if (n.modCnt <= modCnt) { nextEntry = n; break; } } } } ...
void function() { nextEntry = null; while (delegate.hasNext()) { HashEntry<K, V> n = delegate.next(); if (n.modCnt <= modCnt) { nextEntry = n; break; } } } } class HashIteratorDelegate implements Iterator<HashEntry<K, V>> { private HashEntry<K, V>[] curTbl; private int nextSegIdx; private int nextTblIdx; private HashEn...
/** * Moves iterator to the next position. */
Moves iterator to the next position
advance
{ "repo_name": "vadopolski/ignite", "path": "modules/core/src/main/java/org/jsr166/ConcurrentLinkedHashMap.java", "license": "apache-2.0", "size": 73910 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
425,429
public NestedSet<Artifact> getCompile() { return compile; }
NestedSet<Artifact> function() { return compile; }
/** * Returns the files necessary for compilation. */
Returns the files necessary for compilation
getCompile
{ "repo_name": "mikelikespie/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProvider.java", "license": "apache-2.0", "size": 10403 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSet" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*;
[ "com.google.devtools" ]
com.google.devtools;
2,652,499
private void createTunnelInterface(OpenstackNode osNode, String type, String intfName) { if (isIntfEnabled(osNode, intfName)) { return; } Device device = deviceService.getDevice(osNode.ovsdb()); if (device == null || !device.is(Inte...
void function(OpenstackNode osNode, String type, String intfName) { if (isIntfEnabled(osNode, intfName)) { return; } Device device = deviceService.getDevice(osNode.ovsdb()); if (device == null !device.is(InterfaceConfig.class)) { log.error(STR, osNode.ovsdb()); return; } TunnelDescription tunnelDesc = buildTunnelDesc(t...
/** * Creates a tunnel interface in a given openstack node. * * @param osNode openstack node */
Creates a tunnel interface in a given openstack node
createTunnelInterface
{ "repo_name": "oplinkoms/onos", "path": "apps/openstacknode/app/src/main/java/org/onosproject/openstacknode/impl/DefaultOpenstackNodeHandler.java", "license": "apache-2.0", "size": 44931 }
[ "org.onosproject.net.Device", "org.onosproject.net.behaviour.InterfaceConfig", "org.onosproject.net.behaviour.TunnelDescription", "org.onosproject.openstacknode.api.OpenstackNode" ]
import org.onosproject.net.Device; import org.onosproject.net.behaviour.InterfaceConfig; import org.onosproject.net.behaviour.TunnelDescription; import org.onosproject.openstacknode.api.OpenstackNode;
import org.onosproject.net.*; import org.onosproject.net.behaviour.*; import org.onosproject.openstacknode.api.*;
[ "org.onosproject.net", "org.onosproject.openstacknode" ]
org.onosproject.net; org.onosproject.openstacknode;
195,929
if (!isDefined(javastring)) { return ""; } return StringEscapeUtils.escapeEcmaScript(javastring); }
if (!isDefined(javastring)) { return ""; } return StringEscapeUtils.escapeEcmaScript(javastring); }
/** * Convert a java string to a javascript string Replace \,\n,\r and " * * @param javastring Java string to encode * @return javascript string encoded */
Convert a java string to a javascript string Replace \,\n,\r and "
javaStringToJsString
{ "repo_name": "ebonnet/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/util/EncodeHelper.java", "license": "agpl-3.0", "size": 6447 }
[ "org.apache.commons.lang3.StringEscapeUtils" ]
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
1,479,348
public final boolean unblockDeletions() { this.deletionBlocks--; if (this.deletionBlocks == 0) { for (DataVersion version : this.pendingDeletions) { if (version.markToDelete()) { Comm.removeData(version.getDataInstanceId().getRenaming()); ...
final boolean function() { this.deletionBlocks--; if (this.deletionBlocks == 0) { for (DataVersion version : this.pendingDeletions) { if (version.markToDelete()) { Comm.removeData(version.getDataInstanceId().getRenaming()); this.versions.remove(version.getDataInstanceId().getVersionId()); } } if (this.versions.isEmpty(...
/** * Decreases the number of deletion blocks and returns whether all the pending deletions are completed or not. * * @return {@code true} if all the pending deletions have been removed, {@code false} otherwise. */
Decreases the number of deletion blocks and returns whether all the pending deletions are completed or not
unblockDeletions
{ "repo_name": "mF2C/COMPSs", "path": "compss/runtime/engine/src/main/java/es/bsc/compss/types/data/DataInfo.java", "license": "apache-2.0", "size": 9971 }
[ "es.bsc.compss.comm.Comm" ]
import es.bsc.compss.comm.Comm;
import es.bsc.compss.comm.*;
[ "es.bsc.compss" ]
es.bsc.compss;
704,456
public InetAddress getIp4NonLoopbackAddressOfThisMachine() { for (NetworkInterface iface : networkInterfaceProvider.getNetworkInterfaces()) { final InetAddress ip4NonLoopback = iface.getIp4NonLoopBackOnly(); if (ip4NonLoopback != null) { return ip4NonLoopback; } } throw new WebDr...
InetAddress function() { for (NetworkInterface iface : networkInterfaceProvider.getNetworkInterfaces()) { final InetAddress ip4NonLoopback = iface.getIp4NonLoopBackOnly(); if (ip4NonLoopback != null) { return ip4NonLoopback; } } throw new WebDriverException(STR); }
/** * Returns a non-loopback IP4 hostname of the local host. * * @return A string hostName */
Returns a non-loopback IP4 hostname of the local host
getIp4NonLoopbackAddressOfThisMachine
{ "repo_name": "jerome-jacob/selenium", "path": "java/client/src/org/openqa/selenium/net/NetworkUtils.java", "license": "apache-2.0", "size": 7586 }
[ "java.net.InetAddress", "org.openqa.selenium.WebDriverException" ]
import java.net.InetAddress; import org.openqa.selenium.WebDriverException;
import java.net.*; import org.openqa.selenium.*;
[ "java.net", "org.openqa.selenium" ]
java.net; org.openqa.selenium;
873,963
public void addPackages(User user, Channel channel, Collection packageIds) { changePackages(user, channel, packageIds, true); }
void function(User user, Channel channel, Collection packageIds) { changePackages(user, channel, packageIds, true); }
/** * Adds a list of packages to a channel. * @param user The user requesting the package additions * @param channel The channel to add the packages to * @param packageIds A list containing the ids of packages to add. */
Adds a list of packages to a channel
addPackages
{ "repo_name": "colloquium/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/channel/ChannelEditor.java", "license": "gpl-2.0", "size": 7081 }
[ "com.redhat.rhn.domain.channel.Channel", "com.redhat.rhn.domain.user.User", "java.util.Collection" ]
import com.redhat.rhn.domain.channel.Channel; import com.redhat.rhn.domain.user.User; import java.util.Collection;
import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.domain.user.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
1,571,211
public void transferSuccessful() { if (manageOsCache && getCount() > 0) { try { NativeIO.POSIX.getCacheManipulator().posixFadviseIfPossible(identifier, fd, getPosition(), getCount(), POSIX_FADV_DONTNEED); } catch (Throwable t) { LOG.warn("Failed to manage OS cache for " + i...
void function() { if (manageOsCache && getCount() > 0) { try { NativeIO.POSIX.getCacheManipulator().posixFadviseIfPossible(identifier, fd, getPosition(), getCount(), POSIX_FADV_DONTNEED); } catch (Throwable t) { LOG.warn(STR + identifier, t); } } }
/** * Call when the transfer completes successfully so we can advise the OS that * we don't need the region to be cached anymore. */
Call when the transfer completes successfully so we can advise the OS that we don't need the region to be cached anymore
transferSuccessful
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/FadvisedFileRegion.java", "license": "apache-2.0", "size": 5912 }
[ "org.apache.hadoop.io.nativeio.NativeIO" ]
import org.apache.hadoop.io.nativeio.NativeIO;
import org.apache.hadoop.io.nativeio.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,889,355
public void scrollToRow(int rowIndex, ScrollDestination destination) throws IllegalArgumentException { scrollToRow(rowIndex, destination, destination == ScrollDestination.MIDDLE ? 0 : GridConstants.DEFAULT_PADDING); } /** * Scrolls to a certa...
void function(int rowIndex, ScrollDestination destination) throws IllegalArgumentException { scrollToRow(rowIndex, destination, destination == ScrollDestination.MIDDLE ? 0 : GridConstants.DEFAULT_PADDING); } /** * Scrolls to a certain row using only user-specified parameters. * <p> * If the details for that row are vis...
/** * Scrolls to a certain row, using user-specified scroll destination. * <p> * If the details for that row are visible, those will be taken into account * as well. * * @param rowIndex * zero-based index of the row to scroll to. * @param destination * ...
Scrolls to a certain row, using user-specified scroll destination. If the details for that row are visible, those will be taken into account as well
scrollToRow
{ "repo_name": "fireflyc/vaadin", "path": "client/src/com/vaadin/client/widgets/Grid.java", "license": "apache-2.0", "size": 285073 }
[ "com.vaadin.shared.ui.grid.GridConstants", "com.vaadin.shared.ui.grid.ScrollDestination" ]
import com.vaadin.shared.ui.grid.GridConstants; import com.vaadin.shared.ui.grid.ScrollDestination;
import com.vaadin.shared.ui.grid.*;
[ "com.vaadin.shared" ]
com.vaadin.shared;
2,123
protected void determineAutoIncrementColumns(Table table) throws SQLException { final String query = "SELECT COLNAME FROM SYSCAT.COLUMNS WHERE TABNAME = ? AND IDENTITY = 'Y' AND HIDDEN != 'S'"; PreparedStatement stmt = null; try { stmt = getConnection().prep...
void function(Table table) throws SQLException { final String query = STR; PreparedStatement stmt = null; try { stmt = getConnection().prepareStatement(query); stmt.setString(1, table.getName()); ResultSet rs = stmt.executeQuery(); while (rs.next()) { String colName = rs.getString(1).trim(); Column column = table.findC...
/** * Helper method that determines the auto increment status using Firebird's system tables. * * @param table The table */
Helper method that determines the auto increment status using Firebird's system tables
determineAutoIncrementColumns
{ "repo_name": "apache/ddlutils", "path": "src/main/java/org/apache/ddlutils/platform/db2/Db2ModelReader.java", "license": "apache-2.0", "size": 7988 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "org.apache.ddlutils.model.Column", "org.apache.ddlutils.model.Table" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.apache.ddlutils.model.Column; import org.apache.ddlutils.model.Table;
import java.sql.*; import org.apache.ddlutils.model.*;
[ "java.sql", "org.apache.ddlutils" ]
java.sql; org.apache.ddlutils;
565,762
void addExceptionMapperLookup(ExceptionMapperLookup exceptionMapperLookup);
void addExceptionMapperLookup(ExceptionMapperLookup exceptionMapperLookup);
/** * Adds a new exception mapper lookup. * * @param exceptionMapperLookup * exception mapper lookup */
Adds a new exception mapper lookup
addExceptionMapperLookup
{ "repo_name": "adnovum/katharsis-framework", "path": "katharsis-core/src/main/java/io/katharsis/module/Module.java", "license": "apache-2.0", "size": 4751 }
[ "io.katharsis.core.internal.exception.ExceptionMapperLookup" ]
import io.katharsis.core.internal.exception.ExceptionMapperLookup;
import io.katharsis.core.internal.exception.*;
[ "io.katharsis.core" ]
io.katharsis.core;
1,005,273
public boolean sipStop() throws SameThreadException { Log.d(THIS_FILE, ">> SIP STOP <<"); if (getActiveCallInProgress() != null) { Log.e(THIS_FILE, "We have a call in progress... DO NOT STOP !!!"); // TODO : queue quit on end call; return false; } ...
boolean function() throws SameThreadException { Log.d(THIS_FILE, STR); if (getActiveCallInProgress() != null) { Log.e(THIS_FILE, STR); return false; } if (service.notificationManager != null) { service.notificationManager.cancelRegisters(); } if (created) { cleanPjsua(); } if (tasksTimer != null) { tasksTimer.cancel();...
/** * Stop sip service * * @return true if stop has been performed */
Stop sip service
sipStop
{ "repo_name": "WonderFannn/EntranceSystem", "path": "src/com/csipsimple/pjsip/PjSipService.java", "license": "lgpl-3.0", "size": 97922 }
[ "com.csipsimple.service.SipService", "com.csipsimple.utils.Log" ]
import com.csipsimple.service.SipService; import com.csipsimple.utils.Log;
import com.csipsimple.service.*; import com.csipsimple.utils.*;
[ "com.csipsimple.service", "com.csipsimple.utils" ]
com.csipsimple.service; com.csipsimple.utils;
37,685
protected RGB parseString( String string ) { int colors[] = ColorUtil.getRGBs( string ); if ( colors != null ) return new RGB( colors[0], colors[1], colors[2] ); StringTokenizer st = new StringTokenizer( string, " ,()" );//$NON-NLS-1$ if ( !st.hasMoreTokens( ) ) return null; int[] rgb = new int[]{ ...
RGB function( String string ) { int colors[] = ColorUtil.getRGBs( string ); if ( colors != null ) return new RGB( colors[0], colors[1], colors[2] ); StringTokenizer st = new StringTokenizer( string, STR ); if ( !st.hasMoreTokens( ) ) return null; int[] rgb = new int[]{ 0, 0, 0 }; int index = 0; while ( st.hasMoreTokens...
/** * Parses the input string to a GRB object. * * @param string * The input string. * @return The RGB object represented the string. */
Parses the input string to a GRB object
parseString
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/widget/ColorBuilder.java", "license": "epl-1.0", "size": 15022 }
[ "com.ibm.icu.util.StringTokenizer", "org.eclipse.birt.report.model.api.util.ColorUtil" ]
import com.ibm.icu.util.StringTokenizer; import org.eclipse.birt.report.model.api.util.ColorUtil;
import com.ibm.icu.util.*; import org.eclipse.birt.report.model.api.util.*;
[ "com.ibm.icu", "org.eclipse.birt" ]
com.ibm.icu; org.eclipse.birt;
2,474,412
void prefetchTiles(PlanarImage target, Point[] tileIndices);
void prefetchTiles(PlanarImage target, Point[] tileIndices);
/** * Hints to the <code>TileScheduler</code> that the specified tiles from * the given <code>PlanarImage</code> might be needed in the near future. * Some <code>TileScheduler</code> implementations may spawn a low * priority thread to compute the tiles while others may ignore the hint. * ...
Hints to the <code>TileScheduler</code> that the specified tiles from the given <code>PlanarImage</code> might be needed in the near future. Some <code>TileScheduler</code> implementations may spawn a low priority thread to compute the tiles while others may ignore the hint
prefetchTiles
{ "repo_name": "RoProducts/rastertheque", "path": "JAILibrary/src/javax/media/jai/TileScheduler.java", "license": "gpl-2.0", "size": 10645 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,225,599
public Set<String> os_list(){ Set<String> r= new HashSet<String>(); for ( String family : osMap.keySet()) { JsonOsFamilyEntry fam = osMap.get(family); for (String version: fam.getVersions()){ Set<String> data=new HashSet<String>(); for (String item: fam.getDistro()) {...
Set<String> function(){ Set<String> r= new HashSet<String>(); for ( String family : osMap.keySet()) { JsonOsFamilyEntry fam = osMap.get(family); for (String version: fam.getVersions()){ Set<String> data=new HashSet<String>(); for (String item: fam.getDistro()) { data.add(item + version); } r.addAll(data); } } return r;...
/** * Form list of all supported os types * @return one dimension list with os types */
Form list of all supported os types
os_list
{ "repo_name": "arenadata/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java", "license": "apache-2.0", "size": 7960 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,005,833
public void setTransparency( TransparencyAttributes att ) { appearance.setTransparencyAttributes( att ); }
void function( TransparencyAttributes att ) { appearance.setTransparencyAttributes( att ); }
/** * Used to maintain compatibility with previous implementation. * * @param att */
Used to maintain compatibility with previous implementation
setTransparency
{ "repo_name": "saem/JaamSim", "path": "com/sandwell/JavaSimulation3D/util/Shape.java", "license": "gpl-3.0", "size": 23602 }
[ "javax.media.j3d.TransparencyAttributes" ]
import javax.media.j3d.TransparencyAttributes;
import javax.media.j3d.*;
[ "javax.media" ]
javax.media;
1,947,277
State cancel() throws IOException;
State cancel() throws IOException;
/** * Cancels the pipeline execution. * * @throws IOException if there is a problem executing the cancel request. * @throws UnsupportedOperationException if the runner does not support cancellation. */
Cancels the pipeline execution
cancel
{ "repo_name": "mxm/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/PipelineResult.java", "license": "apache-2.0", "size": 3959 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,589,819
public int doStartTag() throws JspException { try { this.requestContext = new RequestContext((HttpServletRequest) this.pageContext.getRequest()); } catch (ServletException ex) { throw new JspTagException(ex.getMessage()); } return EVAL_BODY_INCLUDE; }
int function() throws JspException { try { this.requestContext = new RequestContext((HttpServletRequest) this.pageContext.getRequest()); } catch (ServletException ex) { throw new JspTagException(ex.getMessage()); } return EVAL_BODY_INCLUDE; }
/** * Create and set the current RequestContext. * Note: Do not forget to call super.doStartTag() in subclasses! */
Create and set the current RequestContext. Note: Do not forget to call super.doStartTag() in subclasses
doStartTag
{ "repo_name": "Will1229/LearnSpring", "path": "spring-framework-0.9.1/src/com/interface21/web/servlet/tags/RequestContextAwareTag.java", "license": "apache-2.0", "size": 2333 }
[ "com.interface21.web.servlet.support.RequestContext", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.jsp.JspException", "javax.servlet.jsp.JspTagException" ]
import com.interface21.web.servlet.support.RequestContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException;
import com.interface21.web.servlet.support.*; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*;
[ "com.interface21.web", "javax.servlet" ]
com.interface21.web; javax.servlet;
367,658
public IntVar getPowerEnd(int idx) { return powerEnds.get(idx); }
IntVar function(int idx) { return powerEnds.get(idx); }
/** * Get the moment a given node is off. * * @param idx the node index * @return the variable denoting the moment. */
Get the moment a given node is off
getPowerEnd
{ "repo_name": "btrplace/scheduler", "path": "choco/src/main/java/org/btrplace/scheduler/choco/view/CPowerView.java", "license": "lgpl-3.0", "size": 2845 }
[ "org.chocosolver.solver.variables.IntVar" ]
import org.chocosolver.solver.variables.IntVar;
import org.chocosolver.solver.variables.*;
[ "org.chocosolver.solver" ]
org.chocosolver.solver;
1,942,327
// Add tModels try { SaveTModel st = (org.uddi.api_v3.SaveTModel) EntityCreator.buildFromDoc(tModelXml, "org.uddi.api_v3"); for (int i = 0; i < st.getTModel().size(); i++) { saveTModel(authInfo, st.getTMode...
try { SaveTModel st = (org.uddi.api_v3.SaveTModel) EntityCreator.buildFromDoc(tModelXml, STR); for (int i = 0; i < st.getTModel().size(); i++) { saveTModel(authInfo, st.getTModel().get(i), false); } } catch (Exception e) { logger.error(e.getMessage(), e); Assert.fail(STR); } }
/** * saves a tmodel using the tModelXml parameter as a file path * * @param authInfo * @param tModelXml this is a relative file path */
saves a tmodel using the tModelXml parameter as a file path
saveTModels
{ "repo_name": "apache/juddi", "path": "uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckTModel.java", "license": "apache-2.0", "size": 16319 }
[ "org.apache.juddi.jaxb.EntityCreator", "org.junit.Assert", "org.uddi.api_v3.SaveTModel" ]
import org.apache.juddi.jaxb.EntityCreator; import org.junit.Assert; import org.uddi.api_v3.SaveTModel;
import org.apache.juddi.jaxb.*; import org.junit.*; import org.uddi.api_v3.*;
[ "org.apache.juddi", "org.junit", "org.uddi.api_v3" ]
org.apache.juddi; org.junit; org.uddi.api_v3;
396,928
public EReference getNonConformLoadGroup_EnergyConsumers() { return (EReference)getNonConformLoadGroup().getEStructuralFeatures().get(1); }
EReference function() { return (EReference)getNonConformLoadGroup().getEStructuralFeatures().get(1); }
/** * Returns the meta object for the reference list '{@link CIM15.IEC61970.LoadModel.NonConformLoadGroup#getEnergyConsumers <em>Energy Consumers</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Energy Consumers</em>'. * @see CIM15.IEC61970.LoadMo...
Returns the meta object for the reference list '<code>CIM15.IEC61970.LoadModel.NonConformLoadGroup#getEnergyConsumers Energy Consumers</code>'.
getNonConformLoadGroup_EnergyConsumers
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61970/LoadModel/LoadModelPackage.java", "license": "apache-2.0", "size": 161452 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
408,004
public void finishReading() { if (currentBuffer != null && !currentBuffer.getBuffer().isEmpty()) { this.dispatcher.send(SortStage.SORT, currentBuffer); } // add the sentinel to notify the receivers that the work is done // send the EOF marker final CircularElement<E> EOF_MARKER = CircularElement.endMa...
void function() { if (currentBuffer != null && !currentBuffer.getBuffer().isEmpty()) { this.dispatcher.send(SortStage.SORT, currentBuffer); } final CircularElement<E> EOF_MARKER = CircularElement.endMarker(); this.dispatcher.send(SortStage.SORT, EOF_MARKER); LOG.debug(STR); }
/** * Signals the end of input. Will flush all buffers and notify later stages. */
Signals the end of input. Will flush all buffers and notify later stages
finishReading
{ "repo_name": "greghogan/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/SorterInputGateway.java", "license": "apache-2.0", "size": 4440 }
[ "org.apache.flink.runtime.operators.sort.StageRunner" ]
import org.apache.flink.runtime.operators.sort.StageRunner;
import org.apache.flink.runtime.operators.sort.*;
[ "org.apache.flink" ]
org.apache.flink;
215,523
private void parseParameters(VoltXMLElement paramsNode) { m_paramList = new ParameterValueExpression[paramsNode.children.size()]; for (VoltXMLElement node : paramsNode.children) { if (node.name.equalsIgnoreCase("parameter")) { long id = Long.parseLong(node.attributes.get...
void function(VoltXMLElement paramsNode) { m_paramList = new ParameterValueExpression[paramsNode.children.size()]; for (VoltXMLElement node : paramsNode.children) { if (node.name.equalsIgnoreCase(STR)) { long id = Long.parseLong(node.attributes.get("id")); int index = Integer.parseInt(node.attributes.get("index")); Str...
/** * Populate the statement's paramList from the "parameters" element * @param paramsNode */
Populate the statement's paramList from the "parameters" element
parseParameters
{ "repo_name": "eoneil1942/voltdb-4.7fix", "path": "src/frontend/org/voltdb/planner/AbstractParsedStmt.java", "license": "agpl-3.0", "size": 32118 }
[ "org.hsqldb_voltpatches.VoltXMLElement", "org.voltdb.VoltType", "org.voltdb.expressions.ParameterValueExpression" ]
import org.hsqldb_voltpatches.VoltXMLElement; import org.voltdb.VoltType; import org.voltdb.expressions.ParameterValueExpression;
import org.hsqldb_voltpatches.*; import org.voltdb.*; import org.voltdb.expressions.*;
[ "org.hsqldb_voltpatches", "org.voltdb", "org.voltdb.expressions" ]
org.hsqldb_voltpatches; org.voltdb; org.voltdb.expressions;
1,374,584
public Task getTask() { if (this.getParentScreen() != null) return this.getParentScreen().getTask(); return null; // Never }
Task function() { if (this.getParentScreen() != null) return this.getParentScreen().getTask(); return null; }
/** * Get the environment to use for this record owner. * @return Record owner's environment, or null to use the default enviroment. */
Get the environment to use for this record owner
getTask
{ "repo_name": "jbundle/jbundle", "path": "base/screen/model/src/main/java/org/jbundle/base/screen/model/BasePanel.java", "license": "gpl-3.0", "size": 67866 }
[ "org.jbundle.model.Task" ]
import org.jbundle.model.Task;
import org.jbundle.model.*;
[ "org.jbundle.model" ]
org.jbundle.model;
1,672,686
public void toTable(ArrayList<Cell> table) { left.toTable(table); right.toTable(table); }
void function(ArrayList<Cell> table) { left.toTable(table); right.toTable(table); }
/** * Build the table representing the histogram data adding the data from each subtree. */
Build the table representing the histogram data adding the data from each subtree
toTable
{ "repo_name": "popikyardo/movsim-extended", "path": "common/src/main/java/com/flaptor/hist4j/HistogramForkNode.java", "license": "gpl-3.0", "size": 5924 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,150,626
Table<Node, String, Set<QueueSpecification>> create(FlowSpecification specification);
Table<Node, String, Set<QueueSpecification>> create(FlowSpecification specification);
/** * Given a {@link FlowSpecification} we generate a map of from flowlet * to to flowlet with their queue and schema. * * @param specification of a Flow * @return A {@link Table} consisting of From, To Flowlet and QueueSpecification. */
Given a <code>FlowSpecification</code> we generate a map of from flowlet to to flowlet with their queue and schema
create
{ "repo_name": "mpouttuclarke/cdap", "path": "cdap-app-fabric/src/main/java/co/cask/cdap/app/queue/QueueSpecificationGenerator.java", "license": "apache-2.0", "size": 2466 }
[ "co.cask.cdap.api.flow.FlowSpecification", "com.google.common.collect.Table", "java.util.Set" ]
import co.cask.cdap.api.flow.FlowSpecification; import com.google.common.collect.Table; import java.util.Set;
import co.cask.cdap.api.flow.*; import com.google.common.collect.*; import java.util.*;
[ "co.cask.cdap", "com.google.common", "java.util" ]
co.cask.cdap; com.google.common; java.util;
1,158,994
static String toString(AudioDeviceInfo adi){ StringBuilder sb = new StringBuilder(); sb.append("Id: "); sb.append(adi.getId()); sb.append("\nProduct name: "); sb.append(adi.getProductName()); sb.append("\nType: "); sb.append(typeToString(adi.getType())); ...
static String toString(AudioDeviceInfo adi){ StringBuilder sb = new StringBuilder(); sb.append(STR); sb.append(adi.getId()); sb.append(STR); sb.append(adi.getProductName()); sb.append(STR); sb.append(typeToString(adi.getType())); sb.append(STR); sb.append((adi.isSource() ? "Yes" : "No")); sb.append(STR); sb.append((adi...
/** * Converts an {@link AudioDeviceInfo} object into a human readable representation * * @param adi The AudioDeviceInfo object to be converted to a String * @return String containing all the information from the AudioDeviceInfo object */
Converts an <code>AudioDeviceInfo</code> object into a human readable representation
toString
{ "repo_name": "aschober/vinyl-cast", "path": "app/src/main/java/com/google/sample/audio_device/AudioDeviceInfoConverter.java", "license": "mit", "size": 5206 }
[ "android.media.AudioDeviceInfo" ]
import android.media.AudioDeviceInfo;
import android.media.*;
[ "android.media" ]
android.media;
1,127,869
public MultiUserChatManager getMultiUserChatManager() { return (MultiUserChatManager) modules.get(MultiUserChatManager.class); }
MultiUserChatManager function() { return (MultiUserChatManager) modules.get(MultiUserChatManager.class); }
/** * Returns the <code>MultiUserChatManager</code> registered with this server. The * <code>MultiUserChatManager</code> was registered with the server as a module while starting up * the server. * * @return the <code>MultiUserChatManager</code> registered with this server. */
Returns the <code>MultiUserChatManager</code> registered with this server. The <code>MultiUserChatManager</code> was registered with the server as a module while starting up the server
getMultiUserChatManager
{ "repo_name": "GregDThomas/Openfire", "path": "xmppserver/src/main/java/org/jivesoftware/openfire/XMPPServer.java", "license": "apache-2.0", "size": 78835 }
[ "org.jivesoftware.openfire.muc.MultiUserChatManager" ]
import org.jivesoftware.openfire.muc.MultiUserChatManager;
import org.jivesoftware.openfire.muc.*;
[ "org.jivesoftware.openfire" ]
org.jivesoftware.openfire;
1,978,730
public void busy(Address selected);
void function(Address selected);
/** * Called when we establish a connection, but the peer we reach replies that it is too busy * * @param selected */
Called when we establish a connection, but the peer we reach replies that it is too busy
busy
{ "repo_name": "mica-gossip/MiCA", "path": "src/main/java/org/princehouse/mica/base/model/Protocol.java", "license": "bsd-3-clause", "size": 3632 }
[ "org.princehouse.mica.base.net.model.Address" ]
import org.princehouse.mica.base.net.model.Address;
import org.princehouse.mica.base.net.model.*;
[ "org.princehouse.mica" ]
org.princehouse.mica;
452,748
@Test public void formatAddDouble() { // Setup. Function<Double> function; { final TreeNode<Double> child0 = new ConstantTerminal<Double>(converterDouble, 1.0); final TreeNode<Double> child1 = new VariableTerminal<Double>(converterDouble, "x"); fun...
void function() { Function<Double> function; { final TreeNode<Double> child0 = new ConstantTerminal<Double>(converterDouble, 1.0); final TreeNode<Double> child1 = new VariableTerminal<Double>(converterDouble, "x"); function = new AddFunction<Double>(converterDouble, child0, child1); } final XMLFunctionFormat<Double> fo...
/** * Test the <code>format()</code> method. */
Test the <code>format()</code> method
formatAddDouble
{ "repo_name": "jmthompson2015/vizzini", "path": "ai/src/test/java/org/vizzini/ai/geneticalgorithm/geneticprogramming/XMLFunctionFormatTest.java", "license": "mit", "size": 20937 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
851,637
private Result pJeannieJava$JavaImports(final int yyStart) throws IOException { Result yyResult; int yyRepetition1; Pair<Node> yyRepValue1; Node yyValue; ParseError yyError = ParseError.DUMMY; // Alternative 1. yyRepetition1 = yyStart; yyRepValue1 = Pair.empt...
private Result pJeannieJava$JavaImports(final int yyStart) throws IOException { Result yyResult; int yyRepetition1; Pair<Node> yyRepValue1; Node yyValue; ParseError yyError = ParseError.DUMMY; yyRepetition1 = yyStart; yyRepValue1 = Pair.empty(); while (true) { yyResult = pImportDeclaration(yyRepetition1); yyError = yyR...
/** * Parse nonterminal xtc.lang.jeannie.JeannieJava.JavaImports. * * @param yyStart The index. * @return The result. * @throws IOException Signals an I/O error. */
Parse nonterminal xtc.lang.jeannie.JeannieJava.JavaImports
pJeannieJava$JavaImports
{ "repo_name": "wandoulabs/xtc-rats", "path": "xtc-core/src/main/java/xtc/lang/jeannie/JeannieParser.java", "license": "lgpl-2.1", "size": 647687 }
[ "java.io.IOException", "xtc.parser.ParseError", "xtc.parser.Result", "xtc.parser.SemanticValue", "xtc.tree.GNode", "xtc.tree.Node", "xtc.util.Pair" ]
import java.io.IOException; import xtc.parser.ParseError; import xtc.parser.Result; import xtc.parser.SemanticValue; import xtc.tree.GNode; import xtc.tree.Node; import xtc.util.Pair;
import java.io.*; import xtc.parser.*; import xtc.tree.*; import xtc.util.*;
[ "java.io", "xtc.parser", "xtc.tree", "xtc.util" ]
java.io; xtc.parser; xtc.tree; xtc.util;
2,001,608
public Map getParams() { return request != null ? request.getParameters() : null; }
Map function() { return request != null ? request.getParameters() : null; }
/** * Get the request parameters. * * @return The request parameters */
Get the request parameters
getParams
{ "repo_name": "iritgo/iritgo-aktera", "path": "aktera-ui/src/main/java/de/iritgo/aktera/ui/el/ExpressionLanguageContext.java", "license": "apache-2.0", "size": 6761 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,291,060
private AuthorizationContext getAuthorizationContext() { return securityContext.getAuthorizationContext(); }
AuthorizationContext function() { return securityContext.getAuthorizationContext(); }
/** * Returns a {@link AuthorizationContext} instance holding all permissions granted for an user. The instance is build based on * the permissions returned by Keycloak. For this particular application, we use the Entitlement API to obtain permissions for every single * resource on the server. * ...
Returns a <code>AuthorizationContext</code> instance holding all permissions granted for an user. The instance is build based on the permissions returned by Keycloak. For this particular application, we use the Entitlement API to obtain permissions for every single resource on the server
getAuthorizationContext
{ "repo_name": "keycloak/keycloak-quickstarts", "path": "app-authz-springboot/src/main/java/org/keycloak/quickstart/springboot/security/Identity.java", "license": "apache-2.0", "size": 3027 }
[ "org.keycloak.AuthorizationContext" ]
import org.keycloak.AuthorizationContext;
import org.keycloak.*;
[ "org.keycloak" ]
org.keycloak;
1,151,236
List<CmsResource> getResources(CmsObject cms, Map<String, String> params, String workflowId) throws CmsException;
List<CmsResource> getResources(CmsObject cms, Map<String, String> params, String workflowId) throws CmsException;
/** * Gets the resources of the virtual project.<p> * * @param cms the CMS context to use * @param params the publish parameters * @param workflowId the workflow id * * @return the generated list of resources * * @throws CmsException if something goes wrong */
Gets the resources of the virtual project
getResources
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/ade/publish/I_CmsVirtualProject.java", "license": "lgpl-2.1", "size": 3299 }
[ "java.util.List", "java.util.Map", "org.opencms.file.CmsObject", "org.opencms.file.CmsResource", "org.opencms.main.CmsException" ]
import java.util.List; import java.util.Map; import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; import org.opencms.main.CmsException;
import java.util.*; import org.opencms.file.*; import org.opencms.main.*;
[ "java.util", "org.opencms.file", "org.opencms.main" ]
java.util; org.opencms.file; org.opencms.main;
1,671,803
@Test public void doesUserMeetAudienceConditionsReturnsTrueIfUserDoesNotSatisfyAnyAudiences() { Experiment experiment = projectConfig.getExperiments().get(0); Map<String, String> attributes = Collections.singletonMap("browser_type", "firefox"); Boolean result = doesUserMeetAudienceCondit...
void function() { Experiment experiment = projectConfig.getExperiments().get(0); Map<String, String> attributes = Collections.singletonMap(STR, STR); Boolean result = doesUserMeetAudienceConditions(projectConfig, experiment, attributes, EXPERIMENT, experiment.getKey()).getResult(); assertFalse(result); logbackVerifier....
/** * If the attributes satisfies no {@link Condition} of any {@link Audience} of the {@link Experiment}, * then {@link ExperimentUtils#doesUserMeetAudienceConditions(ProjectConfig, Experiment, Map, String, String)} should return false. */
If the attributes satisfies no <code>Condition</code> of any <code>Audience</code> of the <code>Experiment</code>, then <code>ExperimentUtils#doesUserMeetAudienceConditions(ProjectConfig, Experiment, Map, String, String)</code> should return false
doesUserMeetAudienceConditionsReturnsTrueIfUserDoesNotSatisfyAnyAudiences
{ "repo_name": "optimizely/java-sdk", "path": "core-api/src/test/java/com/optimizely/ab/internal/ExperimentUtilsTest.java", "license": "apache-2.0", "size": 16582 }
[ "ch.qos.logback.classic.Level", "com.optimizely.ab.config.Experiment", "com.optimizely.ab.internal.ExperimentUtils", "java.util.Collections", "java.util.Map", "org.junit.Assert" ]
import ch.qos.logback.classic.Level; import com.optimizely.ab.config.Experiment; import com.optimizely.ab.internal.ExperimentUtils; import java.util.Collections; import java.util.Map; import org.junit.Assert;
import ch.qos.logback.classic.*; import com.optimizely.ab.config.*; import com.optimizely.ab.internal.*; import java.util.*; import org.junit.*;
[ "ch.qos.logback", "com.optimizely.ab", "java.util", "org.junit" ]
ch.qos.logback; com.optimizely.ab; java.util; org.junit;
1,098,916
private synchronized boolean bridgeCommunicate(BridgeCommunicationProtocol communication, boolean useAuthentication) { logger.trace("bridgeCommunicate({},{}authenticated) called.", communication.name(), useAuthentication ? "" : "un"); if (!isAuthenticated()) { ...
synchronized boolean function(BridgeCommunicationProtocol communication, boolean useAuthentication) { logger.trace(STR, communication.name(), useAuthentication ? STRunSTRbridgeCommunicate(): no auth token available, aborting.STRbridgeCommunicate(): no auth token available, continuing."); } } return bridgeDirectCommunic...
/** * Initializes a client/server communication towards <b>Velux</b> veluxBridge * based on the Basic I/O interface {@link VeluxBridge} and parameters * passed as arguments (see below) and provided by VeluxBridgeConfiguration. * * @param communication the intended communication, * ...
Initializes a client/server communication towards Velux veluxBridge based on the Basic I/O interface <code>VeluxBridge</code> and parameters passed as arguments (see below) and provided by VeluxBridgeConfiguration
bridgeCommunicate
{ "repo_name": "paulianttila/openhab2", "path": "bundles/org.openhab.binding.velux/src/main/java/org/openhab/binding/velux/internal/bridge/VeluxBridge.java", "license": "epl-1.0", "size": 11477 }
[ "org.openhab.binding.velux.internal.bridge.common.BridgeCommunicationProtocol" ]
import org.openhab.binding.velux.internal.bridge.common.BridgeCommunicationProtocol;
import org.openhab.binding.velux.internal.bridge.common.*;
[ "org.openhab.binding" ]
org.openhab.binding;
132,728
public String[] getChildrenProperties(String parent) { String[] propName = parsePropertyName(parent); // Search for this property by traversing down the XML heirarchy. Element element = document.getRootElement(); for (String aPropName : propName) { element = element.element(aPropName); if (element == n...
String[] function(String parent) { String[] propName = parsePropertyName(parent); Element element = document.getRootElement(); for (String aPropName : propName) { element = element.element(aPropName); if (element == null) { return new String[] {}; } } List children = element.elements(); int childCount = children.size()...
/** * Return all children property names of a parent property as a String * array, or an empty array if the if there are no children. For example, * given the properties <tt>X.Y.A</tt>, <tt>X.Y.B</tt>, and <tt>X.Y.C</tt>, * then the child properties of <tt>X.Y</tt> are <tt>A</tt>, <tt>B</tt>, and * <tt>C</tt>...
Return all children property names of a parent property as a String array, or an empty array if the if there are no children. For example, given the properties X.Y.A, X.Y.B, and X.Y.C, then the child properties of X.Y are A, B, and C
getChildrenProperties
{ "repo_name": "andang72/architecture-ee", "path": "src/main/java/architecture/ee/util/xml/XmlProperties.java", "license": "apache-2.0", "size": 22660 }
[ "java.util.List", "org.dom4j.Element" ]
import java.util.List; import org.dom4j.Element;
import java.util.*; import org.dom4j.*;
[ "java.util", "org.dom4j" ]
java.util; org.dom4j;
1,691,789
protected List<File> find(final File startDirectory) { final List<File> results = new ArrayList<File>(); try { walk(startDirectory, results); } catch (final IOException ex) { Assert.fail(ex.toString()); } return results;...
List<File> function(final File startDirectory) { final List<File> results = new ArrayList<File>(); try { walk(startDirectory, results); } catch (final IOException ex) { Assert.fail(ex.toString()); } return results; }
/** * find files. */
find files
find
{ "repo_name": "jankill/commons-io", "path": "src/test/java/org/apache/commons/io/DirectoryWalkerTestCaseJava4.java", "license": "apache-2.0", "size": 20381 }
[ "java.io.File", "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.junit.Assert" ]
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.junit.Assert;
import java.io.*; import java.util.*; import org.junit.*;
[ "java.io", "java.util", "org.junit" ]
java.io; java.util; org.junit;
2,700,914
private String getString(File source, String title, boolean allowMissing) throws IOException { if (!source.exists() && allowMissing) { logger.warn("{} doesn't exist, assuming no {}", source, title); return null; } try (var br = new BufferedReader(new FileReader(sour...
String function(File source, String title, boolean allowMissing) throws IOException { if (!source.exists() && allowMissing) { logger.warn(STR, source, title); return null; } try (var br = new BufferedReader(new FileReader(source))) { return br.readLine(); } }
/** * Read a single string from the given file. * * Used to read {@code client_id}, {@code client_secret}, and {@code refresh_token}. * * @param source File to read the string from. * @param title Title to report in the log if needed. * @param allowMissing {@code true} to return {@cod...
Read a single string from the given file. Used to read client_id, client_secret, and refresh_token
getString
{ "repo_name": "home-climate-control/dz", "path": "dz3-http/src/main/java/net/sf/dz3/view/http/v3/OAuth2DeviceIdentityProvider.java", "license": "gpl-3.0", "size": 13667 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileReader", "java.io.IOException" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,390,000
protected synchronized static void drawAt(final Canvas canvas, final Drawable drawable, final int x, final int y, final boolean shadow, final float aMapOrientation) { canvas.save(); canvas.rotate(-aMapOrienta...
synchronized static void function(final Canvas canvas, final Drawable drawable, final int x, final int y, final boolean shadow, final float aMapOrientation) { canvas.save(); canvas.rotate(-aMapOrientation, x, y); drawable.copyBounds(mRect); drawable.setBounds(mRect.left + x, mRect.top + y, mRect.right + x, mRect.bottom...
/** * Convenience method to draw a Drawable at an offset. x and y are pixel coordinates. You can * find appropriate coordinates from latitude/longitude using the MapView.getProjection() method * on the MapView passed to you in draw(Canvas, MapView, boolean). * * @param shadow If true, ...
Convenience method to draw a Drawable at an offset. x and y are pixel coordinates. You can find appropriate coordinates from latitude/longitude using the MapView.getProjection() method on the MapView passed to you in draw(Canvas, MapView, boolean)
drawAt
{ "repo_name": "osmdroid/osmdroid", "path": "osmdroid-android/src/main/java/org/osmdroid/views/overlay/Overlay.java", "license": "apache-2.0", "size": 14051 }
[ "android.graphics.Canvas", "android.graphics.drawable.Drawable" ]
import android.graphics.Canvas; import android.graphics.drawable.Drawable;
import android.graphics.*; import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
309,606
public DependencyCollectionTask getDependencyTaskForMultiInsert() { if (dependencyTaskForMultiInsert == null) { if (conf.getBoolVar(ConfVars.HIVE_MULTI_INSERT_MOVE_TASKS_SHARE_DEPENDENCIES)) { dependencyTaskForMultiInsert = (DependencyCollectionTask) TaskFactory.get(new DependencyCollect...
DependencyCollectionTask function() { if (dependencyTaskForMultiInsert == null) { if (conf.getBoolVar(ConfVars.HIVE_MULTI_INSERT_MOVE_TASKS_SHARE_DEPENDENCIES)) { dependencyTaskForMultiInsert = (DependencyCollectionTask) TaskFactory.get(new DependencyCollectionWork()); } } return dependencyTaskForMultiInsert; }
/** * Returns dependencyTaskForMultiInsert initializing it if necessary. * * dependencyTaskForMultiInsert serves as a mutual dependency for the final move tasks in a * multi-insert query. * * @return */
Returns dependencyTaskForMultiInsert initializing it if necessary. dependencyTaskForMultiInsert serves as a mutual dependency for the final move tasks in a multi-insert query
getDependencyTaskForMultiInsert
{ "repo_name": "alanfgates/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMRProcContext.java", "license": "apache-2.0", "size": 12509 }
[ "org.apache.hadoop.hive.conf.HiveConf", "org.apache.hadoop.hive.ql.exec.DependencyCollectionTask", "org.apache.hadoop.hive.ql.exec.TaskFactory", "org.apache.hadoop.hive.ql.plan.DependencyCollectionWork" ]
import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.exec.DependencyCollectionTask; import org.apache.hadoop.hive.ql.exec.TaskFactory; import org.apache.hadoop.hive.ql.plan.DependencyCollectionWork;
import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.plan.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
722,744
public final byte[] toByteArray() { ByteBuffer bb = toByteBuffer(); if (bb.hasArray() && bb.arrayOffset() == 0 && bb.limit() == bb.capacity()) { return bb.array(); } else { // create a new buffer of just the right size and copy the old buffer into it ByteBuffer tmp = ByteBuffer.a...
final byte[] function() { ByteBuffer bb = toByteBuffer(); if (bb.hasArray() && bb.arrayOffset() == 0 && bb.limit() == bb.capacity()) { return bb.array(); } else { ByteBuffer tmp = ByteBuffer.allocate(bb.remaining()); tmp.put(bb); tmp.flip(); this.buffer = tmp; return this.buffer.array(); } }
/** gets the contents of this stream as a byte[]. * The stream should not be written to past this point until it has been reset. */
gets the contents of this stream as a byte[]. The stream should not be written to past this point until it has been reset
toByteArray
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java", "license": "apache-2.0", "size": 36654 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,214,123
int compareCursorKeyTo(RawComparable other) throws IOException { checkKey(); return reader.compareKeys(keyBuffer, 0, klen, other.buffer(), other .offset(), other.size()); }
int compareCursorKeyTo(RawComparable other) throws IOException { checkKey(); return reader.compareKeys(keyBuffer, 0, klen, other.buffer(), other .offset(), other.size()); }
/** * Internal API. Comparing the key at cursor to user-specified key. * * @param other * user-specified key. * @return negative if key at cursor is smaller than user key; 0 if equal; * and positive if key at cursor greater than user key. * @throws IOEx...
Internal API. Comparing the key at cursor to user-specified key
compareCursorKeyTo
{ "repo_name": "koichi626/hadoop-gpu", "path": "hadoop-gpu-0.20.1/src/core/org/apache/hadoop/io/file/tfile/TFile.java", "license": "apache-2.0", "size": 74043 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
179,439
public static String sha(final String data) { return digest(MessageDigestAlgorithms.SHA_1, data); }
static String function(final String data) { return digest(MessageDigestAlgorithms.SHA_1, data); }
/** * Computes hex encoded SHA digest. * * @param data data to be hashed * @return sha hash */
Computes hex encoded SHA digest
sha
{ "repo_name": "pdrados/cas", "path": "core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DigestUtils.java", "license": "apache-2.0", "size": 5843 }
[ "org.apache.commons.codec.digest.MessageDigestAlgorithms" ]
import org.apache.commons.codec.digest.MessageDigestAlgorithms;
import org.apache.commons.codec.digest.*;
[ "org.apache.commons" ]
org.apache.commons;
314,495
public static ContentType create( final String mimeType, final String charset) throws UnsupportedCharsetException { return create(mimeType, !TextUtils.isBlank(charset) ? Charset.forName(charset) : null); }
static ContentType function( final String mimeType, final String charset) throws UnsupportedCharsetException { return create(mimeType, !TextUtils.isBlank(charset) ? Charset.forName(charset) : null); }
/** * Creates a new instance of {@link ContentType}. * * @param mimeType MIME type. It may not be <code>null</code> or empty. It may not contain * characters <">, <;>, <,> reserved by the HTTP specification. * @param charset charset. It may not contain characters <">, <;>, <,> reserved b...
Creates a new instance of <code>ContentType</code>
create
{ "repo_name": "mcomella/FirefoxAccounts-android", "path": "thirdparty/src/main/java/ch/boye/httpclientandroidlib/entity/ContentType.java", "license": "mpl-2.0", "size": 11918 }
[ "ch.boye.httpclientandroidlib.util.TextUtils", "java.nio.charset.Charset", "java.nio.charset.UnsupportedCharsetException" ]
import ch.boye.httpclientandroidlib.util.TextUtils; import java.nio.charset.Charset; import java.nio.charset.UnsupportedCharsetException;
import ch.boye.httpclientandroidlib.util.*; import java.nio.charset.*;
[ "ch.boye.httpclientandroidlib", "java.nio" ]
ch.boye.httpclientandroidlib; java.nio;
699,764
public @NotNull User getUser() { return user; }//END METHOD getUser()
@NotNull User function() { return user; }
/** * Returns the User object * @return User object */
Returns the User object
getUser
{ "repo_name": "Clumsy-Coder/CPSC3780-Project", "path": "Utilities/src/utilities/UserNetworkInfo.java", "license": "mit", "size": 3030 }
[ "com.sun.istack.internal.NotNull" ]
import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.*;
[ "com.sun.istack" ]
com.sun.istack;
3,035
final class EndpointLocal<I> extends OutputEndpointImpl<I,InputStream> implements OutputEndpoint { private EndpointLocal(DatabaseClient client, JSONWriteHandle apiDecl) { super(client, apiDecl, new HandleProvider.ContentHandleProvider<>(null, new InputStreamHandle())); ...
final class EndpointLocal<I> extends OutputEndpointImpl<I,InputStream> implements OutputEndpoint { private EndpointLocal(DatabaseClient client, JSONWriteHandle apiDecl) { super(client, apiDecl, new HandleProvider.ContentHandleProvider<>(null, new InputStreamHandle())); }
/** * Constructs an instance of the OutputEndpoint interface. * @param client the database client to use for making calls * @param apiDecl the JSON api declaration specifying how to call the endpoint * @return the OutputEndpoint instance for calling the endpoint. */
Constructs an instance of the OutputEndpoint interface
on
{ "repo_name": "marklogic/java-client-api", "path": "marklogic-client-api/src/main/java/com/marklogic/client/dataservices/OutputEndpoint.java", "license": "apache-2.0", "size": 3339 }
[ "com.marklogic.client.DatabaseClient", "com.marklogic.client.dataservices.impl.HandleProvider", "com.marklogic.client.dataservices.impl.OutputEndpointImpl", "com.marklogic.client.io.InputStreamHandle", "com.marklogic.client.io.marker.JSONWriteHandle", "java.io.InputStream" ]
import com.marklogic.client.DatabaseClient; import com.marklogic.client.dataservices.impl.HandleProvider; import com.marklogic.client.dataservices.impl.OutputEndpointImpl; import com.marklogic.client.io.InputStreamHandle; import com.marklogic.client.io.marker.JSONWriteHandle; import java.io.InputStream;
import com.marklogic.client.*; import com.marklogic.client.dataservices.impl.*; import com.marklogic.client.io.*; import com.marklogic.client.io.marker.*; import java.io.*;
[ "com.marklogic.client", "java.io" ]
com.marklogic.client; java.io;
1,293,419
public static String getAuthorization(final OAuthService service) throws IOException { for (Authorization auth : service.getAuthorizations()) if (isValidAuthorization(auth, SCOPES)) return auth.getToken(); return null; }
static String function(final OAuthService service) throws IOException { for (Authorization auth : service.getAuthorizations()) if (isValidAuthorization(auth, SCOPES)) return auth.getToken(); return null; }
/** * Get existing authorization for this app * * @param service * @return token or null if none found * @throws IOException */
Get existing authorization for this app
getAuthorization
{ "repo_name": "avengerpb/androiddev2017", "path": "Github_client/app/src/main/java/com/example/sieunhan/github_client/accounts/AccountAuthenticator.java", "license": "apache-2.0", "size": 7064 }
[ "java.io.IOException", "org.eclipse.egit.github.core.Authorization", "org.eclipse.egit.github.core.service.OAuthService" ]
import java.io.IOException; import org.eclipse.egit.github.core.Authorization; import org.eclipse.egit.github.core.service.OAuthService;
import java.io.*; import org.eclipse.egit.github.core.*; import org.eclipse.egit.github.core.service.*;
[ "java.io", "org.eclipse.egit" ]
java.io; org.eclipse.egit;
1,527,645
public static void main(String[] args) throws IOException, InterruptedException { try { initConfSingleton(args); // WEB APP SETUP // instead of using web.xml, we use java-based configuration WebappContext webappContext = new WebappContext("production"); // add a listener to spring so that IoC...
static void function(String[] args) throws IOException, InterruptedException { try { initConfSingleton(args); WebappContext webappContext = new WebappContext(STR); webappContext.addListener(ContextLoaderListener.class); webappContext.addContextInitParameter( ContextLoader.CONTEXT_CLASS_PARAM, AnnotationConfigWebApplica...
/** * Main method . * * @param args * @throws IOException * @throws InterruptedException */
Main method
main
{ "repo_name": "nherbaut/jdev2015T6A01", "path": "dvd2c-box/src/main/java/com/enseirb/telecom/dngroup/dvd2c/Main.java", "license": "apache-2.0", "size": 9158 }
[ "com.lexicalscope.jewel.cli.HelpRequestedException", "java.io.IOException", "javax.servlet.ServletRegistration", "javax.ws.rs.client.Client", "javax.ws.rs.client.ClientBuilder", "javax.ws.rs.client.WebTarget", "org.glassfish.grizzly.http.server.CLStaticHttpHandler", "org.glassfish.grizzly.http.server....
import com.lexicalscope.jewel.cli.HelpRequestedException; import java.io.IOException; import javax.servlet.ServletRegistration; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.WebTarget; import org.glassfish.grizzly.http.server.CLStaticHttpHandler; import org.glassfi...
import com.lexicalscope.jewel.cli.*; import java.io.*; import javax.servlet.*; import javax.ws.rs.client.*; import org.glassfish.grizzly.http.server.*; import org.glassfish.grizzly.servlet.*; import org.glassfish.jersey.servlet.*; import org.springframework.web.context.*; import org.springframework.web.context.support....
[ "com.lexicalscope.jewel", "java.io", "javax.servlet", "javax.ws", "org.glassfish.grizzly", "org.glassfish.jersey", "org.springframework.web" ]
com.lexicalscope.jewel; java.io; javax.servlet; javax.ws; org.glassfish.grizzly; org.glassfish.jersey; org.springframework.web;
2,060,067
public BudgetDecimal getApplicableCostSharing() { return applicableCostSharing; }
BudgetDecimal function() { return applicableCostSharing; }
/** * Gets the applicableCostSharing attribute. * @return Returns the applicableCostSharing. */
Gets the applicableCostSharing attribute
getApplicableCostSharing
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/budget/calculator/Boundary.java", "license": "apache-2.0", "size": 5789 }
[ "org.kuali.kra.budget.BudgetDecimal" ]
import org.kuali.kra.budget.BudgetDecimal;
import org.kuali.kra.budget.*;
[ "org.kuali.kra" ]
org.kuali.kra;
2,150,461
public static void setStatusBarVisibility(@NonNull final Window window, final boolean isVisible) { if (isVisible) { window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); showStatusBarView(window); addMarginTopEqualSta...
static void function(@NonNull final Window window, final boolean isVisible) { if (isVisible) { window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); showStatusBarView(window); addMarginTopEqualStatusBarHeight(window); } else { window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); hideStatusBarView(windo...
/** * Set the status bar's visibility. * * @param window The window. * @param isVisible True to set status bar visible, false otherwise. */
Set the status bar's visibility
setStatusBarVisibility
{ "repo_name": "didi/DoraemonKit", "path": "Android/dokit-util/src/main/java/com/didichuxing/doraemonkit/util/BarUtils.java", "license": "apache-2.0", "size": 27876 }
[ "android.view.Window", "android.view.WindowManager", "androidx.annotation.NonNull" ]
import android.view.Window; import android.view.WindowManager; import androidx.annotation.NonNull;
import android.view.*; import androidx.annotation.*;
[ "android.view", "androidx.annotation" ]
android.view; androidx.annotation;
1,609,169
public DataBean setDate(final DateTime _docDate) { docDate = _docDate; return this; }
DataBean function(final DateTime _docDate) { docDate = _docDate; return this; }
/** * Sets the date. * * @param _docDate the doc date * @return the data bean */
Sets the date
setDate
{ "repo_name": "eFaps/eFapsApp-Sales", "path": "src/main/efaps/ESJP/org/efaps/esjp/sales/report/SalesProductReport_Base.java", "license": "apache-2.0", "size": 74706 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
390,833
public void testLowerKey() { TreeMap q = map5(); Object e1 = q.lowerKey(three); assertEquals(two, e1); Object e2 = q.lowerKey(six); assertEquals(five, e2); Object e3 = q.lowerKey(one); assertNull(e3); Object e4 = q.lowerKey(zero); assertNull...
void function() { TreeMap q = map5(); Object e1 = q.lowerKey(three); assertEquals(two, e1); Object e2 = q.lowerKey(six); assertEquals(five, e2); Object e3 = q.lowerKey(one); assertNull(e3); Object e4 = q.lowerKey(zero); assertNull(e4); }
/** * lowerKey returns preceding element */
lowerKey returns preceding element
testLowerKey
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "jsr166-tests/src/test/java/jsr166/TreeMapTest.java", "license": "gpl-2.0", "size": 33145 }
[ "java.util.TreeMap" ]
import java.util.TreeMap;
import java.util.*;
[ "java.util" ]
java.util;
43,409
public static void copy(InputStream input, Writer output) throws IOException { InputStreamReader in = new InputStreamReader(input); copy(in, output); }
static void function(InputStream input, Writer output) throws IOException { InputStreamReader in = new InputStreamReader(input); copy(in, output); }
/** * Copy bytes from an <code>InputStream</code> to chars on a * <code>Writer</code> using the default character encoding of the platform. * <p> * This method buffers the input internally, so there is no need to use a * <code>BufferedInputStream</code>. * <p> * This method uses {@link InputStreamR...
Copy bytes from an <code>InputStream</code> to chars on a <code>Writer</code> using the default character encoding of the platform. This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>. This method uses <code>InputStreamReader</code>
copy
{ "repo_name": "schiermike/syncarus", "path": "src/org/apache/commons/io/IOUtils.java", "license": "gpl-3.0", "size": 39430 }
[ "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.io.Writer" ]
import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
2,173,851
public void populate(String actionBy, Date actionTime) throws HistoryTableException;
void function(String actionBy, Date actionTime) throws HistoryTableException;
/** * Populate the history table. * * @param actionBy the action by. * @param actionTime the action time. * * @throws HistoryTableException if unable to populate the history table. */
Populate the history table
populate
{ "repo_name": "lazydog-org/persistence-history-parent", "path": "persistence-history-api/src/main/java/org/lazydog/persistence/history/HistoryTable.java", "license": "lgpl-3.0", "size": 2214 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
121,562
public List<Projection> parseDocumentProjection() { this.allowRelationalColumns = false; return parseCommaSeparatedList(() -> { Projection.Builder builder = Projection.newBuilder(); builder.setSource(expr()); // alias is not optional for document projection ...
List<Projection> function() { this.allowRelationalColumns = false; return parseCommaSeparatedList(() -> { Projection.Builder builder = Projection.newBuilder(); builder.setSource(expr()); consumeToken(TokenType.AS); builder.setAlias(consumeToken(TokenType.IDENT)); return builder.build(); }); }
/** * Parse a document projection which is similar to SELECT but with document paths as the target alias. * * @return list of {@link Projection} objects */
Parse a document projection which is similar to SELECT but with document paths as the target alias
parseDocumentProjection
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/mysql-connector/com/mysql/cj/xdevapi/ExprParser.java", "license": "gpl-2.0", "size": 50771 }
[ "com.mysql.cj.x.protobuf.MysqlxCrud", "java.util.List" ]
import com.mysql.cj.x.protobuf.MysqlxCrud; import java.util.List;
import com.mysql.cj.x.protobuf.*; import java.util.*;
[ "com.mysql.cj", "java.util" ]
com.mysql.cj; java.util;
1,511,403
EOperation getPrivateMeterVoltage__IsAppropriate_FWD_EMoflonEdge_34__EMoflonEdge();
EOperation getPrivateMeterVoltage__IsAppropriate_FWD_EMoflonEdge_34__EMoflonEdge();
/** * Returns the meta object for the '{@link rgse.ttc17.emoflon.tgg.task2.Rules.PrivateMeterVoltage#isAppropriate_FWD_EMoflonEdge_34(org.moflon.tgg.runtime.EMoflonEdge) <em>Is Appropriate FWD EMoflon Edge 34</em>}' operation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the '...
Returns the meta object for the '<code>rgse.ttc17.emoflon.tgg.task2.Rules.PrivateMeterVoltage#isAppropriate_FWD_EMoflonEdge_34(org.moflon.tgg.runtime.EMoflonEdge) Is Appropriate FWD EMoflon Edge 34</code>' operation.
getPrivateMeterVoltage__IsAppropriate_FWD_EMoflonEdge_34__EMoflonEdge
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.emoflon.tgg.task2/gen/rgse/ttc17/emoflon/tgg/task2/Rules/RulesPackage.java", "license": "mit", "size": 437406 }
[ "org.eclipse.emf.ecore.EOperation" ]
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,727,909
private void visitClassAnnotation(DirectClassFile cf, BaseAnnotations ann) { if (!args.eTypes.contains(ElementType.TYPE)) { return; } for (Annotation anAnn : ann.getAnnotations().getAnnotations()) { String annClassName = anAnn.getType...
void function(DirectClassFile cf, BaseAnnotations ann) { if (!args.eTypes.contains(ElementType.TYPE)) { return; } for (Annotation anAnn : ann.getAnnotations().getAnnotations()) { String annClassName = anAnn.getType().getClassType().getClassName(); if (args.aclass.equals(annClassName)) { printMatch(cf); } } }
/** * Inspects a class annotation. * * @param cf {@code non-null;} class file * @param ann {@code non-null;} annotation */
Inspects a class annotation
visitClassAnnotation
{ "repo_name": "alibaba/atlas", "path": "atlas-gradle-plugin/dexpatch/src/main/java/com/taobao/android/dx/command/annotool/AnnotationLister.java", "license": "apache-2.0", "size": 9477 }
[ "com.taobao.android.dx.cf.attrib.BaseAnnotations", "com.taobao.android.dx.cf.direct.DirectClassFile", "com.taobao.android.dx.rop.annotation.Annotation", "java.lang.annotation.ElementType" ]
import com.taobao.android.dx.cf.attrib.BaseAnnotations; import com.taobao.android.dx.cf.direct.DirectClassFile; import com.taobao.android.dx.rop.annotation.Annotation; import java.lang.annotation.ElementType;
import com.taobao.android.dx.cf.attrib.*; import com.taobao.android.dx.cf.direct.*; import com.taobao.android.dx.rop.annotation.*; import java.lang.annotation.*;
[ "com.taobao.android", "java.lang" ]
com.taobao.android; java.lang;
1,532,226