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 Vector3fc getPosition3D(){ return (new Vector3f(position, 0)).toImmutable(); }
Vector3fc function(){ return (new Vector3f(position, 0)).toImmutable(); }
/** * Get the position value in 3D * * @return Position value */
Get the position value in 3D
getPosition3D
{ "repo_name": "pilif0/open-desert", "path": "src/main/java/net/pilif0/open_desert/components/PositionComponent.java", "license": "mit", "size": 4567 }
[ "org.joml.Vector3f", "org.joml.Vector3fc" ]
import org.joml.Vector3f; import org.joml.Vector3fc;
import org.joml.*;
[ "org.joml" ]
org.joml;
1,985,275
private void clean() { Set<Map.Entry<String, PermEntry>> elements = matrix.entrySet(); Iterator<Map.Entry<String, PermEntry>> iterator = elements.iterator(); while (iterator.hasNext()) { Map.Entry<String, PermEntry> entry = iterator.next(); String key = entry.getKey(); Pe...
void function() { Set<Map.Entry<String, PermEntry>> elements = matrix.entrySet(); Iterator<Map.Entry<String, PermEntry>> iterator = elements.iterator(); while (iterator.hasNext()) { Map.Entry<String, PermEntry> entry = iterator.next(); String key = entry.getKey(); PermEntry pe = entry.getValue(); if (!isValidCode(key))...
/** * This internal method is used to cull out any entries in this * permissions field that are non-operative, either by referring to * an object/field type that does not exist, or by being redundant. */
This internal method is used to cull out any entries in this permissions field that are non-operative, either by referring to an object/field type that does not exist, or by being redundant
clean
{ "repo_name": "jonabbey/Ganymede", "path": "src/ganymede/arlut/csd/ganymede/server/PermissionMatrixDBField.java", "license": "gpl-2.0", "size": 42833 }
[ "java.util.Iterator", "java.util.Map", "java.util.Set" ]
import java.util.Iterator; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,703,690
@RequestMapping(value = "/getServices", method = {RequestMethod.GET}) public void getServices(final HttpServletResponse response) { ensureDefaultServiceExists(); final Map<String, Object> model = new HashMap<>(); final List<RegisteredServiceViewBean> serviceBeans = new ArrayList<>(); ...
@RequestMapping(value = STR, method = {RequestMethod.GET}) void function(final HttpServletResponse response) { ensureDefaultServiceExists(); final Map<String, Object> model = new HashMap<>(); final List<RegisteredServiceViewBean> serviceBeans = new ArrayList<>(); final List<RegisteredService> services = new ArrayList<>...
/** * Gets services. * * @param response the response */
Gets services
getServices
{ "repo_name": "yisiqi/cas", "path": "cas-management-webapp-support/src/main/java/org/apereo/cas/mgmt/services/web/ManageRegisteredServicesMultiActionController.java", "license": "apache-2.0", "size": 7812 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.stream.Collectors", "javax.servlet.http.HttpServletResponse", "org.apereo.cas.mgmt.services.web.beans.RegisteredServiceViewBean", "org.apereo.cas.mgmt.services.web.view.JsonViewUtils", "org.apereo.cas.services....
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; import org.apereo.cas.mgmt.services.web.beans.RegisteredServiceViewBean; import org.apereo.cas.mgmt.services.web.view.JsonViewUtils; impor...
import java.util.*; import java.util.stream.*; import javax.servlet.http.*; import org.apereo.cas.mgmt.services.web.beans.*; import org.apereo.cas.mgmt.services.web.view.*; import org.apereo.cas.services.*; import org.springframework.web.bind.annotation.*;
[ "java.util", "javax.servlet", "org.apereo.cas", "org.springframework.web" ]
java.util; javax.servlet; org.apereo.cas; org.springframework.web;
2,398,762
protected Logger getLogger() { return logger; }
Logger function() { return logger; }
/** * Return the logger * * @return logger */
Return the logger
getLogger
{ "repo_name": "chibenwa/james", "path": "protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/netty/AbstractConfigurableAsyncServer.java", "license": "apache-2.0", "size": 20231 }
[ "org.slf4j.Logger" ]
import org.slf4j.Logger;
import org.slf4j.*;
[ "org.slf4j" ]
org.slf4j;
2,166,573
public static int getSettingResultCode( Intent completionIntent ) { Integer val = (Integer) getExtraValueSafe( completionIntent, Setting.EXTRA_RESULT_CODE, Integer.class, "getSettingCompletionStatus" ); return ( val == null ) ? Setting.RESULT_CODE_UNKNOWN : val; }
static int function( Intent completionIntent ) { Integer val = (Integer) getExtraValueSafe( completionIntent, Setting.EXTRA_RESULT_CODE, Integer.class, STR ); return ( val == null ) ? Setting.RESULT_CODE_UNKNOWN : val; }
/** * When a setting plugin is finished, it sends the host the intent which was passed to it * via @code{addCompletionIntent}. * * @param completionIntent intent returned from the plugin when it finished. * @return completionStatus measure of plugin success, defaults to UNK...
When a setting plugin is finished, it sends the host the intent which was passed to it via @code{addCompletionIntent}
getSettingResultCode
{ "repo_name": "laptopfreek0/taskkill", "path": "src/net/dinglisch/tasker/plugin/TaskerPlugin.java", "license": "apache-2.0", "size": 17613 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
2,641,745
public final HttpAsyncClientBuilder setConnectionManager(final AsyncClientConnectionManager connManager) { this.connManager = connManager; return this; }
final HttpAsyncClientBuilder function(final AsyncClientConnectionManager connManager) { this.connManager = connManager; return this; }
/** * Assigns {@link AsyncClientConnectionManager} instance. */
Assigns <code>AsyncClientConnectionManager</code> instance
setConnectionManager
{ "repo_name": "UlrichColby/httpcomponents-client", "path": "httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java", "license": "apache-2.0", "size": 40087 }
[ "org.apache.hc.client5.http.nio.AsyncClientConnectionManager" ]
import org.apache.hc.client5.http.nio.AsyncClientConnectionManager;
import org.apache.hc.client5.http.nio.*;
[ "org.apache.hc" ]
org.apache.hc;
574,200
public BranchMappingTable getBranchMappingTable() throws InterruptedException, ExecutionException, TimeoutException { return session.feature(SessionTrees.class) .getBranchMappingTable("market/prices").get(5, SECONDS); }
BranchMappingTable function() throws InterruptedException, ExecutionException, TimeoutException { return session.feature(SessionTrees.class) .getBranchMappingTable(STR).get(5, SECONDS); }
/** * Returns the {@code market/prices} branch mapping table. */
Returns the market/prices branch mapping table
getBranchMappingTable
{ "repo_name": "pushtechnology/diffusion-examples", "path": "java/src/main/java/com/pushtechnology/diffusion/examples/ControlClientManagingSessionTrees.java", "license": "apache-2.0", "size": 4548 }
[ "com.pushtechnology.diffusion.client.features.control.topics.SessionTrees", "java.util.concurrent.ExecutionException", "java.util.concurrent.TimeoutException" ]
import com.pushtechnology.diffusion.client.features.control.topics.SessionTrees; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException;
import com.pushtechnology.diffusion.client.features.control.topics.*; import java.util.concurrent.*;
[ "com.pushtechnology.diffusion", "java.util" ]
com.pushtechnology.diffusion; java.util;
2,199,555
@NotNull(message = "iterable is never NULL") Iterable<PullComment> iterate(int number, @NotNull(message = "map of params can't be NULL") Map<String, String> params);
@NotNull(message = STR) Iterable<PullComment> iterate(int number, @NotNull(message = STR) Map<String, String> params);
/** * Iterate all pull comments for a pull request. * * @param number Pull comment number * @param params Iterating parameters, as specified by API * @return Iterable of pull comments * @see <a href="http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request">List comme...
Iterate all pull comments for a pull request
iterate
{ "repo_name": "cvrebert/typed-github", "path": "src/main/java/com/jcabi/github/PullComments.java", "license": "bsd-3-clause", "size": 5183 }
[ "java.util.Map", "javax.validation.constraints.NotNull" ]
import java.util.Map; import javax.validation.constraints.NotNull;
import java.util.*; import javax.validation.constraints.*;
[ "java.util", "javax.validation" ]
java.util; javax.validation;
111,580
public void setSelectableDateRange(Date min, Date max) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } if (max == null) { maxSelectableDate = defaultMaxSelectableDate; } else { maxSelectableDate = max; } if (maxSelectableDate.before(min...
void function(Date min, Date max) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } if (max == null) { maxSelectableDate = defaultMaxSelectableDate; } else { maxSelectableDate = max; } if (maxSelectableDate.before(minSelectableDate)) { minSelectableDate = defaultMinS...
/** * Sets a valid date range for selectable dates. If max is before min, the * default range with no limitation is set. * * @param min * the minimum selectable date or null (then the minimum date is * set to 01\01\0001) * @param max * the maximum selectable date or nul...
Sets a valid date range for selectable dates. If max is before min, the default range with no limitation is set
setSelectableDateRange
{ "repo_name": "luuuis/jcalendar", "path": "src/main/java/com/toedter/calendar/DateUtil.java", "license": "lgpl-2.1", "size": 4604 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
980,190
@Test public void testMirrorEnds() { Assert.assertEquals("ab", instance.mirrorEnds("abXYZba")); Assert.assertEquals("a", instance.mirrorEnds("abca")); Assert.assertEquals("aba", instance.mirrorEnds("aba")); Assert.assertEquals("", instance.mirrorEnds("abab")); Assert.assertEquals("xxx", in...
void function() { Assert.assertEquals("ab", instance.mirrorEnds(STR)); Assert.assertEquals("aSTRabcaSTRabaSTRaba")); Assert.assertEquals(STRababSTRxxxSTRxxxSTRxxYxxSTRxxYxxSTRHi STRHi and iHSTRxSTRx")); Assert.assertEquals(STRhiSTRhihSTRhih")); Assert.assertEquals(STRSTR123STR123and then 321STRbaSTRband andab")); }
/** * Test method for {@link String3#mirrorEnds(String)}. */
Test method for <code>String3#mirrorEnds(String)</code>
testMirrorEnds
{ "repo_name": "antalpeti/CodingBat", "path": "src/test/com/codingbat/java/String3Test.java", "license": "mit", "size": 12008 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
287,766
public void symlinkTo(final String target, final TaskListener listener) throws IOException, InterruptedException { act(new SymlinkTo(target, listener)); } private class SymlinkTo extends SecureFileCallable<Void> { private final String target; private final TaskListener listener; ...
void function(final String target, final TaskListener listener) throws IOException, InterruptedException { act(new SymlinkTo(target, listener)); } private class SymlinkTo extends SecureFileCallable<Void> { private final String target; private final TaskListener listener; SymlinkTo(String target, TaskListener listener) ...
/** * Creates a symlink to the specified target. * * @param target * The file that the symlink should point to. * @param listener * If symlink creation requires a help of an external process, the error will be reported here. * @since 1.456 */
Creates a symlink to the specified target
symlinkTo
{ "repo_name": "rsandell/jenkins", "path": "core/src/main/java/hudson/FilePath.java", "license": "mit", "size": 148479 }
[ "hudson.model.TaskListener", "java.io.IOException" ]
import hudson.model.TaskListener; import java.io.IOException;
import hudson.model.*; import java.io.*;
[ "hudson.model", "java.io" ]
hudson.model; java.io;
2,092,129
public static java.util.List extractPatientList(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.PatientForTriageVoCollection voCollection) { return extractPatientList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.PatientForTriageVoCollection voCollection) { return extractPatientList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.core.patient.domain.objects.Patient list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.core.patient.domain.objects.Patient list from the value object collection
extractPatientList
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/PatientForTriageVoAssembler.java", "license": "agpl-3.0", "size": 22567 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
155,995
private byte[] newMessage(int numBytes) { byte[] stringBytes = String.valueOf(this.recordsEmitted).getBytes(Charsets.UTF_8); return Arrays.copyOf(stringBytes, numBytes); } }
byte[] function(int numBytes) { byte[] stringBytes = String.valueOf(this.recordsEmitted).getBytes(Charsets.UTF_8); return Arrays.copyOf(stringBytes, numBytes); } }
/** * Create a message of numBytes size. * @param numBytes number of bytes to allocate for the message */
Create a message of numBytes size
newMessage
{ "repo_name": "jinhyukchang/gobblin", "path": "gobblin-utility/src/main/java/org/apache/gobblin/util/test/StressTestingSource.java", "license": "apache-2.0", "size": 6515 }
[ "com.google.common.base.Charsets", "java.util.Arrays" ]
import com.google.common.base.Charsets; import java.util.Arrays;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
961,837
void commitBlock(Block block) throws IOException { if(getBlockId() != block.getBlockId()) { throw new IOException("Trying to commit inconsistent block: id = " + block.getBlockId() + ", expected id = " + getBlockId()); } blockUCState = BlockUCState.COMMITTED; this.set(getBlockId(), bloc...
void commitBlock(Block block) throws IOException { if(getBlockId() != block.getBlockId()) { throw new IOException(STR + block.getBlockId() + STR + getBlockId()); } blockUCState = BlockUCState.COMMITTED; this.set(getBlockId(), block.getNumBytes(), block.getGenerationStamp()); setGenerationStampAndVerifyReplicas(block.ge...
/** * Commit block's length and generation stamp as reported by the client. * Set block state to {@link BlockUCState#COMMITTED}. * @param block - contains client reported block length and generation * @throws IOException if block ids are inconsistent. */
Commit block's length and generation stamp as reported by the client. Set block state to <code>BlockUCState#COMMITTED</code>
commitBlock
{ "repo_name": "eonezhang/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoUnderConstruction.java", "license": "apache-2.0", "size": 13117 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.Block", "org.apache.hadoop.hdfs.server.common.HdfsServerConstants" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.common.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,829,902
public void write(byte[] b, int off, int len) throws IOException { if (sb == null) sb = new StringBuffer(); sb.append(new String(b, off, len)); }
void function(byte[] b, int off, int len) throws IOException { if (sb == null) sb = new StringBuffer(); sb.append(new String(b, off, len)); }
/** * Appending to internal StringBuffer, instead of immediately writing to the file */
Appending to internal StringBuffer, instead of immediately writing to the file
write
{ "repo_name": "lihongqiang/kettle-4.4.0-stable", "path": "src-core/org/pentaho/di/core/util/SortedFileOutputStream.java", "license": "apache-2.0", "size": 7428 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,659,134
protected TinkerGraph.DefaultIdManager selectIdMakerFromGraphData(final LoadGraphWith.GraphData loadGraphWith) { if (null == loadGraphWith) return TinkerGraph.DefaultIdManager.ANY; if (loadGraphWith.equals(LoadGraphWith.GraphData.CLASSIC)) return TinkerGraph.DefaultIdManager.INTEGER; ...
TinkerGraph.DefaultIdManager function(final LoadGraphWith.GraphData loadGraphWith) { if (null == loadGraphWith) return TinkerGraph.DefaultIdManager.ANY; if (loadGraphWith.equals(LoadGraphWith.GraphData.CLASSIC)) return TinkerGraph.DefaultIdManager.INTEGER; else if (loadGraphWith.equals(LoadGraphWith.GraphData.MODERN)) ...
/** * Test that load with specific graph data can be configured with a specific id manager as the data type to * be used in the test for that graph is known. */
Test that load with specific graph data can be configured with a specific id manager as the data type to be used in the test for that graph is known
selectIdMakerFromGraphData
{ "repo_name": "velo/incubator-tinkerpop", "path": "tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java", "license": "apache-2.0", "size": 10478 }
[ "org.apache.tinkerpop.gremlin.LoadGraphWith", "org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph" ]
import org.apache.tinkerpop.gremlin.LoadGraphWith; import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.apache.tinkerpop.gremlin.*; import org.apache.tinkerpop.gremlin.tinkergraph.structure.*;
[ "org.apache.tinkerpop" ]
org.apache.tinkerpop;
1,362,239
@Override public void render(float delta) { try { Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); camera.update(); game.batch.setProjectionMatrix(camera.combined); game.batch.begin(); String dis = dist...
void function(float delta) { try { Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); camera.update(); game.batch.setProjectionMatrix(camera.combined); game.batch.begin(); String dis = distance + STR; game.fontData.draw(game.batch, dis, (float) (game.HEIGHT * 0.037037), (float) (game.WIDTH * 0.0...
/** * Render game * * @since 1.1 * @param delta - delta time */
Render game
render
{ "repo_name": "NekitsGames/StarInvaders", "path": "core/src/com/nekitsgames/starinvaders/screens/MainGameScreen.java", "license": "gpl-3.0", "size": 18182 }
[ "com.badlogic.gdx.Gdx", "com.nekitsgames.starinvaders.API", "com.nekitsgames.starinvaders.classes.Ammunition", "com.nekitsgames.starinvaders.classes.Asteroid" ]
import com.badlogic.gdx.Gdx; import com.nekitsgames.starinvaders.API; import com.nekitsgames.starinvaders.classes.Ammunition; import com.nekitsgames.starinvaders.classes.Asteroid;
import com.badlogic.gdx.*; import com.nekitsgames.starinvaders.*; import com.nekitsgames.starinvaders.classes.*;
[ "com.badlogic.gdx", "com.nekitsgames.starinvaders" ]
com.badlogic.gdx; com.nekitsgames.starinvaders;
2,363,607
if (oldValue == null) { oldValue = ""; } for (int i = 0; i < nodes.getLength(); i++) { Node n = nodes.item(i); if ( (n.getNodeValue() != null && n.getNodeValue().equals(oldValue)) || (n.getNodeValue() == null && oldValue.isEmpty()) ) { ...
if (oldValue == null) { oldValue = ""; } for (int i = 0; i < nodes.getLength(); i++) { Node n = nodes.item(i); if ( (n.getNodeValue() != null && n.getNodeValue().equals(oldValue)) (n.getNodeValue() == null && oldValue.isEmpty()) ) { n.setNodeValue(newValue); } if (n.hasChildNodes()) { replaceValueInNodes(n.getChildNode...
/** * Replaces value of all nodes. * Recursive searching is used. * @param nodes the nodes to be searched * @param oldValue the value to be replaced * @param newValue the replacement value */
Replaces value of all nodes. Recursive searching is used
replaceValueInNodes
{ "repo_name": "marty-cz/xml-tree-editor-siemens", "path": "XmlTreeEditor/src/siemens/xmltreeeditor/config/operations/XmlOperationReplaceValue.java", "license": "apache-2.0", "size": 2800 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,906,713
private static String[] getPropertyBeanList(Object ds) { Method[] allMethods = ds.getClass().getMethods(); ArrayList properties = new ArrayList(); for (int i = 0; i < allMethods.length; i++) { Method method = allMethods[i]; String methodName = method.getName(); ...
static String[] function(Object ds) { Method[] allMethods = ds.getClass().getMethods(); ArrayList properties = new ArrayList(); for (int i = 0; i < allMethods.length; i++) { Method method = allMethods[i]; String methodName = method.getName(); if (methodName.length() < 5 !methodName.startsWith("get") method.getParameter...
/** * Obtains a list of bean properties through reflection. * * @param ds the data source to investigate * @return A list of bean property names. */
Obtains a list of bean properties through reflection
getPropertyBeanList
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/jdbcapi/DataSourceReferenceTest.java", "license": "agpl-3.0", "size": 29010 }
[ "java.lang.reflect.Method", "java.util.ArrayList" ]
import java.lang.reflect.Method; import java.util.ArrayList;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,383,251
int fillBuffer(ReadableByteChannel channel) throws IOException;
int fillBuffer(ReadableByteChannel channel) throws IOException;
/** * Fills the internal buffer of the parser with input data from the * given {@link ReadableByteChannel}. * * @param channel the input channel * @return number of bytes read. * @throws IOException in case of an I/O error. */
Fills the internal buffer of the parser with input data from the given <code>ReadableByteChannel</code>
fillBuffer
{ "repo_name": "cictourgune/MDP-Airbnb", "path": "httpcomponents-core-4.4/httpcore-nio/src/main/java/org/apache/http/nio/NHttpMessageParser.java", "license": "apache-2.0", "size": 2485 }
[ "java.io.IOException", "java.nio.channels.ReadableByteChannel" ]
import java.io.IOException; import java.nio.channels.ReadableByteChannel;
import java.io.*; import java.nio.channels.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,247,614
void serialize(T item, OutputStream sink) throws IOException;
void serialize(T item, OutputStream sink) throws IOException;
/** * Writes a representation of {@code item} to the {@code sink} that can be read back by * {@link #deserialize(java.io.InputStream)}. * * @param item the item to serialize * @param sink the stream to write the item out to * @throws IOException if there is a problem serializing the item */
Writes a representation of item to the sink that can be read back by <code>#deserialize(java.io.InputStream)</code>
serialize
{ "repo_name": "shahankhatch/aurora", "path": "commons/src/main/java/org/apache/aurora/common/io/Codec.java", "license": "apache-2.0", "size": 1898 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
354,839
public static String getXAResourceStartFlagString(int flag) { switch (flag) { case XAResource.TMJOIN: return "TMJOIN"; case XAResource.TMNOFLAGS: return "TMNOFLAGS"; case XAResource.TMRESUME: return "TMRESUME"; } ...
static String function(int flag) { switch (flag) { case XAResource.TMJOIN: return STR; case XAResource.TMNOFLAGS: return STR; case XAResource.TMRESUME: return STR; } return STR + flag; }
/** * Display the javax.xa.XAResource start flag constant corresponding to the * value supplied. * * @param level * a valid javax.xa.XAResource start flag constant. * * @return the name of the constant, or a string indicating the constant is * unknown. ...
Display the javax.xa.XAResource start flag constant corresponding to the value supplied
getXAResourceStartFlagString
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.jca.1.7_fat/test-resourceadapters/adapter/src/com/ibm/adapter/AdapterUtil.java", "license": "epl-1.0", "size": 40817 }
[ "javax.transaction.xa.XAResource" ]
import javax.transaction.xa.XAResource;
import javax.transaction.xa.*;
[ "javax.transaction" ]
javax.transaction;
2,199,638
Translet translate(String name, MethodType method);
Translet translate(String name, MethodType method);
/** * Executes the translet without the supplied variables. * @param name the translet name * @param method the request method * @return the {@code Translet} object */
Executes the translet without the supplied variables
translate
{ "repo_name": "aspectran/aspectran", "path": "embed/src/main/java/com/aspectran/embed/service/EmbeddedAspectran.java", "license": "apache-2.0", "size": 12824 }
[ "com.aspectran.core.activity.Translet", "com.aspectran.core.context.rule.type.MethodType" ]
import com.aspectran.core.activity.Translet; import com.aspectran.core.context.rule.type.MethodType;
import com.aspectran.core.activity.*; import com.aspectran.core.context.rule.type.*;
[ "com.aspectran.core" ]
com.aspectran.core;
316,008
this.scrollPane = scrollPane; this.mainTable = (JTable) scrollPane.getViewport().getView(); this.mainTable.setAutoCreateColumnsFromModel(false); this.mainTable.addPropertyChangeListener(this); // Use the existing table to create a new table sharing // the DataModel an...
this.scrollPane = scrollPane; this.mainTable = (JTable) scrollPane.getViewport().getView(); this.mainTable.setAutoCreateColumnsFromModel(false); this.mainTable.addPropertyChangeListener(this); this.fixedTable = new JTable() {
/** * Specify the number of columns to be fixed and the scroll pane * containing the table. */
Specify the number of columns to be fixed and the scroll pane containing the table
fixColumnSize
{ "repo_name": "ron190/jsql-injection", "path": "view/src/main/java/com/jsql/view/swing/table/FixedColumnTable.java", "license": "gpl-2.0", "size": 7730 }
[ "javax.swing.JTable" ]
import javax.swing.JTable;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,637,959
public File workFile() { return workFile; }
File function() { return workFile; }
/** * The work location. */
The work location
workFile
{ "repo_name": "andrewvc/elasticsearch", "path": "src/main/java/org/elasticsearch/env/Environment.java", "license": "apache-2.0", "size": 6541 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,843,544
@Test public void testParseHour() { // test 1... Hour h = Hour.parseHour("2002-01-29 13"); assertEquals(13, h.getHour()); }
void function() { Hour h = Hour.parseHour(STR); assertEquals(13, h.getHour()); }
/** * Problem for date parsing. */
Problem for date parsing
testParseHour
{ "repo_name": "aaronc/jfreechart", "path": "tests/org/jfree/data/time/HourTest.java", "license": "lgpl-2.1", "size": 11869 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,640,016
public String getFontFamilyName() { if (m_FontFamily == Font.FontFamily.COURIER.ordinal()) return COURIER; if (m_FontFamily == Font.FontFamily.HELVETICA.ordinal()) return HELVETICA; if (m_FontFamily == Font.FontFamily.SYMBOL.ordinal()) return SYMBOL; if (m_FontFamily == Font.FontFami...
String function() { if (m_FontFamily == Font.FontFamily.COURIER.ordinal()) return COURIER; if (m_FontFamily == Font.FontFamily.HELVETICA.ordinal()) return HELVETICA; if (m_FontFamily == Font.FontFamily.SYMBOL.ordinal()) return SYMBOL; if (m_FontFamily == Font.FontFamily.TIMES_ROMAN.ordinal()) return TIMES_ROMAN; if (m_...
/** * Turns the font family into the String constant of the font family. * * @return the font family name */
Turns the font family into the String constant of the font family
getFontFamilyName
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-pdf/src/main/java/adams/core/io/PdfFont.java", "license": "gpl-3.0", "size": 11390 }
[ "com.itextpdf.text.Font" ]
import com.itextpdf.text.Font;
import com.itextpdf.text.*;
[ "com.itextpdf.text" ]
com.itextpdf.text;
2,916,352
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e) { super.setRotationAngles(f, f1, f2, f3, f4, f5, e); }
void function(float f, float f1, float f2, float f3, float f4, float f5, Entity e) { super.setRotationAngles(f, f1, f2, f3, f4, f5, e); }
/** * Sets the model's various rotation angles. For bipeds, par1 and par2 are * used for animating the movement of arms and legs, where par1 represents * the time(so that arms and legs swing back and forth) and par2 represents * how "far" arms and legs can swing at most. */
Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how "far" arms and legs can swing at most
setRotationAngles
{ "repo_name": "GollumTeam/AtlanteanMillenaire", "path": "src/main/java/com/gollum/atlanteanmillenaire/client/model/iron/ModelCooker.java", "license": "gpl-2.0", "size": 5436 }
[ "net.minecraft.entity.Entity" ]
import net.minecraft.entity.Entity;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
2,550,102
public ArrayList getSummaryList() { return new ArrayList(summaryList); }
ArrayList function() { return new ArrayList(summaryList); }
/** * Get summary variable list * * @return summary variable list */
Get summary variable list
getSummaryList
{ "repo_name": "MengZhang/translator-dssat", "path": "src/main/java/org/agmip/translators/dssat/DssatObservedData.java", "license": "bsd-3-clause", "size": 28958 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,016,308
public Set<String> getParameterNames() { return getParameterMap().keySet(); }
Set<String> function() { return getParameterMap().keySet(); }
/** * Returns the set of available parameter names for this link.<p> * * @return the parameter names */
Returns the set of available parameter names for this link
getParameterNames
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/relations/CmsLink.java", "license": "lgpl-2.1", "size": 22855 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,099,310
private void toggleDetailsArea() { Point windowSize = getShell().getSize(); Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT); if (listCreated) { text.dispose(); listCreated = false; detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL)...
void function() { Point windowSize = getShell().getSize(); Point oldSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT); if (listCreated) { text.dispose(); listCreated = false; detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL); } else { text = createDropDownList((Composite) getContents()); detailsButton.se...
/** * Toggles the unfolding of the details area. This is triggered by the user * pressing the details button. */
Toggles the unfolding of the details area. This is triggered by the user pressing the details button
toggleDetailsArea
{ "repo_name": "ESSICS/cs-studio", "path": "core/ui/ui-plugins/org.csstudio.ui.util/src/org/csstudio/ui/util/dialogs/ExceptionDetailsErrorDialog.java", "license": "epl-1.0", "size": 24102 }
[ "org.eclipse.jface.dialogs.IDialogConstants", "org.eclipse.swt.graphics.Point", "org.eclipse.swt.widgets.Composite" ]
import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite;
import org.eclipse.jface.dialogs.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.jface", "org.eclipse.swt" ]
org.eclipse.jface; org.eclipse.swt;
1,879,688
public MDIView getActiveView(){ if(currentViewPane == TABS){ return (MDIView)tabbedPane.getSelectedComponent(); }else{ //this may return null if all windows are minimised and //not a single one is selected. JInternalFrame selectedFrame = desktopPane.getSelectedFrame(); if(selectedFrame != ...
MDIView function(){ if(currentViewPane == TABS){ return (MDIView)tabbedPane.getSelectedComponent(); }else{ JInternalFrame selectedFrame = desktopPane.getSelectedFrame(); if(selectedFrame != null) return (MDIView)selectedFrame.getContentPane(); else return null; } }
/** * Gives the currently active view. Note that this may return null * if all windows are minimised and not a single one is selected. * * @return currently active view or <code>null</code>. */
Gives the currently active view. Note that this may return null if all windows are minimised and not a single one is selected
getActiveView
{ "repo_name": "google-code/aeliamdi", "path": "src/org/aeliamdi/MDIFrame.java", "license": "lgpl-2.1", "size": 43557 }
[ "javax.swing.JInternalFrame" ]
import javax.swing.JInternalFrame;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,061,970
@Override public synchronized void close() throws IOException { innerClose("closed"); }
synchronized void function() throws IOException { innerClose(STR); }
/** * close the stream. After this the stream is not usable -unless and until * it is re-opened (which can happen on some of the buffer ops) * This method is thread-safe and idempotent. * * @throws IOException on IO problems. */
close the stream. After this the stream is not usable -unless and until it is re-opened (which can happen on some of the buffer ops) This method is thread-safe and idempotent
close
{ "repo_name": "openstack/sahara-extra", "path": "hadoop-swiftfs/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeInputStream.java", "license": "apache-2.0", "size": 12132 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
478,671
public synchronized String dump() throws IOException { StringBuffer buffer = new StringBuffer(); buffer.append(header.dump()); for (Datasource datasource : datasources) { buffer.append(datasource.dump()); } for (Archive archive : archives) { buffer.append(archive.dump()); } return buffer.toString...
synchronized String function() throws IOException { StringBuffer buffer = new StringBuffer(); buffer.append(header.dump()); for (Datasource datasource : datasources) { buffer.append(datasource.dump()); } for (Archive archive : archives) { buffer.append(archive.dump()); } return buffer.toString(); }
/** * <p>Returns string representing complete internal RRD state. The returned * string can be printed to <code>stdout</code> and/or used for debugging purposes.</p> * * @return String representing internal RRD state. * @throws IOException Thrown in case of I/O related error. */
Returns string representing complete internal RRD state. The returned string can be printed to <code>stdout</code> and/or used for debugging purposes
dump
{ "repo_name": "OpenNMS/jrobin", "path": "src/main/java/org/jrobin/core/RrdDb.java", "license": "lgpl-2.1", "size": 41918 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
16,533
public CommandLine addArgument(final String argument, final boolean handleQuoting) { if (argument == null) { return this; } // check if we can really quote the argument - if not throw an // IllegalArgumentException if (handleQuoting) { StringUt...
CommandLine function(final String argument, final boolean handleQuoting) { if (argument == null) { return this; } if (handleQuoting) { StringUtils.quoteArgument(argument); } arguments.add(new Argument(argument, handleQuoting)); return this; }
/** * Add a single argument. * * @param argument The argument to add * @param handleQuoting Add the argument with/without handling quoting * @return The command line itself */
Add a single argument
addArgument
{ "repo_name": "sgoeschl/commons-exec", "path": "src/main/java/org/apache/commons/exec/CommandLine.java", "license": "apache-2.0", "size": 14132 }
[ "org.apache.commons.exec.util.StringUtils" ]
import org.apache.commons.exec.util.StringUtils;
import org.apache.commons.exec.util.*;
[ "org.apache.commons" ]
org.apache.commons;
2,116,641
public static AbstractHttpClient buildDefaultHttpClient() { DefaultHttpClient defaultHttpClient = new DefaultHttpClient(); return defaultHttpClient; }
static AbstractHttpClient function() { DefaultHttpClient defaultHttpClient = new DefaultHttpClient(); return defaultHttpClient; }
/** * Configure the default HttpClient used by mechanize. */
Configure the default HttpClient used by mechanize
buildDefaultHttpClient
{ "repo_name": "GistLabs/mechanize", "path": "src/main/java/com/gistlabs/mechanize/impl/MechanizeAgent.java", "license": "mpl-2.0", "size": 9006 }
[ "org.apache.http.impl.client.AbstractHttpClient", "org.apache.http.impl.client.DefaultHttpClient" ]
import org.apache.http.impl.client.AbstractHttpClient; import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.*;
[ "org.apache.http" ]
org.apache.http;
2,865,062
public Set<TypedStoredFlowEntry> getFlowEntries() { return getFlowEntriesInternal(); }
Set<TypedStoredFlowEntry> function() { return getFlowEntriesInternal(); }
/** * Gets the all typed flow entries in flow table. * * @return the set of typed flow entry */
Gets the all typed flow entries in flow table
getFlowEntries
{ "repo_name": "sonu283304/onos", "path": "providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/NewAdaptiveFlowStatsCollector.java", "license": "apache-2.0", "size": 33548 }
[ "java.util.Set", "org.onosproject.net.flow.TypedStoredFlowEntry" ]
import java.util.Set; import org.onosproject.net.flow.TypedStoredFlowEntry;
import java.util.*; import org.onosproject.net.flow.*;
[ "java.util", "org.onosproject.net" ]
java.util; org.onosproject.net;
2,266,316
ConstraintDatabase cdbCopy = cdb.copy(); for ( OpenGoal og : cdbCopy.get(OpenGoal.class) ) { cdbCopy.add(og.getStatement()); } this.takeSnapshot(cdbCopy); new GraphFrame<String,String>(g, history, "Temporal Network", GraphFrame.LayoutClass.FR, edgeLabels); }
ConstraintDatabase cdbCopy = cdb.copy(); for ( OpenGoal og : cdbCopy.get(OpenGoal.class) ) { cdbCopy.add(og.getStatement()); } this.takeSnapshot(cdbCopy); new GraphFrame<String,String>(g, history, STR, GraphFrame.LayoutClass.FR, edgeLabels); }
/** * Draw a GraphFrame of the Statements (Nodes) and AllenConstraints (Edges) in this constraint database. * @param cdb the constraint database */
Draw a GraphFrame of the Statements (Nodes) and AllenConstraints (Edges) in this constraint database
draw
{ "repo_name": "Ewulution/SpiderPlan", "path": "src/main/java/org/spiderplan/tools/visulization/TemporalNetworkVisualizer.java", "license": "mit", "size": 4623 }
[ "org.spiderplan.representation.ConstraintDatabase", "org.spiderplan.representation.expressions.causal.OpenGoal" ]
import org.spiderplan.representation.ConstraintDatabase; import org.spiderplan.representation.expressions.causal.OpenGoal;
import org.spiderplan.representation.*; import org.spiderplan.representation.expressions.causal.*;
[ "org.spiderplan.representation" ]
org.spiderplan.representation;
854,099
public void addPropertiesToManifest(Map<String, String> properties) throws ArchiveModificationException;
void function(Map<String, String> properties) throws ArchiveModificationException;
/** * Adds extra properties to manifest file. * * @param properties * key - value properties pairs. * * @throws ArchiveModificationException */
Adds extra properties to manifest file
addPropertiesToManifest
{ "repo_name": "mikewojtyna/jar-manager", "path": "src/main/java/goobar/cextractor/jarmanager/JarManager.java", "license": "mit", "size": 5865 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
448,885
@Override public Adapter createConstraintAdapter() { if (constraintItemProvider == null) { constraintItemProvider = new ConstraintItemProvider(this); } return constraintItemProvider; } protected SpecificationItemProvider specificationItemProvider;
Adapter function() { if (constraintItemProvider == null) { constraintItemProvider = new ConstraintItemProvider(this); } return constraintItemProvider; } protected SpecificationItemProvider specificationItemProvider;
/** * This creates an adapter for a {@link org.obeonetwork.dsl.east_adl.requirements.Constraint}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.obeonetwork.dsl.east_adl.requirements.Constraint</code>.
createConstraintAdapter
{ "repo_name": "ObeoNetwork/EAST-ADL-Designer", "path": "plugins/org.obeonetwork.dsl.eastadl.edit/src/org/obeonetwork/dsl/east_adl/requirements/provider/RequirementsItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 15066 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,657,180
private DocumentStatus getDocumentStatus(PTGenericInvoiceEntity document) throws InvalidDocumentStateException, DatatypeConfigurationException, RequiredFieldNotFoundException { DocumentStatus status = new DocumentStatus(); if (document.isCancelled()) { status.setInvoice...
DocumentStatus function(PTGenericInvoiceEntity document) throws InvalidDocumentStateException, DatatypeConfigurationException, RequiredFieldNotFoundException { DocumentStatus status = new DocumentStatus(); if (document.isCancelled()) { status.setInvoiceStatus("A"); } else if (document.isBilled()) { status.setInvoiceSta...
/** * Converts the document state to an acronym according to the SAFT file * rules * * @param document * @return * @throws InvalidDocumentStateException * @throws DatatypeConfigurationException * @throws RequiredFieldNotFoundException */
Converts the document state to an acronym according to the SAFT file rules
getDocumentStatus
{ "repo_name": "premium-minds/billy", "path": "billy-portugal/src/main/java/com/premiumminds/billy/portugal/services/export/saftpt/v1_02_01/PTSAFTFileGenerator.java", "license": "lgpl-3.0", "size": 69667 }
[ "com.premiumminds.billy.portugal.persistence.entities.PTGenericInvoiceEntity", "com.premiumminds.billy.portugal.services.export.exceptions.InvalidDocumentStateException", "com.premiumminds.billy.portugal.services.export.exceptions.RequiredFieldNotFoundException", "com.premiumminds.billy.portugal.services.expo...
import com.premiumminds.billy.portugal.persistence.entities.PTGenericInvoiceEntity; import com.premiumminds.billy.portugal.services.export.exceptions.InvalidDocumentStateException; import com.premiumminds.billy.portugal.services.export.exceptions.RequiredFieldNotFoundException; import com.premiumminds.billy.portugal.se...
import com.premiumminds.billy.portugal.persistence.entities.*; import com.premiumminds.billy.portugal.services.export.exceptions.*; import com.premiumminds.billy.portugal.services.export.saftpt.v1_02_01.schema.*; import javax.xml.datatype.*;
[ "com.premiumminds.billy", "javax.xml" ]
com.premiumminds.billy; javax.xml;
2,653,275
protected Set<String> unresolvedKeys() { Set<String> names = Sets.newHashSet(); Map<Class<?>, Multimap<String, Object>> map = unresolved.get(); if (map == null) { return names; } for (Multimap<String, Object> mm : map.values()) { names.addAll(mm.keySet()); } return names; }
Set<String> function() { Set<String> names = Sets.newHashSet(); Map<Class<?>, Multimap<String, Object>> map = unresolved.get(); if (map == null) { return names; } for (Multimap<String, Object> mm : map.values()) { names.addAll(mm.keySet()); } return names; }
/** * Return set of all the unresolved keys. * * @return set of unresolved keys */
Return set of all the unresolved keys
unresolvedKeys
{ "repo_name": "marioestradarosa/axelor-development-kit", "path": "axelor-core/src/main/java/com/axelor/meta/loader/AbstractLoader.java", "license": "agpl-3.0", "size": 4416 }
[ "com.google.common.collect.Multimap", "com.google.common.collect.Sets", "java.util.Map", "java.util.Set" ]
import com.google.common.collect.Multimap; import com.google.common.collect.Sets; import java.util.Map; import java.util.Set;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,711,176
ConfigurableFileCollection getPublicHeaders();
ConfigurableFileCollection getPublicHeaders();
/** * Defines the public header file directories of this library. * * <p>When this collection is empty, the directory {@code src/main/public} is used by default.</p> */
Defines the public header file directories of this library. When this collection is empty, the directory src/main/public is used by default
getPublicHeaders
{ "repo_name": "gradle/gradle", "path": "subprojects/language-native/src/main/java/org/gradle/language/cpp/CppLibrary.java", "license": "apache-2.0", "size": 2413 }
[ "org.gradle.api.file.ConfigurableFileCollection" ]
import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.file.*;
[ "org.gradle.api" ]
org.gradle.api;
2,303,076
@SuppressWarnings("unchecked") public Class<? extends InputFormat<?, ?>> getInputFormatClass() throws ClassNotFoundException { return (Class<? extends InputFormat<?, ?>>) conf.getClass( INPUT_FORMAT_CLASS_ATTR, TextInputFormat.class); }
@SuppressWarnings(STR) Class<? extends InputFormat<?, ?>> function() throws ClassNotFoundException { return (Class<? extends InputFormat<?, ?>>) conf.getClass( INPUT_FORMAT_CLASS_ATTR, TextInputFormat.class); }
/** * Get the {@link InputFormat} class for the job. * * @return the {@link InputFormat} class for the job. */
Get the <code>InputFormat</code> class for the job
getInputFormatClass
{ "repo_name": "shot/hadoop-source-reading", "path": "src/mapred/org/apache/hadoop/mapreduce/JobContext.java", "license": "apache-2.0", "size": 7025 }
[ "org.apache.hadoop.mapreduce.lib.input.TextInputFormat" ]
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.input.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
745,278
public static double[][] cressman_kdTree(double[][] stData, double[] X, double[] Y, double unDefData, List<Double> radList) { int xNum = X.length; int yNum = Y.length; int pNum = stData.length; double[][] gridData = new double[yNum][xNum]; int irad = radList.size(); ...
static double[][] function(double[][] stData, double[] X, double[] Y, double unDefData, List<Double> radList) { int xNum = X.length; int yNum = Y.length; int pNum = stData.length; double[][] gridData = new double[yNum][xNum]; int irad = radList.size(); int i, j; double xMin = X[0]; double xMax = X[X.length - 1]; double...
/** * Cressman analysis * * @param stData station data array - x,y,value * @param X x array * @param Y y array * @param unDefData undefine data * @param radList radii list * @return result grid data */
Cressman analysis
cressman_kdTree
{ "repo_name": "zxgaoray/AssistGeo", "path": "geoprocess/src/main/java/wContour/Interpolate.java", "license": "apache-2.0", "size": 40843 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
182,028
public void testLatin1() throws Exception { Logger root = Logger.getRootLogger(); configure(root, "output/latin1.log", "iso-8859-1"); common(root); assertTrue(BinaryCompare.compare("output/latin1.log", "witness/encoding/latin1.log")); }
void function() throws Exception { Logger root = Logger.getRootLogger(); configure(root, STR, STR); common(root); assertTrue(BinaryCompare.compare(STR, STR)); }
/** * Test iso-8859-1 encoding. * @throws Exception if test failure */
Test iso-8859-1 encoding
testLatin1
{ "repo_name": "prmsheriff/log4j", "path": "tests/src/java/org/apache/log4j/EncodingTest.java", "license": "apache-2.0", "size": 4741 }
[ "org.apache.log4j.util.BinaryCompare" ]
import org.apache.log4j.util.BinaryCompare;
import org.apache.log4j.util.*;
[ "org.apache.log4j" ]
org.apache.log4j;
1,389,302
public Optional<JobDefinitionDto> getByConfigField(String configField, Object value) { final String field = String.format(Locale.US, "%s.%s", JobDefinitionDto.FIELD_CONFIG, configField); return Optional.ofNullable(db.findOne(DBQuery.is(field, value))); }
Optional<JobDefinitionDto> function(String configField, Object value) { final String field = String.format(Locale.US, "%s.%s", JobDefinitionDto.FIELD_CONFIG, configField); return Optional.ofNullable(db.findOne(DBQuery.is(field, value))); }
/** * Returns the job definition that has the given config field value. * * @param configField the config field * @param value the value of the config field * @return the job definition with the given config field, or an empty optional */
Returns the job definition that has the given config field value
getByConfigField
{ "repo_name": "Graylog2/graylog2-server", "path": "graylog2-server/src/main/java/org/graylog/scheduler/DBJobDefinitionService.java", "license": "gpl-3.0", "size": 3547 }
[ "java.util.Locale", "java.util.Optional", "org.mongojack.DBQuery" ]
import java.util.Locale; import java.util.Optional; import org.mongojack.DBQuery;
import java.util.*; import org.mongojack.*;
[ "java.util", "org.mongojack" ]
java.util; org.mongojack;
1,597,297
Service getServiceByComponentName(String componentName) throws AmbariException;
Service getServiceByComponentName(String componentName) throws AmbariException;
/** * Gets a service from the given component name. * @param componentName * @return * @throws AmbariException */
Gets a service from the given component name
getServiceByComponentName
{ "repo_name": "sekikn/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java", "license": "apache-2.0", "size": 24252 }
[ "org.apache.ambari.server.AmbariException" ]
import org.apache.ambari.server.AmbariException;
import org.apache.ambari.server.*;
[ "org.apache.ambari" ]
org.apache.ambari;
860,411
public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) { }
void function(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) { }
/** * Sets the raw JSON object * * @param serializer the serializer * @param json the JSON object to set this object to */
Sets the raw JSON object
setRawObject
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/models/StoragePlanInformation.java", "license": "mit", "size": 1929 }
[ "com.google.gson.JsonObject", "com.microsoft.graph.serializer.ISerializer", "javax.annotation.Nonnull" ]
import com.google.gson.JsonObject; import com.microsoft.graph.serializer.ISerializer; import javax.annotation.Nonnull;
import com.google.gson.*; import com.microsoft.graph.serializer.*; import javax.annotation.*;
[ "com.google.gson", "com.microsoft.graph", "javax.annotation" ]
com.google.gson; com.microsoft.graph; javax.annotation;
2,465,766
private String getSystemProperties ( ) { StringBuffer returnValue = new StringBuffer() ; returnValue.append( "GENERAL SYSTEM PROPERTIES:\n" ) ; // Get all system properties Properties props = System.getProperties(); // Enumerate all system properties Enumeration pro...
String function ( ) { StringBuffer returnValue = new StringBuffer() ; returnValue.append( STR ) ; Properties props = System.getProperties(); Enumeration propEnum = props.propertyNames(); for (; propEnum.hasMoreElements(); ) { String propName = (String)propEnum.nextElement(); String propValue = (String)props.get(propNam...
/** * Collate a list of the system properties - formatted for error reporting. */
Collate a list of the system properties - formatted for error reporting
getSystemProperties
{ "repo_name": "NCIP/webgenome", "path": "tags/WEBGENOME_R3.2_6MAR2009_BUILD1/java/webui/src/org/rti/webgenome/webui/taglib/ErrorEmailTag.java", "license": "bsd-3-clause", "size": 11173 }
[ "java.util.Enumeration", "java.util.Properties" ]
import java.util.Enumeration; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
938,838
public static void main(String[] args) { // First of all, configure the Mobile JikesRVM environment as ACIK try { MobileJikesRVM.configureJikesRVM(MobileJikesRVM.ACIK); } catch (UnsupportedJikesRVMEnvironment e) { e.printStackTrace(); } Em...
static void function(String[] args) { try { MobileJikesRVM.configureJikesRVM(MobileJikesRVM.ACIK); } catch (UnsupportedJikesRVMEnvironment e) { e.printStackTrace(); } EmbeddedRVMServiceManager jsm = EmbeddedRVMServiceManager.getInstance(); jsm.run(); }
/** * Main entry point of the ServiceManager class * * @param args Unused. No arguments are passed to the service manager */
Main entry point of the ServiceManager class
main
{ "repo_name": "ihmc/nomads", "path": "aci/java/us/ihmc/aci/kernel/EmbeddedRVMServiceManager.java", "license": "gpl-3.0", "size": 26575 }
[ "com.ibm.JikesRVM" ]
import com.ibm.JikesRVM;
import com.ibm.*;
[ "com.ibm" ]
com.ibm;
2,388,467
public ClassificationModel attachClassification(GraphRewrite event, EvaluationContext context, FileModel fileModel, String classificationText, String description) { Rule rule = (Rule) context.get(Rule.class); return attachClassification(event, rule, fileModel, classificationText, description); ...
ClassificationModel function(GraphRewrite event, EvaluationContext context, FileModel fileModel, String classificationText, String description) { Rule rule = (Rule) context.get(Rule.class); return attachClassification(event, rule, fileModel, classificationText, description); }
/** * Attach a {@link ClassificationModel} with the given classificationText and description to the provided {@link FileModel}. If an existing Model * exists with the provided classificationText, that one will be used instead. */
Attach a <code>ClassificationModel</code> with the given classificationText and description to the provided <code>FileModel</code>. If an existing Model exists with the provided classificationText, that one will be used instead
attachClassification
{ "repo_name": "d-s/windup", "path": "reporting/api/src/main/java/org/jboss/windup/reporting/service/ClassificationService.java", "license": "epl-1.0", "size": 12088 }
[ "org.jboss.windup.config.GraphRewrite", "org.jboss.windup.graph.model.resource.FileModel", "org.jboss.windup.reporting.model.ClassificationModel", "org.ocpsoft.rewrite.config.Rule", "org.ocpsoft.rewrite.context.EvaluationContext" ]
import org.jboss.windup.config.GraphRewrite; import org.jboss.windup.graph.model.resource.FileModel; import org.jboss.windup.reporting.model.ClassificationModel; import org.ocpsoft.rewrite.config.Rule; import org.ocpsoft.rewrite.context.EvaluationContext;
import org.jboss.windup.config.*; import org.jboss.windup.graph.model.resource.*; import org.jboss.windup.reporting.model.*; import org.ocpsoft.rewrite.config.*; import org.ocpsoft.rewrite.context.*;
[ "org.jboss.windup", "org.ocpsoft.rewrite" ]
org.jboss.windup; org.ocpsoft.rewrite;
2,745,903
public static VNumberArray ndArray(VNumberArray data, ArrayDimensionDisplay... dimensions) { int[] sizes = new int[dimensions.length]; List<ArrayDimensionDisplay> displays = new ArrayList<>(); for (int i = 0; i < dimensions.length; i++) { ArrayDimensionDisplay dimensionInfo = dim...
static VNumberArray function(VNumberArray data, ArrayDimensionDisplay... dimensions) { int[] sizes = new int[dimensions.length]; List<ArrayDimensionDisplay> displays = new ArrayList<>(); for (int i = 0; i < dimensions.length; i++) { ArrayDimensionDisplay dimensionInfo = dimensions[i]; sizes[i] = dimensionInfo.getCellBo...
/** * Constructs and nd array with the data, time and alarm in the first array and the given * dimension information. * * @param data the array with the data * @param dimensions the dimension information * @return a new array */
Constructs and nd array with the data, time and alarm in the first array and the given dimension information
ndArray
{ "repo_name": "ControlSystemStudio/diirt", "path": "vtype/vtype/src/main/java/org/diirt/vtype/ValueFactory.java", "license": "mit", "size": 29604 }
[ "java.util.ArrayList", "java.util.List", "org.diirt.util.array.ArrayInt" ]
import java.util.ArrayList; import java.util.List; import org.diirt.util.array.ArrayInt;
import java.util.*; import org.diirt.util.array.*;
[ "java.util", "org.diirt.util" ]
java.util; org.diirt.util;
916,806
public static boolean isArgumentMatched(Argument arg, Argument patternArg) { final Perl5Matcher matcher = JMeterUtils.getMatcher(); final PatternCacheLRU patternCache = JMeterUtils.getPatternCache(); return isEqualOrMatches(arg.getName(), patternArg.getName(), matcher, patternCac...
static boolean function(Argument arg, Argument patternArg) { final Perl5Matcher matcher = JMeterUtils.getMatcher(); final PatternCacheLRU patternCache = JMeterUtils.getPatternCache(); return isEqualOrMatches(arg.getName(), patternArg.getName(), matcher, patternCache) && isEqualOrMatches(arg.getValue(), patternArg.getVa...
/** * Arguments match if the input name matches the corresponding pattern name * and the input value matches the pattern value, where the matching is done * first using String equals, and then Regular Expression matching if the equals test fails. * * @param arg - input Argument * @param pa...
Arguments match if the input name matches the corresponding pattern name and the input value matches the pattern value, where the matching is done first using String equals, and then Regular Expression matching if the equals test fails
isArgumentMatched
{ "repo_name": "ufctester/apache-jmeter", "path": "src/protocol/http/org/apache/jmeter/protocol/http/parser/HtmlParsingUtils.java", "license": "apache-2.0", "size": 15272 }
[ "org.apache.jmeter.config.Argument", "org.apache.jmeter.util.JMeterUtils", "org.apache.oro.text.PatternCacheLRU", "org.apache.oro.text.regex.Perl5Matcher" ]
import org.apache.jmeter.config.Argument; import org.apache.jmeter.util.JMeterUtils; import org.apache.oro.text.PatternCacheLRU; import org.apache.oro.text.regex.Perl5Matcher;
import org.apache.jmeter.config.*; import org.apache.jmeter.util.*; import org.apache.oro.text.*; import org.apache.oro.text.regex.*;
[ "org.apache.jmeter", "org.apache.oro" ]
org.apache.jmeter; org.apache.oro;
1,090,345
protected void replace(File dst, File src) throws IOException { File bak = Util.changeExtension(dst,".bak"); bak.delete(); dst.renameTo(bak); dst.delete(); // any failure up to here is no big deal if(!src.renameTo(dst)) { throw new IOEx...
void function(File dst, File src) throws IOException { File bak = Util.changeExtension(dst,".bak"); bak.delete(); dst.renameTo(bak); dst.delete(); if(!src.renameTo(dst)) { throw new IOException(STR+src+STR+dst); } }
/** * Called when the download is completed to overwrite * the old file with the new file. */
Called when the download is completed to overwrite the old file with the new file
replace
{ "repo_name": "recena/jenkins", "path": "core/src/main/java/hudson/model/UpdateCenter.java", "license": "mit", "size": 94384 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,150,078
public ByteBuffer destroy();
ByteBuffer function();
/** * Destroy this decoder, i.e. perform cleanup. * @return any bytes already-read and still remaining within the decoder */
Destroy this decoder, i.e. perform cleanup
destroy
{ "repo_name": "thangbn/Direct-File-Downloader", "path": "src/src/com/aelitis/azureus/core/peermanager/messaging/MessageStreamDecoder.java", "license": "gpl-2.0", "size": 2758 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,286,330
public void setSeriesFillPaint(int series, Paint paint) { setSeriesFillPaint(series, paint, true); }
void function(int series, Paint paint) { setSeriesFillPaint(series, paint, true); }
/** * Sets the paint used for a series fill and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * @param paint the paint (<code>null</code> permitted). */
Sets the paint used for a series fill and sends a <code>RendererChangeEvent</code> to all registered listeners
setSeriesFillPaint
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/renderer/AbstractRenderer.java", "license": "lgpl-2.1", "size": 97537 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
157,350
public void backupBlockState(Block block) { blockStateMap.remove(block.getLocation()); blockStateBackupMap.put(block.getLocation(), new GlowBlockState((GlowBlock) block)); }
void function(Block block) { blockStateMap.remove(block.getLocation()); blockStateBackupMap.put(block.getLocation(), new GlowBlockState((GlowBlock) block)); }
/** * Backups a block state. * @param block the block which state should be backup */
Backups a block state
backupBlockState
{ "repo_name": "keke142/GlowstonePlusPlus", "path": "src/main/java/net/glowstone/util/BlockStateDelegate.java", "license": "mit", "size": 4831 }
[ "net.glowstone.block.GlowBlock", "net.glowstone.block.GlowBlockState", "org.bukkit.block.Block" ]
import net.glowstone.block.GlowBlock; import net.glowstone.block.GlowBlockState; import org.bukkit.block.Block;
import net.glowstone.block.*; import org.bukkit.block.*;
[ "net.glowstone.block", "org.bukkit.block" ]
net.glowstone.block; org.bukkit.block;
853,619
public Object getContent(Class[] classes) throws IOException { return openConnection().getContent(classes); }
Object function(Class[] classes) throws IOException { return openConnection().getContent(classes); }
/** * Gets the contents of this URL * * @param classes The allow classes for the content object. * * @return a context object for this URL. * * @exception IOException If an error occurs */
Gets the contents of this URL
getContent
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/java/net/URL.java", "license": "bsd-3-clause", "size": 31836 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,286,543
private static void initGraphTypes(Configuration conf, JythonJob jythonJob, PythonInterpreter interpreter) { GiraphTypes types = new GiraphTypes(); types.setVertexIdClass(initValueType(conf, GraphType.VERTEX_ID, jythonJob.getVertex_id().getType(), new JythonVertexIdFactory(), interpreter...
static void function(Configuration conf, JythonJob jythonJob, PythonInterpreter interpreter) { GiraphTypes types = new GiraphTypes(); types.setVertexIdClass(initValueType(conf, GraphType.VERTEX_ID, jythonJob.getVertex_id().getType(), new JythonVertexIdFactory(), interpreter)); types.setVertexValueClass(initValueType(co...
/** * Initialize the job types * * @param conf Configuration * @param jythonJob the job info * @param interpreter PythonInterpreter to use */
Initialize the job types
initGraphTypes
{ "repo_name": "basio/graph", "path": "giraph-hive/src/main/java/org/apache/giraph/hive/jython/HiveJythonUtils.java", "license": "apache-2.0", "size": 34256 }
[ "org.apache.giraph.conf.GiraphTypes", "org.apache.giraph.graph.GraphType", "org.apache.giraph.jython.JythonJob", "org.apache.giraph.jython.factories.JythonEdgeValueFactory", "org.apache.giraph.jython.factories.JythonIncomingMessageValueFactory", "org.apache.giraph.jython.factories.JythonOutgoingMessageVal...
import org.apache.giraph.conf.GiraphTypes; import org.apache.giraph.graph.GraphType; import org.apache.giraph.jython.JythonJob; import org.apache.giraph.jython.factories.JythonEdgeValueFactory; import org.apache.giraph.jython.factories.JythonIncomingMessageValueFactory; import org.apache.giraph.jython.factories.JythonO...
import org.apache.giraph.conf.*; import org.apache.giraph.graph.*; import org.apache.giraph.jython.*; import org.apache.giraph.jython.factories.*; import org.apache.hadoop.conf.*; import org.python.util.*;
[ "org.apache.giraph", "org.apache.hadoop", "org.python.util" ]
org.apache.giraph; org.apache.hadoop; org.python.util;
1,163,038
private void setPermission(final FileSystem fs, final Path path, final short filesMode, final boolean recursive) throws IOException { if (filesMode > 0) { FsPermission perm = new FsPermission(filesMode); if (recursive && fs.isDirectory(path)) { for (FileStatus child : fs.listStatus(path)...
void function(final FileSystem fs, final Path path, final short filesMode, final boolean recursive) throws IOException { if (filesMode > 0) { FsPermission perm = new FsPermission(filesMode); if (recursive && fs.isDirectory(path)) { for (FileStatus child : fs.listStatus(path)) { setPermission(fs, child.getPath(), filesM...
/** * Set path permission. */
Set path permission
setPermission
{ "repo_name": "vincentpoon/hbase", "path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java", "license": "apache-2.0", "size": 45712 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.permission.FsPermission" ]
import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
213,622
private static org.w3c.dom.Document toDom(final Document doc) { try { final XMLOutputter xmlOutputter = new XMLOutputter(); final StringWriter elemStrWriter = new StringWriter(); xmlOutputter.output(doc, elemStrWriter); final byte[] xmlBytes = elemStrWriter.to...
static org.w3c.dom.Document function(final Document doc) { try { final XMLOutputter xmlOutputter = new XMLOutputter(); final StringWriter elemStrWriter = new StringWriter(); xmlOutputter.output(doc, elemStrWriter); final byte[] xmlBytes = elemStrWriter.toString().getBytes(Charset.defaultCharset()); final DocumentBuilde...
/** * Convert the received jdom doc to a Document element. * * @param doc the doc * @return the org.w3c.dom. document */
Convert the received jdom doc to a Document element
toDom
{ "repo_name": "Unicon/cas", "path": "support/cas-server-support-saml/src/main/java/org/apereo/cas/support/saml/util/AbstractSamlObjectBuilder.java", "license": "apache-2.0", "size": 15941 }
[ "java.io.ByteArrayInputStream", "java.io.StringWriter", "java.nio.charset.Charset", "javax.xml.XMLConstants", "javax.xml.parsers.DocumentBuilderFactory", "org.jdom.Document", "org.jdom.output.XMLOutputter" ]
import java.io.ByteArrayInputStream; import java.io.StringWriter; import java.nio.charset.Charset; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilderFactory; import org.jdom.Document; import org.jdom.output.XMLOutputter;
import java.io.*; import java.nio.charset.*; import javax.xml.*; import javax.xml.parsers.*; import org.jdom.*; import org.jdom.output.*;
[ "java.io", "java.nio", "javax.xml", "org.jdom", "org.jdom.output" ]
java.io; java.nio; javax.xml; org.jdom; org.jdom.output;
2,912,750
Calendar calendar = getCalendar("vtodo.ics"); NoteItem note = converter.convertTaskCalendar(calendar); Assert.assertTrue(TriageStatus.CODE_NOW==note.getTriageStatus().getCode()); // add COMPLETED DateTime completeDate = new DateTime("20080122T100000Z"); ...
Calendar calendar = getCalendar(STR); NoteItem note = converter.convertTaskCalendar(calendar); Assert.assertTrue(TriageStatus.CODE_NOW==note.getTriageStatus().getCode()); DateTime completeDate = new DateTime(STR); VToDo vtodo = (VToDo) calendar.getComponents(Component.VTODO).get(0); ICalendarUtils.setCompleted(complete...
/** * Tests entity convertor task. * @throws Exception - if something is wrong this exception is thrown. */
Tests entity convertor task
testEntityConverterTask
{ "repo_name": "1and1/cosmo", "path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/model/hibernate/EntityConverterTest.java", "license": "apache-2.0", "size": 24666 }
[ "net.fortuna.ical4j.model.Calendar", "net.fortuna.ical4j.model.Component", "net.fortuna.ical4j.model.DateTime", "net.fortuna.ical4j.model.component.VToDo", "net.fortuna.ical4j.model.property.Status", "org.junit.Assert", "org.unitedinternet.cosmo.calendar.ICalendarUtils", "org.unitedinternet.cosmo.mode...
import net.fortuna.ical4j.model.Calendar; import net.fortuna.ical4j.model.Component; import net.fortuna.ical4j.model.DateTime; import net.fortuna.ical4j.model.component.VToDo; import net.fortuna.ical4j.model.property.Status; import org.junit.Assert; import org.unitedinternet.cosmo.calendar.ICalendarUtils; import org.un...
import net.fortuna.ical4j.model.*; import net.fortuna.ical4j.model.component.*; import net.fortuna.ical4j.model.property.*; import org.junit.*; import org.unitedinternet.cosmo.calendar.*; import org.unitedinternet.cosmo.model.*;
[ "net.fortuna.ical4j", "org.junit", "org.unitedinternet.cosmo" ]
net.fortuna.ical4j; org.junit; org.unitedinternet.cosmo;
483,161
List<OneDrive> getAllDrives() throws IOException, OneDriveException;
List<OneDrive> getAllDrives() throws IOException, OneDriveException;
/** * Gets all drives of the user. * * @return List<OneDrive> * @throws IOException * @throws OneDriveException */
Gets all drives of the user
getAllDrives
{ "repo_name": "tawalaya/OneDriveJavaSDK", "path": "src/main/java/de/tuberlin/onedrivesdk/OneDriveSDK.java", "license": "mit", "size": 4806 }
[ "de.tuberlin.onedrivesdk.drive.OneDrive", "java.io.IOException", "java.util.List" ]
import de.tuberlin.onedrivesdk.drive.OneDrive; import java.io.IOException; import java.util.List;
import de.tuberlin.onedrivesdk.drive.*; import java.io.*; import java.util.*;
[ "de.tuberlin.onedrivesdk", "java.io", "java.util" ]
de.tuberlin.onedrivesdk; java.io; java.util;
161,364
private static String getCanonicalName(String account, String shareName, String filePath) { return !CoreUtils.isNullOrEmpty(filePath) ? String.format("/file/%s/%s/%s", account, shareName, filePath.replace("\\", "/")) : String.format("/file/%s/%s", account, shareName); }
static String function(String account, String shareName, String filePath) { return !CoreUtils.isNullOrEmpty(filePath) ? String.format(STR, account, shareName, filePath.replace("\\", "/")) : String.format(STR, account, shareName); }
/** * Computes the canonical name for a share or file resource for SAS signing. * Share: "/file/account/sharename" * File: "/file/account/sharename/filename" * File: "/file/account/sharename/directoryname/filename" * * @param account The name of the storage account. * @param shareName...
Computes the canonical name for a share or file resource for SAS signing. Share: "/file/account/sharename" File: "/file/account/sharename/filename" File: "/file/account/sharename/directoryname/filename"
getCanonicalName
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java", "license": "mit", "size": 18695 }
[ "com.azure.core.util.CoreUtils" ]
import com.azure.core.util.CoreUtils;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
717,309
@Override public ResultHandle update(BytecodeCreator creator, ResultHandle entity) { MethodDescriptor getEntityManager = ofMethod(PanacheRepositoryBase.class, "getEntityManager", EntityManager.class); ResultHandle entityManager = creator.invokeInterfaceMethod(getEntityManager, ge...
ResultHandle function(BytecodeCreator creator, ResultHandle entity) { MethodDescriptor getEntityManager = ofMethod(PanacheRepositoryBase.class, STR, EntityManager.class); ResultHandle entityManager = creator.invokeInterfaceMethod(getEntityManager, getRepositoryInstance(creator)); return creator.invokeInterfaceMethod( o...
/** * Implements <code>JpaOperations.getEntityManager().merge(entity)</code> */
Implements <code>JpaOperations.getEntityManager().merge(entity)</code>
update
{ "repo_name": "quarkusio/quarkus", "path": "extensions/panache/hibernate-orm-rest-data-panache/deployment/src/main/java/io/quarkus/hibernate/orm/rest/data/panache/deployment/RepositoryDataAccessImplementor.java", "license": "apache-2.0", "size": 5450 }
[ "io.quarkus.gizmo.BytecodeCreator", "io.quarkus.gizmo.MethodDescriptor", "io.quarkus.gizmo.ResultHandle", "io.quarkus.hibernate.orm.panache.PanacheRepositoryBase", "javax.persistence.EntityManager" ]
import io.quarkus.gizmo.BytecodeCreator; import io.quarkus.gizmo.MethodDescriptor; import io.quarkus.gizmo.ResultHandle; import io.quarkus.hibernate.orm.panache.PanacheRepositoryBase; import javax.persistence.EntityManager;
import io.quarkus.gizmo.*; import io.quarkus.hibernate.orm.panache.*; import javax.persistence.*;
[ "io.quarkus.gizmo", "io.quarkus.hibernate", "javax.persistence" ]
io.quarkus.gizmo; io.quarkus.hibernate; javax.persistence;
2,199,078
@NotNull LanguageReferenceProviders byLanguage(@NotNull Language language) { return myByHostLanguage.computeIfAbsent(language, ReferenceProviders::createLanguageProviders); }
LanguageReferenceProviders byLanguage(@NotNull Language language) { return myByHostLanguage.computeIfAbsent(language, ReferenceProviders::createLanguageProviders); }
/** * Given language of a host element returns list of providers that could provide references from this language. */
Given language of a host element returns list of providers that could provide references from this language
byLanguage
{ "repo_name": "leafclick/intellij-community", "path": "platform/core-impl/src/com/intellij/model/psi/impl/ReferenceProviders.java", "license": "apache-2.0", "size": 3427 }
[ "com.intellij.lang.Language", "org.jetbrains.annotations.NotNull" ]
import com.intellij.lang.Language; import org.jetbrains.annotations.NotNull;
import com.intellij.lang.*; import org.jetbrains.annotations.*;
[ "com.intellij.lang", "org.jetbrains.annotations" ]
com.intellij.lang; org.jetbrains.annotations;
743,396
public static MessageSelectorBuilder fromKeyValueMap(Map<String, Object> valueMap) { StringBuffer buf = new StringBuffer(); Iterator<Entry<String, Object>> iter = valueMap.entrySet().iterator(); if (iter.hasNext()) { Entry<String, Object> entry = iter.next(); String...
static MessageSelectorBuilder function(Map<String, Object> valueMap) { StringBuffer buf = new StringBuffer(); Iterator<Entry<String, Object>> iter = valueMap.entrySet().iterator(); if (iter.hasNext()) { Entry<String, Object> entry = iter.next(); String key = entry.getKey(); String value = entry.getValue().toString(); b...
/** * Static builder method using a key value map. * @param valueMap * @return */
Static builder method using a key value map
fromKeyValueMap
{ "repo_name": "christophd/citrus", "path": "core/citrus-base/src/main/java/com/consol/citrus/message/MessageSelectorBuilder.java", "license": "apache-2.0", "size": 6201 }
[ "java.util.Iterator", "java.util.Map" ]
import java.util.Iterator; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,859,000
public void setUsernameSecurityPolicyUri(final SecurityPolicy usernameSecurityPolicy) { this.usernameSecurityPolicyUri = usernameSecurityPolicy.getUri(); }
void function(final SecurityPolicy usernameSecurityPolicy) { this.usernameSecurityPolicyUri = usernameSecurityPolicy.getUri(); }
/** * Set the {@link UserTokenPolicy} used when */
Set the <code>UserTokenPolicy</code> used when
setUsernameSecurityPolicyUri
{ "repo_name": "tadayosi/camel", "path": "components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerComponent.java", "license": "apache-2.0", "size": 25162 }
[ "org.eclipse.milo.opcua.stack.core.security.SecurityPolicy" ]
import org.eclipse.milo.opcua.stack.core.security.SecurityPolicy;
import org.eclipse.milo.opcua.stack.core.security.*;
[ "org.eclipse.milo" ]
org.eclipse.milo;
1,311,882
void createPlotSettings(int id, Plot plot);
void createPlotSettings(int id, Plot plot);
/** * Create plot settings. * * @param id Plot Entry ID * @param plot Plot Object */
Create plot settings
createPlotSettings
{ "repo_name": "Maescool/PlotSquared", "path": "Core/src/main/java/com/intellectualcrafters/plot/database/AbstractDB.java", "license": "gpl-3.0", "size": 10173 }
[ "com.intellectualcrafters.plot.object.Plot" ]
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.*;
[ "com.intellectualcrafters.plot" ]
com.intellectualcrafters.plot;
2,475,534
protected void enterModule(Token node) throws ParseException { }
void function(Token node) throws ParseException { }
/** * Called when entering a parse tree node. * * @param node the node being entered * * @throws ParseException if the node analysis discovered errors */
Called when entering a parse tree node
enterModule
{ "repo_name": "richb-hanover/mibble-2.9.2", "path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java", "license": "gpl-2.0", "size": 275483 }
[ "net.percederberg.grammatica.parser.ParseException", "net.percederberg.grammatica.parser.Token" ]
import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Token;
import net.percederberg.grammatica.parser.*;
[ "net.percederberg.grammatica" ]
net.percederberg.grammatica;
447,487
public int doFinal( byte[] out, int outOff) throws DataLengthException, IllegalStateException, InvalidCipherTextException { int blockSize = cipher.getBlockSize(); int resultLen = 0; if (forEncryption) { if (bufOff == blockSize) ...
int function( byte[] out, int outOff) throws DataLengthException, IllegalStateException, InvalidCipherTextException { int blockSize = cipher.getBlockSize(); int resultLen = 0; if (forEncryption) { if (bufOff == blockSize) { if ((outOff + 2 * blockSize) > out.length) { throw new DataLengthException(STR); } resultLen = c...
/** * Process the last block in the buffer. If the buffer is currently * full and padding needs to be added a call to doFinal will produce * 2 * getBlockSize() bytes. * * @param out the array the block currently being held is copied into. * @param outOff the offset at which the copying sta...
Process the last block in the buffer. If the buffer is currently full and padding needs to be added a call to doFinal will produce 2 * getBlockSize() bytes
doFinal
{ "repo_name": "bitcoin-labs/bitcoinj", "path": "src/com/google/bitcoin/bouncycastle/crypto/modes/PaddedBlockCipher.java", "license": "apache-2.0", "size": 7439 }
[ "com.google.bitcoin.bouncycastle.crypto.DataLengthException", "com.google.bitcoin.bouncycastle.crypto.InvalidCipherTextException" ]
import com.google.bitcoin.bouncycastle.crypto.DataLengthException; import com.google.bitcoin.bouncycastle.crypto.InvalidCipherTextException;
import com.google.bitcoin.bouncycastle.crypto.*;
[ "com.google.bitcoin" ]
com.google.bitcoin;
1,891,418
private String generatePKWhereStatement(ResultRow row) throws SQLException { boolean first = true; StringBuilder sql = new StringBuilder(); for (int i = 0; i < row.size(); i ++) { if (row.isInPrimaryKey(i)) { if (!first) { sql.append(" AND "); } else { sql.append("\n WHERE "); ...
String function(ResultRow row) throws SQLException { boolean first = true; StringBuilder sql = new StringBuilder(); for (int i = 0; i < row.size(); i ++) { if (row.isInPrimaryKey(i)) { if (!first) { sql.append(STR); } else { sql.append(STR); first = false; } sql.append(row.getColumnName(i)); Object ival = row.getValue(...
/** * Returns a WHERE clause for use in a SQL statement to find the specific * row given by primary key of the given parameter 'row'. * * @param row * The specific row for which we are trying to form a WHERE * clause to find based on its primary key. * * @return The WHERE ...
Returns a WHERE clause for use in a SQL statement to find the specific row given by primary key of the given parameter 'row'
generatePKWhereStatement
{ "repo_name": "SQLPower/power-matchmaker", "path": "src/ca/sqlpower/matchmaker/MergeProcessor.java", "license": "gpl-3.0", "size": 53406 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
689,298
public static String getPrimarySummary(final Context context) { SharedPreferences sharedPref = PreferenceManager .getDefaultSharedPreferences(context); String key = sharedPref.getString(Pref.PRIMARY_COLOR, DEFAULT_PRIMARY_COLOR); return Objects.requireNonNull(...
static String function(final Context context) { SharedPreferences sharedPref = PreferenceManager .getDefaultSharedPreferences(context); String key = sharedPref.getString(Pref.PRIMARY_COLOR, DEFAULT_PRIMARY_COLOR); return Objects.requireNonNull(COLORS.get(key)).getName(); }
/** * Get the primary color from the saved preferences and return its name. * * @param context Context * @return Primary color name */
Get the primary color from the saved preferences and return its name
getPrimarySummary
{ "repo_name": "Alkisum/Notepad", "path": "app/src/main/java/com/alkisum/android/cloudnotes/ui/ColorPref.java", "license": "mit", "size": 11634 }
[ "android.content.Context", "android.content.SharedPreferences", "android.preference.PreferenceManager", "com.alkisum.android.cloudnotes.utils.Pref", "java.util.Objects" ]
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import com.alkisum.android.cloudnotes.utils.Pref; import java.util.Objects;
import android.content.*; import android.preference.*; import com.alkisum.android.cloudnotes.utils.*; import java.util.*;
[ "android.content", "android.preference", "com.alkisum.android", "java.util" ]
android.content; android.preference; com.alkisum.android; java.util;
1,123,605
public int readInt() throws IOException { Number number = readNumber(Codec.CODEC_TYPE_INT); return number.intValue(); }
int function() throws IOException { Number number = readNumber(Codec.CODEC_TYPE_INT); return number.intValue(); }
/** * Reads an int from the input stream. * * @return int * @since 1.1.0 */
Reads an int from the input stream
readInt
{ "repo_name": "alpapad/ahome-titanium", "path": "ahome-titanium/src/com/ait/toolkit/titanium/mobile/client/stream/IOStream.java", "license": "apache-2.0", "size": 12281 }
[ "com.ait.toolkit.titanium.mobile.client.codec.Codec", "java.io.IOException" ]
import com.ait.toolkit.titanium.mobile.client.codec.Codec; import java.io.IOException;
import com.ait.toolkit.titanium.mobile.client.codec.*; import java.io.*;
[ "com.ait.toolkit", "java.io" ]
com.ait.toolkit; java.io;
2,236,483
public Map<DHTKey, ?> dhtGetData();
Map<DHTKey, ?> function();
/** * Returns the Map like structure used to index the data * * @return */
Returns the Map like structure used to index the data
dhtGetData
{ "repo_name": "UWSysLab/Sapphire", "path": "sapphire/app/src/main/java/sapphire/dms/interfaces/dht/DHTInterface.java", "license": "mit", "size": 333 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,614,265
@Test public void testServerDynamicJaasConfiguration() throws Exception { SecurityProtocol securityProtocol = SecurityProtocol.SASL_SSL; saslClientConfigs.put(SaslConfigs.SASL_MECHANISM, "PLAIN"); saslServerConfigs.put(BrokerSecurityConfigs.SASL_ENABLED_MECHANISMS_CONFIG, Arrays.asList("...
void function() throws Exception { SecurityProtocol securityProtocol = SecurityProtocol.SASL_SSL; saslClientConfigs.put(SaslConfigs.SASL_MECHANISM, "PLAIN"); saslServerConfigs.put(BrokerSecurityConfigs.SASL_ENABLED_MECHANISMS_CONFIG, Arrays.asList("PLAIN")); Map<String, Object> serverOptions = new HashMap<>(); serverOp...
/** * Tests dynamic JAAS configuration property for SASL server. Invalid server credentials * are set in the static JVM-wide configuration instance to ensure that the dynamic * property override is used during authentication. */
Tests dynamic JAAS configuration property for SASL server. Invalid server credentials are set in the static JVM-wide configuration instance to ensure that the dynamic property override is used during authentication
testServerDynamicJaasConfiguration
{ "repo_name": "KevinLiLu/kafka", "path": "clients/src/test/java/org/apache/kafka/common/security/authenticator/SaslAuthenticatorTest.java", "license": "apache-2.0", "size": 115069 }
[ "java.util.Arrays", "java.util.Collections", "java.util.HashMap", "java.util.Map", "javax.security.auth.login.Configuration", "org.apache.kafka.common.config.SaslConfigs", "org.apache.kafka.common.config.internals.BrokerSecurityConfigs", "org.apache.kafka.common.security.auth.SecurityProtocol", "org...
import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Map; import javax.security.auth.login.Configuration; import org.apache.kafka.common.config.SaslConfigs; import org.apache.kafka.common.config.internals.BrokerSecurityConfigs; import org.apache.kafka.common.security.auth.Se...
import java.util.*; import javax.security.auth.login.*; import org.apache.kafka.common.config.*; import org.apache.kafka.common.config.internals.*; import org.apache.kafka.common.security.auth.*; import org.apache.kafka.common.security.plain.*;
[ "java.util", "javax.security", "org.apache.kafka" ]
java.util; javax.security; org.apache.kafka;
70,694
void enterOperatorUnary(@NotNull LuaParser.OperatorUnaryContext ctx); void exitOperatorUnary(@NotNull LuaParser.OperatorUnaryContext ctx); void enterFuncname(@NotNull LuaParser.FuncnameContext ctx); void exitFuncname(@NotNull LuaParser.FuncnameContext ctx); void enterOperatorAnd(@NotNull LuaParser.Operat...
void enterOperatorUnary(@NotNull LuaParser.OperatorUnaryContext ctx); void exitOperatorUnary(@NotNull LuaParser.OperatorUnaryContext ctx); void enterFuncname(@NotNull LuaParser.FuncnameContext ctx); void exitFuncname(@NotNull LuaParser.FuncnameContext ctx); void enterOperatorAnd(@NotNull LuaParser.OperatorAndContext ct...
/** * Exit a parse tree produced by {@link LuaParser#tableconstructor}. * @param ctx the parse tree */
Exit a parse tree produced by <code>LuaParser#tableconstructor</code>
exitTableconstructor
{ "repo_name": "toby1984/lua2json", "path": "src/main/antlr4/de/codesourcery/luaparser/antlr/target/generated-sources/antlr4/de/codesourcery/luaparser/antlr/LuaListener.java", "license": "apache-2.0", "size": 11595 }
[ "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,517,090
private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException { // Load client secrets. InputStream in = CalendarQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH); if (in == null) { throw new FileNotFoundException("Resource not found...
static Credential function(final NetHttpTransport HTTP_TRANSPORT) throws IOException { InputStream in = CalendarQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH); if (in == null) { throw new FileNotFoundException(STR + CREDENTIALS_FILE_PATH); } GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON...
/** * Creates an authorized Credential object. * @param HTTP_TRANSPORT The network HTTP Transport. * @return An authorized Credential object. * @throws IOException If the credentials.json file cannot be found. */
Creates an authorized Credential object
getCredentials
{ "repo_name": "googleworkspace/java-samples", "path": "calendar/quickstart/src/main/java/CalendarQuickstart.java", "license": "apache-2.0", "size": 5339 }
[ "com.google.api.client.auth.oauth2.Credential", "com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp", "com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver", "com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow", "com.google.api.client.goo...
import com.google.api.client.auth.oauth2.Credential; import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp; import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver; import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow; import com.google....
import com.google.api.client.auth.oauth2.*; import com.google.api.client.extensions.java6.auth.oauth2.*; import com.google.api.client.extensions.jetty.auth.oauth2.*; import com.google.api.client.googleapis.auth.oauth2.*; import com.google.api.client.http.javanet.*; import com.google.api.client.util.store.*; import java...
[ "com.google.api", "java.io" ]
com.google.api; java.io;
47,502
@Override public void updated(Dictionary<String, ?> config) throws ConfigurationException { if (config != null) { setProperlyConfigured(false); communicator.stop(); context.getConfig().parse(config); logger.info(context.getConfig().toString()); ...
void function(Dictionary<String, ?> config) throws ConfigurationException { if (config != null) { setProperlyConfigured(false); communicator.stop(); context.getConfig().parse(config); logger.info(context.getConfig().toString()); if (context.getConfig().isValid()) { communicator.start(); setProperlyConfigured(true); for...
/** * Updates the configuration for the binding and (re-)starts the * communicator. */
Updates the configuration for the binding and (re-)starts the communicator
updated
{ "repo_name": "openhab/openhab", "path": "bundles/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/bus/HomematicBinding.java", "license": "epl-1.0", "size": 7856 }
[ "java.util.Dictionary", "org.openhab.binding.homematic.HomematicBindingProvider", "org.osgi.service.cm.ConfigurationException" ]
import java.util.Dictionary; import org.openhab.binding.homematic.HomematicBindingProvider; import org.osgi.service.cm.ConfigurationException;
import java.util.*; import org.openhab.binding.homematic.*; import org.osgi.service.cm.*;
[ "java.util", "org.openhab.binding", "org.osgi.service" ]
java.util; org.openhab.binding; org.osgi.service;
1,466,373
@Deprecated public void incomingCryptoWaitingTransference(IncomingCryptoTransactionsWaitingTransferenceEvent event) throws CantSaveEvent { this.registry.saveNewEvent(event.getEventType().getCode(), event.getSource().getCode()); //System.out.println("TTF - INCOMING CRYPTO EVENTRECORDER: NEW EVENT...
void function(IncomingCryptoTransactionsWaitingTransferenceEvent event) throws CantSaveEvent { this.registry.saveNewEvent(event.getEventType().getCode(), event.getSource().getCode()); }
/** * IncomingCryptoEventRecorder Interface implementation. */
IncomingCryptoEventRecorder Interface implementation
incomingCryptoWaitingTransference
{ "repo_name": "fvasquezjatar/fermat-unused", "path": "CRY/plugin/crypto_router/fermat-cry-plugin-crypto-router-incoming-crypto-bitdubai/src/main/java/com/bitdubai/fermat_cry_plugin/layer/crypto_router/incoming_crypto/developer/bitdubai/version_1/structure/IncomingCryptoEventRecorderService.java", "license": "mit...
[ "com.bitdubai.fermat_cry_plugin.layer.crypto_router.incoming_crypto.developer.bitdubai.version_1.exceptions.CantSaveEvent", "com.bitdubai.fermat_pip_api.layer.pip_platform_service.event_manager.events.IncomingCryptoTransactionsWaitingTransferenceEvent" ]
import com.bitdubai.fermat_cry_plugin.layer.crypto_router.incoming_crypto.developer.bitdubai.version_1.exceptions.CantSaveEvent; import com.bitdubai.fermat_pip_api.layer.pip_platform_service.event_manager.events.IncomingCryptoTransactionsWaitingTransferenceEvent;
import com.bitdubai.fermat_cry_plugin.layer.crypto_router.incoming_crypto.developer.bitdubai.version_1.exceptions.*; import com.bitdubai.fermat_pip_api.layer.pip_platform_service.event_manager.events.*;
[ "com.bitdubai.fermat_cry_plugin", "com.bitdubai.fermat_pip_api" ]
com.bitdubai.fermat_cry_plugin; com.bitdubai.fermat_pip_api;
18,656
List<String> toCsvHeaders();
List<String> toCsvHeaders();
/** * Return CSV header names for this object. * * @return a {@link List} of {@link String} with the header names. */
Return CSV header names for this object
toCsvHeaders
{ "repo_name": "rui-castro/roda", "path": "roda-common/roda-common-data/src/main/java/org/roda/core/data/v2/index/IsIndexed.java", "license": "lgpl-3.0", "size": 852 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,649,970
ApiFuture<ShaCertificate> createShaCertificateAsync( String appId, ShaCertificate certificateToAdd);
ApiFuture<ShaCertificate> createShaCertificateAsync( String appId, ShaCertificate certificateToAdd);
/** * Asynchronously adds a SHA certificate to this Android App. * * @param appId the App ID of the Android App * @param certificateToAdd the SHA certificate to be added to this Android App * @return a {@link ApiFuture} of a {@link ShaCertificate} that was created for this Android App, * containin...
Asynchronously adds a SHA certificate to this Android App
createShaCertificateAsync
{ "repo_name": "firebase/firebase-admin-java", "path": "src/main/java/com/google/firebase/projectmanagement/AndroidAppService.java", "license": "apache-2.0", "size": 6862 }
[ "com.google.api.core.ApiFuture" ]
import com.google.api.core.ApiFuture;
import com.google.api.core.*;
[ "com.google.api" ]
com.google.api;
706,887
public List<SerializableFunction<Instant, Instant>> getTimestampMappers() { return timestampMappers; }
List<SerializableFunction<Instant, Instant>> function() { return timestampMappers; }
/** * The mapping functions applied to the arrival time of an element to determine when to * set a wake-up timer for triggering. */
The mapping functions applied to the arrival time of an element to determine when to set a wake-up timer for triggering
getTimestampMappers
{ "repo_name": "yafengguo/Apache-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/AfterDelayFromFirstElement.java", "license": "apache-2.0", "size": 8136 }
[ "java.util.List", "org.apache.beam.sdk.transforms.SerializableFunction", "org.joda.time.Instant" ]
import java.util.List; import org.apache.beam.sdk.transforms.SerializableFunction; import org.joda.time.Instant;
import java.util.*; import org.apache.beam.sdk.transforms.*; import org.joda.time.*;
[ "java.util", "org.apache.beam", "org.joda.time" ]
java.util; org.apache.beam; org.joda.time;
2,456,559
private List documentTypes() { CmsSearchManager manager = OpenCms.getSearchManager(); CmsSearchIndexSource indexsource = manager.getIndexSource(getParamIndexsource()); List result; if (indexsource != null) { List doctypeNames = indexsource.getDocumentTypes(); ...
List function() { CmsSearchManager manager = OpenCms.getSearchManager(); CmsSearchIndexSource indexsource = manager.getIndexSource(getParamIndexsource()); List result; if (indexsource != null) { List doctypeNames = indexsource.getDocumentTypes(); result = new ArrayList(doctypeNames.size()); Iterator it = doctypeNames.i...
/** * Returns the systems configured document types that are assigned * to the current indexsource (those that may be removed).<p> * * @return the systems configured document types that are assigned * to the current indexsource (those that may be removed) */
Returns the systems configured document types that are assigned to the current indexsource (those that may be removed)
documentTypes
{ "repo_name": "serrapos/opencms-core", "path": "src-modules/org/opencms/workplace/tools/searchindex/CmsDocumentTypeRemoveList.java", "license": "lgpl-2.1", "size": 21265 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.opencms.main.OpenCms", "org.opencms.search.CmsSearchIndexSource", "org.opencms.search.CmsSearchManager" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.opencms.main.OpenCms; import org.opencms.search.CmsSearchIndexSource; import org.opencms.search.CmsSearchManager;
import java.util.*; import org.opencms.main.*; import org.opencms.search.*;
[ "java.util", "org.opencms.main", "org.opencms.search" ]
java.util; org.opencms.main; org.opencms.search;
2,432,686
@Test public void testZooKeeperReelectionWithReplacement() throws Exception { int num = 3; int numTries = 30; DefaultLeaderElectionService[] leaderElectionService = new DefaultLeaderElectionService[num]; TestingContender[] contenders = new TestingContender[num]; ...
void function() throws Exception { int num = 3; int numTries = 30; DefaultLeaderElectionService[] leaderElectionService = new DefaultLeaderElectionService[num]; TestingContender[] contenders = new TestingContender[num]; DefaultLeaderRetrievalService leaderRetrievalService = null; TestingListener listener = new TestingL...
/** * Tests the repeated reelection of {@link LeaderContender} once the current leader dies. * Furthermore, it tests that new LeaderElectionServices can be started later on and that they * successfully register at ZooKeeper and take part in the leader election. */
Tests the repeated reelection of <code>LeaderContender</code> once the current leader dies. Furthermore, it tests that new LeaderElectionServices can be started later on and that they successfully register at ZooKeeper and take part in the leader election
testZooKeeperReelectionWithReplacement
{ "repo_name": "StephanEwen/incubator-flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionTest.java", "license": "apache-2.0", "size": 31417 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern", "org.apache.flink.runtime.leaderretrieval.DefaultLeaderRetrievalService", "org.apache.flink.runtime.util.ZooKeeperUtils", "org.junit.Assert" ]
import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.flink.runtime.leaderretrieval.DefaultLeaderRetrievalService; import org.apache.flink.runtime.util.ZooKeeperUtils; import org.junit.Assert;
import java.util.regex.*; import org.apache.flink.runtime.leaderretrieval.*; import org.apache.flink.runtime.util.*; import org.junit.*;
[ "java.util", "org.apache.flink", "org.junit" ]
java.util; org.apache.flink; org.junit;
2,774,584
public final ArrayList<Condition> getConditions() { ArrayList<Condition> conditions = new ArrayList<Condition>(); for ( QuickTriggerable qt : unorderedTriggerables ) { if ( qt.t instanceof Condition ) { conditions.add((Condition) qt.t); } } return conditions;...
final ArrayList<Condition> function() { ArrayList<Condition> conditions = new ArrayList<Condition>(); for ( QuickTriggerable qt : unorderedTriggerables ) { if ( qt.t instanceof Condition ) { conditions.add((Condition) qt.t); } } return conditions; }
/** * API for retrieving the list of conditions, for use when * serializing the form definition (e.g., into .cache file). * @return */
API for retrieving the list of conditions, for use when serializing the form definition (e.g., into .cache file)
getConditions
{ "repo_name": "Jonathan727/javarosa", "path": "core/src/main/java/org/javarosa/core/model/IDag.java", "license": "apache-2.0", "size": 15725 }
[ "java.util.ArrayList", "org.javarosa.core.model.condition.Condition" ]
import java.util.ArrayList; import org.javarosa.core.model.condition.Condition;
import java.util.*; import org.javarosa.core.model.condition.*;
[ "java.util", "org.javarosa.core" ]
java.util; org.javarosa.core;
208,993
public static boolean mkdir(FileSystem fs, Path f, boolean inheritPerms, Configuration conf) throws IOException { LOG.info("Creating directory if it doesn't exist: " + f); if (!inheritPerms) { //just create the directory return fs.mkdirs(f); } else { //Check if the directory already exis...
static boolean function(FileSystem fs, Path f, boolean inheritPerms, Configuration conf) throws IOException { LOG.info(STR + f); if (!inheritPerms) { return fs.mkdirs(f); } else { try { return fs.getFileStatus(f).isDir(); } catch (FileNotFoundException ignore) { } Path lastExistingParent = f; Path firstNonExistentParen...
/** * Creates the directory and all necessary parent directories. * @param fs FileSystem to use * @param f path to create. * @param inheritPerms whether directory inherits the permission of the last-existing parent path * @param conf Hive configuration * @return true if directory created successfully....
Creates the directory and all necessary parent directories
mkdir
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "common/src/java/org/apache/hadoop/hive/common/FileUtils.java", "license": "apache-2.0", "size": 30977 }
[ "java.io.FileNotFoundException", "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hive.io.HdfsUtils" ]
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.io.HdfsUtils;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.io.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,527,176
protected static <T> Collection<T> collection(Class<T> clazz) { return collection(clazz, 1, 2, 3, 4, 5); }
static <T> Collection<T> function(Class<T> clazz) { return collection(clazz, 1, 2, 3, 4, 5); }
/** * Creates a test collection. * * @param clazz The class of the items in the collection. * @return Returns the test collection. */
Creates a test collection
collection
{ "repo_name": "anton-johansson/counter-strike-overview", "path": "src/test/java/com/antonjohansson/counterstrike/test/AbstractTest.java", "license": "apache-2.0", "size": 5870 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,631,907
public Object getData(Result result, byte[] family, byte[] qualifier, String hiveColumn, String type) { // Create the culvert mapping and the result inspector CulvertIndexMapping culvertMapping = CulvertIndexMapping .forColumnFamilyAndQualifier(family, qualifier, hiveColumn, type); CulvertIn...
Object function(Result result, byte[] family, byte[] qualifier, String hiveColumn, String type) { CulvertIndexMapping culvertMapping = CulvertIndexMapping .forColumnFamilyAndQualifier(family, qualifier, hiveColumn, type); CulvertIndexMapping[] mappingArray = { culvertMapping }; CulvertResultInspector resultInspector = ...
/** * Gets the data using the ObjectInspector. * * @param result * @param family * @param qualifier * @param hiveColumn * @param type * @return */
Gets the data using the ObjectInspector
getData
{ "repo_name": "booz-allen-hamilton/culvert", "path": "hive-culvert-handler/src/test/java/com/bah/culvert/CulvertResultInspectorTest.java", "license": "apache-2.0", "size": 8388 }
[ "com.bah.culvert.data.Result", "com.bah.culvert.hive.CulvertField", "com.bah.culvert.hive.CulvertIndexMapping", "com.bah.culvert.hive.CulvertResultInspector", "java.util.List", "org.apache.hadoop.hive.serde2.objectinspector.StructField", "org.junit.Assert" ]
import com.bah.culvert.data.Result; import com.bah.culvert.hive.CulvertField; import com.bah.culvert.hive.CulvertIndexMapping; import com.bah.culvert.hive.CulvertResultInspector; import java.util.List; import org.apache.hadoop.hive.serde2.objectinspector.StructField; import org.junit.Assert;
import com.bah.culvert.data.*; import com.bah.culvert.hive.*; import java.util.*; import org.apache.hadoop.hive.serde2.objectinspector.*; import org.junit.*;
[ "com.bah.culvert", "java.util", "org.apache.hadoop", "org.junit" ]
com.bah.culvert; java.util; org.apache.hadoop; org.junit;
1,077,708
public void put(Text columnFamily, Text columnQualifier, Value value) { put(columnFamily, columnQualifier, EMPTY_BYTES, false, 0l, false, value.get()); }
void function(Text columnFamily, Text columnQualifier, Value value) { put(columnFamily, columnQualifier, EMPTY_BYTES, false, 0l, false, value.get()); }
/** * Puts a modification in this mutation. Column visibility is empty; timestamp is not set. All parameters are defensively copied. * * @param columnFamily * column family * @param columnQualifier * column qualifier * @param value * cell value */
Puts a modification in this mutation. Column visibility is empty; timestamp is not set. All parameters are defensively copied
put
{ "repo_name": "mikewalch/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/data/Mutation.java", "license": "apache-2.0", "size": 36188 }
[ "org.apache.hadoop.io.Text" ]
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,511,942
public static List<Extension> loadExtensions(Connection conn, Properties props, String extensionClassNames, String errorMessageKey, ExceptionInterceptor exceptionInterceptor) throws SQLException { List<Extension> extensionList = new LinkedList<Extension>(); List<String> interceptorsToCr...
static List<Extension> function(Connection conn, Properties props, String extensionClassNames, String errorMessageKey, ExceptionInterceptor exceptionInterceptor) throws SQLException { List<Extension> extensionList = new LinkedList<Extension>(); List<String> interceptorsToCreate = StringUtils.split(extensionClassNames, ...
/** * Returns initialized instances of classes listed in extensionClassNames. * There is no need to call Extension.init() method after that if you don't change connection or properties. * * @param conn * @param props * @param extensionClassNames * @param errorMessageKey * @param...
Returns initialized instances of classes listed in extensionClassNames. There is no need to call Extension.init() method after that if you don't change connection or properties
loadExtensions
{ "repo_name": "mwaylabs/mysql-connector-j", "path": "src/com/mysql/jdbc/Util.java", "license": "gpl-2.0", "size": 23762 }
[ "java.sql.SQLException", "java.util.LinkedList", "java.util.List", "java.util.Properties", "java.util.concurrent.ConcurrentHashMap", "java.util.concurrent.ConcurrentMap" ]
import java.sql.SQLException; import java.util.LinkedList; import java.util.List; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap;
import java.sql.*; import java.util.*; import java.util.concurrent.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
1,441,802
public static boolean isClassFile(Path path) { return path.toString().toLowerCase(Locale.ROOT).endsWith(".class"); }
static boolean function(Path path) { return path.toString().toLowerCase(Locale.ROOT).endsWith(STR); }
/** * Return whether a path corresponds java class file. * * @param path the path to validate. * @return true if the path is a java class file, otherwise false. */
Return whether a path corresponds java class file
isClassFile
{ "repo_name": "MyPureCloud/kafka", "path": "connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java", "license": "apache-2.0", "size": 13593 }
[ "java.nio.file.Path", "java.util.Locale" ]
import java.nio.file.Path; import java.util.Locale;
import java.nio.file.*; import java.util.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
686,103
public Professions getClassById(byte id) { try (Session session = HibernateUtil.getWorldSession().openSession()){ Professions profession = (Professions) session.createCriteria(Professions.class).add(Restrictions.eq("id",id)).uniqueResult(); return profession; } catch (Excepti...
Professions function(byte id) { try (Session session = HibernateUtil.getWorldSession().openSession()){ Professions profession = (Professions) session.createCriteria(Professions.class).add(Restrictions.eq("id",id)).uniqueResult(); return profession; } catch (Exception e) { logger.debug(STR + id + STR); return null; } }
/** * Returns the class which has the given id. * * @param id The id to be looked for. * @return The corresponding class. */
Returns the class which has the given id
getClassById
{ "repo_name": "Warkdev/JaNGOSRealm", "path": "src/main/java/eu/jangos/realm/controller/world/ProfessionService.java", "license": "apache-2.0", "size": 3112 }
[ "eu.jangos.realm.hibernate.HibernateUtil", "eu.jangos.realm.model.world.Professions", "org.hibernate.Session", "org.hibernate.criterion.Restrictions" ]
import eu.jangos.realm.hibernate.HibernateUtil; import eu.jangos.realm.model.world.Professions; import org.hibernate.Session; import org.hibernate.criterion.Restrictions;
import eu.jangos.realm.hibernate.*; import eu.jangos.realm.model.world.*; import org.hibernate.*; import org.hibernate.criterion.*;
[ "eu.jangos.realm", "org.hibernate", "org.hibernate.criterion" ]
eu.jangos.realm; org.hibernate; org.hibernate.criterion;
1,885,685
@Nonnull public Collection<InstanceDescription> get() { return applyFilters(); } // private InstanceCollection(@Nonnull Map<String, InstanceDescription> instances) { this.instances = instances; }
Collection<InstanceDescription> function() { return applyFilters(); } private InstanceCollection(@Nonnull Map<String, InstanceDescription> instances) { this.instances = instances; }
/** * Return the collection of {@code InstanceDescription} instances that have not been filtered out. * * @return the filtered collection of instances. */
Return the collection of InstanceDescription instances that have not been filtered out
get
{ "repo_name": "plutext/sling", "path": "bundles/extensions/discovery/commons/src/main/java/org/apache/sling/discovery/commons/InstancesDiff.java", "license": "apache-2.0", "size": 19962 }
[ "java.util.Collection", "java.util.Map", "javax.annotation.Nonnull", "org.apache.sling.discovery.InstanceDescription" ]
import java.util.Collection; import java.util.Map; import javax.annotation.Nonnull; import org.apache.sling.discovery.InstanceDescription;
import java.util.*; import javax.annotation.*; import org.apache.sling.discovery.*;
[ "java.util", "javax.annotation", "org.apache.sling" ]
java.util; javax.annotation; org.apache.sling;
795,389
if(portTypes.size() == 1){ return portTypes.get(0); } else { for(PortType portType: portTypes){ if(portType.getName().toLowerCase().contains("soap")){ return portType; } } return null; } }
if(portTypes.size() == 1){ return portTypes.get(0); } else { for(PortType portType: portTypes){ if(portType.getName().toLowerCase().contains("soap")){ return portType; } } return null; } }
/** * This method returns the corresponding SOAP port type from the list * of Port Types * @param portTypes * @return */
This method returns the corresponding SOAP port type from the list of Port Types
getSOAPPortType
{ "repo_name": "UGA-WSAG/wsextensions", "path": "WebServiceToolWorkflow_REST_SOAP/project/src/main/java/edu/uga/WSExtension/AddingWebServiceAsTools/ParsingWSDLForMethods.java", "license": "mit", "size": 1794 }
[ "com.predic8.wsdl.PortType" ]
import com.predic8.wsdl.PortType;
import com.predic8.wsdl.*;
[ "com.predic8.wsdl" ]
com.predic8.wsdl;
1,155,077
private void showDownloadStartNotification() { Toast.makeText(mContext, R.string.download_pending, Toast.LENGTH_SHORT).show(); }
void function() { Toast.makeText(mContext, R.string.download_pending, Toast.LENGTH_SHORT).show(); }
/** * Shows the download started notification. */
Shows the download started notification
showDownloadStartNotification
{ "repo_name": "Workday/OpenFrame", "path": "chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java", "license": "bsd-3-clause", "size": 29543 }
[ "org.chromium.ui.widget.Toast" ]
import org.chromium.ui.widget.Toast;
import org.chromium.ui.widget.*;
[ "org.chromium.ui" ]
org.chromium.ui;
2,684,658
public Range[] getPrimaryRangesForEndPoints(Set<EndPoint> endpoints) { List<Range> allRanges = new ArrayList<Range>(); for (EndPoint endpoint : endpoints) { allRanges.add(getPrimaryRangeForEndPoint(endpoint)); } return allRanges.toArray(new Range[0]); }
Range[] function(Set<EndPoint> endpoints) { List<Range> allRanges = new ArrayList<Range>(); for (EndPoint endpoint : endpoints) { allRanges.add(getPrimaryRangeForEndPoint(endpoint)); } return allRanges.toArray(new Range[0]); }
/** * Get all ranges that span the ring given a set of endpoints. */
Get all ranges that span the ring given a set of endpoints
getPrimaryRangesForEndPoints
{ "repo_name": "toddlipcon/helenus", "path": "src/java/com/facebook/infrastructure/service/StorageService.java", "license": "apache-2.0", "size": 53781 }
[ "com.facebook.infrastructure.dht.Range", "com.facebook.infrastructure.net.EndPoint", "java.util.ArrayList", "java.util.List", "java.util.Set" ]
import com.facebook.infrastructure.dht.Range; import com.facebook.infrastructure.net.EndPoint; import java.util.ArrayList; import java.util.List; import java.util.Set;
import com.facebook.infrastructure.dht.*; import com.facebook.infrastructure.net.*; import java.util.*;
[ "com.facebook.infrastructure", "java.util" ]
com.facebook.infrastructure; java.util;
2,026,643
AutoCloseableLock acquireDatasetLock();
AutoCloseableLock acquireDatasetLock();
/** * Acquire the lock of the data set. */
Acquire the lock of the data set
acquireDatasetLock
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java", "license": "apache-2.0", "size": 22452 }
[ "org.apache.hadoop.util.AutoCloseableLock" ]
import org.apache.hadoop.util.AutoCloseableLock;
import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
872,593
if (mode == mPorterDuffMode) { // No change return; } mPorterDuffMode = mode; mXfermode = new PorterDuffXfermode(mode); mBitmap = null; invalidate(); }
if (mode == mPorterDuffMode) { return; } mPorterDuffMode = mode; mXfermode = new PorterDuffXfermode(mode); mBitmap = null; invalidate(); }
/** * Sets the new PorterDuff.Mode, removes the existing Bitmap and invalidates the view * * @param mode PorterDuff.Mode to use */
Sets the new PorterDuff.Mode, removes the existing Bitmap and invalidates the view
setPorterDuffMode
{ "repo_name": "IanGClifton/auid2", "path": "chapter12/PorterDuffView/app/src/main/java/com/auidbook/porterduffview/PorterDuffView.java", "license": "apache-2.0", "size": 7022 }
[ "android.graphics.PorterDuffXfermode" ]
import android.graphics.PorterDuffXfermode;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,316,143