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
static DoublesUnionImpl heapifyInstance(final DoublesSketch sketch) { final int k = sketch.getK(); final DoublesUnionImpl union = new DoublesUnionImpl(k); union.maxK_ = k; union.gadget_ = copyToHeap(sketch); return union; }
static DoublesUnionImpl heapifyInstance(final DoublesSketch sketch) { final int k = sketch.getK(); final DoublesUnionImpl union = new DoublesUnionImpl(k); union.maxK_ = k; union.gadget_ = copyToHeap(sketch); return union; }
/** * Returns a Heap DoublesUnion object that has been initialized with the data from the given * sketch. * * @param sketch A DoublesSketch to be used as a source of data only and will not be modified. * @return a DoublesUnion object */
Returns a Heap DoublesUnion object that has been initialized with the data from the given sketch
heapifyInstance
{ "repo_name": "pjain1/sketches-core", "path": "sketches/src/main/java/com/yahoo/sketches/quantiles/DoublesUnionImpl.java", "license": "apache-2.0", "size": 10365 }
[ "com.yahoo.sketches.quantiles.DoublesUtil" ]
import com.yahoo.sketches.quantiles.DoublesUtil;
import com.yahoo.sketches.quantiles.*;
[ "com.yahoo.sketches" ]
com.yahoo.sketches;
21,779
@Override public void doSave(IProgressMonitor progressMonitor) { // Save only resources that have actually changed. // final Map<Object, Object> saveOptions = new HashMap<Object, Object>(); saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); saveOptio...
void function(IProgressMonitor progressMonitor) { saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
/** * This is for implementing {@link IEditorPart} and simply saves the model file. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This is for implementing <code>IEditorPart</code> and simply saves the model file.
doSave
{ "repo_name": "KAMP-Research/KAMP", "path": "bundles/Toometa/toometa.effects.editor/src/effects/presentation/EffectsEditor.java", "license": "apache-2.0", "size": 54859 }
[ "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.emf.ecore.resource.Resource" ]
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.core.runtime.*; import org.eclipse.emf.ecore.resource.*;
[ "org.eclipse.core", "org.eclipse.emf" ]
org.eclipse.core; org.eclipse.emf;
2,271,455
private static void assertInvalidNumericValue( ItemParserException e, String propertyName, String propertyValue ) { assertEquals(e.getErrorKey(), ERROR_ITEMPARSER_ITEM_PROPERTY); String errorPath = PurapConstants.ITEM_TAB_ERRORS; String errorKey = ERROR_ITEMPARSER_INVALID_NUMERIC_VALUE; ...
static void function( ItemParserException e, String propertyName, String propertyValue ) { assertEquals(e.getErrorKey(), ERROR_ITEMPARSER_ITEM_PROPERTY); String errorPath = PurapConstants.ITEM_TAB_ERRORS; String errorKey = ERROR_ITEMPARSER_INVALID_NUMERIC_VALUE; assertTrue(GlobalVariables.getMessageMap().containsMessag...
/** * Asserts true if the specified ItemParserException reports the appropriate error message * with the expected parameters upon invalid numeric value for input item property. * * @param e the specified ItemParserException * @param propertyName the property name for the invalid property...
Asserts true if the specified ItemParserException reports the appropriate error message with the expected parameters upon invalid numeric value for input item property
assertInvalidNumericValue
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "test/unit/src/org/kuali/kfs/module/purap/util/ItemParserTest.java", "license": "agpl-3.0", "size": 10595 }
[ "org.kuali.kfs.module.purap.PurapConstants", "org.kuali.kfs.module.purap.exception.ItemParserException", "org.kuali.rice.krad.util.ErrorMessage", "org.kuali.rice.krad.util.GlobalVariables", "org.springframework.util.AutoPopulatingList" ]
import org.kuali.kfs.module.purap.PurapConstants; import org.kuali.kfs.module.purap.exception.ItemParserException; import org.kuali.rice.krad.util.ErrorMessage; import org.kuali.rice.krad.util.GlobalVariables; import org.springframework.util.AutoPopulatingList;
import org.kuali.kfs.module.purap.*; import org.kuali.kfs.module.purap.exception.*; import org.kuali.rice.krad.util.*; import org.springframework.util.*;
[ "org.kuali.kfs", "org.kuali.rice", "org.springframework.util" ]
org.kuali.kfs; org.kuali.rice; org.springframework.util;
677,935
public static boolean removeAuthors(final Document document) { return DACL.AUTHORS.remove(document); }
static boolean function(final Document document) { return DACL.AUTHORS.remove(document); }
/** * Removes the DACL_AUTHORS item from the source document. * * Does NOT save the document. * * @param document * Document from which to remove the DACL_AUTHORS item. * * @return Flag indicating if the item was successfully removed. */
Removes the DACL_AUTHORS item from the source document. Does NOT save the document
removeAuthors
{ "repo_name": "mariusj/org.openntf.domino", "path": "domino/core/src/main/java/org/openntf/domino/utils/DACL.java", "license": "apache-2.0", "size": 37947 }
[ "org.openntf.domino.Document" ]
import org.openntf.domino.Document;
import org.openntf.domino.*;
[ "org.openntf.domino" ]
org.openntf.domino;
1,938,266
public ModbusTransport getModbusTransport() { return this.modbusRTUTCPTransport; }// getModbusTransport
ModbusTransport function() { return this.modbusRTUTCPTransport; }
/** * Returns the ModbusTransport associated with this TCPMasterConnection. * * @return the connection's ModbusTransport. */
Returns the ModbusTransport associated with this TCPMasterConnection
getModbusTransport
{ "repo_name": "isc-konstanz/OpenMUC", "path": "projects/driver/modbus/src/main/java/org/openmuc/framework/driver/modbus/rtutcp/bonino/RTUTCPMasterConnection.java", "license": "gpl-3.0", "size": 6469 }
[ "com.ghgande.j2mod.modbus.io.ModbusTransport" ]
import com.ghgande.j2mod.modbus.io.ModbusTransport;
import com.ghgande.j2mod.modbus.io.*;
[ "com.ghgande.j2mod" ]
com.ghgande.j2mod;
2,104,613
public static Long getNullableLong(ResultSet rs, String columnName) throws SQLException { long longValue = rs.getLong(columnName); return rs.wasNull() ? null : longValue; }
static Long function(ResultSet rs, String columnName) throws SQLException { long longValue = rs.getLong(columnName); return rs.wasNull() ? null : longValue; }
/** * Returns the long value of a column, or null when appropriate. This method is necessary because * JDBC's {@link ResultSet#getLong} returns {@code 0} if the entry in the database is {@code null}. * * @param rs the result set to read from * @param columnName the name of the column to retriev...
Returns the long value of a column, or null when appropriate. This method is necessary because JDBC's <code>ResultSet#getLong</code> returns 0 if the entry in the database is null
getNullableLong
{ "repo_name": "Maxetto/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/datasource/SqlDataSourceUtils.java", "license": "gpl-3.0", "size": 3225 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,116,862
public ClientConfig setFailureDetectorCatastrophicErrorTypes(List<String> failureDetectorCatastrophicErrorTypes) { this.failureDetectorCatastrophicErrorTypes = failureDetectorCatastrophicErrorTypes; return this; }
ClientConfig function(List<String> failureDetectorCatastrophicErrorTypes) { this.failureDetectorCatastrophicErrorTypes = failureDetectorCatastrophicErrorTypes; return this; }
/** * Sets the exception types that should be treated as catastrophic,by the * failure detector, resulting in the server being immediately considered * down. Input string list should be populated by something like * ConnectException.class.getName() * * @param failureDetectorCatastrophicEr...
Sets the exception types that should be treated as catastrophic,by the failure detector, resulting in the server being immediately considered down. Input string list should be populated by something like ConnectException.class.getName()
setFailureDetectorCatastrophicErrorTypes
{ "repo_name": "cshaxu/voldemort", "path": "src/java/voldemort/client/ClientConfig.java", "license": "apache-2.0", "size": 48632 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
50,649
public void clearEventHandlers(final String event) { if (event == null) { events = new HashMap<String, Set<String>>(); } else { if (events.get(event) != null) { events.get(event).clear(); } } }
void function(final String event) { if (event == null) { events = new HashMap<String, Set<String>>(); } else { if (events.get(event) != null) { events.get(event).clear(); } } }
/** * Clears registered event handlers. * @param event Event name. If null, all event handlers will be removed (optional). */
Clears registered event handlers
clearEventHandlers
{ "repo_name": "suhuanzheng7784877/story", "path": "website/story/src/com/ckeditor/EventHandler.java", "license": "gpl-2.0", "size": 1511 }
[ "java.util.HashMap", "java.util.Set" ]
import java.util.HashMap; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,754,443
public static void registerEntityShader(Class<? extends Entity> entityClass, ResourceLocation shader) { entityShaderMap.put(entityClass, shader); }
static void function(Class<? extends Entity> entityClass, ResourceLocation shader) { entityShaderMap.put(entityClass, shader); }
/** * Register a shader for an entity. This shader gets activated when a spectator begins spectating an entity. * Vanilla examples of this are the green effect for creepers and the invert effect for endermen. * * @param entityClass * @param shader */
Register a shader for an entity. This shader gets activated when a spectator begins spectating an entity. Vanilla examples of this are the green effect for creepers and the invert effect for endermen
registerEntityShader
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraftforge/fml/client/registry/ClientRegistry.java", "license": "gpl-3.0", "size": 2789 }
[ "net.minecraft.entity.Entity", "net.minecraft.util.ResourceLocation" ]
import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation;
import net.minecraft.entity.*; import net.minecraft.util.*;
[ "net.minecraft.entity", "net.minecraft.util" ]
net.minecraft.entity; net.minecraft.util;
2,535,569
public String getAccountName() { return getValues().getAsString(RawContacts.ACCOUNT_NAME); }
String function() { return getValues().getAsString(RawContacts.ACCOUNT_NAME); }
/** * Returns the account name of the raw contact. */
Returns the account name of the raw contact
getAccountName
{ "repo_name": "miswenwen/My_bird_work", "path": "Bird_work/我的项目/Contacts/Contacts_liuqipeng/src/com/yunos/alicontacts/model/RawContact.java", "license": "apache-2.0", "size": 8838 }
[ "android.provider.ContactsContract" ]
import android.provider.ContactsContract;
import android.provider.*;
[ "android.provider" ]
android.provider;
257,641
public static String getAsterixDBOutputDataset(Configuration conf) { return conf.get(PregelixJob.ASTERIXDB_OUTPUT_DATASET); }
static String function(Configuration conf) { return conf.get(PregelixJob.ASTERIXDB_OUTPUT_DATASET); }
/** * Gets AsterixDB output dataset name. */
Gets AsterixDB output dataset name
getAsterixDBOutputDataset
{ "repo_name": "sigmod/asterixdb-analytics", "path": "pregelix/pregelix-api/src/main/java/edu/uci/ics/pregelix/api/util/BspUtils.java", "license": "apache-2.0", "size": 39926 }
[ "edu.uci.ics.pregelix.api.job.PregelixJob", "org.apache.hadoop.conf.Configuration" ]
import edu.uci.ics.pregelix.api.job.PregelixJob; import org.apache.hadoop.conf.Configuration;
import edu.uci.ics.pregelix.api.job.*; import org.apache.hadoop.conf.*;
[ "edu.uci.ics", "org.apache.hadoop" ]
edu.uci.ics; org.apache.hadoop;
1,979,124
EAttribute getILabResult_TransmissionTime();
EAttribute getILabResult_TransmissionTime();
/** * Returns the meta object for the attribute '{@link ch.elexis.core.model.ILabResult#getTransmissionTime <em>Transmission Time</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Transmission Time</em>'. * @see ch.elexis.core.model.ILabResult#getTransm...
Returns the meta object for the attribute '<code>ch.elexis.core.model.ILabResult#getTransmissionTime Transmission Time</code>'.
getILabResult_TransmissionTime
{ "repo_name": "sazgin/elexis-3-core", "path": "ch.elexis.core/src-gen/ch/elexis/core/model/ModelPackage.java", "license": "epl-1.0", "size": 108231 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,368,561
public static LocalFileSystem newInstanceLocal(Configuration conf) throws IOException { return (LocalFileSystem)newInstance(LocalFileSystem.NAME, conf); }
static LocalFileSystem function(Configuration conf) throws IOException { return (LocalFileSystem)newInstance(LocalFileSystem.NAME, conf); }
/** * Get a unique local file system object * @param conf the configuration to configure the file system with * @return a LocalFileSystem * This always returns a new FileSystem object. */
Get a unique local file system object
newInstanceLocal
{ "repo_name": "joyghosh/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java", "license": "gpl-3.0", "size": 116427 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration;
import java.io.*; import org.apache.hadoop.conf.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,307,743
Container getLibraryDirectoryContainer();
Container getLibraryDirectoryContainer();
/** * Returns the container for the library directory * * @return */
Returns the container for the library directory
getLibraryDirectoryContainer
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.container.service/src/com/ibm/ws/container/service/app/deploy/EARApplicationInfo.java", "license": "epl-1.0", "size": 1032 }
[ "com.ibm.wsspi.adaptable.module.Container" ]
import com.ibm.wsspi.adaptable.module.Container;
import com.ibm.wsspi.adaptable.module.*;
[ "com.ibm.wsspi" ]
com.ibm.wsspi;
2,585,207
static public Element stringToDOM(String s) throws SAXException, IOException { return parse(new InputSource(new StringReader(s))).getDocumentElement(); }
static Element function(String s) throws SAXException, IOException { return parse(new InputSource(new StringReader(s))).getDocumentElement(); }
/** * Parse a String into a DOM. * * @param s * DOCUMENTME * * @return DOCUMENTME * * @throws SAXException * DOCUMENTME * @throws IOException * DOCUMENTME */
Parse a String into a DOM
stringToDOM
{ "repo_name": "TheRingbearer/HAWKS", "path": "ode/utils/src/main/java/org/apache/ode/utils/DOMUtils.java", "license": "apache-2.0", "size": 40920 }
[ "java.io.IOException", "java.io.StringReader", "org.w3c.dom.Element", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.io.StringReader; import org.w3c.dom.Element; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "org.w3c.dom", "org.xml.sax" ]
java.io; org.w3c.dom; org.xml.sax;
1,402,916
Sink sink(File file) throws FileNotFoundException;
Sink sink(File file) throws FileNotFoundException;
/** * Writes to {@code file}, discarding any data already present. Creates parent directories if * necessary. */
Writes to file, discarding any data already present. Creates parent directories if necessary
sink
{ "repo_name": "teffy/okhttp", "path": "okhttp/src/main/java/okhttp3/internal/io/FileSystem.java", "license": "apache-2.0", "size": 4886 }
[ "java.io.File", "java.io.FileNotFoundException" ]
import java.io.File; import java.io.FileNotFoundException;
import java.io.*;
[ "java.io" ]
java.io;
1,856,150
public static void putServiceTicketInRequestScope(final RequestContext context, final ServiceTicket ticketValue) { context.getRequestScope().put(PARAMETER_SERVICE_TICKET_ID, ticketValue.getId()); }
static void function(final RequestContext context, final ServiceTicket ticketValue) { context.getRequestScope().put(PARAMETER_SERVICE_TICKET_ID, ticketValue.getId()); }
/** * Put service ticket in request scope. * * @param context the context * @param ticketValue the ticket value */
Put service ticket in request scope
putServiceTicketInRequestScope
{ "repo_name": "GIP-RECIA/cas", "path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java", "license": "apache-2.0", "size": 37755 }
[ "org.apereo.cas.ticket.ServiceTicket", "org.springframework.webflow.execution.RequestContext" ]
import org.apereo.cas.ticket.ServiceTicket; import org.springframework.webflow.execution.RequestContext;
import org.apereo.cas.ticket.*; import org.springframework.webflow.execution.*;
[ "org.apereo.cas", "org.springframework.webflow" ]
org.apereo.cas; org.springframework.webflow;
2,150,037
@Generated @Selector("reverseTensor:name:") public native MPSGraphTensor reverseTensorName(MPSGraphTensor tensor, String name);
@Selector(STR) native MPSGraphTensor function(MPSGraphTensor tensor, String name);
/** * Create reverse op and return the result tensor * <p> * Reverses a tensor on all axes * https://www.tensorflow.org/api_docs/python/tf/reverse. * * @param tensor Tensor to be reversed * @param name The name for the operation * @return A valid MPSGraphTensor object */
Create reverse op and return the result tensor Reverses a tensor on all axes HREF
reverseTensorName
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/metalperformanceshadersgraph/MPSGraph.java", "license": "apache-2.0", "size": 97735 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,057,636
public Builder hashSymbol(String hashSymbol) { requireNonNull(hashSymbol, "hashSymbol is null"); this.hashSymbol = Optional.of(Optional.of(new SymbolAlias(hashSymbol))); return this; }
Builder function(String hashSymbol) { requireNonNull(hashSymbol, STR); this.hashSymbol = Optional.of(Optional.of(new SymbolAlias(hashSymbol))); return this; }
/** * Matches only if WindowNode.getHashSymbol() is a non-empty option containing hashSymbol. */
Matches only if WindowNode.getHashSymbol() is a non-empty option containing hashSymbol
hashSymbol
{ "repo_name": "haozhun/presto", "path": "presto-main/src/test/java/com/facebook/presto/sql/planner/assertions/WindowMatcher.java", "license": "apache-2.0", "size": 9460 }
[ "java.util.Objects", "java.util.Optional" ]
import java.util.Objects; import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
1,190,523
public static <T> T withDataInputStream(File file, @ClosureParams(value=SimpleType.class, options="java.io.DataInputStream") Closure<T> closure) throws IOException { return IOGroovyMethods.withStream(newDataInputStream(file), closure); }
static <T> T function(File file, @ClosureParams(value=SimpleType.class, options=STR) Closure<T> closure) throws IOException { return IOGroovyMethods.withStream(newDataInputStream(file), closure); }
/** * Create a new DataInputStream for this file and passes it into the closure. * This method ensures the stream is closed after the closure returns. * * @param file a File * @param closure a closure * @return the value returned by the closure * @throws IOException if an IOExcepti...
Create a new DataInputStream for this file and passes it into the closure. This method ensures the stream is closed after the closure returns
withDataInputStream
{ "repo_name": "avafanasiev/groovy", "path": "src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java", "license": "apache-2.0", "size": 117823 }
[ "groovy.lang.Closure", "groovy.transform.stc.ClosureParams", "groovy.transform.stc.SimpleType", "java.io.File", "java.io.IOException" ]
import groovy.lang.Closure; import groovy.transform.stc.ClosureParams; import groovy.transform.stc.SimpleType; import java.io.File; import java.io.IOException;
import groovy.lang.*; import groovy.transform.stc.*; import java.io.*;
[ "groovy.lang", "groovy.transform.stc", "java.io" ]
groovy.lang; groovy.transform.stc; java.io;
218,727
public ValidationResult validateRecord(MapRecord mapRecord) throws Exception;
ValidationResult function(MapRecord mapRecord) throws Exception;
/** * Performs basic checks against: - record with no entries - duplicate map * entries - multiple groups in project with no group structure - higher level * groups without any targets - invalid TRUE rules - advices are valid for the * project. * * @param mapRecord the map record * @return the val...
Performs basic checks against: - record with no entries - duplicate map entries - multiple groups in project with no group structure - higher level groups without any targets - invalid TRUE rules - advices are valid for the project
validateRecord
{ "repo_name": "IHTSDO/OTF-Mapping-Service", "path": "model/src/main/java/org/ihtsdo/otf/mapping/helpers/ProjectSpecificAlgorithmHandler.java", "license": "apache-2.0", "size": 7460 }
[ "org.ihtsdo.otf.mapping.model.MapRecord" ]
import org.ihtsdo.otf.mapping.model.MapRecord;
import org.ihtsdo.otf.mapping.model.*;
[ "org.ihtsdo.otf" ]
org.ihtsdo.otf;
391,370
public BigDecimal getBalance() { BigDecimal retValue = Env.ZERO; return retValue; } // getBalance
BigDecimal function() { BigDecimal retValue = Env.ZERO; return retValue; }
/************************************************************************** * Get Source Currency Balance - subtracts line and tax amounts from total - no rounding * @return positive amount, if total invoice is bigger than lines */
Get Source Currency Balance - subtracts line and tax amounts from total - no rounding
getBalance
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/acct/Doc_AllocationHdr.java", "license": "gpl-2.0", "size": 38003 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
1,474,127
public List<Comment> getComments() { return comments; }
List<Comment> function() { return comments; }
/** * A list of comments. * @return */
A list of comments
getComments
{ "repo_name": "heroicefforts/Viable", "path": "viable-android/src/net/heroicefforts/viable/android/dao/CommentSet.java", "license": "gpl-3.0", "size": 1322 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
383,966
@Override public LogWriter getLogWriter() { return this.logWriter; } private final Thread shutdownHook;
LogWriter function() { return this.logWriter; } private final Thread shutdownHook;
/** * Gets the current instance of LogWriter for logging * * @return the logWriter */
Gets the current instance of LogWriter for logging
getLogWriter
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java", "license": "apache-2.0", "size": 54558 }
[ "org.apache.geode.LogWriter" ]
import org.apache.geode.LogWriter;
import org.apache.geode.*;
[ "org.apache.geode" ]
org.apache.geode;
613,405
@SuppressWarnings("unused") public void checkDeliveryTime(Message message) throws JMSException { long creation = message.getJMSTimestamp(); long min = System.currentTimeMillis() - (offline.max + online.min) * (BROKER_RESTART > 0 ? 4 : 1); if (false && min > creation) { ...
@SuppressWarnings(STR) void function(Message message) throws JMSException { long creation = message.getJMSTimestamp(); long min = System.currentTimeMillis() - (offline.max + online.min) * (BROKER_RESTART > 0 ? 4 : 1); if (false && min > creation) { SimpleDateFormat df = new SimpleDateFormat(STR); exit(STR.checkDelivery...
/** * Checks if the message was not delivered fast enough. */
Checks if the message was not delivered fast enough
checkDeliveryTime
{ "repo_name": "lburgazzoli/apache-activemq-artemis", "path": "tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubProcessWithRestartTest.java", "license": "apache-2.0", "size": 26039 }
[ "java.text.SimpleDateFormat", "javax.jms.JMSException", "javax.jms.Message" ]
import java.text.SimpleDateFormat; import javax.jms.JMSException; import javax.jms.Message;
import java.text.*; import javax.jms.*;
[ "java.text", "javax.jms" ]
java.text; javax.jms;
1,591,524
public Configuration delete(String configId) throws IOException { org.osgi.service.cm.Configuration serviceConfiguration = configurationAdmin.getConfiguration(configId, null); Configuration oldConfiguration = toConfiguration(serviceConfiguration.getProperties()); serviceConfiguration.delete(...
Configuration function(String configId) throws IOException { org.osgi.service.cm.Configuration serviceConfiguration = configurationAdmin.getConfiguration(configId, null); Configuration oldConfiguration = toConfiguration(serviceConfiguration.getProperties()); serviceConfiguration.delete(); return oldConfiguration; }
/** * Deletes a configuration for a config id. * * @param configId config id * @return old config or null if no old config existed * @throws IOException if configuration can not be removed */
Deletes a configuration for a config id
delete
{ "repo_name": "dominicdesu/smarthome", "path": "bundles/io/org.eclipse.smarthome.io.rest.core/src/main/java/org/eclipse/smarthome/io/rest/core/config/ConfigurationService.java", "license": "epl-1.0", "size": 5182 }
[ "java.io.IOException", "org.eclipse.smarthome.config.core.Configuration" ]
import java.io.IOException; import org.eclipse.smarthome.config.core.Configuration;
import java.io.*; import org.eclipse.smarthome.config.core.*;
[ "java.io", "org.eclipse.smarthome" ]
java.io; org.eclipse.smarthome;
1,795,893
private double getHDFSReadTime( long dm, long dn, double ds ) { boolean sparse = MatrixBlock.evalSparseFormatOnDisk(dm, dn, (long)(ds*dm*dn)); double ret = ((double)MatrixBlock.estimateSizeOnDisk((long)dm, (long)dn, (long)(ds*dm*dn))) / (1024*1024); if( sparse ) ret /= DEFAULT_MBS_HDFSREAD_BINARYBLO...
double function( long dm, long dn, double ds ) { boolean sparse = MatrixBlock.evalSparseFormatOnDisk(dm, dn, (long)(ds*dm*dn)); double ret = ((double)MatrixBlock.estimateSizeOnDisk((long)dm, (long)dn, (long)(ds*dm*dn))) / (1024*1024); if( sparse ) ret /= DEFAULT_MBS_HDFSREAD_BINARYBLOCK_SPARSE; else ret /= DEFAULT_MBS_...
/** * Returns the estimated read time from HDFS. * NOTE: Does not handle unknowns. * * @param dm rows? * @param dn columns? * @param ds sparsity factor? * @return estimated HDFS read time */
Returns the estimated read time from HDFS
getHDFSReadTime
{ "repo_name": "sandeep-n/incubator-systemml", "path": "src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java", "license": "apache-2.0", "size": 45647 }
[ "org.apache.sysml.runtime.matrix.data.MatrixBlock" ]
import org.apache.sysml.runtime.matrix.data.MatrixBlock;
import org.apache.sysml.runtime.matrix.data.*;
[ "org.apache.sysml" ]
org.apache.sysml;
2,632,021
protected void popWalker() throws FrontendException { if (walkers.isEmpty()) { throw new FrontendException("No more walkers to pop.", 2221); } currentWalker = walkers.pop(); }
void function() throws FrontendException { if (walkers.isEmpty()) { throw new FrontendException(STR, 2221); } currentWalker = walkers.pop(); }
/** * Pop the next to previous walker off of the stack and set it as the current * walker. This will drop the reference to the current walker. * @throws VisitorException if there are no more walkers on the stack. In * this case the current walker is not reset. */
Pop the next to previous walker off of the stack and set it as the current walker. This will drop the reference to the current walker
popWalker
{ "repo_name": "netxillon/pig", "path": "src/org/apache/pig/newplan/PlanVisitor.java", "license": "apache-2.0", "size": 3057 }
[ "org.apache.pig.impl.logicalLayer.FrontendException" ]
import org.apache.pig.impl.logicalLayer.FrontendException;
import org.apache.pig.impl.*;
[ "org.apache.pig" ]
org.apache.pig;
2,604,195
public static void stopProtectionWithRetainDataOnAzureIaasVm( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager .protectedItems() .define("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1") .withRegion((String) ...
static void function( com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) { manager .protectedItems() .define(STR) .withRegion((String) null) .withExistingProtectionContainer( STR, STR, "Azure", STR) .withProperties( new AzureIaaSComputeVMProtectedItem() .withSourceResourceId( STR) ....
/** * Sample code: Stop Protection with retain data on Azure IaasVm. * * @param manager Entry point to RecoveryServicesBackupManager. */
Sample code: Stop Protection with retain data on Azure IaasVm
stopProtectionWithRetainDataOnAzureIaasVm
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/samples/java/com/azure/resourcemanager/recoveryservicesbackup/generated/ProtectedItemsCreateOrUpdateSamples.java", "license": "mit", "size": 3218 }
[ "com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMProtectedItem", "com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState" ]
import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMProtectedItem; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState;
import com.azure.resourcemanager.recoveryservicesbackup.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,024,593
public void updateScreen() { super.updateScreen(); if (!this.mc.player.isEntityAlive() || this.mc.player.isDead) { this.mc.player.closeScreen(); } } @javax.annotation.Nullable public Slot getSlotUnderMouse() { return this.theSlot; }
void function() { super.updateScreen(); if (!this.mc.player.isEntityAlive() this.mc.player.isDead) { this.mc.player.closeScreen(); } } @javax.annotation.Nullable public Slot getSlotUnderMouse() { return this.theSlot; }
/** * Called from the main game loop to update the screen. */
Called from the main game loop to update the screen
updateScreen
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/inventory/GuiContainer.java", "license": "lgpl-2.1", "size": 29782 }
[ "net.minecraft.inventory.Slot" ]
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.*;
[ "net.minecraft.inventory" ]
net.minecraft.inventory;
1,459,183
public ReportSynthesisSrfProgress saveReportSynthesisSrfProgress(ReportSynthesisSrfProgress reportSynthesisSrfProgress);
ReportSynthesisSrfProgress function(ReportSynthesisSrfProgress reportSynthesisSrfProgress);
/** * This method saves the information of the given reportSynthesisSrfProgress * * @param reportSynthesisSrfProgress - is the reportSynthesisSrfProgress object with the new information to be * added/updated. * @return a number greater than 0 representing the new ID assigned by the database,...
This method saves the information of the given reportSynthesisSrfProgress
saveReportSynthesisSrfProgress
{ "repo_name": "CCAFS/MARLO", "path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ReportSynthesisSrfProgressManager.java", "license": "gpl-3.0", "size": 3406 }
[ "org.cgiar.ccafs.marlo.data.model.ReportSynthesisSrfProgress" ]
import org.cgiar.ccafs.marlo.data.model.ReportSynthesisSrfProgress;
import org.cgiar.ccafs.marlo.data.model.*;
[ "org.cgiar.ccafs" ]
org.cgiar.ccafs;
313,334
public Group[] getAllGroups(String lds, String extraFilter) throws AdminException { Group[] groupsVector = null; Hashtable<String, Group> groupsDone = new Hashtable<String, Group>(); ArrayList<Group> groupsCurrent = new ArrayList<Group>(); Group group = null; String groupId = null; int i...
Group[] function(String lds, String extraFilter) throws AdminException { Group[] groupsVector = null; Hashtable<String, Group> groupsDone = new Hashtable<String, Group>(); ArrayList<Group> groupsCurrent = new ArrayList<Group>(); Group group = null; String groupId = null; int i = 0; groupsVector = getGroups(lds, null, e...
/** * Return all groups * @param ld the LDAP connection * @return all groups * @throws AdminException if an error occur during LDAP operations */
Return all groups
getAllGroups
{ "repo_name": "stephaneperry/Silverpeas-Core", "path": "lib-core/src/main/java/com/stratelia/silverpeas/domains/ldapdriver/AbstractLDAPGroup.java", "license": "agpl-3.0", "size": 18013 }
[ "com.stratelia.webactiv.beans.admin.AdminException", "com.stratelia.webactiv.beans.admin.Group", "java.util.ArrayList", "java.util.Hashtable" ]
import com.stratelia.webactiv.beans.admin.AdminException; import com.stratelia.webactiv.beans.admin.Group; import java.util.ArrayList; import java.util.Hashtable;
import com.stratelia.webactiv.beans.admin.*; import java.util.*;
[ "com.stratelia.webactiv", "java.util" ]
com.stratelia.webactiv; java.util;
559,369
@Metadata(defaultValue = "CACHE_AUTO", label = "consumer", enums = "CACHE_AUTO,CACHE_CONNECTION,CACHE_CONSUMER,CACHE_NONE,CACHE_SESSION", description = "Sets the cache level by name for the underlying JMS resources." + " Possible values are: CACHE_AUTO, CACHE_CONNECTION, CACHE_CONSUM...
@Metadata(defaultValue = STR, label = STR, enums = STR, description = STR + STR + STR) void function(String cacheName) { getConfiguration().setCacheLevelName(cacheName); }
/** * Sets the cache level by name for the underlying JMS resources. * Possible values are: CACHE_AUTO, CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, and CACHE_SESSION. * The default setting is CACHE_AUTO. See the Spring documentation and Transactions Cache Levels for more information. */
Sets the cache level by name for the underlying JMS resources. Possible values are: CACHE_AUTO, CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, and CACHE_SESSION. The default setting is CACHE_AUTO. See the Spring documentation and Transactions Cache Levels for more information
setCacheLevelName
{ "repo_name": "punkhorn/camel-upstream", "path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java", "license": "apache-2.0", "size": 82155 }
[ "org.apache.camel.spi.Metadata" ]
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
219,038
private StringBuffer format2(Map arguments, StringBuffer result, FieldPosition status) { // note: this implementation assumes a fast substring & index. // if this is not true, would be better to append chars one by one. int lastOffset = 0; for (int i = 0; i <= maxOffset; ++i) { re...
StringBuffer function(Map arguments, StringBuffer result, FieldPosition status) { int lastOffset = 0; for (int i = 0; i <= maxOffset; ++i) { result.append(pattern.substring(lastOffset, offsets[i])); lastOffset = offsets[i]; String argumentKey = argumentKeys[i]; if (arguments == null arguments.containsKey(argumentKey) =...
/** * Internal routine used by format. */
Internal routine used by format
format2
{ "repo_name": "cfloersch/Stdlib", "path": "src/main/java/xpertss/text/MapMessageFormat.java", "license": "gpl-2.0", "size": 28628 }
[ "java.text.DateFormat", "java.text.FieldPosition", "java.text.NumberFormat", "java.util.Date", "java.util.Map" ]
import java.text.DateFormat; import java.text.FieldPosition; import java.text.NumberFormat; import java.util.Date; import java.util.Map;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,908,082
@Override public void deployDirectory(File srcFile, File mergeDir, File deployDir, String displayName, boolean overwrite, PluginPackage pluginPackage) throws Exception { super.deployDirectory(srcFile, null, null, displayName, overwrite, pluginPackage); }
void function(File srcFile, File mergeDir, File deployDir, String displayName, boolean overwrite, PluginPackage pluginPackage) throws Exception { super.deployDirectory(srcFile, null, null, displayName, overwrite, pluginPackage); }
/** * overwritten to make it visible * * @see com.liferay.portal.tools.deploy.BaseDeployer#deployDirectory(java.io.File, java.io.File, java.io.File, * java.lang.String, boolean, com.liferay.portal.kernel.plugin.PluginPackage) */
overwritten to make it visible
deployDirectory
{ "repo_name": "mimacom/maven-liferay-plugin", "path": "mimacom-liferay-adapter/mimacom-liferay-adapter-5.2.3/src/main/java/org/mimacom/commons/liferay/adapter523/StandaloneHookDeployer.java", "license": "apache-2.0", "size": 2558 }
[ "com.liferay.portal.kernel.plugin.PluginPackage", "java.io.File" ]
import com.liferay.portal.kernel.plugin.PluginPackage; import java.io.File;
import com.liferay.portal.kernel.plugin.*; import java.io.*;
[ "com.liferay.portal", "java.io" ]
com.liferay.portal; java.io;
2,636,035
@Override public synchronized void handle(HttpExchange client) throws IOException { HashMap<String, String> params = queryToMap(client.getRequestURI().getQuery()); String query = params.get("q"); String meta = params.get("meta"); BufferedReader reader = new BufferedReader(new StringReader(quer...
synchronized void function(HttpExchange client) throws IOException { HashMap<String, String> params = queryToMap(client.getRequestURI().getQuery()); String query = params.get("q"); String meta = params.get("meta"); BufferedReader reader = new BufferedReader(new StringReader(query)); TranslationRequestStream request = n...
/** * Called to handle an HTTP connection. This looks for metadata in the URL string, which is processed * if present. It also then handles returning a JSON-formatted object to the caller. * * @param client the client connection */
Called to handle an HTTP connection. This looks for metadata in the URL string, which is processed if present. It also then handles returning a JSON-formatted object to the caller
handle
{ "repo_name": "fhieber/incubator-joshua", "path": "src/main/java/org/apache/joshua/server/ServerThread.java", "license": "apache-2.0", "size": 10274 }
[ "com.sun.net.httpserver.HttpExchange", "java.io.BufferedReader", "java.io.IOException", "java.io.OutputStream", "java.io.StringReader", "java.util.HashMap", "org.apache.joshua.decoder.Translation", "org.apache.joshua.decoder.TranslationResponseStream", "org.apache.joshua.decoder.io.JSONMessage", "...
import com.sun.net.httpserver.HttpExchange; import java.io.BufferedReader; import java.io.IOException; import java.io.OutputStream; import java.io.StringReader; import java.util.HashMap; import org.apache.joshua.decoder.Translation; import org.apache.joshua.decoder.TranslationResponseStream; import org.apache.joshua.de...
import com.sun.net.httpserver.*; import java.io.*; import java.util.*; import org.apache.joshua.decoder.*; import org.apache.joshua.decoder.io.*;
[ "com.sun.net", "java.io", "java.util", "org.apache.joshua" ]
com.sun.net; java.io; java.util; org.apache.joshua;
1,933,426
@Override public void putAll(Map mapToCopy) { if (mapToCopy instanceof MultiMap) { this.merge((MultiMap) mapToCopy); } else { super.putAll(mapToCopy); } }
void function(Map mapToCopy) { if (mapToCopy instanceof MultiMap) { this.merge((MultiMap) mapToCopy); } else { super.putAll(mapToCopy); } }
/** * Copies all of the mappings from the specified map to this map. This method is equivalent to * {@link MultiHashMap#MultiHashMap(Map)}. NOTE: cannot use Map<? extends K, ? extends V> since * java complains (MultiHashMap not being generic). * * @param mapToCopy mappings to be stored in...
Copies all of the mappings from the specified map to this map. This method is equivalent to java complains (MultiHashMap not being generic)
putAll
{ "repo_name": "mbshopM/openconcerto", "path": "OpenConcerto/src/org/openconcerto/utils/CollectionMap.java", "license": "gpl-3.0", "size": 9529 }
[ "java.util.Map", "org.apache.commons.collections.MultiMap" ]
import java.util.Map; import org.apache.commons.collections.MultiMap;
import java.util.*; import org.apache.commons.collections.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,617,001
@Override protected String getObjectIDFieldName() { return LuceneUtil.LINK_INDEX_FIELDS.LINKID; }
String function() { return LuceneUtil.LINK_INDEX_FIELDS.LINKID; }
/** * Gets the the unique identifier fieldName * @return */
Gets the the unique identifier fieldName
getObjectIDFieldName
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/lucene/index/associatedFields/LinkIndexer.java", "license": "gpl-3.0", "size": 6880 }
[ "com.aurel.track.lucene.LuceneUtil" ]
import com.aurel.track.lucene.LuceneUtil;
import com.aurel.track.lucene.*;
[ "com.aurel.track" ]
com.aurel.track;
1,209,313
public DependencyNode getDependencyGraph() { return rootNode; }
DependencyNode function() { return rootNode; }
/** * Gets the computed dependency graph root node for the Maven project. * * @return the dependency tree root node */
Gets the computed dependency graph root node for the Maven project
getDependencyGraph
{ "repo_name": "kidaa/maven-plugins", "path": "maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/tree/TreeMojo.java", "license": "apache-2.0", "size": 16992 }
[ "org.apache.maven.shared.dependency.graph.DependencyNode" ]
import org.apache.maven.shared.dependency.graph.DependencyNode;
import org.apache.maven.shared.dependency.graph.*;
[ "org.apache.maven" ]
org.apache.maven;
2,745,513
// create the parser org.apache.commons.cli.CommandLineParser parser = new BasicParser(); try { // The required options Options options = new Options(); @SuppressWarnings("static-access") Option configOption = OptionBuilder.withArgName("config").hasArg() .withDescription("path to config file").is...
org.apache.commons.cli.CommandLineParser parser = new BasicParser(); try { Options options = new Options(); @SuppressWarnings(STR) Option configOption = OptionBuilder.withArgName(STR).hasArg() .withDescription(STR).isRequired() .create(STR); options.addOption(configOption); CommandLine line = parser.parse(options, args...
/** * The main application. * * @param args * the args */
The main application
main
{ "repo_name": "JaredHatfield/ebsautosnapshot", "path": "src/main/java/com/unitvectory/ebsautosnapshot/App.java", "license": "apache-2.0", "size": 1959 }
[ "com.amazonaws.util.json.JSONObject", "com.unitvectory.ebsautosnapshot.model.EbsAutoSnapshotConfig", "java.io.File", "org.apache.commons.cli.BasicParser", "org.apache.commons.cli.CommandLine", "org.apache.commons.cli.Option", "org.apache.commons.cli.OptionBuilder", "org.apache.commons.cli.Options", ...
import com.amazonaws.util.json.JSONObject; import com.unitvectory.ebsautosnapshot.model.EbsAutoSnapshotConfig; import java.io.File; import org.apache.commons.cli.BasicParser; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import org.apache.commons.cli.OptionBuilder; import org.apache.c...
import com.amazonaws.util.json.*; import com.unitvectory.ebsautosnapshot.model.*; import java.io.*; import org.apache.commons.cli.*; import org.apache.commons.io.*;
[ "com.amazonaws.util", "com.unitvectory.ebsautosnapshot", "java.io", "org.apache.commons" ]
com.amazonaws.util; com.unitvectory.ebsautosnapshot; java.io; org.apache.commons;
523,395
public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) { if (entityLiving instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer) entityLiving; entityplayer.getFoodStats().addStats(this.food, this.saturation); worldIn...
ItemStack function(ItemStack stack, World worldIn, EntityLivingBase entityLiving) { if (entityLiving instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer) entityLiving; entityplayer.getFoodStats().addStats(this.food, this.saturation); worldIn.playSound(null, entityplayer.posX, entityplayer.posY, entityp...
/** * Called when the player finishes using this Item (E.g. finishes eating.). Not called when the player stops using * the Item before the action is complete. */
Called when the player finishes using this Item (E.g. finishes eating.). Not called when the player stops using the Item before the action is complete
onItemUseFinish
{ "repo_name": "BetterWithMods/BetterWithMods", "path": "src/main/java/betterwithmods/common/items/ItemBlockEdible.java", "license": "mit", "size": 3480 }
[ "net.minecraft.advancements.CriteriaTriggers", "net.minecraft.entity.EntityLivingBase", "net.minecraft.entity.player.EntityPlayer", "net.minecraft.entity.player.EntityPlayerMP", "net.minecraft.init.SoundEvents", "net.minecraft.item.ItemStack", "net.minecraft.stats.StatList", "net.minecraft.util.SoundC...
import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.SoundEvents; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; import ne...
import net.minecraft.advancements.*; import net.minecraft.entity.*; import net.minecraft.entity.player.*; import net.minecraft.init.*; import net.minecraft.item.*; import net.minecraft.stats.*; import net.minecraft.util.*; import net.minecraft.world.*;
[ "net.minecraft.advancements", "net.minecraft.entity", "net.minecraft.init", "net.minecraft.item", "net.minecraft.stats", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.advancements; net.minecraft.entity; net.minecraft.init; net.minecraft.item; net.minecraft.stats; net.minecraft.util; net.minecraft.world;
2,442,536
public static String addTagAsTagEncoding(TDTEngine tdt, ECReportGroupListMember groupMember, Tag tag) { try { String bin = getBinaryRepresentation(tag); if (null != bin) { EPC epc = new EPC(); final String converted = convert_to_TAG_ENCODING(tag.getTagLength(), tag.getFilter(), tag.getCompanyPrefixLe...
static String function(TDTEngine tdt, ECReportGroupListMember groupMember, Tag tag) { try { String bin = getBinaryRepresentation(tag); if (null != bin) { EPC epc = new EPC(); final String converted = convert_to_TAG_ENCODING(tag.getTagLength(), tag.getFilter(), tag.getCompanyPrefixLength(), bin, tdt); epc.setValue(conve...
/** * add a tag in tag encoding format to the group member. the given tag must be submitted with the binary format. * @param tdt the TDT to be used for the transformation from binary to tag encoding representation. * @param groupMember the group member where to add the transformed tag. * @param tag the tag to b...
add a tag in tag encoding format to the group member. the given tag must be submitted with the binary format
addTagAsTagEncoding
{ "repo_name": "yalewkidane/Oliot-FC", "path": "fc-server/src/main/java/org/fosstrak/ale/server/util/TagHelper.java", "license": "lgpl-2.1", "size": 16018 }
[ "org.fosstrak.ale.server.Tag", "org.fosstrak.ale.xsd.ale.epcglobal.ECReportGroupListMember", "org.fosstrak.tdt.TDTEngine" ]
import org.fosstrak.ale.server.Tag; import org.fosstrak.ale.xsd.ale.epcglobal.ECReportGroupListMember; import org.fosstrak.tdt.TDTEngine;
import org.fosstrak.ale.server.*; import org.fosstrak.ale.xsd.ale.epcglobal.*; import org.fosstrak.tdt.*;
[ "org.fosstrak.ale", "org.fosstrak.tdt" ]
org.fosstrak.ale; org.fosstrak.tdt;
1,437,607
public void setLongitude(double value) { if (value > 180 || value < -180) { throw new IllegalArgumentException("longitude can not exceed +/- 180"); } longitude = value; if (active && !Double.isNaN(latitude) && !Double.isNaN(longitude)) { if (!heartbeat.active()) { heartbeat.start(); } else { ...
void function(double value) { if (value > 180 value < -180) { throw new IllegalArgumentException(STR); } longitude = value; if (active && !Double.isNaN(latitude) && !Double.isNaN(longitude)) { if (!heartbeat.active()) { heartbeat.start(); } else { heartbeat.beat(); } } for (LocationListener listener : this.getListeners...
/** * Validates and sets a given longitude value * * @param value the longitude * @throws IllegalArgumentException if value exceeds +-180 */
Validates and sets a given longitude value
setLongitude
{ "repo_name": "gegy1000/PokeGOAPI-Java", "path": "library/src/main/java/com/pokegoapi/api/PokemonGo.java", "license": "gpl-3.0", "size": 21421 }
[ "com.pokegoapi.api.listener.LocationListener" ]
import com.pokegoapi.api.listener.LocationListener;
import com.pokegoapi.api.listener.*;
[ "com.pokegoapi.api" ]
com.pokegoapi.api;
2,887,251
public static Integer createCacheServer() { CacheServer server1 = cache.addCacheServer(); assertNotNull(server1); server1.setPort(0); try { server1.start(); } catch (IOException e) { org.apache.geode.test.dunit.Assert.fail("Failed to start the Server", e); } assertTrue(server1....
static Integer function() { CacheServer server1 = cache.addCacheServer(); assertNotNull(server1); server1.setPort(0); try { server1.start(); } catch (IOException e) { org.apache.geode.test.dunit.Assert.fail(STR, e); } assertTrue(server1.isRunning()); return new Integer(server1.getPort()); }
/** * Method that creates a bridge server * * @return Integer Port on which the server is started. */
Method that creates a bridge server
createCacheServer
{ "repo_name": "prasi-in/geode", "path": "geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java", "license": "apache-2.0", "size": 145148 }
[ "java.io.IOException", "org.apache.geode.cache.server.CacheServer", "org.apache.geode.test.dunit.Assert", "org.junit.Assert" ]
import java.io.IOException; import org.apache.geode.cache.server.CacheServer; import org.apache.geode.test.dunit.Assert; import org.junit.Assert;
import java.io.*; import org.apache.geode.cache.server.*; import org.apache.geode.test.dunit.*; import org.junit.*;
[ "java.io", "org.apache.geode", "org.junit" ]
java.io; org.apache.geode; org.junit;
1,189,207
@Nonnull public WorkbookFunctionsIsTextRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { final WorkbookFunctionsIsTextRequest request = new WorkbookFunctionsIsTextRequest( getRequestUrl(), getClient(), ...
WorkbookFunctionsIsTextRequest function(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { final WorkbookFunctionsIsTextRequest request = new WorkbookFunctionsIsTextRequest( getRequestUrl(), getClient(), requestOptions); request.body = this.body; return request; }
/** * Creates the WorkbookFunctionsIsTextRequest with specific requestOptions instead of the existing requestOptions * * @param requestOptions the options for the request * @return the WorkbookFunctionsIsTextRequest instance */
Creates the WorkbookFunctionsIsTextRequest with specific requestOptions instead of the existing requestOptions
buildRequest
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/WorkbookFunctionsIsTextRequestBuilder.java", "license": "mit", "size": 3429 }
[ "com.microsoft.graph.requests.WorkbookFunctionsIsTextRequest", "javax.annotation.Nonnull" ]
import com.microsoft.graph.requests.WorkbookFunctionsIsTextRequest; import javax.annotation.Nonnull;
import com.microsoft.graph.requests.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
453,719
protected Properties createSessionProperties() { Properties props = new Properties(); props.setProperty(MAIL_TRANSPORT_PROTOCOL, PROTOCOL_SMTP); props.setProperty(MAIL_HOST, host); props.setProperty(MAIL_SMTP_HOST, host); props.setProperty(MAIL_SMTP_PORT, String.valueOf(port)); if (authenticator != nul...
Properties function() { Properties props = new Properties(); props.setProperty(MAIL_TRANSPORT_PROTOCOL, PROTOCOL_SMTP); props.setProperty(MAIL_HOST, host); props.setProperty(MAIL_SMTP_HOST, host); props.setProperty(MAIL_SMTP_PORT, String.valueOf(port)); if (authenticator != null) { props.setProperty(MAIL_SMTP_AUTH, TRU...
/** * Creates mail session properties. */
Creates mail session properties
createSessionProperties
{ "repo_name": "vilmospapp/jodd", "path": "jodd-mail/src/main/java/jodd/mail/SmtpServer.java", "license": "bsd-2-clause", "size": 6672 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
685,795
public void cancel() { finishExpanding(true); clearView(); // reset the gesture detector mSGD = new ScaleGestureDetector(mContext, mScaleGestureListener); }
void function() { finishExpanding(true); clearView(); mSGD = new ScaleGestureDetector(mContext, mScaleGestureListener); }
/** * Use this to abort any pending expansions in progress. */
Use this to abort any pending expansions in progress
cancel
{ "repo_name": "makovkastar/AcDisplay", "path": "project/app/src/main/java/com/achep/acdisplay/services/headsup/ExpandHelper.java", "license": "gpl-2.0", "size": 23965 }
[ "android.view.ScaleGestureDetector" ]
import android.view.ScaleGestureDetector;
import android.view.*;
[ "android.view" ]
android.view;
1,645,201
private void insertData() { for (int i = 0; i < 3; i++) { AuthorEntity authors = factory.manufacturePojo(AuthorEntity.class); em.persist(authors); authorsData.add(authors); } for (int i = 0; i < 3; i++) { EditorialEntity edito...
void function() { for (int i = 0; i < 3; i++) { AuthorEntity authors = factory.manufacturePojo(AuthorEntity.class); em.persist(authors); authorsData.add(authors); } for (int i = 0; i < 3; i++) { EditorialEntity editorial = factory.manufacturePojo(EditorialEntity.class); em.persist(editorial); editorialData.add(editoria...
/** * Inserta los datos iniciales para el correcto funcionamiento de las pruebas. * * @generated */
Inserta los datos iniciales para el correcto funcionamiento de las pruebas
insertData
{ "repo_name": "recursosCSWuniandes/research", "path": "book-store-logic/src/test/java/co/edu/uniandes/csw/bookstore/test/logic/BookLogicTest.java", "license": "mit", "size": 10582 }
[ "co.edu.uniandes.csw.bookstore.entities.AuthorEntity", "co.edu.uniandes.csw.bookstore.entities.BookEntity", "co.edu.uniandes.csw.bookstore.entities.EditorialEntity" ]
import co.edu.uniandes.csw.bookstore.entities.AuthorEntity; import co.edu.uniandes.csw.bookstore.entities.BookEntity; import co.edu.uniandes.csw.bookstore.entities.EditorialEntity;
import co.edu.uniandes.csw.bookstore.entities.*;
[ "co.edu.uniandes" ]
co.edu.uniandes;
438,986
public void setCronTasks(Map<Runnable, String> cronTasks) { this.cronTasks = new ArrayList<CronTask>(); for (Map.Entry<Runnable, String> task : cronTasks.entrySet()) { this.addCronTask(task.getKey(), task.getValue()); } }
void function(Map<Runnable, String> cronTasks) { this.cronTasks = new ArrayList<CronTask>(); for (Map.Entry<Runnable, String> task : cronTasks.entrySet()) { this.addCronTask(task.getKey(), task.getValue()); } }
/** * Specify triggered tasks as a Map of Runnables (the tasks) and cron expressions. * @see CronTrigger */
Specify triggered tasks as a Map of Runnables (the tasks) and cron expressions
setCronTasks
{ "repo_name": "leogoing/spring_jeesite", "path": "spring-context-4.0/org/springframework/scheduling/config/ScheduledTaskRegistrar.java", "license": "apache-2.0", "size": 10984 }
[ "java.util.ArrayList", "java.util.Map" ]
import java.util.ArrayList; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
309,806
public DirContext getDirContext() { return this.dirContext; }
DirContext function() { return this.dirContext; }
/** * Return the actual directory context we are wrapping. */
Return the actual directory context we are wrapping
getDirContext
{ "repo_name": "plumer/codana", "path": "tomcat_files/6.0.43/ProxyDirContext.java", "license": "mit", "size": 61040 }
[ "javax.naming.directory.DirContext" ]
import javax.naming.directory.DirContext;
import javax.naming.directory.*;
[ "javax.naming" ]
javax.naming;
856,232
public FollowLink follow(String relation, Map<String, Object> parameters, String name) { return (FollowLink)new FollowLink(serviceIdExtractor, relation, name, parameters) .setCacheStrategy(cacheStrategy) .setExceptionHandlers(exceptionHandlers) .setLogger(logger); }
FollowLink function(String relation, Map<String, Object> parameters, String name) { return (FollowLink)new FollowLink(serviceIdExtractor, relation, name, parameters) .setCacheStrategy(cacheStrategy) .setExceptionHandlers(exceptionHandlers) .setLogger(logger); }
/** * Creates a follow link action for the forst link with the given relation and name * @param relation Link relation * @param parameters URL parameters * @param name of the link to follow * @return Follow link action */
Creates a follow link action for the forst link with the given relation and name
follow
{ "repo_name": "wcm-io-caravan/caravan-pipeline", "path": "extensions/hal/src/main/java/io/wcm/caravan/pipeline/extensions/hal/client/HalClient.java", "license": "apache-2.0", "size": 14988 }
[ "io.wcm.caravan.pipeline.extensions.hal.client.action.FollowLink", "java.util.Map" ]
import io.wcm.caravan.pipeline.extensions.hal.client.action.FollowLink; import java.util.Map;
import io.wcm.caravan.pipeline.extensions.hal.client.action.*; import java.util.*;
[ "io.wcm.caravan", "java.util" ]
io.wcm.caravan; java.util;
1,925,001
private static void addFooter(final CharArrayWriter caw, final HttpServletRequest request) throws IOException { final HttpSession session = request.getSession(); final AuthenticationContext auth = SessionAttributes.getAuthentication(session); final Formatter formatte...
static void function(final CharArrayWriter caw, final HttpServletRequest request) throws IOException { final HttpSession session = request.getSession(); final AuthenticationContext auth = SessionAttributes.getAuthentication(session); final Formatter formatter = new Formatter(caw); formatter.format(STR); formatter.forma...
/** * Writer the footer to the char array writer. */
Writer the footer to the char array writer
addFooter
{ "repo_name": "jpschewe/fll-sw", "path": "src/main/java/fll/web/FooterFilter.java", "license": "gpl-2.0", "size": 10294 }
[ "jakarta.servlet.http.HttpServletRequest", "jakarta.servlet.http.HttpSession", "java.io.CharArrayWriter", "java.io.IOException", "java.util.Formatter" ]
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpSession; import java.io.CharArrayWriter; import java.io.IOException; import java.util.Formatter;
import jakarta.servlet.http.*; import java.io.*; import java.util.*;
[ "jakarta.servlet.http", "java.io", "java.util" ]
jakarta.servlet.http; java.io; java.util;
1,759,650
protected void analyze( Queue<ClassTree> queue, Queue<Pair<LambdaExpressionTree, Store>> lambdaQueue, UnderlyingAST ast, List<Pair<VariableElement, Value>> fieldValues, ClassTree currentClass, boolean isInitializationCode, boolean u...
void function( Queue<ClassTree> queue, Queue<Pair<LambdaExpressionTree, Store>> lambdaQueue, UnderlyingAST ast, List<Pair<VariableElement, Value>> fieldValues, ClassTree currentClass, boolean isInitializationCode, boolean updateInitializationStore, boolean isStatic) { analyze( queue, lambdaQueue, ast, fieldValues, curr...
/** * Analyze the AST {@code ast} and store the result. * * @param queue * The queue to add more things to scan. * @param fieldValues * The abstract values for all fields of the same class. * @param ast * The AST to analyze. * @param currentC...
Analyze the AST ast and store the result
analyze
{ "repo_name": "Jianchu/checker-framework", "path": "framework/src/org/checkerframework/framework/type/GenericAnnotatedTypeFactory.java", "license": "gpl-2.0", "size": 54494 }
[ "com.sun.source.tree.ClassTree", "com.sun.source.tree.LambdaExpressionTree", "java.util.List", "java.util.Queue", "javax.lang.model.element.VariableElement", "org.checkerframework.dataflow.cfg.UnderlyingAST", "org.checkerframework.javacutil.Pair" ]
import com.sun.source.tree.ClassTree; import com.sun.source.tree.LambdaExpressionTree; import java.util.List; import java.util.Queue; import javax.lang.model.element.VariableElement; import org.checkerframework.dataflow.cfg.UnderlyingAST; import org.checkerframework.javacutil.Pair;
import com.sun.source.tree.*; import java.util.*; import javax.lang.model.element.*; import org.checkerframework.dataflow.cfg.*; import org.checkerframework.javacutil.*;
[ "com.sun.source", "java.util", "javax.lang", "org.checkerframework.dataflow", "org.checkerframework.javacutil" ]
com.sun.source; java.util; javax.lang; org.checkerframework.dataflow; org.checkerframework.javacutil;
546,891
@Override public IComplexNDArray createComplex(int[] shape, int[] stride) { return createComplex(shape, stride, 0); }
IComplexNDArray function(int[] shape, int[] stride) { return createComplex(shape, stride, 0); }
/** * Creates a complex ndarray with the specified shape * * @param shape the shape of the ndarray * @param stride the stride for the ndarray * @return the instance */
Creates a complex ndarray with the specified shape
createComplex
{ "repo_name": "rahulpalamuttam/nd4j", "path": "nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java", "license": "apache-2.0", "size": 59439 }
[ "org.nd4j.linalg.api.complex.IComplexNDArray" ]
import org.nd4j.linalg.api.complex.IComplexNDArray;
import org.nd4j.linalg.api.complex.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
841,536
public BNPoint2 multiply(BigInteger k) { BNPoint2 P = normalize(); if (k.signum() < 0) { k = k.negate(); P = P.negate(); } final byte[] e = k.toByteArray(); final BNPoint2[] mP = new BNPoint2[16]; mP[0] = E.infinity; m...
BNPoint2 function(BigInteger k) { BNPoint2 P = normalize(); if (k.signum() < 0) { k = k.negate(); P = P.negate(); } final byte[] e = k.toByteArray(); final BNPoint2[] mP = new BNPoint2[16]; mP[0] = E.infinity; mP[1] = P; for (int i = 1; i <= 7; i++) { mP[2 * i] = mP[i].twice(1); mP[2 * i + 1] = mP[2 * i].add(P); } BNPo...
/** * Compute k*this * * @param k scalar by which the base point G is to be multiplied * * @return k*this */
Compute k*this
multiply
{ "repo_name": "kevinott/crypto", "path": "org.jcryptool.visual.pairingbd2/src/org/jcryptool/visual/PairingBDII/BNPoint2.java", "license": "epl-1.0", "size": 16560 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
577,187
public BlockVector getBlockPosition() { return blockPos; }
BlockVector function() { return blockPos; }
/** * Get the position of the IC block. * * @return */
Get the position of the IC block
getBlockPosition
{ "repo_name": "Lavan/craftbook", "path": "oldsrc/commonrefactor/com/sk89q/craftbook/mech/ic/ChipState.java", "license": "gpl-3.0", "size": 4338 }
[ "com.sk89q.craftbook.util.BlockVector" ]
import com.sk89q.craftbook.util.BlockVector;
import com.sk89q.craftbook.util.*;
[ "com.sk89q.craftbook" ]
com.sk89q.craftbook;
2,671,703
public JSONArray names() { JSONArray ja = new JSONArray(); Iterator keys = this.keys(); while (keys.hasNext()) { ja.put(keys.next()); } return ja.length() == 0 ? null : ja; }
JSONArray function() { JSONArray ja = new JSONArray(); Iterator keys = this.keys(); while (keys.hasNext()) { ja.put(keys.next()); } return ja.length() == 0 ? null : ja; }
/** * Produce a JSONArray containing the names of the elements of this * JSONObject. * * @return A JSONArray containing the key strings, or null if the JSONObject * is empty. */
Produce a JSONArray containing the names of the elements of this JSONObject
names
{ "repo_name": "jseger/licensing", "path": "licensing/src/main/java/org/json/JSONObject.java", "license": "mit", "size": 51297 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,220,796
public static void transformAdjacentWedges(World world, int slopeID, int x, int y, int z) { Slope slope_XN = world.getBlock(x - 1, y, z) instanceof BlockCarpentersSlope ? Slope.getSlope(((TEBase) world.getTileEntity(x - 1, y, z))) : null; Slope slope_XP = world.getBlock(x + 1, y, z) instanceof B...
static void function(World world, int slopeID, int x, int y, int z) { Slope slope_XN = world.getBlock(x - 1, y, z) instanceof BlockCarpentersSlope ? Slope.getSlope(((TEBase) world.getTileEntity(x - 1, y, z))) : null; Slope slope_XP = world.getBlock(x + 1, y, z) instanceof BlockCarpentersSlope ? Slope.getSlope(((TEBase)...
/** * Transforms adjacent wedge slopes to connect to source wedge slopeID. */
Transforms adjacent wedge slopes to connect to source wedge slopeID
transformAdjacentWedges
{ "repo_name": "Mineshopper/carpentersblocks", "path": "src/main/java/com/carpentersblocks/util/slope/SlopeTransform.java", "license": "lgpl-2.1", "size": 20914 }
[ "com.carpentersblocks.block.BlockCarpentersSlope", "com.carpentersblocks.data.Slope", "com.carpentersblocks.tileentity.TEBase", "net.minecraft.world.World", "net.minecraftforge.common.util.ForgeDirection" ]
import com.carpentersblocks.block.BlockCarpentersSlope; import com.carpentersblocks.data.Slope; import com.carpentersblocks.tileentity.TEBase; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection;
import com.carpentersblocks.block.*; import com.carpentersblocks.data.*; import com.carpentersblocks.tileentity.*; import net.minecraft.world.*; import net.minecraftforge.common.util.*;
[ "com.carpentersblocks.block", "com.carpentersblocks.data", "com.carpentersblocks.tileentity", "net.minecraft.world", "net.minecraftforge.common" ]
com.carpentersblocks.block; com.carpentersblocks.data; com.carpentersblocks.tileentity; net.minecraft.world; net.minecraftforge.common;
809,900
public void refreshVisuals() { PathNodeFigure nodeFigure = getNodeFigure(); PathNode node = getNode(); if (node instanceof StartPoint) {// If it's a startpoint, update it's type switch (((StartPoint) node).getFailureKind().getValue()) { case FailureKind.NONE: ...
void function() { PathNodeFigure nodeFigure = getNodeFigure(); PathNode node = getNode(); if (node instanceof StartPoint) { switch (((StartPoint) node).getFailureKind().getValue()) { case FailureKind.NONE: ((StartPointFigure) nodeFigure).setType(0, ((StartPoint) node).isLocal()); break; case FailureKind.FAILURE: ((Star...
/** * Refreshes the pathnode and any incoming/outgoing node connections. * * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals() */
Refreshes the pathnode and any incoming/outgoing node connections
refreshVisuals
{ "repo_name": "McGill-DP-Group/seg.jUCMNav", "path": "src/seg/jUCMNav/editparts/PathNodeEditPart.java", "license": "epl-1.0", "size": 29115 }
[ "org.eclipse.draw2d.IFigure", "org.eclipse.draw2d.geometry.Dimension", "org.eclipse.draw2d.geometry.Point", "org.eclipse.draw2d.geometry.Rectangle", "org.eclipse.gef.GraphicalEditPart" ]
import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.draw2d.*; import org.eclipse.draw2d.geometry.*; import org.eclipse.gef.*;
[ "org.eclipse.draw2d", "org.eclipse.gef" ]
org.eclipse.draw2d; org.eclipse.gef;
136,734
@Test public void test_create_retrieve_with_users() throws Exception { // Save organization Organization org = new Organization(); org.setName("test2"); org.setAccessToken("accessToken"); persist(org); List<User> users = new ArrayList<>(); users.ad...
void function() throws Exception { Organization org = new Organization(); org.setName("test2"); org.setAccessToken(STR); persist(org); List<User> users = new ArrayList<>(); users.add(createUser("user1")); users.add(createUser("user2")); org.setUsers(users); for (User user : users) { user.setOrganization(org); persist(u...
/** * Basic create/retrieve test with users. * @throws Exception if an error occurs */
Basic create/retrieve test with users
test_create_retrieve_with_users
{ "repo_name": "VictorEDA/alpha", "path": "src/test/java/org/alpha/entities/OrganizationPersistenceTest.java", "license": "apache-2.0", "size": 2764 }
[ "java.util.ArrayList", "java.util.List", "org.junit.Assert" ]
import java.util.ArrayList; import java.util.List; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
1,461,018
public void setFilteringMode(FilteringMode filteringMode);
void function(FilteringMode filteringMode);
/** * Sets the option filtering mode. * * @param filteringMode * the filtering mode to use */
Sets the option filtering mode
setFilteringMode
{ "repo_name": "oalles/vaadin", "path": "server/src/com/vaadin/ui/AbstractSelect.java", "license": "apache-2.0", "size": 76884 }
[ "com.vaadin.shared.ui.combobox.FilteringMode" ]
import com.vaadin.shared.ui.combobox.FilteringMode;
import com.vaadin.shared.ui.combobox.*;
[ "com.vaadin.shared" ]
com.vaadin.shared;
2,059,883
@Override protected final void emit_unresolved_getstatic(FieldReference fieldRef) { // DIFC: static read barrier NormalMethod barrierMethod = DIFC.addBarriers(method, DIFC.STATIC_READ_BARRIER); if (barrierMethod != null) { asm.emitPUSH_Imm(fieldRef.getId()); // field ref ID genParameterR...
final void function(FieldReference fieldRef) { NormalMethod barrierMethod = DIFC.addBarriers(method, DIFC.STATIC_READ_BARRIER); if (barrierMethod != null) { asm.emitPUSH_Imm(fieldRef.getId()); genParameterRegisterLoad(asm, 1); asm.emitCALL_Abs(Magic.getTocPointer().plus(barrierMethod.getOffset())); } emitDynamicLinking...
/** * Emit code to implement a dynamically linked getstatic * @param fieldRef the referenced field */
Emit code to implement a dynamically linked getstatic
emit_unresolved_getstatic
{ "repo_name": "ut-osa/laminar", "path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/compilers/baseline/ia32/BaselineCompilerImpl.java", "license": "bsd-3-clause", "size": 160544 }
[ "org.jikesrvm.classloader.FieldReference", "org.jikesrvm.classloader.NormalMethod", "org.jikesrvm.compilers.common.assembler.ia32.Assembler", "org.jikesrvm.mm.mminterface.MemoryManagerConstants", "org.jikesrvm.runtime.Magic", "org.jikesrvm.scheduler.DIFC" ]
import org.jikesrvm.classloader.FieldReference; import org.jikesrvm.classloader.NormalMethod; import org.jikesrvm.compilers.common.assembler.ia32.Assembler; import org.jikesrvm.mm.mminterface.MemoryManagerConstants; import org.jikesrvm.runtime.Magic; import org.jikesrvm.scheduler.DIFC;
import org.jikesrvm.classloader.*; import org.jikesrvm.compilers.common.assembler.ia32.*; import org.jikesrvm.mm.mminterface.*; import org.jikesrvm.runtime.*; import org.jikesrvm.scheduler.*;
[ "org.jikesrvm.classloader", "org.jikesrvm.compilers", "org.jikesrvm.mm", "org.jikesrvm.runtime", "org.jikesrvm.scheduler" ]
org.jikesrvm.classloader; org.jikesrvm.compilers; org.jikesrvm.mm; org.jikesrvm.runtime; org.jikesrvm.scheduler;
230,959
public KittingDetail findByPrimaryKey(KittingDetailPk pk) throws KittingDetailDaoException;
KittingDetail function(KittingDetailPk pk) throws KittingDetailDaoException;
/** * Returns the rows from the KittingDetail table that matches the specified primary-key value. */
Returns the rows from the KittingDetail table that matches the specified primary-key value
findByPrimaryKey
{ "repo_name": "rmage/gnvc-ims", "path": "src/java/com/app/wms/engine/db/dao/KittingDetailDao.java", "license": "lgpl-3.0", "size": 3595 }
[ "com.app.wms.engine.db.dto.KittingDetail", "com.app.wms.engine.db.dto.KittingDetailPk", "com.app.wms.engine.db.exceptions.KittingDetailDaoException" ]
import com.app.wms.engine.db.dto.KittingDetail; import com.app.wms.engine.db.dto.KittingDetailPk; import com.app.wms.engine.db.exceptions.KittingDetailDaoException;
import com.app.wms.engine.db.dto.*; import com.app.wms.engine.db.exceptions.*;
[ "com.app.wms" ]
com.app.wms;
2,323,438
protected String getProxyGrantingTicketId(final Map<String, Object> model) { return (String) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET); }
String function(final Map<String, Object> model) { return (String) model.get(CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET); }
/** * Gets the PGT from the model. * * @param model the model * @return the pgt id */
Gets the PGT from the model
getProxyGrantingTicketId
{ "repo_name": "dodok1/cas", "path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java", "license": "apache-2.0", "size": 14825 }
[ "java.util.Map", "org.apereo.cas.CasViewConstants" ]
import java.util.Map; import org.apereo.cas.CasViewConstants;
import java.util.*; import org.apereo.cas.*;
[ "java.util", "org.apereo.cas" ]
java.util; org.apereo.cas;
777,733
public Transition nextTransition(final long instant, final int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); // Find next matching rule. Rule nextRule = null; long nextMillis = Long.MAX_VALUE; Iterator<Rule> it ...
Transition function(final long instant, final int saveMillis) { Chronology chrono = ISOChronology.getInstanceUTC(); Rule nextRule = null; long nextMillis = Long.MAX_VALUE; Iterator<Rule> it = iRules.iterator(); while (it.hasNext()) { Rule rule = it.next(); long next = rule.next(instant, iStandardOffset, saveMillis); if...
/** * Returns null if RuleSet is exhausted or upper limit reached. Calling * this method will throw away rules as they each become * exhausted. Copy the RuleSet before using it to compute transitions. * * Returned transition may be a duplicate from previous * ...
Returns null if RuleSet is exhausted or upper limit reached. Calling this method will throw away rules as they each become exhausted. Copy the RuleSet before using it to compute transitions. Returned transition may be a duplicate from previous transition. Caller must call isTransitionFrom to filter out duplicates
nextTransition
{ "repo_name": "likecool21/joda-time-2.3-Testing", "path": "src/main/java/org/joda/time/tz/DateTimeZoneBuilder.java", "license": "apache-2.0", "size": 64850 }
[ "java.util.Iterator", "org.joda.time.Chronology", "org.joda.time.chrono.ISOChronology" ]
import java.util.Iterator; import org.joda.time.Chronology; import org.joda.time.chrono.ISOChronology;
import java.util.*; import org.joda.time.*; import org.joda.time.chrono.*;
[ "java.util", "org.joda.time" ]
java.util; org.joda.time;
1,081,289
//@VisibleForTesting boolean skipToNextPage(ExtractorInput input, long until) throws IOException, InterruptedException { until = Math.min(until + 3, endPosition); byte[] buffer = new byte[2048]; int peekLength = buffer.length; while (true) { if (input.getPosition() + peekLength > until) ...
throws IOException, InterruptedException { until = Math.min(until + 3, endPosition); byte[] buffer = new byte[2048]; int peekLength = buffer.length; while (true) { if (input.getPosition() + peekLength > until) { peekLength = (int) (until - input.getPosition()); if (peekLength < 4) { return false; } } input.peekFully(bu...
/** * Skips to the next page. Searches for the next page header. * * @param input The {@code ExtractorInput} to skip to the next page. * @param until Searches until this position. * @return true if the next page is found. * @throws IOException thrown if peeking/reading from the input fails. * @thro...
Skips to the next page. Searches for the next page header
skipToNextPage
{ "repo_name": "sanjaysingh1990/radio", "path": "library/core/src/main/java/com/google/android/exoplayer2/extractor/ogg/DefaultOggSeeker.java", "license": "mit", "size": 12203 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
285,923
private void loadCertificates() throws CryptoCardException, BadPinException { // Abrimos el canal si es necesario openSecureChannelIfNotAlreadyOpened(); // Cargamos certificados si es necesario if (this.authCert == null || this.signCert == null) { try { final C...
void function() throws CryptoCardException, BadPinException { openSecureChannelIfNotAlreadyOpened(); if (this.authCert == null this.signCert == null) { try { final CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); final byte[] authCertEncoded = deflate(selectFileByLocationAndRead(this.authCertPa...
/** Carga los certificados del usuario para utilizarlos cuando se desee (si no estaban ya cargados), abriendo el canal seguro de * la tarjeta si fuese necesario, mediante el PIN de usuario. * @throws CryptoCardException Cuando se produce un error en la operaci&oacute;n con la tarjeta * @throws es.gob....
Carga los certificados del usuario para utilizarlos cuando se desee (si no estaban ya cargados), abriendo el canal seguro de la tarjeta si fuese necesario, mediante el PIN de usuario
loadCertificates
{ "repo_name": "venanciolm/afirma-ui-miniapplet_x_x", "path": "afirma_ui_miniapplet/src/main/java/es/gob/jmulticard/card/dnie/Dnie.java", "license": "mit", "size": 36482 }
[ "es.gob.jmulticard.card.BadPinException", "es.gob.jmulticard.card.CryptoCardException", "es.gob.jmulticard.card.iso7816four.Iso7816FourCardException", "java.io.ByteArrayInputStream", "java.io.IOException", "java.security.cert.CertificateException", "java.security.cert.CertificateFactory", "java.securi...
import es.gob.jmulticard.card.BadPinException; import es.gob.jmulticard.card.CryptoCardException; import es.gob.jmulticard.card.iso7816four.Iso7816FourCardException; import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.cert.CertificateException; import java.security.cert.CertificateFact...
import es.gob.jmulticard.card.*; import es.gob.jmulticard.card.iso7816four.*; import java.io.*; import java.security.cert.*;
[ "es.gob.jmulticard", "java.io", "java.security" ]
es.gob.jmulticard; java.io; java.security;
25,502
private HashMap<String, String> getSupplementalUUIds() { javax.xml.xpath.XPath xPath = XPathFactory.newInstance().newXPath(); HashMap<String, String> supplementalUUIdMap = null; try { NodeList nodesElementLookUpAll = (NodeList) xPath.evaluate( XPATH_MEASURE_ELEMENT_LOOKUP_QDM, clonedDoc.getDocumen...
HashMap<String, String> function() { javax.xml.xpath.XPath xPath = XPathFactory.newInstance().newXPath(); HashMap<String, String> supplementalUUIdMap = null; try { NodeList nodesElementLookUpAll = (NodeList) xPath.evaluate( XPATH_MEASURE_ELEMENT_LOOKUP_QDM, clonedDoc.getDocumentElement(), XPathConstants.NODESET); if (n...
/** * Gets the supplemental uu ids. * * @return the supplemental uu ids */
Gets the supplemental uu ids
getSupplementalUUIds
{ "repo_name": "JaLandry/MeasureAuthoringTool_LatestSprint", "path": "mat/src/mat/server/clause/MeasureCloningServiceImpl.java", "license": "apache-2.0", "size": 16038 }
[ "java.util.HashMap", "javax.xml.xpath.XPathConstants", "javax.xml.xpath.XPathExpressionException", "javax.xml.xpath.XPathFactory", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import java.util.HashMap; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import java.util.*; import javax.xml.xpath.*; import org.w3c.dom.*;
[ "java.util", "javax.xml", "org.w3c.dom" ]
java.util; javax.xml; org.w3c.dom;
2,194,544
public ManageableConvention getSingleConvention() { if (getDocuments().size() != 1) { throw new OpenGammaRuntimeException("Expecting zero or single resulting match, and was " + getDocuments().size()); } else { return getDocuments().get(0).getConvention(); } }
ManageableConvention function() { if (getDocuments().size() != 1) { throw new OpenGammaRuntimeException(STR + getDocuments().size()); } else { return getDocuments().get(0).getConvention(); } }
/** * Gets the single result expected from a query. * <p> * This throws an exception if more than 1 result is actually available. * Thus, this method implies an assumption about uniqueness of the queried convention. * * @return the matching convention, not null * @throws IllegalStateException if n...
Gets the single result expected from a query. This throws an exception if more than 1 result is actually available. Thus, this method implies an assumption about uniqueness of the queried convention
getSingleConvention
{ "repo_name": "DevStreet/FinanceAnalytics", "path": "projects/OG-Master/src/main/java/com/opengamma/master/convention/ConventionSearchResult.java", "license": "apache-2.0", "size": 5620 }
[ "com.opengamma.OpenGammaRuntimeException" ]
import com.opengamma.OpenGammaRuntimeException;
import com.opengamma.*;
[ "com.opengamma" ]
com.opengamma;
1,751,622
public void write(PrintWriter writer) { write(writer, ""); }
void function(PrintWriter writer) { write(writer, ""); }
/** * Formats the node and writes it to the specified <code>Writer</code>. */
Formats the node and writes it to the specified <code>Writer</code>
write
{ "repo_name": "paulk-asert/groovy", "path": "src/main/java/org/codehaus/groovy/syntax/CSTNode.java", "license": "apache-2.0", "size": 11635 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,801,948
private void givenPairOfTasksWithDependencyBothWithEqualConstraint( int daysTask1, LocalDate dateEqualConstraintTask1, int daysTask2, LocalDate dateEqualConstraintTask2) { diagramGraphExample = createNiceMock(ICriticalPathCalculable.class); ITaskFundamentalProperties task1 = createTask...
void function( int daysTask1, LocalDate dateEqualConstraintTask1, int daysTask2, LocalDate dateEqualConstraintTask2) { diagramGraphExample = createNiceMock(ICriticalPathCalculable.class); ITaskFundamentalProperties task1 = createTaskWithEqualConstraint(START, daysTask1, dateEqualConstraintTask1); ITaskFundamentalProper...
/** * <pre> * #### T1 #### * |---- #### T2 #### * </pre> */
<code> #### T1 #### |---- #### T2 #### </code>
givenPairOfTasksWithDependencyBothWithEqualConstraint
{ "repo_name": "PaulLuchyn/libreplan", "path": "ganttzk/src/test/java/org/zkoss/ganttz/data/criticalpath/CriticalPathCalculatorTest.java", "license": "agpl-3.0", "size": 132940 }
[ "java.util.Arrays", "java.util.Collections", "java.util.HashSet", "java.util.List", "org.easymock.EasyMock", "org.joda.time.LocalDate", "org.zkoss.ganttz.data.ITaskFundamentalProperties" ]
import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import org.easymock.EasyMock; import org.joda.time.LocalDate; import org.zkoss.ganttz.data.ITaskFundamentalProperties;
import java.util.*; import org.easymock.*; import org.joda.time.*; import org.zkoss.ganttz.data.*;
[ "java.util", "org.easymock", "org.joda.time", "org.zkoss.ganttz" ]
java.util; org.easymock; org.joda.time; org.zkoss.ganttz;
424,987
protected boolean isPersisted(Resource resource) { boolean result = false; try { InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); if (stream != null) { result = true; stream.close(); } } catch (IOException e) { // Ignore } ret...
boolean function(Resource resource) { boolean result = false; try { InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); if (stream != null) { result = true; stream.close(); } } catch (IOException e) { } return result; }
/** * This returns whether something has been persisted to the URI of the specified resource. * The implementation uses the URI converter from the editor's resource set to try to open an input stream. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns whether something has been persisted to the URI of the specified resource. The implementation uses the URI converter from the editor's resource set to try to open an input stream.
isPersisted
{ "repo_name": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl.editor/src-gen/net/mlanoe/language/vhdl/presentation/VhdlEditor.java", "license": "gpl-3.0", "size": 55190 }
[ "java.io.IOException", "java.io.InputStream", "org.eclipse.emf.ecore.resource.Resource" ]
import java.io.IOException; import java.io.InputStream; import org.eclipse.emf.ecore.resource.Resource;
import java.io.*; import org.eclipse.emf.ecore.resource.*;
[ "java.io", "org.eclipse.emf" ]
java.io; org.eclipse.emf;
1,492,758
protected void insertCurrentFundsRecords() { String messageFileName = "org/kuali/kfs/module/ld/testdata/message.properties"; String propertiesFileName = "org/kuali/kfs/module/ld/testdata/accountStatusCurrentFunds.properties"; properties = (new TestDataGenerator(propertiesFileName, me...
void function() { String messageFileName = STR; String propertiesFileName = STR; properties = (new TestDataGenerator(propertiesFileName, messageFileName)).getProperties(); fieldNames = properties.getProperty(STR); documentFieldNames = properties.getProperty(STR); deliminator = properties.getProperty(STR); TestDataGener...
/** * This method will add temporary test data to the Ledger Balance table */
This method will add temporary test data to the Ledger Balance table
insertCurrentFundsRecords
{ "repo_name": "bhutchinson/kfs", "path": "kfs-ld/src/test/java/org/kuali/kfs/module/ld/businessobject/lookup/CurrentFundsLookupableHelperServiceTest.java", "license": "agpl-3.0", "size": 11279 }
[ "java.util.ArrayList", "java.util.List", "org.kuali.kfs.gl.web.TestDataGenerator", "org.kuali.kfs.module.ld.businessobject.LedgerBalance", "org.kuali.kfs.sys.ObjectUtil", "org.kuali.kfs.sys.context.SpringContext", "org.kuali.kfs.sys.context.TestUtils", "org.kuali.rice.krad.service.BusinessObjectServic...
import java.util.ArrayList; import java.util.List; import org.kuali.kfs.gl.web.TestDataGenerator; import org.kuali.kfs.module.ld.businessobject.LedgerBalance; import org.kuali.kfs.sys.ObjectUtil; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.kfs.sys.context.TestUtils; import org.kuali.rice.krad.servi...
import java.util.*; import org.kuali.kfs.gl.web.*; import org.kuali.kfs.module.ld.businessobject.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.krad.service.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
1,848,320
public void testDescendingIteratorRemove() { final LinkedList q = new LinkedList(); q.add(three); q.add(two); q.add(one); Iterator it = q.descendingIterator(); it.next(); it.remove(); it = q.descendingIterator(); assertSame(it.next(), two); ...
void function() { final LinkedList q = new LinkedList(); q.add(three); q.add(two); q.add(one); Iterator it = q.descendingIterator(); it.next(); it.remove(); it = q.descendingIterator(); assertSame(it.next(), two); assertSame(it.next(), three); assertFalse(it.hasNext()); }
/** * descendingIterator.remove removes current element */
descendingIterator.remove removes current element
testDescendingIteratorRemove
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "test/java/util/concurrent/tck/LinkedListTest.java", "license": "gpl-2.0", "size": 18977 }
[ "java.util.Iterator", "java.util.LinkedList" ]
import java.util.Iterator; import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
2,663,982
public Location getFirstSpawn() { return getLocationFromConfiguration(authMeConfiguration, "firstspawn"); }
Location function() { return getLocationFromConfiguration(authMeConfiguration, STR); }
/** * Return the AuthMe first spawn location. * * @return The location of the AuthMe spawn point for first timers */
Return the AuthMe first spawn location
getFirstSpawn
{ "repo_name": "Krokit/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/settings/SpawnLoader.java", "license": "gpl-3.0", "size": 10037 }
[ "org.bukkit.Location" ]
import org.bukkit.Location;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
824,262
public void testOrder2() throws RepositoryException { Session another = getHelper().getReadOnlySession(); try { NodeIterator it = ((Node) another.getItem(testRootNode.getPath())).getNodes(); checkOrder(it, children); } finally { another.logout(); }...
void function() throws RepositoryException { Session another = getHelper().getReadOnlySession(); try { NodeIterator it = ((Node) another.getItem(testRootNode.getPath())).getNodes(); checkOrder(it, children); } finally { another.logout(); } }
/** * Test if the order of Nodes is the same when accessed through another * <code>Session</code>. */
Test if the order of Nodes is the same when accessed through another <code>Session</code>
testOrder2
{ "repo_name": "sdmcraft/jackrabbit", "path": "jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/NodeOrderTest.java", "license": "apache-2.0", "size": 4760 }
[ "javax.jcr.Node", "javax.jcr.NodeIterator", "javax.jcr.RepositoryException", "javax.jcr.Session" ]
import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; import javax.jcr.Session;
import javax.jcr.*;
[ "javax.jcr" ]
javax.jcr;
404,665
void setWarningLevel(CompilerOptions options, String name, CheckLevel level) { DiagnosticGroup group = forName(name); Preconditions.checkNotNull(group, "No warning class for name: %s", name); options.setWarningLevel(group, level); }
void setWarningLevel(CompilerOptions options, String name, CheckLevel level) { DiagnosticGroup group = forName(name); Preconditions.checkNotNull(group, STR, name); options.setWarningLevel(group, level); }
/** * Adds warning levels by name. */
Adds warning levels by name
setWarningLevel
{ "repo_name": "redforks/closure-compiler", "path": "src/com/google/javascript/jscomp/DiagnosticGroups.java", "license": "apache-2.0", "size": 26155 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,253,286
public void testInverselAttachDetach() throws Exception { try { SCOCollectionTests.checkAttachDetach(pmf, Vector2.class, Vector2Item.class, java.util.Vector.class); } finally { clean(V...
void function() throws Exception { try { SCOCollectionTests.checkAttachDetach(pmf, Vector2.class, Vector2Item.class, java.util.Vector.class); } finally { clean(Vector2.class); clean(Vector2Item.class); } }
/** * Test case to check the attach/detach of the container. **/
Test case to check the attach/detach of the container
testInverselAttachDetach
{ "repo_name": "hopecee/texsts", "path": "jdo/identity/src/test/org/datanucleus/tests/types/VectorTest.java", "license": "apache-2.0", "size": 10893 }
[ "org.jpox.samples.types.vector.Vector2", "org.jpox.samples.types.vector.Vector2Item" ]
import org.jpox.samples.types.vector.Vector2; import org.jpox.samples.types.vector.Vector2Item;
import org.jpox.samples.types.vector.*;
[ "org.jpox.samples" ]
org.jpox.samples;
2,194,459
public void deleteBookmarks(BookmarkId... bookmarks) { assert bookmarks != null && bookmarks.length > 0; // Store all titles of bookmarks. String[] titles = new String[bookmarks.length]; boolean isUndoable = true; for (int i = 0; i < bookmarks.length; i++) { title...
void function(BookmarkId... bookmarks) { assert bookmarks != null && bookmarks.length > 0; String[] titles = new String[bookmarks.length]; boolean isUndoable = true; for (int i = 0; i < bookmarks.length; i++) { titles[i] = getBookmarkTitle(bookmarks[i]); isUndoable &= (bookmarks[i].getType() == BookmarkType.NORMAL); } ...
/** * Delete one or multiple bookmarks from model. If more than one bookmarks are passed here, this * method will group these delete operations into one undo bundle so that later if the user * clicks undo, all bookmarks deleted here will be restored. * @param bookmarks Bookmarks to delete. Note this...
Delete one or multiple bookmarks from model. If more than one bookmarks are passed here, this method will group these delete operations into one undo bundle so that later if the user clicks undo, all bookmarks deleted here will be restored
deleteBookmarks
{ "repo_name": "guorendong/iridium-browser-ubuntu", "path": "chrome/android/java/src/org/chromium/chrome/browser/enhanced_bookmarks/EnhancedBookmarksModel.java", "license": "bsd-3-clause", "size": 14185 }
[ "org.chromium.components.bookmarks.BookmarkId", "org.chromium.components.bookmarks.BookmarkType" ]
import org.chromium.components.bookmarks.BookmarkId; import org.chromium.components.bookmarks.BookmarkType;
import org.chromium.components.bookmarks.*;
[ "org.chromium.components" ]
org.chromium.components;
2,873,349
public static <E> Queue<E> unmodifiableQueue(final Queue<? extends E> queue) { return UnmodifiableQueue.unmodifiableQueue(queue); }
static <E> Queue<E> function(final Queue<? extends E> queue) { return UnmodifiableQueue.unmodifiableQueue(queue); }
/** * Returns an unmodifiable queue backed by the given queue. * * @param <E> the type of the elements in the queue * @param queue the queue to make unmodifiable, must not be null * @return an unmodifiable queue backed by that queue * @throws NullPointerException if the queue is null ...
Returns an unmodifiable queue backed by the given queue
unmodifiableQueue
{ "repo_name": "kaiyuanw/DS-TEST", "path": "src/main/java/org/apache/commons/collections4/QueueUtils.java", "license": "apache-2.0", "size": 4441 }
[ "java.util.Queue", "org.apache.commons.collections4.queue.UnmodifiableQueue" ]
import java.util.Queue; import org.apache.commons.collections4.queue.UnmodifiableQueue;
import java.util.*; import org.apache.commons.collections4.queue.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,077,665
public List<Line> getLines() { return new ArrayList<Line>(lines); }
List<Line> function() { return new ArrayList<Line>(lines); }
/** * Get a (shallow) copy of the list of lines. * * @return the list of lines */
Get a (shallow) copy of the list of lines
getLines
{ "repo_name": "klamonte/jexer", "path": "src/jexer/teditor/Document.java", "license": "mit", "size": 25577 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,336,381
private boolean prepareOutputStreams() { switch (mAfterEncryptAction) { default: case SHARE: mOutputUris = new ArrayList<>(); int filenameCounter = 1; for (FilesAdapter.ViewModel model : mFilesAdapter.mDataset) { St...
boolean function() { switch (mAfterEncryptAction) { default: case SHARE: mOutputUris = new ArrayList<>(); int filenameCounter = 1; for (FilesAdapter.ViewModel model : mFilesAdapter.mDataset) { String targetName = (mEncryptFilenames ? String.valueOf(filenameCounter) : FileHelper.getFilename(getActivity(), model.inputUri...
/** * Prepares mOutputUris, either directly and returns false, or indirectly * which returns true and will call cryptoOperation after mOutputUris has * been set at a later point. */
Prepares mOutputUris, either directly and returns false, or indirectly which returns true and will call cryptoOperation after mOutputUris has been set at a later point
prepareOutputStreams
{ "repo_name": "bresalio/open-keychain", "path": "OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java", "license": "gpl-3.0", "size": 35100 }
[ "java.util.ArrayList", "org.sufficientlysecure.keychain.Constants", "org.sufficientlysecure.keychain.provider.TemporaryStorageProvider", "org.sufficientlysecure.keychain.ui.util.Notify", "org.sufficientlysecure.keychain.util.FileHelper" ]
import java.util.ArrayList; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.provider.TemporaryStorageProvider; import org.sufficientlysecure.keychain.ui.util.Notify; import org.sufficientlysecure.keychain.util.FileHelper;
import java.util.*; import org.sufficientlysecure.keychain.*; import org.sufficientlysecure.keychain.provider.*; import org.sufficientlysecure.keychain.ui.util.*; import org.sufficientlysecure.keychain.util.*;
[ "java.util", "org.sufficientlysecure.keychain" ]
java.util; org.sufficientlysecure.keychain;
112,143
protected StringDistance getStringDistance() { throw new UnsupportedOperationException(); }
StringDistance function() { throw new UnsupportedOperationException(); }
/** * Get the distance implementation used by this spellchecker, or NULL if not applicable. */
Get the distance implementation used by this spellchecker, or NULL if not applicable
getStringDistance
{ "repo_name": "fogbeam/Heceta_solr", "path": "solr/core/src/java/org/apache/solr/spelling/SolrSpellChecker.java", "license": "apache-2.0", "size": 7380 }
[ "org.apache.lucene.search.spell.StringDistance" ]
import org.apache.lucene.search.spell.StringDistance;
import org.apache.lucene.search.spell.*;
[ "org.apache.lucene" ]
org.apache.lucene;
1,619,692
public Image fetchImage(int imageId) { Image image = new Image(); try { Class.forName("org.sqlite.JDBC"); connection = DriverManager.getConnection("jdbc:sqlite:" + databaseFile); statement = connection.createStatement(); statement.executeUpdate("PRAGMA foreign_keys=ON"); pstmt = connection ...
Image function(int imageId) { Image image = new Image(); try { Class.forName(STR); connection = DriverManager.getConnection(STR + databaseFile); statement = connection.createStatement(); statement.executeUpdate(STR); pstmt = connection .prepareStatement(STR); pstmt.setInt(1, imageId); resultSet = pstmt.executeQuery(); ...
/** * Fetches the image from the db on the basis of its id. * * @param imageId * @return */
Fetches the image from the db on the basis of its id
fetchImage
{ "repo_name": "sneJ-/networkboot", "path": "frontend/src/main/java/uk/ac/lsbu/networkboot/frontend/Database.java", "license": "gpl-2.0", "size": 64971 }
[ "java.sql.DriverManager" ]
import java.sql.DriverManager;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,245,010
public void updateModuleConfiguration(final ModuleConfiguration moduleConfig) { final String displayType = displayTypeRadios.getSelectedKey(); if (STCourseNodeEditController.CONFIG_VALUE_DISPLAY_FILE.equals(displayType)) { // manual file view selected, remove columns config moduleConfig.setStringValue(STCo...
void function(final ModuleConfiguration moduleConfig) { final String displayType = displayTypeRadios.getSelectedKey(); if (STCourseNodeEditController.CONFIG_VALUE_DISPLAY_FILE.equals(displayType)) { moduleConfig.setStringValue(STCourseNodeEditController.CONFIG_KEY_DISPLAY_TYPE, STCourseNodeEditController.CONFIG_VALUE_D...
/** * Update the given module config object from the data in the form * * @param moduleConfig */
Update the given module config object from the data in the form
updateModuleConfiguration
{ "repo_name": "RLDevOps/Demo", "path": "src/main/java/org/olat/course/nodes/st/STCourseNodeDisplayConfigFormController.java", "license": "apache-2.0", "size": 15373 }
[ "org.olat.modules.ModuleConfiguration" ]
import org.olat.modules.ModuleConfiguration;
import org.olat.modules.*;
[ "org.olat.modules" ]
org.olat.modules;
534,085
public void attachWriter(final HttpSession newWriter) { // The attachWriter processing must be done in this WsebSession's IO thread so we can do // getProcessor().flush(). We may need to do "thread hopping" for this since attachWriter gets called by // WsebDownstreamHandler.reconnectSession ...
void function(final HttpSession newWriter) { if (Thread.currentThread() == getIoThread()) { attachWriter0(newWriter); }
/** * Attach new writer immediately if there is none. Or, if there already is one, enqueue a request to * switch to the new writer, which will be done by WsebAcceptProcessor.flushInternal (this avoids * races between that method and this one, see KG-2756). * @param newWriter */
Attach new writer immediately if there is none. Or, if there already is one, enqueue a request to switch to the new writer, which will be done by WsebAcceptProcessor.flushInternal (this avoids races between that method and this one, see KG-2756)
attachWriter
{ "repo_name": "EArdeleanu/gateway", "path": "transport/wseb/src/main/java/org/kaazing/gateway/transport/wseb/WsebSession.java", "license": "apache-2.0", "size": 37890 }
[ "org.kaazing.gateway.transport.http.HttpSession" ]
import org.kaazing.gateway.transport.http.HttpSession;
import org.kaazing.gateway.transport.http.*;
[ "org.kaazing.gateway" ]
org.kaazing.gateway;
1,693,033
@SuppressWarnings("unused") public void setCancelText(@StringRes int cancelResid) { mCancelString = null; mCancelResid = cancelResid; }
@SuppressWarnings(STR) void function(@StringRes int cancelResid) { mCancelString = null; mCancelResid = cancelResid; }
/** * Set the label for the Cancel button (max 12 characters) * @param cancelResid A resource ID to be used as the Cancel button label */
Set the label for the Cancel button (max 12 characters)
setCancelText
{ "repo_name": "LingjuAI/AssistantBySDK", "path": "datetimelib/src/main/java/com/wdullaer/materialdatetimepicker/time/TimePickerDialog.java", "license": "apache-2.0", "size": 76375 }
[ "android.support.annotation.StringRes" ]
import android.support.annotation.StringRes;
import android.support.annotation.*;
[ "android.support" ]
android.support;
642,760
private ISearchResult<Provider> docsToProviders(final DocumentsSearchResult docsResult) { final List<Provider> providers = new ArrayList<>(); for (final Document doc : docsResult.getResults()) { final String providerId = doc.get(IIndexElement.FIELD_ID); if(NumberUtils.isNumber(providerId)) { providers...
ISearchResult<Provider> function(final DocumentsSearchResult docsResult) { final List<Provider> providers = new ArrayList<>(); for (final Document doc : docsResult.getResults()) { final String providerId = doc.get(IIndexElement.FIELD_ID); if(NumberUtils.isNumber(providerId)) { providers.add(getProvider(Integer.parseInt...
/** * Builds {@link Provider}s for the given {@link Document}s. * @param docsResult the {@link Document}s to convert. * @return a new {@link ISearchResult} containing the {@link Provider}s and the * totalHits from the given {@link DocumentsSearchResult}. */
Builds <code>Provider</code>s for the given <code>Document</code>s
docsToProviders
{ "repo_name": "XMBomb/InComb", "path": "src/main/java/com/incomb/server/model/dao/ProviderDao.java", "license": "apache-2.0", "size": 6350 }
[ "com.incomb.server.indexing.DocumentsSearchResult", "com.incomb.server.indexing.IIndexElement", "com.incomb.server.indexing.ISearchResult", "com.incomb.server.indexing.SimpleSearchResult", "com.incomb.server.model.Provider", "java.util.ArrayList", "java.util.List", "org.apache.commons.lang3.math.Numbe...
import com.incomb.server.indexing.DocumentsSearchResult; import com.incomb.server.indexing.IIndexElement; import com.incomb.server.indexing.ISearchResult; import com.incomb.server.indexing.SimpleSearchResult; import com.incomb.server.model.Provider; import java.util.ArrayList; import java.util.List; import org.apache.c...
import com.incomb.server.indexing.*; import com.incomb.server.model.*; import java.util.*; import org.apache.commons.lang3.math.*; import org.apache.lucene.document.*;
[ "com.incomb.server", "java.util", "org.apache.commons", "org.apache.lucene" ]
com.incomb.server; java.util; org.apache.commons; org.apache.lucene;
110,405
private ZWaveCommandClass resolveConverter(Item item, ZWaveNode node, int endpointId) { if (item == null) { return null; } if (!preferredCommandClasses.containsKey(item.getClass())) { logger.warn("No preferred command classes found for item class = {}", item.getClass...
ZWaveCommandClass function(Item item, ZWaveNode node, int endpointId) { if (item == null) { return null; } if (!preferredCommandClasses.containsKey(item.getClass())) { logger.warn(STR, item.getClass().toString()); return null; } for (CommandClass commandClass : preferredCommandClasses.get(item.getClass())) { ZWaveComma...
/** * Returns the command class that provides the best suitable converter to * convert between the Z-Wave API and the binding. * * @param item * the {@link item} to resolve a converter for. * @param node * the {@link ZWaveNode} node to resolve a Command class on...
Returns the command class that provides the best suitable converter to convert between the Z-Wave API and the binding
resolveConverter
{ "repo_name": "paolodenti/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/converter/ZWaveConverterHandler.java", "license": "epl-1.0", "size": 20531 }
[ "org.openhab.binding.zwave.internal.protocol.ZWaveNode", "org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass", "org.openhab.core.items.Item" ]
import org.openhab.binding.zwave.internal.protocol.ZWaveNode; import org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass; import org.openhab.core.items.Item;
import org.openhab.binding.zwave.internal.protocol.*; import org.openhab.binding.zwave.internal.protocol.commandclass.*; import org.openhab.core.items.*;
[ "org.openhab.binding", "org.openhab.core" ]
org.openhab.binding; org.openhab.core;
2,068,185
public static List<KeyedStateHandle> getKeyedStateHandles( Collection<? extends KeyedStateHandle> keyedStateHandles, KeyGroupRange subtaskKeyGroupRange) { List<KeyedStateHandle> subtaskKeyedStateHandles = new ArrayList<>(); for (KeyedStateHandle keyedStateHandle : keyedStateHandles) { KeyedStateHandle i...
static List<KeyedStateHandle> function( Collection<? extends KeyedStateHandle> keyedStateHandles, KeyGroupRange subtaskKeyGroupRange) { List<KeyedStateHandle> subtaskKeyedStateHandles = new ArrayList<>(); for (KeyedStateHandle keyedStateHandle : keyedStateHandles) { KeyedStateHandle intersectedKeyedStateHandle = keyedS...
/** * Determine the subset of {@link KeyGroupsStateHandle KeyGroupsStateHandles} with correct * key group index for the given subtask {@link KeyGroupRange}. * <p> * <p>This is publicly visible to be used in tests. */
Determine the subset of <code>KeyGroupsStateHandle KeyGroupsStateHandles</code> with correct key group index for the given subtask <code>KeyGroupRange</code>. This is publicly visible to be used in tests
getKeyedStateHandles
{ "repo_name": "zohar-mizrahi/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/StateAssignmentOperation.java", "license": "apache-2.0", "size": 22732 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "org.apache.flink.runtime.state.KeyGroupRange", "org.apache.flink.runtime.state.KeyedStateHandle" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.apache.flink.runtime.state.KeyGroupRange; import org.apache.flink.runtime.state.KeyedStateHandle;
import java.util.*; import org.apache.flink.runtime.state.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,377,389
public IgniteLogger log(String ctgr);
IgniteLogger function(String ctgr);
/** * Gets logger for given category. * * @param ctgr Category. * @return Logger. */
Gets logger for given category
log
{ "repo_name": "dlnufox/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java", "license": "apache-2.0", "size": 15723 }
[ "org.apache.ignite.IgniteLogger" ]
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,094,390
public static void running(TestServer server, WebDriver webDriver, final Consumer<TestBrowser> block) { Helpers$.MODULE$.runSynchronized(server.application(), asScala(() -> { TestBrowser browser = null; TestServer startedServer = null; try { start(server);...
static void function(TestServer server, WebDriver webDriver, final Consumer<TestBrowser> block) { Helpers$.MODULE$.runSynchronized(server.application(), asScala(() -> { TestBrowser browser = null; TestServer startedServer = null; try { start(server); startedServer = server; browser = testBrowser(webDriver, (Integer) Op...
/** * Executes a block of code in a running server, with a test browser. * * @param server the test server. * @param webDriver the web driver instance. * @param block the block of code to execute. */
Executes a block of code in a running server, with a test browser
running
{ "repo_name": "Shruti9520/playframework", "path": "framework/src/play-test/src/main/java/play/test/Helpers.java", "license": "apache-2.0", "size": 28348 }
[ "java.util.function.Consumer", "org.openqa.selenium.WebDriver" ]
import java.util.function.Consumer; import org.openqa.selenium.WebDriver;
import java.util.function.*; import org.openqa.selenium.*;
[ "java.util", "org.openqa.selenium" ]
java.util; org.openqa.selenium;
342,013
final PBBAPopupFragment fragment = new PBBAPopupFragment(); final Bundle arguments = new Bundle(); arguments.putSerializable(KEY_SECURE_TOKEN, secureToken); arguments.putSerializable(KEY_BRN, brn); fragment.setArguments(arguments); return fragment; }
final PBBAPopupFragment fragment = new PBBAPopupFragment(); final Bundle arguments = new Bundle(); arguments.putSerializable(KEY_SECURE_TOKEN, secureToken); arguments.putSerializable(KEY_BRN, brn); fragment.setArguments(arguments); return fragment; }
/** * Create new instance. * * @param secureToken The secure token to use to open the PBBA enabled CFI App. * @param brn The BRN code to display. * @return The new fragment instance. */
Create new instance
newInstance
{ "repo_name": "vocalinkzapp/ZappMerchantLib-R2-Android", "path": "zapp-merchant-library/src/main/java/com/zapp/library/merchant/ui/fragment/PBBAPopupFragment.java", "license": "apache-2.0", "size": 9474 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
2,708,761
public static boolean evalTagForLoop(Node node) { NodeList childList = node.getChildNodes(); for (int i = 0; i < childList.getLength(); i++) if (childList.item(i).getNodeName().equals("loop")) return true; return false; }
static boolean function(Node node) { NodeList childList = node.getChildNodes(); for (int i = 0; i < childList.getLength(); i++) if (childList.item(i).getNodeName().equals("loop")) return true; return false; }
/** * check to see if a result contains a {@code <loop/>} tag. * * @param node current XML parse node * @return true or false */
check to see if a result contains a tag
evalTagForLoop
{ "repo_name": "jimfinnis/ChatCitizen", "path": "ChatCitizen/src/org/alicebot/ab/AIMLProcessor.java", "license": "gpl-3.0", "size": 66635 }
[ "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,847,060
protected boolean processEntry(ByteBuffer entryBuffer) throws DatabaseException { readEntry(targetLogEntry, entryBuffer, true); // readFullItem return true; }
boolean function(ByteBuffer entryBuffer) throws DatabaseException { readEntry(targetLogEntry, entryBuffer, true); return true; }
/** * This reader instantiates an LN and key for every LN entry. */
This reader instantiates an LN and key for every LN entry
processEntry
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/je-3.2.74/src/com/sleepycat/je/log/CleanerFileReader.java", "license": "gpl-2.0", "size": 6819 }
[ "com.sleepycat.je.DatabaseException", "java.nio.ByteBuffer" ]
import com.sleepycat.je.DatabaseException; import java.nio.ByteBuffer;
import com.sleepycat.je.*; import java.nio.*;
[ "com.sleepycat.je", "java.nio" ]
com.sleepycat.je; java.nio;
921,509
protected String build_instructor_grade_assignment_context(VelocityPortlet portlet, Context context, RunData data, SessionState state) { context.put("user", state.getAttribute(STATE_USER)); // sorting related fields context.put("sortedBy", state.getAttribute(SORTED_GRADE_SUBMISSION_BY)); context.put("so...
String function(VelocityPortlet portlet, Context context, RunData data, SessionState state) { context.put("user", state.getAttribute(STATE_USER)); context.put(STR, state.getAttribute(SORTED_GRADE_SUBMISSION_BY)); context.put(STR, state.getAttribute(SORTED_GRADE_SUBMISSION_ASC)); context.put(STR, SORTED_GRADE_SUBMISSION...
/** * build the instructor view to grade an assignment */
build the instructor view to grade an assignment
build_instructor_grade_assignment_context
{ "repo_name": "frasese/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 686269 }
[ "org.sakaiproject.assignment.api.Assignment", "org.sakaiproject.assignment.api.AssignmentContent", "org.sakaiproject.cheftool.Context", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.cheftool.VelocityPortlet", "org.sakaiproject.event.api.SessionState", "org.sakaiproject.user.cover.UserDirectoryS...
import org.sakaiproject.assignment.api.Assignment; import org.sakaiproject.assignment.api.AssignmentContent; import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.user....
import org.sakaiproject.assignment.api.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; import org.sakaiproject.user.cover.*;
[ "org.sakaiproject.assignment", "org.sakaiproject.cheftool", "org.sakaiproject.event", "org.sakaiproject.user" ]
org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.event; org.sakaiproject.user;
1,496,862
@Override public PooledObject<T> wrap(T algorithm) { return new DefaultPooledObject<>(algorithm); }
PooledObject<T> function(T algorithm) { return new DefaultPooledObject<>(algorithm); }
/** * Use the default PooledObject implementation. */
Use the default PooledObject implementation
wrap
{ "repo_name": "Glare-software/CorruptedImagesDetector", "path": "src/main/java/software/glare/cid/process/processes/processor/algorithm/AlgorithmPoolFactory.java", "license": "gpl-3.0", "size": 1217 }
[ "org.apache.commons.pool2.PooledObject", "org.apache.commons.pool2.impl.DefaultPooledObject" ]
import org.apache.commons.pool2.PooledObject; import org.apache.commons.pool2.impl.DefaultPooledObject;
import org.apache.commons.pool2.*; import org.apache.commons.pool2.impl.*;
[ "org.apache.commons" ]
org.apache.commons;
776,315
public TimeZone getTimeZone() { if (timezone == null) { return currentCalendar.getTimeZone(); } return timezone; }
TimeZone function() { if (timezone == null) { return currentCalendar.getTimeZone(); } return timezone; }
/** * Returns a time zone that is currently used by this component. * * @return Component's Time zone */
Returns a time zone that is currently used by this component
getTimeZone
{ "repo_name": "peterl1084/framework", "path": "compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java", "license": "apache-2.0", "size": 72487 }
[ "java.util.TimeZone" ]
import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
653,151
public void updateTask() { --this.attackTime; EntityLivingBase entitylivingbase = this.blaze.getAttackTarget(); double d0 = this.blaze.getDistanceSqToEntity(entitylivingbase); if (d0 < 4.0D) { if (this.attackTime <= 0) { this.attackTime = 20; this.blaze.attackEntityAsMob(entitylivingbase...
void function() { --this.attackTime; EntityLivingBase entitylivingbase = this.blaze.getAttackTarget(); double d0 = this.blaze.getDistanceSqToEntity(entitylivingbase); if (d0 < 4.0D) { if (this.attackTime <= 0) { this.attackTime = 20; this.blaze.attackEntityAsMob(entitylivingbase); } this.blaze.getMoveHelper().setMoveTo...
/** * Updates the task */
Updates the task
updateTask
{ "repo_name": "EPIICTHUNDERCAT/TameableMobs", "path": "src/main/java/com/github/EPIICTHUNDERCAT/TameableMobs/mobs/TameableBlaze.java", "license": "mit", "size": 35839 }
[ "net.minecraft.entity.EntityLivingBase", "net.minecraft.entity.player.EntityPlayer", "net.minecraft.entity.projectile.EntitySmallFireball", "net.minecraft.util.math.BlockPos", "net.minecraft.util.math.MathHelper" ]
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntitySmallFireball; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper;
import net.minecraft.entity.*; import net.minecraft.entity.player.*; import net.minecraft.entity.projectile.*; import net.minecraft.util.math.*;
[ "net.minecraft.entity", "net.minecraft.util" ]
net.minecraft.entity; net.minecraft.util;
28,025
public void insert(String s, int k) { assert(k > -1 && k < seq.size() + 1); ArrayList<Character> newSeq = new ArrayList<Character>(); if (k == 0) { for (char c : s.toCharArray()) { if (isValid(c)) newSeq.add(c); } } else { f...
void function(String s, int k) { assert(k > -1 && k < seq.size() + 1); ArrayList<Character> newSeq = new ArrayList<Character>(); if (k == 0) { for (char c : s.toCharArray()) { if (isValid(c)) newSeq.add(c); } } else { for (int i = 0; i < k; i++) { newSeq.add(seq.get(i)); } for (char c : s.toCharArray()) { if (isValid(c...
/** * Adds string s to this sequence starting from site k. */
Adds string s to this sequence starting from site k
insert
{ "repo_name": "zhouyulian17/Course", "path": "Java/AdvancedComputerProgramming/src/seqAnalysis/Sequence.java", "license": "mit", "size": 8308 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,824,018