method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void setComments(ArrayList<String> comments) { this.comments = comments; }
void function(ArrayList<String> comments) { this.comments = comments; }
/** * Setter for the comments on this dish. * * @param comments The comments on this dish. */
Setter for the comments on this dish
setComments
{ "repo_name": "wouwouwou/mod_6", "path": "src/main/java/model/Dish.java", "license": "gpl-2.0", "size": 4671 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,811,097
@Override public boolean containsSession(AxolotlAddress address) { return mXmppConnectionService.databaseBackend.containsSession(account, address); }
boolean function(AxolotlAddress address) { return mXmppConnectionService.databaseBackend.containsSession(account, address); }
/** * Determine whether there is a committed {@link SessionRecord} for a recipientId + deviceId tuple. * * @param address the address of the remote client. * @return true if a {@link SessionRecord} exists, false otherwise. */
Determine whether there is a committed <code>SessionRecord</code> for a recipientId + deviceId tuple
containsSession
{ "repo_name": "chinnuabhi/Conversations", "path": "src/main/java/eu/siacs/conversations/crypto/axolotl/SQLiteAxolotlStore.java", "license": "gpl-3.0", "size": 15561 }
[ "org.whispersystems.libaxolotl.AxolotlAddress" ]
import org.whispersystems.libaxolotl.AxolotlAddress;
import org.whispersystems.libaxolotl.*;
[ "org.whispersystems.libaxolotl" ]
org.whispersystems.libaxolotl;
46,339
//----------------------------------------------------------------------- private static Writer initWriter(File file, Object encoding, boolean append) throws IOException { if (file == null) { throw new NullPointerException("File is missing"); } if (encoding == null) { ...
static Writer function(File file, Object encoding, boolean append) throws IOException { if (file == null) { throw new NullPointerException(STR); } if (encoding == null) { throw new NullPointerException(STR); } boolean fileExistedAlready = file.exists(); OutputStream stream = null; Writer writer = null; try { stream = n...
/** * Initialise the wrapped file writer. * Ensure that a cleanup occurs if the writer creation fails. * * @param file the file to be accessed * @param encoding the encoding to use - may be Charset, CharsetEncoder or String * @param append true to append * @return the initialised w...
Initialise the wrapped file writer. Ensure that a cleanup occurs if the writer creation fails
initWriter
{ "repo_name": "sebastiansemmle/acio", "path": "src/main/java/org/apache/commons/io/output/FileWriterWithEncoding.java", "license": "apache-2.0", "size": 12110 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStream", "java.io.OutputStreamWriter", "java.io.Writer", "java.nio.charset.Charset", "java.nio.charset.CharsetEncoder", "org.apache.commons.io.FileUtils", "org.apache.commons.io.IOUtils" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils;
import java.io.*; import java.nio.charset.*; import org.apache.commons.io.*;
[ "java.io", "java.nio", "org.apache.commons" ]
java.io; java.nio; org.apache.commons;
2,610,327
@GenerateBridge(callSuperMethod = true) public static Uni<Void> persistOrUpdate(Iterable<?> entities) { return INSTANCE.persistOrUpdate(entities); }
@GenerateBridge(callSuperMethod = true) static Uni<Void> function(Iterable<?> entities) { return INSTANCE.persistOrUpdate(entities); }
/** * Persist all given entities or update them if they already exist. * * @param entities the entities to update * @see #persistOrUpdate() * @see #persistOrUpdate(Stream) * @see #persistOrUpdate(Object,Object...) */
Persist all given entities or update them if they already exist
persistOrUpdate
{ "repo_name": "quarkusio/quarkus", "path": "extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/ReactivePanacheMongoEntityBase.java", "license": "apache-2.0", "size": 36909 }
[ "io.quarkus.mongodb.panache.reactive.runtime.JavaReactiveMongoOperations", "io.quarkus.panache.common.impl.GenerateBridge", "io.smallrye.mutiny.Uni" ]
import io.quarkus.mongodb.panache.reactive.runtime.JavaReactiveMongoOperations; import io.quarkus.panache.common.impl.GenerateBridge; import io.smallrye.mutiny.Uni;
import io.quarkus.mongodb.panache.reactive.runtime.*; import io.quarkus.panache.common.impl.*; import io.smallrye.mutiny.*;
[ "io.quarkus.mongodb", "io.quarkus.panache", "io.smallrye.mutiny" ]
io.quarkus.mongodb; io.quarkus.panache; io.smallrye.mutiny;
1,825,226
@Test public void testEquals() throws Exception { File tempFile = createTempFile( "pomTest" ); FileModelSource instance = new FileModelSource( tempFile ); assertFalse( instance.equals( null ) ); assertFalse( instance.equals( new Object() ) ); assertTrue( ...
void function() throws Exception { File tempFile = createTempFile( STR ); FileModelSource instance = new FileModelSource( tempFile ); assertFalse( instance.equals( null ) ); assertFalse( instance.equals( new Object() ) ); assertTrue( instance.equals( instance ) ); assertTrue( instance.equals( new FileModelSource( tempF...
/** * Test of equals method, of class FileModelSource. */
Test of equals method, of class FileModelSource
testEquals
{ "repo_name": "cstamas/maven", "path": "maven-model-builder/src/test/java/org/apache/maven/model/building/FileModelSourceTest.java", "license": "apache-2.0", "size": 2531 }
[ "java.io.File", "org.junit.jupiter.api.Assertions" ]
import java.io.File; import org.junit.jupiter.api.Assertions;
import java.io.*; import org.junit.jupiter.api.*;
[ "java.io", "org.junit.jupiter" ]
java.io; org.junit.jupiter;
1,390,589
public ImageIcon getIcon() { return icon; }
ImageIcon function() { return icon; }
/** * Returns the selected <code>icon</code>. * * @return The selected <code>icon</code> */
Returns the selected <code>icon</code>
getIcon
{ "repo_name": "hendyyou/FST", "path": "src/tico/imageGallery/components/TIGSelectNewImage.java", "license": "gpl-3.0", "size": 9235 }
[ "javax.swing.ImageIcon" ]
import javax.swing.ImageIcon;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,966,582
@NonNull default List<Integer> allIndicesOf(@NonNull String name) { Loggers.ACCESSIBLE_BY_NAME.warn( "{} should override allIndicesOf(String), the default implementation is a " + "workaround for backward compatibility, it only returns the first occurrence", getClass().getName()); ...
default List<Integer> allIndicesOf(@NonNull String name) { Loggers.ACCESSIBLE_BY_NAME.warn( STR + STR, getClass().getName()); return Collections.singletonList(firstIndexOf(name)); }
/** * Returns all the indices where a given identifier appears. * * @throws IllegalArgumentException if the name is invalid. * @apiNote the default implementation only exists for backward compatibility. It wraps the result * of {@link #firstIndexOf(String)} in a singleton list, which is not entirely ...
Returns all the indices where a given identifier appears
allIndicesOf
{ "repo_name": "datastax/java-driver", "path": "core/src/main/java/com/datastax/oss/driver/api/core/data/AccessibleByName.java", "license": "apache-2.0", "size": 3472 }
[ "com.datastax.oss.driver.internal.core.util.Loggers", "edu.umd.cs.findbugs.annotations.NonNull", "java.util.Collections", "java.util.List" ]
import com.datastax.oss.driver.internal.core.util.Loggers; import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Collections; import java.util.List;
import com.datastax.oss.driver.internal.core.util.*; import edu.umd.cs.findbugs.annotations.*; import java.util.*;
[ "com.datastax.oss", "edu.umd.cs", "java.util" ]
com.datastax.oss; edu.umd.cs; java.util;
2,526,045
public JesadidoNode parse(final InputStream source, final Nonterminal startSymbol) { try (TokenStream tokenStream = new TokenStream(source, this.tokenCreator)) { return this.parse(tokenStream, startSymbol); } catch (IOException exception) { LOGGER.log(Level.WARNING, "An I/O-e...
JesadidoNode function(final InputStream source, final Nonterminal startSymbol) { try (TokenStream tokenStream = new TokenStream(source, this.tokenCreator)) { return this.parse(tokenStream, startSymbol); } catch (IOException exception) { LOGGER.log(Level.WARNING, STR, exception); return this.syntaxTreeFactory.createTrou...
/** * Parses the given source under the given start-symbol. * @param source The source. * @param startSymbol The start-symbol. * @return The root-node of the accepted syntax-tree. */
Parses the given source under the given start-symbol
parse
{ "repo_name": "stefan-baur/jesadido-poc", "path": "src/main/java/org/jesadido/poc/core/syntax/Grammar.java", "license": "lgpl-3.0", "size": 9422 }
[ "java.io.IOException", "java.io.InputStream", "java.util.logging.Level", "org.jesadido.poc.core.syntax.tokens.TokenStream", "org.jesadido.poc.core.syntax.tree.JesadidoNode" ]
import java.io.IOException; import java.io.InputStream; import java.util.logging.Level; import org.jesadido.poc.core.syntax.tokens.TokenStream; import org.jesadido.poc.core.syntax.tree.JesadidoNode;
import java.io.*; import java.util.logging.*; import org.jesadido.poc.core.syntax.tokens.*; import org.jesadido.poc.core.syntax.tree.*;
[ "java.io", "java.util", "org.jesadido.poc" ]
java.io; java.util; org.jesadido.poc;
1,218,819
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) { if (par1EnumCreatureType == EnumCreatureType.monster && genNetherBridge.func_40483_a(par2, par3, par4)) { return genNetherBridge.getSpawnList(); } BiomeGenBase bio...
List function(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) { if (par1EnumCreatureType == EnumCreatureType.monster && genNetherBridge.func_40483_a(par2, par3, par4)) { return genNetherBridge.getSpawnList(); } BiomeGenBase biomegenbase = worldObj.getBiomeGenForCoords(par2, par4); if (biomegenbase ...
/** * Returns a list of creatures of the specified type that can spawn at the given location. */
Returns a list of creatures of the specified type that can spawn at the given location
getPossibleCreatures
{ "repo_name": "sethten/MoDesserts", "path": "mcp50/src/minecraft/net/minecraft/src/ChunkProviderHell.java", "license": "gpl-3.0", "size": 18621 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,353,265
public void setFilter (SiteTreeFilter filter) { this.filter = filter; SiteNode root = (SiteNode) getRoot(); setFilter(filter, root); // Never filter the root node root.setFiltered(false); }
void function (SiteTreeFilter filter) { this.filter = filter; SiteNode root = (SiteNode) getRoot(); setFilter(filter, root); root.setFiltered(false); }
/** * Set the filter for the sites tree * @param filter */
Set the filter for the sites tree
setFilter
{ "repo_name": "JordanGS/zaproxy", "path": "src/org/parosproxy/paros/model/SiteMap.java", "license": "apache-2.0", "size": 29887 }
[ "org.zaproxy.zap.view.SiteTreeFilter" ]
import org.zaproxy.zap.view.SiteTreeFilter;
import org.zaproxy.zap.view.*;
[ "org.zaproxy.zap" ]
org.zaproxy.zap;
1,681,404
protected void sendEndOfHeader(OutputStream out) throws IOException { out.write(CRLF_BYTES); out.write(CRLF_BYTES); }
void function(OutputStream out) throws IOException { out.write(CRLF_BYTES); out.write(CRLF_BYTES); }
/** * Write the end of the header to the output stream * * @param out The output stream * @throws IOException If an IO problem occurs. */
Write the end of the header to the output stream
sendEndOfHeader
{ "repo_name": "jprante/elasticsearch-client", "path": "elasticsearch-client-http-netty/src/main/java/com/ning/http/multipart/Part.java", "license": "apache-2.0", "size": 13829 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,340,430
public HttpWebRequest prepareHttpWebRequest() throws ServiceLocalException, URISyntaxException { try { setUrl(this.adjustServiceUriFromCredentials(this.getUrl())); } catch (Exception e) { LOG.error(e); } return this.prepareHttpWebRequestForUrl(getUrl(), this .getAcceptGzipEnc...
HttpWebRequest function() throws ServiceLocalException, URISyntaxException { try { setUrl(this.adjustServiceUriFromCredentials(this.getUrl())); } catch (Exception e) { LOG.error(e); } return this.prepareHttpWebRequestForUrl(getUrl(), this .getAcceptGzipEncoding(), true); }
/** * Prepare http web request. * * @return the http web request * @throws ServiceLocalException the service local exception * @throws java.net.URISyntaxException the uRI syntax exception */
Prepare http web request
prepareHttpWebRequest
{ "repo_name": "candrews/ews-java-api", "path": "src/main/java/microsoft/exchange/webservices/data/core/ExchangeService.java", "license": "mit", "size": 161711 }
[ "java.net.URISyntaxException" ]
import java.net.URISyntaxException;
import java.net.*;
[ "java.net" ]
java.net;
1,374,001
public Duration getDuration() { int hours = Integer.parseInt(durHSpinner.getValue().toString()); int mins = Integer.parseInt(durMSpinner.getValue().toString()); try { return DatatypeFactory.newInstance().newDurationDayTime(true, 0, hours, mins, 0); } catch (DatatypeConfigurationException e) { ret...
Duration function() { int hours = Integer.parseInt(durHSpinner.getValue().toString()); int mins = Integer.parseInt(durMSpinner.getValue().toString()); try { return DatatypeFactory.newInstance().newDurationDayTime(true, 0, hours, mins, 0); } catch (DatatypeConfigurationException e) { return null; } } public static enum ...
/** * Gets the duration. * * @return the duration */
Gets the duration
getDuration
{ "repo_name": "googol42/revager", "path": "src/org/revager/gui/findings_list/AddResiAttToFLPopupWindow.java", "license": "gpl-3.0", "size": 8701 }
[ "java.awt.BorderLayout", "java.awt.Color", "java.awt.Dimension", "java.awt.GridBagConstraints", "java.awt.Window", "javax.swing.BorderFactory", "javax.swing.JButton", "javax.swing.JComboBox", "javax.swing.JLabel", "javax.swing.JPanel", "javax.swing.JSpinner", "javax.swing.JTextArea", "javax....
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.Window; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSpinner; impor...
import java.awt.*; import javax.swing.*; import javax.xml.datatype.*; import org.revager.app.model.*; import org.revager.gui.*; import org.revager.gui.actions.popup.*; import org.revager.tools.*;
[ "java.awt", "javax.swing", "javax.xml", "org.revager.app", "org.revager.gui", "org.revager.tools" ]
java.awt; javax.swing; javax.xml; org.revager.app; org.revager.gui; org.revager.tools;
2,831,632
protected String[] getRuntimeVMArguments() { IPath installPath = getServer().getRuntime().getLocation(); // If installPath is relative, convert to canonical path and hope for // the best if (!installPath.isAbsolute()) { try { ...
String[] function() { IPath installPath = getServer().getRuntime().getLocation(); if (!installPath.isAbsolute()) { try { String installLoc = (new File(installPath.toOSString())).getCanonicalPath(); installPath = new Path(installLoc); } catch (IOException e) { } } IPath configPath = getRuntimeBaseDirectory(); IPath depl...
/** * Return the runtime (VM) arguments. * * @return an array of runtime arguments */
Return the runtime (VM) arguments
getRuntimeVMArguments
{ "repo_name": "bengalaviz/JettyWTPPlugin", "path": "org.eclipse.jst.server.jetty.core/src/org/eclipse/jst/server/jetty/core/internal/JettyServerBehaviour.java", "license": "epl-1.0", "size": 49353 }
[ "java.io.File", "java.io.IOException", "org.eclipse.core.resources.ResourcesPlugin", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.IPath", "org.eclipse.core.runtime.Path", "org.eclipse.jst.server.jetty.core.IJettyConfiguration" ]
import java.io.File; import java.io.IOException; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jst.server.jetty.core.IJettyConfiguration;
import java.io.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jst.server.jetty.core.*;
[ "java.io", "org.eclipse.core", "org.eclipse.jst" ]
java.io; org.eclipse.core; org.eclipse.jst;
560,503
public String toString(int indentFactor) throws JSONException { StringWriter w = new StringWriter(); synchronized (w.getBuffer()) { return this.write(w, indentFactor, 0).toString(); } }
String function(int indentFactor) throws JSONException { StringWriter w = new StringWriter(); synchronized (w.getBuffer()) { return this.write(w, indentFactor, 0).toString(); } }
/** * Make a prettyprinted JSON text of this JSONObject. * <p> * Warning: This method assumes that the data structure is acyclical. * * @param indentFactor * The number of spaces to add to each level of indentation. * @return a printable, displayable, portable, transmittable representation *...
Make a prettyprinted JSON text of this JSONObject. Warning: This method assumes that the data structure is acyclical
toString
{ "repo_name": "mail929/Auto-Web-Dev", "path": "src/org/json/JSONObject.java", "license": "mit", "size": 47323 }
[ "java.io.StringWriter" ]
import java.io.StringWriter;
import java.io.*;
[ "java.io" ]
java.io;
132,618
public void init(FilterConfig config) throws ServletException { String time = config.getInitParameter("cache-time"); if (time != null) { try { _cacheTime = Period.toPeriod(time); } catch (Exception e) { throw new ServletException(e); } } }
void function(FilterConfig config) throws ServletException { String time = config.getInitParameter(STR); if (time != null) { try { _cacheTime = Period.toPeriod(time); } catch (Exception e) { throw new ServletException(e); } } }
/** * Filter init reads the filter configuration */
Filter init reads the filter configuration
init
{ "repo_name": "bertrama/resin", "path": "modules/resin/src/com/caucho/filters/AnonymousExpiresFilter.java", "license": "gpl-2.0", "size": 4010 }
[ "com.caucho.config.types.Period", "javax.servlet.FilterConfig", "javax.servlet.ServletException" ]
import com.caucho.config.types.Period; import javax.servlet.FilterConfig; import javax.servlet.ServletException;
import com.caucho.config.types.*; import javax.servlet.*;
[ "com.caucho.config", "javax.servlet" ]
com.caucho.config; javax.servlet;
920,879
private Hop simplifyDistributiveBinaryOperation( Hop parent, Hop hi, int pos ) { if( hi instanceof BinaryOp ) { BinaryOp bop = (BinaryOp)hi; Hop left = bop.getInput().get(0); Hop right = bop.getInput().get(1); //(X+Y*X) -> (1+Y)*X, (Y*X+X) -> (Y+1)*X //(X-Y*X) -> (1-Y)*X, (Y*X-X) -> ...
Hop function( Hop parent, Hop hi, int pos ) { if( hi instanceof BinaryOp ) { BinaryOp bop = (BinaryOp)hi; Hop left = bop.getInput().get(0); Hop right = bop.getInput().get(1); boolean applied = false; if( left.getDataType()==DataType.MATRIX && right.getDataType()==DataType.MATRIX && HopRewriteUtils.isValidOp(bop.getOp()...
/** * (X-Y*X) -> (1-Y)*X, (Y*X-X) -> (Y-1)*X * (X+Y*X) -> (1+Y)*X, (Y*X+X) -> (Y+1)*X * * * @param parent parent high-level operator * @param hi high-level operator * @param pos position * @return high-level operator */
(X-Y*X) -> (1-Y)*X, (Y*X-X) -> (Y-1)*X (X+Y*X) -> (1+Y)*X, (Y*X+X) -> (Y+1)*X
simplifyDistributiveBinaryOperation
{ "repo_name": "asurve/arvind-sysml", "path": "src/main/java/org/apache/sysml/hops/rewrite/RewriteAlgebraicSimplificationStatic.java", "license": "apache-2.0", "size": 72742 }
[ "org.apache.sysml.hops.BinaryOp", "org.apache.sysml.hops.Hop", "org.apache.sysml.hops.LiteralOp", "org.apache.sysml.parser.Expression" ]
import org.apache.sysml.hops.BinaryOp; import org.apache.sysml.hops.Hop; import org.apache.sysml.hops.LiteralOp; import org.apache.sysml.parser.Expression;
import org.apache.sysml.hops.*; import org.apache.sysml.parser.*;
[ "org.apache.sysml" ]
org.apache.sysml;
790,535
public static boolean tableParamsAreValid(Map<String, String> params) { return params.get(KEY_TABLE_NAME) != null && params.get(KEY_TABLE_NAME).length() > 0 && params.get(KEY_MASTER_ADDRESSES) != null && params.get(KEY_MASTER_ADDRESSES).length() > 0 && params.get(KEY_KEY_COLUMNS) != null ...
static boolean function(Map<String, String> params) { return params.get(KEY_TABLE_NAME) != null && params.get(KEY_TABLE_NAME).length() > 0 && params.get(KEY_MASTER_ADDRESSES) != null && params.get(KEY_MASTER_ADDRESSES).length() > 0 && params.get(KEY_KEY_COLUMNS) != null && params.get(KEY_KEY_COLUMNS).length() > 0; } pu...
/** * Returns true if all required parameters are present in the given table properties * map. * TODO(kudu-merge) Return a more specific error string. */
Returns true if all required parameters are present in the given table properties map. TODO(kudu-merge) Return a more specific error string
tableParamsAreValid
{ "repo_name": "kapilrastogi/Impala", "path": "fe/src/main/java/com/cloudera/impala/catalog/KuduTable.java", "license": "apache-2.0", "size": 11231 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,096,598
public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_) { EntityOcelot var5 = (EntityOcelot)p_78086_1_; this.ocelotBody.rotationPointY = 12.0F; this.ocelotBody.rotationPointZ = -10.0F; this.ocelotHead.rotationPointY = 15....
void function(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_) { EntityOcelot var5 = (EntityOcelot)p_78086_1_; this.ocelotBody.rotationPointY = 12.0F; this.ocelotBody.rotationPointZ = -10.0F; this.ocelotHead.rotationPointY = 15.0F; this.ocelotHead.rotationPointZ = -9.0F; this.ocelotTai...
/** * Used for easily adding entity-dependent animations. The second and third float params here are the same second * and third as in the setRotationAngles method. */
Used for easily adding entity-dependent animations. The second and third float params here are the same second and third as in the setRotationAngles method
setLivingAnimations
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/client/model/ModelOcelot.java", "license": "mit", "size": 10646 }
[ "net.minecraft.entity.EntityLivingBase", "net.minecraft.entity.passive.EntityOcelot" ]
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.entity.*; import net.minecraft.entity.passive.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
887,658
public ActionForward execute (ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // Initialise super.init(request); if (errors.size() > 0) return mapping.findForward (IJogreWeb.FORWARD_ERROR); // populate form populateForm (mapping, ...
ActionForward function (ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { super.init(request); if (errors.size() > 0) return mapping.findForward (IJogreWeb.FORWARD_ERROR); populateForm (mapping, request, form); return mapping.findForward (IJogreWeb.FORW...
/** * Execute method. * * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) */
Execute method
execute
{ "repo_name": "lsilvestre/Jogre", "path": "webapp/src/org/jogre/webapp/actions/ProfileAction.java", "license": "gpl-2.0", "size": 3741 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.jogre.webapp.IJogreWeb" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.jogre.webapp.IJogreWeb;
import javax.servlet.http.*; import org.apache.struts.action.*; import org.jogre.webapp.*;
[ "javax.servlet", "org.apache.struts", "org.jogre.webapp" ]
javax.servlet; org.apache.struts; org.jogre.webapp;
1,569,412
public static ClientInterceptor newAttachHeadersInterceptor(Metadata extraHeaders) { return new HeaderAttachingClientInterceptor(extraHeaders); } private static final class HeaderAttachingClientInterceptor implements ClientInterceptor { private final Metadata extraHeaders; // Non private to avoid s...
static ClientInterceptor function(Metadata extraHeaders) { return new HeaderAttachingClientInterceptor(extraHeaders); } private static final class HeaderAttachingClientInterceptor implements ClientInterceptor { private final Metadata extraHeaders; HeaderAttachingClientInterceptor(Metadata extraHeaders) { this.extraHead...
/** * Returns a client interceptor that attaches a set of headers to requests. * * @param extraHeaders the headers to be passed by each call that is processed by the returned * interceptor */
Returns a client interceptor that attaches a set of headers to requests
newAttachHeadersInterceptor
{ "repo_name": "rmichela/grpc-java", "path": "stub/src/main/java/io/grpc/stub/MetadataUtils.java", "license": "apache-2.0", "size": 6519 }
[ "com.google.common.base.Preconditions", "io.grpc.ClientInterceptor", "io.grpc.Metadata" ]
import com.google.common.base.Preconditions; import io.grpc.ClientInterceptor; import io.grpc.Metadata;
import com.google.common.base.*; import io.grpc.*;
[ "com.google.common", "io.grpc" ]
com.google.common; io.grpc;
828,394
private void _prefixmatch() throws IOException { if (debug) { checkState(reader.curChar == '^'); } builder.type = Type.PREFIXMATCH; builder.append("^="); reader.next(); if (debug) { checkState(reader.curChar == '='); } }
void function() throws IOException { if (debug) { checkState(reader.curChar == '^'); } builder.type = Type.PREFIXMATCH; builder.append("^="); reader.next(); if (debug) { checkState(reader.curChar == '='); } }
/** * PREFIXMATCH ^= */
PREFIXMATCH ^=
_prefixmatch
{ "repo_name": "tectronics/epubcheck", "path": "src/main/java/org/idpf/epubcheck/util/css/CssScanner.java", "license": "mit", "size": 31370 }
[ "com.google.common.base.Preconditions", "java.io.IOException", "org.idpf.epubcheck.util.css.CssToken" ]
import com.google.common.base.Preconditions; import java.io.IOException; import org.idpf.epubcheck.util.css.CssToken;
import com.google.common.base.*; import java.io.*; import org.idpf.epubcheck.util.css.*;
[ "com.google.common", "java.io", "org.idpf.epubcheck" ]
com.google.common; java.io; org.idpf.epubcheck;
2,833,221
private void checkDataType(IgniteClient client, Ignite ignite, Object obj) { IgniteCache<Object, Object> thickCache = ignite.cache(Config.DEFAULT_CACHE_NAME); ClientCache<Object, Object> thinCache = client.cache(Config.DEFAULT_CACHE_NAME); Integer key = 1; thinCache.put(key, obj); ...
void function(IgniteClient client, Ignite ignite, Object obj) { IgniteCache<Object, Object> thickCache = ignite.cache(Config.DEFAULT_CACHE_NAME); ClientCache<Object, Object> thinCache = client.cache(Config.DEFAULT_CACHE_NAME); Integer key = 1; thinCache.put(key, obj); assertTrue(thinCache.containsKey(key)); Object cach...
/** * Check that we get the same value from the cache as we put before. * * @param client Thin client. * @param ignite Ignite node. * @param obj Value of data type to check. */
Check that we get the same value from the cache as we put before
checkDataType
{ "repo_name": "nizhikov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/client/FunctionalTest.java", "license": "apache-2.0", "size": 49664 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.IgniteCache", "org.junit.Assert" ]
import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.junit.Assert;
import org.apache.ignite.*; import org.junit.*;
[ "org.apache.ignite", "org.junit" ]
org.apache.ignite; org.junit;
2,509,764
public static boolean useStartEndLib( CppConfiguration config, CcToolchainProvider toolchain, FeatureConfiguration featureConfiguration) { return config.startEndLibIsRequested() && toolchain.supportsStartEndLib(featureConfiguration); }
static boolean function( CppConfiguration config, CcToolchainProvider toolchain, FeatureConfiguration featureConfiguration) { return config.startEndLibIsRequested() && toolchain.supportsStartEndLib(featureConfiguration); }
/** * Returns true if the build implied by the given config and toolchain uses --start-lib/--end-lib * ld options. */
Returns true if the build implied by the given config and toolchain uses --start-lib/--end-lib ld options
useStartEndLib
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java", "license": "apache-2.0", "size": 42484 }
[ "com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures" ]
import com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures;
import com.google.devtools.build.lib.rules.cpp.*;
[ "com.google.devtools" ]
com.google.devtools;
1,614,706
protected void processSecureBytes(Connection cnx, Message message) throws Exception { if (cnx.getServer().getRequiresCredentials()) { if (!message.isSecureMode()) { // This can be seen during shutdown if (logger.isTraceEnabled(LogMarker.BRIDGE_SERVER_VERBOSE)) { logger.trace(LogMar...
void function(Connection cnx, Message message) throws Exception { if (cnx.getServer().getRequiresCredentials()) { if (!message.isSecureMode()) { if (logger.isTraceEnabled(LogMarker.BRIDGE_SERVER_VERBOSE)) { logger.trace(LogMarker.BRIDGE_SERVER_VERBOSE, STR, cnx, this); } return; } byte[] partBytes = message.getSecureBy...
/** * Process the security information in a response from the server. If the server sends a security * "part" we must process it so all subclasses should allow this method to be invoked. * * @see ServerConnection#updateAndGetSecurityPart() */
Process the security information in a response from the server. If the server sends a security "part" we must process it so all subclasses should allow this method to be invoked
processSecureBytes
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/cache/client/internal/AbstractOp.java", "license": "apache-2.0", "size": 15334 }
[ "org.apache.geode.internal.cache.tier.MessageType", "org.apache.geode.internal.cache.tier.sockets.Message", "org.apache.geode.internal.cache.tier.sockets.ServerConnection", "org.apache.geode.internal.logging.log4j.LogMarker", "org.apache.geode.internal.serialization.ByteArrayDataInput" ]
import org.apache.geode.internal.cache.tier.MessageType; import org.apache.geode.internal.cache.tier.sockets.Message; import org.apache.geode.internal.cache.tier.sockets.ServerConnection; import org.apache.geode.internal.logging.log4j.LogMarker; import org.apache.geode.internal.serialization.ByteArrayDataInput;
import org.apache.geode.internal.cache.tier.*; import org.apache.geode.internal.cache.tier.sockets.*; import org.apache.geode.internal.logging.log4j.*; import org.apache.geode.internal.serialization.*;
[ "org.apache.geode" ]
org.apache.geode;
1,605,291
private void saveRenderingSettings(String permissions, int role, boolean preload) throws Exception { EventContext ctx = newUserAndGroup(permissions); // Import the image File f = File.createTempFile("saveRenderingSettings", "." + OME_FORMAT); XMLMockObjects xml = new XMLM...
void function(String permissions, int role, boolean preload) throws Exception { EventContext ctx = newUserAndGroup(permissions); File f = File.createTempFile(STR, "." + OME_FORMAT); XMLMockObjects xml = new XMLMockObjects(); XMLWriter writer = new XMLWriter(); writer.writeFile(f, xml.createImage(), true); List<Pixels> ...
/** * Inner method which allows to optionally call the rendering method as the * owner. If this is not called, then there will be no rendering def at all * when the secondary uses attempts access. */
Inner method which allows to optionally call the rendering method as the owner. If this is not called, then there will be no rendering def at all when the secondary uses attempts access
saveRenderingSettings
{ "repo_name": "dpwrussell/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/RenderingEngineTest.java", "license": "gpl-2.0", "size": 131845 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,807,618
public static FunctorMap fromFile(File f) throws FileNotFoundException, IOException, ClassNotFoundException { FileInputStream fis = new FileInputStream(f); BufferedInputStream bis = new BufferedInputStream(fis); ByteArrayList bal = new ByteArrayList(); byte[] buff...
static FunctorMap function(File f) throws FileNotFoundException, IOException, ClassNotFoundException { FileInputStream fis = new FileInputStream(f); BufferedInputStream bis = new BufferedInputStream(fis); ByteArrayList bal = new ByteArrayList(); byte[] buff = new byte[1024]; int numread; while (bis.available() > 0) { n...
/** * Restore a functor map from a frozen file * * @param f the file * @return the functor map * @throws FileNotFoundException * @throws IOException * @throws ClassNotFoundException */
Restore a functor map from a frozen file
fromFile
{ "repo_name": "jwoehr/Ubloid", "path": "AndroidStudioProject/ubloid/app/src/main/java/ublu/util/Generics.java", "license": "bsd-2-clause", "size": 40962 }
[ "java.io.BufferedInputStream", "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException" ]
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,788,551
public T itemClicked(AdapterView.OnItemClickListener listener) { if (view instanceof AdapterView) { AdapterView<?> alv = (AdapterView<?>) view; alv.setOnItemClickListener(listener); } return self(); }
T function(AdapterView.OnItemClickListener listener) { if (view instanceof AdapterView) { AdapterView<?> alv = (AdapterView<?>) view; alv.setOnItemClickListener(listener); } return self(); }
/** * Register a callback method for when an item is clicked in the ListView. * * @param listener The callback method. * @return self */
Register a callback method for when an item is clicked in the ListView
itemClicked
{ "repo_name": "tsdl2013/COCOQuery", "path": "query/src/main/java/com/cocosw/query/AbstractViewQuery.java", "license": "apache-2.0", "size": 31255 }
[ "android.widget.AdapterView" ]
import android.widget.AdapterView;
import android.widget.*;
[ "android.widget" ]
android.widget;
103,288
public List<TextContentUpdateDiff> generateChanges( String curXMLContent, String prevXMLContent );
List<TextContentUpdateDiff> function( String curXMLContent, String prevXMLContent );
/** * generates the diff of two xhtml strings * @param curXMLContent * @param prevXMLContent * @return */
generates the diff of two xhtml strings
generateChanges
{ "repo_name": "fregaham/KiWi", "path": "src/action/kiwi/api/revision/UpdateTextContentService.java", "license": "bsd-3-clause", "size": 3419 }
[ "java.util.List", "kiwi.model.revision.TextContentUpdateDiff" ]
import java.util.List; import kiwi.model.revision.TextContentUpdateDiff;
import java.util.*; import kiwi.model.revision.*;
[ "java.util", "kiwi.model.revision" ]
java.util; kiwi.model.revision;
1,107,112
@Override @Transactional public void logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication) { String rememberMeCookie = extractRememberMeCookie(request); if (rememberMeCookie != null && rememberMeCookie.length() != 0) { try { ...
void function(HttpServletRequest request, HttpServletResponse response, Authentication authentication) { String rememberMeCookie = extractRememberMeCookie(request); if (rememberMeCookie != null && rememberMeCookie.length() != 0) { try { String[] cookieTokens = decodeCookie(rememberMeCookie); Token token = getPersistent...
/** * When logout occurs, only invalidate the current token, and not all user sessions. * <p/> * The standard Spring Security implementations are too basic: they invalidate all tokens for the current user, so when he logs out from one browser, all his other sessions are destroyed. */
When logout occurs, only invalidate the current token, and not all user sessions. The standard Spring Security implementations are too basic: they invalidate all tokens for the current user, so when he logs out from one browser, all his other sessions are destroyed
logout
{ "repo_name": "lsmall/flowable-engine", "path": "modules/flowable-ui-idm/flowable-ui-idm-conf/src/main/java/org/flowable/ui/idm/security/CustomPersistentRememberMeServices.java", "license": "apache-2.0", "size": 11134 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.flowable.idm.api.Token", "org.springframework.security.core.Authentication", "org.springframework.security.web.authentication.rememberme.InvalidCookieException", "org.springframework.security.web.authentication.remembe...
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.flowable.idm.api.Token; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.rememberme.InvalidCookieException; import org.springframework.security.web.authe...
import javax.servlet.http.*; import org.flowable.idm.api.*; import org.springframework.security.core.*; import org.springframework.security.web.authentication.rememberme.*;
[ "javax.servlet", "org.flowable.idm", "org.springframework.security" ]
javax.servlet; org.flowable.idm; org.springframework.security;
1,439,306
public int getNumberOfServers() throws IOException{ int numServers = 0; Pattern line = Pattern.compile(".*UP.*", Pattern.CASE_INSENSITIVE); Pattern loginError = Pattern.compile(".*error.*", Pattern.CASE_INSENSITIVE); Process proc = Runtime.getRuntime().exec("rascontrol -t"); Scanner scn = new Scanner(proc.ge...
int function() throws IOException{ int numServers = 0; Pattern line = Pattern.compile(STR, Pattern.CASE_INSENSITIVE); Pattern loginError = Pattern.compile(STR, Pattern.CASE_INSENSITIVE); Process proc = Runtime.getRuntime().exec(STR); Scanner scn = new Scanner(proc.getInputStream()); boolean loginSuccessful; String mess...
/** * Obtain the number of available Rasdaman servers through rascontrol. * * @return The number of servers (if found) * @throws IOException If number of servers cannot be obtained */
Obtain the number of available Rasdaman servers through rascontrol
getNumberOfServers
{ "repo_name": "miracee/rasdaman", "path": "java/src/tests/SimultaneousConnectionsTestUtil.java", "license": "gpl-3.0", "size": 3103 }
[ "java.io.IOException", "java.util.Scanner", "java.util.regex.Pattern" ]
import java.io.IOException; import java.util.Scanner; import java.util.regex.Pattern;
import java.io.*; import java.util.*; import java.util.regex.*;
[ "java.io", "java.util" ]
java.io; java.util;
855,391
boolean accept( SearchOperationContext operation, Entry result ) throws LdapException;
boolean accept( SearchOperationContext operation, Entry result ) throws LdapException;
/** * Filters the contents of search entries on the way out the door to * client callers. These filters can and do produce side-effects on the * entry results if need be. These entries, their attributes and values * should be cloned when alterations are made to avoid altering cached * entri...
Filters the contents of search entries on the way out the door to client callers. These filters can and do produce side-effects on the entry results if need be. These entries, their attributes and values should be cloned when alterations are made to avoid altering cached entries
accept
{ "repo_name": "apache/directory-server", "path": "core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java", "license": "apache-2.0", "size": 2443 }
[ "org.apache.directory.api.ldap.model.entry.Entry", "org.apache.directory.api.ldap.model.exception.LdapException", "org.apache.directory.server.core.api.interceptor.context.SearchOperationContext" ]
import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.server.core.api.interceptor.context.*;
[ "org.apache.directory" ]
org.apache.directory;
1,678,688
@Test public void testPRLocalQueryingWithIndexes() throws Exception { Host host = Host.getHost(0); VM vm0 = host.getVM(0); setCacheInVMs(vm0); // Creating PR's on the participating VM's // Creating DataStore node on the VM0. vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCre...
void function() throws Exception { Host host = Host.getHost(0); VM vm0 = host.getVM(0); setCacheInVMs(vm0); vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(name, redundancy, Portfolio.class)); vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRIndexCreate(name, STR, "r1.ID", "/" + name...
/** * 1. Creates two PR Data Stores with redundantCopies = 1. * * <p> * 2. Populates the region with test data. * * <p> * 3. Fires a LOCAL query on one data store VM and verifies the result. */
1. Creates two PR Data Stores with redundantCopies = 1. 2. Populates the region with test data. 3. Fires a LOCAL query on one data store VM and verifies the result
testPRLocalQueryingWithIndexes
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java", "license": "apache-2.0", "size": 44177 }
[ "org.apache.geode.cache.query.Utils", "org.apache.geode.cache.query.data.Portfolio", "org.apache.geode.test.dunit.Host" ]
import org.apache.geode.cache.query.Utils; import org.apache.geode.cache.query.data.Portfolio; import org.apache.geode.test.dunit.Host;
import org.apache.geode.cache.query.*; import org.apache.geode.cache.query.data.*; import org.apache.geode.test.dunit.*;
[ "org.apache.geode" ]
org.apache.geode;
2,236,009
@ApiMethod(name = "getDeviceInfo") public DeviceInfo getDeviceInfo(@Named("id") String id) { EntityManager mgr = getEntityManager(); DeviceInfo deviceinfo = null; try { deviceinfo = mgr.find(DeviceInfo.class, id); } finally { mgr.close(); } return deviceinfo; }
@ApiMethod(name = STR) DeviceInfo function(@Named("id") String id) { EntityManager mgr = getEntityManager(); DeviceInfo deviceinfo = null; try { deviceinfo = mgr.find(DeviceInfo.class, id); } finally { mgr.close(); } return deviceinfo; }
/** * This method gets the entity having primary key id. It uses HTTP GET method. * * @param id the primary key of the java bean. * @return The entity with primary key id. */
This method gets the entity having primary key id. It uses HTTP GET method
getDeviceInfo
{ "repo_name": "rajeev781/solutions-mobile-shopping-assistant-backend-java", "path": "MobileAssistant-Tutorial/MobileAssistant-AppEngine/src/com/google/samplesolutions/mobileassistant/DeviceInfoEndpoint.java", "license": "apache-2.0", "size": 5147 }
[ "com.google.api.server.spi.config.ApiMethod", "javax.inject.Named", "javax.persistence.EntityManager" ]
import com.google.api.server.spi.config.ApiMethod; import javax.inject.Named; import javax.persistence.EntityManager;
import com.google.api.server.spi.config.*; import javax.inject.*; import javax.persistence.*;
[ "com.google.api", "javax.inject", "javax.persistence" ]
com.google.api; javax.inject; javax.persistence;
625,881
public RexLiteral makeTimestampLiteral( Calendar timestamp, int precision) { assert timestamp != null; return makeLiteral( timestamp, typeFactory.createSqlType(SqlTypeName.TIMESTAMP, precision), SqlTypeName.TIMESTAMP); }
RexLiteral function( Calendar timestamp, int precision) { assert timestamp != null; return makeLiteral( timestamp, typeFactory.createSqlType(SqlTypeName.TIMESTAMP, precision), SqlTypeName.TIMESTAMP); }
/** * Creates a Timestamp literal. */
Creates a Timestamp literal
makeTimestampLiteral
{ "repo_name": "wanglan/calcite", "path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java", "license": "apache-2.0", "size": 45773 }
[ "java.util.Calendar", "org.apache.calcite.sql.type.SqlTypeName" ]
import java.util.Calendar; import org.apache.calcite.sql.type.SqlTypeName;
import java.util.*; import org.apache.calcite.sql.type.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
2,034,314
public static void main(String[] args) throws ParseException, IOException { Client client = new Client( new DumpProcessingController("wikidatawiki"), args); client.performActions(); }
static void function(String[] args) throws ParseException, IOException { Client client = new Client( new DumpProcessingController(STR), args); client.performActions(); }
/** * Launches the client with the specified parameters. * * @param args * command line parameters * @throws ParseException * @throws IOException */
Launches the client with the specified parameters
main
{ "repo_name": "zazi/Wikidata-Toolkit", "path": "wdtk-client/src/main/java/org/wikidata/wdtk/client/Client.java", "license": "apache-2.0", "size": 8439 }
[ "java.io.IOException", "org.apache.commons.cli.ParseException", "org.wikidata.wdtk.dumpfiles.DumpProcessingController" ]
import java.io.IOException; import org.apache.commons.cli.ParseException; import org.wikidata.wdtk.dumpfiles.DumpProcessingController;
import java.io.*; import org.apache.commons.cli.*; import org.wikidata.wdtk.dumpfiles.*;
[ "java.io", "org.apache.commons", "org.wikidata.wdtk" ]
java.io; org.apache.commons; org.wikidata.wdtk;
2,649,785
public static Map<String, String> asMap(Properties properties) { Map<String, String> map = Generics.newHashMap(); for (Entry<Object, Object> entry : properties.entrySet()) { map.put((String)entry.getKey(), (String)entry.getValue()); } return map; }
static Map<String, String> function(Properties properties) { Map<String, String> map = Generics.newHashMap(); for (Entry<Object, Object> entry : properties.entrySet()) { map.put((String)entry.getKey(), (String)entry.getValue()); } return map; }
/** * Tired of Properties not behaving like {@code Map<String,String>}s? This method will solve that problem for you. */
Tired of Properties not behaving like Maps? This method will solve that problem for you
asMap
{ "repo_name": "intfloat/CoreNLP", "path": "src/edu/stanford/nlp/util/PropertiesUtils.java", "license": "gpl-2.0", "size": 14219 }
[ "java.util.Map", "java.util.Properties" ]
import java.util.Map; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,182,591
public static Optional<HealthCheck.Result> invoke(CamelContext camelContext, String id, Map<String, Object> options) { final HealthCheckRegistry registry = HealthCheckRegistry.get(camelContext); if (registry != null) { return registry.getCheck(id).map(check -> check.call(options)); ...
static Optional<HealthCheck.Result> function(CamelContext camelContext, String id, Map<String, Object> options) { final HealthCheckRegistry registry = HealthCheckRegistry.get(camelContext); if (registry != null) { return registry.getCheck(id).map(check -> check.call(options)); } else { LOG.debug(STR); } return Optional...
/** * Invoke a check by id. * * @param camelContext the camel context. * @param id the check id. * @param options the check options. * @return an optional {@link HealthCheck.Result}. */
Invoke a check by id
invoke
{ "repo_name": "pax95/camel", "path": "core/camel-api/src/main/java/org/apache/camel/health/HealthCheckHelper.java", "license": "apache-2.0", "size": 6440 }
[ "java.util.Map", "java.util.Optional", "org.apache.camel.CamelContext" ]
import java.util.Map; import java.util.Optional; import org.apache.camel.CamelContext;
import java.util.*; import org.apache.camel.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
671,259
public ArangoDBQueryBuilder documentsById( List<String> ids, String loopVariable, Map<String, Object> bindVars) { queryBuilder.append("LET docs = FLATTEN(RETURN Document(@ids))\n"); queryBuilder.append(String.format("FOR %s IN docs\n", loopVariable)); queryBuilder.append(String.format(" FILTER NOT IS_NULL...
ArangoDBQueryBuilder function( List<String> ids, String loopVariable, Map<String, Object> bindVars) { queryBuilder.append(STR); queryBuilder.append(String.format(STR, loopVariable)); queryBuilder.append(String.format(STR, loopVariable)); bindVars.put("ids", ids); logger.debug(STR, queryBuilder.toString()); return this;...
/** * Append a Document and FILTER statements to the query builder. Use this to find a single or * group of elements in the graph. This segment should be used in conjunction with the * {@link #with(List, Map)} segment. * * @param ids the id(s) to look for * @param loopVariable the loop variable nam...
Append a Document and FILTER statements to the query builder. Use this to find a single or group of elements in the graph. This segment should be used in conjunction with the <code>#with(List, Map)</code> segment
documentsById
{ "repo_name": "arangodb/blueprints-arangodb-graph", "path": "src/main/java/com/arangodb/tinkerpop/gremlin/client/ArangoDBQueryBuilder.java", "license": "apache-2.0", "size": 15588 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
213,824
@Test public void gzipWithRedirectAndConnectionReuse() throws Exception { server.enqueue(new MockResponse() .setResponseCode(HttpURLConnection.HTTP_MOVED_TEMP) .addHeader("Location: /foo") .addHeader("Content-Encoding: gzip") .setBody(gzip("Moved! Moved! Moved!"))); server.enqu...
@Test void function() throws Exception { server.enqueue(new MockResponse() .setResponseCode(HttpURLConnection.HTTP_MOVED_TEMP) .addHeader(STR) .addHeader(STR) .setBody(gzip(STR))); server.enqueue(new MockResponse().setBody(STR)); HttpURLConnection connection = urlFactory.open(server.url("/").url()); assertContent(STR, ...
/** * We had a bug where we weren't closing Gzip streams on redirects. * https://github.com/square/okhttp/issues/441 */
We had a bug where we weren't closing Gzip streams on redirects. HREF
gzipWithRedirectAndConnectionReuse
{ "repo_name": "weiwenqiang/GitHub", "path": "expert/okhttp/okhttp-tests/src/test/java/okhttp3/URLConnectionTest.java", "license": "apache-2.0", "size": 151984 }
[ "java.net.HttpURLConnection", "org.junit.Assert", "org.junit.Test" ]
import java.net.HttpURLConnection; import org.junit.Assert; import org.junit.Test;
import java.net.*; import org.junit.*;
[ "java.net", "org.junit" ]
java.net; org.junit;
1,803,909
public boolean isRepeat() { return getStyle().getBooleanStyleProperty( BandStyleKeys.REPEAT_HEADER ); }
boolean function() { return getStyle().getBooleanStyleProperty( BandStyleKeys.REPEAT_HEADER ); }
/** * Checks whether this group header should be repeated on new pages. * * @return true, if the header will be repeated, false otherwise */
Checks whether this group header should be repeated on new pages
isRepeat
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/DetailsHeader.java", "license": "lgpl-2.1", "size": 4193 }
[ "org.pentaho.reporting.engine.classic.core.style.BandStyleKeys" ]
import org.pentaho.reporting.engine.classic.core.style.BandStyleKeys;
import org.pentaho.reporting.engine.classic.core.style.*;
[ "org.pentaho.reporting" ]
org.pentaho.reporting;
1,866,581
public MulticastDefinition multicast(AggregationStrategy aggregationStrategy) { MulticastDefinition answer = new MulticastDefinition(); addOutput(answer); answer.setAggregationStrategy(aggregationStrategy); return answer; }
MulticastDefinition function(AggregationStrategy aggregationStrategy) { MulticastDefinition answer = new MulticastDefinition(); addOutput(answer); answer.setAggregationStrategy(aggregationStrategy); return answer; }
/** * <a href="http://camel.apache.org/multicast.html">Multicast EIP:</a> * Multicasts messages to all its child outputs; so that each processor and * destination gets a copy of the original message to avoid the processors * interfering with each other. * * @param aggregationStrategy...
Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other
multicast
{ "repo_name": "everttigchelaar/camel-svn", "path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java", "license": "apache-2.0", "size": 120346 }
[ "org.apache.camel.processor.aggregate.AggregationStrategy" ]
import org.apache.camel.processor.aggregate.AggregationStrategy;
import org.apache.camel.processor.aggregate.*;
[ "org.apache.camel" ]
org.apache.camel;
711,504
public void loadAndReplaceMimetypes(InputStream is) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(is)); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); if (line.startsWith("#") || line.length() ==...
void function(InputStream is) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(is)); String line = null; while ((line = br.readLine()) != null) { line = line.trim(); if (line.startsWith("#") line.length() == 0) { } else { StringTokenizer st = new StringTokenizer(line, STR); if (st.count...
/** * Reads and stores the mime type setting corresponding to a file extension, by reading * text from an InputStream. If a mime type setting already exists when this method is run, * the mime type value is replaced with the newer one. * * @param is * * @throws IOException */
Reads and stores the mime type setting corresponding to a file extension, by reading text from an InputStream. If a mime type setting already exists when this method is run, the mime type value is replaced with the newer one
loadAndReplaceMimetypes
{ "repo_name": "SaiNadh001/aws-sdk-for-java", "path": "src/main/java/com/amazonaws/services/s3/internal/Mimetypes.java", "license": "apache-2.0", "size": 8145 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.util.StringTokenizer" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,921,307
public ApplicationGatewayBackendHealthServer withIpConfiguration(NetworkInterfaceIPConfigurationInner ipConfiguration) { this.ipConfiguration = ipConfiguration; return this; }
ApplicationGatewayBackendHealthServer function(NetworkInterfaceIPConfigurationInner ipConfiguration) { this.ipConfiguration = ipConfiguration; return this; }
/** * Set reference of IP configuration of backend server. * * @param ipConfiguration the ipConfiguration value to set * @return the ApplicationGatewayBackendHealthServer object itself. */
Set reference of IP configuration of backend server
withIpConfiguration
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/ApplicationGatewayBackendHealthServer.java", "license": "mit", "size": 2959 }
[ "com.microsoft.azure.management.network.v2018_07_01.implementation.NetworkInterfaceIPConfigurationInner" ]
import com.microsoft.azure.management.network.v2018_07_01.implementation.NetworkInterfaceIPConfigurationInner;
import com.microsoft.azure.management.network.v2018_07_01.implementation.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,323,996
public synchronized boolean isRigQueued(Long id, org.hibernate.Session db) { Rig rig = new RigDao(db).get(id); if (this.rigQueues.containsKey(rig.getId()) && this.rigQueues.get(rig.getId()).size() > 0) { return true; } if (this.typeQueue...
synchronized boolean function(Long id, org.hibernate.Session db) { Rig rig = new RigDao(db).get(id); if (this.rigQueues.containsKey(rig.getId()) && this.rigQueues.get(rig.getId()).size() > 0) { return true; } if (this.typeQueues.containsKey(rig.getRigType().getId()) && this.typeQueues.get(rig.getRigType().getId()).size...
/** * Returns true if the rig, the rig's type or a matching request capabilites is queued. * That is, if a session is queued that a rig may be assigned to, <code>true</code> * is returned. * * @param id identifier of rig * @return true if the rig is queued for */
Returns true if the rig, the rig's type or a matching request capabilites is queued. That is, if a session is queued that a rig may be assigned to, <code>true</code> is returned
isRigQueued
{ "repo_name": "sahara-labs/scheduling-server", "path": "Queuer/src/au/edu/uts/eng/remotelabs/schedserver/queuer/impl/Queue.java", "license": "bsd-3-clause", "size": 23774 }
[ "au.edu.uts.eng.remotelabs.schedserver.dataaccess.dao.RigDao", "au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.MatchingCapabilities", "au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.RequestCapabilities", "au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.Rig", "au.edu.uts.eng.r...
import au.edu.uts.eng.remotelabs.schedserver.dataaccess.dao.RigDao; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.MatchingCapabilities; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.RequestCapabilities; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.Rig; import au...
import au.edu.uts.eng.remotelabs.schedserver.dataaccess.dao.*; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.*;
[ "au.edu.uts" ]
au.edu.uts;
2,204,045
public static void deleteTaggedValue(Method m, String nameOfTVToDelete) { Collection<MethodTag> cTV = m.GetTaggedValues(); cTV.Refresh(); for (short i = 0; i < cTV.GetCount(); i++) { MethodTag tv = cTV.GetAt(i); if (tv.GetName().equalsIgnoreCase(nameOfTVToDelete)) { cTV.Delete(i); } ...
static void function(Method m, String nameOfTVToDelete) { Collection<MethodTag> cTV = m.GetTaggedValues(); cTV.Refresh(); for (short i = 0; i < cTV.GetCount(); i++) { MethodTag tv = cTV.GetAt(i); if (tv.GetName().equalsIgnoreCase(nameOfTVToDelete)) { cTV.Delete(i); } } cTV.Refresh(); }
/** * Deletes all tagged values whose name equals (ignoring case) the given * name in the given method. * * @param m tbd * @param nameOfTVToDelete tbd */
Deletes all tagged values whose name equals (ignoring case) the given name in the given method
deleteTaggedValue
{ "repo_name": "ShapeChange/ShapeChange", "path": "src/main/java/de/interactive_instruments/ShapeChange/Util/ea/EAMethodUtil.java", "license": "gpl-3.0", "size": 8289 }
[ "org.sparx.Collection", "org.sparx.Method", "org.sparx.MethodTag" ]
import org.sparx.Collection; import org.sparx.Method; import org.sparx.MethodTag;
import org.sparx.*;
[ "org.sparx" ]
org.sparx;
1,336,828
if ( _instance == null ) { _instance = new Cached_ProjectTblSubPartsForProjectLists(); } return _instance; } private Cached_ProjectTblSubPartsForProjectLists() { if ( log.isDebugEnabled() ) { debugLogLevelEnabled = true; log.debug( "debug log level enabled" ); } cacheHolderInternal = new Ca...
if ( _instance == null ) { _instance = new Cached_ProjectTblSubPartsForProjectLists(); } return _instance; } private Cached_ProjectTblSubPartsForProjectLists() { if ( log.isDebugEnabled() ) { debugLogLevelEnabled = true; log.debug( STR ); } cacheHolderInternal = new CacheHolderInternal( this ); CachedDataCentralRegistr...
/** * Static get singleton instance * @return * @throws Exception */
Static get singleton instance
getInstance
{ "repo_name": "yeastrc/proxl-web-app", "path": "proxl_web_app/src/main/java/org/yeastrc/xlink/www/searcher_via_cached_data/cached_data_holders/Cached_ProjectTblSubPartsForProjectLists.java", "license": "apache-2.0", "size": 9636 }
[ "org.yeastrc.xlink.www.cached_data_mgmt.CachedDataCentralRegistry", "org.yeastrc.xlink.www.objects.ProjectTblSubPartsForProjectLists" ]
import org.yeastrc.xlink.www.cached_data_mgmt.CachedDataCentralRegistry; import org.yeastrc.xlink.www.objects.ProjectTblSubPartsForProjectLists;
import org.yeastrc.xlink.www.cached_data_mgmt.*; import org.yeastrc.xlink.www.objects.*;
[ "org.yeastrc.xlink" ]
org.yeastrc.xlink;
1,904,512
public Object getAsObject(final FacesContext context, final UIComponent component, final String value) throws ConverterException { if ((value == null) || (value.length() == 0)) { return null; } else { try { return new EnterpriseNu...
Object function(final FacesContext context, final UIComponent component, final String value) throws ConverterException { if ((value == null) (value.length() == 0)) { return null; } else { try { return new EnterpriseNumber(value); } catch (PropertyException e) { LOG.debug(STR + value + STR, e); throw new ConverterExcept...
/** * Convert the specified string value, which is associated with the * specified UIComponent, into a model data object that is appropriate for * being stored during the Apply Request Values phase of the request * processing lifecycle. * * @result value == null || value.length == 0 * =...
Convert the specified string value, which is associated with the specified UIComponent, into a model data object that is appropriate for being stored during the Apply Request Values phase of the request processing lifecycle
getAsObject
{ "repo_name": "jandppw/ppwcode-recovered-from-google-code", "path": "java/value/dev/d20080924-1907/src/main/java/org/ppwcode/value_III/legacy/EnterpriseNumberConverter.java", "license": "apache-2.0", "size": 4479 }
[ "javax.faces.component.UIComponent", "javax.faces.context.FacesContext", "javax.faces.convert.ConverterException", "org.ppwcode.vernacular.value_III.PropertyException" ]
import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.ConverterException; import org.ppwcode.vernacular.value_III.PropertyException;
import javax.faces.component.*; import javax.faces.context.*; import javax.faces.convert.*; import org.ppwcode.vernacular.*;
[ "javax.faces", "org.ppwcode.vernacular" ]
javax.faces; org.ppwcode.vernacular;
1,239,309
private static void loadModules(String startClassName) throws IOException { BufferedReader apks = new BufferedReader(new FileReader(BASE_DIR + "conf/modules.list")); String apk; log(">>>load modules"); while ((apk = apks.readLine()) != null) { log("load modules: "+apk); ...
static void function(String startClassName) throws IOException { BufferedReader apks = new BufferedReader(new FileReader(BASE_DIR + STR)); String apk; log(STR); while ((apk = apks.readLine()) != null) { log(STR+apk); loadModule(apk, startClassName); } log(STR); apks.close(); }
/** * Try to load all modules defined in <code>BASE_DIR/conf/modules.list</code> */
Try to load all modules defined in <code>BASE_DIR/conf/modules.list</code>
loadModules
{ "repo_name": "nkafei/xposed-art", "path": "xposed_bridge/src/de/robv/android/xposed/XposedBridge.java", "license": "apache-2.0", "size": 26446 }
[ "java.io.BufferedReader", "java.io.FileReader", "java.io.IOException" ]
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,981,945
public synchronized void setBitmap(Bitmap bitmap) { if (DRAW_TEXTURE) { // Bitmap original size. int w = bitmap.getWidth(); int h = bitmap.getHeight(); // Bitmap size expanded to next power of two. This is done due to // the requirement on many devices, texture width and height should // be power...
synchronized void function(Bitmap bitmap) { if (DRAW_TEXTURE) { int w = bitmap.getWidth(); int h = bitmap.getHeight(); int newW = getNextHighestPO2(w); int newH = getNextHighestPO2(h); if(mBitmap != null){ mBitmap.recycle(); mBitmap = null; } mBitmap = Bitmap.createBitmap(newW, newH, bitmap.getConfig()); Canvas c = new...
/** * Sets new texture for this mesh. */
Sets new texture for this mesh
setBitmap
{ "repo_name": "cesine/AndroidMorphologicalAwareness", "path": "src/ca/ilanguage/oprime/morphologicalawareness/ui/CurlMesh.java", "license": "apache-2.0", "size": 31642 }
[ "android.graphics.Bitmap", "android.graphics.Canvas" ]
import android.graphics.Bitmap; import android.graphics.Canvas;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,478,353
public InternalCodingDt setSystem(String theUri) { mySystem = new UriDt(theUri); return this; }
InternalCodingDt function(String theUri) { mySystem = new UriDt(theUri); return this; }
/** * Sets the value for <b>system</b> (Identity of the terminology system) * * <p> * <b>Definition:</b> The identification of the code system that defines the meaning of the symbol in the code. * </p> */
Sets the value for system (Identity of the terminology system) Definition: The identification of the code system that defines the meaning of the symbol in the code.
setSystem
{ "repo_name": "bjornna/hapi-fhir", "path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java", "license": "apache-2.0", "size": 10856 }
[ "ca.uhn.fhir.model.primitive.UriDt" ]
import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.model.primitive.*;
[ "ca.uhn.fhir" ]
ca.uhn.fhir;
1,539,683
@Override public void disableBroker() throws PulsarServerException { if (StringUtils.isNotEmpty(brokerZnodePath)) { try { brokerDataLock.release().join(); } catch (CompletionException e) { if (e.getCause() instanceof NotFoundException) { ...
void function() throws PulsarServerException { if (StringUtils.isNotEmpty(brokerZnodePath)) { try { brokerDataLock.release().join(); } catch (CompletionException e) { if (e.getCause() instanceof NotFoundException) { throw new PulsarServerException.NotFoundException(MetadataStoreException.unwrap(e)); } else { throw new ...
/** * As any broker, disable the broker this manager is running on. * * @throws PulsarServerException * If there's a failure when disabling broker on metadata store. */
As any broker, disable the broker this manager is running on
disableBroker
{ "repo_name": "massakam/pulsar", "path": "pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ModularLoadManagerImpl.java", "license": "apache-2.0", "size": 53534 }
[ "java.util.concurrent.CompletionException", "org.apache.commons.lang3.StringUtils", "org.apache.pulsar.broker.PulsarServerException", "org.apache.pulsar.metadata.api.MetadataStoreException" ]
import java.util.concurrent.CompletionException; import org.apache.commons.lang3.StringUtils; import org.apache.pulsar.broker.PulsarServerException; import org.apache.pulsar.metadata.api.MetadataStoreException;
import java.util.concurrent.*; import org.apache.commons.lang3.*; import org.apache.pulsar.broker.*; import org.apache.pulsar.metadata.api.*;
[ "java.util", "org.apache.commons", "org.apache.pulsar" ]
java.util; org.apache.commons; org.apache.pulsar;
2,102,190
protected Object convertToString(final Object value) { if (value instanceof Date) { DateFormat df = new SimpleDateFormat(DateUtil.getDatePattern()); if (value instanceof Timestamp) { df = new SimpleDateFormat(DateUtil.getDateTimePattern()); } ...
Object function(final Object value) { if (value instanceof Date) { DateFormat df = new SimpleDateFormat(DateUtil.getDatePattern()); if (value instanceof Timestamp) { df = new SimpleDateFormat(DateUtil.getDateTimePattern()); } try { return df.format(value); } catch (final Exception e) { throw new ConversionException(STR...
/** * Convert a java.util.Date or a java.sql.Timestamp to a String. Or does a toString * @param value value to convert * @return Converted value for property population */
Convert a java.util.Date or a java.sql.Timestamp to a String. Or does a toString
convertToString
{ "repo_name": "mraible/appfuse-noxml", "path": "src/main/java/com/raibledesigns/util/DateConverter.java", "license": "apache-2.0", "size": 3247 }
[ "java.sql.Timestamp", "java.text.DateFormat", "java.text.SimpleDateFormat", "java.util.Date", "org.apache.commons.beanutils.ConversionException" ]
import java.sql.Timestamp; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import org.apache.commons.beanutils.ConversionException;
import java.sql.*; import java.text.*; import java.util.*; import org.apache.commons.beanutils.*;
[ "java.sql", "java.text", "java.util", "org.apache.commons" ]
java.sql; java.text; java.util; org.apache.commons;
315,654
public void onInterpretButtonPressed(View view) { onRespeakButton(view, "interpret"); }
void function(View view) { onRespeakButton(view, STR); }
/** * Callback for an interpret quickaction button * @param view The interpret quickaction button */
Callback for an interpret quickaction button
onInterpretButtonPressed
{ "repo_name": "aikuma/aikuma", "path": "Aikuma/src/org/lp20/aikuma/ui/ListenActivity.java", "license": "agpl-3.0", "size": 23021 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
164,644
@NotNull public static GCWatcher fromClearedRef(@NotNull Ref<?> ref) { GCWatcher result = tracking(ref.get()); ref.set(null); return result; }
static GCWatcher function(@NotNull Ref<?> ref) { GCWatcher result = tracking(ref.get()); ref.set(null); return result; }
/** * Create a GCWatcher from whatever is in the ref, then clear the ref. */
Create a GCWatcher from whatever is in the ref, then clear the ref
fromClearedRef
{ "repo_name": "dahlstrom-g/intellij-community", "path": "platform/util/src/com/intellij/util/ref/GCWatcher.java", "license": "apache-2.0", "size": 3833 }
[ "com.intellij.openapi.util.Ref", "org.jetbrains.annotations.NotNull" ]
import com.intellij.openapi.util.Ref; import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.util.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "org.jetbrains.annotations" ]
com.intellij.openapi; org.jetbrains.annotations;
1,979,323
public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) m_adaptee.keyPressed(e); } } // VTreePanel_keyAdapter private static final long serialVersionUID = -6798614427038652192L; private static final String PREFIX_DOCUMENT_SEARCH = "/"; protected boolean m...
void function(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) m_adaptee.keyPressed(e); } } private static final long serialVersionUID = -6798614427038652192L; private static final String PREFIX_DOCUMENT_SEARCH = "/"; protected boolean m_lookAndFeelChanged = false; private VTreeTransferHandler handler = new VTree...
/** * Key Pressed * @param e */
Key Pressed
keyPressed
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/client/src/org/compiere/grid/tree/VTreePanel.java", "license": "gpl-2.0", "size": 31170 }
[ "java.awt.Dimension", "java.awt.event.KeyEvent", "java.util.ArrayList", "javax.swing.JToolBar", "org.adempiere.plaf.AdempierePLAF" ]
import java.awt.Dimension; import java.awt.event.KeyEvent; import java.util.ArrayList; import javax.swing.JToolBar; import org.adempiere.plaf.AdempierePLAF;
import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import org.adempiere.plaf.*;
[ "java.awt", "java.util", "javax.swing", "org.adempiere.plaf" ]
java.awt; java.util; javax.swing; org.adempiere.plaf;
1,646,211
@Test public void testNameDirLocking() throws IOException { Configuration conf = new HdfsConfiguration(); MiniDFSCluster cluster = null; // Start a NN, and verify that lock() fails in all of the configured // directories StorageDirectory savedSd = null; try { cluster = new MiniDFS...
void function() throws IOException { Configuration conf = new HdfsConfiguration(); MiniDFSCluster cluster = null; StorageDirectory savedSd = null; try { cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build(); NNStorage storage = cluster.getNameNode().getFSImage().getStorage(); for (StorageDirectory sd : sto...
/** * Test that the NN locks its storage and edits directories, and won't start up * if the directories are already locked **/
Test that the NN locks its storage and edits directories, and won't start up if the directories are already locked
testNameDirLocking
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java", "license": "apache-2.0", "size": 88361 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hdfs.HdfsConfiguration", "org.apache.hadoop.hdfs.MiniDFSCluster", "org.apache.hadoop.hdfs.server.common.Storage", "org.junit.Assert" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.server.common.Storage; import org.junit.Assert;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.common.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
56,962
PageObjectFactory getPageObjectFactory();
PageObjectFactory getPageObjectFactory();
/** * Returns the {@link PageObjectFactory page object factory} used by this * browser instance. * <p> * This factory is usually set while building the instance using a * {@link BrowserBuilder browser builder}. * * @return the page object factory */
Returns the <code>PageObjectFactory page object factory</code> used by this browser instance. This factory is usually set while building the instance using a <code>BrowserBuilder browser builder</code>
getPageObjectFactory
{ "repo_name": "testIT-WebTester/webtester-core", "path": "webtester-core/src/main/java/info/novatec/testit/webtester/api/browser/Browser.java", "license": "apache-2.0", "size": 18372 }
[ "info.novatec.testit.webtester.api.pageobjects.PageObjectFactory" ]
import info.novatec.testit.webtester.api.pageobjects.PageObjectFactory;
import info.novatec.testit.webtester.api.pageobjects.*;
[ "info.novatec.testit" ]
info.novatec.testit;
1,609,517
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) public MailPostsEntity physicalInsert(MailPostsEntity entity) { String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/MailPostsDao/MailPostsDao_insert.sql"); executeUpdate(sql, ...
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) MailPostsEntity function(MailPostsEntity entity) { String sql = SQLManager.getInstance().getSql(STR); executeUpdate(sql, entity.getMessageId(), entity.getPostKind(), entity.getId(), entity.getSender(), entity.getInsertUser(), entity.getInsert...
/** * Physical Insert. * if key column have sequence, key value create by database. * @param entity entity * @return saved entity */
Physical Insert. if key column have sequence, key value create by database
physicalInsert
{ "repo_name": "support-project/knowledge", "path": "src/main/java/org/support/project/knowledge/dao/gen/GenMailPostsDao.java", "license": "apache-2.0", "size": 16288 }
[ "org.support.project.aop.Aspect", "org.support.project.knowledge.entity.MailPostsEntity", "org.support.project.ormapping.common.SQLManager" ]
import org.support.project.aop.Aspect; import org.support.project.knowledge.entity.MailPostsEntity; import org.support.project.ormapping.common.SQLManager;
import org.support.project.aop.*; import org.support.project.knowledge.entity.*; import org.support.project.ormapping.common.*;
[ "org.support.project" ]
org.support.project;
657,385
public void setIntValue(int newIntValue) throws RemoteException;
void function(int newIntValue) throws RemoteException;
/** * Set accessor for persistent attribute: intValue */
Set accessor for persistent attribute: intValue
setIntValue
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XSFRemoteSpecEJB.jar/src/com/ibm/ejb2x/base/spec/sfr/ejb/SFRa.java", "license": "epl-1.0", "size": 10102 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
2,204,121
public AccountHeaderBuilder withAccountHeader(@LayoutRes int resLayout) { if (mActivity == null) { throw new RuntimeException("please pass an activity first to use this call"); } if (resLayout != -1) { this.mAccountHeaderContainer = mActivity.getLayoutInflater().infl...
AccountHeaderBuilder function(@LayoutRes int resLayout) { if (mActivity == null) { throw new RuntimeException(STR); } if (resLayout != -1) { this.mAccountHeaderContainer = mActivity.getLayoutInflater().inflate(resLayout, null, false); } else { if (mCompactStyle) { this.mAccountHeaderContainer = mActivity.getLayoutInfla...
/** * You can pass a custom layout for the drawer lib. see the drawer.xml in layouts of this lib on GitHub * * @param resLayout * @return */
You can pass a custom layout for the drawer lib. see the drawer.xml in layouts of this lib on GitHub
withAccountHeader
{ "repo_name": "hanhailong/MaterialDrawer", "path": "library/src/main/java/com/mikepenz/materialdrawer/AccountHeaderBuilder.java", "license": "apache-2.0", "size": 46050 }
[ "android.support.annotation.LayoutRes", "com.mikepenz.materialdrawer.model.interfaces.IProfile", "java.util.ArrayList" ]
import android.support.annotation.LayoutRes; import com.mikepenz.materialdrawer.model.interfaces.IProfile; import java.util.ArrayList;
import android.support.annotation.*; import com.mikepenz.materialdrawer.model.interfaces.*; import java.util.*;
[ "android.support", "com.mikepenz.materialdrawer", "java.util" ]
android.support; com.mikepenz.materialdrawer; java.util;
2,904,310
private boolean isTemplateRelevant(NetworkTemplate template) { final TelephonyManager tele = TelephonyManager.from(mContext); switch (template.getMatchRule()) { case MATCH_MOBILE_3G_LOWER: case MATCH_MOBILE_4G: case MATCH_MOBILE_ALL: // mobile tem...
boolean function(NetworkTemplate template) { final TelephonyManager tele = TelephonyManager.from(mContext); switch (template.getMatchRule()) { case MATCH_MOBILE_3G_LOWER: case MATCH_MOBILE_4G: case MATCH_MOBILE_ALL: if (tele.getSimState() == SIM_STATE_READY) { return Objects.equal(tele.getSubscriberId(), template.getSu...
/** * Test if given {@link NetworkTemplate} is relevant to user based on * current device state, such as when * {@link TelephonyManager#getSubscriberId()} matches. This is regardless of * data connection status. */
Test if given <code>NetworkTemplate</code> is relevant to user based on current device state, such as when <code>TelephonyManager#getSubscriberId()</code> matches. This is regardless of data connection status
isTemplateRelevant
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/android/server/net/NetworkPolicyManagerService.java", "license": "apache-2.0", "size": 86977 }
[ "android.net.NetworkTemplate", "android.telephony.TelephonyManager", "com.android.internal.util.Objects" ]
import android.net.NetworkTemplate; import android.telephony.TelephonyManager; import com.android.internal.util.Objects;
import android.net.*; import android.telephony.*; import com.android.internal.util.*;
[ "android.net", "android.telephony", "com.android.internal" ]
android.net; android.telephony; com.android.internal;
2,254,611
public static List<PossiblePoints> predictPossiblePoints(double[][] kscores, int[][] KscoresC, double[][] Kpre) throws IOException{ double[][] A = new double[kscores[0].length][kscores[1].length]; for (int i=0; i< kscores[0].length - 5; i++){ for (int j=0; j < kscores[1].length - 5 ; j++){ ...
static List<PossiblePoints> function(double[][] kscores, int[][] KscoresC, double[][] Kpre) throws IOException{ double[][] A = new double[kscores[0].length][kscores[1].length]; for (int i=0; i< kscores[0].length - 5; i++){ for (int j=0; j < kscores[1].length - 5 ; j++){ A[i][j] = kscores[i][j] + kscores[i + 4][j + 4] -...
/** * Predict Possible Points * */
Predict Possible Points
predictPossiblePoints
{ "repo_name": "MKLab-ITI/image-forensics", "path": "java_service/src/main/java/gr/iti/mklab/reveal/forensics/maps/grids/GridsCalculate.java", "license": "apache-2.0", "size": 29252 }
[ "gr.iti.mklab.reveal.forensics.maps.grids.GridsExtractor", "java.io.IOException", "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import gr.iti.mklab.reveal.forensics.maps.grids.GridsExtractor; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import gr.iti.mklab.reveal.forensics.maps.grids.*; import java.io.*; import java.util.*;
[ "gr.iti.mklab", "java.io", "java.util" ]
gr.iti.mklab; java.io; java.util;
138,607
@Generated @Selector("advertiser:didReceiveInvitationFromPeer:withContext:invitationHandler:") void advertiserDidReceiveInvitationFromPeerWithContextInvitationHandler(MCNearbyServiceAdvertiser advertiser, MCPeerID peerID, NSData context, @ObjCBlock(name = "call_advertiserDidReceiveIn...
@Selector(STR) void advertiserDidReceiveInvitationFromPeerWithContextInvitationHandler(MCNearbyServiceAdvertiser advertiser, MCPeerID peerID, NSData context, @ObjCBlock(name = STR) Block_advertiserDidReceiveInvitationFromPeerWithContextInvitationHandler invitationHandler);
/** * Incoming invitation request. Call the invitationHandler block with YES * and a valid session to connect the inviting peer to the session. */
Incoming invitation request. Call the invitationHandler block with YES and a valid session to connect the inviting peer to the session
advertiserDidReceiveInvitationFromPeerWithContextInvitationHandler
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/multipeerconnectivity/protocol/MCNearbyServiceAdvertiserDelegate.java", "license": "apache-2.0", "size": 2596 }
[ "org.moe.natj.objc.ann.ObjCBlock", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.ObjCBlock; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,836,647
public DiscoverInfo discoverInfo() throws XMPPException { DiscoverInfo info = new DiscoverInfo(); info.setTo(to); info.setNode(getId()); return (DiscoverInfo)SyncPacketSend.getReply(con, info); } /** * Get the subscriptions currently associated with this node. * * @return List of {@...
DiscoverInfo function() throws XMPPException { DiscoverInfo info = new DiscoverInfo(); info.setTo(to); info.setNode(getId()); return (DiscoverInfo)SyncPacketSend.getReply(con, info); } /** * Get the subscriptions currently associated with this node. * * @return List of {@link Subscription}
/** * Discover node information in standard {@link DiscoverInfo} format. * * @return The discovery information about the node. * * @throws XMPPException */
Discover node information in standard <code>DiscoverInfo</code> format
discoverInfo
{ "repo_name": "ErkiDerLoony/xpeter", "path": "lib/smack-3.2.1-source/org/jivesoftware/smackx/pubsub/Node.java", "license": "gpl-3.0", "size": 17002 }
[ "java.util.List", "org.jivesoftware.smack.XMPPException", "org.jivesoftware.smackx.packet.DiscoverInfo", "org.jivesoftware.smackx.pubsub.packet.SyncPacketSend" ]
import java.util.List; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.packet.DiscoverInfo; import org.jivesoftware.smackx.pubsub.packet.SyncPacketSend;
import java.util.*; import org.jivesoftware.smack.*; import org.jivesoftware.smackx.packet.*; import org.jivesoftware.smackx.pubsub.packet.*;
[ "java.util", "org.jivesoftware.smack", "org.jivesoftware.smackx" ]
java.util; org.jivesoftware.smack; org.jivesoftware.smackx;
944,478
public Variable findVariableByName(String name) { Predicate<Variable> predicate = new VariableNamePredicate(name); Variable variable = Algorithm.linearSearch(continuousMap.keySet(), predicate); return variable == null ? Algorithm.linearSearch( discreteMap.keySet(), ...
Variable function(String name) { Predicate<Variable> predicate = new VariableNamePredicate(name); Variable variable = Algorithm.linearSearch(continuousMap.keySet(), predicate); return variable == null ? Algorithm.linearSearch( discreteMap.keySet(), predicate) : variable; }
/** * Finds a variable by name. It supports only singular variable (continuous * or discrete). * * @param name * name of the variable * @return variable with the given name, or {@code null} if not found */
Finds a variable by name. It supports only singular variable (continuous or discrete)
findVariableByName
{ "repo_name": "fernandoj92/mvca-parkinson", "path": "pltm-analysis/src/main/java/org/latlab/model/MixedVariableMap.java", "license": "apache-2.0", "size": 7728 }
[ "org.latlab.util.Algorithm", "org.latlab.util.Predicate", "org.latlab.util.Variable" ]
import org.latlab.util.Algorithm; import org.latlab.util.Predicate; import org.latlab.util.Variable;
import org.latlab.util.*;
[ "org.latlab.util" ]
org.latlab.util;
1,840,473
public static Test suite() { return new TestSuite(RaiseErrorTest.class); }
static Test function() { return new TestSuite(RaiseErrorTest.class); }
/** * * Returns a test suite. * * @return the test suite */
Returns a test suite
suite
{ "repo_name": "automenta/adams-core", "path": "src/test/java/adams/flow/control/RaiseErrorTest.java", "license": "gpl-3.0", "size": 8091 }
[ "junit.framework.Test", "junit.framework.TestSuite" ]
import junit.framework.Test; import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
2,891,377
// ZAP: Added accessor to the panels protected Collection<AbstractParamPanel> getPanels() { return this.getJSplitPane().getPanels(); }
Collection<AbstractParamPanel> function() { return this.getJSplitPane().getPanels(); }
/** * Gets the panels shown on this dialog. * * @return the panels */
Gets the panels shown on this dialog
getPanels
{ "repo_name": "zapbot/zaproxy", "path": "src/org/parosproxy/paros/view/AbstractParamDialog.java", "license": "apache-2.0", "size": 15338 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,125,779
public static void rdt_send(byte[] buffer, int byteSize, int seqNum) throws IOException { byte[] sendSeqNum = new byte[4]; byte[] temp; int headerSize =8; int i, j, k; // Creating the Client Header temp = new BigInteger(Integer.toStr...
static void function(byte[] buffer, int byteSize, int seqNum) throws IOException { byte[] sendSeqNum = new byte[4]; byte[] temp; int headerSize =8; int i, j, k; temp = new BigInteger(Integer.toString(seqNum), 10).toByteArray(); byte[] client_field = new BigInteger(STR, 2).toByteArray(); int checksum = (int) computeCRC(...
/** * This method sends the transmission message to the server * * @param buffer * @param byteSize * @param seqNum * @throws IOException */
This method sends the transmission message to the server
rdt_send
{ "repo_name": "shubham90/SimpleFTP", "path": "src/Client/Client.java", "license": "mit", "size": 13803 }
[ "java.io.IOException", "java.math.BigInteger", "java.net.DatagramPacket", "java.net.InetAddress" ]
import java.io.IOException; import java.math.BigInteger; import java.net.DatagramPacket; import java.net.InetAddress;
import java.io.*; import java.math.*; import java.net.*;
[ "java.io", "java.math", "java.net" ]
java.io; java.math; java.net;
2,416,611
@Transient @Accessor public String getNodeName() { return getName(); }
@Transient String function() { return getName(); }
/** * Simple implementation for LayoutNode interface. Simply calls getName(). */
Simple implementation for LayoutNode interface. Simply calls getName()
getNodeName
{ "repo_name": "amitkr/power-architect", "path": "src/main/java/ca/sqlpower/architect/swingui/ContainerPane.java", "license": "gpl-3.0", "size": 21896 }
[ "ca.sqlpower.object.annotation.Transient" ]
import ca.sqlpower.object.annotation.Transient;
import ca.sqlpower.object.annotation.*;
[ "ca.sqlpower.object" ]
ca.sqlpower.object;
1,360,077
private boolean doesLatLongMatch(String oid, double latitude, double longitude, double accuracy) throws BimExchangeException { String query = "SELECT latitude, longitude FROM project WHERE poid='" + oid + "'"; List<String> result = executeSelect(query, BimExConstants.BIMEX_DB_SCHEMA, "latitude", "long...
boolean function(String oid, double latitude, double longitude, double accuracy) throws BimExchangeException { String query = STR + oid + "'"; List<String> result = executeSelect(query, BimExConstants.BIMEX_DB_SCHEMA, STR, STR); if (LOG.isDebugEnabled()) { LOG.debug(STR); } try { String val_1 = result.get(0).split(",")...
/** * Checking whether the project is a matching with the latitude, longitude * and accuracy parameters. * * @param oid * id of the project. * @param accuracy * accuracy. * @param accuracy2 * @param longitude * @return true if matching. * @throws BimExchangeException */
Checking whether the project is a matching with the latitude, longitude and accuracy parameters
doesLatLongMatch
{ "repo_name": "bbrangeo/OpenSourceBIMaaS", "path": "dev/esb/core/src/main/java/com/bimaas/connect/FilterProjectsByLatLongMediator.java", "license": "apache-2.0", "size": 9250 }
[ "com.bimaas.connect.constants.BimExConstants", "com.bimaas.connect.exception.BimExchangeException", "java.util.List" ]
import com.bimaas.connect.constants.BimExConstants; import com.bimaas.connect.exception.BimExchangeException; import java.util.List;
import com.bimaas.connect.constants.*; import com.bimaas.connect.exception.*; import java.util.*;
[ "com.bimaas.connect", "java.util" ]
com.bimaas.connect; java.util;
2,852,252
public Attr createAttributeNS(String namespaceURI, String qualifiedName, String localpart) throws DOMException { return new AttrNSImpl(this, namespaceURI, qualifiedName, localpart); }
Attr function(String namespaceURI, String qualifiedName, String localpart) throws DOMException { return new AttrNSImpl(this, namespaceURI, qualifiedName, localpart); }
/** * NON-DOM: a factory method used by the Xerces DOM parser * to create an element. * * @param namespaceURI The namespace URI of the attribute to * create. When it is null or an empty string, * this method behaves like createAttribute. * @p...
to create an element
createAttributeNS
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/xerces/src/org/apache/xerces/dom/CoreDocumentImpl.java", "license": "gpl-2.0", "size": 97493 }
[ "org.w3c.dom.Attr", "org.w3c.dom.DOMException" ]
import org.w3c.dom.Attr; import org.w3c.dom.DOMException;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
504,713
public static Date getDate(String yyyy_MM_dd) throws ParseException { return DATE_FORMAT.parse(yyyy_MM_dd); }
static Date function(String yyyy_MM_dd) throws ParseException { return DATE_FORMAT.parse(yyyy_MM_dd); }
/** * Get date from String in format 2013-09-16 * @param yyyy_MM_dd - String with date * @return Date * @throws ParseException */
Get date from String in format 2013-09-16
getDate
{ "repo_name": "MikolaSenyk/civs", "path": "core/src/main/java/ua/poltava/senyk/civs/utils/DatetimeFormat.java", "license": "gpl-3.0", "size": 4047 }
[ "java.text.ParseException", "java.util.Date" ]
import java.text.ParseException; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
861,719
//----------------------------------------------------------------------- public ZoneOffsetTransition createTransition(int year) { LocalDate date; if (dom < 0) { date = LocalDate.of(year, month, month.length(IsoChronology.INSTANCE.isLeapYear(year)) + 1 + dom); if (dow !=...
ZoneOffsetTransition function(int year) { LocalDate date; if (dom < 0) { date = LocalDate.of(year, month, month.length(IsoChronology.INSTANCE.isLeapYear(year)) + 1 + dom); if (dow != null) { date = date.with(previousOrSame(dow)); } } else { date = LocalDate.of(year, month, dom); if (dow != null) { date = date.with(next...
/** * Creates a transition instance for the specified year. * <p> * Calculations are performed using the ISO-8601 chronology. * * @param year the year to create a transition for, not null * @return the transition instance, not null */
Creates a transition instance for the specified year. Calculations are performed using the ISO-8601 chronology
createTransition
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java", "license": "mit", "size": 26333 }
[ "java.time.LocalDate", "java.time.LocalDateTime", "java.time.chrono.IsoChronology" ]
import java.time.LocalDate; import java.time.LocalDateTime; import java.time.chrono.IsoChronology;
import java.time.*; import java.time.chrono.*;
[ "java.time" ]
java.time;
809,048
public java.util.List<fr.lip6.move.pnml.pthlpng.partitions.hlapi.PartitionElementOfHLAPI> getSubterm_partitions_PartitionElementOfHLAPI() { java.util.List<fr.lip6.move.pnml.pthlpng.partitions.hlapi.PartitionElementOfHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.partitions.hlapi.PartitionElementOfHLAPI>()...
java.util.List<fr.lip6.move.pnml.pthlpng.partitions.hlapi.PartitionElementOfHLAPI> function() { java.util.List<fr.lip6.move.pnml.pthlpng.partitions.hlapi.PartitionElementOfHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.partitions.hlapi.PartitionElementOfHLAPI>(); for (Term elemnt : getSubterm()) { if (elemnt.g...
/** * This accessor return a list of encapsulated subelement, only of * PartitionElementOfHLAPI kind. WARNING : this method can creates a lot of new * object in memory. */
This accessor return a list of encapsulated subelement, only of PartitionElementOfHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_partitions_PartitionElementOfHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/integers/hlapi/GreaterThanOrEqualHLAPI.java", "license": "epl-1.0", "size": 70100 }
[ "fr.lip6.move.pnml.pthlpng.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.pthlpng.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.pthlpng.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
128,326
public void testGetPrevNoDupWithEmptyTree() throws Throwable { initEnv(); OperationStatus status; DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setSortedDuplicates(true); dbConfig.setAllowCreate(true); Database myDb = env.openDatabase(nu...
void function() throws Throwable { initEnv(); OperationStatus status; DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setSortedDuplicates(true); dbConfig.setAllowCreate(true); Database myDb = env.openDatabase(null, "foo", dbConfig); DatabaseEntry key = new DatabaseEntry(); DatabaseEntry data = new DatabaseEntr...
/** * Tests a bug fix to CursorImpl.fetchCurrent [#11700] that caused * ArrayIndexOutOfBoundsException. */
Tests a bug fix to CursorImpl.fetchCurrent [#11700] that caused ArrayIndexOutOfBoundsException
testGetPrevNoDupWithEmptyTree
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/test/com/sleepycat/je/CursorEdgeTest.java", "license": "apache-2.0", "size": 26272 }
[ "com.sleepycat.je.util.TestUtils" ]
import com.sleepycat.je.util.TestUtils;
import com.sleepycat.je.util.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
2,589,341
@Override @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO) public String getQuery() { return query; }
@Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO) String function() { return query; }
/** * Gets the query. * * @return the query */
Gets the query
getQuery
{ "repo_name": "IHTSDO/OTF-Mapping-Service", "path": "jpa-model/src/main/java/org/ihtsdo/otf/mapping/reports/ReportJpa.java", "license": "apache-2.0", "size": 14658 }
[ "org.hibernate.search.annotations.Analyze", "org.hibernate.search.annotations.Field", "org.hibernate.search.annotations.Index", "org.hibernate.search.annotations.Store" ]
import org.hibernate.search.annotations.Analyze; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Index; import org.hibernate.search.annotations.Store;
import org.hibernate.search.annotations.*;
[ "org.hibernate.search" ]
org.hibernate.search;
1,725,140
public void deleteLink(String linkId) throws SQLException { linkCategoryDAO.deleteByLink(parseInt(linkId)); JdbcSqlQuery.createDeleteFor(LINK_TABLE) .where(LINK_ID_CLAUSE, parseInt(linkId)) .execute(); }
void function(String linkId) throws SQLException { linkCategoryDAO.deleteByLink(parseInt(linkId)); JdbcSqlQuery.createDeleteFor(LINK_TABLE) .where(LINK_ID_CLAUSE, parseInt(linkId)) .execute(); }
/** * Remove a link * @param linkId the link identifier to remove * @throws SQLException on SQL problem */
Remove a link
deleteLink
{ "repo_name": "SilverDav/Silverpeas-Core", "path": "core-services/mylinks/src/main/java/org/silverpeas/core/mylinks/dao/LinkDAO.java", "license": "agpl-3.0", "size": 9897 }
[ "java.lang.Integer", "java.sql.SQLException", "org.silverpeas.core.persistence.jdbc.sql.JdbcSqlQuery" ]
import java.lang.Integer; import java.sql.SQLException; import org.silverpeas.core.persistence.jdbc.sql.JdbcSqlQuery;
import java.lang.*; import java.sql.*; import org.silverpeas.core.persistence.jdbc.sql.*;
[ "java.lang", "java.sql", "org.silverpeas.core" ]
java.lang; java.sql; org.silverpeas.core;
2,612,568
public void setDependencies(Var to, List<Var> fromVars) { Var toCanon = getCanonicalAlias(to.asArg()); for (Var fromVar: fromVars) { Var fromCanon = getCanonicalAlias(fromVar.asArg()); track.setDependency(toCanon, fromCanon); } }
void function(Var to, List<Var> fromVars) { Var toCanon = getCanonicalAlias(to.asArg()); for (Var fromVar: fromVars) { Var fromCanon = getCanonicalAlias(fromVar.asArg()); track.setDependency(toCanon, fromCanon); } }
/** * Add in closedness dependency: if to is closed, implies * from is closed * @param to * @param fromVars * TODO: this information can be propagated up the IR tree, since if * A -> B in a wait statement, this implies that in any parent * blocks, that if B is set, then A is set (assuming...
Add in closedness dependency: if to is closed, implies from is closed
setDependencies
{ "repo_name": "basheersubei/swift-t", "path": "stc/code/src/exm/stc/ic/opt/valuenumber/Congruences.java", "license": "apache-2.0", "size": 40775 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
361,217
public View getFocusableViewAfter(int referenceChildPosition, int layoutDir) { View candidate = null; if (layoutDir == LAYOUT_START) { final int limit = mViews.size(); for (int i = 0; i < limit; i++) { final View view = mViews.get(i); ...
View function(int referenceChildPosition, int layoutDir) { View candidate = null; if (layoutDir == LAYOUT_START) { final int limit = mViews.size(); for (int i = 0; i < limit; i++) { final View view = mViews.get(i); if (view.isFocusable() && (getPosition(view) > referenceChildPosition == mReverseLayout) ) { candidate = ...
/** * Depending on the layout direction, returns the View that is after the given position. */
Depending on the layout direction, returns the View that is after the given position
getFocusableViewAfter
{ "repo_name": "AylaGene/testRepo_Public", "path": "TMessagesProj/src/main/java/org/telegram/messenger/support/widget/StaggeredGridLayoutManager.java", "license": "gpl-2.0", "size": 117836 }
[ "android.view.View", "java.util.List" ]
import android.view.View; import java.util.List;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
1,066,961
public static ParsedAndroidData from(UnvalidatedAndroidDirectories primary) throws IOException, MergingException { final ParsedAndroidDataBuildingPathWalker pathWalker = ParsedAndroidDataBuildingPathWalker.create(Builder.newBuilder()); primary.walk(pathWalker); return pathWalker.createParsed...
static ParsedAndroidData function(UnvalidatedAndroidDirectories primary) throws IOException, MergingException { final ParsedAndroidDataBuildingPathWalker pathWalker = ParsedAndroidDataBuildingPathWalker.create(Builder.newBuilder()); primary.walk(pathWalker); return pathWalker.createParsedAndroidData(); }
/** * Creates an ParsedAndroidData from an UnvalidatedAndroidData. * * <p>The adding process parses out all the provided symbol into DataResources and DataAssets * objects. * * @param primary The primary data to parse into DataResources and DataAssets. * @throws IOException when there are issues wi...
Creates an ParsedAndroidData from an UnvalidatedAndroidData. The adding process parses out all the provided symbol into DataResources and DataAssets objects
from
{ "repo_name": "dslomov/bazel", "path": "src/tools/android/java/com/google/devtools/build/android/ParsedAndroidData.java", "license": "apache-2.0", "size": 23519 }
[ "com.google.devtools.build.android.AndroidResourceMerger", "java.io.IOException" ]
import com.google.devtools.build.android.AndroidResourceMerger; import java.io.IOException;
import com.google.devtools.build.android.*; import java.io.*;
[ "com.google.devtools", "java.io" ]
com.google.devtools; java.io;
1,006,344
private void startGame() throws LWJGLException, IOException { this.gameSettings = new GameSettings(this, this.mcDataDir); this.defaultResourcePacks.add(this.mcDefaultResourcePack); // Begin Awaken Dreams code this.defaultResourcePacks.add(this.adDefaultResourcePack); // E...
void function() throws LWJGLException, IOException { this.gameSettings = new GameSettings(this, this.mcDataDir); this.defaultResourcePacks.add(this.mcDefaultResourcePack); this.defaultResourcePacks.add(this.adDefaultResourcePack); this.startTimerHackThread(); if (this.gameSettings.overrideHeight > 0 && this.gameSetting...
/** * Starts the game: initializes the canvas, the title, the settings, etcetera. */
Starts the game: initializes the canvas, the title, the settings, etcetera
startGame
{ "repo_name": "TheValarProject/AwakenDreamsClient", "path": "mcp/src/minecraft/net/minecraft/client/Minecraft.java", "license": "gpl-3.0", "size": 135919 }
[ "java.io.File", "java.io.IOException", "net.minecraft.client.audio.MusicTicker", "net.minecraft.client.audio.SoundHandler", "net.minecraft.client.gui.FontRenderer", "net.minecraft.client.renderer.OpenGlHelper", "net.minecraft.client.renderer.texture.TextureManager", "net.minecraft.client.resources.Lan...
import java.io.File; import java.io.IOException; import net.minecraft.client.audio.MusicTicker; import net.minecraft.client.audio.SoundHandler; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.texture.TextureManager; import net.minecra...
import java.io.*; import net.minecraft.client.audio.*; import net.minecraft.client.gui.*; import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.texture.*; import net.minecraft.client.resources.*; import net.minecraft.client.settings.*; import net.minecraft.client.shader.*; import net.minecraft.ut...
[ "java.io", "net.minecraft.client", "net.minecraft.util", "net.minecraft.world", "org.lwjgl" ]
java.io; net.minecraft.client; net.minecraft.util; net.minecraft.world; org.lwjgl;
823,055
protected StateValues checkExpressionReward(Model model, ExpressionReward expr) throws PrismException { Expression rb; // Reward bound (expression) double r = 0; // Reward bound (actual value) RelOp relOp; // Relational operator StateValues rews = null; Rewards rewards = null; // Get info from R operat...
StateValues function(Model model, ExpressionReward expr) throws PrismException { Expression rb; double r = 0; RelOp relOp; StateValues rews = null; Rewards rewards = null; RewardStruct rewStruct = expr.getRewardStructByIndexObject(modulesFile, constantValues); relOp = expr.getRelOp(); rb = expr.getReward(); if (rb != n...
/** * Model check an R operator expression and return the values for all states. */
Model check an R operator expression and return the values for all states
checkExpressionReward
{ "repo_name": "bharathk005/prism-4.2.1-src-teaser-patch", "path": "src/explicit/ProbModelChecker.java", "license": "gpl-2.0", "size": 29173 }
[ "java.util.BitSet" ]
import java.util.BitSet;
import java.util.*;
[ "java.util" ]
java.util;
720,094
if (s == null) { return null; } String result = null; try { result = URLDecoder.decode(s, "UTF-8"); } // This exception should never occur. catch (UnsupportedEncodingException e) { result = s; } return result; }
if (s == null) { return null; } String result = null; try { result = URLDecoder.decode(s, "UTF-8"); } catch (UnsupportedEncodingException e) { result = s; } return result; }
/** * Decodes the passed UTF-8 String using an algorithm that's compatible with * JavaScript's <code>decodeURIComponent</code> function. Returns * <code>null</code> if the String is <code>null</code>. * * @param s * The UTF-8 encoded String to be decoded * @return the decoded String */
Decodes the passed UTF-8 String using an algorithm that's compatible with JavaScript's <code>decodeURIComponent</code> function. Returns <code>null</code> if the String is <code>null</code>
decodeURIComponent
{ "repo_name": "NationStates/NationStatesPlusPlus", "path": "Assembly/app/net/nationstatesplusplus/assembly/util/EncodingUtil.java", "license": "mit", "size": 1866 }
[ "java.io.UnsupportedEncodingException", "java.net.URLDecoder" ]
import java.io.UnsupportedEncodingException; import java.net.URLDecoder;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
491,443
public boolean checkRegionChain(TableIntegrityErrorHandler handler) throws IOException { // When table is disabled no need to check for the region chain. Some of the regions // accidently if deployed, this below code might report some issues like missing start // or end regions or region hole in c...
boolean function(TableIntegrityErrorHandler handler) throws IOException { if (disabledTables.contains(this.tableName.getBytes())) { return true; } int originalErrorsCount = errors.getErrorList().size(); Multimap<byte[], HbckInfo> regions = sc.calcCoverage(); SortedSet<byte[]> splits = sc.getSplits(); byte[] prevKey = n...
/** * Check the region chain (from META) of this table. We are looking for * holes, overlaps, and cycles. * @return false if there are errors * @throws IOException */
Check the region chain (from META) of this table. We are looking for holes, overlaps, and cycles
checkRegionChain
{ "repo_name": "gdweijin/hindex", "path": "src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java", "license": "apache-2.0", "size": 137333 }
[ "com.google.common.collect.Multimap", "java.io.IOException", "java.util.ArrayList", "java.util.Collection", "java.util.SortedSet", "org.apache.hadoop.hbase.HConstants", "org.apache.hadoop.hbase.util.hbck.TableIntegrityErrorHandler" ]
import com.google.common.collect.Multimap; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.SortedSet; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.util.hbck.TableIntegrityErrorHandler;
import com.google.common.collect.*; import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.hbck.*;
[ "com.google.common", "java.io", "java.util", "org.apache.hadoop" ]
com.google.common; java.io; java.util; org.apache.hadoop;
2,544,900
public ParquetWriter<T> build() throws IOException { if (file != null) { return new ParquetWriter<>(file, mode, getWriteSupport(conf), codecName, rowGroupSize, enableValidation, conf, maxPaddingSize, encodingPropsBuilder.build()); } else { return new ParquetWriter...
ParquetWriter<T> function() throws IOException { if (file != null) { return new ParquetWriter<>(file, mode, getWriteSupport(conf), codecName, rowGroupSize, enableValidation, conf, maxPaddingSize, encodingPropsBuilder.build()); } else { return new ParquetWriter<>(HadoopOutputFile.fromPath(path, conf), mode, getWriteSupp...
/** * Build a {@link ParquetWriter} with the accumulated configuration. * * @return a configured {@code ParquetWriter} instance. * @throws IOException if there is an error while creating the writer */
Build a <code>ParquetWriter</code> with the accumulated configuration
build
{ "repo_name": "HyukjinKwon/parquet-mr-1", "path": "parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetWriter.java", "license": "apache-2.0", "size": 19477 }
[ "java.io.IOException", "org.apache.parquet.hadoop.util.HadoopOutputFile" ]
import java.io.IOException; import org.apache.parquet.hadoop.util.HadoopOutputFile;
import java.io.*; import org.apache.parquet.hadoop.util.*;
[ "java.io", "org.apache.parquet" ]
java.io; org.apache.parquet;
380,704
protected static URL getFirmwareURL() { try { String url = Base.preferences.get("replicatorg.updates.url", DEFAULT_UPDATES_URL); return new URL(url); } catch (MalformedURLException e) { e.printStackTrace(); return null; } }
static URL function() { try { String url = Base.preferences.get(STR, DEFAULT_UPDATES_URL); return new URL(url); } catch (MalformedURLException e) { e.printStackTrace(); return null; } }
/** * Get the URL of the source for dowloading */
Get the URL of the source for dowloading
getFirmwareURL
{ "repo_name": "natetrue/ReplicatorG", "path": "src/replicatorg/uploader/FirmwareUploader.java", "license": "gpl-2.0", "size": 7273 }
[ "java.net.MalformedURLException" ]
import java.net.MalformedURLException;
import java.net.*;
[ "java.net" ]
java.net;
2,789,098
public List<String> getQuestion() { return Questions; }
List<String> function() { return Questions; }
/** * Getter - Question * @return Question */
Getter - Question
getQuestion
{ "repo_name": "JamesMarino/CSCI213", "path": "Assignments/Assignment 1/Solutions/src/au/edu/uow/QuestionLibrary/MultipleChoiceQuestion.java", "license": "mit", "size": 1800 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,831,458
public Stream<T> stream () { this.log.trace ("stream:"); Preconditions.checkState (this.manager.isOpen (), "DataStore is Closed"); Preconditions.checkState (this.query.getParameters () .stream () .allMatch (p -> this.query.isBound (p)), "Query Parameters must not be null"); return this.query.getRe...
Stream<T> function () { this.log.trace (STR); Preconditions.checkState (this.manager.isOpen (), STR); Preconditions.checkState (this.query.getParameters () .stream () .allMatch (p -> this.query.isBound (p)), STR); return this.query.getResultList () .stream () .map (e -> this.setDomainModel (e)); }
/** * Get a <code>Stream</code> of <code>Element</code> instances from the * <code>DataStore</code> which match the <code>Query</code>. * * @return A <code>Stream</code> containing the * <code>Element</code> instances with match * ...
Get a <code>Stream</code> of <code>Element</code> instances from the <code>DataStore</code> which match the <code>Query</code>
stream
{ "repo_name": "jestark/LMSDataHarvester", "path": "src/main/java/ca/uoguelph/socs/icc/edm/domain/datastore/jpa/JPANamedQuery.java", "license": "gpl-3.0", "size": 10522 }
[ "com.google.common.base.Preconditions", "java.util.stream.Stream" ]
import com.google.common.base.Preconditions; import java.util.stream.Stream;
import com.google.common.base.*; import java.util.stream.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,542,696
@Metadata(defaultValue = "20000", label = "producer", description = "The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds)." + " The default is 20 seconds. You can include the header \"CamelJmsRequestTimeout\" to override this endpoint configured...
@Metadata(defaultValue = "20000", label = STR, description = STR + STRCamelJmsRequestTimeout\STR + STR + STR) void function(long requestTimeout) { getConfiguration().setRequestTimeout(requestTimeout); }
/** * The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds). * The default is 20 seconds. You can include the header "CamelJmsRequestTimeout" to override this endpoint configured * timeout value, and thus have per message individual timeout values. * See also th...
The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds). The default is 20 seconds. You can include the header "CamelJmsRequestTimeout" to override this endpoint configured timeout value, and thus have per message individual timeout values. See also the requestTimeoutCheckerInterval ...
setRequestTimeout
{ "repo_name": "CodeSmell/camel", "path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java", "license": "apache-2.0", "size": 83917 }
[ "org.apache.camel.spi.Metadata" ]
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
2,435,285
public void decGauge(String gaugeName, long delta) { MutableGaugeLong gaugeInt = metricsRegistry.getLongGauge(gaugeName, 0l); gaugeInt.decr(delta); }
void function(String gaugeName, long delta) { MutableGaugeLong gaugeInt = metricsRegistry.getLongGauge(gaugeName, 0l); gaugeInt.decr(delta); }
/** * Decrease the value of a named gauge. * * @param gaugeName The name of the gauge. * @param delta the ammount to subtract from a gauge value. */
Decrease the value of a named gauge
decGauge
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/metrics/BaseSourceImpl.java", "license": "apache-2.0", "size": 5447 }
[ "org.apache.hadoop.metrics2.lib.MutableGaugeLong" ]
import org.apache.hadoop.metrics2.lib.MutableGaugeLong;
import org.apache.hadoop.metrics2.lib.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,594,116
T visitClassName_Healer(@NotNull SofaLangParser.ClassName_HealerContext ctx);
T visitClassName_Healer(@NotNull SofaLangParser.ClassName_HealerContext ctx);
/** * Visit a parse tree produced by {@link SofaLangParser#className_Healer}. * @param ctx the parse tree * @return the visitor result */
Visit a parse tree produced by <code>SofaLangParser#className_Healer</code>
visitClassName_Healer
{ "repo_name": "mockillo/sofa", "path": "sofa/src/com/tehforce/sofa/parser/SofaLangVisitor.java", "license": "mit", "size": 10535 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,875,725
public static int getDisplayHeight() { Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); return screen.height; }
static int function() { Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); return screen.height; }
/** * Returns the height of the current display (desktop) in pxels. In fullscreen * mode, this value corresponds to the height of the <code>MinuetoWindow</code>. * * @return <code>int</code> denoting the height of the current display. **/
Returns the height of the current display (desktop) in pxels. In fullscreen mode, this value corresponds to the height of the <code>MinuetoWindow</code>
getDisplayHeight
{ "repo_name": "Mikeware/minueto", "path": "src/core/org/minueto/MinuetoTool.java", "license": "lgpl-2.1", "size": 2815 }
[ "java.awt.Dimension", "java.awt.Toolkit" ]
import java.awt.Dimension; import java.awt.Toolkit;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,640,669
protected void eliminate(Matrix matrix, Consumer<Householder> listener, int j) { double[] column = new double[matrix.getRowCount()]; this.getColumn(matrix, j, j, column); Householder hh = new Householder(column, j); double norm = hh.normalize(); if(norm == 0.0){ ...
void function(Matrix matrix, Consumer<Householder> listener, int j) { double[] column = new double[matrix.getRowCount()]; this.getColumn(matrix, j, j, column); Householder hh = new Householder(column, j); double norm = hh.normalize(); if(norm == 0.0){ return; } hh.applyLeft(matrix, j + 1); matrix.set(j, j, norm); liste...
/** * Eliminate all sub-diagonal entries of a column * in a matrix A by Householder reflection. * @param matrix Matrix A * @param listener Householder reflection listener * @param j Column index of column to be eliminated */
Eliminate all sub-diagonal entries of a column in a matrix A by Householder reflection
eliminate
{ "repo_name": "ykechan/jacobi", "path": "src/main/java/jacobi/core/decomp/qr/QRDecomp.java", "license": "mit", "size": 5357 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
1,114,828
public boolean isTraversable(Position from, Direction direction, int size) { switch (direction) { case NORTH: return isTraversableNorth(from.getHeight(), from.getX(), from.getY(), size); case SOUTH: return isTraversableSouth(from.getHeight(), from.getX(), from.getY(), size); case EAST: return isTrav...
boolean function(Position from, Direction direction, int size) { switch (direction) { case NORTH: return isTraversableNorth(from.getHeight(), from.getX(), from.getY(), size); case SOUTH: return isTraversableSouth(from.getHeight(), from.getX(), from.getY(), size); case EAST: return isTraversableEast(from.getHeight(), fr...
/** * Tests whether or not a specified position is traversable in the specified * direction. * * @param from The position. * @param direction The direction to traverse. * @param size The size of the entity attempting to traverse. * @return <code>true</code> if the direction is traversable otherwise * ...
Tests whether or not a specified position is traversable in the specified direction
isTraversable
{ "repo_name": "atomicint/aj8", "path": "server/src/main/java/org/apollo/game/model/pf/TraversalMap.java", "license": "isc", "size": 32236 }
[ "org.apollo.game.model.Direction", "org.apollo.game.model.Position" ]
import org.apollo.game.model.Direction; import org.apollo.game.model.Position;
import org.apollo.game.model.*;
[ "org.apollo.game" ]
org.apollo.game;
1,667,835
@Override public double evalDouble(ELContext env) throws ELException { if (_test.evalBoolean(env)) return _trueExpr.evalDouble(env); else return _falseExpr.evalDouble(env); }
double function(ELContext env) throws ELException { if (_test.evalBoolean(env)) return _trueExpr.evalDouble(env); else return _falseExpr.evalDouble(env); }
/** * Evaluate the expression as a double * * @param env the variable environment * * @return the result as an double */
Evaluate the expression as a double
evalDouble
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/el/ConditionalExpr.java", "license": "gpl-2.0", "size": 4573 }
[ "javax.el.ELContext", "javax.el.ELException" ]
import javax.el.ELContext; import javax.el.ELException;
import javax.el.*;
[ "javax.el" ]
javax.el;
515,694
@ProcessElement public void processElement(ProcessContext context) { String resourceId = context.element(); try { context.output(fetchResource(this.client, resourceId)); } catch (Exception e) { failedMessageGets.inc(); LOG.warn( ...
void function(ProcessContext context) { String resourceId = context.element(); try { context.output(fetchResource(this.client, resourceId)); } catch (Exception e) { failedMessageGets.inc(); LOG.warn( String.format( STR + STR, resourceId, e.getMessage(), Throwables.getStackTraceAsString(e))); context.output(FhirIO.Read....
/** * Process element. * * @param context the context */
Process element
processElement
{ "repo_name": "iemejia/incubator-beam", "path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java", "license": "apache-2.0", "size": 45554 }
[ "org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Throwables" ]
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Throwables;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.*;
[ "org.apache.beam" ]
org.apache.beam;
2,481,416
public DataNode setAttenuator_transmission(IDataset attenuator_transmission);
DataNode function(IDataset attenuator_transmission);
/** * The nominal amount of the beam that gets through * (transmitted intensity)/(incident intensity) * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_DIMENSIONLESS * </p> * * @param attenuator_transmission the attenuator_transmission */
The nominal amount of the beam that gets through (transmitted intensity)/(incident intensity) Type: NX_FLOAT Units: NX_DIMENSIONLESS
setAttenuator_transmission
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXattenuator.java", "license": "epl-1.0", "size": 8087 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode", "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.january.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.january.dataset.*;
[ "org.eclipse.dawnsci", "org.eclipse.january" ]
org.eclipse.dawnsci; org.eclipse.january;
689,064
public Set<PoolMember> getAllPoolMembers(String poolName);
Set<PoolMember> function(String poolName);
/** * Return all pool members of the pool 'poolName' * @param poolName Name of the pool * @return Set of all the pool members if pool with the name present in the configuration * null else * */
Return all pool members of the pool 'poolName'
getAllPoolMembers
{ "repo_name": "Milstein/controllerODP", "path": "opendaylight/samples/loadbalancer/src/main/java/org/opendaylight/controller/samples/loadbalancer/IConfigManager.java", "license": "epl-1.0", "size": 5786 }
[ "java.util.Set", "org.opendaylight.controller.samples.loadbalancer.entities.PoolMember" ]
import java.util.Set; import org.opendaylight.controller.samples.loadbalancer.entities.PoolMember;
import java.util.*; import org.opendaylight.controller.samples.loadbalancer.entities.*;
[ "java.util", "org.opendaylight.controller" ]
java.util; org.opendaylight.controller;
1,260,466
public void setNotifyForFields(NotifyForFieldsEnum notifyForFields) { this.notifyForFields = notifyForFields; }
void function(NotifyForFieldsEnum notifyForFields) { this.notifyForFields = notifyForFields; }
/** * Notify for fields, options are ALL, REFERENCED, SELECT, WHERE */
Notify for fields, options are ALL, REFERENCED, SELECT, WHERE
setNotifyForFields
{ "repo_name": "nikvaessen/camel", "path": "components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java", "license": "apache-2.0", "size": 15381 }
[ "org.apache.camel.component.salesforce.internal.dto.NotifyForFieldsEnum" ]
import org.apache.camel.component.salesforce.internal.dto.NotifyForFieldsEnum;
import org.apache.camel.component.salesforce.internal.dto.*;
[ "org.apache.camel" ]
org.apache.camel;
1,309,613