query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
/ Pack from CubeState | public void pack(CubeState cube){
edge.pack(cube.edges);
center.pack(cube.centers);
} | [
"@Override\n public void pack() {\n }",
"public CubeState(){\n ep = new PermutationGroup(12);\n cp = new PermutationGroup(8);\n eo = new EdgeOrientation();\n co = new CubieOrientation();\n }",
"StatePac build();",
"com.google.protobuf.ByteString getStateData();",
"public Sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the x offset. | public int getxOffset() {
return xOffset;
} | [
"public double getXOffset() {\n return getOffset(\"x\");\n }",
"public final int getXOffset() {\n return xOffset;\n }",
"public double getxOffset() {\n return currentXOffset + xOffset;\n }",
"public int getXOffset();",
"Integer getXOFFSET();",
"public Integer getXOffset() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column ex_examinfo.passscore | public Float getPassscore() {
return passscore;
} | [
"public Integer getCoursePassScore() {\n\t\treturn coursePassScore;\n\t}",
"public Integer getCoursePassScoreIncludeExam() {\n\t\treturn coursePassScoreIncludeExam;\n\t}",
"public void setPassscore(Float passscore) {\n this.passscore = passscore;\n }",
"public double toolScore()\n {\n Doub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub apkDlMgr.ResDownloadStop( CoolDLResType.RES_TYPE_APK , LongClickListenerDownloadItem.getPackageName() ); | @Override
public void onClick(View arg0) {
MeapkDlMgr.StopDownload(
MeApkDLShowType.DownloadManagerActivity,
LongClickListenerDownloadItem
.getPackageName());
// try
// {
// JSClass.JSClass.invokeJSMethod( "reloadDownstate"
// , LongClickListenerDown... | [
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tMeapkDlMgr.DelDownload(\n\t\t\t\t\t\t\t\tMeApkDLShowType.DownloadManagerActivity,\n\t\t\t\t\t\t\t\tLongClickListenerInstallItem.getPackageName());\n\t\t\t\t\t\tLongClickListenerDialog.cancel();\n\t\t\t\t\t\t// try\n\t\t\t\t\t\t// {\n\t\t\t\t\t\t// JSC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
removes any fish that have been eaten by that player from this list of background fish | ILoBgFish removeEaten(Player p, ILoBgFish acc); | [
"public void removeAttachedFish(){\n\t\tattachedFish.clear();\n\t}",
"private void removePlayers(PokerGame game){\n\t\tfor(int k = 0; k < activePlayers.size(); k++){\n\t\t\tif (activePlayers.get(k).playerFolded()) {\n\t\t\t\tactivePlayers.remove(activePlayers.get(k));\n\t\t\t}\n\t\t}\n\n\t}",
"private void elim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate the correct array size based on a mass range | public int calcArraySize(Double binSize, Double minMass, Double maxMass)
{
return (int)((maxMass - minMass)/binSize)+1;
} | [
"public abstract long[] GetApproximateSizes(Range[] range, int n) throws IOException, DecodeFailedException, BadFormatException;",
"int calculateCapacity(int[] vesselArray);",
"private double CalculateDesiredSize( \r\n DefinitionBase[] definitions)\r\n {\r\n double desiredSize = 0;\r\n\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Sum'. | Sum createSum(); | [
"com.proto.calculator.Sum getSum();",
"private static Suma creaObjetoSuma (){\n Suma suma = new Suma(4,6);\n return suma; \n }",
"double getSum();",
"public void makeSum() {\n\t\tsetSum(kor + eng + math);\r\n\t}",
"com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum getSum()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Looks in the DataMap's that this object was created with for the DbEntity that services the specified data Object | public synchronized DbEntity lookupDbEntity(DataObject dataObject) {
return this._lookupDbEntity(dataObject.getClass());
} | [
"public synchronized ObjEntity lookupObjEntity(DataObject dataObject) {\n return this._lookupObjEntity(dataObject.getClass());\n }",
"public interface DbDataObjectService {\n\n /**\n * Save a dbDataObject.\n *\n * @param dbDataObject the entity to save\n * @return the persisted entity... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
View for listing and editing project's properties. | public interface ProjectPropertiesView extends View<ProjectPropertiesView.ActionDelegate> {
public interface ActionDelegate {
/** Performs any actions appropriate in response to the user having pressed the Add button. */
void onAddClicked();
/** Performs any actions appropriate... | [
"public interface ProjectProperties\n{\n // CONSTANTS\n\n /** The name of the project. */\n public static final String PROPERTY_NAME = \"name\";\n /** The filename of the project. */\n public static final String PROPERTY_FILENAME = \"filename\";\n /** The 'change' flag of the project. */\n public static fina... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the correct channels for all of the gardener/grove management. Definitely not the best way to do this stuff, but fuck it. We are almost out of time. | static void groveChannels() {
switch (myParent) {
case 1:
CHANNEL_GARDENER_COUNT = Channels.GARDENER1_COUNT;
CHANNEL_GROVE_COUNT = Channels.GROVE1_COUNT;
CHANNEL_GROVE_LOCATIONS = Channels.GROVE1_LOCATIONS;
CHANNEL_GROVE_ASSIGNED = Channels.GROVE1_ASSIGNED;
CHANNEL_GROVE_X = Channels.GROVE1_X;
... | [
"@Override\n public Collection<Channel> getChannels() { \n return channels.values();\n }",
"abstract public String[] getChannels();",
"public Channel[] getChannels();",
"public List<ImageChannel> getChannels()\n {\n return Collections.unmodifiableList(channels);\n }",
"public Ch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the number of samples to be used when calculating the smooth line. | public void setSamples(int samples){
this.samples = samples;
} | [
"public void setSampleSize(int value) {\n this.sampleSize = value;\n }",
"public void setSampleSize(int n){\n\t\tsetParameters(populationSize, type1Size, n);\n\t}",
"public void setSampleSize(Integer sampleSize) {\n this.sampleSize = sampleSize;\n }",
"public void setSamples(int samples)\n {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
writes file with patterns for new relations. | public static void buildRelationPatternFile() throws IOException {
String fileName = dataDirectory +
props.getProperty("Ace.RelationModel.fileName");
buildRelationPatternFileFromNames(fileName, new ArrayList<String>(Ice.relations.keySet()));
} | [
"public void writeToFile() {\n fileName = \"edited_File\" + (++count) + \".txt\";\n\n try {\n FileWriter myWriter = new FileWriter(fileName);\n //Writing the new edited graph\n myWriter.write(solver.n + \"\\n\");\n\n //Getting the number of positive edges, t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
change the work force's focus in a city, i.e. what kind of production there will be emphasis on in the city. Precondition: there is a city at location 'p'. | public void changeWorkForceFocusInCityAt(Position p, String balance); | [
"public void changeProductionInCityAt(Position p, String unitType);",
"public void setCity(com.flexnet.operations.webservices.SimpleQueryType city) {\n this.city = city;\n }",
"public void setCityField(String city) {\n WebElement cF = this.getCityField();\n cF.clear();\n cF.sendKe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets classe by key from the session element. | SessionElementClass getClassByKey(int classKey); | [
"<T> T getSessionAttribute( String key );",
"public Object getObjFromSession(String key)\n\t{\n\t\treturn context.getSession().get(key);\n\t}",
"SessionElementClass findClass(int classKey)\n throws NotFoundException;",
"public Object retrieveFromSession(String key) {\n HttpSession session = requ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set update udf function class name. | public void setUpdaterFuncClass(String updaterFuncClass) {
this.updaterFuncClass = updaterFuncClass;
} | [
"public String getUpdaterFuncClass() {\n return updaterFuncClass;\n }",
"public void setFunctionClass(String functionClass) {\n this.functionClass = functionClass == null ? null : functionClass.trim();\n }",
"public String getUDFClassName() {\n return functionClz.getName();\n }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the selected thresholds. | public void setThresholds(StoplightThresholdModel tr)
{
slider.setValueAt(toSlider(tr.getYellowMin()), 0);
slider.setValueAt(toSlider(tr.getGreenMin()), 1);
if (upperThresholds)
{
slider.setValueAt(toSlider(tr.getGreenMax()), 2);
slider.setValueAt(toSlider(tr.getY... | [
"public void setThresholds(Threshold... newThresholds) {\n\t\t// checks if arguments are consistent\n\t\tif (ArrayUtil.isNotEmpty(newThresholds)) {\n\t\t\t// clears existing thresholds\n\t\t\tthresholds.clear();\n\t\t\t// adds all new ones\n\t\t\tthresholds.addAll(Arrays.asList(newThresholds));\n\t\t\t// checks the... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a reader builder for GoodsItemItinerary. | @Nonnull public static UBL23ReaderBuilder<GoodsItemItineraryType> goodsItemItinerary(){return UBL23ReaderBuilder.create(GoodsItemItineraryType.class);} | [
"@Nonnull\n public static UBL23WriterBuilder <GoodsItemItineraryType> goodsItemItinerary ()\n {\n return UBL23WriterBuilder.create (GoodsItemItineraryType.class);\n }",
"@Nonnull\n public static UBL22ValidatorBuilder <GoodsItemItineraryType> goodsItemItinerary ()\n {\n return UBL22ValidatorBuilder.crea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update all current batches set. | public Set<Batch> updateAllCurrentBatches(Set<Batch> batches) {
return batches;
} | [
"public void updateBatch() {\r\n\t\tthis.processVertex();\r\n\t\tthis.processNormal(false);\r\n\t\tthis.triangleBatch.updateModelBound();\r\n\t}",
"void flushAll() {\n dirtyS = true;\n dirtyD = true;\n modelRoot.incrementNumberOfDirtySNodes();\n modelRoot.incrementNumberOfDirtyDNodes()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the Kafka container | Container createContainer(ImagePullPolicy imagePullPolicy, KafkaPool pool) {
return ContainerUtils.createContainer(
KAFKA_NAME,
image,
List.of("/opt/kafka/kafka_run.sh"),
securityProvider.kafkaContainerSecurityContext(new ContainerSecurityProviderC... | [
"@ApplicationScoped\n @Produces\n public KafkaConsumer<MessageKey, MessageValue> createKafkaConsumer() {\n Properties props = (Properties) consumerProperties.clone();\n\n props.putIfAbsent(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);\n props.putIfAbsent(ConsumerConfig.GROUP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an asynchronous unit from the given one, converting the error using the given converter. | public <TError2 extends Exception> Async(IAsync<TError2> toConvert, Function<TError2, TError> errorConverter) {
toConvert.onDone(this, errorConverter);
} | [
"Unit createUnit();",
"public abstract UnitConverter toStandardUnit();",
"PointerByReference rs2_create_units_transform(PointerByReference error);",
"public interface UnitConverter {\r\n\r\n\tNumber convert(Number value, String unit);\r\n\r\n}",
"public Converter\r\n getConverterTo(Unit outputUnit)\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draw the bottom line. | private void drawBottomLine(Canvas canvas)
{
if (m_isShowBottomLine)
{
m_linePaint.setColor(Color.WHITE);
m_linePaint.setStrokeWidth(2);
canvas.drawLine(0, m_layout_height-2, m_layout_width, m_layout_height - 2, m_linePaint);
}
} | [
"public synchronized void drawLineBottom(int xStart, int xEnd)\r\n\t{\r\n\t\treferenceImage.drawLineBottom(xStart, xEnd);\r\n\t\tfinal int startX = transformXStart(xStart);\r\n\t\tfinal int endX = transformXEnd(xEnd);\r\n\t\tdisplayedImage.drawLineBottom(startX, endX);\r\n\t}",
"private void addBottomLine() { //O... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the status name. | public void setStatusName(String statusName) {
this.statusName = statusName;
} | [
"public void setStatusName(String statusName);",
"public void setStatusName(String statusName) {\r\n\t\tthis.statusName = statusName;\r\n\t}",
"@Override\n\tpublic void setStatusName(java.lang.String statusName) {\n\t\t_dmGtStatus.setStatusName(statusName);\n\t}",
"public void setStateName(String value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Grouping of VirtualMachineScaleSetVM update stages. | interface UpdateStages {
/**
* The stage of the virtualmachinescalesetvm update allowing to specify AvailabilitySet.
*/
interface WithAvailabilitySet {
/**
* Specifies availabilitySet.
*/
Update withAvailabilitySet(SubResource availabil... | [
"interface UpdateStages {\n /** The stage of the virtual machine data disk update allowing to set the disk size. */\n interface WithDiskSize {\n /**\n * Specifies the new size in GB for data disk.\n *\n * @param sizeInGB the disk size in GB\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use LogRecord.newBuilder() to construct. | private LogRecord(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"public Log4JLogRecord() {\n }",
"public ZLogRecord() {\n super(ZLog.Z_LOG);\n }",
"public OrderLogRecord() {\n super(OrderLog.ORDER_LOG);\n }",
"private LogLine(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknow... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "Print" $ANTLR start "Assert" | public final void mAssert() throws RecognitionException {
try {
int _type = Assert;
int _channel = DEFAULT_TOKEN_CHANNEL;
// src/grammar/TL.g:192:10: ( 'assert' )
// src/grammar/TL.g:192:12: 'assert'
{
match("assert");
}
... | [
"public final void mASSERT() throws RecognitionException {\n try {\n int _type = ASSERT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /media/DEVELOP/wcl/software/salsa2/src/salsa/compiler2/Salsa.g:74:8: ( 'assert' )\n // /media/DEVELOP/wcl/software/salsa2/src/salsa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
click on my orders | public void myorders() {
driver.findElement(orders).click();
} | [
"public void clickAdminMenuOrders() {\n try {\n this.webDriverWait.until(ExpectedConditions.visibilityOf(adminMenuOrders));\n adminMenuOrders.click();\n System.out.println(adminMenuOrders + \" was clicked\");\n\n } catch (Exception e) {\n System.out.println(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the visibility of the given features. | public void updateVisibility(Collection<? extends KMLFeature> features)
{
for (KMLFeature feature : features)
{
setVisibility(feature, KMLMantleUtilities.isFeatureVisible(feature));
}
} | [
"void updateFeatureVisibility(Collection<? extends KMLFeature> features);",
"protected abstract void setVisibility(KMLFeature feature, boolean isVisible);",
"public void setEnabledFeatures(@Feature int... features) {\n update(combine(features));\n }",
"public void enable(@Feature int... features) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(asynchronously) Gets a list Team Keys that competed in the given year, paginated in groups of 500. | public okhttp3.Call getTeamsByYearKeysAsync(Integer year, Integer pageNum, String ifModifiedSince, final ApiCallback<List<String>> _callback) throws ApiException {
okhttp3.Call localVarCall = getTeamsByYearKeysValidateBeforeCall(year, pageNum, ifModifiedSince, _callback);
Type localVarReturnType = new ... | [
"public JsonArray pagedKeys(Url url);",
"public ArrayList<Song> searchByYear(Integer year) \r\n {\r\n return musicLibraryYearKey.get(year);\r\n \r\n }",
"public void findTeamsByYear() {\r\n\t\t\r\n\t\tString input = JOptionPane.showInputDialog(this, \"Enter a year to consult\",\r\n\t\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field cloudException is set (has been assigned a value) and false otherwise | public boolean isSetCloudException() {
return this.cloudException != null;
} | [
"public boolean hasException() {\n return fieldSetFlags()[3];\n }",
"public boolean isSetExceptionOccurred() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXCEPTIONOCCURRED_ISSET_ID);\n }",
"public boolean isSetSystemException() {\n return this.systemException != nu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return new Select().from(SwitchButton.class).where("is_on = ?", true ).where("id =?", roomId ).execute(); return new Select().from(SwitchButton.class).where("is_on = ? AND RoomId = ?", boardId).execute(); | List<SwitchButton> getAllButtonFromBoardId(Long boardId )
{
return new Select().from(SwitchButton.class).where("SwitchBoardId = ?", boardId).execute();
} | [
"private List<SwitchButton> getAllButtonOfRoom(Long roomId)\n {\n return new Select().from( SwitchButton.class ).where(\"RoomId = ?\", roomId ).orderBy(\"id ASC\").execute() ;\n\n // return data in random order\n// return new Select().from(Rooms.class).orderBy(\"RANDOM()\") .execute();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the company contains a staff member with the given name, false otherwise | public boolean containsStaffMemberWithName(String _staffMemberName) {
for (Manager manager : managers) {
if (manager.getName().equals(_staffMemberName)) {
return true;
}
}
for (Employee employee : employees) {
if (employee.getName().equals(_staffMemberName)) {
return true;
}
}
return false... | [
"public boolean isStaff() {\n return affiliations.contains(UserIdentity.AFFLIATION_STAFF) && !isStudent();\n }",
"public boolean checkStaffInfo() {\n\t\tString param[] = new String[2];\n\n\t\tparam[0] = firstName.getText();\n\t\tparam[1] = lastName.getText();\n\t\t//Checking characters from [0] to [2]\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
_____ADDING another PVector calcGravForce function specifically for the mouse controlled mouse | public PVector calcGravForceMouse (Lover love) {
// -----MOUSE CONTROL-------
PVector mouse = new PVector(mouseX, mouseY);
PVector force = PVector.sub(mouse,love.getLoc()); // get distance and magnitude PVector then
// regular center located mass
//PVector force = PVector.sub(loc,love.getLoc()); ... | [
"public PVector calcGravForceMouse (ShiffmanShip ship) {\n // -----MOUSE CONTROL-------\n PVector mouse = new PVector(mouseX, mouseY);\n PVector force = PVector.sub(mouse,ship.getLoc()); // get distance and magnitude PVector then \n // regular center located mass\n //PVector force = PVector.sub(loc,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the target value. (last column) Constructor to create a new record. All records will be the same length in a data set. | public Record(int numFeatures){
recordRow = new int[numFeatures]; //New empty array
} | [
"public Record create()\n { return create(new byte[keyLength], \n (valueLength > 0) ? new byte[valueLength] : null) ;\n }",
"public DataRecord() {\n super(DataTable.DATA);\n }",
"public T_3571Record() {\n\t\tsuper(org.jooq.test.h2.generatedclasses.tables.T_3571.T_3571);\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the feeType value for this BillerInfo. | public com.mgipaypal.ac1211.client.FeeType getFeeType() {
return feeType;
} | [
"public String getFeeType() {\n return feeType;\n }",
"public String getFee_type() {\r\n\t\treturn fee_type;\r\n\t}",
"@Schema(description = \"The type of fee. For more information about Selling on Amazon fees, see [Selling on Amazon Fee Schedule](https://sellercentral.amazon.com/gp/help/200336920) on... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines if an infix token sequence is valid by examining the current token and the last token | private static boolean checkValidTokenSequence(String curToken, String lastToken){
//If an operand or right bracket comes directly before an operand return false
if(curToken.equals("operand") && (lastToken.equals("operand") || lastToken.equals("right bracket"))){
return false;
}
//If an operator or left brac... | [
"private boolean isValid() {\n\t\tif(isBalanced() == false) return false;\n\t\tif(infix.contains(\")(\")) return false;\n\t\t\n\t\tint pos = 1;\n\t\tboolean lastOp = false;\n\t\tboolean lastNum = false;\n\t\tboolean space = false;\n\t\twhile(pos < infix.length()) {\n\t\t\tif(infix.charAt(pos) != ' ') {\n\t\t\t\tif(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Archers' cannot move while fortified (performing action) | @Test
void ArchersCannotMoveWhileFortified() {
Position archerPosition = new Position(2, 0);
game.performUnitActionAt(archerPosition);
Position moveToPosition = new Position(3, 0);
// Should not be able to move archer after performing its action
assertThat(game.moveUnit(arche... | [
"@Test\n void ArcherRemovesFortificationIfAlreadyFortifiedWhenPerformingAction() {\n Position position = new Position(2, 0);\n Unit archer = game.getUnitAt(position);\n // Perform action - fortify\n game.performUnitActionAt(position);\n // Skip other player\n game.endOfT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the cod distrito of this carga tienda. | public void setCodDistrito(String codDistrito); | [
"public void setSistema(int cod) {\n }",
"public void setCodProduto(int value) {\n this.codProduto = value;\n }",
"public void setNomDistrito(String nomDistrito);",
"public void setComuneNascitaCod(int value) {\r\n this.comuneNascitaCod = value;\r\n }",
"public abstrac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loops through the Individuals and calculates their movement parameters. | public void calculateMovementParameters( CrowdSimulation simState )
{
// loop overal all individuals
for( int i =0; i < individuals.numObjs; i++ )
{
Individual ind = (Individual)individuals.get( i );
Vector2D loc = new Vector2D( simState.getWorld().getObjectLocation( ind ) )... | [
"private void evaluateIndividuals() {\n \n \t\tfor (Individual ind : population) {\n \t\t\tint count = 0;\n \t\t\tfor (int i = 0; i < goal.getSequence().length; i++) {\n \t\t\t\tif (goal.getSequence()[i] == ind.getSequence()[i])\n \t\t\t\t\tcount++;\n \t\t\t}\n \t\t\tind.setValue((double) count / goal.getSequence()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .angel.serving.MultiInferenceRequest request = 1; | public Builder setRequest(com.tencent.angel.serving.apis.prediction.InferenceProtos.MultiInferenceRequest value) {
if (requestBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
request_ = value;
onChanged();
} else {
... | [
"com.tencent.angel.serving.apis.prediction.InferenceProtos.MultiInferenceRequestOrBuilder getRequestOrBuilder();",
"com.tencent.angel.serving.apis.prediction.InferenceProtos.MultiInferenceRequest getRequest();",
"public com.tencent.angel.serving.apis.prediction.InferenceProtos.MultiInferenceRequest getRequest()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if u win, u go and start new round with more hp and more energy | public void roundWin(){
//to say opponent fainted
System.out.println(enemyPoke.getName() + " fainted!");
currentPoke.displayInfo();
System.out.println("\nNext battle start\n");
won = true;
} | [
"private void playNewRound(){\r\n\t\t\r\n\t\t//set up the equipment of the new round\r\n\t\tsetUpRound();\r\n\t\tview.displayDealer(model.getDealerName());\r\n\t\tString firstPlayer = model.getName();\r\n\t\tview.goingFirst(firstPlayer);\r\n\t\t//while no knock, no winning, and no exiting, either human or computer ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the word at the specified index. | public String getWord(int index) {
return lex.get(index);
} | [
"private String getWordAt(int index){\n\t\treturn words.get(index);\n\t}",
"public W getWord(int index);",
"public String wordAt(int index) {\n if (index < 0 || index >= myWords.length) {\n throw new IndexOutOfBoundsException(\"bad index in wordAt \"+index);\n }\n return myWords[... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Pokemon__Group_9__0" $ANTLR start "rule__Pokemon__Group_9__0__Impl" InternalShowdownGrammar.g:1053:1: rule__Pokemon__Group_9__0__Impl : ( 'EVs' ) ; | public final void rule__Pokemon__Group_9__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalShowdownGrammar.g:1057:1: ( ( 'EVs' ) )
// InternalShowdownGrammar.g:1058:1: ( 'EVs' )
{
// InternalShowdownGra... | [
"public final void rule__EV_spec__Group__6() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:7923:1: ( rule__EV_spec__Gro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes the connection parameters to the "conn.properties" file. | void saveServerProperties()
{
try
{
m_serverProps.store(new FileOutputStream(CONN_PROPERTIES_FILE), null);
}
catch(IOException ioe)
{
/**
* If we fail to save the server properties then the user has to
* type the values for the connection parametere... | [
"public void saveConnectionConfiguration(){\n\t\tProperties props = new Properties();\n\t\tif (connectionconfig!=null){\n\t\t\tprops.setProperty(\"server\", connectionconfig.getServer());\n\t\t\tprops.setProperty(\"user\", connectionconfig.getUser());\n\t\t\tprops.setProperty(\"passwd\", connectionconfig.getPasswd(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
moves to the next sprite. | public void next() {
this.sprites[currentAnimatedspriteID].next();
} | [
"public void updateSprite() {\n //move to next frame\n if (this.curSpriteFrame == this.framesPerSprite) {\n if (this.spriteNum+1 < this.sprites.get(this.state).length) {\n this.spriteNum++;\n } else {\n this.spriteNum = 0;\n }\n this.curSpriteFrame = 0;\n }\n this.curSp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column seckill_product.special_price | public Double getSpecialPrice() {
return specialPrice;
} | [
"public void setSpecialPrice(Double specialPrice) {\r\n\t\tthis.specialPrice = specialPrice;\r\n\t}",
"public BigDecimal getRealPrice() {\n return realPrice;\n }",
"public double getBuyPrice(){\n \n //calls superclass method\n return super.getBuyPrice();\n }",
"public double ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve clues String id | public String getClueId() {
return clueId;
} | [
"public Clue getClue(String clue)\n {\n return clues.get(clue);\n }",
"String getIdString();",
"java.lang.String getStringId();",
"java.lang.String getChallengeId();",
"java.lang.String getID();",
"java.lang.String getIdCard();",
"java.lang.String getFromId();",
"java.lang.String getCoins... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create an active object | public static ActiveObject createActiveObject(){
Servant servant=new Servant();
ActivationQueue queue=new ActivationQueue();
SchedulerThread scheduler=new SchedulerThread(queue);
Proxy proxy=new Proxy(scheduler,servant);
scheduler.start();
return proxy;
} | [
"OBJECT createOBJECT();",
"Object createObject();",
"Instance createInstance();",
"Object createFrom(Object parentInstance, String name);",
"private GameObject newObject() {\n\t\t// Create random GameObject\n\t\tint rand = rg.nextInt(4);\n\t\tGameObject object;\n\t\tswitch (rand) {\n\t\tcase 0:\n\t\t\tobjec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the announcesendid property. | public void setANNOUNCESENDID(int value) {
this.announcesendid = value;
} | [
"public Builder setAnnounceID(int value) {\n bitField0_ |= 0x00000002;\n announceID_ = value;\n onChanged();\n return this;\n }",
"public int getANNOUNCESENDID() {\n return announcesendid;\n }",
"public int getAnnounceID() {\n return announceID_;\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor creates a tower object with the type startiing floor and target list specified | public MonkeyTower(MonkeyTowerType type, Floor startingFloor, CopyOnWriteArrayList<Balloon> balloons) {
this.x = startingFloor.getxPos();
this.y = startingFloor.getyPos();
this.width = type.textures[0].getImageWidth();
this.height = type.textures[0].getImageHeight();
// this.target = target;
this.time... | [
"public MonkeyTower(MonkeyTowerType type, Floor startingFloor, CopyOnWriteArrayList<Balloon> balloons, int width,\r\n\t\t\tint height) {\r\n\t\tthis.x = startingFloor.getxPos();\r\n\t\tthis.y = startingFloor.getyPos();\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\t// this.target = target;\r\n\t\tth... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will take a binary number as an argument and will read it's bits and return the corresponding decimal value of that binary number Throws an exception if the array is null or of length 0 | public static int parseBinary(boolean[] num)
{
if(num == null || num.length == 0)
throw new IllegalArgumentException();
int val = 0;
int counter = 0;
for(int i = num.length-1; i >= 0; i--, counter++)
{
val += Math.pow(BASE, counter) * parseBool(num[i]);
}
return val;
} | [
"private int convertBinaryToDecimal(int binaryValueOfBitMap){\r\n\t\r\n\tint decimalValue = 0;\r\n\ttry {\r\n\t\t int num = binaryValueOfBitMap; \r\n\t\t int dec_value = 0; \t\t \r\n\t\t // Initializing base \r\n\t\t // value to 1, i.e 2^0 \r\n\t\t int base = 1; \r\n\t\t \r\n\t\t int te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field parentMessageid is set (has been assigned a value) and false otherwise | public boolean isSetParentMessageid() {
return this.parentMessageid != null;
} | [
"public boolean isSetParent_id() {\n return EncodingUtils.testBit(__isset_bitfield, __PARENT_ID_ISSET_ID);\n }",
"public boolean isSetParentId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);\n }",
"public boolean isSetParentId() {\n return EncodingUtils.te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column news_bean.face_url | public String getFaceUrl() {
return faceUrl;
} | [
"public String getFaceurl() {\n return faceurl;\n }",
"public String getURL()\n throws SQLException\n {\n // Can't generate a URL\n\n return null;\n }",
"public String getUrlFoto() {\r\n\t\treturn urlFoto;\r\n\t}",
"public String getURL() {\n return properties.getPr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the last PokeCenter the player went to | public void setLastPokeCenter(Zone pokeCenterZone)
{
lastPokeCenter = pokeCenterZone;
} | [
"public Zone getLastPokeCenter()\n {\n return lastPokeCenter;\n }",
"public void resetPuck() {\n this.puck.setPosition(new Point(this.center_point));\n }",
"private void setLastTurn(GameState player) {\n lastTurn = player;\n }",
"public void setCurrPoints(int points){\n playe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saves the stream and its query | public long save(TwitterStream stream){
return save(stream, true);
} | [
"public long save(TwitterStream stream, boolean saveQuery){\r\n if(stream == null){\r\n ContentValues vals = new ContentValues();\r\n vals.put(TS_TWEETBATCHSIZE, 30);\r\n return save(TWITTER_STREAM, TS_DOGEOCODE, null, basicConverter(stream, vals));\r\n }\r\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replace axiom a with b in all of MUPS | public void replaceAxiom(OWLAxiom a, OWLAxiom b) {
mupsSet.stream().filter(mups -> mups.contains(a)).forEach(mups -> {
mups.remove(a);
mups.add(b);
});
} | [
"public static Multimap<Attribute, AttributeModifier> overwrite(Multimap<Attribute, AttributeModifier> a, Multimap<Attribute, AttributeModifier> b) {\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n\n ArrayListMultimap<Attribute, AttributeM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
lookup a OrderTypeEnum by an Integer key. | public static OrderTypeEnum fromIntegerCode(Integer key)
{
if (key == null)
{
return null;
}
return fromCode(key.intValue());
} | [
"public static OrderTypeEnum fromCode(int key)\n {\n for (int i = 0; i < ALL.length; i++)\n {\n if (key == ALL[i].getCode())\n {\n return ALL[i];\n }\n }\n // lookup failed\n return null;\n }",
"public static OrderTypeEnum fr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The function returns all the available points policies in our system | public String showPointsPolicies() {
int counter = 1;
StringBuilder policies = new StringBuilder();
for (PointsPolicy policy : pointsPolicies) {
policies.append(counter + ". " + policy.getName() + "\n");
counter++;
}
policies.setLength(policies.length() ... | [
"public ParameterMap getPolicies() {\n return policyParams;\n }",
"public PolicyDTO[] readAllPolicies() throws EntitlementException {\n \n Resource[] resources = null;\n PolicyDTO[] policies = null;\n resources = getAllPolicyResource();\n\n if (resources == null) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add offer details to databases and show in a table | public static void addOffer(Offer offer){
offerList.add(offer);
ServerGuiController.addDetailsToTable(offer);
} | [
"private static void viewCurrentDatabase() \n\t{\n\t\t// Get all the items and put them into a list.\n\t\tList<PetList> allItems = plh.showAllItems();\n\t\t// Use a for loop to print all the items out to the user.\n\t\tfor(PetList singleItem : allItems)\n\t\t{\n\t\t\tSystem.out.println(singleItem.returnPetDetails()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required int32 truckid = 1; | int getTruckid(); | [
"long getTruckId();",
"public int getTruckid() {\n return truckid_;\n }",
"public TcTruck(Integer id) {\r\n this.id_truck = id;\r\n }",
"public void setTruckQuantity(int truckQuantity) \n {\n this.truckQuantity = truckQuantity;\n }",
"public long getTruckId() {\n return t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gdx.app.log(TAG, "touchpad touchDragged"); Gdx.app.log(TAG, "knob percentages: " + _padUI.getTouchpad().getKnobPercentX() + ", " + _padUI.getTouchpad().getKnobPercentX()); / if (_padUI.isUp()) Gdx.app.log(TAG, "touchpad is up"); if (_padUI.isDown()) Gdx.app.log(TAG, "touchpad is down"); if (_padUI.isLeft()) Gdx.app.log... | @Override
public void touchDragged(InputEvent event, float x, float y, int pointer) {
if(_padUI.isLeft()){
_player.sendMessage(Component.MESSAGE.CURRENT_STATE, _json.toJson(Entity.State.WALKING));
_player.sendMessage(Component.MESSAGE.CURRENT_DIRECTION... | [
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n // Initialize drag gesture.\n previousTouchPointPx.set(event.getX(), event.getY());\n return true;\n case MotionEvent.ACTION_MOVE:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the plugin is currently focused. | public boolean isPluginFocused()
{
return PluginFocusMgr.getInstance().getFocusedPlugin() == this;
} | [
"public boolean isFocused();",
"public boolean isFocused() {\n return container.isFocused();\n }",
"public static boolean hasFocus(){\r\n\t\tif(appgc == null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn appgc.hasFocus();\r\n\t}",
"public boolean isFocused(@NotNull Editor editor) {\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Toast.makeText(getApplicationContext(),"wait for client", Toast.LENGTH_SHORT).show(); | @Override
public void run() {
((TextView) findViewById((R.id.txtFrom))).setText("wait for client");
} | [
"@Override\n public void onClick(View v) {\n CustomToast.show(getContext(),\"Service will be available Soon\");\n }",
"private void showSuccessfulSendToast() {\n Toast toast1 = Toast.makeText(getActivity(), \"Sent Request Successfully to \" + recipientUsername, Toast.LE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method returns a boolean value indicating if the Player is dead or not. The Player is considered dead if the number of lives are <= 0. | public boolean isPlayerDead() {
return (lives <= 0);
} | [
"public boolean isDead() {\n if (hp.getHp()<=0){\n \treturn true;\n\t\t}\n\t\treturn false;\n }",
"boolean isDead() {\n if (healthPoint <= 0) {\n return true;\n }\n return false;\n }",
"public boolean dead(){\n\t\treturn (this.health <= 0);\n\t}",
"public bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ExceptionField__Group__1__Impl" $ANTLR start "rule__ExceptionField__Group__2" ../org.waml.w3c.webidl.ui/srcgen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:8480:1: rule__ExceptionField__Group__2 : rule__ExceptionField__Group__2__Impl ; | public final void rule__ExceptionField__Group__2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:8484:1: ( rule__ExceptionField__Group__2__Imp... | [
"public final void rule__ExceptionField__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:8495:1: ( ( ';' ) )\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new active session trigger builder. | @NonNull
public static ActiveSessionTriggerBuilder newActiveSessionTriggerBuilder() {
return new ActiveSessionTriggerBuilder();
} | [
"@NonNull\n public Trigger build() {\n return new Trigger(Trigger.ACTIVE_SESSION, goal, null);\n }",
"@Nonnull\n public static JDK8TriggerBuilder <ITrigger> newTrigger ()\n {\n return new JDK8TriggerBuilder <> ();\n }",
"@NonNull\n public Trigger build() {\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns number of "Curb" element | public int sizeOfCurbArray()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(CURB$10);
}
} | [
"public int getCCount () {\n return corba_handle.getCountC();\n }",
"int getElementCount();",
"public int getCount(byte b) {\n\t\tNode desiredNode = findNode(this.root, b);\n\t\treturn (desiredNode != null) ? desiredNode.count : 0;\n\t}",
"int getCnt();",
"int getBlockNumsCount();",
"org.apache.xmlbea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
THIS FUNCTION SHOULD BE USED WHEN ADAPTING THE POLICY DURING AFTER SIMULATION ACTIONS BECAUSE IT RECOMPUTES THE EXPONENTIAL THAT IS NOT CONSISTENT WITH THE WEIGHT ONLY IF THE WEIGHT HASN'T BEEN INCREMENTED YET DURING THE CURRENT ADAPTATION OF THE POLICY. This method returns the exponential of the weight. If the exponen... | public double getExpForPolicyAdaptation(int currentIteration){
if(!this.consistent){
// If the exponential is not consistent because the weight was increased
// in a previous iteration, update it. If the weight was increased in this
// iteration do not modify the exponential.
if(this.lastWeightUpdateIter... | [
"public double estimatedEnergyPerPanel() {\n\t\tif (estimatedEnergyPerPanel < 0) {\n\t\t\treturn estimatedEnergyPerPanel;\n\t\t}\n\t\t// if est. EnergyPerPanel hasn't been found yet, we find it here...\n\t\tdouble wattToKW = .001;\n\t\testimatedEnergyPerPanel = systemCap * wattToKW;\n\t\t// the returned estimated e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates if incoming entity is create Valid | void validateCreate(T entity); | [
"void validateCreate(ClaudiaData claudiaData, EnvironmentDto environmentDto, String vdc) throws \r\n AlreadyExistEntityException, InvalidEntityException;",
"protected void validateEntity() {\n super.validateEntity();\n }",
"protected void validateEntity() {\r\n super.validateEntity();\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "TransferSoundId" element | public boolean isSetTransferSoundId()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(TRANSFERSOUNDID$6) != 0;
}
} | [
"public boolean isSetLiveSoundId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(LIVESOUNDID$2) != 0;\n }\n }",
"public boolean hasSound() {\n return sound != null;\n }",
"public b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an aliased CHECKOUT table reference | public Checkout(Name alias) {
this(alias, CHECKOUT);
} | [
"private static TableRef createAliasedTableRef( final TableMeta table,\n final String alias ) {\n return new TableRef() {\n public String getColumnName( String rawName ) {\n return alias + \".\" + rawName;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a step condition checking if the node value is null. | public final StepCondition isNull() {
return LeafStepCondition.isNull(this);
} | [
"public final StepCondition isNotNull() {\n return LeafStepCondition.isNotNull(this);\n }",
"boolean getValueNull();",
"boolean getConditionPartIdNull();",
"boolean getMatchingValueNull();",
"boolean getNodeOrTreeNodeIdNull();",
"public ExpressionNode getCondition();",
"public BooleanProperty ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invalidates cached entry for given path string (if it is cached) | void invalidate(String pathString); | [
"public void invalidate(String path) {\n mCache.invalidate(path);\n }",
"public void remove(String path)\n {\n cache.remove(path);\n modified = true;\n }",
"void invalidateCache();",
"public boolean uncache(final Path path, final IAsset asset) {\n\t\treturn cache.remove(path, asset);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets second dealer card | public static String secondDealerCard(int[] dealerCards){
String newCard = generateCards.returnCards();
int cardToNumber = dealTheCards.dealOneCard(newCard);
// ace exception if second card is ace
if (cardToNumber == 1) {
dealerCards[0] += 11;
dealerCards[1] += 1... | [
"@Override\r\n public Card getSecondCard() {\r\n return this.secondCard.equals(null) ? Card.NONE : this.secondCard;\r\n }",
"public static int[] firstDealerCard(){\n String newCard = generateCards.returnCards();\n System.out.println(\"The Dealers first card is a \" + newCard);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CHECKS IF A RULESET IS CONFLICTING WITH ANOTHER ONE BY CHECKING SUCCESSORS OUTPUT | public boolean isConflicting (RuleSet ruleset) {
if (this.id == ruleset.id)
return false;
if (!this.getPrecursorWithID().sensorMatch(ruleset.getPrecursorWithID()))
return false;
for (int i = 0; i < this.getSuccessor().size(); i++) {
... | [
"public RuleSet (RuleSet RS1, RuleSet RS2, SensorList sList, SensorMap sMap, RuleMap rMap) {\n \n // CREATING COMBINATION RULESET FROM RS1 & RS2\n \n this.references = new ArrayList();\n this.sList = sList;\n this.rulelist = RS1.rulelist;\n this.totalProb = 0.0;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays the wizard that helps to import furniture to home. | public void importFurniture() {
new ImportedFurnitureWizardController(this.home, this.preferences, this, this.viewFactory,
this.contentManager, this.undoSupport).displayView(getView());
} | [
"public void importFurniture(String modelName) {\n new ImportedFurnitureWizardController(this.home, modelName, this.preferences, this, \n this.viewFactory, this.contentManager, this.undoSupport).displayView(getView());\n }",
"private void startImportWizard()\r\n {\r\n ImportFeaturesWizard wiz... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column b_report.orderMoney | public BigDecimal getOrderMoney() {
return orderMoney;
} | [
"public Long getOrderMoney() {\n return orderMoney;\n }",
"public BigDecimal getOrderBill() {\r\n return orderBill;\r\n }",
"public BigDecimal getAccountmoney() {\n return accountmoney;\n }",
"public void setOrderMoney(BigDecimal orderMoney) {\n this.orderMoney = orderMone... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .CEconItem_Action market_actions = 21; | SteammessagesEconSteamclient.CEconItem_Action getMarketActions(int index); | [
"java.util.List<SteammessagesEconSteamclient.CEconItem_Action> \n getMarketActionsList();",
"SteammessagesEconSteamclient.CEconItem_Action getActions(int index);",
"java.util.List<? extends SteammessagesEconSteamclient.CEconItem_ActionOrBuilder> \n getMarketActionsOrBuilderList();",
"Steammessag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extracts the observations from each watchlist | private List<Map<Species, Integer>> getObservedSpeciesMaps() {
List<Map<Species, Integer>> observedSpeciesMap = new ArrayList<>(observedSpecies.size());
for (WatchList watchList : observedSpecies.values()) {
observedSpeciesMap.add(watchList.getObservedSpeciesMap());
}
return ... | [
"public List<WatchRecord> getWatchList() throws Exception {\r\n List<WatchRecord> watchList = new Vector<WatchRecord>();\r\n List<WatchRecordXML> chilluns = this.getChildren(\"watch\", WatchRecordXML.class);\r\n for (WatchRecordXML wr : chilluns) {\r\n watchList.add(new WatchRecord(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The updateTable method updates the table to reflect the current list of venues | public static void updateTable() {
if(FileHandler.venuesList.size() == 0) {
// do nothing
} else {
tableModel.setRowCount(0);
for(Venue t : FileHandler.venuesList) {
tableModel.addRow(new String[] {
t.getVenueName(),
t.getStreet(),
t.getCity(),
t.getProvince(),
... | [
"public static void updateSearchTable(int index) {\n\t\t\n\t\tif(FileHandler.venuesList.size() == 0) {\n\t\t\t//do nothing\n\t\t} else {\n\t\t\t\n\t\t\ttableModel.setRowCount(0);\n\t\t\t\n\t\t\t//add only the row matching the index \n\t\t\ttableModel.addRow(new String[] {FileHandler.venuesList.get(index).getVenueNa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process all events for keys queued to the watcher | public void processEvents() {
for (;;) {
// wait for key to be signalled
WatchKey key;
try {
key = watcher.take();
} catch (InterruptedException x) {
return;
}
Path dir = keys.get(key);
if (dir == null) {
System.err.println("WatchKey not recognized!!");
continue;
}
for (W... | [
"@SuppressWarnings(\"rawtypes\")\r\n public void processEvents() {\r\n LOG.info(\"{}Enter event processing loop...\", M_IN);\r\n for (;;) {\r\n\r\n // wait for key to be signaled\r\n WatchKey key;\r\n try {\r\n key = watcher.take();\r\n } c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns BindingItemId of resource Clob column | public String getBindingItemIdResourceClob(){
return bindingItemIdResourceClob;
} | [
"public String getBindingItemIdResourceBlob(){\n return resourceBlobBindingSetItemId;\n }",
"public String getResourceId2Sql()\r\n \t{\r\n \t\treturn \"select RESOURCE_ID from CONTENT_RESOURCE_BODY_BINARY where (RESOURCE_ID = ?)\";\r\n \t}",
"String getClobField();",
"public Integer getBindingId() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENFIRST:event_jBGuardarActionPerformed TODO add your handling code here: | private void jBGuardarActionPerformed(java.awt.event.ActionEvent evt) {
if(tNombre.getText().isEmpty()){
JOptionPane.showMessageDialog(this, "Favor ingresar el Nombre");
return;
}
if(tDireccion.getText().isEmpty()){
JOptionPane.showMessageDialog(this, "Favor i... | [
"private void jBtnGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnGuardarActionPerformed\n try{\n if(verificarDatos()== true)\n {\n guardar();\n llenarTabla();\n habilitarBotones(true,false,false,false, false);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test Vector 05: curve secp384r1, short key id, encryption | @Test
public void testVector05() throws GeneralSecurityException, DecoderException {
final byte[] keyIdentifier = HexUtil.hexToBin("1c380ff905192e430022bca190cbe82841e2b1c2f8acd793b5ca94ba49b94577");
final byte[] plaintext = HexUtil.hexToBin(
"3b6f326e062fba65fdc02f8174afce3c8d235069ac8cda733060376ebfe8ab244e... | [
"public void testBasic() throws Exception {\n String algorithm = \"SHA256WithECDSA\";\n String hashAlgorithm = \"SHA-256\";\n String message = \"Hello\";\n String curve = \"secp256r1\";\n\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"EC\");\n ECGenParameterSpec ecSpec = new ECGenParam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
asks the secondary action with pass possibility | public int askSecondaryWithPass(); | [
"void specialAction(){\n\t\tSpecialAction specialAction = new SpecialAction(currentPlayer,gameModel,this);\n\t\thandlers.get(currentPlayer).send(currentPlayer.displayLeader());\n\t\tString proceed;\n\t\tdo{\n\t\t\thandlers.get(currentPlayer).send(\"Which special action do you want to undertake?[discard/play/activat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Schema in Thrift format. .google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema thrift = 2; | public com.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.Builder getThriftBuilder() {
return getThriftFieldBuilder().getBuilder();
} | [
"@java.lang.Override\n public com.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchemaOrBuilder getThriftOrBuilder() {\n if (schemaCase_ == 2) {\n return (com.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema) schema_;\n }\n return com.google.cloud.datacatalog.v1.PhysicalSchema.ThriftSchema.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Click on Forms link to open the Common Forms page | public KPAUIFormsPage openQuickLinksFormsPage() {
getFooterNavQuickLinksFormsLink().click();
return new KPAUIFormsPage(driver);
} | [
"public zoho clickFormsLink() {\n forms.click();\n return this;\n }",
"public FormsPage clickFormsPage()\n {\n try {\n if (menuItemClick(\"forms\", \"/patient-forms/index\"))\n return new FormsPage(false);\n else\n return null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the color of scroll knob. The knob is drawn with a gradient made up of two colors. | public Color[] getKnobColor()
{
return new Color[] {this.knobColor1, this.knobColor2};
} | [
"public Color getScrollBorderColor();",
"public CssScrollbarColor() {\n value = initial;\n }",
"public Color getTickColor();",
"public int getColorNumber()\n {\n return jSliderColorNumber.getValue();\n }",
"public Color getMeterBackgroundColor();",
"public native int getScrollIndoca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the selection listener that will be notified. | public void setSelectionListener(SelectionListener listener) {
this.selectionListener = listener;
} | [
"public void fireSelectionChanged()\r\n\t{\r\n\t\tfinal SelectionChangedEvent event = new SelectionChangedEvent( this, new StructuredSelection( this ) );\r\n Object[] listeners = selectionChangedListeners.getListeners();\r\n for (int i = 0; i < listeners.length; ++i) \r\n {\r\n fina... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value(s) for period (Coverage start and end dates) Definition: Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force. | public Coverage setPeriod(PeriodDt theValue) {
myPeriod = theValue;
return this;
} | [
"void setValuePeriod(org.hl7.fhir.Period valuePeriod);",
"public void setPeriod(double value) {\n this.period = value;\n }",
"void setPeriod(int period);",
"public void setPeriods(int value) {\n this.periods = value;\n }",
"public void setPeriods(Integer periods) {\n this.periods ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Should set and get allowedDishes | @Test
public void setGetAllowedDishes() {
final CourseType courseType = new CourseType();
final List<Dish> ALLOWED_DISHES = List.of(new Dish("D1"), new Dish("D2"));
courseType.setAllowedDishes(ALLOWED_DISHES);
assertSame(ALLOWED_DISHES, courseType.getAllowedDishes());
} | [
"public Set<Dish> getDishes() {\n\t\treturn dishes;\n\t}",
"public void setDisabilities (java.lang.String disabilities) {\n\t\tthis.disabilities = disabilities;\n\t}",
"void setCannotDamage(List<Type> cannotDamage) {\n this.cannotDamage = cannotDamage;\n }",
"public void setDiscountAllowed(boolean d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Packs a Post object into a ContentValues map for use with SQL inserts. | private static ContentValues postToContentValues(JobDetails iJobDetails) {
ContentValues values = new ContentValues();
values.put(PostORM.COLUMN_ID, iJobDetails.getJob_id());
values.put(PostORM.COLUMN_TITLE, iJobDetails.getJob_title());
values.put(PostORM.COLUMN_SYNOPSIS, iJobDetails.getRole_synopsis());
valu... | [
"public HashMap<String,Object> getPost(int postId);",
"protected static ContentValues getContentValues(Postparto postparto) {\n ContentValues values = new ContentValues();\n values.put(PostpartoSQLite.COLUMN_ID, postparto.getId());\n values.put(PostpartoSQLite.COLUMN_SINCRONIZADO, postparto.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add friends in connected _cloud table if exist updated. 0 means authenticated, 1 otherwise; | public static void addFriend(Cloud cloud) throws SQLException,
ClassNotFoundException {
getConnection();
String sql = "select count(*) as count from CONNECTED_CLOUDS where CLOUD_NAME=\'"
+ cloud.getName() + "\'";
Statement stat = null;
ResultSet rs = null;
stat = Common.con.createStatement();
... | [
"private void addToFriendsList() {\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (mySDBClient != null && myFriendsName != null)\r\n\t\t\t{\r\n\t\t\t\tString suffix = Utility.getAWSUserStatsTableSuffix(myFriendsName);\r\n\t\t\t\tArrayList<ReplaceableAttribute> attributes = getReplaceableAttributeForFriend();\r\n\t\t\t\tif (attrib... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the milliseconds for the day today (not the time). | private long todayMilliseconds(){
Date current = new Date();
calendar.setTimeInMillis(current.getTime());
int day = calendar.get(Calendar.DATE);
int month = calendar.get(Calendar.MONTH);
int year = calendar.get(Calendar.YEAR);
calendar.set(year, month, day, 0,0,0);
... | [
"private long yesterdayMilliseconds(){\n Date current = new Date();\n calendar.setTimeInMillis(current.getTime());\n int day = calendar.get(Calendar.DATE);\n int month = calendar.get(Calendar.MONTH);\n int year = calendar.get(Calendar.YEAR);\n\n calendar.set(year, month, da... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the input parameters into a portal event. The input parameters are parsed and when a button input is found it is set as the portal event itself. The portal event's event is either a runtime key of a field/container .. or a button which is pressed. All extra request parameters are passed via the parameters in the... | public PortalEvent parseRequest(PageWard pageWard, String idPrefix) throws AppException {
if (pageWard.isExpectedSubmit(this.request, idPrefix)) {
// cast a new ward so we don't get unexpected parallel submits.
pageWard.generateNewWard();
} else {
LOG.info("Unexpected request, expecting page w... | [
"public PortalEventParser(WebRequest request, IPage currentPage, IRuntimeKeyMapper runtimeKeyMapper) {\n if (runtimeKeyMapper == null) {\n throw new IllegalArgumentException(\"runtimeKeyMapper is mandatory\");\n }\n\n this.request = request;\n this.currentPage = currentPage;\n this.runtimeKeyPar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get 'users' collection(table on mongo) | public DBCollection getUserCollection() {
DBCollection dbCollection = null;
try {
return MongoDBService.getCollection("users");
} catch (Exception e) {
NXGReports.addStep("Can't get Users Colection: auvenir-users", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotO... | [
"protected MongoCollection getCollection(String name) {\n Jongo jongo = new Jongo(this.mongoDbFactory.getDb());\n return jongo.getCollection(name);\n }",
"protected DBCollection getCollection(final String name) throws IOException\n {\n // Make sure we have a mongo instance up\n con... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the pieceCount value for this CreateMixedReceptacleForRateTypeWithTareWeight. | public int getPieceCount() {
return pieceCount;
} | [
"public int getPieceCount () {\n return m_PieceCount;\n\t}",
"public int getHandKarteCount(){\n return getHandKarte().size();\n }",
"public int getPieceCount() {\n\t\treturn reserves.size();\n\t}",
"public int getNumPieces() {\n return ti.num_pieces();\n }",
"public int getPiece... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A factory for a local socket from port number. | @FunctionalInterface
public interface SocketFactory {
ServerSocket createSocket(int port) throws IOException;
} | [
"Socket newSocket(IPAddr addr, int port) throws IOException;",
"static SocketAddressFactory from(String host, int port) {\n InetSocketAddress address = InetSocketAddress.createUnresolved(host, port);\n return from(address);\n }",
"public ServerSocket createSocket (int port)\n throws IOException, KeySt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
HAX for reading numbers, since they can be terminated by a object close char | private int queryNumberChar() throws IOException {
brin.mark(2);
return brin.read();
} | [
"java.lang.String getNumb();",
"private String readStringUntil0x() throws IOException {\n String thisLine = \"\";\n int ch;\n while ((ch = ins.read()) != -1) {\n if (ch != 0x0) {\n thisLine = thisLine + String.valueOf((char) ch);\n } else {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The field definition used for this instance of SPDZ. | FieldDefinition getFieldDefinition(); | [
"java.lang.String getField1536();",
"public String getZdxhfz() {\n return zdxhfz;\n }",
"java.lang.String getField1750();",
"java.lang.String getField1716();",
"java.lang.String getField1152();",
"public double getLoZ() {\r\n\treturn fieldLoZ;\r\n}",
"java.lang.String getField1663();",
"java... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of canPut method, of class Board. Car out of board. Right boundary. | @Test
public void testCanPutBoundaryRight() {
Car car = new Car('A', 3, Orientation.HORIZONTAL, new Position(1, 4));
Board instance = new Board();
assertFalse(instance.canPut(car));
} | [
"@Test\r\n public void testCanPutPosOccupiedAll() {\r\n Car car = new Car('A', 3, Orientation.HORIZONTAL, new Position(0, 0));\r\n Board instance = new Board();\r\n instance.put(car);\r\n assertFalse(instance.canPut(car));\r\n }",
"@Test\r\n public void testCanMoveBoundaryRigh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |