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 View getSecondaryMenu() { return mViewBehind.getSecondaryContent(); }
View function() { return mViewBehind.getSecondaryContent(); }
/** * Retrieves the current secondary menu (right). * @return the current menu */
Retrieves the current secondary menu (right)
getSecondaryMenu
{ "repo_name": "ribbon-xx/VTVPro-Plus", "path": "VtvPro/src/mdn/vtvsport/slidingmenu/SlidingMenu.java", "license": "apache-2.0", "size": 28267 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,363,316
public void readValue(Buf buf, long offset, Object valueArray ) throws IOException { dataType_.readValues( buf, offset, nelPerItem_, valueArray, nItem_ ); }
void function(Buf buf, long offset, Object valueArray ) throws IOException { dataType_.readValues( buf, offset, nelPerItem_, valueArray, nItem_ ); }
/** * Reads a value from a data buffer into a workspace array. * * @param buf data buffer * @param offset byte offset into buf of data start * @param valueArray object created by <code>createValueArray</code> * into which results will be read */
Reads a value from a data buffer into a workspace array
readValue
{ "repo_name": "mandar2812/PlasmaML", "path": "mag-core/src/main/java/io/github/mandar2812/PlasmaML/cdf/record/DataReader.java", "license": "lgpl-2.1", "size": 2117 }
[ "io.github.mandar2812.PlasmaML", "java.io.IOException" ]
import io.github.mandar2812.PlasmaML; import java.io.IOException;
import io.github.mandar2812.*; import java.io.*;
[ "io.github.mandar2812", "java.io" ]
io.github.mandar2812; java.io;
1,192,151
@CallSuper @SuppressWarnings("ConstantConditions") protected void setDragHandleView(@NonNull View view) { if (view != null) { view.setOnTouchListener(this); } }
@SuppressWarnings(STR) void function(@NonNull View view) { if (view != null) { view.setOnTouchListener(this); } }
/** * Sets the inner view which will be used to drag this itemView. * * @param view handle view * @see #onTouch(View, MotionEvent) * @since 5.0.0-b1 */
Sets the inner view which will be used to drag this itemView
setDragHandleView
{ "repo_name": "davideas/FlexibleAdapter", "path": "flexible-adapter/src/main/java/eu/davidea/viewholders/FlexibleViewHolder.java", "license": "apache-2.0", "size": 17639 }
[ "android.view.View", "androidx.annotation.NonNull" ]
import android.view.View; import androidx.annotation.NonNull;
import android.view.*; import androidx.annotation.*;
[ "android.view", "androidx.annotation" ]
android.view; androidx.annotation;
2,328,283
@Test public void testTypeID() { final TypeImpl.Builder builder = new TypeImpl.Builder(); final int expected = randomInteger(0, Integer.MAX_VALUE - 1); builder.typeID(expected); final Type testSubject = builder.build(); assertThat(testSubject.getTypeID(), equalTo(expected)); assertThat...
void function() { final TypeImpl.Builder builder = new TypeImpl.Builder(); final int expected = randomInteger(0, Integer.MAX_VALUE - 1); builder.typeID(expected); final Type testSubject = builder.build(); assertThat(testSubject.getTypeID(), equalTo(expected)); assertThat(testSubject.getGroupID(), equalTo(0)); assertTha...
/** * TypeID test. */
TypeID test
testTypeID
{ "repo_name": "jevetools/data.model", "path": "com.jevetools.data.model.api.impl.tests/src/com/jevetools/data/model/api/inventory/impl/tests/TypeImplTest.java", "license": "bsd-3-clause", "size": 27080 }
[ "com.jevetools.data.model.api.inventory.Type", "com.jevetools.data.model.api.inventory.impl.TypeImpl", "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import com.jevetools.data.model.api.inventory.Type; import com.jevetools.data.model.api.inventory.impl.TypeImpl; import org.hamcrest.CoreMatchers; import org.junit.Assert;
import com.jevetools.data.model.api.inventory.*; import com.jevetools.data.model.api.inventory.impl.*; import org.hamcrest.*; import org.junit.*;
[ "com.jevetools.data", "org.hamcrest", "org.junit" ]
com.jevetools.data; org.hamcrest; org.junit;
2,514,793
@ApiOperation(value="Get list of user services") @RequestMapping(value = "/api/services/me", method = RequestMethod.GET) public @ResponseBody ResponseEntity<List<ServiceDTO>> getMyServices() throws Exception { // exclude core services (with empty namespace) return ResponseEntity.ok(serviceManager.getUserServic...
@ApiOperation(value=STR) @RequestMapping(value = STR, method = RequestMethod.GET) @ResponseBody ResponseEntity<List<ServiceDTO>> function() throws Exception { return ResponseEntity.ok(serviceManager.getUserServices(userManager.getUserOrOwner()).stream().filter(s -> !StringUtils.isEmpty(s.getNamespace())).collect(Collec...
/** * Read services managed by current user * @param name text search filter to apply to service name * @param page paging configuration * @return {@link Response} entity containing the service {@link Service} descriptors */
Read services managed by current user
getMyServices
{ "repo_name": "smartcommunitylab/AAC", "path": "src/main/java/it/smartcommunitylab/aac/controller/ServiceController.java", "license": "apache-2.0", "size": 8817 }
[ "io.swagger.annotations.ApiOperation", "it.smartcommunitylab.aac.dto.ServiceDTO", "java.util.List", "java.util.stream.Collectors", "org.springframework.http.ResponseEntity", "org.springframework.util.StringUtils", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind....
import io.swagger.annotations.ApiOperation; import it.smartcommunitylab.aac.dto.ServiceDTO; import java.util.List; import java.util.stream.Collectors; import org.springframework.http.ResponseEntity; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.sp...
import io.swagger.annotations.*; import it.smartcommunitylab.aac.dto.*; import java.util.*; import java.util.stream.*; import org.springframework.http.*; import org.springframework.util.*; import org.springframework.web.bind.annotation.*;
[ "io.swagger.annotations", "it.smartcommunitylab.aac", "java.util", "org.springframework.http", "org.springframework.util", "org.springframework.web" ]
io.swagger.annotations; it.smartcommunitylab.aac; java.util; org.springframework.http; org.springframework.util; org.springframework.web;
1,549,291
@Test public void testRunTwoTiersTwoReplicants() throws Exception { mockCoordinator(); mockPeon.loadSegment(EasyMock.<DataSegment>anyObject(), EasyMock.<LoadPeonCallback>anyObject()); EasyMock.expectLastCall().atLeastOnce(); EasyMock.expect(mockPeon.getSegmentsToLoad()).andReturn(Sets.<DataSegment...
void function() throws Exception { mockCoordinator(); mockPeon.loadSegment(EasyMock.<DataSegment>anyObject(), EasyMock.<LoadPeonCallback>anyObject()); EasyMock.expectLastCall().atLeastOnce(); EasyMock.expect(mockPeon.getSegmentsToLoad()).andReturn(Sets.<DataSegment>newHashSet()).atLeastOnce(); EasyMock.expect(mockPeon....
/** * Nodes: * hot - 2 replicants * cold - 1 replicant * * @throws Exception */
Nodes: hot - 2 replicants cold - 1 replicant
testRunTwoTiersTwoReplicants
{ "repo_name": "lcp0578/druid", "path": "server/src/test/java/io/druid/server/coordinator/DruidCoordinatorRuleRunnerTest.java", "license": "apache-2.0", "size": 45040 }
[ "com.google.common.collect.ImmutableMap", "com.google.common.collect.Lists", "com.google.common.collect.MinMaxPriorityQueue", "com.google.common.collect.Ordering", "com.google.common.collect.Sets", "io.druid.client.DruidServer", "io.druid.server.coordinator.rules.IntervalLoadRule", "io.druid.server.co...
import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.collect.MinMaxPriorityQueue; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import io.druid.client.DruidServer; import io.druid.server.coordinator.rules.IntervalLoadRule; im...
import com.google.common.collect.*; import io.druid.client.*; import io.druid.server.coordinator.rules.*; import io.druid.timeline.*; import java.util.*; import org.easymock.*; import org.joda.time.*; import org.junit.*;
[ "com.google.common", "io.druid.client", "io.druid.server", "io.druid.timeline", "java.util", "org.easymock", "org.joda.time", "org.junit" ]
com.google.common; io.druid.client; io.druid.server; io.druid.timeline; java.util; org.easymock; org.joda.time; org.junit;
486,759
public boolean waitForWindowFocus(long durationMillis) { long elapsedMillis = SystemClock.elapsedRealtime(); synchronized(mHasWindowFocusLock) { mHasWindowFocus = hasWindowFocus(); while (!mHasWindowFocus && durationMillis > 0) { long newElapsedMillis = System...
boolean function(long durationMillis) { long elapsedMillis = SystemClock.elapsedRealtime(); synchronized(mHasWindowFocusLock) { mHasWindowFocus = hasWindowFocus(); while (!mHasWindowFocus && durationMillis > 0) { long newElapsedMillis = SystemClock.elapsedRealtime(); durationMillis -= (newElapsedMillis - elapsedMillis)...
/** * Blocks the calling thread until the {@link KeyListenerCtsActivity} has window focus or the * specified duration (in milliseconds) has passed. */
Blocks the calling thread until the <code>KeyListenerCtsActivity</code> has window focus or the specified duration (in milliseconds) has passed
waitForWindowFocus
{ "repo_name": "wiki2014/Learning-Summary", "path": "alps/cts/tests/tests/text/src/android/text/method/cts/KeyListenerCtsActivity.java", "license": "gpl-3.0", "size": 3389 }
[ "android.os.SystemClock" ]
import android.os.SystemClock;
import android.os.*;
[ "android.os" ]
android.os;
2,547,881
int computeReplicationWork(int blocksToProcess) { List<List<Block>> blocksToReplicate = null; namesystem.writeLock(); try { // Choose the blocks to be replicated blocksToReplicate = neededReplications .chooseUnderReplicatedBlocks(blocksToProcess); } finally { namesystem.wri...
int computeReplicationWork(int blocksToProcess) { List<List<Block>> blocksToReplicate = null; namesystem.writeLock(); try { blocksToReplicate = neededReplications .chooseUnderReplicatedBlocks(blocksToProcess); } finally { namesystem.writeUnlock(); } return computeReplicationWorkForBlocks(blocksToReplicate); }
/** * Scan blocks in {@link #neededReplications} and assign replication * work to data-nodes they belong to. * * The number of process blocks equals either twice the number of live * data-nodes or the number of under-replicated blocks whichever is less. * * @return number of blocks scheduled for re...
Scan blocks in <code>#neededReplications</code> and assign replication work to data-nodes they belong to. The number of process blocks equals either twice the number of live data-nodes or the number of under-replicated blocks whichever is less
computeReplicationWork
{ "repo_name": "Wajihulhassan/Hadoop-2.7.0", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java", "license": "apache-2.0", "size": 146618 }
[ "java.util.List", "org.apache.hadoop.hdfs.protocol.Block" ]
import java.util.List; import org.apache.hadoop.hdfs.protocol.Block;
import java.util.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
384,540
public List<Item> findAll() { return this.items; }
List<Item> function() { return this.items; }
/** * Finds all tasks. * * @return List of all tasks. */
Finds all tasks
findAll
{ "repo_name": "LuxCore/dkitrish", "path": "1.Trainee/002.OOP/src/main/java/ru/job4j/tracker/Tracker.java", "license": "apache-2.0", "size": 2178 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
264,982
protected final void immutableSetType(@NotNull final T type) { m__strType = type; }
final void function(@NotNull final T type) { m__strType = type; }
/** * Specifies the <i>type</i> attribute. * @param type such value. */
Specifies the type attribute
immutableSetType
{ "repo_name": "rydnr/queryj-rt", "path": "queryj-core/src/main/java/org/acmsl/queryj/customsql/AbstractParameterElement.java", "license": "gpl-2.0", "size": 6620 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
300,563
Map<String, String> params = new HashMap<String, String>() {{ put(YfySdkConstant.QUERY_WORDS, queryWords); put(YfySdkConstant.PAGE_ID, String.valueOf(pageId)); }}; return getGroupList(params); }
Map<String, String> params = new HashMap<String, String>() {{ put(YfySdkConstant.QUERY_WORDS, queryWords); put(YfySdkConstant.PAGE_ID, String.valueOf(pageId)); }}; return getGroupList(params); }
/** * Retrieve detailed groups info * * @param queryWords Query words about user info * @param pageId Page id begin with 0 * @return Detailed groups info * @throws YfyException */
Retrieve detailed groups info
getGroupList
{ "repo_name": "yifangyun/fangcloud-java-sdk", "path": "src/main/java/com/fangcloud/sdk/api/admin/group/YfyAdminGroupRequest.java", "license": "mit", "size": 1427 }
[ "com.fangcloud.sdk.YfySdkConstant", "java.util.HashMap", "java.util.Map" ]
import com.fangcloud.sdk.YfySdkConstant; import java.util.HashMap; import java.util.Map;
import com.fangcloud.sdk.*; import java.util.*;
[ "com.fangcloud.sdk", "java.util" ]
com.fangcloud.sdk; java.util;
1,095,537
public @Nonnull AccessLogHandler dateFormatter(@Nonnull DateTimeFormatter formatter) { return dateFormatter(ts -> formatter.format(Instant.ofEpochMilli(ts))); }
@Nonnull AccessLogHandler function(@Nonnull DateTimeFormatter formatter) { return dateFormatter(ts -> formatter.format(Instant.ofEpochMilli(ts))); }
/** * Override the default date formatter. * * @param formatter New formatter to use. * @return This instance. */
Override the default date formatter
dateFormatter
{ "repo_name": "jooby-project/jooby", "path": "jooby/src/main/java/io/jooby/AccessLogHandler.java", "license": "apache-2.0", "size": 9531 }
[ "java.time.Instant", "java.time.format.DateTimeFormatter", "javax.annotation.Nonnull" ]
import java.time.Instant; import java.time.format.DateTimeFormatter; import javax.annotation.Nonnull;
import java.time.*; import java.time.format.*; import javax.annotation.*;
[ "java.time", "javax.annotation" ]
java.time; javax.annotation;
2,442,183
public SGTData getData() { return line_; }
SGTData function() { return line_; }
/** * Get the <code>SGTData</code> object. * @return SGTData * @since 3.1 */
Get the <code>SGTData</code> object
getData
{ "repo_name": "OceanAtlas/JOA", "path": "gov/noaa/pmel/sgt/LineCartesianRenderer.java", "license": "gpl-2.0", "size": 12226 }
[ "gov.noaa.pmel.sgt.dm.SGTData" ]
import gov.noaa.pmel.sgt.dm.SGTData;
import gov.noaa.pmel.sgt.dm.*;
[ "gov.noaa.pmel" ]
gov.noaa.pmel;
1,855,362
@Override public Request<CreateDhcpOptionsRequest> getDryRunRequest() { Request<CreateDhcpOptionsRequest> request = new CreateDhcpOptionsRequestMarshaller() .marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; }
Request<CreateDhcpOptionsRequest> function() { Request<CreateDhcpOptionsRequest> request = new CreateDhcpOptionsRequestMarshaller() .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": "dump247/aws-sdk-java", "path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/CreateDhcpOptionsRequest.java", "license": "apache-2.0", "size": 6393 }
[ "com.amazonaws.Request", "com.amazonaws.services.ec2.model.transform.CreateDhcpOptionsRequestMarshaller" ]
import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.CreateDhcpOptionsRequestMarshaller;
import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*;
[ "com.amazonaws", "com.amazonaws.services" ]
com.amazonaws; com.amazonaws.services;
2,313,620
public void setInstalledOn(Timestamp value) { set(7, value); }
void function(Timestamp value) { set(7, value); }
/** * Setter for <code>lifetime.schema_version.installed_on</code>. */
Setter for <code>lifetime.schema_version.installed_on</code>
setInstalledOn
{ "repo_name": "zuacaldeira/lifetime", "path": "lifetime-ejb/src/resources/java/org/jooq/generated/tables/records/SchemaVersionRecord.java", "license": "unlicense", "size": 10720 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,620,624
public void cloneSeries(String srcUser, long srcId, String revision, String destUser, long destId, Map jobIdMap, String message) throws Exception { // 1. export a clean copy of source series SVNUrl srcUrl = new SVNUrl(this.escapeUR...
void function(String srcUser, long srcId, String revision, String destUser, long destId, Map jobIdMap, String message) throws Exception { SVNUrl srcUrl = new SVNUrl(this.escapeURL( svnroot + File.separator + srcUser + File.separator + srcId)); SimpleDateFormat sdf = new SimpleDateFormat(STR); String targetDir = TEMP_DI...
/** * Clones an existing series revision. * * @param srcUser Name of the source series owner * @param srcId Identifier of the source series * @param revision Revision to clone * @param destUser Name of the destination series owner * @param destId Identifier of the destination series ...
Clones an existing series revision
cloneSeries
{ "repo_name": "AuScope/VirtualRockLab", "path": "src/main/java/org/auscope/vrl/RevisionControl.java", "license": "gpl-3.0", "size": 13554 }
[ "java.io.File", "java.text.SimpleDateFormat", "java.util.Date", "java.util.Iterator", "java.util.Map", "org.auscope.vrl.Util", "org.tigris.subversion.svnclientadapter.SVNRevision", "org.tigris.subversion.svnclientadapter.SVNUrl" ]
import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Iterator; import java.util.Map; import org.auscope.vrl.Util; import org.tigris.subversion.svnclientadapter.SVNRevision; import org.tigris.subversion.svnclientadapter.SVNUrl;
import java.io.*; import java.text.*; import java.util.*; import org.auscope.vrl.*; import org.tigris.subversion.svnclientadapter.*;
[ "java.io", "java.text", "java.util", "org.auscope.vrl", "org.tigris.subversion" ]
java.io; java.text; java.util; org.auscope.vrl; org.tigris.subversion;
326,755
protected void genSemPredMap() { Enumeration e = semPreds.elements(); println("_semPredNames = ["); tabs++; while (e.hasMoreElements()) { println("\"" + e.nextElement() + "\","); } tabs--; println("]"); }
void function() { Enumeration e = semPreds.elements(); println(STR); tabs++; while (e.hasMoreElements()) { println("\"STR\","); } tabs--; println("]"); }
/** Write an array of Strings which are the semantic predicate * expressions. The debugger will reference them by number only */
Write an array of Strings which are the semantic predicate expressions. The debugger will reference them by number only
genSemPredMap
{ "repo_name": "salcedonia/acide-0-8-release-2010-2011", "path": "acide/antlr/PythonCodeGenerator.java", "license": "gpl-3.0", "size": 126073 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
948,851
public boolean importFile(InputStream fileImportStream, List<ExternalizedMessageWrapper> messageList, String principalId);
boolean function(InputStream fileImportStream, List<ExternalizedMessageWrapper> messageList, String principalId);
/** * Parses file and creates payrate holding records for each import line * * @param fileImportStream * @return */
Parses file and creates payrate holding records for each import line
importFile
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/bc/document/service/PayrateImportService.java", "license": "apache-2.0", "size": 1698 }
[ "java.io.InputStream", "java.util.List", "org.kuali.kfs.module.bc.util.ExternalizedMessageWrapper" ]
import java.io.InputStream; import java.util.List; import org.kuali.kfs.module.bc.util.ExternalizedMessageWrapper;
import java.io.*; import java.util.*; import org.kuali.kfs.module.bc.util.*;
[ "java.io", "java.util", "org.kuali.kfs" ]
java.io; java.util; org.kuali.kfs;
580,843
private void openStreams() throws Exception { out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), Utils.getDefaultEncoding()), true); in = new BufferedReader(new InputStreamReader(socket.getInputStream(), Utils.getDefaultEncoding())); }
void function() throws Exception { out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), Utils.getDefaultEncoding()), true); in = new BufferedReader(new InputStreamReader(socket.getInputStream(), Utils.getDefaultEncoding())); }
/** * Opens the writer to an outbound socket's stream and the reader to read from inbound socket's stream. * * @throws Exception * When it was not possible to open socket streams. */
Opens the writer to an outbound socket's stream and the reader to read from inbound socket's stream
openStreams
{ "repo_name": "vjuranek/PerfCake", "path": "perfcake/src/main/java/org/perfcake/message/sender/AbstractSocketSender.java", "license": "apache-2.0", "size": 4475 }
[ "java.io.BufferedReader", "java.io.InputStreamReader", "java.io.OutputStreamWriter", "java.io.PrintWriter", "org.perfcake.util.Utils" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import org.perfcake.util.Utils;
import java.io.*; import org.perfcake.util.*;
[ "java.io", "org.perfcake.util" ]
java.io; org.perfcake.util;
2,017,902
public Class classFromRow(AbstractRecord rowFromDatabase, AbstractSession session) throws DescriptorException { ((XMLRecord) rowFromDatabase).setSession(session); if (hasClassExtractor() || shouldUseClassNameAsIndicator()) { return super.classFromRow(rowFromDatabase, session); } ...
Class function(AbstractRecord rowFromDatabase, AbstractSession session) throws DescriptorException { ((XMLRecord) rowFromDatabase).setSession(session); if (hasClassExtractor() shouldUseClassNameAsIndicator()) { return super.classFromRow(rowFromDatabase, session); } Object indicator = rowFromDatabase.get(getClassIndicat...
/** * INTERNAL: * This method is invoked only for the abstract descriptors. */
This method is invoked only for the abstract descriptors
classFromRow
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/oxm/QNameInheritancePolicy.java", "license": "epl-1.0", "size": 15648 }
[ "org.eclipse.persistence.exceptions.DescriptorException", "org.eclipse.persistence.internal.sessions.AbstractRecord", "org.eclipse.persistence.internal.sessions.AbstractSession", "org.eclipse.persistence.oxm.record.XMLRecord" ]
import org.eclipse.persistence.exceptions.DescriptorException; import org.eclipse.persistence.internal.sessions.AbstractRecord; import org.eclipse.persistence.internal.sessions.AbstractSession; import org.eclipse.persistence.oxm.record.XMLRecord;
import org.eclipse.persistence.exceptions.*; import org.eclipse.persistence.internal.sessions.*; import org.eclipse.persistence.oxm.record.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
1,107,729
@Test public void toDerivativeBeforeFxOnIndex() { ZonedDateTime valuationDate = FIXING_DATE_BEFORE_FX; double fixingTime = TimeCalculator.getTimeBetween(valuationDate, CPN_INDEX_FIXED_FIRST.getIborIndexFixingDate()); double fixingPeriodStartTime = TimeCalculator.getTimeBetween(valuationDate, CPN...
void function() { ZonedDateTime valuationDate = FIXING_DATE_BEFORE_FX; double fixingTime = TimeCalculator.getTimeBetween(valuationDate, CPN_INDEX_FIXED_FIRST.getIborIndexFixingDate()); double fixingPeriodStartTime = TimeCalculator.getTimeBetween(valuationDate, CPN_INDEX_FIXED_FIRST.getIborIndexFixingPeriodStartDate());...
/** * valuationDate is before FX fixing data, but on index fixing date */
valuationDate is before FX fixing data, but on index fixing date
toDerivativeBeforeFxOnIndex
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Analytics/src/test/java/com/opengamma/analytics/financial/instrument/payment/CouponIborFxResetDefinitionTest.java", "license": "apache-2.0", "size": 40358 }
[ "com.opengamma.analytics.financial.interestrate.payments.derivative.CouponFixedFxReset", "com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborFxReset", "com.opengamma.analytics.financial.interestrate.payments.derivative.Payment", "com.opengamma.analytics.util.time.TimeCalculator", "...
import com.opengamma.analytics.financial.interestrate.payments.derivative.CouponFixedFxReset; import com.opengamma.analytics.financial.interestrate.payments.derivative.CouponIborFxReset; import com.opengamma.analytics.financial.interestrate.payments.derivative.Payment; import com.opengamma.analytics.util.time.TimeCalcu...
import com.opengamma.analytics.financial.interestrate.payments.derivative.*; import com.opengamma.analytics.util.time.*; import com.opengamma.timeseries.*; import org.testng.*; import org.threeten.bp.*;
[ "com.opengamma.analytics", "com.opengamma.timeseries", "org.testng", "org.threeten.bp" ]
com.opengamma.analytics; com.opengamma.timeseries; org.testng; org.threeten.bp;
1,596,668
@Deprecated public void setCharacterSets(final Collection<? extends Charset> newValues) { // TODO: delete after SIS 1.0 release (method not needed by JAXB). setLocalesAndCharsets(LocaleAndCharset.setCharacterSets(getLocalesAndCharsets(), newValues)); }
void function(final Collection<? extends Charset> newValues) { setLocalesAndCharsets(LocaleAndCharset.setCharacterSets(getLocalesAndCharsets(), newValues)); }
/** * Sets the character coding standard used for the metadata set. * * @param newValues the new character coding standards. * * @since 0.5 * * @deprecated Replaced by putting values in {@link #getLocalesAndCharsets()} map. */
Sets the character coding standard used for the metadata set
setCharacterSets
{ "repo_name": "apache/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java", "license": "apache-2.0", "size": 75665 }
[ "java.nio.charset.Charset", "java.util.Collection", "org.apache.sis.internal.jaxb.lan.LocaleAndCharset" ]
import java.nio.charset.Charset; import java.util.Collection; import org.apache.sis.internal.jaxb.lan.LocaleAndCharset;
import java.nio.charset.*; import java.util.*; import org.apache.sis.internal.jaxb.lan.*;
[ "java.nio", "java.util", "org.apache.sis" ]
java.nio; java.util; org.apache.sis;
2,709,036
public void setDictionaryValidationService(DictionaryValidationService dictionaryValidationService) { this.dictionaryValidationService = dictionaryValidationService; }
void function(DictionaryValidationService dictionaryValidationService) { this.dictionaryValidationService = dictionaryValidationService; }
/** * Sets the dictionaryValidationService attribute value. * * @param dictionaryValidationService The dictionaryValidationService to set. */
Sets the dictionaryValidationService attribute value
setDictionaryValidationService
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/bc/document/service/impl/BudgetConstructionRuleHelperServiceImpl.java", "license": "agpl-3.0", "size": 21788 }
[ "org.kuali.rice.kns.service.DictionaryValidationService" ]
import org.kuali.rice.kns.service.DictionaryValidationService;
import org.kuali.rice.kns.service.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,746,163
private long readUInt() throws IOException { byte[] buf = new byte[4]; readFully(buf); return buf[3] << 24 | (buf[2] & 0xFF) << 16 | (buf[1] & 0xFF) << 8 | (buf[0] & 0xFF); }
long function() throws IOException { byte[] buf = new byte[4]; readFully(buf); return buf[3] << 24 (buf[2] & 0xFF) << 16 (buf[1] & 0xFF) << 8 (buf[0] & 0xFF); }
/** * Read an unsigned 4 byte int decoding from the endian format * * @return a long holding the value read */
Read an unsigned 4 byte int decoding from the endian format
readUInt
{ "repo_name": "jk1/intellij-community", "path": "platform/credential-store/src/kdbx/HashedBlockInputStream.java", "license": "apache-2.0", "size": 5276 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
860,691
private void switchToPanel(int panelResId) { switch (panelResId) { case R.id.info_panel: mediaPanel.setVisibility(View.GONE); mediaArt.setVisibility(View.GONE); infoPanel.setVisibility(View.VISIBLE); break; case R.id.med...
void function(int panelResId) { switch (panelResId) { case R.id.info_panel: mediaPanel.setVisibility(View.GONE); mediaArt.setVisibility(View.GONE); infoPanel.setVisibility(View.VISIBLE); break; case R.id.media_panel: infoPanel.setVisibility(View.GONE); mediaPanel.setVisibility(View.VISIBLE); mediaArt.setVisibility(View...
/** * Switches the info panel shown (they are exclusive) * @param panelResId The panel to show */
Switches the info panel shown (they are exclusive)
switchToPanel
{ "repo_name": "jtdor/Kore", "path": "app/src/main/java/org/xbmc/kore/ui/sections/remote/NowPlayingFragment.java", "license": "apache-2.0", "size": 39337 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,776,610
public void print(final CharSequence text) throws IOException { final int size = text.length(); int pos = 0; for (int i = 0; i < size; i++) { if (text.charAt(i) == '\n') { write(text.subSequence(pos, i + 1)); pos = i + 1; atStartOfLine = true; } ...
void function(final CharSequence text) throws IOException { final int size = text.length(); int pos = 0; for (int i = 0; i < size; i++) { if (text.charAt(i) == '\n') { write(text.subSequence(pos, i + 1)); pos = i + 1; atStartOfLine = true; } } write(text.subSequence(pos, size)); }
/** * Print text to the output stream. */
Print text to the output stream
print
{ "repo_name": "legrosbuffle/kythe", "path": "third_party/proto/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java", "license": "apache-2.0", "size": 65639 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,452,936
protected Text createLabel(Composite parent) { final Text label = new Text(parent, SWT.BORDER | SWT.LEFT); GridData data = SWTUtil.createFillHorizontallyGridData(false); label.setLayoutData(data); label.setEditable(false); return label; }
Text function(Composite parent) { final Text label = new Text(parent, SWT.BORDER SWT.LEFT); GridData data = SWTUtil.createFillHorizontallyGridData(false); label.setLayoutData(data); label.setEditable(false); return label; }
/** * Creates a label * @return */
Creates a label
createLabel
{ "repo_name": "WiednerF/ARXPlugin", "path": "src/org/deidentifier/arx/kettle/define/ViewCriteriaListField.java", "license": "apache-2.0", "size": 22884 }
[ "org.deidentifier.arx.kettle.common.SWTUtil", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Text" ]
import org.deidentifier.arx.kettle.common.SWTUtil; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Text;
import org.deidentifier.arx.kettle.common.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.deidentifier.arx", "org.eclipse.swt" ]
org.deidentifier.arx; org.eclipse.swt;
498,495
public void testGetSimpleInt() { try { Object value = PropertyUtils.getSimpleProperty(bean, "intProperty"); assertNotNull("Got a value", value); assertTrue("Got correct type", (value instanceof Integer)); assert...
void function() { try { Object value = PropertyUtils.getSimpleProperty(bean, STR); assertNotNull(STR, value); assertTrue(STR, (value instanceof Integer)); assertEquals(STR, ((Integer) value).intValue(), 123); } catch (IllegalAccessException e) { fail(STR); } catch (IllegalArgumentException e) { fail(STR); } catch (Invo...
/** * Test getSimpleProperty on an int property. */
Test getSimpleProperty on an int property
testGetSimpleInt
{ "repo_name": "vorburger/apache-commons-beanutils", "path": "src/test/java/org/apache/commons/beanutils/DynaPropertyUtilsTestCase.java", "license": "apache-2.0", "size": 91228 }
[ "java.lang.reflect.InvocationTargetException" ]
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
143,666
Set<String> getObjectModelNames() throws ConnectException;
Set<String> getObjectModelNames() throws ConnectException;
/** * Retrieves a list of the object models declared for the current application. * * @return the set of all valid object model names * @throws ConnectException if the list of object models cannot be retrieved */
Retrieves a list of the object models declared for the current application
getObjectModelNames
{ "repo_name": "stackmob/stackmob-customcode-sdk", "path": "src/main/java/com/stackmob/sdkapi/DataService.java", "license": "apache-2.0", "size": 16732 }
[ "java.net.ConnectException", "java.util.Set" ]
import java.net.ConnectException; import java.util.Set;
import java.net.*; import java.util.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,133,923
@NotNull @Contract(pure = true) @SuppressWarnings("unused") public static HandlerList getHandlerList() { return HANDLERS; }
@Contract(pure = true) @SuppressWarnings(STR) static HandlerList function() { return HANDLERS; }
/** * Returns the handlers of the event * * @return the handler list * @see HandlerList * @since 2.2.0 */
Returns the handlers of the event
getHandlerList
{ "repo_name": "stefvanschie/buildinggame", "path": "buildinggame/src/main/java/com/gmail/stefvanschiedev/buildinggame/api/events/ArenaLeaveEvent.java", "license": "unlicense", "size": 2539 }
[ "org.bukkit.event.HandlerList", "org.jetbrains.annotations.Contract" ]
import org.bukkit.event.HandlerList; import org.jetbrains.annotations.Contract;
import org.bukkit.event.*; import org.jetbrains.annotations.*;
[ "org.bukkit.event", "org.jetbrains.annotations" ]
org.bukkit.event; org.jetbrains.annotations;
2,584,616
public static void displayThreads(boolean includeDaemons) { Map<Thread, StackTraceElement[]> m = Thread.getAllStackTraces(); String lineSeparator = System.getProperty("line.separator"); StringBuilder builder = new StringBuilder(); for(Map.Entry<Thread, StackTraceElement[]> e : m.entr...
static void function(boolean includeDaemons) { Map<Thread, StackTraceElement[]> m = Thread.getAllStackTraces(); String lineSeparator = System.getProperty(STR); StringBuilder builder = new StringBuilder(); for(Map.Entry<Thread, StackTraceElement[]> e : m.entrySet()) { boolean daemon = e.getKey().isDaemon(); if (includeD...
/** * Display currently running threads on system.out * This may be expensive to run. * Mainly designed for use at the end of a non-GUI test to check for threads that might prevent the JVM from exitting. * * @param includeDaemons whether to include daemon threads or not. */
Display currently running threads on system.out This may be expensive to run. Mainly designed for use at the end of a non-GUI test to check for threads that might prevent the JVM from exitting
displayThreads
{ "repo_name": "aksivaram2k2/jmeter-trunk", "path": "src/jorphan/org/apache/jorphan/util/JOrphanUtils.java", "license": "apache-2.0", "size": 18915 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,867,872
@Override public void addTouchables(ArrayList<View> views) { // Note that we don't call super.addTouchables(), which means that // we don't call View.addTouchables(). This is okay because a ViewPager // is itself not touchable. for (int i = 0; i < getChildCount(); i++) { ...
void function(ArrayList<View> views) { for (int i = 0; i < getChildCount(); i++) { final View child = getChildAt(i); if (child.getVisibility() == VISIBLE) { ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addTouchables(views); } } } }
/** * We only want the current page that is being shown to be touchable. */
We only want the current page that is being shown to be touchable
addTouchables
{ "repo_name": "wupeitao88888/model", "path": "ModelSDK/src/com/modelsdk/view/customviewpage/ViewPager.java", "license": "epl-1.0", "size": 132429 }
[ "android.view.View", "java.util.ArrayList" ]
import android.view.View; import java.util.ArrayList;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
2,477,682
protected void processMappingConverter(DatabaseMapping mapping, String convertValue, List<ConvertMetadata> converts, MetadataClass referenceClass, MetadataClass referenceClassWithGenerics, boolean isForMapKey) { boolean hasConverts = (converts != null && ! converts.isEmpty()); // A convert value is...
void function(DatabaseMapping mapping, String convertValue, List<ConvertMetadata> converts, MetadataClass referenceClass, MetadataClass referenceClassWithGenerics, boolean isForMapKey) { boolean hasConverts = (converts != null && ! converts.isEmpty()); if (convertValue != null && ! convertValue.equals(Convert.NONE)) { ...
/** * INTERNAL: * Process a convert value which specifies the name of an EclipseLink * converter to process with this accessor's mapping. */
Process a convert value which specifies the name of an EclipseLink converter to process with this accessor's mapping
processMappingConverter
{ "repo_name": "gameduell/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/MappingAccessor.java", "license": "epl-1.0", "size": 96402 }
[ "java.util.List", "org.eclipse.persistence.annotations.Convert", "org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass", "org.eclipse.persistence.internal.jpa.metadata.converters.ConvertMetadata", "org.eclipse.persistence.mappings.DatabaseMapping" ]
import java.util.List; import org.eclipse.persistence.annotations.Convert; import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass; import org.eclipse.persistence.internal.jpa.metadata.converters.ConvertMetadata; import org.eclipse.persistence.mappings.DatabaseMapping;
import java.util.*; import org.eclipse.persistence.annotations.*; import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.*; import org.eclipse.persistence.internal.jpa.metadata.converters.*; import org.eclipse.persistence.mappings.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
2,180,114
public @Nonnull String getAdminAddress() { String v = adminAddress; if(v==null) v = Messages.Mailer_Address_Not_Configured(); return v; }
@Nonnull String function() { String v = adminAddress; if(v==null) v = Messages.Mailer_Address_Not_Configured(); return v; }
/** * Gets the service administrator e-mail address. * @return Admin address or &quot;address not configured&quot; stub */
Gets the service administrator e-mail address
getAdminAddress
{ "repo_name": "aldaris/jenkins", "path": "core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java", "license": "mit", "size": 6394 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,793,882
boolean documentAuthor(String author) { if (!lazyInitDocumentation()) { return true; } if (documentation.authors == null) { documentation.authors = new ArrayList<>(); } documentation.authors.add(author); return true; }
boolean documentAuthor(String author) { if (!lazyInitDocumentation()) { return true; } if (documentation.authors == null) { documentation.authors = new ArrayList<>(); } documentation.authors.add(author); return true; }
/** * Documents the author (i.e. adds it to the author list). */
Documents the author (i.e. adds it to the author list)
documentAuthor
{ "repo_name": "anomaly/closure-compiler", "path": "src/com/google/javascript/rhino/JSDocInfo.java", "license": "apache-2.0", "size": 60966 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,057,530
private static Node buildResultExpression(Node expr, boolean needResult, String tempName) { if (needResult) { JSType type = expr.getJSType(); return withType(IR.assign(withType(IR.name(tempName), type), expr), type).srcrefTree(expr); } else { return expr; } }
static Node function(Node expr, boolean needResult, String tempName) { if (needResult) { JSType type = expr.getJSType(); return withType(IR.assign(withType(IR.name(tempName), type), expr), type).srcrefTree(expr); } else { return expr; } }
/** * Create an expression tree for an expression. * If the result of the expression is needed, then: * ASSIGN * tempName * expr * otherwise, simply: * expr */
Create an expression tree for an expression. If the result of the expression is needed, then: ASSIGN tempName expr otherwise, simply: expr
buildResultExpression
{ "repo_name": "tiobe/closure-compiler", "path": "src/com/google/javascript/jscomp/ExpressionDecomposer.java", "license": "apache-2.0", "size": 36415 }
[ "com.google.javascript.jscomp.Es6ToEs3Util", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.JSType" ]
import com.google.javascript.jscomp.Es6ToEs3Util; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType;
import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
1,872,869
Object getConstantValueAsObject() throws StandardException { return (String)value; }
Object getConstantValueAsObject() throws StandardException { return (String)value; }
/** * Return an Object representing the bind time value of this * expression tree. If the expression tree does not evaluate to * a constant at bind time then we return null. * This is useful for bind time resolution of VTIs. * RESOLVE: What do we do for primitives? * * @return An Obj...
Return an Object representing the bind time value of this expression tree. If the expression tree does not evaluate to a constant at bind time then we return null. This is useful for bind time resolution of VTIs
getConstantValueAsObject
{ "repo_name": "xiaomizhg/Oceanus", "path": "oceanus-all/oceanus-exchange/oceanus-exchange-sqlparser/src/main/java/com/bj58/sql/parser/CharConstantNode.java", "license": "apache-2.0", "size": 4259 }
[ "com.bj58.sql.StandardException" ]
import com.bj58.sql.StandardException;
import com.bj58.sql.*;
[ "com.bj58.sql" ]
com.bj58.sql;
1,446,506
public static Request fromJsonObject(JsonObject jsonObject) { String host = jsonObject.containsKey(Request.FIELD_HOST) ? jsonObject.getString(Request.FIELD_HOST) : ""; int port = jsonObject.containsKey(Request.FIELD_PORT) ? jsonObject .getJsonNumbe...
static Request function(JsonObject jsonObject) { String host = jsonObject.containsKey(Request.FIELD_HOST) ? jsonObject.getString(Request.FIELD_HOST) : STRSTRSTR"; int conditionId = jsonObject.containsKey(Request.FIELD_CONDITION_ID) ? jsonObject .getJsonNumber(Request.FIELD_CONDITION_ID).intValue() : 0; TaskTrainingData...
/** * Create a new LearnModels ServiceRequest based on the given JSON object. Any * missing values will be set to their defaults. * * @param jsonObject * The JSON object to parse. * @return A LearnModels ServiceRequest based on the given JSON object. ...
Create a new LearnModels ServiceRequest based on the given JSON object. Any missing values will be set to their defaults
fromJsonObject
{ "repo_name": "GT-RAIL/interactive_world", "path": "jinteractiveworld/src/main/java/edu/wpi/rail/jinteractiveworld/ros/srvs/interactiveworldmsgs/LearnModels.java", "license": "bsd-3-clause", "size": 9636 }
[ "edu.wpi.rail.jinteractiveworld.ros.msgs.interactiveworldmsgs.TaskTrainingData", "edu.wpi.rail.jrosbridge.services.ServiceResponse", "javax.json.JsonObject" ]
import edu.wpi.rail.jinteractiveworld.ros.msgs.interactiveworldmsgs.TaskTrainingData; import edu.wpi.rail.jrosbridge.services.ServiceResponse; import javax.json.JsonObject;
import edu.wpi.rail.jinteractiveworld.ros.msgs.interactiveworldmsgs.*; import edu.wpi.rail.jrosbridge.services.*; import javax.json.*;
[ "edu.wpi.rail", "javax.json" ]
edu.wpi.rail; javax.json;
2,195,214
private Optional<? extends CommittedBundle<?>> getUnprocessedInput( CommittedBundle<?> completedBundle, TransformResult<?> result) { if (completedBundle == null || Iterables.isEmpty(result.getUnprocessedElements())) { return Optional.absent(); } CommittedBundle<?> residual = completedB...
Optional<? extends CommittedBundle<?>> function( CommittedBundle<?> completedBundle, TransformResult<?> result) { if (completedBundle == null Iterables.isEmpty(result.getUnprocessedElements())) { return Optional.absent(); } CommittedBundle<?> residual = completedBundle.withElements((Iterable) result.getUnprocessedEleme...
/** * Returns an {@link Optional} containing a bundle which contains all of the unprocessed elements * that were not processed from the {@code completedBundle}. If all of the elements of the {@code * completedBundle} were processed, or if {@code completedBundle} is null, returns an absent * {@link Optional}...
Returns an <code>Optional</code> containing a bundle which contains all of the unprocessed elements that were not processed from the completedBundle. If all of the elements of the completedBundle were processed, or if completedBundle is null, returns an absent <code>Optional</code>
getUnprocessedInput
{ "repo_name": "axbaretto/beam", "path": "runners/direct-java/src/main/java/org/apache/beam/runners/direct/portable/EvaluationContext.java", "license": "apache-2.0", "size": 14199 }
[ "org.apache.beam.vendor.guava.v20_0.com.google.common.base.Optional", "org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables" ]
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Optional; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables;
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.*; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.*;
[ "org.apache.beam" ]
org.apache.beam;
2,908,085
public void updateSettingsXmlAndM2EclipseConfiguration() { // Update the settings.xml file used m2eclipse (if required) File t24BinariesFolder = T24MavenHelper.INSTANCE.getT24BinariesFolder(); if (t24BinariesFolder != null) { M2EclipseIntegrationFacade.instance().updateSettingsXml(t24BinariesFolder.getAbsol...
void function() { File t24BinariesFolder = T24MavenHelper.INSTANCE.getT24BinariesFolder(); if (t24BinariesFolder != null) { M2EclipseIntegrationFacade.instance().updateSettingsXml(t24BinariesFolder.getAbsolutePath(), false); } M2EclipseIntegrationFacade.instance().updateUserSettingsFileProperty(true); }
/** * Update the m2eclipse configuration to make the extracted binaries available */
Update the m2eclipse configuration to make the extracted binaries available
updateSettingsXmlAndM2EclipseConfiguration
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/t24/ui/com.odcgroup.t24.maven.ui/src/main/java/com/odcgroup/t24/maven/ui/initializer/M2EclipsePreferenceInitializer.java", "license": "epl-1.0", "size": 1074 }
[ "com.odcgroup.t24.maven.ui.T24MavenHelper", "com.odcgroup.workbench.ui.maven.M2EclipseIntegrationFacade", "java.io.File" ]
import com.odcgroup.t24.maven.ui.T24MavenHelper; import com.odcgroup.workbench.ui.maven.M2EclipseIntegrationFacade; import java.io.File;
import com.odcgroup.t24.maven.ui.*; import com.odcgroup.workbench.ui.maven.*; import java.io.*;
[ "com.odcgroup.t24", "com.odcgroup.workbench", "java.io" ]
com.odcgroup.t24; com.odcgroup.workbench; java.io;
506,571
public String getDefaultTokenType() { return OAuthServerConfiguration.DEFAULT_TOKEN_TYPE; }
String function() { return OAuthServerConfiguration.DEFAULT_TOKEN_TYPE; }
/** * Return the default token type. */
Return the default token type
getDefaultTokenType
{ "repo_name": "wso2-extensions/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/OAuthAdminServiceImpl.java", "license": "apache-2.0", "size": 88457 }
[ "org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration" ]
import org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration;
import org.wso2.carbon.identity.oauth.config.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,344,508
@Requires({ "index >= 0", "index <= element.getEnclosedElements().size()", "isValidEnclosedElement(element)" }) @Ensures("enclosedElements.contains(element)") protected void addEnclosedElement(int index, ElementModel element) { fixEnclosedElement(element); enclosedElements.add(index, element...
@Requires({ STR, STR, STR }) @Ensures(STR) void function(int index, ElementModel element) { fixEnclosedElement(element); enclosedElements.add(index, element); }
/** * Adds a child element at the specified position in the enclosed * element list. First, the added element is detached from its * previous parent, if any. */
Adds a child element at the specified position in the enclosed element list. First, the added element is detached from its previous parent, if any
addEnclosedElement
{ "repo_name": "nhatminhle/cofoja", "path": "src/com/google/java/contract/core/model/ElementModel.java", "license": "lgpl-3.0", "size": 7882 }
[ "com.google.java.contract.Ensures", "com.google.java.contract.Requires" ]
import com.google.java.contract.Ensures; import com.google.java.contract.Requires;
import com.google.java.contract.*;
[ "com.google.java" ]
com.google.java;
1,431,975
private void touchEventsEnded () { final View mobileView = getViewForID(mMobileItemId); if (mCellIsMobile|| mIsWaitingForScrollFinish) { mCellIsMobile = false; mIsWaitingForScrollFinish = false; mIsMobileScrolling = false; mActivePointerId = INVALID_PO...
void function () { final View mobileView = getViewForID(mMobileItemId); if (mCellIsMobile mIsWaitingForScrollFinish) { mCellIsMobile = false; mIsWaitingForScrollFinish = false; mIsMobileScrolling = false; mActivePointerId = INVALID_POINTER_ID; if (mScrollState != OnScrollListener.SCROLL_STATE_IDLE) { mIsWaitingForScrol...
/** * Resets all the appropriate fields to a default state while also animating * the hover cell back to its correct location. */
Resets all the appropriate fields to a default state while also animating the hover cell back to its correct location
touchEventsEnded
{ "repo_name": "MuhammadAmmad/arcgis-runtime-samples-android", "path": "DynamicSubLayerReorder/src/main/java/com/arcgis/android/samples/dynamicsublayerreorder/DynamicListView.java", "license": "apache-2.0", "size": 22773 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
598,460
private static List loadThreeColumnDatasetWithColorsAndFonts(Table table) { List list = loadThreeColumnDataset(table); int total = (list == null ? 0 : list.size()); for (int index=0; index < total; index++) { TableItem ti = ((TableItem)(list.get(index))); if (index == 0 || index == 14) { ti...
static List function(Table table) { List list = loadThreeColumnDataset(table); int total = (list == null ? 0 : list.size()); for (int index=0; index < total; index++) { TableItem ti = ((TableItem)(list.get(index))); if (index == 0 index == 14) { ti.setForeground(darkRed); ti.setFont(boldFont); } else if (index == 4 ind...
/** * load a list of rows with 3 columns that includes colors and fonts. * @return */
load a list of rows with 3 columns that includes colors and fonts
loadThreeColumnDatasetWithColorsAndFonts
{ "repo_name": "Transkribus/TranskribusSwtGui", "path": "src/main/java/examples/TableComboSnippet1.java", "license": "gpl-3.0", "size": 15043 }
[ "java.util.List", "org.eclipse.swt.widgets.Table", "org.eclipse.swt.widgets.TableItem" ]
import java.util.List; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem;
import java.util.*; import org.eclipse.swt.widgets.*;
[ "java.util", "org.eclipse.swt" ]
java.util; org.eclipse.swt;
2,647,986
public DefaultInspectorModulesBuilder runtimeRepl(RuntimeReplFactory factory) { mRuntimeRepl = factory; return this; }
DefaultInspectorModulesBuilder function(RuntimeReplFactory factory) { mRuntimeRepl = factory; return this; }
/** * Provide a custom runtime REPL (read-eval-print loop) implementation for the Console tab. By default an implementation will be provided for * you that automatically detects the existence of {@code stetho-js-rhino} (Mozilla's Rhino engine) and uses it if available. <p /> To * customize th...
Provide a custom runtime REPL (read-eval-print loop) implementation for the Console tab. By default an implementation will be provided for you that automatically detects the existence of stetho-js-rhino (Mozilla's Rhino engine) and uses it if available. To customize the Rhino implementation, see stetho-js-rhino documen...
runtimeRepl
{ "repo_name": "gavanx/learn-stetho", "path": "stetho/src/main/java/com/facebook/stetho/Stetho.java", "license": "bsd-3-clause", "size": 20277 }
[ "com.facebook.stetho.inspector.console.RuntimeReplFactory" ]
import com.facebook.stetho.inspector.console.RuntimeReplFactory;
import com.facebook.stetho.inspector.console.*;
[ "com.facebook.stetho" ]
com.facebook.stetho;
2,128,042
@FIXVersion(introduced = "4.1", retired = "4.3") @TagNumRef(tagNum = TagNum.SecurityType) public String getSecurityType() { return getSafeInstrument().getSecurityType(); }
@FIXVersion(introduced = "4.1", retired = "4.3") @TagNumRef(tagNum = TagNum.SecurityType) String function() { return getSafeInstrument().getSecurityType(); }
/** * Message field getter. * @return field value */
Message field getter
getSecurityType
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/OrderStatusRequestMsg.java", "license": "gpl-3.0", "size": 41851 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,292,850
public synchronized void addTextListener(TextListener listener) { textListener = AWTEventMulticaster.add(textListener, listener); enableEvents(AWTEvent.TEXT_EVENT_MASK); }
synchronized void function(TextListener listener) { textListener = AWTEventMulticaster.add(textListener, listener); enableEvents(AWTEvent.TEXT_EVENT_MASK); }
/** * Adds a new listener to the list of text listeners for this * component. * * @param listener The listener to be added. */
Adds a new listener to the list of text listeners for this component
addTextListener
{ "repo_name": "unofficial-opensource-apple/gcc_40", "path": "libjava/java/awt/TextComponent.java", "license": "gpl-2.0", "size": 19221 }
[ "java.awt.event.TextListener" ]
import java.awt.event.TextListener;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,684,942
protected boolean handleRemotingPacket(HttpServletRequest req, IContext context, IScope scope, RemotingPacket message) { log.debug("Handling remoting packet"); boolean result = true; final IServiceInvoker invoker = context.getServiceInvoker(); for (RemotingCall call : message.getCalls()) { result...
boolean function(HttpServletRequest req, IContext context, IScope scope, RemotingPacket message) { log.debug(STR); boolean result = true; final IServiceInvoker invoker = context.getServiceInvoker(); for (RemotingCall call : message.getCalls()) { result = invoker.invoke(call, scope); if (!result) { break; } } return res...
/** * Handles AMF request by making calls * * @param req * Request * @param message * Remoting packet * @return <code>true</code> on success */
Handles AMF request by making calls
handleRemotingPacket
{ "repo_name": "cwpenhale/red5-mobileconsole", "path": "red5_server/src/main/java/org/red5/server/net/servlet/AMFGatewayServlet.java", "license": "apache-2.0", "size": 9534 }
[ "javax.servlet.http.HttpServletRequest", "org.red5.server.api.IContext", "org.red5.server.api.scope.IScope", "org.red5.server.api.service.IServiceInvoker", "org.red5.server.net.remoting.message.RemotingCall", "org.red5.server.net.remoting.message.RemotingPacket" ]
import javax.servlet.http.HttpServletRequest; import org.red5.server.api.IContext; import org.red5.server.api.scope.IScope; import org.red5.server.api.service.IServiceInvoker; import org.red5.server.net.remoting.message.RemotingCall; import org.red5.server.net.remoting.message.RemotingPacket;
import javax.servlet.http.*; import org.red5.server.api.*; import org.red5.server.api.scope.*; import org.red5.server.api.service.*; import org.red5.server.net.remoting.message.*;
[ "javax.servlet", "org.red5.server" ]
javax.servlet; org.red5.server;
1,586,036
boolean isDirectory() { if (file.isFile()) return false; File[] list = file.listFiles(); if (list == null || list.length == 0) return false; return true; }
boolean isDirectory() { if (file.isFile()) return false; File[] list = file.listFiles(); if (list == null list.length == 0) return false; return true; }
/** * Returns <code>true</code> if the file is a directory, * <code>false</code> otherwise. * * @return See above. */
Returns <code>true</code> if the file is a directory, <code>false</code> otherwise
isDirectory
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/FileElement.java", "license": "gpl-2.0", "size": 5927 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,443,750
protected void doIteration(final SimplexTableau tableau) throws TooManyIterationsException, UnboundedSolutionException { incrementIterationCount(); Integer pivotCol = getPivotColumn(tableau); Integer pivotRow = getPivotRow(tableau, pivotCol); if (pivotRow == ...
void function(final SimplexTableau tableau) throws TooManyIterationsException, UnboundedSolutionException { incrementIterationCount(); Integer pivotCol = getPivotColumn(tableau); Integer pivotRow = getPivotRow(tableau, pivotCol); if (pivotRow == null) { throw new UnboundedSolutionException(); } double pivotVal = tablea...
/** * Runs one iteration of the Simplex method on the given model. * * @param tableau Simple tableau for the problem. * @throws TooManyIterationsException if the allowed number of iterations has been exhausted. * @throws UnboundedSolutionException if the model is found not to have a bounded sol...
Runs one iteration of the Simplex method on the given model
doIteration
{ "repo_name": "charles-cooper/idylfin", "path": "src/org/apache/commons/math3/optim/linear/SimplexSolver.java", "license": "apache-2.0", "size": 9909 }
[ "org.apache.commons.math3.exception.TooManyIterationsException" ]
import org.apache.commons.math3.exception.TooManyIterationsException;
import org.apache.commons.math3.exception.*;
[ "org.apache.commons" ]
org.apache.commons;
2,755,326
public Observable<ServiceResponse<EnabledSubscriptionIdInner>> enableWithServiceResponseAsync(String subscriptionId) { if (subscriptionId == null) { throw new IllegalArgumentException("Parameter subscriptionId is required and cannot be null."); }
Observable<ServiceResponse<EnabledSubscriptionIdInner>> function(String subscriptionId) { if (subscriptionId == null) { throw new IllegalArgumentException(STR); }
/** * The operation to enable a subscription. * * @param subscriptionId Subscription Id. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EnabledSubscriptionIdInner object */
The operation to enable a subscription
enableWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/subscription/mgmt-v2020_09_01/src/main/java/com/microsoft/azure/management/subscription/v2020_09_01/implementation/SubscriptionServicesInner.java", "license": "mit", "size": 18846 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
635,368
public List<String> getTags() { return mTags; }
List<String> function() { return mTags; }
/** * Get the tags. * @return The tag list, or null. */
Get the tags
getTags
{ "repo_name": "magnetsystems/message-common", "path": "src/main/java/com/magnet/mmx/protocol/UserCreate.java", "license": "apache-2.0", "size": 5540 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
39,878
public static CacheKey generateCacheKey(String opName, Object request, CachableValueAccessor accessorCache) throws ServiceException { CacheKey key = CacheKey.createCacheKey(opName); evaluateAccessor(request, accessorCache, key, true); return key; }
static CacheKey function(String opName, Object request, CachableValueAccessor accessorCache) throws ServiceException { CacheKey key = CacheKey.createCacheKey(opName); evaluateAccessor(request, accessorCache, key, true); return key; }
/** * Static utility for creating the cacheKey. * @param opName An operation name. * @param request A request object of this operation. * @param accessorCache A CachableValueAccessor for accessing the Cached value. * @return A CacheKey for the given request object. * @throws ServiceException Exception...
Static utility for creating the cacheKey
generateCacheKey
{ "repo_name": "vthangathurai/SOA-Runtime", "path": "soa-client/src/main/java/org/ebayopensource/turmeric/runtime/common/cachepolicy/CachePolicyDesc.java", "license": "apache-2.0", "size": 12540 }
[ "org.ebayopensource.turmeric.runtime.common.exceptions.ServiceException" ]
import org.ebayopensource.turmeric.runtime.common.exceptions.ServiceException;
import org.ebayopensource.turmeric.runtime.common.exceptions.*;
[ "org.ebayopensource.turmeric" ]
org.ebayopensource.turmeric;
579,667
public Adapter createGroupAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link protolipse.protobuf.Group <em>Group</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-...
Creates a new adapter for an object of class '<code>protolipse.protobuf.Group Group</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createGroupAdapter
{ "repo_name": "dvdkruk/protolipse", "path": "protolipse/src-gen/protolipse/protobuf/util/ProtobufAdapterFactory.java", "license": "apache-2.0", "size": 32376 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,475,247
@ReflectiveMethod(name = "cb", types = {}) public boolean cb(){ return (boolean) NMSWrapper.getInstance().exec(nmsObject); }
@ReflectiveMethod(name = "cb", types = {}) boolean function(){ return (boolean) NMSWrapper.getInstance().exec(nmsObject); }
/** * TODO Find correct name * @see net.minecraft.server.v1_9_R1.EntityAmbient#cb() */
TODO Find correct name
cb
{ "repo_name": "Vilsol/NMSWrapper", "path": "src/main/java/me/vilsol/nmswrapper/wraps/unparsed/NMSEntityAmbient.java", "license": "apache-2.0", "size": 1277 }
[ "me.vilsol.nmswrapper.NMSWrapper", "me.vilsol.nmswrapper.reflections.ReflectiveMethod" ]
import me.vilsol.nmswrapper.NMSWrapper; import me.vilsol.nmswrapper.reflections.ReflectiveMethod;
import me.vilsol.nmswrapper.*; import me.vilsol.nmswrapper.reflections.*;
[ "me.vilsol.nmswrapper" ]
me.vilsol.nmswrapper;
2,910,205
private void setListShown(final boolean shown, final boolean animate){ ensureList(); if(mProgressContainer == null){ throw new IllegalStateException("Can't be used with a custom content view"); } if(mListShown == shown){ return; } mListShown = ...
void function(final boolean shown, final boolean animate){ ensureList(); if(mProgressContainer == null){ throw new IllegalStateException(STR); } if(mListShown == shown){ return; } mListShown = shown; if(shown){ if(animate){ mProgressContainer.startAnimation(AnimationUtils.loadAnimation(getActivity(), android.R.anim.fad...
/** * Control whether the list is being displayed. * You can make it not displayed if you are waiting for the initial data to show in it. * During this time an indeterminant progress indicator will be shown instead. * * @param shown If true, the list view is shown; if false, the progress indic...
Control whether the list is being displayed. You can make it not displayed if you are waiting for the initial data to show in it. During this time an indeterminant progress indicator will be shown instead
setListShown
{ "repo_name": "wada811/AndroidLibrary-wada811", "path": "AndroidLibrary@wada811/src/at/wada811/app/fragment/ExpandableListFragment.java", "license": "apache-2.0", "size": 17543 }
[ "android.view.View", "android.view.animation.AnimationUtils" ]
import android.view.View; import android.view.animation.AnimationUtils;
import android.view.*; import android.view.animation.*;
[ "android.view" ]
android.view;
2,724,978
public static BookmarksPage buildPage(Context context, Tab tab, TabModelSelector tabModelSelector) { return new BookmarksPage(context, tab.getProfile(), tab, tabModelSelector, PAGE_MODE_NORMAL); } private class BookmarksPageManagerImpl implements BookmarksPageManage...
static BookmarksPage function(Context context, Tab tab, TabModelSelector tabModelSelector) { return new BookmarksPage(context, tab.getProfile(), tab, tabModelSelector, PAGE_MODE_NORMAL); } private class BookmarksPageManagerImpl implements BookmarksPageManager { private static final String ACTION_OPEN_BOOKMARK_HISTOGRAM...
/** * Creates a BookmarksPage to be shown in a tab. * @param context The view context for showing the page. * @param tab The tab in which the page will be shown. * @param tabModelSelector The TabModelSelector to use when opening new tabs from the bookmarks * page. * @return The new...
Creates a BookmarksPage to be shown in a tab
buildPage
{ "repo_name": "hujiajie/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/ntp/BookmarksPage.java", "license": "bsd-3-clause", "size": 18295 }
[ "android.content.Context", "org.chromium.chrome.browser.ntp.BookmarksPageView", "org.chromium.chrome.browser.tab.Tab", "org.chromium.chrome.browser.tabmodel.TabModelSelector" ]
import android.content.Context; import org.chromium.chrome.browser.ntp.BookmarksPageView; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import android.content.*; import org.chromium.chrome.browser.ntp.*; import org.chromium.chrome.browser.tab.*; import org.chromium.chrome.browser.tabmodel.*;
[ "android.content", "org.chromium.chrome" ]
android.content; org.chromium.chrome;
2,454,345
public static void close(@Nullable DatagramSocket rsrc) { if (rsrc != null) rsrc.close(); }
static void function(@Nullable DatagramSocket rsrc) { if (rsrc != null) rsrc.close(); }
/** * Closes given resource. * * @param rsrc Resource to close. If it's {@code null} - it's no-op. */
Closes given resource
close
{ "repo_name": "apache/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 387878 }
[ "java.net.DatagramSocket", "org.jetbrains.annotations.Nullable" ]
import java.net.DatagramSocket; import org.jetbrains.annotations.Nullable;
import java.net.*; import org.jetbrains.annotations.*;
[ "java.net", "org.jetbrains.annotations" ]
java.net; org.jetbrains.annotations;
1,234,728
JCBlock block(int pos, long flags) { accept(LBRACE); List<JCStatement> stats = blockStatements(); JCBlock t = F.at(pos).Block(flags, stats); while (S.token() == CASE || S.token() == DEFAULT) { syntaxError("orphaned", S.token()); switchBlockStatementGroups(); ...
JCBlock block(int pos, long flags) { accept(LBRACE); List<JCStatement> stats = blockStatements(); JCBlock t = F.at(pos).Block(flags, stats); while (S.token() == CASE S.token() == DEFAULT) { syntaxError(STR, S.token()); switchBlockStatementGroups(); } t.endpos = S.pos(); accept(RBRACE); return toP(t); }
/** Block = "{" BlockStatements "}" */
Block = "{" BlockStatements "}"
block
{ "repo_name": "sebastianoe/s4j", "path": "src/share/classes/com/sun/tools/javac/parser/JavacParser.java", "license": "gpl-2.0", "size": 116611 }
[ "com.sun.tools.javac.tree.JCTree", "com.sun.tools.javac.util.List" ]
import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.util.List;
import com.sun.tools.javac.tree.*; import com.sun.tools.javac.util.*;
[ "com.sun.tools" ]
com.sun.tools;
1,891,999
public void addEnchantment(Enchantment p_77966_1_, int p_77966_2_) { if (this.stackTagCompound == null) { this.setTagCompound(new NBTTagCompound()); } if (!this.stackTagCompound.func_150297_b("ench", 9)) { this.stackTagCompound.setTag("ench", new ...
void function(Enchantment p_77966_1_, int p_77966_2_) { if (this.stackTagCompound == null) { this.setTagCompound(new NBTTagCompound()); } if (!this.stackTagCompound.func_150297_b("ench", 9)) { this.stackTagCompound.setTag("ench", new NBTTagList()); } NBTTagList var3 = this.stackTagCompound.getTagList("ench", 10); NBTTa...
/** * Adds an enchantment with a desired level on the ItemStack. */
Adds an enchantment with a desired level on the ItemStack
addEnchantment
{ "repo_name": "TheHecticByte/BananaJ1.7.10Beta", "path": "src/net/minecraft/Server1_7_10/item/ItemStack.java", "license": "gpl-3.0", "size": 22181 }
[ "net.minecraft.Server1_7_10" ]
import net.minecraft.Server1_7_10;
import net.minecraft.*;
[ "net.minecraft" ]
net.minecraft;
1,592,786
@MonitorableStatusValue( name = "elapsed_running_time", description = "The amount of time the service has been running." ) public Period calculateRunningTime( ) { if( stopTime == null ) { return new Period( startTime, new DateTime( DateTimeZone.UTC ), PeriodType.standard( ) ); } else { return...
@MonitorableStatusValue( name = STR, description = STR ) Period function( ) { if( stopTime == null ) { return new Period( startTime, new DateTime( DateTimeZone.UTC ), PeriodType.standard( ) ); } else { return Period.ZERO; } } } public static final String SERVICE_NAME_VALIDATOR = STR; static { if( !NameManager.hasValida...
/** * Calculates the length of the time the interface has been running. * @return the running time, or Period. ZERO if not currently running */
Calculates the length of the time the interface has been running
calculateRunningTime
{ "repo_name": "Talvish/Tales", "path": "product/services/src/com/talvish/tales/services/Service.java", "license": "apache-2.0", "size": 43265 }
[ "com.google.common.base.Preconditions", "com.google.common.base.Strings", "com.talvish.tales.parts.naming.LowerCaseValidator", "com.talvish.tales.parts.naming.NameManager", "com.talvish.tales.parts.naming.NameValidator", "com.talvish.tales.system.ExecutionLifecycleListeners", "com.talvish.tales.system.E...
import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.talvish.tales.parts.naming.LowerCaseValidator; import com.talvish.tales.parts.naming.NameManager; import com.talvish.tales.parts.naming.NameValidator; import com.talvish.tales.system.ExecutionLifecycleListeners; import com.ta...
import com.google.common.base.*; import com.talvish.tales.parts.naming.*; import com.talvish.tales.system.*; import com.talvish.tales.system.status.*; import org.joda.time.*; import org.joda.time.format.*; import org.slf4j.*;
[ "com.google.common", "com.talvish.tales", "org.joda.time", "org.slf4j" ]
com.google.common; com.talvish.tales; org.joda.time; org.slf4j;
1,280,589
void addSouth( JComponent c );
void addSouth( JComponent c );
/** * Adds the specified component to the south. * * @param c component to be added to the south */
Adds the specified component to the south
addSouth
{ "repo_name": "icza/scelight", "path": "src-launcher/hu/scelightapibase/gui/comp/IBorderPanel.java", "license": "apache-2.0", "size": 1590 }
[ "javax.swing.JComponent" ]
import javax.swing.JComponent;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
578,870
public void testNullEnum () { String example = null; try { ElectronicParkBrakeStatus temp = ElectronicParkBrakeStatus.valueForString(example); assertNull("Result of valueForString should be null.", temp); } catch (NullPointerException exception) { fail("Null string throws NullPointerException."); ...
void function () { String example = null; try { ElectronicParkBrakeStatus temp = ElectronicParkBrakeStatus.valueForString(example); assertNull(STR, temp); } catch (NullPointerException exception) { fail(STR); } }
/** * Verifies that a null assignment is invalid. */
Verifies that a null assignment is invalid
testNullEnum
{ "repo_name": "anildahiya/sdl_android", "path": "android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ElectronicParkBrakeStatusTests.java", "license": "bsd-3-clause", "size": 2945 }
[ "com.smartdevicelink.proxy.rpc.enums.ElectronicParkBrakeStatus" ]
import com.smartdevicelink.proxy.rpc.enums.ElectronicParkBrakeStatus;
import com.smartdevicelink.proxy.rpc.enums.*;
[ "com.smartdevicelink.proxy" ]
com.smartdevicelink.proxy;
1,535,064
void checkGroupIsSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, Group group) throws GroupNotAdminException;
void checkGroupIsSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, Group group) throws GroupNotAdminException;
/** * check if group is security admin of given security team * throw exception if is not * * @param sess * @param securityTeam * @param group * @throws GroupNotAdminException * @throws InternalErrorException */
check if group is security admin of given security team throw exception if is not
checkGroupIsSecurityAdmin
{ "repo_name": "zlamalp/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/SecurityTeamsManagerBl.java", "license": "bsd-2-clause", "size": 9400 }
[ "cz.metacentrum.perun.core.api.Group", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.SecurityTeam", "cz.metacentrum.perun.core.api.exceptions.GroupNotAdminException" ]
import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.SecurityTeam; import cz.metacentrum.perun.core.api.exceptions.GroupNotAdminException;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
130,305
public void testStressTestPcapPacketHandler() { String[] files = DIR.list(new FilenameFilter() {
void function() { String[] files = DIR.list(new FilenameFilter() {
/** * Test stress test pcap packet handler. */
Test stress test pcap packet handler
testStressTestPcapPacketHandler
{ "repo_name": "pvenne/jgoose", "path": "libs/JNetPcap_1_4/tests/java1.5/org/jnetpcap/bugs/Bug2847124_jbytebuffer_handler_memory_leak.java", "license": "gpl-3.0", "size": 14472 }
[ "java.io.FilenameFilter" ]
import java.io.FilenameFilter;
import java.io.*;
[ "java.io" ]
java.io;
1,777,250
private void loadTextData(DataInputStream dis) throws IOException { for (int f=0; f < numFrames; f++) { times[f] = Float.parseFloat(Utility.readWord(dis)); Utility.readWord(dis); // can be only 1 for (int c=0; c < numChannels; c++) { frames[f][c] = Fl...
void function(DataInputStream dis) throws IOException { for (int f=0; f < numFrames; f++) { times[f] = Float.parseFloat(Utility.readWord(dis)); Utility.readWord(dis); for (int c=0; c < numChannels; c++) { frames[f][c] = Float.parseFloat(Utility.readWord(dis)); } } }
/** * load the data section of the lpc file as ascii text * * @param dis DataInputStream to read from * * @throws IOException on ill-formatted input */
load the data section of the lpc file as ascii text
loadTextData
{ "repo_name": "edwardtoday/PolyU_MScST", "path": "COMP5517/JavaSpeech/freetts-1.2.2-src/freetts-1.2.2/tools/ArcticToFreeTTS/src/FindSTS.java", "license": "mit", "size": 31020 }
[ "java.io.DataInputStream", "java.io.IOException" ]
import java.io.DataInputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,506,631
public void setMaxSize(int maxW, int maxH) { Clog.d(Clog.baseLogTag, Clog.getString(R.string.set_max_size, maxW, maxH)); AdSize maxAdSize = new AdSize(maxW, maxH); ArrayList<AdSize> adSizeArrayList = new ArrayList(); adSizeArrayList.add(maxAdSize); requestParameters.setPrima...
void function(int maxW, int maxH) { Clog.d(Clog.baseLogTag, Clog.getString(R.string.set_max_size, maxW, maxH)); AdSize maxAdSize = new AdSize(maxW, maxH); ArrayList<AdSize> adSizeArrayList = new ArrayList(); adSizeArrayList.add(maxAdSize); requestParameters.setPrimarySize(adSizeArrayList.get(0)); requestParameters.setS...
/** * Set the maximum size of the desired ad. * Use only one out of setMaxSize(maxW,maxh) or setAdSize(w,h) or setAdSizes(ArrayList<AdSizes>). Using one will override the value set by other. * * @param maxW The maximum width in pixels. * @param maxH The maximum height in pixels. */
Set the maximum size of the desired ad. Use only one out of setMaxSize(maxW,maxh) or setAdSize(w,h) or setAdSizes(ArrayList). Using one will override the value set by other
setMaxSize
{ "repo_name": "appnexus/mobile-sdk-android", "path": "sdk/src/com/appnexus/opensdk/BannerAdView.java", "license": "apache-2.0", "size": 47034 }
[ "com.appnexus.opensdk.utils.Clog", "java.util.ArrayList" ]
import com.appnexus.opensdk.utils.Clog; import java.util.ArrayList;
import com.appnexus.opensdk.utils.*; import java.util.*;
[ "com.appnexus.opensdk", "java.util" ]
com.appnexus.opensdk; java.util;
1,755,174
private static List<Mutation> makeWriteMetadataMutations(final PcjMetadata metadata) { checkNotNull(metadata); final List<Mutation> mutations = new LinkedList<>(); // SPARQL Query Mutation mutation = new Mutation(PCJ_METADATA_ROW_ID); final Value query = new Value( stringLe...
static List<Mutation> function(final PcjMetadata metadata) { checkNotNull(metadata); final List<Mutation> mutations = new LinkedList<>(); Mutation mutation = new Mutation(PCJ_METADATA_ROW_ID); final Value query = new Value( stringLexicoder.encode(metadata.getSparql()) ); mutation.put(PCJ_METADATA_FAMILY, PCJ_METADATA_S...
/** * Create the {@link Mutation}s required to write a {@link PCJMetadata} object * to an Accumulo table. * * @param metadata - The metadata to write. (not null) * @return An ordered list of mutations that write the metadata to an Accumulo table. */
Create the <code>Mutation</code>s required to write a <code>PCJMetadata</code> object to an Accumulo table
makeWriteMetadataMutations
{ "repo_name": "meiercaleb/incubator-rya", "path": "extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/PcjTables.java", "license": "apache-2.0", "size": 34866 }
[ "com.google.common.base.Preconditions", "java.util.ArrayList", "java.util.LinkedList", "java.util.List", "org.apache.accumulo.core.data.Mutation", "org.apache.accumulo.core.data.Value", "org.apache.rya.indexing.pcj.storage.PcjMetadata" ]
import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Value; import org.apache.rya.indexing.pcj.storage.PcjMetadata;
import com.google.common.base.*; import java.util.*; import org.apache.accumulo.core.data.*; import org.apache.rya.indexing.pcj.storage.*;
[ "com.google.common", "java.util", "org.apache.accumulo", "org.apache.rya" ]
com.google.common; java.util; org.apache.accumulo; org.apache.rya;
1,716,684
public synchronized static String getVersion() { if (_versionString == null) { if (Bukkit.getServer() == null) { // The server hasn't started, static initializer call? return null; } final String name = Bukkit.getServer().getClass().getPack...
synchronized static String function() { if (_versionString == null) { if (Bukkit.getServer() == null) { return null; } final String name = Bukkit.getServer().getClass().getPackage().getName(); _versionString = name.substring(name.lastIndexOf('.') + 1) + "."; } return _versionString; }
/** * Gets the version string from the package name of the CraftBukkit server implementation. * This is needed to bypass the JAR package name changing on each update. * @return The version string of the OBC and NMS packages, <em>including the trailing dot</em>. */
Gets the version string from the package name of the CraftBukkit server implementation. This is needed to bypass the JAR package name changing on each update
getVersion
{ "repo_name": "SilverCory/PlotSquared", "path": "Bukkit/src/main/java/com/plotsquared/bukkit/chat/Reflection.java", "license": "gpl-3.0", "size": 10165 }
[ "org.bukkit.Bukkit" ]
import org.bukkit.Bukkit;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
559,052
private List<ConnectPoint> getCrossConnectPoints(Path path) { boolean scanning = false; List<ConnectPoint> connectPoints = new LinkedList<>(); for (Link link : path.links()) { if (!isCrossConnectLink(link)) { continue; } ...
List<ConnectPoint> function(Path path) { boolean scanning = false; List<ConnectPoint> connectPoints = new LinkedList<>(); for (Link link : path.links()) { if (!isCrossConnectLink(link)) { continue; } if (scanning) { connectPoints.add(checkNotNull(link.src())); scanning = false; } else { connectPoints.add(checkNotNull(l...
/** * Returns list of cross connection points of missing optical path sections. * * Scans the given multi-layer path and looks for sections that use cross connect links. * The ingress and egress points in the optical layer are returned in a list. * * @param path the...
Returns list of cross connection points of missing optical path sections. Scans the given multi-layer path and looks for sections that use cross connect links. The ingress and egress points in the optical layer are returned in a list
getCrossConnectPoints
{ "repo_name": "donNewtonAlpha/onos", "path": "apps/optical/src/main/java/org/onosproject/optical/OpticalPathProvisioner.java", "license": "apache-2.0", "size": 15071 }
[ "java.util.LinkedList", "java.util.List", "org.onosproject.net.ConnectPoint", "org.onosproject.net.Link", "org.onosproject.net.Path" ]
import java.util.LinkedList; import java.util.List; import org.onosproject.net.ConnectPoint; import org.onosproject.net.Link; import org.onosproject.net.Path;
import java.util.*; import org.onosproject.net.*;
[ "java.util", "org.onosproject.net" ]
java.util; org.onosproject.net;
1,348,280
ByteReader skipBytes(int numberOfBytes) throws IOException;
ByteReader skipBytes(int numberOfBytes) throws IOException;
/** * Skip the specified number of bytes. * * @param numberOfBytes the number of bytes to skip. * @return this <code>ByteReader</code> * @throws IOException if an I/O problem occurs while reading the data. */
Skip the specified number of bytes
skipBytes
{ "repo_name": "blerer/horizondb-io", "path": "src/main/java/io/horizondb/io/ByteReader.java", "license": "apache-2.0", "size": 5063 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,381,367
public void testImportResource() throws Throwable { CmsObject cms = getCmsObject(); echo("Testing import resource"); String resourcename = "/folder1/test1.html"; String contentStr = "Hello this is my content"; byte[] content = contentStr.getBytes(); long timestamp ...
void function() throws Throwable { CmsObject cms = getCmsObject(); echo(STR); String resourcename = STR; String contentStr = STR; byte[] content = contentStr.getBytes(); long timestamp = System.currentTimeMillis() - 87654321; CmsResource resource = new CmsResource( CmsUUID.getNullUUID(), CmsUUID.getNullUUID(), resource...
/** * Test the import resource method.<p> * * @throws Throwable if something goes wrong */
Test the import resource method
testImportResource
{ "repo_name": "serrapos/opencms-core", "path": "test/org/opencms/file/TestCreateWriteResource.java", "license": "lgpl-2.1", "size": 37276 }
[ "org.opencms.file.types.CmsResourceTypePlain", "org.opencms.main.OpenCms", "org.opencms.util.CmsUUID" ]
import org.opencms.file.types.CmsResourceTypePlain; import org.opencms.main.OpenCms; import org.opencms.util.CmsUUID;
import org.opencms.file.types.*; import org.opencms.main.*; import org.opencms.util.*;
[ "org.opencms.file", "org.opencms.main", "org.opencms.util" ]
org.opencms.file; org.opencms.main; org.opencms.util;
2,736,061
void visit(@Nonnull OWLNamedIndividual individual);
void visit(@Nonnull OWLNamedIndividual individual);
/** * visit OWLNamedIndividual type * * @param individual * individual to visit */
visit OWLNamedIndividual type
visit
{ "repo_name": "matthewhorridge/owlapi-gwt", "path": "owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/model/OWLIndividualVisitor.java", "license": "lgpl-3.0", "size": 2124 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,285,126
public void testVerbs() throws IOException { check("खाना", "खा"); check("खाता", "खा"); check("खाती", "खा"); check("खा", "खा"); }
void function() throws IOException { check("खाना", "खा"); check("खाता", "खा"); check("खाती", "खा"); check("खा", "खा"); }
/** * Test some verb forms */
Test some verb forms
testVerbs
{ "repo_name": "q474818917/solr-5.2.0", "path": "lucene/analysis/common/src/test/org/apache/lucene/analysis/hi/TestHindiStemmer.java", "license": "apache-2.0", "size": 3457 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,707,177
public Map<Cause, Integer> getCauseCounts() { return Collections.unmodifiableMap(causeBag); }
Map<Cause, Integer> function() { return Collections.unmodifiableMap(causeBag); }
/** * Get list of causes with duplicates combined into counters. * @return Map of Cause to number of occurrences of that Cause */
Get list of causes with duplicates combined into counters
getCauseCounts
{ "repo_name": "v1v/jenkins", "path": "core/src/main/java/hudson/model/CauseAction.java", "license": "mit", "size": 6501 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,582,013
public Sink<ElementT> withCodec(CodecFactory codec) { return toBuilder().setCodec(new SerializableAvroCodecFactory(codec)).build(); } @Nullable private transient Schema schema; @Nullable private transient DataFileWriter<ElementT> reflectWriter; @Nullable private transient DataFileWriter<Gener...
Sink<ElementT> function(CodecFactory codec) { return toBuilder().setCodec(new SerializableAvroCodecFactory(codec)).build(); } @Nullable private transient Schema schema; @Nullable private transient DataFileWriter<ElementT> reflectWriter; @Nullable private transient DataFileWriter<GenericRecord> genericWriter;
/** * Specifies to use the given {@link CodecFactory} for each generated file. By default, {@code * CodecFactory.snappyCodec()}. */
Specifies to use the given <code>CodecFactory</code> for each generated file. By default, CodecFactory.snappyCodec()
withCodec
{ "repo_name": "RyanSkraba/beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/AvroIO.java", "license": "apache-2.0", "size": 77248 }
[ "javax.annotation.Nullable", "org.apache.avro.Schema", "org.apache.avro.file.CodecFactory", "org.apache.avro.file.DataFileWriter", "org.apache.avro.generic.GenericRecord" ]
import javax.annotation.Nullable; import org.apache.avro.Schema; import org.apache.avro.file.CodecFactory; import org.apache.avro.file.DataFileWriter; import org.apache.avro.generic.GenericRecord;
import javax.annotation.*; import org.apache.avro.*; import org.apache.avro.file.*; import org.apache.avro.generic.*;
[ "javax.annotation", "org.apache.avro" ]
javax.annotation; org.apache.avro;
1,207,360
private void putTurnToPositionBlock(TurnToPositionBlock block, GamePacketBuilder blockBuilder) { Position pos = block.getPosition(); blockBuilder.put(DataType.SHORT, pos.getX() * 2 + 1); blockBuilder.put(DataType.SHORT, pos.getY() * 2 + 1); }
void function(TurnToPositionBlock block, GamePacketBuilder blockBuilder) { Position pos = block.getPosition(); blockBuilder.put(DataType.SHORT, pos.getX() * 2 + 1); blockBuilder.put(DataType.SHORT, pos.getY() * 2 + 1); }
/** * Puts a Turn To Position block into the specified builder. * * @param block * The block. * @param blockBuilder * The builder. */
Puts a Turn To Position block into the specified builder
putTurnToPositionBlock
{ "repo_name": "AWildridge/ProtoScape", "path": "src/org/apollo/net/release/r377/PlayerSynchronizationEventEncoder.java", "license": "isc", "size": 19640 }
[ "org.apollo.game.model.Position", "org.apollo.game.sync.block.TurnToPositionBlock", "org.apollo.net.codec.game.DataType", "org.apollo.net.codec.game.GamePacketBuilder" ]
import org.apollo.game.model.Position; import org.apollo.game.sync.block.TurnToPositionBlock; import org.apollo.net.codec.game.DataType; import org.apollo.net.codec.game.GamePacketBuilder;
import org.apollo.game.model.*; import org.apollo.game.sync.block.*; import org.apollo.net.codec.game.*;
[ "org.apollo.game", "org.apollo.net" ]
org.apollo.game; org.apollo.net;
1,893,844
public static long getARealList(final Context context, final long tempList) { long returnList = tempList; if (returnList == -1) { // Then check if a default list is specified SharedPreferences prefs = PreferenceManager .getDefaultSharedPreferences(context); returnList = Long.parseLong(prefs.getStr...
static long function(final Context context, final long tempList) { long returnList = tempList; if (returnList == -1) { SharedPreferences prefs = PreferenceManager .getDefaultSharedPreferences(context); returnList = Long.parseLong(prefs.getString(context .getString(R.string.pref_defaultlist), "-1")); } if (returnList > ...
/** * If temp list is > 0, returns it. Else, checks if a default list is set * then returns that. If none set, then returns first (alphabetical) list * Returns -1 if no lists in database. * * Guarantees default list is valid */
If temp list is > 0, returns it. Else, checks if a default list is set then returns that. If none set, then returns first (alphabetical) list Returns -1 if no lists in database. Guarantees default list is valid
getARealList
{ "repo_name": "taimur97/NotePad", "path": "app/src/main/java/com/nononsenseapps/notepad/fragments/TaskListViewPagerFragment.java", "license": "gpl-3.0", "size": 13845 }
[ "android.content.Context", "android.content.SharedPreferences", "android.database.Cursor", "android.preference.PreferenceManager", "com.nononsenseapps.notepad.database.TaskList" ]
import android.content.Context; import android.content.SharedPreferences; import android.database.Cursor; import android.preference.PreferenceManager; import com.nononsenseapps.notepad.database.TaskList;
import android.content.*; import android.database.*; import android.preference.*; import com.nononsenseapps.notepad.database.*;
[ "android.content", "android.database", "android.preference", "com.nononsenseapps.notepad" ]
android.content; android.database; android.preference; com.nononsenseapps.notepad;
2,450,071
@PublicAtsApi public static UiDriver getCustomDriver( String driverClassName, Class<?>[] parameterTypes, Object[] constructorArguments ) throws Exception { UiDriver driver...
static UiDriver function( String driverClassName, Class<?>[] parameterTypes, Object[] constructorArguments ) throws Exception { UiDriver driver = null; try { Class<?> clss = Class.forName(driverClassName); Constructor<?> constructor = new MethodFinder(clss).findConstructor(parameterTypes); driver = (UiDriver) construct...
/** * This method allows you to load your own driver implementation which you can use as any other UI Engine driver * @param driverClassName the full class name of the custom driver class * @param parameterTypes the parameters that the constructor requires * @param constructorArguments the arguments, w...
This method allows you to load your own driver implementation which you can use as any other UI Engine driver
getCustomDriver
{ "repo_name": "Axway/ats-framework", "path": "uiengine/src/main/java/com/axway/ats/uiengine/UiDriver.java", "license": "apache-2.0", "size": 13035 }
[ "com.axway.ats.core.reflect.MethodFinder", "java.lang.reflect.Constructor" ]
import com.axway.ats.core.reflect.MethodFinder; import java.lang.reflect.Constructor;
import com.axway.ats.core.reflect.*; import java.lang.reflect.*;
[ "com.axway.ats", "java.lang" ]
com.axway.ats; java.lang;
471,751
// fast version public static < T extends NumericType< T > > void gradientCentralDifference( final RandomAccessible< T > source, final RandomAccessibleInterval< T > gradient, final int dimension ) { final int n = gradient.numDimensions(); final long[] min = new long[ n ]; gradient.min( min ); final long[]...
static < T extends NumericType< T > > void function( final RandomAccessible< T > source, final RandomAccessibleInterval< T > gradient, final int dimension ) { final int n = gradient.numDimensions(); final long[] min = new long[ n ]; gradient.min( min ); final long[] max = new long[ n ]; gradient.max( max ); final long[...
/** * Compute the partial derivative of source in a particular dimension. * * @param source * source image, has to provide valid data in the interval of the * gradient image plus a one pixel border in dimension. * @param gradient * output image * @param dimension * ...
Compute the partial derivative of source in a particular dimension
gradientCentralDifference
{ "repo_name": "bogovicj/hhmi-exp", "path": "src/main/java/net/imglib2/algorithms/gradient/PartialDerivativeDirectional.java", "license": "apache-2.0", "size": 21858 }
[ "net.imglib2.RandomAccess", "net.imglib2.RandomAccessible", "net.imglib2.RandomAccessibleInterval", "net.imglib2.type.numeric.NumericType", "net.imglib2.util.Intervals" ]
import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; import net.imglib2.type.numeric.NumericType; import net.imglib2.util.Intervals;
import net.imglib2.*; import net.imglib2.type.numeric.*; import net.imglib2.util.*;
[ "net.imglib2", "net.imglib2.type", "net.imglib2.util" ]
net.imglib2; net.imglib2.type; net.imglib2.util;
784,751
public List<ConfigValue> validate(Map<String, String> props) { return new ArrayList<>(validateAll(props).values()); }
List<ConfigValue> function(Map<String, String> props) { return new ArrayList<>(validateAll(props).values()); }
/** * Validate the current configuration values with the configuration definition. * @param props the current configuration values * @return List of Config, each Config contains the updated configuration information given * the current configuration values. */
Validate the current configuration values with the configuration definition
validate
{ "repo_name": "zzwlstarby/mykafka", "path": "clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java", "license": "apache-2.0", "size": 57787 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
983,692
public RepositoryDirectoryInterface getRepositoryDirectory() { return new RepositoryDirectory(); }
RepositoryDirectoryInterface function() { return new RepositoryDirectory(); }
/** * Not supported for Partition schema, return the root. */
Not supported for Partition schema, return the root
getRepositoryDirectory
{ "repo_name": "emartin-pentaho/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/partition/PartitionSchema.java", "license": "apache-2.0", "size": 9653 }
[ "org.pentaho.di.repository.RepositoryDirectory", "org.pentaho.di.repository.RepositoryDirectoryInterface" ]
import org.pentaho.di.repository.RepositoryDirectory; import org.pentaho.di.repository.RepositoryDirectoryInterface;
import org.pentaho.di.repository.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,862,138
public Collection<SipApplicationSessionStateListener> getAppSessionStateListeners() { return m_appSessionStateListeners.values(); }
Collection<SipApplicationSessionStateListener> function() { return m_appSessionStateListeners.values(); }
/** * Gets the collection of Activation Sessions Listeners associated with this SIP * application descriptor. * * @return */
Gets the collection of Activation Sessions Listeners associated with this SIP application descriptor
getAppSessionStateListeners
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.sipcontainer/src/com/ibm/ws/sip/container/parser/SipAppDesc.java", "license": "epl-1.0", "size": 54998 }
[ "com.ibm.websphere.sip.SipApplicationSessionStateListener", "java.util.Collection" ]
import com.ibm.websphere.sip.SipApplicationSessionStateListener; import java.util.Collection;
import com.ibm.websphere.sip.*; import java.util.*;
[ "com.ibm.websphere", "java.util" ]
com.ibm.websphere; java.util;
2,046,490
@Deprecated // Use m_graph.getSelectedNodes public static <NodeType extends ISelectableNode> IFilledList<NodeType> getSelectedNodes( final ISelectableGraph<NodeType> graph) { Preconditions.checkNotNull(graph, "Error: Graph argument can't be null"); final IFilledList<NodeType> nodes = new FilledList<No...
@Deprecated static <NodeType extends ISelectableNode> IFilledList<NodeType> function( final ISelectableGraph<NodeType> graph) { Preconditions.checkNotNull(graph, STR); final IFilledList<NodeType> nodes = new FilledList<NodeType>();
/** * Creates a list of all selected nodes of the graph. * * @param <NodeType> The type of the nodes in the graph. * * @param graph The graph in question. * * @return All selected nodes of the graph. */
Creates a list of all selected nodes of the graph
getSelectedNodes
{ "repo_name": "guiquanz/binnavi", "path": "src/main/java/com/google/security/zynamics/zylib/gui/zygraph/helpers/GraphHelpers.java", "license": "apache-2.0", "size": 18670 }
[ "com.google.common.base.Preconditions", "com.google.security.zynamics.zylib.types.lists.FilledList", "com.google.security.zynamics.zylib.types.lists.IFilledList" ]
import com.google.common.base.Preconditions; import com.google.security.zynamics.zylib.types.lists.FilledList; import com.google.security.zynamics.zylib.types.lists.IFilledList;
import com.google.common.base.*; import com.google.security.zynamics.zylib.types.lists.*;
[ "com.google.common", "com.google.security" ]
com.google.common; com.google.security;
651,206
public static long[] checkNotEmpty(long[] array) { Preconditions.checkNotNull(array); if (array.length == 0) { throw new IllegalArgumentException(); } return array; } /** * Ensures that an array is not empty. * * @param array an array ...
static long[] function(long[] array) { Preconditions.checkNotNull(array); if (array.length == 0) { throw new IllegalArgumentException(); } return array; } /** * Ensures that an array is not empty. * * @param array an array * @param errorMessage the exception message to use if the check fails; will be converted to a str...
/** * Ensures that an array is not empty. * * @param array an array * @return the non-empty array that was validated * @throws NullPointerException if {@code array} is null * @throws IllegalArgumentException if {@code array} empty. */
Ensures that an array is not empty
checkNotEmpty
{ "repo_name": "equus52/carbine-common", "path": "src/main/java/equus/carbine/util/Preconditions2.java", "license": "mit", "size": 13153 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,341,019
@Test(expected = IOException.class) public void testTableRecordReaderScannerFailMapreduceTwice() throws IOException, InterruptedException { Table htable = createIOEScannerTable(Bytes.toBytes("table3-mr"), 2); runTestMapreduce(htable); }
@Test(expected = IOException.class) void function() throws IOException, InterruptedException { Table htable = createIOEScannerTable(Bytes.toBytes(STR), 2); runTestMapreduce(htable); }
/** * Run test assuming Scanner IOException failure using newer mapreduce api * * @throws IOException * @throws InterruptedException */
Run test assuming Scanner IOException failure using newer mapreduce api
testTableRecordReaderScannerFailMapreduceTwice
{ "repo_name": "ndimiduk/hbase", "path": "hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormat.java", "license": "apache-2.0", "size": 18051 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Table", "org.apache.hadoop.hbase.util.Bytes", "org.junit.Test" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.util.Bytes; import org.junit.Test;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
2,255,915
private void setupPaints() { barPaint.setColor(barColor); barPaint.setAntiAlias(true); barPaint.setStyle(Style.STROKE); barPaint.setStrokeWidth(barWidth); rimPaint.setColor(rimColor); rimPaint.setAntiAlias(true); rimPaint.setStyle(Style.STROKE); rimPaint.setStrokeWidth(rimWidth); circlePaint.setC...
void function() { barPaint.setColor(barColor); barPaint.setAntiAlias(true); barPaint.setStyle(Style.STROKE); barPaint.setStrokeWidth(barWidth); rimPaint.setColor(rimColor); rimPaint.setAntiAlias(true); rimPaint.setStyle(Style.STROKE); rimPaint.setStrokeWidth(rimWidth); circlePaint.setColor(Color.WHITE); circlePaint.set...
/** * Set the properties of the paints we're using to * draw the progress wheel */
Set the properties of the paints we're using to draw the progress wheel
setupPaints
{ "repo_name": "kuastw/KUAS-AP-Material", "path": "KUAS-AP-Material/app/src/main/java/silent/kuasapmaterial/libs/ProgressWheel.java", "license": "mit", "size": 24439 }
[ "android.graphics.Color", "android.graphics.Paint" ]
import android.graphics.Color; import android.graphics.Paint;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,689,060
public int previous() { CharacterIterator text = getText(); // if we have cached break positions and we're still in the range // covered by them, just move one step backward in the cache if (cachedBreakPositions != null && positionInCache > 0) { --positionInCache; ...
int function() { CharacterIterator text = getText(); if (cachedBreakPositions != null && positionInCache > 0) { --positionInCache; text.setIndex(cachedBreakPositions[positionInCache]); return cachedBreakPositions[positionInCache]; } else { cachedBreakPositions = null; int offset = current(); int result = super.previous...
/** * Advances the iterator one step backwards. * @return The position of the last boundary position before the * current iteration position * @stable ICU 2.0 */
Advances the iterator one step backwards
previous
{ "repo_name": "UweTrottmann/QuickDic-Dictionary", "path": "jars/icu4j-4_8_1_1/main/classes/core/src/com/ibm/icu/text/DictionaryBasedBreakIterator.java", "license": "apache-2.0", "size": 25373 }
[ "java.text.CharacterIterator" ]
import java.text.CharacterIterator;
import java.text.*;
[ "java.text" ]
java.text;
311,587
public void exitApplication(boolean forceQuit) { if (!forceQuit) { List<AgentInfo> agents = (List<AgentInfo>) registry.lookup(LookupNames.AGENTS); Iterator<AgentInfo> i = agents.iterator(); AgentInfo agentInfo; Agent a; //Agents termination phase. i = agents.iterator(); List<AgentInfo> not...
void function(boolean forceQuit) { if (!forceQuit) { List<AgentInfo> agents = (List<AgentInfo>) registry.lookup(LookupNames.AGENTS); Iterator<AgentInfo> i = agents.iterator(); AgentInfo agentInfo; Agent a; i = agents.iterator(); List<AgentInfo> notTerminated = new ArrayList<AgentInfo>(); while (i.hasNext()) { agentInfo...
/** Shuts the services down and exits the application. * * @param forceQuit Pass <code>true</code> to force i.e. do not check if * the application can terminate, * <code>false</code> otherwise. */
Shuts the services down and exits the application
exitApplication
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/DataServicesFactory.java", "license": "gpl-2.0", "size": 21678 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.openmicroscopy.shoola.env.Agent", "org.openmicroscopy.shoola.env.LookupNames", "org.openmicroscopy.shoola.env.config.AgentInfo", "org.openmicroscopy.shoola.util.ui.IconManager", "org.openmicroscopy.shoola.util.ui.MessageBox" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.openmicroscopy.shoola.env.Agent; import org.openmicroscopy.shoola.env.LookupNames; import org.openmicroscopy.shoola.env.config.AgentInfo; import org.openmicroscopy.shoola.util.ui.IconManager; import org.openmicroscopy.shoola.util.u...
import java.util.*; import org.openmicroscopy.shoola.env.*; import org.openmicroscopy.shoola.env.config.*; import org.openmicroscopy.shoola.util.ui.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
471,029
public TBasketBean getBean() { return getBean(new IdentityMap()); }
TBasketBean function() { return getBean(new IdentityMap()); }
/** * Creates a TBasketBean with the contents of this object * This also creates beans for cached related objects, if they exist * @return a TBasketBean with the contents of this object */
Creates a TBasketBean with the contents of this object This also creates beans for cached related objects, if they exist
getBean
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTBasket.java", "license": "gpl-3.0", "size": 41013 }
[ "com.aurel.track.beans.TBasketBean", "org.apache.commons.collections.map.IdentityMap" ]
import com.aurel.track.beans.TBasketBean; import org.apache.commons.collections.map.IdentityMap;
import com.aurel.track.beans.*; import org.apache.commons.collections.map.*;
[ "com.aurel.track", "org.apache.commons" ]
com.aurel.track; org.apache.commons;
2,650,746
public void partitionedRegionTestAfterDestroyRegion(final String prName) { vm0.invoke(new CacheSerializableRunnable( "doPutCreateInvalidateOperations1") {
void function(final String prName) { vm0.invoke(new CacheSerializableRunnable( STR) {
/** * Test the Region operations after the PartitionedRegion has been destroyed * * @param prName */
Test the Region operations after the PartitionedRegion has been destroyed
partitionedRegionTestAfterDestroyRegion
{ "repo_name": "ysung-pivotal/incubator-geode", "path": "gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIDUnitTest.java", "license": "apache-2.0", "size": 52995 }
[ "com.gemstone.gemfire.cache30.CacheSerializableRunnable" ]
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
2,399,310
public Object getProperty(String path) { AggregationPath aggPath = AggregationPath.parse(path); return getProperty(aggPath.getPathElementsAsStringList()); }
Object function(String path) { AggregationPath aggPath = AggregationPath.parse(path); return getProperty(aggPath.getPathElementsAsStringList()); }
/** * Get the value of specified path in the aggregation. * * @param path * the path to the property in the aggregation tree * @return the value of the property */
Get the value of specified path in the aggregation
getProperty
{ "repo_name": "lks21c/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/aggregations/InternalAggregation.java", "license": "apache-2.0", "size": 8493 }
[ "org.elasticsearch.search.aggregations.support.AggregationPath" ]
import org.elasticsearch.search.aggregations.support.AggregationPath;
import org.elasticsearch.search.aggregations.support.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
1,219,410
public interface Configurable extends AzureConfigurable<Configurable> { DnsZoneManager authenticate(TokenCredential credential, AzureProfile profile); } private static class ConfigurableImpl extends AzureConfigurableImpl<Configurable> implements Configurable {
interface Configurable extends AzureConfigurable<Configurable> { DnsZoneManager function(TokenCredential credential, AzureProfile profile); } private static class ConfigurableImpl extends AzureConfigurableImpl<Configurable> implements Configurable {
/** * Creates an instance of DnsZoneManager that exposes DNS zone API entry points. * * @param credential the credential to use * @param profile the profile to use * @return the interface exposing DNS zone management API entry points that work across subscriptions *...
Creates an instance of DnsZoneManager that exposes DNS zone API entry points
authenticate
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-dns/src/main/java/com/azure/resourcemanager/dns/DnsZoneManager.java", "license": "mit", "size": 3779 }
[ "com.azure.core.credential.TokenCredential", "com.azure.core.management.profile.AzureProfile", "com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable", "com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl" ]
import com.azure.core.credential.TokenCredential; import com.azure.core.management.profile.AzureProfile; import com.azure.resourcemanager.resources.fluentcore.arm.AzureConfigurable; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.AzureConfigurableImpl;
import com.azure.core.credential.*; import com.azure.core.management.profile.*; import com.azure.resourcemanager.resources.fluentcore.arm.*; import com.azure.resourcemanager.resources.fluentcore.arm.implementation.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,120,949
@Override public void visitCode(Code obj) { Method method = getMethod(); if (method.isSynthetic()) { return; } declaredCheckedExceptions.clear(); stack.resetForMethodEntry(this); ExceptionTable et = method.getExceptionTable(); if (et != null...
void function(Code obj) { Method method = getMethod(); if (method.isSynthetic()) { return; } declaredCheckedExceptions.clear(); stack.resetForMethodEntry(this); ExceptionTable et = method.getExceptionTable(); if (et != null) { if (classIsFinal classIsAnonymous method.isStatic() method.isPrivate() method.isFinal() ((Val...
/** * implements the visitor to see if the method declares that it throws any checked exceptions. * * @param obj * the context object of the currently parsed code block */
implements the visitor to see if the method declares that it throws any checked exceptions
visitCode
{ "repo_name": "rblasch/fb-contrib", "path": "src/main/java/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java", "license": "lgpl-2.1", "size": 13570 }
[ "com.mebigfatguy.fbcontrib.utils.BugType", "com.mebigfatguy.fbcontrib.utils.StopOpcodeParsingException", "com.mebigfatguy.fbcontrib.utils.Values", "edu.umd.cs.findbugs.BugInstance", "org.apache.bcel.Repository", "org.apache.bcel.classfile.Code", "org.apache.bcel.classfile.ExceptionTable", "org.apache....
import com.mebigfatguy.fbcontrib.utils.BugType; import com.mebigfatguy.fbcontrib.utils.StopOpcodeParsingException; import com.mebigfatguy.fbcontrib.utils.Values; import edu.umd.cs.findbugs.BugInstance; import org.apache.bcel.Repository; import org.apache.bcel.classfile.Code; import org.apache.bcel.classfile.ExceptionTa...
import com.mebigfatguy.fbcontrib.utils.*; import edu.umd.cs.findbugs.*; import org.apache.bcel.*; import org.apache.bcel.classfile.*;
[ "com.mebigfatguy.fbcontrib", "edu.umd.cs", "org.apache.bcel" ]
com.mebigfatguy.fbcontrib; edu.umd.cs; org.apache.bcel;
1,253,279
@SuppressWarnings("unchecked") // can cast to <T> because non-Ts are removed @GwtIncompatible // Class.isInstance public static <T> UnmodifiableIterator<T> filter(Iterator<?> unfiltered, Class<T> desiredType) { return (UnmodifiableIterator<T>) filter(unfiltered, instanceOf(desiredType)); } /** * Retur...
@SuppressWarnings(STR) @GwtIncompatible static <T> UnmodifiableIterator<T> function(Iterator<?> unfiltered, Class<T> desiredType) { return (UnmodifiableIterator<T>) filter(unfiltered, instanceOf(desiredType)); } /** * Returns {@code true} if one or more elements returned by {@code iterator}
/** * Returns a view of {@code unfiltered} containing all elements that are of * the type {@code desiredType}. */
Returns a view of unfiltered containing all elements that are of the type desiredType
filter
{ "repo_name": "tli2/guava", "path": "guava/src/com/google/common/collect/Iterators.java", "license": "apache-2.0", "size": 45046 }
[ "com.google.common.annotations.GwtIncompatible", "com.google.common.base.Predicates", "java.util.Iterator" ]
import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Predicates; import java.util.Iterator;
import com.google.common.annotations.*; import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
698,621
Ip4Prefix prefix = Ip4Prefix.valueOf("1.2.3.0/24"); Ip4Address nextHop = Ip4Address.valueOf("5.6.7.8"); RouteEntry routeEntry = new RouteEntry(prefix, nextHop); assertThat(routeEntry.toString(), is("RouteEntry{prefix=1.2.3.0/24, nextHop=5.6.7.8}")); }
Ip4Prefix prefix = Ip4Prefix.valueOf(STR); Ip4Address nextHop = Ip4Address.valueOf(STR); RouteEntry routeEntry = new RouteEntry(prefix, nextHop); assertThat(routeEntry.toString(), is(STR)); }
/** * Tests valid class constructor. */
Tests valid class constructor
testConstructor
{ "repo_name": "ravikumaran2015/ravikumaran201504", "path": "apps/routing-api/src/test/java/org/onosproject/routing/RouteEntryTest.java", "license": "apache-2.0", "size": 5366 }
[ "org.hamcrest.Matchers", "org.junit.Assert", "org.onlab.packet.Ip4Address", "org.onlab.packet.Ip4Prefix" ]
import org.hamcrest.Matchers; import org.junit.Assert; import org.onlab.packet.Ip4Address; import org.onlab.packet.Ip4Prefix;
import org.hamcrest.*; import org.junit.*; import org.onlab.packet.*;
[ "org.hamcrest", "org.junit", "org.onlab.packet" ]
org.hamcrest; org.junit; org.onlab.packet;
598,049
@Function(name = "delete", arity = 1) public static Object delete(ExecutionContext cx, Object thisValue, Object value) { SetObject s = thisSetObject(cx, thisValue, "Set.prototype.delete"); LinkedMap<Object, Void> entries = s.getSetData(); ...
@Function(name = STR, arity = 1) static Object function(ExecutionContext cx, Object thisValue, Object value) { SetObject s = thisSetObject(cx, thisValue, STR); LinkedMap<Object, Void> entries = s.getSetData(); return entries.delete(value); }
/** * 23.2.3.4 Set.prototype.delete ( value ) * * @param cx * the execution context * @param thisValue * the function this-value * @param value * the value * @return {@code true} if the entry was deleted ...
23.2.3.4 Set.prototype.delete ( value )
delete
{ "repo_name": "anba/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/objects/collection/SetPrototype.java", "license": "mit", "size": 10809 }
[ "com.github.anba.es6draft.runtime.ExecutionContext", "com.github.anba.es6draft.runtime.internal.LinkedMap", "com.github.anba.es6draft.runtime.internal.Properties" ]
import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.internal.LinkedMap; import com.github.anba.es6draft.runtime.internal.Properties;
import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.internal.*;
[ "com.github.anba" ]
com.github.anba;
2,406,411
public NDArray map(@NonNull DoubleUnaryOperator operator) { NDArray toReturn = getFactory().zeros(numRows(), numCols()); for (int i = 0; i < length(); i++) { toReturn.set(i, operator.applyAsDouble(get(i))); } return toReturn; }
NDArray function(@NonNull DoubleUnaryOperator operator) { NDArray toReturn = getFactory().zeros(numRows(), numCols()); for (int i = 0; i < length(); i++) { toReturn.set(i, operator.applyAsDouble(get(i))); } return toReturn; }
/** * Applies the given operator to each element in this NDArray creating a new NDArray in the process. * * @param operator the operator to apply * @return the new NDArray with values calculated using the given operator */
Applies the given operator to each element in this NDArray creating a new NDArray in the process
map
{ "repo_name": "dbracewell/apollo", "path": "src/main/java/com/davidbracewell/apollo/linear/NDArray.java", "license": "apache-2.0", "size": 68768 }
[ "java.util.function.DoubleUnaryOperator" ]
import java.util.function.DoubleUnaryOperator;
import java.util.function.*;
[ "java.util" ]
java.util;
926,313
@TaskAction public void verify() throws IOException, NoSuchAlgorithmException { action.execute(); }
void function() throws IOException, NoSuchAlgorithmException { action.execute(); }
/** * Starts verifying * @throws IOException if the file could not be verified * @throws NoSuchAlgorithmException if the given algorithm is not available */
Starts verifying
verify
{ "repo_name": "michel-kraemer/gradle-download-task", "path": "src/main/java/de/undercouch/gradle/tasks/download/Verify.java", "license": "apache-2.0", "size": 2355 }
[ "java.io.IOException", "java.security.NoSuchAlgorithmException" ]
import java.io.IOException; import java.security.NoSuchAlgorithmException;
import java.io.*; import java.security.*;
[ "java.io", "java.security" ]
java.io; java.security;
358,132
private void respondWithError(final HttpServletResponse resp, final OAuthProblemException error) throws IOException, ServletException { OAuthResponse oauthResponse = null; try { if (isEmpty(error.getError())) { oauthResponse = ...
void function(final HttpServletResponse resp, final OAuthProblemException error) throws IOException, ServletException { OAuthResponse oauthResponse = null; try { if (isEmpty(error.getError())) { oauthResponse = errorResponse(SC_UNAUTHORIZED).setRealm(realm) .buildHeaderMessage(); } else { int responseCode = SC_UNAUTHOR...
/** * Constructs an OAuth-supported HTTP error response. * * @param resp * @param error * @throws IOException * @throws ServletException */
Constructs an OAuth-supported HTTP error response
respondWithError
{ "repo_name": "fcrepo4-archive/fcrepo-module-auth-oauth", "path": "src/main/java/org/fcrepo/auth/oauth/filter/OAuthFilter.java", "license": "apache-2.0", "size": 6529 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletResponse", "org.apache.oltu.oauth2.common.exception.OAuthProblemException", "org.apache.oltu.oauth2.common.exception.OAuthSystemException", "org.apache.oltu.oauth2.common.message.OAuthResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; import org.apache.oltu.oauth2.common.exception.OAuthProblemException; import org.apache.oltu.oauth2.common.exception.OAuthSystemException; import org.apache.oltu.oauth2.common.message.OAuthResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.oltu.oauth2.common.exception.*; import org.apache.oltu.oauth2.common.message.*;
[ "java.io", "javax.servlet", "org.apache.oltu" ]
java.io; javax.servlet; org.apache.oltu;
1,662,423