query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
/ Use a REST service to retrieve a sequence in XML format from UniProt using an accession id as a query parameter | private String retrieveUniProtSequenceEntry(String accession) {
Client client = Client.create();
System.out.println("Retrieving UniProt Accession "+accession +" from UniProt");
WebResource webResource = client.resource("http://www.uniprot.org/uniprot/"
+accession +".xml?include=yes");
String document = web... | [
"@RequestMapping(value = \"/sequences/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Sequence> getSequence(@PathVariable Long id) {\n log.debug(\"REST request to get Sequence : {}\", id);\n Sequence sequence = s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Array Type Rule'. | ArrayTypeRule createArrayTypeRule(); | [
"public Rule<JPackage, JClass> getArrayRule() {\n return new ArrayRule(this);\n }",
"ArrayType createArrayType();",
"ArrayConstructionOperator createArrayConstructionOperator();",
"public Rule<JDefinedClass, JDefinedClass> getRequiredArrayRule() { return new RequiredArrayRule(this); }",
"public Ex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor of a time condition | public TimeCondition(String operator, Integer num){
super();
myConditions.put("operator", operator);
myConditions.put("TimeAmount", num);
} | [
"public Condition() {\r\n super();\r\n }",
"public TimeConstraint() {\n\t\t// Start of user code constructor for TimeConstraint)\n\t\tsuper();\n\t\t// End of user code\n\t}",
"Condition createCondition();",
"public Time() {\r\n\r\n }",
"public Time2()\n { \n\t this( 0, 0, 0 ); // invoke Time2 constru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filters the nearest npc with the given ID | public static NPC getNearestNPC(final int... ids) {
return NPCs.getNearest(new Filter<NPC>() {
@Override
public boolean accept(NPC npc) {
for (int id : ids) {
if (npc.getId() == id) {
return true;
}
}
return false;
}
});
} | [
"public static native Npc closest(Filter<Npc> filter);",
"@Override public ArrayList<Location> neighbors(final Location id) {\n ArrayList<Location> neighbours = new ArrayList<>();\n for (Location direction : directions){\n\n Location position = new Location(direction.x + id.x, direction.y ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Hides the colour buttons | private void disableColourButtons() {
for (Button b : colourButtons) {
b.setVisibility(View.INVISIBLE);
b.setEnabled(false);
}
} | [
"void hideButtons(){\n btnContinue.setVisible(false);\n btnLoad.setVisible(false);\n }",
"public void hide(){\n for(int i = 0; i < buttons.size(); i++){\n buttons.get(i).setLocation(-20,-20);\n }\n highlighted = false;\n Processor.overwriteImage(getBufferedI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the unit at location x,y | public Unit getUnitAt(int x, int y){
Actor act = gameActors.get(units[x][y]);
if(act != null)
return (Unit) act;
return null;
} | [
"public Unit getUnitAt(Position p);",
"public Unit getUnitAt( Position p ) {\r\n return unitMap.get(p);\r\n }",
"public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }",
"public double[] getLocation() {\n return new double[] { x, y };\n }",
"public Coordinate getCoor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PublicOperationMode__Group__2__Impl" $ANTLR start "rule__PublicOperationMode__Group__3" InternalComponentDefinition.g:5835:1: rule__PublicOperationMode__Group__3 : rule__PublicOperationMode__Group__3__Impl rule__PublicOperationMode__Group__4 ; | public final void rule__PublicOperationMode__Group__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalComponentDefinition.g:5839:1: ( rule__PublicOperationMode__Group__3__Impl rule__PublicOperationMode__Group__4 )
// InternalComponen... | [
"public final void rule__PublicOperationMode__Group_5_3__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:6082:1: ( rule__PublicOperationMode__Group_5_3__0__Impl rule__PublicOperationMode__Group_5_3__1 )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Modified binary search algorithm which finds the index of the closest value to an input element in an array. | public static int binarySearchClosest(double[] a, double value) {
if (a.length < 1)
throw new IllegalArgumentException("Please use an array of length greater than 0.");
if (value < a[0]) {
return 0;
}
if (value > a[a.length - 1]) {
return a.length - 1;
}
int lo = 0;
int hi = a.length - 1;
... | [
"private int binarySearch(T element) {\n int start = 0, end = sortedArray.size(), mid = 0;\n while (start < end) {\n mid = (end + start) / 2;\n int cmp = sortedArray.get(mid).compareTo(element);\n if (cmp == 0) {\n start = end = mid;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Append one element's children to another | void appendChildren( Element elem, Element parent )
{
Node child = parent.getFirstChild();
while ( child != null )
{
elem.appendChild( child.cloneNode(true) );
child = child.getNextSibling();
}
} | [
"public void copyChildrenFrom(Element that) {\n for (Attribute a : new AttributeIterator(that)) {\n appendChild(a.copy());\n }\n for (Node n : new NodeIterator(that)) {\n appendChild(n.copy());\n }\n }",
"public static void appendChildren(Element aSource, Eleme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add item to pq (at the end of the array) if there is no room left on pq, resize array (doubling it) | @Override
public void insert(Item itemToAdd){
if(numberOfItems == pq.length){
resize(2*pq.length);
}
pq[numberOfItems++] = itemToAdd; // add item to pq and increment numberOfItems
} | [
"public void add(T x) { \n\t\ttry {\n\t\t\tif(actualSize == allotedSize) {\n\t\t\t\tthrow new Exception(\"pq is full\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpq[actualSize] = x;\n\t\t\t\tpercolateUp(actualSize);\n\t\t\t\tactualSize++;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set a logging configuration for the logger. typically, this is going to be done when the application is started (e.g. when the application context is built) | public static void setLoggingConfiguration(LoggingConfiguration loggingConfiguration) {
Logger.loggingConfiguration = loggingConfiguration;
} | [
"public void SetLoggerConfiguration() {\n logger = Logger.getLogger(this.getClass().getName());\n PropertyConfigurator.configure(\"log4j.properties\"); // Added Logger\n logger.setLevel(Level.DEBUG);\n }",
"public static void set(ServerLoggingConfiguration config) {\r\n LogImplServer.co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tests whether amount the given users has the icmPermission | private boolean hasicmPermission(ArrayList<User> users, icmPermission permission,int amount) {
int cnt=0;
for (User u : users) {
if (u.getICMPermissions().contains(permission)) {
cnt++;
if (amount==cnt )return true;
}
}
return false;
} | [
"boolean hasCustomerUserAccess();",
"public boolean canUse(IPermissionUser user){\r\n\t\tif (getGroup()==null)\r\n\t\t\treturn true;\r\n\t\tif (GoldenApple.getInstance().permissions.getGroup(getGroup()).getMembers().contains(user.getId()))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"boolean hasCustomer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds optimal arrangement for multiplication and parentheses placement. | static void optimizeMult(int dim[], int n){
int[][] min = new int[n][n]; //To record minimum cost
int[][] parens = new int[n][n]; //To record optimal parenthesis placement
int[] record = new int[length]; //To record most common iteration values
int counter = 0;
// Record max number of operat... | [
"private String printOptimalParens(int i, int j) {\n if (i == j) {\n return \"A[\" + i + \"]\";\n } else {\n return \"(\" + printOptimalParens(i, s[i][j])\n + printOptimalParens(s[i][j] + 1, j) + \")\";\n }\n }",
"static public int mysolution(String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns task deleted message. | public String showDeletedMessage(Task task, int size) {
return "Understood, meow! Deleted this task:\n "
+ task + "\n" + "Now you have " + size + " tasks in the list.";
} | [
"public String taskRemovedMessage(Task taskToBeDeleted, int totalTask) {\n String msg = \"Noted. I've removed this task:\\n\";\n msg += \"\\t\" + taskToBeDeleted.toString() + \"\\n\";\n msg += \"Now you have \" + totalTask + \" task in the list.\";\n return msg;\n }",
"public void p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a substring containing no semicolons. | @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:55:50.995 -0500", hash_original_method = "86F26DE68AB39CE9DEE1E486630D72BD", hash_generated_method = "1D832A1960BD04E82C364D5311BD5FAE")
public String byteStringNoSemicolon() {
StringBuffer retval = new StringBuffe... | [
"public Substring trim()\n {\n return trim( CString.DEFAULT_WHITESPACES);\n }",
"public static String stripOffUnicodes(String str) {\n\t\twhile (true) {\n\t\t\tint start = str.indexOf(\"&\");\n\t\t\tif (start < 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tint end = str.indexOf(\";\", s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method sets a color for the given pixel by merging the two given colors. The lowIntensityColor will be most visible when the pixel has low intensity. The highIntensityColor will be most visible when the pixel has high intensity. | public static TexturePixel color(TexturePixel pixel, ColorRGBA lowIntensityColor, ColorRGBA highIntensityColor) {
float intensity = pixel.intensity;
pixel.fromColor(lowIntensityColor);
pixel.mult(1 - pixel.intensity);
pixel.add(highIntensityColor.mult(intensity));
return pixel;
... | [
"void setPixel( int pixel, int red, int green, int blue );",
"public void replaceColor(AbstractPixel min, AbstractPixel max,\r\n\t\t\tAbstractPixel newPixel) {\r\n\t\t// compl�ter\r\n\t\tfor(int row=0; row<height; row++)\r\n\t\t{\r\n\t\t\tfor(int col=0; col<width ;col++)\r\n\t\t\t{\r\n\t\t\t\t//\tplus grand que l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleEDependencyFiles" $ANTLR start "ruleEDependencyFiles" InternalRMParser.g:5961:1: ruleEDependencyFiles returns [EObject current=null] : ( ( (lv_files_0_0= RULE_STRING ) ) (otherlv_1= Comma ( (lv_files_2_0= RULE_STRING ) ) ) ) ; | public final EObject ruleEDependencyFiles() throws RecognitionException {
EObject current = null;
Token lv_files_0_0=null;
Token otherlv_1=null;
Token lv_files_2_0=null;
enterRule();
try {
// InternalRMParser.g:5967:2: ( ( ( (lv_files_0_0= RULE_STRING ) )... | [
"public final EObject entryRuleEDependencyFiles() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleEDependencyFiles = null;\n\n\n try {\n // InternalRMParser.g:5954:57: (iv_ruleEDependencyFiles= ruleEDependencyFiles EOF )\n // InternalRMParser.g:5... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
palindromeCheck is the method that gets called when the user clicks the button to check whether the word they entered is a palindrome. It calls a recursive method to find out whether the word is a palindrome. | public void palindromeCheck(View vw){
String userInput = edtxtUserWord.getText().toString();
//Set a variable equal to the user input
boolean isPalindrome = checkForPalindrome(userInput, 0);
if (isPalindrome == false){
txtvwResult.setText("Your word is not a palindrome!");
... | [
"public static boolean isPalindrome(String word) {\r\n for (int i = 0; i < word.length() / 2; i++) {\r\n if (word.charAt(i) != word.charAt(word.length() - 1 - i)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private boolean isPalindrome(St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This tests invalid B_PTS which is less than 0. | @Test
void testInvalidA_PTSPlusB_PTS() {
int A_PTS = 6;
int B_PTS = 6;
double radius1 = -1;
double radius2 = 1;
int NUMPOINTS = 10;
// A_PTS + B_PTS = 12 and NUMPOINTS = 10. Should be false.
double[] xList = new double[NUMPOINTS];
double[] yList ... | [
"@Test\n void testInvalidB_PTS() {\n int A_PTS = 2;\n int B_PTS = -1; // Invalid\n double radius1 = -1; \n double radius2 = 1; \n int NUMPOINTS = 10;\n\n double[] xList = new double[NUMPOINTS];\n double[] yList = new double[NUMPOINTS];\n\n assertFalse(LIC13... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the MIME type of the binary representation of this content. If content is not encoded, return null | public String getBinaryMimeType(); | [
"public MimeType mimetype() {\r\n return getContent().mimetype();\r\n }",
"public String getContentType() {\r\n if (fileName != null && !fileName.trim().equals(\"\")) {\r\n MimetypesFileTypeMap mimeMap = new MimetypesFileTypeMap();\r\n return mimeMap.getContentType(fileName)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for debugging, get all the tuples at once and put them in a file. | @Override
public void dump(String s, int index) {
// TODO Auto-generated method stub
Tuple tuple = null;
BufferedWriter output = null;
try{
File file = new File(s + index);
StringBuilder sb = new StringBuilder();
output = new BufferedWriter(new FileWriter(file));
while((tuple = ne... | [
"abstract protected void writeTuple(Tuple tuple) throws IOException;",
"public void dump(TupleWriter writer) throws IOException {\n\t\tTuple tuple = null;\n\t\tboolean isLast = false;\n\t\twhile (true) {\n\t\t\t// writer.dump(tuple);\n\t\t\ttuple = getNextTuple();\n\t\t\tif (tuple == null) {\n\t\t\t\tisLast = tru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creat content type json header. | private HttpHeaders creatContentTypeJsonHeader() {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
return headers;
} | [
"protected static HttpHeaders getJsonHeaders(){ \n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n headers.setContentType(MediaType.APPLICATION_JSON);\n return headers;\n }",
"public DocumentRequest setContentTypeJson() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_butUpdateActionPerformed open GUI to delete borrower | private void butDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butDeleteActionPerformed
AddBorrower db = new AddBorrower();
db.setVisiblePanel(2);
db.setVisible(true);
} | [
"private void butUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butUpdateActionPerformed\n AddBorrower ub = new AddBorrower();\n ub.setVisiblePanel(1);\n ub.setVisible(true);\n }",
"private void removeBorrower() {\n Borrower borrowerToDelete = tableViewBorr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log.i("DB", String.format(SQL_INSERT_ENTRY, score, level)); | String insertScore(int score, int level) {
return String.format(SQL_INSERT_ENTRY, score, level);
} | [
"String getPersistSqlQueryText() {\r\n\t\treturn String.format(\"INSERT INTO %s (ap, tstamp, direction, sender, receiver, doc_type, profile, channel) values(?,?,?,?,?,?,?,?)\", RAW_STATS_TABLE_NAME);\r\n\t}",
"public void insertLog (int logId,\r\n String clientName,\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a dialog to take user preferences and consequently start the autopilot | public AutoPilotPreferencesDialog(Component parent) {
start = false;
preferencesMap = new HashMap<String, Object>();
setModalityType(ModalityType.APPLICATION_MODAL);
setUndecorated(true);
GridBagLayout gridBagLayout = new GridBagLayout();
gridBagLayout.columnWeights = new double[]{1.0};
gridBagLayout.rowW... | [
"public void launchOptionsDialog() {\n\t\tgetUIFacade().setStatusText(language.getText(\"settingsPreferences\"));\n\t\tSettingsDialog dialogOptions = new SettingsDialog(this);\n\t\tdialogOptions.show();\n\t\tarea.repaint();\n\t}",
"void startingPreferencesScreen(Preferences.ToPreferences presenter);",
"public s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a mask with 1s from the ith to last bits. i = 4: 11110000 | public static int leftMask(int i){
return -1 << i;
} | [
"private static int mask(int i) {\n\t\treturn i == 0 ? 0 : -1 >>> (32 - i);\n\t}",
"private int maskForConstantBits() {\n\t\tint join = lower ^ upper;\n\t\tint mask = 0;\n\t\tfor (int testBit = Integer.MIN_VALUE; testBit != 0 && (join & testBit) == 0; testBit >>>= 1) {\n\t\t\tmask |= testBit;\n\t\t}\n\t\treturn m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adding spacing to have consistent width in the fields. | public static String addSpacing(String fields[]) {
String fieldAfterPadding = "";
int spacing = 25;
int no_of_spaces = 25;
if (fields != null) {
for (int ind = 0; ind < fields.length; ind++) {
String field = fields[ind];
String padding = "";
if (field != null) {
no_o... | [
"private void addSpace()\n {\n \tint rowNum = layout.getNumRow() - 1;\n \tlayout.insertRow(rowNum, EMPTY_SPACE);\n }",
"private void addSpaces() {\n for (int i = areaInfo.startIndex; i < areaInfo.breakIndex; i++) {\n char spaceChar = foText.charAt(i);\n if (!Ch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Parse a colour definition. | static Colour parseColour(String val)
{
if (val.charAt(0) == '#')
{
IntegerParser ip = IntegerParser.parseHex(val, 1, val.length());
if (ip == null) {
return Colour.BLACK;
}
int pos = ip.getEndPos();
int h1, h2, h3, h4;
switch (pos) {
... | [
"private java.awt.Color read_color() throws java.io.IOException\n {\n int [] rgb_color_arr = new int [3];\n for (int i = 0; i < 3; ++i)\n {\n Object next_token = this.scanner.next_token();\n if (!(next_token instanceof Integer))\n {\n if (next_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send the friend request. Returns true on success | private boolean sendFriendRequest(Integer senderid, Integer receiverid, HttpSession session, DatabaseConnection dc, ServletContext sc) {
// Populate all message fields
SiteManager sm = (SiteManager) sc.getAttribute("SiteManager");
Integer msgId = sm.popNextMessageID();
String date = FormatDateTime.getCurrentSys... | [
"public boolean acceptFriend(String user, String friend);",
"public boolean addFriend(String friend){\n\t\ttry{\n\t\t\t//open tcp connection and send request\n\t\t\ttcp.openConnection();\n\t\t\tMessage msg = new Message(Message.ADDFRIEND, this.username, friend);\n\t\t\ttcp.getOutput().writeObject(msg.toJson());\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specify whether or not the link is context relative. | public void setContextRelative(boolean contextRelative) {
this.contextRelative = contextRelative;
} | [
"protected boolean isRedirectContextRelative() {\r\n\t\t\treturn this.redirectContextRelative;\r\n\t\t}",
"public boolean isRelative() {\n return headElement == CURRENT_DIR_HEAD;\n }",
"@Test\n\tpublic void testSetContextRelative_1()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bidirectional manytoone association to Hospitalization | @OneToMany(mappedBy="consultation")
public List<Hospitalization> getHospitalizations() {
return this.hospitalizations;
} | [
"public void setHospital(Hospital hospital) {\n this.hospital = hospital;\n }",
"public Hospital getHospital(){\r\n\t\treturn hospital;\r\n\t}",
"public Hospital getHospital() {\n return hospital;\n }",
"public T caseEncounterHospitalization(EncounterHospitalization object) {\n\t\treturn n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ locate Locates a hash in a sorted ArrayList with a predictive dichotomous algorithm. | private int locate (List<Integer> list, int hash) {
if (list.size() == 0) {
return 0;
}
int index_a = -1;
int index_b = list.size();
float value_a = (float)list.get(index_a+1);
float value_b = (float)list.get(index_b-1);
float hash_float = (float)hash;
if (hash <= value_a) {
return 0;
}
if (... | [
"private int getHashPosition(String hash){\n for (int i = 0; i < list.size(); i++){\n if (list.get(i).getHash().equals(hash)){\n return i;\n }\n }\n return -1;\n }",
"public int hash(String item);",
"private int hashFunc1(String word) {\n int h... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the config directory for this installed instance of the program | public static File getConfigDir() {
if( configDir == null ) {
final ConfigManager cfgMgr = ConfigManager.getInstance() ;
final File installDir = new File( cfgMgr.getString( STConstant.CFG_KEY_INSTALL_DIR ) ) ;
configDir = new File( installDir, "config" ) ;
}
... | [
"public static String getConfigDirectory() {\n String configDir = System.getProperty(\"config-dir\");\n if (configDir == null) configDir = getHomeDirectory() + File.separator + \"conf\";\n return configDir;\n }",
"public File getConfigDirectory() {\n File file = props.getFile(CONFIG... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Primary__Group_9__2__Impl" $ANTLR start "rule__Primary__Group_9__3" ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/srcgen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/InternalModeleditor.g:3252:1: rule__Primary__Group_9__3 : rule__Primary__Group_9__3__Impl... | public final void rule__Primary__Group_9__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr/internal/Interna... | [
"public final void rule__Primary__Group_9__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.openmodelica.modelicaml.editor.xtext.modeleditor.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/model/ui/contentassist/antlr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Square coefficient of variation (Scv), scv(X) = Var(X) / [E(X)E(X)]; | double getScv() {
return count == 0 ? 0.0 : (getAvg2() / (getAvg() * getAvg()) - 1.0);
} | [
"public double getCoefficientVariation() {\n\n double mean = getMean();\n double sum = 0;\n for (int j = 0; j < data[0].length; j++) {\n for (int i = 0; i < data.length; i++) {\n sum += (data[i][j] - mean) * (data[i][j] - mean);\n }\n }\n\n dou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update an existing truth. Here be the rules: The truth identifier must reference an existing truth. The truth set identifier must reference an existing truth set. | public DbTruth updateTruth( long truthId,
long truthSetId, String type, String value, String contextValue)
throws NameSystemException{
validateTruthExists(truthId);
validateTruthData(truthId, type, value);
return getTruthDAO().update(truthId,truthSetId,value,contextValue);
} | [
"public abstract boolean update(String identifier, Map<String,String> metadata);",
"Story update(Story story) ;",
"public boolean upd(MrnWoatlas5 woatlas5) {\n return db.update (TABLE, createColVals(woatlas5), createWhere());\n }",
"@Test\n public void testUpdateOperator() {\n Operator ope... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new rectangle which represents the intersection of the receiver and the given rectangle. The intersection of two rectangles is the rectangle that covers the area which is contained within both rectangles. | public Rectangle intersection(Rectangle rect)
{
if(this == rect)
return new Rectangle(x, y, width, height);
double left = x > rect.x ? x : rect.x;
double top = y > rect.y ? y : rect.y;
double lhs = x + width;
double rhs = rect.x + rect.width;
double right = lhs < rhs ? lhs : rhs;
lhs = y + he... | [
"public static Rectangle intersection(Rectangle r1, Rectangle r2){\n \n Rectangle rLeft; // Initializes what rectangle is on what side\n Rectangle rRight; // Initializes what rectangle is on what side\n \n if(r1.left < r2.left){ // If r2's x coordinate is greater... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Message Ref Set' containment reference. If the meaning of the 'Message Ref Set' containment reference isn't clear, there really should be more of a description here... | MessageRefSetType getMessageRefSet(); | [
"String getContainmentReference();",
"@Nullable\n\tpublic String getRefLogMessage() {\n\t\treturn refLogMessage;\n\t}",
"public Boolean getContainment() {\r\n\t\treturn containment;\r\n\t}",
"public synchronized int getMessageCount() {\n return _references.size();\n }",
"public synchronized Messag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form frmRegistrarCliente | public frmRegistrarCliente() {
initComponents();
this.setLocationRelativeTo(null);
this.modo = 1;
} | [
"public frmCliente() {\n initComponents();\n CargarProvinciasRes();\n CargarProvinciasTra();\n ManejadorCliente objCli = new ManejadorCliente();\n }",
"public FormularioRegistrarCliente(Ventana ventanaPadre) {\n initComponents();\n this.ventanaPadre = ventanaPadre;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
crea datos aleatorios de tipo MonitoriaEntity | private void insertData() {
PodamFactory factory = new PodamFactoryImpl();
for (int i = 0; i < 3; i++) {
MonitoriaEntity entity = factory.manufacturePojo(MonitoriaEntity.class);
em.persist(entity);
data.add(entity);
}
} | [
"@Test\r\n public void testCreate() throws Exception {\r\n PodamFactory pf=new PodamFactoryImpl();\r\n MonitoriaEntity nuevaEntity=pf.manufacturePojo(MonitoriaEntity.class);\r\n MonitoriaEntity respuestaEntity=persistence.create(nuevaEntity);\r\n Assert.assertNotNull(respuestaEntity);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds DbInfo instances by DiCreatetime value without Lob columns loaded. | List<DbInfo> QuickFindByDiCreatetime(Long diCreatetime) throws SQLException; | [
"List<DbInfo> FindByDiCreatetime(Long diCreatetime) throws SQLException;",
"DbInfo Find(Long diId) throws SQLException;",
"List<DbInfo> FindByDiName(String diName) throws SQLException;",
"List<DbInfo> FindByDiClassname(String diClassname) throws SQLException;",
"List<DbInfo> QuickFindByDiName(String diName)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the cached archived timeline if using inmemory cache or a fresh new archived timeline if not using cache, from startTs (inclusive). Instantiating an archived timeline is costly operation if really early startTs is specified. This method is not thread safe. | public HoodieArchivedTimeline getArchivedTimeline(String startTs, boolean useCache) {
if (useCache) {
if (!archivedTimelineMap.containsKey(startTs)) {
// Only keep one entry in the map
archivedTimelineMap.clear();
archivedTimelineMap.put(startTs, instantiateArchivedTimeline(startTs));
... | [
"public HoodieArchivedTimeline getArchivedTimeline(String startTs) {\n return getArchivedTimeline(startTs, true);\n }",
"public synchronized HoodieArchivedTimeline getArchivedTimeline() {\n return getArchivedTimeline(StringUtils.EMPTY_STRING);\n }",
"public RMTimeline getTimeline(boolean create)\n{\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calls clearDB and returns a clear fill result if it is successful | public ClearFillResult clear() {
ConnectDB db = new ConnectDB();
try {
db.openConnection();
Connection conn = db.getConn();
db.getClearDB().clearDB(conn);
db.closeConnection(true);
return new ClearFillResult("Successful removal!");
}
... | [
"void clearDB();",
"public Response clear(){\n //Create DAO objects that will be used to clear the database\n UserDataAccess userDao = new UserDataAccess();\n PersonDataAccess personDao = new PersonDataAccess();\n EventsDataAccess eventsDao = new EventsDataAccess();\n Authorizat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This constructor creates a matrix and dispose the cards on the table, divided in little decks of 4 cards each, dived by color and level | public DevDeckMatrix () throws IOException, ParseException {
deck = new DevDeck();
ArrayList<DevCard> greenCards = deck.createLittleDecks("GREEN");
ArrayList<DevCard> yellowCards = deck.createLittleDecks("YELLOW");
ArrayList<DevCard> purpleCards = deck.createLittleDecks("PURPLE");
... | [
"private void initCards() {\n for(int i = 0; i< noOfColumns; i++) {\n for (int j = 0; j < noOfRows; j++) {\n cards[i][j] = new Card(new Paint(), CardState.FACE_DOWN);\n }\n }\n setRandomColors();\n }",
"public Matrix() {\r\n\t\tRandom r=new Random();\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
response to server INVALIDTRY command if there are already 2 players in game, cannot join game | private void invalidTry(){
setButtons(false);
setMsgText("There are 2 players in game, you cannot join in now.");
} | [
"private void sendFailed() {\n byte[] buffer = new byte[1];\n buffer[0] = Protocol.FAIL_CREATE;\n players.values().forEach((p) -> sendTCP(p.getConnection().getOutputStream(), buffer));\n }",
"private void checkIfGameCanStart(){\n\t\tif(playerCount == joinedPlayers)\n\t\t\tsendGameStartMsg(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given an A object, finds the associated B object (it will be at the same point in the ordering). | public B getBFromA(Object key)
{
return keys.getBFromA(key);
} | [
"public A getAFromB(Object key)\n {\n return keys.getAFromB(key);\n }",
"public E find(E obj){\n \t//calls contains to save from writing same code.\n \tif (contains(obj))\n\t return obj;\n\telse\n\t return null;\n\t}",
"com.zfoo.protocol.packet.ProtobufObject.ObjectB getObjectB();",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Read while a predicate is true | @NotNull
protected String readWhile(@NotNull final Predicate<Character> predicate) {
final StringBuilder string = new StringBuilder();
while (!input.isEmpty() && predicate.test(input.peek())) {
string.append(input.next());
}
return string.toString();
} | [
"While createWhile();",
"public ComputationState takeUntil(\n Predicate<ComputationState> predicate)\n throws InterruptedException {\n\n // Negation of the predicate so that\n // we can iterate while the predicate is not true\n Predicate<ComputationState> predicateNegati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the song located in "assets/sound/music" at the end of the play list. | public void addToPlaylist(String name) {
Music music = SoundHelper.getInstance().getMusic(name);
music.setOnCompletionListener(new OnCompletionListener() {
@Override
public void onCompletion(Music music) {
mPosition = (mPosition + 1) % mPlaylist.size();
mMusic = mPlaylist.get(mPosition);
mMusic.s... | [
"private static void loadMusic()\n\t{\n\t\t// TODO: update this with the correct file names.\n\t\tmusic = new ArrayList<Music>();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"Lessons-8bit.mp3\"))));\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convert a matrix[X1] to a [XX] with data in diagonal | public Matrix toDiagonalMatrix() {
if(getData().length!=1)
return null;
Matrix m = new Matrix(getData()[0].length);
//m.init(0);
for (int i = 0; i < getData()[0].length; i++)
m.getData()[i][i] = getData()[0][i];
return m;
} | [
"public final Vector diagonal(){\n\n /*if(m() != n()){\n throw new IllegalCallerException(\"Diagonal can only be computed for square matrices\");\n }*/\n\n Vector diag = new Vector(m(), 0.0);\n\n for(int i=0; i < m(); ++i){\n\n diag.set(i, this.data.get(i).get(i));\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the Ticket with an existing ID | @Test
@Transactional
void createTicketWithExistingId() throws Exception {
ticket.setId(1L);
int databaseSizeBeforeCreate = ticketRepository.findAll().size();
// An entity with an existing ID cannot be created, so this API call must fail
restTicketMockMvc
.perform(
... | [
"@PostMapping(\"/tickets\")\n @Timed\n public ResponseEntity<Ticket> createTicket(@Valid @RequestBody Ticket ticket) throws URISyntaxException {\n log.debug(\"REST request to save Ticket : {}\", ticket);\n if (ticket.getId() != null) {\n throw new BadRequestAlertException(\"A new tick... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update the activityd dto. | @SuppressWarnings("nls")
@Override
public final ResultDto update(final ActivityDto activityDto) throws LaubeException {
log.traceStart("update", activityDto);
final ResultDto resultDto = new ResultDto();
if (LaubeUtility.isEmpty(activityDto)) {
resultDto.setSuccess(false);
resultDto.setMessag... | [
"D update(D dto);",
"public void update(LearningResultHasActivityPk pk, LearningResultHasActivity dto) throws LearningResultHasActivityDaoException;",
"public void update(PlayParticipantDTO dto) {\n attendeeId = dto.getAttendee().getId();\n teamSeasonId = dto.getTeamSeason().getId();\n pointCredi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method deletes all the records of the temporary network table and empties it in order to reuse it for next session. | public static void flushNetworkTempTable(Context context) {
SQLiteAccessLayer sqLiteAccessLayer = new SQLiteAccessLayer(context);
sqLiteAccessLayer.emptyTempNetworkUsageDetails();
sqLiteAccessLayer.closeDatabaseConnection();
} | [
"public void deleteTempTables();",
"private void clearTemp() {\n\t\tthis.tempDrinksByCustomerID = initializeHashtable();\n\t\tthis.tempFoodByCustomerID = initializeHashtable();\n\t\ttotal = 0;\n\t}",
"public void clearTriples()\n { table.clear() ; }",
"private void removeTempData(CopyTable table)\n\t{\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the value of bbox. | public Rectangle2D getBbox() {
return bbox;
} | [
"public Rect getBoundingBox() {\n return boundingBox;\n }",
"public mil.dod.metadata.mdr.ns.DDMS._2_0.BoundingBoxType getBoundingBox() {\n return boundingBox;\n }",
"public double getBoundingBoxBottom() {\n return boundingBoxBottom;\n }",
"Rectangle getBoundingBox();",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the right top cell according to a position | public Cell getTopRightCell(Position position) {
return ((position.y > 0) && (position.x < (BoardView.WIDTH - 1))) ? this.getCell(new Position(position.x + 1, position.y - 1)) : null;
} | [
"String getTopRightCell();",
"String getBottomRightCell();",
"public Cell getTopCell(Position position) {\n return (position.y > 0) ? this.getCell(new Position(position.x, position.y - 1)) : null;\n }",
"public Tile getTopRight(){\n for(Tile tile: tiles){\n if(tile.getGameX() == 0 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method calculates the transfer function of an input gear and gear separation. The results are stored in the input resultArray. | private void calculateTransferFunction(List<Float> gear1RadialFunction, float gearSeparation, List<Float> resultArray) {
int indx = 0;
for (float radius: gear1RadialFunction) {
float denominator = gearSeparation - radius;
if (denominator <= 0) {
throw new IllegalArgumentException("Gear separation cannot b... | [
"protected abstract void calculateTransferFunction();",
"public void calculate(List<Float> gear1RadialFunction, List<Float> angles, double tolerance) {\n\t\tint nSteps = gear1RadialFunction.size();\n\t\ttransferFunction = createZeroedArray(nSteps);\n\t\tmovementFunction = createZeroedArray(nSteps);\n\t\tradialFun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .bosphorus2.UIDBASEDID uidbasedidinherited_fields = 2; | boolean hasUidbasedidinheritedFields(); | [
"private UIDBASEDID(Builder builder) {\n super(builder);\n }",
"public String getDeviceUID();",
"java.lang.String getPartyUid();",
"public abstract void setDeviceOwnerUid(int uid);",
"java.lang.String getUdid();",
"private Uuid(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n su... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Java modifier list which contains the added modifiers as their order. Note that, each attribute which is not a modifier is ignored. | public List<Modifier> toModifiers() {
List<Modifier> results = new ArrayList<>();
for (Attribute attribute : toAttributes()) {
if (attribute instanceof Modifier) {
results.add((Modifier) attribute);
}
}
return results;
} | [
"List<? extends JApiModifier<? extends Enum<? extends Enum<?>>>> getModifiers();",
"public Collection<Modifier> getModifiersList() throws Exception {\n\t\treturn Collections.unmodifiableList(modifiers);\n\t}",
"@Override\n\tpublic List<Modifier> modifiers() {\n\t\tif(!hasModifiers()) {\n\t\t\tcopyModifiers(base... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a WordToTaggedWordProcessor using the default forward slash character to split on. | public WordToTaggedWordProcessor() {
this('/');
} | [
"public WordToTaggedWordProcessor(char splitChar) {\n this.splitChar = splitChar;\n }",
"private HasWord splitTag(HasWord w) {\n if (splitChar == 0) {\n return w;\n }\n String s = w.word();\n int split = s.lastIndexOf(splitChar);\n if (split <= 0) { // == 0 isn't allowed - no empty word... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets guid cookie strategy. | protected GUIDCookieStrategy getGuidCookieStrategy()
{
return guidCookieStrategy;
} | [
"public void setGuidCookieStrategy(final GUIDCookieStrategy guidCookieStrategy)\n\t{\n\t\tthis.guidCookieStrategy = guidCookieStrategy;\n\t}",
"java.lang.String getGuid();",
"String getRememberMeId();",
"public String getUuid() {\n String uuid = sharedPreferences.getString(KEY_UUID, null);\n if ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create PcrEventLogIntegrity Trust rules | public static Set<Rule> createPcrEventLogIntegrityRules(Map<DigestAlgorithm, Map<PcrIndex, PcrEx>> pcrList, List<Integer> pcrIndexList, String... markers){
log.debug("Creating PcrEventLogIntegrity");
return createRulesFromPcrList("PcrEventLogIntegrity", pcrList, pcrIndexList, markers);
} | [
"public static Set<Rule> createPcrEventLogEqualsExcludingRules(Map<DigestAlgorithm, Map<PcrIndex, PcrEx>> pcrList, List<Integer> pcrIndexList, String... markers){\n log.debug(\"Creating PcrEventLogEqualsExcluding\");\n return createRulesFromPcrList(\"PcrEventLogEqualsExcluding\", pcrList, pcrIndexList... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provision of a JwtDecoder bean that uses the IDP configuration from properties to decode the JWT access tokens provided alongside requests | @Bean
JwtDecoder jwtDecoder() {
return NimbusJwtDecoder.withJwkSetUri(this.jwkSetUri).build();
} | [
"@Bean\n public JwtDecoder jwtDecoder() {\n NimbusJwtDecoder decoder = (NimbusJwtDecoder) JwtDecoders.fromIssuerLocation(issuerUri);\n OAuth2TokenValidator<Jwt> audienceValidator =\n new JwtClaimValidator<List<String>>(JwtClaimNames.AUD, (aud) -> aud.contains(clientId));\n OAuth2TokenValidator<Jwt>... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the BKC098 value for this KA04View. | public String getBKC098() {
return BKC098;
} | [
"public double getBKC099() {\n return BKC099;\n }",
"public void setBKC098(String BKC098) {\n this.BKC098 = BKC098;\n }",
"public String getBKC097() {\n return BKC097;\n }",
"public String getBKA247() {\n return BKA247;\n }",
"public String getBKA001() {\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start the pipeline streaming according to the configuraion. The pipeline streaming loop captures samples from the device, and delivers them to the attached computer vision modules and processing blocks, according to each module requirements and threading model. During the loop execution, the application can access the ... | Realsense2Library.rs2_pipeline_profile rs2_pipeline_start_with_config(Realsense2Library.rs2_pipeline pipe, Realsense2Library.rs2_config config, PointerByReference error); | [
"Realsense2Library.rs2_pipeline_profile rs2_pipeline_start_with_config_and_callback_cpp(Realsense2Library.rs2_pipeline pipe, Realsense2Library.rs2_config config, PointerByReference callback, PointerByReference error);",
"Realsense2Library.rs2_pipeline_profile rs2_pipeline_start(Realsense2Library.rs2_pipeline pipe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
find the previous connection within an end to end flow | public static ConnectionInstance getPreviousConnection(final EndToEndFlowInstance etef,
final FlowElementInstance flowElementInstance) {
FlowElementInstance fei = getPreviousFlowElement(etef, flowElementInstance);
if (fei instanceof ConnectionInstance) {
return (ConnectionInstance) fei;
}
return null;
} | [
"public int getPreviousHop() {\n return previousHop;\n }",
"public Channel previousChannel();",
"Lane getPrevLane();",
"public Node getConnectionOrigin() {\n\treturn (doesPulseBack() ? destination : origin);\n }",
"@NonNull\n Optional<RemoteEventLog> previous();",
"Message getPreviousMessage... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ A method used to set the value of the PC; used when a program is first loaded into memory, and when branch instructions are executed. | public void setPC(int address); | [
"public void setPC(String PC) {\n this.PC = PC;\n }",
"public void setPc(int pc) {\n this.pc = pc;\n }",
"private void incrementPC() {\n PC++;\n }",
"public void SetPC(int newPC){\r\n this.pc = newPC - 1;\r\n }",
"public void incrementPC();",
"public String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Public constructor. No checks. We make a hexagon out of the three given rhombs. | public SimpleHex(SimpleRhomb r0, SimpleRhomb r1, SimpleRhomb r2) {
rhombs[0] = r0;
rhombs[1] = r1;
rhombs[2] = r2;
// Set the shift directions.
// There are four possibilities, depending on the orientations of the three edges
// that meet at the common vertex of all three... | [
"public HexagonShape() {\n\t\tsuper();\n\t}",
"Hexagon(){super();}",
"public HexagonShape(int x, int y) {\n\t\tsuper(x, y);\n\t}",
"private static Hexagon createHexagon(String[] input) {\r\n int px = Integer.parseInt(input[1]);\r\n int py = Integer.parseInt(input[2]);\r\n int vx = Integer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method takes as parameter how many palindrome primes you want to print and prints that numbers. Palindrome primes are prime numbers which reverses are primes too and they are palindromes. | public static void printPalindromePrime(int howMany){
int number = 0;//number will be the test number if its palindrome prime
while(howMany>0){//while the number of how many we want to print is bigger than 0
int reverse = ReverseNumbersOrder.reverse(number); //this is the reverse number
if(number... | [
"public static void primePalindromesChoice() {\r\n\t\tSystem.out.print(\"How many prime palindromes to display?: \");\r\n\t\tint n = input.nextInt();\r\n\t\tSystem.out.println();\r\n\t\tprintPrimePalindromes(n);\r\n\t}",
"public static void printPrimePalindromes(int n) {\r\n\t\tint currentPrimePalindrome = 2;\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stores index and values at the given location. If any of these files are already present, they are overwritten. This storage guarantees that the order of the stored values will be the logical order and that the indexfile will contain incrementing pointers. It also guarantees that any old cruft in existing persistent va... | @QAInfo(level = QAInfo.Level.NORMAL,
state = QAInfo.State.IN_DEVELOPMENT,
author = "te",
comment = "Windows uses file locking, so this might work bad when overwriting existing files")
public void store(File location, String poolName) throws IOException {
log.debug(String.... | [
"protected void saveIndex() throws IOException {\n this.posIndex.writeIndex(this.getIndexFolderPath(),\n true\n );\n }",
"public void save() throws IOException {\n this.createIndexedFolder();\n this.flushMapper();\n this.flushMetaData();\n this.saveIndex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XIssueExpression__MarkerIndexAssignment_3_2_1" $ANTLR start "rule__XIssueExpression__MessageAssignment_4_1" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18168:1: rule__XIssueExpression__MessageAssignment_4_1 : ( ruleXExpressio... | public final void rule__XIssueExpression__MessageAssignment_4_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18172:1: ( ... | [
"public final void rule__XIssueExpression__Group_4__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates the correct add event command based on the event given | public String generateAddEventCommand(Event p) {
StringBuffer cmd = new StringBuffer();
cmd.append("add ");
cmd.append(p.getEvent().toString());
cmd.append(" /desc ").append(p.getDescriptionValue());
cmd.append(" /from ").append(p.getDuration().getStartTimeAsText());
cm... | [
"private AddEventCommand getAddEventCommandForEvent(Event event, Model model) {\n AddEventCommand command = new AddEventCommand(event);\n command.setData(model, new CommandHistory(), new UndoRedoStack());\n return command;\n }",
"public AddCommand(Event event) {\n this.event = event... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end entryRuleOperationArgumentList $ANTLR start ruleOperationArgumentList ../org.eclipselabs.mscript.language/srcgen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5203:1: ruleOperationArgumentList returns [EObject current=null] : ( () '(' ( ( (lv_arguments_2_0= ruleExpression ) ) ( ','... | public final EObject ruleOperationArgumentList() throws RecognitionException {
EObject current = null;
EObject lv_arguments_2_0 = null;
EObject lv_arguments_4_0 = null;
EObject temp=null; setCurrentLookahead(); resetLookahead();
try {
// ../org.ecli... | [
"public final EObject entryRuleOperationArgumentList() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleOperationArgumentList = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/Internal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apply the correction due to a 'nonnormal' Z axis on the mount. The two tilt coefficients AN and AW are used for this. | protected XYZMatrix _applyAttitudeCorrection( XYZMatrix m )
{
double ia = ( (AltAzPointingModelCoefficients)combined ).getIA();
double ie = ( (AltAzPointingModelCoefficients)combined ).getIE();
double tf = ( (AltAzPointingModelCoefficients)combined ).getTF();
double ca = ( (AltAzPointingModelC... | [
"public double getNormZ() {return nz;}",
"protected float getTextureCorrection(float normalZ) {\n return 1.0f / (float) (Math.sin(Math.abs(normalZ)) + 1.0f);\n }",
"protected XYZMatrix _removeFromMountPosition( XYZMatrix mount )\n {\n XYZMatrix temp = new XYZMatrix();\n\n /*\n temp.setX( c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new child scope of this scope. | @NotNull
public NamespaceScope createScope() {
return new NestedScoped(this);
} | [
"private ScriptableObject makeChildScope(String name, Scriptable scope) {\r\n // This code is based on sample code from Rhino's website:\r\n // http://www.mozilla.org/rhino/scopes.html\r\n \r\n // I changed it to use a ScriptableObject instead of Context.newObject()\r\n Scri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set given properties as listing visibile columns. | protected void setupVisibileColumns(Iterable<? extends P> columns) {
final List<? extends P> columnsList = ConversionUtils.iterableAsList(columns);
final List<? extends P> visibleColumns = (columnsList != null && !columnsList.isEmpty()) ? columnsList
: getDefaultVisibleProperties().orElse(Collections.emptyList... | [
"public void setupColumnVisibility(boolean propertyChangeEnabled) {\n visibleChangeEnabled = propertyChangeEnabled;\n stopListening();\n\n for(int i = format.getColumnCount()-1; i >= 0; i--) {\n TableColumnExt column = table.getColumnExt(i);\n column.setVisible(format.isVi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads the data start pointer header from the file. | protected long readDataStartHeader() throws IOException {
file.seek(DATA_START_HEADER_LOCATION);
return file.readLong();
} | [
"protected long readDataStartPointerHeader() throws IOException {\n file.seek(RecordConstants.DATA_START_HEADER_LOCATION);\n return file.readLong();\n }",
"protected void writeDataStartPointerHeader(long dataStartPtr) throws IOException {\n file.seek(RecordConstants.DATA_START_HEADER_LOCATION);\n fil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleMODULE_COMMON_ITEM" $ANTLR start "entryRuleCONTINUOUS_ASSIGN" ../com.ironglass.hdlforge.ui/srcgen/com/ironglass/hdlforge/ui/contentassist/antlr/internal/InternalSystemVerilog.g:257:1: entryRuleCONTINUOUS_ASSIGN : ruleCONTINUOUS_ASSIGN EOF ; | public final void entryRuleCONTINUOUS_ASSIGN() throws RecognitionException {
try {
// ../com.ironglass.hdlforge.ui/src-gen/com/ironglass/hdlforge/ui/contentassist/antlr/internal/InternalSystemVerilog.g:258:1: ( ruleCONTINUOUS_ASSIGN EOF )
// ../com.ironglass.hdlforge.ui/src-gen/com/ir... | [
"public final void ruleCONTINUOUS_ASSIGN() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.ironglass.hdlforge.ui/src-gen/com/ironglass/hdlforge/ui/contentassist/antlr/internal/InternalSystemVerilog.g:270:2: ( ( ( rule__CONTI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setup the rotation sensor and listen on updates | private void setupSensors() {
sensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE);
sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);
sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_FASTEST);
} | [
"private void startOrientationSensor() {\n orientationValues = new float[3];\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);\n sensorManager.registerListener(this, orie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field581' field. | public void setField581(java.lang.CharSequence value) {
this.field581 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField581(java.lang.CharSequence value) {\n validate(fields()[581], value);\n this.field581 = value;\n fieldSetFlags()[581] = true;\n return this; \n }",
"public void setField582(java.lang.CharSequence value) {\n this.field582 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove friendship where a username is null or empty string > IllegalNullArgumentException This method tests to see if a we throw an IllegalNullArgumentException whenever we try to remove a friendship where one user is null or the empty string. | @Test
void test005_removeFriendshipThrowsIllegalNullArgumentException() {
try {
// set should be updated.
christmasBuddENetwork.addFriendship("santa", "grinch");
christmasBuddENetwork.addFriendship("prancer", "comet");
christmasBuddENetwork.addFriendship("santa", "rudolph");
// pleas... | [
"public void removeFriendship(User user1, User user2) {\n \t\tParseQuery<ParseObject> query = buildRemoveFriendshipQuery(user1, user2);\n \t\tquery.findInBackground(new FindCallback<ParseObject>() {\n \t\t\t@Override\n \t\t\tpublic void done(List<ParseObject> objects, ParseException e) {\n \t\t\t\tif (e == null) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the total video decoder application layer statistics for this ''ServiceMonitoring'' main stream instance. | public void setVideoDecoderStats(VideoDecoderStats videoDecoderStats) {
this.videoDecoderStats = videoDecoderStats;
} | [
"public void setAudioDecoderStats(AudioDecoderStats audioDecoderStats) {\n\t\tthis.audioDecoderStats = audioDecoderStats;\n\t}",
"public VideoDecoderStats getVideoDecoderStats() {\n\t\treturn videoDecoderStats;\n\t}",
"public AudioDecoderStats getAudioDecoderStats() {\n\t\treturn audioDecoderStats;\n\t}",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Strip the extension from a file name. | public static String stripExtension(String name) {
return name.split("\\.")[0];
} | [
"public static String removeFileExtension(String filename) {\n \tint idx = filename.lastIndexOf('.');\n \tif (idx>0) {\n \t\treturn filename.substring(0, idx);\n \t}\n \treturn filename;\n }",
"private String removeFileExtension(String filename) {\n int extensionIndex = filename.indexOf(C... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
compare the values that are inserted into the KrbCredInfo objects before encoding to those that are obtained from decoded KrbCredInfo | private void assertValues( List<FieldValueHolder> presentFieldList, KrbCredInfo decoded ) throws Exception
{
Map<String, Field> krbCredInfoFieldNameMap = getFieldMap( decoded );
for ( FieldValueHolder fh : presentFieldList )
{
Field actualField = krbCredInfoFieldNameMap.get( Str... | [
"@Test\n public void testKrbCredInfoWithEachOptElement() throws Exception\n {\n\n int size = optionalFieldValueList.size();\n for ( int i = size - 1; i >= 0; i-- )\n {\n KrbCredInfo expected = new KrbCredInfo();\n expected.setKey( key );\n Map<String, Fiel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cancel a timer interrupt if one has been set. If a timer interrupt has been set, it is removed from the event queue. If no timer interrupt has been set this method does nothing. | public void cancelTimerInterrupt() {
// Remove any timer interrupt that appears in the event queue.
if (currentTimerEvent != null) {
events.remove(currentTimerEvent);
currentTimerEvent = null;
}
} | [
"public void timerInterrupt() {\n \t//Disable interrupts everywhere?\n \t//check if it's time for next in queue to wake up \n \tMachine.interrupt().disable();\n //Check if queue is empty and if it is time for next in queue to wake\n \twhile(!waitQueue.isEmpty() && waitQueue.peek().time <= Machine... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets value as the attribute value for TotalRolls. | public void setTotalRolls(Number value) {
setAttributeInternal(TOTALROLLS, value);
} | [
"public void setTotalAlocRolls(Number value) {\n setAttributeInternal(TOTALALOCROLLS, value);\n }",
"public Number getTotalRolls() {\n return (Number)getAttributeInternal(TOTALROLLS);\n }",
"public Number getTotalAlocRolls() {\n return (Number)getAttributeInternal(TOTALALOCROLLS);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Dumps the contents of a table to the given output stream. It uses a very simple method to format the text. | static void dump(Table table, PrintStream out) {
int col_count = table.getColumnCount();
// if (table instanceof DataTable) {
// DataTable data_tab = (DataTable) table;
// out.println("Total Hits: " + data_tab.getTotalHits());
// out.println("File Hits: " + data_tab.getFileHits());
// out.... | [
"private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Throws NotSerializableException, since NodeChangeEvent objects are not intended to be serializable. | private void readObject(java.io.ObjectInputStream in)
throws NotSerializableException {
throw new NotSerializableException("Not serializable.");
} | [
"private void writeObject(java.io.ObjectOutputStream out)\n throws NotSerializableException {\n throw new NotSerializableException(\"Not serializable.\");\n }",
"public void testIsSerializable_0()\n throws Exception {\n GreedyCrossover op = new Gre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parse ID with UNKNOWN scope. | private BodyIdentifier parseUnknownId(final String selector, final Element rawTender) {
final String buyerId = selectText(selector, rawTender);
return buyerId == null || buyerId.equals("") ? null : new BodyIdentifier()
.setId(buyerId)
.setScope(BodyIdentifier.Scope.UNKNO... | [
"void parseId(String mn) {\n if (mn!=null) id = mn.substring(0,9);\n }",
"String getParseObjectId();",
"int invalidTagId();",
"private void parseId() { //parses ID tokens on left or right side. called by parseExpression if on right side.\n\n tokenMap.add(this.tokenArray.get(index).getTypeValu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback method to be invoked when a child of this ViewGroup has been selected. | void onChildSelected(ViewGroup parent, View view, int position, long id); | [
"public void onChildViewHolderSelectedAndPositioned(RecyclerView parent,\n RecyclerView.ViewHolder viewHolder, int position, int subposition) {\n }",
"public void selectionChanged () {\n\t\tcheckWidget();\n\t\tOS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilitySelectedChildrenChan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Submits a command request to the cluster. | private void invokeCommand(CommandRequest request, CompletableFuture<byte[]> future) {
invoke(new CommandAttempt(sequencer.nextRequest(), request, future));
} | [
"public <T> CompletableFuture<T> submit(Command<T> command) {\n if (!isOpen())\n return Futures.exceptionalFuture(new IllegalStateException(\"session not open\"));\n\n CompletableFuture<T> future = new CompletableFuture<>();\n context.executor().execute(() -> {\n if (!isOpen()) {\n future.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to create a status indicator in settings panel | private void createStatusIndicator(GridBagConstraints gridBagConstraint) {
statusIndicator.setBorder(BorderFactory.createEmptyBorder(30, 10, 10, 10));
statusIndicator.setBounds(100, 200, 50, 80);
statusIndicator.setBackground(Color.decode(ServerConstants.COLOR_CODE));
gridBagConstrai... | [
"void set_sub_indicator(boolean status)\n {\n if(status)\n {\n Platform.runLater(() -> indicator_sub.setStyle(\"-fx-fill: lawngreen\"));\n }\n else\n {\n Platform.runLater(() -> indicator_sub.setStyle(\"-fx-fill: red\"));\n }\n\n }",
"void set_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves a previously defined mailing list | synchronized String get(final String name){
if (definedMailingLists.containsKey(name.toLowerCase())){
String mailingList = definedMailingLists.get(name.toLowerCase());
checkRep();
return mailingList;
}
checkRep();
return "";
} | [
"public boolean getMailingList()\r\n {\r\n return mailingList;\r\n }",
"boolean getIsMailingList();",
"public void setMailingList(boolean m)\r\n {\r\n mailingList = m;\r\n }",
"public String getMailing() {\n return mailing;\n }",
"public DefinedMailingLists(){\n this.defin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test run election efficiency. | @Test
public void testRunElectionEfficiency() throws InterruptedException, InvocationTargetException {
// Keep current System.out
final PrintStream oldOut = System.out;
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
// Change so System.out saved in baos
System.setOut(new PrintStream(baos));
... | [
"public void run() {\n for (int i = 0; i < electionTimeout; ++i) {\n try {\n //To prevent split votes in the first place, election timeouts are\n //chosen randomly from a fixed interval (e.g., 150–300ms).\n sleep(SLEEP_TIME);\n synchroniz... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get list of sd names used for a lun on this host. This code depends on keySet() and values() returning the Map entries in the same order!! | public String[] getSdNamesForLun(String lun) {
String[] sds = (String[]) luns_used.keySet().toArray(new String[0]);
String[] luns = (String[]) luns_used.values().toArray(new String[0]);
Vector sds_used = new Vector(4, 0);
for (int i = 0; i < luns.length; i++) {
if (luns[i].equals(lun))
... | [
"Set<String> getAllDeviceNames();",
"public List<String> getEntriesByName() {\r\n List<String> lexiList = new ArrayList<>();\r\n // entries is TreeMap so already in lexi order\r\n for (Map.Entry<String, Integer> e : scores.entrySet()) {\r\n lexiList.add(\"\" + e.getKey() + \" : \" ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
20050217 Read the PDB to Swissprot mapping | public void loadToDB()
{
String url = "http://www.expasy.org/cgi-bin/lists?pdbtosp.txt";
String s = IOUtils.readTextFromURL(url);
// delete all hyperlinks
s = ParserUtils.replaceAll("<.*?>", "", s);
// find useful part
String startstr = "____________________________... | [
"public String getPDBCode () ;",
"public String toPDB();",
"public static Structure readPDB(String filename){\n \t\tPDBFileReader pdbreader = new PDBFileReader();\n\t\tStructure structure = null;\n try{\n \tstructure = pdbreader.getStructure(filename);\n \t//System.out.println(structure);\n } catch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column prod_type.parent_tid | public Integer getParentTid() {
return parentTid;
} | [
"public String getParentType() {\n return this.parentType;\n }",
"public Long getParent_id() {\n return parent_id;\n }",
"public String getParentTypeCode() {\n return parentTypeCode;\n }",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"public Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method click on add status in vehicle planning | void clickOnVehicleAddStatus() {
SeleniumUtility.clickOnElement(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);
} | [
"public void clickOnAddVehicleButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary\"), SHORTWAIT);\r\n\t}",
"public void clickOnAddVehiclesButton() {\r\n\t\tsafeClick(groupListSideBar.replace(\"Group List\", \"Add Vehicl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the edge (v1, v2) in the graph | void removeEdge(Vertex v1, Vertex v2) throws GraphException; | [
"void removeEdge(V v1, V v2);",
"public void removeEdge(String vertex1, String vertex2);",
"public void removeEdge (T vertex1, T vertex2) {\n removeArc (vertex1, vertex2);\n removeArc (vertex2, vertex1);\n }",
"public void removeEdge(V from, V to);",
"public void removeEdge(T vertex1, T ver... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a random suit. | private static int randSuit() {
Random rand = new Random();
return rand.nextInt(NUM_SUITS);
} | [
"public static void generateCard(){\r\n\t\t\r\n\t\t//local variable declaration and initialization\r\n\t\tfinal int ONE = 1;\r\n\t\tfinal int THREE = 3;\r\n\t\tfinal int ELEVEN = 11;\r\n\t\tfinal int TWELVE = 12;\r\n\t\tfinal int THIRTEEN = 13;\r\n\t\t\r\n\t\t//generates random card value from 1 to 13\r\n\t\tRandom... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve el vector de datos. | public Vector getData() {
return data;
} | [
"Vector<Vector<Object>> getDataVector();",
"public Vector getDataVec(){\r\n\t\treturn dataVec;\r\n\t}",
"public Vector getDataVector() {\n return null; //dataVector;\n }",
"public Vector toVector(){\r\n\t\tVector v = new Vector();\r\n\r\n\t\t// ATTENTION l'ordre est très important !!\r\n\t\t// l'ordre doi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field920' field. | public void setField920(java.lang.CharSequence value) {
this.field920 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField920(java.lang.CharSequence value) {\n validate(fields()[920], value);\n this.field920 = value;\n fieldSetFlags()[920] = true;\n return this; \n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField922(java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |