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
void remoteDelete(String name) throws GitException;
void remoteDelete(String name) throws GitException;
/** * Remove the remote named <code>name</code>. All remote tracking branches and configuration * settings for the remote are removed. * * @param name remote configuration to remove * @throws GitException if any error occurs */
Remove the remote named <code>name</code>. All remote tracking branches and configuration settings for the remote are removed
remoteDelete
{ "repo_name": "sudaraka94/che", "path": "wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConnection.java", "license": "epl-1.0", "size": 12601 }
[ "org.eclipse.che.api.git.exception.GitException" ]
import org.eclipse.che.api.git.exception.GitException;
import org.eclipse.che.api.git.exception.*;
[ "org.eclipse.che" ]
org.eclipse.che;
2,249,349
private void analyzeAlterTableAddParts(String[] qualified, CommonTree ast, boolean expectView) throws SemanticException { // ^(TOK_ALTERTABLE_ADDPARTS identifier ifNotExists? alterStatementSuffixAddPartitionsElement+) boolean ifNotExists = ast.getChild(0).getType() == HiveParser.TOK_IFNOTEXISTS; T...
void function(String[] qualified, CommonTree ast, boolean expectView) throws SemanticException { boolean ifNotExists = ast.getChild(0).getType() == HiveParser.TOK_IFNOTEXISTS; Table tab = getTable(qualified); boolean isView = tab.isView(); validateAlterTableType(tab, AlterTableTypes.ADDPARTITION, expectView); outputs.a...
/** * Add one or more partitions to a table. Useful when the data has been copied * to the right location by some other process. * * @param ast * The parsed command tree. * * @param expectView * True for ALTER VIEW, false for ALTER TABLE. * * @throws SemanticException ...
Add one or more partitions to a table. Useful when the data has been copied to the right location by some other process
analyzeAlterTableAddParts
{ "repo_name": "cschenyuan/hive-hack", "path": "ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java", "license": "apache-2.0", "size": 137225 }
[ "java.util.Map", "org.antlr.runtime.tree.CommonTree", "org.apache.hadoop.hive.ql.Driver", "org.apache.hadoop.hive.ql.ErrorMsg", "org.apache.hadoop.hive.ql.exec.TaskFactory", "org.apache.hadoop.hive.ql.hooks.WriteEntity", "org.apache.hadoop.hive.ql.metadata.HiveUtils", "org.apache.hadoop.hive.ql.metada...
import java.util.Map; import org.antlr.runtime.tree.CommonTree; import org.apache.hadoop.hive.ql.Driver; import org.apache.hadoop.hive.ql.ErrorMsg; import org.apache.hadoop.hive.ql.exec.TaskFactory; import org.apache.hadoop.hive.ql.hooks.WriteEntity; import org.apache.hadoop.hive.ql.metadata.HiveUtils; import org.apach...
import java.util.*; import org.antlr.runtime.tree.*; import org.apache.hadoop.hive.ql.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.hooks.*; import org.apache.hadoop.hive.ql.metadata.*; import org.apache.hadoop.hive.ql.plan.*;
[ "java.util", "org.antlr.runtime", "org.apache.hadoop" ]
java.util; org.antlr.runtime; org.apache.hadoop;
2,644,845
public void checkTokens(KickstartActivationKeysCommand command, ArrayList tokensAdd, ArrayList tokensRemove, int expectedCount) { if (tokensAdd != null) { command.addTokensByIds(tokensAdd); } if (tokensRemove != null) { command.removeTok...
void function(KickstartActivationKeysCommand command, ArrayList tokensAdd, ArrayList tokensRemove, int expectedCount) { if (tokensAdd != null) { command.addTokensByIds(tokensAdd); } if (tokensRemove != null) { command.removeTokensByIds(tokensRemove); } command.store(); KickstartData ks = KickstartFactory.lookupKickstar...
/** * Adds and removes tokens, then saves the kickstart profile, * loads it again, and compares what comes out with the 'expected' * value. * * @param command The KickstartActivationKeysCommand with the ksdata inside it. * @param tokensAdd The tokens to add to the kickstart profile. (can b...
Adds and removes tokens, then saves the kickstart profile, loads it again, and compares what comes out with the 'expected' value
checkTokens
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/kickstart/test/KickstartActivationKeysTest.java", "license": "gpl-2.0", "size": 5793 }
[ "com.redhat.rhn.domain.kickstart.KickstartData", "com.redhat.rhn.domain.kickstart.KickstartFactory", "com.redhat.rhn.manager.kickstart.KickstartActivationKeysCommand", "java.util.ArrayList" ]
import com.redhat.rhn.domain.kickstart.KickstartData; import com.redhat.rhn.domain.kickstart.KickstartFactory; import com.redhat.rhn.manager.kickstart.KickstartActivationKeysCommand; import java.util.ArrayList;
import com.redhat.rhn.domain.kickstart.*; import com.redhat.rhn.manager.kickstart.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
2,381,836
public Exception getDatabaseException () { return m_dbException; } // getConnectionException private InitialContext m_iContext = null; private Hashtable m_env = null;
Exception function () { return m_dbException; } private InitialContext m_iContext = null; private Hashtable m_env = null;
/** * Get Database Exception of last connection attempt * @return Exception or null */
Get Database Exception of last connection attempt
getDatabaseException
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/db/CConnection.java", "license": "gpl-2.0", "size": 43587 }
[ "java.util.Hashtable", "javax.naming.InitialContext" ]
import java.util.Hashtable; import javax.naming.InitialContext;
import java.util.*; import javax.naming.*;
[ "java.util", "javax.naming" ]
java.util; javax.naming;
1,751,427
public Baz fetchByUuid_Last( String uuid, com.liferay.portal.kernel.util.OrderByComparator<Baz> orderByComparator);
Baz function( String uuid, com.liferay.portal.kernel.util.OrderByComparator<Baz> orderByComparator);
/** * Returns the last baz in the ordered set where uuid = &#63;. * * @param uuid the uuid * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching baz, or <code>null</code> if a matching baz could not be found */
Returns the last baz in the ordered set where uuid = &#63;
fetchByUuid_Last
{ "repo_name": "gamerson/liferay-blade-samples", "path": "maven/apps/workflow/basic/basic-api/src/main/java/com/liferay/blade/workflow/basic/service/persistence/BazPersistence.java", "license": "apache-2.0", "size": 24217 }
[ "com.liferay.blade.workflow.basic.model.Baz" ]
import com.liferay.blade.workflow.basic.model.Baz;
import com.liferay.blade.workflow.basic.model.*;
[ "com.liferay.blade" ]
com.liferay.blade;
2,802,543
public RespuestaEntity actualizaProveedor(ProveedoresEntity entidad){ RespuestaEntity entity = new RespuestaEntity(); try { this.initOperation(); sesion.update(entidad); entity.setCodigoRespuesta(1); entity.setDescripcionRespuesta("EXITOSO"); ...
RespuestaEntity function(ProveedoresEntity entidad){ RespuestaEntity entity = new RespuestaEntity(); try { this.initOperation(); sesion.update(entidad); entity.setCodigoRespuesta(1); entity.setDescripcionRespuesta(STR); entity.setMensajeRespuesta("OK"); } catch (Exception e) { entity.setCodigoRespuesta(0); entity.setDe...
/** * metodo que actualiza un proveedor * @param entidad * @return */
metodo que actualiza un proveedor
actualizaProveedor
{ "repo_name": "codesoftware/SIGEMCOWS", "path": "src/java/co/com/codesoftware/logic/ProveedoresLogic.java", "license": "apache-2.0", "size": 4301 }
[ "co.com.codesoftware.persistence.entity.administracion.ProveedoresEntity", "co.com.codesoftware.persistence.entity.administracion.RespuestaEntity" ]
import co.com.codesoftware.persistence.entity.administracion.ProveedoresEntity; import co.com.codesoftware.persistence.entity.administracion.RespuestaEntity;
import co.com.codesoftware.persistence.entity.administracion.*;
[ "co.com.codesoftware" ]
co.com.codesoftware;
1,516,280
@Test public void getName() throws Exception { assertNull(Util.getName(null)); assertNull(Util.getName(new AppId(null))); assertNull(Util.getName(new AppId(""))); assertEquals(" ", Util.getName(new AppId(" "))); assertEquals("any", Util.getName(new AppId("any"))); ...
void function() throws Exception { assertNull(Util.getName(null)); assertNull(Util.getName(new AppId(null))); assertNull(Util.getName(new AppId(STR STR STRanySTRanySTR STR ", STR STR STR STRxSTRx", STRxSTRxSTR STRxSTRxSTRySTR x STR x STR y STRMyAppSTRMyAppSTR2.0.0"))); }
/** * Tests {@link Util#getName(org.marketcetera.util.ws.tags.AppId)}. * * @throws Exception if there were unexpected errors. */
Tests <code>Util#getName(org.marketcetera.util.ws.tags.AppId)</code>
getName
{ "repo_name": "nagyist/marketcetera", "path": "trunk/core/src/test/java/org/marketcetera/core/UtilTest.java", "license": "apache-2.0", "size": 13590 }
[ "org.junit.Assert", "org.marketcetera.util.ws.tags.AppId" ]
import org.junit.Assert; import org.marketcetera.util.ws.tags.AppId;
import org.junit.*; import org.marketcetera.util.ws.tags.*;
[ "org.junit", "org.marketcetera.util" ]
org.junit; org.marketcetera.util;
1,271,822
public void assertContainsOnly(Description description, Object[] actual, Object[] values) { arrays.assertContainsOnly(description, actual, values); }
void function(Description description, Object[] actual, Object[] values) { arrays.assertContainsOnly(description, actual, values); }
/** * Asserts that the given array contains only the given values and nothing else, in any order. * * @param description contains information about the assertion. * @param actual the given array. * @param values the values that are expected to be in the given array. * @throws NullPointerExceptio...
Asserts that the given array contains only the given values and nothing else, in any order
assertContainsOnly
{ "repo_name": "alexruiz/fest-assert-2.x", "path": "src/main/java/org/fest/assertions/internal/ObjectArrays.java", "license": "apache-2.0", "size": 11669 }
[ "org.fest.assertions.description.Description" ]
import org.fest.assertions.description.Description;
import org.fest.assertions.description.*;
[ "org.fest.assertions" ]
org.fest.assertions;
2,190,302
public void setTarget(String task) { target = task; criteria = new Vector<ReportParseCriteria>(); }
void function(String task) { target = task; criteria = new Vector<ReportParseCriteria>(); }
/** * Set the target that must be parsed. * * @param task Name of the task to parse */
Set the target that must be parsed
setTarget
{ "repo_name": "ModelN/build-management", "path": "mn-build-ant/src/main/java/com/modeln/build/ant/report/ReportParseTarget.java", "license": "mit", "size": 9683 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,256,161
public static HashMap<String, String> buildAcRankingUrl(String channelIds, String pageNo) { HashMap<String, String> map = buildBaseMap(); map.put(AcString.CHANNEL_IDS, channelIds); map.put(AcString.PAGE_SIZE, AcString.PAGE_SIZE_NUM_20); map.put(AcString.PAGE_NO, pageNo); retu...
static HashMap<String, String> function(String channelIds, String pageNo) { HashMap<String, String> map = buildBaseMap(); map.put(AcString.CHANNEL_IDS, channelIds); map.put(AcString.PAGE_SIZE, AcString.PAGE_SIZE_NUM_20); map.put(AcString.PAGE_NO, pageNo); return map; }
/** * http://api.acfun.tv/apiserver/ * content/rank * ?pageSize=20&pageNo=1 * &channelIds=96,97,98,99,100,93,94,95,101,102,103,104,105,86,87,88,89,121,106,107,108,109,67,120,90,91,92,122,83,84,85,82 * &app_version=118&sys_name=android&sys_version=5.1.1&market=m360&resolution=1080x1776 * ...
HREF content/rank ?pageSize=20&pageNo=1 &channelIds=96,97,98,99,100,93,94,95,101,102,103,104,105,86,87,88,89,121,106,107,108,109,67,120,90,91,92,122,83,84,85,82 &app_version=118&sys_name=android&sys_version=5.1.1&market=m360&resolution=1080x1776
buildAcRankingUrl
{ "repo_name": "succlz123/BlueTube", "path": "app/src/main/java/org/succlz123/blueboard/model/api/acfun/AcApi.java", "license": "apache-2.0", "size": 11398 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,964,541
void write(OutputStream outputStream) throws IOException; } private static class InputStreamEntryWriter implements EntryWriter { private final InputStream inputStream; InputStreamEntryWriter(InputStream inputStream) { this.inputStream = inputStream; }
void write(OutputStream outputStream) throws IOException; } private static class InputStreamEntryWriter implements EntryWriter { private final InputStream inputStream; InputStreamEntryWriter(InputStream inputStream) { this.inputStream = inputStream; }
/** * Write entry data to the specified output stream. * @param outputStream the destination for the data * @throws IOException in case of I/O errors */
Write entry data to the specified output stream
write
{ "repo_name": "tiarebalbi/spring-boot", "path": "spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java", "license": "apache-2.0", "size": 15106 }
[ "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,839,709
ModuleDescriptor newModuleDescriptor(ModuleDescriptor md, Set<String> pkgs);
ModuleDescriptor newModuleDescriptor(ModuleDescriptor md, Set<String> pkgs);
/** * Clones the given module descriptor with an augmented set of packages */
Clones the given module descriptor with an augmented set of packages
newModuleDescriptor
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java", "license": "gpl-2.0", "size": 4742 }
[ "java.lang.module.ModuleDescriptor", "java.util.Set" ]
import java.lang.module.ModuleDescriptor; import java.util.Set;
import java.lang.module.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,142,701
private void accumulate(Mutation mutation) { //noinspection unchecked List<Mutation> mutations = (List<Mutation>)storeSes.properties().get(TRANSACTION_BUFFER); if (mutations == null) { mutations = new LinkedList<>(); storeSes.properties().put(TRANSACTION_BUFFER, muta...
void function(Mutation mutation) { List<Mutation> mutations = (List<Mutation>)storeSes.properties().get(TRANSACTION_BUFFER); if (mutations == null) { mutations = new LinkedList<>(); storeSes.properties().put(TRANSACTION_BUFFER, mutations); } mutations.add(mutation); }
/** * Accumulates mutation in the transaction buffer. * * @param mutation Mutation operation. */
Accumulates mutation in the transaction buffer
accumulate
{ "repo_name": "rfqu/ignite", "path": "modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/CassandraCacheStore.java", "license": "apache-2.0", "size": 18963 }
[ "java.util.LinkedList", "java.util.List", "org.apache.ignite.cache.store.cassandra.session.transaction.Mutation" ]
import java.util.LinkedList; import java.util.List; import org.apache.ignite.cache.store.cassandra.session.transaction.Mutation;
import java.util.*; import org.apache.ignite.cache.store.cassandra.session.transaction.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
800,810
protected boolean multipleInstall(InstallData installData) { boolean result; try { String path = registryHelper.getInstallationPath(); if (path == null) { path = "<not found>"; } Messages messages = installData.g...
boolean function(InstallData installData) { boolean result; try { String path = registryHelper.getInstallationPath(); if (path == null) { path = STR; } Messages messages = installData.getMessages(); String message = messages.get(STR) + path + "\n" + messages.get(STR); result = prompt.confirm(ERROR, message, YES_NO) == ...
/** * Invoked if the product is already installed. * <p/> * This prompts the user whether to install twice or quit. * * @param installData the installation data * @return <tt>true</tt> to install again, <tt>false</tt> to quit */
Invoked if the product is already installed. This prompts the user whether to install twice or quit
multipleInstall
{ "repo_name": "mtjandra/izpack", "path": "izpack-panel/src/main/java/com/izforge/izpack/panels/checkedhello/CheckedHelloConsolePanel.java", "license": "apache-2.0", "size": 4917 }
[ "com.izforge.izpack.api.data.InstallData", "com.izforge.izpack.api.exception.NativeLibException", "com.izforge.izpack.api.resource.Messages" ]
import com.izforge.izpack.api.data.InstallData; import com.izforge.izpack.api.exception.NativeLibException; import com.izforge.izpack.api.resource.Messages;
import com.izforge.izpack.api.data.*; import com.izforge.izpack.api.exception.*; import com.izforge.izpack.api.resource.*;
[ "com.izforge.izpack" ]
com.izforge.izpack;
980,285
public synchronized void modify(Long startValue, Long minValue, Long maxValue, Long increment) { if (startValue == null) { startValue = this.value; } if (minValue == null) { minValue = this.minValue; } if (maxValue == null) { ma...
synchronized void function(Long startValue, Long minValue, Long maxValue, Long increment) { if (startValue == null) { startValue = this.value; } if (minValue == null) { minValue = this.minValue; } if (maxValue == null) { maxValue = this.maxValue; } if (increment == null) { increment = this.increment; } if (!isValid(sta...
/** * Allows the start value, increment, min value and max value to be updated * atomically, including atomic validation. Useful because setting these * attributes one after the other could otherwise result in an invalid * sequence state (e.g. min value > max value, start value < min value, * e...
Allows the start value, increment, min value and max value to be updated atomically, including atomic validation. Useful because setting these attributes one after the other could otherwise result in an invalid sequence state (e.g. min value > max value, start value < min value, etc)
modify
{ "repo_name": "miloszpiglas/h2mod", "path": "src/main/org/h2/schema/Sequence.java", "license": "mpl-2.0", "size": 11257 }
[ "org.h2.api.ErrorCode", "org.h2.message.DbException" ]
import org.h2.api.ErrorCode; import org.h2.message.DbException;
import org.h2.api.*; import org.h2.message.*;
[ "org.h2.api", "org.h2.message" ]
org.h2.api; org.h2.message;
1,544,954
private static Double readAmfDouble(ParsableByteArray data) { return Double.longBitsToDouble(data.readLong()); }
static Double function(ParsableByteArray data) { return Double.longBitsToDouble(data.readLong()); }
/** * Read a double number from an AMF encoded buffer. * * @param data The buffer from which to read. * @return The value read from the buffer. */
Read a double number from an AMF encoded buffer
readAmfDouble
{ "repo_name": "malizadehq/MyTelegram", "path": "TMessagesProj/src/main/java/org/telegram/messenger/exoplayer/extractor/flv/ScriptTagPayloadReader.java", "license": "gpl-2.0", "size": 6480 }
[ "org.telegram.messenger.exoplayer.util.ParsableByteArray" ]
import org.telegram.messenger.exoplayer.util.ParsableByteArray;
import org.telegram.messenger.exoplayer.util.*;
[ "org.telegram.messenger" ]
org.telegram.messenger;
130,085
private static boolean convergence( final Function fct, final int n, final double xn, final double xo, final double eps) { if (n >= NMAX) { double err = abs(xn - xo); if (abs(xn) > 1) { err /= abs(xn); } if (err > eps) { String msg = format(FMT, fct.toString(), xn, er...
static boolean function( final Function fct, final int n, final double xn, final double xo, final double eps) { if (n >= NMAX) { double err = abs(xn - xo); if (abs(xn) > 1) { err /= abs(xn); } if (err > eps) { String msg = format(FMT, fct.toString(), xn, err, eps, n); getLogger().warn(msg); if (throwing) { throw new Ar...
/** * Check for convergence. This is either the relative precision has been reached or the maximal * number of interval splits has been exceeded. * * @param fct the function just in use * @param n the current split counter * @param xn the new approximation * @param xo the old approximation * @pa...
Check for convergence. This is either the relative precision has been reached or the maximal number of interval splits has been exceeded
convergence
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-external/src/main/java/de/lab4inf/math/integration/Integrator.java", "license": "gpl-3.0", "size": 17199 }
[ "de.lab4inf.math.Function", "de.lab4inf.math.util.Accuracy", "java.lang.Math", "java.lang.String" ]
import de.lab4inf.math.Function; import de.lab4inf.math.util.Accuracy; import java.lang.Math; import java.lang.String;
import de.lab4inf.math.*; import de.lab4inf.math.util.*; import java.lang.*;
[ "de.lab4inf.math", "java.lang" ]
de.lab4inf.math; java.lang;
364,422
//------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF public static ConstantDoublesCurve.Meta meta() { return ConstantDoublesCurve.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(ConstantDoublesCurve.Meta.INSTANCE); }
static ConstantDoublesCurve.Meta function() { return ConstantDoublesCurve.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(ConstantDoublesCurve.Meta.INSTANCE); }
/** * The meta-bean for {@code ConstantDoublesCurve}. * @return the meta-bean, not null */
The meta-bean for ConstantDoublesCurve
meta
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/math/curve/ConstantDoublesCurve.java", "license": "apache-2.0", "size": 9055 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,056,355
public void setExchangeSource(ExchangeSource exchangeSource) { this._exchangeSource = exchangeSource; }
void function(ExchangeSource exchangeSource) { this._exchangeSource = exchangeSource; }
/** * Sets the exchange source. * @param exchangeSource the new value of the property */
Sets the exchange source
setExchangeSource
{ "repo_name": "McLeodMoores/starling", "path": "projects/financial/src/main/java/com/opengamma/financial/tool/ToolContext.java", "license": "apache-2.0", "size": 69098 }
[ "com.opengamma.core.exchange.ExchangeSource" ]
import com.opengamma.core.exchange.ExchangeSource;
import com.opengamma.core.exchange.*;
[ "com.opengamma.core" ]
com.opengamma.core;
74,874
public DownloadAdapter getAdapter(ConnectionInformation connectionInfo, String cacheHome) throws DownloadAdapterException { return null; }
DownloadAdapter function(ConnectionInformation connectionInfo, String cacheHome) throws DownloadAdapterException { return null; }
/** * Returns the instance of {@link DownloadAdapter} that is able to communicate via this protocol. * * @param connectionInfo * provides information about the connection for this adapter * @param cacheHome * represents an absolute path to the download cache folder ...
Returns the instance of <code>DownloadAdapter</code> that is able to communicate via this protocol
getAdapter
{ "repo_name": "psnc-dl/darceo", "path": "wrdz/wrdz-zmd/business/src/main/java/pl/psnc/synat/wrdz/zmd/download/DownloadAdapterFactory.java", "license": "gpl-3.0", "size": 3849 }
[ "pl.psnc.synat.wrdz.zmd.download.adapters.DownloadAdapter", "pl.psnc.synat.wrdz.zmd.exception.DownloadAdapterException" ]
import pl.psnc.synat.wrdz.zmd.download.adapters.DownloadAdapter; import pl.psnc.synat.wrdz.zmd.exception.DownloadAdapterException;
import pl.psnc.synat.wrdz.zmd.download.adapters.*; import pl.psnc.synat.wrdz.zmd.exception.*;
[ "pl.psnc.synat" ]
pl.psnc.synat;
1,656,622
public static void setContextMap(Map<String, String> contextMap) { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } mdcAdapter.setContextMap(contextMap); }
static void function(Map<String, String> contextMap) { if (mdcAdapter == null) { throw new IllegalStateException(STR + NULL_MDCA_URL); } mdcAdapter.setContextMap(contextMap); }
/** * Set the current thread's context map by first clearing any existing map and * then copying the map passed as parameter. The context map passed as * parameter must only contain keys and values of type String. * * @param contextMap * must contain only keys and values of...
Set the current thread's context map by first clearing any existing map and then copying the map passed as parameter. The context map passed as parameter must only contain keys and values of type String
setContextMap
{ "repo_name": "zhangyut/wolf", "path": "slf4j/slf4j-api/src/main/java/org/slf4j/MDC.java", "license": "bsd-3-clause", "size": 10404 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,555,751
@Override public void visit(BeginWithNode n) { Value v = c.getState().readRegister(n.getObjectRegister()); v = UnknownValueResolver.getRealValue(v, c.getState()); Set<ObjectLabel> objs = Conversion.toObjectLabels(n, v, c); if (objs.isEmpty() && !Options.get().isPropagateDeadFlow(...
void function(BeginWithNode n) { Value v = c.getState().readRegister(n.getObjectRegister()); v = UnknownValueResolver.getRealValue(v, c.getState()); Set<ObjectLabel> objs = Conversion.toObjectLabels(n, v, c); if (objs.isEmpty() && !Options.get().isPropagateDeadFlow()) { c.getState().setToBottom(); return; } if (filteri...
/** * 12.10 enter 'with' statement. */
12.10 enter 'with' statement
visit
{ "repo_name": "cs-au-dk/TAJS", "path": "src/dk/brics/tajs/analysis/js/NodeTransfer.java", "license": "apache-2.0", "size": 57579 }
[ "dk.brics.tajs.analysis.Conversion", "dk.brics.tajs.flowgraph.jsnodes.BeginWithNode", "dk.brics.tajs.lattice.ObjectLabel", "dk.brics.tajs.lattice.UnknownValueResolver", "dk.brics.tajs.lattice.Value", "dk.brics.tajs.options.Options", "java.util.Set" ]
import dk.brics.tajs.analysis.Conversion; import dk.brics.tajs.flowgraph.jsnodes.BeginWithNode; import dk.brics.tajs.lattice.ObjectLabel; import dk.brics.tajs.lattice.UnknownValueResolver; import dk.brics.tajs.lattice.Value; import dk.brics.tajs.options.Options; import java.util.Set;
import dk.brics.tajs.analysis.*; import dk.brics.tajs.flowgraph.jsnodes.*; import dk.brics.tajs.lattice.*; import dk.brics.tajs.options.*; import java.util.*;
[ "dk.brics.tajs", "java.util" ]
dk.brics.tajs; java.util;
636,496
public boolean hasUnresolvedPackages(final Bundle bundle) { if ( !this.unresolvedPackages.isEmpty() ) { final ExportedPackage[] pcks = this.pckAdmin.getExportedPackages(bundle); if ( pcks != null ) { for(final ExportedPackage pck : pcks ) { if ( th...
boolean function(final Bundle bundle) { if ( !this.unresolvedPackages.isEmpty() ) { final ExportedPackage[] pcks = this.pckAdmin.getExportedPackages(bundle); if ( pcks != null ) { for(final ExportedPackage pck : pcks ) { if ( this.unresolvedPackages.contains(pck.getName()) ) { return true; } } } } return false; }
/** * Check if an exported package from the bundle has not been * found during previous class loading attempts. * @param bundle The bundle to check * @return <code>true</code> if a package has not be found before */
Check if an exported package from the bundle has not been found during previous class loading attempts
hasUnresolvedPackages
{ "repo_name": "MRivas-XumaK/slingBuild", "path": "bundles/commons/classloader/src/main/java/org/apache/sling/commons/classloader/impl/DynamicClassLoaderManagerFactory.java", "license": "apache-2.0", "size": 4485 }
[ "org.osgi.framework.Bundle", "org.osgi.service.packageadmin.ExportedPackage" ]
import org.osgi.framework.Bundle; import org.osgi.service.packageadmin.ExportedPackage;
import org.osgi.framework.*; import org.osgi.service.packageadmin.*;
[ "org.osgi.framework", "org.osgi.service" ]
org.osgi.framework; org.osgi.service;
822,288
static public < T > T loadAttribute( final String filePath, final String object, final String attribute ) { final IHDF5Reader reader = HDF5Factory.openForReading( filePath ); final T t = loadAttribute( reader, object, attribute ); reader.close(); return t; }
static < T > T function( final String filePath, final String object, final String attribute ) { final IHDF5Reader reader = HDF5Factory.openForReading( filePath ); final T t = loadAttribute( reader, object, attribute ); reader.close(); return t; }
/** * Load an attribute from of an HDF5 object. * * @param lut * @param file * @param dataset * @param cellDimensions */
Load an attribute from of an HDF5 object
loadAttribute
{ "repo_name": "hanslovsky/bigcat", "path": "src/main/java/bdv/img/h5/H5Utils.java", "license": "gpl-2.0", "size": 51530 }
[ "ch.systemsx.cisd.hdf5.HDF5Factory", "ch.systemsx.cisd.hdf5.IHDF5Reader" ]
import ch.systemsx.cisd.hdf5.HDF5Factory; import ch.systemsx.cisd.hdf5.IHDF5Reader;
import ch.systemsx.cisd.hdf5.*;
[ "ch.systemsx.cisd" ]
ch.systemsx.cisd;
2,574,985
@Override public void setReference(Reference reference) { log.finest("setReference()"); this.reference = reference; }
void function(Reference reference) { log.finest(STR); this.reference = reference; }
/** * Set the Reference instance. * * @param reference A Reference instance */
Set the Reference instance
setReference
{ "repo_name": "ironjacamar/ironjacamar", "path": "validator/tests/src/test/java/org/jboss/jca/validator/rules/anno/AnnoConnectionFactoryImpl.java", "license": "lgpl-2.1", "size": 3119 }
[ "javax.naming.Reference" ]
import javax.naming.Reference;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
1,734,292
public List<CmsOrganizationalUnit> getManageableOrgUnits( CmsObject cms, String ouFqn, boolean includeSubOus, boolean includeWebusers) throws CmsException { List<CmsOrganizationalUnit> result = Lists.newArrayList(); List<CmsOrganizationalUnit> ous = getOrgUnitsForRol...
List<CmsOrganizationalUnit> function( CmsObject cms, String ouFqn, boolean includeSubOus, boolean includeWebusers) throws CmsException { List<CmsOrganizationalUnit> result = Lists.newArrayList(); List<CmsOrganizationalUnit> ous = getOrgUnitsForRole( cms, CmsRole.ACCOUNT_MANAGER.forOrgUnit(ouFqn), includeSubOus); for (C...
/** * Returns a list of those organizational units whose members can be managed by the current user.<p> * * @param cms the current CMS context * @param ouFqn the fully qualified name of the organizational unit * @param includeSubOus if sub organizational units should be included in the searc...
Returns a list of those organizational units whose members can be managed by the current user
getManageableOrgUnits
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/security/CmsRoleManager.java", "license": "lgpl-2.1", "size": 18883 }
[ "com.google.common.collect.Lists", "java.util.List", "org.opencms.file.CmsObject", "org.opencms.main.CmsException" ]
import com.google.common.collect.Lists; import java.util.List; import org.opencms.file.CmsObject; import org.opencms.main.CmsException;
import com.google.common.collect.*; import java.util.*; import org.opencms.file.*; import org.opencms.main.*;
[ "com.google.common", "java.util", "org.opencms.file", "org.opencms.main" ]
com.google.common; java.util; org.opencms.file; org.opencms.main;
741,534
BackoffPolicy buildBackoffPolicy() { return exponentialBackoff(mainRequest.getRetryBackoffInitialTime(), mainRequest.getMaxRetries()); }
BackoffPolicy buildBackoffPolicy() { return exponentialBackoff(mainRequest.getRetryBackoffInitialTime(), mainRequest.getMaxRetries()); }
/** * Get the backoff policy for use with retries. */
Get the backoff policy for use with retries
buildBackoffPolicy
{ "repo_name": "camilojd/elasticsearch", "path": "modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollAction.java", "license": "apache-2.0", "size": 21904 }
[ "org.elasticsearch.action.bulk.BackoffPolicy" ]
import org.elasticsearch.action.bulk.BackoffPolicy;
import org.elasticsearch.action.bulk.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
153,473
@Basic @Column(name = "DOCUMENT_STATUS_URL_XML") public String getDocumentStatusUrlXml() { return documentStatusUrlXml; }
@Column(name = STR) String function() { return documentStatusUrlXml; }
/** * Gets the document status url xml. * * @return the document status url xml */
Gets the document status url xml
getDocumentStatusUrlXml
{ "repo_name": "Hack23/cia", "path": "model.external.riksdagen.utskottsforslag.impl/src/main/java/com/hack23/cia/model/external/riksdagen/utskottsforslag/impl/CommitteeDocumentData.java", "license": "apache-2.0", "size": 16553 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,099,028
public Scan getScan() throws IOException { return TableMapReduceUtil.convertStringToScan(this.scan); }
Scan function() throws IOException { return TableMapReduceUtil.convertStringToScan(this.scan); }
/** * Returns a Scan object from the stored string representation. * * @return Returns a Scan object based on the stored scanner. * @throws IOException */
Returns a Scan object from the stored string representation
getScan
{ "repo_name": "toshimasa-nasu/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java", "license": "apache-2.0", "size": 11674 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Scan" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Scan;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
395,050
public void setPdnconnEventsMmeValue(YangString pdnconnEventsMmeValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "pdnconn-events-mme", pdnconnEventsMmeValue, childrenNames()); }
void function(YangString pdnconnEventsMmeValue) throws JNCException { setLeafValue(Epc.NAMESPACE, STR, pdnconnEventsMmeValue, childrenNames()); }
/** * Sets the value for child leaf "pdnconn-events-mme", * using instance of generated typedef class. * @param pdnconnEventsMmeValue The value to set. * @param pdnconnEventsMmeValue used during instantiation. */
Sets the value for child leaf "pdnconn-events-mme", using instance of generated typedef class
setPdnconnEventsMmeValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/csl/AgwCslOper.java", "license": "apache-2.0", "size": 28765 }
[ "com.tailf.jnc.YangString" ]
import com.tailf.jnc.YangString;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
2,648,827
public void checkIteratorConflicts(String tableName, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloException, TableNotFoundException;
void function(String tableName, IteratorSetting setting, EnumSet<IteratorScope> scopes) throws AccumuloException, TableNotFoundException;
/** * Check whether a given iterator configuration conflicts with existing configuration; in particular, determine if the name or priority are already in use for * the specified scopes. * * @param tableName * the name of the table * @param setting * object specifying the propertie...
Check whether a given iterator configuration conflicts with existing configuration; in particular, determine if the name or priority are already in use for the specified scopes
checkIteratorConflicts
{ "repo_name": "phrocker/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java", "license": "apache-2.0", "size": 27618 }
[ "java.util.EnumSet", "org.apache.accumulo.core.client.AccumuloException", "org.apache.accumulo.core.client.IteratorSetting", "org.apache.accumulo.core.client.TableNotFoundException", "org.apache.accumulo.core.iterators.IteratorUtil" ]
import java.util.EnumSet; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.IteratorSetting; import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.accumulo.core.iterators.IteratorUtil;
import java.util.*; import org.apache.accumulo.core.client.*; import org.apache.accumulo.core.iterators.*;
[ "java.util", "org.apache.accumulo" ]
java.util; org.apache.accumulo;
2,130,011
PercolateRequestBuilder preparePercolate();
PercolateRequestBuilder preparePercolate();
/** * Percolates a request returning the matches documents. */
Percolates a request returning the matches documents
preparePercolate
{ "repo_name": "nomoa/elasticsearch", "path": "core/src/main/java/org/elasticsearch/client/Client.java", "license": "apache-2.0", "size": 17919 }
[ "org.elasticsearch.action.percolate.PercolateRequestBuilder" ]
import org.elasticsearch.action.percolate.PercolateRequestBuilder;
import org.elasticsearch.action.percolate.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
2,361,962
public X509CRL generate( PrivateKey key, String provider, SecureRandom random) throws CRLException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException { TBSCertList tbsCrl = generateCertList()...
X509CRL function( PrivateKey key, String provider, SecureRandom random) throws CRLException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException { TBSCertList tbsCrl = generateCertList(); byte[] signature; try { signature = X509Util.calculateSignature(sigOID...
/** * generate an X509 CRL, based on the current issuer and subject, * using the passed in provider for the signing. */
generate an X509 CRL, based on the current issuer and subject, using the passed in provider for the signing
generate
{ "repo_name": "GaloisInc/hacrypto", "path": "src/Java/BouncyCastle/BouncyCastle-1.50/prov/src/main/jdk1.1/org/bouncycastle/x509/X509V2CRLGenerator.java", "license": "bsd-3-clause", "size": 13181 }
[ "java.io.IOException", "java.security.InvalidKeyException", "java.security.NoSuchAlgorithmException", "java.security.NoSuchProviderException", "java.security.PrivateKey", "java.security.SecureRandom", "java.security.SignatureException", "java.security.cert.CRLException", "org.bouncycastle.asn1.x509....
import java.io.IOException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.PrivateKey; import java.security.SecureRandom; import java.security.SignatureException; import java.security.cert.CRLException; import o...
import java.io.*; import java.security.*; import java.security.cert.*; import org.bouncycastle.asn1.x509.*;
[ "java.io", "java.security", "org.bouncycastle.asn1" ]
java.io; java.security; org.bouncycastle.asn1;
1,006,075
@Override public void clear() { setObjectId( null ); steps = new ArrayList<>(); hops = new ArrayList<>(); dependencies = new ArrayList<>(); partitionSchemas = new ArrayList<>(); clusterSchemas = new ArrayList<>(); namedParams = new NamedParamsDefault(); stepChangeListeners = new Arra...
void function() { setObjectId( null ); steps = new ArrayList<>(); hops = new ArrayList<>(); dependencies = new ArrayList<>(); partitionSchemas = new ArrayList<>(); clusterSchemas = new ArrayList<>(); namedParams = new NamedParamsDefault(); stepChangeListeners = new ArrayList<>(); slaveStepCopyPartitionDistribution = ne...
/** * Clears the transformation's meta-data, including the lists of databases, steps, hops, notes, dependencies, * partition schemas, slave servers, and cluster schemas. Logging information and timeouts are reset to defaults, and * recent connection info is cleared. */
Clears the transformation's meta-data, including the lists of databases, steps, hops, notes, dependencies, partition schemas, slave servers, and cluster schemas. Logging information and timeouts are reset to defaults, and recent connection info is cleared
clear
{ "repo_name": "dkincade/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/TransMeta.java", "license": "apache-2.0", "size": 227503 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.Hashtable", "org.pentaho.di.core.Const", "org.pentaho.di.core.DBCache", "org.pentaho.di.core.logging.LogChannel", "org.pentaho.di.core.logging.MetricsLogTable", "org.pentaho.di.core.logging.PerformanceLogTable", "org.pentaho.di.core.logging.Step...
import java.util.ArrayList; import java.util.HashMap; import java.util.Hashtable; import org.pentaho.di.core.Const; import org.pentaho.di.core.DBCache; import org.pentaho.di.core.logging.LogChannel; import org.pentaho.di.core.logging.MetricsLogTable; import org.pentaho.di.core.logging.PerformanceLogTable; import org.pe...
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.logging.*; import org.pentaho.di.core.parameters.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
634,895
public void deactivate(ComponentContext componentContext) throws Exception { for (Future<?> st: scheduledTasks.values()) { st.cancel(false); } }
void function(ComponentContext componentContext) throws Exception { for (Future<?> st: scheduledTasks.values()) { st.cancel(false); } }
/** * Cancels scheduled tasks and shuts down the executor service. * @param componentContext * @throws Exception */
Cancels scheduled tasks and shuts down the executor service
deactivate
{ "repo_name": "Nasdanika/server", "path": "org.nasdanika.cdo.scheduler/src/org/nasdanika/cdo/scheduler/AbstractSchedulerComponent.java", "license": "epl-1.0", "size": 10471 }
[ "java.util.concurrent.Future", "org.osgi.service.component.ComponentContext" ]
import java.util.concurrent.Future; import org.osgi.service.component.ComponentContext;
import java.util.concurrent.*; import org.osgi.service.component.*;
[ "java.util", "org.osgi.service" ]
java.util; org.osgi.service;
1,941,967
Result get(Get get) throws IOException;
Result get(Get get) throws IOException;
/** * Extracts certain cells from a given row. * @param get The object that specifies what data to fetch and from which row. * @return The data coming from the specified row, if it exists. If the row * specified doesn't exist, the {@link Result} instance returned won't * contain any {@link org.apache.ha...
Extracts certain cells from a given row
get
{ "repo_name": "Guavus/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java", "license": "apache-2.0", "size": 25576 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,598,638
public Enumeration<Faction.FRange> ranges();
Enumeration<Faction.FRange> function();
/** * Returns an enumeration of all available Faction.FactionRange objects, * representing the entire score of available values valid for this faction. * @see com.suscipio_solutions.consecro_mud.Common.interfaces.Faction#addRange(String) * @see com.suscipio_solutions.consecro_mud.Common.interfaces.Faction#delRa...
Returns an enumeration of all available Faction.FactionRange objects, representing the entire score of available values valid for this faction
ranges
{ "repo_name": "ConsecroMUD/ConsecroMUD", "path": "com/suscipio_solutions/consecro_mud/Common/interfaces/Faction.java", "license": "apache-2.0", "size": 78708 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
694,240
@Override public Dimension getMaximumSize(JComponent c) { return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); }
Dimension function(JComponent c) { return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); }
/** * Returns the maximum size of the <code>VFSJFileChooser</code>. * * @param c a <code>VFSJFileChooser</code> * @return a <code>Dimension</code> specifying the maximum * width and height of the file chooser */
Returns the maximum size of the <code>VFSJFileChooser</code>
getMaximumSize
{ "repo_name": "codebling/VFSJFileChooser2", "path": "src/net/sf/vfsjfilechooser/plaf/metal/MetalVFSFileChooserUI.java", "license": "apache-2.0", "size": 50872 }
[ "java.awt.Dimension", "javax.swing.JComponent" ]
import java.awt.Dimension; import javax.swing.JComponent;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,390,878
public void testRemove() throws DatabaseException, IOException { final boolean expectAccurateObsoleteLNSize = !DatabaseImpl.forceTreeWalkForTruncateAndRemove; openAndWriteDatabase(); long binFile = getBINFile(cursor); long inFile = getINFile(cursor); ...
void function() throws DatabaseException, IOException { final boolean expectAccurateObsoleteLNSize = !DatabaseImpl.forceTreeWalkForTruncateAndRemove; openAndWriteDatabase(); long binFile = getBINFile(cursor); long inFile = getINFile(cursor); cursor.close(); txn.commit(); closeEnv(true, true, expectAccurateObsoleteLNSiz...
/** * Tests that truncating a database is counted correctly. * Tests recovery also. */
Tests that truncating a database is counted correctly. Tests recovery also
testRemove
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/test/com/sleepycat/je/cleaner/INUtilizationTest.java", "license": "apache-2.0", "size": 32775 }
[ "com.sleepycat.je.DatabaseException", "com.sleepycat.je.dbi.DatabaseImpl", "java.io.IOException" ]
import com.sleepycat.je.DatabaseException; import com.sleepycat.je.dbi.DatabaseImpl; import java.io.IOException;
import com.sleepycat.je.*; import com.sleepycat.je.dbi.*; import java.io.*;
[ "com.sleepycat.je", "java.io" ]
com.sleepycat.je; java.io;
262,306
@SuppressWarnings("unchecked") @GET @Path("{repositoryName}/livePreviewFiles/") @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = "Returns all needed files for the live preview widget of the given repository encoded in Base64.", notes = "Returns all needed files for the live preview widget.") @ApiResp...
@SuppressWarnings(STR) @Path(STR) @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = STR, notes = STR) @ApiResponses(value = { @ApiResponse(code = HttpURLConnection.HTTP_OK, message = STR), @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = STR), @ApiResponse(code = HttpURLConnection.HTTP_NOT...
/** * Get the files needed for the live preview widget collected in one * response * * @param repositoryName * The name of the repository * @return HttpResponse containing the status code of the request and the * content of the needed files for the live preview widget encoded * ...
Get the files needed for the live preview widget collected in one response
getLivePreviewFiles
{ "repo_name": "PedeLa/CAE-Code-Generation-Service", "path": "src/main/i5/las2peer/services/codeGenerationService/RESTResources.java", "license": "bsd-3-clause", "size": 18534 }
[ "io.swagger.annotations.ApiOperation", "io.swagger.annotations.ApiResponse", "io.swagger.annotations.ApiResponses", "java.io.FileNotFoundException", "java.net.HttpURLConnection", "java.util.Base64", "java.util.logging.Level", "javax.ws.rs.InternalServerErrorException", "javax.ws.rs.NotAcceptableExce...
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import java.io.FileNotFoundException; import java.net.HttpURLConnection; import java.util.Base64; import java.util.logging.Level; import javax.ws.rs.InternalServerErrorException; import jav...
import io.swagger.annotations.*; import java.io.*; import java.net.*; import java.util.*; import java.util.logging.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.eclipse.jgit.api.*; import org.json.simple.*;
[ "io.swagger.annotations", "java.io", "java.net", "java.util", "javax.ws", "org.eclipse.jgit", "org.json.simple" ]
io.swagger.annotations; java.io; java.net; java.util; javax.ws; org.eclipse.jgit; org.json.simple;
2,623,507
public JCExpression makeMetamodelInvocation(String methodName, List<JCExpression> arguments, List<JCExpression> typeArguments) { return make().Apply(typeArguments, make().Select(make().QualIdent(syms().ceylonMetamodelType.tsym), names()...
JCExpression function(String methodName, List<JCExpression> arguments, List<JCExpression> typeArguments) { return make().Apply(typeArguments, make().Select(make().QualIdent(syms().ceylonMetamodelType.tsym), names().fromString(methodName)), arguments); }
/** * Invokes a static method of the Metamodel helper class * @param methodName name of the method * @param arguments The arguments to the invocation * @param typeArguments The arguments to the method * @return the invocation AST */
Invokes a static method of the Metamodel helper class
makeMetamodelInvocation
{ "repo_name": "lucaswerkmeister/ceylon-compiler", "path": "src/com/redhat/ceylon/compiler/java/codegen/AbstractTransformer.java", "license": "gpl-2.0", "size": 210410 }
[ "com.sun.tools.javac.tree.JCTree", "com.sun.tools.javac.util.List" ]
import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.util.List;
import com.sun.tools.javac.tree.*; import com.sun.tools.javac.util.*;
[ "com.sun.tools" ]
com.sun.tools;
1,769,282
@RDF(Constants.NS_SIOC+"attachment") public LinkedList<ContentItem> getMultimedia();
@RDF(Constants.NS_SIOC+STR) LinkedList<ContentItem> function();
/** * The content items representing multimedia content that is associated with this point of * interest. Maps to sioc:attachment. * @return */
The content items representing multimedia content that is associated with this point of interest. Maps to sioc:attachment
getMultimedia
{ "repo_name": "fregaham/KiWi", "path": "src/action/kiwi/service/importexport/importer/rss/POI.java", "license": "bsd-3-clause", "size": 4138 }
[ "java.util.LinkedList", "kiwi.model.Constants", "kiwi.model.content.ContentItem" ]
import java.util.LinkedList; import kiwi.model.Constants; import kiwi.model.content.ContentItem;
import java.util.*; import kiwi.model.*; import kiwi.model.content.*;
[ "java.util", "kiwi.model", "kiwi.model.content" ]
java.util; kiwi.model; kiwi.model.content;
1,635,191
public static EnumType getEnumType(Annotation[] annotations) { EnumType enumType = null; if (annotations != null) { for (Annotation annotation : annotations) { if (annotation instanceof IQEnum) { enumType = ((IQEnum) annotation).value(); ...
static EnumType function(Annotation[] annotations) { EnumType enumType = null; if (annotations != null) { for (Annotation annotation : annotations) { if (annotation instanceof IQEnum) { enumType = ((IQEnum) annotation).value(); break; } } } return enumType; }
/** * Identify the EnumType from the annotations. * * @param annotations * @return null or the EnumType */
Identify the EnumType from the annotations
getEnumType
{ "repo_name": "gitblit/iciql", "path": "src/main/java/com/iciql/util/Utils.java", "license": "apache-2.0", "size": 24100 }
[ "com.iciql.Iciql", "java.lang.annotation.Annotation" ]
import com.iciql.Iciql; import java.lang.annotation.Annotation;
import com.iciql.*; import java.lang.annotation.*;
[ "com.iciql", "java.lang" ]
com.iciql; java.lang;
1,082,438
public static File relativeFile(File root, File file) { if (root != null && file != null) { String absRoot = absoluteFile(root).getPath(); String absFile = absoluteFile(file).getPath(); if (absFile.startsWith(absRoot)) { String path = absFile.substring(abs...
static File function(File root, File file) { if (root != null && file != null) { String absRoot = absoluteFile(root).getPath(); String absFile = absoluteFile(file).getPath(); if (absFile.startsWith(absRoot)) { String path = absFile.substring(absRoot.length()); if (path.startsWith(File.separator)) { path = path.substrin...
/** * Given a file and a possible parent folder returns * the file relative to the parent. If the file wasn't * relative to the parent it is returned unmodified. * @param root A possible parent file * @param file A file * @return A file relative to the parent */
Given a file and a possible parent folder returns the file relative to the parent. If the file wasn't relative to the parent it is returned unmodified
relativeFile
{ "repo_name": "gijsleussink/ceylon", "path": "common/src/com/redhat/ceylon/common/FileUtil.java", "license": "apache-2.0", "size": 18162 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,788,552
ListAodSupportedFormatOperation buildListAodSupportedFormatOperation();
ListAodSupportedFormatOperation buildListAodSupportedFormatOperation();
/** * It creates a list all the supported AOD format operation. * @return the operation created */
It creates a list all the supported AOD format operation
buildListAodSupportedFormatOperation
{ "repo_name": "vikingbrain/thedavidbox-client4j", "path": "src/main/java/com/vikingbrain/nmt/client/modules/ModulePlayback.java", "license": "apache-2.0", "size": 11971 }
[ "com.vikingbrain.nmt.operations.playback.ListAodSupportedFormatOperation" ]
import com.vikingbrain.nmt.operations.playback.ListAodSupportedFormatOperation;
import com.vikingbrain.nmt.operations.playback.*;
[ "com.vikingbrain.nmt" ]
com.vikingbrain.nmt;
2,506,846
public static String[] render(final Throwable throwable) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); try { throwable.printStackTrace(pw); } catch(RuntimeException ex) { } pw.flush(); LineNumberReader reader = new L...
static String[] function(final Throwable throwable) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); try { throwable.printStackTrace(pw); } catch(RuntimeException ex) { } pw.flush(); LineNumberReader reader = new LineNumberReader( new StringReader(sw.toString())); ArrayList lines = new Arra...
/** * Render throwable using Throwable.printStackTrace. * @param throwable throwable, may not be null. * @return string representation. */
Render throwable using Throwable.printStackTrace
render
{ "repo_name": "Mark-Booth/daq-eclipse", "path": "uk.ac.diamond.org.apache.activemq/org/apache/log4j/DefaultThrowableRenderer.java", "license": "epl-1.0", "size": 2593 }
[ "java.io.IOException", "java.io.InterruptedIOException", "java.io.LineNumberReader", "java.io.PrintWriter", "java.io.StringReader", "java.io.StringWriter", "java.util.ArrayList" ]
import java.io.IOException; import java.io.InterruptedIOException; import java.io.LineNumberReader; import java.io.PrintWriter; import java.io.StringReader; import java.io.StringWriter; import java.util.ArrayList;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,380,278
@Test public void testMozColumnCountMozColumnCount() { final MozColumnCount mozColumnCount1 = new MozColumnCount("2"); MozColumnCount mozColumnCount = new MozColumnCount(mozColumnCount1); assertEquals(Integer.valueOf(2), mozColumnCount.getValue()); assertEquals("2", mozColumnCoun...
void function() { final MozColumnCount mozColumnCount1 = new MozColumnCount("2"); MozColumnCount mozColumnCount = new MozColumnCount(mozColumnCount1); assertEquals(Integer.valueOf(2), mozColumnCount.getValue()); assertEquals("2", mozColumnCount.getCssValue()); }
/** * Test method for {@link com.webfirmframework.wffweb.css.css3.MozColumnCount#MozColumnCount(com.webfirmframework.wffweb.css.css3.MozColumnCount)}. */
Test method for <code>com.webfirmframework.wffweb.css.css3.MozColumnCount#MozColumnCount(com.webfirmframework.wffweb.css.css3.MozColumnCount)</code>
testMozColumnCountMozColumnCount
{ "repo_name": "webfirmframework/wff", "path": "wffweb/src/test/java/com/webfirmframework/wffweb/css/css3/MozColumnCountTest.java", "license": "apache-2.0", "size": 9189 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
168,991
@Override public void timeStep(double dt, double simulationTime, long iterationCount) { if (reEntranceTrafficSource != null) { addVehiclesToSource(simulationTime, sourceRoad().getVehiclesPastEnd()); } vehiclesRemovedInInterval += sourceRoad().removeVehiclesPastEnd(); ...
void function(double dt, double simulationTime, long iterationCount) { if (reEntranceTrafficSource != null) { addVehiclesToSource(simulationTime, sourceRoad().getVehiclesPastEnd()); } vehiclesRemovedInInterval += sourceRoad().removeVehiclesPastEnd(); measuredTime += dt; if (measuredTime > MEASURING_INTERVAL_S) { measur...
/** * Removes any vehicles that have gone past the end of the source road. */
Removes any vehicles that have gone past the end of the source road
timeStep
{ "repo_name": "popikyardo/movsim-extended", "path": "core/src/main/java/org/movsim/simulator/roadnetwork/TrafficSink.java", "license": "gpl-3.0", "size": 6047 }
[ "org.movsim.utilities.Units" ]
import org.movsim.utilities.Units;
import org.movsim.utilities.*;
[ "org.movsim.utilities" ]
org.movsim.utilities;
1,450,540
private void dynInit() { ArrayList<BankInfo> bankAccountData = getBankAccountData(); for(BankInfo bi : bankAccountData) fieldBankAccount.appendItem(bi.toString(), bi); if (fieldBankAccount.getItemCount() == 0) FDialog.error(m_WindowNo, form, "VPaySelectNoBank"); else fieldBankAccount.setS...
void function() { ArrayList<BankInfo> bankAccountData = getBankAccountData(); for(BankInfo bi : bankAccountData) fieldBankAccount.appendItem(bi.toString(), bi); if (fieldBankAccount.getItemCount() == 0) FDialog.error(m_WindowNo, form, STR); else fieldBankAccount.setSelectedIndex(0); ArrayList<KeyNamePair> bpartnerData ...
/** * Dynamic Init. * - Load Bank Info * - Load BPartner * - Init Table */
Dynamic Init. - Load Bank Info - Load BPartner - Init Table
dynInit
{ "repo_name": "geneos/adempiere", "path": "zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java", "license": "gpl-2.0", "size": 14592 }
[ "java.sql.Timestamp", "java.util.ArrayList", "org.adempiere.webui.window.FDialog", "org.compiere.util.KeyNamePair" ]
import java.sql.Timestamp; import java.util.ArrayList; import org.adempiere.webui.window.FDialog; import org.compiere.util.KeyNamePair;
import java.sql.*; import java.util.*; import org.adempiere.webui.window.*; import org.compiere.util.*;
[ "java.sql", "java.util", "org.adempiere.webui", "org.compiere.util" ]
java.sql; java.util; org.adempiere.webui; org.compiere.util;
1,875,152
public SimpleRexRemap setExpressionMap(Map<LogicalExpression, LogicalExpression> exprMap) { destExprMap.putAll(exprMap); return this; }
SimpleRexRemap function(Map<LogicalExpression, LogicalExpression> exprMap) { destExprMap.putAll(exprMap); return this; }
/** * Set the map of src expression to target expression, expressions not in the map do not have assigned destinations * @param exprMap * @return */
Set the map of src expression to target expression, expressions not in the map do not have assigned destinations
setExpressionMap
{ "repo_name": "apache/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/planner/index/SimpleRexRemap.java", "license": "apache-2.0", "size": 10154 }
[ "java.util.Map", "org.apache.drill.common.expression.LogicalExpression" ]
import java.util.Map; import org.apache.drill.common.expression.LogicalExpression;
import java.util.*; import org.apache.drill.common.expression.*;
[ "java.util", "org.apache.drill" ]
java.util; org.apache.drill;
2,459,250
private void reInitBrowserFunctions() { unregisterAllBrowserFunctions(); registerAllBrowserFunctions(); } /** * Register all {@link BrowserFunction}s and store them in {@link #registeredBrowserFunctions}
void function() { unregisterAllBrowserFunctions(); registerAllBrowserFunctions(); } /** * Register all {@link BrowserFunction}s and store them in {@link #registeredBrowserFunctions}
/** * Reinitalize all required {@link BrowserFunction}s */
Reinitalize all required <code>BrowserFunction</code>s
reInitBrowserFunctions
{ "repo_name": "prowim/prowim", "path": "prowim-portal/src/org/prowim/portal/view/process/ModelEditorView.java", "license": "gpl-3.0", "size": 31243 }
[ "org.eclipse.swt.browser.BrowserFunction" ]
import org.eclipse.swt.browser.BrowserFunction;
import org.eclipse.swt.browser.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,805,632
@WebMethod @WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201311") @RequestWrapper(localName = "updateCustomTargetingValues", targetNamespace = "https://www.google.com/apis/ads/publisher/v201311", className = "com.google.api.ads.dfp.jaxws.v201311.CustomTargetingServi...
@WebResult(name = "rval", targetNamespace = STRupdateCustomTargetingValuesSTRhttps: @ResponseWrapper(localName = "updateCustomTargetingValuesResponseSTRhttps: List<CustomTargetingValue> function( @WebParam(name = "valuesSTRhttps: List<CustomTargetingValue> values) throws ApiException_Exception ;
/** * * Updates the specified {@link CustomTargetingValue} objects. * * @param values the custom targeting values to update * @return the updated custom targeting values * * * @param values * @return * returns java.util.List...
Updates the specified <code>CustomTargetingValue</code> objects
updateCustomTargetingValues
{ "repo_name": "nafae/developer", "path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201311/CustomTargetingServiceInterface.java", "license": "apache-2.0", "size": 15645 }
[ "java.util.List", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.ResponseWrapper" ]
import java.util.List; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper;
import java.util.*; import javax.jws.*; import javax.xml.ws.*;
[ "java.util", "javax.jws", "javax.xml" ]
java.util; javax.jws; javax.xml;
2,788,998
public Operation setMetadata(Map<String, String> metadata, OperationOption... options) { return setMetadata(getMetadata().toBuilder().setValues(metadata).build(), options); }
Operation function(Map<String, String> metadata, OperationOption... options) { return setMetadata(getMetadata().toBuilder().setValues(metadata).build(), options); }
/** * Sets the metadata for this instance, fingerprint value is taken from this instance's * {@code tags().fingerprint()}. * * @return a zone operation if the set request was issued correctly, {@code null} if the instance * was not found * @throws ComputeException upon failure */
Sets the metadata for this instance, fingerprint value is taken from this instance's tags().fingerprint()
setMetadata
{ "repo_name": "jabubake/google-cloud-java", "path": "google-cloud-compute/src/main/java/com/google/cloud/compute/Instance.java", "license": "apache-2.0", "size": 17278 }
[ "com.google.cloud.compute.Compute", "java.util.Map" ]
import com.google.cloud.compute.Compute; import java.util.Map;
import com.google.cloud.compute.*; import java.util.*;
[ "com.google.cloud", "java.util" ]
com.google.cloud; java.util;
2,669,537
private static int byteCompaction(int mode, int[] codewords, Charset encoding, int codeIndex, StringBuilder result) { ByteArrayOutputStream decodedBytes = new ByteArrayOu...
static int function(int mode, int[] codewords, Charset encoding, int codeIndex, StringBuilder result) { ByteArrayOutputStream decodedBytes = new ByteArrayOutputStream(); if (mode == BYTE_COMPACTION_MODE_LATCH) { int count = 0; long value = 0; int[] byteCompactedCodewords = new int[6]; boolean end = false; int nextCode ...
/** * Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. * This includes all ASCII characters value 0 to 127 inclusive and provides for international * character set support. * * @param mode The byte compaction mode i.e. 901 or 924 * @param codewords The ar...
Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. This includes all ASCII characters value 0 to 127 inclusive and provides for international character set support
byteCompaction
{ "repo_name": "HJ-StevenSun/Weex-TestDemo", "path": "weex-dev/android/playground/app/src/main/java_zxing/com/google/zxing/pdf417/decoder/DecodedBitStreamParser.java", "license": "apache-2.0", "size": 24201 }
[ "java.io.ByteArrayOutputStream", "java.nio.charset.Charset" ]
import java.io.ByteArrayOutputStream; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,169,072
@Override protected void transferDone(Connection con) { Message m = con.getMessage(); String id = m.getId(); DTNHost recipient = con.getOtherNode(getHost()); Set<String> sentMsgIds = this.sentMessages.get(recipient); if (m.getTo() == recipient) { this.ackedMessageIds.add(m.getId()); // yes, add ...
void function(Connection con) { Message m = con.getMessage(); String id = m.getId(); DTNHost recipient = con.getOtherNode(getHost()); Set<String> sentMsgIds = this.sentMessages.get(recipient); if (m.getTo() == recipient) { this.ackedMessageIds.add(m.getId()); this.deleteMessage(m.getId(), false); } if (sentMsgIds == nu...
/** * Method is called just before a transfer is finalized * at {@link ActiveRouter#update()}. MaxProp makes book keeping of the * delivered messages so their IDs are stored. * @param con The connection whose transfer was finalized */
Method is called just before a transfer is finalized at <code>ActiveRouter#update()</code>. MaxProp makes book keeping of the delivered messages so their IDs are stored
transferDone
{ "repo_name": "AlexSussex/Dissertation---ONE", "path": "src/routing/MaxPropRouter.java", "license": "gpl-3.0", "size": 20036 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,487,160
public List<String> getTargetPoolsList() { return targetPools; }
List<String> function() { return targetPools; }
/** * The URLs for all TargetPool resources to which instances in the instanceGroup field are * added. The target pools automatically apply to all of the instances in the managed instance * group. */
The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group
getTargetPoolsList
{ "repo_name": "vam-google/google-cloud-java", "path": "google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManager.java", "license": "apache-2.0", "size": 34985 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,127,572
private void checkDatabaseBooted(Database database, String operation, String dbname) throws SQLException { if (database == null) { // Do not clear the TransactionResource context. It will // be restored as par...
void function(Database database, String operation, String dbname) throws SQLException { if (database == null) { this.setInactive(); throw newSQLException(SQLState.REPLICATION_DB_NOT_BOOTED, operation, dbname); } } /** Examine the attributes set provided for illegal boot combinations and determine if this is a create bo...
/** * Check that a database has already been booted. Throws an exception * otherwise * * @param database The database that should have been booted * @param operation The operation that requires that the database has * already been booted, used in the exception message if not booted ...
Check that a database has already been booted. Throws an exception otherwise
checkDatabaseBooted
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "license": "apache-2.0", "size": 142318 }
[ "java.sql.SQLException", "org.apache.derby.iapi.db.Database", "org.apache.derby.shared.common.reference.SQLState" ]
import java.sql.SQLException; import org.apache.derby.iapi.db.Database; import org.apache.derby.shared.common.reference.SQLState;
import java.sql.*; import org.apache.derby.iapi.db.*; import org.apache.derby.shared.common.reference.*;
[ "java.sql", "org.apache.derby" ]
java.sql; org.apache.derby;
2,802,358
public java.util.List<fr.lip6.move.pnml.pthlpng.booleans.hlapi.OrHLAPI> getSubterm_booleans_OrHLAPI() { java.util.List<fr.lip6.move.pnml.pthlpng.booleans.hlapi.OrHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.booleans.hlapi.OrHLAPI>(); for (Term elemnt : getSubterm()) { if (elemnt.getClass().equals(f...
java.util.List<fr.lip6.move.pnml.pthlpng.booleans.hlapi.OrHLAPI> function() { java.util.List<fr.lip6.move.pnml.pthlpng.booleans.hlapi.OrHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.booleans.hlapi.OrHLAPI>(); for (Term elemnt : getSubterm()) { if (elemnt.getClass().equals(fr.lip6.move.pnml.pthlpng.booleans.im...
/** * This accessor return a list of encapsulated subelement, only of OrHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of OrHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_booleans_OrHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/integers/hlapi/GreaterThanOrEqualHLAPI.java", "license": "epl-1.0", "size": 70100 }
[ "fr.lip6.move.pnml.pthlpng.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.pthlpng.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.pthlpng.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
128,311
private void captureSnapshot() { try { flash(); File dir = new File(Configuration.get().getConfigurationDirectory(), "snapshots"); dir.mkdirs(); DateFormat df = new SimpleDateFormat("YYYY-MM-dd_HH.mm.ss.SSS"); File file = new File(dir, camera.getNa...
void function() { try { flash(); File dir = new File(Configuration.get().getConfigurationDirectory(), STR); dir.mkdirs(); DateFormat df = new SimpleDateFormat(STR); File file = new File(dir, camera.getName() + "_" + df.format(new Date()) + ".png"); ImageIO.write(camera.capture(), "png", file); } catch (Exception e1) { ...
/** * Capture the current image (unscaled, unmodified) and write it to disk. */
Capture the current image (unscaled, unmodified) and write it to disk
captureSnapshot
{ "repo_name": "ChrisPVille/openpnp", "path": "src/main/java/org/openpnp/gui/components/CameraView.java", "license": "gpl-3.0", "size": 49639 }
[ "java.io.File", "java.text.DateFormat", "java.text.SimpleDateFormat", "java.util.Date", "javax.imageio.ImageIO", "org.openpnp.model.Configuration" ]
import java.io.File; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import javax.imageio.ImageIO; import org.openpnp.model.Configuration;
import java.io.*; import java.text.*; import java.util.*; import javax.imageio.*; import org.openpnp.model.*;
[ "java.io", "java.text", "java.util", "javax.imageio", "org.openpnp.model" ]
java.io; java.text; java.util; javax.imageio; org.openpnp.model;
2,235,702
boolean cuentaE = false; boolean confirmar; Login entrar = new Login(); // Busca si existe el usuario o no for (int i = 0; i < usuariosCalc.size(); i++) { if (usuariosCalc.get(i).getUsuario().equals(usuario) && usuariosCalc.get(i).getClave().equals(contra)) {...
boolean cuentaE = false; boolean confirmar; Login entrar = new Login(); for (int i = 0; i < usuariosCalc.size(); i++) { if (usuariosCalc.get(i).getUsuario().equals(usuario) && usuariosCalc.get(i).getClave().equals(contra)) { cuentaE = true; } } if (cuentaE == true ){ JOptionPane.showMessageDialog(entrar, STR, "Éxito", ...
/** * Se encarga de observar si ya existe el usuario en la lista o no. Luego, permite ingresar al usuario al sistema. * @param usuario: Almacena el nombre de usuario * @param contra: Almacena la contraseña del usuario */
Se encarga de observar si ya existe el usuario en la lista o no. Luego, permite ingresar al usuario al sistema
Validar
{ "repo_name": "RodrigoZea/proyectorestaurante", "path": "src/Calculos.java", "license": "mit", "size": 21712 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,125,713
public static String getPluginName( String pluginId ) { return getBundleValue( pluginId, org.osgi.framework.Constants.BUNDLE_NAME ); }
static String function( String pluginId ) { return getBundleValue( pluginId, org.osgi.framework.Constants.BUNDLE_NAME ); }
/** * Returns the plug-in name * * @param pluginId * the identify of the plugin * * @return the plug-in name, or null if the plug-in is not found */
Returns the plug-in name
getPluginName
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/util/UIUtil.java", "license": "epl-1.0", "size": 99064 }
[ "org.eclipse.osgi.service.environment.Constants" ]
import org.eclipse.osgi.service.environment.Constants;
import org.eclipse.osgi.service.environment.*;
[ "org.eclipse.osgi" ]
org.eclipse.osgi;
705,264
public void write(byte[] toWrite, String fileName) throws CacheTransactionException{ File file = new File(mCacheDir, fileName); FileOutputStream out = null; try { out = new FileOutputStream(file); out.write(toWrite); } catch (Exception e) { Log.d(Constants.Tag, "[CacheManager]: Unsuccessful write...
void function(byte[] toWrite, String fileName) throws CacheTransactionException{ File file = new File(mCacheDir, fileName); FileOutputStream out = null; try { out = new FileOutputStream(file); out.write(toWrite); } catch (Exception e) { Log.d(Constants.Tag, STR + mCacheDir + fileName); e.printStackTrace(); throw new Ca...
/** * Writes an array of bytes to the given file name. * The file will be placed in the current application's cache directory. * * @param toWrite The byte array to write to a file. * @param fileName The File name that will be written to. * @throws CacheTransactionException Throws the exception if writing f...
Writes an array of bytes to the given file name. The file will be placed in the current application's cache directory
write
{ "repo_name": "BrandonRomano/CacheManager", "path": "CacheManager/CacheManager/src/com/github/brandonromano/cachemanager/CacheManager.java", "license": "apache-2.0", "size": 13925 }
[ "android.util.Log", "java.io.File", "java.io.FileOutputStream", "java.io.IOException" ]
import android.util.Log; import java.io.File; import java.io.FileOutputStream; import java.io.IOException;
import android.util.*; import java.io.*;
[ "android.util", "java.io" ]
android.util; java.io;
356,051
@Nonnull Context setRemoteAddress(@Nonnull String remoteAddress);
@Nonnull Context setRemoteAddress(@Nonnull String remoteAddress);
/** * Set IP address of client or last proxy that sent the request. * * @param remoteAddress Remote Address. * @return This context. */
Set IP address of client or last proxy that sent the request
setRemoteAddress
{ "repo_name": "jooby-project/jooby", "path": "jooby/src/main/java/io/jooby/Context.java", "license": "apache-2.0", "size": 41138 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,850,238
@Override public void flush () throws IOException { _flushBuffer (); out.flush (); }
void function () throws IOException { _flushBuffer (); out.flush (); }
/** * Flushes this buffered output stream. This forces any buffered output bytes * to be written out to the underlying output stream. * * @exception IOException * if an I/O error occurs. */
Flushes this buffered output stream. This forces any buffered output bytes to be written out to the underlying output stream
flush
{ "repo_name": "lsimons/phloc-schematron-standalone", "path": "phloc-commons/src/main/java/com/phloc/commons/io/streams/NonBlockingBufferedOutputStream.java", "license": "apache-2.0", "size": 4593 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,596,977
public Date getEventDate() { return eventDate; }
Date function() { return eventDate; }
/** * The date and time when an event has been completed. * * @return eventDate **/
The date and time when an event has been completed
getEventDate
{ "repo_name": "Adyen/adyen-java-api-library", "path": "src/main/java/com/adyen/model/marketpay/notification/AccountFundsBelowThresholdNotification.java", "license": "mit", "size": 6330 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,733,401
JLabel label = new JLabel(); //restLabel.setLayout(new BoxLayout((Container)restLabel, BoxLayout.Y_AXIS)); m_restaurantLabel.setLayout(new BorderLayout()); label.setText("<html><h3><u>Your Lovely Staff</u></h3>" + "<table><tr><td>Host:</td><td>" + m_restaurant.getHost().getName() + "<tr><td>Cook:</td><td>" + m_...
JLabel label = new JLabel(); m_restaurantLabel.setLayout(new BorderLayout()); label.setText(STR + STR + m_restaurant.getHost().getName() + STR + m_restaurant.getCook().getName() + STR); m_restaurantLabel.setBorder(BorderFactory.createRaisedBevelBorder()); m_restaurantLabel.add(label, BorderLayout.CENTER); m_restaurantL...
/** * Sets up the restaurant label that includes the menu, * and host and cook information */
Sets up the restaurant label that includes the menu, and host and cook information
initRestLabel
{ "repo_name": "CMCammarano/CSCI-201-Restaurant-Project", "path": "src/gui/panels/RestaurantPanel.java", "license": "mit", "size": 6132 }
[ "java.awt.BorderLayout", "javax.swing.BorderFactory", "javax.swing.JLabel" ]
import java.awt.BorderLayout; import javax.swing.BorderFactory; import javax.swing.JLabel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,376,433
EAttribute getCameraSystem_Alpha_u();
EAttribute getCameraSystem_Alpha_u();
/** * Returns the meta object for the attribute '{@link org.eclipse.papyrus.RobotML.CameraSystem#getAlpha_u <em>Alpha u</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Alpha u</em>'. * @see org.eclipse.papyrus.RobotML.CameraSystem#getAlpha_u() * @se...
Returns the meta object for the attribute '<code>org.eclipse.papyrus.RobotML.CameraSystem#getAlpha_u Alpha u</code>'.
getCameraSystem_Alpha_u
{ "repo_name": "RobotML/RobotML-SDK-Juno", "path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/RobotMLPackage.java", "license": "epl-1.0", "size": 231818 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
539,176
@Override public void multiSet(final ReadableArray keyValueArray, final Callback callback) { if (keyValueArray.size() == 0) { callback.invoke(AsyncStorageErrorUtil.getInvalidKeyError(null)); return; } new GuardedAsyncTask<Void, Void>(getReactApplicationContext()) ...
void function(final ReadableArray keyValueArray, final Callback callback) { if (keyValueArray.size() == 0) { callback.invoke(AsyncStorageErrorUtil.getInvalidKeyError(null)); return; } new GuardedAsyncTask<Void, Void>(getReactApplicationContext()) {
/** * Inserts multiple (key, value) pairs. If one or more of the pairs cannot be inserted, this will * return AsyncLocalStorageFailure, but all other pairs will have been inserted. The insertion * will replace conflicting (key, value) pairs. */
Inserts multiple (key, value) pairs. If one or more of the pairs cannot be inserted, this will return AsyncLocalStorageFailure, but all other pairs will have been inserted. The insertion will replace conflicting (key, value) pairs
multiSet
{ "repo_name": "exponentjs/exponent", "path": "android/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncStorageModule.java", "license": "bsd-3-clause", "size": 17473 }
[ "com.facebook.react.bridge.Callback", "com.facebook.react.bridge.GuardedAsyncTask", "com.facebook.react.bridge.ReadableArray" ]
import com.facebook.react.bridge.Callback; import com.facebook.react.bridge.GuardedAsyncTask; import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.*;
[ "com.facebook.react" ]
com.facebook.react;
2,415,136
private JComboBox getSeconds() { if (seconds == null) { seconds = new JComboBox(); for (int i = 0; i <= 59; i++) { seconds.addItem(new Integer(i)); } } return seconds; }
JComboBox function() { if (seconds == null) { seconds = new JComboBox(); for (int i = 0; i <= 59; i++) { seconds.addItem(new Integer(i)); } } return seconds; }
/** * This method initializes seconds * * @return javax.swing.JComboBox */
This method initializes seconds
getSeconds
{ "repo_name": "NCIP/cagrid", "path": "cagrid/Software/core/caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/gts/AuthorityWindow.java", "license": "bsd-3-clause", "size": 22405 }
[ "javax.swing.JComboBox" ]
import javax.swing.JComboBox;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,758,240
private void updateHandledItems(@NotNull DeliveryNoteIn deliveryNoteIn) { for (DeliveryNoteRow row : deliveryNoteIn.getRows()) handledItemService.saveHandledItem(row.getHandledItem()); }
void function(@NotNull DeliveryNoteIn deliveryNoteIn) { for (DeliveryNoteRow row : deliveryNoteIn.getRows()) handledItemService.saveHandledItem(row.getHandledItem()); }
/** * * Handled items have been created at the same moment of delivery note's rows, so they must be saved first */
Handled items have been created at the same moment of delivery note's rows, so they must be saved first
updateHandledItems
{ "repo_name": "ProsystemIngegneriAffiliati/censistant", "path": "src/main/java/com/prosystemingegneri/censistant/business/deliveryNote/boundary/DeliveryNoteInService.java", "license": "agpl-3.0", "size": 8588 }
[ "com.prosystemingegneri.censistant.business.deliveryNote.entity.DeliveryNoteIn", "com.prosystemingegneri.censistant.business.deliveryNote.entity.DeliveryNoteRow", "javax.validation.constraints.NotNull" ]
import com.prosystemingegneri.censistant.business.deliveryNote.entity.DeliveryNoteIn; import com.prosystemingegneri.censistant.business.deliveryNote.entity.DeliveryNoteRow; import javax.validation.constraints.NotNull;
import com.prosystemingegneri.censistant.business.*; import javax.validation.constraints.*;
[ "com.prosystemingegneri.censistant", "javax.validation" ]
com.prosystemingegneri.censistant; javax.validation;
454,285
public static boolean saveImage(BufferedImage image, String toFileName, int type) { try { return ImageIO.write(image, type == IMAGE_JPEG ? "jpg" : "png", new File(toFileName)); } catch (IOException e) { throw new ForumException(e); } }
static boolean function(BufferedImage image, String toFileName, int type) { try { return ImageIO.write(image, type == IMAGE_JPEG ? "jpg" : "png", new File(toFileName)); } catch (IOException e) { throw new ForumException(e); } }
/** * Saves an image to the disk. * * @param image The image to save * @param toFileName The filename to use * @param type The image type. Use <code>ImageUtils.IMAGE_JPEG</code> to save as JPEG images, or <code>ImageUtils.IMAGE_PNG</code> to save as PNG. * @return <code>false</code> if no appropriate writer...
Saves an image to the disk
saveImage
{ "repo_name": "mingyaaaa/jforum3", "path": "src/main/java/net/jforum/util/ImageUtils.java", "license": "lgpl-2.1", "size": 10099 }
[ "java.awt.image.BufferedImage", "java.io.File", "java.io.IOException", "javax.imageio.ImageIO", "net.jforum.core.exceptions.ForumException" ]
import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import net.jforum.core.exceptions.ForumException;
import java.awt.image.*; import java.io.*; import javax.imageio.*; import net.jforum.core.exceptions.*;
[ "java.awt", "java.io", "javax.imageio", "net.jforum.core" ]
java.awt; java.io; javax.imageio; net.jforum.core;
2,913,568
void onTxStart(Transaction tx, int idx); } protected class TxCallbackAdapter implements TxCallback { private Map<Integer, IgniteUuid> txMap = new ConcurrentHashMap<>(); private Map<IgniteUuid, Integer> revTxMap = new ConcurrentHashMap<>();
void onTxStart(Transaction tx, int idx); } protected class TxCallbackAdapter implements TxCallback { private Map<Integer, IgniteUuid> txMap = new ConcurrentHashMap<>(); private Map<IgniteUuid, Integer> revTxMap = new ConcurrentHashMap<>();
/** * Called when transaction got an order assignment. * * @param tx Tx. * @param idx Index. */
Called when transaction got an order assignment
onTxStart
{ "repo_name": "andrey-kuznetsov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxPartitionCounterStateAbstractTest.java", "license": "apache-2.0", "size": 41925 }
[ "java.util.Map", "java.util.concurrent.ConcurrentHashMap", "org.apache.ignite.lang.IgniteUuid", "org.apache.ignite.transactions.Transaction" ]
import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.ignite.lang.IgniteUuid; import org.apache.ignite.transactions.Transaction;
import java.util.*; import java.util.concurrent.*; import org.apache.ignite.lang.*; import org.apache.ignite.transactions.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,427,804
public ModifiableSolrParams getInvariantParams() { return invariantParams; }
ModifiableSolrParams function() { return invariantParams; }
/** * Retrieve the default list of parameters are added to every request * regardless. * * @see #invariantParams */
Retrieve the default list of parameters are added to every request regardless
getInvariantParams
{ "repo_name": "halentest/solr", "path": "solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java", "license": "apache-2.0", "size": 22418 }
[ "org.apache.solr.common.params.ModifiableSolrParams" ]
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.*;
[ "org.apache.solr" ]
org.apache.solr;
3,765
public void deleteInstructors(AttributesDeletionQuery query) { assert query != null; if (query.isCourseIdPresent()) { List<Instructor> instructorsToDelete = load().filter("courseId =", query.getCourseId()).list(); getSearchManager().deleteDocuments( instr...
void function(AttributesDeletionQuery query) { assert query != null; if (query.isCourseIdPresent()) { List<Instructor> instructorsToDelete = load().filter(STR, query.getCourseId()).list(); getSearchManager().deleteDocuments( instructorsToDelete.stream() .map(Instructor::getUniqueId) .collect(Collectors.toList())); dele...
/** * Deletes instructors using {@link AttributesDeletionQuery}. */
Deletes instructors using <code>AttributesDeletionQuery</code>
deleteInstructors
{ "repo_name": "TEAMMATES/teammates", "path": "src/main/java/teammates/storage/api/InstructorsDb.java", "license": "gpl-2.0", "size": 16379 }
[ "com.googlecode.objectify.Key", "java.util.List", "java.util.stream.Collectors" ]
import com.googlecode.objectify.Key; import java.util.List; import java.util.stream.Collectors;
import com.googlecode.objectify.*; import java.util.*; import java.util.stream.*;
[ "com.googlecode.objectify", "java.util" ]
com.googlecode.objectify; java.util;
2,901,359
protected void setFields(Vector fields) throws XMLMarshalException { throw XMLMarshalException.operationNotSupported("setField(Vector fields)"); }
void function(Vector fields) throws XMLMarshalException { throw XMLMarshalException.operationNotSupported(STR); }
/** * INTERNAL: * Setting fields vector will not update the document so this is not supported */
Setting fields vector will not update the document so this is not supported
setFields
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/record/DOMRecord.java", "license": "epl-1.0", "size": 29768 }
[ "java.util.Vector", "org.eclipse.persistence.exceptions.XMLMarshalException" ]
import java.util.Vector; import org.eclipse.persistence.exceptions.XMLMarshalException;
import java.util.*; import org.eclipse.persistence.exceptions.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
2,560,950
Requires newRequires(Set<Requires.Modifier> ms, String mn, Version v); /** * Returns an unqualified {@code ModuleDescriptor.Exports}
Requires newRequires(Set<Requires.Modifier> ms, String mn, Version v); /** * Returns an unqualified {@code ModuleDescriptor.Exports}
/** * Returns a {@code ModuleDescriptor.Requires} of the given modifiers * and module name. */
Returns a ModuleDescriptor.Requires of the given modifiers and module name
newRequires
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jdk/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java", "license": "gpl-2.0", "size": 5276 }
[ "java.lang.module.ModuleDescriptor", "java.util.Set" ]
import java.lang.module.ModuleDescriptor; import java.util.Set;
import java.lang.module.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
508,606
private void broadcastTimerTick() { // For each Player, send all per Player buffered // DrawMessages, prefixing each DrawMessage with the player's // lastReceivedMessageId. // Multiple messages are concatenated with "|". for (Player p : players) { String...
void function() { for (Player p : players) { StringBuilder sb = new StringBuilder(); List<DrawMessage> drawMessages = p.getBufferedDrawMessages(); if (drawMessages.size() > 0) { for (int i = 0; i < drawMessages.size(); i++) { DrawMessage msg = drawMessages.get(i); String s = String.valueOf(p.getLastReceivedMessageId())...
/** * Tick handler for the broadcastTimer. */
Tick handler for the broadcastTimer
broadcastTimerTick
{ "repo_name": "february29/Learning", "path": "web/apache-tomcat-9.0.1/webapps/examples/WEB-INF/classes/websocket/drawboard/Room.java", "license": "mit", "size": 16426 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,753,338
public final VnodeName getName() { return name; }
final VnodeName function() { return name; }
/** * Return the name of the virtual node. * * @return The name of the virtual node. */
Return the name of the virtual node
getName
{ "repo_name": "opendaylight/vtn", "path": "manager/implementation/src/main/java/org/opendaylight/vtn/manager/internal/vnode/xml/XmlVNode.java", "license": "epl-1.0", "size": 5444 }
[ "org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.types.rev150209.VnodeName" ]
import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.types.rev150209.VnodeName;
import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.types.rev150209.*;
[ "org.opendaylight.yang" ]
org.opendaylight.yang;
2,719,792
protected Button getButton( DialogOption option ) { return buttonMap.get( option ); }
Button function( DialogOption option ) { return buttonMap.get( option ); }
/** * Get the button for the specified option. * @param option The option that you want a button for. * @return The SWT button for the specified option. */
Get the button for the specified option
getButton
{ "repo_name": "brocade/vTM-eclipse", "path": "plugin/src/com/zeus/eclipsePlugin/swt/dialogs/CustomDialog.java", "license": "bsd-3-clause", "size": 8466 }
[ "com.zeus.eclipsePlugin.swt.dialogs.ZDialog", "org.eclipse.swt.widgets.Button" ]
import com.zeus.eclipsePlugin.swt.dialogs.ZDialog; import org.eclipse.swt.widgets.Button;
import com.zeus.*; import org.eclipse.swt.widgets.*;
[ "com.zeus", "org.eclipse.swt" ]
com.zeus; org.eclipse.swt;
1,026,383
public void updateTable() { ((JarModel) table.getModel()).fireTableDataChanged(); }
void function() { ((JarModel) table.getModel()).fireTableDataChanged(); }
/** * Force an update of the table. */
Force an update of the table
updateTable
{ "repo_name": "argonium/jarman", "path": "src/io/miti/jarman/gui/JarPage.java", "license": "mit", "size": 3365 }
[ "io.miti.jarman.gui.table.JarModel" ]
import io.miti.jarman.gui.table.JarModel;
import io.miti.jarman.gui.table.*;
[ "io.miti.jarman" ]
io.miti.jarman;
1,456,187
ValueList readValuesListScaled(int length) throws IOException;
ValueList readValuesListScaled(int length) throws IOException;
/** * Reads from the data file beginning at the current position of the file * pointer and presents the data as a ValuesList object. The data values are * scaled according to baseline and lsbValue. * * value = (ADCout - baseline) * lsbValue. * * @param length * number of rows to read * @r...
Reads from the data file beginning at the current position of the file pointer and presents the data as a ValuesList object. The data values are scaled according to baseline and lsbValue. value = (ADCout - baseline) * lsbValue
readValuesListScaled
{ "repo_name": "Unisens/unisens4java", "path": "src/main/java/org/unisens/ValuesEntry.java", "license": "lgpl-3.0", "size": 4523 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
704,371
private String[] translateKey(String key) { String[] x = getTranslationMap().get(key); if (x == null) { x = new String[] { StringUtils.sanitizeCamelCase(key) }; } return x; } private Map<String, String[]> translateMeta = null;
String[] function(String key) { String[] x = getTranslationMap().get(key); if (x == null) { x = new String[] { StringUtils.sanitizeCamelCase(key) }; } return x; } private Map<String, String[]> translateMeta = null;
/** * normalize metadata from various filetypes this method will return an * array of metadata keys that we can use to normalize the values in our * fileAsset metadata For example, tiff:ImageLength = "height" for image * files, so we return {"tiff:ImageLength", "height"} and both metadata are * written to our...
normalize metadata from various filetypes this method will return an array of metadata keys that we can use to normalize the values in our fileAsset metadata For example, tiff:ImageLength = "height" for image files, so we return {"tiff:ImageLength", "height"} and both metadata are written to our metadata field
translateKey
{ "repo_name": "austindlawless/dotCMS", "path": "src/com/dotcms/tika/TikaUtils.java", "license": "gpl-3.0", "size": 6750 }
[ "com.dotmarketing.util.StringUtils", "java.util.Map" ]
import com.dotmarketing.util.StringUtils; import java.util.Map;
import com.dotmarketing.util.*; import java.util.*;
[ "com.dotmarketing.util", "java.util" ]
com.dotmarketing.util; java.util;
766,172
public static java.util.List extractTumourGroupSiteOverallStagingList(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.TumourGroupSiteOverallStagingVoCollection voCollection) { return extractTumourGroupSiteOverallStagingList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.TumourGroupSiteOverallStagingVoCollection voCollection) { return extractTumourGroupSiteOverallStagingList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.oncology.configuration.domain.objects.TumourGroupSiteOverallStaging list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.oncology.configuration.domain.objects.TumourGroupSiteOverallStaging list from the value object collection
extractTumourGroupSiteOverallStagingList
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/clinicaladmin/vo/domain/TumourGroupSiteOverallStagingVoAssembler.java", "license": "agpl-3.0", "size": 24973 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,333,272
private static Consumersurveys getConsumerSurverysService( String serviceAccount) throws Exception { GoogleCredential credential = new GoogleCredential.Builder() .setTransport(HTTP_TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(serviceAccount) .setServi...
static Consumersurveys function( String serviceAccount) throws Exception { GoogleCredential credential = new GoogleCredential.Builder() .setTransport(HTTP_TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(serviceAccount) .setServiceAccountPrivateKeyFromP12File(new File(PRIVATE_KEY)) .setServiceAccountScopes...
/** * Creates a Consumersurveys service to send the HTTP requests. * @param serviceAccount The service account we are using for authenication. * return A Consumersurveys service for sending HTTP requests. */
Creates a Consumersurveys service to send the HTTP requests
getConsumerSurverysService
{ "repo_name": "riseofthetigers/consumer-surveys", "path": "java/com/google/api/services/consumersurveys/App.java", "license": "apache-2.0", "size": 13616 }
[ "com.google.api.client.googleapis.auth.oauth2.GoogleCredential", "com.google.api.services.consumersurveys.Consumersurveys", "java.io.File" ]
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.services.consumersurveys.Consumersurveys; import java.io.File;
import com.google.api.client.googleapis.auth.oauth2.*; import com.google.api.services.consumersurveys.*; import java.io.*;
[ "com.google.api", "java.io" ]
com.google.api; java.io;
2,159,199
public double presentValueSensitivityStrike( CmsPeriod cmsPeriod, RatesProvider provider, SabrSwaptionVolatilities swaptionVolatilities) { ArgChecker.isFalse( cmsPeriod.getCmsPeriodType().equals(CmsPeriodType.COUPON), "presentValueSensitivityStrike is not relevant for CMS coupon...
double function( CmsPeriod cmsPeriod, RatesProvider provider, SabrSwaptionVolatilities swaptionVolatilities) { ArgChecker.isFalse( cmsPeriod.getCmsPeriodType().equals(CmsPeriodType.COUPON), STR); Currency ccy = cmsPeriod.getCurrency(); SwapIndex index = cmsPeriod.getIndex(); if (provider.getValuationDate().isAfter(cmsP...
/** * Computes the present value sensitivity to strike by replication in SABR framework with extrapolation on the right. * * @param cmsPeriod the CMS * @param provider the rates provider * @param swaptionVolatilities the swaption volatilities * @return the present value sensitivity */
Computes the present value sensitivity to strike by replication in SABR framework with extrapolation on the right
presentValueSensitivityStrike
{ "repo_name": "OpenGamma/Strata", "path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/cms/SabrExtrapolationReplicationCmsPeriodPricer.java", "license": "apache-2.0", "size": 39585 }
[ "com.opengamma.strata.basics.currency.Currency", "com.opengamma.strata.collect.ArgChecker", "com.opengamma.strata.collect.Messages", "com.opengamma.strata.math.impl.integration.RungeKuttaIntegrator1D", "com.opengamma.strata.pricer.rate.RatesProvider", "com.opengamma.strata.pricer.swaption.SabrSwaptionVola...
import com.opengamma.strata.basics.currency.Currency; import com.opengamma.strata.collect.ArgChecker; import com.opengamma.strata.collect.Messages; import com.opengamma.strata.math.impl.integration.RungeKuttaIntegrator1D; import com.opengamma.strata.pricer.rate.RatesProvider; import com.opengamma.strata.pricer.swaption...
import com.opengamma.strata.basics.currency.*; import com.opengamma.strata.collect.*; import com.opengamma.strata.math.impl.integration.*; import com.opengamma.strata.pricer.rate.*; import com.opengamma.strata.pricer.swaption.*; import com.opengamma.strata.product.cms.*; import com.opengamma.strata.product.swap.*; impo...
[ "com.opengamma.strata", "java.time", "java.util" ]
com.opengamma.strata; java.time; java.util;
1,021,241
public ISarlEnumerationBuilder addSarlEnumeration(String name) { return this.builder.addSarlEnumeration(name); }
ISarlEnumerationBuilder function(String name) { return this.builder.addSarlEnumeration(name); }
/** Create a SarlEnumeration. * @param name - the name of the SarlEnumeration. * @return the builder. */
Create a SarlEnumeration
addSarlEnumeration
{ "repo_name": "jgfoster/sarl", "path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/SarlInterfaceSourceAppender.java", "license": "apache-2.0", "size": 6955 }
[ "io.sarl.lang.codebuilder.builders.ISarlEnumerationBuilder" ]
import io.sarl.lang.codebuilder.builders.ISarlEnumerationBuilder;
import io.sarl.lang.codebuilder.builders.*;
[ "io.sarl.lang" ]
io.sarl.lang;
1,326,056
public void deleteItem(ItemId itemId, DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences) throws Exception { List<ItemId> itemIdArray = new ArrayList<ItemId>(); itemIdArray.add(itemId); EwsUtilities.validateParam(itemId, "itemId"); ...
void function(ItemId itemId, DeleteMode deleteMode, SendCancellationsMode sendCancellationsMode, AffectedTaskOccurrence affectedTaskOccurrences) throws Exception { List<ItemId> itemIdArray = new ArrayList<ItemId>(); itemIdArray.add(itemId); EwsUtilities.validateParam(itemId, STR); this.internalDeleteItems(itemIdArray, ...
/** * Deletes an item. Calling this method results in a call to EWS. * * @param itemId the item id * @param deleteMode the delete mode * @param sendCancellationsMode the send cancellations mode * @param affectedTaskOccurrences the affected task occurrences * @throws ...
Deletes an item. Calling this method results in a call to EWS
deleteItem
{ "repo_name": "xvronny/ews-java-api", "path": "src/main/java/microsoft/exchange/webservices/data/core/ExchangeService.java", "license": "mit", "size": 161280 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,478,675
@Override protected void doGet(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { Map<String, Object> referenceMap = new HashMap<String, Object>(); checkLocaleAttributesForFirstTime(httpRequest); // we need to save current user language in refe...
void function(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException { Map<String, Object> referenceMap = new HashMap<String, Object>(); checkLocaleAttributesForFirstTime(httpRequest); if (httpRequest.getSession().getAttribute(FilterUtil.LOCALE_ATTRIBUTE) != null) { refer...
/** * Called by {@link #doFilter(ServletRequest, ServletResponse, FilterChain)} on GET requests * * @param httpRequest * @param httpResponse */
Called by <code>#doFilter(ServletRequest, ServletResponse, FilterChain)</code> on GET requests
doGet
{ "repo_name": "sadhanvejella/openmrs", "path": "web/src/main/java/org/openmrs/web/filter/update/UpdateFilter.java", "license": "mpl-2.0", "size": 26909 }
[ "java.io.IOException", "java.util.HashMap", "java.util.Map", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.openmrs.web.filter.util.FilterUtil" ]
import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.openmrs.web.filter.util.FilterUtil;
import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.openmrs.web.filter.util.*;
[ "java.io", "java.util", "javax.servlet", "org.openmrs.web" ]
java.io; java.util; javax.servlet; org.openmrs.web;
746,156
public boolean mergeJoinExchange(GridDhtPartitionsExchangeFuture fut) { boolean wait; synchronized (mux) { assert (!isDone() && !initFut.isDone()) || cctx.kernalContext().isStopping() : this; assert (mergedWith == null && state == null) || cctx.kernalContext().isStopping() ...
boolean function(GridDhtPartitionsExchangeFuture fut) { boolean wait; synchronized (mux) { assert (!isDone() && !initFut.isDone()) cctx.kernalContext().isStopping() : this; assert (mergedWith == null && state == null) cctx.kernalContext().isStopping() : this; state = ExchangeLocalState.MERGED; mergedWith = fut; Cluster...
/** * Merges this exchange with given one. * * @param fut Current exchange to merge with. * @return {@code True} if need wait for message from joined server node. */
Merges this exchange with given one
mergeJoinExchange
{ "repo_name": "StalkXT/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java", "license": "apache-2.0", "size": 142871 }
[ "org.apache.ignite.cluster.ClusterNode" ]
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.cluster.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,748,882
protected Object onRequest(ConnectActionServerObject action, Version clientVersion, Object data, @SuppressWarnings("unused") long id) throws Exception { // TODO: change to abstract when deprecated method is removed // Default implementation for compat return onRequest(action, clientVersion, data); } /...
Object function(ConnectActionServerObject action, Version clientVersion, Object data, @SuppressWarnings(STR) long id) throws Exception { return onRequest(action, clientVersion, data); } public ServerObject(int port, boolean ssl) throws IOException { this(port, ssl ? STR" : null); }
/** * This is the method that is called on each client request. * <p> * You are expected to react to it and return an answer (which can be NULL). * * @param action * the client action * @param data * the data sent by the client (which can be NULL) * @param id * an I...
This is the method that is called on each client request. You are expected to react to it and return an answer (which can be NULL)
onRequest
{ "repo_name": "nikiroo/fanfix", "path": "src/be/nikiroo/utils/serial/server/ServerObject.java", "license": "gpl-3.0", "size": 5580 }
[ "be.nikiroo.utils.Version", "java.io.IOException" ]
import be.nikiroo.utils.Version; import java.io.IOException;
import be.nikiroo.utils.*; import java.io.*;
[ "be.nikiroo.utils", "java.io" ]
be.nikiroo.utils; java.io;
559,067
public OffsetDateTime publishedDate() { return this.publishedDate; }
OffsetDateTime function() { return this.publishedDate; }
/** * Get the publishedDate property: The published date of the gallery image version Definition. This property can be * used for decommissioning purposes. This property is updatable. * * @return the publishedDate value. */
Get the publishedDate property: The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable
publishedDate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/CommunityGalleryImageVersionProperties.java", "license": "mit", "size": 2892 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,597,838
public interface IfcHourInDay extends IdEObject { long getWrappedValue();
interface IfcHourInDay extends IdEObject { long function();
/** * Returns the value of the '<em><b>Wrapped Value</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Wrapped Value</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>...
Returns the value of the 'Wrapped Value' attribute. If the meaning of the 'Wrapped Value' attribute isn't clear, there really should be more of a description here...
getWrappedValue
{ "repo_name": "opensourceBIM/BIMserver", "path": "PluginBase/generated/org/bimserver/models/ifc2x3tc1/IfcHourInDay.java", "license": "agpl-3.0", "size": 4046 }
[ "org.bimserver.emf.IdEObject" ]
import org.bimserver.emf.IdEObject;
import org.bimserver.emf.*;
[ "org.bimserver.emf" ]
org.bimserver.emf;
2,743,128
private void adaptToStyleChange(Token token, PropertyChangeEvent event) { boolean propNewValue = false; Object value = event.getNewValue(); if (value instanceof Boolean) propNewValue = ((Boolean)value).booleanValue(); else if (value instanceof String) { String s = (String)value; ...
void function(Token token, PropertyChangeEvent event) { boolean propNewValue = false; Object value = event.getNewValue(); if (value instanceof Boolean) propNewValue = ((Boolean)value).booleanValue(); else if (value instanceof String) { String s = (String)value; if (IPreferenceStore.TRUE.equals(s)) propNewValue = true; ...
/** * is called when style changed */
is called when style changed
adaptToStyleChange
{ "repo_name": "matthias-wolff/dLabPro-Plugin", "path": "Plugin/src/de/tudresden/ias/eclipse/dlabpro/editors/AbstractScanner.java", "license": "lgpl-3.0", "size": 9922 }
[ "de.tudresden.ias.eclipse.dlabpro.preferences.IPreferenceConstants", "org.eclipse.jface.preference.IPreferenceStore", "org.eclipse.jface.text.TextAttribute", "org.eclipse.jface.text.rules.Token", "org.eclipse.jface.util.PropertyChangeEvent" ]
import de.tudresden.ias.eclipse.dlabpro.preferences.IPreferenceConstants; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.TextAttribute; import org.eclipse.jface.text.rules.Token; import org.eclipse.jface.util.PropertyChangeEvent;
import de.tudresden.ias.eclipse.dlabpro.preferences.*; import org.eclipse.jface.preference.*; import org.eclipse.jface.text.*; import org.eclipse.jface.text.rules.*; import org.eclipse.jface.util.*;
[ "de.tudresden.ias", "org.eclipse.jface" ]
de.tudresden.ias; org.eclipse.jface;
2,441,820
String intercept(ActionInvocation invocation) throws Exception;
String intercept(ActionInvocation invocation) throws Exception;
/** * Allows the Interceptor to do some processing on the request before and/or after the rest of the processing of the * request by the {@link ActionInvocation} or to short-circuit the processing and just return a String return code. * * @param invocation the action invocation * @return the re...
Allows the Interceptor to do some processing on the request before and/or after the rest of the processing of the request by the <code>ActionInvocation</code> or to short-circuit the processing and just return a String return code
intercept
{ "repo_name": "WillJiang/WillJiang", "path": "src/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/Interceptor.java", "license": "apache-2.0", "size": 8332 }
[ "com.opensymphony.xwork2.ActionInvocation" ]
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.*;
[ "com.opensymphony.xwork2" ]
com.opensymphony.xwork2;
1,116,098
List<SecurityDocumentExtension> getSecurityDocumentExtensions();
List<SecurityDocumentExtension> getSecurityDocumentExtensions();
/** * SecurityContentExtension extension point can be used to extend the security document content. * * @return registered extensions extending SecurityContentExtension extension point */
SecurityContentExtension extension point can be used to extend the security document content
getSecurityDocumentExtensions
{ "repo_name": "Swagger2Markup/swagger2markup", "path": "openapi2markup/src/main/java/io/github/swagger2markup/extension/OpenAPI2MarkupExtensionRegistry.java", "license": "apache-2.0", "size": 2203 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
673,511
public void testGetEmotionState(){ Mood mood = new Mood(); mood.setEmotionState("Happy"); assertEquals("Happy", mood.getEmotionState()); }
void function(){ Mood mood = new Mood(); mood.setEmotionState("Happy"); assertEquals("Happy", mood.getEmotionState()); }
/** * Tests if getting the mood's emotion state works. */
Tests if getting the mood's emotion state works
testGetEmotionState
{ "repo_name": "TheBurnerGuy/ProjectAttitude", "path": "ProjectAttitude/app/src/test/java/com/projectattitude/projectattitude/MoodTest.java", "license": "mit", "size": 5041 }
[ "com.projectattitude.projectattitude.Objects" ]
import com.projectattitude.projectattitude.Objects;
import com.projectattitude.projectattitude.*;
[ "com.projectattitude.projectattitude" ]
com.projectattitude.projectattitude;
1,001,378
private void cacheBlock(String bpid, long blockId) { FsVolumeImpl volume; String blockFileName; long length, genstamp; Executor volumeExecutor; synchronized (this) { ReplicaInfo info = volumeMap.get(bpid, blockId); boolean success = false; try { if (info == null) { ...
void function(String bpid, long blockId) { FsVolumeImpl volume; String blockFileName; long length, genstamp; Executor volumeExecutor; synchronized (this) { ReplicaInfo info = volumeMap.get(bpid, blockId); boolean success = false; try { if (info == null) { LOG.warn(STR + blockId + STR + bpid + STR); return; } if (info.g...
/** * Asynchronously attempts to cache a single block via {@link FsDatasetCache}. */
Asynchronously attempts to cache a single block via <code>FsDatasetCache</code>
cacheBlock
{ "repo_name": "tianshouzhi/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java", "license": "apache-2.0", "size": 112898 }
[ "java.util.concurrent.Executor", "org.apache.hadoop.hdfs.server.common.HdfsServerConstants", "org.apache.hadoop.hdfs.server.datanode.ReplicaInfo" ]
import java.util.concurrent.Executor; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.hdfs.server.datanode.ReplicaInfo;
import java.util.concurrent.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.datanode.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,681,189
protected synchronized void handleEvent(ClusterEvent event) { HelixManager manager = event.getAttribute("helixmanager"); if (manager == null) { logger.error("No cluster manager in event:" + event.getName()); return; } if (!manager.isLeader()) { logger.error("Cluster manager: " + man...
synchronized void function(ClusterEvent event) { HelixManager manager = event.getAttribute(STR); if (manager == null) { logger.error(STR + event.getName()); return; } if (!manager.isLeader()) { logger.error(STR + manager.getInstanceName() + STR); return; } if (_paused) { logger.info(STR + event.getName()); return; } No...
/** * lock-always: caller always needs to obtain an external lock before call, calls to handleEvent() * should be serialized * @param event */
lock-always: caller always needs to obtain an external lock before call, calls to handleEvent() should be serialized
handleEvent
{ "repo_name": "Teino1978-Corp/Teino1978-Corp-helix", "path": "helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java", "license": "apache-2.0", "size": 26346 }
[ "java.util.List", "org.apache.helix.HelixManager", "org.apache.helix.NotificationContext", "org.apache.helix.controller.pipeline.Pipeline", "org.apache.helix.controller.stages.ClusterEvent", "org.apache.helix.monitoring.mbeans.ClusterStatusMonitor" ]
import java.util.List; import org.apache.helix.HelixManager; import org.apache.helix.NotificationContext; import org.apache.helix.controller.pipeline.Pipeline; import org.apache.helix.controller.stages.ClusterEvent; import org.apache.helix.monitoring.mbeans.ClusterStatusMonitor;
import java.util.*; import org.apache.helix.*; import org.apache.helix.controller.pipeline.*; import org.apache.helix.controller.stages.*; import org.apache.helix.monitoring.mbeans.*;
[ "java.util", "org.apache.helix" ]
java.util; org.apache.helix;
2,770,499
public static Grammar<EncryptedDataContainer> getInstance() { return instance; }
static Grammar<EncryptedDataContainer> function() { return instance; }
/** * Get the instance of this grammar * * @return An instance on the EncryptedData Grammar */
Get the instance of this grammar
getInstance
{ "repo_name": "drankye/directory-server", "path": "kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/encryptedData/EncryptedDataGrammar.java", "license": "apache-2.0", "size": 9588 }
[ "org.apache.directory.api.asn1.ber.grammar.Grammar" ]
import org.apache.directory.api.asn1.ber.grammar.Grammar;
import org.apache.directory.api.asn1.ber.grammar.*;
[ "org.apache.directory" ]
org.apache.directory;
934,815
@Test public void testAddCondition_1() throws Exception { ScriptFilter fixture = new ScriptFilter(); fixture.setActions(new HashSet()); fixture.setExternalScriptId(new Integer(1)); fixture.setPersist(true); fixture.setAllConditionsMustPass(true); fixture.s...
void function() throws Exception { ScriptFilter fixture = new ScriptFilter(); fixture.setActions(new HashSet()); fixture.setExternalScriptId(new Integer(1)); fixture.setPersist(true); fixture.setAllConditionsMustPass(true); fixture.setName(STR"); fixture.setConditions(new HashSet()); ScriptFilterCondition condition = n...
/** * Run the void addCondition(ScriptFilterCondition) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 1:34 PM */
Run the void addCondition(ScriptFilterCondition) method test
testAddCondition_1
{ "repo_name": "intuit/Tank", "path": "data_model/src/test/java/com/intuit/tank/project/ScriptFilterTest.java", "license": "epl-1.0", "size": 21962 }
[ "com.intuit.tank.project.ScriptFilter", "com.intuit.tank.project.ScriptFilterCondition", "java.util.HashSet" ]
import com.intuit.tank.project.ScriptFilter; import com.intuit.tank.project.ScriptFilterCondition; import java.util.HashSet;
import com.intuit.tank.project.*; import java.util.*;
[ "com.intuit.tank", "java.util" ]
com.intuit.tank; java.util;
210,517