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
public void runShellCommand(String cmd) { try { String logText = cmd; if (! cmd.startsWith("RegressionTester")) { realStdOut.println(logText); } Process process = runtime.exec(cmd); BufferedReader reader = new BufferedR...
void function(String cmd) { try { String logText = cmd; if (! cmd.startsWith(STR)) { realStdOut.println(logText); } Process process = runtime.exec(cmd); BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream(), logEncoding)); String line = null; while ((line = reader.readLine()) != null...
/** Runs a shell command * @param cmd command line to be executed */
Runs a shell command
runShellCommand
{ "repo_name": "gfis/dbat", "path": "src/main/java/org/teherba/common/RegressionTester.java", "license": "apache-2.0", "size": 38413 }
[ "java.io.BufferedReader", "java.io.InputStreamReader", "java.lang.Process" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.lang.Process;
import java.io.*; import java.lang.*;
[ "java.io", "java.lang" ]
java.io; java.lang;
877,477
public IDataRecord getRecord(final int recordId) { return recordIndex.get(recordId); }
IDataRecord function(final int recordId) { return recordIndex.get(recordId); }
/** * Gets the record of the specified {@code recordId}. * * @param recordId * the identifier of the record to retrieve the values for * * @return the values of the record, {@code null} if the identifier is * invalid */
Gets the record of the specified recordId
getRecord
{ "repo_name": "pmeisen/dis-timeintervaldataanalyzer", "path": "src/net/meisen/dissertation/model/indexes/datarecord/TidaIndex.java", "license": "bsd-3-clause", "size": 16962 }
[ "net.meisen.dissertation.model.datasets.IDataRecord" ]
import net.meisen.dissertation.model.datasets.IDataRecord;
import net.meisen.dissertation.model.datasets.*;
[ "net.meisen.dissertation" ]
net.meisen.dissertation;
421,975
protected void addDefaultApps(ContextHandlerCollection parent, final String appDir, Configuration conf) throws IOException { // set up the context for "/logs/" if "hadoop.log.dir" property is defined // and it's enabled. String logDir = System.getProperty("hadoop.log.dir"); boolean logsEnabled =...
void function(ContextHandlerCollection parent, final String appDir, Configuration conf) throws IOException { String logDir = System.getProperty(STR); boolean logsEnabled = conf.getBoolean( CommonConfigurationKeys.HADOOP_HTTP_LOGS_ENABLED, CommonConfigurationKeys.HADOOP_HTTP_LOGS_ENABLED_DEFAULT); if (logDir != null && ...
/** * Add default apps. * @param appDir The application directory * @throws IOException */
Add default apps
addDefaultApps
{ "repo_name": "bitmybytes/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java", "license": "apache-2.0", "size": 57487 }
[ "java.io.IOException", "java.util.Map", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.CommonConfigurationKeys", "org.eclipse.jetty.server.SessionManager", "org.eclipse.jetty.server.handler.ContextHandlerCollection", "org.eclipse.jetty.server.session.AbstractSessionManager", "org.eclips...
import java.io.IOException; import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.eclipse.jetty.server.SessionManager; import org.eclipse.jetty.server.handler.ContextHandlerCollection; import org.eclipse.jetty.server.session.AbstractSessionMan...
import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.eclipse.jetty.server.*; import org.eclipse.jetty.server.handler.*; import org.eclipse.jetty.server.session.*; import org.eclipse.jetty.servlet.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.eclipse.jetty" ]
java.io; java.util; org.apache.hadoop; org.eclipse.jetty;
503,741
@Override public final Bitmap get(String key) { if (key == null) { throw new NullPointerException("key == null"); } synchronized (this) { return map.get(key); } }
final Bitmap function(String key) { if (key == null) { throw new NullPointerException(STR); } synchronized (this) { return map.get(key); } }
/** * Returns the Bitmap for {@code key} if it exists in the cache. If a Bitmap was returned, it is moved to the head * of the queue. This returns null if a Bitmap is not cached. */
Returns the Bitmap for key if it exists in the cache. If a Bitmap was returned, it is moved to the head of the queue. This returns null if a Bitmap is not cached
get
{ "repo_name": "imoblife/Android-Universal-Image-Loader", "path": "library/src/com/nostra13/universalimageloader/cache/memory/impl/LruMemoryCache.java", "license": "apache-2.0", "size": 3755 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,204,647
boolean addTestElementOnce(TestElement child);
boolean addTestElementOnce(TestElement child);
/** * Add child test element only if it has not already been added. * <p> * Only for use by TestCompiler. * * @param child * @return true if the child was added */
Add child test element only if it has not already been added. Only for use by TestCompiler
addTestElementOnce
{ "repo_name": "llllewicki/jmeter-diff", "path": "src/core/org/apache/jmeter/threads/TestCompilerHelper.java", "license": "apache-2.0", "size": 1636 }
[ "org.apache.jmeter.testelement.TestElement" ]
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.testelement.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
1,232,570
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<SearchServiceStatistics>> getServiceStatisticsWithResponseAsync( RequestOptions requestOptions, Context context) { final String accept = "application/json; odata.metadata=minimal"; UUID xMsClientRequestIdInternal = null...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<SearchServiceStatistics>> function( RequestOptions requestOptions, Context context) { final String accept = STR; UUID xMsClientRequestIdInternal = null; if (requestOptions != null) { xMsClientRequestIdInternal = requestOptions.getXMsClientRequestId(); } UUID xMs...
/** * Gets service level statistics for a search service. * * @param requestOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws SearchErrorException thrown if the requ...
Gets service level statistics for a search service
getServiceStatisticsWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/implementation/SearchServiceClientImpl.java", "license": "mit", "size": 8962 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.search.documents.indexes.implementation.models.RequestOptions", "com.azure.search.documents.indexes.models.SearchServiceStatistics" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.search.documents.indexes.implementation.models.RequestOptions; import com.azure.search.documents.indexes.models.SearchServiceStatist...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.search.documents.indexes.implementation.models.*; import com.azure.search.documents.indexes.models.*;
[ "com.azure.core", "com.azure.search" ]
com.azure.core; com.azure.search;
2,591,116
public final void recover(final Sheet sheet) { if (rowIndex >= 0) { this.setRow(sheet.getRow(rowIndex)); this.setRowIndex(-1); } }
final void function(final Sheet sheet) { if (rowIndex >= 0) { this.setRow(sheet.getRow(rowIndex)); this.setRowIndex(-1); } }
/** * recover row by using it's address. * * @param sheet * sheet. */
recover row by using it's address
recover
{ "repo_name": "tiefaces/TieFaces", "path": "src/org/tiefaces/components/websheet/serializable/SerialRow.java", "license": "mit", "size": 3318 }
[ "org.apache.poi.ss.usermodel.Sheet" ]
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.*;
[ "org.apache.poi" ]
org.apache.poi;
1,186,147
@Uninterruptible public static int offsetAsSlot(Offset offset) { if (VM.VerifyAssertions) VM._assert((offset.toInt() & 3) == 0); return middleOfTable + (offset.toInt() >> LOG_BYTES_IN_INT); }
static int function(Offset offset) { if (VM.VerifyAssertions) VM._assert((offset.toInt() & 3) == 0); return middleOfTable + (offset.toInt() >> LOG_BYTES_IN_INT); }
/** * Conversion from JTOC offset to JTOC slot index. */
Conversion from JTOC offset to JTOC slot index
offsetAsSlot
{ "repo_name": "ut-osa/laminar", "path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/runtime/Statics.java", "license": "bsd-3-clause", "size": 20804 }
[ "org.vmmagic.unboxed.Offset" ]
import org.vmmagic.unboxed.Offset;
import org.vmmagic.unboxed.*;
[ "org.vmmagic.unboxed" ]
org.vmmagic.unboxed;
1,979,482
public Drawable getOrbIcon() { return mIconDrawable; }
Drawable function() { return mIconDrawable; }
/** * Returns the orb icon * @return the drawable used as the icon */
Returns the orb icon
getOrbIcon
{ "repo_name": "kingargyle/adt-leanback-support", "path": "leanback-v17/src/main/java/android/support/v17/leanback/widget/SearchOrbView.java", "license": "apache-2.0", "size": 12425 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
1,548,099
@Nullable public Closeable getIOStream(String name) throws IOException { return null; } /** * Collect stat data to be combined by a subsequent reducer. * * @param output * @param name file name * @param execTime IO execution time * @param doIOReturnValue value returned by * {@li...
Closeable function(String name) throws IOException { return null; } /** * Collect stat data to be combined by a subsequent reducer. * * @param output * @param name file name * @param execTime IO execution time * @param doIOReturnValue value returned by * {@link #doIO(Reporter, String,long)}
/** * Create an input or output stream based on the specified file. Subclasses should override this * method to provide an actual stream. * * @param name file name * @return the stream */
Create an input or output stream based on the specified file. Subclasses should override this method to provide an actual stream
getIOStream
{ "repo_name": "wwjiang007/alluxio", "path": "tests/src/test/java/alluxio/client/hadoop/AbstractIOMapper.java", "license": "apache-2.0", "size": 4463 }
[ "java.io.Closeable", "java.io.IOException", "org.apache.hadoop.mapred.Reporter" ]
import java.io.Closeable; import java.io.IOException; import org.apache.hadoop.mapred.Reporter;
import java.io.*; import org.apache.hadoop.mapred.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
772,567
private Map<OWLClassExpression,Set<OWLClass>> getWitnessMap(Map<OWLClass,Set<OWLClassExpression>> map) { Map<OWLClassExpression,Set<OWLClass>> output = new HashMap<OWLClassExpression,Set<OWLClass>>(); for(OWLClass c : map.keySet()) { Set<OWLClassExpression> wits = map.get(c); for(OWLClassExpression wit : w...
Map<OWLClassExpression,Set<OWLClass>> function(Map<OWLClass,Set<OWLClassExpression>> map) { Map<OWLClassExpression,Set<OWLClass>> output = new HashMap<OWLClassExpression,Set<OWLClass>>(); for(OWLClass c : map.keySet()) { Set<OWLClassExpression> wits = map.get(c); for(OWLClassExpression wit : wits) { if(output.containsK...
/** * Given a map of concepts to witnesses, get a reversed map of witnesses to concepts whose change they witness * @param map Map of concepts to witnesses * @return Map of witnesses to concepts whose change they witness */
Given a map of concepts to witnesses, get a reversed map of witnesses to concepts whose change they witness
getWitnessMap
{ "repo_name": "rsgoncalves/ecco", "path": "src/main/java/uk/ac/manchester/cs/diff/test/Diff.java", "license": "lgpl-3.0", "size": 19501 }
[ "java.util.Collections", "java.util.HashMap", "java.util.HashSet", "java.util.Map", "java.util.Set", "org.semanticweb.owlapi.model.OWLClass", "org.semanticweb.owlapi.model.OWLClassExpression", "org.semanticweb.owlapi.model.OWLOntology", "org.semanticweb.owlapi.reasoner.OWLReasoner" ]
import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLClassExpression; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.reasoner.OWLR...
import java.util.*; import org.semanticweb.owlapi.model.*; import org.semanticweb.owlapi.reasoner.*;
[ "java.util", "org.semanticweb.owlapi" ]
java.util; org.semanticweb.owlapi;
219,372
public Observable<Transaction> sendTransaction(String pin, String address, TransactionWizardData data);
Observable<Transaction> function(String pin, String address, TransactionWizardData data);
/** * Create a Transaction and mark the transaction to be ready to sync * * @param address The sender address * @param data The data about the transaction * @return Transaction or exception will be thrown */
Create a Transaction and mark the transaction to be ready to sync
sendTransaction
{ "repo_name": "sockeqwe/SecureBitcoinWallet", "path": "app/src/main/java/de/tum/in/securebitcoinwallet/model/WalletManager.java", "license": "apache-2.0", "size": 2257 }
[ "de.tum.in.securebitcoinwallet.transactions.create.TransactionWizardData" ]
import de.tum.in.securebitcoinwallet.transactions.create.TransactionWizardData;
import de.tum.in.securebitcoinwallet.transactions.create.*;
[ "de.tum.in" ]
de.tum.in;
24,137
@NotNull PsiCodeBlock createCodeBlockFromText(@NotNull @NonNls String text, PsiElement context) throws IncorrectOperationException;
PsiCodeBlock createCodeBlockFromText(@NotNull @NonNls String text, PsiElement context) throws IncorrectOperationException;
/** * Creates a Java code block from the specified text. * * @param text the text of the code block to create. * @param context the PSI element used as context for resolving references from the block. * @return the created code block instance. * @throws com.intellij.util.IncorrectOperationException...
Creates a Java code block from the specified text
createCodeBlockFromText
{ "repo_name": "jexp/idea2", "path": "java/openapi/src/com/intellij/psi/PsiJavaParserFacade.java", "license": "apache-2.0", "size": 9079 }
[ "com.intellij.util.IncorrectOperationException", "org.jetbrains.annotations.NonNls", "org.jetbrains.annotations.NotNull" ]
import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull;
import com.intellij.util.*; import org.jetbrains.annotations.*;
[ "com.intellij.util", "org.jetbrains.annotations" ]
com.intellij.util; org.jetbrains.annotations;
2,566,848
return opt1.getKey().compareToIgnoreCase(opt2.getKey()); } } public static final int DEFAULT_WIDTH = 74; public static final int DEFAULT_LEFT_PAD = 1; public static final int DEFAULT_DESC_PAD = 3; public static final String DEFAULT_SYNTAX_PREFIX = "usage: "; ...
return opt1.getKey().compareToIgnoreCase(opt2.getKey()); } } public static final int DEFAULT_WIDTH = 74; public static final int DEFAULT_LEFT_PAD = 1; public static final int DEFAULT_DESC_PAD = 3; public static final String DEFAULT_SYNTAX_PREFIX = STR; public static final String DEFAULT_OPT_PREFIX = "-"; public static ...
/** * Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument * is less than, equal to, or greater than the second. * * @param opt1 The first Option to be compared. * @param opt2 The second Option to be compared. ...
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second
compare
{ "repo_name": "apache/commons-cli", "path": "src/main/java/org/apache/commons/cli/HelpFormatter.java", "license": "apache-2.0", "size": 32661 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
246,863
@SuppressWarnings("unused") protected void onReleaseResources(ArrayList<Conversation> conversations) { // For a simple List<> there is nothing to do. For something // like a Cursor, we would close it here. } public static class ConversationsContentObserver extends ContentObserver...
@SuppressWarnings(STR) void function(ArrayList<Conversation> conversations) { } public static class ConversationsContentObserver extends ContentObserver { private AsyncTaskLoader<ArrayList<Conversation>> conversationLoader; public ConversationsContentObserver(AsyncTaskLoader<ArrayList<Conversation>> conversationLoader)...
/** * Helper function to take care of releasing resources associated * with an actively loaded data set. */
Helper function to take care of releasing resources associated with an actively loaded data set
onReleaseResources
{ "repo_name": "Ioane5/GeoSMS-Release", "path": "app/src/main/java/com/steps/geosms/conversationsList/ConversationListLoader.java", "license": "apache-2.0", "size": 5959 }
[ "android.content.AsyncTaskLoader", "android.database.ContentObserver", "android.net.Uri", "com.steps.geosms.objects.Conversation", "java.util.ArrayList" ]
import android.content.AsyncTaskLoader; import android.database.ContentObserver; import android.net.Uri; import com.steps.geosms.objects.Conversation; import java.util.ArrayList;
import android.content.*; import android.database.*; import android.net.*; import com.steps.geosms.objects.*; import java.util.*;
[ "android.content", "android.database", "android.net", "com.steps.geosms", "java.util" ]
android.content; android.database; android.net; com.steps.geosms; java.util;
2,785,741
Map<String, String> listThreadsHoldingLock();
Map<String, String> listThreadsHoldingLock();
/** * Returns a map of the names of the objects being locked on and the names of the threads holding * the locks. */
Returns a map of the names of the objects being locked on and the names of the threads holding the locks
listThreadsHoldingLock
{ "repo_name": "pivotal-amurmann/geode", "path": "geode-core/src/main/java/org/apache/geode/management/LockServiceMXBean.java", "license": "apache-2.0", "size": 2688 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,265,604
public static Map<String, Long> getSegmentToLoadStartTimeMapping(LoadMetadataDetails[] details) { Map<String, Long> segmentToLoadStartTimeMap = new HashMap<>(details.length); for (LoadMetadataDetails oneLoad : details) { // valid segments will only have Success status if (SegmentStatus.SUCCESS.equ...
static Map<String, Long> function(LoadMetadataDetails[] details) { Map<String, Long> segmentToLoadStartTimeMap = new HashMap<>(details.length); for (LoadMetadataDetails oneLoad : details) { if (SegmentStatus.SUCCESS.equals(oneLoad.getSegmentStatus()) SegmentStatus.LOAD_PARTIAL_SUCCESS.equals(oneLoad.getSegmentStatus())...
/** * This method will return the mapping of valid segments to segment laod start time * */
This method will return the mapping of valid segments to segment laod start time
getSegmentToLoadStartTimeMapping
{ "repo_name": "jackylk/incubator-carbondata", "path": "integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/load/CarbonInternalLoaderUtil.java", "license": "apache-2.0", "size": 14927 }
[ "java.util.HashMap", "java.util.Map", "org.apache.carbondata.core.statusmanager.LoadMetadataDetails", "org.apache.carbondata.core.statusmanager.SegmentStatus" ]
import java.util.HashMap; import java.util.Map; import org.apache.carbondata.core.statusmanager.LoadMetadataDetails; import org.apache.carbondata.core.statusmanager.SegmentStatus;
import java.util.*; import org.apache.carbondata.core.statusmanager.*;
[ "java.util", "org.apache.carbondata" ]
java.util; org.apache.carbondata;
2,259,668
public void setGroupCollection(final List<Group> groups) { m_groups = groups; }
void function(final List<Group> groups) { m_groups = groups; }
/** * Sets the value of '_groupList' by setting it to the given * Vector. No type checking is performed. * @deprecated * * @param groups the Vector to set. */
Sets the value of '_groupList' by setting it to the given Vector. No type checking is performed
setGroupCollection
{ "repo_name": "tharindum/opennms_dashboard", "path": "opennms-config/src/main/java/org/opennms/netmgt/config/datacollection/DatacollectionGroup.java", "license": "gpl-2.0", "size": 22786 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,293,604
public boolean setPlayerPermission(UserIdent ident, String permissionNode, boolean value) { return setPlayerPermissionProperty(ident, permissionNode, value ? PERMISSION_TRUE : PERMISSION_FALSE); }
boolean function(UserIdent ident, String permissionNode, boolean value) { return setPlayerPermissionProperty(ident, permissionNode, value ? PERMISSION_TRUE : PERMISSION_FALSE); }
/** * Set a player permission * * @param ident * @param permissionNode * @param value */
Set a player permission
setPlayerPermission
{ "repo_name": "aschmois/ForgeEssentialsMain", "path": "src/main/java/com/forgeessentials/api/permissions/Zone.java", "license": "epl-1.0", "size": 19258 }
[ "com.forgeessentials.api.UserIdent" ]
import com.forgeessentials.api.UserIdent;
import com.forgeessentials.api.*;
[ "com.forgeessentials.api" ]
com.forgeessentials.api;
1,387,662
private WALFactory setupWALAndReplication() throws IOException { // TODO Replication make assumptions here based on the default filesystem impl final Path oldLogDir = new Path(rootDir, HConstants.HREGION_OLDLOGDIR_NAME); final String logName = DefaultWALProvider.getWALDirectoryName(this.serv...
WALFactory function() throws IOException { final Path oldLogDir = new Path(rootDir, HConstants.HREGION_OLDLOGDIR_NAME); final String logName = DefaultWALProvider.getWALDirectoryName(this.serverName.toString()); Path logdir = new Path(rootDir, logName); if (LOG.isDebugEnabled()) LOG.debug(STR + logdir); if (this.fs.exis...
/** * Setup WAL log and replication if enabled. * Replication setup is done in here because it wants to be hooked up to WAL. * * @return A WAL instance. * @throws IOException */
Setup WAL log and replication if enabled. Replication setup is done in here because it wants to be hooked up to WAL
setupWALAndReplication
{ "repo_name": "grokcoder/pbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java", "license": "apache-2.0", "size": 131698 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.HConstants", "org.apache.hadoop.hbase.regionserver.wal.MetricsWAL", "org.apache.hadoop.hbase.regionserver.wal.WALActionsListener", "org.apache.hadoop.hbase.wal.DefaultWALProvider", "...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.regionserver.wal.MetricsWAL; import org.apache.hadoop.hbase.regionserver.wal.WALActionsListener; import org.apache.hadoop.hbase.wal.D...
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.regionserver.wal.*; import org.apache.hadoop.hbase.wal.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,525,420
If an XSL document exists in the server cache under an ID equal to the XSL ID of this object, that document is returned. (Deprecated) If the XSL string of this object is not null, a new document is created by parsing this string. (Deprecated) If the XSL URL of this object is not null, a new document is created ...
If an XSL document exists in the server cache under an ID equal to the XSL ID of this object, that document is returned. (Deprecated) If the XSL string of this object is not null, a new document is created by parsing this string. (Deprecated) If the XSL URL of this object is not null, a new document is created by parsi...
/** * Returns the XSL source document of this object. The XSL document is determined by the following steps: If an XSL document exists in the server cache under an ID equal to the XSL ID of this object, that document is returned. (Deprecated) If the XSL string of this object is not null, a new document is...
Returns the XSL source document of this object. The XSL document is determined by the following steps:
getXSL
{ "repo_name": "burris/dwr", "path": "ui/gi/generated/java/jsx3/xml/Cacheable.java", "license": "apache-2.0", "size": 28290 }
[ "org.directwebremoting.io.Context" ]
import org.directwebremoting.io.Context;
import org.directwebremoting.io.*;
[ "org.directwebremoting.io" ]
org.directwebremoting.io;
1,655,379
public Properties getHttpEquivTags() { return httpEquivTags; }
Properties function() { return httpEquivTags; }
/** * Returns all collected values of the "http-equiv" meta tags. Property names * are tag names, property values are "content" values. */
Returns all collected values of the "http-equiv" meta tags. Property names are tag names, property values are "content" values
getHttpEquivTags
{ "repo_name": "wangxin39/yuqing", "path": "src/cn/ideasoft/yuqing/parse/HTMLMetaTags.java", "license": "bsd-3-clause", "size": 5207 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
805,519
boolean checkTable(String tableName) throws SQLException;
boolean checkTable(String tableName) throws SQLException;
/** * The method checks whether a table for the given name exists in the * database. * * @param tableName * is a <code>String</code> value of the table name to check * @return <code>true</code> <code>boolean</code> value if the table exist in * the database and <code>false</code> i...
The method checks whether a table for the given name exists in the database
checkTable
{ "repo_name": "DanielYao/tigase-server", "path": "src/main/java/tigase/db/DataRepository.java", "license": "agpl-3.0", "size": 8941 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,736,018
private Object invokeGlobalFunction(Environment env) throws EvalException, InterruptedException { Object funcValue = func.eval(env); ImmutableList.Builder<Object> posargs = new ImmutableList.Builder<>(); // We copy this into an ImmutableMap in the end, but we can't use an ImmutableMap.Builder, or // w...
Object function(Environment env) throws EvalException, InterruptedException { Object funcValue = func.eval(env); ImmutableList.Builder<Object> posargs = new ImmutableList.Builder<>(); Map<String, Object> kwargs = new HashMap<>(); BaseFunction function = checkCallable(funcValue, getLocation()); evalArguments(posargs, kw...
/** * Invokes func() and returns the result. */
Invokes func() and returns the result
invokeGlobalFunction
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java", "license": "apache-2.0", "size": 31511 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableMap", "java.util.HashMap", "java.util.Map" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.HashMap; import java.util.Map;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,497,155
// TODO - CHEAT SIMPLY BY WRITING OUT DATA AS XML TO PASS BACK. // We will incorporate all of the LAPDFText system directly into the // PDFBox low level code at some point. protected void writeString(String text, List<TextPosition> textPositions) throws IOException { TextPosition p1 = textP...
void function(String text, List<TextPosition> textPositions) throws IOException { TextPosition p1 = textPositions.get(0); TextPosition p2 = textPositions.get(textPositions.size()-1); Matcher cntrlRegexMatcher = cntrlRegex.matcher(text); if( cntrlRegexMatcher.find() ) { text = text.replaceAll(STR, STR<wd i=\STR\" " + "x...
/** * Write a Java string to the output stream. The default implementation will ignore the <code>textPositions</code> * and just calls {@link #writeString(String)}. * * @param text The text to write to the stream. * @param textPositions The TextPositions belonging to the text. * @throws IO...
Write a Java string to the output stream. The default implementation will ignore the <code>textPositions</code> and just calls <code>#writeString(String)</code>
writeString
{ "repo_name": "phatn/lapdftext", "path": "src/main/java/edu/isi/bmkeg/lapdf/extraction/LAPDFTextStripper.java", "license": "gpl-3.0", "size": 74251 }
[ "java.io.IOException", "java.util.List", "java.util.regex.Matcher", "org.apache.pdfbox.util.TextPosition" ]
import java.io.IOException; import java.util.List; import java.util.regex.Matcher; import org.apache.pdfbox.util.TextPosition;
import java.io.*; import java.util.*; import java.util.regex.*; import org.apache.pdfbox.util.*;
[ "java.io", "java.util", "org.apache.pdfbox" ]
java.io; java.util; org.apache.pdfbox;
1,492,837
@Override protected Bitmap doInBackground(String... params) { try { return BitmapFactory .decodeStream((InputStream) new URL(mGroundOverlayUrl).getContent()); } catch (MalformedURLException e) { e.printStackTrace(); ...
Bitmap function(String... params) { try { return BitmapFactory .decodeStream((InputStream) new URL(mGroundOverlayUrl).getContent()); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; }
/** * Downloads the ground overlay image in another thread * * @param params String varargs not used * @return Bitmap object downloaded */
Downloads the ground overlay image in another thread
doInBackground
{ "repo_name": "DEVPAR/wigle-wifi-wardriving", "path": "android-maps-utils/src/com/google/maps/android/kml/KmlRenderer.java", "license": "bsd-3-clause", "size": 35734 }
[ "android.graphics.Bitmap", "android.graphics.BitmapFactory", "java.io.IOException", "java.io.InputStream", "java.net.MalformedURLException" ]
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException;
import android.graphics.*; import java.io.*; import java.net.*;
[ "android.graphics", "java.io", "java.net" ]
android.graphics; java.io; java.net;
1,630,028
protected IgniteEx startGrid(String igniteInstanceName, UnaryOperator<IgniteConfiguration> cfgOp) throws Exception { return (IgniteEx)startGrid(igniteInstanceName, cfgOp, null); }
IgniteEx function(String igniteInstanceName, UnaryOperator<IgniteConfiguration> cfgOp) throws Exception { return (IgniteEx)startGrid(igniteInstanceName, cfgOp, null); }
/** * Starts new grid with given name. * * @param igniteInstanceName Ignite instance name. * @param cfgOp Configuration mutator. Can be used to avoid overcomplification of {@link #getConfiguration()}. * @return Started grid. * @throws Exception If anything failed. */
Starts new grid with given name
startGrid
{ "repo_name": "nizhikov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java", "license": "apache-2.0", "size": 99617 }
[ "java.util.function.UnaryOperator", "org.apache.ignite.configuration.IgniteConfiguration", "org.apache.ignite.internal.IgniteEx" ]
import java.util.function.UnaryOperator; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx;
import java.util.function.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,267,880
public void setPrefilteredMap(TextureCubeMap prefileteredEnvMap) { this.prefilteredEnvMap = prefileteredEnvMap; }
void function(TextureCubeMap prefileteredEnvMap) { this.prefilteredEnvMap = prefileteredEnvMap; }
/** * Sets the prefiltered environment map * @param prefileteredEnvMap the prefiltered environment map */
Sets the prefiltered environment map
setPrefilteredMap
{ "repo_name": "PlanetWaves/clockworkengine", "path": "trunk/jme3-core/src/main/java/com/jme3/light/LightProbe.java", "license": "apache-2.0", "size": 9836 }
[ "com.jme3.texture.TextureCubeMap" ]
import com.jme3.texture.TextureCubeMap;
import com.jme3.texture.*;
[ "com.jme3.texture" ]
com.jme3.texture;
1,821,648
private LinkedList<Diff> diff_compute(String text1, String text2, boolean checklines, long deadline) { LinkedList<Diff> diffs = new LinkedList<Diff>(); if (text1.length() == 0) { // Just add some text (speedup). diffs.add(new Diff(Operation.INSERT, text2));...
LinkedList<Diff> function(String text1, String text2, boolean checklines, long deadline) { LinkedList<Diff> diffs = new LinkedList<Diff>(); if (text1.length() == 0) { diffs.add(new Diff(Operation.INSERT, text2)); return diffs; } if (text2.length() == 0) { diffs.add(new Diff(Operation.DELETE, text1)); return diffs; } St...
/** * Find the differences between two texts. Assumes that the texts do not * have any common prefix or suffix. * @param text1 Old string to be diffed. * @param text2 New string to be diffed. * @param checklines Speedup flag. If false, then don't run a * line-level diff first to identify the cha...
Find the differences between two texts. Assumes that the texts do not have any common prefix or suffix
diff_compute
{ "repo_name": "SeekingFor/jfniki", "path": "alien/src/name/fraser/neil/plaintext/diff_match_patch.java", "license": "gpl-2.0", "size": 88387 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
930,038
public static void initialize(final Application application, final Activity mainActivity, final String apiKey, final String secret, final long backgroundInterval) { Breinif...
static void function(final Application application, final Activity mainActivity, final String apiKey, final String secret, final long backgroundInterval) { BreinifyManager.getInstance().initialize(application, mainActivity, apiKey, secret, backgroundInterval); }
/** * Initializes the instance * * @param application Application contains the application context * @param mainActivity Activity contains the main activity * @param apiKey String contains the apiKey * @param secret String contains the secret * @pa...
Initializes the instance
initialize
{ "repo_name": "Breinify/brein-api-library-android", "path": "brein-api-library-android/src/main/java/com/brein/api/Breinify.java", "license": "mit", "size": 15661 }
[ "android.app.Activity", "android.app.Application" ]
import android.app.Activity; import android.app.Application;
import android.app.*;
[ "android.app" ]
android.app;
5,226
public static String qualifyTable(TableMetadata<?> tableMetadata, Character identifierQuotation, Character schemaSeparator) { final String name = identifierQuotation + tableMetadata.getName() + identifierQuotation; return tableMetadata.getSchema() == null || tableMetadata.getSchema().isEmpty() ? nam...
static String function(TableMetadata<?> tableMetadata, Character identifierQuotation, Character schemaSeparator) { final String name = identifierQuotation + tableMetadata.getName() + identifierQuotation; return tableMetadata.getSchema() == null tableMetadata.getSchema().isEmpty() ? name : identifierQuotation + tableMet...
/** * Creates the qualified name of the table * @param tableMetadata table metadata * @param identifierQuotation the quotation around each identifier * @param schemaSeparator the schema separator used by the dialect * @return the qualified name */
Creates the qualified name of the table
qualifyTable
{ "repo_name": "agileapes/dragonfly", "path": "dragonfly-core/src/main/java/com/mmnaseri/dragonfly/tools/DatabaseUtils.java", "license": "mit", "size": 7758 }
[ "com.mmnaseri.dragonfly.metadata.TableMetadata" ]
import com.mmnaseri.dragonfly.metadata.TableMetadata;
import com.mmnaseri.dragonfly.metadata.*;
[ "com.mmnaseri.dragonfly" ]
com.mmnaseri.dragonfly;
2,016,721
public static Criterion endedBy(String begin, String end, Time value) throws UnsupportedTimeException { return filter(new EndedByRestriction(), begin, end, value); }
static Criterion function(String begin, String end, Time value) throws UnsupportedTimeException { return filter(new EndedByRestriction(), begin, end, value); }
/** * Creates a temporal restriction for the specified time and property. * * @param begin * the begin property name * @param end * the end property name * @param value * the value * * @return the <tt>Criterion</tt> * * @see...
Creates a temporal restriction for the specified time and property
endedBy
{ "repo_name": "sauloperez/sos", "path": "src/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/TemporalRestrictions.java", "license": "apache-2.0", "size": 37464 }
[ "org.hibernate.criterion.Criterion", "org.n52.sos.ds.hibernate.util.TemporalRestriction", "org.n52.sos.exception.ows.concrete.UnsupportedTimeException", "org.n52.sos.ogc.gml.time.Time" ]
import org.hibernate.criterion.Criterion; import org.n52.sos.ds.hibernate.util.TemporalRestriction; import org.n52.sos.exception.ows.concrete.UnsupportedTimeException; import org.n52.sos.ogc.gml.time.Time;
import org.hibernate.criterion.*; import org.n52.sos.ds.hibernate.util.*; import org.n52.sos.exception.ows.concrete.*; import org.n52.sos.ogc.gml.time.*;
[ "org.hibernate.criterion", "org.n52.sos" ]
org.hibernate.criterion; org.n52.sos;
127,025
public final void setMerger(final IAttributeMerger merger) { Validate.notNull(merger, "The IAttributeMerger cannot be null"); this.attrMerger = merger; }
final void function(final IAttributeMerger merger) { Validate.notNull(merger, STR); this.attrMerger = merger; }
/** * Set the strategy whereby we accumulate attributes from the results of * polling our delegates. * * @param merger The attrMerger to set. * @throws IllegalArgumentException If merger is <code>null</code>. */
Set the strategy whereby we accumulate attributes from the results of polling our delegates
setMerger
{ "repo_name": "Jasig/person-directory", "path": "person-directory-impl/src/main/java/org/apereo/services/persondir/support/AbstractAggregatingDefaultQueryPersonAttributeDao.java", "license": "apache-2.0", "size": 16853 }
[ "org.apache.commons.lang3.Validate", "org.apereo.services.persondir.support.merger.IAttributeMerger" ]
import org.apache.commons.lang3.Validate; import org.apereo.services.persondir.support.merger.IAttributeMerger;
import org.apache.commons.lang3.*; import org.apereo.services.persondir.support.merger.*;
[ "org.apache.commons", "org.apereo.services" ]
org.apache.commons; org.apereo.services;
1,557,556
public void selectNone(View view) { mSFLAdapter.deselectAll(); }
void function(View view) { mSFLAdapter.deselectAll(); }
/** * Deselect all the items in the list * * @param view */
Deselect all the items in the list
selectNone
{ "repo_name": "sanyaade-g2g-repos/posit-mobile.haiti", "path": "src/org/hfoss/posit/android/bluetooth/BluetoothExplicitSync.java", "license": "lgpl-2.1", "size": 13537 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
438,822
private Iterator<Option> getOptions() { synchronized (options) { return Collections.unmodifiableList(new ArrayList<Option>(options)).iterator(); } }
Iterator<Option> function() { synchronized (options) { return Collections.unmodifiableList(new ArrayList<Option>(options)).iterator(); } }
/** * Returns an Iterator for the available options that the user has in order to answer * the question. * * @return Iterator for the available options. */
Returns an Iterator for the available options that the user has in order to answer the question
getOptions
{ "repo_name": "elphinkuo/Androidpn", "path": "androidpn-code/androidpn-server/tags/androidpn-server-0.4.0/server/src/main/java/org/jivesoftware/openfire/forms/spi/XFormFieldImpl.java", "license": "gpl-3.0", "size": 7235 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.Iterator" ]
import java.util.ArrayList; import java.util.Collections; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,472,329
protected void printHost(Host host) { if (shortOnly) { print(FMT_SHORT, host.id(), host.mac(), host.locations(), host.vlan(), host.ipAddresses()); } else { print(FMT, host.id(), host.mac(), host.locations(), ...
void function(Host host) { if (shortOnly) { print(FMT_SHORT, host.id(), host.mac(), host.locations(), host.vlan(), host.ipAddresses()); } else { print(FMT, host.id(), host.mac(), host.locations(), host.vlan(), host.ipAddresses(), annotations(host.annotations()), host.innerVlan(), host.tpid().toString(), host.providerId...
/** * Prints information about a host. * * @param host end-station host */
Prints information about a host
printHost
{ "repo_name": "kuujo/onos", "path": "cli/src/main/java/org/onosproject/cli/net/HostsListCommand.java", "license": "apache-2.0", "size": 3605 }
[ "org.onosproject.net.Host" ]
import org.onosproject.net.Host;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,711,923
public void setAppearanceValue(String apValue) throws IOException { // MulitLine check and set if ( parent.isMultiline() && apValue.indexOf('\n') != -1 ) { apValue = convertToMultiLine( apValue ); } value = apValue; Iterator<COSObjectable> widgetIter ...
void function(String apValue) throws IOException { if ( parent.isMultiline() && apValue.indexOf('\n') != -1 ) { apValue = convertToMultiLine( apValue ); } value = apValue; Iterator<COSObjectable> widgetIter = widgets.iterator(); while( widgetIter.hasNext() ) { COSObjectable next = widgetIter.next(); PDField field = nul...
/** * This is the public method for setting the appearance stream. * * @param apValue the String value which the apperance shoud represent * * @throws IOException If there is an error creating the stream. */
This is the public method for setting the appearance stream
setAppearanceValue
{ "repo_name": "myrridin/qz-print", "path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/interactive/form/PDAppearance.java", "license": "lgpl-2.1", "size": 24576 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.util.Iterator", "java.util.List", "java.util.Map", "org.apache.pdfbox.cos.COSFloat", "org.apache.pdfbox.cos.COSName", "org.apache.pdfbox.cos.COSStream", "org.apache.pdfbox.cos.COSString", "org.apache.pdfbox.pdfwriter.ContentStreamWriter...
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.pdfbox.cos.COSFloat; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.cos.COSStream; import org.apache.pdfbox.cos.COSString; import org.apache.pdfbox....
import java.io.*; import java.util.*; import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdfwriter.*; import org.apache.pdfbox.pdmodel.common.*; import org.apache.pdfbox.pdmodel.font.*; import org.apache.pdfbox.pdmodel.interactive.action.*; import org.apache.pdfbox.pdmodel.interactive.annotation.*; import org.apa...
[ "java.io", "java.util", "org.apache.pdfbox" ]
java.io; java.util; org.apache.pdfbox;
2,688,374
public void setCiteKeyPattern(AbstractBibtexKeyPattern bibtexKeyPattern) { Objects.requireNonNull(bibtexKeyPattern); List<String> defaultValue = bibtexKeyPattern.getDefaultValue(); Map<String, List<String>> nonDefaultPatterns = bibtexKeyPattern.getPatterns(); setCiteKeyPattern(defau...
void function(AbstractBibtexKeyPattern bibtexKeyPattern) { Objects.requireNonNull(bibtexKeyPattern); List<String> defaultValue = bibtexKeyPattern.getDefaultValue(); Map<String, List<String>> nonDefaultPatterns = bibtexKeyPattern.getPatterns(); setCiteKeyPattern(defaultValue, nonDefaultPatterns); }
/** * Updates the stored key patterns to the given key patterns. * * @param bibtexKeyPattern the key patterns to update to. <br /> * A reference to this object is stored internally and is returned at getCiteKeyPattern(); */
Updates the stored key patterns to the given key patterns
setCiteKeyPattern
{ "repo_name": "mredaelli/jabref", "path": "src/main/java/net/sf/jabref/model/metadata/MetaData.java", "license": "mit", "size": 9680 }
[ "java.util.List", "java.util.Map", "java.util.Objects", "net.sf.jabref.model.bibtexkeypattern.AbstractBibtexKeyPattern" ]
import java.util.List; import java.util.Map; import java.util.Objects; import net.sf.jabref.model.bibtexkeypattern.AbstractBibtexKeyPattern;
import java.util.*; import net.sf.jabref.model.bibtexkeypattern.*;
[ "java.util", "net.sf.jabref" ]
java.util; net.sf.jabref;
2,606,830
private void doOpenWave(int entry) { if (isConnected()) { List<IndexEntry> index = IndexWave.getIndexEntries(backend.getIndexWave()); if (entry >= index.size()) { out.print("Error: entry is out of range, "); if (index.isEmpty()) { out.println("there are no available waves (t...
void function(int entry) { if (isConnected()) { List<IndexEntry> index = IndexWave.getIndexEntries(backend.getIndexWave()); if (entry >= index.size()) { out.print(STR); if (index.isEmpty()) { out.println(STR/new\")"); } else { out.println(STR + (index.size() - 1) + STR/open 0\")"); } } else { setOpenWave(backend.getWav...
/** * Open a wave with a given entry (index in the inbox). * * @param entry into the inbox */
Open a wave with a given entry (index in the inbox)
doOpenWave
{ "repo_name": "jkatzer/jkatzer-wave", "path": "src/org/waveprotocol/wave/examples/client/console/ConsoleClient.java", "license": "apache-2.0", "size": 28156 }
[ "java.util.List", "org.waveprotocol.wave.examples.client.common.IndexEntry", "org.waveprotocol.wave.examples.fedone.frontend.IndexWave" ]
import java.util.List; import org.waveprotocol.wave.examples.client.common.IndexEntry; import org.waveprotocol.wave.examples.fedone.frontend.IndexWave;
import java.util.*; import org.waveprotocol.wave.examples.client.common.*; import org.waveprotocol.wave.examples.fedone.frontend.*;
[ "java.util", "org.waveprotocol.wave" ]
java.util; org.waveprotocol.wave;
2,492,463
Set<IpLink> getIpDeviceIngressLinks(DeviceId deviceId);
Set<IpLink> getIpDeviceIngressLinks(DeviceId deviceId);
/** * Returns all ip links ingressing from the specified device. * * @param deviceId device identifier * @return set of ip device links */
Returns all ip links ingressing from the specified device
getIpDeviceIngressLinks
{ "repo_name": "sonu283304/onos", "path": "apps/iptopology-api/src/main/java/org/onosproject/iptopology/api/link/IpLinkStore.java", "license": "apache-2.0", "size": 3684 }
[ "java.util.Set", "org.onosproject.iptopology.api.IpLink", "org.onosproject.net.DeviceId" ]
import java.util.Set; import org.onosproject.iptopology.api.IpLink; import org.onosproject.net.DeviceId;
import java.util.*; import org.onosproject.iptopology.api.*; import org.onosproject.net.*;
[ "java.util", "org.onosproject.iptopology", "org.onosproject.net" ]
java.util; org.onosproject.iptopology; org.onosproject.net;
929,106
protected int getIntParameter(HttpServletRequest request, String name, int defValue) { String value = getStringParameter(request, name); if (value == null) { return defValue; } try { return Integer.parseInt(value); } catch (NumberFormatException nfe) { return defValue; } }
int function(HttpServletRequest request, String name, int defValue) { String value = getStringParameter(request, name); if (value == null) { return defValue; } try { return Integer.parseInt(value); } catch (NumberFormatException nfe) { return defValue; } }
/** * Gets an integer parameter. If it is not set or invalid (not a * number), it returns the given default value. */
Gets an integer parameter. If it is not set or invalid (not a number), it returns the given default value
getIntParameter
{ "repo_name": "fmui/ApacheChemistryInAction", "path": "the-blend/src/main/java/com/manning/cmis/theblend/servlets/AbstractTheBlendServlet.java", "license": "apache-2.0", "size": 9450 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,283,127
public final Column<Integer> getIdColumn() { return col_id; }
final Column<Integer> function() { return col_id; }
/** * Retrieves the <code>Id</code> <code>Column</code> for this * <code>setting</code> <code>Table</code>. * * see org.melati.poem.prepro.FieldDef#generateColAccessor * @return the id <code>Column</code> */
Retrieves the <code>Id</code> <code>Column</code> for this <code>setting</code> <code>Table</code>. see org.melati.poem.prepro.FieldDef#generateColAccessor
getIdColumn
{ "repo_name": "timp21337/Melati", "path": "poem/src/main/java/org/melati/poem/generated/SettingTableBase.java", "license": "gpl-2.0", "size": 9130 }
[ "org.melati.poem.Column" ]
import org.melati.poem.Column;
import org.melati.poem.*;
[ "org.melati.poem" ]
org.melati.poem;
1,658,987
public Object findEarliestActiveOrder(Integer userId) { // I need to access an association, so I can't use the parent helper class Criteria criteria = getSession().createCriteria(OrderDTO.class) .createAlias("orderStatus", "s") .add(Restrictions.eq("s.id", Constan...
Object function(Integer userId) { Criteria criteria = getSession().createCriteria(OrderDTO.class) .createAlias(STR, "s") .add(Restrictions.eq("s.id", Constants.ORDER_STATUS_ACTIVE)) .add(Restrictions.eq(STR, 0)) .createAlias(STR, "u") .add(Restrictions.eq("u.id", userId)) .addOrder(Order.asc(STR)); return findFirst(cri...
/** * Finds all active orders for a given user * @param userId * @return */
Finds all active orders for a given user
findEarliestActiveOrder
{ "repo_name": "psalaberria002/jbilling3", "path": "src/java/com/sapienter/jbilling/server/order/db/OrderDAS.java", "license": "agpl-3.0", "size": 17282 }
[ "com.sapienter.jbilling.server.util.Constants", "org.hibernate.Criteria", "org.hibernate.criterion.Order", "org.hibernate.criterion.Restrictions" ]
import com.sapienter.jbilling.server.util.Constants; import org.hibernate.Criteria; import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions;
import com.sapienter.jbilling.server.util.*; import org.hibernate.*; import org.hibernate.criterion.*;
[ "com.sapienter.jbilling", "org.hibernate", "org.hibernate.criterion" ]
com.sapienter.jbilling; org.hibernate; org.hibernate.criterion;
87,802
protected void loadLayout(Reader in) throws IOException { PropertiesReader reader = new PropertiesReader(in); while (reader.nextProperty()) { storage.put(reader.getPropertyName(), reader.getPropertyValue()); int idx = checkHeaderComment(reader.getCommentLines()); ...
void function(Reader in) throws IOException { PropertiesReader reader = new PropertiesReader(in); while (reader.nextProperty()) { storage.put(reader.getPropertyName(), reader.getPropertyValue()); int idx = checkHeaderComment(reader.getCommentLines()); layout.put(reader.getPropertyName(), new Layout(idx < reader.getComm...
/** * Reads a properties file and stores its internal structure. The found * properties will be added to the associated configuration object. * * @param in the reader to the properties file * @throws java.io.IOException if an error occurs */
Reads a properties file and stores its internal structure. The found properties will be added to the associated configuration object
loadLayout
{ "repo_name": "boneman1231/org.apache.felix", "path": "trunk/utils/src/main/java/org/apache/felix/utils/properties/Properties.java", "license": "apache-2.0", "size": 33267 }
[ "java.io.IOException", "java.io.Reader", "java.util.ArrayList" ]
import java.io.IOException; import java.io.Reader; import java.util.ArrayList;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
749,438
private void deleteOldBooks() throws InterruptedException { final String TAG = BookAdder.TAG + "#deleteOldBooks()"; L.d(TAG, "started"); List<File> singleBookFiles = getSingleBookFiles(); List<File> collectionBookFolders = getCollectionBookFiles(); //getting books to remove ...
void function() throws InterruptedException { final String TAG = BookAdder.TAG + STR; L.d(TAG, STR); List<File> singleBookFiles = getSingleBookFiles(); List<File> collectionBookFolders = getCollectionBookFiles(); List<Book> booksToRemove = new ArrayList<>(); for (Book book : db.getActiveBooks()) { boolean bookExists = ...
/** * Deletes all the books that exist on the database but not on the hard drive or on the saved * audio book paths. */
Deletes all the books that exist on the database but not on the hard drive or on the saved audio book paths
deleteOldBooks
{ "repo_name": "intrications/MaterialAudiobookPlayer", "path": "audiobook/src/main/java/de/ph1b/audiobook/model/BookAdder.java", "license": "lgpl-3.0", "size": 27085 }
[ "de.ph1b.audiobook.activity.BaseActivity", "de.ph1b.audiobook.utils.L", "java.io.File", "java.util.ArrayList", "java.util.List" ]
import de.ph1b.audiobook.activity.BaseActivity; import de.ph1b.audiobook.utils.L; import java.io.File; import java.util.ArrayList; import java.util.List;
import de.ph1b.audiobook.activity.*; import de.ph1b.audiobook.utils.*; import java.io.*; import java.util.*;
[ "de.ph1b.audiobook", "java.io", "java.util" ]
de.ph1b.audiobook; java.io; java.util;
1,110,831
private String exportCoord(Coordinate coord) { return coord.x + " " + coord.y; }
String function(Coordinate coord) { return coord.x + " " + coord.y; }
/** * Renders a single coordinate * * @param coord The Coordinate object * * @return The coordinate as string */
Renders a single coordinate
exportCoord
{ "repo_name": "pgiraud/georchestra", "path": "gt-mif/src/main/java/org/geotools/data/mif/MIFFile.java", "license": "gpl-3.0", "size": 71802 }
[ "com.vividsolutions.jts.geom.Coordinate" ]
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.*;
[ "com.vividsolutions.jts" ]
com.vividsolutions.jts;
793,774
private boolean isSourcePackage(IPackageFragment packageFragment) throws JavaModelException { return packageFragment.getKind() == IPackageFragmentRoot.K_SOURCE; }
boolean function(IPackageFragment packageFragment) throws JavaModelException { return packageFragment.getKind() == IPackageFragmentRoot.K_SOURCE; }
/** * Checks if a {@link IPackageFragment} is a source package. */
Checks if a <code>IPackageFragment</code> is a source package
isSourcePackage
{ "repo_name": "tsaglam/EcoreMetamodelExtraction", "path": "src/main/java/eme/extractor/JavaProjectExtractor.java", "license": "epl-1.0", "size": 5027 }
[ "org.eclipse.jdt.core.IPackageFragment", "org.eclipse.jdt.core.IPackageFragmentRoot", "org.eclipse.jdt.core.JavaModelException" ]
import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
763,735
private Control getParent(final Widget widget) { Object o = ObjectUtil.invokeMethod(widget, "getParent"); if (o == null){ return null; } if (o instanceof Control) { return (Control) o; } throw new RedDeerException( "Return value of method getObject() on class " + o.getClass() + " shoul...
Control function(final Widget widget) { Object o = ObjectUtil.invokeMethod(widget, STR); if (o == null){ return null; } if (o instanceof Control) { return (Control) o; } throw new RedDeerException( STR + o.getClass() + STR + o.getClass()); }
/** * Gets parent of specified widget. * * @param widget widget to find parent * @return parent widget of specified widget */
Gets parent of specified widget
getParent
{ "repo_name": "djelinek/reddeer", "path": "plugins/org.eclipse.reddeer.core/src/org/eclipse/reddeer/core/lookup/WidgetLookup.java", "license": "epl-1.0", "size": 22265 }
[ "org.eclipse.reddeer.common.exception.RedDeerException", "org.eclipse.reddeer.common.util.ObjectUtil", "org.eclipse.swt.widgets.Control", "org.eclipse.swt.widgets.Widget" ]
import org.eclipse.reddeer.common.exception.RedDeerException; import org.eclipse.reddeer.common.util.ObjectUtil; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Widget;
import org.eclipse.reddeer.common.exception.*; import org.eclipse.reddeer.common.util.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.reddeer", "org.eclipse.swt" ]
org.eclipse.reddeer; org.eclipse.swt;
416,464
@Override public void drawScreen(int x, int y, float dunno) { int i = 0; this.drawGradientRect(0, 0, this.width, this.height, this.color, this.color - 200000000); this.drawCenteredString(this.fontRendererObj, this.classe + ChatColor.RESET, this.width / 2, 14, Integer.MAX_VALUE); ...
void function(int x, int y, float dunno) { int i = 0; this.drawGradientRect(0, 0, this.width, this.height, this.color, this.color - 200000000); this.drawCenteredString(this.fontRendererObj, this.classe + ChatColor.RESET, this.width / 2, 14, Integer.MAX_VALUE); drawEntity(this.width / 2, this.height / 2, 28, 0, 0, this....
/** * Draws the screen and all the components in it. */
Draws the screen and all the components in it
drawScreen
{ "repo_name": "GhostMonk3408/MidgarCrusade", "path": "src/main/java/fr/toss/client/gui/GuiRaceInformation.java", "license": "lgpl-2.1", "size": 5640 }
[ "fr.toss.common.command.ChatColor" ]
import fr.toss.common.command.ChatColor;
import fr.toss.common.command.*;
[ "fr.toss.common" ]
fr.toss.common;
2,677,554
protected void emit_AttributeDefinition___ReferentialKeyword_4_0_LeftParenthesisKeyword_4_1_RightParenthesisKeyword_4_3__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
/** * Ambiguous syntax: * ('referential' '(' ')')? * * This ambiguous syntax occurs at: * name=ID ':' (ambiguity) type=AbstractTypeReference * preferred?='preferred' (ambiguity) type=AbstractTypeReference * unique?='unique' (ambiguity) type=AbstractTypeReference */
Ambiguous syntax: ('referential' '(' ')')? This ambiguous syntax occurs at: name=ID ':' (ambiguity) type=AbstractTypeReference preferred?='preferred' (ambiguity) type=AbstractTypeReference unique?='unique' (ambiguity) type=AbstractTypeReference
emit_AttributeDefinition___ReferentialKeyword_4_0_LeftParenthesisKeyword_4_1_RightParenthesisKeyword_4_3__q
{ "repo_name": "TypeFox/bridgepoint", "path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/src-gen/org/xtuml/bp/xtext/masl/serializer/MASLSyntacticSequencer.java", "license": "apache-2.0", "size": 52664 }
[ "java.util.List", "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.nodemodel.INode", "org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider" ]
import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider;
import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.xtext" ]
java.util; org.eclipse.emf; org.eclipse.xtext;
2,302,842
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EsbPackage.Literals.SWITCH_CASE_PARENT_CONTAINER__SWITCH_CASE_CONTAINER, EsbFact...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EsbPackage.Literals.SWITCH_CASE_PARENT_CONTAINER__SWITCH_CASE_CONTAINER, EsbFactory.eINSTANCE.createSwitchCaseContainer())); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "thiliniish/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/SwitchCaseParentContainerItemProvider.java", "license": "apache-2.0", "size": 5381 }
[ "java.util.Collection", "org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory", "org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage" ]
import java.util.Collection; import org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;
import java.util.*; import org.wso2.developerstudio.eclipse.gmf.esb.*;
[ "java.util", "org.wso2.developerstudio" ]
java.util; org.wso2.developerstudio;
2,878,105
private void sendEmailToUsers(List<User> toAddress, RenderedTemplate rt, String fromEmail, String fromName){ StringBuilder message = new StringBuilder(); message.append(MIME_ADVISORY); if (rt.getRenderedMessage() != null) { message.append(BOUNDARY_LINE); message.append("Content-Type: text/plain; charset=...
void function(List<User> toAddress, RenderedTemplate rt, String fromEmail, String fromName){ StringBuilder message = new StringBuilder(); message.append(MIME_ADVISORY); if (rt.getRenderedMessage() != null) { message.append(BOUNDARY_LINE); message.append(STR); message.append(rt.getRenderedMessage()); } if (rt.getRendere...
/** * method to send email to Users. * @param toAddress * @param rt * @param fromEmail * @param fromName */
method to send email to Users
sendEmailToUsers
{ "repo_name": "ouit0408/sakai", "path": "emailtemplateservice/impl/logic/src/java/org/sakaiproject/emailtemplateservice/service/impl/EmailTemplateServiceImpl.java", "license": "apache-2.0", "size": 25869 }
[ "java.util.ArrayList", "java.util.List", "org.apache.commons.lang.StringUtils", "org.sakaiproject.emailtemplateservice.model.RenderedTemplate", "org.sakaiproject.user.api.User" ]
import java.util.ArrayList; import java.util.List; import org.apache.commons.lang.StringUtils; import org.sakaiproject.emailtemplateservice.model.RenderedTemplate; import org.sakaiproject.user.api.User;
import java.util.*; import org.apache.commons.lang.*; import org.sakaiproject.emailtemplateservice.model.*; import org.sakaiproject.user.api.*;
[ "java.util", "org.apache.commons", "org.sakaiproject.emailtemplateservice", "org.sakaiproject.user" ]
java.util; org.apache.commons; org.sakaiproject.emailtemplateservice; org.sakaiproject.user;
2,096,289
public static MozuClient<com.mozu.api.contracts.productadmin.FacetSet> getFacetCategoryListClient(Integer categoryId, Boolean includeAvailable, Boolean validate, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.FacetUrl.getFacetCategoryListUrl(categoryId, includeA...
static MozuClient<com.mozu.api.contracts.productadmin.FacetSet> function(Integer categoryId, Boolean includeAvailable, Boolean validate, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.FacetUrl.getFacetCategoryListUrl(categoryId, includeAvailable, responseFields, validat...
/** * Retrieves a list of the facets defined for the specified category. * <p><pre><code> * MozuClient<com.mozu.api.contracts.productadmin.FacetSet> mozuClient=GetFacetCategoryListClient( categoryId, includeAvailable, validate, responseFields); * client.setBaseAddress(url); * client.executeRequest(); ...
Retrieves a list of the facets defined for the specified category. <code><code> MozuClient mozuClient=GetFacetCategoryListClient( categoryId, includeAvailable, validate, responseFields); client.setBaseAddress(url); client.executeRequest(); FacetSet facetSet = client.Result(); </code></code>
getFacetCategoryListClient
{ "repo_name": "johngatti/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/FacetClient.java", "license": "mit", "size": 10638 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
418,407
public Request createRequest(HttpHeaders headers, RequestBody body, UriInfo uriInfo, Request.Type requestType, ResourceInstance resource) { switch (requestType) { case GET: return new GetRequest(headers, body, uriInfo, resource); case PUT: return createPu...
Request function(HttpHeaders headers, RequestBody body, UriInfo uriInfo, Request.Type requestType, ResourceInstance resource) { switch (requestType) { case GET: return new GetRequest(headers, body, uriInfo, resource); case PUT: return createPutRequest(headers, body, uriInfo, resource); case DELETE: return new DeleteReq...
/** * Create a request instance. * * @param headers http headers * @param uriInfo uri information * @param requestType http request type * @param resource associated resource instance * * @return a new Request instance */
Create a request instance
createRequest
{ "repo_name": "zouzhberk/ambaridemo", "path": "demo-server/src/main/java/org/apache/ambari/server/api/services/RequestFactory.java", "license": "apache-2.0", "size": 6471 }
[ "javax.ws.rs.core.HttpHeaders", "javax.ws.rs.core.UriInfo", "org.apache.ambari.server.api.resources.ResourceInstance" ]
import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.UriInfo; import org.apache.ambari.server.api.resources.ResourceInstance;
import javax.ws.rs.core.*; import org.apache.ambari.server.api.resources.*;
[ "javax.ws", "org.apache.ambari" ]
javax.ws; org.apache.ambari;
827,627
public List<CmsFormatterChangeSet> getFormatterChangeSets() { CmsADEConfigData currentConfig = this; List<CmsFormatterChangeSet> result = Lists.newArrayList(); while (currentConfig != null) { CmsFormatterChangeSet changes = currentConfig.getOwnFormatterChangeSet(); i...
List<CmsFormatterChangeSet> function() { CmsADEConfigData currentConfig = this; List<CmsFormatterChangeSet> result = Lists.newArrayList(); while (currentConfig != null) { CmsFormatterChangeSet changes = currentConfig.getOwnFormatterChangeSet(); if (changes != null) { result.add(changes); } currentConfig = currentConfig...
/** * Returns the formatter change sets for this and all parent sitemaps, ordered by increasing folder depth of the sitemap.<p> * * @return the formatter change sets for all ancestor sitemaps */
Returns the formatter change sets for this and all parent sitemaps, ordered by increasing folder depth of the sitemap
getFormatterChangeSets
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/ade/configuration/CmsADEConfigData.java", "license": "lgpl-2.1", "size": 71441 }
[ "com.google.common.collect.Lists", "java.util.Collections", "java.util.List", "org.opencms.ade.configuration.formatters.CmsFormatterChangeSet" ]
import com.google.common.collect.Lists; import java.util.Collections; import java.util.List; import org.opencms.ade.configuration.formatters.CmsFormatterChangeSet;
import com.google.common.collect.*; import java.util.*; import org.opencms.ade.configuration.formatters.*;
[ "com.google.common", "java.util", "org.opencms.ade" ]
com.google.common; java.util; org.opencms.ade;
2,023,948
@SimpleFunction(description = "Draws the specified text relative to the specified coordinates " + "using the values of the FontSize and TextAlignment properties.") public void DrawText(String text, int x, int y) { float fontScalingFactor = $form().deviceDensity(); float correctedX = x * fontScalingFac...
@SimpleFunction(description = STR + STR) void function(String text, int x, int y) { float fontScalingFactor = $form().deviceDensity(); float correctedX = x * fontScalingFactor; float correctedY = y * fontScalingFactor; view.canvas.drawText(text, correctedX, correctedY, paint); view.invalidate(); }
/** * Draws the specified text relative to the specified coordinates * using the values of the {@link #FontSize(float)} and * {@link #TextAlignment(int)} properties. * * @param text the text to draw * @param x the x-coordinate of the origin * @param y the y-coordinate of the origin */
Draws the specified text relative to the specified coordinates using the values of the <code>#FontSize(float)</code> and <code>#TextAlignment(int)</code> properties
DrawText
{ "repo_name": "afmckinney/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Canvas.java", "license": "apache-2.0", "size": 56654 }
[ "com.google.appinventor.components.annotations.SimpleFunction" ]
import com.google.appinventor.components.annotations.SimpleFunction;
import com.google.appinventor.components.annotations.*;
[ "com.google.appinventor" ]
com.google.appinventor;
2,831
private void download() { JFrame f = EditorAgent.getRegistry().getTaskBar().getFrame(); FileChooser chooser = new FileChooser(f, FileChooser.SAVE, "Download", "Select where to download the file.", null, true); chooser.setSelectedFileFull(FileAnnotationData.ORIGINAL_METADATA_NAME); chooser.setApproveBut...
void function() { JFrame f = EditorAgent.getRegistry().getTaskBar().getFrame(); FileChooser chooser = new FileChooser(f, FileChooser.SAVE, STR, STR, null, true); chooser.setSelectedFileFull(FileAnnotationData.ORIGINAL_METADATA_NAME); chooser.setApproveButtonText(STR); IconManager icons = IconManager.getInstance(); choo...
/** * Brings up a dialog so that the user can select where to * download the file. */
Brings up a dialog so that the user can select where to download the file
download
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/OriginalMetadataComponent.java", "license": "gpl-2.0", "size": 13271 }
[ "javax.swing.JButton", "javax.swing.JComponent", "javax.swing.JFrame", "org.openmicroscopy.shoola.agents.editor.EditorAgent", "org.openmicroscopy.shoola.agents.metadata.IconManager", "org.openmicroscopy.shoola.util.ui.filechooser.FileChooser" ]
import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JFrame; import org.openmicroscopy.shoola.agents.editor.EditorAgent; import org.openmicroscopy.shoola.agents.metadata.IconManager; import org.openmicroscopy.shoola.util.ui.filechooser.FileChooser;
import javax.swing.*; import org.openmicroscopy.shoola.agents.editor.*; import org.openmicroscopy.shoola.agents.metadata.*; import org.openmicroscopy.shoola.util.ui.filechooser.*;
[ "javax.swing", "org.openmicroscopy.shoola" ]
javax.swing; org.openmicroscopy.shoola;
2,230,539
public void setEntityState(Entity entityIn, byte state) { }
void function(Entity entityIn, byte state) { }
/** * sends a Packet 38 (Entity Status) to all tracked players of that entity */
sends a Packet 38 (Entity Status) to all tracked players of that entity
setEntityState
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/world/World.java", "license": "gpl-3.0", "size": 141454 }
[ "net.minecraft.entity.Entity" ]
import net.minecraft.entity.Entity;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
1,463,027
public void unfreezePersistentStore() throws StandardException; /** Encrypt cleartext into ciphertext.
void function() throws StandardException; /** Encrypt cleartext into ciphertext.
/** * Unfreeze the database, persistent storage can now be altered. * * @exception StandardException Standard Derby exception policy. */
Unfreeze the database, persistent storage can now be altered
unfreezePersistentStore
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/iapi/store/raw/RawStoreFactory.java", "license": "apache-2.0", "size": 41291 }
[ "org.apache.derby.shared.common.error.StandardException" ]
import org.apache.derby.shared.common.error.StandardException;
import org.apache.derby.shared.common.error.*;
[ "org.apache.derby" ]
org.apache.derby;
2,716,245
@Test public void checkState() { // Create the parameters for input. It needs an IUpdateable and a // ConcurrentLinkedQueue. ICEObject object = new ICEObject(); ConcurrentLinkedQueue<AbstractMeshController> queue = new ConcurrentLinkedQueue<AbstractMeshController>(); // The AbstractMeshController to ...
void function() { ICEObject object = new ICEObject(); ConcurrentLinkedQueue<AbstractMeshController> queue = new ConcurrentLinkedQueue<AbstractMeshController>(); TestMeshController controller = new TestMeshController(object, queue); assertEquals(StateType.None, controller.getState()); controller.setState(null); assertEq...
/** * <p> * Tests the ability to get and set the state of the view associated with * this controller. * </p> * */
Tests the ability to get and set the state of the view associated with this controller.
checkState
{ "repo_name": "SmithRWORNL/ice", "path": "tests/org.eclipse.ice.client.widgets.rcp.test/src/org/eclipse/ice/client/widgets/mesh/test/AbstractMeshControllerTester.java", "license": "epl-1.0", "size": 13087 }
[ "java.util.concurrent.ConcurrentLinkedQueue", "org.eclipse.ice.client.widgets.mesh.AbstractMeshController", "org.eclipse.ice.client.widgets.mesh.StateType", "org.eclipse.ice.datastructures.ICEObject", "org.junit.Assert" ]
import java.util.concurrent.ConcurrentLinkedQueue; import org.eclipse.ice.client.widgets.mesh.AbstractMeshController; import org.eclipse.ice.client.widgets.mesh.StateType; import org.eclipse.ice.datastructures.ICEObject; import org.junit.Assert;
import java.util.concurrent.*; import org.eclipse.ice.client.widgets.mesh.*; import org.eclipse.ice.datastructures.*; import org.junit.*;
[ "java.util", "org.eclipse.ice", "org.junit" ]
java.util; org.eclipse.ice; org.junit;
2,443,536
public static boolean writeFile(File file, InputStream stream, boolean append) { OutputStream o = null; try { makeDirs(file.getAbsolutePath()); o = new FileOutputStream(file, append); byte data[] = new byte[1024]; int length = -1; while ((l...
static boolean function(File file, InputStream stream, boolean append) { OutputStream o = null; try { makeDirs(file.getAbsolutePath()); o = new FileOutputStream(file, append); byte data[] = new byte[1024]; int length = -1; while ((length = stream.read(data)) != -1) { o.write(data, 0, length); } o.flush(); return true; ...
/** * write file * * @param file the file to be opened for writing. * @param stream the input stream * @param append if <code>true</code>, then bytes will be written to the end of the file rather than the beginning * @return return true * @throws RuntimeException if an error occurs ...
write file
writeFile
{ "repo_name": "DesignQu/MVPFrames", "path": "Common/src/main/java/com/tool/common/utils/FileUtils.java", "license": "apache-2.0", "size": 26780 }
[ "java.io.File", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,658,297
public Timestamp getUpdated(); public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR;
/** Get Updated. * Date this record was updated */
Get Updated. Date this record was updated
getUpdated
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/I_AD_User.java", "license": "gpl-2.0", "size": 13937 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,101,953
if(this.minorPremise.isPresent()) throw new AIFArgumentBuilderException(); this.minorPremise = super.iNodeText(Optional.empty(), description); return this; }
if(this.minorPremise.isPresent()) throw new AIFArgumentBuilderException(); this.minorPremise = super.iNodeText(Optional.empty(), description); return this; }
/** Set the minor premise of this argument by providing its description. This will cause the creation of a new I-Node with * the given description, of which the ID becomes the ID of the premise. Example: "p". */
Set the minor premise of this argument by providing its description. This will cause the creation of a new I-Node with
setMinorPremiseByDescription
{ "repo_name": "BasTesterink/OO2APL-capabilities-library", "path": "src/argumentationAIFCapability/argumentbuilders/ModusPonensBuilder.java", "license": "mit", "size": 5043 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
1,551,282
@Override public void notifyChanged(Notification notification) { updateChildren(notification); super.notifyChanged(notification); }
void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); }
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "dresden-ocl/dresdenocl", "path": "plugins/org.dresdenocl.language.ocl.edit/src/org/dresdenocl/language/ocl/provider/CallExpCSItemProvider.java", "license": "lgpl-3.0", "size": 2597 }
[ "org.eclipse.emf.common.notify.Notification" ]
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
523,755
public boolean reserveHistoryForPreloading(Map<T2<Integer, Integer>, Long> reservationMap) { return false; }
boolean function(Map<T2<Integer, Integer>, Long> reservationMap) { return false; }
/** * Reserve update history for preloading. * * @param reservationMap Map contains of counters for partitions of groups. * @return True if successfully reserved. */
Reserve update history for preloading
reserveHistoryForPreloading
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java", "license": "apache-2.0", "size": 62500 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,422,561
protected int getProxyPort(Element configElement) throws BeanCreationException { if (!configElement.hasAttributeNS(null, PROXY_PORT_ATTRIB_NAME)) { return DEFAULT_PROXY_PORT; } String port = DatatypeHelper.safeTrimOrNullString(configElement.getAttributeNS(null, PROXY_PORT_ATTRIB...
int function(Element configElement) throws BeanCreationException { if (!configElement.hasAttributeNS(null, PROXY_PORT_ATTRIB_NAME)) { return DEFAULT_PROXY_PORT; } String port = DatatypeHelper.safeTrimOrNullString(configElement.getAttributeNS(null, PROXY_PORT_ATTRIB_NAME)); if (port == null) { log.error(STR + PROXY_PORT...
/** * Gets the value of the {@value #PROXY_PORT_ATTRIB_NAME} attribute. * * @param configElement resource configuration element * * @return value of the attribute, or {@value #DEFAULT_PROXY_PORT} if the attribute is not defined * * @throws BeanCreationException thrown if the attrib...
Gets the value of the #PROXY_PORT_ATTRIB_NAME attribute
getProxyPort
{ "repo_name": "brainysmith/shibboleth-common", "path": "src/main/java/edu/internet2/middleware/shibboleth/common/config/resource/SVNResourceBeanDefinitionParser.java", "license": "apache-2.0", "size": 22636 }
[ "org.opensaml.xml.util.DatatypeHelper", "org.springframework.beans.factory.BeanCreationException", "org.w3c.dom.Element" ]
import org.opensaml.xml.util.DatatypeHelper; import org.springframework.beans.factory.BeanCreationException; import org.w3c.dom.Element;
import org.opensaml.xml.util.*; import org.springframework.beans.factory.*; import org.w3c.dom.*;
[ "org.opensaml.xml", "org.springframework.beans", "org.w3c.dom" ]
org.opensaml.xml; org.springframework.beans; org.w3c.dom;
1,174,895
public static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable) { ExtensionDescription desc = ExtensionDescription.getDefaultDescription(Relation.class); desc.setRequired(required); desc.setRepeatable(repeatable); return desc; }
static ExtensionDescription function(boolean required, boolean repeatable) { ExtensionDescription desc = ExtensionDescription.getDefaultDescription(Relation.class); desc.setRequired(required); desc.setRepeatable(repeatable); return desc; }
/** * Returns the extension description, specifying whether it is required, and * whether it is repeatable. * * @param required whether it is required * @param repeatable whether it is repeatable * @return extension description */
Returns the extension description, specifying whether it is required, and whether it is repeatable
getDefaultDescription
{ "repo_name": "ermh/Gdata-mavenized", "path": "java/src/com/google/gdata/data/contacts/Relation.java", "license": "apache-2.0", "size": 6475 }
[ "com.google.gdata.data.ExtensionDescription" ]
import com.google.gdata.data.ExtensionDescription;
import com.google.gdata.data.*;
[ "com.google.gdata" ]
com.google.gdata;
91,840
public E argMax() { double maxCount = Double.NEGATIVE_INFINITY; E maxKey = null; for (Map.Entry<E, Double> entry : entries.entrySet()) { if (entry.getValue() > maxCount || maxKey == null) { maxKey = entry.getKey(); maxCount = entry.getValue(); } } return maxKey; }
E function() { double maxCount = Double.NEGATIVE_INFINITY; E maxKey = null; for (Map.Entry<E, Double> entry : entries.entrySet()) { if (entry.getValue() > maxCount maxKey == null) { maxKey = entry.getKey(); maxCount = entry.getValue(); } } return maxKey; }
/** * Finds the key with maximum count. This is a linear operation, and ties * are broken arbitrarily. * * @return a key with minumum count */
Finds the key with maximum count. This is a linear operation, and ties are broken arbitrarily
argMax
{ "repo_name": "text-machine-lab/CliRel", "path": "model/kim/berkeleyparser/src/edu/berkeley/nlp/util/Counter.java", "license": "apache-2.0", "size": 14057 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,943,445
public final void setParent(ChannelIF parent) { this.parent = parent; }
final void function(ChannelIF parent) { this.parent = parent; }
/** * Sets parent channel of this item. * * @param parent parent channel. */
Sets parent channel of this item
setParent
{ "repo_name": "nikos/informa", "path": "src/main/java/de/nava/informa/utils/manager/memory/Item.java", "license": "epl-1.0", "size": 1343 }
[ "de.nava.informa.core.ChannelIF" ]
import de.nava.informa.core.ChannelIF;
import de.nava.informa.core.*;
[ "de.nava.informa" ]
de.nava.informa;
222,960
@SuppressWarnings("unchecked") public Element addContent(int index, Collection c) { content.addAll(index, c); return this; }
@SuppressWarnings(STR) Element function(int index, Collection c) { content.addAll(index, c); return this; }
/** * Inserts the content in a collection into the content list * at the given index. In event of an exception the original content * will be unchanged and the objects in the supplied collection will be * unaltered. * * @param index location for adding the collection * @param c coll...
Inserts the content in a collection into the content list at the given index. In event of an exception the original content will be unchanged and the objects in the supplied collection will be unaltered
addContent
{ "repo_name": "roboidstudio/embedded", "path": "org.jdom/src/org/jdom/Element.java", "license": "lgpl-2.1", "size": 58137 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,189,835
public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn) { this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 0, 12, 4, 12, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false); ...
boolean function(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn) { this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 0, 12, 4, 12, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false); this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 5, 0, 12,...
/** * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes * Mineshafts at the end, it adds Fences... */
second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at the end, it adds Fences..
addComponentParts
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/world/gen/structure/StructureNetherBridgePieces.java", "license": "gpl-3.0", "size": 107152 }
[ "java.util.Random", "net.minecraft.block.state.IBlockState", "net.minecraft.init.Blocks", "net.minecraft.util.EnumFacing", "net.minecraft.util.math.BlockPos", "net.minecraft.world.World" ]
import java.util.Random; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World;
import java.util.*; import net.minecraft.block.state.*; import net.minecraft.init.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*;
[ "java.util", "net.minecraft.block", "net.minecraft.init", "net.minecraft.util", "net.minecraft.world" ]
java.util; net.minecraft.block; net.minecraft.init; net.minecraft.util; net.minecraft.world;
830,238
private void updateNonIpInterface(Connection dbc, Date now, DbNodeEntry node, int ifIndex, IfSnmpCollector snmpc) throws SQLException { if (log().isDebugEnabled()) { log().debug("updateNonIpInterface: node= " + node.getNodeId() + " ifIndex= " + ifIndex); ...
void function(Connection dbc, Date now, DbNodeEntry node, int ifIndex, IfSnmpCollector snmpc) throws SQLException { if (log().isDebugEnabled()) { log().debug(STR + node.getNodeId() + STR + ifIndex); } if (snmpc == null snmpc.failed()) { return; } InetAddress ifAddr = null; ifAddr = ZERO_ZERO_ZERO_ZERO; if (ifAddr == nu...
/** * This method is responsible for updating the ipInterface table entry for a * specific interface. * * @param dbc * Database Connection * @param now * Date/time to be associated with the update. * @param node * Node entry for the node bei...
This method is responsible for updating the ipInterface table entry for a specific interface
updateNonIpInterface
{ "repo_name": "tharindum/opennms_dashboard", "path": "opennms-services/src/main/java/org/opennms/netmgt/capsd/RescanProcessor.java", "license": "gpl-2.0", "size": 164398 }
[ "java.net.InetAddress", "java.sql.Connection", "java.sql.SQLException", "java.util.Date" ]
import java.net.InetAddress; import java.sql.Connection; import java.sql.SQLException; import java.util.Date;
import java.net.*; import java.sql.*; import java.util.*;
[ "java.net", "java.sql", "java.util" ]
java.net; java.sql; java.util;
118,569
private void activateLeaderConnection(GrpcMessagingConnection leaderConnection) throws IOException { // Register connection error listener. leaderConnection.onException((error) -> { LOG.warn("Backup-leader connection failed.", error); }); // Register connection close listener. mLeaderC...
void function(GrpcMessagingConnection leaderConnection) throws IOException { leaderConnection.onException((error) -> { LOG.warn(STR, error); }); mLeaderConnectionCloseListener = leaderConnection.onClose((connection) -> { LOG.info(STR, connection); if (mBackupFuture != null && !mBackupFuture.isDone()) { LOG.warn(STR); m...
/** * Prepares new leader connection. */
Prepares new leader connection
activateLeaderConnection
{ "repo_name": "bf8086/alluxio", "path": "core/server/master/src/main/java/alluxio/master/backup/BackupWorkerRole.java", "license": "apache-2.0", "size": 16056 }
[ "java.io.IOException", "java.util.concurrent.ExecutionException" ]
import java.io.IOException; import java.util.concurrent.ExecutionException;
import java.io.*; import java.util.concurrent.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,690,218
public ConsulJaxRsClient update(ServiceHealth health) { this.health = health; return this; }
ConsulJaxRsClient function(ServiceHealth health) { this.health = health; return this; }
/** * Update the client state from the provided Consul health * * @param health the service health from Consul * @return the updated client */
Update the client state from the provided Consul health
update
{ "repo_name": "ozwolf-software/consul-jaxrs", "path": "src/main/java/net/ozwolf/consul/client/ConsulJaxRsClient.java", "license": "apache-2.0", "size": 8516 }
[ "com.orbitz.consul.model.health.ServiceHealth" ]
import com.orbitz.consul.model.health.ServiceHealth;
import com.orbitz.consul.model.health.*;
[ "com.orbitz.consul" ]
com.orbitz.consul;
1,943,135
public ArrayList<Peak> getPeaks() { return peaks; }
ArrayList<Peak> function() { return peaks; }
/** * Gets the list of peaks inside this spectrum. * * @return The list of peaks. */
Gets the list of peaks inside this spectrum
getPeaks
{ "repo_name": "vtomasr5/tap", "path": "src/tazam/PowerSpectrum.java", "license": "gpl-3.0", "size": 7311 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,297,227
private synchronized static void establishCacheManager() { URL url = PreparedStatementFactory.class.getResource("/ehcache.xml"); logger.debug("Establishing cache manager with config file: " + url.getPath()); if (manager == null) { manager = CacheManager.newInstance(ur...
synchronized static void function() { URL url = PreparedStatementFactory.class.getResource(STR); logger.debug(STR + url.getPath()); if (manager == null) { manager = CacheManager.newInstance(url); } cacheManagerEstablished = true; }
/** * Establishes the cache if it doesn't exist. */
Establishes the cache if it doesn't exist
establishCacheManager
{ "repo_name": "PearsonEducation/Docussandra", "path": "cassandra/src/main/java/com/pearson/docussandra/cache/CacheFactory.java", "license": "apache-2.0", "size": 3105 }
[ "com.pearson.docussandra.persistence.helper.PreparedStatementFactory", "net.sf.ehcache.CacheManager" ]
import com.pearson.docussandra.persistence.helper.PreparedStatementFactory; import net.sf.ehcache.CacheManager;
import com.pearson.docussandra.persistence.helper.*; import net.sf.ehcache.*;
[ "com.pearson.docussandra", "net.sf.ehcache" ]
com.pearson.docussandra; net.sf.ehcache;
264,781
public static String toString(JSONArray ja) throws JSONException { int i; JSONObject jo; String key; Iterator keys; int length; Object object; StringBuffer sb = new StringBuffer(); String tagName; String value; // Emit <tagName ...
static String function(JSONArray ja) throws JSONException { int i; JSONObject jo; String key; Iterator keys; int length; Object object; StringBuffer sb = new StringBuffer(); String tagName; String value; tagName = ja.getString(0); XML.noSpace(tagName); tagName = XML.escape(tagName); sb.append('<'); sb.append(tagName); ...
/** * Reverse the JSONML transformation, making an XML text from a JSONArray. * @param ja A JSONArray. * @return An XML string. * @throws JSONException */
Reverse the JSONML transformation, making an XML text from a JSONArray
toString
{ "repo_name": "jerumble/vVoteVerifier", "path": "src/com/vvote/thirdparty/json/orgjson/JSONML.java", "license": "gpl-3.0", "size": 15024 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,225,886
public void init(JSONObject options) { mListener.onRequestFailed(mInstanceId, NOT_SUPPORTED_ERROR); }
void function(JSONObject options) { mListener.onRequestFailed(mInstanceId, NOT_SUPPORTED_ERROR); }
/** * Called when init command is received. */
Called when init command is received
init
{ "repo_name": "crosswalk-project/crosswalk-android-extensions", "path": "iap/src/org/xwalk/extensions/InAppPurchaseHelper.java", "license": "bsd-3-clause", "size": 2629 }
[ "org.json.JSONObject" ]
import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
936,330
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") public static void writeError(Throwable ex, BinaryRawWriterEx writer) { writer.writeObjectDetached(ex.getClass().getName()); writer.writeObjectDetached(ex.getMessage()); writer.writeObjectDetached(X.getFullStackTrace(ex)); ...
@SuppressWarnings(STR) static void function(Throwable ex, BinaryRawWriterEx writer) { writer.writeObjectDetached(ex.getClass().getName()); writer.writeObjectDetached(ex.getMessage()); writer.writeObjectDetached(X.getFullStackTrace(ex)); PlatformNativeException nativeCause = X.cause(ex, PlatformNativeException.class); i...
/** * Writes error. * * @param ex Error. * @param writer Writer. */
Writes error
writeError
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java", "license": "apache-2.0", "size": 31920 }
[ "org.apache.ignite.internal.binary.BinaryRawWriterEx", "org.apache.ignite.internal.processors.platform.PlatformNativeException", "org.apache.ignite.internal.util.typedef.X" ]
import org.apache.ignite.internal.binary.BinaryRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformNativeException; import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.binary.*; import org.apache.ignite.internal.processors.platform.*; import org.apache.ignite.internal.util.typedef.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,467,026
Map<String, Integer> getMessageCountForAllQueues(List<String> queueNames) throws AndesException;
Map<String, Integer> getMessageCountForAllQueues(List<String> queueNames) throws AndesException;
/** * Get a map of queue names and the message count in the database for each queue in the data store * * @param queueNames list of queue names of which the message count should be retrieved * @return Map of queue names and the message count for each queue */
Get a map of queue names and the message count in the database for each queue in the data store
getMessageCountForAllQueues
{ "repo_name": "indikasampath2000/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/MessageStore.java", "license": "apache-2.0", "size": 17422 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,362,258
private static void addToSwarm(Object swarm, SystemTimer t) { final boolean isDebugEnabled = logger.isTraceEnabled(); // Get or add list of timers for this swarm... ArrayList swarmSet; synchronized (allSwarms) { swarmSet = (ArrayList) allSwarms.get(swarm); if (swarmSet == null) { ...
static void function(Object swarm, SystemTimer t) { final boolean isDebugEnabled = logger.isTraceEnabled(); ArrayList swarmSet; synchronized (allSwarms) { swarmSet = (ArrayList) allSwarms.get(swarm); if (swarmSet == null) { if (isDebugEnabled) { logger.trace(STR, swarm); } swarmSet = new ArrayList(); allSwarms.put(swar...
/** * Add the given timer is in the given swarm. Used only by constructors. * * @param swarm swarm to add the timer to * @param t timer to add */
Add the given timer is in the given swarm. Used only by constructors
addToSwarm
{ "repo_name": "pdxrunner/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/SystemTimer.java", "license": "apache-2.0", "size": 14529 }
[ "java.lang.ref.WeakReference", "java.util.ArrayList" ]
import java.lang.ref.WeakReference; import java.util.ArrayList;
import java.lang.ref.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,110,919
List<IPoint2<T>> getPoints();
List<IPoint2<T>> getPoints();
/** * Returns the {@link IPoint2 Points} of this {@code IPolyLine2}. * * @return the {@link IPoint2 Points} of this {@code IPolyLine2}. */
Returns the <code>IPoint2 Points</code> of this IPolyLine2
getPoints
{ "repo_name": "aftenkap/jutility-math", "path": "src/main/java/org/jutility/math/geometry/IPolyLine2.java", "license": "apache-2.0", "size": 2715 }
[ "java.util.List", "org.jutility.math.vectoralgebra.IPoint2" ]
import java.util.List; import org.jutility.math.vectoralgebra.IPoint2;
import java.util.*; import org.jutility.math.vectoralgebra.*;
[ "java.util", "org.jutility.math" ]
java.util; org.jutility.math;
1,179,512
public void testSingleGuyTwoTeachers() { boolean selection = FreeColTestUtils.setStudentSelection(false); Game game = ServerTestHelper.startServerGame(getTestMap(true)); Colony colony = getSchoolColony(4, SchoolLevel.UNIVERSITY); Building university = colony.getBuilding(universityTy...
void function() { boolean selection = FreeColTestUtils.setStudentSelection(false); Game game = ServerTestHelper.startServerGame(getTestMap(true)); Colony colony = getSchoolColony(4, SchoolLevel.UNIVERSITY); Building university = colony.getBuilding(universityType); Iterator<Unit> units = colony.getUnitList().iterator();...
/** * If there are two teachers, but just one colonist to be taught. */
If there are two teachers, but just one colonist to be taught
testSingleGuyTwoTeachers
{ "repo_name": "FreeCol/freecol", "path": "test/src/net/sf/freecol/server/model/ServerBuildingTest.java", "license": "gpl-2.0", "size": 50196 }
[ "java.util.Iterator", "net.sf.freecol.common.model.Building", "net.sf.freecol.common.model.Colony", "net.sf.freecol.common.model.Game", "net.sf.freecol.common.model.Unit", "net.sf.freecol.server.ServerTestHelper", "net.sf.freecol.util.test.FreeColTestUtils" ]
import java.util.Iterator; import net.sf.freecol.common.model.Building; import net.sf.freecol.common.model.Colony; import net.sf.freecol.common.model.Game; import net.sf.freecol.common.model.Unit; import net.sf.freecol.server.ServerTestHelper; import net.sf.freecol.util.test.FreeColTestUtils;
import java.util.*; import net.sf.freecol.common.model.*; import net.sf.freecol.server.*; import net.sf.freecol.util.test.*;
[ "java.util", "net.sf.freecol" ]
java.util; net.sf.freecol;
885,536
public String getSignature(String stringToSign, byte[] derivedSigningKey) throws SignatureException { try { return new String(Hex.encode(calculateHmacSHA256(stringToSign, derivedSigningKey)), ENCODING); } catch (NoSuchAlgorithmException | InvalidKeyException | UnsupportedEncodingExceptio...
String function(String stringToSign, byte[] derivedSigningKey) throws SignatureException { try { return new String(Hex.encode(calculateHmacSHA256(stringToSign, derivedSigningKey)), ENCODING); } catch (NoSuchAlgorithmException InvalidKeyException UnsupportedEncodingException e) { throw new SignatureException(SIGNATURE_E...
/** * Calculates the AWS Signature Version 4 by signing (calculates the HmacSHA256) the string-to-sign with the derived key. * * @param stringToSign String-to-sign the includes meta information about the request. * @param derivedSigningKey Signing key derived from the AWS secret access key. ...
Calculates the AWS Signature Version 4 by signing (calculates the HmacSHA256) the string-to-sign with the derived key
getSignature
{ "repo_name": "victorursan/cs-actions", "path": "cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureV4.java", "license": "apache-2.0", "size": 7330 }
[ "java.io.UnsupportedEncodingException", "java.security.InvalidKeyException", "java.security.NoSuchAlgorithmException", "java.security.SignatureException", "org.bouncycastle.util.encoders.Hex" ]
import java.io.UnsupportedEncodingException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.SignatureException; import org.bouncycastle.util.encoders.Hex;
import java.io.*; import java.security.*; import org.bouncycastle.util.encoders.*;
[ "java.io", "java.security", "org.bouncycastle.util" ]
java.io; java.security; org.bouncycastle.util;
2,274,527
public static void e(String tag, String format, Object... params) { String msg = String.format(PREFIX + format, params); Log.e(tag, msg); writeToFile(tag, msg); }
static void function(String tag, String format, Object... params) { String msg = String.format(PREFIX + format, params); Log.e(tag, msg); writeToFile(tag, msg); }
/** * log for error * * @param tag tag * @param format message format, such as "%d ..." * @param params message content params * @see Log#e(String, String) */
log for error
e
{ "repo_name": "chengzijian/Bibabo", "path": "Framework/src/main/java/com/bibabo/framework/utils/LogUtils.java", "license": "apache-2.0", "size": 8579 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,018,661
public double getProjectedDistance(Atom point) { Atom projected = getProjectedPoint(point); if( projected == null) { // translation only return Double.NaN; } try { return Calc.getDistance(point, projected); } catch(StructureException e) { // Should be unreachable return Double.NaN; } }...
double function(Atom point) { Atom projected = getProjectedPoint(point); if( projected == null) { return Double.NaN; } try { return Calc.getDistance(point, projected); } catch(StructureException e) { return Double.NaN; } }
/** * Get the distance from a point to the axis of rotation * @param point * @return The distance to the axis, or NaN if the RotationAxis is purely translational */
Get the distance from a point to the axis of rotation
getProjectedDistance
{ "repo_name": "kumar-physics/BioJava", "path": "biojava3-structure/src/main/java/org/biojava/bio/structure/align/util/RotationAxis.java", "license": "lgpl-2.1", "size": 15057 }
[ "org.biojava.bio.structure.Atom", "org.biojava.bio.structure.Calc", "org.biojava.bio.structure.StructureException" ]
import org.biojava.bio.structure.Atom; import org.biojava.bio.structure.Calc; import org.biojava.bio.structure.StructureException;
import org.biojava.bio.structure.*;
[ "org.biojava.bio" ]
org.biojava.bio;
2,010,180
public Observable<ServiceResponse<Void>> putDurationValidAsync(Map<String, Period> arrayBody) { if (arrayBody == null) { throw new IllegalArgumentException("Parameter arrayBody is required and cannot be null."); }
Observable<ServiceResponse<Void>> function(Map<String, Period> arrayBody) { if (arrayBody == null) { throw new IllegalArgumentException(STR); }
/** * Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}. * * @param arrayBody the Map&lt;String, Period&gt; value * @return the {@link ServiceResponse} object if successful. */
Set dictionary value {"0": "P123DT22H14M12.011S", "1": "P5DT1H0M0S"}
putDurationValidAsync
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java", "license": "mit", "size": 176746 }
[ "com.microsoft.rest.ServiceResponse", "java.util.Map", "org.joda.time.Period" ]
import com.microsoft.rest.ServiceResponse; import java.util.Map; import org.joda.time.Period;
import com.microsoft.rest.*; import java.util.*; import org.joda.time.*;
[ "com.microsoft.rest", "java.util", "org.joda.time" ]
com.microsoft.rest; java.util; org.joda.time;
1,873,519
public void setToolbar(@NonNull Activity activity, @NonNull Toolbar toolbar, boolean recreateActionBarDrawerToggle) { this.mDrawerBuilder.mToolbar = toolbar; this.mDrawerBuilder.handleDrawerNavigation(activity, recreateActionBarDrawerToggle); }
void function(@NonNull Activity activity, @NonNull Toolbar toolbar, boolean recreateActionBarDrawerToggle) { this.mDrawerBuilder.mToolbar = toolbar; this.mDrawerBuilder.handleDrawerNavigation(activity, recreateActionBarDrawerToggle); }
/** * Sets the toolbar which should be used in combination with the drawer * This will handle the ActionBarDrawerToggle for you. * Do not set this if you are in a sub activity and want to handle the back arrow on your own * * @param activity * @param toolbar the toolb...
Sets the toolbar which should be used in combination with the drawer This will handle the ActionBarDrawerToggle for you. Do not set this if you are in a sub activity and want to handle the back arrow on your own
setToolbar
{ "repo_name": "Ryan---Yang/MaterialDrawer", "path": "library/src/main/java/com/mikepenz/materialdrawer/Drawer.java", "license": "apache-2.0", "size": 29425 }
[ "android.app.Activity", "android.support.annotation.NonNull", "android.support.v7.widget.Toolbar" ]
import android.app.Activity; import android.support.annotation.NonNull; import android.support.v7.widget.Toolbar;
import android.app.*; import android.support.annotation.*; import android.support.v7.widget.*;
[ "android.app", "android.support" ]
android.app; android.support;
2,765,203
@Test(expected = GeniePreconditionException.class) public void testMessageArgConstructor() throws GeniePreconditionException { final GeniePreconditionException ge = new GeniePreconditionException(ERROR_MESSAGE); Assert.assertEquals(HttpURLConnection.HTTP_PRECON_FAILED, ge.getErrorCode()); ...
@Test(expected = GeniePreconditionException.class) void function() throws GeniePreconditionException { final GeniePreconditionException ge = new GeniePreconditionException(ERROR_MESSAGE); Assert.assertEquals(HttpURLConnection.HTTP_PRECON_FAILED, ge.getErrorCode()); Assert.assertEquals(ERROR_MESSAGE, ge.getMessage()); A...
/** * Test the constructor. * * @throws GeniePreconditionException On a precondition issue */
Test the constructor
testMessageArgConstructor
{ "repo_name": "rspieldenner/genie", "path": "genie-common/src/test/java/com/netflix/genie/common/exceptions/TestGeniePreconditionException.java", "license": "apache-2.0", "size": 2706 }
[ "java.net.HttpURLConnection", "org.junit.Assert", "org.junit.Test" ]
import java.net.HttpURLConnection; import org.junit.Assert; import org.junit.Test;
import java.net.*; import org.junit.*;
[ "java.net", "org.junit" ]
java.net; org.junit;
1,770,861
protected void removeAnnotations(final List< ? extends Annotation> annotations, final boolean fireModelChanged) { if (!annotations.isEmpty()) { final Iterator< ? extends Annotation> e = annotations.iterator(); while (e.hasNext()) { ...
void function(final List< ? extends Annotation> annotations, final boolean fireModelChanged) { if (!annotations.isEmpty()) { final Iterator< ? extends Annotation> e = annotations.iterator(); while (e.hasNext()) { removeAnnotation(e.next(), false); } if (fireModelChanged) { fireModelChanged(); } } }
/** * Removes the given annotations from this model. If requested all annotation model listeners will be informed about this change. * <code>modelInitiated</code> indicates whether the deletion has been initiated by this model or by one of its clients. * * @param annotations the annotations to be re...
Removes the given annotations from this model. If requested all annotation model listeners will be informed about this change. <code>modelInitiated</code> indicates whether the deletion has been initiated by this model or by one of its clients
removeAnnotations
{ "repo_name": "Ori-Libhaber/che-core", "path": "ide/che-core-ide-jseditor/src/main/java/org/eclipse/che/ide/jseditor/client/annotation/AnnotationModelImpl.java", "license": "epl-1.0", "size": 12637 }
[ "java.util.Iterator", "java.util.List", "org.eclipse.che.ide.api.text.annotation.Annotation" ]
import java.util.Iterator; import java.util.List; import org.eclipse.che.ide.api.text.annotation.Annotation;
import java.util.*; import org.eclipse.che.ide.api.text.annotation.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
1,898,283
public IgniteCache<K, V> withExpiryPolicy(ExpiryPolicy plc);
IgniteCache<K, V> function(ExpiryPolicy plc);
/** * Returns cache with the specified expired policy set. This policy will be used for each operation * invoked on the returned cache. * <p> * This method does not modify existing cache instance. * * @param plc Expire policy to use. * @return Cache instance with the specified expiry ...
Returns cache with the specified expired policy set. This policy will be used for each operation invoked on the returned cache. This method does not modify existing cache instance
withExpiryPolicy
{ "repo_name": "andrey-kuznetsov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/IgniteCache.java", "license": "apache-2.0", "size": 77739 }
[ "javax.cache.expiry.ExpiryPolicy" ]
import javax.cache.expiry.ExpiryPolicy;
import javax.cache.expiry.*;
[ "javax.cache" ]
javax.cache;
2,790,955
public Observable<String> pfaddManyObservable(String key, List<String> elements) { io.vertx.rx.java.ObservableFuture<String> handler = io.vertx.rx.java.RxHelper.observableFuture(); pfaddMany(key, elements, handler.toHandler()); return handler; }
Observable<String> function(String key, List<String> elements) { io.vertx.rx.java.ObservableFuture<String> handler = io.vertx.rx.java.RxHelper.observableFuture(); pfaddMany(key, elements, handler.toHandler()); return handler; }
/** * Adds the specified elements to the specified HyperLogLog. * @param key Key string * @param elements Elementa to add * @return */
Adds the specified elements to the specified HyperLogLog
pfaddManyObservable
{ "repo_name": "brianjcj/vertx-redis-client", "path": "src/main/generated/io/vertx/rxjava/redis/RedisTransaction.java", "license": "apache-2.0", "size": 184983 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
638,611
public int calcModifierDamage(int level, DamageSource source) { return source.canHarmInCreative() ? 0 : (this.protectionType == EnchantmentProtection.Type.ALL ? level : (this.protectionType == EnchantmentProtection.Type.FIRE && source.isFireDamage() ? level * 2 : (this.protectionType == EnchantmentProte...
int function(int level, DamageSource source) { return source.canHarmInCreative() ? 0 : (this.protectionType == EnchantmentProtection.Type.ALL ? level : (this.protectionType == EnchantmentProtection.Type.FIRE && source.isFireDamage() ? level * 2 : (this.protectionType == EnchantmentProtection.Type.FALL && source == Dama...
/** * Calculates the damage protection of the enchantment based on level and damage source passed. */
Calculates the damage protection of the enchantment based on level and damage source passed
calcModifierDamage
{ "repo_name": "Merlijnv/MFM", "path": "build/tmp/recompileMc/sources/net/minecraft/enchantment/EnchantmentProtection.java", "license": "gpl-3.0", "size": 5014 }
[ "net.minecraft.util.DamageSource" ]
import net.minecraft.util.DamageSource;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
1,763,904
void onReactionAdd(ReactionAddEvent event);
void onReactionAdd(ReactionAddEvent event);
/** * This method is called every time a reaction is added to a message. * * @param event The event. */
This method is called every time a reaction is added to a message
onReactionAdd
{ "repo_name": "BtoBastian/Javacord", "path": "javacord-api/src/main/java/org/javacord/api/listener/message/reaction/ReactionAddListener.java", "license": "lgpl-3.0", "size": 985 }
[ "org.javacord.api.event.message.reaction.ReactionAddEvent" ]
import org.javacord.api.event.message.reaction.ReactionAddEvent;
import org.javacord.api.event.message.reaction.*;
[ "org.javacord.api" ]
org.javacord.api;
1,463,222
@Deprecated private Pipeline getPipeline() { if (pipeline == null) { throw new IllegalStateException("owning pipeline not set"); } return pipeline; }
Pipeline function() { if (pipeline == null) { throw new IllegalStateException(STR); } return pipeline; }
/** * Returns the owning {@link Pipeline} of this {@code PTransform}. * * @throws IllegalStateException if the owning {@code Pipeline} hasn't been * set yet */
Returns the owning <code>Pipeline</code> of this PTransform
getPipeline
{ "repo_name": "twcctz500000/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/transforms/PTransform.java", "license": "apache-2.0", "size": 14269 }
[ "com.google.cloud.dataflow.sdk.Pipeline" ]
import com.google.cloud.dataflow.sdk.Pipeline;
import com.google.cloud.dataflow.sdk.*;
[ "com.google.cloud" ]
com.google.cloud;
2,144,615
public IntegrationAccountSessionFilter withChangedTime(DateTime changedTime) { this.changedTime = changedTime; return this; }
IntegrationAccountSessionFilter function(DateTime changedTime) { this.changedTime = changedTime; return this; }
/** * Set the changed time of integration account sessions. * * @param changedTime the changedTime value to set * @return the IntegrationAccountSessionFilter object itself. */
Set the changed time of integration account sessions
withChangedTime
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/logic/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/IntegrationAccountSessionFilter.java", "license": "mit", "size": 1196 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,049,828
private void processLiteralNew(DetailAST ast) { if (ast.getParent().getType() != TokenTypes.METHOD_REF) { instantiations.add(ast); } }
void function(DetailAST ast) { if (ast.getParent().getType() != TokenTypes.METHOD_REF) { instantiations.add(ast); } }
/** * Collects a "new" token. * @param ast the "new" token */
Collects a "new" token
processLiteralNew
{ "repo_name": "sabaka/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/IllegalInstantiationCheck.java", "license": "lgpl-2.1", "size": 12020 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
2,785,505
private void putAllForCreate(Map<? extends K, ? extends V> m) { for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) { int hash = (entry.getKey() == null) ? 0 : hash(entry.getKey().hashCode()); int i = indexFor(hash, table.length); for (Entry<K,V> e = table[i]; e != null; e = e.next) { Objec...
void function(Map<? extends K, ? extends V> m) { for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) { int hash = (entry.getKey() == null) ? 0 : hash(entry.getKey().hashCode()); int i = indexFor(hash, table.length); for (Entry<K,V> e = table[i]; e != null; e = e.next) { Object k; if (e.hash == hash && ((k = ...
/** * Method to put all values while creating a HashMap * @param m */
Method to put all values while creating a HashMap
putAllForCreate
{ "repo_name": "deepak-malik/Data-Structures-In-Java", "path": "src/com/deepak/data/structures/Hashing/CustomHashMap.java", "license": "mit", "size": 11614 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,011,044
public String getOwner() { return this.getCOSDictionary().getNameAsString(COSName.O); }
String function() { return this.getCOSDictionary().getNameAsString(COSName.O); }
/** * Returns the owner of the attributes. * * @return the owner of the attributes */
Returns the owner of the attributes
getOwner
{ "repo_name": "sencko/NALB", "path": "nalb2013/src/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDAttributeObject.java", "license": "gpl-2.0", "size": 6603 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,151,683
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "KAMP-Research/KAMP", "path": "bundles/Toometa/toometa.pcmarchoptions.edit/src/pcmarchoptions/provider/PCM_FunctionalityConnectionItemProvider.java", "license": "apache-2.0", "size": 5285 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
316,103