query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Gets the value of nomeLinhaDePesquisa | public String getNomeLinhaDePesquisa()
{
return nomeLinhaDePesquisa;
} | [
"public String getPrimeiraLinhaCabecalho() {\n return primeiraLinhaCabecalho;\n }",
"public void setNomeLinhaDePesquisa(String nomeLinhaDePesquisa)\r\n\t{\r\n\t\tthis.nomeLinhaDePesquisa = nomeLinhaDePesquisa;\r\n\t}",
"public String getSegundaLinhaCabecalho() {\n return segundaLinhaCabecalho;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tests to make sure that the player moves properly | @Test
public void testPlayerMovement() {
Engine engine = new Engine(20);
int x = engine.getMoveableObject(0).getX() + engine.getMoveableObject(0).getDisplacement().getXDisplacement();
int y = engine.getMoveableObject(0).getY() + engine.getMoveableObject(0).getDisplacement().getYDisplacement();
engine.update();... | [
"@Test\n\tpublic void movePlayerTest()\n\t{\n\t\tBoardGame monopoly = new BoardGame();\n\n\t\tmonopoly.addPlayer(\"Noa\", GamePiece.RED_THIMBLE, Location.HALL);\n\t\tmonopoly.addPlayer(\"Nigh\", GamePiece.BLUE_BOOT, Location.BALLROOM);\n\t\t\n\t\tmonopoly.movePlayer(\"Noa\", Location.STUDY);\n\t\t\n\t\tAssert.asser... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the status of the game to "rebuttal". | public void rebuttal(String rbtlTeam) {
displayMessage(rbtlTeam + "'s chance for Rebuttal");
rebuttalState = true;
} | [
"public static void updateGameStatus()\n\t{\n\t}",
"public void updateReloading() {\n if (game.getPlayerComponent().getActiveWeapon().isReloading()) {\n reloadingText.setText(\"Reloading\");\n reloadingText.setFill(Color.INDIANRED);\n } else {\n reloadingText.setText... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Force writing a reflog for the updated ref. | public void setForceRefLog(boolean force) {
forceRefLog = Boolean.valueOf(force);
} | [
"@Override\n public void force() throws IOException {\n if (activeTla.get() == null) {\n throw new IOException(\"cannot force log writing, disk logger is not open\");\n }\n\n if (needsForce.get() && configuration.isForcedWriteEnabled()) {\n swapForceLock.writeLock().loc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DELETE /prlPayscaleAllowanceInfos/:id > delete the "id" prlPayscaleAllowanceInfo. | @RequestMapping(value = "/prlPayscaleAllowanceInfos/{id}",
method = RequestMethod.DELETE,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public ResponseEntity<Void> deletePrlPayscaleAllowanceInfo(@PathVariable Long id) {
log.debug("REST request to delete PrlPayscaleAllowanceInfo : {... | [
"@RequestMapping(value = \"/prlPayscaleBasicInfos/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deletePrlPayscaleBasicInfo(@PathVariable Long id) {\n log.debug(\"REST request to delete PrlPayscaleBasicInfo : ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To check if to create/delete acount / Method readAccts() Input: Bank bank constructor that holds the accounts Process: Reads the initial database of accounts and balances Output: Fills in the initial account and balance arrays and returns the number of active accounts | public static int readAccts(Bank bank) throws IOException {
// open database input file
// create File Object
File dbFile = new File("input.txt");
// create a Scanner Object
Scanner sc = new Scanner(dbFile);
int totalAccountsReadIn = 0;
while (sc.hasNext() && ... | [
"private void ReadInAccounts() {\n\t\tLog.d(\"SelectAccountActivity.ReadInAccounts\", \"checking for file\" + AccountMan.CheckForFile());\n\t\taccounts = AccountMan.GetAccounts();\n\t\t//Comment out this line and uncomment the line above after purging the excess accounts\n\t\t//accounts = AccountMan.PurgeDuplicateA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test getVisibility above MAX_VISIBILITY. | @Test
public void testGetVisibilityAboveMax() {
Bundle extras = new Bundle();
extras.putString(PushMessage.EXTRA_VISIBILITY, String.valueOf(PushMessage.MAX_VISIBILITY + 1));
PushMessage pushMessage = new PushMessage(extras);
assertEquals("Should constrain to the max.", pushMessage.g... | [
"@Test\n public void testGetVisibilityBelowMax() {\n Bundle extras = new Bundle();\n extras.putString(PushMessage.EXTRA_VISIBILITY, String.valueOf(PushMessage.MAX_VISIBILITY - 1));\n\n PushMessage pushMessage = new PushMessage(extras);\n assertEquals(\"Should allow values between the ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks to see if a cell has any cyclic reference. Currently works recursivly and creates clones on branches which is inefficient so hopefully we can change that soon. | public boolean hasCyclicReference(HashMap<Coord, SingleCell> map, HashSet<SingleCell> lookup); | [
"private static boolean AllCellsVisited()\n {\n for (Cell arr[] : cells){\n for (Cell c : arr)\n {\n if (!c.Visited)\n {\n return false;\n }\n }\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
readInput(String prompt) Reads a String input from the user. | public String readInput(String prompt) {
String input = "";
System.out.print(prompt); System.out.flush();
input = in.next();
return input;
} | [
"public static String readString(String prompt){ \n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}",
"public static String readString(String prompt) {\n String result = null;\n if ( (prompt!=null) && (!prompt.equals(\"\")) ){\n System.ou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to construct the line from a XML configuration | private static void buildLineFromXml(String filepath) throws InvalidXMLException {
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder;
try {
dBuilder = dbFactory.newDocumentBuilder();
Document doc = (Document) dBuilder.parse(filepath);
NodeL... | [
"void xsetCfgLinea(org.apache.xmlbeans.XmlString cfgLinea);",
"org.apache.xmlbeans.XmlString xgetCfgLinea();",
"String getCfgLinea();",
"static public void buildLine(ConfigurationEnvironment conf)\r\n\t\t\tthrows DoubledRailwayException, CantonHasAlreadyStationException, CantonNotExistException, InvalidXMLExc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs the scheduler with a context | public MeetingPreparationScheduler(Context context) {
mContext = context;
mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
} | [
"protected abstract void scheduler_init();",
"private JobScheduler getScheduler(Context context) {\n if (scheduler == null) {\n scheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);\n }\n\n return scheduler;\n }",
"public static NamingScheduledTas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Skip over contiguous ascii character data. | private int skipAsciiCharData() throws Exception {
int index = fCurrentIndex;
int offset = fCurrentOffset - index;
while (true) {
char[] data = fMostRecentData;
while (index < CharDataChunk.CHUNK_SIZE) {
int ch = data[index] & 0xFFFF;
if (c... | [
"public abstract boolean skipChar(int c) throws IOException;",
"void skip() {\n if (index < chars.length)\n index++;\n }",
"private boolean skipMultiByteCharData(int ch) throws Exception {\n if (ch < 0xD800) {\n loadNextChar();\n return true;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the billToAttention value for this Account. | public void setBillToAttention(java.lang.Object billToAttention) {
this.billToAttention = billToAttention;
} | [
"public java.lang.Object getBillToAttention() {\n return billToAttention;\n }",
"public void setBillToAddressToUse(java.lang.Object billToAddressToUse) {\n this.billToAddressToUse = billToAddressToUse;\n }",
"public void setBillToAdditionalAddressInformation(java.lang.Object billToAdditional... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Failure test for the removeDigitalRunPointsType(long pointsTypeId) method with the pointsTypeId is not exist. EntityNotFoundException is expected. | public void testRemoveDigitalRunPointsType_WithNotExistId() throws Exception {
try {
impl.removeDigitalRunPointsType(3);
fail("EntityNotFoundException should be thrown.");
} catch (EntityNotFoundException e) {
// expected
}
} | [
"public void testRemoveDigitalRunPointsType_Accuracy() throws Exception {\r\n DigitalRunPointsType pointsType = new DigitalRunPointsType();\r\n pointsType.setDescription(\"description\");\r\n\r\n impl.createDigitalRunPointsType(pointsType);\r\n\r\n assertNotNull(\"The result should not b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the NetBIOS session port | public final void setNetBIOSSessionPort(int port) {
m_netbiosPort = port;
} | [
"public void setPort(int port);",
"public void setPort(Port port);",
"public final void setSessionPort(int port) {\n m_remotePort = port;\n }",
"public void setPort(int value) {\n this.port = value;\n }",
"public void setPort(int p) {\n\t\tport = p;\n\t}",
"public void setPort(int port) {\n m_P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if time is reservable | private boolean isTimeAvailable(){
return reserveTime.getStatus() == ReserveTimeStatus.RESERVABLE;
} | [
"boolean hasValidUntilTime();",
"public boolean checkTime() {\n \tCalendar current = Calendar.getInstance();\n \tif(current.getTimeInMillis() < start.getTimeInMillis())\n \t\treturn false;\n \telse\n \t\treturn true;\n }",
"boolean hasBasedTime();",
"private void checkReservations() {\n \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add to a DSpace object's domain metadata values from a rest representation. Any existing metadata value is preserved. | public <T extends DSpaceObject> void addMetadata(Context context, T dso, MetadataRest metadataRest)
throws SQLException, AuthorizeException {
DSpaceObjectService<T> dsoService = contentServiceFactory.getDSpaceObjectService(dso);
persistMetadataRest(context, dso, metadataRest, dsoService);
... | [
"public <T extends DSpaceObject> void mergeMetadata(Context context, T dso, MetadataRest metadataRest)\n throws SQLException, AuthorizeException {\n DSpaceObjectService<T> dsoService = contentServiceFactory.getDSpaceObjectService(dso);\n for (Map.Entry<String, List<MetadataValueRest>> entry... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the list of allowed datatypes for this type of level 3. | protected abstract List<String> getAllowedDatatypes(); | [
"TDataTypeList getDataTypeList();",
"public List<String> getTypes() {\n return Collections.unmodifiableList(types);\n }",
"public List<DataType> listDataTypes() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(DataType.class);\n\t}",
"public Collection getAllDataTypes() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read a file and return the long value contained therein. Intended primarily for Linux /sys filesystem | public static long getLongFromFile(String filename) {
if (Logger.get().isDebug()) {
Logger.debug("Reading file {}", filename);
}
List<String> read = FileKit.readLines(filename);
if (!read.isEmpty()) {
if (Logger.get().isTrace()) {
Logger.trace("Rea... | [
"long readLong();",
"public static final long readLong(FileChannel channel) throws IOException {\r\n\t\tByteBuffer singleBuf = ByteBuffer.allocate(8);\r\n\r\n\t\tchannel.read(singleBuf);\r\n\t\tsingleBuf.flip();\r\n\r\n\t\treturn singleBuf.getLong();\r\n\t}",
"public long readLong() throws IOException {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the value of the elevator of the controlled aircraft. | public double getElevator() throws FgException {
return flight.getDoubleValue("controls/flight/elevator");
} | [
"public Elevator elevator() {\n return elevator;\n }",
"public double getElevatorPosition() {\r\n return primary.getEncoder().getPosition();\r\n }",
"public int getElevatorState() {\n return elevatorState;\n }",
"public Long getElevatorid() {\n return elevatorid;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The RequestTrackerIF defines a component that decouples the handling of incoming Dark Matter Protocol Requests from the various components that service those Requests. | public interface RequestTrackerIF {
/**
* If you bind a default request handler, any requests that aren't handled
* by your class specific request processors will be sent to this handler.
* @param requestProcessor
*/
public void bindDefaultRequestHandler(DmpRequestProcessorIF requestProcessor);
... | [
"io.envoyproxy.envoy.data.tap.v3.HttpBufferedTrace.Message getRequest();",
"protected DetectionRequestProcessor(String requestID, Event event, Sender sender) {\n this.requestID = requestID;\n this.event = event;\n this.sender = sender;\n\n this.locationDetectorUtil = new LocationDetect... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This scenario checks whether transfer amount zero or not. | @Test
public void testTransferAmountZero() {
AccountTransferRequest accountTransferRequest = new AccountTransferRequest();
accountTransferRequest.setUsername(VALID_USERNAME);
accountTransferRequest.setPassword(VALID_PASSWORD);
accountTransferRequest.setSenderAccount("123456");
accountTransferRequest.s... | [
"@Test\r\n\tpublic void testTransferAmountNegative() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(\"123456\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given an URL, this performs minimal sanitizing to ensure it will be valid. | public static String sanitizeUrl(String url) {
if (url == null) return null;
if (url.startsWith("www.") || url.indexOf(":") == -1) url = "http://" + url;
return url;
} | [
"public void validateURL(String url);",
"private void URLValidator(String url) {\t\t\r\n\t\ttry{\r\n\t\t\tthis.setURL(new URL(url));\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(\"Malformed URL exception encountered.\\n\"\r\n\t\t\t\t\t+ \"Please check if the url entered is correct or not... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the keys as an Object array | public Object[] toArray(){
return keys.toArray();
} | [
"public Object[] getKeyArray() {\n return keys.toArray();\n }",
"public K[] getKeys();",
"public Object[] getKeyArray()\n {\n // need a better locking strategy here.\n synchronized ( this )\n {\n // may need to lock to map here?\n return map.keySet().toArray();\n }\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check to see if a series is plotted, input is its column number | public boolean isSeriesPlotted(int FHX2ColumnNoIn) {
boolean rval = false;
int numSamples = fhxPlotCommon.getfhxPlotDataManager().getnumSamples();
for (int i = 0; i < numSamples; i++)
{
if (seriesPlottedFHX2ColumnNo[i] == FHX2ColumnNoIn)
{
rval = true;
break;
}
}
return rval;... | [
"public int countOfSeriesPlotted() {\r\n\r\n\t\tint rval = 0;\r\n\t\tint numSamples = fhxPlotCommon.getfhxPlotDataManager().getnumSamples();\r\n\r\n\t\tfor (int i = 0; i < numSamples; i++)\r\n\t\t{\r\n\t\t\tif (seriesPlottedFHX2ColumnNo[i] != -1)\r\n\t\t\t{\r\n\t\t\t\trval++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn rval;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
read the json files into WorkOrders and put in map find all the json files and add to an arraylist | private void readIt() {
try {
File thisFile = new File(".");
for (File f : thisFile.listFiles()) {
if (f.getName().endsWith(".json")) {
// Now you have a File object named "f". You can use this in the FileReader constructor
String... | [
"private void readWorkOrders() {\n System.out.println(\"Searching for new work orders...\");\n ObjectMapper mapper = new ObjectMapper();\n File workOrderDirectory = new File(WORK_ORDER_DIRECTORY);\n File files[] = workOrderDirectory.listFiles();\n if (files.length != 0) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets comment sharp URL with the specified page and comment id. | public static String getCommentSharpURLForPage(final JSONObject page, final String commentId) throws JSONException {
return page.getString(Page.PAGE_PERMALINK) + "#" + commentId;
} | [
"public static String getCommentSharpURLForArticle(final JSONObject article, final String commentId) throws JSONException {\n final String articleLink = article.getString(Article.ARTICLE_PERMALINK);\n\n return articleLink + \"#\" + commentId;\n }",
"public static String GenerateUrlToComments(long... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new MoleculeIndexID from fragments | private MoleculeIndexID processFragments(StereoMolecule[] fragments, int[] bondIndexes, int[] valueAtomIndexes, int cutType) {
MoleculeIndexID retVal = null;
if (cutType == SINGLE_CUT && fragments.length > 1) {
String idCode1 = getIDCodeWithCustomLabels(fragments[0]);
String idCode2 = getIDCodeWithCustomLabel... | [
"public IdFragment(String name) {\n this.name = name;\n try {\n index = Integer.parseInt(this.name);\n } catch (NumberFormatException e) {\n index = -1;\n }\n this.parens = null;\n }",
"private void init(int bytesP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for the calculated attribute SrcCompany | public String getSrcCompany() {
return (String) getAttributeInternal(SRCCOMPANY);
} | [
"public String getSrcCompanyType() {\r\n return (String) getAttributeInternal(SRCCOMPANYTYPE);\r\n }",
"public String getSourceCompany() {\r\n\t\treturn sourceCompany;\r\n\t}",
"public String getCompany_code() {\r\n return (String) get(\"company_code\");\r\n }",
"public String getCompanyId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes the communication base. | @SuppressWarnings("unused")
protected CommunicationBase() {
GBDXAuthManager gbdxAuthManager = new GBDXAuthManager();
configurationManager = new ConfigurationManager();
} | [
"public Communication() {\n if (impl == null) {\n init();\n }\n }",
"private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}",
"private void init() {\n try {\n client = new DeviceClient(connString, protocol);\n client.setMessageCallback(... | {
"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.ISOlimclose | public Boolean getIsolimclose() {
return isolimclose;
} | [
"java.lang.String getClosePrice();",
"public double getClosePrice() {\r\n return close;\r\n }",
"java.lang.String getNowClosePrice();",
"public void setIsolimclose(Boolean isolimclose) {\r\n this.isolimclose = isolimclose;\r\n }",
"public double getVClose() {\n return vClose;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Increase the score for Team A by 2 points. | public void addTwoForTeamA(View v) {
scoreTeamA = scoreTeamA + 2;
displayForTeamA(scoreTeamA);
} | [
"public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }",
"public void add2ToTeamA(View view){\n scoreTeamA = scoreTeamA+2;\n displayForTeamA(scoreTeamA);\n }",
"public void Team_A_2_Points(View v) {\n teamA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a Player to leave the lobby/game and remove its Scoreboard | public void leave(Player _player) {
if(_playersLobby.contains(_player)) {
_playersLobby.remove(_player);
}
if(_playersGame.contains(_player)) {
_playersGame.remove(_player);
}
_player.setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
this.updateScoreboards();
} | [
"@Override\r\n\tpublic void onPlayerLeave(Player p) {\r\n\t\tgetPlayers().remove(p);\r\n\t\tif(getPlayers().size()==0||isGameOver())\r\n\t\t\treturn;\r\n\t\talertLoss(p);\r\n\t\tif(getPlayers().size()==1)\r\n\t\t\talertWin(getPlayers().get(0));\r\n\t}",
"@Test\n public void removePlayerFromLobby_endLobby() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Why would this mission be invalid with the given AI unit and location? | public static String invalidReason(AIUnit aiUnit, Location loc) {
String reason;
return ((reason = invalidMissionReason(aiUnit)) != null)
? reason
: (loc instanceof Europe || loc instanceof Colony)
? invalidTargetReason(loc, aiUnit.getUnit().getOwner())
: ... | [
"@Override\n protected String isSpecificMissionValid() {\n if (!Ants.getWorld().getEnemyHills().contains(hill))\n return \"Enemy hill \" + hill + \" is no longer there\";\n return partialMission.isValid();\n }",
"private static String invalidMissionReason(AIUnit aiUnit) {\n S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Model__Group__3__Impl" $ANTLR start "rule__Model__Group__4" InternalCsv.g:975:1: rule__Model__Group__4 : rule__Model__Group__4__Impl rule__Model__Group__5 ; | public final void rule__Model__Group__4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCsv.g:979:1: ( rule__Model__Group__4__Impl rule__Model__Group__5 )
// InternalCsv.g:980:2: rule__Model__Group__4__Impl rule__Model__Group__5
... | [
"public final void rule__OpenCSV__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:1330:1: ( rule__OpenCSV__Group__4__Impl rule__OpenCSV__Group__5 )\n // InternalCsv.g:1331:2: rule__OpenCSV__Group__4__Impl ru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find a unique record that has nick_name = value asynchronously | public Future<io.remicro.saga.entities.tables.pojos.Person> findOneByNickName(String value) {
return findOneByCondition(Person.PERSON.NICK_NAME.eq(value));
} | [
"User findUserByNick(String nick);",
"User getByNick(String nick);",
"public Contact findParticipantForNickName(String nickName)\n {\n return participants.get(nickName);\n }",
"List<Task> findByUser_Nickname(String user);",
"List<BlogUser> getUserByNick(String nick);",
"public boolean nickExi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Public methods Adds a new argument associated with a key The argument will be replaced if this key already exists | public Object addArgs(String key, Object value) {
return args.put(key, value);
} | [
"private void addArg(String key, Object value) {\n\t\tif (requestArguments == null) {\n\t\t\trequestArguments = new Hashtable();\n\t\t}\n\t\tif (value == null || key == null) {\n\t\t\treturn;\n\t\t}\n\t\trequestArguments.put(key, value);\n\t}",
"private void addToArgs(String key, String value, List<String> args) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
///////////////////////// Message Handlers ///////////////////////////////////////////// Connecting to Bob and Setup Request Bob ActorRef and load selected db into memory | private Behavior<Message> connection_handler(UserInput cmd) {
List<Address> seedNodes = new ArrayList<>();
seedNodes.add(AddressFromURIString.parse("akka://MessageApp@127.0.0.1:2551"));
Cluster.get(getContext().getSystem()).manager().tell(new JoinSeedNodes(seedNodes));
getContext().getS... | [
"private void initDatabase() {\n database = getClient().getDatabase(getProps().getProperty(\"database\"));\n }",
"private DatabaseHandler(){\n createConnection();\n }",
"private void loadDataAndFillTableFromDatabase() {\n ServerOutLoadFriends loadFriends = new ServerOutLoadFriends();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the Action for the ActionEvent source. The new Action replaces any previously set Action but does not affect ActionListeners independantly added with addActionListener(). If the Action is already a registered ActionListener for the ActionEvent source, it is not reregistered. A sideeffect of setting the Action is t... | public void setAction(Action a) {
Action oldValue = getAction();
if (action==null || !action.equals(a)) {
action = a;
if (oldValue!=null) {
removeActionListener(oldValue);
oldValue.removePropertyChangeListener(actionPropertyChangeListener);
actionPropertyChangeListener = null;
}
configurePro... | [
"public void setActionEvent(ActionEvent<T> actionEvent) {\r\n\t\tthis.actionEvent = actionEvent;\r\n\t}",
"public void setAction(Action action) {\n this.action = action;\n }",
"public void setAction(Action action);",
"public void setAction(java.lang.String action);",
"public void actionPerformed(A... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for property leadUnitNo. | public void setLeadUnitNo(java.lang.String leadUnitNo) {
this.leadUnitNo = leadUnitNo;
} | [
"public java.lang.String getLeadUnitNo() {\r\n return leadUnitNo;\r\n }",
"public void setUnitNr(int value) {\n this.unitNr = value;\n }",
"public void setUnitId(long unitId);",
"public int getOrg_unit_lead_id() {\r\n return getAsNumber(\"org_unit_lead_id\").intValue();\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns SWTCTabItem instances that reference the CTabItems contained in the folder | public SWTCTabItem[] getItems() {
TestObject[] objs = (TestObject[])invoke("getItems");
SWTCTabItem[] items = null;
if (objs != null) {
items = new SWTCTabItem[objs.length];
for (int i=0; i<objs.length; i++)
items[i] = new SWTCTabItem(objs[i]);
}
return items;
} | [
"public CTabItem[] getItems() {\n checkWidget();\n return ( CTabItem[] )itemHolder.getItems();\n }",
"public TabItem [] getItems () {\r\n\tcheckWidget();\r\n\tTabItem [] result = new TabItem [itemCount];\r\n\tSystem.arraycopy (items, 0, result, 0, result.length);\r\n\treturn result;\r\n}",
"public Tab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Noargument constructor that creates the Staging Area. | public StagingArea() {
stagedForAddition = new TreeMap<>();
stagedForRemoval = new TreeMap<>();
} | [
"public abstract Area newArea();",
"AREA createAREA();",
"public VendoPortableAreaBean() {\n }",
"NFP_Area createNFP_Area();",
"private ImageArea()\n {\n this.areas = new ArrayList<Area>();\n this.gridWidth = 1;\n this.gridHeight = 1;\n }",
"public MetafileContextFunctions(St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Primary__Group_0__2" $ANTLR start "rule__Primary__Group_0__2__Impl" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:8193:1: rule__Primary__Group_0__2__Impl : ( ')' ) ; | public final void rule__Primary__Group_0__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:8197:1: ( ( ')' ) )
// ../com.blasedef... | [
"public final void rule__Primary__Group_2__0__Impl() throws RecognitionException {\n int rule__Primary__Group_2__0__Impl_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 813) ) { return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a SecretKey object from the provided key specification (key material) and the specified algorithm. | SecretKey generateKey(CipherSettings settings, KeySpec keySpec)
throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException; | [
"private SecretKey generateSecret(SecretKeyFactory skf, PBEKeySpec\n keySpec) throws EncryptionUtilsException {\n try {\n return skf.generateSecret(keySpec);\n } catch(InvalidKeySpecException e) {\n throw new EncryptionUtilsException(\"[EncryptionUtils] \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the specific command lines associated with this request. Each request is comprised of one or more specific commands. | public CommandLine[] getCommandLines() {
CommandLine[] cls = new CommandLine[commandLines.size()];
cls = commandLines.toArray(cls);
return cls;
} | [
"public String[] getCommands();",
"public static HTTPCommand[] getStandardCommands()\r\n {\r\n return new HTTPCommand[]\r\n {\r\n new WD_Propfind(),\r\n new WD_Proppatch(),\r\n new WD_Mkcol(),\r\n new WD_Get(),\r\n new WD_Lock(),\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method asignNeighbours Assign neighbor to the factory or planet. | private void asignNeighbours(String split [], String planetName){
double length = Double.parseDouble(split[1]);
boolean danger = Boolean.parseBoolean(split[2]);
if(factoryMap.containsKey(planetName)&&factoryMap.containsKey(split[0])){
factoryMap.get(planetName).addNeghbour(new Path(length, factoryMap.get(sp... | [
"public void setNeighbors(ArrayList<Area> neighbors){\n this.neighbors = neighbors;\n }",
"public void setNeighbours(List<NodeType> neighbours) {\n this.neighbours = neighbours;\n }",
"protected void setNeighbours(Cell[] neighbours) throws IllegalArgumentEvent {\r\n\t\tif(neighbours.length !... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 haveAttachment = 6; | boolean hasHaveAttachment(); | [
"boolean hasHaveReceiveAttachment();",
"boolean isSetValueAttachment();",
"public abstract boolean doesBlockAllowAttachment(int a, int b, int c);",
"public boolean isAttachment() {\n return isAttachment;\n }",
"public int getAttach_exist() {\n return attach_exist;\n }",
"private static nativ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Container's getter for CmsVideoTVO. | public CmsVideoTVOImpl getCmsVideoTVO() {
return (CmsVideoTVOImpl)findViewObject("CmsVideoTVO");
} | [
"public CmsVideoVOImpl getCmsVideoVO() {\n return (CmsVideoVOImpl)findViewObject(\"CmsVideoVO\");\n }",
"public CmsVideoEditVOImpl getCmsVideoEditVO() {\n return (CmsVideoEditVOImpl)findViewObject(\"CmsVideoEditVO\");\n }",
"public Videos getVideos()\n {\n return this.videos;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of constructor, of class Board. Exit upper left corner | @Test(expected = IllegalArgumentException.class)
public void testBoardExitCornerUpperLeft() {
Position exit = new Position(0, 0);
Board instance = new Board(6, 6, exit);
} | [
"public BoardTest()\n {\n }",
"@Test\r\n public void testBoardBorderDown() {\r\n Position exit = new Position(5, 3);\r\n Board instance = new Board(6, 6, exit);\r\n }",
"@Test\n\tpublic void testConstructBoard() {\n\t\tBoard newBored = new Board();\n\t\tassertFalse(newBored == null);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Method: boolean canBePerfect(Mensuration mensinfo) Purpose: Check whether note can be perfected/imperfected under a given mensuration (only checks pars propinqua) Parameters: Input: Mensuration mensinfo mensuration information Output: Return: whether note can be perfected/imperfected | public boolean canBePerfect(Mensuration mensinfo)
{
switch (notetype)
{
case NT_Semibrevis:
return mensinfo.prolatio==Mensuration.MENS_TERNARY;
case NT_Brevis:
return mensinfo.tempus==Mensuration.MENS_TERNARY;
case NT_Longa:
return mensinfo.modus_minor==... | [
"public boolean canBeAltered(Mensuration mensinfo)\n {\n switch (notetype)\n {\n case NT_Minima:\n return mensinfo.prolatio==Mensuration.MENS_TERNARY;\n case NT_Semibrevis:\n return mensinfo.tempus==Mensuration.MENS_TERNARY;\n case NT_Brevis:\n return mensinf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Defined Values' containment reference. If the meaning of the 'Defined Values' containment reference isn't clear, there really should be more of a description here... | DefinedValuesType getDefinedValues(); | [
"DefiningValuesType getDefiningValues();",
"public boolean isValueDefinition()\r\n \t{\r\n \t\treturn false;\r\n \t}",
"public NameOrURI getValueSetDefinition() {\r\n\t\treturn valueSetDefinition;\r\n\t}",
"org.hl7.fhir.ValueSet getValueSet();",
"Object getContainedValue();",
"public boolean hasValueDimen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for buffer size. | public int getBufferSize() {
return buffer.length;
} | [
"public int getBufferSize() {\n return buf.length;\n }",
"public int getBufferSize() {\n return buffer_size;\n }",
"public int getLength() {\n return buffer.length;\n }",
"public long getLen_Buffer() {\n return this.Len_Buffer;\n }",
"public int getLength() {\r\n\t\tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bidirectional manytoone association to AssetUse | @ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="asset_id")
public AssetUse getAssetUse() {
return this.assetUse;
} | [
"public interface AssetReference\n{\n\tpublic String getOsidLoadKey();\n\n\tpublic String getAssetIdString();\n}",
"public String relatedAssetName() {\n return relatedAssetName;\n }",
"public String relatedAssetType() {\n return relatedAssetType;\n }",
"public void useAsset(Asset asset){\n\t\tasset.us... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that iterates through fileLines and calculates the frequency of each word of a given text file that was specified in the object's constructor. Makes us of printTopTen() helper method to print top 10 most frequent words | public void wordFreq() {
map = new HashMap<String, Integer>();
for (String line : fileLines) {
Scanner scan = new Scanner(line);
scan.useDelimiter("[^a-zA-Z']");
while (scan.hasNext()) {
String word = scan.next();
word = word.toLowerCase();
word = word.replaceAll("^'+", "");
word = word.... | [
"public TextStatistics(File file) {\r\n\t\tcharCount = 0;\r\n\t\twordCount = 0;\r\n\t\tlineCount = 0;\r\n\t\tletterCount = 0;\r\n\t\twordLengthCount = 0;\r\n\t\tAvgWordLengthCount = 0;\r\n\t\tHashMap<Character, Integer> hash = new HashMap<Character, Integer>();\r\n\t\t\r\n\t\ttry {\r\n\r\n\t\t\tScanner lineScanner ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the certificate chain | public Certificate[] getCertificateChain(); | [
"public X509Certificate[] getCertificateChain();",
"public Certificate[] getClientChain() {\r\n\t\ttry {\r\n\t\t\tif (keyStore.size() > 0) {\r\n\t\t\t\tEnumeration<String> aliases = keyStore.aliases();\r\n\t\t\t\twhile (aliases.hasMoreElements()) {\r\n\t\t\t\t\tString alias = aliases.nextElement();\r\n\t\t\t\t\ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apply patch to rubric and update | @Transactional(value = Transactional.TxType.MANDATORY)
public Rubric applyUpdate(JsonNode patches, Rubric rubric) throws JsonProcessingException, ResponseStatusException {
ObjectMapper objectMapper = new ObjectMapper();
JsonNode rubricJson = objectMapper.convertValue(rubric, JsonNode.class);
... | [
"void patch(final ResourceOperation sourceResourceOperation, final ICallback<ResourceOperation> callback);",
"void applyPatch(@NonNull File pPatchFile);",
"ResourceOperation patch(final ResourceOperation sourceResourceOperation) throws ClientException;",
"Call patch(final Call sourceCall) throws ClientExcepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return all reachable keys and their distance | Map<Character, Map<Character, Integer>> getAllReachableKeys(String startPositions) {
Map<Character, Map<Character, Integer>> totalResult = new HashMap<>();
for (Character start : startPositions.toCharArray()) {
ShortestPathAlgorithm.SingleSourcePaths<Character, DefaultWeightedEdg... | [
"HashMap<GamePiece, Integer> distanceMap(GamePiece from) {\n ArrayDeque<GamePiece> worklist = new ArrayDeque<GamePiece>();\n HashMap<GamePiece, Integer> distances = new HashMap<GamePiece, Integer>();\n ArrayList<GamePiece> seen = new ArrayList<GamePiece>();\n distances.put(from, 0);\n worklist.add(fr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decrements the value of life attribute by 1. | public void decrementLife() {
life -= 1;
} | [
"public void removeLife() {\r\n life--;\r\n }",
"public void decreaseLife() {\n\t\tif(life<=0) {\n\t\t\tlife = 0;\n\t\t\tisAlive = false;\n\t\t}else if(life==1) {\t\t\t\t// If only one life left, then player will die\n\t\t\tlife--;\n\t\t\tisAlive = false;\n\t\t}else {\n\t\t\tlife--;\n\t\t}\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searches all nodes in cache for item. If found it moves that node to the top | public boolean searchItem(TreeObject item){
foundIt = false;
cacheSearches ++;
for (int i=0; i<cacheLength; i++){
currentCacheNode = cacheList.get(i);
if( currentCacheNode.containsObject(item) ){
cacheHits ++;
if (i > 0){
... | [
"public void moveToTop(BTreeNode moveItem){\n itemIndex = cacheList.indexOf(moveItem);\n cacheList.remove(itemIndex);\n cacheList.addFirst(moveItem);\n }",
"protected V cacheItem(final V item) {\n if (item != null) {\n final V existing = _frontCacheByUID.putIfAbsent(item.getUniqueI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets an iterator for the child XPath axis that supports named access. | public Iterator namedAccessIterator(
Object contextNode,
ContextSupport support,
String localName,
String namespacePrefix,
String namespaceURI)
throws UnsupportedAxisException {try{__CLR4_0_62a12a1l1l0dvqs.R.inc(2957);
__CLR4_0_62a12a1l1l0... | [
"public abstract Iterator getChildElements(Name name);",
"Iterator getChildAxisIterator(Object contextNode) throws UnsupportedAxisException;",
"Iterator getDescendantAxisIterator(Object contextNode) throws UnsupportedAxisException;",
"Iterator getDescendantAxisIterator(Object contextNode)\n throws Unsu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the hora field. | public void setHora(java.lang.String hora); | [
"private void setHora() {\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm\");\n Date date = new Date();\n String dateformatted = dateFormat.format(date);\n txtHora.setText(dateformatted);\n }",
"public void setHoraInicio(Date horaInicio) \r\n { \r\n this.horaInicio ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List of accelerators enabled for this CDF instance. repeated .google.cloud.datafusion.v1beta1.Accelerator accelerators = 22; | @java.lang.Override
public java.util.List<com.google.cloud.datafusion.v1beta1.Accelerator> getAcceleratorsList() {
return accelerators_;
} | [
"@java.lang.Override\n public java.util.List<? extends com.google.cloud.datafusion.v1beta1.AcceleratorOrBuilder>\n getAcceleratorsOrBuilderList() {\n return accelerators_;\n }",
"java.util.List<com.google.cloud.compute.v1.AcceleratorConfig> getAcceleratorsList();",
"public java.util.List<? extends com... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENFIRST:event_tpw_adminActionPerformed TODO add your handling code here: | private void tpw_adminActionPerformed(java.awt.event.ActionEvent evt) {
} | [
"private void txtidDemActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void txtemailActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void cmdMoveToCreateUserPanel3ActionPerformed(java.awt.event.ActionEvent evt) {\n}",
"private void jTextField6ActionPerformed(java.awt.even... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the Array of Cash Quotes | public double[] cashQuote()
{
if (null == _lsCashQuote) return null;
int iNumQuote = _lsCashQuote.size();
if (0 == iNumQuote) return null;
int i = 0;
double[] adblQuote = new double[iNumQuote];
for (double dblQuote : _lsCashQuote)
adblQuote[i++] = dblQuote;
return adblQuote;
} | [
"public String getQuotes();",
"@Override\n public final char[] asQuotedChars() {\n char[] result = _quotedChars;\n if (result == null) {\n _quotedChars = result = JSON_ENCODER.quoteAsString(_value);\n }\n return result;\n }",
"private void BuildQuotes(String result) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the action facet (if any) that is associated with this context. | public TLActionFacet getModelActionFacet() {
return modelActionFacet;
} | [
"public TLActionFacet getActionFacet(String name) {\n return actionFacetManager.getChild(name);\n }",
"public List<TLActionFacet> getActionFacets() {\n return actionFacetManager.getChildren();\n }",
"public GeoFilterActions action() {\n return this.action;\n }",
"public Action ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the vesselGrossTonnage property. | public void setVesselGrossTonnage(double value) {
this.vesselGrossTonnage = value;
} | [
"public void setGrossTonnage(double grossTonnage);",
"public double getVesselGrossTonnage() {\n return vesselGrossTonnage;\n }",
"public void setGrossAmount(MMDecimal grossAmount) {\r\n this.grossAmount = grossAmount;\r\n }",
"void setGrossTotal(java.math.BigDecimal grossTotal);",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getFreelancerByNIF method, of class RegisterFreelancer. | @org.junit.Test
public void testGetFreelancerByNIF() {
System.out.println("getFreelancerByNIF");
String nif = "123";
Freelancer expResult = this.freel1;
Freelancer result = regfreel.getFreelancerByNIF(nif);
assertEquals(expResult, result);
} | [
"@org.junit.Test\n public void testRegisterFreelancer() {\n System.out.println(\"registerFreelancer\");\n Freelancer freel = regfreel.newFreelancer(\"Rui Carvalho\", LevelOfExpertise.SENIOR, \"rc@esoft.pt\", \"123\", \"123\", \"Rua-Zona-CodPostal\", \"Portugal\");;\n boolean expResult = true... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test Name: test_run_5 Description: Verify that the messagesHandler() function sets the is ClientManagerRunning flag to false to close the TCP connection if the sensor state is set to SensorState.OPERATIONAL and the received Global_1h_Watchdog.timeLeftBeforeExpiration is higher than Local_1h_Watchdog._1h_WatchdogExpirat... | @Test
public void test_run_5() throws IOException, InterruptedException {
// bind server socket and start TCPserver
mockTCPserverTest.getServerSocket().bind(new java.net.InetSocketAddress(port_1));
mockTCPserverTest.startServer(mockTCPserverTest.getServerSocket());
mockServerThread.start();
TCPclientSo... | [
"@Test\n\tpublic void test_run_4() throws IOException, InterruptedException {\n\t\t\n\t\t// bind server socket and start TCPserver\n\t\tmockTCPserverTest.getServerSocket().bind(new java.net.InetSocketAddress(port_1));\n\t\tmockTCPserverTest.startServer(mockTCPserverTest.getServerSocket());\n\t\tmockServerThread.sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the selection criteria for the statement. | public Expression getSelectionCriteria() {
return getSQLStatement().getWhereClause();
} | [
"public String getSELECT_CRITERIA() {\r\n return SELECT_CRITERIA;\r\n }",
"selection_statement getSelection_statement();",
"protected DatabaseSelectAllStatement buildSelectLockQuery (){\n DatabaseSelectAllStatement ds = super.buildSelectLockQuery();\r\n \r\n \r\n //AND OPER... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first student in the ordered set where gender = &63;. | public static Student fetchByGender_First(boolean gender,
OrderByComparator<Student> orderByComparator) {
return getPersistence().fetchByGender_First(gender, orderByComparator);
} | [
"public static Student findByGender_First(boolean gender,\n\t\tOrderByComparator<Student> orderByComparator)\n\t\tthrows kwan.org.database.exception.NoSuchStudentException {\n\t\treturn getPersistence().findByGender_First(gender, orderByComparator);\n\t}",
"@Override\n\tpublic Student fetchByGender_First(int stud... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct crs options with default input and target crs. | public CrsOptions(String inputCRS, String targetCRS) {
this.inputCRS = inputCRS;
this.targetCRS = targetCRS;
} | [
"public CrsOptions(String inputCRS) {\n this.inputCRS = inputCRS;\n }",
"public DefaultGeographicCRS(final GeographicCRS crs) {\r\n super(crs);\r\n }",
"private void readCRS() throws IOException {\n \n \t\t// check to see if there is a projection file\n \t\tif (source instanceof File\n \t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the response must have a (possibly 0length) body. See RFC 2616 section 4.3. | private static boolean hasBody(Response response) {
// HEAD requests never yield a body regardless of the response headers.
if ("HEAD".equals(response.request().method())) {
return false;
}
int responseCode = response.code();
if ((responseCode < HTTP_CONTINUE || responseCode >= 200)
&... | [
"public boolean isExpectingBody() {\r\n\t\tif (Method.GET.equals(method)) return false;\r\n\t\tLong size = mime.getContentLength();\r\n\t\tif (size != null) {\r\n\t\t\tif (size.longValue() == 0) return false;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tString s = mime.getFirstHeaderRawValue(MimeMessage.TRANSFER_ENCODING)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests both the getOwner and setOwner methods by setting the owner and then checking that the set owner is what is returned by the getOwner method | public void testGetSetOwner() {
exp = new Experiment("10");
Profile owner = new Profile("id1", "owner", "contact");
exp.setOwner(owner);
assertEquals("get/setOwner does not work", "owner", exp.getOwner().getUsername());
} | [
"public void testGetOwner_1_accuracy() {\n instance.setOwner(owner);\n assertTrue(\"Owner is not set properly.\", owner == instance.getOwner());\n }",
"@Test\n\tpublic void testGetOwner() {\n\t\tassertEquals(bug1.getOwner(), null);\n\t\tbug1.update(confirm);\n\t\tbug1.update(possession);\n\t\tass... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines whether the specified eclass is an association class. By default, it is assumed that nothing is an association class because Ecore does not directly support this concept. | public boolean isAssociationClass(EClassifier eclass) {
return false;
} | [
"public void setAssociationClass(boolean isac) {\n\t\tisAssocClass = isac;\n\t}",
"private static <T> boolean isAssociationType(String property, ManagedType<T> classMetadata) {\n return classMetadata.getAttribute(property).isAssociation();\n }",
"public boolean isAssociation() {\n\t\treturn associatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test ProjectManagerImpl constructor. Create ProjectManagerImpl instance 100 times use given namespace. | public void testConstructor2() throws Exception {
long startTime = System.currentTimeMillis();
for (int i = 0; i < 100; i++) {
ProjectManager projectManager = new ProjectManagerImpl("stress.ProjectManagerImpl");
assertNotNull("projectManager can not be null.", projectManager);
... | [
"public void testConstructor1() throws Exception {\n long startTime = System.currentTimeMillis();\n for (int i = 0; i < 100; i++) {\n ProjectManager projectManager = new ProjectManagerImpl();\n assertNotNull(\"projectManager can not be null.\", projectManager);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a Configurable instance that can be used to create SqlServer with optional configuration. | public static Configurable configure() {
return new SqlServerManager.ConfigurableImpl();
} | [
"public static Configurable configure() {\n return new SqlVirtualMachineManager.ConfigurableImpl();\n }",
"public static Configurable configure() {\n return new StorageSyncManager.ConfigurableImpl();\n }",
"private static Configuration createInstance() {\n\t\tif (SystemProperty.environment.v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new ResultFolderPath object | public ResultFolderPath() {
} | [
"public static File createFolder() {\r\n\t\t\t\t\t\t\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-M-yyyy hh:mm:ss\");\r\n\t\tString date = sdf.format(new Date()).replace(\";\",\"-\").replace(\":\",\"-\");\r\n\t\ttestResults = new File(userpath + File.separator + \"output\" + File.separator + date );\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Public Methods Returns a server socket which uses all network interfaces on the host, and is bound to a the specified port. The socket is configured with the socket options (such as accept timeout) given to this factory. | public ServerSocket createSocket (int port)
throws IOException, KeyStoreException, NoSuchAlgorithmException,
CertificateException, UnrecoverableKeyException,
KeyManagementException; | [
"private ServerSocket getServerSocket()\n {\n ServerSocket serverSocket = null;\n try\n {\n serverSocket = new ServerSocket(this.port);\n }\n catch (IOException e)\n {\n PipeLog.error(\"RTListenerSocket(): Could not listen on port <\" + this.port + \">\");\n }\n\n return serverSoc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is to add ProductCatagory | public void addCategory(ProductCatagory pCatagory)
throws BusinessException; | [
"void add(ProductCategory category);",
"void addCategory(Product product, Category category);",
"sust.bookshelves.entity.Catagory addCatagory(sust.bookshelves.entity.Catagory model) throws sust.bookshelves.exception.GenericBusinessException;",
"private void addCategory(ActionContext context, Connection db) th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create and return a SelectionListDataField with the list of selected users | protected SelectionListDataField createAndConfigureUserList() {
Hashtable h = new Hashtable();
h.put(DataField.ATTR, IShareRemoteReference.SHARE_TARGET_USERS_LIST);
h.put(DataField.TEXT_STR, ApplicationManager.getTranslation(IShareRemoteReference.SHARE_TARGET_USERS_LIST));
h.put(Data... | [
"public ch.ivyteam.ivy.scripting.objects.List<ch.ivyteam.ivy.security.IUser> getListSelectedUser()\n {\n return listSelectedUser;\n }",
"private void consultantsFieldFill(){\n ObservableList<String> userList = FXCollections.observableArrayList();\n userList.add(\"All\");\n //Query and ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
There are multiple features that ingest CSV files so the original file should not be modified. | @Test
public void doImport_doesNotModifyOriginalCsv() {
ExternalDataReader externalDataReader = new ExternalDataReaderImpl(null);
externalDataReader.doImport(formDefToCsvMedia);
assertThat(dbFile.exists(), is(true));
assertThat(csvFile.exists(), is(true));
} | [
"public void preprocess(String inputFile) throws IOException {\n String csvFilePath = inputFile;\n BufferedReader br = null;\n String line = \"\";\n String cvsSplitBy = \",\";\n\n FileWriter writer = new FileWriter(\"preprocessed.csv\");\n BufferedWriter bwr = new BufferedW... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface used to abstract out the details of the rendering of a tooltip using either a lightweight or heavyweight renderer. Implementations of this interface will handle all the logic necessary to display and hide the tooltip regardless of the method. This allows the manager (or other custom code) to call directly to ... | public interface ToolTipRenderer
{
public void showToolTip(ToolTip toolTip);
public void hideToolTip(ToolTip toolTip);
} | [
"public TooltipDisplay getTooltipDisplay();",
"void showTooltip();",
"boolean isShowTooltip();",
"@Override\n public JToolTip createToolTip() {\n return (new CustomJToolTip(this));\n }",
"public void setTooltipDisplay(TooltipDisplay tooltipDisplay);",
"void setShowTooltip(boolean ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads a measurement from the Instrument. The method returns with the measured R, Phi, and Frequency values or with NaN if the measurement was invalid. | private MValue Measure()
throws IOException, ScriptException {
// local variables
MValue ret = new MValue();
// return something useful while debugging
if (inJUnitTest()) {
// just increase the previous frequency value
JUnitFr... | [
"public void readMeter() throws IOException {\n\t\tbyte[] meterData = dlt645.readMeterData(JOYMETER_TAG_CURRENT_DATA);\n\t\tif (meterData.length < 27)\n\t\t\tthrow new IOException(\"Invalid data length\");\n\n\t\tthis.measureTime = LittleBitConverter.ToUInt32(meterData, 0);\n\t\tthis.remaining = dlt645.BCD2Double(m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__RequestPortLink__Group__2" $ANTLR start "rule__RequestPortLink__Group__2__Impl" InternalComponentDefinition.g:3659:1: rule__RequestPortLink__Group__2__Impl : ( ( ';' )? ) ; | public final void rule__RequestPortLink__Group__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalComponentDefinition.g:3663:1: ( ( ( ';' )? ) )
// InternalComponentDefinition.g:3664:1: ( ( ';' )? )
{
//... | [
"public final void rule__RequestPortLink__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:3652:1: ( rule__RequestPortLink__Group__2__Impl )\n // InternalComponentDefinition.g:3653:2: rule__Re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is our store with its initial state of zero and the reducer seen above | public void counter() {
Store<Integer, String> store = Redux.createStore(0, reducer);
// dispatch an INC action
store.dispatch(INCREMENT);
store.getState(); // 1
// dispatch an DEC action
store.dispatch(DECREMENT);
store.getState(); // 0
} | [
"protected abstract S mkStore();",
"protected abstract int getStateStoreCount();",
"@Override\n public Integer reduceInit() { return 0; }",
"public State getInitialState() {\r\n \t\treturn initialState;\r\n \t}",
"State computeState();",
"@Override\n Store apply(@Required Store store);",
"Store cr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the numeroDocumento property. | public void setNumeroDocumento(int value) {
this.numeroDocumento = value;
} | [
"public void setNumDocumento(int value) {\n this.numDocumento = value;\n }",
"public void setNumDocumento(String numDocumento) {\n this.numDocumento = numDocumento;\n }",
"public void setIdNumeroDocumento(int value) {\n this.idNumeroDocumento = value;\n }",
"public void setTipoDo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns seatnumber who is playing | public int getSeatPlaying() {
return this.seatPlaying;
} | [
"public int getSeats ()\r\n\t{\r\n\t\treturn seatNumber;\r\n\t}",
"public int getSeatNumber() {\n return seatNumber;\n }",
"public int getSeatNumber() {\n\t\treturn seatNumber;\n\t}",
"public int getSeatNum() {\n\t\t\treturn seatNum;\n\t\t}",
"public int getSeatIndex() {\n return seatIndex_;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to index a blackboard artifact for keyword search | @Messages({"Extract.indexError.message=Failed to index artifact for keyword search.",
"Extract.noOpenCase.errMsg=No open case available."})
void indexArtifact(BlackboardArtifact bbart) {
try {
Blackboard blackboard = Case.getCurrentCaseThrows().getServices().getBlackboard();
... | [
"public void search(String keyword){\n \r\n }",
"@Test\n\tpublic void testKeywordQuery(){\n\t\t//manager.getResponse(\"american football \"); //match multiple keywords\n//\t\tmanager.getResponse(\"list of Bond 007 movies\");\n//\tmanager.getResponse(\"Disney movies\");\n\t\t//manager.keywordQuery(\"Paul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get true if PDL is configured to be down, false if not. | public boolean get_is_pdl_down () {
return param_set.get_is_pdl_down();
} | [
"public boolean isDownState() {\n return downState;\n }",
"public boolean isDown() {\n\t\treturn downSince != null;\n\t}",
"public boolean isDown() {\n return down;\n }",
"protected boolean isDndOn() {\n return mZenModeController.getZen() != Settings.Global.ZEN_MODE_OFF;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
when add stage lose focus refresh Current Term and AcademicYear Combo Box Items | @FXML
private void addAction() {
stage.focusedProperty().addListener((ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) -> {
try {
if (oldValue) {
comboBoxItems();
displayCurrentTerm();
}
... | [
"private void fromComboBoxFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_fromComboBoxFocusGained\n fromComboBox.removeAll();\n fromComboBox.removeAllItems();\n String[] s = DataCollection.GetDownloadedPageTitles();\n for(int i = 0; i < s.length; i++){\n fromComb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method calculates the remainder of each feature. | public static double[] remainderOfFeature(ListOfExamples trainSet,
int numberOfExamples, List<ValuePair> path){
Iterator<Example> iter = trainSet.iterator();
double[] remainder = new double[trainSet.numberOfFeatures];
Example temp;
boolean contains;
double countPos, countValue1, countPosAndVal1, countPosA... | [
"public void incrementFeaturesRevealed(){\n featuresRevealed++;\n }",
"public double getFeature(int i) {\n\t return _features[i];\r\n\t//return 0;\r\n}",
"@Test\r\n\tpublic void testDivideBy() {\r\n\t\tcomp1.divideBy(2);\r\n\t\tassertTrue(((MLNumber)comp1.getFeature(3)).getFeatureValue() == 200);\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a selected student from the JTable and students Hash Map If no student is selected, requests that you select one. | @Override
public void actionPerformed(ActionEvent e) {
try {
int i = frame.studentPanel
.getStudentTable()
.getSelectedRow();
frame.students.remove(i);
frame.studentPanel
.getStudentTableModel()
.removeRow(i);
} ca... | [
"private void deleteSelectedStudents() {\n // prevent calling refresh() for each record\n facade.removeObserver(this);\n\n for (var student : studentsPane.getSelected()) {\n try {\n facade.deleteStudent(student.getID());\n } catch (Exception ex) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adapt a JsonNode to a Stream of limit orders, the node past in here should be the body of a a/b/as/bs key. | public static Iterator<LimitOrder> adaptLimitOrders(
Instrument instrument, Order.OrderType orderType, JsonNode node) {
if (node == null || !node.isArray()) {
return Collections.emptyIterator();
}
return Iterators.transform(
node.elements(), jsonNode -> adaptLimitOrder(instrument, orderT... | [
"public static LimitOrder adaptLimitOrder(\n Instrument instrument, Order.OrderType orderType, JsonNode node) {\n if (node == null || !node.isArray()) {\n return null;\n }\n Iterator<JsonNode> iterator = node.elements();\n BigDecimal price = nextNodeAsDecimal(iterator);\n BigDecimal volume ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column hx_current_stock.count_way | public Integer getCountWay() {
return countWay;
} | [
"@Transactional\r\n\tpublic Integer countPaywayss() {\r\n\t\treturn ((Long) paywaysDAO.createQuerySingleResult(\"select count(o) from Payways o\").getSingleResult()).intValue();\r\n\t}",
"public int count() {\n ArrayList<HashMap<String, String>> rs = this.query(\"select count(*) as count from \" + this.use... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
execute target 'mergeCakupan' and expect a message ' ' in the log | public void testMergeCakupan() {
expectLogContaining("mergeCakupan", "");
} | [
"public void testReportCakupan() {\n\t \texpectLogContaining(\"reportCakupan\", \"\");\r\n\t }",
"AntRunAction.Builder antrun(String buildFilePath);",
"private void addMultiJobBuildCommand() {\r\n \tString html_text = \"\";\r\n String report_format=\"\";\r\n\r\n if (getOptionHTMLBuildDesc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fired when client list should be updated | void onClientsUpdated(String[] clients); | [
"public static void clientListUpdater() {\r\n\t\tclientList.clear();\r\n\t\tclientList.addAll(serverConnector.getAllClients());\r\n\t}",
"public void updateClient()\n\t{\n\t\t// TODO\n\t}",
"public void setupClientList()\r\n {\r\n clientsLV.getItems().setAll(allClients);\r\n }",
"void refreshClie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Visits a binding operation input element. | boolean visit(BindingInput bindingIn); | [
"public BindingInput createBindingInput();",
"boolean visit(BindingOperation bindingOp);",
"boolean visit(BindingOutput bindingOut);",
"InputOperation getInputOperation();",
"public BindingOperation createBindingOperation();",
"RelNode getInput();",
"boolean visit(Binding binding);",
"void bind(Object... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns default value for parameter InitTempCoffee. This method should not be called by user | @AnyLogicInternalCodegenAPI
public double _InitTempCoffee_DefaultValue_xjal() {
final Main self = this;
return
90
;
} | [
"protected void onChange_InitTempCoffee() {\n onChange_InitTempCoffee_xjal( InitTempCoffee );\n }",
"public Integer getDefaultTemp() {\n return defaultTemp;\n }",
"public void setDefaultTemp(Integer defaultTemp) {\n this.defaultTemp = defaultTemp;\n }",
"@AnyLogicInternalCodegenAPI\n public doubl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TBD: to test ejb, enable it. In the end, should be reomved. Create an instance of ServiceManagerFactory | private ServiceManagerFactory() throws ServiceException {
initialize();
} | [
"private void start() throws EJBRegistrationException {\r\n try {\r\n Properties properties = new Properties();\r\n properties.put(Context.INITIAL_CONTEXT_FACTORY, \"org.apache.openejb.client.RemoteInitialContextFactory\");\r\n properties.put(Context.PROVIDER_URL, \"ejbd://lo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Konstruktor koji inicijalizuje objekat i postavlja vrednosti trid,trener, polaznik,vv,grad,clanarina,sala na nove vrednosti. | public Trening(int trid, Trener trener, Polaznik polaznik, VrstaVezbe vv, Grad grad, Clanarina clanarina, Sala sala) {
this.trid = trid;
this.trener = trener;
this.polaznik = polaznik;
this.vv = vv;
this.grad = grad;
this.clanarina = clanarina;
this.sala = sala;
... | [
"@Override\r\n public String vratiVrednostiZaUpdate() {\n \r\n return String.format(\"naziv='%s', trener='%s', menadzer='%s', sponzor='%s', igre='%s', zaradjenNovac=%f, idRegiona=%d, idLokacije=%d\", \r\n this.getNaziv(), this.getTrener(), this.getMenadzer(), this.getSponzor(), this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |