query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Insert DVA Meta Data | public void insertDVAMetaData(String uname, String graphName, String subject, String object)
throws SQLException {
SPARQLDoer sDoer = new SPARQLDoer(connection, uname);
sDoer.insertObjectPropQuad(subject, "rdf:type", object);
} | [
"private void insertMetaDataValues(String key, String value, Connection connection) throws SQLException {\n try (PreparedStatement stmt = connection.prepareStatement(\"INSERT INTO metadata VALUES (?, ?)\")) {\n stmt.setString(1, key);\n stmt.setString(2, value);\n stmt.execut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets cash fee type. | public String getCashFeeType() {
return cashFeeType;
} | [
"public String getFeeType() {\n return feeType;\n }",
"public String getFee_type() {\r\n\t\treturn fee_type;\r\n\t}",
"public com.mgipaypal.ac1211.client.FeeType getFeeType() {\r\n return feeType;\r\n }",
"@Schema(description = \"The type of fee. For more information about Selling on Amazo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the suite this test is part of. | public XmlSuite getSuite() {
return m_suite;
} | [
"public String getSuite()\n {\n return suite;\n }",
"public int getSuite() {\n\n return suite;\n }",
"public static Test suite()\r\n {\r\n return suite(com.redknee.app.crm.TestPackage.createDefaultContext());\r\n }",
"public String getSuiteName() {\n return suiteName... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the id for a track identified by the given varp and a bit index | private int getTrackId(int variableId, int bit)
{
// values are packed into a coordgrid
int packed = (variableId << 14) | bit;
EnumComposition ids = client.getEnum(EnumID.MUSIC_TRACK_IDS);
for (int key : ids.getKeys())
{
int value = ids.getIntValue(key);
if (value == packed)
{
return key;
}
... | [
"long getPokemonId(int index);",
"public String getTrackIdField();",
"long getVideoTrackId();",
"long getAttackingPokemonId(int index);",
"protected abstract String getTrackId();",
"long getAudioTrackId();",
"int id(int v) {\n return id[v];\n }",
"public int id(int v) {\n return id[v]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assert that an array has elements; that is, it must not be null and must have at least one element. Assert.notEmpty(array, "The array must have elements"); | public static void notEmpty(Object[] array, String message) {
if (array == null || array.length == 0) {
throw new AssertException(message);
}
} | [
"public static void notEmpty(Object[] array) {\n\t\tnotEmpty(array, \"[Assertion failed] - this array must not be empty: it must contain at least 1 element\");\n\t}",
"private void assertEmpty(final String msg, Object[] array) {\n\t\tassertEquals(msg + \" should be empty\", 0, array.length);\n\t}",
"public stat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Js__NameAssignment_1" $ANTLR start "rule__Js__TypeAssignment_4" InternalMyDsl.g:14701:1: rule__Js__TypeAssignment_4 : ( RULE_STRING ) ; | public final void rule__Js__TypeAssignment_4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:14705:1: ( ( RULE_STRING ) )
// InternalMyDsl.g:14706:2: ( RULE_STRING )
{
// InternalMyDsl.g:14706:2: ( RUL... | [
"public final void rule__Json__TypeAssignment_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:14735:1: ( ( RULE_STRING ) )\n // InternalMyDsl.g:14736:2: ( RULE_STRING )\n {\n // InternalMyDs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the cell at given position is a gap cell. | public boolean checkIsGapCell(IMap map, Position cellPosition) {
List<Position> neighbors = map.getNeighborCells(cellPosition);
for (Position neighbor : neighbors) {
if (map.getCell(neighbor) instanceof EnemyShipCell) {
return true;
}
}
return false;
} | [
"private boolean reachableGap(int a_xmin, int a_xmax, int pos)\n {\n boolean reachableGap = false;\n int destinationY = GEBT_MarioAgent.MARIO_Y;\n if(pos-1 > m_cellsRun)\n {\n destinationY = GEBT_MarioAgent.MARIO_Y + (pos - 1 - m_cellsRun);\n reachableGap = !isOb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column zq_shipping.receiver_phone | public void setReceiverPhone(String receiverPhone) {
this.receiverPhone = receiverPhone;
} | [
"public void setReceiverPhone(java.lang.String receiverPhone) {\r\n this.receiverPhone = receiverPhone;\r\n }",
"public void setReceiverPhone(String receiverPhone) {\n this.receiverPhone = receiverPhone == null ? null : receiverPhone.trim();\n }",
"public void setReceivePhone(String receiveP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates the list of Public Objective Cards from a JSON configuration file. | static List<PublicObjectiveCard> getPublicObjectives() {
try {
String content = new String(Files.readAllBytes(Paths.get(Parameters.PUBLIC_OBJECTIVES_PATH)));
JSONObject parsedContent = (JSONObject) new JSONParser().parse(content);
JSONArray publicObjectives = (JSONArray) pars... | [
"public static void loadCards() {\n try {\n ObjectMapper mapper = new ObjectMapper(); //create mapper\n\n\n String basePath = new File(\"\").getAbsolutePath();\n File json = Paths.get(basePath,\"resources\",\"JSON_Cartas.json\").toFile();\n System.out.println(\"Att... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sum of all nodes in a binary tree | public static int sumOfChildren(TreeNode r){
if (r==null) {
return 0;
}
if(r.left == null && r.right == null) {
return r.data;
}
if(r.left == null && r.right != null) {
return r.right.data+r.data;
}
if(r.right == null && r.left ... | [
"private int sumOfAllNodes() {\n return this.value + (this.left != null ? this.left.sumOfAllNodes() : 0) +\n (this.right != null ? this.right.sumOfAllNodes() : 0);\n }",
"public int treeSum(){\n\treturn treeSum(root);\n}",
"public void findSumFromRootToLeaf(){\n\n\t}",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the current locale and informs all listeners and plugin that the locale has changed. | public static void localeChanged() {
I18n.setLocale(PropertiesManager.getLocale( ));
PluginManager.setLocale(I18n.getLocale( ));
fireLocaleChangedEvent(new LocaleChangedEvent(Application.getApplication( )));
} | [
"public void setLocale(Locale l) {\n if (!initialized)\n super.setLocale(l);\n else {\n Locale oldLocale = locale;\n locale = l;\n dayChooser.setLocale(locale);\n monthChooser.setLocale(locale);\n firePropertyChange(\"locale\", oldLocale, locale);\n }\n }",
"protected void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cria o indice TFIDF | private static void createTFIDFIndex() {
System.out.println("Criando Indice... ");
for (int i = 1; i <= allDocuments.size(); i++) {
String doc = allDocuments.get(i);
//adiciona os termos ao indice, calculando seu tf;
addToTable(doc.split(" "), String.valueOf(i));
}
//Criar indice com o idf de todo... | [
"private static Hashtable<Hashtable<String, Double>, Hashtable<String, Integer>> addIdfToIndice() {\n\t\tHashtable<Hashtable<String, Double>, Hashtable<String, Integer>> dict = new Hashtable<>();\n\t\tSet<String> keys = hashTable.keySet();\n\t\t//Para cada termo, calcula seu idf e o adiciona ao indiceTFIDF\n\t\tfor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Causes the poison to do its damaging effect over time until the duration has ended or when the 'cure' method is called The Damage for each tick is the (totalDamage / damageTikAmount) The tick will occurs each (duration / damageTikAmount) | public void poison(float duration, float totalDamage, int damageTickAmount)
{
_currentDamageTikWait = 0;
_duration = duration;
_damageTickAmount = damageTickAmount;
if(totalDamage == 0)
totalDamage = 1f;
if(_duration == 0)
_duration = 1;
_tikDuration = _duration / (float)_damageTickAmount;
... | [
"public void damage() {\n\t\tif (System.currentTimeMillis() - lastDamage > 250 && !invincible) {\r\n\t\t\thealth--;\r\n\t\t\tif (health <= 0) {\r\n\t\t\t\tkill();\r\n\t\t\t}\r\n\t\t\tlastDamage = System.currentTimeMillis();\r\n\t\t} else {\r\n\t\t\tinvincible = true;\r\n\t\t}\r\n\t}",
"public void Decriment_Healt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Utilize funtion used for parsing single term string like: 3x^4. | private static int[] termParser(String term) {
if (term == null || term.isEmpty()) {
throw new IllegalArgumentException("empty term");
}
char[] termChars = term.toCharArray();
int idx = 0;
int length = termChars.length;
int coefficient = 0;
int power = 0;
boolean isNegative = false... | [
"public static void main(String[] args){\n\t\tmystring(\"2^3 3^4 4^5\"); \n\t\n\t}",
"@Test\n public void testParserWeirdSpacing()\n {\n String polynomial = \" 3 x ^2 +2 x + 1 \";\n Parser.ReInit(new StringReader(polynomial));\n Expression exp = parser.parse();\n \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the current thread's unique ID, assigning it if necessary | public int getThreadId() {
return threadId.get();
} | [
"public static int getThreadID() {\n return threadId.get();\n }",
"private static long uniqueTid() {\n return ((long) getProcessId() << 24) | currentThread().getId();\n }",
"String getThreadId();",
"public Long getJvmThreadInstId() throws SnmpStatusException {\n return new Long(info... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Function to parse the server response into a KWJSONRecord array | public KWJSONRecord[] parseServerResponse(String response) {
//First we must determine how many records have been returned
Matcher m = Pattern.compile("\n|\r").matcher(response);
int kwrecord_count = 1;
int index = 0;
while (m.find())
{
kwrecord_count++;
}
KWJSONRecord[] kwrecords = new KWJSONRecord... | [
"private Ticket[] parseList(String HttpResponse){\n if(HttpResponse == null){\n return null;\n }\n //Parse JSON to Object\n Gson g = new GsonBuilder()\n .setDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZ\")\n .create();\n JsonParser parser = new JsonP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs method %Exists in Cache to see if an object exists. | public static boolean exists (com.intersys.objects.Database db, com.intersys.objects.Id id) throws com.intersys.objects.CacheException {
return ((com.intersys.cache.SysDatabase)db).existsObject(CACHE_CLASS_NAME, id);
} | [
"@Override\n\tpublic boolean contains(T obj) {\n\t\tif (cache.contains(obj))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean exists(final String objectPath);",
"protected void cacheExists(final boolean exists) {\n\t\tcachedExistsMap.put(new CacheKey(getClient(), getURI()), new CachedEx... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to check to see if any balls are out of bounds | public static boolean isNotInBounds(){
for (int i =0; i<soccerBalls.length;i++ ) {
soccerBalls[i].setOutOfBounds(-75,75,-175,175);
if(!soccerBalls[i].isInBounds())
{
System.out.println("\nA ball is no longer in bounds. No collisions detected. Simulation Ending");
return true;
... | [
"private boolean isOutOfBounds(){\n\t boolean outOfBounds = isBallOutOfBounds();\n\t return outOfBounds;\n }",
"public boolean isOutOfBalls() {\r\n if (this.ballsCounter.getValue() == 0) {\r\n return true;\r\n }\r\n return false;\r\n }",
"private boolean isBallOutOfBounds... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return all derivation (first in pair), joined by separator, excluding the ones with same strRule | public String getDerivationsWithDiffStrRule(String separator, int excludeIndex) {
String strRule = Result.getFinalRule(this.derivations.get(excludeIndex).snd.fst);
StringJoiner sj = new StringJoiner(separator);
for (int i = 0; i < this.derivations.size(); i++) {
if (i != excludeIndex... | [
"io.dstore.values.StringValue getSeparatorInLists();",
"public static String distNeg(String retval, String nextChar, String word, ArrayList<String> lst){\n\t\tretval += nextChar + \" \";\n\t\tfor (int k = lst.indexOf(word) + 1; k < lst.size(); k ++){\n\t\t\tString word2 = lst.get(k);\n\t\t\t//System.out.println(w... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the updateResults property. | public ActionResultsType getUpdateResults() {
return updateResults;
} | [
"public List<CvsUpdateResult> getUpdated()\n {\n waitForExecutionToFinish();\n return getUpdateResultsOfType(CvsUpdateResult.UPDATED);\n }",
"public UpdateCheck.UpdateResult getResult() {\r\n\t this.waitForThread();\r\n\t return this.result;\r\n\t }",
"public Updater.UpdateR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handel GooglePlus SignIN ........................................................................ | private void handle_GooglePlus_SignIn(GoogleSignInResult result) {
Log.i(TAG , "IN handle_GooglePlus_SignIn") ;
GoogleSignInAccount account = result.getSignInAccount();
AuthCredential credential = GoogleAuthProvider.getCredential(account.getIdToken() , null);
mAuth.signInWithCredential(c... | [
"private void signIn() {\n Intent signInIntent = googleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signInWithGoogle() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, C... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/TC 003 Validate that a user is able to click on Add a Partner and options pop up | @When("Click on Add a Partner")
public void click_add_partner() throws Exception {
try{
page_wait(1200);
click("circles_add_partner_button");
}catch (Exception e) {
e.printStackTrace();
takeScreenShot("circle_positive_click_add_partner");
}
} | [
"@When (\"Click on Add a Partner link\")\n\tpublic void add_partner() throws Exception {\n\t\ttry{\n\t\t\tpage_wait(2000);\n\t\t\tclick(\"circles_add_partner_dropdown\");\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttakeScreenShot(\"circle_positive_add_partner\");\n\t\t}\n\t}",
"public voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the reorder quantity. | int getReorderQuantity(); | [
"public int getQuantity() {\n return qty_order;\n }",
"int getOrderedQuantity();",
"public int getOrderQuantity() {\r\n return orderQuantity;\r\n }",
"public int getOrder_qty() {\n return order_qty;\n }",
"public int getProductReorder() {\r\n\t\treturn productReorder * 2;\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles printer management menu options. | private static void printerMenuLogic() {
boolean onMenu = true;
while(onMenu) {
menuHandler.clrscr();
int maxChoice = menuHandler.printerMenu();
int intChoice = menuHandler.intRangeInput("Please input a number in range [1, " + maxChoice + "]", 1, maxChoice);
switch(intChoice) {
case 1:
// ... | [
"private static void createPrinterMenuLogic() {\n\n\t\tmenuHandler.clrscr();\n\n\t\t// Printer name\n\t\tString printerName = menuHandler.inputString(\"Please input the printer name (cannot be empty)\");\n\n\t\t// Printer paper format\n\t\tSystem.out.println(\"Select printer paper format capabilities\");\n\t\tint m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns true if given user handle is admin otherwise it returns false. | public boolean isAdmin(String userHandle) throws UserServiceException; | [
"public boolean checkAdmin()\r\n\t{\r\n\t\tboolean admin=false;\r\n\t\tint length=user_records.size();\r\n\t\tfor(int i=0;i<length;i++)\r\n\t\t{\r\n\t\t\tif(((User)user_records.get(i)).get_username().equals(\"administrator\"))\r\n\t\t\t{\r\n\t\t\t\tadmin=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn adm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called by both child panels when the selected color is changed, as part of their mouse listeners. Call repaint(), and tell the game to update its color. | public void updateColor() {
repaint();
cc.updateColors();
} | [
"private void blueJRadioButtonActionPerformed( ActionEvent event )\n {\n myPainterJPanel.setColor( Color.BLUE );\n \n }",
"private void createColorSelector() {\n\t\trepaint();\n\t}",
"private void greenJRadioButtonActionPerformed( ActionEvent event )\n {\n myPainterJPanel.setColor( Color.GREEN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the pointer color. | public void setPointerColor(int color) {
mPointerColor = color;
mPointerPaint.setColor(mPointerColor);
invalidate();
} | [
"public void setPointerColor(int color) {\r\n\t\tmPointerColor = color;\r\n\t\tmPointerPaint.setColor(mPointerColor);\r\n\t\tinvalidate();\r\n\t}",
"public void setPointerHaloColor(int color) {\n\t\tmPointerHaloColor = color;\n\t\tmPointerHaloPaint.setColor(mPointerHaloColor);\n\t\tinvalidate();\n\t}",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
After a state conflict and after the moved state's children have been themselves moved, the base of the state must change. This method is called AFTER this change happens and after all children have been moved | protected abstract void updateStateMove(int stateIndex, int newBase); | [
"protected void resolveConflict(int s, int newValue) {\n\n\t\t// The set of children values\n\t\tTreeSet<Integer> values = new TreeSet<Integer>();\n\n\t\t// Add the value-to-add \n\t\tvalues.add(new Integer(newValue));\n\n\t\t// Find all existing children and add them too.\n\t\tfor (int c = 0; c < alphabetLength; c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns List::List::Object with the Lists of nodes of all elementary cycles in the graph. | public List<List<Object>> getElementaryCycles()
{
this.cycles = new Vector<>();
this.blocked = new boolean[this.adjList.length];
this.B = new Vector[this.adjList.length];
this.stack = new Vector<>();
StrongConnectedComponents sccs = new StrongConnectedComponents(this.adjList)... | [
"List<List<String>> getDeadLockCycles() {\n Set<String> whiteSet = new HashSet<>();\n Set<String> graySet = new HashSet<>();\n Set<String> blackSet = new HashSet<>();\n Map<String, String> parentMap = new HashMap<>();\n cycles.clear();\n\n for (String vertex : vertices) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
map<string, .com.github.taojoe.proto.User> relations = 5; | public com.github.taojoe.proto.Transform.User getRelationsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, com.github.taojoe.proto.Transform.User> map =
internalGetRelations().getMap();
if (!map.contains... | [
"java.util.Map<java.lang.String, com.github.taojoe.proto.Transform.User>\n getRelationsMap();",
"public java.util.Map<java.lang.String, com.github.taojoe.proto.Transform.User> getRelationsMap() {\n return internalGetRelations().getMap();\n }",
"public java.util.Map<java.lang.String, com.github.taojoe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Separator for log readability. | public void separator() {
LOGGER_BASE.separator();
} | [
"void markSeparatorForLog();",
"public void logSeparatorLine()\n\t{\n\t\tSystem.out.println(\"--------------------------------------------------------------------------------\");\n\t}",
"public String getSeparator();",
"public String getSeparator() {\n return separator;\n }",
"public String getSep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save changes made to a university | public void saveUnivChanges(University univ) {
// takes the database's university and deletes all the old emphases
University univDB = getUniversity(univ.getName());
deleteEmphases(univDB);
// adds all new emphases from the edited university into the database
addEmphases(univ);
dbc.updateUniversity(univ);
... | [
"private void save() {\n\t\ttry {\n\t\t\tul.save( userFile );\n\t\t} catch( java.io.IOException oops ) {\n\t\t\tJOptionPane.showMessageDialog( null, \"Failed to update User List - Unable to save to \"+userFile,\n\t\t\t\t\t\t\t \"uLearn - Error!\",\n\t\t\t\t\t\t\t JOptionPane.ERROR_MESSAGE );\n\t\t}\n\t\ttry {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adding a tuple action to an action container. | protected void addTupleAction(Action a) {
if (this.tupleActions == null)
this.tupleActions = new Vector<Action>(4);
this.tupleActions.addElement(a);
} | [
"public void addAction(Action action){\n actions.add(action);\n }",
"public void addAction(Action action) {\n actions.add(action);\n }",
"private void addAction( List actions, String label, List paramExtractors,\n int pos )\n {\n PSMapPair entry = new PSMapPair( label, paramExtracto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if Spring context is completely initialized and wait if we are in multithreaded environment. | public synchronized void waitUntilApplicationContextIsReady() {
// if we are in the same thread, waiting probably doesn't make sense, so we have to check
// this.
if (Thread.currentThread().getId() != this.m_creatorThreadId) {
// access from another thread -> wait
while (... | [
"private void waitForInitializationIfNecessary() {\n /* We only need to acquire the semaphore (INSTANCE), we do not need \n * to execute anything in this block. If the Registry is not initailized,\n * then it will block until the semaphore is released (from getInstance()),\n * and... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Declares methods that will be performed after attempt to connectting to the net by specific IP. | interface ConnectToNetByIPCallback {
/**
* Method is called after user connected to net via specific IP number ended with success.
*/
void onConnectToNetByIPSucces();
/**
* Method is called after host with specific IP number reject user request.
*/
v... | [
"void onConnectToNetByIPSucces();",
"void onConnectToNetByIPFailure();",
"public abstract void setIp(java.lang.String newIp);",
"public void connect()\n{\n\n NetworkInterface iFace;\n\n iFace = findNetworkInterface();\n\n connectNotchers(iFace);\n\n}",
"void onConnectToNetByIPReject();",
"private... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
send reverse direction message and get the response Called by the ordinary Thief | public void reverseDirection(int id) {
ClientCom con = new ClientCom (serverHostName, serverPortNumb);
Message send, reply;
while (!con.open ()){
try {
Thread.currentThread().sleep ((long) (10));
}... | [
"void sendNorthboundResponse(Message message);",
"ICommandObject doDirectFlight();",
"private void retriveCommand(){\n\t\tdirections.add(\"Turn left.\");\n\t\tdirections.add(\"Walk 20 meters and turn right.\");\n\t\tdirections.add(\"Arrive destination.\");\n\t}",
"public String handleMessage(){\n Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the rules schema by dataset id. | @Override
public RulesSchemaVO getRulesSchemaByDatasetId(String datasetSchemaId) {
RulesSchema rulesSchema =
rulesRepository.getRulesWithActiveCriteria(new ObjectId(datasetSchemaId), false);
RulesSchemaVO rulesVO = null;
Long designDatasetRelated =
dataSetMetabaseControllerZuul.getDesignDa... | [
"@Override\n public RulesSchemaVO getActiveRulesSchemaByDatasetId(String datasetSchemaId) {\n RulesSchema rulesSchema =\n rulesRepository.getRulesWithActiveCriteria(new ObjectId(datasetSchemaId), true);\n\n RulesSchemaVO rulesVO =\n rulesSchema == null ? null : rulesSchemaMapper.entityToClass(r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears game state information about enemy hills locations. | public void clearEnemyHills() {
enemyHills.clear();
} | [
"public static void reset() {\n\t\tenemiesArray.clear();\n\t}",
"public static void clearWorld() {\r\n \tbabies.clear();\r\n \tpopulation.clear();\r\n }",
"public void reset() {\n this.lives = DEFAULT_LIVES;\n this.level = 0;\n this.scoreBoard.reset();\n this.board.reset();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the rigo documentos where numeroOrdine = &63; and anno = &63; and idAssociato = &63; and tipoDocumento = &63;. | @Override
public List<RigoDocumento> findBynumeroOrdineAnnoAssociato(
long numeroOrdine, int anno, long idAssociato, String tipoDocumento)
throws SystemException {
return findBynumeroOrdineAnnoAssociato(numeroOrdine, anno, idAssociato,
tipoDocumento, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} | [
"@Override\n\tpublic List<RigoDocumento> findBynumeroOrdineAnnoAssociatoArticolo(\n\t\tlong numeroOrdine, int anno, String tipoDocumento,\n\t\tString codiceArticolo, String codiceVariante, String imballo,\n\t\tlong idAssociato) throws SystemException {\n\t\treturn findBynumeroOrdineAnnoAssociatoArticolo(numeroOrdin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an Image representing a quaver with stem raised. | public Image getQuaverUp(); | [
"public Image getQuaverRest();",
"public Image getSemiquaverRest();",
"public Image getSemiquaverUp();",
"public Image getQuaverDown();",
"public Image getSemiquaverDown();",
"public native MagickImage embossImage(double raduis, double sigma)\n\t\t\tthrows MagickException;",
"public Image getSemibreve()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Activity__Group__5" $ANTLR start "rule__Activity__Group__5__Impl" InternalActivityDiagram.g:1273:1: rule__Activity__Group__5__Impl : ( ( rule__Activity__Group_5__0 )? ) ; | public final void rule__Activity__Group__5__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalActivityDiagram.g:1277:1: ( ( ( rule__Activity__Group_5__0 )? ) )
// InternalActivityDiagram.g:1278:1: ( ( rule__Activity__Group_5__0... | [
"public final void rule__Activity__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:3139:1: ( rule__Activity__Group__5__Impl )\n // InternalComponentDefinition.g:3140:2: rule__Activity__Group_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is the value of rStaff 'User'? The difference of capital letters and small letters is NOT distinguished. If the value is null, this method returns false! | public boolean isRStaffUser(); | [
"public boolean isUStaffUser();",
"public boolean isRStaffUserIfNullException();",
"public boolean isUStaffUserIfNullException();",
"protected boolean isStaff() {\n return SecurityUtil.getUserContext() == SecurityUtil.UserContext.STAFF_CONTEXT || SecurityUtil.getUserContext() == SecurityUtil.UserContex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Conversions from Metres Per Second | public static double metresPerSecondToCentiMetresPerSecond(double num) { return (num*100); } | [
"public static double feetPerSecondToCentiMetresPerSecond(double num) { return (num*30.48); }",
"public Double millimetersPerSecond()\n\t{\n\t\treturn getValue(VelocityUnit.MILLIMETERS_PER_SECOND);\n\t}",
"Double convertToCentimetersPerSecond(final Integer nativeVelocity);",
"public Double micrometersPerSecon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set Move Confirm. Inventory Move Confirmation | public void setM_MovementConfirm_ID (int M_MovementConfirm_ID); | [
"public void notifyMoveSelected(final Move move);",
"private void displayConfirmMove(int direction) {\n\t\t \n\t\t switch(direction) {\n\t\t \n\t\t\t //enter case 1\n\t\t\t case 1:\tSystem.out.println(\"\\nYou've successfully moved to the next Room.\\n\");\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t\t\n\t\t\t //ent... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks a particular difference for the ordering of its target values. This will be used to doublecheck that equivalent differences haven't been "broken" by EMF by not preserving their value order. Should only be used on merged differences which target manyvalued references. | private void internalCheckOrdering(ReferenceChange diff, boolean rightToLeft) {
final EStructuralFeature feature = diff.getReference();
final EObject value = diff.getValue();
final Match match = diff.getMatch();
final Comparison comparison = match.getComparison();
final Match valueMatch = comparison... | [
"protected void checkImpliedDiffsOrdering(ReferenceChange diff, boolean rightToLeft) {\r\n \t\tfinal EReference reference = diff.getReference();\r\n \t\tfinal List<Diff> mergedImplications;\r\n \t\tif (rightToLeft) {\r\n \t\t\tif (diff.getSource() == DifferenceSource.LEFT) {\r\n \t\t\t\tmergedImplications = diff.ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the linkable has no segment, fallback to its title or its id. | @Override
@NonNull
public String segment(@NonNull Content content) {
return getSomeString(content, true, SEGMENT, TITLE);
} | [
"LinkHandle getOptionalLink();",
"public interface Link {\n\n long getId();\n\n String getIdAsString();\n\n long getKeyId();\n\n String getKeyIdAsString();\n\n String getTitle();\n\n}",
"protected abstract String getNavItemID();",
"Link findLinkById(String linkId);",
"public String getSegment... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the "is[ChildCollection]Empty" property for OneToMany fields. | @Override
protected void setChildrenEmptyFlags() {
this.setIsRutaCollectionEmpty();
} | [
"@Override\n protected void setChildrenEmptyFlags() {\n this.setIsArticuloCollectionEmpty();\n }",
"@Override\n protected void setChildrenEmptyFlags() {\n this.setIsDiaHoraCursoMateriaProfCollectionEmpty();\n }",
"public void setNotEmpty(){\n this.empty = false;\n }",
"@Ove... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculations System.out.println("1st : "+AQcount11.size()); System.out.println("2nd : "+Prestime11.size()); calculate mean and done and find max add both plus 1:D Q11 mean | public void calculations() {
if((AQcount11.size()+ 1)%2==0)
{
int Mean11=AQcount11.get((AQcount11.size()/2));
//System.out.println("Even : " +Mean11);
Simulation.lblMean.setText(Integer.toString((Mean11/2)));
}else
{
int Mean11=AQcount11.get((AQcount11.size()/2)+1);
//System.out.printl... | [
"private void calculateAvg() {\n\t\tDescriptiveStatistics stats = new DescriptiveStatistics();\n\t\tfor (QueryInfo oneQ : this.maxQueries) {\n\t\t\tstats.addValue(oneQ.getGapCount() * oneQ.getFrequency());\n\t\t}\n\t\tthis.avgGain = stats.getMean();\n\t\tthis.medianGain = stats.getPercentile(50);\n\t\tthis.quartile... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checking annuity. transfer annuity and house between P1 and E | public void test16() {
Material HouseE = new Material(500,"HouseE",1);
Annuity a = new Annuity(500,30);
Actions a1 = new Actions("E","P1",HouseE);
Actions a2 = new Actions("P1","E",a);
Transaction t1 = new Transaction(a1,a2);
if(t.doTransfer(t1)){
g.printGraph(t1);
}
} | [
"public void test17() {\n\t\tPartnershipAsset pa = new PartnershipAsset(30.0,\"P1\");\n\t\tAnnuity a = new Annuity(700,30);\n\t\tActions a1 = new Actions(\"A\",\"E\",pa);\n\t\tActions a2 = new Actions(\"E\",\"A\",a);\n\t\t\n\t\t\n\t\tTransaction t1 = new Transaction(a1,a2);\n\t\tif(t.doTransfer(t1)){\n\t\t\tg.prin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setter to store name of the second player in playerSecondName variable | public void setSecondPlayerName(String nameSecond){
this.playerSecondName = nameSecond;
} | [
"public String getSecondPlayerName(){\r\n\t\t\treturn playerSecondName;\r\n\t}",
"public String getPlayerTwoName() {\r\n return playerTwoName;\r\n }",
"void setPlayer2Name(String name);",
"public String getPlayerName2(){\n\t\treturn playerName2;\n\t}",
"public void setPlayer2(String name) {\n\t\tt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the granularity level | public void setGranularity(int gran)
{
m_Granularity =gran;
} | [
"public void setGranularityPeriod(int value) {\n this.granularityPeriod = value;\n }",
"public void setParameterTimeSeriesGranularity(int value) {\n }",
"public static void setMovementGranularity(@NonNull AccessibilityEvent event, int granularity) {\n if (Build.VERSION.SDK_INT >= 16) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns size of the whole document if available. | long getDocumentSize(); | [
"public int getDocLength() {\n\t\treturn doc.getLength();\n\t}",
"public int size() {\n\t\treturn documents.size();\n\t}",
"public int getDocumentSize() {\n if (SourceDocumentInformation_Type.featOkTst\n && ((SourceDocumentInformation_Type) jcasType).casFeat_documentSize == null)\n this.jcasT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simulates a focus event on the given component | private static void triggerFocusGained(Component component) {
FocusListener[] listeners = component.getFocusListeners();
FocusEvent e = new FocusEvent(component, (int) System.currentTimeMillis());
runSwing(() -> {
for (FocusListener l : listeners) {
l.focusGained(e);
}
});
} | [
"void focusComponent(Component component);",
"void focusOnDefaultComponent();",
"void setFocusedComponent(GComponent component)\n {\n if (!this.components.contains(component))\n throw new IllegalArgumentException(String.format(\"The component %s is not part of this context\",component));\n \n thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spring Data repository for the DevolucaoVenda entity. | @SuppressWarnings("unused")
@Repository
public interface DevolucaoVendaRepository extends JpaRepository<DevolucaoVenda, Long>, JpaSpecificationExecutor<DevolucaoVenda> {
} | [
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ConfiguracaoAgendaRepository extends JpaRepository<ConfiguracaoAgenda, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface LancamentoRepository extends JpaRepository<Lancamento, Long> {\n\n List<Lancamento> findAllByComandaI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new product cell command. | public AbstractProductCellCommand(final Product product) {
super();
this.productId = product.getProductId();
} | [
"public Cell() {\n symbol = '-';\n coordinates = new Coordinates();\n }",
"public Cell(){}",
"public NotebookCell() {}",
"public static void addMultiplierCommand()\n {\n Cell cell = WindowFrame.needCurCell();\n EditWindow wnd = EditWindow.needCurrent();\n if (wnd =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the recognition result. If audio packets are still being sent to the server, the method blocks and waits for the end of the recognition process. | List<RecognitionResult> waitRecognitionResult() throws RecognitionException; | [
"List<RecognitionResult> waitRecognitionResult(int timeout) throws RecognitionException;",
"public interface SpeechRecognizer {\n\n\t/**\n\t * Release resources and close the server connection.\n\t *\n\t * @throws IOException\n\t * some sort of I/O exception has ocurred.\n\t */\n\tvoid close() throws ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes the text of the friends button to Cancel Request and the appropriate click handler | private void buttonCancelRequest(String userId, String ownId) {
friendsButton.setText("Cancel Request");
friendsButton.setOnClickListener(view -> cancelRequest(userId, ownId));
profileOptions.setVisibility(View.GONE);
} | [
"void onCancelClick();",
"private void CancelFriendRequest() {\n friendReqRef.child(sender_user_id).child(receiver_user_id).removeValue()\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: addMine(int a, int b) | @Test
public void testAddMine() throws Exception {
Mine.addMine(9, 9);
assertEquals("success", Mine.addMine(9, 9));
} | [
"public boolean addMine(int x, int y, int mineId, boolean register)\r\n throws IllegalArgumentException\r\n {\r\n \r\n try\r\n {\r\n // IF there is already a mine in this space\r\n if (grid[x][y].isMine())\r\n {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FIXME: Need to decide if we are adding a collab section for retire, as there is not one in proposal KSCM1774 covers this. If so, this needs implenting, If not we can remove this method. | public SummaryTableFieldBlock generateCollaboratorSection() {
SummaryTableFieldBlock block = new SummaryTableFieldBlock();
block.addEditingHandler(new EditHandler(CourseSections.PEOPLE_PERMISSONS));
block.setTitle(getLabel(LUUIConstants.COLLABORATORS_LABEL_KEY));
return bl... | [
"public interface ConicSection extends GeoObject {\r\n\t/*\r\n\t * ======================================================================\r\n\t * ========================== VARIABLES =================================\r\n\t * ======================================================================\r\n\t */\r\n\t/**\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ method calcDollarAmount(euroAmount, exchangeRate) return euroAmount exchangeRate method buildOutputString(euroAmount, exchangeRate, dollarAmount) return "'euroAmount' euros at an exchange rate of 'exchangeRate' is (return) 'dollarAmount' U.S. dollars." | public double calcDollarAmount(double euroAmount, double exchangeRate) {
return Math.ceil(euroAmount * exchangeRate * 100) / 100;
} | [
"private String Currency(){\n\t\tString currency;\n\n\t\tif(companyArray[5].equals(\"NasdaqNM\") || companyArray[5].equals(\"NYSE\")){\n\t\t\tcurrency = \"$\";\n\t\t}\n\t\telse if(companyArray[5].equals(\"Brussels\") || companyArray[5].equals(\"Paris\") ){\n\t\t\tcurrency = \"EUR\";\n\t\t}\n\t\telse if(companyArray... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column x$wait_classes_global_by_latency.min_latency | public void setMinLatency(Long minLatency) {
this.minLatency = minLatency;
} | [
"public void setMinDelay(double min_delay)\n {\n this.min_delay = min_delay;\n }",
"public Long getMinLatency() {\n return minLatency;\n }",
"public void minCpuPerNode(double minCpu) {\n this.minCpu = minCpu;\n }",
"public void setLock_latency(BigDecimal lock_latency) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lays out the credits page. | private void credits() {
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = new Insets(10,10,50,10);
JLabel top = new JLabel();
initMenuLabelSetup(top, "Team 50 - CPSC 233 - University of Calgary 2017",3);
JLabel Cael... | [
"public void showCredit()\n { \n if (Greenfoot.mouseClicked(creditBtn)) { //if user clicked instructions button\n Greenfoot.setWorld(new CreditWorld()); //display credit world\n Greenfoot.stop();\n }\n }",
"private void showCreditsScreen() {\n\t\twhile (!Mouse.isButton... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ExpressionStmt__Group__0" $ANTLR start "rule__ExpressionStmt__Group__0__Impl" InternalGo.g:9571:1: rule__ExpressionStmt__Group__0__Impl : ( () ) ; | public final void rule__ExpressionStmt__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalGo.g:9575:1: ( ( () ) )
// InternalGo.g:9576:1: ( () )
{
// InternalGo.g:9576:1: ( () )
... | [
"public final void rule__XRelationalExpression__Group_1_0_0__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:6471:1: ( rule__XRelationalExpression__Group_1_0_0__0__Impl )\r\n // InternalDroneScrip... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a container version attachment for an outgoing email invitation. | public void createInvitationAttachment(
final OutgoingEMailInvitation invitation,
final ContainerVersionAttachment attachment); | [
"void createInvitation(OutgoingEMailInvitation invitation, Boolean notify);",
"public void createInvitation(final OutgoingEMailInvitation invitation);",
"public abstract AttachmentPart createAttachmentPart();",
"org.hl7.fhir.Attachment addNewValueAttachment();",
"MailMessageAttachementPart createInlineImage... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The traverseXLinkExpiry attribute is specified in minutes. It indicates how long a Web Feature Service should wait to receive a response to a nested GetGmlObject request. If no traverseXLinkExpiry attribute is present for a GetGmlObject request, the WFS wait time is implementation dependent. | public int getTraverseXLinkExpiry() {
return traverseXLinkExpiry;
} | [
"public Integer getTraverseXlinkExpiry() {\n return traverseXlinkExpiry;\n }",
"public int getTraverseXLinkDepth() {\n return traverseXLinkDepth;\n }",
"public String getTraverseXlinkDepth() {\n return traverseXlinkDepth;\n }",
"public long calculateExpiry(URLConnection urlConnec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the multiplier of this rule. | @Override
public void setMultiplier(double multiplier) {
_rule.setMultiplier(multiplier);
} | [
"public void setMultiplier(int newValue) {\n multiplier = newValue;\n }",
"public void setMultiplier(int multiplier) {\n\t\tthis.multiplier = multiplier;\n\t}",
"public void setSpeed(double multiplier);",
"public void setMULTIPLIER(BigDecimal MULTIPLIER)\r\n {\r\n\tthis.MULTIPLIER = MULTIPLIER;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns all the dojos | public List<Dojo> allDojos() {
return dojoRepository.findAll();
} | [
"public List<Dojo> getAllDojos(){\n\t\treturn this.dojoRepo.findAll();\n\t}",
"List<Domino> getAllDominoes();",
"@Query(\"SELECT d.name From Dojo d\")\n List<Dojo> findAllDojosNames();",
"public List<Door> getDoors(){\n\t\treturn doors;\n\t}",
"public List<DTO> getAllDvdDTOs(){\n List<Dvd> all = d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the contractValidDate value for this ContractDTO. | public java.lang.String getContractValidDate() {
return contractValidDate;
} | [
"public Date getValidDate() {\r\n return validDate;\r\n }",
"public java.util.Date getValidDate() {\r\n\t\treturn validDate;\r\n\t}",
"public Date getCcvalidDate() {\n\t\treturn ccvalidDate;\n\t}",
"public Date getValiddate() {\n return validdate;\n }",
"public void setContractValidDate(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the adminSessionStats value for this ClusterManagement_Type. | public java.lang.String getAdminSessionStats() {
return adminSessionStats;
} | [
"@ApiOperation(hidden = true, value = \"Administrative Statistics\")\n\t@RequestMapping(value = \"/admin/stats\", method = RequestMethod.GET)\n\tpublic ResponseEntity<Map<String, Object>> getAdminStats() {\n\t\tMap<String, Object> stats = new HashMap<String, Object>();\n\t\t// Write the URL configs\n\t\tstats.put(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
das ConstitutiveWord im CWSTYLE zeichnen | private void designCW(ConstitutiveWord constitutiveWord) {
int start = constitutiveWord.getStartPosition();
int end = constitutiveWord.getEndPosition();
StyleConstants
.setForeground(STYLE, designer.getColor(constitutiveWord));
doc.setCharacterAttributes(start, end - start + 1, STYLE, true);
} | [
"private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves tempBl object based on data within request. Or returns new object. | public static TempBl getEditableTempBl(RenderRequest request) {
//Retrieves tempBl based on PK (composite).
TempBl tempBl;
tempBl = ActionUtil.getTempBl(request);
//Returns new story if it could not be found. (with storyType and BorrowerLoanId).
if (tempBl == null) {
tempBl = new TempBlImpl();
}
ret... | [
"public static TempBl getTempBl(RenderRequest request) {\n\t\t//request data.\n\t\tString borrowerName = ParamUtil.getString(request, WebKeys.ATTR_TEMPBL_BORROWER_NAME);\n\t\tlong borrowerLoanId = ParamUtil.getLong(request, WebKeys.ATTR_TEMPBL_LOAN_ID);\n\t\tTempBl tempResult;\n\n\t\t//Attempts retrieval from db or... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This tests setCurPost(), which overrides the previous curPos value. This allows the program to adjust the players position as they move through the floor into adjacent rooms. If curPos is set to 3 and incremented, then getCurPos should return 4. | @Test
public void testCurPosMovedForward() {
Player plyr = new Player();
plyr.setCurPos(3);
plyr.setCurPos(plyr.getCurPos() + 1);
assertEquals(4, plyr.getCurPos());
} | [
"@Test\n public void testCurPosMovedBack() {\n Player plyr = new Player();\n plyr.setCurPos(3);\n plyr.setCurPos(plyr.getCurPos() - 1);\n assertEquals(2, plyr.getCurPos());\n }",
"public void setCur(Integer cur) {\n this.cur = cur;\n }",
"void setCurrentPosition(Posn ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "RP" $ANTLR start "LB" | public final void mLB() throws RecognitionException {
try {
int _type = LB;
int _channel = DEFAULT_TOKEN_CHANNEL;
// src/VSLLexer.g:22:7: ( '[' )
// src/VSLLexer.g:22:9: '['
{
match('[');
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
... | [
"public final void lb() throws RecognitionException {\n JCBasicBlock lbb =null;\n\n\n try {\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructure\\\\newgrammar\\\\JCB_tree.g:261:4: (lbb= bb (rb= lb )? )\n // C:\\\\Users\\\\Cavicchio\\\\workspace\\\\InterDepAdjStructu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The main method prints the version of Java using the java.version method and simultaneously prints it. | public static void main( String [] args) {
System.out.print( "Java Version : " ); // prints Java Version :
// prints the version of java in use
System.out.println( (String)System.getProperty( "java.version" ) );
} | [
"private static void printVersion() {\n System.out.println(Constants.VERSION);\n }",
"public static void java() {\n System.out.println(\"Java Vendor : \" + System.getProperty(\"java.vendor\"));\n System.out.println(\"Java Runtime : \" + System.getProperty(\"java.runtime.vers... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds buttons to horizontal layout | protected void buttons() {
horizontal.addComponent(ok);
vertical.addComponents(horizontal);
vertical.setComponentAlignment(horizontal, Alignment.TOP_CENTER);
ok.addClickListener(event -> ok());
} | [
"@Override\r\n public void placeButtons() {\r\n JPanel buttonPanel = new JPanel();\r\n buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));\r\n\r\n JButton b1 = new JButton(new AddTransactionAction(controller));\r\n JButton b2 = new JButton(new CreateTransactionLimitAc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the invariant epcAosDrctDbtTxInfDbtr. | @Test
public void testEpcAosDrctDbtTxInfDbtr02() throws Throwable {
List<IInterpretationResult> results;
results = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY
+ "/epcAosDrctDbtTxInfDbtr", MODELINSTANCE_NAME_02, Arrays
.asList(new String[] { "DirectDebitTransactionInformation1" }));
... | [
"@Test\r\n\tpublic void testEpcAosDrctDbtTxInfDbtr01() throws Throwable {\r\n\r\n\t\tList<IInterpretationResult> results;\r\n\t\tresults = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY\r\n\t\t\t\t+ \"/epcAosDrctDbtTxInfDbtr\", MODELINSTANCE_NAME_01, Arrays\r\n\t\t\t\t.asList(new String[] { \"DirectDebi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is API endpoint for getting wiki links for actors. Version 2 | @CrossOrigin
@RequestMapping(method = RequestMethod.GET, value = "/dictionary/wikiForActorsV2/{actor}", headers = {
"Accept=application/json" })
public Map<String, List<String>> getWikiForActors(@RequestHeader(value = "secret-key") String secretKey,@PathVariable String actor)
throws ParseException {
boolean v... | [
"@GET\n public Response getLinks() {\n List<Link> links = new ArrayList<>();\n links.add(Link.fromUri(CommonConstants.API_URI+\"users/login\").rel(\"login\").build());\n links.add(Link.fromUri(CommonConstants.API_URI+\"users/\").rel(\"users\").build());\n links.add(Link.fromUri(Common... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleSendMap" $ANTLR start "entryRulePosition" InternalDroneScript.g:404:1: entryRulePosition : rulePosition EOF ; | public final void entryRulePosition() throws RecognitionException {
try {
// InternalDroneScript.g:405:1: ( rulePosition EOF )
// InternalDroneScript.g:406:1: rulePosition EOF
{
if ( state.backtracking==0 ) {
before(grammarAccess.getPositionRu... | [
"public final void entryRuleSendMap() throws RecognitionException {\r\n try {\r\n // InternalDroneScript.g:380:1: ( ruleSendMap EOF )\r\n // InternalDroneScript.g:381:1: ruleSendMap EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Store uowner photo url | public void setOwnerPhotoURL(String photoURL){
mEditor.putString(USER_PHOTO_URL, photoURL);
mEditor.commit();
} | [
"private String generatePhotoUrl(Photo photo) {\n return String.format(\"https://farm%1$s.staticflickr.com/%2$s/%3$s_%4$s.jpg\", photo.getFarm(),\n photo.getServer(), photo.getId(), photo.getSecret());\n }",
"private void atualizarFotoPF(Uri url){\n UserPFFirebase.updatePhotoUser( url );\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required int64 launchedTime = 1; | long getLaunchedTime(); | [
"public long getRunningTime();",
"public long getLaunchedTime() {\n return launchedTime_;\n }",
"long getExecutionTime();",
"public int getRunTime() { return runTime; }",
"long getInitTime();",
"int getStarttime();",
"int getCreatetime();",
"public long getProcessingTimestamp(){\n\treturn 5;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the AccessPackageSubject from the service | AccessPackageSubject get() throws ClientException; | [
"public SubjectInfo getSubject() {\n return this.subject;\n }",
"private void getSubjectFromService() {\n if (NetworkUtilities.isConnected(this)) {\n mEmptyLayout.setVisibility(View.GONE);\n mSubjectRecyclerView.setVisibility(View.GONE);\n mProgressBar.setVisibili... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the provisioningStateTransitionTime property: The time at which the pool entered its current state. | OffsetDateTime provisioningStateTransitionTime(); | [
"public long getTransitionTime() {\n return transitionTime;\n }",
"public float getTransitionTime() {\n return timeMillis;\n }",
"OffsetDateTime allocationStateTransitionTime();",
"public float getTimeInTransitions() {\n\t\t\treturn (float) ((long) getTotalTransitions() * (long) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends a new patient to the server to register it in the server's database | public void registerPatient(Patient patient) throws ProtocolException {
NetworkMessage msg = new NetworkMessage(NetworkMessage.Protocol.REGISTER_PATIENT, patient);
NetworkMessage answer = this.sendMessageToServer(msg);
if (answer!= null) {
NetworkMessage.Protocol protocolMessage = an... | [
"org.hl7.fhir.Patient addNewPatient();",
"@PostMapping(\"/addPatient\")\n public String patientSubmit(@ModelAttribute Patient patient) {\n \t\n jdbcTemplate.update(\"insert into lshoemake.patient values (?, ?, ?, ?, ?, ?, ?)\", \n \tpatient.getPID(), patient.getLastName(), patient.getFirstName... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field mutation is set (has been assigned a value) and false otherwise | public boolean isSetMutation() {
return this.mutation != null;
} | [
"public boolean isSetField() {\r\n return this.field != null;\r\n }",
"public boolean isSetValue() {\n return this.value != null;\n }",
"public boolean isSetMutations() {\n return this.mutations != null;\n }",
"public boolean isSetValue() {\n return this.value != null;\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update max or min rt data | public void updateMaxOrMinRtData (boolean isMax, PropertiesUtil p) {
RuntimeData data = new RuntimeData();
Map<String, String> map;
if (isMax) {
map = p.getPropertiesMap(p.readValue(ModelPropertiesLabels.MODLE_MAX_VALUE));
} else {
map = p.getPropertiesMap(p.readV... | [
"public void updateMinMax( ) {\r\n if( (data == null) || (data.size() < 1) ) {\r\n min = 0.0;\r\n max = 0.0;\r\n return;\r\n }\r\n\r\n min = data.get( 0 );\r\n max = data.get( 0 );\r\n\r\n for( int i = 1; i < data.size(); i++ ) {\r\n if(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of nextRound method, of class GameLogic. | @Test
public void testNextRound() {
System.out.println("nextRound");
GameLogic instance = new GameLogic();
boolean expResult = true;
boolean result = instance.nextRound();
// assertEquals(expResult, result);
// TODO review the generated test code and remove the... | [
"void nextRound();",
"public void nextRound() throws TournamentException;",
"@Test\n public void testNextTurnFromFirstTurnOfRound(){\n round = new Round(0,players.size()*2, players, draftPool);\n\n try {\n round.nextTurn();\n round.nextTurn();\n } catch (NoMoreTurns... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returnts all the other TAs | public TA[] getTAs() {
return tas;
} | [
"private List<SparkTran> getAllTrans() {\n List<SparkTran> result = new LinkedList<SparkTran>();\n Set<SparkTran> seen = new HashSet<SparkTran>();\n\n for (SparkTran leaf: leafTrans) {\n // make sure all leaves are visited at least once\n visit(leaf, seen, result);\n }\n\n return result;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compares the rank of this card and that of the parameter | public int compareTo(Card other)
{
return rank-other.rank;
} | [
"public boolean compareRank(Card otherCard) {\n return rank == otherCard.rank;\n }",
"public int compareByRank(Card otherCard){\n\t\tint num = 0;\n\t\tif (this.rank == otherCard.rank)\n\t\t\tnum = 0;\n\t\telse if (this.rank > otherCard.rank)\n\t\t\tnum = 1;\n\t\telse if (this.rank < otherCard.rank)\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that the LayoutServer correctly handles a BOOTSTRAP_LAYOUT_REQUEST with empty layout in the payload. | @Test
public void testBootstrapNullLayout() {
RequestMsg request = getRequestMsg(
getBasicHeader(ClusterIdCheck.IGNORE, EpochCheck.IGNORE),
getBootstrapLayoutRequestMsg(null)
);
ArgumentCaptor<ResponseMsg> responseCaptor = ArgumentCaptor.forClass(ResponseMsg.... | [
"@Test\n public void testGetLayoutNoBootstrap() {\n long payloadEpoch = 0L;\n RequestMsg request = getRequestMsg(\n getBasicHeader(ClusterIdCheck.IGNORE, EpochCheck.IGNORE),\n getLayoutRequestMsg(payloadEpoch)\n );\n\n layoutServer.handleMessage(request, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the setter for addressBookName | public void setAddressBookName(String addressBookName) {
this.addressBookName = addressBookName;
} | [
"public void setBookName(java.lang.String value);",
"public String getAddressBookName() {\n return addressBookName;\n }",
"public void setBookName(String value) {\n setAttributeInternal(BOOKNAME, value);\n }",
"public void setBookName(String v) {\r\n _isSetterInvokedBookName = true;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify the maximum 130 characters allowed in the description field | @Test(description = "AT-29590:TRA_01_48:Verify the maximum 130 characters allowed in the description field", priority = 49,dependsOnMethods={"descerrorValidation"})
void descmaxValueValidation() {
add_manual_transaction.description().clear();
add_manual_transaction.description().sendKeys(PropsUtil.getDataPrope... | [
"private boolean checkDescriptionLength(String description) {\n\t\tif (description.isEmpty())\n\t\t\treturn true;\n\t\tfinal int len = description.length();\n\t\treturn len >= Product.DESCRIPTION_MIN_LENGTH;\n\t}",
"private void checkLength(String value, int maxLength) throws WikiException {\r\n\t\tif (value != n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DONWLOAD FILE: first, you'll get an uri for a certain file. Then, you'll be able to use that uri to download the file through this mapping This method is called in listUploadedFiles MvcUriComponentsBuilder.fromMethodName(... ,... ,...) | @GetMapping("/files/{filename:.+}")
@ResponseBody
private ResponseEntity<Resource> serveFile(@PathVariable String filename) {
Util.getConsoleLogger().info("serveFile() starts");
Resource file = storageService.loadAsResource(filename);
Util.getConsoleLogger().info("serveFile() ends");
... | [
"FileReference getFile(String fileName);",
"public void setFileUrl(String fileUrl);",
"public void fileDownloadViewForState(Document document) throws Exception {\n LOGGER.info(\"Download file sfsd*******************\", document.getDocument_name());\n FacesContext context = FacesContext.getCurrentI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find invoice by id. | Invoice findById(long id); | [
"@Override\n public InvoiceVO fetchInvoiceVOFromId(Long id) {\n Optional<Invoice> optionalInvoice = invoiceRepository.findById(id.intValue());\n InvoiceVO invoiceVO = null;\n if (optionalInvoice.isPresent()) {\n Invoice invoice = optionalInvoice.get();\n invoiceVO = get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a check trigger method on (Pending > InWork) to validate Estimated Completion Date and Technical Assignee on the Change Action | public int validateCompletionDateAndTechAssignee(Context context, String args[])throws Exception
{
int iReturn = 0;
try
{
if (args == null || args.length < 1)
{
throw (new IllegalArgumentException());
}
String strChangeId = args[0];
this.setId(strChangeId);
// Getting the Tecch... | [
"private boolean validateTask(JTextField textFieldName,\r\n JTextField textFieldDescription,\r\n JFormattedTextField textFieldDueDate,\r\n JComboBox<Priority> comboPriority) {\r\n if (textFieldName.getText().equal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filter out classes which do not fit the fullly qualified class name pattern. | protected Collection<Class<?>> filterOutClassesNotMatchingFullQualifiedClassNamePattern(final String pattern,
final Collection<Class<?>> classes) {
final Collection<Class<?>> results = new LinkedList<Class<?>>();
for (final Class<?> clazz : classes) {
if (clazz.getCanonicalName().matches(pattern)) {
resu... | [
"private static Set<ClassDoc> filterClasses(ClassDoc[] classes) {\r\n\t\tString singlename = ContextInformation.getExecutionFieldString(ContextInformation.SINGLENAME);\r\n\r\n\t\tSet<ClassDoc> classesToProcess = new HashSet<ClassDoc>();\r\n\t\tfor (int i = 0; i < classes.length; i++) {\r\n\t\t\tClassDoc classdoc = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__S_Return__Group__0__Impl" $ANTLR start "rule__S_Return__Group__1" InternalGaml.g:7156:1: rule__S_Return__Group__1 : rule__S_Return__Group__1__Impl rule__S_Return__Group__2 ; | public final void rule__S_Return__Group__1() throws RecognitionException {
int rule__S_Return__Group__1_StartIndex = input.index();
int stackSize = keepStackSize();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 388) ) { return ; }
// Internal... | [
"public final void rule__S_Return__Group__0() throws RecognitionException {\n int rule__S_Return__Group__0_StartIndex = input.index();\n\n \t\tint stackSize = keepStackSize();\n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 386) ) { return ; }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string buseo_name1 = 9; | java.lang.String getBuseoName1(); | [
"java.lang.String getBuseoName2();",
"public Builder setBuseoName1(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000100;\n buseoName1_ = value;\n onChanged();\n return this;\n }",
"java.lang.String g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saving user inputs and opens the Delivery activity | public void onClickDelivery(View view) {
savePreferences();
Intent intent = new Intent(this, ActDelivery.class);
// Passing order information using Intent.putString();
intent.putExtra("items", new String[]{(String) spEntree.getSelectedItem(),
(String) spDrink.getSelected... | [
"public void addDeliveryOnClick(View view){\n try{\n Intent intent = new Intent(DeliveryControlActivity.this, DeliveryActivity.class);\n intent.putExtra(\"action\", \"add\");\n startActivity(intent);\n }\n catch(Exception exc){\n Toast.makeText(getApp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invoked to take action after a network has been updated. | @Override
public void neutronNetworkUpdated(NeutronNetwork network) {
return;
} | [
"void networkHasChanged() {\n connectionManager = mainControl.getConnectionManager();\n if (connectionManager != null) {\n peerTable1.setModel(new PeerTableModel(connectionManager));\n ipTable.setModel(new IPTableModel(connectionManager));\n setLocalInfo(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
called by the displayBoard to move the pieces to their appropriate tile when resizing | public void adjustPiece(int x, int y){
relocate (UserInterface.TILE_SIZE * x, UserInterface.TILE_SIZE * y);
} | [
"public void updateBoard() {\r\n\t\tfor(int i = 0, k = 0; i < board.getWidth(); i+=3) {\r\n\t\t\tfor(int j = 0; j < board.getHeight(); j+=3) {\r\n\t\t\t\t//Check that there are pieces to display\r\n\t\t\t\tif(k < bag.size()) {\r\n\t\t\t\t\tboard.setTile(bag.get(k), i, j);\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |