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
@RequirePOST public synchronized void doSubmitDescription( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { checkPermission(CONFIGURE); setDescription(req.getParameter("description")); rsp.sendRedirect("."); // go to the top page } /** * De...
synchronized void function( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { checkPermission(CONFIGURE); setDescription(req.getParameter(STR)); rsp.sendRedirect("."); } /** * Deletes this item. * Note on the funny name: for reasons of historical compatibility, this URL is {@code /doDelet...
/** * Accepts the new description. */
Accepts the new description
doSubmitDescription
{ "repo_name": "hplatou/jenkins", "path": "core/src/main/java/hudson/model/AbstractItem.java", "license": "mit", "size": 34539 }
[ "java.io.IOException", "javax.servlet.ServletException", "org.kohsuke.stapler.StaplerRequest", "org.kohsuke.stapler.StaplerResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse;
import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*;
[ "java.io", "javax.servlet", "org.kohsuke.stapler" ]
java.io; javax.servlet; org.kohsuke.stapler;
1,736,065
List<MetadataInfo> getAllMetaToHandle();
List<MetadataInfo> getAllMetaToHandle();
/** * Returns list of all metadata info instances which should be handled * either producing analyze or when fetching from the Metastore. * * @return list of all metadata info */
Returns list of all metadata info instances which should be handled either producing analyze or when fetching from the Metastore
getAllMetaToHandle
{ "repo_name": "apache/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/metastore/analyze/MetadataInfoCollector.java", "license": "apache-2.0", "size": 2718 }
[ "java.util.List", "org.apache.drill.metastore.metadata.MetadataInfo" ]
import java.util.List; import org.apache.drill.metastore.metadata.MetadataInfo;
import java.util.*; import org.apache.drill.metastore.metadata.*;
[ "java.util", "org.apache.drill" ]
java.util; org.apache.drill;
1,348,258
long sendBlock(DataOutputStream out, OutputStream baseStream, DataTransferThrottler throttler) throws IOException { if (out == null) { throw new IOException( "out stream is null" ); } initialOffset = offset; long totalRead = 0; OutputStream streamForSendChunks = out; ...
long sendBlock(DataOutputStream out, OutputStream baseStream, DataTransferThrottler throttler) throws IOException { if (out == null) { throw new IOException( STR ); } initialOffset = offset; long totalRead = 0; OutputStream streamForSendChunks = out; lastCacheDropOffset = initialOffset; if (isLongRead() && blockInFd !=...
/** * sendBlock() is used to read block and its metadata and stream the data to * either a client or to another datanode. * * @param out stream to which the block is written to * @param baseStream optional. if non-null, <code>out</code> is assumed to * be a wrapper over this stream. This en...
sendBlock() is used to read block and its metadata and stream the data to either a client or to another datanode
sendBlock
{ "repo_name": "GenisO/hadoop-DWRR", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java", "license": "apache-2.0", "size": 30792 }
[ "java.io.DataOutputStream", "java.io.FileInputStream", "java.io.IOException", "java.io.OutputStream", "java.nio.ByteBuffer", "java.nio.channels.FileChannel", "org.apache.hadoop.hdfs.protocol.HdfsConstants", "org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader", "org.apache.hadoop.hdfs.util.Dat...
import java.io.DataOutputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader; import org.a...
import java.io.*; import java.nio.*; import java.nio.channels.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*; import org.apache.hadoop.hdfs.util.*; import org.apache.hadoop.io.nativeio.*; import org.apache.hadoop.net.*;
[ "java.io", "java.nio", "org.apache.hadoop" ]
java.io; java.nio; org.apache.hadoop;
1,276,801
protected AnnotatedBindingBuilder<Parser> bindParser() { parserIsBound = true; return bind(Parser.class); }
AnnotatedBindingBuilder<Parser> function() { parserIsBound = true; return bind(Parser.class); }
/** * Bind any parser. BasicParser is used by default if no other parser is provided. */
Bind any parser. BasicParser is used by default if no other parser is provided
bindParser
{ "repo_name": "gorcz/governator", "path": "governator-commons-cli/src/main/java/com/netflix/governator/commons_cli/modules/OptionsModule.java", "license": "apache-2.0", "size": 8356 }
[ "com.google.inject.binder.AnnotatedBindingBuilder", "org.apache.commons.cli.Parser" ]
import com.google.inject.binder.AnnotatedBindingBuilder; import org.apache.commons.cli.Parser;
import com.google.inject.binder.*; import org.apache.commons.cli.*;
[ "com.google.inject", "org.apache.commons" ]
com.google.inject; org.apache.commons;
2,007,353
public static void transfer(InputStream in, OutputStream out, TransferCallback cb) throws IOException { byte[] bytes = new byte[TRANSFER_BUFFER]; int count; while ((count = in.read(bytes)) != -1) { out.write(bytes, 0, count); if (cb != null) { ...
static void function(InputStream in, OutputStream out, TransferCallback cb) throws IOException { byte[] bytes = new byte[TRANSFER_BUFFER]; int count; while ((count = in.read(bytes)) != -1) { out.write(bytes, 0, count); if (cb != null) { cb.bytesTransferred(bytes, count); if (cb.isCancelled()) { break; } } } }
/** * Transfers bytes from an input stream to an output stream. * Callers of this method are responsible for closing the streams * since they are the ones that opened the streams. */
Transfers bytes from an input stream to an output stream. Callers of this method are responsible for closing the streams since they are the ones that opened the streams
transfer
{ "repo_name": "kpartlow/java-util", "path": "src/main/java/com/cedarsoftware/util/IOUtilities.java", "license": "apache-2.0", "size": 9037 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,843,254
public static final SourceModel.Expr sameEvalTimes(SourceModel.Expr f1, SourceModel.Expr f2, SourceModel.Expr margin) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.sameEvalTimes), f1, f2, margin}); }
static final SourceModel.Expr function(SourceModel.Expr f1, SourceModel.Expr f2, SourceModel.Expr margin) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.sameEvalTimes), f1, f2, margin}); }
/** * Returns <code>Cal.Core.Prelude.True</code> if the evaluate times of the two expressions (<code>f1</code> and <code>f2</code>) are withing the * given percent margin. ex. <code>sameEvalTimes expr1 expr2 10.0</code> returns true if the evaluation * times of <code>expr1</code> and <code>expr2</code> ar...
Returns <code>Cal.Core.Prelude.True</code> if the evaluate times of the two expressions (<code>f1</code> and <code>f2</code>) are withing the given percent margin. ex. <code>sameEvalTimes expr1 expr2 10.0</code> returns true if the evaluation times of <code>expr1</code> and <code>expr2</code> are within 10 percent of e...
sameEvalTimes
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/module/Cal/Core/CAL_Debug.java", "license": "bsd-3-clause", "size": 53973 }
[ "org.openquark.cal.compiler.SourceModel" ]
import org.openquark.cal.compiler.SourceModel;
import org.openquark.cal.compiler.*;
[ "org.openquark.cal" ]
org.openquark.cal;
49,582
public List<MatchResult> testFindMatches(String source, String pattern, MatchOptions options, boolean filePattern, FileType sourceFileType, String sourceExtension, ...
List<MatchResult> function(String source, String pattern, MatchOptions options, boolean filePattern, FileType sourceFileType, String sourceExtension, boolean physicalSourceFile) throws MalformedPatternException, UnsupportedPatternException { return super.testFindMatches(source, pattern, options, filePattern, sourceFile...
/** * Finds the matches of given pattern starting from given tree element. * @param source string for search * @param pattern to be searched * @return list of matches found * @throws MalformedPatternException * @throws UnsupportedPatternException */
Finds the matches of given pattern starting from given tree element
testFindMatches
{ "repo_name": "akosyakov/intellij-community", "path": "platform/structuralsearch/source/com/intellij/structuralsearch/Matcher.java", "license": "apache-2.0", "size": 2891 }
[ "com.intellij.openapi.fileTypes.FileType", "java.util.List" ]
import com.intellij.openapi.fileTypes.FileType; import java.util.List;
import com.intellij.openapi.*; import java.util.*;
[ "com.intellij.openapi", "java.util" ]
com.intellij.openapi; java.util;
1,807,744
public ImmutableList<PerLabelOptions> getPerFileCopts() { return ImmutableList.copyOf(cppOptions.perFileCopts); }
ImmutableList<PerLabelOptions> function() { return ImmutableList.copyOf(cppOptions.perFileCopts); }
/** * Returns the {@link PerLabelOptions} to apply to the gcc command line, if * the label of the compiled file matches the regular expression. */
Returns the <code>PerLabelOptions</code> to apply to the gcc command line, if the label of the compiled file matches the regular expression
getPerFileCopts
{ "repo_name": "mikelikespie/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java", "license": "apache-2.0", "size": 77508 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.analysis.config.PerLabelOptions" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.analysis.config.PerLabelOptions;
import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.config.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
498,611
default S hasHashCode(final int hashCode, final Locale locale, final CharSequence message, final Object... arguments) { return this.get(AssertorObject.hasHashCode(this.getStep(), hashCode, MessageAssertor.of(locale, message, arguments))); } /** * Validates that the checked object matches ...
default S hasHashCode(final int hashCode, final Locale locale, final CharSequence message, final Object... arguments) { return this.get(AssertorObject.hasHashCode(this.getStep(), hashCode, MessageAssertor.of(locale, message, arguments))); } /** * Validates that the checked object matches the {@code predicate}. * * <p> ...
/** * Check if the checked value matches the specified {@code hashCode}. * * <p> * precondition: none * </p> * * @param hashCode * the expected hash code * @param locale * the message locale (only used to format this message, * ...
Check if the checked value matches the specified hashCode. precondition: none
hasHashCode
{ "repo_name": "Gilandel/utils-assertor", "path": "src/main/java/fr/landel/utils/assertor/AssertorStep.java", "license": "apache-2.0", "size": 21299 }
[ "fr.landel.utils.assertor.commons.MessageAssertor", "fr.landel.utils.assertor.utils.AssertorObject", "java.util.Locale" ]
import fr.landel.utils.assertor.commons.MessageAssertor; import fr.landel.utils.assertor.utils.AssertorObject; import java.util.Locale;
import fr.landel.utils.assertor.commons.*; import fr.landel.utils.assertor.utils.*; import java.util.*;
[ "fr.landel.utils", "java.util" ]
fr.landel.utils; java.util;
1,309,214
@Nonnull public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); return result; }
java.util.List<com.microsoft.graph.options.FunctionOption> function() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); return result; }
/** * Gets the functions options from the properties that have been set * @return a list of function options for the request */
Gets the functions options from the properties that have been set
getFunctionOptions
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/models/ManagedDeviceWindowsDefenderUpdateSignaturesParameterSet.java", "license": "mit", "size": 2861 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,026,866
public void setLastVisit(Date lastVisit) { this.lastVisit = lastVisit; }
void function(Date lastVisit) { this.lastVisit = lastVisit; }
/** * Sets the last visit time * * @param lastVisit Last visit time, represented as a long value */
Sets the last visit time
setLastVisit
{ "repo_name": "mrdon/jforum-plugins", "path": "src/net/jforum/entities/User.java", "license": "bsd-3-clause", "size": 17778 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,043,106
public int countByC_D(long companyId, Date data) throws SystemException { Object[] finderArgs = new Object[] { companyId, data }; Long count = (Long) FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_C_D, finderArgs, this); if (count == null) { StringBundler query ...
int function(long companyId, Date data) throws SystemException { Object[] finderArgs = new Object[] { companyId, data }; Long count = (Long) FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_C_D, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3); query.append(_SQL_COUNT_CONTADORACESSO_WHER...
/** * Returns the number of contador acessos where companyId = &#63; and data = &#63;. * * @param companyId the company ID * @param data the data * @return the number of matching contador acessos * @throws SystemException if a system exception occurred */
Returns the number of contador acessos where companyId = &#63; and data = &#63;
countByC_D
{ "repo_name": "camaradosdeputadosoficial/edemocracia", "path": "cd-graficos-portlet/src/main/java/br/gov/camara/edemocracia/portlets/graficos/service/persistence/ContadorAcessoPersistenceImpl.java", "license": "lgpl-2.1", "size": 45359 }
[ "com.liferay.portal.kernel.dao.orm.FinderCacheUtil", "com.liferay.portal.kernel.dao.orm.Query", "com.liferay.portal.kernel.dao.orm.QueryPos", "com.liferay.portal.kernel.dao.orm.Session", "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.util.CalendarUtil", "com.liferay.po...
import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; import com.liferay.portal.kernel.dao.orm.Query; import com.liferay.portal.kernel.dao.orm.QueryPos; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.CalendarUtil; i...
import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*; import java.util.*;
[ "com.liferay.portal", "java.util" ]
com.liferay.portal; java.util;
1,266,782
public static FeedItem getFeedItemByGuidOrEpisodeUrl(final String guid, final String episodeUrl) { Log.d(TAG, "getFeedItem() called with: " + "guid = [" + guid + "], episodeUrl = [" + episodeUrl + "]"); PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); try { ...
static FeedItem function(final String guid, final String episodeUrl) { Log.d(TAG, STR + STR + guid + STR + episodeUrl + "]"); PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); try { return getFeedItemByGuidOrEpisodeUrl(guid, episodeUrl, adapter); } finally { adapter.close(); } }
/** * Loads a specific FeedItem from the database. * * @param guid feed item guid * @param episodeUrl the feed item's url * @return The FeedItem or null if the FeedItem could not be found. * Does NOT load additional attributes like feed or queue state. */
Loads a specific FeedItem from the database
getFeedItemByGuidOrEpisodeUrl
{ "repo_name": "johnjohndoe/AntennaPod", "path": "core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java", "license": "mit", "size": 34357 }
[ "android.util.Log", "de.danoeh.antennapod.model.feed.FeedItem" ]
import android.util.Log; import de.danoeh.antennapod.model.feed.FeedItem;
import android.util.*; import de.danoeh.antennapod.model.feed.*;
[ "android.util", "de.danoeh.antennapod" ]
android.util; de.danoeh.antennapod;
1,946,610
protected LayoutManager createLayout() { return new TitlePaneLayout(); }
LayoutManager function() { return new TitlePaneLayout(); }
/** * This method creates a new LayoutManager for the TitlePane. * * @return A new LayoutManager. */
This method creates a new LayoutManager for the TitlePane
createLayout
{ "repo_name": "aosm/gcc_40", "path": "libjava/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java", "license": "gpl-2.0", "size": 26610 }
[ "java.awt.LayoutManager" ]
import java.awt.LayoutManager;
import java.awt.*;
[ "java.awt" ]
java.awt;
644,374
@Override protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) { final IOperandTreeNode registerOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0); final IOperandTreeNode imm...
void function(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) { final IOperandTreeNode registerOperand = instruction.getOperands().get(0).getRootNode().getChildren().get(0); final IOperandTreeNode immediateOperand1 = instruction.getOperands().get(1).g...
/** * if ConditionPassed() then EncodingSpecificOperations(); if msbit >= lsbit then * R[d]<msbit:lsbit> = Replicate('0', msbit-lsbit+1); // Other bits of R[d] are unchanged else * UNPREDICTABLE; */
if ConditionPassed() then EncodingSpecificOperations(); if msbit >= lsbit then R[d] = Replicate('0', msbit-lsbit+1); // Other bits of R[d] are unchanged else UNPREDICTABLE
translateCore
{ "repo_name": "AmesianX/binnavi", "path": "src/main/java/com/google/security/zynamics/reil/translators/arm/THUMB2BFCTranslator.java", "license": "apache-2.0", "size": 2893 }
[ "com.google.security.zynamics.reil.OperandSize", "com.google.security.zynamics.reil.ReilHelpers", "com.google.security.zynamics.reil.ReilInstruction", "com.google.security.zynamics.reil.translators.ITranslationEnvironment", "com.google.security.zynamics.reil.translators.TranslationHelpers", "com.google.se...
import com.google.security.zynamics.reil.OperandSize; import com.google.security.zynamics.reil.ReilHelpers; import com.google.security.zynamics.reil.ReilInstruction; import com.google.security.zynamics.reil.translators.ITranslationEnvironment; import com.google.security.zynamics.reil.translators.TranslationHelpers; imp...
import com.google.security.zynamics.reil.*; import com.google.security.zynamics.reil.translators.*; import com.google.security.zynamics.zylib.disassembly.*; import java.util.*;
[ "com.google.security", "java.util" ]
com.google.security; java.util;
1,319,325
private long getBillNumber() { long number = -1; try { String query = "SELECT max(idBill) FROM bill"; if (this.getDataFile().execute(query)) { this.getDataFile().getResultSet().next(); number = (this.getDataFile().getResultSet() != null) ...
long function() { long number = -1; try { String query = STR; if (this.getDataFile().execute(query)) { this.getDataFile().getResultSet().next(); number = (this.getDataFile().getResultSet() != null) ? this.getDataFile().getResultSet().getLong(1) : -1; } } catch (SQLException ex) { Logger.getLogger(FraSell.class.getName(...
/** * Obtain a new bill number * @return New bill number */
Obtain a new bill number
getBillNumber
{ "repo_name": "jfmendozam/BillApp", "path": "BillApp/src/billapp/view/FraSell.java", "license": "apache-2.0", "size": 21298 }
[ "java.sql.SQLException", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger;
import java.sql.*; import java.util.logging.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
230,325
public DataResult <ConfigFileNameDto> listFileNamesForSystemChannel(User user, Server server, ConfigChannel channel, PageControl pc) { SelectMode m = ModeFactory.getMode("config_queries", "file_names_for_system_channel"); Map<String, Object> params = new HashMap<String, O...
DataResult <ConfigFileNameDto> function(User user, Server server, ConfigChannel channel, PageControl pc) { SelectMode m = ModeFactory.getMode(STR, STR); Map<String, Object> params = new HashMap<String, Object>(); params.put(STR, user.getId()); params.put("sid", server.getId()); params.put("ccid", channel.getId()); Map<...
/** * Lists the file names to which the given server is subscribed by channel * Finds the deployable revisions for each file name. * @param user The user requesting a list of file names * @param server The server to which these files must be relevant * @param channel The channel to which these ...
Lists the file names to which the given server is subscribed by channel Finds the deployable revisions for each file name
listFileNamesForSystemChannel
{ "repo_name": "ogajduse/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java", "license": "gpl-2.0", "size": 102493 }
[ "com.redhat.rhn.common.db.datasource.DataResult", "com.redhat.rhn.common.db.datasource.ModeFactory", "com.redhat.rhn.common.db.datasource.SelectMode", "com.redhat.rhn.domain.config.ConfigChannel", "com.redhat.rhn.domain.server.Server", "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.dto.Conf...
import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import com.redhat.rhn.domain.config.ConfigChannel; import com.redhat.rhn.domain.server.Server; import com.redhat.rhn.domain.user.User; import com.redhat.r...
import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.domain.config.*; import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.dto.*; import com.redhat.rhn.frontend.listview.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
2,361,128
public void dropColumn(Table table, Column column) throws IOException { if (column.isAutoIncrement()) { writeAutoIncrementDropStmts(table, column); } print("ALTER TABLE "); printlnIdentifier(getTableName(table)); printIndent(); print("...
void function(Table table, Column column) throws IOException { if (column.isAutoIncrement()) { writeAutoIncrementDropStmts(table, column); } print(STR); printlnIdentifier(getTableName(table)); printIndent(); print(STR); printIdentifier(getColumnName(column)); printEndOfStatement(); } /** * {@inheritDoc}
/** * Writes the SQL to drop a column. * * @param table The table * @param column The column to drop */
Writes the SQL to drop a column
dropColumn
{ "repo_name": "apache/ddlutils", "path": "src/main/java/org/apache/ddlutils/platform/firebird/FirebirdBuilder.java", "license": "apache-2.0", "size": 10232 }
[ "java.io.IOException", "org.apache.ddlutils.model.Column", "org.apache.ddlutils.model.Table" ]
import java.io.IOException; import org.apache.ddlutils.model.Column; import org.apache.ddlutils.model.Table;
import java.io.*; import org.apache.ddlutils.model.*;
[ "java.io", "org.apache.ddlutils" ]
java.io; org.apache.ddlutils;
1,055,048
private void add(final TileSetDefinition tsdef, Color color, Composite blend) { String ref = tsdef.getSource(); final int baseindex = tsdef.getFirstGid(); if (ref.startsWith("../../")) { ref = ref.substring(6); } final int mapsize = tiles.size(); if (mapsize > baseindex) { logger.debug("Ti...
void function(final TileSetDefinition tsdef, Color color, Composite blend) { String ref = tsdef.getSource(); final int baseindex = tsdef.getFirstGid(); if (ref.startsWith(STR)) { ref = ref.substring(6); } final int mapsize = tiles.size(); if (mapsize > baseindex) { logger.debug(STR + mapsize + STR + baseindex + STR + r...
/** * Add a tileset. * * @param tsdef * The tileset definition. * @param color Color for modifying the tileset image, or <code>null</code> * @param blend Blend mode for applying the adjustment color, or * <code>null</code> */
Add a tileset
add
{ "repo_name": "sourceress-project/archestica", "path": "src/games/stendhal/client/TileStore.java", "license": "gpl-2.0", "size": 7874 }
[ "games.stendhal.client.sprite.Sprite", "games.stendhal.client.sprite.SpriteTileset", "games.stendhal.client.sprite.Tileset", "games.stendhal.client.sprite.TilesetAnimationMap", "games.stendhal.common.tiled.TileSetDefinition", "java.awt.Color", "java.awt.Composite" ]
import games.stendhal.client.sprite.Sprite; import games.stendhal.client.sprite.SpriteTileset; import games.stendhal.client.sprite.Tileset; import games.stendhal.client.sprite.TilesetAnimationMap; import games.stendhal.common.tiled.TileSetDefinition; import java.awt.Color; import java.awt.Composite;
import games.stendhal.client.sprite.*; import games.stendhal.common.tiled.*; import java.awt.*;
[ "games.stendhal.client", "games.stendhal.common", "java.awt" ]
games.stendhal.client; games.stendhal.common; java.awt;
2,363,475
try { Main.initialize(conf, yarnScheduler, rmContext, registry); } catch (Exception e) { // Abort bringing up RM throw new RuntimeException("Failed to initialize myriad", e); } LOGGER.info("Initialized myriad."); }
try { Main.initialize(conf, yarnScheduler, rmContext, registry); } catch (Exception e) { throw new RuntimeException(STR, e); } LOGGER.info(STR); }
/** * Initialize Myriad plugin before RM's scheduler is initialized. * This includes registration with Mesos master, initialization of * the myriad web application, initializing guice modules etc. */
Initialize Myriad plugin before RM's scheduler is initialized. This includes registration with Mesos master, initialization of the myriad web application, initializing guice modules etc
init
{ "repo_name": "kensipe/myriad", "path": "myriad-scheduler/src/main/java/com/ebay/myriad/scheduler/yarn/interceptor/MyriadInitializationInterceptor.java", "license": "apache-2.0", "size": 1401 }
[ "com.ebay.myriad.Main" ]
import com.ebay.myriad.Main;
import com.ebay.myriad.*;
[ "com.ebay.myriad" ]
com.ebay.myriad;
1,517,765
public long getTimeDuration(String name, long defaultValue, TimeUnit defaultUnit, TimeUnit returnUnit) { String vStr = get(name); if (null == vStr) { return returnUnit.convert(defaultValue, defaultUnit); } else { return getTimeDurationHelper(name, vStr, defaultUnit, returnUnit); } ...
long function(String name, long defaultValue, TimeUnit defaultUnit, TimeUnit returnUnit) { String vStr = get(name); if (null == vStr) { return returnUnit.convert(defaultValue, defaultUnit); } else { return getTimeDurationHelper(name, vStr, defaultUnit, returnUnit); } }
/** * Return time duration in the given time unit. Valid units are encoded in * properties as suffixes: nanoseconds (ns), microseconds (us), milliseconds * (ms), seconds (s), minutes (m), hours (h), and days (d). If no unit is * provided, the default unit is applied. * * @param name Property name *...
Return time duration in the given time unit. Valid units are encoded in properties as suffixes: nanoseconds (ns), microseconds (us), milliseconds (ms), seconds (s), minutes (m), hours (h), and days (d). If no unit is provided, the default unit is applied
getTimeDuration
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java", "license": "apache-2.0", "size": 133971 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
343,279
private int getVersionDatabaseFromProperty() throws EnmeFailOperation { final Integer ver = EnMePlaceHolderConfigurer.getConfigurationManager().getDatabaseVersion(); if (ver == null) { log.fatal("database version is missing."); throw new EnmeFailOperation("database version is...
int function() throws EnmeFailOperation { final Integer ver = EnMePlaceHolderConfigurer.getConfigurationManager().getDatabaseVersion(); if (ver == null) { log.fatal(STR); throw new EnmeFailOperation(STR); } return ver; }
/** * Get database version stored on property file. * * @return * @throws EnmeFailOperation */
Get database version stored on property file
getVersionDatabaseFromProperty
{ "repo_name": "cristiani/encuestame", "path": "enme-business/src/main/java/org/encuestame/business/setup/install/DatabaseInstall.java", "license": "apache-2.0", "size": 8910 }
[ "org.encuestame.core.config.EnMePlaceHolderConfigurer", "org.encuestame.persistence.exception.EnmeFailOperation" ]
import org.encuestame.core.config.EnMePlaceHolderConfigurer; import org.encuestame.persistence.exception.EnmeFailOperation;
import org.encuestame.core.config.*; import org.encuestame.persistence.exception.*;
[ "org.encuestame.core", "org.encuestame.persistence" ]
org.encuestame.core; org.encuestame.persistence;
650,165
@BeforeClass(alwaysRun = true) public void obtainTestSubject(ITestContext testContext) { System.out.println("\nCONFORMANCE LEVEL 1 :\n"); Object obj = testContext.getSuite().getAttribute( SuiteAttribute.TEST_SUBJECT.getName()); if ((null != obj) && Document.class.isAssignableFrom(obj.getClas...
@BeforeClass(alwaysRun = true) void function(ITestContext testContext) { System.out.println(STR); Object obj = testContext.getSuite().getAttribute( SuiteAttribute.TEST_SUBJECT.getName()); if ((null != obj) && Document.class.isAssignableFrom(obj.getClass())) { this.testSubject = Document.class.cast(obj); } }
/** * Obtains the test subject from the ISuite context. The suite attribute * {@link org.opengis.cite.iso19139.SuiteAttribute#TEST_SUBJECT} should * evaluate to a DOM Document node. * * @param testContext The test (group) context. */
Obtains the test subject from the ISuite context. The suite attribute <code>org.opengis.cite.iso19139.SuiteAttribute#TEST_SUBJECT</code> should evaluate to a DOM Document node
obtainTestSubject
{ "repo_name": "CINERGI/ets-19139", "path": "src/main/java/org/opengis/cite/iso19139/level1/ValidateInputTest.java", "license": "apache-2.0", "size": 7185 }
[ "org.opengis.cite.iso19139.SuiteAttribute", "org.testng.ITestContext", "org.testng.annotations.BeforeClass", "org.w3c.dom.Document" ]
import org.opengis.cite.iso19139.SuiteAttribute; import org.testng.ITestContext; import org.testng.annotations.BeforeClass; import org.w3c.dom.Document;
import org.opengis.cite.iso19139.*; import org.testng.*; import org.testng.annotations.*; import org.w3c.dom.*;
[ "org.opengis.cite", "org.testng", "org.testng.annotations", "org.w3c.dom" ]
org.opengis.cite; org.testng; org.testng.annotations; org.w3c.dom;
2,731,942
Operation getCurrentReadOp();
Operation getCurrentReadOp();
/** * Get the operation at the top of the queue that is requiring input. */
Get the operation at the top of the queue that is requiring input
getCurrentReadOp
{ "repo_name": "resrugam/java-memcached-client", "path": "src/main/java/net/spy/memcached/MemcachedNode.java", "license": "mit", "size": 5740 }
[ "net.spy.memcached.ops.Operation" ]
import net.spy.memcached.ops.Operation;
import net.spy.memcached.ops.*;
[ "net.spy.memcached" ]
net.spy.memcached;
662,213
@ExceptionHandler(ExpectationFailedException.class) public ResponseEntity<?> expectationFailed(Exception ex, WebRequest webRequest) { return handleExceptionInternal(ex, ex.getLocalizedMessage(), new HttpHeaders(), HttpStatus.EXPECTATION_FAILED, webRequest); } private static fina...
@ExceptionHandler(ExpectationFailedException.class) ResponseEntity<?> function(Exception ex, WebRequest webRequest) { return handleExceptionInternal(ex, ex.getLocalizedMessage(), new HttpHeaders(), HttpStatus.EXPECTATION_FAILED, webRequest); } private static final Logger L = LoggerFactory.getLogger(GlobalExceptionHandl...
/** * 417 Expectation Failed. */
417 Expectation Failed
expectationFailed
{ "repo_name": "raulcsj/CPF", "path": "plugin/src/main/java/core/plugin/spring/GlobalExceptionHandler.java", "license": "apache-2.0", "size": 9428 }
[ "org.slf4j.Logger", "org.slf4j.LoggerFactory", "org.springframework.http.HttpHeaders", "org.springframework.http.HttpStatus", "org.springframework.http.ResponseEntity", "org.springframework.web.bind.annotation.ExceptionHandler", "org.springframework.web.context.request.WebRequest" ]
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.context.request.WebRequest;
import org.slf4j.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.context.request.*;
[ "org.slf4j", "org.springframework.http", "org.springframework.web" ]
org.slf4j; org.springframework.http; org.springframework.web;
1,654,607
public static byte[] padToFieldSize(byte[] input) { ByteArrayOutputStream data = new ByteArrayOutputStream(); try { for (int i = 0; i < (FIELD_SIZE - input.length); i++) { data.write(0); // pad with zeros } data.write(input); } catch (IOException e) { e.printStackTrace(); } return data.toBy...
static byte[] function(byte[] input) { ByteArrayOutputStream data = new ByteArrayOutputStream(); try { for (int i = 0; i < (FIELD_SIZE - input.length); i++) { data.write(0); } data.write(input); } catch (IOException e) { e.printStackTrace(); } return data.toByteArray(); } final protected static char[] hexArray = STR.to...
/** * Left pads a byte array to reach the field size * * @param input the byte array to pad * @return the padded byte array */
Left pads a byte array to reach the field size
padToFieldSize
{ "repo_name": "volpino/hwsec-car-rental", "path": "RentalTerminal/src/terminal/utils/Conversions.java", "license": "mit", "size": 4118 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException" ]
import java.io.ByteArrayOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
500,040
public void setPaymentFilePersistence( PaymentFilePersistence paymentFilePersistence) { this.paymentFilePersistence = paymentFilePersistence; }
void function( PaymentFilePersistence paymentFilePersistence) { this.paymentFilePersistence = paymentFilePersistence; }
/** * Sets the payment file persistence. * * @param paymentFilePersistence the payment file persistence */
Sets the payment file persistence
setPaymentFilePersistence
{ "repo_name": "openegovplatform/OEPv2", "path": "oep-dossier-portlet/docroot/WEB-INF/src/org/oep/dossiermgt/service/base/DossierFolderServiceBaseImpl.java", "license": "apache-2.0", "size": 49358 }
[ "org.oep.dossiermgt.service.persistence.PaymentFilePersistence" ]
import org.oep.dossiermgt.service.persistence.PaymentFilePersistence;
import org.oep.dossiermgt.service.persistence.*;
[ "org.oep.dossiermgt" ]
org.oep.dossiermgt;
915,707
public String getConfig(String key) throws MojoExecutionException { ResourceBundle resource = null; try { resource = ResourceBundle.getBundle( "io/sarl/maven/compiler/config", //$NON-NLS-1$ java.util.Locale.getDefault(), MavenHelper.class.getClassLoader()); } catch (MissingResourceException e...
String function(String key) throws MojoExecutionException { ResourceBundle resource = null; try { resource = ResourceBundle.getBundle( STR, java.util.Locale.getDefault(), MavenHelper.class.getClassLoader()); } catch (MissingResourceException e) { throw new MojoExecutionException(e.getLocalizedMessage(), e); } String va...
/** Extract the value from the hard-coded configuration. * * @param key - the key of the configuration entry. * @return the value. * @throws MojoExecutionException on error. */
Extract the value from the hard-coded configuration
getConfig
{ "repo_name": "jgfoster/sarl", "path": "main/internalmaven/sarl-maven-plugin/src/main/java/io/sarl/maven/compiler/MavenHelper.java", "license": "apache-2.0", "size": 11373 }
[ "com.google.common.base.Strings", "java.util.MissingResourceException", "java.util.ResourceBundle", "org.apache.maven.plugin.MojoExecutionException", "org.arakhne.afc.vmutil.locale.Locale" ]
import com.google.common.base.Strings; import java.util.MissingResourceException; import java.util.ResourceBundle; import org.apache.maven.plugin.MojoExecutionException; import org.arakhne.afc.vmutil.locale.Locale;
import com.google.common.base.*; import java.util.*; import org.apache.maven.plugin.*; import org.arakhne.afc.vmutil.locale.*;
[ "com.google.common", "java.util", "org.apache.maven", "org.arakhne.afc" ]
com.google.common; java.util; org.apache.maven; org.arakhne.afc;
1,727,165
@Path("events") @GET @NoCache @Produces(MediaType.APPLICATION_JSON) public List<EventRepresentation> getEvents(@QueryParam("type") List<String> types, @QueryParam("client") String client, @QueryParam("user") String user, @QueryParam("dateFrom") String dateFrom, @QueryParam("dateTo") Stri...
@Path(STR) @Produces(MediaType.APPLICATION_JSON) List<EventRepresentation> function(@QueryParam("type") List<String> types, @QueryParam(STR) String client, @QueryParam("user") String user, @QueryParam(STR) String dateFrom, @QueryParam(STR) String dateTo, @QueryParam(STR) String ipAddress, @QueryParam("first") Integer f...
/** * Get events * * Returns all events, or filters them based on URL query parameters listed here * * @param types The types of events to return * @param client App or oauth client name * @param user User id * @param ipAddress IP address * @param dateTo To date * @para...
Get events Returns all events, or filters them based on URL query parameters listed here
getEvents
{ "repo_name": "jean-merelis/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java", "license": "apache-2.0", "size": 26697 }
[ "java.text.ParseException", "java.text.SimpleDateFormat", "java.util.Date", "java.util.List", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.core.MediaType", "org.jboss.resteasy.spi.BadRequestException", "org.keycloak.events.EventQuery", "org.keycloak.events.E...
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import org.jboss.resteasy.spi.BadRequestException; import org.keycloak.events.EventQue...
import java.text.*; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jboss.resteasy.spi.*; import org.keycloak.events.*; import org.keycloak.representations.idm.*;
[ "java.text", "java.util", "javax.ws", "org.jboss.resteasy", "org.keycloak.events", "org.keycloak.representations" ]
java.text; java.util; javax.ws; org.jboss.resteasy; org.keycloak.events; org.keycloak.representations;
1,711,366
public static String toString(Calendar cal, boolean extended) { int fields = 0; if (cal.isSet(Calendar.YEAR)) fields |= YEAR_MASK; if (cal.isSet(Calendar.MONTH)) fields |= MONTH_MASK; if (cal.isSet(Calendar.DAY_OF_MONTH)) fields |= DAY_OF_MO...
static String function(Calendar cal, boolean extended) { int fields = 0; if (cal.isSet(Calendar.YEAR)) fields = YEAR_MASK; if (cal.isSet(Calendar.MONTH)) fields = MONTH_MASK; if (cal.isSet(Calendar.DAY_OF_MONTH)) fields = DAY_OF_MONTH_MASK; if (cal.isSet(Calendar.WEEK_OF_YEAR)) fields = WEEK_OF_YEAR_MASK; if (cal.isSet...
/** * Convert a {@link Calendar} object to an ISO 8601 string. This function outputs to the * string only those fields that are marked as having been set explicitly. * * @param cal a {@link Calendar} object * @param extended if {@code true}, use "extended" format (include d...
Convert a <code>Calendar</code> object to an ISO 8601 string. This function outputs to the string only those fields that are marked as having been set explicitly
toString
{ "repo_name": "pwall567/javautil", "path": "src/main/java/net/pwall/util/ISO8601Date.java", "license": "mit", "size": 24177 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
285,752
@Test @SuppressWarnings("rawtypes") public void testApplyWithPreReducerEventTime() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.setStreamTimeCharacteristic(TimeCharacteristic.IngestionTime); DataStream<Tuple2<String, Integer>> source = env.fro...
@SuppressWarnings(STR) void function() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.setStreamTimeCharacteristic(TimeCharacteristic.IngestionTime); DataStream<Tuple2<String, Integer>> source = env.fromElements(Tuple2.of("hello", 1), Tuple2.of("hello", 2));...
/** * Test for the deprecated .apply(Reducer, WindowFunction). */
Test for the deprecated .apply(Reducer, WindowFunction)
testApplyWithPreReducerEventTime
{ "repo_name": "darionyaphet/flink", "path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/operators/windowing/AllWindowTranslationTest.java", "license": "apache-2.0", "size": 55704 }
[ "java.util.concurrent.TimeUnit", "org.apache.flink.api.java.tuple.Tuple2", "org.apache.flink.api.java.tuple.Tuple3", "org.apache.flink.streaming.api.TimeCharacteristic", "org.apache.flink.streaming.api.datastream.DataStream", "org.apache.flink.streaming.api.environment.StreamExecutionEnvironment", "org....
import java.util.concurrent.TimeUnit; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.api.java.tuple.Tuple3; import org.apache.flink.streaming.api.TimeCharacteristic; import org.apache.flink.streaming.api.datastream.DataStream; import org.apache.flink.streaming.api.environment.StreamExecutionEnvi...
import java.util.concurrent.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.streaming.api.*; import org.apache.flink.streaming.api.datastream.*; import org.apache.flink.streaming.api.environment.*; import org.apache.flink.streaming.api.functions.windowing.*; import org.apache.flink.streaming.api.wi...
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
282,515
void save(Chunk chunk) throws IOException;
void save(Chunk chunk) throws IOException;
/** * Saves a new chunk * * @throws IOException is thrown when the chunk does not exists or the chunk file * is corrupted */
Saves a new chunk
save
{ "repo_name": "MyRealityCoding/chunx", "path": "src/de/myreality/chunx/io/ChunkSaver.java", "license": "gpl-2.0", "size": 1843 }
[ "de.myreality.chunx.Chunk", "java.io.IOException" ]
import de.myreality.chunx.Chunk; import java.io.IOException;
import de.myreality.chunx.*; import java.io.*;
[ "de.myreality.chunx", "java.io" ]
de.myreality.chunx; java.io;
1,230,857
public static com.iucn.whp.dbservice.model.whp_sites_mission fetchByfileId( long fileentryid) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByfileId(fileentryid); }
static com.iucn.whp.dbservice.model.whp_sites_mission function( long fileentryid) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().fetchByfileId(fileentryid); }
/** * Returns the whp_sites_mission where fileentryid = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. * * @param fileentryid the fileentryid * @return the matching whp_sites_mission, or <code>null</code> if a matching whp_sites_mission could not be found * @throws SystemExcept...
Returns the whp_sites_mission where fileentryid = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache
fetchByfileId
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/persistence/whp_sites_missionUtil.java", "license": "gpl-2.0", "size": 24511 }
[ "com.liferay.portal.kernel.exception.SystemException" ]
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.exception.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,083,421
private void setCount(long pageAddr, int cnt) { assert cnt >= 0 && cnt <= Short.MAX_VALUE : cnt; assertPageType(pageAddr); PageUtils.putShort(pageAddr, CNT_OFF, (short)cnt); }
void function(long pageAddr, int cnt) { assert cnt >= 0 && cnt <= Short.MAX_VALUE : cnt; assertPageType(pageAddr); PageUtils.putShort(pageAddr, CNT_OFF, (short)cnt); }
/** * Sets total count of entries in this page. Does not change the buffer state. * * @param pageAddr Page address to write to. * @param cnt Count. */
Sets total count of entries in this page. Does not change the buffer state
setCount
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/io/PagesListNodeIO.java", "license": "apache-2.0", "size": 8447 }
[ "org.apache.ignite.internal.pagemem.PageUtils" ]
import org.apache.ignite.internal.pagemem.PageUtils;
import org.apache.ignite.internal.pagemem.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,003,702
public List getLetterGradeRows() { return letterGradeRows; }
List function() { return letterGradeRows; }
/** * Grading scale used if grade entry by letter * @return */
Grading scale used if grade entry by letter
getLetterGradeRows
{ "repo_name": "hackbuteer59/sakai", "path": "gradebook/app/ui/src/java/org/sakaiproject/tool/gradebook/ui/GradebookSetupBean.java", "license": "apache-2.0", "size": 41876 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,930,610
public List<ID> getPreferredCoordinators( Set<ID> filter, ID localAddress, int maxNumberDesired) { List<ID> results = new ArrayList<>(); List<ID> notPreferredCoordinatorList = new ArrayList<>(); synchronized (membersLock) { for (ID addr : members) { if (addr.equals(localAddress)...
List<ID> function( Set<ID> filter, ID localAddress, int maxNumberDesired) { List<ID> results = new ArrayList<>(); List<ID> notPreferredCoordinatorList = new ArrayList<>(); synchronized (membersLock) { for (ID addr : members) { if (addr.equals(localAddress)) { continue; } if (addr.preferredForCoordinator() && !filter.co...
/*** * This functions returns the list of preferred coordinators. One random member from list of * non-preferred member list. It make sure that random member is not in suspected Set. And local * member. * * @param filter Suspect member set. * @param localAddress the address of this member * @param ...
This functions returns the list of preferred coordinators. One random member from list of non-preferred member list. It make sure that random member is not in suspected Set. And local member
getPreferredCoordinators
{ "repo_name": "smgoller/geode", "path": "geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSMembershipView.java", "license": "apache-2.0", "size": 20018 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "java.util.Set" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
229,294
public static void readFully(InputStream in, byte[] dst) throws IOException { readFully(in, dst, 0, dst.length); }
static void function(InputStream in, byte[] dst) throws IOException { readFully(in, dst, 0, dst.length); }
/** * Fills 'dst' with bytes from 'in', throwing EOFException if insufficient * bytes are available. */
Fills 'dst' with bytes from 'in', throwing EOFException if insufficient bytes are available
readFully
{ "repo_name": "tsdl2013/QuickAndroid", "path": "library/src/from/libcore/io/Streams.java", "license": "gpl-3.0", "size": 6040 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,831,637
@Override protected String getVCBinDir(File vcInstallDir) { return vcInstallDir.getPath() + "\\Bin\\amd64;"; }
String function(File vcInstallDir) { return vcInstallDir.getPath() + STR; }
/** * Returns the Visual C++ bin dir. * <p/> * E.g.: <pre>c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\bin\\amd64</pre> * * @param vcInstallDir the Visual C++ install dir * @return the Visual C++ bin dir */
Returns the Visual C++ bin dir. E.g.: <code>c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\bin\\amd64</code>
getVCBinDir
{ "repo_name": "mtjandra/izpack", "path": "izpack-native-parent/izpack-native-maven-plugin/src/main/java/com/izforge/izpack/maven/natives/MSVC2010x64EnvFactory.java", "license": "apache-2.0", "size": 4339 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,508,071
public ArtifactRepository getMirror( ArtifactRepository originalRepository ) { ArtifactRepository selectedMirror = (ArtifactRepository) mirrors.get( originalRepository.getId() ); if ( null == selectedMirror ) { // Process the patterns in order. First one that matches wins. ...
ArtifactRepository function( ArtifactRepository originalRepository ) { ArtifactRepository selectedMirror = (ArtifactRepository) mirrors.get( originalRepository.getId() ); if ( null == selectedMirror ) { Set keySet = mirrors.keySet(); if ( keySet != null ) { Iterator iter = keySet.iterator(); while ( iter.hasNext() ) { ...
/** * This method finds a matching mirror for the selected repository. If there is an exact match, this will be used. * If there is no exact match, then the list of mirrors is examined to see if a pattern applies. * * @param originalRepository See if there is a mirror for this repository. * @re...
This method finds a matching mirror for the selected repository. If there is an exact match, this will be used. If there is no exact match, then the list of mirrors is examined to see if a pattern applies
getMirror
{ "repo_name": "apache/continuum", "path": "continuum-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java", "license": "apache-2.0", "size": 43331 }
[ "java.util.Iterator", "java.util.Set", "org.apache.maven.artifact.repository.ArtifactRepository" ]
import java.util.Iterator; import java.util.Set; import org.apache.maven.artifact.repository.ArtifactRepository;
import java.util.*; import org.apache.maven.artifact.repository.*;
[ "java.util", "org.apache.maven" ]
java.util; org.apache.maven;
1,818,933
EList<BusinessTransaction> getBusinessTransaction();
EList<BusinessTransaction> getBusinessTransaction();
/** * Returns the value of the '<em><b>Business Transaction</b></em>' reference list. * The list contents are of type {@link iso20022.BusinessTransaction}. * It is bidirectional and its opposite is '{@link iso20022.BusinessTransaction#getMessageTransportMode <em>Message Transport Mode</em>}'. * <!-- begin-user-...
Returns the value of the 'Business Transaction' reference list. The list contents are of type <code>iso20022.BusinessTransaction</code>. It is bidirectional and its opposite is '<code>iso20022.BusinessTransaction#getMessageTransportMode Message Transport Mode</code>'. specifies the BusinessTransaction for which a set o...
getBusinessTransaction
{ "repo_name": "ISO20022ArchitectForum/sample-code-public", "path": "DLT/Corda/ISO20022Generated/src/iso20022/MessageTransportMode.java", "license": "apache-2.0", "size": 18913 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,536,706
final ImageURLFieldTemplate t = (ImageURLFieldTemplate) super.createObject(); if ( t.getBaseURL() == null ) { final String baseURL = getConfig().getConfigProperty( AbstractXmlResourceFactory.CONTENTBASE_KEY ); try { final URL bURL = new URL( baseURL ); t.setBaseURL( bURL ); } catch...
final ImageURLFieldTemplate t = (ImageURLFieldTemplate) super.createObject(); if ( t.getBaseURL() == null ) { final String baseURL = getConfig().getConfigProperty( AbstractXmlResourceFactory.CONTENTBASE_KEY ); try { final URL bURL = new URL( baseURL ); t.setBaseURL( bURL ); } catch ( Exception e ) { ImageURLFieldTempla...
/** * Creates an object based on this description. * * @return The object. */
Creates an object based on this description
createObject
{ "repo_name": "mbatchelor/pentaho-reporting", "path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/modules/parser/ext/factory/templates/ImageURLFieldTemplateDescription.java", "license": "lgpl-2.1", "size": 2364 }
[ "org.pentaho.reporting.engine.classic.core.filter.templates.ImageURLFieldTemplate", "org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory" ]
import org.pentaho.reporting.engine.classic.core.filter.templates.ImageURLFieldTemplate; import org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory;
import org.pentaho.reporting.engine.classic.core.filter.templates.*; import org.pentaho.reporting.libraries.xmlns.parser.*;
[ "org.pentaho.reporting" ]
org.pentaho.reporting;
476,235
public static ObfuscatedData fromString(String obfuscatedString) { String[] parts = obfuscatedString.split("\\$"); if (parts.length != 5) { throw new IllegalArgumentException("Invalid obfuscated data"); } if (!parts[1].equals(SIGNATURE)) { throw new IllegalArg...
static ObfuscatedData function(String obfuscatedString) { String[] parts = obfuscatedString.split("\\$"); if (parts.length != 5) { throw new IllegalArgumentException(STR); } if (!parts[1].equals(SIGNATURE)) { throw new IllegalArgumentException(STR); } return new ObfuscatedData(Integer.parseInt(parts[2]), Base64.decode(...
/** * Parse string containing obfuscated data. * * @param obfuscatedString obfuscated string to parse * * @return parsed data */
Parse string containing obfuscated data
fromString
{ "repo_name": "zmarko/jPasswordObfuscator", "path": "jPasswordObfuscator-lib/src/main/java/rs/in/zivanovic/obfuscator/impl/ObfuscatedData.java", "license": "mit", "size": 3011 }
[ "org.bouncycastle.util.encoders.Base64" ]
import org.bouncycastle.util.encoders.Base64;
import org.bouncycastle.util.encoders.*;
[ "org.bouncycastle.util" ]
org.bouncycastle.util;
2,505,806
public static final <T> T[] resizeNoAutoInit(T[] oldarray, int newsize) { // For non-autoinit types, this is enough. T[] tmp = Arrays.copyOf(oldarray, newsize); System.out.printf("Old array of type %s resized without auto-init. New capacity: %d\n" , tmp.getClass().getCompon...
static final <T> T[] function(T[] oldarray, int newsize) { T[] tmp = Arrays.copyOf(oldarray, newsize); System.out.printf(STR , tmp.getClass().getComponentType(), newsize); return tmp; }
/** * Resize an array without autoinitialization. Same as Arrays.copyOf(..), just * prints a message. * * @param <T> * @param oldarray * @param newsize * @return */
Resize an array without autoinitialization. Same as Arrays.copyOf(..), just prints a message
resizeNoAutoInit
{ "repo_name": "jendave/mochadoom", "path": "src/main/java/net/sourceforge/mochadoom/utils/C2JUtils.java", "license": "gpl-3.0", "size": 22824 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,460,483
public boolean mayExportPabo() { return checkPrivilege(Privilege.ExportData); }
boolean function() { return checkPrivilege(Privilege.ExportData); }
/** * Whether the user is allowed to export / import pabo data or not * @return True if the user may edit formulas, false otherwise. */
Whether the user is allowed to export / import pabo data or not
mayExportPabo
{ "repo_name": "stefanoberdoerfer/exmatrikulator", "path": "src/main/java/de/unibremen/opensores/controller/settings/CourseSettingsController.java", "license": "agpl-3.0", "size": 15098 }
[ "de.unibremen.opensores.model.Privilege" ]
import de.unibremen.opensores.model.Privilege;
import de.unibremen.opensores.model.*;
[ "de.unibremen.opensores" ]
de.unibremen.opensores;
608,675
public int forceRepairAsync(String keyspace, int parallelismDegree, Collection<String> dataCenters, Collection<String> hosts, boolean primaryRange, boolean fullRepair, String... columnFamilies);
int function(String keyspace, int parallelismDegree, Collection<String> dataCenters, Collection<String> hosts, boolean primaryRange, boolean fullRepair, String... columnFamilies);
/** * Invoke repair asynchronously. * You can track repair progress by subscribing JMX notification sent from this StorageServiceMBean. * Notification format is: * type: "repair" * userObject: int array of length 2, [0]=command number, [1]=ordinal of ActiveRepairService.Status * *...
Invoke repair asynchronously. You can track repair progress by subscribing JMX notification sent from this StorageServiceMBean. Notification format is: type: "repair" userObject: int array of length 2, [0]=command number, [1]=ordinal of ActiveRepairService.Status
forceRepairAsync
{ "repo_name": "PaytmLabs/cassandra", "path": "src/java/org/apache/cassandra/service/StorageServiceMBean.java", "license": "apache-2.0", "size": 21486 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,750,034
MetaDt metaGetOperation();
MetaDt metaGetOperation();
/** * Not supported for DSTU1 */
Not supported for DSTU1
metaGetOperation
{ "repo_name": "dhf0820/hapi-fhir-1.2", "path": "hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirSystemDao.java", "license": "apache-2.0", "size": 1480 }
[ "ca.uhn.fhir.model.dstu2.composite.MetaDt" ]
import ca.uhn.fhir.model.dstu2.composite.MetaDt;
import ca.uhn.fhir.model.dstu2.composite.*;
[ "ca.uhn.fhir" ]
ca.uhn.fhir;
2,649,490
public static void drawCoordinateAxes(Graphics2D g, Component comp) { AffineTransform at = g.getTransform(); AffineTransform bt = new AffineTransform(); try { bt = at.createInverse(); } catch (Exception e) { System.out.println("Non-invertible transform"); ...
static void function(Graphics2D g, Component comp) { AffineTransform at = g.getTransform(); AffineTransform bt = new AffineTransform(); try { bt = at.createInverse(); } catch (Exception e) { System.out.println(STR); } Container c = comp.getParent(); int x = c.getX(); int y = c.getY(); int dx = c.getWidth(); int dy = c....
/** * draws a pair of coordinate axes through the origin. * * @param g the Graphics2D context * @param comp the component to draw on */
draws a pair of coordinate axes through the origin
drawCoordinateAxes
{ "repo_name": "opencadc/caom2", "path": "caom2-viz/src/main/java/ca/nrc/cadc/caom2/viz/CoordSystemUtil.java", "license": "agpl-3.0", "size": 32159 }
[ "java.awt.Component", "java.awt.Container", "java.awt.Graphics2D", "java.awt.geom.AffineTransform", "java.awt.geom.GeneralPath", "java.awt.geom.Point2D" ]
import java.awt.Component; import java.awt.Container; import java.awt.Graphics2D; import java.awt.geom.AffineTransform; import java.awt.geom.GeneralPath; import java.awt.geom.Point2D;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,750,670
public static DefaultHttpClient createHttpClient( CredentialsProvider _credsProvider, boolean _ALLOW_ALL_HOSTNAME_VERIFIER_FOR_SSL ) { // ------------------------------------------------------------------- // Example for _credsProvider // // String usr = getUser(); ...
static DefaultHttpClient function( CredentialsProvider _credsProvider, boolean _ALLOW_ALL_HOSTNAME_VERIFIER_FOR_SSL ) { HttpParams params = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout( params, TIME_OUT ); HttpConnectionParams.setSoTimeout( params, TIME_OUT ); HttpProtocolParams.setVersion( params, ...
/** * Creates a {@link DefaultHttpClient} object. * * @since 1.0 * @param _credsProvider * the object contains connect credential info like: User, Pwd, Host etc. * @param _ALLOW_ALL_HOSTNAME_VERIFIER_FOR_SSL * true allow all hostname verifier for ssl. * @re...
Creates a <code>DefaultHttpClient</code> object
createHttpClient
{ "repo_name": "XinyueZ/SlidingGallery", "path": "src/de/cellular/lib/lightlib/backend/LLRequest.java", "license": "apache-2.0", "size": 17624 }
[ "de.cellular.lib.lightlib.log.LL", "java.security.KeyStore", "org.apache.http.HttpVersion", "org.apache.http.client.CredentialsProvider", "org.apache.http.client.methods.HttpRequestBase", "org.apache.http.conn.ClientConnectionManager", "org.apache.http.conn.scheme.PlainSocketFactory", "org.apache.http...
import de.cellular.lib.lightlib.log.LL; import java.security.KeyStore; import org.apache.http.HttpVersion; import org.apache.http.client.CredentialsProvider; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.scheme.PlainSocketFactory;...
import de.cellular.lib.lightlib.log.*; import java.security.*; import org.apache.http.*; import org.apache.http.client.*; import org.apache.http.client.methods.*; import org.apache.http.conn.*; import org.apache.http.conn.scheme.*; import org.apache.http.conn.ssl.*; import org.apache.http.impl.client.*; import org.apac...
[ "de.cellular.lib", "java.security", "org.apache.http" ]
de.cellular.lib; java.security; org.apache.http;
896,141
public void setRentalCarSurchargeAmount(KualiDecimal rentalCarSurchargeAmount) { this.rentalCarSurchargeAmount = rentalCarSurchargeAmount; }
void function(KualiDecimal rentalCarSurchargeAmount) { this.rentalCarSurchargeAmount = rentalCarSurchargeAmount; }
/** * Sets the rentalCarSurchargeAmount attribute value. * @param rentalCarSurchargeAmount The rentalCarSurchargeAmount to set. */
Sets the rentalCarSurchargeAmount attribute value
setRentalCarSurchargeAmount
{ "repo_name": "bhutchinson/kfs", "path": "kfs-tem/src/main/java/org/kuali/kfs/module/tem/businessobject/AgencyStagingData.java", "license": "agpl-3.0", "size": 52782 }
[ "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,056,277
void splitData(Node node, Node newNode, int offset) { // notify ranges if (ranges != null) { notifyRangesSplitData(node, newNode, offset); } }
void splitData(Node node, Node newNode, int offset) { if (ranges != null) { notifyRangesSplitData(node, newNode, offset); } }
/** * A method to be called when a text node has been split, * so that live objects can be notified. */
A method to be called when a text node has been split, so that live objects can be notified
splitData
{ "repo_name": "srnsw/xena", "path": "xena/ext/src/xerces-2_9_1/src/org/apache/xerces/dom/DocumentImpl.java", "license": "gpl-3.0", "size": 52310 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,137,168
public double getFontSize() { return fontSize; } } private FontStorage fontStorage; private FontRegistry fontRegistry; private HashMap numericFeatures; private HashMap fontFamilyMapping; private HashSet booleanFeatures; private Configuration configuration; private ReusableFontContext reus...
double function() { return fontSize; } } private FontStorage fontStorage; private FontRegistry fontRegistry; private HashMap numericFeatures; private HashMap fontFamilyMapping; private HashSet booleanFeatures; private Configuration configuration; private ReusableFontContext reusableFontContext; private HashMap fontMetr...
/** * The requested font size. A font may have a fractional font size (ie. 8.5 point). The font size may be influenced * by the output target. * * @return the font size. */
The requested font size. A font may have a fractional font size (ie. 8.5 point). The font size may be influenced by the output target
getFontSize
{ "repo_name": "mbatchelor/pentaho-reporting", "path": "libraries/libcss/src/main/java/org/pentaho/reporting/libraries/css/dom/AbstractOutputMetaData.java", "license": "lgpl-2.1", "size": 19834 }
[ "java.util.HashMap", "java.util.HashSet", "org.pentaho.reporting.libraries.base.config.Configuration", "org.pentaho.reporting.libraries.base.config.ExtendedConfiguration", "org.pentaho.reporting.libraries.base.config.ExtendedConfigurationWrapper", "org.pentaho.reporting.libraries.css.keys.font.FontFamilyV...
import java.util.HashMap; import java.util.HashSet; import org.pentaho.reporting.libraries.base.config.Configuration; import org.pentaho.reporting.libraries.base.config.ExtendedConfiguration; import org.pentaho.reporting.libraries.base.config.ExtendedConfigurationWrapper; import org.pentaho.reporting.libraries.css.keys...
import java.util.*; import org.pentaho.reporting.libraries.base.config.*; import org.pentaho.reporting.libraries.css.keys.font.*; import org.pentaho.reporting.libraries.css.values.*; import org.pentaho.reporting.libraries.fonts.awt.*; import org.pentaho.reporting.libraries.fonts.registry.*;
[ "java.util", "org.pentaho.reporting" ]
java.util; org.pentaho.reporting;
666,180
if (processEngineConfiguration.getHistoryLevel().isAtLeast(HistoryLevel.AUDIT)) { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("oneTaskProcess"); Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); assertThat(task).isNotNu...
if (processEngineConfiguration.getHistoryLevel().isAtLeast(HistoryLevel.AUDIT)) { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(STR); Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult(); assertThat(task).isNotNull(); Comment comment = taskServ...
/** * Test create, update and delete events of comments on a task/process. */
Test create, update and delete events of comments on a task/process
testCommentEntityEvents
{ "repo_name": "Activiti/Activiti", "path": "activiti-core/activiti-engine/src/test/java/org/activiti/engine/test/api/event/CommentEventsTest.java", "license": "apache-2.0", "size": 6030 }
[ "org.activiti.engine.delegate.event.ActivitiEntityEvent", "org.activiti.engine.delegate.event.ActivitiEventType", "org.activiti.engine.impl.history.HistoryLevel", "org.activiti.engine.runtime.ProcessInstance", "org.activiti.engine.task.Comment", "org.activiti.engine.task.Task", "org.assertj.core.api.Ass...
import org.activiti.engine.delegate.event.ActivitiEntityEvent; import org.activiti.engine.delegate.event.ActivitiEventType; import org.activiti.engine.impl.history.HistoryLevel; import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.task.Comment; import org.activiti.engine.task.Task; import org....
import org.activiti.engine.delegate.event.*; import org.activiti.engine.impl.history.*; import org.activiti.engine.runtime.*; import org.activiti.engine.task.*; import org.assertj.core.api.*;
[ "org.activiti.engine", "org.assertj.core" ]
org.activiti.engine; org.assertj.core;
2,033,740
void addAlertGroup(String name, List<Integer> definitions);
void addAlertGroup(String name, List<Integer> definitions);
/** * Add alert notification * @param name Group name * @param definitions List of notification definitions */
Add alert notification
addAlertGroup
{ "repo_name": "brooklyncentral/brooklyn-ambari", "path": "ambari/src/main/java/io/brooklyn/ambari/AmbariCluster.java", "license": "apache-2.0", "size": 12555 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
280,427
public void unlockTable(Connection con, String table) throws SQLException { }
void function(Connection con, String table) throws SQLException { }
/** * Unlocks the specified table. * * @param con The JDBC connection to use. * @param table The name of the table to unlock. * @exception SQLException No Statement could be created or executed. */
Unlocks the specified table
unlockTable
{ "repo_name": "besom/bbossgroups-mvn", "path": "bboss_persistent/src/main/java/com/frameworkset/orm/adapter/DBDB2App.java", "license": "apache-2.0", "size": 3396 }
[ "java.sql.Connection", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,710,279
@SuppressWarnings("unchecked") public static <T> T newInstance(Class<T> theCls) { T result; try { Constructor<T> meth = (Constructor<T>) constructorCache.get(theCls); if (null == meth) { meth = theCls.getDeclaredConstructor(); meth.setAcces...
@SuppressWarnings(STR) static <T> T function(Class<T> theCls) { T result; try { Constructor<T> meth = (Constructor<T>) constructorCache.get(theCls); if (null == meth) { meth = theCls.getDeclaredConstructor(); meth.setAccessible(true); constructorCache.put(theCls, meth); } result = meth.newInstance(); } catch (Exception...
/** * Create an object for the given class. * * @param theCls * class of which an object is created. * @return a new object */
Create an object for the given class
newInstance
{ "repo_name": "ivankelly/bookkeeper", "path": "bookkeeper-server/src/main/java/org/apache/bookkeeper/util/ReflectionUtils.java", "license": "apache-2.0", "size": 6357 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,460,726
@Nonnull DoiData resolve(DOI doi) throws DoiException;
DoiData resolve(DOI doi) throws DoiException;
/** * Resolves the registered identifier to its status and target URL. * * @param doi the identifier to resolve * @return the status object with the target URL the DOI is backed by or null if DOI does not * exist at all * @throws DoiException if the operation failed for any reason */
Resolves the registered identifier to its status and target URL
resolve
{ "repo_name": "gbif/gbif-doi", "path": "src/main/java/org/gbif/doi/service/DoiService.java", "license": "apache-2.0", "size": 6285 }
[ "org.gbif.api.model.common.DoiData" ]
import org.gbif.api.model.common.DoiData;
import org.gbif.api.model.common.*;
[ "org.gbif.api" ]
org.gbif.api;
1,320,788
static void launchJobAndTestCounters(String jobName, MiniMRCluster mr, FileSystem fileSys, Path in, Path out, int numMaps, int otherLocalMaps, int dataLocalMaps, int rackLocalMaps) throws IOExcepti...
static void launchJobAndTestCounters(String jobName, MiniMRCluster mr, FileSystem fileSys, Path in, Path out, int numMaps, int otherLocalMaps, int dataLocalMaps, int rackLocalMaps) throws IOException { JobConf jobConf = mr.createJobConf(); if (fileSys.exists(out)) { fileSys.delete(out, true); } RunningJob job = launchJ...
/** * Launches a MR job and tests the job counters against the expected values. * @param testName The name for the job * @param mr The MR cluster * @param fileSys The FileSystem * @param in Input path * @param out Output path * @param numMaps Number of maps * @param otherLocalMaps Expected value...
Launches a MR job and tests the job counters against the expected values
launchJobAndTestCounters
{ "repo_name": "dhootha/hadoop-common", "path": "src/test/org/apache/hadoop/mapred/TestRackAwareTaskPlacement.java", "license": "apache-2.0", "size": 7414 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
603,001
protected Configuration createConfiguration() { return new Configuration(); } @Rule public Timeout testTimeout = new Timeout(getTestTimeoutMillis());
Configuration function() { return new Configuration(); } public Timeout testTimeout = new Timeout(getTestTimeoutMillis());
/** * Create a configuration. May be overridden by tests/instantiations * @return a configuration */
Create a configuration. May be overridden by tests/instantiations
createConfiguration
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractFSContractTestBase.java", "license": "apache-2.0", "size": 11954 }
[ "org.apache.hadoop.conf.Configuration", "org.junit.rules.Timeout" ]
import org.apache.hadoop.conf.Configuration; import org.junit.rules.Timeout;
import org.apache.hadoop.conf.*; import org.junit.rules.*;
[ "org.apache.hadoop", "org.junit.rules" ]
org.apache.hadoop; org.junit.rules;
153,132
public BigDecimal getPrice() { return price; }
BigDecimal function() { return price; }
/** * This method was generated by Apache iBATIS ibator. * This method returns the value of the database column product.price * * @return the value of product.price * * @ibatorgenerated Tue Apr 22 17:48:07 GMT+08:00 2014 */
This method was generated by Apache iBATIS ibator. This method returns the value of the database column product.price
getPrice
{ "repo_name": "null7/haiegoo", "path": "hai-srv-shopping/src-service/com/haiegoo/shopping/model/product/Product.java", "license": "apache-2.0", "size": 27680 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,894,408
@Override public void subscribe(TopicPartition... partitions) { acquire(); try { log.debug("Subscribed to partitions(s): {}", Utils.join(partitions, ", ")); for (TopicPartition tp : partitions) { this.subscriptions.subscribe(tp); metadata.a...
void function(TopicPartition... partitions) { acquire(); try { log.debug(STR, Utils.join(partitions, STR)); for (TopicPartition tp : partitions) { this.subscriptions.subscribe(tp); metadata.addTopics(tp.topic()); } } finally { release(); } }
/** * Incrementally subscribes to a specific topic partition and does not use the consumer's group management * functionality. As such, there will be no rebalance operation triggered when group membership or cluster and topic * metadata change. * <p> * * @param partitions Partitions to inc...
Incrementally subscribes to a specific topic partition and does not use the consumer's group management functionality. As such, there will be no rebalance operation triggered when group membership or cluster and topic metadata change.
subscribe
{ "repo_name": "gdfm/kafka", "path": "clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java", "license": "apache-2.0", "size": 65660 }
[ "org.apache.kafka.common.TopicPartition", "org.apache.kafka.common.utils.Utils" ]
import org.apache.kafka.common.TopicPartition; import org.apache.kafka.common.utils.Utils;
import org.apache.kafka.common.*; import org.apache.kafka.common.utils.*;
[ "org.apache.kafka" ]
org.apache.kafka;
2,575,434
public void addEndEntity(String issuerName, BigInteger serialNumber) { Set<BigInteger> issuerSerials = this.endEntities.get(issuerName); if (null == issuerSerials) { issuerSerials = new HashSet<>(); this.endEntities.put(issuerName, issuerSerials); } issuerSerials.add(serialNumber); }
void function(String issuerName, BigInteger serialNumber) { Set<BigInteger> issuerSerials = this.endEntities.get(issuerName); if (null == issuerSerials) { issuerSerials = new HashSet<>(); this.endEntities.put(issuerName, issuerSerials); } issuerSerials.add(serialNumber); }
/** * Adds an end-entity certificate to the set of allowed certificates. * * @param issuerName * the X.500 distinguished name of the issuer using the format * defined in RFC 2253. * @param serialNumber * the serial number of the certificate. */
Adds an end-entity certificate to the set of allowed certificates
addEndEntity
{ "repo_name": "tectronics/jtrust", "path": "jtrust-lib/src/main/java/be/fedict/trust/constraints/EndEntityCertificateConstraint.java", "license": "gpl-3.0", "size": 3275 }
[ "java.math.BigInteger", "java.util.HashSet", "java.util.Set" ]
import java.math.BigInteger; import java.util.HashSet; import java.util.Set;
import java.math.*; import java.util.*;
[ "java.math", "java.util" ]
java.math; java.util;
1,080,621
public final Execution onServers(Pool pool, String... groups) { if (pool == null) { throw new FunctionException(LocalizedStrings.FunctionService_0_PASSED_IS_NULL.toLocalizedString("Pool instance ")); } if (pool.getMultiuserAuthentication()) { throw new UnsupportedOperationException(); } ...
final Execution function(Pool pool, String... groups) { if (pool == null) { throw new FunctionException(LocalizedStrings.FunctionService_0_PASSED_IS_NULL.toLocalizedString(STR)); } if (pool.getMultiuserAuthentication()) { throw new UnsupportedOperationException(); } return new ServerFunctionExecutor(pool, true, groups)...
/** * Returns an {@link Execution} object that can be used to execute a data independent function on all the servers in * the provided {@link Pool}. If one of the servers goes down while dispatching or executing the function on the * server, an Exception will be thrown. * * @param pool * the...
Returns an <code>Execution</code> object that can be used to execute a data independent function on all the servers in the provided <code>Pool</code>. If one of the servers goes down while dispatching or executing the function on the server, an Exception will be thrown
onServers
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/execute/internal/FunctionServiceManager.java", "license": "apache-2.0", "size": 18824 }
[ "com.gemstone.gemfire.cache.client.ClientCache", "com.gemstone.gemfire.cache.client.ClientCacheFactory", "com.gemstone.gemfire.cache.client.Pool", "com.gemstone.gemfire.cache.execute.Execution", "com.gemstone.gemfire.cache.execute.FunctionException", "com.gemstone.gemfire.cache.execute.FunctionService", ...
import com.gemstone.gemfire.cache.client.ClientCache; import com.gemstone.gemfire.cache.client.ClientCacheFactory; import com.gemstone.gemfire.cache.client.Pool; import com.gemstone.gemfire.cache.execute.Execution; import com.gemstone.gemfire.cache.execute.FunctionException; import com.gemstone.gemfire.cache.execute.Fu...
import com.gemstone.gemfire.cache.client.*; import com.gemstone.gemfire.cache.execute.*; import com.gemstone.gemfire.internal.cache.execute.*; import com.gemstone.gemfire.internal.i18n.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
826,338
public ServiceFuture<ExpressRouteCircuitsRoutesTableSummaryListResultInner> beginListRoutesTableSummaryAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback<ExpressRouteCircuitsRoutesTableSummaryListResultInner> serviceCallback) { return ServiceFutu...
ServiceFuture<ExpressRouteCircuitsRoutesTableSummaryListResultInner> function(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback<ExpressRouteCircuitsRoutesTableSummaryListResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginListRoutesTableSummary...
/** * Gets the currently advertised routes table summary associated with the express route circuit in a resource group. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. * @...
Gets the currently advertised routes table summary associated with the express route circuit in a resource group
beginListRoutesTableSummaryAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/ExpressRouteCircuitsInner.java", "license": "mit", "size": 117005 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,431,410
public Response put(String url, String auth, JsonJavaObject putData) throws URISyntaxException, IOException, JsonException { URI normUri = new URI(url).normalize(); Request putRequest = Request.Put(normUri); //Add auth header if(StringUtil.isNotEmpty(auth)) { putRequest.addHeader("Authorization", auth)...
Response function(String url, String auth, JsonJavaObject putData) throws URISyntaxException, IOException, JsonException { URI normUri = new URI(url).normalize(); Request putRequest = Request.Put(normUri); if(StringUtil.isNotEmpty(auth)) { putRequest.addHeader(STR, auth); } String putDataString = JsonGenerator.toJson(J...
/** * Send PUT request with authorization header * @param url - The url of the POST request * @param auth - String for authorization header * @param putData - The body of the PUT */
Send PUT request with authorization header
put
{ "repo_name": "briangleeson/XPages-Fusion-Application", "path": "xpages-fusion-ondisk/Code/Java/com/ibm/xsp/bluemix/util/RestUtil.java", "license": "apache-2.0", "size": 5628 }
[ "com.ibm.commons.util.StringUtil", "com.ibm.commons.util.io.json.JsonException", "com.ibm.commons.util.io.json.JsonGenerator", "com.ibm.commons.util.io.json.JsonJavaFactory", "com.ibm.commons.util.io.json.JsonJavaObject", "java.io.IOException", "java.net.URISyntaxException", "org.apache.http.client.fl...
import com.ibm.commons.util.StringUtil; import com.ibm.commons.util.io.json.JsonException; import com.ibm.commons.util.io.json.JsonGenerator; import com.ibm.commons.util.io.json.JsonJavaFactory; import com.ibm.commons.util.io.json.JsonJavaObject; import java.io.IOException; import java.net.URISyntaxException; import or...
import com.ibm.commons.util.*; import com.ibm.commons.util.io.json.*; import java.io.*; import java.net.*; import org.apache.http.client.fluent.*; import org.apache.http.entity.*;
[ "com.ibm.commons", "java.io", "java.net", "org.apache.http" ]
com.ibm.commons; java.io; java.net; org.apache.http;
411,059
public static void touch(File file) throws IOException { new FileOutputStream(file).close(); }
static void function(File file) throws IOException { new FileOutputStream(file).close(); }
/** * Creates an empty file. */
Creates an empty file
touch
{ "repo_name": "stefanbrausch/hudson-main", "path": "core/src/main/java/hudson/Util.java", "license": "mit", "size": 42243 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,593,445
private void update(@Nullable Entry<? extends K, ? extends V> val, StoreOperation storeOperation, ValueStatus valStatus) { this.val = val; this.storeOperation = storeOperation; this.valStatus = valStatus; }
void function(@Nullable Entry<? extends K, ? extends V> val, StoreOperation storeOperation, ValueStatus valStatus) { this.val = val; this.storeOperation = storeOperation; this.valStatus = valStatus; }
/** * Updates both value and value status. * * @param val Value. * @param storeOperation Store operation. * @param valStatus Value status. */
Updates both value and value status
update
{ "repo_name": "mcherkasov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java", "license": "apache-2.0", "size": 48157 }
[ "javax.cache.Cache", "org.jetbrains.annotations.Nullable" ]
import javax.cache.Cache; import org.jetbrains.annotations.Nullable;
import javax.cache.*; import org.jetbrains.annotations.*;
[ "javax.cache", "org.jetbrains.annotations" ]
javax.cache; org.jetbrains.annotations;
1,797,196
@Override public Iterator<E> iterator() { return new SLelementIterator(this); }
Iterator<E> function() { return new SLelementIterator(this); }
/** * Return an iterator over the elements in the array. This is generally not * called directly, but is called by Java when used in "simple" for loops */
Return an iterator over the elements in the array. This is generally not called directly, but is called by Java when used in "simple" for loops
iterator
{ "repo_name": "krs-world/bridges", "path": "src/main/java/bridges/base/SLelement.java", "license": "gpl-2.0", "size": 6605 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,313,342
List<String> getRelationshipEntriesForSourceAttribute(String entryName, String sourceAttributeName);
List<String> getRelationshipEntriesForSourceAttribute(String entryName, String sourceAttributeName);
/** * returns a list of names for all entries whose source parameter matches the parameter * * @param entryName Name of the Business Object entry * @param sourceAttributeName name of the source attribute * @return the names of all entries that use the sourceAttributeName as a primitive att...
returns a list of names for all entries whose source parameter matches the parameter
getRelationshipEntriesForSourceAttribute
{ "repo_name": "kuali/kc-rice", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/service/DataDictionaryService.java", "license": "apache-2.0", "size": 19553 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
498,538
void markCompletedJob(JobInProgress job) { for (TaskInProgress tip : job.getTasks(TaskType.JOB_SETUP)) { for (TaskStatus taskStatus : tip.getTaskStatuses()) { if (taskStatus.getRunState() != TaskStatus.State.RUNNING && taskStatus.getRunState() != TaskStatus.State.COMMIT_PENDING && ...
void markCompletedJob(JobInProgress job) { for (TaskInProgress tip : job.getTasks(TaskType.JOB_SETUP)) { for (TaskStatus taskStatus : tip.getTaskStatuses()) { if (taskStatus.getRunState() != TaskStatus.State.RUNNING && taskStatus.getRunState() != TaskStatus.State.COMMIT_PENDING && taskStatus.getRunState() != TaskStatus...
/** * Mark all 'non-running' jobs of the job for pruning. * This function assumes that the JobTracker is locked on entry. * * @param job the completed job */
Mark all 'non-running' jobs of the job for pruning. This function assumes that the JobTracker is locked on entry
markCompletedJob
{ "repo_name": "williamsentosa/hadoop-modified", "path": "src/mapred/org/apache/hadoop/mapred/JobTracker.java", "license": "apache-2.0", "size": 192030 }
[ "org.apache.hadoop.mapreduce.TaskType", "org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker" ]
import org.apache.hadoop.mapreduce.TaskType; import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker;
import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.server.jobtracker.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
10,000
@RequestMapping(value = "/pets/{petId}", method = RequestMethod.GET) public void findPet(@PathVariable String petId, @MatrixVariable int q) { // petId == 42 // q == 11 }
@RequestMapping(value = STR, method = RequestMethod.GET) void function(@PathVariable String petId, @MatrixVariable int q) { }
/** * GET /pets/42;q=11;r=22 * * @param petId * @param q */
GET /pets/42;q=11;r=22
findPet
{ "repo_name": "lumeng689/luapp", "path": "blog/src/main/java/org/luapp/blog/controllers/ArticleController.java", "license": "apache-2.0", "size": 1911 }
[ "org.springframework.web.bind.annotation.MatrixVariable", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod" ]
import org.springframework.web.bind.annotation.MatrixVariable; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.*;
[ "org.springframework.web" ]
org.springframework.web;
33,495
// Verify that "catalina.home" was passed. if (catalinaHome == null) { log("Must set 'catalina.home' system property"); System.exit(1); } // Process command line options int index = 0; while (true) { if (index == args.length) { ...
if (catalinaHome == null) { log(STR); System.exit(1); } int index = 0; while (true) { if (index == args.length) { usage(); System.exit(1); } if ("-ant".equals(args[index])) ant = true; else if (STR.equals(args[index])) common = true; else if (STR.equals(args[index])) debug = true; else if (STR.equals(args[index])) serv...
/** * The main program for the bootstrap. * * @param args Command line arguments to be processed */
The main program for the bootstrap
main
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Tool.java", "license": "apache-2.0", "size": 11146 }
[ "java.io.File", "java.lang.reflect.Method", "java.util.ArrayList" ]
import java.io.File; import java.lang.reflect.Method; import java.util.ArrayList;
import java.io.*; import java.lang.reflect.*; import java.util.*;
[ "java.io", "java.lang", "java.util" ]
java.io; java.lang; java.util;
378,310
protected int getTotalArgumentLengthForInputFile(final File outputDir, final String inputFile) { String arg1 = getInputFileArgument(outputDir, inputFile, 0); String arg2 = getInputFileArgument(outputDir, inputFile, 1); return arg1.length() + arg2.length() + 3; }
int function(final File outputDir, final String inputFile) { String arg1 = getInputFileArgument(outputDir, inputFile, 0); String arg2 = getInputFileArgument(outputDir, inputFile, 1); return arg1.length() + arg2.length() + 3; }
/** * Get total command line length due to the input file. * @param outputDir File output directory * @param inputFile String input file * @return int characters added to command line for the input file. */
Get total command line length due to the input file
getTotalArgumentLengthForInputFile
{ "repo_name": "flax3lbs/cpptasks-parallel", "path": "src/main/java/net/sf/antcontrib/cpptasks/trolltech/MetaObjectCompiler.java", "license": "apache-2.0", "size": 8580 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
273,525
public Blob createBlob() throws SQLException { checkIfClosed(); return new EmbedBlob(new byte[0], this); }
Blob function() throws SQLException { checkIfClosed(); return new EmbedBlob(new byte[0], this); }
/** * * Constructs an object that implements the <code>Blob</code> interface. The object * returned initially contains no data. The <code>setBinaryStream</code> and * <code>setBytes</code> methods of the <code>Blob</code> interface may be used to add data to * the <code>Blob</code>. * * @return An object that ...
Constructs an object that implements the <code>Blob</code> interface. The object returned initially contains no data. The <code>setBinaryStream</code> and <code>setBytes</code> methods of the <code>Blob</code> interface may be used to add data to the <code>Blob</code>
createBlob
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "license": "apache-2.0", "size": 128383 }
[ "java.sql.Blob", "java.sql.SQLException" ]
import java.sql.Blob; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
711,688
public Map<String, Set<Integer>> getSymbLines() { Map<String, Set<Integer>> result = new LinkedHashMap<>(); for (Op op : this.opList) { for (Operand opnd : op.getArgs()) { if (!(opnd instanceof Num)) { continue; } if (((Num) opnd).getKind() != NumKind.SYMB) { continue; } String n...
Map<String, Set<Integer>> function() { Map<String, Set<Integer>> result = new LinkedHashMap<>(); for (Op op : this.opList) { for (Operand opnd : op.getArgs()) { if (!(opnd instanceof Num)) { continue; } if (((Num) opnd).getKind() != NumKind.SYMB) { continue; } String name = ((Num) opnd).getName(); Set<Integer> lines = ...
/** * Returns a mapping from (symbolic) variables to line numbers * in which they appear. */
Returns a mapping from (symbolic) variables to line numbers in which they appear
getSymbLines
{ "repo_name": "tcoenraad/compiler-construction", "path": "lib/pp/iloc/model/Program.java", "license": "mit", "size": 7199 }
[ "java.util.LinkedHashMap", "java.util.LinkedHashSet", "java.util.Map", "java.util.Set" ]
import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,284,149
final Link self = attributeLinks.getRequestLink(request); return this.toResource(page, assembler, self); }
final Link self = attributeLinks.getRequestLink(request); return this.toResource(page, assembler, self); }
/** * Create PagedResources of attribute resources * * @param page page of entites * @param assembler resource assembler * @param request request data * @return PagedResource of attribute resources */
Create PagedResources of attribute resources
toResource
{ "repo_name": "bd2kccd/ccd-annotations", "path": "src/main/java/edu/pitt/dbmi/ccd/anno/vocabulary/attribute/AttributePagedResourcesAssembler.java", "license": "lgpl-2.1", "size": 2420 }
[ "org.springframework.hateoas.Link" ]
import org.springframework.hateoas.Link;
import org.springframework.hateoas.*;
[ "org.springframework.hateoas" ]
org.springframework.hateoas;
711,213
public ServiceFuture<ListBlobsFlatSegmentResponse> listBlobFlatSegmentAsync(Context context, String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, String requestId, ServiceCallback<ListBlobsFlatSegmentResponse> serviceCallback) { return ServiceFuture.fromBody...
ServiceFuture<ListBlobsFlatSegmentResponse> function(Context context, String prefix, String marker, Integer maxresults, List<ListBlobsIncludeItem> include, Integer timeout, String requestId, ServiceCallback<ListBlobsFlatSegmentResponse> serviceCallback) { return ServiceFuture.fromBody(listBlobFlatSegmentAsync(context, ...
/** * [Update] The List Blobs operation returns a list of the blobs under the specified container. * * @param context The context to associate with this operation. * @param prefix Filters the results to return only containers whose name begins with the specified prefix. * @param marker A string...
[Update] The List Blobs operation returns a list of the blobs under the specified container
listBlobFlatSegmentAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/GeneratedContainers.java", "license": "mit", "size": 119957 }
[ "com.microsoft.azure.storage.blob.models.ListBlobsFlatSegmentResponse", "com.microsoft.azure.storage.blob.models.ListBlobsIncludeItem", "com.microsoft.rest.v2.Context", "com.microsoft.rest.v2.ServiceCallback", "com.microsoft.rest.v2.ServiceFuture", "java.util.List" ]
import com.microsoft.azure.storage.blob.models.ListBlobsFlatSegmentResponse; import com.microsoft.azure.storage.blob.models.ListBlobsIncludeItem; import com.microsoft.rest.v2.Context; import com.microsoft.rest.v2.ServiceCallback; import com.microsoft.rest.v2.ServiceFuture; import java.util.List;
import com.microsoft.azure.storage.blob.models.*; import com.microsoft.rest.v2.*; import java.util.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.microsoft.azure; com.microsoft.rest; java.util;
1,085,818
public Map<PathFragment, Artifact> asMapWithoutRootSymlinks() { Map<PathFragment, Artifact> result = entriesToMap(symlinks); // If multiple artifacts have the same root-relative path, the last one in the list will win. // That is because the runfiles tree cannot contain the same artifact for different ...
Map<PathFragment, Artifact> function() { Map<PathFragment, Artifact> result = entriesToMap(symlinks); for (Artifact artifact : Iterables.filter(unconditionalArtifacts, Artifact.MIDDLEMAN_FILTER)) { result.put(artifact.getRootRelativePath(), artifact); } return result; }
/** * Returns the unified map of path fragments to artifacts, taking both artifacts and symlinks into * account. */
Returns the unified map of path fragments to artifacts, taking both artifacts and symlinks into account
asMapWithoutRootSymlinks
{ "repo_name": "Digas29/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java", "license": "apache-2.0", "size": 31379 }
[ "com.google.common.collect.Iterables", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.vfs.PathFragment", "java.util.Map" ]
import com.google.common.collect.Iterables; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.vfs.PathFragment; import java.util.Map;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.vfs.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
1,412,858
private static Response getResponse(String path, String method, String json, String username, String password) { Request.Builder b= RestUtils.getRequestBuilder(method,json).url(TestConstants.SERVER_URL + path); if (username!=null) authorize(username,password,b); Response response= null; ...
static Response function(String path, String method, String json, String username, String password) { Request.Builder b= RestUtils.getRequestBuilder(method,json).url(TestConstants.SERVER_URL + path); if (username!=null) authorize(username,password,b); Response response= null; try { response = new OkHttpClient().newCall...
/** * Performs a restful operation against the system under test. * * @param path * @param method * @param json * @param username if null, the request will be done without authentication. * @param password * @return the response object. */
Performs a restful operation against the system under test
getResponse
{ "repo_name": "codarchlab/chronontology-connected", "path": "src/test/java/org/dainst/chronontology/it/ResponseUtil.java", "license": "apache-2.0", "size": 3050 }
[ "com.squareup.okhttp.OkHttpClient", "com.squareup.okhttp.Request", "com.squareup.okhttp.Response", "java.io.IOException", "org.dainst.chronontology.TestConstants", "org.dainst.chronontology.store.rest.RestUtils" ]
import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; import java.io.IOException; import org.dainst.chronontology.TestConstants; import org.dainst.chronontology.store.rest.RestUtils;
import com.squareup.okhttp.*; import java.io.*; import org.dainst.chronontology.*; import org.dainst.chronontology.store.rest.*;
[ "com.squareup.okhttp", "java.io", "org.dainst.chronontology" ]
com.squareup.okhttp; java.io; org.dainst.chronontology;
2,389,104
private long computeJulianDay(int inp_year, int inp_month, int inp_day) { int y; boolean isLeap = inp_year%4 == 0; y = inp_year - 1; long julianDay = 365L*y + CalendarImpl.floorDivide(y, 4) + (...
long function(int inp_year, int inp_month, int inp_day) { int y; boolean isLeap = inp_year%4 == 0; y = inp_year - 1; long julianDay = 365L*y + CalendarImpl.floorDivide(y, 4) + (JAN_1_1_JULIAN_DAY - 3); isLeap = isLeap && ((inp_year%100 != 0) (inp_year%400 == 0)); julianDay += CalendarImpl.floorDivide(y, 400) - Calendar...
/** * Calculate the number of Julian days since Jan 1, year 1 as * represented by the <code>year</code>, <code>month</code>, * and <code>day</code>. * * @param inp_year The Gegorian year * @param inp_month The month * @param inp_day The day of the month <code>month</code> * @...
Calculate the number of Julian days since Jan 1, year 1 as represented by the <code>year</code>, <code>month</code>, and <code>day</code>
computeJulianDay
{ "repo_name": "sics-sse/moped", "path": "squawk/imp/src/com/sun/midp/util/DateParser.java", "license": "gpl-2.0", "size": 27731 }
[ "com.sun.cldc.util.j2me.CalendarImpl" ]
import com.sun.cldc.util.j2me.CalendarImpl;
import com.sun.cldc.util.j2me.*;
[ "com.sun.cldc" ]
com.sun.cldc;
1,100,038
public Locale getLocale();
Locale function();
/** * Get the java.util.Locale object representing this locale instance. * * @return the java.util.Locale object representing this locale instance. */
Get the java.util.Locale object representing this locale instance
getLocale
{ "repo_name": "roguexz/rogue.io", "path": "modules/i18n-model/src/main/java/rogue/app/framework/i18n/model/AppLocale.java", "license": "apache-2.0", "size": 1792 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,419,491
@Test public void isValidGroup() throws Exception { String group = "vmmgroup1"; Log.info(c, "isValidGroup", "Checking with a valid group"); assertTrue("Group validation should succeed.", servlet.isValidGroup(group)); }
void function() throws Exception { String group = STR; Log.info(c, STR, STR); assertTrue(STR, servlet.isValidGroup(group)); }
/** * Hit the test servlet to see if isValidGroup works with a valid group * This verifies the various required bundles got installed and are working. */
Hit the test servlet to see if isValidGroup works with a valid group This verifies the various required bundles got installed and are working
isValidGroup
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.security.wim.registry_fat/fat/src/com/ibm/ws/security/wim/registry/fat/DefaultWIMRealmTest.java", "license": "epl-1.0", "size": 31151 }
[ "com.ibm.websphere.simplicity.log.Log", "org.junit.Assert" ]
import com.ibm.websphere.simplicity.log.Log; import org.junit.Assert;
import com.ibm.websphere.simplicity.log.*; import org.junit.*;
[ "com.ibm.websphere", "org.junit" ]
com.ibm.websphere; org.junit;
2,222,174
public void testUnwrapXSDHelper() { assertTrue(SDOHelper.unwrap(xsdHelper, SDOXSDHelper.class) instanceof SDOXSDHelper); }
void function() { assertTrue(SDOHelper.unwrap(xsdHelper, SDOXSDHelper.class) instanceof SDOXSDHelper); }
/** * Also tests getXSDHelper method. */
Also tests getXSDHelper method
testUnwrapXSDHelper
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "sdo/eclipselink.sdo.test/src/org/eclipse/persistence/testing/sdo/helper/sdohelper/SDOHelperTestCases.java", "license": "epl-1.0", "size": 9476 }
[ "org.eclipse.persistence.sdo.SDOHelper", "org.eclipse.persistence.sdo.helper.SDOXSDHelper" ]
import org.eclipse.persistence.sdo.SDOHelper; import org.eclipse.persistence.sdo.helper.SDOXSDHelper;
import org.eclipse.persistence.sdo.*; import org.eclipse.persistence.sdo.helper.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,641
private ServerBootstrap createServerBootStrap() { if (floodlightProvider.getWorkerThreads() == 0) { return new ServerBootstrap( new NioServerSocketChannelFactory( Executors.newCachedThreadPool(), Executors.newCachedThreadPool())); } else { return new ServerBootstrap( new NioServerSo...
ServerBootstrap function() { if (floodlightProvider.getWorkerThreads() == 0) { return new ServerBootstrap( new NioServerSocketChannelFactory( Executors.newCachedThreadPool(), Executors.newCachedThreadPool())); } else { return new ServerBootstrap( new NioServerSocketChannelFactory( Executors.newCachedThreadPool(), Execu...
/** * Helper that bootstrapNetty. * @return */
Helper that bootstrapNetty
createServerBootStrap
{ "repo_name": "smartnetworks/floodlight", "path": "src/main/java/net/floodlightcontroller/core/internal/OFSwitchManager.java", "license": "apache-2.0", "size": 42213 }
[ "java.util.concurrent.Executors", "org.jboss.netty.bootstrap.ServerBootstrap", "org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory" ]
import java.util.concurrent.Executors; import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
import java.util.concurrent.*; import org.jboss.netty.bootstrap.*; import org.jboss.netty.channel.socket.nio.*;
[ "java.util", "org.jboss.netty" ]
java.util; org.jboss.netty;
1,017,632
public int getNumSubResults(); /** * Expert: Set a new value for this result node. * <p> * Allows to modify the value of this facet node. * Used for example to tune a sampled value, e.g. by * {@link SampleFixer#fixResult(org.apache.lucene.facet.search.ScoredDocIDs, FacetResult)}
int function(); /** * Expert: Set a new value for this result node. * <p> * Allows to modify the value of this facet node. * Used for example to tune a sampled value, e.g. by * {@link SampleFixer#fixResult(org.apache.lucene.facet.search.ScoredDocIDs, FacetResult)}
/** * Number of sub results */
Number of sub results
getNumSubResults
{ "repo_name": "terrancesnyder/solr-analytics", "path": "lucene/facet/src/java/org/apache/lucene/facet/search/results/FacetResultNode.java", "license": "apache-2.0", "size": 3975 }
[ "org.apache.lucene.facet.search.sampling.SampleFixer" ]
import org.apache.lucene.facet.search.sampling.SampleFixer;
import org.apache.lucene.facet.search.sampling.*;
[ "org.apache.lucene" ]
org.apache.lucene;
803,100
public static String Build(MusicTrack musicTrack, String patter) { String path = ""; int pos = 0; // While there is an open tag while (patter.indexOf('{', pos) >= 0) { // Gets the start and the end of the tag int posStart = patter.indexOf('{', pos...
static String function(MusicTrack musicTrack, String patter) { String path = STRSTRalbum-artistSTRalbumSTRplaylistSTRgroupSTRartistSTRtitleSTRdiscSTRnoSTRgroup-noSTRyearSTRgenreSTRMusicPathBuilderSTRUnknown tag 'STR'STR0STRMusicPathBuilderSTRCloud not find replace symbol ('$') of format attribute in tag 'STR'STR{STRMus...
/** * Generates a path from a user defined patter * @param musicTrack The music track data * @param patter The patter * @return Returns the file path */
Generates a path from a user defined patter
Build
{ "repo_name": "jcgruenhage/PlayMusicExporter", "path": "playmusicexporter/src/main/java/re/jcg/playmusicexporter/utils/MusicPathBuilder.java", "license": "mit", "size": 7705 }
[ "de.arcus.playmusiclib.items.MusicTrack" ]
import de.arcus.playmusiclib.items.MusicTrack;
import de.arcus.playmusiclib.items.*;
[ "de.arcus.playmusiclib" ]
de.arcus.playmusiclib;
2,889,044
public static void pushAttributeAsRenderingProperty( UIXRenderingContext context, UINode node, AttributeKey attrKey) { Object value = node.getAttributeValue(context, attrKey); pushRenderingProperty(context, attrKey, value); }
static void function( UIXRenderingContext context, UINode node, AttributeKey attrKey) { Object value = node.getAttributeValue(context, attrKey); pushRenderingProperty(context, attrKey, value); }
/** * Pushes the attribute value into the rendering context property, * storing the old value as a local property to be restored later. * * @see #pushRenderingProperty * @see #popRenderingProperty */
Pushes the attribute value into the rendering context property, storing the old value as a local property to be restored later
pushAttributeAsRenderingProperty
{ "repo_name": "adamrduffy/trinidad-1.0.x", "path": "trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/BaseLafUtils.java", "license": "apache-2.0", "size": 32751 }
[ "org.apache.myfaces.trinidadinternal.ui.AttributeKey", "org.apache.myfaces.trinidadinternal.ui.UINode", "org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext" ]
import org.apache.myfaces.trinidadinternal.ui.AttributeKey; import org.apache.myfaces.trinidadinternal.ui.UINode; import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
import org.apache.myfaces.trinidadinternal.ui.*;
[ "org.apache.myfaces" ]
org.apache.myfaces;
1,634,286
public IssueAssert hasMessage(final String message) { isNotNull(); if (!Objects.equals(actual.getMessage(), message)) { failWithMessage(EXPECTED_BUT_WAS_MESSAGE, "message", actual, message, actual.getMessage()); } return this; }
IssueAssert function(final String message) { isNotNull(); if (!Objects.equals(actual.getMessage(), message)) { failWithMessage(EXPECTED_BUT_WAS_MESSAGE, STR, actual, message, actual.getMessage()); } return this; }
/** * Checks whether an Issue has a specific message. * * @param message * String specifying message. * * @return this */
Checks whether an Issue has a specific message
hasMessage
{ "repo_name": "mschmidae/analysis-model", "path": "src/test/java/edu/hm/hafner/analysis/assertj/IssueAssert.java", "license": "mit", "size": 9092 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
644,125
public static OutputStream replaceCertificatesAndCRLs( InputStream original, Store certs, Store crls, Store attrCerts, OutputStream out) throws CMSException, IOException { ASN1StreamParser in = new ASN1StreamParser(original); ...
static OutputStream function( InputStream original, Store certs, Store crls, Store attrCerts, OutputStream out) throws CMSException, IOException { ASN1StreamParser in = new ASN1StreamParser(original); ContentInfoParser contentInfo = new ContentInfoParser((ASN1SequenceParser)in.readObject()); SignedDataParser signedData...
/** * Replace the certificate and CRL information associated with this * CMSSignedData object with the new one passed in. * <p> * The output stream is returned unclosed. * </p> * @param original the signed data stream to be used as a base. * @param certs new certificates to be used, i...
Replace the certificate and CRL information associated with this CMSSignedData object with the new one passed in. The output stream is returned unclosed.
replaceCertificatesAndCRLs
{ "repo_name": "ttt43ttt/gwt-crypto", "path": "src/main/java/org/bouncycastle/cms/CMSSignedDataParser.java", "license": "apache-2.0", "size": 22260 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.util.ArrayList", "java.util.List", "org.bouncycastle.asn1.ASN1SequenceParser", "org.bouncycastle.asn1.ASN1Set", "org.bouncycastle.asn1.ASN1StreamParser", "org.bouncycastle.asn1.BERSequenceGenerator", "org.bouncycastle.asn1...
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import org.bouncycastle.asn1.ASN1SequenceParser; import org.bouncycastle.asn1.ASN1Set; import org.bouncycastle.asn1.ASN1StreamParser; import org.bouncycastle.asn1.BERSequenceGenerator;...
import java.io.*; import java.util.*; import org.bouncycastle.asn1.*; import org.bouncycastle.asn1.cms.*; import org.bouncycastle.util.*;
[ "java.io", "java.util", "org.bouncycastle.asn1", "org.bouncycastle.util" ]
java.io; java.util; org.bouncycastle.asn1; org.bouncycastle.util;
2,757,897
@Override public OutputStream getOutputStream() throws java.io.IOException, SecurityException { throw new IOException( "Output not supported"); }
OutputStream function() throws java.io.IOException, SecurityException { throw new IOException( STR); }
/** * Returns an output stream to the resource */
Returns an output stream to the resource
getOutputStream
{ "repo_name": "whiteley/jetty8", "path": "jetty-util/src/main/java/org/eclipse/jetty/util/resource/URLResource.java", "license": "apache-2.0", "size": 8626 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
129,269
public static OnlineManagementClient createSslClient(SslOptions sslOptions) throws IOException { return ManagementClient.onlineLazy(OnlineOptions.standalone().hostAndPort("localhost", 9993).ssl(sslOptions) .protocol(ManagementProtocol.HTTPS_REMOTING).build()); }
static OnlineManagementClient function(SslOptions sslOptions) throws IOException { return ManagementClient.onlineLazy(OnlineOptions.standalone().hostAndPort(STR, 9993).ssl(sslOptions) .protocol(ManagementProtocol.HTTPS_REMOTING).build()); }
/** * Creates standalone {@link OnlineManagementClient} for comunication with SSL-secured management */
Creates standalone <code>OnlineManagementClient</code> for comunication with SSL-secured management
createSslClient
{ "repo_name": "hpehl/testsuite.next", "path": "tooling-ssl-operations/src/main/java/org/jboss/hal/testsuite/tooling/ssl/SslOperations.java", "license": "apache-2.0", "size": 6828 }
[ "java.io.IOException", "org.wildfly.extras.creaper.core.ManagementClient", "org.wildfly.extras.creaper.core.online.ManagementProtocol", "org.wildfly.extras.creaper.core.online.OnlineManagementClient", "org.wildfly.extras.creaper.core.online.OnlineOptions", "org.wildfly.extras.creaper.core.online.SslOption...
import java.io.IOException; import org.wildfly.extras.creaper.core.ManagementClient; import org.wildfly.extras.creaper.core.online.ManagementProtocol; import org.wildfly.extras.creaper.core.online.OnlineManagementClient; import org.wildfly.extras.creaper.core.online.OnlineOptions; import org.wildfly.extras.creaper.core...
import java.io.*; import org.wildfly.extras.creaper.core.*; import org.wildfly.extras.creaper.core.online.*;
[ "java.io", "org.wildfly.extras" ]
java.io; org.wildfly.extras;
2,062,193
public SystemData systemData() { return this.systemData; }
SystemData function() { return this.systemData; }
/** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */
Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information
systemData
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/maintenance/azure-resourcemanager-maintenance/src/main/java/com/azure/resourcemanager/maintenance/fluent/models/ConfigurationAssignmentInner.java", "license": "mit", "size": 3620 }
[ "com.azure.core.management.SystemData" ]
import com.azure.core.management.SystemData;
import com.azure.core.management.*;
[ "com.azure.core" ]
com.azure.core;
632,948
@Deprecated public static ISession login(String userName, String password, @SuppressWarnings("unused") String locale, String currentSessionId) throws CoreException { return Core.login(userName, password, currentSessionId); }
static ISession function(String userName, String password, @SuppressWarnings(STR) String locale, String currentSessionId) throws CoreException { return Core.login(userName, password, currentSessionId); }
/** * Login user with the given parameters. * @param userName the user name. * @param password the password. * @param locale the locale. * @param currentSessionId current session UUID. * @return the created session if login is successful. */
Login user with the given parameters
login
{ "repo_name": "mendix/circle-diagram-widget", "path": "test/javasource/com/mendix/core/Core.java", "license": "apache-2.0", "size": 76608 }
[ "com.mendix.systemwideinterfaces.core.ISession" ]
import com.mendix.systemwideinterfaces.core.ISession;
import com.mendix.systemwideinterfaces.core.*;
[ "com.mendix.systemwideinterfaces" ]
com.mendix.systemwideinterfaces;
1,494,606
private BButton getBtnDown() { if (btnDown == null) { btnDown = new BButton(); btnDown.setText("Down"); btnDown.setPreferredSize(new Dimension(75, 29)); } return btnDown; }
BButton function() { if (btnDown == null) { btnDown = new BButton(); btnDown.setText("Down"); btnDown.setPreferredSize(new Dimension(75, 29)); } return btnDown; }
/** * This method initializes btnDown * * @return org.kbinani.windows.forms.BButton */
This method initializes btnDown
getBtnDown
{ "repo_name": "Icenowy/jcadencii", "path": "cadencii/org/kbinani/cadencii/FormWordDictionaryUiImpl.java", "license": "gpl-3.0", "size": 11811 }
[ "java.awt.Dimension", "org.kbinani.windows.forms.BButton" ]
import java.awt.Dimension; import org.kbinani.windows.forms.BButton;
import java.awt.*; import org.kbinani.windows.forms.*;
[ "java.awt", "org.kbinani.windows" ]
java.awt; org.kbinani.windows;
2,764,661
public void addCatalog(File catalogFile) throws IOException { URI newUri = catalogFile.toURI(); if (!catalogUrls.contains(newUri)) { catalogUrls.add(newUri); } entityResolver = CatalogUtil.getCatalog(entityResolver, catalogFile, catalogUrls); }
void function(File catalogFile) throws IOException { URI newUri = catalogFile.toURI(); if (!catalogUrls.contains(newUri)) { catalogUrls.add(newUri); } entityResolver = CatalogUtil.getCatalog(entityResolver, catalogFile, catalogUrls); }
/** * Adds a new catalog file.Use created or existed resolver to parse new catalog file. * * @param catalogFile * @throws java.io.IOException */
Adds a new catalog file.Use created or existed resolver to parse new catalog file
addCatalog
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jaxws/src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/Options.java", "license": "gpl-2.0", "size": 35039 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
815,643
public void addActionListener(ActionListener l) { listenerList.add(ActionListener.class, l); }
void function(ActionListener l) { listenerList.add(ActionListener.class, l); }
/** * Adds an <code>ActionListener</code> to the file chooser. * @param l the listener to be added * @see #approveSelection * @see #cancelSelection */
Adds an <code>ActionListener</code> to the file chooser
addActionListener
{ "repo_name": "fracpete/vfsjfilechooser2", "path": "src/main/java/com/googlecode/vfsjfilechooser2/VFSJFileChooser.java", "license": "apache-2.0", "size": 73550 }
[ "java.awt.event.ActionListener" ]
import java.awt.event.ActionListener;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
752,046
@Test public void getDiffWithInferredAncestors_fileWithUnknownDirsAdded_returnsFileAndDirs() throws Exception { scratch.file("a/b/c/d"); ImmutableDiff diff = FileSystemValueCheckerInferringAncestors.getDiffWithInferredAncestors( null, ImmutableMap.of( ...
void function() throws Exception { scratch.file(STR); ImmutableDiff diff = FileSystemValueCheckerInferringAncestors.getDiffWithInferredAncestors( null, ImmutableMap.of( fileStateValueKey(STR"), fileStateValueKey(STR), NONEXISTENT_FILE_STATE_NODE), ImmutableMap.of(), ImmutableSet.of(fileStateValueKey(STR)), fsvcThreads)...
/** * This is a degenerate case since we normally only know about a file if we checked all parents, * but that is theoretically possible with this API. */
This is a degenerate case since we normally only know about a file if we checked all parents, but that is theoretically possible with this API
getDiffWithInferredAncestors_fileWithUnknownDirsAdded_returnsFileAndDirs
{ "repo_name": "perezd/bazel", "path": "src/test/java/com/google/devtools/build/lib/skyframe/FileSystemValueCheckerInferringAncestorsTest.java", "license": "apache-2.0", "size": 29831 }
[ "com.google.common.collect.ImmutableMap", "com.google.common.collect.ImmutableSet", "com.google.common.truth.Truth", "com.google.common.truth.Truth8", "com.google.devtools.build.lib.testing.common.DirectoryListingHelper", "com.google.devtools.build.skyframe.ImmutableDiff" ]
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.truth.Truth; import com.google.common.truth.Truth8; import com.google.devtools.build.lib.testing.common.DirectoryListingHelper; import com.google.devtools.build.skyframe.ImmutableDiff;
import com.google.common.collect.*; import com.google.common.truth.*; import com.google.devtools.build.lib.testing.common.*; import com.google.devtools.build.skyframe.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
2,655,914
ControllerServiceEntity updateControllerService(Revision revision, ControllerServiceDTO controllerServiceDTO);
ControllerServiceEntity updateControllerService(Revision revision, ControllerServiceDTO controllerServiceDTO);
/** * Updates the specified controller service. * * @param revision Revision to compare with current base revision * @param controllerServiceDTO The controller service DTO * @return The controller service DTO */
Updates the specified controller service
updateControllerService
{ "repo_name": "zhengsg/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 73433 }
[ "org.apache.nifi.web.api.dto.ControllerServiceDTO", "org.apache.nifi.web.api.entity.ControllerServiceEntity" ]
import org.apache.nifi.web.api.dto.ControllerServiceDTO; import org.apache.nifi.web.api.entity.ControllerServiceEntity;
import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.entity.*;
[ "org.apache.nifi" ]
org.apache.nifi;
1,845,589
void enterInterfaceMethodDeclaration(@NotNull JavaParser.InterfaceMethodDeclarationContext ctx); void exitInterfaceMethodDeclaration(@NotNull JavaParser.InterfaceMethodDeclarationContext ctx);
void enterInterfaceMethodDeclaration(@NotNull JavaParser.InterfaceMethodDeclarationContext ctx); void exitInterfaceMethodDeclaration(@NotNull JavaParser.InterfaceMethodDeclarationContext ctx);
/** * Exit a parse tree produced by {@link JavaParser#interfaceMethodDeclaration}. * @param ctx the parse tree */
Exit a parse tree produced by <code>JavaParser#interfaceMethodDeclaration</code>
exitInterfaceMethodDeclaration
{ "repo_name": "zmughal/oop-analysis", "path": "src/generated-sources/JavaListener.java", "license": "apache-2.0", "size": 38949 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
798,818
public static ByteBuf copiedBuffer(ByteBuffer... buffers) { switch (buffers.length) { case 0: return EMPTY_BUFFER; case 1: return copiedBuffer(buffers[0]); } // Merge the specified buffers into one buffer. ByteOrder order = null; int l...
static ByteBuf function(ByteBuffer... buffers) { switch (buffers.length) { case 0: return EMPTY_BUFFER; case 1: return copiedBuffer(buffers[0]); } ByteOrder order = null; int length = 0; for (ByteBuffer b: buffers) { int bLen = b.remaining(); if (bLen <= 0) { continue; } if (Integer.MAX_VALUE - length < bLen) { throw n...
/** * Creates a new buffer whose content is a merged copy of the specified * {@code buffers}' slices. The new buffer's {@code readerIndex} and * {@code writerIndex} are {@code 0} and the sum of all buffers' * {@code remaining} respectively. * * @throws IllegalArgumentException * ...
Creates a new buffer whose content is a merged copy of the specified buffers' slices. The new buffer's readerIndex and writerIndex are 0 and the sum of all buffers' remaining respectively
copiedBuffer
{ "repo_name": "yipen9/netty", "path": "buffer/src/main/java/io/netty/buffer/Unpooled.java", "license": "apache-2.0", "size": 31114 }
[ "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
427,341
void removeMonitor(IConnectionMonitor monitor);
void removeMonitor(IConnectionMonitor monitor);
/** * Removes the specified connection monitor from this session. * * @param monitor * the monitor to remove. */
Removes the specified connection monitor from this session
removeMonitor
{ "repo_name": "ControlSystemStudio/org.csstudio.iter", "path": "plugins/org.csstudio.iter.utility.jms/src/org/csstudio/iter/utility/jms/sharedconnection/IMessageListenerSession.java", "license": "epl-1.0", "size": 2823 }
[ "org.csstudio.iter.utility.jms.IConnectionMonitor" ]
import org.csstudio.iter.utility.jms.IConnectionMonitor;
import org.csstudio.iter.utility.jms.*;
[ "org.csstudio.iter" ]
org.csstudio.iter;
1,900,125