query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Adds new rectangle to the whiteboard, updating appropriate tables, arraylists | private void addNewRectangle()
{
DRectModel rect = new DRectModel(10, 10, 20, 20);
draw.addShape(rect);
shapeInfoModel.addRow(rect);
this.repaint();
} | [
"private void addNewRectangle() {\n\n int xPos0 = xPos.get(0);\n int xPos1 = xPos.get(1);\n int yPos0 = yPos.get(0);\n int yPos1 = yPos.get(1);\n\n int xPos = (xPos0 < xPos1 ? xPos0 : xPos1);\n int yPos = (yPos0 < yPos1 ? yPos0 : yPos1);\n int width = abs(xPos0 - xPo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Map Keras to DL4J activation functions. | public static String mapActivation(String kerasActivation) {
if (kerasActivation.equals("linear"))
return "identity";
return kerasActivation;
} | [
"public interface ActivationFunction {\n\t/**\n\t * The activation function itself. E.g. The sigmoid function\n\t * @param z - The weighted sum of a neuron\n\t * @return The activation of a neuron\n\t */\n\tpublic double activation(double z);\n\t/**\n\t * The derivative of the activation function.\n\t * @param z - ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instancia una nueva consulta opciones servicios cliente response. | public ConsultaOpcionesServiciosClienteResponse() { } | [
"public ConsultaOpcionesServiciosClienteResult() { }",
"FiltrosConsultaRespuestaDTO obtenerFiltrosConsulta();",
"public SegurosRespuestaConsulta() {\n\t}",
"@Override\n\tpublic ResponseConsulta consultarVehiculos() {\n\t\tResponseConsulta respConsulta = new ResponseConsulta();\n\t\ttry {\n\t\t\tList<Vehiculo>... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The marker notification indicates a marker, embedded or programmatically inserted, has been reached during playback. | public void onMarker(MarkerEvent evt); | [
"public interface MarkerListener {\n /**\n * The marker notification indicates a marker, embedded or programmatically inserted, has been\n * reached during playback.\n *\n * @param evt\n */\n public void onMarker(MarkerEvent evt);\n}",
"private void fireMarkerReached(final String mark) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the ontology source at specified index in the list. | @Override
public AbstractSource getElementAt(int index) {
return sourceManager.getSource(index);
} | [
"protected final RenderedImage getSource(final int index) {\n if (sources != null) return sources[index];\n else throw new IndexOutOfBoundsException();\n }",
"public abstract int getSourceIndex(int index);",
"Coverage getSource( int sourceDataIndex )\n throws IndexOut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
resolve overloaded func given some candidates returns 0 element array if no candidates matches callSig, 1 element if a best candidate exists, or all applicable candidates if ambiguous (if callSig is null, returns all candidates) | public static Entry[] resolveOverload(final Entry[] candidates,
final FuncInfo callSig, final Object[] args) {
if (callSig == null) {
return candidates;
}
final Entry[] applicable = applicableFuncs(candidates, callSig, args);
if (applicable.length <= 1) {
... | [
"public static Entry[] bestFuncMatch(final Entry[] candidates,\n final FuncInfo callSig, final Object[] args) {\n if (candidates.length <= 1) {\n return candidates; // 0 or 1 (no candidates, or already unamgiguous)\n }\n\n for (final Entry candidateBest : candidates) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Original signature : int url_fprintf(ByteIOContext, const char, null) native declaration : src/main/headers/libavformat/avio.h:364 | @Mangling({"_Z11url_fprintfP13ByteIOContextPKcv", "?url_fprintf@@YAHPAUByteIOContext@@PADX@Z"})
int url_fprintf(ByteIOContext s, String fmt, Object... varargs); | [
"@Mangling({\"_Z11dump_formatP15AVFormatContextiPKci\", \"?dump_format@@YAXPAUAVFormatContext@@HPADH@Z\"}) \n\tvoid dump_format(AVFormatContext ic, int index, String url, int is_output);",
"@Mangling({\"_Z9url_writeP10URLContextPhi\", \"?url_write@@YAHPAUURLContext@@PAEH@Z\"}) \n\tint url_write(URLContext h, Byte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the value associated with the column: NumberOfDigit | public int getNumberOfDigit () {
return numberOfDigit;
} | [
"public int getNumberOfDigits()\n\t{\n\t\t// TO DO\n\t\treturn infNumber.length;\n\t}",
"public long getDigitCount() {\n return digitCount;\n }",
"public int getNumDigits()\n\t{\n\t\treturn this.numDigits;\n\t}",
"private int countSumDigit() {\r\n\t\tint result = 0;\r\n\t\tfor (int i = 0; i < getNum... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 CommunicationMode = 7; | int getCommunicationMode(); | [
"public int getCommunicationMode() {\n return communicationMode_;\n }",
"public int getCommunicationMode() {\n return communicationMode_;\n }",
"public interface TCPProtocolPropertiesOperations extends org.omg.RTCORBA.ProtocolPropertiesOperations {\n int send_buffer_size();\n void send... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set Up Notification :param actionType > "notify_morning" or "notify_evening" | public void set_notifications(String actionType) {
int hour, minute;
if (actionType.equals("notify_morning")) {
hour = 8;
minute = 0;
} else {
hour = 20;
minute = 0;
}
Calendar calendar = Calendar.getInstance();
calendar.s... | [
"@Override\n public void onNotificationAction(Context context, Date actionTime, String pushType, String actionType, String actionValue) {\n }",
"public void setNotificationType(String notificationType)\n\t{\n\t\tthis.notificationType = notificationType;\n\t}",
"private void sendNotification(String NotifTy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves a List of all the companies names. | public List<String> getAllCompaniesNames() {
return Validations.VerifyNotEmpty(companyRepository.findAllUsernames());
} | [
"public Collection<String> getAllRentalCompanyNames() {\n \tQuery<Entity> query = Query.newEntityQueryBuilder()\n \t\t .setKind(\"CarRentalCompany\")\n \t\t .build();\n \tQueryResults<Entity> carRentalCompanies = datastore.run(query);\n \tCollection<String> companyCollection = new HashSet<>();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this test shows that renaming a file creates a new file with a revision history disjoint from that of the original file | @Ignore
@Test
public void testSamePathDifferentNameIsDifferentFile() throws DropboxException {
String fileName = UUID.randomUUID().toString();
String filePath = createNewDropboxFile(fileName);
List<Entry> entries = mDBapi.revisions(filePath, MAX_REVISIONS);
Assert.assertEquals(1,... | [
"@Ignore\n @Test\n public void testRenamingFileDoesNotPreserveHashCodeOrRevison() throws DropboxException {\n String filePath = createNewDropboxFile(UUID.randomUUID().toString());\n Entry entry = mDBapi.metadata(filePath, MAX_REVISIONS, null, true, null);\n int originalHashCode = entry.ha... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Flag indicating whether this factory is for a footer | public boolean isFooter() {
return isFooter;
} | [
"public boolean hasFooter() {\n return hasFooter;\n }",
"public String getFooterFlag() {\n return footerFlag;\n }",
"public boolean isFooterVisible() {\n return footer.isVisible();\n }",
"@Override\n public boolean isFooterDisplayed() {\n\n setLogString(\"Check footer i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the entry DN of the user | public String getentryDN() {
return _entryDN;
} | [
"java.lang.String getUserDN();",
"public java.lang.String getUserDN() {\n java.lang.Object ref = userDN_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.B... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes up the Weekly the StockQuote from the given StockQuote Set | public StockQuote getWeekly(StockQuote sq, Set<StockQuote> sqSet) {
LocalDate date = sq.getQuoteDatetime().toLocalDate();
System.out.println("Date = " + date);
final LocalDate start = startOfWeek(date);
LocalDate end = endOfWeek(date);
return aggregateStockQuote(sq, sqSet,sta... | [
"void buyStocks(String portfolioName, String ticker,\r\n double price, LocalDateTime date, StockData data);",
"public void COWeekly()\r\n\t{\r\n\t\tString pass = \"CO_Weekly\";\r\n\t\tCommonST_Weekly(pass);\r\n\t}",
"public void DMWeekly()\r\n\t{\r\n\t\tString pass = \"DM_Weekly\";\r\n\t\tCommon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
implementation of the function comparteTo determine if a chunkID object is equal/bigger/smaller | @Override
public int compareTo(ChunkID chunk) {
Integer spareRepDegree = this.actualRepDegree - this.desiredRepDegree;
Integer chunkSpareRepDegree = chunk.actualRepDegree - chunk.desiredRepDegree;
return -spareRepDegree.compareTo(chunkSpareRepDegree);
} | [
"@Override\n public int compareTo(Chunk o) {\n if((this.networkCopies.size() - this.replicationDegree) - (o.networkCopies.size()-o.replicationDegree)==0){\n return o.chunkNo - this.chunkNo;\n }\n return (this.networkCopies.size() - this.replicationDegree) - (o.networkCopies.size()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the usermetadata is a placeholder to store userdefined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, userdefined configuration settings can be stored. | public HybridConnectionInner withUserMetadata(String userMetadata) {
this.userMetadata = userMetadata;
return this;
} | [
"public void setUserMetadata(Map<String, String> userMetadata) {\n\t\tthis.userMetadata = userMetadata;\n\t}",
"public void setMetadata(Metadata metadata) {\n this.metadata = metadata;\n }",
"public void addUserMetadata(String key, String value) {\n this.userMetadata.put(key, value);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Populates all chartOfAccountsCode fields according to corresponding accountNumber fields in this BO. The chartOfAccountsCodeaccountNumber pairs are (part of) the FKs for the reference accounts in this BO. | protected void populateChartOfAccountsCodeFields() {
AccountService acctService = SpringContext.getBean(AccountService.class);
AccountPersistenceStructureService apsService = SpringContext.getBean(AccountPersistenceStructureService.class);
// non-collection reference accounts
Persista... | [
"public void setChartOfAccountsCode(String chartOfAccountsCode) {\r\n this.chartOfAccountsCode = chartOfAccountsCode;\r\n }",
"public void setChartOfAccountsCode(String chartOfAccountsCode) {\n this.chartOfAccountsCode = chartOfAccountsCode;\n }",
"public void populateCgIcrAccount(A21SubAcco... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback to be notified about rate limits. The routes given to the callbacks might be null in case of a global rate limit. | @Deprecated
public interface Callback {
/**
* Called when an attempted request is rate limited. Might be called more than once per request
*/
void requestRateLimited();
/**
* Called when the rate limit is reset.
*/
void rateLimitReset();
} | [
"void rateLimitReset();",
"void requestRateLimited();",
"public abstract boolean isRateLimit();",
"Boolean enableRateLimiting();",
"@Override\n public void onQuotaLimitReached(String alertName, String ifName) {\n invokeForAllObservers(o -> o.onQuotaLimitReached(alertName, ifName));\n }",
"pri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creating a file system path of the file that's is related to the project item. If a project root is specified by the tree path and the project file (.pmp) is saved in C:\Project\myProject.pmp, then this method returns C:\Project. This works in the same way for project subfolders and diagrams. Files related to the proje... | public static String getFileSystemPathToProjectItem(final TreePath treePath){
if(!isValidTreePath(treePath)){
return null;
}
final StringBuffer fileSystemPath = new StringBuffer();
try{
ProjectRoot projectRoot = (ProjectRoot) ((DefaultMutableTreeNode)treePath.ge... | [
"private static String getProjectPathString() {\n Path projectPath = Paths.get(\"\").toAbsolutePath();\n String projectPathString = projectPath.normalize().toString();\n return projectPathString;\n }",
"public Path getFilepath() {\n return root.relativize(getFullFolderPath().resolve... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize a new box with its center located at (startX, startY), filled with startColor. | public BouncingBox(int startX, int startY, Color startColor) {
x = startX;
y = startY;
color = startColor;
} | [
"public SelectionBox(Point start_point) {\r\n\t\t\tstart_corner = start_point;\r\n\t\t\tactive_corner = start_point;\r\n\t\t}",
"public BaseShape(int aStartX, int aStartY, Color aColor) {\r\n\t\t\r\n\t\tthis.startX = aStartX;\r\n\t\tthis.startY = aStartY;\r\n\t\tthis.color = aColor;\r\n\t}",
"public PixelPositi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Id of a flow | @ApiModelProperty(value = "Id of a flow")
public String getId() {
return id;
} | [
"FlowId id();",
"public Integer getFlowId() {\r\n return flowId;\r\n }",
"public String getFlowId() {\n\t\treturn flowId;\n\t}",
"public Integer getNewFlowId() {\n\t\tmaxFlowId += 1;\n\t\treturn maxFlowId;\n\t}",
"java.lang.String getWorkflowId();",
"String getWorkflowId();",
"public String ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method checks if a player has enough of the desired structure to build. | private boolean remainingStructuresEnough(Structure inStructure) {
boolean isBuildPossible = true;
int structuresStock = 0;
for (Structures structure : structureList.get(inStructure)) {
if (structure.getFaction().equals(getCurrentPlayerFaction())) {
structuresSto... | [
"boolean canBuild(SagaChunk sagaChunk, SagaPlayer sagaPlayer) {\n\n\t\t\n\t\t// True if player is a builder on the chunk:\n\t\t\treturn true;\n\t\t\n\t\t// Elder checks and stuff like that goes here:\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public void checkLobbySize() {\n if (this.players.size() == 4) {\n System.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the queue information. This method fills a QueueInfo instance with information from the given queue. Internally, snd_seq_get_queue_info() is called. | public native int getQueueInfo(int nQueue, AlsaSeqQueueInfo queueInfo); | [
"private String getInitQueueForQueue(Sysview sysview, String qmgr, String queue)\n throws IOException {\n TabularData details = sysview.execute(\"MQ {0}; MQALTER Queue {1}\", qmgr, queue)\n .getTabularData();\n return details.getFirstRowMatching(\"Field\", \"InitQ\").get(\"Value\");\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the key which was the target of this modification. | public K getTargetKey() {
return targetKey;
} | [
"public String getKey()\n\t{\n\t\treturn m_setId + m_id;\n\n\t}",
"public int getKeyJump() {\n return jumpKey;\n }",
"public final long getKey() {\n return createKey(this.tileX, this.tileY, this.scale);\n }",
"long getParentKey();",
"public String GetKey() {\n return toString() + \"_\" ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make this GameObject start falling | void startFall(){
assert (this.hasToFall() && this.getStatus() != Status.FALLING);
this.setStatus(Status.FALLING);
this.setPosition(new Vector(this.getPosition().getCubeX() + World.CUBELENGTH / 2,
this.getPosition().getCubeY() + World.CUBELENGTH / 2, this.getPosition().getZ()));
this.setSpeed(FALLSPEED... | [
"public void fall()\n {\n // See if direction has changed\n if (deltaY > 0)\n {\n verticalDirection = JUMPING_DOWN;\n\n // Set image\n if (horizontalDirection == FACING_RIGHT)\n {\n setImage(\"hero-jump-down-right.png\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the map of consents for the current profile. | public Map<String, Consent> getConsents() {
return consents;
} | [
"@Transactional\n\tpublic Map<String, InterestProfile> getInterestProfiles()\n\t{\n\t\tif ( interestProfileCache == null || interestProfileCache.isEmpty() )\n\t\t\tupdateInterestProfilesCache();\n\t\treturn interestProfileCache;\n\t}",
"public HashMap<String, Continent> getContinents(){\n\t\treturn this.continent... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method to determine if fields only have letters (used for name, city and country fields) Whitespace is ignored in this test. | private boolean isAllChars(String fieldVal){
// Get rid of all whitespace from the given string
String val = fieldVal.replaceAll("\\s", "").trim();
// Check each character in the string to determine if it is a digit or not
for (int i=0; i < val.length(); i++){
// if we f... | [
"public static boolean isNullOrBlanksAndOnlyAlphabets(String input) {\n\t\tString field = input;\n\t\tString pattern = \"^[a-zA-Z]+$\";\n\t\tif (input == null || input.isEmpty()) {\n\t\t\treturn true;\n\t\t} else if (field.matches(pattern)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"@... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the parent of the view. The children are only initialized if someone has previously asked for information related to children (e.g. getViewCount()) or for preferred, minimum or maximum span of this view. | public @Override void setParent(View parent) {
super.setParent(parent);
/* Make sure that the children get loaded.
* It is necessary to do because children preferences will
* define the preferences of the parent.
*/
if (parent != null) {
if (parent... | [
"public void setParent(View parent) {\n throw new Error(\"Can't set parent on root view\");\n }",
"public void setParent(Widget parent)\n \t{\n \t\tm_parent = parent;\n \t}",
"void setParent(WidgetParent ip) {\n this.m_parent = ip;\n }",
"public void setParent(iTData parent)\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the file extension of given fileName. | public static String getFileExtension(String fileName) {
int lastDot = fileName.lastIndexOf('.');
return (lastDot >= 0) ? fileName.substring(lastDot) : null;
} | [
"private String getExtension(String filename)\r\n\t{\r\n\t\tint index = filename.lastIndexOf('.');\r\n\t\tif(index == -1){\r\n\t\t\t//No file extension\r\n\t\t\treturn \"\";\r\n\t\t}else{\r\n\t\t\treturn filename.substring(index);\r\n\t\t}\r\n\t}",
"public static String getExtension(String filename) {\n St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Validate the Spot Block Duration to be between 0 & 6 hours as specified in the AWS API | @POST
public FormValidation doCheckSpotBlockReservationDurationStr(@QueryParameter String value) {
if (value == null || value.trim().isEmpty())
return FormValidation.ok();
try {
int val = Integer.parseInt(value);
if (val >= 0 && val <= 6)
... | [
"@Test\n\tvoid testCheckDuration2() {\n\t\tassertFalse(DataChecker.checkDuration(Duration.ofMinutes(-11)));\n\t}",
"private boolean durationValidation(int duration){\n return duration < 300 && duration >10;\n }",
"Builder addTimeRequired(Duration value);",
"private static boolean validateDuration( d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
6) create a program that outputs the sum of all the numbers between 1 to 101 (1+3+5+7+9....+ 101) using a while loop. (note:question is not clear,quesion's lines want different results)// | public static void main(String[] args) {
int number=1;
int sum=0;
while( number<=101) {
sum+=number;
System.out.print(number);
if(number<101) {
System.out.print(" + "); }
number++;
}
System.out.println();
System.out.println();
System.out.println("SUM IS = " + sum);
//=... | [
"public static void main(String[] args) {\n int sum_of_numbers;\n sum_of_numbers = 0;\n int max_number;\n max_number = 101;\n for(int i = 1; i < max_number; ++i)\n sum_of_numbers += i;\n System.out.println(\"1. sum of 1st 100 nr > 0\");\n System.out.printl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Moves an instantiated Shield Item from a character's inventory to their equippedShield slot, adding the chance of any attack on the character to be blocked completely. This overrides the Item class's equip() method, ensuring that Shield items are only used as Shields, rather than as a weapon. | public void equip(){
//move current shield to player's inventory
if (GameState.instance().getCurrentPlayer().getShield()!= null) {
GameState.instance().getCurrentPlayer().addToInventory(GameState.instance().getCurrentPlayer().getShield());
}
//equip new shield
GameState.instance().getCurrentPlayer().s... | [
"@Test\n public void Equipshield() {\n GameRandom.random.setSeed(2);\n Character character = new Character(null, world);\n world.setCharacter(character);\n\n // shield was not equipped so it should be null for now\n assertNull(character.getShield());\n\n // item1 is a sw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scanner for user input to set the Product, Price, and Quantity | public Product inputProduct() {
Scanner in = new Scanner(System.in);
System.out.println("Description:");
String dscrp = in.next();
p.setName(dscrp);
System.out.println("Price:");
double Price = in.nextDouble();
p.setPrice(Price);
System.out.println("Quanti... | [
"public void inputProduct() {\n\n Product product;\n System.out.println(\" - - - - - - - - - - - - - - - - - - - - - - \");\n System.out.println(\"Product type (1 - animal; 2 - vegetable) \");\n System.out.println(\" - - - - - - - - - - - - - - - - - - - - - - \");\n int action =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Do we need to drop the temporary table after use? | public boolean dropTemporaryTableAfterUse() {
return true;
} | [
"public boolean dropTemporaryTableAfterUse();",
"public void deleteTempTables();",
"public void dropTempTable (java.lang.String tableName) { throw new RuntimeException(); }",
"public boolean supportsTemporaryTables();",
"public boolean supportsTemporaryTables() {\n \t\treturn false;\n \t}",
"public boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("tickString tickerId: " + tickerId + " tickType: " + tickType + " value: " + value); | @Override
public void tickString(int tickerId, int tickType, String value) {
} | [
"java.lang.String getTicker();",
"public java.lang.String getTicker() {\n return ticker;\n }",
"@Override\n\t\tpublic String toString() {\n\t\t\t\n\t\t\treturn \"TickData [cSymbol=\" + cSymbol + \", uTime=\" + uTime\n\t\t\t\t\t+ \", zpos_diff=\"+zpos_diff+ \n\t\t\t\t\t\", volume_diff=\" + volume_diff... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
find faculty by name | public FacultyBean findByName(String firstname) throws ApplicationException{
log.debug("Model FindByName Started ");
StringBuffer sql=new StringBuffer("Select * from st_faculty where first_name=?");
FacultyBean bean=null;
Connection conn=null;
try{
conn=JDBCDataSource.getConnection();
PreparedStat... | [
"public int getFacultyid(String name) throws SQLException {\n\t\tint returnid = 0;\n\t\tint collectibleCategoryid = getCollectibleCategoryid(\"faculty\");\n\t\tdb = new DataBaseConnection();\n\t\tConnection conn = db.getConnection();\n\t\tString sqlString = \"SELECT faculty_id FROM collectiblemaster WHERE name=? AN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
//GENEND:|76getter|2| //GENBEGIN:|77getter|0|77preInit Returns an initiliazed instance of restTime component. | public TextField getRestTime() {
if (restTime == null) {//GEN-END:|77-getter|0|77-preInit
// write pre-init user code here
restTime = new TextField("Rest time", null, 32, TextField.ANY);//GEN-BEGIN:|77-getter|1|77-postInit
DataBinder.registerDataSet(getActualSetting(), "actua... | [
"long getInitTime();",
"public Date getInitTime() {\n\t\treturn initTime;\n\t}",
"@ApiModelProperty(example = \"09:00:00\", required = true, value = \"Time the Strategy will start. Strategy will be waiting in SCHEDULED status if InitTIme is ahead of current time or will start imediately if InitTime is behinf cu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
in case that source is a buffered audio source, buffer features contuniuosly change and are being adjusted | protected void adjustToBufferedSource() {
frameSize = frameSource.getFrameSize();
originalBuffer = new double[frameSize];
setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
} | [
"@Override\r\n public void onBuffering(boolean b) {\n }",
"@Override\n public void onBuffering(boolean b) {\n }",
"@Override\n public void onBuffering(int percent) {\n }",
"public void mix(FloatSampleBuffer source) {\n\t\tint count = getSampleCount();\n\t\tif (count > source.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "entryRuleModel" ../eu.artist.migration.mdt.database.sql.editor.ui/srcgen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:60:1: entryRuleModel : ruleModel EOF ; | public final void entryRuleModel() throws RecognitionException {
try {
// ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:61:1: ( ruleModel EOF )
// ../eu.artist.migration.mdt.database.... | [
"public final void entryRuleModel() throws RecognitionException {\n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:61:1: ( ruleModel EOF )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional float k = 3; | public float getK() {
return k_;
} | [
"float getK();",
"public float getK() {\n return k_;\n }",
"public double get(int n, int k) {\r\n if (pos[n] == k) return 1.0;\r\n return 0.0;\r\n }",
"public double getK(){\r\n\t\t\r\n\t\treturn K;\r\n\t\t\r\n\t}",
"public int getK()\r\n\t{\r\n\t\treturn kFactor;\r\n\t}",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the camera used to show the viewport. | private OrthographicCamera createCamera() {
float ratio = ((float) Gdx.graphics.getHeight() / (float)Gdx.graphics.getWidth());
OrthographicCamera camera = new OrthographicCamera(VIEWPORT_WIDTH / PIXEL_TO_METER, VIEWPORT_WIDTH / PIXEL_TO_METER * ratio);
camera.position.set(camera.viewportWidth /... | [
"public void setCamera() {\n /*\n camera height: 0.5 world height\n camera width: 0.5 world width\n */\n camera = new OrthographicCamera();\n viewport = new StretchViewport(LotCG.V_WIDTH / LotCG.V_SCALE / 1.75f, LotCG.V_HEIGHT / LotCG.V_SCALE / 1.75f, camera);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method which returns populate cache property. | public Boolean getPopulateCacheProperty() {
return populateCache;
} | [
"CacheProperties createCacheProperties();",
"private void makeCache() {\n if (propertyCache == null) {\n propertyCache = new PropertyCache(globals.getConfig());\n\n // Preload any keys, if needed.\n String[] preloadKeys = globals.getConfig().getPreloadedProperties();\n if (preloadKeys != nu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simulate a chat message from the specified source | public static void sendChat(CommandSource source, String message) {
if (source instanceof Player) {
// This is required for nucleus to work correctly with a simulated player message
CauseStackManager.StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame();
Player pl... | [
"private void sendMessage() {\n op.printSpeakerOrAttendeeName();\n String username = sc.nextLine();\n if (cancelRequested(username)) return;\n op.printMessageContentPrompt();\n String messageContent = sc.nextLine();\n if (cancelRequested(messageContent)) return;\n UU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "performer" element | public boolean isSetPerformer()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(PERFORMER$12) != 0;
}
} | [
"boolean hasIsPerformOf();",
"public boolean isInMovie(Performer performer){\n\n\t\tif(performers.contains(performer))\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"boolean hasPerformAt();",
"public boolean hasTarget() { \n if (isReal) {\n return get(\"tv\") == 1; // cleaned return s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Entrypoint for execution. To run: $ java SFTPServer X A P [NOTE: use JAR executable] X: Even port number SimpleFTPServer will bind to. Must be client port + 1. A: IP address of NetEmu P: UDP port number of NetEmu | public static void main(String args[]) {
int port;
SimpleFTPServer server;
if(args.length != 3) {
System.out.println("Incorrect parameters. Usage: $ java SFTPClient X A P");
System.exit(0);
}
try {
// Parse arguments, create client
port = Integer.parseInt(args[0]);
NetworkManager.init(por... | [
"public static void main(String args[]) {\r\n\t\t// check to ensure there is a port number to read, report an error\r\n\t\t// if the port number is not there\r\n\t\tif (args.length > 1) {\r\n\t\t\tSystem.out.println(\"Usage: java -jar ServerMain.jar [port]\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// parse the p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
first message only, Sign .axelar.tss.tofnd.v1beta1.SignInit sign_init = 2; | axelar.tss.tofnd.v1beta1.Tofnd.SignInitOrBuilder getSignInitOrBuilder(); | [
"axelar.tss.tofnd.v1beta1.Tofnd.SignInit getSignInit();",
"private SignInit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Builder setSignInit(axelar.tss.tofnd.v1beta1.Tofnd.SignInit value) {\n if (signInitBuilder_ == null) {\n if (value == n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Required. The message to create. [Message.participant][google.cloud.dialogflow.v2beta1.Message.participant] is required. .google.cloud.dialogflow.v2beta1.Message message = 2 [(.google.api.field_behavior) = REQUIRED]; | com.google.cloud.dialogflow.v2beta1.MessageOrBuilder getMessageOrBuilder(); | [
"com.google.cloud.dialogflow.v2beta1.Message getMessage();",
"public Message createMessage();",
"public ChatMessage(MessageType type, Object message) {\n m_type = type;\n m_message = message;\n }",
"public void createMessage(String name,String message)\r\n {\r\n messageSystem= new M... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Valida si el elemento seleccionado actual es un submenu. | public boolean esSubMenu() {
OpcionMenu elemento = getElementoMenuActual();
boolean esSubMenu = elemento!=null && elemento instanceof OpcionSubMenu;
return esSubMenu;
} | [
"@Override\n public boolean isSubMenuDisplayed(final String subMenu) {\n\n DriverConfig.setLogString(\"SubMenu \" + subMenu, true);\n boolean isdisplayed = false;\n final List<WebElement> subMenus = DriverConfig.getDriver().findElements(\n By.xpath(\"//*[@id='submenu']/a\"));\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lower the selected features. (FeatureDisplay only.) | private void lowerSelection()
{
final FeatureVector features_to_lower = selection.getAllFeatures();
for(int i = 0 ; i < features_to_lower.size() ; ++i)
{
final Feature selection_feature = features_to_lower.elementAt(i);
feature_display.lowerFeature(selection_feature);
}
} | [
"private void raiseSelection() \n {\n final FeatureVector features_to_raise = selection.getAllFeatures();\n\n for(int i = 0 ; i < features_to_raise.size() ; ++i) \n {\n final Feature selection_feature = features_to_raise.elementAt(i);\n feature_display.raiseFeature(selection_feature);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column sckj_user_list.Commission | public BigDecimal getCommission() {
return commission;
} | [
"public Long getCommission() {\n return commission;\n }",
"public long getCommission() {\n return commission;\n }",
"public void setCommission(Long commission) {\n this.commission = commission;\n }",
"public double getCommission() {\n return commission;\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "puzzle" C:\\Users\\patrick_steinhauer\\Documents\\GitHub\\CI\\Aufgabe4\\SymbolRaetselSolver\\SymbolraetselEmitter.g:28:1: puzzle returns [Set buchstaben, Set constraints] : ^( SYMBOLPUZZLE aufgabe1= sammeleSymbole aufgabe2= sammeleSymbole aufgabe3= sammeleSymbole aufgabe4= sammeleSymbole aufgabe5= sammele... | public final SymbolraetselEmitter.puzzle_return puzzle() throws RecognitionException {
SymbolraetselEmitter.puzzle_return retval = new SymbolraetselEmitter.puzzle_return();
retval.start = input.LT(1);
SymbolraetselEmitter.sammeleSymbole_return aufgabe1 =null;
SymbolraetselEmitter.samm... | [
"public static void main(String[] args) {\n\t\t\n//\t\t//PA4 a\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"b\");\t\t\n//\t\trhs1.add(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
You don't want the normal render type, or it wont render properly. | @Override
public int getRenderType() {
return -1;
} | [
"@Override\n public int getRenderType() {\n\treturn -1;\n }",
"public int getRenderType()\n {\n return 0;\n }",
"public int getRenderType()\r\n {\r\n return 1;\r\n }",
"public int getRenderType()\n {\n return 2;\n }",
"public int getRenderType()\n {\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Splits the list at the given index and returns a tuple containing both sublists. | Tuple<SmartList<E>, SmartList<E>> splitAt(int index); | [
"public static<T> List[] split(List<T> list)\n {\n // get size of the list\n int size = list.size();\n\n // construct new list from the returned view by list.subList() method\n List<T> first = new ArrayList<>(list.subList(0, (size + 1)/2));\n List<T> second = new ArrayList<>(li... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate the FDR for all files. If no score for the FDR calculation is given, use a default. | public void calculateAllFDR() {
fileReportPSMs.keySet().forEach(this::calculateFDR);
} | [
"public void calculateAllFDR() {\n\t\tfor (Integer fileID : filePSMs.keySet()) {\n\t\t\tcalculateFDR(fileID);\n\t\t}\n\t}",
"public void calculateCombinedFDRScore() {\n Map<String, List<ReportPSMSet>> fileLists = new HashMap<>();\n String key;\n\n updateDecoyStates(0L);\n\n // first we... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleNumberVariableDefinition" $ANTLR start "ruleNumberVariableDefinition" ../de.hs_rm.cs.vs.dsm.flow/srcgen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3324:1: ruleNumberVariableDefinition returns [EObject current=null] : ( ( (lv_type_0_0= ruleSimpleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) ... | public final EObject ruleNumberVariableDefinition() throws RecognitionException {
EObject current = null;
Token lv_name_1_0=null;
Token otherlv_2=null;
Token lv_value_3_0=null;
Token otherlv_4=null;
EObject lv_type_0_0 = null;
enterRule();
... | [
"public final EObject entryRuleNumberVariableDefinition() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleNumberVariableDefinition = null;\n\n\n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3316:2: (i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__JvmParameterizedTypeReference__ArgumentsAssignment_1_1" $ANTLR start "rule__JvmParameterizedTypeReference__ArgumentsAssignment_1_2_1" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:16934:1: rule__JvmParameterizedTypeReference... | public final void rule__JvmParameterizedTypeReference__ArgumentsAssignment_1_2_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcor... | [
"public final void rule__JvmParameterizedTypeReference__ArgumentsAssignment_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/Interna... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is required because we implement Comparable. Since we implement Comparable, we must take a Person other to compare to. In this case, we want to put the lowest heights first. Looking at the JavaDoc for this method, we find that returning a negative number means that this object should come before the other o... | @Override
public int compareTo(Person other) {
return this.height - other.height;
} | [
"@Override\n public int compare(Person o1, Person o2) {\n\n return o1.getAge() - o2.getAge();\n }",
"@Override\r\n public int compareTo(Person per) {\r\n if(this.age == per.age)\r\n return 0;\r\n else\r\n return this.age > per.age ? 1 : -1;\r\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column IMAL141_DEV_O18.S_CONTROL_PARAM.ADD_STRING8_PROTECTED | public String getADD_STRING8_PROTECTED() {
return ADD_STRING8_PROTECTED;
} | [
"public String getADD_STRING11_PROTECTED() {\r\n return ADD_STRING11_PROTECTED;\r\n }",
"public String getADD_STRING15_PROTECTED() {\r\n return ADD_STRING15_PROTECTED;\r\n }",
"public String getADD_STRING10_PROTECTED() {\r\n return ADD_STRING10_PROTECTED;\r\n }",
"public void set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generic Utility method to mapp the process number to the index in writer array | private static int mapProcessNumToWriterIndex(int ownerProcess, int receivingProcessNum) {
if (receivingProcessNum > ownerProcess)
return receivingProcessNum - 2;
else
return receivingProcessNum - 1;
} | [
"ProcessAdapter createProcessAdapter(int jobArrayIndex);",
"int writerIndex();",
"public void setProcessArray(int i, noNamespace.HostdashletDocument.Hostdashlet.Host.Processes.Process process)\r\n {\r\n synchronized (monitor())\r\n {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds a classloader and adds the specified entries to the classpath. | public static ClassLoader getCustomClassloader(String entries) {
if (entries == null) {
return getCustomClassloader((List) null);
}
List entryList = new ArrayList();
StringTokenizer st = new StringTokenizer(entries, ";");
while (st.hasMoreTokens()) {
... | [
"private org.apache.tools.ant.taskdefs.Path makeLoaderClasspath() {\n Path clspath = new Path(project);\n if (file != null)\n clspath.setLocation(file);\n\n // append any build supplied classpath\n if (classpath != null) {\n clspath.append(classpath);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Mostrar los datos del movil | public void consultarDatosMovil() {
datosTeclado teclado = new datosTeclado();
teclado.print("\nModelo: " + MODELO_MOVIL);
teclado.print("\nFecha Sistema: " + getFecha());
teclado.print("\nHora Sistema: " + getHora() + "\n\n");
} | [
"public void mostrarAutomovil(){\r\n System.out.println(\"Marca: \" + automovil.getMarca());\r\n System.out.println(\"Modelo: \" + automovil.getModelo());\r\n System.out.println(\"Placa: \" + automovil.getPlaca());\r\n }",
"private void visualizaMedicos(Clinica coleccion) throws Clinica.Inexis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleFullJvmFormalParameter" $ANTLR start "ruleFullJvmFormalParameter" ../org.xtext.guicemodules.ui/srcgen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1504:1: ruleFullJvmFormalParameter : ( ( rule__FullJvmFormalParameter__Group__0 ) ) ; | public final void ruleFullJvmFormalParameter() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1508:2: ( ( ( rule__FullJvmFormalParameter... | [
"public final void ruleFullJvmFormalParameter() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:1312:2: ( ( ( rule__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
generates the view with the different stops received from the driver. | private void generateBusLine(){
mStopList = findViewById(R.id.stopList_passenger);
mStopList.setHasFixedSize(true);
mStopListLayoutManager = new LinearLayoutManager(this);
mStopListAdapter = new StopListAdapter(stopList);
mStopList.setLayoutManager(mStopListLayoutManager);
... | [
"private String viewListOfStops() {\n StringBuilder result = new StringBuilder();\n for (TTC stops : this.listOfStops) {\n result.append(stops.toString());\n result.append(\" -> \");\n }\n return (result.toString()).substring(0, result.length() - 2);\n }",
"private List<RouteInfo> createLis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the units given by units1 and units2 give the same amount | public static boolean sameAmount(int [] units1, int [] units2) {
for (int i=0;i<CurrencyUnitType.values().length;i++) {
if(units1[i]!=0)
return false;
}
return true; } | [
"@Test\n public void given2InchesAnd2Inches_whenAdded_shouldReturn4(){\n QuantityMeasurement valueInInch1 = new QuantityMeasurement(AllUnitsToUse.UnitConverter.INCHES,2.0);\n QuantityMeasurement valueInInch2= new QuantityMeasurement(AllUnitsToUse.UnitConverter.INCHES,2.0);\n double check = v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when some slave becames nonexisting during shrink. Can be defined in descendants to perform cleaning actions. | void loosingSlave(IveObject slave); | [
"public void removeInvalid(IveObject slave);",
"private void maintain(){\n ArrayList<Integer> shutDown = new ArrayList<Integer>();\n for (String addr : slaveMap.keySet()){\n if (!responderList.containsKey(slaveMap.get(addr))){\n shutDown.add(slaveMap.get(addr));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for property idxSearchNoHtml. | public boolean isIdxSearchNoHtml() {
Preferences prefs = getPreferences();
return prefs.getBoolean(PROP_SEARCH_NO_HTML, false);
} | [
"public String getIndexStr() {\t\t\n\t\treturn indexStr;\n\t}",
"public boolean getNoIndex() {\n return noIndex;\n }",
"public String getSearchId() {\n return mSearchId;\n }",
"@Override\r\n public boolean allowHtmlListing()\r\n {\n return null == _indexPage;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .pomelo.area.CardAward s2c_cardAward = 5; | pomelo.area.CardHandler.CardAward getS2CCardAward(int index); | [
"pomelo.area.CardHandler.Card getS2CCard();",
"int getS2CCardAwardCount();",
"pomelo.area.CardHandler.CardOrBuilder getS2CCardOrBuilder();",
"pomelo.area.CardHandler.CardPropertyStruct getBaseAttNextLevel();",
"Card giveAdversaryCard();",
"pomelo.area.CardHandler.Card getS2CCard(int index);",
"pomelo.ar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the earliest counter that can accept waiting customers. | protected Optional<Counter> earliestAcceptableCounter() {
return servers.stream().filter(x -> x.canTakeServeEvent())
.min(Comparator.comparing(Counter::getNumInQ));
} | [
"protected Optional<Counter> earliestCounter() {\n return servers.stream().filter(x -> x.isAvailable())\n .min(Comparator.comparing(Counter::getNumInQ));\n }",
"public double minWait()\r\n {\r\n //find the minimum value in an arraylist\r\n double minWait = this.servedCustomer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
C\u00F3digo de Identifica\u00E7\u00E3o de Limite e Disponibilidade (id) | public LimiteDisponibilidadeResponse id(Long id) {
this.id = id;
return this;
} | [
"public int getLBR_NotaFiscal_ID();",
"public String getlbr_NFeID();",
"public String getId_Medico();",
"public long getId_ufficio();",
"public void setId_ufficio(long id_ufficio);",
"public int getNumIdCivil() {\n return numIdCivil;\n }",
"public ID getRestrictedDisclosureIndicator() { \r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns real solution x3 from the addition polynomial as a string. | public String getX3AddRealStr() {
this.polyAddSolve();
return this.x3realadd;
} | [
"public String getX3RealStr() {\n this.polySolve();\n return this.x3real;\n }",
"public String getX3SubRealStr() {\n this.polySubSolve();\n return this.x3realsub;\n }",
"public String getX2AddRealStr() {\n this.polyAddSolve();\n return this.x2realadd;\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the costprice property. | public float getCostprice() {
return costprice;
} | [
"public BigDecimal getCostPrice() {\n return costPrice;\n }",
"public BigDecimal getCostPrice() {\n return costPrice;\n }",
"String getCostPrice();",
"public double getCost() {\n String price = priceTextField.getText();\n try {\n double convertedPrice = Double.parseDoubl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to return option name if a radio button is selected (two options) | public String selectedRadioButton2o(JRadioButton button1, JRadioButton button2, String option1, String option2)
{
if (button1.isSelected())
{
return option1;
}
else if (button2.isSelected())
{
return option2;
}
... | [
"protected String getChoiceName() {\n\t\treturn choiceOption.getOptionName();\n\t}",
"public String getOptionChoice(int opSetIndex) {\n\t\treturn opset.get(opSetIndex).getOptionChoice().getName();\n\t}",
"private String getSelected(List<JRadioButton> buttons) {\n for (JRadioButton button : buttons) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the input order alias of this from expression item | public String getInputOrderVariable()
{
return m_input_order_var;
} | [
"public String getOrderitem() {\n\t\treturn orderitem;\n\t}",
"@Override\n\tpublic int getOrder() {\n\t\treturn _formItem.getOrder();\n\t}",
"public String getOrderItemName() {\n return orderItemName;\n }",
"public String getSelectedOrder() {\n Object selectedItem = getSelectedItem();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is this cell Rocky | public boolean isRocky()
{
return isRocky;
} | [
"public boolean isRocky() {\r\n\t\treturn this.rocky;\r\n\t}",
"public boolean isRock() {\n\t\treturn rock;\n\t}",
"public final boolean isRook() {\n return (this == WHITE_ROOK) || (this == BLACK_ROOK);\n }",
"public boolean tileOfHuman (int row, int col){\n return this.gameBoard[row][col] == 'o';\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the data lists. | protected DataLists createDataLists()
{
final DataLists dataLists = new DataLists();
final PassengerList passengerList = new PassengerList();
passengerList.getPassenger().addAll(getPassengerTypeMap().values());
dataLists.setPassengerList(passengerList);
final FlightList flightList = new FlightList();
fli... | [
"DataList createDataList();",
"public static void generateData() {\n users = getUsersList();\n projects = getProjectsList();\n statuses = getStatusesList();\n tasks = getTasksList();\n }",
"private void prepareListData() {\n\t\tlistDataHeader = new ArrayList<StockNewGetterSetter>(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the table name used for the version information table. | public void setVersionTableName( String value )
{
versionTableName = value;
} | [
"public void setTableName(String table_name);",
"public void setTableName(String name) {\n this.tableName = name;\n }",
"public void setName(String s)\n {\n tablename = s;\n }",
"public void setTableName(String value) {\n setAttributeInternal(TABLENAME, value);\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an array of all the index conglomerate ids on a table. | public long[] getIndexConglomerateNumbers() throws StandardException{
if(indexConglomerateNumbers==null){
getAllIndexes();
}
return indexConglomerateNumbers;
} | [
"public long[] getDistinctIndexConglomerateNumbers() throws StandardException{\n if(distinctIndexConglomerateNumbers==null){\n getAllIndexes();\n }\n return distinctIndexConglomerateNumbers;\n }",
"TableIndex[] listIndexes();",
"private void getAllIndexes() throws StandardExce... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
whether the MDate is after the given MDate | public boolean after(MDate md) { return time>md.time;} | [
"public boolean before(MDate md){ return time<md.time;}",
"boolean isAfter( DateTime other );",
"public boolean isAfter(Date b) {\r\n\t\treturn compareTo(b) > 0;\r\n\t}",
"public boolean after(Date other){\r\n\t\tif(other.before(this)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This interface provides methods for enable or disable devices from the energy network. | public interface Switchable {
/**
* This method connects device to energy network, and change flag (to true) responsible for the condition of the network device.
*/
public void switchOn();
/**
* This method disconnects device from energy network, and change flag (to false) responsible for t... | [
"@Override\n\tpublic void enabled(AbstractDevice<? extends AbstractDeviceListener> device) {\n\t\t\n\t\t\n\t}",
"public void enable() {\n disabled = false;\n updateSign(true);\n circuit.enable();\n notifyChipEnabled();\n }",
"@Override\n\tpublic void disabled(AbstractDevice<? exte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to load the subject details | void loadSubjectDetails() {
sbjDetails = adminOps.getSubjectDetails(); // retrieving the array list from the backend
SubjectDetails sbj = new SubjectDetails(sbjDetails); // create an instance of table loading class
tblSubjectDetails.setModel(sbj); ... | [
"private void getSubjectFromService() {\n if (NetworkUtilities.isConnected(this)) {\n mEmptyLayout.setVisibility(View.GONE);\n mSubjectRecyclerView.setVisibility(View.GONE);\n mProgressBar.setVisibility(View.VISIBLE);\n Intent intent = new Intent(this, LoadDataServ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads a game texture from a texture sheet. | public static GameTexture loadTextureFromSheet(BufferedImage sheet, String texName, int startX, int startY, int texWidth, int texHeight) {
return new GameTexture(texName, null, sheet.getSubimage(startX, startY, texWidth, texHeight));
} | [
"private void loadSheet() {\n\t\ttry {\n\t\t\tBufferedImage image = ImageIO.read(SpriteSheet.class\n\t\t\t\t\t.getResource(path));\n\t\t\tint w = image.getWidth();\n\t\t\tint h = image.getHeight();\n\t\t\timage.getRGB(0, 0, w, h, sheetPixles, 0, w);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Methode that will listen to a specifique hashtag and will return the result in live | public void listenToHashtag(String[] _keyWords){
TwitterStream ts = new TwitterStreamFactory(c).getInstance();
FilterQuery filterQuery = new FilterQuery();
filterQuery.track(_keyWords);
// On fait le lien entre le TwitterStream (qui r\u00e9cup\u00e8re les messages) et notre \u00e9couteu... | [
"public void listenToHashtag(String[] _keyWords){\n TwitterStream ts = new TwitterStreamFactory(c).getInstance();\n FilterQuery filterQuery = new FilterQuery(); \n filterQuery.track(_keyWords);\n // On fait le lien entre le TwitterStream (qui r\\u00e9cup\\u00e8re les messages) et notre \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fires the suitable notification corresponding to the SaveablesLifecycleEventType. Notification is performed inside UI thread. | private void fireSaveablesLifecycleEventUIThread(final Saveable saveable, final int saveablesLifecycleEventType,
boolean async)
{
if (disposed)
{
return;
}
Display display = ExtendedPlatformUI.getDisplay();
if (display != null)
{
if (async)
{
display.asyncExec(new Runnable()
{
publi... | [
"private static void dispatch(Saveable saveable, int saveablesLifecycleEventType)\n\t{\n\t\tsynchronized (providers)\n\t\t{\n\t\t\tfor (CessarSaveablesProvider provider: providers)\n\t\t\t{\n\t\t\t\tprovider.fireSaveablesLifecycleEventUIThread(saveable, saveablesLifecycleEventType, true);\n\t\t\t}\n\t\t}\n\t}",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is going to check if the file is in the acccessed range selected by the user | private boolean isWithinAccessedRange(File file)
{
String istoday=searchCriterial.getTimeOption();
boolean isInRangeAccess=false;
BasicFileAttributes fileAttributes;
DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");
switch(istoday) {
case "Today":
... | [
"private boolean isWithinCreatedRange(File file)\n {\n String istoday=searchCriterial.getTimeOption();\n boolean isInRange=false;\n BasicFileAttributes fileAttributes;\n DateFormat dateFormat=new SimpleDateFormat(\"yyyy-MM-dd\");\n switch(istoday) {\n case \"Today\":... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the comma delimited list of hostnames to be allowed for hostname validation | public void setValidHostnames(String hostnames) throws MBeanException ; | [
"@Inject(optional = true)\n public void setInsecureHosts(@Named(\"insecureHosts\") final String insecureHosts) {\n String[] insecureHostsArray = insecureHosts.split(\",\");\n for (String insecureHost : insecureHostsArray) {\n insecureHostsList.add(insecureHost.trim());\n }\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.POGOProtos.Rpc.HoloTemporaryEvolutionId current_temp_evolution = 8; | int getCurrentTempEvolutionValue(); | [
"POGOProtos.Rpc.HoloTemporaryEvolutionId getCurrentTempEvolution();",
"POGOProtos.Rpc.HoloTemporaryEvolutionId getLockedTempEvolution();",
"int getLockedTempEvolutionValue();",
"POGOProtos.Rpc.HoloTemporaryEvolutionId getMegaForm(int index);",
"public EngineTemp() {\r\n\t\ttempHigh=false;\r\n\t}",
"BigInt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find index of next EOL after pos. | private int nextEOL( int pos )
{
for( int i= pos; i < mBuffer.limit(); i++ )
{
char c= Character.toChars( (int) mBuffer.get( i ) )[0];
if( c == '\r' || c == '\n' )
{
return i;
}
}
return mBuffer.limit();
} | [
"public int posInLine() {\r\n\t\t\treturn Scanner.this.posInLine(pos) + 1;\r\n\t\t}",
"public static int nextLineIndex(StringBuffer buff, int currentPos) {\n\t\tint pos = currentPos;\n\t\tboolean inFirstLine = true;\n\t\twhile (pos < buff.length() && inFirstLine) {\n\t\t\tchar c = buff.charAt(pos);\n\t\t\t// try ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Product product = getProductByProductID(pid); addToCart(product)} | public void addProductToCartByPID(Product product) {
cart.add(product);
setCart(cart);
//System.out.println(""+cart);
//System.out.println("addtocart" + product);
//System.out.println("get cart" + cart);
//return cart;
} | [
"void addProductToCartList(Product product);",
"void addProduct(Product product);",
"public void addProduct() {\n\t}",
"public void addProduct(Product product);",
"Product storeProduct(Product product);",
"void addCartItem(CartItem cartItem);",
"List<CartModificationData> addDealToCart(AddDealToCartData... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return messages from input stream. This call is blocking until at least 1 message exists. Number of messages returned may be less than requested. It is up to the caller to parse the byte array for individual messages. Only whole messages are returned in the byte stream. | public byte[] readBytes(int inNumberMessages) throws IOException; | [
"public ITCMessage[] readMessages(int inNumberMessages) throws IOException;",
"ReadResponseMessage fetchAllMessages();",
"public static List<String> getMessages(Reader reader) throws IOException, InterruptedException {\n\t\t/**\n\t\t * Create a blocking read waiting for the next communication.\n\t\t */\n\t\tint... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the terrain type of this workshop cube. | @Override @Raw
public int getTerrainType() {
return 3;
} | [
"public String getTerrainType() {\n\t\treturn terrainType;\n\t}",
"public Object getCubeType(int x, int y, int z){\r\n\t\tif (this.TerrainTypes[x][y][z] == 0)\r\n\t\t\treturn TYPE_AIR;\r\n\t\telse if (this.TerrainTypes[x][y][z] == 1)\r\n\t\t\treturn TYPE_ROCK;\r\n\t\telse if (this.TerrainTypes[x][y][z] == 2)\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ tests for a special bug which we once had, where radio buttons lost their state after switching spreadsheet pages | public void checkCalcPageSwitch( ) throws com.sun.star.uno.Exception, java.lang.Exception
{
prepareTestStep( true );
m_formLayer.setInsertPage( 0 );
insertRadio( 15, 20, "group 1 (a)", "group 1", "a" );
insertRadio( 15, 26, "group 1 (b)", "group 1", "b" );
m_formLayer.set... | [
"@Test(priority=2)\n\tpublic void verifyMaleRadioBtn() {\n\t\tboolean radioBtn = driver.findElement(By.xpath(\"(//input[contains(@type,'radio')])[2]\")).isSelected();\n\t\tAssert.assertFalse(radioBtn);\n\t}",
"private void reloadAccountTypeRadioButtons() {\n accountTypeStandardJRadioButton.setSelected(tru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setting up the types of Click Listeners in the fragment. | private void setUpClickListeners(){
Log.i(TAG, "setUpClickListeners: Setting up the click listeners");
relLayout.setOnClickListener(this);
mProfilePhoto.setOnClickListener(this);
mBackArrow.setOnClickListener(this);
mCheck.setOnClickListener(this);
} | [
"private void setButtonOnClickListeners() {\n aboutUsButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goToFragment(v, new AboutUsFragment());\n }\n });\n\n contactUsButton.setOnClickListener(new ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Evaluates target to a boolean value. | boolean evaluate(T target); | [
"public boolean booleanValue();",
"boolean getBoolValue();",
"public RequestMatcher booleanValue(Boolean value) {\n\t\treturn (XpathRequestMatcher) request ->\n\t\t\t\tthis.xpathHelper.assertBoolean(request.getBodyAsBytes(), DEFAULT_ENCODING, value);\n\t}",
"public boolean evalBool() throws CodaException\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
////////////////////////////////////////////////////////////////////// Description: Copies a point detail from the given detail. Use: extender | public void
setPoint(int index, final SoPointDetail pd)
//
////////////////////////////////////////////////////////////////////////
{
point[index].copyFrom(pd);
} | [
"public void\nsetDetail(SoDetail detail, SoNode node)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int i;\n\n // Find node in path\n i = getNodeIndex(node);\n\n//#ifdef DEBUG\n// if (i < 0)\n// SoDebugError::post(\"SoPickedPoint::setDetail\",\n// ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a table with the given extra fields. The extended table includes the fields of this base table plus the extended fields that do not have the same name as a field in the base table. | AlgOptTable extend( List<AlgDataTypeField> extendedFields ); | [
"Table getBaseTable();",
"@Override\n public Object clone() throws CloneNotSupportedException \n {\n DBTable clone = (DBTable) super.clone();\n initClonedFields(clone);\n // set new alias\n clone.alias = \"t\" + String.valueOf(tableCount.incrementAndGet());\n // done\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the file path for the HMetis Input File | protected void createHMetisInFilePath() {
String file = "";
file += this.getRuntimeEnv().getOptionValue(PTArgString.OUTPUTDIR);
file += Utils.getFileSeparator();
file += "TEMP_GRAPH_FILE.hgr";
this.setHMetisInFile(file);
} | [
"protected void createHMetisOutFilePath() {\n\t\tString file = \"\";\n\t\tfile += \"TEMP_GRAPH_FILE.hgr.part.\";\n\t\tfile += this.getPartitioner().getPartition().getNumBlock();\n\t\tthis.setHMetisOutFile(file);\t\n\t}",
"java.lang.String getInputPath();",
"public IPath getInputFileLocation();",
"public GridF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if: 1. the event refers to an object of the type handled by this listener 2. the event refers to a successful create | protected boolean _isEventForSuccessfulCreate(final PersistenceOperationOKEvent opEvent) {
PersistenceOperationOK opResult = opEvent.getResultAsOperationOK();
boolean handle = _crudOperationOKEventFilter.hasTobeHandled(opEvent);
if (!handle) return false;
return ((opResult.isCRUDOK())
&& (opResult.as(CRU... | [
"protected boolean _isEventForSuccessfulCreateOrUpdate(final PersistenceOperationOKEvent opEvent) {\t\n\t\tPersistenceOperationOK opResult = opEvent.getResultAsOperationOK();\n\t\tboolean handle = _crudOperationOKEventFilter.hasTobeHandled(opEvent);\n\t\tif (!handle) return false;\n\t\t\n\t\treturn ((opResult.isCRU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for property tspStdClaId. | public void setTspStdClaId(String tspStdClaId) {
this.tspStdClaId = tspStdClaId;
} | [
"public String getTspStdClaId() {\n return tspStdClaId;\n }",
"public void setTspStdClaName(String tspStdClaName) {\n this.tspStdClaName = tspStdClaName;\n }",
"public String getTspStdClaName() {\n return tspStdClaName;\n }",
"public void setSPCASPCLID(java.lang.CharSequence valu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Returns true if the piece at x, y can be taken by the current player. This method assumes that the player has a piece in an appropriate position for capturing and that by jumping the player's piece ends up in a valid location. | private boolean canTake(int x, int y){
Piece jumping = pieceAt(x, y);
return jumping != null && !sameTeam(jumping);
} | [
"public boolean canSelect(int x, int y) {\n \tif (x < 0 || x > 7 || y < 0 || y > 7) {\n \t\treturn false;\n \t}\n \t// true if there is a piece, it is yours, and you have not already moved\n \tif (this.pieceAt(x, y) != null && (this.pieceAt(x, y).side() == player) && moved == false) {\n \t\treturn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |