query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
gets current mission card | public MissionCard getCurrMission() {
//send the command to the server
Response reply = this.sendResponseCommand(new Command(CMD_GET_CURR_MISSION, null));
//get the result from the response
if ( !reply.getKeyword().equals(RESP_MISSION) ) {
throw new InvalidResponseException("Invalid re... | [
"public String getCurrentMission() {\n\n if ( game.getGameMode() == RiskGame.MODE_DOMINATION ) {\n return resb.getString( \"core.mission.conquerworld\");\n }\n //else if ( game.getGameMode() == 1 ) {\n //\treturn resb.getString( \"core.mission.eliminateenemy\");\n //}\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes a list of documents by unique ID, specifying max time before commit | public UpdateResponse deleteById(List<String> ids, int commitWithinMs) throws SolrServerException, IOException {
UpdateRequest req = new UpdateRequest();
req.deleteById(ids);
req.setCommitWithin(commitWithinMs);
return req.process(this);
} | [
"public void del(String docId);",
"void deleteMany(Iterable<Long> ids);",
"int deleteToDos(List<Long> ids);",
"public void removeByDocumentId(long documentId);",
"void deleteAddlDoc(String username, String deleteFilename, String datasetId, TreeSet<String> allDatasetIds,\n AsyncCallback<DashboardD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/int update = template.update( "UPDATE user_product_bid set amount = ? where userid = ? and productid = ?", bup.getAmount(), bup.getUser(), bup.getPid() ); return update > 0 ? "true" : "false"; | public void updateBiddingDetails(BidUpdate bup) {
String updateQuery = "UPDATE user_product_bid set amount = ? where userid = ? and productid = ?";
template.update(updateQuery, bup.getAmount(), bup.getUser(), bup.getPid());
/*final String SQL = "select * from products where productid = ?";
final String... | [
"public boolean update(Product p){\n ContentValues contvalu= new ContentValues();\n //contvalu.put(\"date_created\", \"datetime('now')\");\n contvalu.put(\"name\",p.getName());\n contvalu.put(\"feature\",p.getFeature());\n contvalu.put(\"price\",p.getPrice());\n return (cx.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a ClusterAnalysisDTO into a JSONObject | public static JSONObject convertClusterAnalysisDTOToJsonObject(
ClusterAnalysisDTO clusterAnalysisDTO) throws JAXBException {
return dtoToJson(clusteranalysisMarshaller, clusterAnalysisDTO);
} | [
"@Override\n @GET\n @Produces(\"application/json\")\n public Response getCluster() throws JSONException {\n if (log.isTraceEnabled()) {\n log.trace(String.format(\"getCluster(ID=%d) started.\", cluster.getClusterId()));\n }\n\n JSONObject json = cluster.toJSON();\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interpola os pixels da imagem. | public int[][] interpolateImage( ) {
long ti = System.currentTimeMillis();
//para inicializar a interpolacao para depois usar max e min
int maxValue = 257, minValue = -1;
//interpolation tem tamanho 4 vezes para x e y
// tem 2 valores ( 0 -> menor e 1 -> maior )
this.inte... | [
"public void esconderImagem() {\n\t\tfor (int x = 0; x < larguraImagem; x++) {\n\t\t\tfor (int y = 0; y < alturaImagem; y++) {\n\t\t\t\timagemResultante.setRGB(x, y, escondePixel(imagemSecreta.getRGB(x, y), imagemCarregada.getRGB(x, y)));\n\t\t\t}\n\t\t}\n\t}",
"public static void imprimePixeis(BufferedImage buf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Utility function to find XPATH in idd for customer | public String customerqueryXpath(String fileld) throws Exception
{
String QueryXpath="";
try{
QueryXpath="//*[contains(text(),'"+fileld+"')]//following::div[1]/input";
}
catch(Exception e)
{
e.printStackTrace();
}
return QueryXpath;
} | [
"private String getCustomerId(String xmlResponse) {\r\n\t\t\r\n\t\tString customerId = \"\";\r\n\t\tElement root;\r\n\t\t\r\n\t\ttry {\r\n\t\t\troot = DOMUtils.openDocument(new ByteArrayInputStream(xmlResponse.getBytes()));\r\n\t\t\tElement element = DOMUtils.getElement(root, \"data\", true);\r\n\t\t\t\r\n\t\t\tele... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets team 2 count. | public Integer getTeam2Count() {
return team2Count;
} | [
"public int getAmountOfTeams();",
"private int getNumberOfGamesBetweenTwoTeams(Integer team1Number, Integer team2Number) {\n switch (team1Number.compareTo(team2Number)) {\n case 0:\n return 0;\n case 1: {\n int[] teamGames = teamsGames... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An object that represents an aggregation of some accumulated source "samples" and returns the aggregation results as a vector of numbers. | public interface Aggregation {
final int SST = 0;
final int SST_ANOMALY = 1;
final int RANDOM_UNCERTAINTY = 2;
final int COVERAGE_UNCERTAINTY = 3;
final int LARGE_SCALE_UNCERTAINTY = 4;
final int ADJUSTMENT_UNCERTAINTY = 5;
final int SYNOPTIC_UNCERTAINTY = 6;
final int SEA_ICE_FRACTION ... | [
"public double getAggregateValue();",
"public void aggregate(double value);",
"private void sampleOfTheGeneratedWindowedAggregate() {\n Iterator<Integer[]> iterator = null;\n\n // builder3\n Integer[] rows = iterator.next();\n\n int prevStart = -1;\n int prevEnd = -1;\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for TRUST_CHECK using the alias name TrustCheck. | public String getTrustCheck() {
return (String) getAttributeInternal(TRUSTCHECK);
} | [
"public void setTrustCheck(String value) {\n setAttributeInternal(TRUSTCHECK, value);\n }",
"public String getCheckName() {\n return checkName;\n }",
"public long getCheckPurpose() {\n return checkPurpose;\n }",
"public String getCHECK_ROLE() {\r\n return CHECK_ROLE;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column cabinet_info.temperature_two | public void setTemperatureTwo(BigDecimal temperatureTwo) {
this.temperatureTwo = temperatureTwo;
} | [
"public BigDecimal getTemperatureTwo() {\n return temperatureTwo;\n }",
"public void setContainerTemperature2(double value) {\r\n this.containerTemperature2 = value;\r\n }",
"public void setTemperatureOne(BigDecimal temperatureOne) {\n this.temperatureOne = temperatureOne;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the name to record in usage tracking. | public abstract String getUsageName(); | [
"String generateName() {\n if (logger.isInfoEnabled()) {\n return nextName();\n } else {\n return null;\n }\n }",
"public java.lang.String getNameUsageValue() {\n return nameUsageValue;\n }",
"public String getStatUse() {\n return statUse.formatRati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the response from the db is a valid one | private boolean checkIfValidResponse(ResultSet rs) {
if (rs == null) {
System.out.println("RPdbConnection - ERROR: RS is null");
return false;
}
int a = 0;
try {
while (rs.next()) {
a++;
}
} catch (SQLException e) {
System.out
.println("RPdbConnection - ERROR: Problem reading response"... | [
"void checkResponse(String response) {\n //TODO fill\n }",
"boolean isErrorResponse();",
"private void checkError(String response) {\n if (errorClass == String.class) {\n handleSuccess(response);\n return;\n }\n\n Object error = gson.fromJson(response, errorC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the default values of a racecar to the fields. If there is no default value it sets empty | private void setDefaultValues() {
nameInput.setText("");
frontTrackInput.setText(String.valueOf(RaceCar.getDefaultTrack()));
cornerWeightFLInput.setText(String.valueOf(RaceCar.DEFAULT_CORNER_WEIGHT_FL()));
cornerWeightRLInput.setText(String.valueOf(RaceCar.DEFAULT_CORNER_WEIGHT_RL()));
... | [
"private void setRaceCarDefaultsToValues(RaceCar raceCar) {\n raceCar.setName(nameInput.getText());\n raceCar.setFrontTrack(Double.valueOf(frontTrackInput.getText()));\n raceCar.setRearTrack(Double.valueOf(rearTrackInput.getText()));\n raceCar.setCogHeight(Double.valueOf(cogInput.getText... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set line number align | public void setLineNumberAlign(Paint.Align align){
if(align == null){
align = Paint.Align.LEFT;
}
mLineNumberAlign = align;
invalidate();
} | [
"public void setPageNumberHorizontalAlignment(int align) {}",
"public void setPageNumberVerticalAlignment(int align) {}",
"public void setLineAlignment(HorizontalAlignment alignment) {\r\n this.lineAlignment = alignment; \r\n }",
"void setRowalign(String rowalign);",
"void setLineNumber(int line... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints accounts in the database | public String printAccounts() {
StringBuilder result;
result = new StringBuilder(("--Listing accounts in the database--\n"));
for (int i = 0; i < size; i++) {
result.append(accounts[i].toString()).append("\n");
}
result.append("--end of listing--");
return res... | [
"public void printAccounts() { \r\n\t\tif ( size == 0 ) {\r\n\t\t\tSystem.out.println(\"Accounts is empty\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"--Listing accounts in the database--\");\r\n\t\tfor(int i = 0; i < accounts.length; i++) {\r\n\t\t\tif ( accounts[i] != null ) {\r\n\t\t\t\tSyst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Counts the number of times a given character appears in a given expression | private static int characterCount(String expr, Character c) {
int count = 0;
for(Character ch : expr.toCharArray()) if(ch == c) count ++;
return count;
} | [
"public static int counting(String input, char charc) \n {\nint times = 0;\n//for loop to loop through the text and check for the character (charc) at each index\nfor(int Count1 = 0; Count1 < input.length(); Count1++)\n {\n\n if( charc == input.charAt(Count1))\n times = times +1;\n }\nreturn times;\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A ChannelBuilder interface to build Channel based on configs | public interface ChannelBuilder {
/**
* Configure this class with the given key-value pairs
*/
void configure(Map<String, ?> configs) throws KafkaException;
/**
* returns a Channel with TransportLayer and Authenticator configured.
* @param id channel id
* @param key SelectionK... | [
"protected abstract ChannelInitializer<Channel> createChannelInitializer ();",
"Channel createChannel();",
"public interface ChannelConfiguration {\n\n\t/**\n\t * Channel manager should use driver in listening mode\n\t */\n\tpublic static final long LISTEN_FOR_UPDATE = -1;\n\n\t/**\n\t * ChannelManager should u... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the data item associated with the specified position in the data set. | public T getItem(int position) {
return mData.get(position);
} | [
"@Nullable\n public T getItem(@IntRange(from = 0) int position) {\n if (position < mData.size())\n return mData.get(position);\n else\n return null;\n }",
"public T getItem(int position) {\n return mDataList.get(position);\n }",
"T getItem(int position);",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Uses sender instructions to build a formatted string. Sender list instructions contain compact information about the sender list. Most work that can be done without knowing how much room will be availble for the sender list is done when creating the instructions. The instructions string consists of tokens separated by ... | public static synchronized void getSenderSnippet(String instructions,
SpannableStringBuilder senderBuilder, SpannableStringBuilder statusBuilder,
int maxChars, CharacterStyle unreadStyle, CharacterStyle readStyle,
CharacterStyle draftsStyle, CharSequence meString, CharSequence draftS... | [
"private String craftSenderText(Message msg){\n\n //The User ID\n String senderTxt = msg.getSentByUserId();\n\n //Add the timestamp\n if(msg.getSentAt() != null) {\n senderTxt += \" @ \" + new SimpleDateFormat(\"HH:mm:ss\").format(msg.getReceivedAt());\n }\n\n //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Links the Game Center account associated with the provided Game Center ID to the user's PlayFab account | public static PlayFabResult<LinkGameCenterAccountResult> LinkGameCenterAccount(LinkGameCenterAccountRequest request) {
FutureTask<PlayFabResult<LinkGameCenterAccountResult>> task = new FutureTask(new Callable<PlayFabResult<LinkGameCenterAccountResult>>() {
public PlayFabResult<LinkGameCenterAccountR... | [
"public static FutureTask<PlayFabResult<LinkGameCenterAccountResult>> LinkGameCenterAccountAsync(LinkGameCenterAccountRequest request) {\n return new FutureTask(new Callable<PlayFabResult<LinkGameCenterAccountResult>>() {\n public PlayFabResult<LinkGameCenterAccountResult> call() throws Exception ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns data set cameras minimum quantity | public int getCameraMin() {
return cameraMin;
} | [
"public int minCameraCoverSol(TreeNode root) {\n cameras = 0;\n if (dfs(root) == 0) {\n cameras++;\n }\n return cameras;\n }",
"public int getMinimumVisibleIllumination();",
"int getMinInstances();",
"private void findCameraSize() {\r\n\t\t \tcamera = Camera.open();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column perms.perms_t_staff.cl_province_code | public String getClProvinceCode() {
return clProvinceCode;
} | [
"java.lang.String getProvinceCode();",
"public Long getProvinceCitiesCode() {\n return provinceCitiesCode;\n }",
"public String getProvinceCode() {\r\n return provinceCode;\r\n }",
"public String getProvinceCode() {\n return provinceCode;\n }",
"public Integer getProvinceid() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleNoQuoteString" $ANTLR start "ruleNoQuoteString" ../org.osate.xtext.aadl2.properties/srcgen/org/osate/xtext/aadl2/properties/parser/antlr/internal/InternalPropertiesParser.g:1320:1: ruleNoQuoteString returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : this_STRING_0= RULE_STRING ; | public final AntlrDatatypeRuleToken ruleNoQuoteString() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_STRING_0=null;
enterRule();
try {
// ../org.osate.xtext.aadl2.properties/src-gen/org/osate/xtext/aa... | [
"public final String entryRuleNoQuoteString() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleNoQuoteString = null;\n\n\n try {\n // ../org.osate.xtext.aadl2.properties/src-gen/org/osate/xtext/aadl2/properties/parser/antlr/internal/InternalPro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates a checksum of the passed value according to the luhn algorithm. | private static int calculateLuhn(String number) {
int luhn = 0;
for (int i = number.length() - 1; i >= 0; i--) {
int c = number.charAt(i) - 48;
luhn += i % 2 == 0 ? (c *= 2) > 9 ? c - 9 : c : c;
}
return luhn != 0 ? 10 - luhn % 10 : luhn;
} | [
"int calcChecksum(String in);",
"private static int getLuhnSum(String pinString) {\n int[] multiplier = {SIZE_OF_RAW_PIN % 2 == 0 ? 2 : 1}; // Allows for easier refactoring to different PIN sizes\n return pinString.chars()\n .map(i -> i - '0')\n .map(n -> n * (multiplie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AllplayersAtHome returns false if any of the team are not located within their home region | public boolean allPlayersAtHome() {
for (PlayerBase player : players) {
if (player.IngetHomeRegion() == false) {
return false;
}
}
return true;
} | [
"public boolean hasHOMETEAM() {\n return fieldSetFlags()[12];\n }",
"public void returnAllFieldPlayersToHome() {\n for (PlayerBase it : players) {\n if (it.getRole() != PlayerRole.GoalKeeper) {\n Dispatcher.Instance().dispatchMsg(Dispatcher.SEND_MSG_IMMEDIATELY, 1, it.getI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated fixed64 stringArgHash = 10; | long getStringArgHash(int index); | [
"int getStringArgHashCount();",
"String doubleHash(String data);",
"String hashFast(String data);",
"java.util.List<java.lang.Long> getStringArgHashList();",
"private long hashTo64bit(String string) {\n\t\t// Take a large prime\n\t\tlong h = 1125899906842597L; \n\t\tint len = string.length();\n\n\t\tfor (in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleNumValue" $ANTLR start "entryRuleBoolValue" InternalDsl.g:1579:1: entryRuleBoolValue : ruleBoolValue EOF ; | public final void entryRuleBoolValue() throws RecognitionException {
try {
// InternalDsl.g:1580:1: ( ruleBoolValue EOF )
// InternalDsl.g:1581:1: ruleBoolValue EOF
{
if ( state.backtracking==0 ) {
before(grammarAccess.getBoolValueRule());
... | [
"public final EObject entryRuleBoolValue() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBoolValue = null;\n\n\n try {\n // InternalDsl.g:4804:50: (iv_ruleBoolValue= ruleBoolValue EOF )\n // InternalDsl.g:4805:2: iv_ruleBoolValue= ruleBoolValue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'var23' field has been set. | public boolean hasVar23() {
return fieldSetFlags()[24];
} | [
"public boolean hasVar123() {\n return fieldSetFlags()[124];\n }",
"public boolean hasVar22() {\n return fieldSetFlags()[23];\n }",
"public boolean hasVar231() {\n return fieldSetFlags()[232];\n }",
"public boolean hasVar43() {\n return fieldSetFlags()[44];\n }",
"public bool... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches the subscription channel registered at a specific id. | protected @Nullable NotificationEmitter<T> fetchSubscriptionChannel(String id) {
if (id == null) {
return null;
}
return store.get(id);
} | [
"@Override\n public Optional<Channel> getChannelById(int id) throws SQLException {\n return channelDB.getChannel(id);\n }",
"public Channel getChannel(String ID) {\r\n return (Channel) channels.get(ID);\r\n }",
"ChabuChannel getChannel( int channelId );",
"String getChannelId();",
"public @... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fail network connection attempt and verify HasEverConnected remains false. Test: Successfully create a network but fail when connecting. Check the config and verify WifiConfiguration.getHasEverConnected() is false. | @Test
public void connectionFailureDoesNotSetHasEverConnectedTrue() throws Exception {
testDhcpFailure();
verify(mWifiConfigManager, never()).updateNetworkAfterConnect(0);
} | [
"@Test\n public void testSyncDisableNetwork_failure() throws Exception {\n loadComponentsInStaMode();\n mWsm.setOperationalMode(WifiStateMachine.CONNECT_MODE);\n assertEquals(WifiStateMachine.CONNECT_MODE, mWsm.getOperationalModeForTest());\n assertEquals(\"DisconnectedState\", getCur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
initializes the value by an eventg | void initializeValue(Event e); | [
"public abstract void initEvent();",
"void initValue(int index,BinData bd);",
"public GbossValue() {\n super();\n }",
"public void initialize() {\r\n\t\tsetValue(initialValue);\r\n\t}",
"public void Add_event_value(String v)\n {\n\n event_value = new String(v);\t\n }",
"public Event() {\r\n\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the BookOffering field. | public void setBookOffering(java.lang.String value); | [
"public void setServiceOffering(java.lang.String serviceOffering) {\r\n this.serviceOffering = serviceOffering;\r\n }",
"public void setAlertOffering( org.webcat.schedulesheets.EmailAlertForAssignmentOffering value )\n {\n if (log.isDebugEnabled())\n {\n log.debug( \"setAlert... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spring Data JPA repository for the Usager entity. | @SuppressWarnings("unused")
public interface UsagerRepository extends JpaRepository<Usager,Long> {
} | [
"@Repository\npublic interface UinRepository extends BaseRepository<UinEntity, String> {\n\n\t/**\n\t * Finds the number of free uins\n\t * \n\t * @return the number of free uins\n\t */\n\t@Query\n\tpublic int countFreeUin();\n\n\t/**\n\t * Finds an unused uin\n\t * \n\t * @return an unused uin\n\t */\n\t@Query\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the string encoding of the points in this line. | public String getRawPoints(); | [
"public String toString()\n\t{\n\t\tString data = \"(\" + x + \", \" + y + \")\";\n\t\treturn data;\t\t\t\t\t\t\t\t\t\t\t// Return point's data \n\t}",
"public String getPrettyCoordinates() {\n\t\treturn coordinateTools.localToPrettyCoordinates(this);\n\t}",
"public String getPoints();",
"public String getCoo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column FreeHost_Product_VPS.unit_code | public Byte getUnitCode() {
return unitCode;
} | [
"public String getUnit_code() {\n\t\treturn unit_code;\n\t}",
"public BigDecimal getUNIT_CODE()\r\n {\r\n\treturn UNIT_CODE;\r\n }",
"public void setUnitCode(Byte unitCode) {\r\n this.unitCode = unitCode;\r\n }",
"public String getCode(){\n if (!isProcedure())\n return null;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
=========================================================================== If true, SQL files should be parsed. | boolean loadSQL(); | [
"public boolean isSql() {\n switch (this) {\n case FLAT_FILE:\n return false;\n case MYSQL:\n case SQL:\n return true;\n }\n return false;\n }",
"public static boolean verifySQL(String sql){\n\n List<StatementSplitter.St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Container's getter for DeptLocFkLink. | public ViewLinkImpl getDeptLocFkLink() {
return (ViewLinkImpl) findViewLink("DeptLocFkLink");
} | [
"public ViewLinkImpl getLocDeptFkLink22() {\n return (ViewLinkImpl) findViewLink(\"LocDeptFkLink22\");\n }",
"public ViewLinkImpl getLocCIdFkLink() {\n return (ViewLinkImpl) findViewLink(\"LocCIdFkLink\");\n }",
"public ViewLinkImpl getEmpDeptFkLink() {\n return (ViewLinkI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load the list of projects available to the user, which is represented by the API access key. Redmine ignores "get trackers info" parameter for "get projects" request. see bug The field is already accessible for a specific project for a long time (GET /projects/:id) but in the projects list (GET /projects) it's only on ... | public List<Project> getProjects() throws RedmineException {
try {
return transport.getObjectsList(Project.class,
new BasicNameValuePair("include", "trackers"));
} catch (NotFoundException e) {
throw new RedmineInternalError("NotFoundException received, which ... | [
"public KWJSONRecord[] projects() {\n\t\tString request = \"user=\" + m_kw_properties.getProperty(\"kwwebapiuser\") +\n\t\t\t\t\"&action=\" + \"projects\";\n\t\treturn sendRequest(request);\n\t}",
"public List getProjects(XWikiContext context) throws XWikiException {\r\n List list = null;\r\n Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtain the path to the (stacklevel) Kerberos descriptor preconfiguration file | public String getKerberosDescriptorPreconfigureFilePath() {
return kerberosDescriptorPreconfigureFilePath;
} | [
"public String getKrb5ConfigurationFile()\n {\n return krb5ConfigurationFile;\n }",
"public static String getAccessFileName(){\r\n return conf_var.get(\"AccessFileName\");\r\n }",
"private String getOverlordPropertiesFilePath() {\n String karaf_home = System.getProperty(\"karaf.home\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if(il > ir || jl > jr) return 0; | public static int dfs(int il,int ir, int jl,int jr){
if( dp[il][ir][jl][jr] > 0) return dp[il][ir][jl][jr];
//dp[il][ir][jl][jr] = 0;
int max = 0;
int one = 0; int two = 0;
if(ir > il) one = a[ir-1]-a[il];
if(jr > jl) two = b[jr-1]-b[jl];
int sum = one + two;
... | [
"private int query(int a, int b, int k, int l, int r) {\n if (r <= a || b <= l) return 0;\r\n\r\n if (a <= l && r <= b) {\r\n return dat[k];\r\n } else {\r\n int vl = query(a, b, k * 2 + 1, l, (l + r) / 2);\r\n int vr = query(a, b, k * 2 +... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Operation__FeaturesOutputAssignment_4_3" $ANTLR start "rule__Operation__ExceptiontsAssignment_5_2" ../com.mguidi.soa.ui/srcgen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:4288:1: rule__Operation__ExceptiontsAssignment_5_2 : ( ( ruleQualifiedName ) ) ; | public final void rule__Operation__ExceptiontsAssignment_5_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:4292:1: ( ( ( ruleQualifiedName ) ) )
/... | [
"public final void rule__Operation__ExceptiontsAssignment_5_3_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:4311:1: ( ( ( ruleQualifiedName ) ) )... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the time for last movement | public void updateLastMoveTime(long nowTime) {
this.lastMoveTime = nowTime;
} | [
"public void setLastMove(long lastMove)\r\n {\r\n mLastMove = lastMove;\r\n }",
"void setMoveTime(long current, long max);",
"public void setLastTime() {\r\n\t\tlLastTime = (new Date()).getTime();\r\n\t}",
"public void setTimeToMove(float time_)\n\t{\n\t\tthis.timeToMove=time_;\n\t}",
"public v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ / Gets the document of a page range. / / / 1based index of the start page. / / / 1based index of the end page. / / / The . / | public Document getDocumentOfPageRange(int startIndex, int endIndex)
{
Document result = (Document) Document.deepClone(false);
for (Node section : pageNumberFinder.RetrieveAllNodesOnPages(startIndex, endIndex,
NodeType.SECTION) !!Autoporter error: Undefined expression type )
... | [
"int getPageRange();",
"@VTID(29)\r\n excel.Range getPageRange();",
"int getPageIndex();",
"public int getEndPage();",
"short getPageStart();",
"public String textBetween(int start, int end) throws Exception {\n\t\tAssert.isLegal(start<=end);\n\t\tif (start>=doc.getLength()) {\n\t\t\treturn \"\";\n\t\t}\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads a Date from a stream. | public static Date readDate(DataInputStream dis) throws IOException {
if(dis.readBoolean())
return new Date(dis.readLong());
return null;
} | [
"private static LocalDate readDate() throws Exception {\n\t\treturn LocalDate.parse(In.readLine(), dateFormatter);\n\t}",
"public static Date readDate(byte[] bytes){\r\n\t\t\r\n\t\tByteBuffer bb = ByteBuffer.wrap(bytes);\r\n\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\t\t\r\n\t\t\r\n\t\tlong miliseconds = 0xFFFFFFFF & ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the play fragment in an activity. | public PlayFragment getPlayFragment() {
return this.playFragment;
} | [
"String getFragment();",
"public Activity getActivity ()\r\n {\r\n return activity;\r\n }",
"public GameLayerActivity getActivity() {\n return gameLayerActivity;\n }",
"public final T getActivity() {\n launchActivityIfNotLaunchedAlready();\n return activity;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Should be serialized as "source" | @JsonProperty("source")
@NotNull String getSource(); | [
"protected void set_source(Object source) { this.source = source; }",
"S getSource();",
"public void setSource(Object source) {\n\t\tthis.source = source;\n\t}",
"public String getSource();",
"public final SimObject getSource() {return source;}",
"@Iri(MMM.HAS_SOURCE)\n RDFObject getSource();",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Looks for the wild character candidates ommiting escaped characters. | private List<Integer> findWildCandidates(String literal, String wild, String escape) {
ArrayList<Integer> candidates = new ArrayList<Integer>();
int currentIndex = 0;
if (!wild.isEmpty()) {
while (currentIndex<literal.length()) {
int candidate = literal.indexOf(wild, currentIndex);
... | [
"private List<Integer> findEscaped(String literal, Character wild[], String escape) {\n ArrayList<Integer> candidates = new ArrayList<Integer>();\n int currentIndex = 0;\n if (!escape.isEmpty()) {\n while (currentIndex<literal.length()) {\n int candidate = literal.indexOf(escape, curr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of SAPVendorResource | public SAPVendorResource() {
} | [
"Vendor create(Vendor vendor) throws ServiceException;",
"Device_Resource createDevice_Resource();",
"public void newVendor(String code, String name ){ vendors.put(code, new Vendor(code, name)); }",
"On_Device_Resource createOn_Device_Resource();",
"VendorLicenseTypes create(VendorLicenseTypes vendorLicens... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .EmrHistoryListItemInfo item_info = 1; | public nta.med.service.emr.proto.EmrapiModelProto.EmrHistoryListItemInfoOrBuilder getItemInfoOrBuilder() {
if (itemInfoBuilder_ != null) {
return itemInfoBuilder_.getMessageOrBuilder();
} else {
return itemInfo_;
}
} | [
"nta.med.service.emr.proto.EmrapiModelProto.EmrHistoryListItemInfo getItemInfo();",
"nta.med.service.emr.proto.EmrapiModelProto.EmrHistoryListItemInfoOrBuilder getItemInfoOrBuilder();",
"nta.med.service.emr.proto.EmrapiModelProto.EmrHistoryListItemInfo getItemInfo(int index);",
"public nta.med.service.emr.pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method increments the number of coffees in the order. | public void incrementOrder(View view) {
final int numberOfCoffees = getNumberOfCoffees();
if (numberOfCoffees == Constants.MAX_NUM_COFFEES_IN_ORDER) {
Toast.makeText(getApplicationContext(),
"Maximum number of coffees in one order reached",
Toast.LENGT... | [
"public void increment(View view) {\n\n // You cannot have more than 100 coffees\n if (this.quantity == 100) {\n Toast.makeText(MainActivity.this, \"You cannot have more than 100 coffees\",\n Toast.LENGTH_SHORT).show();\n return;\n\n }\n this.quan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Name of owner of related account (debtor or creditor) | @ApiModelProperty(example = "null", required = true, value = "Name of owner of related account (debtor or creditor)")
public String getRelatedAccountOwner() {
return relatedAccountOwner;
} | [
"java.lang.String getOwner();",
"String getOwnerName();",
"public String getOwner() {\t\t\n\t\treturn (owner != null) ? owner.split(\"@\", 1)[0] : owner;\n\t}",
"public String getOwnerName() {\n String ownerName = null;\n\n if (owner != null) {\n ownerName = owner.getPackageName() + \".\" + owner.n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo que crea un objeto GloboVerde, lo situa en la ventana y genera el movimiento del mismo | public void crearGloboVerde(int tiempo){
GloboVerde globov = new GloboVerde();
globoslista.add(globov);
double posicionx = generarPosicionX();
globov.fijarPosicion(posicionx);
gpane.getChildren().addAll(globov);
MoverGlobo mv = new MoverGlobo(globov,ti... | [
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"private void generarOTVenta()\r\n\t{\r\n\t\tif (ventaEncabezado == null)\r\n\t\t{\r\n\t\t\tventaEncabezado = new OTE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the range of values in the domain. | public Range getDomainBounds() {
return this.domainRange;
} | [
"double getRange();",
"public double[] getDomainBounds() {\n double max=-1.0e307, min=1.0e307;\n\n if(seriesCollection.getSeriesCount() != 0 && seriesCollection.getItemCount(0) != 0)\n max = min = seriesCollection.getXValue(0, 0);\n\n for(int i = 0; i < seriesCollection.getSeriesCount(); i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will copy properties from passed graphic state to current object | public void copyProperties(GraphicState graphicState) {
this.fillColorSpace = graphicState.getFillColorSpace();
this.strokeColorSpace = graphicState.getStrokeColorSpace();
this.pattern = graphicState.getPattern();
this.renderingMode = graphicState.getRenderingMode();
this.font = ... | [
"public void copyTo(\n GraphicsState state\n )\n {\n state.blendMode = blendMode;\n state.charSpace = charSpace;\n state.ctm = (AffineTransform)ctm.clone();\n state.fillColor = fillColor;\n state.fillColorSpace = fillColorSpace;\n state.font = font;\n state.fontSize =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the dimension of the image of a specific vehicle | public Dimension getImageDimension(GeneralVehicle car){
return map.get(car).getImageDimension();
} | [
"public int getSize() {\n return this.numberOfVehicle;\n }",
"int dimensionality();",
"void getSourceImageDimension() {\n sourceImageWidth = sourceProduct.getSceneRasterWidth();\n sourceImageHeight = sourceProduct.getSceneRasterHeight();\n System.out.println(\"Source image widt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column task_test.IS_FIX | public void setIsFix(Long isFix) {
this.isFix = isFix;
} | [
"public Long getIsFix() {\r\n\t\treturn isFix;\r\n\t}",
"public void setFixMoney(Integer fixMoney) {\n this.fixMoney = fixMoney;\n }",
"public void setFixEnable(Fixes fix, boolean value);",
"public void setFixmoney(BigDecimal fixmoney) {\r\n this.fixmoney = fixmoney;\r\n }",
"public void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates a connected cluster. API to update certain properties of the connected cluster resource. | @ServiceMethod(returns = ReturnType.SINGLE)
ConnectedClusterInner update(
String resourceGroupName, String clusterName, ConnectedClusterPatch connectedClusterPatch); | [
"public com.google.longrunning.Operation updateCluster(\n com.google.cloud.dataproc.v1.UpdateClusterRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getUpdateClusterMethod(), getCallOptions(), request);\n }",
"Cluster.Update update();",
"public com.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle name before it will be passed into url. | default String adaptNameForUrl(String name) {
return name;
} | [
"protected NamedHandler(String name) {\n\t\tif (name == null)\n\t\t\tname = \"\";\n\t\tthis.name = name;\n\t}",
"public void setUrlName(String urlName) {\n this.urlName = urlName;\n }",
"public abstract String escapeName(String name);",
"private String handlePageName(String pageName) {\r\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the HashMap containing precalculated paths. | public HashMap<String,LinkedList<Node>> getPreCalculatedPaths(){
return preCalculatedPaths;
} | [
"public HashMap<String, DNNodePath> getPaths() {\n\t\treturn paths;\n\t}",
"@VisibleForTesting\n public static Set<String> cachedPaths() {\n requireNonNull(CACHE, \"CACHE\");\n return CACHE.asMap().keySet();\n }",
"public static HashMap<String, String> getMapPathFotos() {\n try {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
One of the initializeConformers() methods needs to be called, before getting individual conformers of the same molecule by getNextConformer(). Open valences of the passed molecule are filled with hydrogen atoms. The passed molecule may repeatedly be used as container for a new conformer's atom coordinates, if it is pas... | public boolean initializeConformers(StereoMolecule mol, int strategy, int maxTorsionSets, boolean use60degreeSteps) {
if (!initialize(mol, use60degreeSteps))
return false;
if (mRotatableBond == null) {
mSelfOrganizer = new ConformationSelfOrganizer(mol, true);
mSelfOrganizer.setThreadMaster(mThreadMaster)... | [
"public boolean initializeConformers(StereoMolecule mol) {\n\t\treturn initializeConformers(mol, STRATEGY_LIKELY_RANDOM, 100000, false);\n\t\t}",
"public StereoMolecule getNextConformerAsMolecule(StereoMolecule mol) {\n\t\tConformer conformer = getNextConformer();\n\t\treturn (conformer == null) ? null : conforme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assign a linear gradient fill to the shape. | public final native void setFill(LinearGradientFillStyle linearGradient) /*-{
// Create array of colour stops
var theColourStops = [];
var stopList = linearGradient.@net.edzard.kinetic.LinearGradientFillStyle::getColourStopPositions()();
for (i=0; i < stopList.@java.util.List::size()(); ++i) {
... | [
"public void setFillGradient(Gradient gradient);",
"public GradientFill(final SWFDecoder coder, final Context context)\r\n throws CoderException {\r\n type = coder.readByte();\r\n transform = new CoordTransform(coder);\r\n count = coder.readByte();\r\n spread = count & ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the ejb descriptor to which I refer. | @Override
public void setEjbDescriptor(EjbDescriptor ejbDescriptor) {
if (this.ejbDescriptor != null) {
this.ejbDescriptor.removeEjbReferencer(this); // remove previous referencer
}
this.ejbDescriptor=ejbDescriptor;
if (ejbDescriptor!=null) {
ejbDescriptor.addEjbReferencer(this);... | [
"public EjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor) {\n\tsuper(name, \"\", description);\n\tthis.setEjbDescriptor(ejbDescriptor);\n }",
"public EjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor, boolean isLocal) {\n super(name, \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Broadcast the request concurrently. 11/29/2014, Bing Li | public void run()
{
// The instance of the received broadcast request. 11/29/2014, Bing Li
SearchKeywordBroadcastRequest request;
// The thread always runs until it is shutdown by the BoundNotificationDispatcher. 11/29/2014, Bing Li
while (!this.isShutdown())
{
// Check whether the notification queue is e... | [
"private void broadcastRequest() {\n N.set(index, N.get(index) + 1);\n LOGGER.debug(\"(\" + index + \") broadcasting request\");\n LOGGER.trace(\"(\" + index + \") N: \" + N);\n for (String url : urls) {\n DA_Suzuki_Kasami_RMI dest = getProcess(url);\n try {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Dump a list of column names in csv format | public static String toCsv(List<LedgerColumns> lst) {
StringBuffer sb = new StringBuffer();
for (LedgerColumns lc : lst) {
if (sb.length() > 0) {
sb.append(", ");
}
sb.append(lc.getName());
}
return sb.toString();
} | [
"private String getOutputColumnsString(){ \n String result = \"\";\n \n for (String name: this.outputColsChecked){\n result += name + \",\";\n }\n \n result = result.substring(0,result.length()-1); //remove the last comma\n return result;\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the underlying scan result set. Callers should not modify this set. | public Set<ScanResult> getScanResults() {
Set<ScanResult> allScans = new ArraySet<>();
synchronized (mLock) {
allScans.addAll(mScanResults);
allScans.addAll(mExtraScanResults);
}
return allScans;
} | [
"public ResultSet getResults() {\r\n return resultSet;\r\n }",
"public ResultSet[] getResultSets() {\n\n migratePathTestResults();\n return resultSets != null ? resultSets.clone() : null;\n }",
"public Collection<?> getResultSet() {\n\t\treturn resultSet;\n\t}",
"public List<Stateme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of set_priority method, of class Orderr. | @Test
public void testSet_priority() {
System.out.println("set_priority");
priority_Q p1 = new priority_Q();
Tables T= new Tables("XL");
Orderr instance = new Orderr("Lunch",5,12,"XL",p1,T);
instance.set_priority();
} | [
"@Test\r\n public void testGet_priority() {\r\n System.out.println(\"get_priority\");\r\n Orderr instance = null;\r\n int expResult = 0;\r\n int result = instance.get_priority();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional uint32 change_address_index = 4; | public int getChangeAddressIndex() {
return changeAddressIndex_;
} | [
"int getChangeAddressIndex();",
"private synchronized int setBufferAddress() {\n int counter1 = dataIn[++counter];\n int counter2 = dataIn[++counter];\n \n if ((counter1 & 0xC0) == 0x00) {\n return ((counter1 & 0x3F) << 8) + counter2;\n } else {\n return ((c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates the given property path as Integer | private static boolean validateInteger(Map.Entry<String, CheckState> entry) {
String prop = System.getProperty(entry.getKey());
if (entry.getValue().isOptional && prop == null) {
return true;
}
try {
Integer.parseInt(prop);
} catch (NumberFormatException e... | [
"private ValidationResult validateParameterInteger(Map<String,String> properties) {\n String val = properties.get(PARAMETER_NAME_INTEGER);\n int intValue = -1;\n try {\n checkInteger(val);\n } catch (NumberFormatException nfe) {\n return new MyValidationResult(f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a ImageView by the given id. | protected ImageView getImageView(int id) {
return (ImageView) findViewById(id);
} | [
"public ImageView findImageViewById(int id) {\r\n\t\treturn (ImageView) getView().findViewById(id);\r\n\t}",
"@Override\n public Optional<Image> getImageById(int id) {\n return imagesRepository.getImageById(id);\n }",
"SlideshowImage getImageById(Long id);",
"public ImageView getImageView() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
must have this createSocket method | public Socket createSocket() throws IOException {
return factory.createSocket();
} | [
"public void createSocket(SocketName name);",
"private void generateSocket() {\n\t\t_socket = new Socket();\n\t}",
"private void createSocket()\n {\n try {\n socket = new Socket(HOST, PORT);\n out = new ObjectOutputStream(socket.getOutputStream());\n in = new ObjectInp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a polygon to an index | public void addPolygon(Polygon X, int latIndex, int longIndex) {
if (!squares.containsKey(latIndex))
squares.put(latIndex, new HashMap<Integer, GeoSquare>());
if (!squares.get(latIndex).containsKey(longIndex))
squares.get(latIndex).put(longIndex, new GeoSquare());
squares.get(latIndex).get(longIndex).... | [
"void appendPolygon(Polygon polygon);",
"private void addNewPolygon() {\n\n GeneralPath polygon = new GeneralPath();\n polygon.moveTo(xPos.get(0), yPos.get(0));\n for (int i = 1; i < xPos.size(); i++) {\n polygon.lineTo(xPos.get(i), yPos.get(i));\n }\n polygon.closePa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__LockJointStatement__Group__2" $ANTLR start "rule__LockJointStatement__Group__2__Impl" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:3015:1: rule__LockJointStatement__Group__2__Impl : ( '.' ) ; | public final void rule__LockJointStatement__Group__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:3019:1: ( ( '.' ... | [
"public final void rule__LockJointStatement__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:3007:1: ( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last item publicacao in the ordered set where entryId = &63; and postId = &63;. | @Override
public ItemPublicacao fetchByAssetEntryIdPostId_Last(long entryId,
String postId, OrderByComparator<ItemPublicacao> orderByComparator) {
int count = countByAssetEntryIdPostId(entryId, postId);
if (count == 0) {
return null;
}
List<ItemPublicacao> list = findByAssetEntryIdPostId(entryId, postId... | [
"@Override\n\tpublic ItemPublicacao fetchByAssetEntryIdPublishDate_Last(long entryId,\n\t\tDate publishDate, OrderByComparator<ItemPublicacao> orderByComparator) {\n\t\tint count = countByAssetEntryIdPublishDate(entryId, publishDate);\n\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tList<ItemPublicacao> l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets entering player's ship type raw form (warbird == 0) | public byte getShipTypeRaw() {
return m_shipType;
} | [
"@Override\n\tpublic String getShipType(){ //get type of ship\n\t\treturn \"Battleship\"; //return ship type as string\n\t}",
"public String getShipType()\n {\n String s = this.shipType;\n return s;\n }",
"public String getShipType() {\n return interactor.getShipType(); }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print the related concept of the structure (body or title) | private String printRelatedStructure(boolean body) {
if (body)
return "(body)";
else
return "(title)";
} | [
"public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n Sys... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reads list of events and returns a JSONArray | public JSONArray readEventList() {
JSONParser jsonParser = new JSONParser();
JSONArray readEventList = new JSONArray();
try (FileReader reader = new FileReader("events.json"))
{
//Read JSON file
Object obj = jsonParser.parse(reader);
readEventList =... | [
"private static List<JsonEvent> eventsFromJson(String input) {\n\t\tJsArray<JsonEvent> jsArray = evalEvents(input);\n\t\tList<JsonEvent> events = new ArrayList<JsonEvent>();\n\t\tfor (int i = 0; i < jsArray.length(); i++) {\n\t\t\tevents.add(jsArray.get(i));\n\t\t}\n\t\treturn events;\n\t}",
"Array<Event> getEven... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of removeStore method, of class StoreFacade. | @Test
public void testRemoveStore() throws Exception {
System.out.println("removeStore");
transaction.begin();
Mall mall = mallFacade.find(1L);
transaction.commit();
System.out.println("Number of stores: " + mall.getStores().size());
assertTrue("Expected three stores... | [
"@Test\n public void testRemoveNewStore() throws Exception {\n System.out.println(\"removeNewStore\");\n Store store = new Store();\n store.setName(\"Waldo3\");\n transaction.begin();\n Mall mall = mallFacade.find(1L);\n transaction.commit();\n assertEquals(3, mal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the players that are currently logging out. | public static void setSafeLogoutPlayers(Map<UUID, Integer> players) {
safeLogoutPlayers = players;
} | [
"public void logPlayerOut() {\n if (sessionInfo.isPlayerInParty())\n {\n leaveParty();\n }\n LogDispatcher.getInstance().onLogRequestReceived(new ConcreteSimpleLoggingRequest(LoggingRequest.Severity.INFO, null, \"Logged out\"));\n player.resetValues();\n }",
"prote... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column todo.todo_id | public String getTodoId() {
return todoId;
} | [
"public Integer getTodoId() {\n return todoId;\n }",
"public void setTodoId(Integer todoId) {\n this.todoId = todoId;\n }",
"public Todo fetchByPrimaryKey(long todoId);",
"public void setTodoId(String todoId) {\r\n this.todoId = todoId;\r\n }",
"public BigDecimal getTODO_TELLER... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes a Service Fabric application type name resource. Delete a Service Fabric application type name resource with the specified name. | void delete(String resourceGroupName, String clusterName, String applicationTypeName, Context context); | [
"void delete(String resourceGroupName, String clusterName, String applicationTypeName);",
"public void removeType(String name) {\n String nameInLowerCase = Ascii.toLowerCase(name);\n Preconditions.checkState(!registered);\n Preconditions.checkArgument(types.containsKey(nameInLowerCase), \"missing key: %s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the actions to do with device discovery | private void doDiscovery() {
setServiceState(STATE_DISCOVERY);
bluetoothAdapter.startDiscovery();
} | [
"private void discoverService() {\n\n manager.setDnsSdResponseListeners(channel,\n new WifiP2pManager.DnsSdServiceResponseListener() {\n\n @Override\n public void onDnsSdServiceAvailable(String instanceName,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialises a new movie with the specified Title and Version. | public Movie(String movieTitle, MovieVersion movieVersion) {
this.title = movieTitle;
this.version = movieVersion;
} | [
"public Movie(String title) {\n this.title = title;\n }",
"public void setVersion(MovieVersion movieVersion) { \n this.version = movieVersion; \n }",
"public Film(String title, Date releaseDate, int length){\n this.title = title;\n this.releaseDate = releaseDate;\n this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ActivityFinalNode__Group_3_3__1" $ANTLR start "rule__ActivityFinalNode__Group_3_3__1__Impl" InternalActivityDiagram.g:3693:1: rule__ActivityFinalNode__Group_3_3__1__Impl : ( ( rule__ActivityFinalNode__IncomingAssignment_3_3_1 ) ) ; | public final void rule__ActivityFinalNode__Group_3_3__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalActivityDiagram.g:3697:1: ( ( ( rule__ActivityFinalNode__IncomingAssignment_3_3_1 ) ) )
// InternalActivityDiagram.g:369... | [
"public final void rule__ActivityFinalNode__Group_3__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:3569:1: ( ( ( rule__ActivityFinalNode__IncomingAssignment_3_2 ) ) )\n // InternalActivityDiag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var21' field. | public java.lang.Double getVar21() {
return var21;
} | [
"public java.lang.Double getVar21() {\n return var21;\n }",
"public java.lang.Double getVar22() {\n return var22;\n }",
"public java.lang.Integer getVar213() {\n return var213;\n }",
"public java.lang.Float getVar23() {\n return var23;\n }",
"public java.lang.Float getVar23() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Testing adding to the MobileContract repository. | @Test
public void addMobileContract() {
ContractRepository contractRepository = new ContractRepository();
contractRepository.add(mobileContract);
Assert.assertEquals(mobileContract, contractRepository.get(2));
} | [
"@Test\n public void addInternetContract() {\n ContractRepository contractRepository = new ContractRepository();\n contractRepository.add(internetContract);\n Assert.assertEquals(internetContract, contractRepository.get(1));\n }",
"@Test\n public void addTvContract() {\n Contr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new SyncMode object | protected SyncMode(String name)
{
this.name = name;
} | [
"private SYNC(String strSyncMode) {\n this.strSynMode = strSyncMode;\n }",
"Mode createMode();",
"public Syncano() {\n this(null, null);\n }",
"public static String getDefaultSyncMode() {\n return \"FULL\";\n }",
"SyncStart createSyncStart();",
"public void setMasterS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setMailing sets an Package object's mailing class | public void setMailing(String mail) {
mailing = mail;
} | [
"public String getMailingClass() {\r\n return mailingclass;\r\n }",
"public void setMailingList(boolean m)\r\n {\r\n mailingList = m;\r\n }",
"void setDefaultMailType(int defaultMailType);",
"public void setMailMsgType (String MailMsgType);",
"public void setMailGeneralManager(String mail... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an EclipseLog which uses the specified File to log messages to | public EclipseLog(File outFile) {
this.outFile = outFile;
this.writer = null;
readLogProperties();
} | [
"LogFile(File file)\n {\n this.file = file;\n }",
"public FTPLog(File file){\n\t\tthis.file = file;\n\t}",
"public AgreementFileLog()\n {\n m_fileLog = new AlternateFileLogger(AGREEMENT_LOG, 10000000, 2);\n m_fileLog.setLogLevel(DynamicConfiguration.getInstance().getAgreementLogLevel());\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get update sql query | public abstract String getUpdateQuery(); | [
"protected String getQueryString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"UPDATE \");\n sb.append(getTableName());\n sb.append(\" SET \");\n List names = cols.getNames();\n List terms = cols.getValues();\n for (int i = 0; i < names.size(); i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creation de la connexion avec la DB_HOTEL Attention au mot de passe | private static void createConnectionToDB_HOTEL() {
try {
Class.forName("com.mysql.cj.jdbc.Driver");
} catch (ClassNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
String url = "jdbc:mysql://localhost:3306/DB_HOTEL?useUnicode=true&useJDBCCompliantTi... | [
"public void createConnectoin() {\n DBConnect db = new DBConnect();\n this.con = db.createConnection();\n }",
"public static void createPasswordTab() throws Exception {\n\t\tString raw = \"CREATE TABLE IF NOT EXISTS %s ( %s INTEGER PRIMARY KEY AUTOINCREMENT, %s VARCHAR(100), %s VARCHAR(100), %s I... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
build method : instantiates necessary components | void build(){
//instantiate four registers
R0 = new Register();
R1 = new Register();
R2 = new Register();
R3 = new Register();
//Instantiate components
adder = new Adder();
complementer = new Complementer();
reader = new Reader();
printer =... | [
"public void build() {\n\t\tpanel = new JPanel();\n\t\tGridLayout layout = new GridLayout(0,1);\n\t\tpanel.setLayout(layout);\n\t\t\n\t\tuserName = new JLabel(\"Username: \");\n\t\tpassword = new JLabel(\"Password: \");\n\t\tuserField = new JTextField(20);\n\t\tpassField = new JTextField(20);\n\t\tretypePass = new ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the type parameter class bound. | public ReferenceTypeSignature getClassBound() {
return classBound;
} | [
"public Class<Param> getParameterClass();",
"public abstract Class getParamClass();",
"public String getBindingClass()\n {\n return bindingClass;\n }",
"public ParameterType getType();",
"public default Class<?> getRequestType() {\n Class<?> clazz = this.getClass();\n /* Simple ca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Want to be able to regenerate endpoints. To do this, use endpoint constructor objects, which automatically build an endpoint for us. Note: although this may be called multiple times with the same object, may only save one version of the object. Classname of this constructor object should match endpoint_constructor_clas... | public void save_endpoint_constructor_obj(
EndpointConstructorObj endpoint_constructor_obj); | [
"public static Endpoint createUniqueEndpoint() {\n Endpoint endpoint = new Endpoint.Builder().id(UUID.randomUUID().toString()).name(UUID.randomUUID().toString()).\n type(UUID.randomUUID().toString()).endpointConfig(UUID.randomUUID().toString()).\n applicableLevel(UUID.randomUUID... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the evaluation for an AND NodeType for NetlistNode defined by parameter node at the state defined by parameter state | private Boolean computeAND(final NetlistNode node, final State<NetlistNode> state) {
Boolean rtn = null;
List<Boolean> inputList = this.getInputLogic(node, state);
if (inputList.size() > 1) {
rtn = this.computeLogic(inputList, LSResults.S_AND);
}
return rtn;
} | [
"public Object visitLogicalAndExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n \n if (a instanceof Long && b instanceof Long) {\n return (Long) a & (Long) b;\n }\n else {\n return parens(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the kafka sink information and create a flink kafka consumer | private static FlinkKafkaProducer<String> getKafkaSink(Tuple2<String, String> sinkTuple) {
Properties props = new Properties();
props.setProperty("bootstrap.servers", sinkTuple.f0);
return new FlinkKafkaProducer<>(
sinkTuple.f0,
sinkTuple.f1,
new SimpleStringSchema());
} | [
"Sink createSink();",
"private KafkaConsumer<String, String> createKafkaConsumer(){\n\n Properties prop = new Properties();\n\n prop.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, kafkaBrokerEndpoint);\n prop.put(ConsumerConfig.GROUP_ID_CONFIG, \"LoanDataKafkaConsumer\");\n prop.put(Cons... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a Connect error response according to the specified error code. | public static Response createConnectErrorResponse(char errorCode, String reasonPhrase) throws IllegalArgumentException {
Response connectionErrorResponse = new Response();
connectionErrorResponse.setMessageType(Message.CONNECT_ERROR_RESPONSE);
//error code attribute
ErrorCodeAttribute er... | [
"public static Response createConnectErrorResponse(char errorCode) throws IllegalArgumentException {\n return createConnectErrorResponse(errorCode, null);\n }",
"public static Response createConnectionBindErrorResponse(char errorCode) throws IllegalArgumentException {\n return createConnectionBin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Hw PLD'. This implementation returns null; returning a nonnull result will terminate the switch. | public Object caseHwPLD(HwPLD object) {
return null;
} | [
"public Object caseHwProcessor(HwProcessor object) {\r\n\t\treturn null;\r\n\t}",
"public T caseHwSystem(HwSystem object) {\r\n\t\treturn null;\r\n\t}",
"public String getHwaddr() { return hwaddr; }",
"public Object caseHwResource(HwResource object) {\r\n\t\treturn null;\r\n\t}",
"public String getWlWellTyp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__MongoOperation__Group_0_0__2__Impl" $ANTLR start "rule__MongoOperation__Group_1__0" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4081:1: rule__MongoOperation__Group_1__0 : rule__MongoOperation__Group_1__0__Impl rule__MongoOperation__Group_... | public final void rule__MongoOperation__Group_1__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4085:1: ( rule__MongoOperation__Group_1__0... | [
"public final void rule__MongoOperation__Group_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:4020:1: ( rule__MongoOperati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Represents a directed edge in a graph. | public interface DirectedEdge extends Edge {
static final int DIRECTION_A_TO_B = 1;
static final int DIRECTION_B_TO_A = -1;
static final int NODIRECTION = 0;
/**
* Returns the source Vertex of the edge.
*
* @return The source Vertex.
*/
public Vertex getSource();
/**
* Returns the sink... | [
"public Enumeration directedEdges();",
"public interface GraphEdge<V extends GraphNode<V, E>,\n E extends GraphEdge<V, E>> {\n /**\n * This is a getter method to return the end node.\n *\n * @return the end graph node\n */\n V getGraphNode();\n\n /**\n * This is a getter method to return the cost ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of equals method, of class Store. | @Test
public void testEquals() throws StoreException {
System.out.println("equals");
boolean expResult = false;
boolean result = instance.equals(new Object());
assertEquals(result, expResult);
assertEquals(instance.equals(Store.getInstance()), true);
} | [
"public abstract boolean isWithinSameStore();",
"public void testEquals() {\n // TODO: implement test\n }",
"@Override\n public boolean equals(Object obj) {\n StorePairGeneric<E> o = (StorePairGeneric<E>) obj;\n return this.first.equals(o.first);\n \n // or boolean ans =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |