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 static UserId splitUserId(final String userId) {
if (!TextUtils.isEmpty(userId)) {
final Matcher matcher = USER_ID_PATTERN.matcher(userId);
if (matcher.matches()) {
return new UserId(matcher.group(1), matcher.group(3), matcher.group(2));
}
}... | static UserId function(final String userId) { if (!TextUtils.isEmpty(userId)) { final Matcher matcher = USER_ID_PATTERN.matcher(userId); if (matcher.matches()) { return new UserId(matcher.group(1), matcher.group(3), matcher.group(2)); } } return new UserId(null, null, null); } | /**
* Splits userId string into naming part, email part, and comment part
* <p/>
* User ID matching:
* http://fiddle.re/t4p6f
*
* @param userId
* @return theParsedUserInfo
*/ | Splits userId string into naming part, email part, and comment part User ID matching: HREF | splitUserId | {
"repo_name": "jca02266/k-9",
"path": "plugins/openpgp-api-lib/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpUtils.java",
"license": "apache-2.0",
"size": 5240
} | [
"android.text.TextUtils",
"java.util.regex.Matcher"
] | import android.text.TextUtils; import java.util.regex.Matcher; | import android.text.*; import java.util.regex.*; | [
"android.text",
"java.util"
] | android.text; java.util; | 2,522,689 |
@Test
public void testRemoveCalledTwice() {
List<E> testListCopy = new ArrayList<E>(testList);
Iterator<E> iter = new SkippingIterator<E>(testListCopy.iterator(), 1);
assertTrue(iter.hasNext());
assertEquals("b", iter.next());
iter.remove();
try {
it... | void function() { List<E> testListCopy = new ArrayList<E>(testList); Iterator<E> iter = new SkippingIterator<E>(testListCopy.iterator(), 1); assertTrue(iter.hasNext()); assertEquals("b", iter.next()); iter.remove(); try { iter.remove(); fail(STR); } catch (IllegalStateException ise) { } } | /**
* Test the <code>remove()</code> method being called twice without calling
* <code>next()</code> in between.
*/ | Test the <code>remove()</code> method being called twice without calling <code>next()</code> in between | testRemoveCalledTwice | {
"repo_name": "AffogatoLang/Moka",
"path": "lib/Apache_Commons_Collections/src/test/java/org/apache/commons/collections4/iterators/SkippingIteratorTest.java",
"license": "bsd-3-clause",
"size": 9677
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,777,132 |
public T caseImply(Imply object) {
return null;
} | T function(Imply object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Imply</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpret... | Returns the result of interpreting the object as an instance of 'Imply'. This implementation returns null; returning a non-null result will terminate the switch. | caseImply | {
"repo_name": "nhnghia/schora",
"path": "src/fr/lri/schora/expr/util/ExprSwitch.java",
"license": "gpl-2.0",
"size": 21477
} | [
"fr.lri.schora.expr.Imply"
] | import fr.lri.schora.expr.Imply; | import fr.lri.schora.expr.*; | [
"fr.lri.schora"
] | fr.lri.schora; | 1,117,391 |
public void doHide_preview_assignment_assignment(RunData data)
{
SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid());
state.setAttribute(PREVIEW_ASSIGNMENT_ASSIGNMENT_HIDE_FLAG, Boolean.valueOf(true));
} // doHide_preview_assignment_assignment | void function(RunData data) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); state.setAttribute(PREVIEW_ASSIGNMENT_ASSIGNMENT_HIDE_FLAG, Boolean.valueOf(true)); } | /**
* Action is to hide the preview assignment assignment infos
*/ | Action is to hide the preview assignment assignment infos | doHide_preview_assignment_assignment | {
"repo_name": "lorenamgUMU/sakai",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 677150
} | [
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.event.api.SessionState"
] | import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState; | import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event"
] | org.sakaiproject.cheftool; org.sakaiproject.event; | 868,596 |
public void setProxy(Proxy proxy) {
this.proxy = proxy;
}
/**
* Indicates whether this request factory should buffer the {@linkplain ClientHttpRequest#getBody() request body}
* internally.
* <p>Default is {@code true}. When sending large amounts of data via POST or PUT, it is recommended
* to change thi... | void function(Proxy proxy) { this.proxy = proxy; } /** * Indicates whether this request factory should buffer the {@linkplain ClientHttpRequest#getBody() request body} * internally. * <p>Default is {@code true}. When sending large amounts of data via POST or PUT, it is recommended * to change this property to {@code fa... | /**
* Set the {@link Proxy} to use for this request factory.
*/ | Set the <code>Proxy</code> to use for this request factory | setProxy | {
"repo_name": "kingtang/spring-learn",
"path": "spring-web/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java",
"license": "gpl-3.0",
"size": 6409
} | [
"java.net.HttpURLConnection",
"java.net.Proxy"
] | import java.net.HttpURLConnection; import java.net.Proxy; | import java.net.*; | [
"java.net"
] | java.net; | 311,337 |
public interface OnMatrixChangedListener {
void onMatrixChanged(RectF rect);
} | interface OnMatrixChangedListener { void function(RectF rect); } | /**
* Callback for when the Matrix displaying the Drawable has changed. This could be because
* the View's bounds have changed, or the user has zoomed.
*
* @param rect - Rectangle displaying the Drawable's new bounds.
*/ | Callback for when the Matrix displaying the Drawable has changed. This could be because the View's bounds have changed, or the user has zoomed | onMatrixChanged | {
"repo_name": "connectim/Android",
"path": "app/src/main/java/connect/view/photoview/PhotoViewAttacher.java",
"license": "mit",
"size": 39484
} | [
"android.graphics.RectF"
] | import android.graphics.RectF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,447,972 |
public static java.util.Set extractUserDefinedObjectSet(ims.domain.ILightweightDomainFactory domainFactory, ims.assessment.vo.UserDefinedObjectVoCollection voCollection)
{
return extractUserDefinedObjectSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.assessment.vo.UserDefinedObjectVoCollection voCollection) { return extractUserDefinedObjectSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.assessment.configuration.domain.objects.UserDefinedObject set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.assessment.configuration.domain.objects.UserDefinedObject set from the value object collection | extractUserDefinedObjectSet | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/assessment/vo/domain/UserDefinedObjectVoAssembler.java",
"license": "agpl-3.0",
"size": 20517
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,102,711 |
private void clearDictionaryFromQueryModel() {
if (null != queryModel) {
Map<String, Dictionary> columnToDictionaryMapping = queryModel.getColumnToDictionaryMapping();
if (null != columnToDictionaryMapping) {
for (Map.Entry<String, Dictionary> entry : columnToDictionaryMapping.entrySet()) {
... | void function() { if (null != queryModel) { Map<String, Dictionary> columnToDictionaryMapping = queryModel.getColumnToDictionaryMapping(); if (null != columnToDictionaryMapping) { for (Map.Entry<String, Dictionary> entry : columnToDictionaryMapping.entrySet()) { CarbonUtil.clearDictionaryCache(entry.getValue()); } } } ... | /**
* This method will clear the dictionary access count after its usage is complete so
* that column can be deleted form LRU cache whenever memory reaches threshold
*/ | This method will clear the dictionary access count after its usage is complete so that column can be deleted form LRU cache whenever memory reaches threshold | clearDictionaryFromQueryModel | {
"repo_name": "shivangi1015/incubator-carbondata",
"path": "processing/src/main/java/org/apache/carbondata/processing/merger/CarbonCompactionExecutor.java",
"license": "apache-2.0",
"size": 9709
} | [
"java.util.Map",
"org.apache.carbondata.core.cache.dictionary.Dictionary",
"org.apache.carbondata.core.util.CarbonUtil"
] | import java.util.Map; import org.apache.carbondata.core.cache.dictionary.Dictionary; import org.apache.carbondata.core.util.CarbonUtil; | import java.util.*; import org.apache.carbondata.core.cache.dictionary.*; import org.apache.carbondata.core.util.*; | [
"java.util",
"org.apache.carbondata"
] | java.util; org.apache.carbondata; | 2,553,091 |
@Override
public Request<TerminateInstancesRequest> getDryRunRequest() {
Request<TerminateInstancesRequest> request = new TerminateInstancesRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
} | Request<TerminateInstancesRequest> function() { Request<TerminateInstancesRequest> request = new TerminateInstancesRequestMarshaller().marshall(this); request.addParameter(STR, Boolean.toString(true)); return request; } | /**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/ | This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run | getDryRunRequest | {
"repo_name": "jentfoo/aws-sdk-java",
"path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/TerminateInstancesRequest.java",
"license": "apache-2.0",
"size": 7176
} | [
"com.amazonaws.Request",
"com.amazonaws.services.ec2.model.transform.TerminateInstancesRequestMarshaller"
] | import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.TerminateInstancesRequestMarshaller; | import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*; | [
"com.amazonaws",
"com.amazonaws.services"
] | com.amazonaws; com.amazonaws.services; | 2,120,889 |
public static Rectangle getNormalizedRectangle(PdfArray box) {
float llx = ((PdfNumber)getPdfObjectRelease(box.getPdfObject(0))).floatValue();
float lly = ((PdfNumber)getPdfObjectRelease(box.getPdfObject(1))).floatValue();
float urx = ((PdfNumber)getPdfObjectRelease(box.getPdfObject(2))).flo... | static Rectangle function(PdfArray box) { float llx = ((PdfNumber)getPdfObjectRelease(box.getPdfObject(0))).floatValue(); float lly = ((PdfNumber)getPdfObjectRelease(box.getPdfObject(1))).floatValue(); float urx = ((PdfNumber)getPdfObjectRelease(box.getPdfObject(2))).floatValue(); float ury = ((PdfNumber)getPdfObjectRe... | /** Normalizes a <CODE>Rectangle</CODE> so that llx and lly are smaller than urx and ury.
* @param box the original rectangle
* @return a normalized <CODE>Rectangle</CODE>
*/ | Normalizes a <code>Rectangle</code> so that llx and lly are smaller than urx and ury | getNormalizedRectangle | {
"repo_name": "yogthos/itext",
"path": "src/com/lowagie/text/pdf/PdfReader.java",
"license": "lgpl-3.0",
"size": 134229
} | [
"com.lowagie.text.Rectangle"
] | import com.lowagie.text.Rectangle; | import com.lowagie.text.*; | [
"com.lowagie.text"
] | com.lowagie.text; | 1,665,820 |
private void sendResponse(HttpServletRequest req, HttpServletResponse resp, String relayState,
String response, String acUrl, String subject, String authenticatedIdPs,
String tenantDomain)
throws ServletException, IOException, IdentityException... | void function(HttpServletRequest req, HttpServletResponse resp, String relayState, String response, String acUrl, String subject, String authenticatedIdPs, String tenantDomain) throws ServletException, IOException, IdentityException { acUrl = getACSUrlWithTenantPartitioning(acUrl, tenantDomain); if (acUrl == null acUrl... | /**
* Sends the Response message back to the Service Provider.
*
* @param req
* @param resp
* @param relayState
* @param response
* @param acUrl
* @param subject
* @throws ServletException
* @throws IOException
*/ | Sends the Response message back to the Service Provider | sendResponse | {
"repo_name": "wso2-extensions/identity-inbound-auth-saml",
"path": "components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java",
"license": "apache-2.0",
"size": 110187
} | [
"java.io.IOException",
"java.io.PrintWriter",
"java.util.Base64",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.wso2.carbon.identity.base.IdentityException",
"org.wso2.carbon.identity.sso.saml.SAMLECPConstants",
"org.wso2.ca... | import java.io.IOException; import java.io.PrintWriter; import java.util.Base64; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.sso.saml.SAMLECPCon... | import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.identity.sso.saml.*; import org.wso2.carbon.identity.sso.saml.internal.*; | [
"java.io",
"java.util",
"javax.servlet",
"org.wso2.carbon"
] | java.io; java.util; javax.servlet; org.wso2.carbon; | 2,203,757 |
public void paintSeparatorForeground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation) {
paintForeground(context, g, x, y, w, h, orientation);
} | void function(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation) { paintForeground(context, g, x, y, w, h, orientation); } | /**
* Paints the foreground of a separator.
*
* @param context SynthContext identifying the <code>JComponent</code>
* and <code>Region</code> to paint to
* @param g <code>Graphics</code> to paint to
* @param x X coordinate of the area to paint to
... | Paints the foreground of a separator | paintSeparatorForeground | {
"repo_name": "anhtu1995ok/seaglass",
"path": "src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java",
"license": "apache-2.0",
"size": 119406
} | [
"java.awt.Graphics",
"javax.swing.plaf.synth.SynthContext"
] | import java.awt.Graphics; import javax.swing.plaf.synth.SynthContext; | import java.awt.*; import javax.swing.plaf.synth.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,401,406 |
public Script parse(URI uri) throws CompilationFailedException, IOException {
return parse(new GroovyCodeSource(uri));
} | Script function(URI uri) throws CompilationFailedException, IOException { return parse(new GroovyCodeSource(uri)); } | /**
* Parses the given script and returns it ready to be run
*
* @param uri is the URI of the script (which is used to create the class name of the script)
*/ | Parses the given script and returns it ready to be run | parse | {
"repo_name": "paulk-asert/groovy",
"path": "src/main/java/groovy/lang/GroovyShell.java",
"license": "apache-2.0",
"size": 22799
} | [
"java.io.IOException",
"org.codehaus.groovy.control.CompilationFailedException"
] | import java.io.IOException; import org.codehaus.groovy.control.CompilationFailedException; | import java.io.*; import org.codehaus.groovy.control.*; | [
"java.io",
"org.codehaus.groovy"
] | java.io; org.codehaus.groovy; | 399,602 |
@SuppressWarnings("unchecked")
public Type to(ExchangePattern pattern, Iterable<Endpoint> endpoints) {
for (Endpoint endpoint : endpoints) {
addOutput(new ToDefinition(endpoint, pattern));
}
return (Type) this;
}
/**
* <a href="http://camel.apache.org/e... | @SuppressWarnings(STR) Type function(ExchangePattern pattern, Iterable<Endpoint> endpoints) { for (Endpoint endpoint : endpoints) { addOutput(new ToDefinition(endpoint, pattern)); } return (Type) this; } /** * <a href="http: * set the ExchangePattern {@link ExchangePattern} into the exchange * * @param exchangePattern ... | /**
* Sends the exchange to a list of endpoints
*
* @param pattern the pattern to use for the message exchanges
* @param endpoints list of endpoints to send to
* @return the builder
*/ | Sends the exchange to a list of endpoints | to | {
"repo_name": "everttigchelaar/camel-svn",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 120346
} | [
"org.apache.camel.Endpoint",
"org.apache.camel.ExchangePattern"
] | import org.apache.camel.Endpoint; import org.apache.camel.ExchangePattern; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 711,490 |
public Paint getSeriesPaint(int series) {
return this.paintList.getPaint(series);
}
/**
* Sets the paint used for a series and sends a {@link RendererChangeEvent}
| Paint function(int series) { return this.paintList.getPaint(series); } /** * Sets the paint used for a series and sends a {@link RendererChangeEvent} | /**
* Returns the paint used to fill an item drawn by the renderer.
*
* @param series the series index (zero-based).
*
* @return The paint (possibly <code>null</code>).
*
* @see #setSeriesPaint(int, Paint)
*/ | Returns the paint used to fill an item drawn by the renderer | getSeriesPaint | {
"repo_name": "greearb/jfreechart-fse-ct",
"path": "src/main/java/org/jfree/chart/renderer/AbstractRenderer.java",
"license": "lgpl-2.1",
"size": 108424
} | [
"java.awt.Paint",
"org.jfree.chart.event.RendererChangeEvent"
] | import java.awt.Paint; import org.jfree.chart.event.RendererChangeEvent; | import java.awt.*; import org.jfree.chart.event.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 1,973,721 |
@Override
public void v(@NonNull String message, Object... args) {
if (Valves[V]) {
log(VERBOSE, null, message, args);
}
}
| void function(@NonNull String message, Object... args) { if (Valves[V]) { log(VERBOSE, null, message, args); } } | /**
* Log verbose message with optional format args.
*/ | Log verbose message with optional format args | v | {
"repo_name": "harvey103565/Timber",
"path": "timber/src/main/java/woods/log/timber/Wood.java",
"license": "apache-2.0",
"size": 20102
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 924,214 |
@Test
public void testUnknownTriggerId() throws Exception {
final TestingRestfulGateway testingRestfulGateway = new TestingRestfulGateway.Builder().build();
try {
testingStatusHandler.handleRequest(
statusOperationRequest(new TriggerId()),
testingRestfulGateway).get();
fail("This should have fai... | void function() throws Exception { final TestingRestfulGateway testingRestfulGateway = new TestingRestfulGateway.Builder().build(); try { testingStatusHandler.handleRequest( statusOperationRequest(new TriggerId()), testingRestfulGateway).get(); fail(STR); } catch (ExecutionException ee) { final Optional<RestHandlerExce... | /**
* Tests that an querying an unknown trigger id will return an exceptionally completed
* future.
*/ | Tests that an querying an unknown trigger id will return an exceptionally completed future | testUnknownTriggerId | {
"repo_name": "fhueske/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/async/AbstractAsynchronousOperationHandlersTest.java",
"license": "apache-2.0",
"size": 13535
} | [
"java.util.Optional",
"java.util.concurrent.ExecutionException",
"org.apache.flink.runtime.rest.handler.RestHandlerException",
"org.apache.flink.runtime.rest.messages.TriggerId",
"org.apache.flink.runtime.webmonitor.TestingRestfulGateway",
"org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRe... | import java.util.Optional; import java.util.concurrent.ExecutionException; import org.apache.flink.runtime.rest.handler.RestHandlerException; import org.apache.flink.runtime.rest.messages.TriggerId; import org.apache.flink.runtime.webmonitor.TestingRestfulGateway; import org.apache.flink.shaded.netty4.io.netty.handler.... | import java.util.*; import java.util.concurrent.*; import org.apache.flink.runtime.rest.handler.*; import org.apache.flink.runtime.rest.messages.*; import org.apache.flink.runtime.webmonitor.*; import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.*; import org.apache.flink.util.*; import org.hamcrest.*; im... | [
"java.util",
"org.apache.flink",
"org.hamcrest",
"org.junit"
] | java.util; org.apache.flink; org.hamcrest; org.junit; | 837,447 |
private static class MatcherFactory implements AuthDefVisitor
{
public static Matcher<?> matcherFor( AuthDef expected)
{
MatcherFactory factory = new MatcherFactory();
expected.accept( factory);
return factory.matcher_;
} | static class MatcherFactory implements AuthDefVisitor { public static Matcher<?> function( AuthDef expected) { MatcherFactory factory = new MatcherFactory(); expected.accept( factory); return factory.matcher_; } | /**
* Creates a new MatcherFactory instance.
*/ | Creates a new MatcherFactory instance | matcherFor | {
"repo_name": "Cornutum/tcases",
"path": "tcases-openapi/src/test/java/org/cornutum/tcases/openapi/resolver/AuthDefMatcher.java",
"license": "mit",
"size": 2060
} | [
"org.hamcrest.Matcher"
] | import org.hamcrest.Matcher; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 2,416,586 |
@RequestMapping(value = STORAGE_URI_PREFIX + "/{storageName}", method = RequestMethod.GET)
@Secured(SecurityFunctions.FN_STORAGES_GET)
Storage getStorage(@PathVariable("storageName") String storageName)
{
return storageService.getStorage(new StorageKey(storageName));
} | @RequestMapping(value = STORAGE_URI_PREFIX + STR, method = RequestMethod.GET) @Secured(SecurityFunctions.FN_STORAGES_GET) Storage getStorage(@PathVariable(STR) String storageName) { return storageService.getStorage(new StorageKey(storageName)); } | /**
* Gets an existing storage by name.
*
* @param storageName the storage name
*
* @return the storage information
*/ | Gets an existing storage by name | getStorage | {
"repo_name": "FINRAOS/herd",
"path": "herd-code/herd-rest/src/main/java/org/finra/herd/rest/StorageRestController.java",
"license": "apache-2.0",
"size": 5974
} | [
"org.finra.herd.model.api.xml.Storage",
"org.finra.herd.model.api.xml.StorageKey",
"org.finra.herd.model.dto.SecurityFunctions",
"org.springframework.security.access.annotation.Secured",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"or... | import org.finra.herd.model.api.xml.Storage; import org.finra.herd.model.api.xml.StorageKey; import org.finra.herd.model.dto.SecurityFunctions; import org.springframework.security.access.annotation.Secured; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.Reque... | import org.finra.herd.model.api.xml.*; import org.finra.herd.model.dto.*; import org.springframework.security.access.annotation.*; import org.springframework.web.bind.annotation.*; | [
"org.finra.herd",
"org.springframework.security",
"org.springframework.web"
] | org.finra.herd; org.springframework.security; org.springframework.web; | 1,943,225 |
@Test
public void testDelete() {
setupMockGroups();
mockGroupService.removeGroup(anyObject(), anyObject(), anyObject());
expectLastCall();
replay(mockGroupService);
WebTarget wt = target();
String location = "/groups/1/111";
Response deleteResponse = wt... | void function() { setupMockGroups(); mockGroupService.removeGroup(anyObject(), anyObject(), anyObject()); expectLastCall(); replay(mockGroupService); WebTarget wt = target(); String location = STR; Response deleteResponse = wt.path(location) .request(MediaType.APPLICATION_JSON_TYPE) .delete(); assertThat(deleteResponse... | /**
* Tests deleting a group.
*/ | Tests deleting a group | testDelete | {
"repo_name": "VinodKumarS-Huawei/ietf96yang",
"path": "web/api/src/test/java/org/onosproject/rest/resources/GroupsResourceTest.java",
"license": "apache-2.0",
"size": 18372
} | [
"java.net.HttpURLConnection",
"javax.ws.rs.client.WebTarget",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.easymock.EasyMock",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import java.net.HttpURLConnection; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.easymock.EasyMock; import org.hamcrest.Matchers; import org.junit.Assert; | import java.net.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*; import org.easymock.*; import org.hamcrest.*; import org.junit.*; | [
"java.net",
"javax.ws",
"org.easymock",
"org.hamcrest",
"org.junit"
] | java.net; javax.ws; org.easymock; org.hamcrest; org.junit; | 1,508,571 |
protected void sequence_ForEquation(ISerializationContext context, ForEquation semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, ForEquation semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* ForEquation returns ForEquation
*
* Constraint:
* (indices=ForIndices eqs+=Equation*)
*/ | Contexts: ForEquation returns ForEquation Constraint: (indices=ForIndices eqs+=Equation*) | sequence_ForEquation | {
"repo_name": "jgoppert/xmodelica",
"path": "xmodelica/src-gen/xmodelica/serializer/ModelicaSemanticSequencer.java",
"license": "bsd-3-clause",
"size": 70247
} | [
"org.eclipse.xtext.serializer.ISerializationContext"
] | import org.eclipse.xtext.serializer.ISerializationContext; | import org.eclipse.xtext.serializer.*; | [
"org.eclipse.xtext"
] | org.eclipse.xtext; | 528,612 |
DirectoryListing getListing(String src, byte[] startAfter,
boolean needLocation) throws UnresolvedLinkException, IOException {
String srcs = normalizePath(src);
readLock();
try {
if (srcs.endsWith(HdfsConstants.SEPARATOR_DOT_SNAPSHOT_DIR)) {
return getSnapshotsListing(srcs, startAfter... | DirectoryListing getListing(String src, byte[] startAfter, boolean needLocation) throws UnresolvedLinkException, IOException { String srcs = normalizePath(src); readLock(); try { if (srcs.endsWith(HdfsConstants.SEPARATOR_DOT_SNAPSHOT_DIR)) { return getSnapshotsListing(srcs, startAfter); } final INodesInPath inodesInPat... | /**
* Get a partial listing of the indicated directory
*
* We will stop when any of the following conditions is met:
* 1) this.lsLimit files have been added
* 2) needLocation is true AND enough files have been added such
* that at least this.lsLimit block locations are in the response
*
* @param... | Get a partial listing of the indicated directory We will stop when any of the following conditions is met: 1) this.lsLimit files have been added 2) needLocation is true AND enough files have been added such that at least this.lsLimit block locations are in the response | getListing | {
"repo_name": "yelshater/hadoop-2.3.0",
"path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java",
"license": "apache-2.0",
"size": 110238
} | [
"java.io.IOException",
"java.util.Arrays",
"org.apache.hadoop.fs.UnresolvedLinkException",
"org.apache.hadoop.hdfs.protocol.DirectoryListing",
"org.apache.hadoop.hdfs.protocol.HdfsConstants",
"org.apache.hadoop.hdfs.protocol.HdfsFileStatus",
"org.apache.hadoop.hdfs.protocol.HdfsLocatedFileStatus",
"or... | import java.io.IOException; import java.util.Arrays; import org.apache.hadoop.fs.UnresolvedLinkException; import org.apache.hadoop.hdfs.protocol.DirectoryListing; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.protocol.HdfsFileStatus; import org.apache.hadoop.hdfs.protocol.HdfsLocat... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,343,427 |
public static boolean isChartHandle( Object content )
{
return content instanceof ExtendedItemHandle
&& CHART_EXTENSION_NAME.equals( ( (ExtendedItemHandle) content ).getExtensionName( ) );
} | static boolean function( Object content ) { return content instanceof ExtendedItemHandle && CHART_EXTENSION_NAME.equals( ( (ExtendedItemHandle) content ).getExtensionName( ) ); } | /**
* Checks if the object is handle with Chart model
*
* @param content
* the object to check
* @since 2.3
*/ | Checks if the object is handle with Chart model | isChartHandle | {
"repo_name": "sguan-actuate/birt",
"path": "chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/api/ChartItemUtil.java",
"license": "epl-1.0",
"size": 59572
} | [
"org.eclipse.birt.report.model.api.ExtendedItemHandle"
] | import org.eclipse.birt.report.model.api.ExtendedItemHandle; | import org.eclipse.birt.report.model.api.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 2,389,291 |
public byte[] engineCanonicalizeSubTree(Node rootNode,
String inclusiveNamespaces,Node excl) throws CanonicalizationException {
this._inclusiveNSSet = (TreeSet)InclusiveNamespaces
.prefixStr2Set(inclusiveNamespaces);
... | byte[] function(Node rootNode, String inclusiveNamespaces,Node excl) throws CanonicalizationException { this._inclusiveNSSet = (TreeSet)InclusiveNamespaces .prefixStr2Set(inclusiveNamespaces); return super.engineCanonicalizeSubTree(rootNode,excl); } | /**
* Method engineCanonicalizeSubTree
* @param rootNode
* @param inclusiveNamespaces
* @param excl A element to exclude from the c14n process.
* @return the rootNode c14n.
* @throws CanonicalizationException
*/ | Method engineCanonicalizeSubTree | engineCanonicalizeSubTree | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java",
"license": "mit",
"size": 14738
} | [
"com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException",
"com.sun.org.apache.xml.internal.security.transforms.params.InclusiveNamespaces",
"java.util.TreeSet",
"org.w3c.dom.Node"
] | import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException; import com.sun.org.apache.xml.internal.security.transforms.params.InclusiveNamespaces; import java.util.TreeSet; import org.w3c.dom.Node; | import com.sun.org.apache.xml.internal.security.c14n.*; import com.sun.org.apache.xml.internal.security.transforms.params.*; import java.util.*; import org.w3c.dom.*; | [
"com.sun.org",
"java.util",
"org.w3c.dom"
] | com.sun.org; java.util; org.w3c.dom; | 2,077,820 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String crossConnectionName, String peeringName) {
return beginDeleteAsync(resourceGroupName, crossConnectionName, peeringName).getSyncPoller();
} | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> function( String resourceGroupName, String crossConnectionName, String peeringName) { return beginDeleteAsync(resourceGroupName, crossConnectionName, peeringName).getSyncPoller(); } | /**
* Deletes the specified peering from the ExpressRouteCrossConnection.
*
* @param resourceGroupName The name of the resource group.
* @param crossConnectionName The name of the ExpressRouteCrossConnection.
* @param peeringName The name of the peering.
* @throws IllegalArgumentException ... | Deletes the specified peering from the ExpressRouteCrossConnection | beginDelete | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCrossConnectionPeeringsClientImpl.java",
"license": "mit",
"size": 60338
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 2,322,775 |
public final StoredClassCatalog getClassCatalog() {
return javaCatalog;
} | final StoredClassCatalog function() { return javaCatalog; } | /**
* Return the class catalog.
*/ | Return the class catalog | getClassCatalog | {
"repo_name": "zheguang/BerkeleyDB",
"path": "examples/java/src/collections/ship/index/SampleDatabase.java",
"license": "agpl-3.0",
"size": 12179
} | [
"com.sleepycat.bind.serial.StoredClassCatalog"
] | import com.sleepycat.bind.serial.StoredClassCatalog; | import com.sleepycat.bind.serial.*; | [
"com.sleepycat.bind"
] | com.sleepycat.bind; | 58,822 |
@Secured({ "IS_AUTHENTICATED_ANONYMOUSLY", "AFTER_ACL_VALUE_OBJECT_COLLECTION_READ" })
Collection<? extends DatabaseBackedGeneSetValueObject> loadValueObjectsLite( Collection<Long> ids ); | @Secured({ STR, STR }) Collection<? extends DatabaseBackedGeneSetValueObject> loadValueObjectsLite( Collection<Long> ids ); | /**
* The ids of member genes will not be filled in
*
* @param ids ids
* @return gene set value object
*/ | The ids of member genes will not be filled in | loadValueObjectsLite | {
"repo_name": "ppavlidis/Gemma",
"path": "gemma-core/src/main/java/ubic/gemma/core/genome/gene/service/GeneSetService.java",
"license": "apache-2.0",
"size": 13094
} | [
"java.util.Collection",
"org.springframework.security.access.annotation.Secured"
] | import java.util.Collection; import org.springframework.security.access.annotation.Secured; | import java.util.*; import org.springframework.security.access.annotation.*; | [
"java.util",
"org.springframework.security"
] | java.util; org.springframework.security; | 1,708,869 |
public synchronized void release(boolean wait) {
int t = temp;
if (state == INIT && temp != RELEASED) {
temp = RELEASED;
while (users != 0)
try {
if (wait == true)
wait();
else {
temp = t;
throw new ReleaseException("Still in use");
}
} catch (Interrup... | synchronized void function(boolean wait) { int t = temp; if (state == INIT && temp != RELEASED) { temp = RELEASED; while (users != 0) try { if (wait == true) wait(); else { temp = t; throw new ReleaseException(STR); } } catch (InterruptedException e) { temp = t; System.err.println(STR); e.printStackTrace(); throw new S... | /**
* This method switched to the released state
*
* @param wait
* whether we want to wait for potential users or not. If we
* do, calls to this method will block until all users are
* finished. If we don't (wait = false), this method will
* throw a Rele... | This method switched to the released state | release | {
"repo_name": "mailmindlin/v4l4j",
"path": "src/au/edu/jcu/v4l4j/VideoDevice.java",
"license": "gpl-3.0",
"size": 72177
} | [
"au.edu.jcu.v4l4j.exceptions.ReleaseException",
"au.edu.jcu.v4l4j.exceptions.StateException"
] | import au.edu.jcu.v4l4j.exceptions.ReleaseException; import au.edu.jcu.v4l4j.exceptions.StateException; | import au.edu.jcu.v4l4j.exceptions.*; | [
"au.edu.jcu"
] | au.edu.jcu; | 2,103,592 |
private boolean isAllocation(Node n) {
return n.jjtGetNumChildren() > 0 && n.jjtGetChild(0) instanceof ASTAllocationExpression && n.jjtGetParent().jjtGetNumChildren() == 1;
} | boolean function(Node n) { return n.jjtGetNumChildren() > 0 && n.jjtGetChild(0) instanceof ASTAllocationExpression && n.jjtGetParent().jjtGetNumChildren() == 1; } | /**
* Indicate whether this node is allocating a new object.
*
* @param n
* node that might be allocating a new object
* @return true if child 0 is an AllocationExpression
*/ | Indicate whether this node is allocating a new object | isAllocation | {
"repo_name": "byronka/xenos",
"path": "utils/pmd-bin-5.2.2/src/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/design/CompareObjectsWithEqualsRule.java",
"license": "mit",
"size": 4181
} | [
"net.sourceforge.pmd.lang.ast.Node",
"net.sourceforge.pmd.lang.java.ast.ASTAllocationExpression"
] | import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTAllocationExpression; | import net.sourceforge.pmd.lang.ast.*; import net.sourceforge.pmd.lang.java.ast.*; | [
"net.sourceforge.pmd"
] | net.sourceforge.pmd; | 1,102,700 |
private void put(String znode, byte[] data, boolean update)
throws YarnException {
// Create the znode
boolean created = false;
try {
created = zkManager.create(znode);
} catch (Exception e) {
String errMsg = "Cannot create znode " + znode + ": " + e.getMessage();
FederationSta... | void function(String znode, byte[] data, boolean update) throws YarnException { boolean created = false; try { created = zkManager.create(znode); } catch (Exception e) { String errMsg = STR + znode + STR + e.getMessage(); FederationStateStoreUtils.logAndThrowStoreException(LOG, errMsg); } if (!created) { LOG.debug(STR,... | /**
* Put data into a znode in Zookeeper.
* @param znode Path of the znode.
* @param data Data to write.
* @throws YarnException If it cannot contact ZooKeeper.
*/ | Put data into a znode in Zookeeper | put | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/impl/ZookeeperFederationStateStore.java",
"license": "apache-2.0",
"size": 24673
} | [
"org.apache.hadoop.yarn.exceptions.YarnException",
"org.apache.hadoop.yarn.server.federation.store.utils.FederationStateStoreUtils"
] | import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.server.federation.store.utils.FederationStateStoreUtils; | import org.apache.hadoop.yarn.exceptions.*; import org.apache.hadoop.yarn.server.federation.store.utils.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 7,398 |
public void add(Term term)
{
if (term == null) {
if (termLast != null) addNull();
}
else {
long freq = 1;
if (dic != null) freq = dic.occs(term.bytes());
// unknow term
if (freq < 1) return;
data.add(new Entry(term, ord, row, col, freq));
ord++;
notNull++;... | void function(Term term) { if (term == null) { if (termLast != null) addNull(); } else { long freq = 1; if (dic != null) freq = dic.occs(term.bytes()); if (freq < 1) return; data.add(new Entry(term, ord, row, col, freq)); ord++; notNull++; col++; } termLast = term; } | /**
* Add a term to the series, handle a null label as a group separator,
* get term frequence to strip unknown terms, and sort in inverse frequency.
* @param term
*/ | Add a term to the series, handle a null label as a group separator, get term frequence to strip unknown terms, and sort in inverse frequency | add | {
"repo_name": "oeuvres/Alix",
"path": "java/alix/lucene/search/TermList.java",
"license": "apache-2.0",
"size": 7838
} | [
"org.apache.lucene.index.Term"
] | import org.apache.lucene.index.Term; | import org.apache.lucene.index.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 2,361,911 |
@Override
protected final void writeWithLock(final TransportWriter writer) {
if (manufacturerSpecialty != null) {
writer.attr("manufacturerSpecialty", manufacturerSpecialty);
}
writer.attr("manufacturerBonus", manufacturerBonus);
if (componentSpecialty != null) {
... | final void function(final TransportWriter writer) { if (manufacturerSpecialty != null) { writer.attr(STR, manufacturerSpecialty); } writer.attr(STR, manufacturerBonus); if (componentSpecialty != null) { writer.attr(STR, componentSpecialty); } writer.attr(STR, componentBonus); writer.attr(STR, distributionCapacityDiscou... | /**
* Writes the advertiser information parameters to the writer.
* @param writer the writer to write data to.
*/ | Writes the advertiser information parameters to the writer | writeWithLock | {
"repo_name": "Iolaum/MrSmith",
"path": "AdX/src/main/java/edu/umich/eecs/tac/props/AdvertiserInfo.java",
"license": "gpl-2.0",
"size": 17578
} | [
"se.sics.isl.transport.TransportWriter"
] | import se.sics.isl.transport.TransportWriter; | import se.sics.isl.transport.*; | [
"se.sics.isl"
] | se.sics.isl; | 390,461 |
SortedMap<TableName, TableInfo> checkIntegrity() throws IOException {
tablesInfo = new TreeMap<TableName,TableInfo> ();
List<HbckInfo> noHDFSRegionInfos = new ArrayList<HbckInfo>();
LOG.debug("There are " + regionInfoMap.size() + " region info entries");
for (HbckInfo hbi : regionInfoMap.values()) {
... | SortedMap<TableName, TableInfo> checkIntegrity() throws IOException { tablesInfo = new TreeMap<TableName,TableInfo> (); List<HbckInfo> noHDFSRegionInfos = new ArrayList<HbckInfo>(); LOG.debug(STR + regionInfoMap.size() + STR); for (HbckInfo hbi : regionInfoMap.values()) { if (hbi.metaEntry == null) { noHDFSRegionInfos.... | /**
* Checks tables integrity. Goes over all regions and scans the tables.
* Collects all the pieces for each table and checks if there are missing,
* repeated or overlapping ones.
* @throws IOException
*/ | Checks tables integrity. Goes over all regions and scans the tables. Collects all the pieces for each table and checks if there are missing, repeated or overlapping ones | checkIntegrity | {
"repo_name": "cloud-software-foundation/c5",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java",
"license": "apache-2.0",
"size": 140505
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.SortedMap",
"java.util.TreeMap",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.ServerName",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.util.hbck.TableIntegrityErrorHandler"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.SortedMap; import java.util.TreeMap; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.util.hbck.TableIntegrityErrorHandler; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.hbck.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,781,237 |
public Set<AddOn> getSelectedAddOns() {
return selectedAddOns;
} | Set<AddOn> function() { return selectedAddOns; } | /**
* Gets the add-ons selected for uninstallation.
*
* @return the add-ons selected for uninstallation
*/ | Gets the add-ons selected for uninstallation | getSelectedAddOns | {
"repo_name": "JordanGS/zaproxy",
"path": "src/org/zaproxy/zap/extension/autoupdate/AddOnDependencyChecker.java",
"license": "apache-2.0",
"size": 40883
} | [
"java.util.Set",
"org.zaproxy.zap.control.AddOn"
] | import java.util.Set; import org.zaproxy.zap.control.AddOn; | import java.util.*; import org.zaproxy.zap.control.*; | [
"java.util",
"org.zaproxy.zap"
] | java.util; org.zaproxy.zap; | 1,321,887 |
public static JSONObject simpleGetOrCreate(JSONObject json, String[] path)
{
if ( path == null || path.length == 0 )
return json;
Pattern indexPattern = Pattern.compile("\\[(.*?)\\]");
boolean mustCreate = false;
Object obj = null;
Object curObj = json;
for( String name : path)
{
if ( !(curObj ... | static JSONObject function(JSONObject json, String[] path) { if ( path == null path.length == 0 ) return json; Pattern indexPattern = Pattern.compile(STR); boolean mustCreate = false; Object obj = null; Object curObj = json; for( String name : path) { if ( !(curObj instanceof JSONObject curObj instanceof JSONArray ) ) ... | /**
* Finds or creates a JSONObject specified by a simple path provided as a string array of path names.
* @param json Parent JSONObject to search and optionally update
* @param path Simple path to find or create
* @return Parent object if the path is empty, created object or null if the object can not be creat... | Finds or creates a JSONObject specified by a simple path provided as a string array of path names | simpleGetOrCreate | {
"repo_name": "deleidos/digitaledge-platform",
"path": "commons-core/src/main/java/com/deleidos/rtws/commons/util/JsonPath.java",
"license": "apache-2.0",
"size": 25802
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern",
"net.sf.json.JSONArray",
"net.sf.json.JSONObject"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sf.json.JSONArray; import net.sf.json.JSONObject; | import java.util.regex.*; import net.sf.json.*; | [
"java.util",
"net.sf.json"
] | java.util; net.sf.json; | 810,197 |
@Test
public void checkEquality() {
// Create an Object
FeatureSet object = new FeatureSet("Feature 1");
// Set its data
object.addIData(new LWRData("Feature 1"));
object.addIData(new LWRData("Feature 1"));
// Create another FeatureSet to assert Equality with the last
FeatureSet equalObject = new F... | void function() { FeatureSet object = new FeatureSet(STR); object.addIData(new LWRData(STR)); object.addIData(new LWRData(STR)); FeatureSet equalObject = new FeatureSet(STR); for (int i = 0; i < object.getIData().size(); i++) { equalObject.addIData(object.getIData().get(i)); } FeatureSet unEqualObject = new FeatureSet(... | /**
* <p>
* An operation that checks the equality operations.
* </p>
*
*/ | An operation that checks the equality operations. | checkEquality | {
"repo_name": "SmithRWORNL/ice",
"path": "tests/org.eclipse.ice.reactor.test/src/org/eclipse/ice/reactor/test/FeatureSetTester.java",
"license": "epl-1.0",
"size": 7471
} | [
"org.eclipse.ice.reactor.FeatureSet",
"org.eclipse.ice.reactor.LWRData",
"org.junit.Assert"
] | import org.eclipse.ice.reactor.FeatureSet; import org.eclipse.ice.reactor.LWRData; import org.junit.Assert; | import org.eclipse.ice.reactor.*; import org.junit.*; | [
"org.eclipse.ice",
"org.junit"
] | org.eclipse.ice; org.junit; | 2,531,051 |
private void writeFieldBeginInternal(TField field, byte typeOverride)
throws TException
{
// short lastField = lastField_.pop();
// if there's a type override, use that.
byte typeToWrite = typeOverride == -1 ? getCompactType(field.getType()) : typeOverride;
// check... | void function(TField field, byte typeOverride) throws TException { byte typeToWrite = typeOverride == -1 ? getCompactType(field.getType()) : typeOverride; if (field.getId() > lastFieldId && field.getId() - lastFieldId <= 15) { writeByteDirect((field.getId() - lastFieldId) << 4 typeToWrite); } else { writeByteDirect(typ... | /**
* The workhorse of writeFieldBegin. It has the option of doing a
* 'type override' of the type header. This is used specifically in the
* boolean field case.
*/ | The workhorse of writeFieldBegin. It has the option of doing a 'type override' of the type header. This is used specifically in the boolean field case | writeFieldBeginInternal | {
"repo_name": "electrum/drift",
"path": "drift-protocol/src/main/java/io/airlift/drift/protocol/TCompactProtocol.java",
"license": "apache-2.0",
"size": 27653
} | [
"io.airlift.drift.TException"
] | import io.airlift.drift.TException; | import io.airlift.drift.*; | [
"io.airlift.drift"
] | io.airlift.drift; | 587,007 |
private void changeSystemListener(int idx, @Nullable GridMessageListener lsnr) {
assert Thread.holdsLock(sysLsnrsMux);
GridMessageListener[] res = new GridMessageListener[sysLsnrs.length];
System.arraycopy(sysLsnrs, 0, res, 0, sysLsnrs.length);
res[idx] = lsnr;
sysLsnrs =... | void function(int idx, @Nullable GridMessageListener lsnr) { assert Thread.holdsLock(sysLsnrsMux); GridMessageListener[] res = new GridMessageListener[sysLsnrs.length]; System.arraycopy(sysLsnrs, 0, res, 0, sysLsnrs.length); res[idx] = lsnr; sysLsnrs = res; } | /**
* Change systme listener at the given index.
*
* @param idx Index.
* @param lsnr Listener.
*/ | Change systme listener at the given index | changeSystemListener | {
"repo_name": "ilantukh/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java",
"license": "apache-2.0",
"size": 104430
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,593,191 |
private String readLineFromStream()
throws IOException {
StringBuffer sb = new StringBuffer();
while (true) {
int ch = super.read();
if (ch < 0) {
if (sb.length() == 0) {
return (null);
} else {
... | String function() throws IOException { StringBuffer sb = new StringBuffer(); while (true) { int ch = super.read(); if (ch < 0) { if (sb.length() == 0) { return (null); } else { break; } } else if (ch == '\r') { continue; } else if (ch == '\n') { break; } sb.append((char) ch); } return (sb.toString()); } | /**
* Reads the input stream, one line at a time. Reads bytes into an array,
* until it reads a certain number of bytes or reaches a newline character,
* which it reads into the array as well.
*
* @param input Input stream on which the bytes are read
* @return The line that was read, or <c... | Reads the input stream, one line at a time. Reads bytes into an array, until it reads a certain number of bytes or reaches a newline character, which it reads into the array as well | readLineFromStream | {
"repo_name": "eclipsky/HowTomcatWorks",
"path": "src/org/apache/catalina/connector/http/HttpRequestStream.java",
"license": "apache-2.0",
"size": 7770
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 912,090 |
EList<Diagnostic> getErrors(); | EList<Diagnostic> getErrors(); | /**
* Returns a list of the errors in the resource;
* each error will be of type {@link org.eclipse.emf.ecore.resource.Resource.Diagnostic}.
* <p>
* These will typically be produced as the resource is {@link #load(Map) loaded}.
* </p>
* @return a list of the errors in the resource.
* @see #load(Map... | Returns a list of the errors in the resource; each error will be of type <code>org.eclipse.emf.ecore.resource.Resource.Diagnostic</code>. These will typically be produced as the resource is <code>#load(Map) loaded</code>. | getErrors | {
"repo_name": "markus1978/clickwatch",
"path": "external/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/resource/Resource.java",
"license": "apache-2.0",
"size": 31127
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,711,340 |
try {
FileInputStream in = new FileInputStream(file);
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String s_expression = reader.readLine();
while (reader.ready()) {
s_expression += " " + reader.readLine().trim();
}
reader.close();
if (s_expression == null)
r... | try { FileInputStream in = new FileInputStream(file); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String s_expression = reader.readLine(); while (reader.ready()) { s_expression += " " + reader.readLine().trim(); } reader.close(); if (s_expression == null) return null; DefaultTreeModel treeMod... | /**
* parses S expression and returns corresponding DefaultMutableTreeModel by
* given File
*/ | parses S expression and returns corresponding DefaultMutableTreeModel by given File | getTreeModelByS_Expression | {
"repo_name": "tan-z-tan/EvolutionaryComputation",
"path": "src/util/S_ExpressionHandler.java",
"license": "gpl-2.0",
"size": 3691
} | [
"java.io.BufferedReader",
"java.io.FileInputStream",
"java.io.InputStreamReader",
"javax.swing.tree.DefaultTreeModel"
] | import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader; import javax.swing.tree.DefaultTreeModel; | import java.io.*; import javax.swing.tree.*; | [
"java.io",
"javax.swing"
] | java.io; javax.swing; | 1,195,535 |
public QueryResults<String> findVulnerabilityId( QueryParams params ); | QueryResults<String> function( QueryParams params ); | /**
* Searches for the vulnerability IDs that match the specified query parameters.
*
* @param params
* the query parameters.
* @return
* the found vulnerability IDs.
*/ | Searches for the vulnerability IDs that match the specified query parameters | findVulnerabilityId | {
"repo_name": "nakamura5akihito/six-vuln",
"path": "src/main/java/jp/go/aist/six/vuln/repository/scap/nvd/NvdRepository.java",
"license": "apache-2.0",
"size": 5691
} | [
"jp.go.aist.six.util.repository.QueryParams",
"jp.go.aist.six.util.repository.QueryResults"
] | import jp.go.aist.six.util.repository.QueryParams; import jp.go.aist.six.util.repository.QueryResults; | import jp.go.aist.six.util.repository.*; | [
"jp.go.aist"
] | jp.go.aist; | 1,196,558 |
public ServiceFuture<Void> customNamedRequestIdParamGroupingAsync(HeaderCustomNamedRequestIdParamGroupingParametersInner headerCustomNamedRequestIdParamGroupingParameters, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromHeaderResponse(customNamedRequestIdParamGroupingWithServiceRespo... | ServiceFuture<Void> function(HeaderCustomNamedRequestIdParamGroupingParametersInner headerCustomNamedRequestIdParamGroupingParameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromHeaderResponse(customNamedRequestIdParamGroupingWithServiceResponseAsync(headerCustomNamedRequestIdParamGroupingP... | /**
* Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request, via a parameter group.
*
* @param headerCustomNamedRequestIdParamGroupingParameters Additional parameters for the operation
* @param serviceCallback the async ServiceCallback to handle successful an... | Send foo-client-request-id = 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0 in the header of the request, via a parameter group | customNamedRequestIdParamGroupingAsync | {
"repo_name": "lmazuel/autorest",
"path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/azurespecials/implementation/HeadersInner.java",
"license": "mit",
"size": 16988
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,140,159 |
@Override // EditLogOutputStream
void create() throws IOException {
bufCurrent.clear();
assert bufReady.size() == 0 : "previous data is not flushed yet";
} | @Override void create() throws IOException { bufCurrent.clear(); assert bufReady.size() == 0 : STR; } | /**
* There is no persistent storage. Just clear the buffers.
*/ | There is no persistent storage. Just clear the buffers | create | {
"repo_name": "gabrielborgesmagalhaes/hadoop-hdfs",
"path": "src/java/org/apache/hadoop/hdfs/server/namenode/EditLogBackupOutputStream.java",
"license": "apache-2.0",
"size": 6841
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 593,715 |
@Path("{id}/federated-identity")
@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
public List<FederatedIdentityRepresentation> getFederatedIdentity(final @PathParam("id") String id) {
auth.requireView();
UserModel user = session.users().getUserById(id, realm);
if (user == ... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) List<FederatedIdentityRepresentation> function(final @PathParam("id") String id) { auth.requireView(); UserModel user = session.users().getUserById(id, realm); if (user == null) { throw new NotFoundException(STR); } return getFederatedIdentities(user); } | /**
* Get social logins associated with the user
*
* @param id User id
* @return
*/ | Get social logins associated with the user | getFederatedIdentity | {
"repo_name": "VihreatDeGrona/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java",
"license": "apache-2.0",
"size": 38116
} | [
"java.util.List",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"org.jboss.resteasy.spi.NotFoundException",
"org.keycloak.models.UserModel",
"org.keycloak.representations.idm.FederatedIdentityRepresentation"
] | import java.util.List; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.jboss.resteasy.spi.NotFoundException; import org.keycloak.models.UserModel; import org.keycloak.representations.idm.FederatedIdentityRepresentation; | import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jboss.resteasy.spi.*; import org.keycloak.models.*; import org.keycloak.representations.idm.*; | [
"java.util",
"javax.ws",
"org.jboss.resteasy",
"org.keycloak.models",
"org.keycloak.representations"
] | java.util; javax.ws; org.jboss.resteasy; org.keycloak.models; org.keycloak.representations; | 1,189,908 |
private String executeHttpPreload(HttpResponse response, String xml) throws Exception {
GadgetSpec spec = new GadgetSpec(GADGET_URL, xml);
RecordingRequestPipeline pipeline = new RecordingRequestPipeline(response);
PipelinedDataPreloader preloader = new PipelinedDataPreloader(pipeline, containerConfig);
... | String function(HttpResponse response, String xml) throws Exception { GadgetSpec spec = new GadgetSpec(GADGET_URL, xml); RecordingRequestPipeline pipeline = new RecordingRequestPipeline(response); PipelinedDataPreloader preloader = new PipelinedDataPreloader(pipeline, containerConfig); view = STR; Gadget gadget = new G... | /**
* Run an HTTP Preload test, returning the String result.
*/ | Run an HTTP Preload test, returning the String result | executeHttpPreload | {
"repo_name": "hoatle/gatein-shindig",
"path": "java/gadgets/src/test/java/org/apache/shindig/gadgets/preload/PipelinedDataPreloaderTest.java",
"license": "apache-2.0",
"size": 20491
} | [
"java.util.Collection",
"java.util.concurrent.Callable",
"org.apache.shindig.gadgets.Gadget",
"org.apache.shindig.gadgets.http.HttpRequest",
"org.apache.shindig.gadgets.http.HttpResponse",
"org.apache.shindig.gadgets.spec.GadgetSpec",
"org.apache.shindig.gadgets.spec.PipelinedData",
"org.junit.Assert"... | import java.util.Collection; import java.util.concurrent.Callable; import org.apache.shindig.gadgets.Gadget; import org.apache.shindig.gadgets.http.HttpRequest; import org.apache.shindig.gadgets.http.HttpResponse; import org.apache.shindig.gadgets.spec.GadgetSpec; import org.apache.shindig.gadgets.spec.PipelinedData; i... | import java.util.*; import java.util.concurrent.*; import org.apache.shindig.gadgets.*; import org.apache.shindig.gadgets.http.*; import org.apache.shindig.gadgets.spec.*; import org.junit.*; | [
"java.util",
"org.apache.shindig",
"org.junit"
] | java.util; org.apache.shindig; org.junit; | 365,871 |
@Property(PROCESS_NAME)
String setProcessName(String processName); | @Property(PROCESS_NAME) String setProcessName(String processName); | /**
* Contains the name of the process.
*/ | Contains the name of the process | setProcessName | {
"repo_name": "d-s/windup",
"path": "rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/model/Jbpm3ProcessModel.java",
"license": "epl-1.0",
"size": 3340
} | [
"com.tinkerpop.frames.Property"
] | import com.tinkerpop.frames.Property; | import com.tinkerpop.frames.*; | [
"com.tinkerpop.frames"
] | com.tinkerpop.frames; | 196,543 |
interface WithVirtualMachines {
WithCreate withVirtualMachines(List<SubResource> virtualMachines);
}
interface WithCreate extends Creatable<AvailabilitySet>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithPlatformFaultDomainCount, DefinitionStage... | interface WithVirtualMachines { WithCreate withVirtualMachines(List<SubResource> virtualMachines); } interface WithCreate extends Creatable<AvailabilitySet>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithPlatformFaultDomainCount, DefinitionStages.WithPlatformUpdateDomainCount, DefinitionStages.WithProxi... | /**
* Specifies virtualMachines.
* @param virtualMachines A list of references to all virtual machines in the availability set
* @return the next definition stage
*/ | Specifies virtualMachines | withVirtualMachines | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2019_03_01/src/main/java/com/microsoft/azure/management/compute/v2019_03_01/AvailabilitySet.java",
"license": "mit",
"size": 8661
} | [
"com.microsoft.azure.SubResource",
"com.microsoft.azure.arm.model.Appliable",
"com.microsoft.azure.arm.model.Creatable",
"com.microsoft.azure.arm.resources.models.Resource",
"java.util.List"
] | import com.microsoft.azure.SubResource; import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.Resource; import java.util.List; | import com.microsoft.azure.*; import com.microsoft.azure.arm.model.*; import com.microsoft.azure.arm.resources.models.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 1,168,469 |
public void startTag(String tag) throws IOException {
closePrevTag();
newLine();
out.write("<");
out.write(tag);
state = IN_TAG;
} | void function(String tag) throws IOException { closePrevTag(); newLine(); out.write("<"); out.write(tag); state = IN_TAG; } | /**
* Start an HTML tag. If a prior tag has been started, it will
* be closed first. Once a tag has been opened, attributes for the
* tag may be written out, followed by body content before finally
* ending the tag.
* @param tag the tag to be started
* @throws IOException if there is a pr... | Start an HTML tag. If a prior tag has been started, it will be closed first. Once a tag has been opened, attributes for the tag may be written out, followed by body content before finally ending the tag | startTag | {
"repo_name": "otmarjr/jtreg-fork",
"path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/util/HTMLWriter.java",
"license": "gpl-2.0",
"size": 21256
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 770,829 |
public BitSet getSingleBitSet(final T element) {
return this.getSingleBitSet(this.getIndexEx(element));
} | BitSet function(final T element) { return this.getSingleBitSet(this.getIndexEx(element)); } | /**
* Get a {@link BitSet} with the same size as this indexed set, with a single bit set to {@code true} (the one corresponding to the specified
* <b>element</b>), and all other bits set to {@code false}.
*
* @param element
* @return
*/ | Get a <code>BitSet</code> with the same size as this indexed set, with a single bit set to true (the one corresponding to the specified element), and all other bits set to false | getSingleBitSet | {
"repo_name": "Alexander-Schiendorfer/active-learning-collectives",
"path": "Utilities/src/utilities/datastructures/IndexedSetView.java",
"license": "mit",
"size": 18517
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 226,352 |
@Override
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
PartialCommand info = (PartialCommand) o;
super.looseMarshal(wireFormat, o, dataOut);
dataOut.writeInt(info.getCommandId());
looseMarshalByteArray(wireFormat, info.ge... | void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { PartialCommand info = (PartialCommand) o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getCommandId()); looseMarshalByteArray(wireFormat, info.getData(), dataOut); } | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | looseMarshal | {
"repo_name": "tabish121/OpenWire",
"path": "openwire-core/src/main/java/io/openwire/codec/v9/PartialCommandMarshaller.java",
"license": "apache-2.0",
"size": 4251
} | [
"io.openwire.codec.OpenWireFormat",
"io.openwire.commands.PartialCommand",
"java.io.DataOutput",
"java.io.IOException"
] | import io.openwire.codec.OpenWireFormat; import io.openwire.commands.PartialCommand; import java.io.DataOutput; import java.io.IOException; | import io.openwire.codec.*; import io.openwire.commands.*; import java.io.*; | [
"io.openwire.codec",
"io.openwire.commands",
"java.io"
] | io.openwire.codec; io.openwire.commands; java.io; | 2,383,990 |
public void refreshTree(Object refNode, DataObject toBrowse)
{
switch (model.getState()) {
case LOADING_DATA:
case LOADING_LEAVES:
model.cancel();
break;
case DISCARDED:
//ignore
return;
}
if (model.getBrowserType() == FILE_SYSTEM_EXPLORER) {
... | void function(Object refNode, DataObject toBrowse) { switch (model.getState()) { case LOADING_DATA: case LOADING_LEAVES: model.cancel(); break; case DISCARDED: return; } if (model.getBrowserType() == FILE_SYSTEM_EXPLORER) { return; } if (model.getBrowserType() == ADMIN_EXPLORER) { refreshExperimenterData(); return; } a... | /**
* Implemented as specified by the {@link Browser} interface.
* @see Browser#refreshTree(Object, DataObject)
*/ | Implemented as specified by the <code>Browser</code> interface | refreshTree | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserComponent.java",
"license": "gpl-2.0",
"size": 78014
} | [
"java.util.HashMap",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.openmicroscopy.shoola.agents.treeviewer.RefreshExperimenterDef",
"org.openmicroscopy.shoola.agents.treeviewer.cmd.RefreshVisitor",
"org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewer",
"org.openmicroscopy.shool... | import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.openmicroscopy.shoola.agents.treeviewer.RefreshExperimenterDef; import org.openmicroscopy.shoola.agents.treeviewer.cmd.RefreshVisitor; import org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewer; import o... | import java.util.*; import org.openmicroscopy.shoola.agents.treeviewer.*; import org.openmicroscopy.shoola.agents.treeviewer.cmd.*; import org.openmicroscopy.shoola.agents.treeviewer.view.*; import org.openmicroscopy.shoola.agents.util.browser.*; import org.openmicroscopy.shoola.env.data.util.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,437,742 |
public final boolean isProtectionBlessingAffected()
{
return isAffected(EffectFlag.PROTECTION_BLESSING);
}
| final boolean function() { return isAffected(EffectFlag.PROTECTION_BLESSING); } | /**
* For Newbie Protection Blessing skill, keeps you safe from an attack by a chaotic character >= 10 levels apart from you.
* @return
*/ | For Newbie Protection Blessing skill, keeps you safe from an attack by a chaotic character >= 10 levels apart from you | isProtectionBlessingAffected | {
"repo_name": "rubenswagner/L2J-Global",
"path": "java/com/l2jglobal/gameserver/model/actor/L2Playable.java",
"license": "gpl-3.0",
"size": 8120
} | [
"com.l2jglobal.gameserver.model.effects.EffectFlag"
] | import com.l2jglobal.gameserver.model.effects.EffectFlag; | import com.l2jglobal.gameserver.model.effects.*; | [
"com.l2jglobal.gameserver"
] | com.l2jglobal.gameserver; | 64,811 |
private boolean includeInstance(String viewName, String version, String instanceName, boolean readOnly) {
ViewRegistry viewRegistry = ViewRegistry.getInstance();
return viewRegistry.checkPermission(viewName, version, instanceName, readOnly);
} | boolean function(String viewName, String version, String instanceName, boolean readOnly) { ViewRegistry viewRegistry = ViewRegistry.getInstance(); return viewRegistry.checkPermission(viewName, version, instanceName, readOnly); } | /**
* Determine whether or not the view instance resource identified
* by the given instance name should be included based on the permissions
* granted to the current user.
*
* @param viewName the view name
* @param version the view version
* @param instanceName the name of the view ins... | Determine whether or not the view instance resource identified by the given instance name should be included based on the permissions granted to the current user | includeInstance | {
"repo_name": "radicalbit/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java",
"license": "apache-2.0",
"size": 23145
} | [
"org.apache.ambari.server.view.ViewRegistry"
] | import org.apache.ambari.server.view.ViewRegistry; | import org.apache.ambari.server.view.*; | [
"org.apache.ambari"
] | org.apache.ambari; | 1,776,622 |
public PhoneNumber getExampleNumber(String regionCode) {
return getExampleNumberForType(regionCode, PhoneNumberType.FIXED_LINE);
} | PhoneNumber function(String regionCode) { return getExampleNumberForType(regionCode, PhoneNumberType.FIXED_LINE); } | /**
* Gets a valid number for the specified region.
*
* @param regionCode the region for which an example number is needed
* @return a valid fixed-line number for the specified region. Returns null when the metadata
* does not contain such information, or the region 001 is passed in. For 001 (repres... | Gets a valid number for the specified region | getExampleNumber | {
"repo_name": "leandrocohn/libphonenumber-7-0.5",
"path": "tools/java/java-build/target/test-classes/com/google/i18n/phonenumbers/PhoneNumberUtil.java",
"license": "apache-2.0",
"size": 161599
} | [
"com.google.i18n.phonenumbers.Phonenumber"
] | import com.google.i18n.phonenumbers.Phonenumber; | import com.google.i18n.phonenumbers.*; | [
"com.google.i18n"
] | com.google.i18n; | 1,993,943 |
@Deprecated
public ApiResponse optionDomainsAlwaysInScopeEnabled() throws ClientApiException {
return api.callApi("spider", "view", "optionDomainsAlwaysInScopeEnabled", null);
} | ApiResponse function() throws ClientApiException { return api.callApi(STR, "view", STR, null); } | /**
* Use view domainsAlwaysInScope instead.
*
* @deprecated
*/ | Use view domainsAlwaysInScope instead | optionDomainsAlwaysInScopeEnabled | {
"repo_name": "zaproxy/zap-api-java",
"path": "subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/gen/Spider.java",
"license": "apache-2.0",
"size": 21344
} | [
"org.zaproxy.clientapi.core.ApiResponse",
"org.zaproxy.clientapi.core.ClientApiException"
] | import org.zaproxy.clientapi.core.ApiResponse; import org.zaproxy.clientapi.core.ClientApiException; | import org.zaproxy.clientapi.core.*; | [
"org.zaproxy.clientapi"
] | org.zaproxy.clientapi; | 2,033,453 |
public boolean isLanguageLevelSupported(@NotNull final LanguageLevel level) {
return true;
} | boolean function(@NotNull final LanguageLevel level) { return true; } | /**
* Checks if task supports this language level
* @param level level to check
* @return true if supports
*/ | Checks if task supports this language level | isLanguageLevelSupported | {
"repo_name": "MichaelNedzelsky/intellij-community",
"path": "python/testSrc/com/jetbrains/env/PyTestTask.java",
"license": "apache-2.0",
"size": 2169
} | [
"com.jetbrains.python.psi.LanguageLevel",
"org.jetbrains.annotations.NotNull"
] | import com.jetbrains.python.psi.LanguageLevel; import org.jetbrains.annotations.NotNull; | import com.jetbrains.python.psi.*; import org.jetbrains.annotations.*; | [
"com.jetbrains.python",
"org.jetbrains.annotations"
] | com.jetbrains.python; org.jetbrains.annotations; | 806,551 |
private File copyBuildModel() {
File srcFolder = new File(baseLocation, "EASy");
File vilFolder = new File(targetFolder, COPIED_MODELS_LOCATION);
vilFolder.mkdirs();
try {
FileUtils.copyDirectory(srcFolder, vilFolder, new FileFilter() { | File function() { File srcFolder = new File(baseLocation, "EASy"); File vilFolder = new File(targetFolder, COPIED_MODELS_LOCATION); vilFolder.mkdirs(); try { FileUtils.copyDirectory(srcFolder, vilFolder, new FileFilter() { | /**
* Creates a copy of the build model and place the files parallel to the copied variability model files.
* @return The root folder of the copied model files.
*/ | Creates a copy of the build model and place the files parallel to the copied variability model files | copyBuildModel | {
"repo_name": "QualiMaster/QM-EASyProducer",
"path": "QualiMaster.Extension/src/eu/qualimaster/easy/extension/modelop/ModelModifier.java",
"license": "apache-2.0",
"size": 19258
} | [
"java.io.File",
"java.io.FileFilter",
"org.apache.commons.io.FileUtils"
] | import java.io.File; import java.io.FileFilter; import org.apache.commons.io.FileUtils; | import java.io.*; import org.apache.commons.io.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 2,602,810 |
public void delete(ElectronicInvoiceItemMapping row); | void function(ElectronicInvoiceItemMapping row); | /**
* Delete a ElectronicInvoiceItemMapping.
*
* @param row
*/ | Delete a ElectronicInvoiceItemMapping | delete | {
"repo_name": "kuali/kfs",
"path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/dataaccess/ElectronicInvoiceItemMappingDao.java",
"license": "agpl-3.0",
"size": 2463
} | [
"org.kuali.kfs.module.purap.businessobject.ElectronicInvoiceItemMapping"
] | import org.kuali.kfs.module.purap.businessobject.ElectronicInvoiceItemMapping; | import org.kuali.kfs.module.purap.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,914,169 |
protected Integer getIntParameter(String name, Integer defaultValue) {
try {
return getIntParameter(name);
} catch (MissingParameterException e) {
return defaultValue;
}
} | Integer function(String name, Integer defaultValue) { try { return getIntParameter(name); } catch (MissingParameterException e) { return defaultValue; } } | /**
* Get the value of a parameter that should be interpreted as an integer.
*
* @param name The name of the parameter.
* @param defaultValue The value to return if none is provided by the user.
* @return An integer
* @throw BadRequestException if the user provided a mal-formed value.
... | Get the value of a parameter that should be interpreted as an integer | getIntParameter | {
"repo_name": "tomck/intermine",
"path": "intermine/web/main/src/org/intermine/webservice/server/WebService.java",
"license": "lgpl-2.1",
"size": 38971
} | [
"org.intermine.webservice.server.exceptions.MissingParameterException"
] | import org.intermine.webservice.server.exceptions.MissingParameterException; | import org.intermine.webservice.server.exceptions.*; | [
"org.intermine.webservice"
] | org.intermine.webservice; | 221,809 |
@Override
public Number getStartValue(Comparable series, Comparable category) {
int seriesIndex = getSeriesIndex(series);
if (seriesIndex < 0) {
throw new UnknownKeyException("Unknown 'series' key.");
}
int itemIndex = getColumnIndex(category);
if (item... | Number function(Comparable series, Comparable category) { int seriesIndex = getSeriesIndex(series); if (seriesIndex < 0) { throw new UnknownKeyException(STR); } int itemIndex = getColumnIndex(category); if (itemIndex < 0) { throw new UnknownKeyException(STR); } return getStartValue(seriesIndex, itemIndex); } | /**
* Returns the start data value for one category in a series.
*
* @param series the required series.
* @param category the required category.
*
* @return The start data value for one category in a series
* (possibly <code>null</code>).
*
* @see #getStar... | Returns the start data value for one category in a series | getStartValue | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/data/category/DefaultIntervalCategoryDataset.java",
"license": "lgpl-3.0",
"size": 28629
} | [
"org.jfree.data.UnknownKeyException"
] | import org.jfree.data.UnknownKeyException; | import org.jfree.data.*; | [
"org.jfree.data"
] | org.jfree.data; | 45,791 |
EReference getAsset_AssetInfo(); | EReference getAsset_AssetInfo(); | /**
* Returns the meta object for the reference '{@link CIM.IEC61968.Assets.Asset#getAssetInfo <em>Asset Info</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Asset Info</em>'.
* @see CIM.IEC61968.Assets.Asset#getAssetInfo()
* @see #getAsset()
* @g... | Returns the meta object for the reference '<code>CIM.IEC61968.Assets.Asset#getAssetInfo Asset Info</code>'. | getAsset_AssetInfo | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Assets/AssetsPackage.java",
"license": "mit",
"size": 88490
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,317,960 |
Executions<List<GeoCoordinates>> geopos(K key, V... members);
/**
*
* Retrieve distance between points {@code from} and {@code to}. If one or more elements are missing {@literal null} is
* returned. Default in meters by, otherwise according to {@code unit} | Executions<List<GeoCoordinates>> geopos(K key, V... members); /** * * Retrieve distance between points {@code from} and {@code to}. If one or more elements are missing {@literal null} is * returned. Default in meters by, otherwise according to {@code unit} | /**
* Get geo coordinates for the {@code members}.
*
* @param key the key of the geo set
* @param members the members
*
* @return a list of {@link GeoCoordinates}s representing the x,y position of each element specified in the arguments. For
* missing elements {@literal null} ... | Get geo coordinates for the members | geopos | {
"repo_name": "CiNC0/Cartier",
"path": "cartier-redis/src/main/java/com/lambdaworks/redis/cluster/api/sync/NodeSelectionGeoCommands.java",
"license": "apache-2.0",
"size": 7069
} | [
"com.lambdaworks.redis.GeoCoordinates",
"java.util.List"
] | import com.lambdaworks.redis.GeoCoordinates; import java.util.List; | import com.lambdaworks.redis.*; import java.util.*; | [
"com.lambdaworks.redis",
"java.util"
] | com.lambdaworks.redis; java.util; | 1,080,126 |
public static RunningJob runJob(JobConf job) throws IOException {
JobClient jc = new JobClient(job);
RunningJob rj = jc.submitJob(job);
try {
if (!jc.monitorAndPrintJob(job, rj)) {
throw new IOException("Job failed!");
}
} catch (InterruptedException ie) {
Thread.currentThrea... | static RunningJob function(JobConf job) throws IOException { JobClient jc = new JobClient(job); RunningJob rj = jc.submitJob(job); try { if (!jc.monitorAndPrintJob(job, rj)) { throw new IOException(STR); } } catch (InterruptedException ie) { Thread.currentThread().interrupt(); } return rj; } | /**
* Utility that submits a job, then polls for progress until the job is
* complete.
*
* @param job the job configuration.
* @throws IOException if the job fails
*/ | Utility that submits a job, then polls for progress until the job is complete | runJob | {
"repo_name": "shakamunyi/hadoop-20",
"path": "src/mapred/org/apache/hadoop/mapred/JobClient.java",
"license": "apache-2.0",
"size": 86240
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 966,289 |
CDOSystemCoreFactory getCDOSystemCoreFactory();
interface Literals {
EClass CDO_SYSTEM_CONFIG = eINSTANCE.getCDOSystemConfig();
EReference CDO_SYSTEM_CONFIG__SYSTEM = eINSTANCE.getCDOSystemConfig_System();
EClass CDO_STORE_CONFIG = eINSTANCE.getCDOStoreConfig();
EAttribute CDO_STORE_CONFIG__A... | CDOSystemCoreFactory getCDOSystemCoreFactory(); interface Literals { EClass CDO_SYSTEM_CONFIG = eINSTANCE.getCDOSystemConfig(); EReference CDO_SYSTEM_CONFIG__SYSTEM = eINSTANCE.getCDOSystemConfig_System(); EClass CDO_STORE_CONFIG = eINSTANCE.getCDOStoreConfig(); EAttribute CDO_STORE_CONFIG__ADAPTER = eINSTANCE.getCDOSt... | /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/ | Returns the factory that creates the instances of the model. | getCDOSystemCoreFactory | {
"repo_name": "asupdev/asup",
"path": "org.asup.os.core.cdo/src/org/asup/os/core/cdo/CDOSystemCorePackage.java",
"license": "epl-1.0",
"size": 11411
} | [
"org.eclipse.emf.ecore.EAttribute",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,824,716 |
public RestTemplateBuilder customizers(
RestTemplateCustomizer... restTemplateCustomizers) {
Assert.notNull(restTemplateCustomizers,
"RestTemplateCustomizers must not be null");
return customizers(Arrays.asList(restTemplateCustomizers));
} | RestTemplateBuilder function( RestTemplateCustomizer... restTemplateCustomizers) { Assert.notNull(restTemplateCustomizers, STR); return customizers(Arrays.asList(restTemplateCustomizers)); } | /**
* Set the {@link RestTemplateCustomizer RestTemplateCustomizers} that should be
* applied to the {@link RestTemplate}. Customizers are applied in the order that they
* were added after builder configuration has been applied. Setting this value will
* replace any previously configured customizers.
* @param... | Set the <code>RestTemplateCustomizer RestTemplateCustomizers</code> that should be applied to the <code>RestTemplate</code>. Customizers are applied in the order that they were added after builder configuration has been applied. Setting this value will replace any previously configured customizers | customizers | {
"repo_name": "minmay/spring-boot",
"path": "spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java",
"license": "apache-2.0",
"size": 26861
} | [
"java.util.Arrays",
"org.springframework.util.Assert"
] | import java.util.Arrays; import org.springframework.util.Assert; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 2,325,746 |
public void translateToPoint(final Vector2D p) {
originOffset = MathArrays.linearCombination(cos, p.getY(), -sin, p.getX());
} | void function(final Vector2D p) { originOffset = MathArrays.linearCombination(cos, p.getY(), -sin, p.getX()); } | /** Translate the line to force it passing by a point.
* @param p point by which the line should pass
*/ | Translate the line to force it passing by a point | translateToPoint | {
"repo_name": "sdinot/hipparchus",
"path": "hipparchus-geometry/src/main/java/org/hipparchus/geometry/euclidean/twod/Line.java",
"license": "apache-2.0",
"size": 22054
} | [
"org.hipparchus.util.MathArrays"
] | import org.hipparchus.util.MathArrays; | import org.hipparchus.util.*; | [
"org.hipparchus.util"
] | org.hipparchus.util; | 733,833 |
private int rmInternal(String path, boolean mustBeFile) {
final AlluxioURI turi = mPathResolverCache.getUnchecked(path);
try {
if (!mFileSystem.exists(turi)) {
LOG.error("File {} does not exist", turi);
return -ErrorCodes.ENOENT();
}
final URIStatus status = mFileSystem.getS... | int function(String path, boolean mustBeFile) { final AlluxioURI turi = mPathResolverCache.getUnchecked(path); try { if (!mFileSystem.exists(turi)) { LOG.error(STR, turi); return -ErrorCodes.ENOENT(); } final URIStatus status = mFileSystem.getStatus(turi); if (mustBeFile && status.isFolder()) { LOG.error(STR, turi); re... | /**
* Convenience internal method to remove files or directories.
*
* @param path The path to remove
* @param mustBeFile When true, returns an error when trying to
* remove a directory
* @return 0 on success, a negative value on error
*/ | Convenience internal method to remove files or directories | rmInternal | {
"repo_name": "yuluo-ding/alluxio",
"path": "integration/fuse/src/main/java/alluxio/fuse/AlluxioFuseFileSystem.java",
"license": "apache-2.0",
"size": 22363
} | [
"java.io.IOException",
"ru.serce.jnrfuse.ErrorCodes"
] | import java.io.IOException; import ru.serce.jnrfuse.ErrorCodes; | import java.io.*; import ru.serce.jnrfuse.*; | [
"java.io",
"ru.serce.jnrfuse"
] | java.io; ru.serce.jnrfuse; | 53,601 |
private void addGrantedActionsToPrivilegeSet(XMLValue xmlValue, ObjectNode object, Enumeration actions) throws ServiceAccessException, ObjectNotFoundException, RevisionDescriptorNotFoundException {
while (actions.hasMoreElements()) {
Uri aNodeUri = nsaToken.getUri(sToken, (String)actions.nextEle... | void function(XMLValue xmlValue, ObjectNode object, Enumeration actions) throws ServiceAccessException, ObjectNotFoundException, RevisionDescriptorNotFoundException { while (actions.hasMoreElements()) { Uri aNodeUri = nsaToken.getUri(sToken, (String)actions.nextElement()); ObjectNode oNode = aNodeUri.getStore().retriev... | /**
* Build a set of privileges a subject has for an object for use in the
* result of <code>current-user-privilege-set</code> queries.
*
* This method modifies <code>xmlValue</code>.
*
* @param xmlValue The element to which to add the actions which have been
* granted... | Build a set of privileges a subject has for an object for use in the result of <code>current-user-privilege-set</code> queries. This method modifies <code>xmlValue</code> | addGrantedActionsToPrivilegeSet | {
"repo_name": "integrated/jakarta-slide-server",
"path": "maven/jakarta-slide-webdavservlet/src/main/java/org/apache/slide/webdav/util/PropertyHelper.java",
"license": "apache-2.0",
"size": 102956
} | [
"java.util.Enumeration",
"org.apache.slide.common.ServiceAccessException",
"org.apache.slide.common.Uri",
"org.apache.slide.content.RevisionDescriptorNotFoundException",
"org.apache.slide.structure.ActionNode",
"org.apache.slide.structure.ObjectNode",
"org.apache.slide.structure.ObjectNotFoundException"... | import java.util.Enumeration; import org.apache.slide.common.ServiceAccessException; import org.apache.slide.common.Uri; import org.apache.slide.content.RevisionDescriptorNotFoundException; import org.apache.slide.structure.ActionNode; import org.apache.slide.structure.ObjectNode; import org.apache.slide.structure.Obje... | import java.util.*; import org.apache.slide.common.*; import org.apache.slide.content.*; import org.apache.slide.structure.*; import org.apache.slide.util.*; | [
"java.util",
"org.apache.slide"
] | java.util; org.apache.slide; | 417,364 |
public boolean wantCallsFor(Method method) {
return true;
} | boolean function(Method method) { return true; } | /**
* Determine whether we are interested in calls for the given method.
* Subclasses may override. The default version returns true for every
* method.
*
* @param method
* the method
* @return true if we want call sites for the method, false if not
*/ | Determine whether we are interested in calls for the given method. Subclasses may override. The default version returns true for every method | wantCallsFor | {
"repo_name": "johnscancella/spotbugs",
"path": "spotbugs/src/main/java/edu/umd/cs/findbugs/SelfCalls.java",
"license": "lgpl-2.1",
"size": 7901
} | [
"org.apache.bcel.classfile.Method"
] | import org.apache.bcel.classfile.Method; | import org.apache.bcel.classfile.*; | [
"org.apache.bcel"
] | org.apache.bcel; | 377,274 |
public void update()
{
if (this.minecart.isDead)
{
this.donePlaying = true;
}
else
{
this.xPosF = (float)this.minecart.posX;
this.yPosF = (float)this.minecart.posY;
this.zPosF = (float)this.minecart.posZ;
float f... | void function() { if (this.minecart.isDead) { this.donePlaying = true; } else { this.xPosF = (float)this.minecart.posX; this.yPosF = (float)this.minecart.posY; this.zPosF = (float)this.minecart.posZ; float f = MathHelper.sqrt_double(this.minecart.motionX * this.minecart.motionX + this.minecart.motionZ * this.minecart.m... | /**
* Like the old updateEntity(), except more generic.
*/ | Like the old updateEntity(), except more generic | update | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/client/audio/MovingSoundMinecart.java",
"license": "gpl-3.0",
"size": 1596
} | [
"net.minecraft.util.math.MathHelper"
] | import net.minecraft.util.math.MathHelper; | import net.minecraft.util.math.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 2,775,135 |
public RMIServerSocketFactory getServerSocketFactory() {
return ((TCPEndpoint) ep).getServerSocketFactory();
} | RMIServerSocketFactory function() { return ((TCPEndpoint) ep).getServerSocketFactory(); } | /**
* Return the server socket factory associated with this ref.
*/ | Return the server socket factory associated with this ref | getServerSocketFactory | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/sun/rmi/transport/LiveRef.java",
"license": "gpl-2.0",
"size": 10726
} | [
"java.rmi.server.RMIServerSocketFactory"
] | import java.rmi.server.RMIServerSocketFactory; | import java.rmi.server.*; | [
"java.rmi"
] | java.rmi; | 390,404 |
public SupplierRecipe createConstructionRecipe(RecipeCreationContext ctx, TypeToken<?> type,
RecipeInstantiator recipeInstantiator) {
List<RecipeMembersInjector> memberInjectors = createRecipeMembersInjectors(ctx, type);
List<RecipeInitializer> initializers = createInitializers(ctx, type);
return ne... | SupplierRecipe function(RecipeCreationContext ctx, TypeToken<?> type, RecipeInstantiator recipeInstantiator) { List<RecipeMembersInjector> memberInjectors = createRecipeMembersInjectors(ctx, type); List<RecipeInitializer> initializers = createInitializers(ctx, type); return new SupplierRecipe() { | /**
* Create a construction recipe based on a {@link RecipeInstantiator} and the
* members injectors, initializers and enhancers configured here
*/ | Create a construction recipe based on a <code>RecipeInstantiator</code> and the members injectors, initializers and enhancers configured here | createConstructionRecipe | {
"repo_name": "ruediste/salta",
"path": "core/src/main/java/com/github/ruediste/salta/standard/config/StandardInjectorConfiguration.java",
"license": "apache-2.0",
"size": 21953
} | [
"com.github.ruediste.salta.core.RecipeCreationContext",
"com.github.ruediste.salta.core.compile.SupplierRecipe",
"com.github.ruediste.salta.standard.recipe.RecipeInitializer",
"com.github.ruediste.salta.standard.recipe.RecipeInstantiator",
"com.github.ruediste.salta.standard.recipe.RecipeMembersInjector",
... | import com.github.ruediste.salta.core.RecipeCreationContext; import com.github.ruediste.salta.core.compile.SupplierRecipe; import com.github.ruediste.salta.standard.recipe.RecipeInitializer; import com.github.ruediste.salta.standard.recipe.RecipeInstantiator; import com.github.ruediste.salta.standard.recipe.RecipeMembe... | import com.github.ruediste.salta.core.*; import com.github.ruediste.salta.core.compile.*; import com.github.ruediste.salta.standard.recipe.*; import com.google.common.reflect.*; import java.util.*; | [
"com.github.ruediste",
"com.google.common",
"java.util"
] | com.github.ruediste; com.google.common; java.util; | 2,677,878 |
public static boolean isPrimitive(TypeMirror type) {
switch (type.getKind()) {
case BOOLEAN:
case BYTE:
case CHAR:
case DOUBLE:
case FLOAT:
case INT:
case LONG:
case SHORT:
return true;
... | static boolean function(TypeMirror type) { switch (type.getKind()) { case BOOLEAN: case BYTE: case CHAR: case DOUBLE: case FLOAT: case INT: case LONG: case SHORT: return true; default: return false; } } | /**
* Returns true iff the argument is a primitive type.
*
* @return whether the argument is a primitive type
*/ | Returns true iff the argument is a primitive type | isPrimitive | {
"repo_name": "CharlesZ-Chen/checker-framework",
"path": "javacutil/src/org/checkerframework/javacutil/TypesUtils.java",
"license": "gpl-2.0",
"size": 16251
} | [
"javax.lang.model.type.TypeMirror"
] | import javax.lang.model.type.TypeMirror; | import javax.lang.model.type.*; | [
"javax.lang"
] | javax.lang; | 1,483,469 |
protected void childTypeAssignment(Production node, Node child)
throws ParseException {
node.addChild(child);
} | void function(Production node, Node child) throws ParseException { node.addChild(child); } | /**
* Called when adding a child to a parse tree node.
*
* @param node the parent node
* @param child the child node, or null
*
* @throws ParseException if the node analysis discovered errors
*/ | Called when adding a child to a parse tree node | childTypeAssignment | {
"repo_name": "richb-hanover/mibble-2.9.2",
"path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java",
"license": "gpl-2.0",
"size": 275483
} | [
"net.percederberg.grammatica.parser.Node",
"net.percederberg.grammatica.parser.ParseException",
"net.percederberg.grammatica.parser.Production"
] | import net.percederberg.grammatica.parser.Node; import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production; | import net.percederberg.grammatica.parser.*; | [
"net.percederberg.grammatica"
] | net.percederberg.grammatica; | 447,566 |
private boolean isHostAppRegistered(String packageName) {
Cursor cursor = null;
boolean isRegistered = false;
long extensionId = ExtensionUtils.getExtensionId(mContext);
String selection = Registration.ApiRegistrationColumns.EXTENSION_ID + " = " + extensionId
+ " AND ... | boolean function(String packageName) { Cursor cursor = null; boolean isRegistered = false; long extensionId = ExtensionUtils.getExtensionId(mContext); String selection = Registration.ApiRegistrationColumns.EXTENSION_ID + STR + extensionId + STR + Registration.ApiRegistrationColumns.HOST_APPLICATION_PACKAGE + STR; Strin... | /**
* Checks if the extension is registered with a host application.
*
* This method is called from the the background
*
* @param packageName The package name of the host application.
*
* @return True if the extension is registered with the host application.
*/ | Checks if the extension is registered with a host application. This method is called from the the background | isHostAppRegistered | {
"repo_name": "einvalentin/buildwatch",
"path": "3rdParty/SmartExtensionUtils/src/com/sonyericsson/extras/liveware/extension/util/registration/RegisterExtensionTask.java",
"license": "apache-2.0",
"size": 24572
} | [
"android.database.Cursor",
"com.sonyericsson.extras.liveware.aef.registration.Registration",
"com.sonyericsson.extras.liveware.extension.util.ExtensionUtils"
] | import android.database.Cursor; import com.sonyericsson.extras.liveware.aef.registration.Registration; import com.sonyericsson.extras.liveware.extension.util.ExtensionUtils; | import android.database.*; import com.sonyericsson.extras.liveware.aef.registration.*; import com.sonyericsson.extras.liveware.extension.util.*; | [
"android.database",
"com.sonyericsson.extras"
] | android.database; com.sonyericsson.extras; | 944,835 |
@Test()
public void testAdd()
throws Exception
{
final InMemoryDirectoryServerConfig cfg =
new InMemoryDirectoryServerConfig("dc=example,dc=com");
cfg.setSchema(Schema.getDefaultStandardSchema());
cfg.setCodeLogDetails(createTempFile().getAbsolutePath(), true);
final InMemoryDir... | @Test() void function() throws Exception { final InMemoryDirectoryServerConfig cfg = new InMemoryDirectoryServerConfig(STR); cfg.setSchema(Schema.getDefaultStandardSchema()); cfg.setCodeLogDetails(createTempFile().getAbsolutePath(), true); final InMemoryDirectoryServer ds = new InMemoryDirectoryServer(cfg); ds.add( STR... | /**
* Provides a various set of test cases for add operations.
*
* @throws Exception If an unexpected problem occurs.
*/ | Provides a various set of test cases for add operations | testAdd | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/listener/InMemoryDirectoryServerTestCase.java",
"license": "gpl-2.0",
"size": 211674
} | [
"com.unboundid.ldap.sdk.Attribute",
"com.unboundid.ldap.sdk.Entry",
"com.unboundid.ldap.sdk.LDAPException",
"com.unboundid.ldap.sdk.ResultCode",
"com.unboundid.ldap.sdk.schema.Schema",
"com.unboundid.ldif.LDIFException",
"org.testng.annotations.Test"
] | import com.unboundid.ldap.sdk.Attribute; import com.unboundid.ldap.sdk.Entry; import com.unboundid.ldap.sdk.LDAPException; import com.unboundid.ldap.sdk.ResultCode; import com.unboundid.ldap.sdk.schema.Schema; import com.unboundid.ldif.LDIFException; import org.testng.annotations.Test; | import com.unboundid.ldap.sdk.*; import com.unboundid.ldap.sdk.schema.*; import com.unboundid.ldif.*; import org.testng.annotations.*; | [
"com.unboundid.ldap",
"com.unboundid.ldif",
"org.testng.annotations"
] | com.unboundid.ldap; com.unboundid.ldif; org.testng.annotations; | 2,003,436 |
private void throwOnMissingRequiredAttribute(Set<ParamName> missingAttributes, String name)
throws EvalException {
if (!missingAttributes.isEmpty()) {
throw new EvalException(
name
+ " requires "
+ missingAttributes.stream()
.map(ParamName::getSn... | void function(Set<ParamName> missingAttributes, String name) throws EvalException { if (!missingAttributes.isEmpty()) { throw new EvalException( name + STR + missingAttributes.stream() .map(ParamName::getSnakeCase) .sorted(ParamInfo.NAME_COMPARATOR) .collect(Collectors.joining(STR)) + STR + STR + BUCK_RULE_DOC_URL_PREF... | /**
* Validates attributes passed to the rule and in case any required attribute is not provided,
* throws an {@link IllegalArgumentException}.
*
* @param name The build rule name. (e.g. {@code java_library}).
*/ | Validates attributes passed to the rule and in case any required attribute is not provided, throws an <code>IllegalArgumentException</code> | throwOnMissingRequiredAttribute | {
"repo_name": "JoelMarcey/buck",
"path": "src/com/facebook/buck/skylark/parser/RuleFunctionFactory.java",
"license": "apache-2.0",
"size": 8077
} | [
"com.facebook.buck.rules.coercer.ParamInfo",
"com.facebook.buck.rules.param.ParamName",
"java.util.Set",
"java.util.stream.Collectors",
"net.starlark.java.eval.EvalException"
] | import com.facebook.buck.rules.coercer.ParamInfo; import com.facebook.buck.rules.param.ParamName; import java.util.Set; import java.util.stream.Collectors; import net.starlark.java.eval.EvalException; | import com.facebook.buck.rules.coercer.*; import com.facebook.buck.rules.param.*; import java.util.*; import java.util.stream.*; import net.starlark.java.eval.*; | [
"com.facebook.buck",
"java.util",
"net.starlark.java"
] | com.facebook.buck; java.util; net.starlark.java; | 2,215,823 |
void aktualisiereBetriebsMeldungen(final SystemObject obj, final long zeit, final String text); | void aktualisiereBetriebsMeldungen(final SystemObject obj, final long zeit, final String text); | /**
* Empfaengt eine Betriebsmeldung.
*
* @param obj
* das mit der Meldung assoziierte Systemobjekt
* @param zeit
* Datenzeit der Betriebsmeldung
* @param text
* Meldungstext
*/ | Empfaengt eine Betriebsmeldung | aktualisiereBetriebsMeldungen | {
"repo_name": "bitctrl/de.bsvrz.sys.funclib.bitctrl.dua",
"path": "src/main/java/de/bsvrz/sys/funclib/bitctrl/dua/bm/IBmListener.java",
"license": "lgpl-3.0",
"size": 1542
} | [
"de.bsvrz.dav.daf.main.config.SystemObject"
] | import de.bsvrz.dav.daf.main.config.SystemObject; | import de.bsvrz.dav.daf.main.config.*; | [
"de.bsvrz.dav"
] | de.bsvrz.dav; | 1,769,728 |
public void setOffsetFixing(FrequencyBean offsetFixing) {
_offsetFixing = offsetFixing;
} | void function(FrequencyBean offsetFixing) { _offsetFixing = offsetFixing; } | /**
* Sets the offsetFixing.
* @param offsetFixing the offsetFixing
*/ | Sets the offsetFixing | setOffsetFixing | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-MasterDB/src/main/java/com/opengamma/masterdb/security/hibernate/swap/SwapLegBean.java",
"license": "apache-2.0",
"size": 9525
} | [
"com.opengamma.masterdb.security.hibernate.FrequencyBean"
] | import com.opengamma.masterdb.security.hibernate.FrequencyBean; | import com.opengamma.masterdb.security.hibernate.*; | [
"com.opengamma.masterdb"
] | com.opengamma.masterdb; | 130,258 |
@SuppressWarnings({"ForLoopReplaceableByForEach"})
private void executeBatchedQuery(SqlFieldsQueryEx qry, List<Integer> updCntsAcc,
IgniteBiTuple<Integer, String> firstErr, GridQueryCancel cancel) throws QueryCancelledException {
try {
if (cliCtx.isStream()) {
List<Lo... | @SuppressWarnings({STR}) void function(SqlFieldsQueryEx qry, List<Integer> updCntsAcc, IgniteBiTuple<Integer, String> firstErr, GridQueryCancel cancel) throws QueryCancelledException { try { if (cliCtx.isStream()) { List<Long> cnt = connCtx.kernalContext().query().streamBatchedUpdateQuery( qry.getSchema(), cliCtx, qry.... | /**
* Executes query and updates result counters.
*
* @param qry Query.
* @param updCntsAcc Per query rows updates counter.
* @param firstErr First error data - code and message.
* @param cancel Hook for query cancellation.
* @throws QueryCancelledException If query was cancelled duri... | Executes query and updates result counters | executeBatchedQuery | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequestHandler.java",
"license": "apache-2.0",
"size": 53003
} | [
"java.sql.BatchUpdateException",
"java.sql.Statement",
"java.util.Iterator",
"java.util.List",
"org.apache.ignite.cache.query.BulkLoadContextCursor",
"org.apache.ignite.cache.query.FieldsQueryCursor",
"org.apache.ignite.cache.query.QueryCancelledException",
"org.apache.ignite.internal.processors.cache... | import java.sql.BatchUpdateException; import java.sql.Statement; import java.util.Iterator; import java.util.List; import org.apache.ignite.cache.query.BulkLoadContextCursor; import org.apache.ignite.cache.query.FieldsQueryCursor; import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.in... | import java.sql.*; import java.util.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignit... | [
"java.sql",
"java.util",
"org.apache.ignite"
] | java.sql; java.util; org.apache.ignite; | 1,574,123 |
public static Trajectory readFromCSV(File file) {
return new Trajectory(PathfinderJNI.trajectoryDeserializeCSV(file.getAbsolutePath()));
}
public static class GenerationException extends Exception {
public GenerationException(String message) {
super(message);
}
... | static Trajectory function(File file) { return new Trajectory(PathfinderJNI.trajectoryDeserializeCSV(file.getAbsolutePath())); } public static class GenerationException extends Exception { public GenerationException(String message) { super(message); } } | /**
* Read a Trajectory from a CSV File
* @param file The file to read from
* @return The trajectory that was read from file
*/ | Read a Trajectory from a CSV File | readFromCSV | {
"repo_name": "Monsters-308/FRC2017",
"path": "src/main/java/jaci/pathfinder/Pathfinder.java",
"license": "bsd-3-clause",
"size": 3309
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,909,006 |
public void setSize (Dimension dim)
{
this.width = dim.getWidth();
this.height = dim.getHeight();
} // setSize | void function (Dimension dim) { this.width = dim.getWidth(); this.height = dim.getHeight(); } | /**
* Set Size
* @param dim dimension
*/ | Set Size | setSize | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-legacy/org/compiere/print/layout/Dimension2DImpl.java",
"license": "gpl-2.0",
"size": 4106
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 488,272 |
private void assertDefaultRealmWorks(String mechanism) throws Exception {
try (CLIWrapper cli = new CLIWrapper(true)) {
cli.sendLine(String.format(
"/subsystem=elytron/sasl-authentication-factory=%s:write-attribute(name=mechanism-configurations, value=[{mechanism-name=%s}])",... | void function(String mechanism) throws Exception { try (CLIWrapper cli = new CLIWrapper(true)) { cli.sendLine(String.format( STR, NAME, mechanism)); } ServerReload.reloadIfRequired(TestSuiteEnvironment.getModelControllerClient()); AuthenticationConfiguration authnCfg = AuthenticationConfiguration.empty() .setSaslMechan... | /**
* Tests if DIGEST-* mechanism with default realm used works correctly for both valid and invalid username/password
* combinations.
*
* @param mechanism DIGEST mechanism name
*/ | Tests if DIGEST-* mechanism with default realm used works correctly for both valid and invalid username/password combinations | assertDefaultRealmWorks | {
"repo_name": "JiriOndrusek/wildfly-core",
"path": "testsuite/elytron/src/test/java/org/wildfly/test/integration/elytron/sasl/mgmt/DefaultRealmDigestMgmtSaslTestCase.java",
"license": "lgpl-2.1",
"size": 6546
} | [
"org.jboss.as.test.integration.management.util.CLIWrapper",
"org.jboss.as.test.integration.management.util.ServerReload",
"org.jboss.as.test.shared.TestSuiteEnvironment",
"org.wildfly.core.testrunner.ServerSetup",
"org.wildfly.security.auth.client.AuthenticationConfiguration",
"org.wildfly.security.auth.c... | import org.jboss.as.test.integration.management.util.CLIWrapper; import org.jboss.as.test.integration.management.util.ServerReload; import org.jboss.as.test.shared.TestSuiteEnvironment; import org.wildfly.core.testrunner.ServerSetup; import org.wildfly.security.auth.client.AuthenticationConfiguration; import org.wildfl... | import org.jboss.as.test.integration.management.util.*; import org.jboss.as.test.shared.*; import org.wildfly.core.testrunner.*; import org.wildfly.security.auth.client.*; import org.wildfly.security.sasl.*; import org.wildfly.test.integration.elytron.sasl.mgmt.*; import org.wildfly.test.security.common.*; | [
"org.jboss.as",
"org.wildfly.core",
"org.wildfly.security",
"org.wildfly.test"
] | org.jboss.as; org.wildfly.core; org.wildfly.security; org.wildfly.test; | 264,202 |
public Node[] toArray() {
final List<Node> preorder = new ArrayList<>();
printAST(new StringBuilder(), preorder, null, "root", root, 0);
return preorder.toArray(new Node[0]);
} | Node[] function() { final List<Node> preorder = new ArrayList<>(); printAST(new StringBuilder(), preorder, null, "root", root, 0); return preorder.toArray(new Node[0]); } | /**
* Return the visited nodes in an ordered list
* @return the list of nodes in order
*/ | Return the visited nodes in an ordered list | toArray | {
"repo_name": "md-5/jdk10",
"path": "src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/debug/ASTWriter.java",
"license": "gpl-2.0",
"size": 10135
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,024,437 |
public void testGet() throws Exception
{
try {
CommunistGovt searchObject = new CommunistGovt();
Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.twolevelinheritance.sametable.CommunistGovt",searchObject );
String id = "";
if(results != null... | void function() throws Exception { try { CommunistGovt searchObject = new CommunistGovt(); Collection results = getApplicationService().search(STR,searchObject ); String id = STRSTR/rest/CommunistGovt/STRapplication/xmlSTRapplication/xmlSTRresponseSTRresponseSTRFailed : HTTP error code : STRCommunistGovt"+"XML.xmlSTRwr... | /**
* Uses Nested Search Criteria for search
* Verifies that the results are returned
* Verifies size of the result set
* Verifies that none of the attributes are null
*
* @throws Exception
*/ | Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of the result set Verifies that none of the attributes are null | testGet | {
"repo_name": "NCIP/cacore-sdk",
"path": "sdk-toolkit/iso-example-project/junit/src/test/gov/nih/nci/cacoresdk/domain/inheritance/twolevelinheritance/sametable/CommunistGovtResourceTest.java",
"license": "bsd-3-clause",
"size": 6026
} | [
"gov.nih.nci.cacoresdk.domain.inheritance.twolevelinheritance.sametable.CommunistGovt",
"java.util.Collection"
] | import gov.nih.nci.cacoresdk.domain.inheritance.twolevelinheritance.sametable.CommunistGovt; import java.util.Collection; | import gov.nih.nci.cacoresdk.domain.inheritance.twolevelinheritance.sametable.*; import java.util.*; | [
"gov.nih.nci",
"java.util"
] | gov.nih.nci; java.util; | 1,720,698 |
public TimeUnit getUnit() {
return unit;
} | TimeUnit function() { return unit; } | /**
* Returns the time unit for {@link #getPeriod()}.
*/ | Returns the time unit for <code>#getPeriod()</code> | getUnit | {
"repo_name": "jabubake/google-cloud-java",
"path": "google-cloud-core/src/main/java/com/google/cloud/WaitForOption.java",
"license": "apache-2.0",
"size": 6988
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,907,179 |
Resource getBinaryResource(String path); | Resource getBinaryResource(String path); | /**
* Retrieves a binary config file using the defaults profiles and labels.
* @param path config file path relative to spring application folder
* @return plain text file retrieved from config server
* @throws IllegalArgumentException when application name or Config Server url is
* undefined.
* @throws Htt... | Retrieves a binary config file using the defaults profiles and labels | getBinaryResource | {
"repo_name": "pivotal-cf/spring-cloud-services-connector",
"path": "spring-cloud-services-spring-connector/src/main/java/io/pivotal/spring/cloud/service/config/BinaryResourceConfigClient.java",
"license": "apache-2.0",
"size": 1915
} | [
"org.springframework.core.io.Resource"
] | import org.springframework.core.io.Resource; | import org.springframework.core.io.*; | [
"org.springframework.core"
] | org.springframework.core; | 381,999 |
public String getAgentInitials()
{
Collection c = getAgents();
StringBuilder initialsbuf = new StringBuilder();
if (c.isEmpty())
{
return "";
}
Iterator it = c.iterator();
while (it.hasNext())
{
try
{
AgentResults ar = (AgentResults) it.next();
... | String function() { Collection c = getAgents(); StringBuilder initialsbuf = new StringBuilder(); if (c.isEmpty()) { return ""; } Iterator it = c.iterator(); while (it.hasNext()) { try { AgentResults ar = (AgentResults) it.next(); String initial = ar.getLastInitial(); initialsbuf.append(initial); } catch (Exception ex) ... | /** This is a read-only calculated property.
* @return list of uppercase student initials
*/ | This is a read-only calculated property | getAgentInitials | {
"repo_name": "rodriguezdevera/sakai",
"path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/evaluation/TotalScoresBean.java",
"license": "apache-2.0",
"size": 33629
} | [
"java.util.Collection",
"java.util.Iterator"
] | import java.util.Collection; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,721,581 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ActionGroupResourceInner> listByResourceGroup(String resourceGroupName) {
return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ActionGroupResourceInner> function(String resourceGroupName) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } | /**
* Get a list of all action groups in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeE... | Get a list of all action groups in a resource group | listByResourceGroup | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/ActionGroupsClientImpl.java",
"license": "mit",
"size": 58951
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.monitor.fluent.models.ActionGroupResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.monitor.fluent.models.ActionGroupResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.monitor.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 791,113 |
Builder executorFactory(ExecutorFactory<ExecutorService> executorFactory) {
this.executorFactory = executorFactory;
return this;
} | Builder executorFactory(ExecutorFactory<ExecutorService> executorFactory) { this.executorFactory = executorFactory; return this; } | /**
* Sets the executor factory, used to manage the executor that will run message processor
* callbacks message consumer.
*/ | Sets the executor factory, used to manage the executor that will run message processor callbacks message consumer | executorFactory | {
"repo_name": "jabubake/google-cloud-java",
"path": "google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/deprecated/MessageConsumerImpl.java",
"license": "apache-2.0",
"size": 10554
} | [
"com.google.cloud.GrpcServiceOptions",
"java.util.concurrent.ExecutorService"
] | import com.google.cloud.GrpcServiceOptions; import java.util.concurrent.ExecutorService; | import com.google.cloud.*; import java.util.concurrent.*; | [
"com.google.cloud",
"java.util"
] | com.google.cloud; java.util; | 2,206,145 |
private static ProductionRule getProductionRule(final UnitType unitType, final PlayerId player) {
final ProductionFrontier frontier = player.getProductionFrontier();
if (frontier == null) {
return null;
}
for (final ProductionRule rule : frontier) {
if (rule.getResults().getInt(unitType) =... | static ProductionRule function(final UnitType unitType, final PlayerId player) { final ProductionFrontier frontier = player.getProductionFrontier(); if (frontier == null) { return null; } for (final ProductionRule rule : frontier) { if (rule.getResults().getInt(unitType) == 1) { return rule; } } return null; } | /**
* Get the production rule for the given player, for the given unit type.
*
* <p>If no such rule can be found, then return null.
*/ | Get the production rule for the given player, for the given unit type. If no such rule can be found, then return null | getProductionRule | {
"repo_name": "ssoloff/triplea-game-triplea",
"path": "game-core/src/main/java/games/strategy/triplea/ai/AiUtils.java",
"license": "gpl-3.0",
"size": 9448
} | [
"games.strategy.engine.data.PlayerId",
"games.strategy.engine.data.ProductionFrontier",
"games.strategy.engine.data.ProductionRule",
"games.strategy.engine.data.UnitType"
] | import games.strategy.engine.data.PlayerId; import games.strategy.engine.data.ProductionFrontier; import games.strategy.engine.data.ProductionRule; import games.strategy.engine.data.UnitType; | import games.strategy.engine.data.*; | [
"games.strategy.engine"
] | games.strategy.engine; | 798,115 |
@Override
public CompiledMethod specialCompile(NormalMethod source) {
CompilationPlan plan = new CompilationPlan(source, optimizationPlan, null, options);
return OptimizingCompiler.compile(plan);
}
private static OptOptions options;
private static OptimizationPlanElement[] optimizationPlan; | CompiledMethod function(NormalMethod source) { CompilationPlan plan = new CompilationPlan(source, optimizationPlan, null, options); return OptimizingCompiler.compile(plan); } private static OptOptions options; private static OptimizationPlanElement[] optimizationPlan; | /**
* Generate code to specialize a method in this context. Namely, invoke
* the opt compiler with the INVOKEE_THREAD_LOCAL option.
* @param source
*/ | Generate code to specialize a method in this context. Namely, invoke the opt compiler with the INVOKEE_THREAD_LOCAL option | specialCompile | {
"repo_name": "CodeOffloading/JikesRVM-CCO",
"path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/specialization/InvokeeThreadLocalContext.java",
"license": "epl-1.0",
"size": 3218
} | [
"org.jikesrvm.classloader.NormalMethod",
"org.jikesrvm.compilers.common.CompiledMethod",
"org.jikesrvm.compilers.opt.OptOptions",
"org.jikesrvm.compilers.opt.driver.CompilationPlan",
"org.jikesrvm.compilers.opt.driver.OptimizationPlanElement",
"org.jikesrvm.compilers.opt.driver.OptimizingCompiler"
] | import org.jikesrvm.classloader.NormalMethod; import org.jikesrvm.compilers.common.CompiledMethod; import org.jikesrvm.compilers.opt.OptOptions; import org.jikesrvm.compilers.opt.driver.CompilationPlan; import org.jikesrvm.compilers.opt.driver.OptimizationPlanElement; import org.jikesrvm.compilers.opt.driver.Optimizing... | import org.jikesrvm.classloader.*; import org.jikesrvm.compilers.common.*; import org.jikesrvm.compilers.opt.*; import org.jikesrvm.compilers.opt.driver.*; | [
"org.jikesrvm.classloader",
"org.jikesrvm.compilers"
] | org.jikesrvm.classloader; org.jikesrvm.compilers; | 315,267 |
private ArtifactType determineModuleType(ModuleDefinition moduleDefinition) {
// Parser has already taken care of source/sink destinations, etc
boolean hasOutput = moduleDefinition.getParameters().containsKey(BindingPropertyKeys.OUTPUT_DESTINATION);
boolean hasInput = moduleDefinition.getParameters().containsK... | ArtifactType function(ModuleDefinition moduleDefinition) { boolean hasOutput = moduleDefinition.getParameters().containsKey(BindingPropertyKeys.OUTPUT_DESTINATION); boolean hasInput = moduleDefinition.getParameters().containsKey(BindingPropertyKeys.INPUT_DESTINATION); if (hasInput && hasOutput) { return ArtifactType.pr... | /**
* Return the {@link ArtifactType} for a {@link ModuleDefinition} in the context
* of a defined stream.
*
* @param moduleDefinition the module for which to determine the type
* @return {@link ArtifactType} for the given module
*/ | Return the <code>ArtifactType</code> for a <code>ModuleDefinition</code> in the context of a defined stream | determineModuleType | {
"repo_name": "pperalta/spring-cloud-dataflow",
"path": "spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/StreamDeploymentController.java",
"license": "apache-2.0",
"size": 16537
} | [
"org.springframework.cloud.dataflow.core.ArtifactType",
"org.springframework.cloud.dataflow.core.BindingPropertyKeys",
"org.springframework.cloud.dataflow.core.ModuleDefinition"
] | import org.springframework.cloud.dataflow.core.ArtifactType; import org.springframework.cloud.dataflow.core.BindingPropertyKeys; import org.springframework.cloud.dataflow.core.ModuleDefinition; | import org.springframework.cloud.dataflow.core.*; | [
"org.springframework.cloud"
] | org.springframework.cloud; | 1,890,610 |
void createTableSegment(String tableSegmentName, Duration elapsed); | void createTableSegment(String tableSegmentName, Duration elapsed); | /**
* Notifies a Table Segment has been created.
*
* @param tableSegmentName Table Segment Name.
* @param elapsed Elapsed time.
*/ | Notifies a Table Segment has been created | createTableSegment | {
"repo_name": "pravega/pravega",
"path": "segmentstore/server/host/src/main/java/io/pravega/segmentstore/server/host/stat/TableSegmentStatsRecorder.java",
"license": "apache-2.0",
"size": 4699
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 2,734,021 |
public static FeatureCollection createFeatureCollection( String id, Feature[] features, QualifiedName qName ) {
return new DefaultFeatureCollection( id, features, qName );
}
| static FeatureCollection function( String id, Feature[] features, QualifiedName qName ) { return new DefaultFeatureCollection( id, features, qName ); } | /**
* creates an instance of a FeatureCollection from an array of Features. The returned FeatureCollection doesn't have
* a FeatureType nor properties. It is just a collection of Features. With it's name set to the given qualifiedName
*
* @param id
* unique id of the <code>Feat... | creates an instance of a FeatureCollection from an array of Features. The returned FeatureCollection doesn't have a FeatureType nor properties. It is just a collection of Features. With it's name set to the given qualifiedName | createFeatureCollection | {
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/model/feature/FeatureFactory.java",
"license": "lgpl-2.1",
"size": 18003
} | [
"org.deegree.datatypes.QualifiedName"
] | import org.deegree.datatypes.QualifiedName; | import org.deegree.datatypes.*; | [
"org.deegree.datatypes"
] | org.deegree.datatypes; | 1,665,745 |
private void parseTitleString(BibEntry be, BufferedReader in) throws IOException {
// skip article number
this.lastLine = this.lastLine.substring(this.lastLine.indexOf('.') + 1, this.lastLine.length());
be.setField(FieldName.TITLE, readMultipleLines(in));
} | void function(BibEntry be, BufferedReader in) throws IOException { this.lastLine = this.lastLine.substring(this.lastLine.indexOf('.') + 1, this.lastLine.length()); be.setField(FieldName.TITLE, readMultipleLines(in)); } | /**
* Implements grammar rule "TitleString".
*
* @param be
* @throws IOException
*/ | Implements grammar rule "TitleString" | parseTitleString | {
"repo_name": "tschechlovdev/jabref",
"path": "src/main/java/net/sf/jabref/logic/importer/fileformat/RepecNepImporter.java",
"license": "mit",
"size": 16745
} | [
"java.io.BufferedReader",
"java.io.IOException",
"net.sf.jabref.model.entry.BibEntry",
"net.sf.jabref.model.entry.FieldName"
] | import java.io.BufferedReader; import java.io.IOException; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.model.entry.FieldName; | import java.io.*; import net.sf.jabref.model.entry.*; | [
"java.io",
"net.sf.jabref"
] | java.io; net.sf.jabref; | 614,930 |
public Node getSpecifiedChildNode(Node parentNode, String childNodeName) {
if (!parentNode.hasChildNodes()) {
throw new RuntimeException("Passed parent node has no children");
}
NodeList childNodes = parentNode.getChildNodes();
int numberOfChildNodes = childNodes.getLength();
for (int i=0;i<numberOfC... | Node function(Node parentNode, String childNodeName) { if (!parentNode.hasChildNodes()) { throw new RuntimeException(STR); } NodeList childNodes = parentNode.getChildNodes(); int numberOfChildNodes = childNodes.getLength(); for (int i=0;i<numberOfChildNodes;i++) { Node childNode = childNodes.item(i); if (childNode.getN... | /**
* Get the specified child name (first one the matched) from the passed
* parent Node.
*
* @param parentNode
* @param childNodeName
* @return
*/ | Get the specified child name (first one the matched) from the passed parent Node | getSpecifiedChildNode | {
"repo_name": "eswdd/disco",
"path": "disco-test/disco-test-utils/src/main/java/uk/co/exemel/testing/utils/disco/misc/XMLHelpers.java",
"license": "apache-2.0",
"size": 10686
} | [
"org.w3c.dom.Node",
"org.w3c.dom.NodeList"
] | import org.w3c.dom.Node; import org.w3c.dom.NodeList; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,746,787 |
private void writeCommonEventData(BinaryRawWriterEx writer, EventAdapter evt) {
PlatformUtils.writeIgniteUuid(writer, evt.id());
writer.writeLong(evt.localOrder());
writeNode(writer, evt.node());
writer.writeString(evt.message());
writer.writeInt(evt.type());
writer.w... | void function(BinaryRawWriterEx writer, EventAdapter evt) { PlatformUtils.writeIgniteUuid(writer, evt.id()); writer.writeLong(evt.localOrder()); writeNode(writer, evt.node()); writer.writeString(evt.message()); writer.writeInt(evt.type()); writer.writeString(evt.name()); writer.writeTimestamp(new Timestamp(evt.timestam... | /**
* Write common event data.
*
* @param writer Writer.
* @param evt Event.
*/ | Write common event data | writeCommonEventData | {
"repo_name": "VladimirErshov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContextImpl.java",
"license": "apache-2.0",
"size": 25096
} | [
"java.sql.Timestamp",
"org.apache.ignite.events.EventAdapter",
"org.apache.ignite.internal.binary.BinaryRawWriterEx",
"org.apache.ignite.internal.processors.platform.utils.PlatformUtils"
] | import java.sql.Timestamp; import org.apache.ignite.events.EventAdapter; import org.apache.ignite.internal.binary.BinaryRawWriterEx; import org.apache.ignite.internal.processors.platform.utils.PlatformUtils; | import java.sql.*; import org.apache.ignite.events.*; import org.apache.ignite.internal.binary.*; import org.apache.ignite.internal.processors.platform.utils.*; | [
"java.sql",
"org.apache.ignite"
] | java.sql; org.apache.ignite; | 2,145,849 |
public void testSimple() throws Exception {
for (TransactionConcurrency concurrency : TransactionConcurrency.values())
for (TransactionIsolation isolation : TransactionIsolation.values()) {
for (int op = 0; op < 4; op++)
testSimple0(concurrency, isolation, op)... | void function() throws Exception { for (TransactionConcurrency concurrency : TransactionConcurrency.values()) for (TransactionIsolation isolation : TransactionIsolation.values()) { for (int op = 0; op < 4; op++) testSimple0(concurrency, isolation, op); } } | /**
* Tests timeouts in all tx configurations.
*
* @throws Exception If failed.
*/ | Tests timeouts in all tx configurations | testSimple | {
"repo_name": "psadusumilli/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java",
"license": "apache-2.0",
"size": 27550
} | [
"org.apache.ignite.transactions.TransactionConcurrency",
"org.apache.ignite.transactions.TransactionIsolation"
] | import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; | import org.apache.ignite.transactions.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 681,212 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.