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 RegExp anyChar() { // FIXME: there is some code duplication here with the parser List<Interval> list = new ArrayList<Interval>(); list.add(new Interval(0, CharClasses.maxChar)); return new RegExp1(sym.CCLASS,list); }
RegExp function() { List<Interval> list = new ArrayList<Interval>(); list.add(new Interval(0, CharClasses.maxChar)); return new RegExp1(sym.CCLASS,list); }
/** * Returns a regexp that matches any character: <code>[^]</code> * @return the regexp for <code>[^]</code> */
Returns a regexp that matches any character: <code>[^]</code>
anyChar
{ "repo_name": "ravileite/Compiladores", "path": "libraries/JFlex/jflex-1.6.1/src/main/java/jflex/RegExp.java", "license": "apache-2.0", "size": 9244 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,454,484
public void setCertificateFactory(CertificateFactory certFactory) { this.certificateFactory = certFactory; }
void function(CertificateFactory certFactory) { this.certificateFactory = certFactory; }
/** * Sets the CertificateFactory instance on this Crypto instance * * @param certFactory the CertificateFactory the CertificateFactory instance to set */
Sets the CertificateFactory instance on this Crypto instance
setCertificateFactory
{ "repo_name": "asoldano/wss4j", "path": "ws-security-common/src/main/java/org/apache/wss4j/common/crypto/CryptoBase.java", "license": "apache-2.0", "size": 12639 }
[ "java.security.cert.CertificateFactory" ]
import java.security.cert.CertificateFactory;
import java.security.cert.*;
[ "java.security" ]
java.security;
1,775,344
private boolean changeStateTo(DeviceId d, PortNumber p, BlockState newState) { Map<PortNumber, BlockState> portMap = blockedPorts.computeIfAbsent(d, k -> new HashMap<>()); BlockState oldState = portMap.computeIfAbsent(p, k -> BlockState.UNCHECKED); portMap.put...
boolean function(DeviceId d, PortNumber p, BlockState newState) { Map<PortNumber, BlockState> portMap = blockedPorts.computeIfAbsent(d, k -> new HashMap<>()); BlockState oldState = portMap.computeIfAbsent(p, k -> BlockState.UNCHECKED); portMap.put(p, newState); return (oldState != newState); }
/** * Changes the state of the given device id / port number pair to the * specified state. * * @param d device identifier * @param p port number * @param newState the updated state * @return true, if the state changed from what was previously mapped */
Changes the state of the given device id / port number pair to the specified state
changeStateTo
{ "repo_name": "kuujo/onos", "path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/PortAuthTracker.java", "license": "apache-2.0", "size": 11308 }
[ "java.util.HashMap", "java.util.Map", "org.onosproject.net.DeviceId", "org.onosproject.net.PortNumber" ]
import java.util.HashMap; import java.util.Map; import org.onosproject.net.DeviceId; import org.onosproject.net.PortNumber;
import java.util.*; import org.onosproject.net.*;
[ "java.util", "org.onosproject.net" ]
java.util; org.onosproject.net;
1,863,439
protected void copy(PackFile file, InputStream in, File target) throws IOException { OutputStream out = getTarget(file, target); try { byte[] buffer = new byte[5120]; long bytesCopied = 0; while (bytesCopied < file.length()) { ...
void function(PackFile file, InputStream in, File target) throws IOException { OutputStream out = getTarget(file, target); try { byte[] buffer = new byte[5120]; long bytesCopied = 0; while (bytesCopied < file.length()) { if (cancellable.isCancelled()) { throw new InterruptedIOException(STR); } bytesCopied = copy(file, ...
/** * Copies an input stream to a target, setting its timestamp to that of the pack file. * <p/> * If the target is a blockable file, then a temporary file will be created, and the file queued. * * @param file the pack file * @param in the pack file stream * @param target the fi...
Copies an input stream to a target, setting its timestamp to that of the pack file. If the target is a blockable file, then a temporary file will be created, and the file queued
copy
{ "repo_name": "mtjandra/izpack", "path": "izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/FileUnpacker.java", "license": "apache-2.0", "size": 8523 }
[ "com.izforge.izpack.api.data.PackFile", "com.izforge.izpack.util.file.FileUtils", "java.io.File", "java.io.IOException", "java.io.InputStream", "java.io.InterruptedIOException", "java.io.OutputStream" ]
import com.izforge.izpack.api.data.PackFile; import com.izforge.izpack.util.file.FileUtils; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InterruptedIOException; import java.io.OutputStream;
import com.izforge.izpack.api.data.*; import com.izforge.izpack.util.file.*; import java.io.*;
[ "com.izforge.izpack", "java.io" ]
com.izforge.izpack; java.io;
1,802,321
Collection<BranchResponse> getBranches(String spaceName, String projectName);
Collection<BranchResponse> getBranches(String spaceName, String projectName);
/** * [GET] /spaces/{spaceName}/projects/{projectName}/branches */
[GET] /spaces/{spaceName}/projects/{projectName}/branches
getBranches
{ "repo_name": "manstis/kie-wb-distributions", "path": "business-central-tests/business-central-tests-rest/src/main/java/org/kie/wb/test/rest/client/WorkbenchClient.java", "license": "apache-2.0", "size": 6450 }
[ "java.util.Collection", "org.guvnor.rest.client.BranchResponse" ]
import java.util.Collection; import org.guvnor.rest.client.BranchResponse;
import java.util.*; import org.guvnor.rest.client.*;
[ "java.util", "org.guvnor.rest" ]
java.util; org.guvnor.rest;
2,680,976
private boolean markReferencedVar(Var var) { if (referenced.add(var)) { for (Continuation c : continuations.get(var)) { c.apply(); } return true; } return false; }
boolean function(Var var) { if (referenced.add(var)) { for (Continuation c : continuations.get(var)) { c.apply(); } return true; } return false; }
/** * Marks a var as referenced, recursing into any values of this var * that we skipped. * @return True if this variable had not been referenced before. */
Marks a var as referenced, recursing into any values of this var that we skipped
markReferencedVar
{ "repo_name": "zombiezen/cardcpx", "path": "third_party/closure-compiler/src/com/google/javascript/jscomp/RemoveUnusedVars.java", "license": "apache-2.0", "size": 34961 }
[ "com.google.javascript.jscomp.Scope" ]
import com.google.javascript.jscomp.Scope;
import com.google.javascript.jscomp.*;
[ "com.google.javascript" ]
com.google.javascript;
2,153,415
public boolean close() { synchronized (this) { shutdown.set(true); emsToShutDown = new CountDownLatch(emSet.size()); } try { emsToShutDown.await(shutdownWaitTime, shutdownWaitTimeUnit); } catch (InterruptedException e) { } return sh...
boolean function() { synchronized (this) { shutdown.set(true); emsToShutDown = new CountDownLatch(emSet.size()); } try { emsToShutDown.await(shutdownWaitTime, shutdownWaitTimeUnit); } catch (InterruptedException e) { } return shutdownRemaining(); }
/** * Closes all EntityManagers that were opened by this Supplier. * It will first wait for the EMs to be closed by the running threads. * If this times out it will shutdown the remaining EMs itself. * @return true if clean close, false if timeout occured */
Closes all EntityManagers that were opened by this Supplier. It will first wait for the EMs to be closed by the running threads. If this times out it will shutdown the remaining EMs itself
close
{ "repo_name": "ggerla/aries", "path": "jpa/jpa-support/src/main/java/org/apache/aries/jpa/support/impl/EMSupplierImpl.java", "license": "apache-2.0", "size": 5784 }
[ "java.util.concurrent.CountDownLatch" ]
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
214,422
protected Date getSQLDate(java.util.Date date) { if (date != null) { Date d = new Date(date.getTime()); return d; } return null; }
Date function(java.util.Date date) { if (date != null) { Date d = new Date(date.getTime()); return d; } return null; }
/** * This method converts the photo date attribute into a java.sql.Date object * * @param photo The photo to have the date converted * * @return a new java.sql.Date object, or null if the photo date is null */
This method converts the photo date attribute into a java.sql.Date object
getSQLDate
{ "repo_name": "BackupTheBerlios/arara-svn", "path": "core/tags/arara-1.0/src/main/java/net/indrix/arara/dao/AbstractDAO.java", "license": "gpl-2.0", "size": 18102 }
[ "java.sql.Date" ]
import java.sql.Date;
import java.sql.*;
[ "java.sql" ]
java.sql;
92,193
public IN getLastNode() throws DatabaseException { return search (null, SearchType.RIGHT, -1, null, true ); }
IN function() throws DatabaseException { return search (null, SearchType.RIGHT, -1, null, true ); }
/** * Find the rightmost node (IN or BIN) in the tree. Do not descend into a * duplicate tree if the rightmost entry of the last BIN refers to one. * * @return the rightmost node in the tree, null if the tree is empty. The * returned node is latched and the caller must release it. ...
Find the rightmost node (IN or BIN) in the tree. Do not descend into a duplicate tree if the rightmost entry of the last BIN refers to one
getLastNode
{ "repo_name": "ckaestne/CIDE", "path": "CIDE_Samples/cide_samples/Berkeley DB JE/src/com/sleepycat/je/tree/Tree.java", "license": "gpl-3.0", "size": 131570 }
[ "com.sleepycat.je.DatabaseException" ]
import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
2,649,217
@Override protected void verify(FullHttpResponse response) { final HttpResponseStatus status = HttpResponseStatus.SWITCHING_PROTOCOLS; final HttpHeaders headers = response.headers(); if (!response.status().equals(status)) { throw new WebSocketHandshakeException("Invalid hand...
void function(FullHttpResponse response) { final HttpResponseStatus status = HttpResponseStatus.SWITCHING_PROTOCOLS; final HttpHeaders headers = response.headers(); if (!response.status().equals(status)) { throw new WebSocketHandshakeException(STR + response.status()); } CharSequence upgrade = headers.get(HttpHeaderNam...
/** * <p> * Process server response: * </p> * * <pre> * HTTP/1.1 101 Switching Protocols * Upgrade: websocket * Connection: Upgrade * Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= * Sec-WebSocket-Protocol: chat * </pre> * * @param response * ...
Process server response: <code> HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= Sec-WebSocket-Protocol: chat </code>
verify
{ "repo_name": "SinaTadayon/netty", "path": "codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker08.java", "license": "apache-2.0", "size": 9520 }
[ "io.netty.handler.codec.http.FullHttpResponse", "io.netty.handler.codec.http.HttpHeaderNames", "io.netty.handler.codec.http.HttpHeaderValues", "io.netty.handler.codec.http.HttpHeaders", "io.netty.handler.codec.http.HttpResponseStatus" ]
import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpHeaderValues; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpResponseStatus;
import io.netty.handler.codec.http.*;
[ "io.netty.handler" ]
io.netty.handler;
737,486
// @Test public void testGetDocument() { System.out.println("GetDocument"); String name = "test_multi_pages.docx"; String storage = ""; String folder = ""; try { ResponseMessage result = wordsApi.GetDocument(name, storage, folder); } catch (ApiException apiException) { System.out.println("exp:" + ...
System.out.println(STR); String name = STR; String storage = STRSTRexp:" + apiException.getMessage()); assertNull(apiException); } }
/** * Test of GetDocument method, of class WordsApi. */
Test of GetDocument method, of class WordsApi
testGetDocument
{ "repo_name": "aspose-words/Aspose.Words-for-Cloud", "path": "SDKs/Aspose.Words-Cloud-SDK-for-Java/src/test/java/com/aspose/words/api/WordsApiTest.java", "license": "mit", "size": 41541 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,127,106
public void start(final long flushInterval) { // flush the telemetry at regualar interval this.timer = new Timer(true); this.timer.scheduleAtFixedRate(new TelemetryTask(this), flushInterval, flushInterval); }
void function(final long flushInterval) { this.timer = new Timer(true); this.timer.scheduleAtFixedRate(new TelemetryTask(this), flushInterval, flushInterval); }
/** * Startsthe flush timer for the telemetry. * * @param flushInterval * Telemetry flush interval, in milliseconds. */
Startsthe flush timer for the telemetry
start
{ "repo_name": "DataDog/java-dogstatsd-client", "path": "src/main/java/com/timgroup/statsd/Telemetry.java", "license": "mit", "size": 12345 }
[ "java.util.Timer" ]
import java.util.Timer;
import java.util.*;
[ "java.util" ]
java.util;
1,953,780
public Object receiveFTMessage(FTMessage ev) throws IOException;
Object function(FTMessage ev) throws IOException;
/** * For sending a non functional message to the FTManager linked to this object. * @param ev the message to send * @return depends on the message meaning * @exception java.io.IOException if a problem occurs during this method call */
For sending a non functional message to the FTManager linked to this object
receiveFTMessage
{ "repo_name": "acontes/programming", "path": "src/Core/org/objectweb/proactive/core/body/UniversalBody.java", "license": "agpl-3.0", "size": 7566 }
[ "java.io.IOException", "org.objectweb.proactive.core.body.ft.internalmsg.FTMessage" ]
import java.io.IOException; import org.objectweb.proactive.core.body.ft.internalmsg.FTMessage;
import java.io.*; import org.objectweb.proactive.core.body.ft.internalmsg.*;
[ "java.io", "org.objectweb.proactive" ]
java.io; org.objectweb.proactive;
252,704
@Test public void testFilteringOnFindWithLowVersion() throws RepositoryBackendException { ProductDefinition productDefinition = new SimpleProductDefinition("com.ibm.ws.wlp", "8.0.0.0", "Archive", "ILAN", "DEVELOPERS"); Collection<? extends RepositoryResource> result = new RepositoryConnectionLi...
void function() throws RepositoryBackendException { ProductDefinition productDefinition = new SimpleProductDefinition(STR, STR, STR, "ILAN", STR); Collection<? extends RepositoryResource> result = new RepositoryConnectionList(userRepoConnection).findResources(STR, Collections.singleton(productDefinition), null, null); ...
/** * Tests that if you filter on search for version lower than most of the resources in the repo you get back the expected result * * @throws RepositoryBackendException */
Tests that if you filter on search for version lower than most of the resources in the repo you get back the expected result
testFilteringOnFindWithLowVersion
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.repository_fat_shared/src/com/ibm/ws/repository/test/ResourceFilteringTest.java", "license": "epl-1.0", "size": 56882 }
[ "com.ibm.ws.repository.connections.ProductDefinition", "com.ibm.ws.repository.connections.RepositoryConnectionList", "com.ibm.ws.repository.connections.SimpleProductDefinition", "com.ibm.ws.repository.exceptions.RepositoryBackendException", "com.ibm.ws.repository.resources.RepositoryResource", "java.util....
import com.ibm.ws.repository.connections.ProductDefinition; import com.ibm.ws.repository.connections.RepositoryConnectionList; import com.ibm.ws.repository.connections.SimpleProductDefinition; import com.ibm.ws.repository.exceptions.RepositoryBackendException; import com.ibm.ws.repository.resources.RepositoryResource; ...
import com.ibm.ws.repository.connections.*; import com.ibm.ws.repository.exceptions.*; import com.ibm.ws.repository.resources.*; import java.util.*;
[ "com.ibm.ws", "java.util" ]
com.ibm.ws; java.util;
1,435,116
@Override public void create() { prefs = createPreferences(); bootGame(); spriteBatch = createSpriteBatch(); assetManager = createAssetManager(); muteManager = createMuteManager(); BureauScreen tmp = createStartUpScreen(); tmp.prepareAssets(true); tmp.readyScreen(); setScree...
void function() { prefs = createPreferences(); bootGame(); spriteBatch = createSpriteBatch(); assetManager = createAssetManager(); muteManager = createMuteManager(); BureauScreen tmp = createStartUpScreen(); tmp.prepareAssets(true); tmp.readyScreen(); setScreen(tmp); Texture.setAssetManager(assetManager); }
/** * The game is booted in this order:<p> * <code>createPreferences()</code> * <code>bootGame()</code> * <code>create*Manager()</code> * <code>createFirstScreen()</code> * <p> * Afterwards the first screen is directly shown. */
The game is booted in this order: <code>createPreferences()</code> <code>bootGame()</code> <code>create*Manager()</code> <code>createFirstScreen()</code> Afterwards the first screen is directly shown
create
{ "repo_name": "onyxbits/pocketbandit", "path": "src/de/onyxbits/bureauengine/BureauGame.java", "license": "apache-2.0", "size": 4368 }
[ "com.badlogic.gdx.graphics.Texture", "de.onyxbits.bureauengine.screen.BureauScreen" ]
import com.badlogic.gdx.graphics.Texture; import de.onyxbits.bureauengine.screen.BureauScreen;
import com.badlogic.gdx.graphics.*; import de.onyxbits.bureauengine.screen.*;
[ "com.badlogic.gdx", "de.onyxbits.bureauengine" ]
com.badlogic.gdx; de.onyxbits.bureauengine;
1,666,715
public void putAll(ObjectIntHashMap m) { int numKeysToBeAdded = m.size(); if (numKeysToBeAdded == 0) return; if (numKeysToBeAdded > threshold) { int targetCapacity = (int)(numKeysToBeAdded / loadFactor + 1); if (targetCapacity > MAXIMUM_CAPACITY)...
void function(ObjectIntHashMap m) { int numKeysToBeAdded = m.size(); if (numKeysToBeAdded == 0) return; if (numKeysToBeAdded > threshold) { int targetCapacity = (int)(numKeysToBeAdded / loadFactor + 1); if (targetCapacity > MAXIMUM_CAPACITY) targetCapacity = MAXIMUM_CAPACITY; int newCapacity = table.length; while (newC...
/** * Copies all of the mappings from the specified map to this map. * These mappings will replace any mappings that this map had for * any of the keys currently in the specified map. * * @param m mappings to be stored in this map * @throws NullPointerException if the specified map is null...
Copies all of the mappings from the specified map to this map. These mappings will replace any mappings that this map had for any of the keys currently in the specified map
putAll
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/ObjectIntHashMap.java", "license": "apache-2.0", "size": 39476 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,583,850
public byte[] getEncoded() throws IOException { return resp.getEncoded(); }
byte[] function() throws IOException { return resp.getEncoded(); }
/** * return the ASN.1 encoded representation of this object. */
return the ASN.1 encoded representation of this object
getEncoded
{ "repo_name": "savichris/spongycastle", "path": "pkix/src/main/java/org/spongycastle/cert/ocsp/BasicOCSPResp.java", "license": "mit", "size": 5582 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,379,958
@Test public void testDescriptiveStatistics() throws Exception { DescriptiveStatistics u = new DescriptiveStatistics(); loadStats("data/PiDigits.txt", u); Assert.assertEquals("PiDigits: std", std, u.getStandardDeviation(), 1E-14); Assert.assertEquals("PiDigits: mean", mean, u.g...
void function() throws Exception { DescriptiveStatistics u = new DescriptiveStatistics(); loadStats(STR, u); Assert.assertEquals(STR, std, u.getStandardDeviation(), 1E-14); Assert.assertEquals(STR, mean, u.getMean(), 1E-14); loadStats(STR, u); Assert.assertEquals(STR, std, u.getStandardDeviation(), 1E-14); Assert.asser...
/** * Test DescriptiveStatistics - implementations that store full array of * values and execute multi-pass algorithms */
Test DescriptiveStatistics - implementations that store full array of values and execute multi-pass algorithms
testDescriptiveStatistics
{ "repo_name": "venkateshamurthy/java-quantiles", "path": "src/test/java/org/apache/commons/math3/stat/CertifiedDataTest.java", "license": "apache-2.0", "size": 5531 }
[ "org.apache.commons.math3.stat.descriptive.DescriptiveStatistics", "org.junit.Assert" ]
import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; import org.junit.Assert;
import org.apache.commons.math3.stat.descriptive.*; import org.junit.*;
[ "org.apache.commons", "org.junit" ]
org.apache.commons; org.junit;
2,305,786
Objects.requireNonNull(freemarkerContent, "freemarker content must not be null"); Configuration c = new Configuration(); c.setStrictSyntaxMode(true); c.setTagSyntax(Configuration.AUTO_DETECT_TAG_SYNTAX); String templateName = "validation"; StringTemplateLoader stringLoader = new StringTemplateLoader(); str...
Objects.requireNonNull(freemarkerContent, STR); Configuration c = new Configuration(); c.setStrictSyntaxMode(true); c.setTagSyntax(Configuration.AUTO_DETECT_TAG_SYNTAX); String templateName = STR; StringTemplateLoader stringLoader = new StringTemplateLoader(); stringLoader.putTemplate(templateName, freemarkerContent); ...
/** * Validates if the given freemarker context is syntactically correct. * * @param freemarkerContent * @throws AMWException * if the template can not be successfully validate. The error message distincts between * parsing exceptions and other (unexpected) potential issues. */
Validates if the given freemarker context is syntactically correct
validateFreemarkerSyntax
{ "repo_name": "a-gogo/agogo", "path": "AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/template/control/FreemarkerSyntaxValidator.java", "license": "agpl-3.0", "size": 2545 }
[ "ch.puzzle.itc.mobiliar.common.exception.AMWException", "freemarker.cache.StringTemplateLoader", "freemarker.core.ParseException", "freemarker.template.Configuration", "java.io.IOException", "java.util.Objects" ]
import ch.puzzle.itc.mobiliar.common.exception.AMWException; import freemarker.cache.StringTemplateLoader; import freemarker.core.ParseException; import freemarker.template.Configuration; import java.io.IOException; import java.util.Objects;
import ch.puzzle.itc.mobiliar.common.exception.*; import freemarker.cache.*; import freemarker.core.*; import freemarker.template.*; import java.io.*; import java.util.*;
[ "ch.puzzle.itc", "freemarker.cache", "freemarker.core", "freemarker.template", "java.io", "java.util" ]
ch.puzzle.itc; freemarker.cache; freemarker.core; freemarker.template; java.io; java.util;
1,306,386
public void createGroup(String path) throws IOException; public void close() throws IOException;
void createGroup(String path) throws IOException; public void function() throws IOException;
/** * Closes and resets the service. * * @throws IOException If there is an error closing the file. */
Closes and resets the service
close
{ "repo_name": "bramalingam/bioformats", "path": "components/formats-gpl/src/loci/formats/services/JHDFService.java", "license": "gpl-2.0", "size": 7084 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,839,271
private static <E> void verifyLinkedHashSetContents( LinkedHashSet<E> set, Collection<E> contents) { assertEquals("LinkedHashSet should have preserved order for iteration", new ArrayList<E>(set), new ArrayList<E>(contents)); verifySetContents(set, contents); }
static <E> void function( LinkedHashSet<E> set, Collection<E> contents) { assertEquals(STR, new ArrayList<E>(set), new ArrayList<E>(contents)); verifySetContents(set, contents); }
/** * Utility method to verify that the given LinkedHashSet is equal to and * hashes identically to a set constructed with the elements in the given * collection. Also verifies that the ordering in the set is the same * as the ordering of the given contents. */
Utility method to verify that the given LinkedHashSet is equal to and hashes identically to a set constructed with the elements in the given collection. Also verifies that the ordering in the set is the same as the ordering of the given contents
verifyLinkedHashSetContents
{ "repo_name": "g0alshhhit/guavaHelper", "path": "guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/SetsTest.java", "license": "apache-2.0", "size": 27045 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.LinkedHashSet" ]
import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashSet;
import java.util.*;
[ "java.util" ]
java.util;
1,221,971
void handleException(HttpException ex);
void handleException(HttpException ex);
/** * Reports a protocol exception thrown while processing the request. */
Reports a protocol exception thrown while processing the request
handleException
{ "repo_name": "viapp/httpasyncclient-android", "path": "src/main/java/org/apache/http/nio/protocol/NHttpResponseTrigger.java", "license": "apache-2.0", "size": 2545 }
[ "org.apache.http.HttpException" ]
import org.apache.http.HttpException;
import org.apache.http.*;
[ "org.apache.http" ]
org.apache.http;
1,333,663
@Generated @Selector("setPairingDelegate:queue:") public native void setPairingDelegateQueue(@Mapped(ObjCObjectMapper.class) CHIPDevicePairingDelegate delegate, NSObject queue);
@Selector(STR) native void function(@Mapped(ObjCObjectMapper.class) CHIPDevicePairingDelegate delegate, NSObject queue);
/** * Set the Delegate for the Device Pairing as well as the Queue on which the Delegate callbacks will be triggered * * @param[in] delegate The delegate the pairing process should use * @param[in] queue The queue on which the callbacks will be delivered */
Set the Delegate for the Device Pairing as well as the Queue on which the Delegate callbacks will be triggered
setPairingDelegateQueue
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/chip/CHIPDeviceController.java", "license": "apache-2.0", "size": 9204 }
[ "org.moe.natj.general.ann.Mapped", "org.moe.natj.objc.ann.Selector", "org.moe.natj.objc.map.ObjCObjectMapper" ]
import org.moe.natj.general.ann.Mapped; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; import org.moe.natj.objc.map.*;
[ "org.moe.natj" ]
org.moe.natj;
567,095
public void setSelectionId(int value) { this.selectionId = value; } /** * Gets the value of the plannedTo property. * * @return * possible object is * {@link XMLGregorianCalendar }
void function(int value) { this.selectionId = value; } /** * Gets the value of the plannedTo property. * * * possible object is * {@link XMLGregorianCalendar }
/** * Sets the value of the selectionId property. * */
Sets the value of the selectionId property
setSelectionId
{ "repo_name": "contactlab/soap-api-java-client-next", "path": "src/main/java/com/contactlab/api/ws/StartSelection.java", "license": "apache-2.0", "size": 3270 }
[ "javax.xml.datatype.XMLGregorianCalendar" ]
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.datatype.*;
[ "javax.xml" ]
javax.xml;
1,783,846
@Setup(Level.Invocation) public void init() throws IOException { file = File.createTempFile("log", ".txt"); file.deleteOnExit(); }
@Setup(Level.Invocation) void function() throws IOException { file = File.createTempFile("log", ".txt"); file.deleteOnExit(); }
/** * Creates a new empty temporary file. * * @throws IOException * Failed to create new temporary file */
Creates a new empty temporary file
init
{ "repo_name": "pmwmedia/tinylog", "path": "benchmarks/src/main/java/org/tinylog/benchmarks/api/WritingBenchmark.java", "license": "apache-2.0", "size": 9128 }
[ "java.io.File", "java.io.IOException", "org.openjdk.jmh.annotations.Level", "org.openjdk.jmh.annotations.Setup" ]
import java.io.File; import java.io.IOException; import org.openjdk.jmh.annotations.Level; import org.openjdk.jmh.annotations.Setup;
import java.io.*; import org.openjdk.jmh.annotations.*;
[ "java.io", "org.openjdk.jmh" ]
java.io; org.openjdk.jmh;
2,811,617
Optional<Boolean> isHideModal();
Optional<Boolean> isHideModal();
/** * If true, the modal picker date will be hide. */
If true, the modal picker date will be hide
isHideModal
{ "repo_name": "opensingular/singular-core", "path": "lib/wicket-utils/src/main/java/org/opensingular/lib/wicket/util/behavior/DatePickerSettings.java", "license": "apache-2.0", "size": 2099 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
410,559
public boolean isAttached(); /** * Get the {@link com.oneplusar.android.world.OnePlusARObject OnePlusARObject}
boolean function(); /** * Get the {@link com.oneplusar.android.world.OnePlusARObject OnePlusARObject}
/** * Check if the plugin is attached. * * @return */
Check if the plugin is attached
isAttached
{ "repo_name": "BeAlive75/OnePlusAR", "path": "android/OnePlusAR_Framework/src/com/oneplusar/android/plugin/OnePlusARObjectPlugin.java", "license": "apache-2.0", "size": 3521 }
[ "com.oneplusar.android.world.OnePlusARObject" ]
import com.oneplusar.android.world.OnePlusARObject;
import com.oneplusar.android.world.*;
[ "com.oneplusar.android" ]
com.oneplusar.android;
289,079
protected Map<String, String[]> getDeprecatedProps() { Map<String, String[]> result = new HashMap<>(); for (String key : deprecatedKeyMap.keySet()) { result.put(key, deprecatedKeyMap.get(key).newKeys); } return result; }
Map<String, String[]> function() { Map<String, String[]> result = new HashMap<>(); for (String key : deprecatedKeyMap.keySet()) { result.put(key, deprecatedKeyMap.get(key).newKeys); } return result; }
/** * Method to get deprecated properties. * * @return {@code Map} of deprecated properties with new properties in array, * or empty {@code Map} if no deprecated properties */
Method to get deprecated properties
getDeprecatedProps
{ "repo_name": "caskdata/cdap", "path": "cdap-common/src/main/java/co/cask/cdap/common/conf/Configuration.java", "license": "apache-2.0", "size": 67579 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,537,128
@Override public Completable connect(ProductSubscription... args) { if (args == null || args.length == 0) { throw new IllegalArgumentException("Subscriptions must be made at connection time"); } if (streamingService != null) { throw new UnsupportedOperationException( "Exchange only...
Completable function(ProductSubscription... args) { if (args == null args.length == 0) { throw new IllegalArgumentException(STR); } if (streamingService != null) { throw new UnsupportedOperationException( STR); } ProductSubscription subscriptions = args[0]; streamingService = createStreamingService(subscriptions); List...
/** * Binance streaming API expects connections to multiple channels to be defined at connection * time. To define the channels for this connection pass a `ProductSubscription` in at connection * time. * * @param args A single `ProductSubscription` to define the subscriptions required to be available ...
Binance streaming API expects connections to multiple channels to be defined at connection time. To define the channels for this connection pass a `ProductSubscription` in at connection time
connect
{ "repo_name": "douggie/XChange", "path": "xchange-stream-binance/src/main/java/info/bitrich/xchangestream/binance/BinanceStreamingExchange.java", "license": "mit", "size": 9523 }
[ "info.bitrich.xchangestream.binance.BinanceUserDataChannel", "info.bitrich.xchangestream.core.ProductSubscription", "io.reactivex.Completable", "java.util.ArrayList", "java.util.List", "org.knowm.xchange.binance.BinanceAuthenticated", "org.knowm.xchange.binance.service.BinanceMarketDataService", "org....
import info.bitrich.xchangestream.binance.BinanceUserDataChannel; import info.bitrich.xchangestream.core.ProductSubscription; import io.reactivex.Completable; import java.util.ArrayList; import java.util.List; import org.knowm.xchange.binance.BinanceAuthenticated; import org.knowm.xchange.binance.service.BinanceMarketD...
import info.bitrich.xchangestream.binance.*; import info.bitrich.xchangestream.core.*; import io.reactivex.*; import java.util.*; import org.knowm.xchange.binance.*; import org.knowm.xchange.binance.service.*; import org.knowm.xchange.client.*;
[ "info.bitrich.xchangestream", "io.reactivex", "java.util", "org.knowm.xchange" ]
info.bitrich.xchangestream; io.reactivex; java.util; org.knowm.xchange;
770,382
public static void main(String[] args) { String embFile = null; String embResource = null; String className = null; String fontName = null; Map options = new java.util.HashMap(); String[] arguments = parseArguments(options, args); determineLogLevel(options);...
static void function(String[] args) { String embFile = null; String embResource = null; String className = null; String fontName = null; Map options = new java.util.HashMap(); String[] arguments = parseArguments(options, args); determineLogLevel(options); PFMReader app = new PFMReader(); log.info(STR + Version.getVersi...
/** * The main method for the PFM reader tool. * * @param args Command-line arguments: [options] metricfile.pfm xmlfile.xml * where options can be: * -fn <fontname> * default is to use the fontname in the .pfm file, but you can override * that name to make sure that the embedded font...
The main method for the PFM reader tool
main
{ "repo_name": "argv-minus-one/fop", "path": "fop-core/src/main/java/org/apache/fop/fonts/apps/PFMReader.java", "license": "apache-2.0", "size": 11541 }
[ "java.util.Map", "org.apache.fop.Version", "org.apache.fop.fonts.type1.PFMFile", "org.w3c.dom.Document" ]
import java.util.Map; import org.apache.fop.Version; import org.apache.fop.fonts.type1.PFMFile; import org.w3c.dom.Document;
import java.util.*; import org.apache.fop.*; import org.apache.fop.fonts.type1.*; import org.w3c.dom.*;
[ "java.util", "org.apache.fop", "org.w3c.dom" ]
java.util; org.apache.fop; org.w3c.dom;
485,636
public List<Long> streamBatchedUpdateQuery(String schemaName, String qry, List<Object[]> params, SqlClientContext cliCtx) throws IgniteCheckedException;
List<Long> function(String schemaName, String qry, List<Object[]> params, SqlClientContext cliCtx) throws IgniteCheckedException;
/** * Execute a batched INSERT statement using data streamer as receiver. * * @param schemaName Schema name. * @param qry Query. * @param params Query parameters. * @param cliCtx Client connection context. * @return Update counters. * @throws IgniteCheckedException If failed. ...
Execute a batched INSERT statement using data streamer as receiver
streamBatchedUpdateQuery
{ "repo_name": "shroman/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java", "license": "apache-2.0", "size": 15927 }
[ "java.util.List", "org.apache.ignite.IgniteCheckedException" ]
import java.util.List; import org.apache.ignite.IgniteCheckedException;
import java.util.*; import org.apache.ignite.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
848,873
public Observable<ServiceResponse<ExpressRouteCircuitsArpTableListResultInner>> beginListArpTableWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resource...
Observable<ServiceResponse<ExpressRouteCircuitsArpTableListResultInner>> function(String resourceGroupName, String circuitName, String peeringName, String devicePath) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (circuitName == null) { throw new IllegalArgumentException(STR); } if (p...
/** * Gets the currently advertised ARP table associated with the express route circuit in a resource group. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. * @param devic...
Gets the currently advertised ARP table associated with the express route circuit in a resource group
beginListArpTableWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/implementation/ExpressRouteCircuitsInner.java", "license": "mit", "size": 125492 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
257,995
@SuppressWarnings("unchecked") @Override public void map(KEYIN key, VALUEIN value, Context context) throws IOException, InterruptedException { if(key instanceof org.apache.hadoop.io.BytesWritable){ randomizeBytes(((org.apache.hadoop.io.BytesWritable)key).getBytes(),0,((org.apac...
@SuppressWarnings(STR) void function(KEYIN key, VALUEIN value, Context context) throws IOException, InterruptedException { if(key instanceof org.apache.hadoop.io.BytesWritable){ randomizeBytes(((org.apache.hadoop.io.BytesWritable)key).getBytes(),0,((org.apache.hadoop.io.BytesWritable)key).getLength()); computeSum(((org...
/** * Called once for each key/value pair in the input split. Most applications * should override this, but the default is the identity function. */
Called once for each key/value pair in the input split. Most applications should override this, but the default is the identity function
map
{ "repo_name": "simbadzina/hadoop-fcfs", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/FlorinMapper.java", "license": "apache-2.0", "size": 8108 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
284,456
MessageEdit mergeMessage(Element el) throws PermissionException, IdUsedException;
MessageEdit mergeMessage(Element el) throws PermissionException, IdUsedException;
/** * Merge in a new message as defined in the xml. Must commitEdit() to make official, or cancelEdit() when done! * * @param el * The message information in XML in a DOM element. * @return The newly added message, locked for update. * @exception PermissionException * If the user does n...
Merge in a new message as defined in the xml. Must commitEdit() to make official, or cancelEdit() when done
mergeMessage
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "message/message-api/api/src/java/org/sakaiproject/message/api/MessageChannel.java", "license": "apache-2.0", "size": 13131 }
[ "org.sakaiproject.exception.IdUsedException", "org.sakaiproject.exception.PermissionException", "org.w3c.dom.Element" ]
import org.sakaiproject.exception.IdUsedException; import org.sakaiproject.exception.PermissionException; import org.w3c.dom.Element;
import org.sakaiproject.exception.*; import org.w3c.dom.*;
[ "org.sakaiproject.exception", "org.w3c.dom" ]
org.sakaiproject.exception; org.w3c.dom;
1,295,107
@Test public void testSimpleUse() { ContentStore store = getStore(); String content = "Content for testSimpleUse"; ContentWriter writer = store.getWriter(ContentStore.NEW_CONTENT_CONTEXT); assertNotNull("Writer may not be null", writer); // Ensure tha...
void function() { ContentStore store = getStore(); String content = STR; ContentWriter writer = store.getWriter(ContentStore.NEW_CONTENT_CONTEXT); assertNotNull(STR, writer); String contentUrlBefore = writer.getContentUrl(); assertNotNull(STR, contentUrlBefore); assertTrue(STR + contentUrlBefore, AbstractContentStore.i...
/** * Get a writer and write a little bit of content before reading it. */
Get a writer and write a little bit of content before reading it
testSimpleUse
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/test-java/org/alfresco/repo/content/AbstractWritableContentStoreTest.java", "license": "lgpl-3.0", "size": 30606 }
[ "org.alfresco.service.cmr.repository.ContentReader", "org.alfresco.service.cmr.repository.ContentWriter", "org.junit.Assert" ]
import org.alfresco.service.cmr.repository.ContentReader; import org.alfresco.service.cmr.repository.ContentWriter; import org.junit.Assert;
import org.alfresco.service.cmr.repository.*; import org.junit.*;
[ "org.alfresco.service", "org.junit" ]
org.alfresco.service; org.junit;
855,698
@Override public void init() throws ServletException { // Put your code here sc = this.getServletContext(); userDao = new AADAO(); super.init(); }
void function() throws ServletException { sc = this.getServletContext(); userDao = new AADAO(); super.init(); }
/** * Initialization of the servlet. <br> * * @throws ServletException * if an error occurs */
Initialization of the servlet.
init
{ "repo_name": "swen2014/AllAvailable", "path": "AllAvailableServer/src/com/cmu/qiuoffer/Servlet/LogIn.java", "license": "apache-2.0", "size": 2707 }
[ "javax.servlet.ServletException" ]
import javax.servlet.ServletException;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
1,929,352
ByteArrayInputStream in = new ByteArrayInputStream("2".getBytes()); System.setIn(in); String actual = new ConsoleInput().ask("testQuestion"); assertThat(actual, is("2")); }
ByteArrayInputStream in = new ByteArrayInputStream("2".getBytes()); System.setIn(in); String actual = new ConsoleInput().ask(STR); assertThat(actual, is("2")); }
/** * Test ask() method. */
Test ask() method
whenSetTwoThenReturnTwoInAsk
{ "repo_name": "roman-sd/java-a-to-z", "path": "chapter_004/src/test/java/ru/sdroman/calculator/ConsoleInputTest.java", "license": "apache-2.0", "size": 612 }
[ "java.io.ByteArrayInputStream", "org.hamcrest.core.Is", "org.junit.Assert" ]
import java.io.ByteArrayInputStream; import org.hamcrest.core.Is; import org.junit.Assert;
import java.io.*; import org.hamcrest.core.*; import org.junit.*;
[ "java.io", "org.hamcrest.core", "org.junit" ]
java.io; org.hamcrest.core; org.junit;
124,336
private void chooseDestinationFile() { FileFilter fileFilter = null; if (m_ResultsDestinationCBox.getSelectedItem() == DEST_CSV_TEXT) { fileFilter = m_csvFileFilter; } else { fileFilter = m_arffFileFilter; } m_DestFileChooser.setFileFilter(fileFilter); int returnVal = m_DestFileCh...
void function() { FileFilter fileFilter = null; if (m_ResultsDestinationCBox.getSelectedItem() == DEST_CSV_TEXT) { fileFilter = m_csvFileFilter; } else { fileFilter = m_arffFileFilter; } m_DestFileChooser.setFileFilter(fileFilter); int returnVal = m_DestFileChooser.showSaveDialog(this); if (returnVal != JFileChooser.AP...
/** * Lets user browse for a destination file.. */
Lets user browse for a destination file.
chooseDestinationFile
{ "repo_name": "dsibournemouth/autoweka", "path": "weka-3.7.7/src/main/java/weka/gui/experiment/SimpleSetupPanel.java", "license": "gpl-3.0", "size": 43141 }
[ "javax.swing.JFileChooser", "javax.swing.filechooser.FileFilter" ]
import javax.swing.JFileChooser; import javax.swing.filechooser.FileFilter;
import javax.swing.*; import javax.swing.filechooser.*;
[ "javax.swing" ]
javax.swing;
980,355
protected void initDebugger() { if (reader == null || writer == null) { throw new NullPointerException( "Reader or writer isn't initialized."); } // If debugging is enabled, we open a window and write out all network // traffic. if (config.isDe...
void function() { if (reader == null writer == null) { throw new NullPointerException( STR); } if (config.isDebuggerEnabled()) { if (debugger == null) { String className = null; try { className = System.getProperty(STR); } catch (Throwable t) { } Class<?> debuggerClass = null; if (className != null) { try { debuggerCla...
/** * Initialize the {@link #debugger}. You can specify a customized * {@link SmackDebugger} by setup the system property * <code>smack.debuggerClass</code> to the implementation. * * @throws IllegalStateException * if the reader or writer isn't yet initialized. * @throws...
Initialize the <code>#debugger</code>. You can specify a customized <code>SmackDebugger</code> by setup the system property <code>smack.debuggerClass</code> to the implementation
initDebugger
{ "repo_name": "abmargb/jamppa", "path": "src/main/java/org/jivesoftware/smack/Connection.java", "license": "apache-2.0", "size": 37404 }
[ "java.io.Reader", "java.io.Writer", "java.lang.reflect.Constructor", "org.jivesoftware.smack.debugger.SmackDebugger" ]
import java.io.Reader; import java.io.Writer; import java.lang.reflect.Constructor; import org.jivesoftware.smack.debugger.SmackDebugger;
import java.io.*; import java.lang.reflect.*; import org.jivesoftware.smack.debugger.*;
[ "java.io", "java.lang", "org.jivesoftware.smack" ]
java.io; java.lang; org.jivesoftware.smack;
1,976,568
public void packAndPosition() { pack(); String[] coordsString = Settings.getString( locationSettingKey ).split( "," ); if ( coordsString.length != 2 ) coordsString = Settings.getDefaultString( locationSettingKey ).split( "," ); final int cx = Integer.parseInt( coordsString[ 0 ] ); final in...
void function() { pack(); String[] coordsString = Settings.getString( locationSettingKey ).split( "," ); if ( coordsString.length != 2 ) coordsString = Settings.getDefaultString( locationSettingKey ).split( "," ); final int cx = Integer.parseInt( coordsString[ 0 ] ); final int cy = Integer.parseInt( coordsString[ 1 ] )...
/** * Packs and positions the dialog to its saved location. */
Packs and positions the dialog to its saved location
packAndPosition
{ "repo_name": "icza/sc2gears", "path": "src/hu/belicza/andras/sc2gears/ui/ontopdialogs/BaseOnTopDialog.java", "license": "apache-2.0", "size": 8814 }
[ "hu.belicza.andras.sc2gears.settings.Settings" ]
import hu.belicza.andras.sc2gears.settings.Settings;
import hu.belicza.andras.sc2gears.settings.*;
[ "hu.belicza.andras" ]
hu.belicza.andras;
367,567
private static void validateTopLevel(List<ProcessorDefinition<?>> children) { for (ProcessorDefinition child : children) { // validate that top-level is only added on the route (eg top level) RouteDefinition route = ProcessorDefinitionHelper.getRoute(child); boolean paren...
static void function(List<ProcessorDefinition<?>> children) { for (ProcessorDefinition child : children) { RouteDefinition route = ProcessorDefinitionHelper.getRoute(child); boolean parentIsRoute = child.getParent() == route; if (child.isTopLevelOnly() && !parentIsRoute) { throw new IllegalArgumentException( STR + chil...
/** * Validates that top-level only definitions is not added in the wrong places, such as nested inside a splitter etc. */
Validates that top-level only definitions is not added in the wrong places, such as nested inside a splitter etc
validateTopLevel
{ "repo_name": "tadayosi/camel", "path": "core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java", "license": "apache-2.0", "size": 31912 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,979,448
public boolean waitForCompletion(boolean verbose ) throws IOException, InterruptedException, ClassNotFoundException { if (state == JobState.DEFINE) { submit(); } if (verbose) { jobClient.monitorAndPrintJob(conf, inf...
boolean function(boolean verbose ) throws IOException, InterruptedException, ClassNotFoundException { if (state == JobState.DEFINE) { submit(); } if (verbose) { jobClient.monitorAndPrintJob(conf, info); } else { info.waitForCompletion(); } return isSuccessful(); }
/** * Submit the job to the cluster and wait for it to finish. * @param verbose print the progress to the user * @return true if the job succeeded * @throws IOException thrown if the communication with the * <code>JobTracker</code> is lost */
Submit the job to the cluster and wait for it to finish
waitForCompletion
{ "repo_name": "leonhong/hadoop-20-warehouse", "path": "src/mapred/org/apache/hadoop/mapreduce/Job.java", "license": "apache-2.0", "size": 15416 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,221,965
public static Resource has_External_Reference() { return _namespace_CDAO("CDAO_0000164"); }
static Resource function() { return _namespace_CDAO(STR); }
/** * Associates a TU to some external taxonomy reference. * (http://purl.obolibrary.org/obo/CDAO_0000164) */
Associates a TU to some external taxonomy reference. (HREF)
has_External_Reference
{ "repo_name": "BioInterchange/BioInterchange", "path": "supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/CDAO.java", "license": "mit", "size": 85675 }
[ "com.hp.hpl.jena.rdf.model.Resource" ]
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.*;
[ "com.hp.hpl" ]
com.hp.hpl;
1,656,077
public void addNoCompressionUserAgent(String userAgent) { try { Pattern nRule = Pattern.compile(userAgent); noCompressionUserAgents = addREArray(noCompressionUserAgents, nRule); } catch (PatternSyntaxException pse) { log.error(sm.getString("http11p...
void function(String userAgent) { try { Pattern nRule = Pattern.compile(userAgent); noCompressionUserAgents = addREArray(noCompressionUserAgents, nRule); } catch (PatternSyntaxException pse) { log.error(sm.getString(STR, userAgent), pse); } }
/** * Add user-agent for which gzip compression didn't works * The user agent String given will be exactly matched * to the user-agent header submitted by the client. * * @param userAgent user-agent string */
Add user-agent for which gzip compression didn't works The user agent String given will be exactly matched to the user-agent header submitted by the client
addNoCompressionUserAgent
{ "repo_name": "plumer/codana", "path": "tomcat_files/6.0.0/Http11NioProcessor.java", "license": "mit", "size": 54880 }
[ "java.util.regex.Pattern", "java.util.regex.PatternSyntaxException" ]
import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,368,234
public void connectAndBind(String host, int port, BindType bindType, String systemId, String password, String systemType, TypeOfNumber addrTon, NumberingPlanIndicator addrNpi, String addressRange, long timeout) throws IOException { connectAndBind(host, port, new BindParameter...
void function(String host, int port, BindType bindType, String systemId, String password, String systemType, TypeOfNumber addrTon, NumberingPlanIndicator addrNpi, String addressRange, long timeout) throws IOException { connectAndBind(host, port, new BindParameter(bindType, systemId, password, systemType, addrTon, addrN...
/** * Open connection and bind immediately with specified timeout. The default * timeout is 1 minutes. * * @param host is the SMSC host address. * @param port is the SMSC listen port. * @param bindType is the bind type. * @param systemId is the system id. * @param password is th...
Open connection and bind immediately with specified timeout. The default timeout is 1 minutes
connectAndBind
{ "repo_name": "pmoerenhout/jsmpp-1", "path": "jsmpp/src/main/java/org/jsmpp/session/SMPPSession.java", "license": "apache-2.0", "size": 27649 }
[ "java.io.IOException", "org.jsmpp.bean.BindType", "org.jsmpp.bean.NumberingPlanIndicator", "org.jsmpp.bean.TypeOfNumber" ]
import java.io.IOException; import org.jsmpp.bean.BindType; import org.jsmpp.bean.NumberingPlanIndicator; import org.jsmpp.bean.TypeOfNumber;
import java.io.*; import org.jsmpp.bean.*;
[ "java.io", "org.jsmpp.bean" ]
java.io; org.jsmpp.bean;
1,618,804
EClass getControlAreaOperator();
EClass getControlAreaOperator();
/** * Returns the meta object for class '{@link gluemodel.CIM.IEC61970.Informative.Financial.ControlAreaOperator <em>Control Area Operator</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Control Area Operator</em>'. * @see gluemodel.CIM.IEC61970.Informative.F...
Returns the meta object for class '<code>gluemodel.CIM.IEC61970.Informative.Financial.ControlAreaOperator Control Area Operator</code>'.
getControlAreaOperator
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/Financial/FinancialPackage.java", "license": "mit", "size": 116407 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,777,176
Locations locate(String tableName, Collection<Range> ranges) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
Locations locate(String tableName, Collection<Range> ranges) throws AccumuloException, AccumuloSecurityException, TableNotFoundException;
/** * Locates the tablet servers and tablets that would service a collections of ranges. If a range * covers multiple tablets, it will occur multiple times in the returned map. * * @param ranges * The input ranges that should be mapped to tablet servers and tablets. * * @throws TableOfflin...
Locates the tablet servers and tablets that would service a collections of ranges. If a range covers multiple tablets, it will occur multiple times in the returned map
locate
{ "repo_name": "ivakegg/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java", "license": "apache-2.0", "size": 43874 }
[ "java.util.Collection", "org.apache.accumulo.core.client.AccumuloException", "org.apache.accumulo.core.client.AccumuloSecurityException", "org.apache.accumulo.core.client.TableNotFoundException", "org.apache.accumulo.core.data.Range" ]
import java.util.Collection; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.accumulo.core.data.Range;
import java.util.*; import org.apache.accumulo.core.client.*; import org.apache.accumulo.core.data.*;
[ "java.util", "org.apache.accumulo" ]
java.util; org.apache.accumulo;
1,752,747
JButton createButton(String text, int actionID, ActionListener l) { JButton b = UIUtilities.createHyperLinkButton(text); b.setActionCommand(""+actionID); b.addActionListener(l); return b; }
JButton createButton(String text, int actionID, ActionListener l) { JButton b = UIUtilities.createHyperLinkButton(text); b.setActionCommand(""+actionID); b.addActionListener(l); return b; }
/** * Creates a button. * * @param text The text of the button. * @param actionID The action command id. * @param l The action listener. * @return See above. */
Creates a button
createButton
{ "repo_name": "rleigh-dundee/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/ui/ActivityComponent.java", "license": "gpl-2.0", "size": 28001 }
[ "java.awt.event.ActionListener", "javax.swing.JButton", "org.openmicroscopy.shoola.util.ui.UIUtilities" ]
import java.awt.event.ActionListener; import javax.swing.JButton; import org.openmicroscopy.shoola.util.ui.UIUtilities;
import java.awt.event.*; import javax.swing.*; import org.openmicroscopy.shoola.util.ui.*;
[ "java.awt", "javax.swing", "org.openmicroscopy.shoola" ]
java.awt; javax.swing; org.openmicroscopy.shoola;
2,051,198
public AccountingDocument getAccountingDocumentForValidation() { return accountingDocumentForValidation; }
AccountingDocument function() { return accountingDocumentForValidation; }
/** * Gets the accountingDocumentForValidation attribute. * @return Returns the accountingDocumentForValidation. */
Gets the accountingDocumentForValidation attribute
getAccountingDocumentForValidation
{ "repo_name": "UniversityOfHawaii/kfs", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/validation/impl/DisbursementVoucherVendorInformationValidation.java", "license": "agpl-3.0", "size": 10843 }
[ "org.kuali.kfs.sys.document.AccountingDocument" ]
import org.kuali.kfs.sys.document.AccountingDocument;
import org.kuali.kfs.sys.document.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,418,965
public synchronized void setManualFramingRect(int width, int height) { if (initialized) { Point screenResolution = configManager.getScreenResolution(); if (width > screenResolution.x) { width = screenResolution.x; } if (height > screenResolution.y) { height = screenResolution.y; } int lef...
synchronized void function(int width, int height) { if (initialized) { Point screenResolution = configManager.getScreenResolution(); if (width > screenResolution.x) { width = screenResolution.x; } if (height > screenResolution.y) { height = screenResolution.y; } int leftOffset = (screenResolution.x - width) / 2; int to...
/** * Allows third party apps to specify the scanning rectangle dimensions, * rather than determine them automatically based on screen resolution. * * @param width * The width in pixels to scan. * @param height * The height in pixels to scan. */
Allows third party apps to specify the scanning rectangle dimensions, rather than determine them automatically based on screen resolution
setManualFramingRect
{ "repo_name": "Waynehfut/EasyConnect", "path": "app/src/main/java/com/waynehfut/zxing/camera/CameraManager.java", "license": "mit", "size": 11026 }
[ "android.graphics.Point", "android.graphics.Rect", "android.util.Log" ]
import android.graphics.Point; import android.graphics.Rect; import android.util.Log;
import android.graphics.*; import android.util.*;
[ "android.graphics", "android.util" ]
android.graphics; android.util;
1,875,706
public void setSubAccount(SubAccount subAccount) { this.subAccount = subAccount; }
void function(SubAccount subAccount) { this.subAccount = subAccount; }
/** * Sets the subAccount attribute value. * * @param subAccount The subAccount to set. * @deprecated */
Sets the subAccount attribute value
setSubAccount
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/bc/businessobject/BudgetConstructionControlList.java", "license": "agpl-3.0", "size": 12936 }
[ "org.kuali.kfs.coa.businessobject.SubAccount" ]
import org.kuali.kfs.coa.businessobject.SubAccount;
import org.kuali.kfs.coa.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,385,965
public static void main(final String[] args) { // instantiate speed examples final SpeedTestSocket speedTestSocket = new SpeedTestSocket(); //set timeout for download speedTestSocket.setSocketTimeout(SOCKET_TIMEOUT); speedTestSocket.setComputationMethod(ComputationMethod.M...
static void function(final String[] args) { final SpeedTestSocket speedTestSocket = new SpeedTestSocket(); speedTestSocket.setSocketTimeout(SOCKET_TIMEOUT); speedTestSocket.setComputationMethod(ComputationMethod.MEDIAN_INTERVAL); speedTestSocket.addSpeedTestListener(new ISpeedTestListener() {
/** * Download file example main. * * @param args no args required */
Download file example main
main
{ "repo_name": "bertrandmartel/speed-test-lib", "path": "examples/src/main/java/fr/bmartel/speedtest/examples/DownloadFileMedianIntervalExample.java", "license": "mit", "size": 3651 }
[ "fr.bmartel.speedtest.SpeedTestSocket", "fr.bmartel.speedtest.inter.ISpeedTestListener", "fr.bmartel.speedtest.model.ComputationMethod" ]
import fr.bmartel.speedtest.SpeedTestSocket; import fr.bmartel.speedtest.inter.ISpeedTestListener; import fr.bmartel.speedtest.model.ComputationMethod;
import fr.bmartel.speedtest.*; import fr.bmartel.speedtest.inter.*; import fr.bmartel.speedtest.model.*;
[ "fr.bmartel.speedtest" ]
fr.bmartel.speedtest;
492,821
static <T> Node<T> node(Collection<T> c) { return new CollectionNode<>(c); } /** * Produces a {@link Node.Builder}. * * @param exactSizeIfKnown -1 if a variable size builder is requested, * otherwise the exact capacity desired. A fixed capacity builder will * fail if the w...
static <T> Node<T> node(Collection<T> c) { return new CollectionNode<>(c); } /** * Produces a {@link Node.Builder}. * * @param exactSizeIfKnown -1 if a variable size builder is requested, * otherwise the exact capacity desired. A fixed capacity builder will * fail if the wrong number of elements are added to the builde...
/** * Produces a {@link Node} describing a {@link Collection}. * <p> * The node will hold a reference to the collection and will not make a copy. * * @param <T> the type of elements held by the node * @param c the collection * @return a node holding a collection */
Produces a <code>Node</code> describing a <code>Collection</code>. The node will hold a reference to the collection and will not make a copy
node
{ "repo_name": "streamsupport/streamsupport", "path": "src/main/java/java8/util/stream/Nodes.java", "license": "gpl-2.0", "size": 107608 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,075,880
public final V getAndUpdate(UnaryOperator<V> updateFunction) { V prev = get(), next = null; for (boolean haveNext = false;;) { if (!haveNext) next = updateFunction.apply(prev); if (weakCompareAndSetVolatile(prev, next)) return prev; ...
final V function(UnaryOperator<V> updateFunction) { V prev = get(), next = null; for (boolean haveNext = false;;) { if (!haveNext) next = updateFunction.apply(prev); if (weakCompareAndSetVolatile(prev, next)) return prev; haveNext = (prev == (prev = get())); } }
/** * Atomically updates the current value with the results of * applying the given function, returning the previous value. The * function should be side-effect-free, since it may be re-applied * when attempted updates fail due to contention among threads. * * @param updateFunction a side-...
Atomically updates the current value with the results of applying the given function, returning the previous value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads
getAndUpdate
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java", "license": "gpl-2.0", "size": 14128 }
[ "java.util.function.UnaryOperator" ]
import java.util.function.UnaryOperator;
import java.util.function.*;
[ "java.util" ]
java.util;
940,116
public final MetaProperty<ExternalId> indexFamilyId() { return _indexFamilyId; }
final MetaProperty<ExternalId> function() { return _indexFamilyId; }
/** * The meta-property for the {@code indexFamilyId} property. * @return the meta-property, not null */
The meta-property for the indexFamilyId property
indexFamilyId
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/security/index/Index.java", "license": "apache-2.0", "size": 8183 }
[ "com.opengamma.id.ExternalId", "org.joda.beans.MetaProperty" ]
import com.opengamma.id.ExternalId; import org.joda.beans.MetaProperty;
import com.opengamma.id.*; import org.joda.beans.*;
[ "com.opengamma.id", "org.joda.beans" ]
com.opengamma.id; org.joda.beans;
2,324,569
Set<ControllerNode> getNodes();
Set<ControllerNode> getNodes();
/** * Returns the set of current cluster members. * * @return set of cluster members */
Returns the set of current cluster members
getNodes
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "core/api/src/main/java/org/onosproject/cluster/ClusterService.java", "license": "apache-2.0", "size": 2331 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
933,741
EClass getSAPAssignment();
EClass getSAPAssignment();
/** * Returns the meta object for class '{@link gluemodel.COSEM.InterfaceClasses.SAPAssignment <em>SAP Assignment</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>SAP Assignment</em>'. * @see gluemodel.COSEM.InterfaceClasses.SAPAssignment * @generated */
Returns the meta object for class '<code>gluemodel.COSEM.InterfaceClasses.SAPAssignment SAP Assignment</code>'.
getSAPAssignment
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/COSEM/InterfaceClasses/InterfaceClassesPackage.java", "license": "mit", "size": 201104 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,804,403
void setSelectionFromWebKit(int start, int end) { if (start < 0 || end < 0) return; Spannable text = (Spannable) getText(); int length = text.length(); if (start > length || end > length) return; mFromWebKit = true; Selection.setSelection(text, start, end); m...
void setSelectionFromWebKit(int start, int end) { if (start < 0 end < 0) return; Spannable text = (Spannable) getText(); int length = text.length(); if (start > length end > length) return; mFromWebKit = true; Selection.setSelection(text, start, end); mFromWebKit = false; }
/** * Set the selection, and disable our onSelectionChanged action. */
Set the selection, and disable our onSelectionChanged action
setSelectionFromWebKit
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/webkit/WebTextView.java", "license": "gpl-3.0", "size": 38403 }
[ "android.text.Selection", "android.text.Spannable" ]
import android.text.Selection; import android.text.Spannable;
import android.text.*;
[ "android.text" ]
android.text;
1,140,669
public final static String process(final Reader reader, final Configuration configuration) throws IOException { final Processor p = new Processor(!(reader instanceof BufferedReader) ? new BufferedReader(reader) : reader, configuration); return p.process(); }
final static String function(final Reader reader, final Configuration configuration) throws IOException { final Processor p = new Processor(!(reader instanceof BufferedReader) ? new BufferedReader(reader) : reader, configuration); return p.process(); }
/** * Transforms an input stream into HTML using the given Configuration. * * @param reader * The Reader to process. * @param configuration * The Configuration. * @return The processed String. * @throws IOException * if an IO error occurs ...
Transforms an input stream into HTML using the given Configuration
process
{ "repo_name": "rjeschke/txtmark", "path": "src/main/java/com/github/rjeschke/txtmark/Processor.java", "license": "apache-2.0", "size": 33678 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.Reader" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
1,031,274
@RequestMapping(value = "/roles/list", method = RequestMethod.GET) public void getRoles(HttpServletRequest request, Model model) { Principal p = request.getUserPrincipal(); if (p instanceof UsernamePasswordAuthenticationToken) { UsernamePasswordAuthenticationToken u = (UsernamePasswo...
@RequestMapping(value = STR, method = RequestMethod.GET) void function(HttpServletRequest request, Model model) { Principal p = request.getUserPrincipal(); if (p instanceof UsernamePasswordAuthenticationToken) { UsernamePasswordAuthenticationToken u = (UsernamePasswordAuthenticationToken) p; if (u.getPrincipal() instan...
/** * Returns all roles of logged users. * * @param request Do nothing. * @return Return all roles of logged users. */
Returns all roles of logged users
getRoles
{ "repo_name": "abada-investigacion/contramed", "path": "trazability/trazability-rest/src/main/java/com/abada/trazability/rest/identity/IdentityController.java", "license": "gpl-3.0", "size": 3705 }
[ "com.abada.springframework.web.servlet.view.JsonView", "com.abada.trazability.entity.view.Views", "java.security.Principal", "javax.servlet.http.HttpServletRequest", "org.springframework.security.authentication.UsernamePasswordAuthenticationToken", "org.springframework.security.core.userdetails.UserDetail...
import com.abada.springframework.web.servlet.view.JsonView; import com.abada.trazability.entity.view.Views; import java.security.Principal; import javax.servlet.http.HttpServletRequest; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.userd...
import com.abada.springframework.web.servlet.view.*; import com.abada.trazability.entity.view.*; import java.security.*; import javax.servlet.http.*; import org.springframework.security.authentication.*; import org.springframework.security.core.userdetails.*; import org.springframework.ui.*; import org.springframework....
[ "com.abada.springframework", "com.abada.trazability", "java.security", "javax.servlet", "org.springframework.security", "org.springframework.ui", "org.springframework.web" ]
com.abada.springframework; com.abada.trazability; java.security; javax.servlet; org.springframework.security; org.springframework.ui; org.springframework.web;
615,396
private void openTreeToParentConcept(String actType) { try { HttpSession session = m_classReq.getSession(); String sCCodeDB = (String) m_classReq.getParameter("sCCodeDB"); String sCCode = (String) m_classReq.getParameter("sC...
void function(String actType) { try { HttpSession session = m_classReq.getSession(); String sCCodeDB = (String) m_classReq.getParameter(STR); String sCCode = (String) m_classReq.getParameter(STR); String sCCodeName = (String) m_classReq.getParameter(STR); String sNodeID = (String) m_classReq.getParameter(STR); String t...
/** * to open the tree to the selected concept from the parent level * @param actType String action type */
to open the tree to the selected concept from the parent level
openTreeToParentConcept
{ "repo_name": "NCIP/cadsr-cdecurate", "path": "src/gov/nih/nci/cadsr/cdecurate/tool/EVSSearch.java", "license": "bsd-3-clause", "size": 284529 }
[ "gov.nih.nci.cadsr.cdecurate.util.DataManager", "javax.servlet.http.HttpSession" ]
import gov.nih.nci.cadsr.cdecurate.util.DataManager; import javax.servlet.http.HttpSession;
import gov.nih.nci.cadsr.cdecurate.util.*; import javax.servlet.http.*;
[ "gov.nih.nci", "javax.servlet" ]
gov.nih.nci; javax.servlet;
2,581,397
public void doDeep_delete_assignment(RunData data) { if (!"POST".equals(data.getRequest().getMethod())) { return; } SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); // get the delete assignment ids List ids = (List) state.getAttribute(DELE...
void function(RunData data) { if (!"POST".equals(data.getRequest().getMethod())) { return; } SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); List ids = (List) state.getAttribute(DELETE_ASSIGNMENT_IDS); for (int i = 0; i < ids.size(); i++) { String currentId =...
/** * Action is to delete the assignment and also the related AssignmentSubmission */
Action is to delete the assignment and also the related AssignmentSubmission
doDeep_delete_assignment
{ "repo_name": "tl-its-umich-edu/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 671846 }
[ "java.util.ArrayList", "java.util.List", "org.sakaiproject.assignment.api.AssignmentEdit", "org.sakaiproject.assignment.cover.AssignmentService", "org.sakaiproject.assignment.taggable.api.AssignmentActivityProducer", "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "or...
import java.util.ArrayList; import java.util.List; import org.sakaiproject.assignment.api.AssignmentEdit; import org.sakaiproject.assignment.cover.AssignmentService; import org.sakaiproject.assignment.taggable.api.AssignmentActivityProducer; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.chef...
import java.util.*; import org.sakaiproject.assignment.api.*; import org.sakaiproject.assignment.cover.*; import org.sakaiproject.assignment.taggable.api.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.component.cover.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*; import org...
[ "java.util", "org.sakaiproject.assignment", "org.sakaiproject.cheftool", "org.sakaiproject.component", "org.sakaiproject.event", "org.sakaiproject.exception", "org.sakaiproject.taggable" ]
java.util; org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.component; org.sakaiproject.event; org.sakaiproject.exception; org.sakaiproject.taggable;
909,071
public boolean isItemValidForSlot(int par1, ItemStack par2ItemStack) { return par1 == 3 ? false : (par1 == 2 ? isItemFuel(par2ItemStack) : true); }
boolean function(int par1, ItemStack par2ItemStack) { return par1 == 3 ? false : (par1 == 2 ? isItemFuel(par2ItemStack) : true); }
/** * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. */
Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot
isItemValidForSlot
{ "repo_name": "NEMESIS13cz/Evercraft", "path": "java/evercraft/NEMESIS13cz/TileEntity/TileEntity/TileEntityAlloyFurnace.java", "license": "gpl-3.0", "size": 21587 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
2,871,803
public void SA207_235(Vector<FractionI> myFractions) { ZeroAllValues(); String radiogenicIsotopeDateName = RadDates.age207_235r.getName(); if (myFractions.size() > 0) { calculateSingleDateInterpretation(radiogenicIsotopeDateName, myFractions.get(0)); } }
void function(Vector<FractionI> myFractions) { ZeroAllValues(); String radiogenicIsotopeDateName = RadDates.age207_235r.getName(); if (myFractions.size() > 0) { calculateSingleDateInterpretation(radiogenicIsotopeDateName, myFractions.get(0)); } }
/** * zeroes all values and sets this <code>SampleDateModel</code>'s * <code>name</code>, <code>value</code>, <code>oneSigma</code>, and * <code>internalTwoSigmaUnctWithTracerCalibrationAndDecayConstantUnct</code> * to those of the first <code>Fraction</code> found in argument * <code>myFractio...
zeroes all values and sets this <code>SampleDateModel</code>'s <code>name</code>, <code>value</code>, <code>oneSigma</code>, and <code>internalTwoSigmaUnctWithTracerCalibrationAndDecayConstantUnct</code> to those of the first <code>Fraction</code> found in argument <code>myFractions</code>
SA207_235
{ "repo_name": "johnzeringue/ET_Redux", "path": "src/main/java/org/earthtime/UPb_Redux/valueModels/SampleDateModel.java", "license": "apache-2.0", "size": 130389 }
[ "java.util.Vector", "org.earthtime.UPb_Redux", "org.earthtime.dataDictionaries.RadDates" ]
import java.util.Vector; import org.earthtime.UPb_Redux; import org.earthtime.dataDictionaries.RadDates;
import java.util.*; import org.earthtime.*;
[ "java.util", "org.earthtime" ]
java.util; org.earthtime;
2,773,938
@Override public String addArchive(Path path) { GitCommitJar commit = null; try { commit = new GitCommitJar(path); return addArchive(commit); } catch (IOException e) { throw new RepositoryException(e); } finally { if (commit != null) commit.close(); } ...
String function(Path path) { GitCommitJar commit = null; try { commit = new GitCommitJar(path); return addArchive(commit); } catch (IOException e) { throw new RepositoryException(e); } finally { if (commit != null) commit.close(); } }
/** * Adds a path to the repository. If the path is a directory, * adds the contents recursively. */
Adds a path to the repository. If the path is a directory, adds the contents recursively
addArchive
{ "repo_name": "WelcomeHUME/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/env/repository/AbstractRepository.java", "license": "gpl-2.0", "size": 20914 }
[ "com.caucho.env.git.GitCommitJar", "com.caucho.vfs.Path", "java.io.IOException" ]
import com.caucho.env.git.GitCommitJar; import com.caucho.vfs.Path; import java.io.IOException;
import com.caucho.env.git.*; import com.caucho.vfs.*; import java.io.*;
[ "com.caucho.env", "com.caucho.vfs", "java.io" ]
com.caucho.env; com.caucho.vfs; java.io;
402,201
private CampPattern translateTemporalAllocation(SemNewObject ast) { List<SemValue> args = ast.getArguments(); if (DATE_TYPE.equals(ast.getType().getDisplayName())) { Iterator<SemValue> argIter = args.iterator(); ZonedDateTime translation = ZonedDateTime.ofInstant(Instant.EPOCH, ZoneId.systemDefault()) ...
CampPattern function(SemNewObject ast) { List<SemValue> args = ast.getArguments(); if (DATE_TYPE.equals(ast.getType().getDisplayName())) { Iterator<SemValue> argIter = args.iterator(); ZonedDateTime translation = ZonedDateTime.ofInstant(Instant.EPOCH, ZoneId.systemDefault()) .withYear(intFrom(argIter.next())).withMonth...
/** * Incomplete but evolving translation for object allocations involving temporal constructs * @param ast the object allocation (SemNewObject) * @return the translation */
Incomplete but evolving translation for object allocations involving temporal constructs
translateTemporalAllocation
{ "repo_name": "querycert/qcert", "path": "compiler/parsingJava/jrulesParser/src/org/qcert/camp/translator/SemRule2CAMP.java", "license": "apache-2.0", "size": 70950 }
[ "com.ibm.rules.engine.lang.semantics.SemNewObject", "com.ibm.rules.engine.lang.semantics.SemValue", "java.time.Instant", "java.time.LocalTime", "java.time.ZoneId", "java.time.ZoneOffset", "java.time.ZonedDateTime", "java.util.Iterator", "java.util.List", "org.qcert.camp.pattern.CampPattern", "or...
import com.ibm.rules.engine.lang.semantics.SemNewObject; import com.ibm.rules.engine.lang.semantics.SemValue; import java.time.Instant; import java.time.LocalTime; import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.Iterator; import java.util.List; import org.qcert.cam...
import com.ibm.rules.engine.lang.semantics.*; import java.time.*; import java.util.*; import org.qcert.camp.pattern.*;
[ "com.ibm.rules", "java.time", "java.util", "org.qcert.camp" ]
com.ibm.rules; java.time; java.util; org.qcert.camp;
1,273,897
public boolean canModifyUser( User other ) { if ( other == null ) { return false; } final Set<String> authorities = getAllAuthorities(); if ( authorities.contains( UserRole.AUTHORITY_ALL ) ) { return true; } return author...
boolean function( User other ) { if ( other == null ) { return false; } final Set<String> authorities = getAllAuthorities(); if ( authorities.contains( UserRole.AUTHORITY_ALL ) ) { return true; } return authorities.containsAll( other.getAllAuthorities() ); }
/** * Indicates whether this user can modify the given user. This user must * have the ALL authority or possess all user authorities of the other user * to do so. * * @param other the user to modify. */
Indicates whether this user can modify the given user. This user must have the ALL authority or possess all user authorities of the other user to do so
canModifyUser
{ "repo_name": "dhis2/dhis2-core", "path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java", "license": "bsd-3-clause", "size": 39570 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,473,845
public Collection<MessageCollector> getCollectors() { return mCollectors; }
Collection<MessageCollector> function() { return mCollectors; }
/** * Get the collection of all message collectors for this connection. * * @return a collection of message collectors for this connection */
Get the collection of all message collectors for this connection
getCollectors
{ "repo_name": "D-3/BS808", "path": "libjt808/src/main/java/com/deew/jt808/conn/Connection.java", "license": "gpl-2.0", "size": 17135 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,338,898
public void setStartDate (Timestamp StartDate);
void function (Timestamp StartDate);
/** Set Start Date. * First effective day (inclusive) */
Set Start Date. First effective day (inclusive)
setStartDate
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_C_Subscription.java", "license": "gpl-2.0", "size": 6648 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,062,165
public void testConstructor() { // try a null source CategoryToPieDataset p1 = new CategoryToPieDataset(null, TableOrder.BY_COLUMN, 0); assertNull(p1.getUnderlyingDataset()); assertEquals(p1.getItemCount(), 0); assertTrue(p1.getKeys().isEmpty()); asse...
void function() { CategoryToPieDataset p1 = new CategoryToPieDataset(null, TableOrder.BY_COLUMN, 0); assertNull(p1.getUnderlyingDataset()); assertEquals(p1.getItemCount(), 0); assertTrue(p1.getKeys().isEmpty()); assertNull(p1.getValue("R1")); }
/** * Some tests for the constructor. */
Some tests for the constructor
testConstructor
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/jfreechart-1.0.5/tests/org/jfree/data/category/junit/CategoryToPieDatasetTests.java", "license": "gpl-2.0", "size": 8518 }
[ "org.jfree.data.category.CategoryToPieDataset", "org.jfree.util.TableOrder" ]
import org.jfree.data.category.CategoryToPieDataset; import org.jfree.util.TableOrder;
import org.jfree.data.category.*; import org.jfree.util.*;
[ "org.jfree.data", "org.jfree.util" ]
org.jfree.data; org.jfree.util;
501,591
public static SMOutputElement myAddNewKMLGeometryPlacemarkElevatedElement(SMOutputElement parentElement, String plName, GeoPoint[] outerRegionPoints, GeoPoint[] innerRegionPoints, double givRoomHeight, double givRoomElevation, String givStyleUrl) throws javax.xml.stream.XMLStreamException { SMOutputEle...
static SMOutputElement function(SMOutputElement parentElement, String plName, GeoPoint[] outerRegionPoints, GeoPoint[] innerRegionPoints, double givRoomHeight, double givRoomElevation, String givStyleUrl) throws javax.xml.stream.XMLStreamException { SMOutputElement placemarkEl = parentElement.addElement(STR); SMOutputE...
/** * Translates vector of outer and a vector of inner points to a KML placemark/room * * */
Translates vector of outer and a vector of inner points to a KML placemark/room
myAddNewKMLGeometryPlacemarkElevatedElement
{ "repo_name": "vitrofp7/vitro", "path": "source/trunk/Demo/vitroUI/webUI/src/main/java/presentation/webgui/vitroappservlet/KMLPresentationService/KMLProcessTools.java", "license": "lgpl-3.0", "size": 18830 }
[ "org.codehaus.staxmate.out.SMOutputElement" ]
import org.codehaus.staxmate.out.SMOutputElement;
import org.codehaus.staxmate.out.*;
[ "org.codehaus.staxmate" ]
org.codehaus.staxmate;
847,683
@Generated @Selector("setEvent:") public native void setEvent(EKEvent value);
@Selector(STR) native void function(EKEvent value);
/** * [@property] event * <p> * Specifies the event to view. * <p> * You must set this prior to displaying the view controller. */
[@property] event Specifies the event to view. You must set this prior to displaying the view controller
setEvent
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/eventkitui/EKEventViewController.java", "license": "apache-2.0", "size": 9007 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,752,875
protected void findReferencedClassNames(final Set<String> refdClassNames) { for (final TypeParameter typeParameter : typeParameters) { if (typeParameter != null) { typeParameter.findReferencedClassNames(refdClassNames); } } for (final TypeSignature typ...
void function(final Set<String> refdClassNames) { for (final TypeParameter typeParameter : typeParameters) { if (typeParameter != null) { typeParameter.findReferencedClassNames(refdClassNames); } } for (final TypeSignature typeSignature : parameterTypeSignatures) { if (typeSignature != null) { typeSignature.findReferen...
/** * Get the names of any classes referenced in the type signature. * * @param refdClassNames * the referenced class names. */
Get the names of any classes referenced in the type signature
findReferencedClassNames
{ "repo_name": "lukehutch/fast-classpath-scanner", "path": "src/main/java/io/github/classgraph/MethodTypeSignature.java", "license": "mit", "size": 14429 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
675,253
protected List<ROW> getRows() { return Collections.unmodifiableList(rows); }
List<ROW> function() { return Collections.unmodifiableList(rows); }
/** * Returns an unmodifiable list of the rows in this section. * * @return the rows in this section */
Returns an unmodifiable list of the rows in this section
getRows
{ "repo_name": "Darsstar/framework", "path": "server/src/main/java/com/vaadin/ui/components/grid/StaticSection.java", "license": "apache-2.0", "size": 27228 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
45,227
protected void addSignalPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SetCommand_signal_feature"), getString("_UI_PropertyDescriptor_descr...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), StatemachinePackage.Literals.SET_COMMAND__SIGNAL, true, false, false, ItemPropertyDescriptor.GENE...
/** * This adds a property descriptor for the Signal feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Signal feature.
addSignalPropertyDescriptor
{ "repo_name": "spoenemann/xtext-gef", "path": "org.xtext.example.statemachine.edit/src/org/xtext/example/statemachine/statemachine/provider/SetCommandItemProvider.java", "license": "epl-1.0", "size": 5664 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.xtext.example.statemachine.statemachine.StatemachinePackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.xtext.example.statemachine.statemachine.StatemachinePackage;
import org.eclipse.emf.edit.provider.*; import org.xtext.example.statemachine.statemachine.*;
[ "org.eclipse.emf", "org.xtext.example" ]
org.eclipse.emf; org.xtext.example;
2,547,662
public static org.opennms.netmgt.config.service.Attribute unmarshal( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.opennms.netmgt.config.service.Attribute) Unmarshaller.unmarshal(org.opennms.netmgt.config.s...
static org.opennms.netmgt.config.service.Attribute function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.opennms.netmgt.config.service.Attribute) Unmarshaller.unmarshal(org.opennms.netmgt.config.service.Attribute.class, reader); }
/** * Method unmarshal. * * @param reader * @throws org.exolab.castor.xml.MarshalException if object is * null or if any SAXException is thrown during marshaling * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema *...
Method unmarshal
unmarshal
{ "repo_name": "vishwaAbhinav/OpenNMS", "path": "opennms-config/target/generated-sources/castor/org/opennms/netmgt/config/service/Attribute.java", "license": "gpl-2.0", "size": 6027 }
[ "org.exolab.castor.xml.Unmarshaller" ]
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.*;
[ "org.exolab.castor" ]
org.exolab.castor;
1,387,745
public static KeySpec readKeySpec(File file) throws IOException, KeyException { BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "ASCII")); try { return readKeySpec(reader, file.getAbsolutePath()); } finally { reader.close(); } }
static KeySpec function(File file) throws IOException, KeyException { BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "ASCII")); try { return readKeySpec(reader, file.getAbsolutePath()); } finally { reader.close(); } }
/** * Reads a key spec from a PEM file. * * @param file * The PEM file to read from * @return The created key spec * @throws IOException * @throws KeyException */
Reads a key spec from a PEM file
readKeySpec
{ "repo_name": "puppetlabs/puppetdb-javaclient", "path": "src/main/java/com/puppetlabs/puppetdb/javaclient/ssl/KeySpecFactory.java", "license": "apache-2.0", "size": 5320 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStreamReader", "java.security.KeyException", "java.security.spec.KeySpec" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.security.KeyException; import java.security.spec.KeySpec;
import java.io.*; import java.security.*; import java.security.spec.*;
[ "java.io", "java.security" ]
java.io; java.security;
2,795,744
public void openImageGallery(ActionListener response){ impl.openImageGallery(response); } /** * <p>Opens the device gallery to pick an image or a video.<br> * The method returns immediately and the response is sent asynchronously * to the given ActionListener Object as the source...
void function(ActionListener response){ impl.openImageGallery(response); } /** * <p>Opens the device gallery to pick an image or a video.<br> * The method returns immediately and the response is sent asynchronously * to the given ActionListener Object as the source value of the event (as a String)</p> * * <p>E.g. withi...
/** * Opens the device image gallery * The method returns immediately and the response will be sent asynchronously * to the given ActionListener Object * * use this in the actionPerformed to retrieve the file path * String path = (String) evt.getSource(); * * @param response a ...
Opens the device image gallery The method returns immediately and the response will be sent asynchronously to the given ActionListener Object use this in the actionPerformed to retrieve the file path String path = (String) evt.getSource()
openImageGallery
{ "repo_name": "diamonddevgroup/CodenameOne", "path": "CodenameOne/src/com/codename1/ui/Display.java", "license": "gpl-2.0", "size": 187718 }
[ "com.codename1.ui.events.ActionEvent", "com.codename1.ui.events.ActionListener" ]
import com.codename1.ui.events.ActionEvent; import com.codename1.ui.events.ActionListener;
import com.codename1.ui.events.*;
[ "com.codename1.ui" ]
com.codename1.ui;
2,145,067
public void testUploadFileNotFound() { String fullPath2Upload = mBaseFolderPath + FILE_NOT_FOUND_PATH; RemoteOperationResult result = mActivity.uploadFile( FILE_NOT_FOUND_PATH, fullPath2Upload, "image/png" ); mUploadedFilePath = fullPath2Upload; assertFalse(result.isSuccess()); }
void function() { String fullPath2Upload = mBaseFolderPath + FILE_NOT_FOUND_PATH; RemoteOperationResult result = mActivity.uploadFile( FILE_NOT_FOUND_PATH, fullPath2Upload, STR ); mUploadedFilePath = fullPath2Upload; assertFalse(result.isSuccess()); }
/** * Test Upload Not Found File */
Test Upload Not Found File
testUploadFileNotFound
{ "repo_name": "ckelsel/AndroidTraining", "path": "training/owncloud-android-library/test_client/tests/src/com/owncloud/android/lib/test_project/test/UploadFileTest.java", "license": "apache-2.0", "size": 3904 }
[ "com.owncloud.android.lib.common.operations.RemoteOperationResult" ]
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.operations.*;
[ "com.owncloud.android" ]
com.owncloud.android;
992,343
public RotationalLimitMotor getRotationalLimitMotor(int index) { return rotationalMotors.get(index); }
RotationalLimitMotor function(int index) { return rotationalMotors.get(index); }
/** * returns one of the three RotationalLimitMotors of this 6DofJoint which * allow manipulating the rotational axes * @param index the index of the RotationalLimitMotor * @return the RotationalLimitMotor at the given index */
returns one of the three RotationalLimitMotors of this 6DofJoint which allow manipulating the rotational axes
getRotationalLimitMotor
{ "repo_name": "rex-xxx/mt6572_x201", "path": "external/jmonkeyengine/engine/src/bullet/com/jme3/bullet/joints/SixDofJoint.java", "license": "gpl-2.0", "size": 12410 }
[ "com.jme3.bullet.joints.motors.RotationalLimitMotor" ]
import com.jme3.bullet.joints.motors.RotationalLimitMotor;
import com.jme3.bullet.joints.motors.*;
[ "com.jme3.bullet" ]
com.jme3.bullet;
1,800,007
protected void renderImageContent( UIXRenderingContext context, UINode node, ImageProviderResponse response ) throws IOException { // If we've got a ClientAction, let it write its dependencies // before we start rendering the link _writeClientActionDependency(context, node); renderI...
void function( UIXRenderingContext context, UINode node, ImageProviderResponse response ) throws IOException { _writeClientActionDependency(context, node); renderImage(context, node, response, null); _renderOnKeyDownScript(context); }
/** * Renders the button as an image using the image specified by * the ImageProviderResponse. This method is called by * <code>renderContent()</code> when image generation succeeds. Otherwise, * <code>renderAltContent()</code> is called. * @param context The rendering context * @param node the node...
Renders the button as an image using the image specified by the ImageProviderResponse. This method is called by <code>renderContent()</code> when image generation succeeds. Otherwise, <code>renderAltContent()</code> is called
renderImageContent
{ "repo_name": "adamrduffy/trinidad-1.0.x", "path": "trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ButtonRenderer.java", "license": "apache-2.0", "size": 25184 }
[ "java.io.IOException", "org.apache.myfaces.trinidadinternal.image.ImageProviderResponse", "org.apache.myfaces.trinidadinternal.ui.UINode", "org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext" ]
import java.io.IOException; import org.apache.myfaces.trinidadinternal.image.ImageProviderResponse; import org.apache.myfaces.trinidadinternal.ui.UINode; import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
import java.io.*; import org.apache.myfaces.trinidadinternal.image.*; import org.apache.myfaces.trinidadinternal.ui.*;
[ "java.io", "org.apache.myfaces" ]
java.io; org.apache.myfaces;
979,629
MeterRegistry meterRegistry();
MeterRegistry meterRegistry();
/** * Returns the {@link MeterRegistry} that collects various stats. */
Returns the <code>MeterRegistry</code> that collects various stats
meterRegistry
{ "repo_name": "imasahiro/armeria", "path": "core/src/main/java/com/linecorp/armeria/common/RequestContext.java", "license": "apache-2.0", "size": 21953 }
[ "io.micrometer.core.instrument.MeterRegistry" ]
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.*;
[ "io.micrometer.core" ]
io.micrometer.core;
907,090
public static File relativize(File base, File child) { return new File(base.toURI().relativize(child.toURI()).getPath()); }
static File function(File base, File child) { return new File(base.toURI().relativize(child.toURI()).getPath()); }
/** * Makes a file path relative to the base */
Makes a file path relative to the base
relativize
{ "repo_name": "gfneto/Hive2Hive", "path": "org.hive2hive.core/src/main/java/org/hive2hive/core/file/FileUtil.java", "license": "mit", "size": 3908 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
308,716
public static TextEdit[] createNLSEdits(ICompilationUnit cu, int[] positions) throws CoreException { List<InsertEdit> result= new ArrayList<>(); try { NLSLine[] allLines= NLSScanner.scan(cu); for (int i= 0; i < allLines.length; i++) { NLSLine line= allLines[i]; NLSElement[] elements= line.getElemen...
static TextEdit[] function(ICompilationUnit cu, int[] positions) throws CoreException { List<InsertEdit> result= new ArrayList<>(); try { NLSLine[] allLines= NLSScanner.scan(cu); for (int i= 0; i < allLines.length; i++) { NLSLine line= allLines[i]; NLSElement[] elements= line.getElements(); for (int j= 0; j < elements....
/** * Creates and returns NLS tag edits for strings that are at the specified positions in a * compilation unit. * * @param cu the compilation unit * @param positions positions of the strings * @return the edit, or <code>null</code> if all strings are already NLSed or the edits could * not be cre...
Creates and returns NLS tag edits for strings that are at the specified positions in a compilation unit
createNLSEdits
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/corext/refactoring/nls/NLSUtil.java", "license": "epl-1.0", "size": 9854 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.core.runtime.CoreException", "org.eclipse.jdt.core.ICompilationUnit", "org.eclipse.jdt.core.compiler.InvalidInputException", "org.eclipse.jface.text.BadLocationException", "org.eclipse.jface.text.Region", "org.eclipse.text.edits.InsertEdit", "org...
import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.compiler.InvalidInputException; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.Region; import org.eclipse.text.ed...
import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.compiler.*; import org.eclipse.jface.text.*; import org.eclipse.text.edits.*;
[ "java.util", "org.eclipse.core", "org.eclipse.jdt", "org.eclipse.jface", "org.eclipse.text" ]
java.util; org.eclipse.core; org.eclipse.jdt; org.eclipse.jface; org.eclipse.text;
1,197,830
public ActionForward clear(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { FormatForm formatForm = (FormatForm) form; List<CustomerProfile> customers = formatForm.getCustomers(); for (CustomerProfile customerProfile : cust...
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { FormatForm formatForm = (FormatForm) form; List<CustomerProfile> customers = formatForm.getCustomers(); for (CustomerProfile customerProfile : customers) { customerProfile.setSelec...
/** * This method clears all the customer checkboxes. * * @param mapping * @param form * @param request * @param response * @return * @throws Exception */
This method clears all the customer checkboxes
clear
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/pdp/web/struts/FormatAction.java", "license": "apache-2.0", "size": 11277 }
[ "java.util.List", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.kuali.kfs.pdp.PdpConstants", "org.kuali.kfs.pdp.businessobject.CustomerPr...
import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kfs.pdp.PdpConstants; import org.kuali.kfs.pdp.bu...
import java.util.*; import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kfs.pdp.*; import org.kuali.kfs.pdp.businessobject.*;
[ "java.util", "javax.servlet", "org.apache.struts", "org.kuali.kfs" ]
java.util; javax.servlet; org.apache.struts; org.kuali.kfs;
311,794
@Test(dataProvider="separateTrimmed") public void testMergingFromSeparatedReadTrimmedAlignments(final File unmapped, final List<File> r1Align, final List<File> r2Align, final int r1Trim, final int r2Trim, final String testName) throws Exception { final File output = File.createTempFile("mergeMultipleAl...
@Test(dataProvider=STR) void function(final File unmapped, final List<File> r1Align, final List<File> r2Align, final int r1Trim, final int r2Trim, final String testName) throws Exception { final File output = File.createTempFile(STR, ".sam"); output.deleteOnExit(); doMergeAlignment(unmapped, null, r1Align, r2Align, r1T...
/** * Minimal test of merging data from separate read 1 and read 2 alignments */
Minimal test of merging data from separate read 1 and read 2 alignments
testMergingFromSeparatedReadTrimmedAlignments
{ "repo_name": "alecw/picard", "path": "src/test/java/picard/sam/MergeBamAlignmentTest.java", "license": "mit", "size": 102668 }
[ "java.io.File", "java.util.List", "org.testng.Assert", "org.testng.annotations.Test" ]
import java.io.File; import java.util.List; import org.testng.Assert; import org.testng.annotations.Test;
import java.io.*; import java.util.*; import org.testng.*; import org.testng.annotations.*;
[ "java.io", "java.util", "org.testng", "org.testng.annotations" ]
java.io; java.util; org.testng; org.testng.annotations;
1,438,157
final <R extends Quantity<R>> Unit<R> inferSymbol(Unit<R> result, final char operation, final Unit<?> other) { if (result instanceof ConventionalUnit<?> && result.getSymbol() == null) { final String symbol = inferSymbol(operation, other); if (symbol != null) { result ...
final <R extends Quantity<R>> Unit<R> inferSymbol(Unit<R> result, final char operation, final Unit<?> other) { if (result instanceof ConventionalUnit<?> && result.getSymbol() == null) { final String symbol = inferSymbol(operation, other); if (symbol != null) { result = ((ConventionalUnit<R>) result).forSymbol(symbol); ...
/** * If the {@code result} unit is a {@link ConventionalUnit} with no symbol, tries to infer a symbol for it. * Otherwise returns {@code result} unchanged. * * @param result the result of an arithmetic operation. * @param operation {@link #MULTIPLY}, {@link #DIVIDE} or an exponent. ...
If the result unit is a <code>ConventionalUnit</code> with no symbol, tries to infer a symbol for it. Otherwise returns result unchanged
inferSymbol
{ "repo_name": "apache/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java", "license": "apache-2.0", "size": 22474 }
[ "javax.measure.Quantity", "javax.measure.Unit" ]
import javax.measure.Quantity; import javax.measure.Unit;
import javax.measure.*;
[ "javax.measure" ]
javax.measure;
2,435,851
return this.sendAsync(HttpMethod.POST, body); }
return this.sendAsync(HttpMethod.POST, body); }
/** * Creates the CallTransfer * * @return a future for the operation */
Creates the CallTransfer
postAsync
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/CallTransferRequest.java", "license": "mit", "size": 2073 }
[ "com.microsoft.graph.http.HttpMethod" ]
import com.microsoft.graph.http.HttpMethod;
import com.microsoft.graph.http.*;
[ "com.microsoft.graph" ]
com.microsoft.graph;
330,936
@Test(expected = CloudPoolDriverException.class) public void terminateOnClientError() throws Exception { // set up mock to throw an error whenever terminateInstance is called int desiredCapacity = 1; setUpMockedAutoScalingGroup(GROUP_NAME, ONDEMAND_LAUNCH_CONFIG, desiredCapacity, ...
@Test(expected = CloudPoolDriverException.class) void function() throws Exception { int desiredCapacity = 1; setUpMockedAutoScalingGroup(GROUP_NAME, ONDEMAND_LAUNCH_CONFIG, desiredCapacity, ec2Instances(ec2Instance("i-1", STR))); doThrow(new AmazonClientException(STR)).when(this.mockAwsClient).getAutoScalingGroup(GROUP...
/** * On a client error, a {@link CloudPoolDriverException} should be raised. */
On a client error, a <code>CloudPoolDriverException</code> should be raised
terminateOnClientError
{ "repo_name": "elastisys/scale.cloudpool", "path": "aws/autoscaling/src/test/java/com/elastisys/scale/cloudpool/aws/autoscaling/driver/TestAwsAsDriverOperation.java", "license": "apache-2.0", "size": 32078 }
[ "com.amazonaws.AmazonClientException", "com.elastisys.scale.cloudpool.aws.autoscaling.driver.TestUtils", "com.elastisys.scale.cloudpool.commons.basepool.driver.CloudPoolDriverException", "org.junit.Test", "org.mockito.Mockito" ]
import com.amazonaws.AmazonClientException; import com.elastisys.scale.cloudpool.aws.autoscaling.driver.TestUtils; import com.elastisys.scale.cloudpool.commons.basepool.driver.CloudPoolDriverException; import org.junit.Test; import org.mockito.Mockito;
import com.amazonaws.*; import com.elastisys.scale.cloudpool.aws.autoscaling.driver.*; import com.elastisys.scale.cloudpool.commons.basepool.driver.*; import org.junit.*; import org.mockito.*;
[ "com.amazonaws", "com.elastisys.scale", "org.junit", "org.mockito" ]
com.amazonaws; com.elastisys.scale; org.junit; org.mockito;
2,648,288
private static byte[] convertToByteArray(CharSequence charSequence) { checkNotNull(charSequence); byte[] byteArray = new byte[charSequence.length() << 1]; for (int i = 0; i < charSequence.length(); i++) { int bytePosition = i << 1; byteArray[bytePosition] = (byte) ((...
static byte[] function(CharSequence charSequence) { checkNotNull(charSequence); byte[] byteArray = new byte[charSequence.length() << 1]; for (int i = 0; i < charSequence.length(); i++) { int bytePosition = i << 1; byteArray[bytePosition] = (byte) ((charSequence.charAt(i) & 0xFF00) >> 8); byteArray[bytePosition + 1] = (...
/** * Convert a CharSequence (which are UTF16) into a byte array. * <p/> * Note: a String.getBytes() is not used to avoid creating a String of the password in the JVM. */
Convert a CharSequence (which are UTF16) into a byte array. Note: a String.getBytes() is not used to avoid creating a String of the password in the JVM
convertToByteArray
{ "repo_name": "bither/bitherj", "path": "bitherj/src/main/java/net/bither/bitherj/crypto/KeyCrypterScrypt.java", "license": "apache-2.0", "size": 7864 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
38,663
protected int getRecommendMaxNumberMessagesPerPage(Plugin.AttackStrength strength) { switch (strength) { case LOW: return NUMBER_MSGS_ATTACK_PER_PAGE_LOW; case MEDIUM: default: return NUMBER_MSGS_ATTACK_PER_PAGE_MED; case HIGH: ...
int function(Plugin.AttackStrength strength) { switch (strength) { case LOW: return NUMBER_MSGS_ATTACK_PER_PAGE_LOW; case MEDIUM: default: return NUMBER_MSGS_ATTACK_PER_PAGE_MED; case HIGH: return NUMBER_MSGS_ATTACK_PER_PAGE_HIGH; case INSANE: return NUMBER_MSGS_ATTACK_PER_PAGE_INSANE; } }
/** * Gets the recommended maximum number of messages that a scanner can send per page for the * given strength. * * @param strength the attack strength. * @return the recommended maximum number of messages. * @see AbstractAppPlugin */
Gets the recommended maximum number of messages that a scanner can send per page for the given strength
getRecommendMaxNumberMessagesPerPage
{ "repo_name": "secdec/zap-extensions", "path": "testutils/src/main/java/org/zaproxy/zap/testutils/ActiveScannerTestUtils.java", "license": "apache-2.0", "size": 15541 }
[ "org.parosproxy.paros.core.scanner.Plugin" ]
import org.parosproxy.paros.core.scanner.Plugin;
import org.parosproxy.paros.core.scanner.*;
[ "org.parosproxy.paros" ]
org.parosproxy.paros;
2,622,962
@Override public void populateExchangeFromCxfRequest(org.apache.cxf.message.Exchange cxfExchange, Exchange camelExchange) { Method method = null; QName operationName = null; ExchangePattern mep = ExchangePattern.InOut; ...
void function(org.apache.cxf.message.Exchange cxfExchange, Exchange camelExchange) { Method method = null; QName operationName = null; ExchangePattern mep = ExchangePattern.InOut; BindingOperationInfo boi = camelExchange.getProperty(BindingOperationInfo.class.getName(), BindingOperationInfo.class); if (boi != null) { S...
/** * This method is called by {@link CxfConsumer}. */
This method is called by <code>CxfConsumer</code>
populateExchangeFromCxfRequest
{ "repo_name": "objectiser/camel", "path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java", "license": "apache-2.0", "size": 47211 }
[ "java.lang.reflect.Method", "java.security.Principal", "javax.security.auth.Subject", "javax.xml.namespace.QName", "org.apache.camel.Exchange", "org.apache.camel.ExchangePattern", "org.apache.camel.attachment.AttachmentMessage", "org.apache.camel.component.cxf.common.message.CxfConstants", "org.apac...
import java.lang.reflect.Method; import java.security.Principal; import javax.security.auth.Subject; import javax.xml.namespace.QName; import org.apache.camel.Exchange; import org.apache.camel.ExchangePattern; import org.apache.camel.attachment.AttachmentMessage; import org.apache.camel.component.cxf.common.message.Cxf...
import java.lang.reflect.*; import java.security.*; import javax.security.auth.*; import javax.xml.namespace.*; import org.apache.camel.*; import org.apache.camel.attachment.*; import org.apache.camel.component.cxf.common.message.*; import org.apache.cxf.endpoint.*; import org.apache.cxf.message.*; import org.apache.cx...
[ "java.lang", "java.security", "javax.security", "javax.xml", "org.apache.camel", "org.apache.cxf" ]
java.lang; java.security; javax.security; javax.xml; org.apache.camel; org.apache.cxf;
1,589,766
AllocatedHosts allocatedHosts(); default boolean allowModelVersionMismatch(Instant now) { return false; }
AllocatedHosts allocatedHosts(); default boolean allowModelVersionMismatch(Instant now) { return false; }
/** * Gets the allocated hosts for this model. * * @return {@link AllocatedHosts} instance, if available */
Gets the allocated hosts for this model
allocatedHosts
{ "repo_name": "vespa-engine/vespa", "path": "config-model-api/src/main/java/com/yahoo/config/model/api/Model.java", "license": "apache-2.0", "size": 3383 }
[ "com.yahoo.config.provision.AllocatedHosts", "java.time.Instant" ]
import com.yahoo.config.provision.AllocatedHosts; import java.time.Instant;
import com.yahoo.config.provision.*; import java.time.*;
[ "com.yahoo.config", "java.time" ]
com.yahoo.config; java.time;
398,432
long longCount(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate);
long longCount(Queryable<T> source, FunctionExpression<Predicate1<T>> predicate);
/** * Returns an long that represents the number of * elements in a sequence that satisfy a condition. */
Returns an long that represents the number of elements in a sequence that satisfy a condition
longCount
{ "repo_name": "vlsi/incubator-calcite", "path": "linq4j/src/main/java/org/apache/calcite/linq4j/QueryableFactory.java", "license": "apache-2.0", "size": 29143 }
[ "org.apache.calcite.linq4j.function.Predicate1", "org.apache.calcite.linq4j.tree.FunctionExpression" ]
import org.apache.calcite.linq4j.function.Predicate1; import org.apache.calcite.linq4j.tree.FunctionExpression;
import org.apache.calcite.linq4j.function.*; import org.apache.calcite.linq4j.tree.*;
[ "org.apache.calcite" ]
org.apache.calcite;
1,038,745
public String getExtraNameCharacters() throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_getExtraNameCharacters].methodEntry(); try { return null; } finally { if (JdbcDebugCfg.entryActive) debug[methodId_getExtraNameCharacters].methodExit(); } } // ---------------------------...
String function() throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_getExtraNameCharacters].methodEntry(); try { return null; } finally { if (JdbcDebugCfg.entryActive) debug[methodId_getExtraNameCharacters].methodExit(); } }
/** * Retrieves all the "extra" characters that can be used in unquoted * identifier names (those beyond a-z, A-Z, 0-9 and _). * * @return null * @throws SQLException * - if a database access error occurs **/
Retrieves all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9 and _)
getExtraNameCharacters
{ "repo_name": "mashengchen/incubator-trafodion", "path": "core/conn/jdbc_type2/src/main/java/org/apache/trafodion/jdbc/t2/SQLMXDatabaseMetaData.java", "license": "apache-2.0", "size": 191582 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,236,208
public MatchOther processPage(Page page);
MatchOther function(Page page);
/** * process the page, extract urls to fetch, extract the data and store * * @param page page * * @return whether continue to match */
process the page, extract urls to fetch, extract the data and store
processPage
{ "repo_name": "sanlingdd/personalLinkedProfilesIn", "path": "webmagic-extension/src/main/java/us/codecraft/webmagic/handler/SubPageProcessor.java", "license": "apache-2.0", "size": 373 }
[ "us.codecraft.webmagic.Page" ]
import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.*;
[ "us.codecraft.webmagic" ]
us.codecraft.webmagic;
1,678,841
public Builder onComponentOnly(@Nullable Boolean b) { this.onComponentOnly = b; return this; }
Builder function(@Nullable Boolean b) { this.onComponentOnly = b; return this; }
/** * If true, it will return only issues on the passed component(s) * If false, it will return all issues on the passed component(s) and their descendants */
If true, it will return only issues on the passed component(s) If false, it will return all issues on the passed component(s) and their descendants
onComponentOnly
{ "repo_name": "Godin/sonar", "path": "server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueQuery.java", "license": "lgpl-3.0", "size": 15375 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,694,142
HashSet<Agent> getAssociatedAgents(Entity entity) throws EntityException;
HashSet<Agent> getAssociatedAgents(Entity entity) throws EntityException;
/** * Returns the agents associated to a given entity. * * @param entity is the entity. * @return a set of agents. * @throws AgentException */
Returns the agents associated to a given entity
getAssociatedAgents
{ "repo_name": "FracturedPlane/EnvironmentInterface", "path": "src/aiInterface/environment/EnvironmentInterfaceStandard.java", "license": "gpl-2.0", "size": 7800 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
628,531
public void testGetActionChains() throws Exception { int previousSize = ActionChainFactory.getActionChains(user).size(); ActionChainFactory.createActionChain(TestUtils.randomString(), user); ActionChainFactory.createActionChain(TestUtils.randomString(), user); ActionChainFactory.cre...
void function() throws Exception { int previousSize = ActionChainFactory.getActionChains(user).size(); ActionChainFactory.createActionChain(TestUtils.randomString(), user); ActionChainFactory.createActionChain(TestUtils.randomString(), user); ActionChainFactory.createActionChain(TestUtils.randomString(), user); assertE...
/** * Tests getActionChains(). * @throws Exception if something bad happens */
Tests getActionChains()
testGetActionChains
{ "repo_name": "mcalmer/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/action/test/ActionChainFactoryTest.java", "license": "gpl-2.0", "size": 16976 }
[ "com.redhat.rhn.domain.action.ActionChainFactory", "com.redhat.rhn.testing.TestUtils" ]
import com.redhat.rhn.domain.action.ActionChainFactory; import com.redhat.rhn.testing.TestUtils;
import com.redhat.rhn.domain.action.*; import com.redhat.rhn.testing.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
2,263,026
@SuppressWarnings({ "unchecked" }) public List<String> OMFApplicationHandler(OMFMessage message, String fromTopic, List<String> memberships, String toTopic, HashMap<String, Node> nodes) throws IllegalArgumentException { Log.i(appTAG, classTAG+": IN APP HANDLER"); HashMap<String, Object> resourceProps =new Ha...
@SuppressWarnings({ STR }) List<String> function(OMFMessage message, String fromTopic, List<String> memberships, String toTopic, HashMap<String, Node> nodes) throws IllegalArgumentException { Log.i(appTAG, classTAG+STR); HashMap<String, Object> resourceProps =new HashMap<String, Object>(this.properties); HashMap<String...
/** * Application Handler * @param message : OMF message type * @param fromTopic : from which topic the message arrived * @param memberships : List of the topic memberships * @param toTopic : to which topic the resource proxy replies * @param nodes : HashMap of the created Nodes by the RC */
Application Handler
OMFApplicationHandler
{ "repo_name": "NitLab/Android_Resource_Controller", "path": "Android Studio Project/app/src/main/java/com/omf/resourcecontroller/OMF/OMFProxyHandlers.java", "license": "mit", "size": 37437 }
[ "android.content.Intent", "android.net.Uri", "android.util.Log", "java.io.BufferedReader", "java.io.InputStreamReader", "java.util.HashMap", "java.util.Iterator", "java.util.List", "java.util.Map", "org.jivesoftware.smackx.pubsub.Node" ]
import android.content.Intent; import android.net.Uri; import android.util.Log; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.jivesoftware.smackx.pubsub.Node;
import android.content.*; import android.net.*; import android.util.*; import java.io.*; import java.util.*; import org.jivesoftware.smackx.pubsub.*;
[ "android.content", "android.net", "android.util", "java.io", "java.util", "org.jivesoftware.smackx" ]
android.content; android.net; android.util; java.io; java.util; org.jivesoftware.smackx;
962,043