method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void writeHprofFileHeader(@Nonnull String text, int idSize, int timeHigh, int timeLow) throws IOException {
writeNullTerminatedString(out, text);
writeInt(out, idSize);
writeInt(out, timeHigh);
writeInt(out, timeLow);
} | void function(@Nonnull String text, int idSize, int timeHigh, int timeLow) throws IOException { writeNullTerminatedString(out, text); writeInt(out, idSize); writeInt(out, timeHigh); writeInt(out, timeLow); } | /**
* Write the header that is present in the beginning of all hprof files.
*
* @param text A magic text identifying the version and type of hprof file
* @param idSize Size in bytes for all ID fields
* @param timeHigh High four bytes of the file timestamp, all other 2-byte timestamps in t... | Write the header that is present in the beginning of all hprof files | writeHprofFileHeader | {
"repo_name": "erikandre/hprof-tools",
"path": "hprof-lib/src/main/java/com/badoo/hprof/library/HprofWriter.java",
"license": "mit",
"size": 3312
} | [
"com.badoo.hprof.library.util.StreamUtil",
"java.io.IOException",
"javax.annotation.Nonnull"
] | import com.badoo.hprof.library.util.StreamUtil; import java.io.IOException; import javax.annotation.Nonnull; | import com.badoo.hprof.library.util.*; import java.io.*; import javax.annotation.*; | [
"com.badoo.hprof",
"java.io",
"javax.annotation"
] | com.badoo.hprof; java.io; javax.annotation; | 2,237,850 |
List<ValueExpression> getParameters(); | List<ValueExpression> getParameters(); | /**
* The parameters for SQL function.
*
* @return The parameters for SQL function.
*/ | The parameters for SQL function | getParameters | {
"repo_name": "apache/zest-qi4j",
"path": "libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/literals/SQLFunctionLiteral.java",
"license": "apache-2.0",
"size": 1514
} | [
"java.util.List",
"org.apache.polygene.library.sql.generator.grammar.common.ValueExpression"
] | import java.util.List; import org.apache.polygene.library.sql.generator.grammar.common.ValueExpression; | import java.util.*; import org.apache.polygene.library.sql.generator.grammar.common.*; | [
"java.util",
"org.apache.polygene"
] | java.util; org.apache.polygene; | 1,455,357 |
public TestDescriptor[] extractTestsFromXml(Rule rule) {
String testsFileName = getCleanRuleName(rule);
return extractTestsFromXml(rule, testsFileName);
} | TestDescriptor[] function(Rule rule) { String testsFileName = getCleanRuleName(rule); return extractTestsFromXml(rule, testsFileName); } | /**
* Extract a set of tests from an XML file. The file should be
* ./xml/RuleName.xml relative to the test class. The format is defined in
* test-data.xsd.
*/ | Extract a set of tests from an XML file. The file should be ./xml/RuleName.xml relative to the test class. The format is defined in test-data.xsd | extractTestsFromXml | {
"repo_name": "daejunpark/jsaf",
"path": "third_party/pmd/src/test/java/net/sourceforge/pmd/testframework/RuleTst.java",
"license": "bsd-3-clause",
"size": 13200
} | [
"net.sourceforge.pmd.Rule"
] | import net.sourceforge.pmd.Rule; | import net.sourceforge.pmd.*; | [
"net.sourceforge.pmd"
] | net.sourceforge.pmd; | 1,078,687 |
public static RouteInfo selectBestRoute(Collection<RouteInfo> routes, InetAddress dest) {
if ((routes == null) || (dest == null)) return null;
RouteInfo bestRoute = null;
// pick a longest prefix match under same address type
for (RouteInfo route : routes) {
if (NetworkU... | static RouteInfo function(Collection<RouteInfo> routes, InetAddress dest) { if ((routes == null) (dest == null)) return null; RouteInfo bestRoute = null; for (RouteInfo route : routes) { if (NetworkUtils.addressTypeMatches(route.mDestination.getAddress(), dest)) { if ((bestRoute != null) && (bestRoute.mDestination.getP... | /**
* Find the route from a Collection of routes that best matches a given address.
* May return null if no routes are applicable.
* @param routes a Collection of RouteInfos to chose from
* @param dest the InetAddress your trying to get to
* @return the RouteInfo from the Collection that best f... | Find the route from a Collection of routes that best matches a given address. May return null if no routes are applicable | selectBestRoute | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/core/java/android/net/RouteInfo.java",
"license": "gpl-3.0",
"size": 16398
} | [
"java.net.InetAddress",
"java.util.Collection"
] | import java.net.InetAddress; import java.util.Collection; | import java.net.*; import java.util.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 1,836,936 |
protected FiveCardBoard copyOfBoard() {
List<Card> copyOfBoardCards = board.getCards();
FiveCardBoard simulatedBoard = new FiveCardBoard();
for (Card card : copyOfBoardCards) {
simulatedBoard.addCard(card);
}
return simulatedBoard;
} | FiveCardBoard function() { List<Card> copyOfBoardCards = board.getCards(); FiveCardBoard simulatedBoard = new FiveCardBoard(); for (Card card : copyOfBoardCards) { simulatedBoard.addCard(card); } return simulatedBoard; } | /**
* Copies the boardcards given in the constructor
*
* @return Copied board.
*/ | Copies the boardcards given in the constructor | copyOfBoard | {
"repo_name": "ousou/Javalabra-2013",
"path": "Poker hand simulator/src/logic/simulator/AbstractPokerHandSimulator.java",
"license": "lgpl-3.0",
"size": 14041
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,722,355 |
@Metadata(defaultValue = "50", label = "advanced",
description = "Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS"
+ " and when the option useMessageIDAsCorrelationID is enabled.")
public void set... | @Metadata(defaultValue = "50", label = STR, description = STR + STR) void function(int counter) { getConfiguration().setWaitForProvisionCorrelationToBeUpdatedCounter(counter); } | /**
* Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS
* and when the option useMessageIDAsCorrelationID is enabled.
*/ | Number of times to wait for provisional correlation id to be updated to the actual correlation id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled | setWaitForProvisionCorrelationToBeUpdatedCounter | {
"repo_name": "veithen/camel",
"path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java",
"license": "apache-2.0",
"size": 74797
} | [
"org.apache.camel.spi.Metadata"
] | import org.apache.camel.spi.Metadata; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,574,843 |
public void assign(WorkerSlot slot, String topologyId, Collection<ExecutorDetails> executors) {
assertValidTopologyForModification(topologyId);
if (isSlotOccupied(slot)) {
throw new RuntimeException(
"slot: [" + slot.getNodeId() + ", " + slot.getPort() + "] is already occ... | void function(WorkerSlot slot, String topologyId, Collection<ExecutorDetails> executors) { assertValidTopologyForModification(topologyId); if (isSlotOccupied(slot)) { throw new RuntimeException( STR + slot.getNodeId() + STR + slot.getPort() + STR); } TopologyDetails td = topologies.getById(topologyId); if (td == null) ... | /**
* Assign the slot to the executors for this topology.
*
* @throws RuntimeException if the specified slot is already occupied.
*/ | Assign the slot to the executors for this topology | assign | {
"repo_name": "0x726d77/storm",
"path": "storm-server/src/main/java/org/apache/storm/scheduler/Cluster.java",
"license": "apache-2.0",
"size": 37023
} | [
"java.util.Collection",
"org.apache.storm.generated.WorkerResources"
] | import java.util.Collection; import org.apache.storm.generated.WorkerResources; | import java.util.*; import org.apache.storm.generated.*; | [
"java.util",
"org.apache.storm"
] | java.util; org.apache.storm; | 1,673,475 |
public Type[] getArgumentTypes() {
return getArgumentTypesByState(State.NORMAL);
} | Type[] function() { return getArgumentTypesByState(State.NORMAL); } | /**
* An array of argument types for the normal method
*
* @return types
*/ | An array of argument types for the normal method | getArgumentTypes | {
"repo_name": "fr1kin/ForgeHax",
"path": "src/main/java/com/matt/forgehax/asm/utils/asmtype/ASMMethod.java",
"license": "mit",
"size": 4266
} | [
"com.matt.forgehax.asm.utils.environment.State",
"org.objectweb.asm.Type"
] | import com.matt.forgehax.asm.utils.environment.State; import org.objectweb.asm.Type; | import com.matt.forgehax.asm.utils.environment.*; import org.objectweb.asm.*; | [
"com.matt.forgehax",
"org.objectweb.asm"
] | com.matt.forgehax; org.objectweb.asm; | 2,138,332 |
public void drawScreen(int par1, int par2, float par3)
{
drawRect(2, this.height - 14, this.width - 2, this.height - 2, Integer.MIN_VALUE);
inputField.drawTextBox();
IChatComponent ichatcomponent = this.mc.ingameGUI.getChatGUI().func_146236_a(Mouse.getX(), Mouse.getY());
if (ich... | void function(int par1, int par2, float par3) { drawRect(2, this.height - 14, this.width - 2, this.height - 2, Integer.MIN_VALUE); inputField.drawTextBox(); IChatComponent ichatcomponent = this.mc.ingameGUI.getChatGUI().func_146236_a(Mouse.getX(), Mouse.getY()); if (ichatcomponent != null && ichatcomponent.getChatStyle... | /**
* Draws the screen and all the components in it.
*/ | Draws the screen and all the components in it | drawScreen | {
"repo_name": "Shamboozle/ChatSymbols",
"path": "src/main/java/mod/cs/client/GuiChatReplace.java",
"license": "gpl-3.0",
"size": 17072
} | [
"com.google.common.collect.Lists",
"java.util.ArrayList",
"net.minecraft.event.HoverEvent",
"net.minecraft.item.ItemStack",
"net.minecraft.nbt.JsonToNBT",
"net.minecraft.nbt.NBTBase",
"net.minecraft.nbt.NBTException",
"net.minecraft.nbt.NBTTagCompound",
"net.minecraft.stats.Achievement",
"net.mine... | import com.google.common.collect.Lists; import java.util.ArrayList; import net.minecraft.event.HoverEvent; import net.minecraft.item.ItemStack; import net.minecraft.nbt.JsonToNBT; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTException; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.stats... | import com.google.common.collect.*; import java.util.*; import net.minecraft.event.*; import net.minecraft.item.*; import net.minecraft.nbt.*; import net.minecraft.stats.*; import net.minecraft.util.*; import org.lwjgl.input.*; | [
"com.google.common",
"java.util",
"net.minecraft.event",
"net.minecraft.item",
"net.minecraft.nbt",
"net.minecraft.stats",
"net.minecraft.util",
"org.lwjgl.input"
] | com.google.common; java.util; net.minecraft.event; net.minecraft.item; net.minecraft.nbt; net.minecraft.stats; net.minecraft.util; org.lwjgl.input; | 2,105,947 |
//@pda jdbc40
public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
{
validateStatement();
statement_.setNCharacterStream(statement_.findParameterIndex(parameterName), value, length);
}
//@pda jdbc40
// JDBC40DOC
//@pda... | void function(String parameterName, Reader value, long length) throws SQLException { validateStatement(); statement_.setNCharacterStream(statement_.findParameterIndex(parameterName), value, length); } | /**
* Sets the designated parameter to a <code>Reader</code> object. The
* <code>Reader</code> reads the data till end-of-file is reached. The
* driver does the necessary conversion from Java character format to
* the national character set in the database.
* @param parameterName the name of th... | Sets the designated parameter to a <code>Reader</code> object. The <code>Reader</code> reads the data till end-of-file is reached. The driver does the necessary conversion from Java character format to the national character set in the database | setNCharacterStream | {
"repo_name": "piguangming/jt400",
"path": "src/com/ibm/as400/access/AS400JDBCRowSet.java",
"license": "epl-1.0",
"size": 312066
} | [
"java.io.Reader",
"java.sql.SQLException"
] | import java.io.Reader; import java.sql.SQLException; | import java.io.*; import java.sql.*; | [
"java.io",
"java.sql"
] | java.io; java.sql; | 1,436,208 |
public String toString(Charset charset)
{
return slice.toString(position, available(), charset);
} | String function(Charset charset) { return slice.toString(position, available(), charset); } | /**
* Decodes this buffer's readable bytes into a string with the specified
* character set name. This method is identical to
* {@code buf.toString(buf.position(), buf.available()(), charsetName)}.
* This method does not modify {@code position} or {@code writerIndex} of
* this buffer.
*
... | Decodes this buffer's readable bytes into a string with the specified character set name. This method is identical to buf.toString(buf.position(), buf.available()(), charsetName). This method does not modify position or writerIndex of this buffer | toString | {
"repo_name": "xuzha/leveldb",
"path": "leveldb/src/main/java/org/iq80/leveldb/util/SliceInput.java",
"license": "apache-2.0",
"size": 14378
} | [
"java.nio.charset.Charset"
] | import java.nio.charset.Charset; | import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 2,421,688 |
public Observable<ServiceResponse<Page<AzureFirewallInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (this.client.... | Observable<ServiceResponse<Page<AzureFirewallInner>>> function(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } | /**
* Lists all Azure Firewalls in a resource group.
*
ServiceResponse<PageImpl<AzureFirewallInner>> * @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<AzureFirewallInner> object wra... | Lists all Azure Firewalls in a resource group | listByResourceGroupSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/AzureFirewallsInner.java",
"license": "mit",
"size": 60332
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 284,809 |
public Rect getRect() {
return new Rect(0, 0, mWidth, mHeight);
} | Rect function() { return new Rect(0, 0, mWidth, mHeight); } | /**
* Returns a bounding Rect for this Pixa, which may be (0,0,0,0) if width
* and height were not specified on creation.
*
* @return a bounding Rect for this Pixa
*/ | Returns a bounding Rect for this Pixa, which may be (0,0,0,0) if width and height were not specified on creation | getRect | {
"repo_name": "0359xiaodong/tess-two",
"path": "tess-two/src/com/googlecode/leptonica/android/Pixa.java",
"license": "apache-2.0",
"size": 12777
} | [
"android.graphics.Rect"
] | import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,196,132 |
Set<Long> getLeaderUserId(Long leaderSelectionActivityId); | Set<Long> getLeaderUserId(Long leaderSelectionActivityId); | /**
* Returns leaders' userIds for all tool sessions from the given Leader Selection Tool.
*/ | Returns leaders' userIds for all tool sessions from the given Leader Selection Tool | getLeaderUserId | {
"repo_name": "lamsfoundation/lams",
"path": "lams_common/src/java/org/lamsfoundation/lams/tool/service/ILamsToolService.java",
"license": "gpl-2.0",
"size": 9187
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,506,932 |
public static ArrayList getZipCodes(String precinct) {
return precinctZipMap.get(precinct);
} | static ArrayList function(String precinct) { return precinctZipMap.get(precinct); } | /**
* Gets the list of zip codes that overlap with one precinct
*
* @return Arraylist list of zip codes that overlap with one precinct
*/ | Gets the list of zip codes that overlap with one precinct | getZipCodes | {
"repo_name": "googleinterns/step126-2020",
"path": "capstone/src/main/java/com/google/sps/data/MapData.java",
"license": "apache-2.0",
"size": 3617
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 702,256 |
public void readOnlyizeReadOnlyBlocks(Set<String> readOnlyBlocks) {
for (RenderableElement element : elements) {
if (element instanceof TableJoining) {
((TableJoining)element).readOnlyizeReadOnlyBlocks(readOnlyBlocks);
}
}
} | void function(Set<String> readOnlyBlocks) { for (RenderableElement element : elements) { if (element instanceof TableJoining) { ((TableJoining)element).readOnlyizeReadOnlyBlocks(readOnlyBlocks); } } } | /**
* Shuffles responsibility on to any TableJoining children
* @see org.kuali.kfs.sys.document.web.TableJoining#readOnlyizeReadOnlyBlocks(java.util.Set)
*/ | Shuffles responsibility on to any TableJoining children | readOnlyizeReadOnlyBlocks | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/sys/document/web/AccountingLineViewLine.java",
"license": "apache-2.0",
"size": 8898
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,940,260 |
private long createAnnotation(Annotation a) {
annotationProperties.put(AnnotationProperties.ID.name(), a.getGeneName());
annotationProperties.put(AnnotationProperties.STARTREF.name(), a.getStart());
annotationProperties.put(AnnotationProperties.ENDREF.name(), a.getEnd());
annotationProperties.put(AnnotationP... | long function(Annotation a) { annotationProperties.put(AnnotationProperties.ID.name(), a.getGeneName()); annotationProperties.put(AnnotationProperties.STARTREF.name(), a.getStart()); annotationProperties.put(AnnotationProperties.ENDREF.name(), a.getEnd()); annotationProperties.put(AnnotationProperties.SENSE.name(), a.i... | /**
* Create an annotation node.
* @param a the annotation
* @return the id of the created node
*/ | Create an annotation node | createAnnotation | {
"repo_name": "AbeelLab/dnainator",
"path": "dnainator-core/src/main/java/nl/tudelft/dnainator/graph/impl/Neo4jBatchBuilder.java",
"license": "bsd-3-clause",
"size": 8152
} | [
"nl.tudelft.dnainator.annotation.Annotation",
"nl.tudelft.dnainator.graph.impl.properties.AnnotationProperties",
"nl.tudelft.dnainator.graph.impl.properties.NodeLabels"
] | import nl.tudelft.dnainator.annotation.Annotation; import nl.tudelft.dnainator.graph.impl.properties.AnnotationProperties; import nl.tudelft.dnainator.graph.impl.properties.NodeLabels; | import nl.tudelft.dnainator.annotation.*; import nl.tudelft.dnainator.graph.impl.properties.*; | [
"nl.tudelft.dnainator"
] | nl.tudelft.dnainator; | 200,351 |
List<RestDefinition> getRestDefinitions(); | List<RestDefinition> getRestDefinitions(); | /**
* Returns a list of the current REST definitions
*
* @return list of the current REST definitions
*/ | Returns a list of the current REST definitions | getRestDefinitions | {
"repo_name": "jonmcewen/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 79068
} | [
"java.util.List",
"org.apache.camel.model.rest.RestDefinition"
] | import java.util.List; import org.apache.camel.model.rest.RestDefinition; | import java.util.*; import org.apache.camel.model.rest.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 1,031,316 |
public static RegionSpecifier buildRegionSpecifier(
final RegionSpecifierType type, final byte[] value) {
RegionSpecifier.Builder regionBuilder = RegionSpecifier.newBuilder();
regionBuilder.setValue(ByteStringer.wrap(value));
regionBuilder.setType(type);
return regionBuilder.build();
} | static RegionSpecifier function( final RegionSpecifierType type, final byte[] value) { RegionSpecifier.Builder regionBuilder = RegionSpecifier.newBuilder(); regionBuilder.setValue(ByteStringer.wrap(value)); regionBuilder.setType(type); return regionBuilder.build(); } | /**
* Convert a byte array to a protocol buffer RegionSpecifier
*
* @param type the region specifier type
* @param value the region specifier byte array value
* @return a protocol buffer RegionSpecifier
*/ | Convert a byte array to a protocol buffer RegionSpecifier | buildRegionSpecifier | {
"repo_name": "Jackygq1982/hbase_src",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java",
"license": "apache-2.0",
"size": 61581
} | [
"org.apache.hadoop.hbase.protobuf.generated.HBaseProtos",
"org.apache.hadoop.hbase.util.ByteStringer"
] | import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; import org.apache.hadoop.hbase.util.ByteStringer; | import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 786,629 |
public void bind(SocketAddress localAddr, int backlog) throws IOException {
checkClosedAndCreate(true);
if (isBound()) {
throw new BindException(Msg.getString("K0315")); //$NON-NLS-1$
}
int port = 0;
InetAddress addr = InetAddress.ANY;
if (localAddr != nul... | void function(SocketAddress localAddr, int backlog) throws IOException { checkClosedAndCreate(true); if (isBound()) { throw new BindException(Msg.getString("K0315")); } int port = 0; InetAddress addr = InetAddress.ANY; if (localAddr != null) { if (!(localAddr instanceof InetSocketAddress)) { throw new IllegalArgumentEx... | /**
* Bind the ServerSocket to the nominated local host/port. The number of
* pending connections that may be backlogged is a specified.
*
* @param localAddr
* the local machine address and port to bind on
* @param backlog
* the number of pending connection requ... | Bind the ServerSocket to the nominated local host/port. The number of pending connections that may be backlogged is a specified | bind | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/luni/src/main/java/java/net/ServerSocket.java",
"license": "apache-2.0",
"size": 17225
} | [
"java.io.IOException",
"org.apache.harmony.luni.util.Msg"
] | import java.io.IOException; import org.apache.harmony.luni.util.Msg; | import java.io.*; import org.apache.harmony.luni.util.*; | [
"java.io",
"org.apache.harmony"
] | java.io; org.apache.harmony; | 1,392,963 |
public void setPriceStd (BigDecimal PriceStd)
{
set_Value (COLUMNNAME_PriceStd, PriceStd);
} | void function (BigDecimal PriceStd) { set_Value (COLUMNNAME_PriceStd, PriceStd); } | /** Set Standard Price.
@param PriceStd
Standard Price
*/ | Set Standard Price | setPriceStd | {
"repo_name": "neuroidss/adempiere",
"path": "base/src/org/compiere/model/X_I_Product.java",
"license": "gpl-2.0",
"size": 27680
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,572,148 |
private void checkMode(final CharacterMovementComponent movementComp, final CharacterStateEvent state,
final CharacterStateEvent oldState, EntityRef entity, boolean firstRun) {
//If we are ghosting or we can't move, the mode cannot be changed.
if (!state.getMode().respondT... | void function(final CharacterMovementComponent movementComp, final CharacterStateEvent state, final CharacterStateEvent oldState, EntityRef entity, boolean firstRun) { if (!state.getMode().respondToEnvironment) { return; } Vector3f worldPos = state.getPosition(); Vector3f top = new Vector3f(worldPos); Vector3f bottom =... | /**
* Checks whether a character should change movement mode (from being underwater or in a ladder). A higher and lower point of the
* character is tested for being in water, only if both points are in water does the character count as swimming.
* <br><br>
* Sends the OnEnterLiquidEvent and OnLeaveL... | Checks whether a character should change movement mode (from being underwater or in a ladder). A higher and lower point of the character is tested for being in water, only if both points are in water does the character count as swimming. Sends the OnEnterLiquidEvent and OnLeaveLiquidEvent events | checkMode | {
"repo_name": "indianajohn/Terasology",
"path": "engine/src/main/java/org/terasology/logic/characters/KinematicCharacterMover.java",
"license": "apache-2.0",
"size": 36912
} | [
"org.terasology.entitySystem.entity.EntityRef",
"org.terasology.math.geom.Vector3f",
"org.terasology.math.geom.Vector3i"
] | import org.terasology.entitySystem.entity.EntityRef; import org.terasology.math.geom.Vector3f; import org.terasology.math.geom.Vector3i; | import org.terasology.*; import org.terasology.math.geom.*; | [
"org.terasology",
"org.terasology.math"
] | org.terasology; org.terasology.math; | 1,000,430 |
@Override
public String getText(Object object) {
String label = ((ThrottleMediator)object).getDescription();
return label == null || label.length() == 0 ?
getString("_UI_ThrottleMediator_type") :
getString("_UI_ThrottleMediator_type") + " " + label;
}
| String function(Object object) { String label = ((ThrottleMediator)object).getDescription(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; } | /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for the adapted class. | getText | {
"repo_name": "rajeevanv89/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/ThrottleMediatorItemProvider.java",
"license": "apache-2.0",
"size": 17730
} | [
"org.wso2.developerstudio.eclipse.gmf.esb.ThrottleMediator"
] | import org.wso2.developerstudio.eclipse.gmf.esb.ThrottleMediator; | import org.wso2.developerstudio.eclipse.gmf.esb.*; | [
"org.wso2.developerstudio"
] | org.wso2.developerstudio; | 2,895,953 |
public boolean isCredentialSupported(final Credential credential) {
Assert.checkNotNullParam("credential", credential);
return credentialType.isInstance(credential) && (algorithm == null || credential instanceof AlgorithmCredential && algorithm.equals(((AlgorithmCredential) credential).getAlgorithm(... | boolean function(final Credential credential) { Assert.checkNotNullParam(STR, credential); return credentialType.isInstance(credential) && (algorithm == null credential instanceof AlgorithmCredential && algorithm.equals(((AlgorithmCredential) credential).getAlgorithm())); } | /**
* Determine whether the given credential can be set on this callback.
*
* @param credential the credential (must not be {@code null})
* @return {@code true} if the credential matches the type and optional algorithm of this callback, {@code false} otherwise
*/ | Determine whether the given credential can be set on this callback | isCredentialSupported | {
"repo_name": "sguilhen/wildfly-elytron",
"path": "src/main/java/org/wildfly/security/auth/callback/ServerCredentialCallback.java",
"license": "apache-2.0",
"size": 9250
} | [
"org.wildfly.common.Assert",
"org.wildfly.security.credential.AlgorithmCredential",
"org.wildfly.security.credential.Credential"
] | import org.wildfly.common.Assert; import org.wildfly.security.credential.AlgorithmCredential; import org.wildfly.security.credential.Credential; | import org.wildfly.common.*; import org.wildfly.security.credential.*; | [
"org.wildfly.common",
"org.wildfly.security"
] | org.wildfly.common; org.wildfly.security; | 1,689,347 |
public void testEditing() throws Exception
{
// create and save schedule
ScheduledPersistedAction schedule = service.createSchedule(testAction);
assertNotNull(schedule);
Date now = new Date();
schedule.setScheduleStart(now);
schedule.setScheduleIntervalCount(2);
schedule... | void function() throws Exception { ScheduledPersistedAction schedule = service.createSchedule(testAction); assertNotNull(schedule); Date now = new Date(); schedule.setScheduleStart(now); schedule.setScheduleIntervalCount(2); schedule .setScheduleIntervalPeriod(ScheduledPersistedAction.IntervalPeriod.Day); UserTransacti... | /**
* Ensures that we can create, save, edit, save load, edit, save, load etc,
* all without problems, and without creating duplicates
*/ | Ensures that we can create, save, edit, save load, edit, save, load etc, all without problems, and without creating duplicates | testEditing | {
"repo_name": "Alfresco/community-edition",
"path": "projects/repository/source/test-java/org/alfresco/repo/action/scheduled/ScheduledPersistedActionServiceTest.java",
"license": "lgpl-3.0",
"size": 52265
} | [
"java.util.Date",
"javax.transaction.UserTransaction",
"org.alfresco.service.cmr.action.scheduled.SchedulableAction",
"org.alfresco.service.cmr.action.scheduled.ScheduledPersistedAction"
] | import java.util.Date; import javax.transaction.UserTransaction; import org.alfresco.service.cmr.action.scheduled.SchedulableAction; import org.alfresco.service.cmr.action.scheduled.ScheduledPersistedAction; | import java.util.*; import javax.transaction.*; import org.alfresco.service.cmr.action.scheduled.*; | [
"java.util",
"javax.transaction",
"org.alfresco.service"
] | java.util; javax.transaction; org.alfresco.service; | 2,770,228 |
public void writeTo(final int fieldNumber, final CodedOutputStream output)
throws IOException {
for (final long value : varint) {
output.writeUInt64(fieldNumber, value);
}
for (final int value : fixed32) {
output.writeFixed32(fieldNumber, value);
}
... | void function(final int fieldNumber, final CodedOutputStream output) throws IOException { for (final long value : varint) { output.writeUInt64(fieldNumber, value); } for (final int value : fixed32) { output.writeFixed32(fieldNumber, value); } for (final long value : fixed64) { output.writeFixed64(fieldNumber, value); }... | /**
* Serializes the field, including field number, and writes it to
* {@code output}.
*/ | Serializes the field, including field number, and writes it to output | writeTo | {
"repo_name": "Alachisoft/TayzGrid",
"path": "src/tgclient/src/com/google/protobuf/UnknownFieldSet.java",
"license": "apache-2.0",
"size": 31929
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,410,828 |
public void testUpdateByteBuffer01() throws NoSuchAlgorithmException, NoSuchProviderException,
IllegalArgumentException, IllegalStateException, InvalidAlgorithmParameterException,
InvalidKeyException {
if (!DEFSupported) {
fail(NotSupportedMsg);
return;
... | void function() throws NoSuchAlgorithmException, NoSuchProviderException, IllegalArgumentException, IllegalStateException, InvalidAlgorithmParameterException, InvalidKeyException { if (!DEFSupported) { fail(NotSupportedMsg); return; } Mac [] macs = createMacs(); assertNotNull(STR, macs); byte [] bb = {(byte)1, (byte)2,... | /**
* Test for <code>update(ByteBuffer input)</code>
* <code>update(byte[] input, int offset, int len)</code>
* methods
* Assertion: processes Mac; if input is null then do nothing
*/ | Test for <code>update(ByteBuffer input)</code> <code>update(byte[] input, int offset, int len)</code> methods Assertion: processes Mac; if input is null then do nothing | testUpdateByteBuffer01 | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/MacTest.java",
"license": "apache-2.0",
"size": 34934
} | [
"java.nio.ByteBuffer",
"java.security.InvalidAlgorithmParameterException",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException",
"javax.crypto.Mac",
"javax.crypto.spec.SecretKeySpec"
] | import java.nio.ByteBuffer; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; | import java.nio.*; import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"java.nio",
"java.security",
"javax.crypto"
] | java.nio; java.security; javax.crypto; | 810,168 |
public void initialize(VideoUiView uiView) {
this.uiView = uiView;
mediaLoader = new MediaLoader(getContext());
// Configure OpenGL.
renderer = new Renderer(uiView, mediaLoader);
setEGLContextClientVersion(2);
setRenderer(renderer);
setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
... | void function(VideoUiView uiView) { this.uiView = uiView; mediaLoader = new MediaLoader(getContext()); renderer = new Renderer(uiView, mediaLoader); setEGLContextClientVersion(2); setRenderer(renderer); setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY); sensorManager = (SensorManager) getContext().getSystemService(C... | /**
* Finishes initialization. This should be called immediately after the View is inflated.
*
* @param uiView the video UI that should be bound to the underlying SceneRenderer
*/ | Finishes initialization. This should be called immediately after the View is inflated | initialize | {
"repo_name": "googlesamples/cardboard-java",
"path": "samples/sdk-video360/src/main/java/com/google/vr/sdk/samples/video360/MonoscopicView.java",
"license": "apache-2.0",
"size": 14849
} | [
"android.content.Context",
"android.hardware.Sensor",
"android.hardware.SensorManager",
"android.opengl.GLSurfaceView"
] | import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorManager; import android.opengl.GLSurfaceView; | import android.content.*; import android.hardware.*; import android.opengl.*; | [
"android.content",
"android.hardware",
"android.opengl"
] | android.content; android.hardware; android.opengl; | 1,831,155 |
private void updateWorldStatuses() {
if (!isActive()) {
return; // It may have been disposed and not canceled yet.
}
try {
List<WorldInfo> worldList = parser.parse();
for (WorldInfo info : worldList) {
int row = findWorldRow(info.getWorldId());
if (row != -1) {
worldTableModel.setValueA... | void function() { if (!isActive()) { return; } try { List<WorldInfo> worldList = parser.parse(); for (WorldInfo info : worldList) { int row = findWorldRow(info.getWorldId()); if (row != -1) { worldTableModel.setValueAt(info.getPlayerCount(), row, 3); } } } catch (IOException e) { e.printStackTrace(); } } | /**
* Update the world status from the page
* This used to overwrite worldList, but it wouldn't let us have custom worlds.
*/ | Update the world status from the page This used to overwrite worldList, but it wouldn't let us have custom worlds | updateWorldStatuses | {
"repo_name": "nikkiii/rslite",
"path": "src/main/java/org/rslite/worldselector/WorldSelector.java",
"license": "isc",
"size": 17160
} | [
"java.io.IOException",
"java.util.List",
"org.rslite.jagex.world.WorldInfo"
] | import java.io.IOException; import java.util.List; import org.rslite.jagex.world.WorldInfo; | import java.io.*; import java.util.*; import org.rslite.jagex.world.*; | [
"java.io",
"java.util",
"org.rslite.jagex"
] | java.io; java.util; org.rslite.jagex; | 637,329 |
@Test
public void shouldParseInsteadOfTrigger() {
final String content = "CREATE VIEW G1( e1 integer, e2 varchar) AS select * from foo;"
+ "CREATE TRIGGER ON G1 INSTEAD OF INSERT AS " + "FOR EACH ROW " + "BEGIN ATOMIC "
+ "insert into g1 (e1,... | void function() { final String content = STR + STR + STR + STR + STR + "END;" + STR; assertScoreAndParse(content, null, 3); { final List<AstNode> kids = getRootNode().childrenWithName("G1"); assertThat(kids.size(), is(2)); assertMixinType(kids.get(0), TeiidDdlLexicon.CreateTable.VIEW_STATEMENT); assertMixinType(kids.ge... | /**
* See Teiid TestDDLParser#testInsteadOfTrigger()
*/ | See Teiid TestDDLParser#testInsteadOfTrigger() | shouldParseInsteadOfTrigger | {
"repo_name": "phantomjinx/modeshape",
"path": "sequencers/modeshape-sequencer-ddl/src/test/java/org/modeshape/sequencer/ddl/dialect/teiid/TeiidDdlParserTest.java",
"license": "apache-2.0",
"size": 20296
} | [
"java.util.List",
"org.hamcrest.core.Is",
"org.junit.Assert",
"org.modeshape.sequencer.ddl.node.AstNode"
] | import java.util.List; import org.hamcrest.core.Is; import org.junit.Assert; import org.modeshape.sequencer.ddl.node.AstNode; | import java.util.*; import org.hamcrest.core.*; import org.junit.*; import org.modeshape.sequencer.ddl.node.*; | [
"java.util",
"org.hamcrest.core",
"org.junit",
"org.modeshape.sequencer"
] | java.util; org.hamcrest.core; org.junit; org.modeshape.sequencer; | 1,669,924 |
public Charset getCharset() {
return fields.getCharset();
} | Charset function() { return fields.getCharset(); } | /**
* Gets the Charset of the FieldsBuilder.
*
* @return the Charset
*/ | Gets the Charset of the FieldsBuilder | getCharset | {
"repo_name": "metafacture/metafacture-core",
"path": "metafacture-biblio/src/main/java/org/metafacture/biblio/iso2709/RecordBuilder.java",
"license": "apache-2.0",
"size": 15144
} | [
"java.nio.charset.Charset"
] | import java.nio.charset.Charset; | import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 2,859,686 |
private void checkAlterDurationConverters() throws SecurityException {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new JodaTimePermission("ConverterManager.alterDurationConverters"));
}
} | void function() throws SecurityException { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new JodaTimePermission(STR)); } } | /**
* Checks whether the user has permission 'ConverterManager.alterDurationConverters'.
*
* @throws SecurityException if the user does not have the permission
*/ | Checks whether the user has permission 'ConverterManager.alterDurationConverters' | checkAlterDurationConverters | {
"repo_name": "aparo/scalajs-joda",
"path": "src/main/scala/org/joda/time/convert/ConverterManager.java",
"license": "apache-2.0",
"size": 21462
} | [
"org.joda.time.JodaTimePermission"
] | import org.joda.time.JodaTimePermission; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,401,521 |
@Test
public void testExportedDepsShouldOnlyContainJavaLibraryRules() throws Exception {
BuildRuleResolver ruleResolver =
new BuildRuleResolver(TargetGraph.EMPTY, new BuildTargetNodeToBuildRuleTransformer());
BuildTarget genruleBuildTarget = BuildTargetFactory.newInstance("//generated:stuff");
... | void function() throws Exception { BuildRuleResolver ruleResolver = new BuildRuleResolver(TargetGraph.EMPTY, new BuildTargetNodeToBuildRuleTransformer()); BuildTarget genruleBuildTarget = BuildTargetFactory.newInstance(STRecho 'aha' > $OUTSTRstuff.txtSTR try { createDefaultJavaLibraryRuleWithAbiKey( buildTarget, Immuta... | /**
* Tests that an error is thrown when non-java library rules are listed in the exported deps
* parameter.
*/ | Tests that an error is thrown when non-java library rules are listed in the exported deps parameter | testExportedDepsShouldOnlyContainJavaLibraryRules | {
"repo_name": "rowillia/buck",
"path": "test/com/facebook/buck/jvm/java/DefaultJavaLibraryTest.java",
"license": "apache-2.0",
"size": 65360
} | [
"com.facebook.buck.cli.BuildTargetNodeToBuildRuleTransformer",
"com.facebook.buck.model.BuildTarget",
"com.facebook.buck.model.BuildTargetFactory",
"com.facebook.buck.rules.BuildRule",
"com.facebook.buck.rules.BuildRuleResolver",
"com.facebook.buck.rules.TargetGraph",
"com.facebook.buck.util.HumanReadab... | import com.facebook.buck.cli.BuildTargetNodeToBuildRuleTransformer; import com.facebook.buck.model.BuildTarget; import com.facebook.buck.model.BuildTargetFactory; import com.facebook.buck.rules.BuildRule; import com.facebook.buck.rules.BuildRuleResolver; import com.facebook.buck.rules.TargetGraph; import com.facebook.b... | import com.facebook.buck.cli.*; import com.facebook.buck.model.*; import com.facebook.buck.rules.*; import com.facebook.buck.util.*; import com.google.common.base.*; import com.google.common.collect.*; import org.junit.*; | [
"com.facebook.buck",
"com.google.common",
"org.junit"
] | com.facebook.buck; com.google.common; org.junit; | 2,035,789 |
private void createViewer(Composite parent) {
parent.setLayout(new FillLayout());
viewer = new MarkersTreeViewer(new Tree(parent, SWT.H_SCROLL
| SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION));
viewer.getTree().setLinesVisible(true);
viewer.setUseHashlookup(true);
createColumns(new TreeColumn[0], new ... | void function(Composite parent) { parent.setLayout(new FillLayout()); viewer = new MarkersTreeViewer(new Tree(parent, SWT.H_SCROLL SWT.V_SCROLL SWT.MULTI SWT.FULL_SELECTION)); viewer.getTree().setLinesVisible(true); viewer.setUseHashlookup(true); createColumns(new TreeColumn[0], new int[0]); viewer.setContentProvider(g... | /**
* Create the columns for the receiver.
*
* @param parent
*/ | Create the columns for the receiver | createViewer | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java",
"license": "epl-1.0",
"size": 48948
} | [
"org.eclipse.swt.layout.FillLayout",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Tree",
"org.eclipse.swt.widgets.TreeColumn"
] | import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeColumn; | import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,798,652 |
private void checkId(String id) throws ValidationException {
if (!inMarker() && !id.equals("")) {
Set idrefs = getBuilderContext().getIDReferences();
if (!idrefs.contains(id)) {
idrefs.add(id);
} else {
getFOValidationEventProducer().idNotU... | void function(String id) throws ValidationException { if (!inMarker() && !id.equals("")) { Set idrefs = getBuilderContext().getIDReferences(); if (!idrefs.contains(id)) { idrefs.add(id); } else { getFOValidationEventProducer().idNotUnique(this, getName(), id, true, locator); } } } | /**
* Setup the id for this formatting object.
* Most formatting objects can have an id that can be referenced.
* This methods checks that the id isn't already used by another FO
*
* @param id the id to check
* @throws ValidationException if the ID is already defined elsewhere
* ... | Setup the id for this formatting object. Most formatting objects can have an id that can be referenced. This methods checks that the id isn't already used by another FO | checkId | {
"repo_name": "Distrotech/fop",
"path": "src/java/org/apache/fop/fo/FObj.java",
"license": "apache-2.0",
"size": 29191
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,287,083 |
public void popNode() {
transformStack.pop();
Preconditions.checkState(!transformStack.isEmpty());
} | void function() { transformStack.pop(); Preconditions.checkState(!transformStack.isEmpty()); } | /**
* Removes the last TransformTreeNode from the stack.
*/ | Removes the last TransformTreeNode from the stack | popNode | {
"repo_name": "dhananjaypatkar/DataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/runners/TransformHierarchy.java",
"license": "apache-2.0",
"size": 2976
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,331,601 |
public String writeSpecimen1(List<SpecimenBean> spBeanList)
{
final LinkedHashSet<Specimen> specimenHashSet = new LinkedHashSet<Specimen>();
String message = "ERROR";
for (final SpecimenBean spBean : spBeanList)
{
final Specimen specimen = this.prepareSpecimen(s... | String function(List<SpecimenBean> spBeanList) { final LinkedHashSet<Specimen> specimenHashSet = new LinkedHashSet<Specimen>(); String message = "ERROR"; for (final SpecimenBean spBean : spBeanList) { final Specimen specimen = this.prepareSpecimen(spBean); specimenHashSet.add(specimen); } try { this.session.setAttribut... | /**
* Write specimen1.
*
* @param spBeanList : SpecimenBean object.
*
* @return String
*/ | Write specimen1 | writeSpecimen1 | {
"repo_name": "NCIP/catissue-core",
"path": "software/caTissue/modules/core/src/main/java/edu/wustl/catissuecore/flex/FlexInterface.java",
"license": "bsd-3-clause",
"size": 66403
} | [
"edu.wustl.catissuecore.domain.Specimen",
"edu.wustl.catissuecore.util.global.Constants",
"java.util.LinkedHashSet",
"java.util.List"
] | import edu.wustl.catissuecore.domain.Specimen; import edu.wustl.catissuecore.util.global.Constants; import java.util.LinkedHashSet; import java.util.List; | import edu.wustl.catissuecore.domain.*; import edu.wustl.catissuecore.util.global.*; import java.util.*; | [
"edu.wustl.catissuecore",
"java.util"
] | edu.wustl.catissuecore; java.util; | 1,772,553 |
public int getIntValue() throws java.rmi.RemoteException; | int function() throws java.rmi.RemoteException; | /**
* Get accessor for persistent attribute: intValue
*/ | Get accessor for persistent attribute: intValue | getIntValue | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB1XSFRemoteSpecEJB.jar/src/com/ibm/ejb1x/base/spec/sfr/ejb/SFRa.java",
"license": "epl-1.0",
"size": 9106
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 2,808,654 |
public synchronized JoystickButton getRaiseTailLiftButton() {
if (raiseTailLiftButton == null) {
raiseTailLiftButton = new JoystickButton(getOperatorJoystick(), RAISE_TAIL_LIFT_BUTTON, false);
}
return raiseTailLiftButton;
} | synchronized JoystickButton function() { if (raiseTailLiftButton == null) { raiseTailLiftButton = new JoystickButton(getOperatorJoystick(), RAISE_TAIL_LIFT_BUTTON, false); } return raiseTailLiftButton; } | /**
* Gets the JoystickButton that indicates when the tail lift is to be raised.
* @return The JoystickButton that indicates when the tail lift is to be raised
*/ | Gets the JoystickButton that indicates when the tail lift is to be raised | getRaiseTailLiftButton | {
"repo_name": "TaylorRobotics/TitanRobot2014",
"path": "eclipse/TitanRobot2015/src/org/usfirst/frc/team1760/robot/stores/JoystickStore.java",
"license": "bsd-3-clause",
"size": 7759
} | [
"org.usfirst.frc.team1760.robot.components.JoystickButton"
] | import org.usfirst.frc.team1760.robot.components.JoystickButton; | import org.usfirst.frc.team1760.robot.components.*; | [
"org.usfirst.frc"
] | org.usfirst.frc; | 2,447,052 |
public void writeCIContact(XMLStreamWriter writer, CIContact bean) throws XMLStreamException
{
writer.writeStartElement(NS_URI, "CI_Contact");
this.writeNamespaces(writer);
this.writeCIContactType(writer, bean);
writer.writeEndElement();
}
| void function(XMLStreamWriter writer, CIContact bean) throws XMLStreamException { writer.writeStartElement(NS_URI, STR); this.writeNamespaces(writer); this.writeCIContactType(writer, bean); writer.writeEndElement(); } | /**
* Write method for CIContact element
*/ | Write method for CIContact element | writeCIContact | {
"repo_name": "sensiasoft/lib-sensorml",
"path": "sensorml-core/src/main/java/org/isotc211/v2005/gmd/bind/XMLStreamBindings.java",
"license": "mpl-2.0",
"size": 80004
} | [
"javax.xml.stream.XMLStreamException",
"javax.xml.stream.XMLStreamWriter",
"org.isotc211.v2005.gmd.CIContact"
] | import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import org.isotc211.v2005.gmd.CIContact; | import javax.xml.stream.*; import org.isotc211.v2005.gmd.*; | [
"javax.xml",
"org.isotc211.v2005"
] | javax.xml; org.isotc211.v2005; | 2,643,626 |
public double sortValue(AggregationPath.PathElement head, Iterator<AggregationPath.PathElement> tail) {
InternalAggregation aggregation = get(head.name);
if (aggregation == null) {
throw new IllegalArgumentException("Cannot find aggregation named [" + head.name + "]");
}
... | double function(AggregationPath.PathElement head, Iterator<AggregationPath.PathElement> tail) { InternalAggregation aggregation = get(head.name); if (aggregation == null) { throw new IllegalArgumentException(STR + head.name + "]"); } if (tail.hasNext()) { return aggregation.sortValue(tail.next(), tail); } return aggreg... | /**
* Get value to use when sorting by a descendant of the aggregation containing this.
*/ | Get value to use when sorting by a descendant of the aggregation containing this | sortValue | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregations.java",
"license": "apache-2.0",
"size": 7063
} | [
"java.util.Iterator",
"org.elasticsearch.search.aggregations.support.AggregationPath"
] | import java.util.Iterator; import org.elasticsearch.search.aggregations.support.AggregationPath; | import java.util.*; import org.elasticsearch.search.aggregations.support.*; | [
"java.util",
"org.elasticsearch.search"
] | java.util; org.elasticsearch.search; | 1,251,445 |
public boolean addComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox)
{
this.fillWithBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 4, 1, 4, Block.netherBrick.blockID, Block.netherBrick.blockID, false);
this.fillWithBlocks(par1World, par3Struct... | boolean function(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { this.fillWithBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 4, 1, 4, Block.netherBrick.blockID, Block.netherBrick.blockID, false); this.fillWithBlocks(par1World, par3StructureBoundingBox, 0, 2, 0, 4, 5, 4, 0, 0, ... | /**
* second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
* the end, it adds Fences...
*/ | second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at the end, it adds Fences.. | addComponentParts | {
"repo_name": "HATB0T/RuneCraftery",
"path": "forge/mcp/src/minecraft/net/minecraft/world/gen/structure/ComponentNetherBridgeCrossing2.java",
"license": "lgpl-3.0",
"size": 3359
} | [
"java.util.Random",
"net.minecraft.block.Block",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.block.Block; import net.minecraft.world.World; | import java.util.*; import net.minecraft.block.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.world; | 2,343,673 |
private void updateEntries() {
// Check
if (model == null || model.getInputConfig() == null || model.getInputConfig().getInput() == null) {
return;
}
// Update data
this.attributes = new ArrayList<String>();
DataHandle data = model.getInputConfig().get... | void function() { if (model == null model.getInputConfig() == null model.getInputConfig().getInput() == null) { return; } this.attributes = new ArrayList<String>(); DataHandle data = model.getInputConfig().getInput().getHandle(); for (int i = 0; i < data.getNumColumns(); i++) { String attribute = data.getAttributeName(... | /**
* Updates the view.
*
* @param node
*/ | Updates the view | updateEntries | {
"repo_name": "arx-deidentifier/arx",
"path": "src/gui/org/deidentifier/arx/gui/view/impl/define/ViewAttributeList.java",
"license": "apache-2.0",
"size": 23487
} | [
"java.util.ArrayList",
"org.deidentifier.arx.DataHandle",
"org.deidentifier.arx.gui.view.SWTUtil"
] | import java.util.ArrayList; import org.deidentifier.arx.DataHandle; import org.deidentifier.arx.gui.view.SWTUtil; | import java.util.*; import org.deidentifier.arx.*; import org.deidentifier.arx.gui.view.*; | [
"java.util",
"org.deidentifier.arx"
] | java.util; org.deidentifier.arx; | 246,178 |
if (jsonResponse == null) {
return false;
} else if (jsonResponse.get(JSONApiResponseKeysEnum.RESPONSE_OK.getKey()) != null) {
return jsonResponse.get(JSONApiResponseKeysEnum.RESPONSE_OK.getKey()).toString()
.equals(JSONApiResponseKeysEnum.RESPONSE_SUCCESSFUL.getKey()... | if (jsonResponse == null) { return false; } else if (jsonResponse.get(JSONApiResponseKeysEnum.RESPONSE_OK.getKey()) != null) { return jsonResponse.get(JSONApiResponseKeysEnum.RESPONSE_OK.getKey()).toString() .equals(JSONApiResponseKeysEnum.RESPONSE_SUCCESSFUL.getKey()); } else { logger.error(STR + jsonResponse.get(JSON... | /**
* Checks the digitalSTROM-JSON response and return true if it was successful, otherwise false.
*
* @param jsonResponse
* @return true, if successful
*/ | Checks the digitalSTROM-JSON response and return true if it was successful, otherwise false | checkResponse | {
"repo_name": "marinmitev/smarthome",
"path": "extensions/binding/org.eclipse.smarthome.binding.digitalstrom/src/main/java/org/eclipse/smarthome/binding/digitalstrom/internal/lib/serverConnection/impl/JSONResponseHandler.java",
"license": "epl-1.0",
"size": 3153
} | [
"org.eclipse.smarthome.binding.digitalstrom.internal.lib.serverConnection.constants.JSONApiResponseKeysEnum"
] | import org.eclipse.smarthome.binding.digitalstrom.internal.lib.serverConnection.constants.JSONApiResponseKeysEnum; | import org.eclipse.smarthome.binding.digitalstrom.internal.lib.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 2,237,303 |
private ICMPv6EchoReply getPacket() {
return m_packet;
} | ICMPv6EchoReply function() { return m_packet; } | /**
* Returns the ICMP packet for the reply.
*
* @return a {@link org.opennms.protocols.icmp.ICMPEchoPacket} object.
*/ | Returns the ICMP packet for the reply | getPacket | {
"repo_name": "rfdrake/opennms",
"path": "opennms-icmp/opennms-icmp-jni6/src/main/java/org/opennms/netmgt/icmp/jni6/Jni6PingResponse.java",
"license": "gpl-2.0",
"size": 4620
} | [
"org.opennms.protocols.icmp6.ICMPv6EchoReply"
] | import org.opennms.protocols.icmp6.ICMPv6EchoReply; | import org.opennms.protocols.icmp6.*; | [
"org.opennms.protocols"
] | org.opennms.protocols; | 1,062,168 |
public int length(String namespace, String localname) {
int number=0;
Node sibling=this._constructionElement.getFirstChild();
while (sibling!=null) {
if (localname.equals(sibling.getLocalName())
&&
... | int function(String namespace, String localname) { int number=0; Node sibling=this._constructionElement.getFirstChild(); while (sibling!=null) { if (localname.equals(sibling.getLocalName()) && namespace.equals(sibling.getNamespaceURI())) { number++; } sibling=sibling.getNextSibling(); } return number; } | /**
* Method length
*
* @param namespace
* @param localname
* @return the number of elements {namespace}:localname under this element
*/ | Method length | length | {
"repo_name": "andreagenso/java2scala",
"path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java",
"license": "apache-2.0",
"size": 15537
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,169,067 |
EReference getNameOrFunctionCall_RightType2(); | EReference getNameOrFunctionCall_RightType2(); | /**
* Returns the meta object for the containment reference '{@link com.euclideanspace.spad.editor.NameOrFunctionCall#getRightType2 <em>Right Type2</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Right Type2</em>'.
* @see com.euclidea... | Returns the meta object for the containment reference '<code>com.euclideanspace.spad.editor.NameOrFunctionCall#getRightType2 Right Type2</code>'. | getNameOrFunctionCall_RightType2 | {
"repo_name": "martinbaker/euclideanspace",
"path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java",
"license": "agpl-3.0",
"size": 593321
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,228,791 |
public String getToolTipText(MouseEvent e) {
// check if we are over a button
if (currentCloseRolloverIndex != -1) {
return null;
}
int x = e.getX();
int y = e.getY();
int index = getTabAtLocation(x, y);
if (ind... | String function(MouseEvent e) { if (currentCloseRolloverIndex != -1) { return null; } int x = e.getX(); int y = e.getY(); int index = getTabAtLocation(x, y); if (index == -1) { return null; } TabComponent tabComponent = components.get(index); return tabComponent.getToolTip(); } | /**
* Returns the tool tip text of the current
* mouse rollover tab.
*
* @param the mouse event
* @return the tool tip of the rolled over tab - or null
*/ | Returns the tool tip text of the current mouse rollover tab | getToolTipText | {
"repo_name": "toxeh/ExecuteQuery",
"path": "java/src/org/executequery/base/ScrollingTabPane.java",
"license": "gpl-3.0",
"size": 43297
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,738,067 |
@Test
public void testReplication () {
replication = 3;
preferredBlockSize = 128*1024*1024;
INodeFile inf = createINodeFile(replication, preferredBlockSize);
assertEquals("True has to be returned in this case", replication,
inf.getFileReplication());
} | void function () { replication = 3; preferredBlockSize = 128*1024*1024; INodeFile inf = createINodeFile(replication, preferredBlockSize); assertEquals(STR, replication, inf.getFileReplication()); } | /**
* Test for the Replication value. Sets a value and checks if it was set
* correct.
*/ | Test for the Replication value. Sets a value and checks if it was set correct | testReplication | {
"repo_name": "anjuncc/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java",
"license": "apache-2.0",
"size": 43126
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,792,422 |
public java.util.Collection<ExternalObject> getExternalObjects(Long blogId)
throws BlogNotFoundException, BlogAccessException;
| java.util.Collection<ExternalObject> function(Long blogId) throws BlogNotFoundException, BlogAccessException; | /**
* <p>
* Return the external objects that are assigned to the given blog. The properties will not be
* loaded. Use the property management to get them.
* </p>
*
* @param blogId
* the ID of the blog
* @return the external objects of the topic. The collection ... | Return the external objects that are assigned to the given blog. The properties will not be loaded. Use the property management to get them. | getExternalObjects | {
"repo_name": "Communote/communote-server",
"path": "communote/persistence/src/main/java/com/communote/server/core/external/ExternalObjectManagement.java",
"license": "apache-2.0",
"size": 13631
} | [
"com.communote.server.api.core.blog.BlogAccessException",
"com.communote.server.api.core.blog.BlogNotFoundException",
"com.communote.server.model.external.ExternalObject",
"java.util.Collection"
] | import com.communote.server.api.core.blog.BlogAccessException; import com.communote.server.api.core.blog.BlogNotFoundException; import com.communote.server.model.external.ExternalObject; import java.util.Collection; | import com.communote.server.api.core.blog.*; import com.communote.server.model.external.*; import java.util.*; | [
"com.communote.server",
"java.util"
] | com.communote.server; java.util; | 800,699 |
public boolean isChildFragmentResolved() throws XNIException {
boolean resolved = (fXPointerPart != null) ? fXPointerPart
.isChildFragmentResolved() : false;
return resolved;
} | boolean function() throws XNIException { boolean resolved = (fXPointerPart != null) ? fXPointerPart .isChildFragmentResolved() : false; return resolved; } | /**
* Returns true if the XPointer expression resolves to a non-element child
* of the current resource fragment.
*
* @see com.sun.org.apache.xerces.internal.xpointer.XPointerPart#isChildFragmentResolved()
*
*/ | Returns true if the XPointer expression resolves to a non-element child of the current resource fragment | isChildFragmentResolved | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java",
"license": "apache-2.0",
"size": 46643
} | [
"com.sun.org.apache.xerces.internal.xni.XNIException"
] | import com.sun.org.apache.xerces.internal.xni.XNIException; | import com.sun.org.apache.xerces.internal.xni.*; | [
"com.sun.org"
] | com.sun.org; | 2,861,114 |
@Override
public void suspend(String jobId) throws OozieClientException {
try {
coordEngine.suspend(jobId);
}
catch (CoordinatorEngineException ex) {
throw new OozieClientException(ex.getErrorCode().toString(), ex);
}
} | void function(String jobId) throws OozieClientException { try { coordEngine.suspend(jobId); } catch (CoordinatorEngineException ex) { throw new OozieClientException(ex.getErrorCode().toString(), ex); } } | /**
* Suspend a coordinator job.
*
* @param jobId job Id.
* @throws org.apache.oozie.client.OozieClientException thrown if the job
* could not be suspended.
*/ | Suspend a coordinator job | suspend | {
"repo_name": "sunmeng007/oozie",
"path": "core/src/main/java/org/apache/oozie/LocalOozieClientCoord.java",
"license": "apache-2.0",
"size": 14269
} | [
"org.apache.oozie.client.OozieClientException"
] | import org.apache.oozie.client.OozieClientException; | import org.apache.oozie.client.*; | [
"org.apache.oozie"
] | org.apache.oozie; | 2,075,165 |
public static void disposeImages() {
// dispose loaded images
{
for (Image image : m_imageMap.values()) {
image.dispose();
}
m_imageMap.clear();
}
// dispose decorated images
for (int i = 0; i < m_decoratedImageMap.length; i++) {
Map<Image, Map<Image, Image>> cornerDecoratedImageM... | static void function() { { for (Image image : m_imageMap.values()) { image.dispose(); } m_imageMap.clear(); } for (int i = 0; i < m_decoratedImageMap.length; i++) { Map<Image, Map<Image, Image>> cornerDecoratedImageMap = m_decoratedImageMap[i]; if (cornerDecoratedImageMap != null) { for (Map<Image, Image> decoratedMap ... | /**
* Dispose all of the cached {@link Image}'s.
*/ | Dispose all of the cached <code>Image</code>'s | disposeImages | {
"repo_name": "Agem-Bilisim/lider-console",
"path": "lider-console-core/src/tr/org/liderahenk/liderconsole/core/utils/SWTResourceManager.java",
"license": "lgpl-3.0",
"size": 32467
} | [
"java.util.HashMap",
"java.util.Map",
"org.eclipse.swt.graphics.Font",
"org.eclipse.swt.graphics.Image"
] | import java.util.HashMap; import java.util.Map; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.Image; | import java.util.*; import org.eclipse.swt.graphics.*; | [
"java.util",
"org.eclipse.swt"
] | java.util; org.eclipse.swt; | 1,467,937 |
private static Image imageFromMatrix(BitMatrix matrix) {
int height = matrix.getHeight();
int width = matrix.getWidth();
WritableImage image = new WritableImage(width, height);
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
Color colo... | static Image function(BitMatrix matrix) { int height = matrix.getHeight(); int width = matrix.getWidth(); WritableImage image = new WritableImage(width, height); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { Color color = matrix.get(x,y) ? Color.BLACK : Color.WHITE; image.getPixelWriter().setColo... | /**
* Create a JavaFX Image from a BitMatrix
* @param matrix the matrix
* @return the QRCode Image
*/ | Create a JavaFX Image from a BitMatrix | imageFromMatrix | {
"repo_name": "peterdettman/bitcoinj",
"path": "wallettemplate/src/main/java/wallettemplate/utils/QRCodeImages.java",
"license": "apache-2.0",
"size": 2503
} | [
"com.google.zxing.common.BitMatrix"
] | import com.google.zxing.common.BitMatrix; | import com.google.zxing.common.*; | [
"com.google.zxing"
] | com.google.zxing; | 1,756,487 |
URL remote = new URL(url);
HttpURLConnection httpURLConnection = (HttpURLConnection) remote.openConnection();
httpURLConnection.addRequestProperty("User-Agent", userAgent());
httpURLConnection.connect();
JsonParser jsonParser = new JsonParser();
return jsonParser.parse(new Inpu... | URL remote = new URL(url); HttpURLConnection httpURLConnection = (HttpURLConnection) remote.openConnection(); httpURLConnection.addRequestProperty(STR, userAgent()); httpURLConnection.connect(); JsonParser jsonParser = new JsonParser(); return jsonParser.parse(new InputStreamReader((InputStream)httpURLConnection.getCon... | /**
* Fetch a JSON response from the URL.
*
* @param url URL to fetch from
*
* @return JsonElement
*
* @throws IOException
*/ | Fetch a JSON response from the URL | fetch | {
"repo_name": "traq/java_api_client",
"path": "src/main/java/traq/API.java",
"license": "apache-2.0",
"size": 1233
} | [
"com.google.gson.JsonParser",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.net.HttpURLConnection"
] | import com.google.gson.JsonParser; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; | import com.google.gson.*; import java.io.*; import java.net.*; | [
"com.google.gson",
"java.io",
"java.net"
] | com.google.gson; java.io; java.net; | 2,690,781 |
public void testCRUD_using_CityId_on_CurrentWeatherTable() throws Throwable {
DBHelper dbHelper = DBHelper.getInstance(getContext());
SQLiteDatabase db = dbHelper.getWritableDatabase();
ContentValues insertValues = DataUtilities.CurrentWeather.insertValues_Seattle();
long r... | void function() throws Throwable { DBHelper dbHelper = DBHelper.getInstance(getContext()); SQLiteDatabase db = dbHelper.getWritableDatabase(); ContentValues insertValues = DataUtilities.CurrentWeather.insertValues_Seattle(); long rowId = -1; rowId = db.insertWithOnConflict( CurrentWeatherContract.TABLE, null, insertVal... | /**
* Current Weather table
* Test all CRUD operations on the db using city id
* @throws Throwable
*/ | Current Weather table Test all CRUD operations on the db using city id | testCRUD_using_CityId_on_CurrentWeatherTable | {
"repo_name": "yeelin/weatherberry",
"path": "app/src/androidTest/java/com/example/yeelin/homework/weatherberry/provider/DBHelperTest.java",
"license": "mit",
"size": 22067
} | [
"android.content.ContentValues",
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase"
] | import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; | import android.content.*; import android.database.*; import android.database.sqlite.*; | [
"android.content",
"android.database"
] | android.content; android.database; | 927,717 |
default Duration getImplicitWaitTimeout() {
throw new UnsupportedCommandException();
}
/**
* @deprecated Use {@link #setScriptTimeout(Duration)} | default Duration getImplicitWaitTimeout() { throw new UnsupportedCommandException(); } /** * @deprecated Use {@link #setScriptTimeout(Duration)} | /**
* Gets the amount of time the driver should wait when searching for an element if it is
* not immediately present.
*
* @return The amount of time the driver should wait when searching for an element.
* @see <a href="https://www.w3.org/TR/webdriver/#get-timeouts">W3C WebDriver</a>
*/ | Gets the amount of time the driver should wait when searching for an element if it is not immediately present | getImplicitWaitTimeout | {
"repo_name": "SeleniumHQ/selenium",
"path": "java/src/org/openqa/selenium/WebDriver.java",
"license": "apache-2.0",
"size": 28897
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 686,169 |
protected final void ensureOpen(boolean failIfClosing) throws AlreadyClosedException {
if (closed || (failIfClosing && closing)) {
throw new AlreadyClosedException("this IndexWriter is closed");
}
} | final void function(boolean failIfClosing) throws AlreadyClosedException { if (closed (failIfClosing && closing)) { throw new AlreadyClosedException(STR); } } | /**
* Used internally to throw an {@link AlreadyClosedException} if this
* IndexWriter has been closed or is in the process of closing.
*
* @param failIfClosing
* if true, also fail when {@code IndexWriter} is in the process of
* closing ({@code closing=true}) but not yet done closi... | Used internally to throw an <code>AlreadyClosedException</code> if this IndexWriter has been closed or is in the process of closing | ensureOpen | {
"repo_name": "yintaoxue/read-open-source-code",
"path": "lucene-4.7.2/src/org/apache/lucene/index/IndexWriter.java",
"license": "apache-2.0",
"size": 176689
} | [
"org.apache.lucene.store.AlreadyClosedException"
] | import org.apache.lucene.store.AlreadyClosedException; | import org.apache.lucene.store.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,549,966 |
public void bind( DataDictionary dataDictionary )
throws StandardException
{
schemaName = getSchemaDescriptor(null, schemaName).getSchemaName();
}
///////////////////////////////////////////////////////////////////////
//
// OBJECT INTERFACE
/... | void function( DataDictionary dataDictionary ) throws StandardException { schemaName = getSchemaDescriptor(null, schemaName).getSchemaName(); } | /**
* Bind this TableName. This means filling in the schema name if it
* wasn't specified.
*
* @param dataDictionary Data dictionary to bind against.
*
* @exception StandardException Thrown on error
*/ | Bind this TableName. This means filling in the schema name if it wasn't specified | bind | {
"repo_name": "splicemachine/spliceengine",
"path": "db-engine/src/main/java/com/splicemachine/db/impl/sql/compile/TableName.java",
"license": "agpl-3.0",
"size": 9726
} | [
"com.splicemachine.db.iapi.error.StandardException",
"com.splicemachine.db.iapi.sql.dictionary.DataDictionary"
] | import com.splicemachine.db.iapi.error.StandardException; import com.splicemachine.db.iapi.sql.dictionary.DataDictionary; | import com.splicemachine.db.iapi.error.*; import com.splicemachine.db.iapi.sql.dictionary.*; | [
"com.splicemachine.db"
] | com.splicemachine.db; | 2,338,256 |
public Builder setProductId(@Nonnull String productId) {
this.productId = productId;
return this;
} | Builder function(@Nonnull String productId) { this.productId = productId; return this; } | /**
* Sets the unique ID of the product being requested. If none supplied, the cheapest product for the
* location is used.
*/ | Sets the unique ID of the product being requested. If none supplied, the cheapest product for the location is used | setProductId | {
"repo_name": "uber/rides-java-sdk",
"path": "uber-rides/src/main/java/com/uber/sdk/rides/client/model/RideRequestParameters.java",
"license": "mit",
"size": 16676
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,714,768 |
public static boolean commitFence(Method commitMethod, Object targetTCCBean,
String xid, Long branchId, Object[] args) {
return transactionTemplate.execute(status -> {
try {
Connection conn = DataSourceUtils.getConnection(dataSource);
... | static boolean function(Method commitMethod, Object targetTCCBean, String xid, Long branchId, Object[] args) { return transactionTemplate.execute(status -> { try { Connection conn = DataSourceUtils.getConnection(dataSource); TCCFenceDO tccFenceDO = TCC_FENCE_DAO.queryTCCFenceDO(conn, xid, branchId); if (tccFenceDO == n... | /**
* tcc commit method enhanced
*
* @param commitMethod commit method
* @param targetTCCBean target tcc bean
* @param xid the global transaction id
* @param branchId the branch transaction id
* @param args commit method... | tcc commit method enhanced | commitFence | {
"repo_name": "seata/seata",
"path": "tcc/src/main/java/io/seata/rm/tcc/TCCFenceHandler.java",
"license": "apache-2.0",
"size": 15326
} | [
"io.seata.common.exception.FrameworkErrorCode",
"io.seata.common.exception.SkipCallbackWrapperException",
"io.seata.rm.tcc.constant.TCCFenceConstant",
"io.seata.rm.tcc.exception.TCCFenceException",
"io.seata.rm.tcc.store.TCCFenceDO",
"java.lang.reflect.Method",
"java.sql.Connection",
"org.springframew... | import io.seata.common.exception.FrameworkErrorCode; import io.seata.common.exception.SkipCallbackWrapperException; import io.seata.rm.tcc.constant.TCCFenceConstant; import io.seata.rm.tcc.exception.TCCFenceException; import io.seata.rm.tcc.store.TCCFenceDO; import java.lang.reflect.Method; import java.sql.Connection; ... | import io.seata.common.exception.*; import io.seata.rm.tcc.constant.*; import io.seata.rm.tcc.exception.*; import io.seata.rm.tcc.store.*; import java.lang.reflect.*; import java.sql.*; import org.springframework.jdbc.datasource.*; | [
"io.seata.common",
"io.seata.rm",
"java.lang",
"java.sql",
"org.springframework.jdbc"
] | io.seata.common; io.seata.rm; java.lang; java.sql; org.springframework.jdbc; | 2,167,596 |
private int isPrivacyModelFulfilled(Transformation transformation, HashGroupifyEntry entry) {
// Check minimal group size
if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) {
return 0;
}
// Check other criteria
// Note: ... | int function(Transformation transformation, HashGroupifyEntry entry) { if (minimalClassSize != Integer.MAX_VALUE && entry.count < minimalClassSize) { return 0; } for (int i = 0; i < classBasedCriteria.length; i++) { if (!classBasedCriteria[i].isAnonymous(transformation, entry)) { return i + 1; } } return -1; } | /**
* Checks whether the given entry is anonymous.
* @param transformation
* @param entry
* @return
* @returns -1, if all criteria are fulfilled, 0, if minimal group size is not fulfilled, (index+1) if criteria[index] is not fulfilled
*/ | Checks whether the given entry is anonymous | isPrivacyModelFulfilled | {
"repo_name": "jgaupp/arx",
"path": "src/main/org/deidentifier/arx/framework/check/groupify/HashGroupify.java",
"license": "apache-2.0",
"size": 28048
} | [
"org.deidentifier.arx.framework.lattice.Transformation"
] | import org.deidentifier.arx.framework.lattice.Transformation; | import org.deidentifier.arx.framework.lattice.*; | [
"org.deidentifier.arx"
] | org.deidentifier.arx; | 2,704,713 |
public static void unsetReturnPathIgnoredForOk(HttpSession session) {
LinkedList stack = (LinkedList) session.getAttribute(Constants.RETURN_LOC_SES_ATTR);
ReturnPath returnPath = (ReturnPath) stack.getFirst();
returnPath.setIgnore(Boolean.TRUE);
} | static void function(HttpSession session) { LinkedList stack = (LinkedList) session.getAttribute(Constants.RETURN_LOC_SES_ATTR); ReturnPath returnPath = (ReturnPath) stack.getFirst(); returnPath.setIgnore(Boolean.TRUE); } | /**
* Unset the "return path" that locates the point at which a
* subflow was included into a primary workflow.
*
* @param session the http session
*/ | Unset the "return path" that locates the point at which a subflow was included into a primary workflow | unsetReturnPathIgnoredForOk | {
"repo_name": "cc14514/hq6",
"path": "hq-web/src/main/java/org/hyperic/hq/ui/util/SessionUtils.java",
"license": "unlicense",
"size": 25054
} | [
"java.util.LinkedList",
"javax.servlet.http.HttpSession",
"org.hyperic.hq.ui.Constants",
"org.hyperic.hq.ui.beans.ReturnPath"
] | import java.util.LinkedList; import javax.servlet.http.HttpSession; import org.hyperic.hq.ui.Constants; import org.hyperic.hq.ui.beans.ReturnPath; | import java.util.*; import javax.servlet.http.*; import org.hyperic.hq.ui.*; import org.hyperic.hq.ui.beans.*; | [
"java.util",
"javax.servlet",
"org.hyperic.hq"
] | java.util; javax.servlet; org.hyperic.hq; | 2,201,184 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ConnectionSettingInner>> updateWithResponseAsync(
String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<ConnectionSettingInner>> function( String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupNam... | /**
* Updates a Connection Setting registration for a Bot Service.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param resourceName The name of the Bot resource.
* @param connectionName The name of the Bot Service Connection Setting resource.
... | Updates a Connection Setting registration for a Bot Service | updateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsClientImpl.java",
"license": "mit",
"size": 71427
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.botservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,061,253 |
protected static void constraintToString(State state, StringBuffer buffer, Constraint c,
Query q, DatabaseSchema schema, int safeness,
boolean loseBrackets) throws ObjectStoreException {
if ((safeness != SAFENESS_SAFE) && (safeness != SAFENESS_ANTISAFE)
&& (safeness !... | static void function(State state, StringBuffer buffer, Constraint c, Query q, DatabaseSchema schema, int safeness, boolean loseBrackets) throws ObjectStoreException { if ((safeness != SAFENESS_SAFE) && (safeness != SAFENESS_ANTISAFE) && (safeness != SAFENESS_UNSAFE)) { throw new ObjectStoreException(STR + safeness); } ... | /**
* Converts a Constraint object into a String suitable for putting in an SQL query.
*
* @param state the current SqlGenerator state
* @param buffer the StringBuffer to place text into
* @param c the Constraint object
* @param q the Query
* @param schema the DatabaseSchema in which ... | Converts a Constraint object into a String suitable for putting in an SQL query | constraintToString | {
"repo_name": "elsiklab/intermine",
"path": "intermine/objectstore/main/src/org/intermine/objectstore/intermine/SqlGenerator.java",
"license": "lgpl-2.1",
"size": 140034
} | [
"org.intermine.objectstore.ObjectStoreException",
"org.intermine.objectstore.query.BagConstraint",
"org.intermine.objectstore.query.ClassConstraint",
"org.intermine.objectstore.query.Constraint",
"org.intermine.objectstore.query.ConstraintSet",
"org.intermine.objectstore.query.ContainsConstraint",
"org.... | import org.intermine.objectstore.ObjectStoreException; import org.intermine.objectstore.query.BagConstraint; import org.intermine.objectstore.query.ClassConstraint; import org.intermine.objectstore.query.Constraint; import org.intermine.objectstore.query.ConstraintSet; import org.intermine.objectstore.query.ContainsCon... | import org.intermine.objectstore.*; import org.intermine.objectstore.query.*; | [
"org.intermine.objectstore"
] | org.intermine.objectstore; | 1,754,095 |
public DataNode setSubstrate_materialScalar(Double substrate_material); | DataNode function(Double substrate_material); | /**
* TODO: documentation needed
* <p>
* <b>Type:</b> NX_FLOAT
* <b>Dimensions:</b> 1: nsurf;
* </p>
*
* @param substrate_material the substrate_material
*/ | Type: NX_FLOAT Dimensions: 1: nsurf; | setSubstrate_materialScalar | {
"repo_name": "belkassaby/dawnsci",
"path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXguide.java",
"license": "epl-1.0",
"size": 16535
} | [
"org.eclipse.dawnsci.analysis.api.tree.DataNode"
] | import org.eclipse.dawnsci.analysis.api.tree.DataNode; | import org.eclipse.dawnsci.analysis.api.tree.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 1,961,707 |
public void setMeeting(SignupMeeting meeting);
| void function(SignupMeeting meeting); | /**
* set the SignupMeeting object
*
* @param meeting
* a SignupMeeting object
*/ | set the SignupMeeting object | setMeeting | {
"repo_name": "pushyamig/sakai",
"path": "signup/api/src/java/org/sakaiproject/signup/logic/messages/SignupEventTrackingInfo.java",
"license": "apache-2.0",
"size": 3766
} | [
"org.sakaiproject.signup.model.SignupMeeting"
] | import org.sakaiproject.signup.model.SignupMeeting; | import org.sakaiproject.signup.model.*; | [
"org.sakaiproject.signup"
] | org.sakaiproject.signup; | 806,557 |
@Test
public void testCreateAndUpdateRouter() {
target.createRouter(ROUTER);
assertEquals("Number of router did not match", 1, target.routers().size());
target.updateRouter(ROUTER_UPDATED);
assertEquals("Number of router did not match", 1, target.routers().size());
asser... | void function() { target.createRouter(ROUTER); assertEquals(STR, 1, target.routers().size()); target.updateRouter(ROUTER_UPDATED); assertEquals(STR, 1, target.routers().size()); assertEquals(STR, UPDATED_DESCRIPTION, target.router(ROUTER_NAME).description()); validateEvents(KUBEVIRT_ROUTER_CREATED, KUBEVIRT_ROUTER_UPDA... | /**
* Tests creating and updating a port, and checks if proper event is triggered.
*/ | Tests creating and updating a port, and checks if proper event is triggered | testCreateAndUpdateRouter | {
"repo_name": "gkatsikas/onos",
"path": "apps/kubevirt-networking/app/src/test/java/org/onosproject/kubevirtnetworking/impl/KubevirtRouterManagerTest.java",
"license": "apache-2.0",
"size": 21108
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,767,767 |
public void deleteRewrites(List<CmsRewriteAliasTableRow> rowsToDelete) {
List<CmsRewriteAliasTableRow> liveData = m_view.getRewriteData();
liveData.removeAll(rowsToDelete);
m_view.getRewriteTable().getSelectionModel().clear();
updateValidationStatus();
}
| void function(List<CmsRewriteAliasTableRow> rowsToDelete) { List<CmsRewriteAliasTableRow> liveData = m_view.getRewriteData(); liveData.removeAll(rowsToDelete); m_view.getRewriteTable().getSelectionModel().clear(); updateValidationStatus(); } | /**
* This method is called when the user wants to delete rewrites aliases.<p>
*
* @param rowsToDelete the rows the user wants to delete
*/ | This method is called when the user wants to delete rewrites aliases | deleteRewrites | {
"repo_name": "PatidarWeb/opencms-core",
"path": "src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasTableController.java",
"license": "lgpl-2.1",
"size": 16161
} | [
"java.util.List",
"org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow"
] | import java.util.List; import org.opencms.gwt.shared.alias.CmsRewriteAliasTableRow; | import java.util.*; import org.opencms.gwt.shared.alias.*; | [
"java.util",
"org.opencms.gwt"
] | java.util; org.opencms.gwt; | 2,150,960 |
public Object loadAcquisitionData(SecurityContext ctx, Object refObject)
throws DSOutOfServiceException, DSAccessException;
| Object function(SecurityContext ctx, Object refObject) throws DSOutOfServiceException, DSAccessException; | /**
* Loads the acquisition metadata for an image or a given channel.
*
* @param ctx The security context.
* @param refObject Either an <code>ImageData</code> or
* <code>ChannelData</code> node.
* @return See above.
* @throws DSOutOfServiceException If the connection is broken, or logged
* ... | Loads the acquisition metadata for an image or a given channel | loadAcquisitionData | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OmeroMetadataService.java",
"license": "gpl-2.0",
"size": 30267
} | [
"org.openmicroscopy.shoola.env.data.util.SecurityContext"
] | import org.openmicroscopy.shoola.env.data.util.SecurityContext; | import org.openmicroscopy.shoola.env.data.util.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 1,572,818 |
@Override public Document newDocument() {
return implementation.createDocument(null, null, null);
} | @Override Document function() { return implementation.createDocument(null, null, null); } | /**
* For API compatibility.
* @see javax.xml.parsers.DocumentBuilder#newDocument()
*/ | For API compatibility | newDocument | {
"repo_name": "anarcheuz/Funny-school-projects",
"path": "WebSemantic/src/htmlparser-1.4/src/nu/validator/htmlparser/dom/HtmlDocumentBuilder.java",
"license": "mit",
"size": 24436
} | [
"org.w3c.dom.Document"
] | import org.w3c.dom.Document; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,653,802 |
public static ArrayList<ImageModel> processImagesFromContent(Document doc) {
String baseUrl = UIHelper.getBaseUrl(LNReaderApplication.getInstance().getApplicationContext());
Elements imageElements = doc.select("img");
ArrayList<ImageModel> images = new ArrayList<ImageModel>();
for (... | static ArrayList<ImageModel> function(Document doc) { String baseUrl = UIHelper.getBaseUrl(LNReaderApplication.getInstance().getApplicationContext()); Elements imageElements = doc.select("img"); ArrayList<ImageModel> images = new ArrayList<ImageModel>(); for (Element imageElement : imageElements) { ImageModel image = n... | /**
* Get all img element
*
* @param doc
* @return
*/ | Get all img element | processImagesFromContent | {
"repo_name": "calvinaquino/LNReader-Android",
"path": "app/src/main/java/com/erakk/lnreader/parser/CommonParser.java",
"license": "apache-2.0",
"size": 24108
} | [
"android.util.Log",
"com.erakk.lnreader.LNReaderApplication",
"com.erakk.lnreader.UIHelper",
"com.erakk.lnreader.model.ImageModel",
"java.net.MalformedURLException",
"java.util.ArrayList",
"org.jsoup.nodes.Document",
"org.jsoup.nodes.Element",
"org.jsoup.select.Elements"
] | import android.util.Log; import com.erakk.lnreader.LNReaderApplication; import com.erakk.lnreader.UIHelper; import com.erakk.lnreader.model.ImageModel; import java.net.MalformedURLException; import java.util.ArrayList; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; | import android.util.*; import com.erakk.lnreader.*; import com.erakk.lnreader.model.*; import java.net.*; import java.util.*; import org.jsoup.nodes.*; import org.jsoup.select.*; | [
"android.util",
"com.erakk.lnreader",
"java.net",
"java.util",
"org.jsoup.nodes",
"org.jsoup.select"
] | android.util; com.erakk.lnreader; java.net; java.util; org.jsoup.nodes; org.jsoup.select; | 1,709,321 |
@Override
public SocketAddress getRemoteSocketAddress() {
if (self == this) {
return super.getRemoteSocketAddress();
} else {
return self.getRemoteSocketAddress();
}
} | SocketAddress function() { if (self == this) { return super.getRemoteSocketAddress(); } else { return self.getRemoteSocketAddress(); } } | /**
* Returns the address of the endpoint this socket is connected to
* @see java.net.Socket#getRemoteSocketAddress
*/ | Returns the address of the endpoint this socket is connected to | getRemoteSocketAddress | {
"repo_name": "steffenmueller4/wolfssl-jsse-integration",
"path": "src/main/java/edu/kit/aifb/eorg/wolfssl/BaseSSLSocketImpl.java",
"license": "gpl-2.0",
"size": 18408
} | [
"java.net.SocketAddress"
] | import java.net.SocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 2,521,024 |
@Test
public void testSetNonEqNotToFalse() {
CodeBlock base = new CodeBlock(True.INSTANCE);
base.addNestedElement(new CodeBlock(and("A_eq_1", "A")));
Properties config = new Properties();
config.setProperty(DefaultSettings.PREPARATION_CLASSES.getKey() + ".0", "NonBoolean... | void function() { CodeBlock base = new CodeBlock(True.INSTANCE); base.addNestedElement(new CodeBlock(and(STR, "A"))); Properties config = new Properties(); config.setProperty(DefaultSettings.PREPARATION_CLASSES.getKey() + ".0", STR); List<VariableWithFeatureEffect> results = detectFEs(base, config); assertThat(results.... | /**
* Tests that other non-_eq_ variables are not set to false.
*/ | Tests that other non-_eq_ variables are not set to false | testSetNonEqNotToFalse | {
"repo_name": "KernelHaven/FeatureEffectAnalysis",
"path": "test/net/ssehub/kernel_haven/fe_analysis/fes/FeatureEffectFinderTests.java",
"license": "apache-2.0",
"size": 10733
} | [
"java.util.List",
"java.util.Properties",
"net.ssehub.kernel_haven.code_model.CodeBlock",
"net.ssehub.kernel_haven.config.DefaultSettings",
"net.ssehub.kernel_haven.fe_analysis.fes.FeatureEffectFinder",
"net.ssehub.kernel_haven.util.logic.True",
"net.ssehub.kernel_haven.util.logic.Variable",
"org.hamc... | import java.util.List; import java.util.Properties; import net.ssehub.kernel_haven.code_model.CodeBlock; import net.ssehub.kernel_haven.config.DefaultSettings; import net.ssehub.kernel_haven.fe_analysis.fes.FeatureEffectFinder; import net.ssehub.kernel_haven.util.logic.True; import net.ssehub.kernel_haven.util.logic.Va... | import java.util.*; import net.ssehub.kernel_haven.code_model.*; import net.ssehub.kernel_haven.config.*; import net.ssehub.kernel_haven.fe_analysis.fes.*; import net.ssehub.kernel_haven.util.logic.*; import org.hamcrest.*; import org.junit.*; | [
"java.util",
"net.ssehub.kernel_haven",
"org.hamcrest",
"org.junit"
] | java.util; net.ssehub.kernel_haven; org.hamcrest; org.junit; | 304,884 |
public void autonomousPeriodic() {
Scheduler.getInstance().run();
}
| void function() { Scheduler.getInstance().run(); } | /**
* This function is called periodically during autonomous
*/ | This function is called periodically during autonomous | autonomousPeriodic | {
"repo_name": "TeamParadise/GearsBot",
"path": "src/edu/wpi/first/wpilibj/templates/GearsBot.java",
"license": "bsd-3-clause",
"size": 3410
} | [
"edu.wpi.first.wpilibj.command.Scheduler"
] | import edu.wpi.first.wpilibj.command.Scheduler; | import edu.wpi.first.wpilibj.command.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 2,006,581 |
private static String getVersionCode(Context context, String packageName) {
try {
return String.valueOf(context.getPackageManager().getPackageInfo(packageName, 0).
versionCode);
} catch (NameNotFoundException e) {
Log.e(TAG, "Package not found. could not g... | static String function(Context context, String packageName) { try { return String.valueOf(context.getPackageManager().getPackageInfo(packageName, 0). versionCode); } catch (NameNotFoundException e) { Log.e(TAG, STR); return ""; } } | /**
* Get version code for the application package name.
*
* @param context
* @param packageName application package name
* @return the version code or empty string if package not found
*/ | Get version code for the application package name | getVersionCode | {
"repo_name": "luisbrito/baker-android-refactor",
"path": "app/src/main/java/com/google/android/vending/licensing/LicenseChecker.java",
"license": "bsd-3-clause",
"size": 14050
} | [
"android.content.Context",
"android.content.pm.PackageManager",
"android.util.Log"
] | import android.content.Context; import android.content.pm.PackageManager; import android.util.Log; | import android.content.*; import android.content.pm.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 1,038,509 |
private String createBasicAuthorization(String username, String password) {
if (username == null || username.trim().length() == 0) {
return null;
}
username = TestUtil.doPropertyReplacement(username);
password = TestUtil.doPropertyReplacement(password);
String val... | String function(String username, String password) { if (username == null username.trim().length() == 0) { return null; } username = TestUtil.doPropertyReplacement(username); password = TestUtil.doPropertyReplacement(password); String val = username + ":" + password; return STR + Base64.encodeBase64String(val.getBytes()... | /**
* Create the basic auth header value.
*
* @param username
* @param password
*/ | Create the basic auth header value | createBasicAuthorization | {
"repo_name": "EricWittmann/apiman",
"path": "test/common/src/main/java/io/apiman/test/common/util/TestPlanRunner.java",
"license": "apache-2.0",
"size": 20951
} | [
"org.apache.commons.codec.binary.Base64"
] | import org.apache.commons.codec.binary.Base64; | import org.apache.commons.codec.binary.*; | [
"org.apache.commons"
] | org.apache.commons; | 810,429 |
public static boolean saveImage(BufferedImage image, String toFileName, int type)
{
try {
return ImageIO.write(image, type == IMAGE_JPEG ? "jpg" : "png", new File(toFileName));
}
catch (IOException e) {
throw new ForumException(e);
}
} | static boolean function(BufferedImage image, String toFileName, int type) { try { return ImageIO.write(image, type == IMAGE_JPEG ? "jpg" : "png", new File(toFileName)); } catch (IOException e) { throw new ForumException(e); } } | /**
* Saves an image to the disk.
*
* @param image The image to save
* @param toFileName The filename to use
* @param type The image type. Use <code>ImageUtils.IMAGE_JPEG</code> to save as JPEG images,
* or <code>ImageUtils.IMAGE_PNG</code> to save as PNG.
* @return <code>false</code> if no appropriate... | Saves an image to the disk | saveImage | {
"repo_name": "Nwanda/jforum",
"path": "src/net/jforum/util/image/ImageUtils.java",
"license": "bsd-3-clause",
"size": 10302
} | [
"java.awt.image.BufferedImage",
"java.io.File",
"java.io.IOException",
"javax.imageio.ImageIO",
"net.jforum.exceptions.ForumException"
] | import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import net.jforum.exceptions.ForumException; | import java.awt.image.*; import java.io.*; import javax.imageio.*; import net.jforum.exceptions.*; | [
"java.awt",
"java.io",
"javax.imageio",
"net.jforum.exceptions"
] | java.awt; java.io; javax.imageio; net.jforum.exceptions; | 434,166 |
public Integer describe(HplsqlParser.Describe_stmtContext ctx) {
trace(ctx, "DESCRIBE");
String sql = "DESCRIBE " + evalPop(ctx.table_name()).toString();
trace(ctx, sql);
QueryResult query = queryExecutor.executeQuery(sql, ctx);
if (query.error()) {
exec.signal(query);
return 1;
... | Integer function(HplsqlParser.Describe_stmtContext ctx) { trace(ctx, STR); String sql = STR + evalPop(ctx.table_name()).toString(); trace(ctx, sql); QueryResult query = queryExecutor.executeQuery(sql, ctx); if (query.error()) { exec.signal(query); return 1; } try { while (query.next()) { for (int i = 0; i < query.colum... | /**
* DESCRIBE statement
*/ | DESCRIBE statement | describe | {
"repo_name": "sankarh/hive",
"path": "hplsql/src/main/java/org/apache/hive/hplsql/Stmt.java",
"license": "apache-2.0",
"size": 49429
} | [
"org.apache.hive.hplsql.executor.QueryException",
"org.apache.hive.hplsql.executor.QueryResult"
] | import org.apache.hive.hplsql.executor.QueryException; import org.apache.hive.hplsql.executor.QueryResult; | import org.apache.hive.hplsql.executor.*; | [
"org.apache.hive"
] | org.apache.hive; | 1,159,023 |
public int getBehindOffset() {
return ((RelativeLayout.LayoutParams) mViewBehind.getLayoutParams()).rightMargin;
} | int function() { return ((RelativeLayout.LayoutParams) mViewBehind.getLayoutParams()).rightMargin; } | /**
* Gets the behind offset.
*
* @return The margin on the right of the screen that the behind view
* scrolls to
*/ | Gets the behind offset | getBehindOffset | {
"repo_name": "ZhouGongZaiShi/MVPDemo",
"path": "slidingmenu/src/main/java/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java",
"license": "apache-2.0",
"size": 31237
} | [
"android.widget.RelativeLayout"
] | import android.widget.RelativeLayout; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,755,398 |
public int getElementIndex(java.lang.String name, java.lang.Object element)
{
int i = Arrays.binarySearch(NATIVE_ELEMENTS, name);
if (i < 0)
{
name = getSubstitute(name);
i = Arrays.binarySearch(NATIVE_ELEMENTS, name);
}
switch (i)
{
... | int function(java.lang.String name, java.lang.Object element) { int i = Arrays.binarySearch(NATIVE_ELEMENTS, name); if (i < 0) { name = getSubstitute(name); i = Arrays.binarySearch(NATIVE_ELEMENTS, name); } switch (i) { case 6: return this.name != null && this.name.equals(element) ? 0 : -1; case 1: return this.cardNumb... | /**
* Returns the element called <code>name</code> at <code>index</code>.<p>
* The legal value(s) for <code>name</code> are defined in {@link #getElement}.
**/ | Returns the element called <code>name</code> at <code>index</code>. The legal value(s) for <code>name</code> are defined in <code>#getElement</code> | getElementIndex | {
"repo_name": "jboss-fuse/camel-c24io",
"path": "src/test/java/biz/c24/io/gettingstarted/transaction/CustomerDetails.java",
"license": "apache-2.0",
"size": 19091
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,215,339 |
private void configureTimezone() throws SQLException {
String configuredTimeZoneOnServer = this.serverVariables.get("timezone");
if (configuredTimeZoneOnServer == null) {
configuredTimeZoneOnServer = this.serverVariables.get("time_zone");
if ("SYSTEM".equalsIgnoreCase(confi... | void function() throws SQLException { String configuredTimeZoneOnServer = this.serverVariables.get(STR); if (configuredTimeZoneOnServer == null) { configuredTimeZoneOnServer = this.serverVariables.get(STR); if (STR.equalsIgnoreCase(configuredTimeZoneOnServer)) { configuredTimeZoneOnServer = this.serverVariables.get(STR... | /**
* Configures the client's timezone if required.
*
* @throws SQLException
* if the timezone the server is configured to use can't be
* mapped to a Java timezone.
*/ | Configures the client's timezone if required | configureTimezone | {
"repo_name": "richardgutkowski/ansible-roles",
"path": "stash/files/mysql-connector-java-5.1.35/src/com/mysql/jdbc/ConnectionImpl.java",
"license": "mit",
"size": 215141
} | [
"java.sql.SQLException",
"java.util.TimeZone"
] | import java.sql.SQLException; import java.util.TimeZone; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 565,535 |
public static String startup(final List<JVMClusterUtil.MasterThread> masters,
final List<JVMClusterUtil.RegionServerThread> regionservers) throws IOException {
Configuration configuration = null;
if (masters == null || masters.isEmpty()) {
return null;
}
for (JVMClusterUtil.MasterThread... | static String function(final List<JVMClusterUtil.MasterThread> masters, final List<JVMClusterUtil.RegionServerThread> regionservers) throws IOException { Configuration configuration = null; if (masters == null masters.isEmpty()) { return null; } for (JVMClusterUtil.MasterThread t : masters) { configuration = t.getMaste... | /**
* Start the cluster. Waits until there is a primary master initialized
* and returns its address.
* @param masters
* @param regionservers
* @return Address to use contacting primary master.
*/ | Start the cluster. Waits until there is a primary master initialized and returns its address | startup | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/JVMClusterUtil.java",
"license": "apache-2.0",
"size": 11709
} | [
"java.io.IOException",
"java.io.InterruptedIOException",
"java.util.List",
"org.apache.hadoop.conf.Configuration"
] | import java.io.IOException; import java.io.InterruptedIOException; import java.util.List; import org.apache.hadoop.conf.Configuration; | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 85,639 |
@Test
public void testCreateTableReplicatedCaseInsensitive() throws Exception {
doTestCreateTable("replicated", null, CacheMode.REPLICATED, CacheWriteSynchronizationMode.FULL_SYNC);
} | void function() throws Exception { doTestCreateTable(STR, null, CacheMode.REPLICATED, CacheWriteSynchronizationMode.FULL_SYNC); } | /**
* Test that {@code CREATE TABLE} with reserved template cache name actually creates new {@code REPLICATED} cache,
* H2 table and type descriptor on all nodes.
* @throws Exception if failed.
*/ | Test that CREATE TABLE with reserved template cache name actually creates new REPLICATED cache, H2 table and type descriptor on all nodes | testCreateTableReplicatedCaseInsensitive | {
"repo_name": "BiryukovVA/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java",
"license": "apache-2.0",
"size": 69770
} | [
"org.apache.ignite.cache.CacheMode",
"org.apache.ignite.cache.CacheWriteSynchronizationMode"
] | import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.CacheWriteSynchronizationMode; | import org.apache.ignite.cache.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,897,089 |
private Object invokeDelegateMethod(Method delegateMethod, Object... arguments) throws Exception {
try {
return delegateMethod.invoke(delegate, arguments);
} catch (IllegalArgumentException e) {
// this is a poor man's debugging for argument type mismatch errors
i... | Object function(Method delegateMethod, Object... arguments) throws Exception { try { return delegateMethod.invoke(delegate, arguments); } catch (IllegalArgumentException e) { if (STR.equals(e.getMessage())) { StringBuilder sb = new StringBuilder(STR) .append(delegateMethod.getName()).append("()\n"); Class<?>[] paramete... | /**
* Invokes the given {@link Method} and returns the result.
* <p>
* Handles some exceptions for debugging or root cause extraction.
*
* @param delegateMethod the {@link Method} to invoke
* @param arguments the arguments to use for the invocation
* @return the proxied result fr... | Invokes the given <code>Method</code> and returns the result. Handles some exceptions for debugging or root cause extraction | invokeDelegateMethod | {
"repo_name": "emre-aydin/hazelcast",
"path": "hazelcast/src/test/java/com/hazelcast/test/starter/answer/AbstractAnswer.java",
"license": "apache-2.0",
"size": 17174
} | [
"com.hazelcast.internal.util.RootCauseMatcher",
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method"
] | import com.hazelcast.internal.util.RootCauseMatcher; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; | import com.hazelcast.internal.util.*; import java.lang.reflect.*; | [
"com.hazelcast.internal",
"java.lang"
] | com.hazelcast.internal; java.lang; | 999,550 |
public void read(char[] holder) throws ProtocolException {
int readTotal = 0;
try {
byte[] bytes = new byte[holder.length];
while (readTotal < holder.length) {
int count = 0;
count = input.read(bytes, 0, holder.length - readTot... | void function(char[] holder) throws ProtocolException { int readTotal = 0; try { byte[] bytes = new byte[holder.length]; while (readTotal < holder.length) { int count = 0; count = input.read(bytes, 0, holder.length - readTotal); if (count == -1) { throw new ProtocolException(STR); } for (int i=0; i< count; i++) { holde... | /**
* Reads and consumes a number of characters from the underlying reader,
* filling the char array provided.
*
* @param holder A char array which will be filled with chars read from the underlying reader.
* @throws ProtocolException If a char can't be read into each array element.
... | Reads and consumes a number of characters from the underlying reader, filling the char array provided | read | {
"repo_name": "Alfresco/community-edition",
"path": "projects/3rd-party/greenmail/source/java/com/icegreen/greenmail/imap/ImapRequestLineReader.java",
"license": "lgpl-3.0",
"size": 8516
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 882,662 |
public static Duration getAcrescimoPercentualTabelasPercentuais(Duration horas, Double percentual) {
if (horas != null && percentual != null) {
if (horas.toMillis() > 0) {
percentual = (percentual / 10000) + 1;
return Duration.ofMillis(new BigDecimal(horas.toMilli... | static Duration function(Duration horas, Double percentual) { if (horas != null && percentual != null) { if (horas.toMillis() > 0) { percentual = (percentual / 10000) + 1; return Duration.ofMillis(new BigDecimal(horas.toMillis()).multiply(new BigDecimal(percentual)).longValue()); } else { return Duration.ZERO; } } retu... | /**
* Retorna formato PT1H8M34.285S em duration
*
* @param horas
* @param percentual
* @return
*/ | Retorna formato PT1H8M34.285S em duration | getAcrescimoPercentualTabelasPercentuais | {
"repo_name": "julianoezequiel/simple-serve",
"path": "ex/src/main/java/com/topdata/toppontoweb/services/gerafrequencia/utils/Utils.java",
"license": "gpl-3.0",
"size": 21528
} | [
"java.math.BigDecimal",
"java.time.Duration"
] | import java.math.BigDecimal; import java.time.Duration; | import java.math.*; import java.time.*; | [
"java.math",
"java.time"
] | java.math; java.time; | 1,110,587 |
if (list.length == 0) {
multiLines = EMPTY_INT_ARRAY;
}
else {
multiLines = new int[list.length];
System.arraycopy(list, 0, multiLines, 0, list.length);
Arrays.sort(multiLines);
}
} | if (list.length == 0) { multiLines = EMPTY_INT_ARRAY; } else { multiLines = new int[list.length]; System.arraycopy(list, 0, multiLines, 0, list.length); Arrays.sort(multiLines); } } | /**
* Set the lines numbers to repeat in the header check.
* @param list comma separated list of line numbers to repeat in header.
*/ | Set the lines numbers to repeat in the header check | setMultiLines | {
"repo_name": "baratali/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/header/RegexpHeaderCheck.java",
"license": "lgpl-2.1",
"size": 6633
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 21,579 |
public final short readTTFShort() throws IOException {
final int ret = (readTTFUByte() << 8) + readTTFUByte();
final short sret = (short) ret;
return sret;
} | final short function() throws IOException { final int ret = (readTTFUByte() << 8) + readTTFUByte(); final short sret = (short) ret; return sret; } | /**
* Read 2 bytes signed.
* <p/>
*
* @return One signed short
* <p/>
*
* @throws IOException If EOF is reached
*/ | Read 2 bytes signed. | readTTFShort | {
"repo_name": "emabrey/SleekSlick2D",
"path": "slick-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/FontFileReader.java",
"license": "bsd-3-clause",
"size": 10924
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 29,234 |
@Nullable
public static Drawable tint( @Nullable final Drawable drawable, @ColorInt final int color ) {
if( drawable == null ) {
return null;
}
final Drawable tinted = drawable.mutate();
tinted.setColorFilter( new PorterDuffColorFilter( color, PorterDuff.Mode.SRC_IN ... | static Drawable function( @Nullable final Drawable drawable, @ColorInt final int color ) { if( drawable == null ) { return null; } final Drawable tinted = drawable.mutate(); tinted.setColorFilter( new PorterDuffColorFilter( color, PorterDuff.Mode.SRC_IN ) ); return tinted; } | /**
* Tint the drawable with the given color.
* Do nothing when drawable is null.
*
* @param drawable which are tinted
* @param color of tint
*/ | Tint the drawable with the given color. Do nothing when drawable is null | tint | {
"repo_name": "felixWackernagel/sidekick",
"path": "sidekick/src/main/java/de/wackernagel/android/sidekick/utils/TintUtils.java",
"license": "apache-2.0",
"size": 3084
} | [
"android.graphics.PorterDuff",
"android.graphics.PorterDuffColorFilter",
"android.graphics.drawable.Drawable",
"android.support.annotation.ColorInt",
"android.support.annotation.Nullable"
] | import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.Drawable; import android.support.annotation.ColorInt; import android.support.annotation.Nullable; | import android.graphics.*; import android.graphics.drawable.*; import android.support.annotation.*; | [
"android.graphics",
"android.support"
] | android.graphics; android.support; | 1,172,832 |
protected synchronized void buildGoogleApiClient() {
Log.d("Confirmjava", "we made it");
m_googleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(LocationServices.API)
... | synchronized void function() { Log.d(STR, STR); m_googleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); m_googleApiClient.connect(); } | /**
* Used for last known locations, build the api client to use location
* services
*/ | Used for last known locations, build the api client to use location services | buildGoogleApiClient | {
"repo_name": "FahadSyed/LogIt",
"path": "app/src/main/java/com/fahadalisyed/logit/Home/Confirm.java",
"license": "gpl-2.0",
"size": 15789
} | [
"android.util.Log",
"com.google.android.gms.common.api.GoogleApiClient",
"com.google.android.gms.location.LocationServices"
] | import android.util.Log; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.location.LocationServices; | import android.util.*; import com.google.android.gms.common.api.*; import com.google.android.gms.location.*; | [
"android.util",
"com.google.android"
] | android.util; com.google.android; | 1,322,330 |
@Test
public void warnMessageAndExceptionWithLoggerClassName() {
RuntimeException exception = new RuntimeException();
logger.warn(TinylogLoggerTest.class.getName(), "Boom!", exception);
if (warnEnabled) {
verify(provider).log(TinylogLoggerTest.class.getName(), null, Level.WARN, exception, null, "Boom!", ... | void function() { RuntimeException exception = new RuntimeException(); logger.warn(TinylogLoggerTest.class.getName(), "Boom!", exception); if (warnEnabled) { verify(provider).log(TinylogLoggerTest.class.getName(), null, Level.WARN, exception, null, "Boom!", (Object[]) null); } else { verify(provider, never()).log(anyIn... | /**
* Verifies that a message with exception will be logged correctly with a passed logger class name at
* {@link Level#WARN WARN} level.
*/ | Verifies that a message with exception will be logged correctly with a passed logger class name at <code>Level#WARN WARN</code> level | warnMessageAndExceptionWithLoggerClassName | {
"repo_name": "pmwmedia/tinylog",
"path": "jboss-tinylog/src/test/java/org/tinylog/jboss/TinylogLoggerTest.java",
"license": "apache-2.0",
"size": 189291
} | [
"org.mockito.ArgumentMatchers",
"org.mockito.Mockito",
"org.tinylog.Level"
] | import org.mockito.ArgumentMatchers; import org.mockito.Mockito; import org.tinylog.Level; | import org.mockito.*; import org.tinylog.*; | [
"org.mockito",
"org.tinylog"
] | org.mockito; org.tinylog; | 1,061,185 |
private Optional<PolicyAbstractedState> findSibling(
BooleanFormula extraPredicate,
Collection<AbstractState> pSiblings) {
if (pSiblings.isEmpty()) {
return Optional.absent();
}
PolicyAbstractedState out = null;
boolean found = false;
for (AbstractState sibling : pSiblings) {
... | Optional<PolicyAbstractedState> function( BooleanFormula extraPredicate, Collection<AbstractState> pSiblings) { if (pSiblings.isEmpty()) { return Optional.absent(); } PolicyAbstractedState out = null; boolean found = false; for (AbstractState sibling : pSiblings) { out = AbstractStates.extractStateByType(sibling, Polic... | /**
* Find the PolicyAbstractedState sibling: something about-to-be-merged
* with the argument state, and that has the same partitioning predicate.
*/ | Find the PolicyAbstractedState sibling: something about-to-be-merged with the argument state, and that has the same partitioning predicate | findSibling | {
"repo_name": "nishanttotla/predator",
"path": "cpachecker/src/org/sosy_lab/cpachecker/cpa/policyiteration/PolicyIterationManager.java",
"license": "gpl-3.0",
"size": 39811
} | [
"com.google.common.base.Optional",
"java.util.Collection",
"org.sosy_lab.cpachecker.core.interfaces.AbstractState",
"org.sosy_lab.cpachecker.util.AbstractStates",
"org.sosy_lab.cpachecker.util.predicates.interfaces.BooleanFormula"
] | import com.google.common.base.Optional; import java.util.Collection; import org.sosy_lab.cpachecker.core.interfaces.AbstractState; import org.sosy_lab.cpachecker.util.AbstractStates; import org.sosy_lab.cpachecker.util.predicates.interfaces.BooleanFormula; | import com.google.common.base.*; import java.util.*; import org.sosy_lab.cpachecker.core.interfaces.*; import org.sosy_lab.cpachecker.util.*; import org.sosy_lab.cpachecker.util.predicates.interfaces.*; | [
"com.google.common",
"java.util",
"org.sosy_lab.cpachecker"
] | com.google.common; java.util; org.sosy_lab.cpachecker; | 2,567,016 |
// raw results returned by the searchers
ArrayList<Result> rawResults = new ArrayList<Result>();
HashSet<String> found = new HashSet<String>();
// HashMap<String, Result> resultsByTriplets = new HashMap<String, Result>();
for (Result r : results) {
if (r.getScore() != Float.NEGATIVE_INFINITY) {
St... | ArrayList<Result> rawResults = new ArrayList<Result>(); HashSet<String> found = new HashSet<String>(); for (Result r : results) { if (r.getScore() != Float.NEGATIVE_INFINITY) { String stemmedQuestion = SnowballStemmer.stemAllTokens(r.getQuery().getAnalyzedQuestion().getQuestion()); String text = r.getAnswer(); if (!tex... | /**
* Increments the score of each result snippet according to the number of
* NP-VP-NP triplets it is the first to contain. This is meant to prefer
* snippets that provide new information over those that repeat information
* from previous snippets.
*
* @param results array of <code>Result</code> objects
... | Increments the score of each result snippet according to the number of NP-VP-NP triplets it is the first to contain. This is meant to prefer snippets that provide new information over those that repeat information from previous snippets | apply | {
"repo_name": "bogdartysh/openqa",
"path": "src/main/java/info/ephyra/answerselection/filters/TripletFilter.java",
"license": "gpl-3.0",
"size": 4220
} | [
"info.ephyra.nlp.OpenNLP",
"info.ephyra.nlp.SnowballStemmer",
"info.ephyra.search.Result",
"info.ephyra.util.StringUtils",
"java.util.ArrayList",
"java.util.HashSet"
] | import info.ephyra.nlp.OpenNLP; import info.ephyra.nlp.SnowballStemmer; import info.ephyra.search.Result; import info.ephyra.util.StringUtils; import java.util.ArrayList; import java.util.HashSet; | import info.ephyra.nlp.*; import info.ephyra.search.*; import info.ephyra.util.*; import java.util.*; | [
"info.ephyra.nlp",
"info.ephyra.search",
"info.ephyra.util",
"java.util"
] | info.ephyra.nlp; info.ephyra.search; info.ephyra.util; java.util; | 160,788 |
private void cleanData(DbTestInterface testInterface) {
testInterface.removeDbFile();
sendMessage(Constants.RECEIVE_STATUS_MSG, "Cleaned database file");
} | void function(DbTestInterface testInterface) { testInterface.removeDbFile(); sendMessage(Constants.RECEIVE_STATUS_MSG, STR); } | /**
* Method to clean the database file after testing is over
* @param testInterface the database instance to test
*/ | Method to clean the database file after testing is over | cleanData | {
"repo_name": "koustuvsinha/benchmarker",
"path": "app/src/main/java/com/koustuvsinha/benchmarker/services/DbTestRunnerService.java",
"license": "mit",
"size": 10336
} | [
"com.koustuvsinha.benchmarker.databases.DbTestInterface",
"com.koustuvsinha.benchmarker.utils.Constants"
] | import com.koustuvsinha.benchmarker.databases.DbTestInterface; import com.koustuvsinha.benchmarker.utils.Constants; | import com.koustuvsinha.benchmarker.databases.*; import com.koustuvsinha.benchmarker.utils.*; | [
"com.koustuvsinha.benchmarker"
] | com.koustuvsinha.benchmarker; | 2,719,706 |
public void testMoveFileSourceMissing() throws Exception {
create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE));
create(igfs, paths(DIR_NEW, SUBDIR_NEW), paths(FILE));
igfs.rename(FILE, SUBDIR_NEW);
checkExist(igfs, DIR, SUBDIR);
checkExist(igfs, igfs... | void function() throws Exception { create(igfsSecondary, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); create(igfs, paths(DIR_NEW, SUBDIR_NEW), paths(FILE)); igfs.rename(FILE, SUBDIR_NEW); checkExist(igfs, DIR, SUBDIR); checkExist(igfs, igfsSecondary, new IgfsPath(SUBDIR_NEW, FILE.name())); checkNotExist(igfs,... | /**
* Test move in case source doesn't exist and the path being renamed is a file.
*
* @throws Exception If failed.
*/ | Test move in case source doesn't exist and the path being renamed is a file | testMoveFileSourceMissing | {
"repo_name": "DoudTechData/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java",
"license": "apache-2.0",
"size": 58200
} | [
"org.apache.ignite.igfs.IgfsPath"
] | import org.apache.ignite.igfs.IgfsPath; | import org.apache.ignite.igfs.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,139,919 |
public final boolean loadOnlineLoadGameFragment() {
if (isGooglePlayReady(true, true)) {
loadFragment(OnlineLoadGameFragment.TAG);
//startActivityForResult(Games.TurnBasedMultiplayer.getInboxIntent(GooglePlay.getInstance().getApiClient()), RC_LOOK_AT_MATCHES);
return true... | final boolean function() { if (isGooglePlayReady(true, true)) { loadFragment(OnlineLoadGameFragment.TAG); return true; } return false; } | /**
* Loads the online load game fragment into the main view
*/ | Loads the online load game fragment into the main view | loadOnlineLoadGameFragment | {
"repo_name": "morris-james/googleplaylibrary",
"path": "src/main/java/com/jamesmorrisstudios/googleplaylibrary/activities/GooglePlayActivity.java",
"license": "apache-2.0",
"size": 40467
} | [
"com.jamesmorrisstudios.googleplaylibrary.fragments.OnlineLoadGameFragment"
] | import com.jamesmorrisstudios.googleplaylibrary.fragments.OnlineLoadGameFragment; | import com.jamesmorrisstudios.googleplaylibrary.fragments.*; | [
"com.jamesmorrisstudios.googleplaylibrary"
] | com.jamesmorrisstudios.googleplaylibrary; | 2,132,508 |
public void removeAll(String key, Collection<?> values) {
checkKeyIsMutable(key);
ParseRemoveOperation operation = new ParseRemoveOperation(values);
performOperation(key, operation);
} | void function(String key, Collection<?> values) { checkKeyIsMutable(key); ParseRemoveOperation operation = new ParseRemoveOperation(values); performOperation(key, operation); } | /**
* Atomically removes all instances of the objects contained in a {@code Collection} from the
* array associated with a given key. To maintain consistency with the Java Collection API, there
* is no method removing all instances of a single object. Instead, you can call
* {@code parseObject.removeAll(key... | Atomically removes all instances of the objects contained in a Collection from the array associated with a given key. To maintain consistency with the Java Collection API, there is no method removing all instances of a single object. Instead, you can call parseObject.removeAll(key, Arrays.asList(value)) | removeAll | {
"repo_name": "Milstein/Parse-SDK-Android",
"path": "Parse/src/main/java/com/parse/ParseObject.java",
"license": "bsd-3-clause",
"size": 150347
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,740,467 |
public ArrayNode arrayAt(String path) throws WorkflowException {
JsonPointer ptr = JsonPointer.compile(path);
return arrayAt(ptr);
} | ArrayNode function(String path) throws WorkflowException { JsonPointer ptr = JsonPointer.compile(path); return arrayAt(ptr); } | /**
* Gets json node on specific path as ArrayNode.
* @param path path of json node
* @return ArrayNode type json node on specific path
* @throws WorkflowException workflow exception
*/ | Gets json node on specific path as ArrayNode | arrayAt | {
"repo_name": "kuujo/onos",
"path": "apps/workflow/api/src/main/java/org/onosproject/workflow/api/JsonDataModelTree.java",
"license": "apache-2.0",
"size": 11029
} | [
"com.fasterxml.jackson.core.JsonPointer",
"com.fasterxml.jackson.databind.node.ArrayNode"
] | import com.fasterxml.jackson.core.JsonPointer; import com.fasterxml.jackson.databind.node.ArrayNode; | import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.node.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,089,946 |
@JsonProperty("aws_ec2_instance_state_name")
public void setAwsEc2InstanceStateName( String awsEc2InstanceStateName ) { this.awsEc2InstanceStateName = awsEc2InstanceStateName; } | @JsonProperty(STR) public void setAwsEc2InstanceStateName( String awsEc2InstanceStateName ) { this.awsEc2InstanceStateName = awsEc2InstanceStateName; } | /**
* Gets aws ec 2 instance state name.
*
* @return the aws ec 2 instance state name
*/ | Gets aws ec 2 instance state name | getAwsEc2InstanceStateName | {
"repo_name": "tenable/Tenable.io-SDK-for-Java",
"path": "src/main/java/com/tenable/io/api/assetImport/models/AssetImport.java",
"license": "mit",
"size": 9399
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 705,908 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.