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
void setBidInMicros(@Nullable Long bidInMicros) { throw new IllegalStateException(String.format("Cannot set bid on a %s node", getNodeType())); }
void setBidInMicros(@Nullable Long bidInMicros) { throw new IllegalStateException(String.format(STR, getNodeType())); }
/** * Sets the bid for this state. * * @param bidInMicros the new bid for the state * @throws IllegalStateException by default. Biddable subclasses should override this behavior. */
Sets the bid for this state
setBidInMicros
{ "repo_name": "googleads/googleads-java-lib", "path": "modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/utils/v201809/shopping/ProductPartitionNode.java", "license": "apache-2.0", "size": 19976 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
8,397
public List<String> precompute(Query q, Collection<? extends QueryNode> indexes, boolean allFields, String category) throws ObjectStoreException { Connection c = null; try { c = getConnection(); return precomputeWithConnection(c, q, indexes, allFields, category); ...
List<String> function(Query q, Collection<? extends QueryNode> indexes, boolean allFields, String category) throws ObjectStoreException { Connection c = null; try { c = getConnection(); return precomputeWithConnection(c, q, indexes, allFields, category); } catch (SQLException e) { throw new ObjectStoreException(STR, e)...
/** * Creates precomputed tables for the given query. * * @param q the Query for which to create the precomputed tables * @param indexes a Collection of QueryNodes for which to create indexes * @param allFields true if all fields of QueryClasses in the SELECT list should be included in * t...
Creates precomputed tables for the given query
precompute
{ "repo_name": "joshkh/intermine", "path": "intermine/objectstore/main/src/org/intermine/objectstore/intermine/ObjectStoreInterMineImpl.java", "license": "lgpl-2.1", "size": 101645 }
[ "java.sql.Connection", "java.sql.SQLException", "java.util.Collection", "java.util.List", "org.intermine.objectstore.ObjectStoreException", "org.intermine.objectstore.query.Query", "org.intermine.objectstore.query.QueryNode" ]
import java.sql.Connection; import java.sql.SQLException; import java.util.Collection; import java.util.List; import org.intermine.objectstore.ObjectStoreException; import org.intermine.objectstore.query.Query; import org.intermine.objectstore.query.QueryNode;
import java.sql.*; import java.util.*; import org.intermine.objectstore.*; import org.intermine.objectstore.query.*;
[ "java.sql", "java.util", "org.intermine.objectstore" ]
java.sql; java.util; org.intermine.objectstore;
896,985
@Override public java.util.Date getModifiedDate() { return _jobPos.getModifiedDate(); }
java.util.Date function() { return _jobPos.getModifiedDate(); }
/** * Returns the modified date of this Job Pos. * * @return the modified date of this Job Pos */
Returns the modified date of this Job Pos
getModifiedDate
{ "repo_name": "openegovplatform/OEPv2", "path": "oep-usermgt-portlet/docroot/WEB-INF/service/org/oep/usermgt/model/JobPosWrapper.java", "license": "apache-2.0", "size": 11278 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
661,824
private void initialize() throws CarbonSortKeyAndGroupByException { try { stream = FileFactory.getDataOutputStream(outPutFile.getPath(), writeBufferSize, compressorName); this.stream.writeInt(this.totalNumberOfRecords); } catch (FileNotFoundException e) { throw new CarbonSortKeyAnd...
void function() throws CarbonSortKeyAndGroupByException { try { stream = FileFactory.getDataOutputStream(outPutFile.getPath(), writeBufferSize, compressorName); this.stream.writeInt(this.totalNumberOfRecords); } catch (FileNotFoundException e) { throw new CarbonSortKeyAndGroupByException(STR, e); } catch (IOException e...
/** * This method is responsible for initializing the out stream * * @throws CarbonSortKeyAndGroupByException */
This method is responsible for initializing the out stream
initialize
{ "repo_name": "zzcclp/carbondata", "path": "processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeIntermediateFileMerger.java", "license": "apache-2.0", "size": 9377 }
[ "java.io.FileNotFoundException", "java.io.IOException", "org.apache.carbondata.core.datastore.impl.FileFactory", "org.apache.carbondata.processing.sort.exception.CarbonSortKeyAndGroupByException" ]
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.carbondata.core.datastore.impl.FileFactory; import org.apache.carbondata.processing.sort.exception.CarbonSortKeyAndGroupByException;
import java.io.*; import org.apache.carbondata.core.datastore.impl.*; import org.apache.carbondata.processing.sort.exception.*;
[ "java.io", "org.apache.carbondata" ]
java.io; org.apache.carbondata;
1,707,406
public Image getImage() { return image.getImage(); }
public Image getImage() { return image.getImage(); }
/** * Returns whether or not the mod is active. * @return true if active */
Returns whether or not the mod is active
isActive
{ "repo_name": "Bigpet/opsu", "path": "src/itdelatrisu/opsu/GameMod.java", "license": "gpl-3.0", "size": 14576 }
[ "org.newdawn.slick.Image" ]
import org.newdawn.slick.Image;
import org.newdawn.slick.*;
[ "org.newdawn.slick" ]
org.newdawn.slick;
97,908
public List<Long> getValuesAsLong() throws DataFieldException { Iterator<String> iterator; Vector<Long> values; int count = 0; if (this.value.length() == 0) { return (new Vector<Long>()); } values = new Vector<Long>(); iterator = this.values.iterator(); while (iterator.hasNext()) { count++; ...
List<Long> function() throws DataFieldException { Iterator<String> iterator; Vector<Long> values; int count = 0; if (this.value.length() == 0) { return (new Vector<Long>()); } values = new Vector<Long>(); iterator = this.values.iterator(); while (iterator.hasNext()) { count++; try { values.addElement(Long.valueOf(Long....
/** * <p>Returns the values as {@link Long} objects.</p> * <p>If the data field contains only one value, a list with only one * element will be returned.</p> * @return The values of class {@link Long}. * @throws DataFieldException If the field does not contain parsable long * values. */
Returns the values as <code>Long</code> objects. If the data field contains only one value, a list with only one element will be returned
getValuesAsLong
{ "repo_name": "derBeukatt/AniDBTool", "path": "src/net/anidb/udp/DataField.java", "license": "gpl-3.0", "size": 8088 }
[ "java.util.Iterator", "java.util.List", "java.util.Vector" ]
import java.util.Iterator; import java.util.List; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,511,017
@Test public void testAddIssueWatcher() throws RedmineException { final Issue issue = createIssues(issueManager, projectId, 1).get(0); final Issue retrievedIssue = issueManager.getIssueById(issue.getId()); assertEquals(issue, retrievedIssue); final User newUser = userManager.cre...
void function() throws RedmineException { final Issue issue = createIssues(issueManager, projectId, 1).get(0); final Issue retrievedIssue = issueManager.getIssueById(issue.getId()); assertEquals(issue, retrievedIssue); final User newUser = userManager.createUser(UserGenerator.generateRandomUser()); try { Watcher watche...
/** * Requires Redmine 2.3 */
Requires Redmine 2.3
testAddIssueWatcher
{ "repo_name": "redminenb/redmine-java-api", "path": "src/test/java/com/taskadapter/redmineapi/IssueManagerIT.java", "license": "apache-2.0", "size": 60932 }
[ "com.taskadapter.redmineapi.IssueHelper", "com.taskadapter.redmineapi.bean.Issue", "com.taskadapter.redmineapi.bean.User", "com.taskadapter.redmineapi.bean.Watcher", "com.taskadapter.redmineapi.bean.WatcherFactory", "org.junit.Assert" ]
import com.taskadapter.redmineapi.IssueHelper; import com.taskadapter.redmineapi.bean.Issue; import com.taskadapter.redmineapi.bean.User; import com.taskadapter.redmineapi.bean.Watcher; import com.taskadapter.redmineapi.bean.WatcherFactory; import org.junit.Assert;
import com.taskadapter.redmineapi.*; import com.taskadapter.redmineapi.bean.*; import org.junit.*;
[ "com.taskadapter.redmineapi", "org.junit" ]
com.taskadapter.redmineapi; org.junit;
1,571,977
public void switchLanguageImmediately(String language) { super.switchLanguage(language); finish(); Intent intent = new Intent(OverviewActivity.this, OverviewActivity.class); startActivity(intent); }
void function(String language) { super.switchLanguage(language); finish(); Intent intent = new Intent(OverviewActivity.this, OverviewActivity.class); startActivity(intent); }
/** * Change app's language to <code>language</code> immediately * * @param language <br> * <li>"en" for English</li> * <li>"de" for Deutsch</li> */
Change app's language to <code>language</code> immediately
switchLanguageImmediately
{ "repo_name": "apm1467/mind-rate", "path": "Android_App/MindRate/app/src/main/java/com/example/mindrate/activity/OverviewActivity.java", "license": "mit", "size": 26946 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
770,452
void addLevelResult (LevelResultVO levelResultVO);
void addLevelResult (LevelResultVO levelResultVO);
/** * Add result for single round */
Add result for single round
addLevelResult
{ "repo_name": "missayuko/tilt-game-android", "path": "app/src/main/java/com/mediamonks/googleflip/pages/game/management/Player.java", "license": "mit", "size": 1080 }
[ "com.mediamonks.googleflip.data.vo.LevelResultVO" ]
import com.mediamonks.googleflip.data.vo.LevelResultVO;
import com.mediamonks.googleflip.data.vo.*;
[ "com.mediamonks.googleflip" ]
com.mediamonks.googleflip;
2,172,959
protected void viewRecordField(DDFField poField) { DDFFieldDefinition poFieldDefn = poField.getFieldDefn(); // Report general information about the field. Debug.output(" Field " + poFieldDefn.getName() + ": " + poFieldDefn.getDescription()); // Get pointer to this fields raw data. We wil...
void function(DDFField poField) { DDFFieldDefinition poFieldDefn = poField.getFieldDefn(); Debug.output(STR + poFieldDefn.getName() + STR + poFieldDefn.getDescription()); byte[] pachFieldData = poField.getData(); int nBytesRemaining = poField.getDataSize(); for (int iRepeat = 0; iRepeat < poField.getRepeatCount(); iRep...
/** * Dump the contents of a field instance in a record. */
Dump the contents of a field instance in a record
viewRecordField
{ "repo_name": "d2fn/passage", "path": "src/main/java/com/bbn/openmap/dataAccess/iso8211/View8211.java", "license": "mit", "size": 6922 }
[ "com.bbn.openmap.util.Debug" ]
import com.bbn.openmap.util.Debug;
import com.bbn.openmap.util.*;
[ "com.bbn.openmap" ]
com.bbn.openmap;
617,132
public void actionPerformed(ActionEvent e) { final int nextX = window.virtualX + deltaX; final int nextY = window.virtualY + deltaY; boolean terminate = false; switch (dir) { case UP_IN: case UP_OUT: if (nextY < finalY) { ...
void function(ActionEvent e) { final int nextX = window.virtualX + deltaX; final int nextY = window.virtualY + deltaY; boolean terminate = false; switch (dir) { case UP_IN: case UP_OUT: if (nextY < finalY) { terminate = true; } break; case DOWN_IN: case DOWN_OUT: if (nextY > finalY) { terminate = true; } break; case LE...
/** * Perform a single step in the animation. */
Perform a single step in the animation
actionPerformed
{ "repo_name": "liyue80/GmailAssistant20", "path": "src/org/freeshell/zs/common/SlidingAnimator.java", "license": "gpl-2.0", "size": 9881 }
[ "java.awt.event.ActionEvent", "java.awt.image.BufferedImage", "javax.swing.JWindow" ]
import java.awt.event.ActionEvent; import java.awt.image.BufferedImage; import javax.swing.JWindow;
import java.awt.event.*; import java.awt.image.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,618,060
public static ErrorMessageFactory shouldBeBeforeYear(Date actual, int year) { return new ShouldBeBeforeYear(actual, year, StandardComparisonStrategy.instance()); } private ShouldBeBeforeYear(Date actual, int year, ComparisonStrategy comparisonStrategy) { super("%nExpecting year of:%n <%s>%nto be strictly...
static ErrorMessageFactory function(Date actual, int year) { return new ShouldBeBeforeYear(actual, year, StandardComparisonStrategy.instance()); } private ShouldBeBeforeYear(Date actual, int year, ComparisonStrategy comparisonStrategy) { super(STR, actual, year, comparisonStrategy); }
/** * Creates a new <code>{@link ShouldBeBeforeYear}</code>. * @param actual the actual value in the failed assertion. * @param year the year to compare the actual date's year to. * @return the created {@code ErrorMessageFactory}. */
Creates a new <code><code>ShouldBeBeforeYear</code></code>
shouldBeBeforeYear
{ "repo_name": "xasx/assertj-core", "path": "src/main/java/org/assertj/core/error/ShouldBeBeforeYear.java", "license": "apache-2.0", "size": 2157 }
[ "java.util.Date", "org.assertj.core.internal.ComparisonStrategy", "org.assertj.core.internal.StandardComparisonStrategy" ]
import java.util.Date; import org.assertj.core.internal.ComparisonStrategy; import org.assertj.core.internal.StandardComparisonStrategy;
import java.util.*; import org.assertj.core.internal.*;
[ "java.util", "org.assertj.core" ]
java.util; org.assertj.core;
1,177,595
@Test public void testOnFlowAddedPre_Upper() throws Exception { createPowerSpy(); ConversionTable conversionTable = new ConversionTable(); conversionTable.addEntryConnectionType("LowerNetworkId", "lower"); conversionTable.addEntryConnectionType("UpperNetworkId", "upper"); conversionT...
void function() throws Exception { createPowerSpy(); ConversionTable conversionTable = new ConversionTable(); conversionTable.addEntryConnectionType(STR, "lower"); conversionTable.addEntryConnectionType(STR, "upper"); conversionTable.addEntryConnectionType(STR, STR); PowerMockito.doReturn(conversionTable).when(target, ...
/** * Test method for {@link org.o3project.odenos.component.linklayerizer.LinkLayerizer#onFlowAddedPre(java.lang.String, org.o3project.odenos.core.component.network.flow.Flow)}. * @throws Exception */
Test method for <code>org.o3project.odenos.component.linklayerizer.LinkLayerizer#onFlowAddedPre(java.lang.String, org.o3project.odenos.core.component.network.flow.Flow)</code>
testOnFlowAddedPre_Upper
{ "repo_name": "narry/odenos", "path": "src/test/java/org/o3project/odenos/component/linklayerizer/LinkLayerizerTest.java", "license": "apache-2.0", "size": 127722 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.HashMap", "java.util.List", "java.util.Map", "org.hamcrest.CoreMatchers", "org.junit.Assert", "org.mockito.Matchers", "org.mockito.Mockito", "org.o3project.odenos.core.component.ConversionTable", "org.o3project.odenos.core.component.NetworkIn...
import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.mockito.Matchers; import org.mockito.Mockito; import org.o3project.odenos.core.component.ConversionTable; import org.o3project...
import java.util.*; import org.hamcrest.*; import org.junit.*; import org.mockito.*; import org.o3project.odenos.core.component.*; import org.o3project.odenos.core.component.network.flow.*; import org.o3project.odenos.core.component.network.flow.basic.*; import org.powermock.api.mockito.*; import org.powermock.reflect....
[ "java.util", "org.hamcrest", "org.junit", "org.mockito", "org.o3project.odenos", "org.powermock.api", "org.powermock.reflect" ]
java.util; org.hamcrest; org.junit; org.mockito; org.o3project.odenos; org.powermock.api; org.powermock.reflect;
1,904,133
public static int skipAs(String stmt, int offset) { offset = ParseUtil.move(stmt, offset, 0); if (stmt.length() > offset + "AS".length() && (stmt.charAt(offset) == 'A' || stmt.charAt(offset) == 'a') && (stmt.charAt(offset + 1) == 'S' || stmt.charAt(offset + 1) == 's') ...
static int function(String stmt, int offset) { offset = ParseUtil.move(stmt, offset, 0); if (stmt.length() > offset + "AS".length() && (stmt.charAt(offset) == 'A' stmt.charAt(offset) == 'a') && (stmt.charAt(offset + 1) == 'S' stmt.charAt(offset + 1) == 's') && (stmt.charAt(offset + 2) == ' ' stmt.charAt(offset + 2) == ...
/** * <code>SELECT LAST_INSERT_ID() AS id</code> * * @param offset index of first ' ' after LAST_INSERT_ID(), offset == * stmt.length() is possible * @return index of 'i'. return stmt.length() is possible */
<code>SELECT LAST_INSERT_ID() AS id</code>
skipAs
{ "repo_name": "xloye/tddl5", "path": "tddl-server/src/main/java/com/alibaba/cobar/server/parser/ServerParseSelect.java", "license": "apache-2.0", "size": 14349 }
[ "com.alibaba.cobar.server.util.ParseUtil" ]
import com.alibaba.cobar.server.util.ParseUtil;
import com.alibaba.cobar.server.util.*;
[ "com.alibaba.cobar" ]
com.alibaba.cobar;
282,143
public Paint getPaint() { return this.paint; }
Paint function() { return this.paint; }
/** * Returns the paint. * * @return The paint (never <code>null</code>). * * @see #setPaint(Paint) */
Returns the paint
getPaint
{ "repo_name": "SpoonLabs/astor", "path": "examples/chart_11/source/org/jfree/chart/plot/dial/DialValueIndicator.java", "license": "gpl-2.0", "size": 20817 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,500,313
public static Pair<SlotId, SlotId> getEqSlots(Expr e) { if (!(e instanceof BinaryPredicate)) return null; return ((BinaryPredicate) e).getEqSlots(); }
static Pair<SlotId, SlotId> function(Expr e) { if (!(e instanceof BinaryPredicate)) return null; return ((BinaryPredicate) e).getEqSlots(); }
/** * If e is an equality predicate between two slots that only require implicit * casts, returns those two slots; otherwise returns null. */
If e is an equality predicate between two slots that only require implicit casts, returns those two slots; otherwise returns null
getEqSlots
{ "repo_name": "kapilrastogi/Impala", "path": "fe/src/main/java/com/cloudera/impala/analysis/BinaryPredicate.java", "license": "apache-2.0", "size": 12635 }
[ "com.cloudera.impala.common.Pair" ]
import com.cloudera.impala.common.Pair;
import com.cloudera.impala.common.*;
[ "com.cloudera.impala" ]
com.cloudera.impala;
2,336,984
private void walkRuleAndAdd( final BuildRule rule, final boolean isForTests, final LinkedHashSet<DependentModule> dependencies, @Nullable final BuildRule srcTarget) { final String basePathForRule = rule.getBuildTarget().getBasePath(); new AbstractDependencyVisitor(rule, true ) { ...
void function( final BuildRule rule, final boolean isForTests, final LinkedHashSet<DependentModule> dependencies, @Nullable final BuildRule srcTarget) { final String basePathForRule = rule.getBuildTarget().getBasePath(); new AbstractDependencyVisitor(rule, true ) { private final LinkedHashSet<DependentModule> libraries...
/** * Walks the dependencies of a build rule and adds the appropriate DependentModules to the * specified dependencies collection. All library dependencies will be added before any module * dependencies. See {@link ProjectTest#testThatJarsAreListedBeforeModules()} for details on why * this behavior is impor...
Walks the dependencies of a build rule and adds the appropriate DependentModules to the specified dependencies collection. All library dependencies will be added before any module dependencies. See <code>ProjectTest#testThatJarsAreListedBeforeModules()</code> for details on why this behavior is important
walkRuleAndAdd
{ "repo_name": "denizt/buck", "path": "src/com/facebook/buck/command/Project.java", "license": "apache-2.0", "size": 41859 }
[ "com.facebook.buck.rules.AbstractDependencyVisitor", "com.facebook.buck.rules.BuildRule", "com.google.common.collect.Sets", "java.util.LinkedHashSet", "javax.annotation.Nullable" ]
import com.facebook.buck.rules.AbstractDependencyVisitor; import com.facebook.buck.rules.BuildRule; import com.google.common.collect.Sets; import java.util.LinkedHashSet; import javax.annotation.Nullable;
import com.facebook.buck.rules.*; import com.google.common.collect.*; import java.util.*; import javax.annotation.*;
[ "com.facebook.buck", "com.google.common", "java.util", "javax.annotation" ]
com.facebook.buck; com.google.common; java.util; javax.annotation;
776,629
public RemoteReaderAttributes toRemoteReaderAttributes() { m_remoteAtt.setGUID(m_guid); m_remoteAtt.expectsInlineQos = this.m_expectsInlineQos; m_remoteAtt.endpoint.durabilityKind = m_qos.durability.kind == TRANSIENT_LOCAL_DURABILITY_QOS ? TRANSIENT_LOCAL : VOLATILE; m_remoteAtt.endp...
RemoteReaderAttributes function() { m_remoteAtt.setGUID(m_guid); m_remoteAtt.expectsInlineQos = this.m_expectsInlineQos; m_remoteAtt.endpoint.durabilityKind = m_qos.durability.kind == TRANSIENT_LOCAL_DURABILITY_QOS ? TRANSIENT_LOCAL : VOLATILE; m_remoteAtt.endpoint.endpointKind = READER; m_remoteAtt.endpoint.topicKind ...
/** * Convert the ProxyData information to RemoteReaderAttributes object. * * @return Reference to the RemoteReaderAttributes object. */
Convert the ProxyData information to RemoteReaderAttributes object
toRemoteReaderAttributes
{ "repo_name": "Fiware/i2nd.KIARA", "path": "src/main/java/org/fiware/kiara/ps/rtps/builtin/data/ReaderProxyData.java", "license": "lgpl-3.0", "size": 27666 }
[ "org.fiware.kiara.ps.rtps.attributes.RemoteReaderAttributes" ]
import org.fiware.kiara.ps.rtps.attributes.RemoteReaderAttributes;
import org.fiware.kiara.ps.rtps.attributes.*;
[ "org.fiware.kiara" ]
org.fiware.kiara;
1,482,567
private void handleNumericAttribute(Instances trainInstances) throws Exception { m_c45S = new C45Split(m_attIndex, 2, m_sumOfWeights, true); m_c45S.buildClassifier(trainInstances); if (m_c45S.numSubsets() == 0) { return; } m_errors = 0; Instances [] trainingSets = new Instances ...
void function(Instances trainInstances) throws Exception { m_c45S = new C45Split(m_attIndex, 2, m_sumOfWeights, true); m_c45S.buildClassifier(trainInstances); if (m_c45S.numSubsets() == 0) { return; } m_errors = 0; Instances [] trainingSets = new Instances [m_complexityIndex]; trainingSets[0] = new Instances(trainInsta...
/** * Creates split on numeric attribute. * * @exception Exception if something goes wrong */
Creates split on numeric attribute
handleNumericAttribute
{ "repo_name": "dsibournemouth/autoweka", "path": "weka-3.7.7/src/main/java/weka/classifiers/trees/j48/NBTreeSplit.java", "license": "gpl-3.0", "size": 11847 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,779,261
@Test public void testPersistentPartitionedRegionWithGatewaySenderPersistenceEnabled() { Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1)); Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort)); createCacheInVMs(nyPort, vm2, vm...
void function() { Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1)); Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort)); createCacheInVMs(nyPort, vm2, vm3); createReceiverInVMs(vm2, vm3); createCacheInVMs(lnPort, vm4, vm5, vm6, vm7); vm4.inv...
/** * Enable persistence for region as well as GatewaySender and see if remote site receives all the * events. */
Enable persistence for region as well as GatewaySender and see if remote site receives all the events
testPersistentPartitionedRegionWithGatewaySenderPersistenceEnabled
{ "repo_name": "pdxrunner/geode", "path": "geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java", "license": "apache-2.0", "size": 70917 }
[ "org.apache.geode.internal.cache.wan.WANTestBase" ]
import org.apache.geode.internal.cache.wan.WANTestBase;
import org.apache.geode.internal.cache.wan.*;
[ "org.apache.geode" ]
org.apache.geode;
2,704,924
private static void overridePartsOfSpeech(WordVertex wv) { if (wv.getLemma().equals("view") && wv.getParentAt(0).getRelationship() == Relationship.DEP) { if (wv.getOriginalWord().endsWith("s")) {wv.setPartOfSpeech(PartOfSpeech.NNS); } else { wv.setPartOfSpeech(PartOfSpeech.NN); } } }
static void function(WordVertex wv) { if (wv.getLemma().equals("view") && wv.getParentAt(0).getRelationship() == Relationship.DEP) { if (wv.getOriginalWord().endsWith("s")) {wv.setPartOfSpeech(PartOfSpeech.NNS); } else { wv.setPartOfSpeech(PartOfSpeech.NN); } } }
/** * Correct possible issues w/ parts of speech from our overrides with "view" * @param wv */
Correct possible issues w/ parts of speech from our overrides with "view"
overridePartsOfSpeech
{ "repo_name": "RealsearchGroup/REDE", "path": "application/src/edu/ncsu/csc/nl/model/WordVertex.java", "license": "apache-2.0", "size": 49201 }
[ "edu.ncsu.csc.nl.model.type.PartOfSpeech", "edu.ncsu.csc.nl.model.type.Relationship" ]
import edu.ncsu.csc.nl.model.type.PartOfSpeech; import edu.ncsu.csc.nl.model.type.Relationship;
import edu.ncsu.csc.nl.model.type.*;
[ "edu.ncsu.csc" ]
edu.ncsu.csc;
2,196,645
public ReportConfigDataset withGrouping(List<ReportConfigGrouping> grouping) { this.grouping = grouping; return this; }
ReportConfigDataset function(List<ReportConfigGrouping> grouping) { this.grouping = grouping; return this; }
/** * Set the grouping property: Array of group by expression to use in the report. Report can have up to 2 group by * clauses. * * @param grouping the grouping value to set. * @return the ReportConfigDataset object itself. */
Set the grouping property: Array of group by expression to use in the report. Report can have up to 2 group by clauses
withGrouping
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/costmanagement/azure-resourcemanager-costmanagement/src/main/java/com/azure/resourcemanager/costmanagement/models/ReportConfigDataset.java", "license": "mit", "size": 6996 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,303,560
public CombiningAlgFactory getCombiningAlgFactory(String name) throws UnknownIdentifierException { Object object = this.combiningMap.get(name); if (object == null) { throw new UnknownIdentifierException("unknown factory: " + name); } return (CombiningAlgFactory)object; }
CombiningAlgFactory function(String name) throws UnknownIdentifierException { Object object = this.combiningMap.get(name); if (object == null) { throw new UnknownIdentifierException(STR + name); } return (CombiningAlgFactory)object; }
/** * Returns the combiningAlg factory with the given name. If no such * factory exists then an exception is thrown. * * @param name The name of the combining algorithm factory. * * @return the matching combiningAlg factory * * @throws UnknownIdentifierException if the name is unknown */
Returns the combiningAlg factory with the given name. If no such factory exists then an exception is thrown
getCombiningAlgFactory
{ "repo_name": "GenericBreakGlass/GenericBreakGlass-XACML", "path": "src/com.sun.xacml/src/main/java/com/sun/xacml/ConfigurationStore.java", "license": "apache-2.0", "size": 46230 }
[ "com.sun.xacml.combine.CombiningAlgFactory" ]
import com.sun.xacml.combine.CombiningAlgFactory;
import com.sun.xacml.combine.*;
[ "com.sun.xacml" ]
com.sun.xacml;
581,949
GtkWidget gtk_tool_button_get_icon_widget(GtkToolButton button);
GtkWidget gtk_tool_button_get_icon_widget(GtkToolButton button);
/** * Return the widget used as icon widget on button . See gtk_tool_button_set_icon_widget(). * * @param button a GtkToolButton * @return The widget used as icon on button , or NULL. */
Return the widget used as icon widget on button . See gtk_tool_button_set_icon_widget()
gtk_tool_button_get_icon_widget
{ "repo_name": "Ccook/gtk-java-bindings", "path": "src/main/java/com/github/ccook/gtk/library/object/widget/container/bin/toolitem/GtkToolButtonLibrary.java", "license": "apache-2.0", "size": 5370 }
[ "com.github.ccook.gtk.model.object.GtkWidget", "com.github.ccook.gtk.model.object.widget.container.bin.toolitem.GtkToolButton" ]
import com.github.ccook.gtk.model.object.GtkWidget; import com.github.ccook.gtk.model.object.widget.container.bin.toolitem.GtkToolButton;
import com.github.ccook.gtk.model.object.*; import com.github.ccook.gtk.model.object.widget.container.bin.toolitem.*;
[ "com.github.ccook" ]
com.github.ccook;
1,061,030
// For server to server transfers public boolean remoteAppend(String filename) throws IOException { if (__dataConnectionMode == ACTIVE_REMOTE_DATA_CONNECTION_MODE || __dataConnectionMode == PASSIVE_REMOTE_DATA_CONNECTION_MODE) { return FTPReply.isPositivePreliminary(appe...
boolean function(String filename) throws IOException { if (__dataConnectionMode == ACTIVE_REMOTE_DATA_CONNECTION_MODE __dataConnectionMode == PASSIVE_REMOTE_DATA_CONNECTION_MODE) { return FTPReply.isPositivePreliminary(appe(filename)); } return false; } /** * There are a few FTPClient methods that do not complete the *...
/** * Initiate a server to server file transfer. This method tells the * server to which the client is connected to append to a given file on * the other server. The other server must have had a * <code> remoteRetrieve </code> issued to it by another FTPClient. * <p> * @param filename T...
Initiate a server to server file transfer. This method tells the server to which the client is connected to append to a given file on the other server. The other server must have had a <code> remoteRetrieve </code> issued to it by another FTPClient.
remoteAppend
{ "repo_name": "DanielRuf/Plain-of-JARs", "path": "sources/websitebackup/org/apache/commons/net/ftp/FTPClient.java", "license": "gpl-3.0", "size": 153753 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "org.apache.commons.net.io.Util" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.apache.commons.net.io.Util;
import java.io.*; import org.apache.commons.net.io.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
1,844,339
protected void doInspectionTest(@NonNls @NotNull String[] testFiles, @NotNull Class inspectionClass, @NonNls @NotNull String quickFixName, boolean applyFix, boolean available) { ...
void function(@NonNls @NotNull String[] testFiles, @NotNull Class inspectionClass, @NonNls @NotNull String quickFixName, boolean applyFix, boolean available) { myFixture.enableInspections(inspectionClass); myFixture.configureByFiles(testFiles); myFixture.checkHighlighting(true, false, false); final List<IntentionAction...
/** * Runs daemon passes and looks for given fix within infos. * * @param testFiles names of files to participate; first is used for inspection and then for check by "_after". * @param inspectionClass what inspection to run * @param quickFixName how the resulting fix should be named (the human-r...
Runs daemon passes and looks for given fix within infos
doInspectionTest
{ "repo_name": "goodwinnk/intellij-community", "path": "python/testSrc/com/jetbrains/python/Py3QuickFixTest.java", "license": "apache-2.0", "size": 10719 }
[ "com.intellij.codeInsight.intention.IntentionAction", "java.util.List", "org.jetbrains.annotations.NonNls", "org.jetbrains.annotations.NotNull" ]
import com.intellij.codeInsight.intention.IntentionAction; import java.util.List; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull;
import com.intellij.*; import java.util.*; import org.jetbrains.annotations.*;
[ "com.intellij", "java.util", "org.jetbrains.annotations" ]
com.intellij; java.util; org.jetbrains.annotations;
2,567,453
public static boolean logout(Context context) { Log.v(TAG, "logging out"); boolean success = setSession("", "", context.getSharedPreferences("dumpert", 0)); if(success) { Log.v(TAG, "Destroyed authentication data"); } else { Log.w(TAG, "Could not destroy aut...
static boolean function(Context context) { Log.v(TAG, STR); boolean success = setSession(STRSTRdumpertSTRDestroyed authentication dataSTRCould not destroy authentication data"); } return success; }
/** * destroys the "session" from SharedPreferences. * * @param context Context */
destroys the "session" from SharedPreferences
logout
{ "repo_name": "KeizerDev/Dumpert", "path": "Dumpert/src/main/java/io/jari/dumpert/api/Login.java", "license": "mit", "size": 11537 }
[ "android.content.Context", "android.util.Log" ]
import android.content.Context; import android.util.Log;
import android.content.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
222,689
public void process(String[] argv) throws ConfigurationException;
void function(String[] argv) throws ConfigurationException;
/** Process user arguments that have been provided from the command line * * @param argv */
Process user arguments that have been provided from the command line
process
{ "repo_name": "fionakim/biojava", "path": "biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/UserArgumentProcessor.java", "license": "lgpl-2.1", "size": 1015 }
[ "org.biojava.nbio.structure.align.util.ConfigurationException" ]
import org.biojava.nbio.structure.align.util.ConfigurationException;
import org.biojava.nbio.structure.align.util.*;
[ "org.biojava.nbio" ]
org.biojava.nbio;
1,335,897
LOGGER.info("SMS Status - configName = {}, params = {}", configName, params); if (!configService.hasConfig(configName)) { String msg = String.format("Received SMS Status for '%s' config but no matching config: %s, " + "will try the default config", configName, params); ...
LOGGER.info(STR, configName, params); if (!configService.hasConfig(configName)) { String msg = String.format(STR + STR, configName, params); LOGGER.error(msg); statusMessageService.warn(msg, SMS_MODULE); } Config config = configService.getConfigOrDefault(configName); Template template = templateService.getTemplate(conf...
/** * Handles a status update from a provider. This method will result in publishing a MOTECH Event and creating * a record in the database. * @param configName the name of the configuration for the provider that is sending the update * @param params params of the request sent by the provider *...
Handles a status update from a provider. This method will result in publishing a MOTECH Event and creating a record in the database
handle
{ "repo_name": "ngraczewski/modules", "path": "sms/src/main/java/org/motechproject/sms/web/StatusController.java", "license": "bsd-3-clause", "size": 11089 }
[ "org.motechproject.sms.configs.Config", "org.motechproject.sms.templates.Status", "org.motechproject.sms.templates.Template" ]
import org.motechproject.sms.configs.Config; import org.motechproject.sms.templates.Status; import org.motechproject.sms.templates.Template;
import org.motechproject.sms.configs.*; import org.motechproject.sms.templates.*;
[ "org.motechproject.sms" ]
org.motechproject.sms;
73,758
public synchronized IODViolationListImpl validate(DicomDataSet dds) throws javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerException, java.io.UnsupportedEncodingException, UnknownSOPClassException{ Document inputDocument = new XMLRepresentationOfDicomObjectFactory().ge...
synchronized IODViolationListImpl function(DicomDataSet dds) throws javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerException, java.io.UnsupportedEncodingException, UnknownSOPClassException{ Document inputDocument = new XMLRepresentationOfDicomObjectFactory().getDocument(dds); Source inpu...
/** * <p>Validate a DICOM composite storage instance against the standard IOD for the appropriate storage SOP Class.</p> * * @param dds the list of attributes comprising the DICOM composite storage instance to be validated * @return a string describing the results of the validation * @exception javax.xml.par...
Validate a DICOM composite storage instance against the standard IOD for the appropriate storage SOP Class
validate
{ "repo_name": "VHAINNOVATIONS/Telepathology", "path": "Source/Java/ImagingDicomDCFCommon/src/java/gov/va/med/imaging/dicom/dcftoolkit/common/validation/DicomInstanceValidator.java", "license": "apache-2.0", "size": 9361 }
[ "com.lbs.DCS", "gov.va.med.imaging.dicom.dcftoolkit.common.impl.IODViolationListImpl", "gov.va.med.imaging.exchange.business.dicom.exceptions.UnknownSOPClassException", "java.io.ByteArrayOutputStream", "java.io.IOException", "javax.xml.parsers.ParserConfigurationException", "javax.xml.transform.Source",...
import com.lbs.DCS; import gov.va.med.imaging.dicom.dcftoolkit.common.impl.IODViolationListImpl; import gov.va.med.imaging.exchange.business.dicom.exceptions.UnknownSOPClassException; import java.io.ByteArrayOutputStream; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import javax.xm...
import com.lbs.*; import gov.va.med.imaging.dicom.dcftoolkit.common.impl.*; import gov.va.med.imaging.exchange.business.dicom.exceptions.*; import java.io.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.w3c.dom.*;
[ "com.lbs", "gov.va.med", "java.io", "javax.xml", "org.w3c.dom" ]
com.lbs; gov.va.med; java.io; javax.xml; org.w3c.dom;
2,867,388
private void scanVars(Node n) { switch (n.getType()) { case Token.VAR: for (Node child = n.getFirstChild(); child != null; child = child.getNext()) { declareLHS(scope.getClosestHoistScope(), child); } return; case Token.LET: case Token.CONST: // Only de...
void function(Node n) { switch (n.getType()) { case Token.VAR: for (Node child = n.getFirstChild(); child != null; child = child.getNext()) { declareLHS(scope.getClosestHoistScope(), child); } return; case Token.LET: case Token.CONST: if (!isNodeAtCurrentLexicalScope(n)) { return; } for (Node child = n.getFirstChild();...
/** * Scans and gather variables declarations under a Node */
Scans and gather variables declarations under a Node
scanVars
{ "repo_name": "robbert/closure-compiler", "path": "src/com/google/javascript/jscomp/Es6SyntacticScopeCreator.java", "license": "apache-2.0", "size": 9442 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
1,981,219
void updateDurableSubscriptions(Map<String, String> subscriptions) throws AndesException;
void updateDurableSubscriptions(Map<String, String> subscriptions) throws AndesException;
/** * Updates a List of subscriptions with a given subscriptionId and given subscription information. * * @param subscriptions a map which contains the subscription ids and the modified subscription details * @throws AndesException */
Updates a List of subscriptions with a given subscriptionId and given subscription information
updateDurableSubscriptions
{ "repo_name": "prabathariyaratna/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/AndesContextStore.java", "license": "apache-2.0", "size": 21458 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,598,991
public static void getServerIP(Sender sender,ServerListener listener) { servIP = JOptionPane.showInputDialog("Please input server IP address Here!"); listener = listener; sender = sender; }
static void function(Sender sender,ServerListener listener) { servIP = JOptionPane.showInputDialog(STR); listener = listener; sender = sender; }
/** * Create the application. */
Create the application
getServerIP
{ "repo_name": "xiaochenai/MulticoreMP", "path": "src/PC/keyListenerTest.java", "license": "gpl-2.0", "size": 6073 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,054,696
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/29880") public void testMonitoringService() throws Exception { final boolean createAPMIndex = randomBoolean(); final String indexName = createAPMIndex ? "apm-2017.11.06" : "books"; assertThat(client().prepareIndex(inde...
@AwaitsFix(bugUrl = STRapm-2017.11.06STRbooksSTRdocSTR0STRtrueSTR{\STR:\STR}STRcluster.metadata.display_nameSTRmy clusterSTR.monitoring-es-*STRtypeSTRtimestampSTRExpecting a minimum number of 6 docs, one per collector", response.getHits().getHits().length, greaterThanOrEqualTo(6)); searchResponse.set(response); }); for...
/** * Monitoring Service test: * * This test waits for the monitoring service to collect monitoring documents and then checks that all expected documents * have been indexed with the expected information. */
Monitoring Service test: This test waits for the monitoring service to collect monitoring documents and then checks that all expected documents have been indexed with the expected information
testMonitoringService
{ "repo_name": "coding0011/elasticsearch", "path": "x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java", "license": "apache-2.0", "size": 21467 }
[ "java.util.Map", "org.elasticsearch.search.SearchHit", "org.elasticsearch.xpack.core.monitoring.MonitoredSystem", "org.elasticsearch.xpack.monitoring.MonitoringService", "org.hamcrest.Matchers" ]
import java.util.Map; import org.elasticsearch.search.SearchHit; import org.elasticsearch.xpack.core.monitoring.MonitoredSystem; import org.elasticsearch.xpack.monitoring.MonitoringService; import org.hamcrest.Matchers;
import java.util.*; import org.elasticsearch.search.*; import org.elasticsearch.xpack.core.monitoring.*; import org.elasticsearch.xpack.monitoring.*; import org.hamcrest.*;
[ "java.util", "org.elasticsearch.search", "org.elasticsearch.xpack", "org.hamcrest" ]
java.util; org.elasticsearch.search; org.elasticsearch.xpack; org.hamcrest;
928,726
protected String[] filterAppPaths(String[] unfilteredAppPaths) { Pattern filter = host.getDeployIgnorePattern(); if (filter == null) { return unfilteredAppPaths; } List<String> filteredList = new ArrayList<String>(); Matcher matcher = null; for (String ap...
String[] function(String[] unfilteredAppPaths) { Pattern filter = host.getDeployIgnorePattern(); if (filter == null) { return unfilteredAppPaths; } List<String> filteredList = new ArrayList<String>(); Matcher matcher = null; for (String appPath : unfilteredAppPaths) { if (matcher == null) { matcher = filter.matcher(app...
/** * Filter the list of application file paths to remove those that match * the regular expression defined by {@link Host#getDeployIgnore()}. * * @param unfilteredAppPaths The list of application paths to filtert * * @return The filtered list of application paths */
Filter the list of application file paths to remove those that match the regular expression defined by <code>Host#getDeployIgnore()</code>
filterAppPaths
{ "repo_name": "deathspeeder/class-guard", "path": "apache-tomcat-7.0.53-src/java/org/apache/catalina/startup/HostConfig.java", "license": "gpl-2.0", "size": 66582 }
[ "java.util.ArrayList", "java.util.List", "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
1,356,022
void markFolderAsDataset(boolean fad) { int n = table.getRowCount(); if (n == 0) return; DefaultTableModel dtm = (DefaultTableModel) table.getModel(); FileElement element; for (int i = 0; i < n; i++) { element = (FileElement) dtm.getValueAt(i, this.fileIndex); if (element...
void markFolderAsDataset(boolean fad) { int n = table.getRowCount(); if (n == 0) return; DefaultTableModel dtm = (DefaultTableModel) table.getModel(); FileElement element; for (int i = 0; i < n; i++) { element = (FileElement) dtm.getValueAt(i, this.fileIndex); if (element.isDirectory()) dtm.setValueAt(fad, i, this.fold...
/** * Marks the folder as a dataset. * * @param fad Pass <code>true</code> to mark the folder as a dataset, * <code>false</code> otherwise. */
Marks the folder as a dataset
markFolderAsDataset
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/FileSelectionTable.java", "license": "gpl-2.0", "size": 23372 }
[ "javax.swing.table.DefaultTableModel" ]
import javax.swing.table.DefaultTableModel;
import javax.swing.table.*;
[ "javax.swing" ]
javax.swing;
640,036
@Test public void testFilteringWithLowVersion() throws RepositoryBackendException { ProductDefinition productDefinition = new SimpleProductDefinition("com.ibm.ws.wlp", "8.0.0.0", "Archive", "ILAN", "DEVELOPERS"); Map<ResourceType, Collection<? extends RepositoryResource>> result = new Repositor...
void function() throws RepositoryBackendException { ProductDefinition productDefinition = new SimpleProductDefinition(STR, STR, STR, "ILAN", STR); Map<ResourceType, Collection<? extends RepositoryResource>> result = new RepositoryConnectionList(repoConnection).getResources(Collections.singleton(productDefinition), null...
/** * Tests that if you filter for version lower than most of the resources in the repo you get back the expected result * * @throws RepositoryBackendException */
Tests that if you filter for version lower than most of the resources in the repo you get back the expected result
testFilteringWithLowVersion
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.repository_fat_shared/src/com/ibm/ws/repository/test/ResourceFilteringTest.java", "license": "epl-1.0", "size": 56882 }
[ "com.ibm.ws.repository.common.enums.ResourceType", "com.ibm.ws.repository.connections.ProductDefinition", "com.ibm.ws.repository.connections.RepositoryConnectionList", "com.ibm.ws.repository.connections.SimpleProductDefinition", "com.ibm.ws.repository.exceptions.RepositoryBackendException", "com.ibm.ws.re...
import com.ibm.ws.repository.common.enums.ResourceType; import com.ibm.ws.repository.connections.ProductDefinition; import com.ibm.ws.repository.connections.RepositoryConnectionList; import com.ibm.ws.repository.connections.SimpleProductDefinition; import com.ibm.ws.repository.exceptions.RepositoryBackendException; imp...
import com.ibm.ws.repository.common.enums.*; import com.ibm.ws.repository.connections.*; import com.ibm.ws.repository.exceptions.*; import com.ibm.ws.repository.resources.*; import java.util.*; import org.junit.*;
[ "com.ibm.ws", "java.util", "org.junit" ]
com.ibm.ws; java.util; org.junit;
1,435,115
public void setInnerExpression(Expression expr) { expr.exprSetParent(this); m_expr = expr; }
void function(Expression expr) { expr.exprSetParent(this); m_expr = expr; }
/** * Set the inner contained expression of this filter. */
Set the inner contained expression of this filter
setInnerExpression
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java", "license": "gpl-2.0", "size": 10025 }
[ "com.sun.org.apache.xpath.internal.Expression" ]
import com.sun.org.apache.xpath.internal.Expression;
import com.sun.org.apache.xpath.internal.*;
[ "com.sun.org" ]
com.sun.org;
1,195,074
public DiskList withValue(List<DiskInner> value) { this.value = value; return this; }
DiskList function(List<DiskInner> value) { this.value = value; return this; }
/** * Set the value property: Results of the list operation. * * @param value the value value to set. * @return the DiskList object itself. */
Set the value property: Results of the list operation
withValue
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/models/DiskList.java", "license": "mit", "size": 2124 }
[ "com.azure.resourcemanager.devtestlabs.fluent.models.DiskInner", "java.util.List" ]
import com.azure.resourcemanager.devtestlabs.fluent.models.DiskInner; import java.util.List;
import com.azure.resourcemanager.devtestlabs.fluent.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
1,928,562
private boolean qualifies(final IAbstractCriteriumTreeNode node, final NaviNode naviNode) { if (node.getCriterium() instanceof IAbstractRootCriterium) { return qualifiesRootNode(node, naviNode); } else if (node.getCriterium() instanceof IAbstractAndCriterium) { return qualifiesAndNode(no...
boolean function(final IAbstractCriteriumTreeNode node, final NaviNode naviNode) { if (node.getCriterium() instanceof IAbstractRootCriterium) { return qualifiesRootNode(node, naviNode); } else if (node.getCriterium() instanceof IAbstractAndCriterium) { return qualifiesAndNode(node, naviNode); } else if (node.getCriteri...
/** * Checks whether a given node matches a formula. * * @param node The root node of the formula. * @param naviNode The node to match. * * @return True, if the node matches the formula. False, otherwise. */
Checks whether a given node matches a formula
qualifies
{ "repo_name": "mayl8822/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/CriteriaDialog/Conditions/CCriteriumExecuter.java", "license": "apache-2.0", "size": 7008 }
[ "com.google.security.zynamics.binnavi.Gui", "com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviNode" ]
import com.google.security.zynamics.binnavi.Gui; import com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviNode;
import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.binnavi.yfileswrap.zygraph.*;
[ "com.google.security" ]
com.google.security;
605,023
private WebPage mockWebPage(String url) { WebPage page = new SnapshotWebPage(); page.setUrl(url); page.setLinks(new HashSet<Link>()); page.setTextContent("text content..."); page.setName("page.html"); page.setTitle("page | title"); return page; }
WebPage function(String url) { WebPage page = new SnapshotWebPage(); page.setUrl(url); page.setLinks(new HashSet<Link>()); page.setTextContent(STR); page.setName(STR); page.setTitle(STR); return page; }
/** * Mock a WebPage for test. * @param url * @param category * @return Webpage instance. */
Mock a WebPage for test
mockWebPage
{ "repo_name": "opencharles/charles-rest", "path": "src/test/java/com/amihaiemil/charles/aws/EsBulkJsonTestCase.java", "license": "bsd-3-clause", "size": 3975 }
[ "com.amihaiemil.charles.Link", "com.amihaiemil.charles.SnapshotWebPage", "com.amihaiemil.charles.WebPage", "java.util.HashSet" ]
import com.amihaiemil.charles.Link; import com.amihaiemil.charles.SnapshotWebPage; import com.amihaiemil.charles.WebPage; import java.util.HashSet;
import com.amihaiemil.charles.*; import java.util.*;
[ "com.amihaiemil.charles", "java.util" ]
com.amihaiemil.charles; java.util;
2,540,052
@SimpleProperty(category = PropertyCategory.APPEARANCE) public int Width() { return frameLayout.getWidth(); }
@SimpleProperty(category = PropertyCategory.APPEARANCE) int function() { return frameLayout.getWidth(); }
/** * Width property getter method. * * @return width property used by the layout */
Width property getter method
Width
{ "repo_name": "cjessica/aifoo", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Form.java", "license": "mit", "size": 52635 }
[ "com.google.appinventor.components.annotations.PropertyCategory", "com.google.appinventor.components.annotations.SimpleProperty" ]
import com.google.appinventor.components.annotations.PropertyCategory; import com.google.appinventor.components.annotations.SimpleProperty;
import com.google.appinventor.components.annotations.*;
[ "com.google.appinventor" ]
com.google.appinventor;
279,290
public Map<HRegionInfo, HServerAddress> getRegionsInfo() throws IOException { final Map<HRegionInfo, HServerAddress> regionMap = new TreeMap<HRegionInfo, HServerAddress>();
Map<HRegionInfo, HServerAddress> function() throws IOException { final Map<HRegionInfo, HServerAddress> regionMap = new TreeMap<HRegionInfo, HServerAddress>();
/** * Get all the regions and their address for this table * * @return A map of HRegionInfo with it's server address * @throws IOException */
Get all the regions and their address for this table
getRegionsInfo
{ "repo_name": "adragomir/hbaseindex", "path": "src/java/org/apache/hadoop/hbase/client/HTable.java", "license": "apache-2.0", "size": 72350 }
[ "java.io.IOException", "java.util.Map", "java.util.TreeMap", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.HServerAddress" ]
import java.io.IOException; import java.util.Map; import java.util.TreeMap; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HServerAddress;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,696,849
@JsonSerialize(include = Inclusion.NON_NULL) @JsonProperty("error_uri") public String getErrorUri() { return errorUri; }
@JsonSerialize(include = Inclusion.NON_NULL) @JsonProperty(STR) String function() { return errorUri; }
/** * Returns the 'error_uri' property of the response. * * @return the error URI */
Returns the 'error_uri' property of the response
getErrorUri
{ "repo_name": "RobertWalsh/apigee-android-sdk", "path": "source/src/main/java/com/apigee/sdk/data/client/response/ApiResponse.java", "license": "apache-2.0", "size": 17062 }
[ "com.fasterxml.jackson.annotation.JsonProperty", "com.fasterxml.jackson.databind.annotation.JsonSerialize" ]
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
2,839,433
@PUT @Path(JAR_WORKER) @Consumes(PLAIN) @Produces(PLAIN) @Description("What is the full pathname of the server's per-user worker executable JAR file?") @Nonnull String setServerWorkerJar(@Nonnull String serverWorkerJar);
@Path(JAR_WORKER) @Consumes(PLAIN) @Produces(PLAIN) @Description(STR) String setServerWorkerJar(@Nonnull String serverWorkerJar);
/** * Set the full pathname of the worker JAR file. * * @param serverWorkerJar * What to set it to. * @return The new setting. */
Set the full pathname of the worker JAR file
setServerWorkerJar
{ "repo_name": "taverna/taverna-server", "path": "server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java", "license": "lgpl-2.1", "size": 30447 }
[ "javax.annotation.Nonnull", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.Produces", "org.apache.cxf.jaxrs.model.wadl.Description" ]
import javax.annotation.Nonnull; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.apache.cxf.jaxrs.model.wadl.Description;
import javax.annotation.*; import javax.ws.rs.*; import org.apache.cxf.jaxrs.model.wadl.*;
[ "javax.annotation", "javax.ws", "org.apache.cxf" ]
javax.annotation; javax.ws; org.apache.cxf;
1,906,349
void onStartingServices(List<Service> services) throws Exception;
void onStartingServices(List<Service> services) throws Exception;
/** * A strategy callback allowing special initialization when services are starting. * * @param services the service * @throws Exception is thrown in case of error */
A strategy callback allowing special initialization when services are starting
onStartingServices
{ "repo_name": "ullgren/camel", "path": "core/camel-api/src/main/java/org/apache/camel/Route.java", "license": "apache-2.0", "size": 8654 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,039,082
public ServiceFuture<NetworkInterfaceInner> updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map<String, String> tags, final ServiceCallback<NetworkInterfaceInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfac...
ServiceFuture<NetworkInterfaceInner> function(String resourceGroupName, String networkInterfaceName, Map<String, String> tags, final ServiceCallback<NetworkInterfaceInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags), serviceCallb...
/** * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @param tags Resource tags. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. ...
Updates a network interface tags
updateTagsAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/NetworkInterfacesInner.java", "license": "mit", "size": 183667 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture", "java.util.Map" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
1,350,670
protected final void teraSort(boolean gzip) throws Exception { System.out.println("TeraSort ==============================================================="); getFileSystem().delete(new Path(sortOutDir), true); final JobConf jobConf = new JobConf(); jobConf.setUser(getUser()); ...
final void function(boolean gzip) throws Exception { System.out.println(STR); getFileSystem().delete(new Path(sortOutDir), true); final JobConf jobConf = new JobConf(); jobConf.setUser(getUser()); jobConf.set(STR, getFsBase()); log().info(STR + numReduces()); jobConf.set(STR, String.valueOf(numReduces())); log().info(S...
/** * Does actual test TeraSort job Through Ignite API * * @param gzip Whether to use GZIP. */
Does actual test TeraSort job Through Ignite API
teraSort
{ "repo_name": "vadopolski/ignite", "path": "modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopTeraSortTest.java", "license": "apache-2.0", "size": 13585 }
[ "java.util.UUID", "org.apache.hadoop.fs.Path", "org.apache.hadoop.mapred.JobConf", "org.apache.hadoop.mapreduce.Job", "org.apache.ignite.hadoop.io.TextPartiallyRawComparator", "org.apache.ignite.internal.IgniteInternalFuture", "org.apache.ignite.internal.processors.hadoop.HadoopJobId", "org.apache.ign...
import java.util.UUID; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapreduce.Job; import org.apache.ignite.hadoop.io.TextPartiallyRawComparator; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.hadoop.HadoopJobId...
import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.mapreduce.*; import org.apache.ignite.hadoop.io.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.hadoop.*; import org.apache.ignite.internal.processors.hadoop.impl.*;
[ "java.util", "org.apache.hadoop", "org.apache.ignite" ]
java.util; org.apache.hadoop; org.apache.ignite;
925,219
UnsupportedCallbackException ce = new UnsupportedCallbackException(nc); assertEquals(nc, ce.getCallback()); try { throw ce; }catch (Exception e){ assertTrue(ce.equals(e)); assertEquals(nc, ce.getCallback()); } }
UnsupportedCallbackException ce = new UnsupportedCallbackException(nc); assertEquals(nc, ce.getCallback()); try { throw ce; }catch (Exception e){ assertTrue(ce.equals(e)); assertEquals(nc, ce.getCallback()); } }
/** * Test for UnsupportedCallbackException(Callback c) ctor */
Test for UnsupportedCallbackException(Callback c) ctor
testUnsupportedCallbackException_01
{ "repo_name": "rex-xxx/mt6572_x201", "path": "external/apache-harmony/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/UnsupportedCallbackExceptionTest.java", "license": "gpl-2.0", "size": 2665 }
[ "javax.security.auth.callback.UnsupportedCallbackException" ]
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.callback.*;
[ "javax.security" ]
javax.security;
1,786,831
public void scan(ModuleRegistry registry, File path, File... additionalPaths) { Set<File> discoveryPaths = Varargs.combineToSet(path, additionalPaths); scan(registry, discoveryPaths); }
void function(ModuleRegistry registry, File path, File... additionalPaths) { Set<File> discoveryPaths = Varargs.combineToSet(path, additionalPaths); scan(registry, discoveryPaths); }
/** * Scans one or more paths for modules. Paths are scanned in order, with directories scanned before files. If a module is discovered multiple times (same id and version), * the first copy of the module found is used. * * @param registry The registry to populate with discovered modules ...
Scans one or more paths for modules. Paths are scanned in order, with directories scanned before files. If a module is discovered multiple times (same id and version), the first copy of the module found is used
scan
{ "repo_name": "MovingBlocks/gestalt", "path": "gestalt-module/src/main/java/org/terasology/gestalt/module/ModulePathScanner.java", "license": "apache-2.0", "size": 4380 }
[ "java.io.File", "java.util.Set", "org.terasology.gestalt.util.Varargs" ]
import java.io.File; import java.util.Set; import org.terasology.gestalt.util.Varargs;
import java.io.*; import java.util.*; import org.terasology.gestalt.util.*;
[ "java.io", "java.util", "org.terasology.gestalt" ]
java.io; java.util; org.terasology.gestalt;
2,776,682
public Collection<Link> getLinks() { return links; } // To set the commection of links
Collection<Link> function() { return links; }
/** * Method declaration * @return * @see */
Method declaration
getLinks
{ "repo_name": "auroreallibe/Silverpeas-Core", "path": "core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/navigationlist/Item.java", "license": "agpl-3.0", "size": 4527 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,276,495
public Adapter createOperatorDeclAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class * '{@link fr.lip6.move.pnml.pthlpng.terms.OperatorDecl <em>Operator * Decl</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 ...
Creates a new adapter for an object of class '<code>fr.lip6.move.pnml.pthlpng.terms.OperatorDecl Operator Decl</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.
createOperatorDeclAdapter
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/partitions/util/PartitionsAdapterFactory.java", "license": "epl-1.0", "size": 12172 }
[ "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,580,397
@Test public void testIntegerIntervalSet() { checkIntegerIntervalSet("1,5", 1, 5); // empty checkIntegerIntervalSet(""); // empty due to exclusions checkIntegerIntervalSet("2,4,-1-5"); // open range checkIntegerIntervalSet("1-6,-3-5,4,9", 1, 2, 4, 6, 9); // repeats checkInteger...
@Test void function() { checkIntegerIntervalSet("1,5", 1, 5); checkIntegerIntervalSet(STR2,4,-1-5STR1-6,-3-5,4,9STR1,3,1,2-4,-2,-4", 1, 3); }
/** * Unit test for {@link IntegerIntervalSet}. */
Unit test for <code>IntegerIntervalSet</code>
testIntegerIntervalSet
{ "repo_name": "joshelser/incubator-calcite", "path": "core/src/test/java/org/apache/calcite/util/UtilTest.java", "license": "apache-2.0", "size": 52179 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
457,092
public static void finishWrite(OutputStream os) throws Exception { os.write(IMAGE_TRAILER); os.close(); }
static void function(OutputStream os) throws Exception { os.write(IMAGE_TRAILER); os.close(); }
/** * This is intended to be called after writing all the frames if we write * an animated GIF frame by frame. * * @param os OutputStream for the animated GIF * @throws Exception */
This is intended to be called after writing all the frames if we write an animated GIF frame by frame
finishWrite
{ "repo_name": "dragon66/icafe", "path": "src/com/icafe4j/image/gif/GIFTweaker.java", "license": "epl-1.0", "size": 25045 }
[ "java.io.OutputStream" ]
import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,313,077
Rectangle2D getSensitiveBounds();
Rectangle2D getSensitiveBounds();
/** * Returns the bounds of the sensitive area covered by this node, * This includes the stroked area but does not include the effects * of clipping, masking or filtering. */
Returns the bounds of the sensitive area covered by this node, This includes the stroked area but does not include the effects of clipping, masking or filtering
getSensitiveBounds
{ "repo_name": "shyamalschandra/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/gvt/GraphicsNode.java", "license": "apache-2.0", "size": 13662 }
[ "java.awt.geom.Rectangle2D" ]
import java.awt.geom.Rectangle2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
387,822
public void close() { for (final ValueVector v : fieldVectorMap.values()) { v.clear(); } fieldVectorMap.clear(); } }
void function() { for (final ValueVector v : fieldVectorMap.values()) { v.clear(); } fieldVectorMap.clear(); } }
/** * Since this OutputMutator is passed by TextRecordReader to get the header out * the mutator might not get cleaned up elsewhere. TextRecordReader will call * this method to clear any allocations */
Since this OutputMutator is passed by TextRecordReader to get the header out the mutator might not get cleaned up elsewhere. TextRecordReader will call this method to clear any allocations
close
{ "repo_name": "sudheeshkatkam/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/compliant/CompliantTextRecordReader.java", "license": "apache-2.0", "size": 11828 }
[ "org.apache.drill.exec.vector.ValueVector" ]
import org.apache.drill.exec.vector.ValueVector;
import org.apache.drill.exec.vector.*;
[ "org.apache.drill" ]
org.apache.drill;
1,983,829
public synchronized static PropertyInfo getPropertyInfo(Class beanClass, String propertyName) { Map beanClassMap = (Map) _cache.get(beanClass); if (beanClassMap == null) { beanClassMap = buildBeanClassMap(beanClass); _cache.put(beanClass, beanClassMap); } ...
synchronized static PropertyInfo function(Class beanClass, String propertyName) { Map beanClassMap = (Map) _cache.get(beanClass); if (beanClassMap == null) { beanClassMap = buildBeanClassMap(beanClass); _cache.put(beanClass, beanClassMap); } return (PropertyInfo) beanClassMap.get(propertyName); }
/** * Finds the {@link PropertyInfo} for the specified class and * property. Returns null if the class does not implement * such a property. * **/
Finds the <code>PropertyInfo</code> for the specified class and property. Returns null if the class does not implement such a property
getPropertyInfo
{ "repo_name": "apache/tapestry3", "path": "tapestry-framework/src/org/apache/tapestry/util/prop/PropertyFinder.java", "license": "apache-2.0", "size": 2876 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,797,624
private boolean checkForDualPane() { // has_two_panes is defined in values/layouts.xml if (getResources().getBoolean(R.bool.has_two_panes)) { Log.i(TAG, "Two-pane layout"); return true; } else { Log.i(TAG, "One-pane layout"); return false; ...
boolean function() { if (getResources().getBoolean(R.bool.has_two_panes)) { Log.i(TAG, STR); return true; } else { Log.i(TAG, STR); return false; } }
/** * Determine whether we are in two-pane mode, based * on layouts.xml-defined boolean value. */
Determine whether we are in two-pane mode, based on layouts.xml-defined boolean value
checkForDualPane
{ "repo_name": "jheske/Popcorn", "path": "app/src/main/java/com/nano/movies/activities/DetailActivity.java", "license": "apache-2.0", "size": 5180 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,713,764
public void setPrivateKey(PrivateKey privateKey) { getConfiguration().setPrivateKey(privateKey); }
void function(PrivateKey privateKey) { getConfiguration().setPrivateKey(privateKey); }
/** * Set the PrivateKey that should be used to sign the exchange * * @param privateKey the key with with to sign the exchange. */
Set the PrivateKey that should be used to sign the exchange
setPrivateKey
{ "repo_name": "jarst/camel", "path": "components/camel-crypto/src/main/java/org/apache/camel/component/crypto/DigitalSignatureComponent.java", "license": "apache-2.0", "size": 14337 }
[ "java.security.PrivateKey" ]
import java.security.PrivateKey;
import java.security.*;
[ "java.security" ]
java.security;
1,118,731
private void onClickBtnHard(MspMsg msg) { Log.e(TAG, "---------------onClickBtnHard--------------"); pushHuInfoScreen(); }
void function(MspMsg msg) { Log.e(TAG, STR); pushHuInfoScreen(); }
/** * Handle HMI Hard Key Operation message from head unit. * * @param msg * : binary message that contains all the parameters. */
Handle HMI Hard Key Operation message from head unit
onClickBtnHard
{ "repo_name": "yangjun2/android", "path": "androidhap/HeadUnitIdExtractor/src/com/airbiquity/connectionmgr/msp/PanAppManager.java", "license": "unlicense", "size": 19392 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
135,938
public Plugin[] loadPlugins(File directory);
Plugin[] function(File directory);
/** * Loads the plugins contained within the specified directory * * @param directory Directory to check for plugins * @return A list of all plugins loaded */
Loads the plugins contained within the specified directory
loadPlugins
{ "repo_name": "GlowstoneMC/Glowkit-Legacy", "path": "src/main/java/org/bukkit/plugin/PluginManager.java", "license": "gpl-3.0", "size": 9553 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,204,243
public Collection<Object> persist(Collection<Object> objColl) { if (null == objColl) { throw new IllegalArgumentException("object to save cannot be null"); } objMapper.saveObjCollection(keyspace, objColl); return objColl; }
Collection<Object> function(Collection<Object> objColl) { if (null == objColl) { throw new IllegalArgumentException(STR); } objMapper.saveObjCollection(keyspace, objColl); return objColl; }
/** * Save the list of entity intances. * * @param objColl * @return */
Save the list of entity intances
persist
{ "repo_name": "Ursula/hector", "path": "object-mapper/src/main/java/me/prettyprint/hom/EntityManagerImpl.java", "license": "mit", "size": 11208 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
455,572
public void createYourOwn(View v) { Toast.makeText(this, "TODO: Create Your Own Implicit Intent", Toast.LENGTH_SHORT) .show(); }
void function(View v) { Toast.makeText(this, STR, Toast.LENGTH_SHORT) .show(); }
/** * This is where you will create and fire off your own implicit Intent. Yours will be very * similar to what I've done above. You can view a list of implicit Intents on the Common * Intents page from the developer documentation. * * @see <http://developer.android.com/guide/components/intents...
This is where you will create and fire off your own implicit Intent. Yours will be very similar to what I've done above. You can view a list of implicit Intents on the Common Intents page from the developer documentation
createYourOwn
{ "repo_name": "maniuni/ud851-Exercises", "path": "Lesson04b-Webpages-Maps-and-Sharing/T04b.03-Exercise-ShareText/app/src/main/java/com/example/android/implicitintents/MainActivity.java", "license": "apache-2.0", "size": 6247 }
[ "android.view.View", "android.widget.Toast" ]
import android.view.View; import android.widget.Toast;
import android.view.*; import android.widget.*;
[ "android.view", "android.widget" ]
android.view; android.widget;
2,444,422
void setSubTabPanelVisible(boolean subTabPanelVisible); } private final PlaceManager placeManager; public AbstractSideTabWithDetailsPresenter(EventBus eventBus, V view, P proxy, PlaceManager placeManager, SearchableTableModelProvider<T, M> modelProvider) { super(eventBus, view...
void setSubTabPanelVisible(boolean subTabPanelVisible); } private final PlaceManager placeManager; public AbstractSideTabWithDetailsPresenter(EventBus eventBus, V view, P proxy, PlaceManager placeManager, SearchableTableModelProvider<T, M> modelProvider) { super(eventBus, view, proxy, modelProvider, MainTabExtendedPres...
/** * Controls the sub tab panel visibility. */
Controls the sub tab panel visibility
setSubTabPanelVisible
{ "repo_name": "halober/ovirt-engine", "path": "frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/AbstractSideTabWithDetailsPresenter.java", "license": "apache-2.0", "size": 4647 }
[ "com.google.gwt.event.shared.EventBus", "com.gwtplatform.mvp.client.proxy.PlaceManager", "org.ovirt.engine.ui.common.uicommon.model.SearchableTableModelProvider", "org.ovirt.engine.ui.userportal.section.main.presenter.tab.MainTabExtendedPresenter" ]
import com.google.gwt.event.shared.EventBus; import com.gwtplatform.mvp.client.proxy.PlaceManager; import org.ovirt.engine.ui.common.uicommon.model.SearchableTableModelProvider; import org.ovirt.engine.ui.userportal.section.main.presenter.tab.MainTabExtendedPresenter;
import com.google.gwt.event.shared.*; import com.gwtplatform.mvp.client.proxy.*; import org.ovirt.engine.ui.common.uicommon.model.*; import org.ovirt.engine.ui.userportal.section.main.presenter.tab.*;
[ "com.google.gwt", "com.gwtplatform.mvp", "org.ovirt.engine" ]
com.google.gwt; com.gwtplatform.mvp; org.ovirt.engine;
1,995,067
public void updateGeneratedVariableNames(Function<String, String> renameFunction) { Set<String> generatedEdgeVariables = gdlHandler.getEdgeCache(false, true).keySet(); Set<String> generatedVertexVariables = gdlHandler.getVertexCache(false, true).keySet(); Map<String, Vertex> newVertexCache = new HashMap<>...
void function(Function<String, String> renameFunction) { Set<String> generatedEdgeVariables = gdlHandler.getEdgeCache(false, true).keySet(); Set<String> generatedVertexVariables = gdlHandler.getVertexCache(false, true).keySet(); Map<String, Vertex> newVertexCache = new HashMap<>(); Map<String, Edge> newEdgeCache = new ...
/** * Update variable names of vertices and edges with a generated variable name. * This will also update the vertex- and edge-caches of this handler. * * @param renameFunction The renaming function, mapping old to new variable names. */
Update variable names of vertices and edges with a generated variable name. This will also update the vertex- and edge-caches of this handler
updateGeneratedVariableNames
{ "repo_name": "galpha/gradoop", "path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/matching/common/query/QueryHandler.java", "license": "apache-2.0", "size": 20209 }
[ "java.util.Collections", "java.util.HashMap", "java.util.Map", "java.util.Set", "java.util.function.Function", "org.gradoop.gdl.model.Edge", "org.gradoop.gdl.model.Vertex" ]
import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.function.Function; import org.gradoop.gdl.model.Edge; import org.gradoop.gdl.model.Vertex;
import java.util.*; import java.util.function.*; import org.gradoop.gdl.model.*;
[ "java.util", "org.gradoop.gdl" ]
java.util; org.gradoop.gdl;
2,447,304
Observable<Void> putUuidValidAsync(List<UUID> arrayBody);
Observable<Void> putUuidValidAsync(List<UUID> arrayBody);
/** * Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']. * * @param arrayBody the List&lt;UUID&gt; value * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link Servi...
Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205']
putUuidValidAsync
{ "repo_name": "balajikris/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyarray/Arrays.java", "license": "mit", "size": 104816 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
120,533
step--; if(step < 0 ){ step = Ressources.WINDOW.width; currentView = (currentView + 1) % 3; RenderThreadWrapper.addRenderTask(renderer,layer[(currentView+1)%3]); } layer[currentView].setLocation(step, 0); layer[(currentView+2)%3].setLocation(step-Ressources.WINDOW.width, 0); ...
step--; if(step < 0 ){ step = Ressources.WINDOW.width; currentView = (currentView + 1) % 3; RenderThreadWrapper.addRenderTask(renderer,layer[(currentView+1)%3]); } layer[currentView].setLocation(step, 0); layer[(currentView+2)%3].setLocation(step-Ressources.WINDOW.width, 0); }
/** * Performs a step on the current layer */
Performs a step on the current layer
step
{ "repo_name": "topahl/StoryBear", "path": "StoryBear/src/com/opticalcobra/storybear/game/GameLayer.java", "license": "gpl-3.0", "size": 2007 }
[ "com.opticalcobra.storybear.res.Ressources" ]
import com.opticalcobra.storybear.res.Ressources;
import com.opticalcobra.storybear.res.*;
[ "com.opticalcobra.storybear" ]
com.opticalcobra.storybear;
340,636
@Indexable(type = IndexableType.REINDEX) public Country updateCountry(Country country);
@Indexable(type = IndexableType.REINDEX) Country function(Country country);
/** * Updates the country in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * * @param country the country * @return the country that was updated */
Updates the country in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners
updateCountry
{ "repo_name": "gamerson/liferay-blade-samples", "path": "maven/apps/service-builder/dsp/dsp-api/src/main/java/com/liferay/blade/samples/dspservicebuilder/service/CountryLocalService.java", "license": "apache-2.0", "size": 10333 }
[ "com.liferay.blade.samples.dspservicebuilder.model.Country", "com.liferay.portal.kernel.search.Indexable", "com.liferay.portal.kernel.search.IndexableType" ]
import com.liferay.blade.samples.dspservicebuilder.model.Country; import com.liferay.portal.kernel.search.Indexable; import com.liferay.portal.kernel.search.IndexableType;
import com.liferay.blade.samples.dspservicebuilder.model.*; import com.liferay.portal.kernel.search.*;
[ "com.liferay.blade", "com.liferay.portal" ]
com.liferay.blade; com.liferay.portal;
1,660,270
public String nextLine() { if (!hasNext()) { throw new NoSuchElementException("No more lines"); } final String currentLine = cachedLine; cachedLine = null; return currentLine; }
String function() { if (!hasNext()) { throw new NoSuchElementException(STR); } final String currentLine = cachedLine; cachedLine = null; return currentLine; }
/** * Returns the next line in the wrapped <code>Reader</code>. * * @return the next line from the input * @throws NoSuchElementException if there is no line to return */
Returns the next line in the wrapped <code>Reader</code>
nextLine
{ "repo_name": "Gadreel/dcraft", "path": "dcraft.core/src/main/java/dcraft/io/LineIterator.java", "license": "apache-2.0", "size": 6107 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
2,543,802
public IndexRequestBuilder setContentType(XContentType contentType) { request.contentType(contentType); return this; }
IndexRequestBuilder function(XContentType contentType) { request.contentType(contentType); return this; }
/** * The content type that will be used to generate a document from user provided objects (like Map). */
The content type that will be used to generate a document from user provided objects (like Map)
setContentType
{ "repo_name": "andrewvc/elasticsearch", "path": "src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java", "license": "apache-2.0", "size": 10022 }
[ "org.elasticsearch.common.xcontent.XContentType" ]
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
189,615
public void draw(final Graphics2D g2, final float anchorX, final float anchorY, final TextAnchor anchor, final float rotateX, final float rotateY, final double angle) { float x = anchorX; final float yOffset =...
void function(final Graphics2D g2, final float anchorX, final float anchorY, final TextAnchor anchor, final float rotateX, final float rotateY, final double angle) { float x = anchorX; final float yOffset = calculateBaselineOffset(g2, anchor); final Iterator iterator = this.fragments.iterator(); while (iterator.hasNext...
/** * Draws the text line. * * @param g2 the graphics device. * @param anchorX the x-coordinate for the anchor point. * @param anchorY the y-coordinate for the anchor point. * @param anchor the point on the text line that is aligned to the anchor * point. * @...
Draws the text line
draw
{ "repo_name": "apetresc/JCommon", "path": "src/main/java/org/jfree/text/TextLine.java", "license": "lgpl-2.1", "size": 9160 }
[ "java.awt.Graphics2D", "java.util.Iterator", "org.jfree.ui.Size2D", "org.jfree.ui.TextAnchor" ]
import java.awt.Graphics2D; import java.util.Iterator; import org.jfree.ui.Size2D; import org.jfree.ui.TextAnchor;
import java.awt.*; import java.util.*; import org.jfree.ui.*;
[ "java.awt", "java.util", "org.jfree.ui" ]
java.awt; java.util; org.jfree.ui;
61,240
private ExperimenterData getUserDetails() { return (ExperimenterData) FinderFactory.getRegistry().lookup( LookupNames.CURRENT_USER_DETAILS); }
ExperimenterData function() { return (ExperimenterData) FinderFactory.getRegistry().lookup( LookupNames.CURRENT_USER_DETAILS); }
/** * Returns the current user's details. * * @return See above. */
Returns the current user's details
getUserDetails
{ "repo_name": "knabar/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/SearchPanel.java", "license": "gpl-2.0", "size": 25002 }
[ "org.openmicroscopy.shoola.agents.util.finder.FinderFactory", "org.openmicroscopy.shoola.env.LookupNames" ]
import org.openmicroscopy.shoola.agents.util.finder.FinderFactory; import org.openmicroscopy.shoola.env.LookupNames;
import org.openmicroscopy.shoola.agents.util.finder.*; import org.openmicroscopy.shoola.env.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
2,403,875
@Test public void freeze() throws IOException { assertEqual(createFile("freeze"), "ivmlSpec_freeze", ""); }
void function() throws IOException { assertEqual(createFile(STR), STR, ""); }
/** * Tests the <code>freeze</code> file. * * @throws IOException should not occur */
Tests the <code>freeze</code> file
freeze
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/IVML/de.uni_hildesheim.sse.ivml.tests/src/test/de/uni_hildesheim/sse/LanguageSpecTests.java", "license": "apache-2.0", "size": 5235 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
152,916
interface WithIpTags { Update withIpTags(List<IpTag> ipTags); }
interface WithIpTags { Update withIpTags(List<IpTag> ipTags); }
/** * Specifies ipTags. * @param ipTags The list of tags associated with the public IP prefix * @return the next update stage */
Specifies ipTags
withIpTags
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/network/v2019_08_01/PublicIPPrefix.java", "license": "mit", "size": 12955 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,304,925
public static Transformer getInstance(String methodName, Class[] paramTypes, Object[] args) { if (methodName == null) { throw new IllegalArgumentException("The method to invoke must not be null"); } if (((paramTypes == null) && (args != null)) || ((paramTypes != null) && (args ==...
static Transformer function(String methodName, Class[] paramTypes, Object[] args) { if (methodName == null) { throw new IllegalArgumentException(STR); } if (((paramTypes == null) && (args != null)) ((paramTypes != null) && (args == null)) ((paramTypes != null) && (args != null) && (paramTypes.length != args.length))) {...
/** * Gets an instance of this transformer calling a specific method with specific values. * * @param methodName the method name to call * @param paramTypes the parameter types of the method * @param args the arguments to pass to the method * @return an invoker transformer */
Gets an instance of this transformer calling a specific method with specific values
getInstance
{ "repo_name": "megamattron/collections-generic", "path": "src/java/org/apache/commons/collections15/functors/InvokerTransformer.java", "license": "apache-2.0", "size": 5156 }
[ "org.apache.commons.collections15.Transformer" ]
import org.apache.commons.collections15.Transformer;
import org.apache.commons.collections15.*;
[ "org.apache.commons" ]
org.apache.commons;
1,203,700
public static void deleteMergeQualifiers(Connection connection, final RegionInfo mergedRegion) throws IOException { long time = EnvironmentEdgeManager.currentTime(); Delete delete = new Delete(mergedRegion.getRegionName()); delete.addColumns(getCatalogFamily(), HConstants.MERGEA_QUALIFIER, time); ...
static void function(Connection connection, final RegionInfo mergedRegion) throws IOException { long time = EnvironmentEdgeManager.currentTime(); Delete delete = new Delete(mergedRegion.getRegionName()); delete.addColumns(getCatalogFamily(), HConstants.MERGEA_QUALIFIER, time); delete.addColumns(getCatalogFamily(), HCon...
/** * Deletes merge qualifiers for the specified merged region. * @param connection connection we're using * @param mergedRegion the merged region */
Deletes merge qualifiers for the specified merged region
deleteMergeQualifiers
{ "repo_name": "ultratendency/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java", "license": "apache-2.0", "size": 85768 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Connection", "org.apache.hadoop.hbase.client.Delete", "org.apache.hadoop.hbase.client.RegionInfo", "org.apache.hadoop.hbase.util.Bytes", "org.apache.hadoop.hbase.util.EnvironmentEdgeManager" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.RegionInfo; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
657,161
private void deadlockUnblockedOnTimeout(final Ignite node1, final Ignite node2) throws Exception { info("Start test [node1=" + node1.name() + ", node2=" + node2.name() + ']'); final CountDownLatch l = new CountDownLatch(2);
void function(final Ignite node1, final Ignite node2) throws Exception { info(STR + node1.name() + STR + node2.name() + ']'); final CountDownLatch l = new CountDownLatch(2);
/** * Tests if deadlock is resolved on timeout with correct message. * * @param node1 First node. * @param node2 Second node. * @throws Exception If failed. */
Tests if deadlock is resolved on timeout with correct message
deadlockUnblockedOnTimeout
{ "repo_name": "WilliamDo/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java", "license": "apache-2.0", "size": 21122 }
[ "java.util.concurrent.CountDownLatch", "org.apache.ignite.Ignite" ]
import java.util.concurrent.CountDownLatch; import org.apache.ignite.Ignite;
import java.util.concurrent.*; import org.apache.ignite.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,595,144
public void recordTopicWordDitrib() { double [][] tempTopicWordProb = new double [numTopics][]; for (int ti = 0; ti < numTopics; ti++) { for (int wi = 0; wi < numTypes; wi++){ tempTopicWordProb[ti][wi] =(((double) typeTopicCounts[wi][ti]) + beta)/ (vBeta + tokensPerTopic[ti]); } } topicWordDistrib...
void function() { double [][] tempTopicWordProb = new double [numTopics][]; for (int ti = 0; ti < numTopics; ti++) { for (int wi = 0; wi < numTypes; wi++){ tempTopicWordProb[ti][wi] =(((double) typeTopicCounts[wi][ti]) + beta)/ (vBeta + tokensPerTopic[ti]); } } topicWordDistrib = tempTopicWordProb; } int numTopics; dou...
/** * This distribution doesn't sort the word * @author Shockley Xiang Li */
This distribution doesn't sort the word
recordTopicWordDitrib
{ "repo_name": "shockley/mymallet", "path": "src/influx/ontology/LdaRecorder.java", "license": "epl-1.0", "size": 27409 }
[ "cc.mallet.types.InstanceList" ]
import cc.mallet.types.InstanceList;
import cc.mallet.types.*;
[ "cc.mallet.types" ]
cc.mallet.types;
744,489
private void startSearchOnline() { // feedback to user, echoing menu text Toast toast = Toast.makeText(getApplicationContext(), getResources() .getString(R.string.action_search_online_stories), Toast.LENGTH_SHORT); toast.show(); // Grab the search parameters String title = searchTitle.getText().to...
void function() { Toast toast = Toast.makeText(getApplicationContext(), getResources() .getString(R.string.action_search_online_stories), Toast.LENGTH_SHORT); toast.show(); String title = searchTitle.getText().toString(); String author = searchAuthor.getText().toString(); String desc = searchDesc.getText().toString(); ...
/** * search for online stories based on search input parameters */
search for online stories based on search input parameters
startSearchOnline
{ "repo_name": "CMPUT301F13T01/CreateYourOwnAdventure", "path": "CreateYourOwnAdventure/src/cmput301/f13t01/storylibrary/BrowseOnlineStoriesActivity.java", "license": "gpl-3.0", "size": 10959 }
[ "android.widget.Toast" ]
import android.widget.Toast;
import android.widget.*;
[ "android.widget" ]
android.widget;
902,986
public void delete(int startIndex, int endIndex) { AccessibleEditableText at = getEditorAccessibleEditableText(); if (at != null) { at.delete(startIndex, endIndex); } }
void function(int startIndex, int endIndex) { AccessibleEditableText at = getEditorAccessibleEditableText(); if (at != null) { at.delete(startIndex, endIndex); } }
/** * Deletes the text between two indices * * @param startIndex the starting index in the text * @param endIndex the ending index in the text */
Deletes the text between two indices
delete
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JSpinner.java", "license": "apache-2.0", "size": 77832 }
[ "javax.accessibility.AccessibleEditableText" ]
import javax.accessibility.AccessibleEditableText;
import javax.accessibility.*;
[ "javax.accessibility" ]
javax.accessibility;
2,812,399
@Deprecated public void setDepthBuffer(Image.Format format) { if (id != -1) { throw new UnsupportedOperationException("FrameBuffer already initialized."); } if (!format.isDepthFormat()) { throw new IllegalArgumentException("Depth buffer format must be depth."); ...
void function(Image.Format format) { if (id != -1) { throw new UnsupportedOperationException(STR); } if (!format.isDepthFormat()) { throw new IllegalArgumentException(STR); } depthBuf = new RenderBuffer(); depthBuf.slot = format.isDepthStencilFormat() ? SLOT_DEPTH_STENCIL : SLOT_DEPTH; depthBuf.format = format; }
/** * Enables the use of a depth buffer for this <code>FrameBuffer</code>. * * @param format The format to use for the depth buffer. * @throws IllegalArgumentException If <code>format</code> is not a depth format. * @deprecated Use setDepthTarget */
Enables the use of a depth buffer for this <code>FrameBuffer</code>
setDepthBuffer
{ "repo_name": "zzuegg/jmonkeyengine", "path": "jme3-core/src/main/java/com/jme3/texture/FrameBuffer.java", "license": "bsd-3-clause", "size": 26090 }
[ "com.jme3.texture.Image" ]
import com.jme3.texture.Image;
import com.jme3.texture.*;
[ "com.jme3.texture" ]
com.jme3.texture;
1,386,736
public static java.util.Set extractGraphicAssessmentFindingQuestionSet(ims.domain.ILightweightDomainFactory domainFactory, ims.assessment.vo.GraphicAssessmentFindingQuestionVoCollection voCollection) { return extractGraphicAssessmentFindingQuestionSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.assessment.vo.GraphicAssessmentFindingQuestionVoCollection voCollection) { return extractGraphicAssessmentFindingQuestionSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.assessment.configuration.domain.objects.GraphicAssessmentFindingQuestion set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.assessment.configuration.domain.objects.GraphicAssessmentFindingQuestion set from the value object collection
extractGraphicAssessmentFindingQuestionSet
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/assessment/vo/domain/GraphicAssessmentFindingQuestionVoAssembler.java", "license": "agpl-3.0", "size": 20758 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,895,917
@Ignore @Specification("tcp.connect.and.wait.for.close.to.directory.service") @Test public void testTcpConnectAndWaitForClose() throws Exception { robot.finish(); }
@Specification(STR) void function() throws Exception { robot.finish(); }
/** * BUG for KG-7642 TODO @Ignore particular test in JIRA */
BUG for KG-7642 TODO @Ignore particular test in JIRA
testTcpConnectAndWaitForClose
{ "repo_name": "chao-sun-kaazing/gateway", "path": "service/http.directory/src/test/java/org/kaazing/gateway/service/http/directory/HttpDirectoryServiceIT.java", "license": "apache-2.0", "size": 11386 }
[ "org.kaazing.k3po.junit.annotation.Specification" ]
import org.kaazing.k3po.junit.annotation.Specification;
import org.kaazing.k3po.junit.annotation.*;
[ "org.kaazing.k3po" ]
org.kaazing.k3po;
234,899
public void updateLocation(String authorization, UUID companyId, String code, Location body) throws ApiException { updateLocationWithHttpInfo(authorization, companyId, code, body); }
void function(String authorization, UUID companyId, String code, Location body) throws ApiException { updateLocationWithHttpInfo(authorization, companyId, code, body); }
/** * Update location for company * This method operation update a location for company * @param authorization Bearer {auth} (required) * @param companyId Company ID (required) * @param code Location Code (required) * @param body Transaction Message (required) * @throws ApiException ...
Update location for company This method operation update a location for company
updateLocation
{ "repo_name": "Avalara/avataxbr-clients", "path": "java-client/src/main/java/io/swagger/client/api/CompanyLocationApi.java", "license": "gpl-3.0", "size": 37173 }
[ "io.swagger.client.ApiException", "io.swagger.client.model.Location" ]
import io.swagger.client.ApiException; import io.swagger.client.model.Location;
import io.swagger.client.*; import io.swagger.client.model.*;
[ "io.swagger.client" ]
io.swagger.client;
2,332,049
Call<ResponseBody> paramLongAsync(String scenario, long value, final ServiceCallback<Void> serviceCallback);
Call<ResponseBody> paramLongAsync(String scenario, long value, final ServiceCallback<Void> serviceCallback);
/** * Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2. * * @param scenario Send a post request with header values "scenario": "positive" or "negative" * @param value Send a post request with header values 105 or -2 * @param serv...
Send a post request with header values "scenario": "positive", "value": 105 or "scenario": "negative", "value": -2
paramLongAsync
{ "repo_name": "vulcansteel/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/header/HeaderOperations.java", "license": "mit", "size": 41684 }
[ "com.microsoft.rest.ServiceCallback", "com.squareup.okhttp.ResponseBody" ]
import com.microsoft.rest.ServiceCallback; import com.squareup.okhttp.ResponseBody;
import com.microsoft.rest.*; import com.squareup.okhttp.*;
[ "com.microsoft.rest", "com.squareup.okhttp" ]
com.microsoft.rest; com.squareup.okhttp;
1,553,930
@TruffleBoundary public Object invokeWithConversions(Object self, Object... args) { getContext().getJNI().clearPendingException(); assert args.length == Signatures.parameterCount(getParsedSignature(), false); // assert !isStatic() || ((StaticObject) self).isStatic(); final Objec...
Object function(Object self, Object... args) { getContext().getJNI().clearPendingException(); assert args.length == Signatures.parameterCount(getParsedSignature(), false); final Object[] filteredArgs; if (isStatic()) { getDeclaringKlass().safeInitialize(); filteredArgs = new Object[args.length]; for (int i = 0; i < fil...
/** * Invoke guest method, parameters and return value are converted to host world. Primitives, * primitive arrays are shared, and are passed verbatim, conversions are provided for String and * StaticObject.NULL/null. There's no parameter casting based on the method's signature, * widening nor narro...
Invoke guest method, parameters and return value are converted to host world. Primitives, primitive arrays are shared, and are passed verbatim, conversions are provided for String and StaticObject.NULL/null. There's no parameter casting based on the method's signature, widening nor narrowing
invokeWithConversions
{ "repo_name": "smarr/Truffle", "path": "espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/impl/Method.java", "license": "gpl-2.0", "size": 64397 }
[ "com.oracle.truffle.espresso.descriptors.Signatures" ]
import com.oracle.truffle.espresso.descriptors.Signatures;
import com.oracle.truffle.espresso.descriptors.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
366,731
public boolean get(IBlockAccess world, BlockPos pos) { return get(world.getBlockState(pos)); }
boolean function(IBlockAccess world, BlockPos pos) { return get(world.getBlockState(pos)); }
/** * Gets the value of this {@link BooleanComponent} in the World. * * @param world the world * @param pos the pos * @return true, if successful */
Gets the value of this <code>BooleanComponent</code> in the World
get
{ "repo_name": "Ordinastie/MalisisCore", "path": "src/main/java/net/malisis/core/block/component/BooleanComponent.java", "license": "mit", "size": 5176 }
[ "net.minecraft.util.math.BlockPos", "net.minecraft.world.IBlockAccess" ]
import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess;
import net.minecraft.util.math.*; import net.minecraft.world.*;
[ "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.util; net.minecraft.world;
2,513,577
@Override public boolean doesGuiPauseGame() { return false;//true; } @SideOnly(Side.CLIENT) static class NextPageButton extends GuiButton { private final boolean isNextButton; public NextPageButton(int parButtonId, int parPosX, int parPosY, boolea...
boolean function() { return false; } @SideOnly(Side.CLIENT) static class NextPageButton extends GuiButton { private final boolean isNextButton; public NextPageButton(int parButtonId, int parPosX, int parPosY, boolean parIsNextButton) { super(parButtonId, parPosX, parPosY, 23, 13, ""); isNextButton = parIsNextButton; }
/** * Returns true if this GUI should pause the game when it is displayed in * single-player */
Returns true if this GUI should pause the game when it is displayed in single-player
doesGuiPauseGame
{ "repo_name": "Weisses/Ebonheart-Mods", "path": "ViesCraft/1.12.2 - 2655/src/main/java/com/viesis/viescraft/client/gui/guidebooks/OLDGuiGuidebookPaint.java", "license": "mit", "size": 13677 }
[ "net.minecraft.client.gui.GuiButton", "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraft.client.gui.GuiButton; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.client.gui.*; import net.minecraftforge.fml.relauncher.*;
[ "net.minecraft.client", "net.minecraftforge.fml" ]
net.minecraft.client; net.minecraftforge.fml;
1,092,472
private Widget getValueWidget(String value) { if (variable != null) { for (CategoryDto category : JsArrays.toIterable(variable.getCategoriesArray())) { if (category.getName().equals(value) || (variable.getValueType().equals("decimal") && value.endsWith(".0") && category.getName().equals(...
Widget function(String value) { if (variable != null) { for (CategoryDto category : JsArrays.toIterable(variable.getCategoriesArray())) { if (category.getName().equals(value) (variable.getValueType().equals(STR) && value.endsWith(".0") && category.getName().equals(value.substring(0, value.length() - 2)))) { String labe...
/** * Decorate frequency value label with corresponding category labels (if any). * * @param value * @return */
Decorate frequency value label with corresponding category labels (if any)
getValueWidget
{ "repo_name": "kazoompa/opal", "path": "opal-gwt-client/src/main/java/org/obiba/opal/web/gwt/app/client/ui/SummaryFlexTable.java", "license": "gpl-3.0", "size": 7722 }
[ "com.github.gwtbootstrap.client.ui.Icon", "com.github.gwtbootstrap.client.ui.constants.IconType", "com.google.common.base.Strings", "com.google.gwt.user.client.ui.FlowPanel", "com.google.gwt.user.client.ui.InlineLabel", "com.google.gwt.user.client.ui.Label", "com.google.gwt.user.client.ui.Widget", "or...
import com.github.gwtbootstrap.client.ui.Icon; import com.github.gwtbootstrap.client.ui.constants.IconType; import com.google.common.base.Strings; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.InlineLabel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.clie...
import com.github.gwtbootstrap.client.ui.*; import com.github.gwtbootstrap.client.ui.constants.*; import com.google.common.base.*; import com.google.gwt.user.client.ui.*; import org.obiba.opal.web.gwt.app.client.js.*; import org.obiba.opal.web.gwt.app.client.support.*; import org.obiba.opal.web.model.client.magma.*;
[ "com.github.gwtbootstrap", "com.google.common", "com.google.gwt", "org.obiba.opal" ]
com.github.gwtbootstrap; com.google.common; com.google.gwt; org.obiba.opal;
2,630,051
this.createContents(); this.shlPleaseConfigureThe.open(); this.shlPleaseConfigureThe.layout(); final Display display = this.getParent().getDisplay(); while (!this.shlPleaseConfigureThe.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } return this.result; }
this.createContents(); this.shlPleaseConfigureThe.open(); this.shlPleaseConfigureThe.layout(); final Display display = this.getParent().getDisplay(); while (!this.shlPleaseConfigureThe.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } return this.result; }
/** * Open the dialog. * @return the result */
Open the dialog
open
{ "repo_name": "stereokrauts/stereoscope", "path": "stereoscope.plugin.gui/src/main/java/com/stereokrauts/stereoscope/plugin/gui/EclipseMidiPortSelection.java", "license": "gpl-2.0", "size": 4554 }
[ "org.eclipse.swt.widgets.Display" ]
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
935,337
List<ReportGroup> list(String search, ReportGroupType type, ReportGroupStatus status, String sort, Order order, int page, int count) throws DataOperationException;
List<ReportGroup> list(String search, ReportGroupType type, ReportGroupStatus status, String sort, Order order, int page, int count) throws DataOperationException;
/** * Returns a list of {@link ReportGroup}s that match the specified criteria. * * @param search * The search field, optional. * @param type * The ReportGroupType to filter on, optional. * @param status * The ReportGroupStatus to filter on, optional. * @param sort ...
Returns a list of <code>ReportGroup</code>s that match the specified criteria
list
{ "repo_name": "efsavage/ajah", "path": "ajah-report/src/main/java/com/ajah/report/group/data/ReportGroupDao.java", "license": "apache-2.0", "size": 3117 }
[ "com.ajah.report.group.ReportGroup", "com.ajah.report.group.ReportGroupStatus", "com.ajah.report.group.ReportGroupType", "com.ajah.spring.jdbc.criteria.Order", "com.ajah.spring.jdbc.err.DataOperationException", "java.util.List" ]
import com.ajah.report.group.ReportGroup; import com.ajah.report.group.ReportGroupStatus; import com.ajah.report.group.ReportGroupType; import com.ajah.spring.jdbc.criteria.Order; import com.ajah.spring.jdbc.err.DataOperationException; import java.util.List;
import com.ajah.report.group.*; import com.ajah.spring.jdbc.criteria.*; import com.ajah.spring.jdbc.err.*; import java.util.*;
[ "com.ajah.report", "com.ajah.spring", "java.util" ]
com.ajah.report; com.ajah.spring; java.util;
277,882
public static LongStream stream(long[] array, int startInclusive, int endExclusive) { return StreamSupport.longStream(spliterator(array, startInclusive, endExclusive), false); }
static LongStream function(long[] array, int startInclusive, int endExclusive) { return StreamSupport.longStream(spliterator(array, startInclusive, endExclusive), false); }
/** * Returns a sequential {@link LongStream} with the specified range of the * specified array as its source. * * @param array the array, assumed to be unmodified during use * @param startInclusive the first index to cover, inclusive * @param endExclusive index immediately past the last i...
Returns a sequential <code>LongStream</code> with the specified range of the specified array as its source
stream
{ "repo_name": "lukhnos/j2objc", "path": "jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Arrays.java", "license": "apache-2.0", "size": 226352 }
[ "java.util.stream.LongStream", "java.util.stream.StreamSupport" ]
import java.util.stream.LongStream; import java.util.stream.StreamSupport;
import java.util.stream.*;
[ "java.util" ]
java.util;
478,938
@SmallTest @Feature({"Cronet"}) @CompareDefaultWithCronet public void testWriteMoreThanContentLength() throws Exception { URL url = new URL(NativeTestServer.getEchoBodyURL()); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setD...
@Feature({STR}) void function() throws Exception { URL url = new URL(NativeTestServer.getEchoBodyURL()); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setDoOutput(true); connection.setRequestMethod("POST"); connection.setRequestProperty(STR, Integer.toString(UPLOAD_DATA.length - 1)...
/** * Tests that if caller writes more than the content length provided, * an exception should occur. */
Tests that if caller writes more than the content length provided, an exception should occur
testWriteMoreThanContentLength
{ "repo_name": "Bysmyyr/chromium-crosswalk", "path": "components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetBufferedOutputStreamTest.java", "license": "bsd-3-clause", "size": 18797 }
[ "java.io.OutputStream", "java.net.HttpURLConnection", "java.net.ProtocolException", "org.chromium.base.test.util.Feature", "org.chromium.net.NativeTestServer" ]
import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.ProtocolException; import org.chromium.base.test.util.Feature; import org.chromium.net.NativeTestServer;
import java.io.*; import java.net.*; import org.chromium.base.test.util.*; import org.chromium.net.*;
[ "java.io", "java.net", "org.chromium.base", "org.chromium.net" ]
java.io; java.net; org.chromium.base; org.chromium.net;
399,052
public static Expression product(Collection<? extends Expression> exprs) { return compose(PRODUCT, exprs); }
static Expression function(Collection<? extends Expression> exprs) { return compose(PRODUCT, exprs); }
/** * Returns the product of the given expressions. The effect of this method is the * same as calling compose(PRODUCT, exprs). * @return compose(PRODUCT, exprs) */
Returns the product of the given expressions. The effect of this method is the same as calling compose(PRODUCT, exprs)
product
{ "repo_name": "msakai/kodkod", "path": "src/kodkod/ast/Expression.java", "license": "mit", "size": 14997 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,445,732
private void botonAutoMouseEntered(java.awt.event.MouseEvent evt) { // TODO add your handling code here: botonAuto.setCursor(new Cursor(Cursor.HAND_CURSOR)); botonAuto.setIcon(new ImageIcon(getClass().getResource("/hermes/imagenes/inicio/botProyectosAuto_over.png"))); }
void function(java.awt.event.MouseEvent evt) { botonAuto.setCursor(new Cursor(Cursor.HAND_CURSOR)); botonAuto.setIcon(new ImageIcon(getClass().getResource(STR))); }
/** * cambia el icono a mano * @param evt */
cambia el icono a mano
botonAutoMouseEntered
{ "repo_name": "Esleelkartea/hermes", "path": "hermes_v1.0.0_src/bgc/gui/inicio/VInicio.java", "license": "gpl-2.0", "size": 23674 }
[ "java.awt.Cursor", "javax.swing.ImageIcon" ]
import java.awt.Cursor; import javax.swing.ImageIcon;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
706,120
public void setDataProfilingBean(DataProfilingBean dataProfilingBean) { this.dataProfilingBean = dataProfilingBean; }
void function(DataProfilingBean dataProfilingBean) { this.dataProfilingBean = dataProfilingBean; }
/** * Sets the data profiling bean. * * @param dataProfilingBean the new data profiling bean */
Sets the data profiling bean
setDataProfilingBean
{ "repo_name": "impetus-opensource/jumbune", "path": "common/src/main/java/org/jumbune/common/job/JobConfig.java", "license": "lgpl-3.0", "size": 33685 }
[ "org.jumbune.common.beans.DataProfilingBean" ]
import org.jumbune.common.beans.DataProfilingBean;
import org.jumbune.common.beans.*;
[ "org.jumbune.common" ]
org.jumbune.common;
2,334,347
public ChannelEndpointBuilder channelResolver(DestinationResolver resolver) { endpoint.getEndpointConfiguration().setChannelResolver(resolver); return this; }
ChannelEndpointBuilder function(DestinationResolver resolver) { endpoint.getEndpointConfiguration().setChannelResolver(resolver); return this; }
/** * Sets the channel resolver. * @param resolver * @return */
Sets the channel resolver
channelResolver
{ "repo_name": "christophd/citrus", "path": "endpoints/citrus-spring-integration/src/main/java/com/consol/citrus/channel/ChannelEndpointBuilder.java", "license": "apache-2.0", "size": 3161 }
[ "org.springframework.messaging.core.DestinationResolver" ]
import org.springframework.messaging.core.DestinationResolver;
import org.springframework.messaging.core.*;
[ "org.springframework.messaging" ]
org.springframework.messaging;
979,216
public void setJobName(String jobName) { checkNotNull(jobName, "The job name must not be null."); this.jobName = jobName; }
void function(String jobName) { checkNotNull(jobName, STR); this.jobName = jobName; }
/** * Sets the jobName for this Plan. * * @param jobName The jobName to set. */
Sets the jobName for this Plan
setJobName
{ "repo_name": "jinglining/flink", "path": "flink-core/src/main/java/org/apache/flink/api/common/Plan.java", "license": "apache-2.0", "size": 12504 }
[ "org.apache.flink.util.Preconditions" ]
import org.apache.flink.util.Preconditions;
import org.apache.flink.util.*;
[ "org.apache.flink" ]
org.apache.flink;
2,149,203
public void transform(final String xmlFile, final OutputStream outputStream) throws TransformationFailedException { transform(new File(xmlFile), outputStream); }
void function(final String xmlFile, final OutputStream outputStream) throws TransformationFailedException { transform(new File(xmlFile), outputStream); }
/** * Transforms the specified <code>xmlFile</code> using the current * transformer. An <code>TransformationFailedException</code> is thrown if * the transformation failed. * * @param xmlFile * the <code>String</code> pointing to a valid file to be * transformed * @param outputStr...
Transforms the specified <code>xmlFile</code> using the current transformer. An <code>TransformationFailedException</code> is thrown if the transformation failed
transform
{ "repo_name": "pmeisen/gen-sbconfigurator", "path": "src/net/meisen/general/sbconfigurator/config/transformer/DefaultXsltTransformer.java", "license": "mit", "size": 9481 }
[ "java.io.File", "java.io.OutputStream", "net.meisen.general.sbconfigurator.config.exception.TransformationFailedException" ]
import java.io.File; import java.io.OutputStream; import net.meisen.general.sbconfigurator.config.exception.TransformationFailedException;
import java.io.*; import net.meisen.general.sbconfigurator.config.exception.*;
[ "java.io", "net.meisen.general" ]
java.io; net.meisen.general;
1,775,978
void fireActionEvent() { if (suppressActionEvent) { return; } if(actionListeners != null) { ActionEvent evt = new ActionEvent(this,ActionEvent.Type.Edit); actionListeners.fireActionEvent(evt); } if(bindListeners != null) { Strin...
void fireActionEvent() { if (suppressActionEvent) { return; } if(actionListeners != null) { ActionEvent evt = new ActionEvent(this,ActionEvent.Type.Edit); actionListeners.fireActionEvent(evt); } if(bindListeners != null) { String t = getText(); bindListeners.fireBindTargetChange(this, "text", lastTextValue, t); lastTex...
/** * Notifies listeners of a change to the text area */
Notifies listeners of a change to the text area
fireActionEvent
{ "repo_name": "diamonddevgroup/CodenameOne", "path": "CodenameOne/src/com/codename1/ui/TextArea.java", "license": "gpl-2.0", "size": 79208 }
[ "com.codename1.ui.events.ActionEvent" ]
import com.codename1.ui.events.ActionEvent;
import com.codename1.ui.events.*;
[ "com.codename1.ui" ]
com.codename1.ui;
783,916