query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
This method was generated by MyBatis Generator. This method sets the value of the database column order_shipping.receiver_name | public void setReceiverName(String receiverName) {
this.receiverName = receiverName == null ? null : receiverName.trim();
} | [
"public void setReceiverName(String receiverName) {\r\n this.receiverName = receiverName == null ? null : receiverName.trim();\r\n }",
"public void setReceiver_name(String receiver_name) {\n this.receiver_name = receiver_name == null ? null : receiver_name.trim();\n }",
"public void setRecei... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to return the FastHenry default wire thickness. The default is 2. | public static double getFastHenryDefThickness() { return cacheFastHenryDefThickness.getDouble(); } | [
"public int getStoneStrokeThickness() {\n return 2;\n }",
"public int getStrokeWeight() {\r\n return strokeWeight;\r\n }",
"public String getThickness() {\n return thickness;\n }",
"public int getWidthWeight()\n {\n int ret = 1;\n if (!isFixedWidth() && hasProper... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the ListId property. | public String getListId() {
return mListId;
} | [
"public Long getListId() {\n return listId;\n }",
"public Number getListId() {\n return (Number) getAttributeInternal(LISTID);\n }",
"public java.lang.String getList_id() {\n return list_id;\n }",
"public org.apache.axis.types.NormalizedString getListID() {\n return listID... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ ==================== getMetricDataFormat ===================================== | public int getMetricDataFormat() {
return metric_data_format;
} | [
"public Object getFormat();",
"public String getOutputDataFormat() {\n return this.outputDataFormat;\n }",
"String getValueFormat();",
"public Object createPropertyDataFormat() {\n return createPropertyDataFormatWithServiceResponseAsync().toBlocking().single().body();\n }",
"Format getFo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a feed, determine the median point of the entries. Use the updated field of the entries to determine median. | public static Date getUpdatedMedian(Feed feed) {
Date sentinal = null;
if (feed == null) {
return sentinal;
}
List<Entry> entries = feed.getEntries();
if (entries == null) {
return sentinal;
}
int size = entries.size();
if (size ==... | [
"@SuppressWarnings(\"unchecked\")\n private void updateMedian() {\n ArrayList<Tuple<LocalDate, Integer>> temp = (ArrayList<Tuple<LocalDate, Integer>>) this.numberOfVehicles.clone();\n Collections.sort(temp, new VehicleTupleComperator());\n if (temp.size() % 2 == 0) {\n int fml = t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a reference to a Tooltip responsible for binary columns | public static Tooltip binaryTooltip(){
return binaryTooltip;
} | [
"java.lang.String getTooltip();",
"public static Tooltip byteTooltip(){\n return byteTooltip;\n }",
"String getTooltip();",
"public static Tooltip columnTooltip(final Column col){\n if(col.isNullable()){\n switch(col.typeCode()){\n case NullableStringColumn.TYPE_CODE:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This event handler switches to the modify customer screen. After a customer is selected its data is sent over to prepopulate the modify customer screen. | @FXML
void modifyCustomer(ActionEvent event) throws IOException {
if (customerRecordTbl.getSelectionModel().getSelectedItem() == null){
Alert correctInput = new Alert(Alert.AlertType.ERROR);
correctInput.setTitle("Choose Customer");
correctInput.setContentText("Please mak... | [
"private void editSelectedCustomer() {\r\n\t\tif (getSelectedCustomer() != null) {\r\n\t\t\tcontroller.launchCustomerModifyGUI(getSelectedCustomer());\r\n\t\t\tdeselectCustomer();\r\n\t\t}\r\n\t}",
"public void editCustomer(Customer customer) {\n selectedCustomer = customer;\n editCustomer = true;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the original bucket wrapping this stack trace | protected void setOriginalBucket(Bucket bucket) {
this.originalBucket = bucket;
} | [
"public Bucket transferFrom(Bucket bucket) {\n E.illegalArgumentIf((bucket.type != type), \"Bucket type doesn't match\");\n noteCount += bucket.noteCount;\n bucket.noteCount = 0;\n return this;\n }",
"public void bucket(TreeNode wh, int index) {\n\t\t\t\tif (index - bucketIndexOffse... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field clusterId is set (has been assigned a value) and false otherwise | public boolean isSetClusterId() {
return this.clusterId != null;
} | [
"public boolean isSetCluster() {\n return this.cluster != null;\n }",
"public boolean isSetCloudClusterId() {\n return this.cloudClusterId != null;\n }",
"boolean getIsClusteringKey();",
"public boolean isSetLeaderNodeId() {\n return EncodingUtils.testBit(__isset_bitfield, __LEADERNODEID_IS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column FJB_BMK.MOBICODE | public void setMobicode(String mobicode) {
this.mobicode = mobicode;
} | [
"public void setBd_ma_code(int Bd_ma_code) {\r\n this.Bd_ma_code = Bd_ma_code;\r\n }",
"public void setIw_ma_code(int Iw_ma_code) {\r\n this.Iw_ma_code = Iw_ma_code;\r\n }",
"public void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);",
"public int getBd_ma_code() {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface for graph vertices. Contains bit masks for java modifiers for methods. | public interface Vertex {
/**
* Bit mask for <code>public</code> modifier.
*/
public static final int PUBLIC = Modifier.PUBLIC;
/**
* Bit mask for <code>private</code> modifier.
*/
public static final int PRIVATE = Modifier.PRIVATE;
/**
* Bit mask for <code>protected</code> modifier.
*/
public stati... | [
"public interface VisualVertex extends GVertex {\n\n\t/**\n\t * Returns the component of this vertex. This is used for rendering and interaction \n\t * with the user.\n\t * \n\t * @return the component of this vertex\n\t */\n\tpublic JComponent getComponent();\n\n\t/**\n\t * Sets this vertex to be focused. This ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the address change req details with the primary key from the database. Also notifies the appropriate model listeners. | @Override
public AddressChangeReqDetails remove(Serializable primaryKey)
throws NoSuchAddressChangeReqDetailsException, SystemException {
Session session = null;
try {
session = openSession();
AddressChangeReqDetails addressChangeReqDetails = (AddressChangeReqDetails)session.get(AddressChangeReqDetailsIm... | [
"@Override\n\tpublic AddressChangeReqDetails remove(int ADDR_CHANGE_DETAILS_ID)\n\t\tthrows NoSuchAddressChangeReqDetailsException, SystemException {\n\t\treturn remove((Serializable)ADDR_CHANGE_DETAILS_ID);\n\t}",
"@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (AddressChangeReqDetails ad... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the Bluetooth device with the given address is paired. | @SimpleFunction(description = "Checks whether the Bluetooth device with the specified address " +
"is paired.")
public boolean IsDevicePaired(String address) {
String functionName = "IsDevicePaired";
Object bluetoothAdapter = BluetoothReflection.getBluetoothAdapter();
if (bluetoothAdapter == null) {
... | [
"public boolean GetBondState(String address) {\n if (mBluetoothAdapter == null)\n return false;\n\n BluetoothDevice dev = mBluetoothAdapter.getRemoteDevice(address);\n\n return dev.getBondState() == BluetoothDevice.BOND_BONDED;\n }",
"public boolean connectSpp(String address) th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Init look up array elements to 0 | public void init_lookup(){
for(int i =0 ; i< MAX ; i++){
lookup[i] =0;
}
} | [
"public void initZero() {\n Arrays.fill(values, 0d);\n }",
"public void initArray(int defaultVal) {\r\n\t\tmap.clear();\r\n\t\tfill(array, defaultVal);\r\n\t\tthis.defaultVal = defaultVal;\r\n\t\t\r\n\t}",
"public void init() {\n for (int i = 0; i < p.length; i++) {\n p[i] = i;\n rank[i] = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Player throws one piece of popcorn. | public boolean throwPopcorn(){
//check to make sure ammo is remaining
//create a new piece of popcorn at depth zero and at the (x,y) of the player's tap
//decrease player's ammo supply by one
//add the piece to this.popcorns so that it will be used in the game
if (this.hasAmmo())... | [
"public void throwRock() {\n\t\tpokemon.HitByRock();\n\t}",
"public void throwAt(Player target);",
"@Override\n public void steppedOn(Player p) {\n standingHere++;\n Game.log.format(\"# SnowyHole>steppedOn : Stepped on SnowyHole(%d, %d)\\n\", x, y);\n p.fallInWater();\n }",
"void on... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a button that randomizes all the walls of the current maze. | private JButton makeRandomMazeButton()
{
JButton random = new JButton("Randomize Maze");
random.setToolTipText("Randomize all the walls of the currently selected Maze.");
random.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
... | [
"@Override\n\tpublic void generate() {\n\t\t// pick position (x,y) with x being random, y being 0\n\t\t// pick position (x,y) with x being random, y being 0\n\t\tint x = randNo(0, width-1) ;\n\t\tint y = randNo(0, height - 1);\n\t\tArrayList<Wall> walls = new ArrayList<Wall>();\n\t\tif (cells.canGo(x, y, 0, 1))\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a new score to this user's scoreboard. Note that this class does not check for username consistency. | public void add(SessionScore score) {
scores.add(score);
} | [
"public void addScore(int score);",
"public void addScore(Score score) {\n scores.add(score);\n }",
"public void addToScore(int score)\n {\n this.score += score;\n }",
"synchronized void addScore(String name, int score){\n\t\tif(!users.containsKey(name)){\n\t\t\tVector<Integer> scores =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ TC_Common_Daily Created by Jeffrey Date Created: 1/14/19 Usage: Loads Common Daily timesheets | public void CommonDailyTimesheet()
{
String pass = "Common_Daily";
alaskaAssociate(pass);
} | [
"Timesheet getTimesheet();",
"public void CODailyTimesheet()\r\n\t{\r\n\t\tString pass = \"CO_Daily\";\r\n\t\talaskaAssociate(pass);\r\n\t}",
"public void CADailyTimesheet()\r\n\t{\r\n\t\tString pass = \"CA_Daily\";\r\n\t\talaskaAssociate(pass);\r\n\t}",
"public void RIDailyTimesheet()\r\n\t{\r\n\t\tString pa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of insert method, of class UsuarioDao. | @Test
public void testA1Insert() throws Exception {
System.out.println("insert");
Usuario obj = new Usuario();
obj.setFullName("Nicolas Duran");
obj.setUser("admin");
obj.setPassword("admin");
obj.setEmail("kevinduran@outlook.com");
obj.setTy... | [
"@Test\r\n\t\tpublic void insertUserTestCase() {\r\n\t\t\t\r\n\t\t\tUser user = new User();\r\n\t\t\t\t\t\r\n\t\t//\tuser.setBirthDate(LocalDate.parse(\"1994-04-09\"));\r\n\t\t\tuser.setUsername(\"renu\");\r\n\t\t//\tuser.setUserId(1003);\r\n\t\t\t\r\n\t\t\tuser.setEmail(\"renu@gmail.com\");\r\n\t\t\t\t\t\r\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the slider thumb color. This is the part of the slider between the range resize buttons. | public void setThumbColor(Color thumbColor) {
this.thumbColor = thumbColor;
} | [
"@Override\r\n\t\t\tprotected void configureScrollBarColors()\r\n\t\t\t{\r\n\t\t\t\tthis.thumbColor = new Color(220, 220, 180);\r\n\t\t\t\tthis.trackColor = new Color(255, 255, 250);\r\n\t\t\t}",
"public void resetThumbColor() {\n mUseCustomThumbBackground = false;\n reloadColors();\n }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The interface defining all the services for HeaderOperations to be used by Retrofit to perform actually REST calls. | interface HeaderService {
@Headers("Content-Type: application/json; charset=utf-8")
@POST("azurespecials/customNamedRequestId")
Call<ResponseBody> customNamedRequestId(@Header("foo-client-request-id") String fooClientRequestId, @Header("accept-language") String acceptLanguage);
} | [
"interface HeadersService {\n @Headers({ \"Content-Type: application/json; charset=utf-8\", \"x-ms-logging-context: fixtures.azurespecials.Headers customNamedRequestId\" })\n @POST(\"azurespecials/customNamedRequestId\")\n Observable<Response<ResponseBody>> customNamedRequestId(@Header(\"foo-cl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds strength to basic weapon | @Override
public int getStrength()
{
return weapon.getStrength() + largeUpgrade;
} | [
"void addStrength();",
"public void addSword(){\n this.strength = this.strength + 1;\n }",
"@Override\n public void increaseStrength(int power) {\n this.damageStrength += power;\n }",
"public void setStrength(int stat) {\n this.strength = stat;\n }",
"public final void increaseWea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called from outside class to display a specific contact | public void displayContact(int index){
refreshing = true;
updateListModel();//Make sure list is up to date
refreshing = false;
contactList.setSelectedIndex(index);//Select contact in list
dataPanel.setPersonFields(index);//Display contact info in components
} | [
"public void viewContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ View Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tshowContactIndex();\n\t\tSystem.out.printf(\"%n%nClient Number: \");\n\t\tint index = s.nextInt();\n\t\tdisplayAll(index - 1);\n\t}",
"private void displayContact()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the CRM Muni persistence. | public void setCrmMuniPersistence(CrmMuniPersistence crmMuniPersistence) {
this.crmMuniPersistence = crmMuniPersistence;
} | [
"protected void setPersistence(Persistence persistence) {\n this.persistence = persistence;\n }",
"void setPersistenceEngine(PersistenceEngine persistenceEngine);",
"public CrmMuniPersistence getCrmMuniPersistence() {\n\t\treturn crmMuniPersistence;\n\t}",
"public void setAutorizzazioneDirPersistenc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
displays the contents of the player's tile rack | public void printRack() {
getPlaylist();
System.out.println("Letters in the rack: " + tileRack);
System.out.println("You can play the following words from the letters in your rack:");
} | [
"private void updateRack() {\n\n\t\tfor (Player p : game.getTurnOrder()) {\n\t\t\tp.fillRack(game.getGameBag());\n\t\t\tp.rerack(game.getGameBag());\n\t\t}\n\t\tspecialSymbol.setText(game.displaySpecialTileSlot());\n\t\tcurrentPlayerNameLabel.setText(game.getCurrentPlayer().getName());\n\t\tp1Rack.setText(game.getC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert given collection to a set. | public static <T> Set<T> toSet(final Collection<T> collection) {
if (isEmpty(collection)) {
return new HashSet<T>(0);
} else {
return new HashSet<T>(collection);
}
} | [
"Set<X> toSet();",
"public static <T> Set<T> toSet(final Iterable<T> input) {\r\n //Sets.newSetFromMap();\r\n if (input == null) throw new IllegalArgumentException(\"Functional.toSet(Iterable<T>): input is null\");\r\n return Collections.unmodifiableSet(toMutableSet(input));\r\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempts to get page, checks for IP ban, waits. | private Document getPageWithRetries(URL url) throws IOException {
Document doc;
int retries = 3;
while (true) {
sendUpdate(STATUS.LOADING_RESOURCE, url.toExternalForm());
LOGGER.info("Retrieving " + url);
doc = Http.url(url)
.referrer(thi... | [
"public static void waitForPageLoad() {\n\n\t\tif (!WebController.driver.getCurrentUrl().contains(\"uhc.com/dashboard\") && !WebController.driver.getCurrentUrl().contains(\"myuhc.com/member/\") && !WebController.driver.getCurrentUrl().contains(\"=securityQuestion\")) {\n\t\t\tWaitForLoadingOverlay();\n\t\t}\n\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getter tidak mengubah status token prekondisi: getTipeBilangan()==Tipe._int | public int getBilanganInt() /*const*/{
assert(getTipeBilangan()==Tipe._int);
return Val.I;
} | [
"public Tipe getTipeBilangan() /*const*/{\n\t\tassert(getTkn()==TipeToken.Bilangan);\n\t\treturn TipeBilangan;\n\t}",
"public boolean getBilanganBool() /*const*/{\n\t\tassert(getTipeBilangan()==Tipe._bool);\n\t\treturn Val.B;\n\t}",
"public com.gvt.www.metaData.configuradoronline.DadosStatusBloqueio getStatusIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
comparator, nulls lower (tagUtcDt) // | public JwComparator<AcItem> getTagUtcDtComparatorNullsLower()
{
return TagUtcDtComparatorNullsLower;
} | [
"public JwComparator<AcItem> getCreatedUtcTsComparatorNullsLower()\n {\n return CreatedUtcTsComparatorNullsLower;\n }",
"public JwComparator<AcUspsDomesticSupply> getCreatedUtcTsComparatorNullsLower()\n {\n return CreatedUtcTsComparatorNullsLower;\n }",
"public JwComparator<AcFossWebSe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finishing off plot merging by adding in the walls surrounding the plot (OPTIONAL)(UNFINISHED) | @Override
public boolean finishPlotMerge(final PlotWorld plotworld, final ArrayList<PlotId> plotIds) {
final PlotId pos1 = plotIds.get(0);
final PlotBlock block = new PlotBlock(BasicGen.BORDER_CLAIMED_BLOCK, (byte) 0);
final PlotBlock unclaim = new PlotBlock(BasicGen.BORDER_BLOCK, (byte) 0);... | [
"private void peelOffCurves(){\n graphWindow = new GraphWindow(this);\n clearPlot(true);\n graphWindow.setVisible(true);\n }",
"public void drawGraph(){\n this.post(new Runnable(){\n @Override\n public void run(){\n removeAllSeries();\n ad... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get letter group after first dive, given depth of dive in meters and minutes of bottom time depth must be one of the values in Table 1 exactly. minutes will round up | public char getLetterGroupFirstDiveMeters (int depth, int minutes) {
int row = getIndexDepthMeters(depth);
if (row == -1) {
return '1'; //error - depth out of range
}
int col = getColFirstDiveTable (row, minutes);
if (col == -1) {
return '1'; //error - minutes out of range
}
return letterGrou... | [
"public char getLetterGroupFirstDiveFeet (int depth, int minutes) {\n\t\tint row = getIndexDepthFeet(depth);\n\t\tif (row == -1) {\n\t\t\treturn '1'; //error - depth out of range\n\t\t}\n\t\t\n\t\tint col = getColFirstDiveTable (row, minutes);\n\t\tif (col == -1) {\n\t\t\treturn '1'; //error - minutes out of range\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that we fail to parse an DOM with only up to a valid "ui" element, but no more than that. | @Test(expected = IllegalArgumentException.class)
public void testParseDOMToUIElemOnlyFails()
{
parser.parse(DefaultConfigurationParserMockDOMs.createDOMToUIElemOnly());
fail("Should have thrown an IllegalArgumentException");
} | [
"@Test(expected = IllegalArgumentException.class)\n public void testParseDOMUIElemNoNameFails()\n {\n parser.parse(DefaultConfigurationParserMockDOMs.createDOMUIElemNoName());\n fail(\"Should have thrown an IllegalArgumentException\");\n }",
"@Test(expected = IllegalArgumentException.class)\n pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int32 weike_count = 2; | int getWeikeCount(); | [
"int getWeikeCountCount();",
"int getHerwinCount();",
"int getWeaveCount();",
"int getTCount();",
"int getLoopCnt();",
"int getCnt();",
"private static int getFlightTakeOffCount()\r\n\t{\r\n\t\treturn flightTakeOffCounter;\r\n\t}",
"long getZeroCountInt();",
"public int pin()\n\t{ pinCount++; \n\tre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of bytes required to read/write a memory buffer via OpenGL using the current GL pixel storage state and the given parameters. This method is security critical, hence it throws an exception (failfast) in case either the format, type or alignment is unhandled. In case we forgot to handle proper values,... | public static final int sizeof(GL gl, int tmp[],
int format, int type, int width, int height, int depth,
boolean pack) throws GLException {
int elements = 0;
int esize = 0;
if (width < 0) return 0;
if (height ... | [
"public static final int sizeof(GL gl, int tmp[], \n int bytesPerElement, int width, int height, int depth, \n boolean pack) {\n int rowLength = 0;\n int skipRows = 0;\n int skipPixels = 0;\n int alignment = 1;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Returns the intercept of the slope | private BigInteger getIntercept(final BigInteger slope) {
if (n.compareTo(new BigInteger("2")) == -1)
return new BigInteger("-1");
else
return sumY.subtract(slope.multiply(sumX)).divide(n);
} | [
"private double getIntercept(double slope) {\n return (sumY - slope * sumX) / n;\n }",
"public double intercept() {\r\n return (this.start.getY() - (this.lineSlope() * this.start.getX()));\r\n }",
"public double getIntercept() {\n return getIntercept(getSlope());\n }",
"public do... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a rowheader to display row numbers. This rowheader is made of labels whose Borders, Foregrounds, Backgrounds, and Fonts must be the one used for the table column headers. Also ensure that the rowheader labels and the table rows have the same height. | private void initRowHeaders() {
TableColumn aColumn = jTable1.getColumnModel().getColumn(0);
TableCellRenderer aRenderer = jTable1.getTableHeader().getDefaultRenderer();
if (aRenderer == null) {
System.out.println(" Aouch !");
aColumn = jTable1.getColumnModel().getColumn(... | [
"private void generateRowHeaders() {\n JPanel pnl = new JPanel((LayoutManager) null);\n\n java.awt.Dimension dim;\n Object selection = null;\n if (paramTree.getSelectionCount() > 0) {\n selection = paramTree.getSelectionPath().getLastPathComponent();\n }\n\n int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create the real file to be compiled | private void createFile(String packageName, String enclosingName, String methodName, String returnType) {
try {
JavaFileObject jfo = mFiler.createSourceFile(enclosingName, new Element[]{});
Writer writer = jfo.openWriter();
writer.write(brewCode(packageName, enclosingName, me... | [
"private void createExecutableFile() throws IOException {\r\n //if (report.getErrorList() == null)\r\n //{\r\n System.out.println(\"Currently generating the executable file.....\");\r\n executableFile = new File(sourceName + \".lst\");\r\n // if creating the lst file is successful... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns crawler's chrome driver so it can be reused. | public ChromeDriver getChromeDriver()
{
return chromeDriver;
} | [
"private WebDriver getDriver() {\n return new ChromeDriver();\n }",
"public WebDriver getChromeDriver()\n\t{\n\tWebDriver driver=new ChromeDriver(); \n\treturn driver;\n\t}",
"static ChromeDriver getChromeDriver() {\n WebDriverManager.chromedriver().setup();\n return new ChromeDriver();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'PreviousActualCallRef' field. Reference to the previous actual call. | public java.lang.CharSequence getPreviousActualCallRef() {
return PreviousActualCallRef;
} | [
"public java.lang.CharSequence getPreviousActualCallRef() {\n return PreviousActualCallRef;\n }",
"public no.ruter.avro.entity.actual.call.key.EntityPartition.Builder setPreviousActualCallRef(java.lang.CharSequence value) {\n validate(fields()[5], value);\n this.PreviousActualCallRef = value;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invoked when a repeat value timing specifier with no iteration is parsed. | @Override
public void repeat(float offset, String syncbaseID) {
TimingSpecifier ts = new RepeatTimingSpecifier(owner, isBegin, offset, syncbaseID);
timingSpecifiers.add(ts);
} | [
"@Override\n\tpublic void repeat(float offset, String syncbaseID, int repeatIteration) {\n\t\tTimingSpecifier ts = new RepeatTimingSpecifier(owner, isBegin, offset, syncbaseID, repeatIteration);\n\t\ttimingSpecifiers.add(ts);\n\t}",
"final public void repeat() throws ParseException {\n jj_consume_token(REPEAT)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs the GetRecords XML requests from the example/deegree directory. | public void testGetRecordsXMLExamples()
throws Exception {
URL directoryURL = new URL( requestDir, "GetRecords/xml" );
List<URL> exampleFiles = scanDirectory( directoryURL, "xml" );
for ( URL example : exampleFiles ) {
if( example.toString().contains( "e... | [
"public void testDescribeRecordXMLExamples()\n throws Exception {\n\n URL directoryURL = new URL( requestDir, \"DescribeRecord/xml\" );\n List<URL> exampleFiles = scanDirectory( directoryURL, \"xml\" );\n\n for ( URL example : exampleFiles ) {\n LOG.logInfo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessor for the property "LocksGranted" Getter for property LocksGranted. | public int getLocksGranted()
{
// import Component.Util.Daemon.QueueProcessor.Service.Grid.PartitionedService.PartitionedCache$Storage as Storage;
// import java.util.Map;
Storage storage = get_Storage();
Map mapLocks = storage == null ? null : storage.getLeaseMap()... | [
"@VTID(24)\r\n boolean getLocked();",
"@ApiModelProperty(value = \"Locked: is menu locked against modifcation\")\n public Boolean isLocked() {\n return locked;\n }",
"public long getPermits() {\n return permits;\n }",
"public String getIslocked() {\n\t\treturn islocked;\n\t}",
"public boolea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes a new MediaStreamTarget instance with specific RTP and RTCP InetAddresses and ports. | public MediaStreamTarget(InetAddress rtpAddr, int rtpPort, InetAddress rtcpAddr, int rtcpPort)
{
this(new InetSocketAddress(rtpAddr, rtpPort), new InetSocketAddress(rtcpAddr, rtcpPort));
} | [
"public MediaStreamTarget(\n InetAddress rtpAddr, int rtpPort,\n InetAddress rtcpAddr, int rtcpPort)\n {\n this(\n new InetSocketAddress(rtpAddr, rtpPort),\n new InetSocketAddress(rtcpAddr, rtcpPort));\n }",
"public MediaStreamTarget(\n I... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Postcondition: Creates a polynomial which has a single term a0x^0 | public Polynomial(double a0)
{
head = new TermNode(a0,0,null);
} | [
"Function polynomial();",
"public Polynomial()\r\n\t{\r\n\t\tdouble[] coeff = new double[1];\r\n\t\tcoeff[0] = 0;\r\n\t\tthis.coeffs = coeff;\r\n\t}",
"public Polynomial() {\n degree = 0;\n }",
"PolynomialNode addTerm(int coefficient, int power);",
"protected abstract Polynomial createNewAnswer(Po... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get custom response menu for a given index | String getResponseMenu(int index) {
return null;
} | [
"public static void getIndexMenus() {\n\t\tRestAssured.baseURI = \"http://beverlyshill.solutions/\";\n\t\tRestAssured.basePath = \"index\";\n\t\tRestAssured.defaultParser = Parser.JSON;\n\t\tString getLine = RestAssured.baseURI + RestAssured.basePath;\n\t\tgetIndexMenusResponse =\n \t\tgiven().\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Atualiza a consulta atual em termos do crecimento de casos, recuperados ou mortos. Recebe o nome da JCheckBox e modifica seu boolean associado. | public void atualizaCrescimentoDe(String checkBoxName, int stateChange) {
Consulta consultaAtual = this.getConsultaAtual();
boolean checked = stateChange == 1 ? true : false;
switch(checkBoxName) {
case "de casos":
consultaAtual.alternateMapBoolean(consultaAtual.getCrescimentoDe(), StatusCaso.CONFIRMADOS, ... | [
"private void setCheckBoxChecked() {\n grupoRespuestasUnoMagnitudes.check(radioChecked[0]);\n grupoRespuestasDosMagnitudes.check(radioChecked[1]);\n grupoRespuestasTresMagnitudes.check(radioChecked[2]);\n grupoRespuestasCuatroMagnitudes.check(radioChecked[3]);\n grupoRespuestasCin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will return the formal family name as given by Xilinx 'partgen.' | public static String getFormalFamilyNameFromType(FamilyType type) {
switch (type) {
case ARTIX7:
return "Artix7";
case ARTIX7L:
return "Artix7 Lower Power";
case ASPARTAN2E:
return "Automotive Spartan2E";
case ASPART... | [
"public String getFamilyName();",
"String getFamily();",
"public String getFamilyName()\r\n {\r\n return getSemanticObject().getProperty(data_familyName);\r\n }",
"public java.lang.String getFamilyName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__QualifiedNameWithWildCard__Group_1__1__Impl" $ANTLR start "rule__XAnnotation__Group__0" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:6724:1: rule__XAnnotation__Group__0 : rule__XAnnotation__Group__0__Impl rule__XAnnotation__Gr... | public final void rule__XAnnotation__Group__0() 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:6728:1: ( rule__XAnnotation__... | [
"public final void rule__XAnnotation__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:4196:1: ( rule__XAnnotation__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MODIFIES: this EFFECTS: disables the convert button if one of the text fields is empty and returns true, false otherwise | private boolean handleEmptyTextField(DocumentEvent e) {
if (e.getDocument().getLength() <= 0) {
button.setEnabled(false);
alreadyEnabled = false;
return true;
}
return false;
} | [
"private void checkEmpty() {\n\t\tif (textField.getText().equals(\"\"))\n\t\t\tbutton.setEnabled(false);\n\t\telse\n\t\t\tbutton.setEnabled(true);\n\t}",
"private void checkTextField(){\n\t\ttry{\n\t\t\tif(!txfBpmChange.getText().equals(\"\")){\n\t\t\t\tfloat bpmDigits = Float.parseFloat(txfBpmChange.getText());\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__RelativeTransformation__Group__1" $ANTLR start "rule__RelativeTransformation__Group__1__Impl" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:6139:1: rule__RelativeTransformation__Group__1__Impl : ( 'with' ) ; | public final void rule__RelativeTransformation__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:6143:1: ( ( ... | [
"public final void rule__RelativeTransformation__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:6131:1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Download references to images on the wise2 server and save them into the assets folder. Then change the reference in the content to point to the assets folder instead of the wise2 server. | public String downloadImagesAndReplaceReferences(File projectFolder, String content) {
/*
* Find all references to images on the wise2 server.
* e.g.
* http://wise.berkeley.edu/upload/32809/plantcell.jpg
*
* This will match jpg, jpeg, gif, png, tiff, bmp files.
*/
Pattern p = Pattern.compile(... | [
"public void downloadExternalMods() {\n try {\n FileUtils.copyURLToFile(new URL(\"https://github.com/ice-mineman/Seppuku-Installer-Assets/raw/master/betterui-1.1-SNAPSHOT.jar\"), new File(seppukuModulesFolder.getAbsolutePath() + \"/betterui-1.1-SNAPSHOT.jar\"));\n } catch (IOException e) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MODIFICADOR_4: Metodo para modificar la fecha de matriculacion del Vehiculo | public void modificar_fecha_matriculacion(String dato_nuevo)
{
fecha_matriculacion = dato_nuevo;
} | [
"public void servicioModificarFechaMatriculacion(int idVehiculo, Date nuevaFechaMatriculacion) throws DAOException, ServiciosException {\n Vehiculo v = this.servicioObtenerVehiculo(idVehiculo);\n v.setFechaMatriculacion(nuevaFechaMatriculacion);\n idao.modificarVehiculoDAO(v);\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Store old servers and HRW hashing information | private static void storeOldServersAndRh() {
RedisClient.oldSetOfServers.clear();
RedisClient.oldSetOfServers.addAll(RedisClient.servers);
RedisClient.oldRh = new RendezvousHash<>(new HashFunction(), RedisClient.oldSetOfServers);
RedisClient.oldServerObjs = (HashMap)((HashMap)RedisClien... | [
"private String getServerLastSocketHash(Server server) {\r\n String server_hash = \"\";\r\n for (SocketThread socket : server.getSocketList().values()) {\r\n server_hash = socket.getHash();\r\n }\r\n return server_hash;\r\n }",
"private void writeHaServerConfig() throws I... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the CDGALD value for this ProductPRD. | public java.lang.String getCDGALD() {
return CDGALD;
} | [
"public void setCDGALD(java.lang.String CDGALD) {\n this.CDGALD = CDGALD;\n }",
"public double getDPG() \r\n {\r\n return this.DPG;\r\n }",
"public BigDecimal getDEAL_CY() {\r\n return DEAL_CY;\r\n }",
"public String getProdCd() {\n\t\treturn prodCd;\n\t}",
"public double ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the void setProductId(Long) method test. | @Test
public void testSetProductId_1() throws Exception {
OrderDetailsEntity fixture = new OrderDetailsEntity(new Long(1L), "", "", 1, 1);
String productId = "";
fixture.setProductId(productId);
// add additional test code here
} | [
"private void setProductId(String productId) \n {\n this.productId = productId;\n }",
"public void setArgs(long productId){\r\n this.productId = productId;\r\n }",
"public void setProductId(String productId) ;",
"public void setProduct(Long product) {\n this.product = product;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if it is time to update packs per the subscribedto membership. | static void checkUpdateMembership(Activity activity, int catPacks, int randomTopics) {
SharedPreferences shprefs = activity.getSharedPreferences(Constants.SHPREFS, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = shprefs.edit();
String lastUpdate = shprefs.getString(Constants.SHPREFS_SU... | [
"public static boolean shouldUpdate() {\n\t\tboolean shouldUpdate = true;\n\t\tlong now = System.currentTimeMillis();\n\t\t\n\t\t// If we have updated TTL value from AppBlade within the last hour, do not require update\n\t\tif(ttlLastUpdated > (now - MillisPerHour))\n\t\t\tshouldUpdate = false;\n\t\t\n\t\t// If TTL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the taken cameraphoto from gallery, optimize and show | private void galleryLoadCameraPic() {
if (GlobalMethods.validateString(mCurrentPhotoPath)) {
Point ptImageSize = GlobalMethods.getImageSize(Uri.parse(mCurrentPhotoPath));
Point ptDisplaySize = GlobalMethods.getDisplaySize(this.getActivity());
int inSampleSize = 1;
if (ptImageSize != null && ptDisplayS... | [
"public void getPhoto() {\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //for startActivityForResult, the second parameter, requestCode is used to identify this particular intent\n startActivityForResult(intent, 1);\n }",
"private void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for TdExpCurpDTO class. | public TdExpCurpDTO() {
} | [
"public TdExpCurpDTO(java.lang.Integer curpSecuencia, java.lang.String idDocto, java.lang.String rfcEmpleado, \n int idExpRechazo, java.lang.String curpCve, java.lang.String curpDoctoRef, \n java.util.Date fecModifico, java.lang.String idStatus, java.lang.String usuario... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write settings to stream. | public static void writeSettingsToStream(Settings settings, StreamOutput out) throws IOException {
out.writeVInt(settings.getAsMap().size());
for (Map.Entry<String, String> entry : settings.getAsMap().entrySet()) {
out.writeUTF(entry.getKey());
out.writeUTF(entry.getValue());
}
} | [
"public static void writeSettingsToFile() {\n if (settings == null) {\n return;\n }\n \n File settingsFile = new File(SETTINGS_FILE);\n JSONObject json = settings.toJSON();\n\n if (settingsFile.exists()) {\n settingsFile.delete();\n }\n \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deserialize a binary peer ID representation. | public static PeerId fromBytes(byte[] bytes) {
return new PeerId(bytes);
} | [
"public static MimdId fromBytes(byte[] data) throws KlvParseException {\n return new MimdId(data);\n }",
"public PeerID() {\n\n\t\tnew Random().nextBytes (this.peerIDBuffer.array());\n\n\t}",
"public byte[] getPeerId() {\n\t\treturn _myPeerId;\n\t}",
"public PeerID (byte[] peerIDBytes) {\n\n\t\tif (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
l shares a common point with this instance if the minimum distance between l and the circle's center does not exceed its radius | @Override
public boolean intersects(Line2D l)
{
return l.ptLineDist(center) <= radius;
} | [
"public synchronized Point inCircle(java.awt.Point p){\n\t\tif (pointList != null && p != null){\n\t\t\tfor (Point pc : pointList){\n\t\t\t\tdouble abstand = Math.sqrt((p.getX() - pc.getX()) * (p.getX() - pc.getX()) + (p.getY() - pc.getY()) * (p.getY() - pc.getY()));\n\t\t\t\tif ((int)abstand <=radius){\n\t\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new Converters store. | public ConvertersStore() {
this.inConverters = new ConcurrentHashMap<>();
this.outWriters = new ConcurrentHashMap<>();
this.mediaTypeInConverters = new ConcurrentHashMap<>();
this.mediaTypeOutWriters = new ConcurrentHashMap<>();
this.gson = new Gson();
this.defaultWriter = createDefaultWriter();... | [
"Store createStore();",
"public ConverterFactory() {\r\n\r\n _parserMap = new HashMap<>();\r\n _parserMap.put(FileFormats.TEXT.toString(), new TextParser());\r\n _parserMap.put(FileFormats.XML.toString(), new XmlParser());\r\n\r\n _writerMap = new HashMap<>();\r\n _writerMap.put... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an array of file extensions supported by this parser. Subclassers are advised to return a cached string array if possible, instead of creating a new one on each call. | public abstract String[] getExtensions(); | [
"public String[] getExtensions() {\n\t\treturn extensions.keySet().toArray(new String[0]);\n\t}",
"public String[] getExtensions() {\n\t\treturn url.getExtensions();\n }",
"String[] getFileExtensions();",
"public Set<String> getSupportedFileExtensions();",
"protected FileNameExtensionFilter[] getExtensio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MyScreen basic window for game, inherits properties and methods from JFrame | public MyScreen() {
// this is current instance, setters are mutator methods which change properties
this.setSize(1200,1000);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setVisible(true);
} | [
"public void launchMainScreen() {\n\t\tmainWindow = new MainGameScreen(this);\n\t}",
"public GameWindow() {\n\t\tthis.initWindow();\n\t}",
"public WinScreen()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(1500, 500, 1); \r\n\r\n prepare(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load and parse XML file with crops specs | @SuppressWarnings("hiding")
private static void parseFile(File file) {
PCXMLNode node = PCXMLLoader.load(file);
for(int i=0; i<node.getChildCount(); i++){
PCXMLNode crops = node.getChild(i);
if(!crops.getName().equalsIgnoreCase("Crops"))
continue;
... | [
"private static void extractXMLInfo(){\n Document doc = null;\n ParseXML parsing = new ParseXML();\n try{\n doc = parsing.getDocFromFile(\"cards.xml\");\n parsing.readCardData(doc);\n \n doc = parsing.getDocFromFile(\"board.xml\");\n parsing.readBoardData(doc);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When some exceptions occur, the application needs to stop the session. | private void stopArSession(Exception exception) {
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
Log.e(TAG, "Creating session error ", exception);
if (mArSession != null) {
mArSession.stop();
mArSession = null;
}
} | [
"public void stopSession()\n {\n TraceState state = get();\n if (state == null) // inline isTracing to avoid implicit two calls to state.get()\n {\n logger.trace(\"request complete\");\n }\n else\n {\n stopSessionImpl();\n\n state.stop();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unregisters a member with the watcher. If the watcher is monitoring the folder represented by the member, it will stop monitoring it. | public void unregister(Member m) {
if (!m.isFolder()) {
throw new IllegalArgumentException("not a folder");
}
if (watcher == null) {
return;
}
synchronized (keyMap) {
for (Entry<WatchKey, Member> entry : keyMap.entrySet()) {
if... | [
"private void unregisterMember(Member member) {\n try {\n MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();\n MemberMBean mbean = new MemberMBean(member, managementService);\n mbean.setParentName(clusterObjectNames);\n if (mbs.isRegistered(mbean.getObje... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encrypt the input string with the specified password and salt. | PBEncryptStorage encrypt(String inputString, String password, byte[] salt); | [
"public static String encryptPassword(String password, byte[] salt) throws Exception {\n String encryptedPassword = generateStrongPassword(password, salt);\n return encryptedPassword;\n }",
"private String encrypt(String salt, String password) {\n\t\tchar[] res = new char[salt.length()+password.l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
methods for blur saturate and brightness with value passed return a new Picture and chain pictures blur cycles through the pixels in blurredFactor distance from each pixel and averages the rgb values. | private Picture blur(Picture p, int blurredFactor) {
Picture output = new PictureImpl(p.getWidth(), p.getHeight());
double totalRed = 0.0;
double totalGreen = 0.0;
double totalBlue = 0.0;
int total = 0;
for (int i = 0; i < p.getWidth(); i++) {
for (int j = 0; j < p.getHeight(); j++) {
for (int m = i ... | [
"public static Picture blur(Picture picture) {\n int[] posCol = {-4, -3, -2, -1, 0, 1, 2, 3, 4};\n int[] posRow = {-4, -3, -2, -1, 0, 1, 2, 3, 4};\n int[] kernel = {1, 1, 1, 1, 1, 1, 1, 1, 1};\n int filterR, filterG, filterB;\n float blurPara = 9.0F;\n\n Picture newPic = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a bitmap from a file. | public static Bitmap createBitmap (String filePath) throws IOException
{
Bitmap bitmap = BitmapFactory.decodeFile(filePath);
/* Evaluate if we need to rotate the bitmap and replace the old bitmap. */
bitmap = fixImageRotation(bitmap, filePath);
return bitmap;
} | [
"private Bitmap decodeFile(File f)\n {\n Bitmap ret = null;\n try\n {\n FileInputStream is = new FileInputStream(f);\n ret = BitmapFactory.decodeStream(is, null, null);\n }\n catch (FileNotFoundException e)\n {\n e.printStackTrace();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search for the nmClassProduto already exists. | String findnmClassProdutoExists(String nmClassProduto); | [
"String findCdClassProdutoExists(String cdClassProduto);",
"Produto Pesquisar( String nome){\n\n if ( !produtos.isEmpty() ){\n for ( Produto prod : produtos ){\n if ( prod.getnome().equals( nome))\n return prod;\n }\n }\n\n return null;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assigns this as the context menu of given table. | public void setAsTableContextMenu(final Table table) {
extend(table);
setOpenAutomatically(false);
table.addItemClickListener(new ItemClickEvent.ItemClickListener() {
private static final long serialVersionUID = -348059189217149508L;
@Override
public void itemClick(ItemClickEvent event) {
... | [
"public TableContextMenuItem addContextMenuItem(TableContextMenuItem parent, String resourceKey);",
"public void setMenuContext(Object param) {\r\n }",
"public void fillMenu(Menu menu) {\r\n final MenuItem itemChangeTable = new MenuItem(menu, SWT.PUSH);\r\n Messages.setLanguageText(itemChangeTable, \"M... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the processor's registers in preparation for running the program loaded into this process. Set the PC register to point at the start function, set the stack pointer register to point at the top of the stack, set the A0 and A1 registers to argc and argv, respectively, and initialize all other registers to 0. | public void initRegisters()
{
Processor processor = Machine.processor();
// by default, everything's 0
for (int i = 0; i < Processor.numUserRegisters; i++)
{
processor.writeRegister(i, 0);
}
// initialize PC and SP according
processor.writeRegist... | [
"public void initRegisters() {\n Processor processor = Machine.processor();\n\n // by default, everything's 0\n for (int i = 0; i < Processor.numUserRegisters; i++)\n processor.writeRegister(i, 0);\n\n // initialize PC and SP according\n processor.writeRegister(Processo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate the bbox enetered by the user and create an envelope, if the input is correct | public static Envelope createSafeBBOX(String bboxInput) throws InvalidParameterValueException{
String[] splittedBBOX = bboxInput.split(",");
if ( splittedBBOX.length != 4 ) {
String message = "Parameter 'BBOX' is not valid" ;
throw new InvalidParameterValueExceptio... | [
"protected Envelope parseBoundingBox( Element element, CoordinateSystem defaultCoordinateSystem )\n throws XMLParsingException,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update a TShirt in the database. | @RequestMapping(value = "/tshirt", method = RequestMethod.PUT)
@ResponseStatus(value = HttpStatus.OK)
public void updateTShirt(@RequestBody @Valid TShirt tShirt) {
// Get the TShirt from the database
TShirt tShirtFromDB = serviceLayer.getTShirt(tShirt.getId());
// Update the TShirt if i... | [
"@Override\n\tpublic boolean updateShoe(Shoe s) {\n\t\t//Update shoe sql stmt\n\t\tString sql = \"UPDATE shoeproject.SHOES SET BRAND=?, COLOR=?, SIZE=?, PRICE=? WHERE ID=?\";\n\t\ttry {\n\t\t\t//execute sql\n\t\t\tint rows = jdbcTemplateObject.update(sql, s.getBrand(), s.getColor(), s.getSize(), s.getPrice(), s.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a condensed array of operands for a given nary conjunction. | private LinkedHashSet<Formula> condenseOperandsAnd(Collection<? extends Formula> operands) {
final LinkedHashSet<Formula> ops = new LinkedHashSet<>();
this.cnfCheck = true;
for (Formula form : operands)
if (form.type() == AND) {
for (Formula f : ((NAryOperator) form).operands) {
this... | [
"public static Expression conjunction(List<Expression> conjuncts) {\n\t\tif (conjuncts.isEmpty()) {\n\t\t\t// Null pointer represents empty WHERE clause\n\t\t\treturn null;\n\t\t} else {\n\t\t\tint nrConjuncts = conjuncts.size();\n\t\t\tExpression conjunction = conjuncts.get(0);\n\t\t\tfor (int conjunctCtr=1; conju... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
onReceive() Called whenever an update occurs in our connected BLE device(s). Because this is a part of the manager service, we want to keep track of every type of update, since this gives us information on the connectivity and transferal of data between our Android device and the Smart Glove device. | @Override
public void onReceive(Context context, Intent intent)
{
Log.d(TAG, "Received BLE Update");
// Get the MAC address and action from the intent
String deviceAddress = intent.getStringExtra(BluetoothLeConnectionService.INTENT_DEVICE);
String action =... | [
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(TAG,\"Received MQTT Update\");\n if(!intent.hasExtra(UPDATE_TYPE)) {\n Log.w(TAG, \"Update is empty\");\n return;\n }\n\n UpdateType updateType = (UpdateType)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify that new Merchant is not present in table. | public void verifyMercsnotPresent(String signature) {
List<String> table = new ArrayList<String>();
waitMethods.waitForElementDisplayed("estates_list_sign_css");
table = selUtils.getLstItems(selUtils
.getObjects("estates_list_sign_css"));
Assert.assertFalse(table.contains(signature), "After deleted, th... | [
"@Test\n public void testFalseIfCustomerNotExists() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // generate an ID which isn't taken by any customer\n int nonExistentId = generateId(\n shop.getAllCust... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
does the block have the annotation that denotes that it should be splitcompiled to cuda? | private boolean blockIsKernel(Node n) {
return nodeHasAnnotation(n, ANN_KERNEL);
} | [
"public static void main(String[] args){\n\n\n JCudaDriver.setExceptionsEnabled(true);\n String ptxFileName = \"kernels/testAddKernel.ptx\";\n\n cuInit(0);\n CUdevice device = new CUdevice();\n cuDeviceGet(device, 0);\n CUcontext context = new CUcontext();\n cuCtxCre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
extent = new ExtentReports(System.getProperty("user.dir") + "/testRep/ExtentScreenshot.html", true); extent = new ExtentReports(System.getProperty("user.dir") + "/test output/ExtentScreenshot.html", true); | @BeforeTest
public void init()
{
extent = new ExtentReports("E:\\Lasantha\\Auto\\Jenkins\\Test\\Rep\\Result.html");
} | [
"public static ExtentReports getExtentObject()\n{\nString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\"; //\"user.dir\" gives path till project in this case till mavenjava after that we need to give the path for report\nExtentSparkReporter report=new ExtentSparkReporter(path); \nreport.config(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resume breaking of a block that was being mined by the player | public MiningTask resumeBreaking(Player player, Block block) {
if (miningTasks.containsKey(player.getUniqueId())) {
for (MiningTask task : miningTasks.get(player.getUniqueId())) {
if (task.getBlock().getLocation().equals(block.getLocation())) {
// Make sure to upd... | [
"public void cancelBreaking(Block block) {\n try {\n for (Player player : Bukkit.getOnlinePlayers()) {\n if (miningTasks.containsKey(player.getUniqueId())) {\n ArrayList<MiningTask> list = miningTasks.get(player.getUniqueId());\n\n // Only need ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shipping Method for a Cart with Single ShippingMode. If the referenced ShippingMethod has a predicate that does not match the Cart, an InvalidOperation error is returned when creating a Cart. | @Valid
@JsonProperty("shippingMethod")
public ShippingMethodResourceIdentifier getShippingMethod(); | [
"@NotNull\n @Valid\n @JsonProperty(\"shippingMethod\")\n public ShippingMethodResourceIdentifier getShippingMethod();",
"public void setShippingMethod(final ShippingMethodResourceIdentifier shippingMethod);",
"java.lang.String getShippingMode();",
"void setShippingMode(java.lang.String shippingMode);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Player configs Creates a player config, and saves it to disk | public static YamlConfiguration createPlayerConfig(String name) {
if (!name.endsWith(".yml")) {
name += ".yml";
}
File file = new File(plugin.getDataFolder() + File.separator + "players", name);
if (!file.exists()) {
try {
file.createNewFile();
... | [
"public static void saveGameConfiguration() {\n exportJsonFile(new File(FileUtils.getRootFile(), Constant.CONFIG_FILE_NAME));\n }",
"public void createConfigFiles() {\n configf = new File(getDataFolder(), \"config.yml\");\n userCharf = new File(getDataFolder(), \"user.yml\");\n\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var202' field. | public java.lang.Double getVar202() {
return var202;
} | [
"public java.lang.Double getVar202() {\n return var202;\n }",
"public void setVar202(java.lang.Double value) {\n this.var202 = value;\n }",
"public java.lang.CharSequence getField202() {\n return field202;\n }",
"public java.lang.CharSequence getField202() {\n return field202;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the colors for alternating rows or sets of rows. | public void setRowColors(CharColor[] charColors) {
rowColors = charColors;
} | [
"private void highlightRows(){\n\r\n int count = 0;\r\n for (int i = 0; i < table.getChildCount(); i++) {\r\n\r\n View view1 = table.getChildAt(i);\r\n\r\n if (view1 instanceof TableRow) {\r\n\r\n if (count % 2 != 0) view1.setBackgroundColor(Color.LTGRAY);\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the ID number of the active game | public static int getGameID() {
return gameID;
} | [
"public int getCurrentGameID() {\n return currentGameID;\n }",
"long getGameid();",
"public String getGameID() {\n\t\treturn game.getGameID();\n\t}",
"public int getGameId() {\n return gameId;\n }",
"public String getGameId();",
"public Integer getGameId() {\n return gameId;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the session info; | protected abstract S createSessionInfo(IoSession session); | [
"Session createSession();",
"private void setupSession() {\n // TODO Retreived the cached Evernote AuthenticationResult if it exists\n// if (hasCachedEvernoteCredentials) {\n// AuthenticationResult result = new AuthenticationResult(authToken, noteStoreUrl, webApiUrlPrefix, userId);\n// ses... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a Importer that is initialized with the root directory for Animator data. | public Importer(File directory) {
super();
_headerObject = new HeaderObject();
_headerObject._directory = directory;
} | [
"public Importer()\n {\n System.out.println(\"Importer initialized.\");\n\n System.out.println(\"Accessing master entry record...\");\n this.setMasterFile(new File(\"data/master.csv\"));\n\n System.out.println(\"Parsing configuration files...\");\n this.configManager = new ConfigManager();\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Facebook app requires a key hash of the Android application. This method prints development key hash. To get release key hash, refer to | private void printDevelopmentKeyHash() {
try {
PackageInfo info = getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArra... | [
"private void printKeyHash() {\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\"com.sar.biteit\", PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The provider implementing this can construct the AndroidSdkInfo provider. | @StarlarkBuiltin(
name = "Provider",
doc =
"Do not use this module. It is intended for migration purposes only. If you depend on "
+ "it, you will be broken when it is removed.",
documented = false)
interface Provider<
FileT extends FileApi,
FilesToRunProv... | [
"@StarlarkBuiltin(\n name = \"AndroidSdkInfo\",\n doc =\n \"Do not use this module. It is intended for migration purposes only. If you depend on it, \"\n + \"you will be broken when it is removed.\",\n documented = false)\npublic interface AndroidSdkProviderApi<\n FileT extends Fil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ MyThread1 MyThread2 ... ... BR.block(); ... ... BR.release(); | public static void main(String[] args) throws InterruptedException
{
Barrier BR = new Barrier();
Thread t1 = new Thread(new Lect4.MyThread1(BR));
Thread t2 = new Thread(new Lect4.MyThread2(BR));
t1.start();
t2.start();
t1.join();
t2.join();
} | [
"@Test(timeout=5_000)\n public void testDeadlockQueue() {\n // Designated the number of iterations to run in each thread.\n int iterations = 1_000_000;\n boolean deadlock = true;\n\n // Create two SimpleQueue's.\n final SimpleQueue<String> aQueue = new SimpleQueue<>();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the ClientConfiguration object associated with the TargetModuleID. | public ClientConfiguration getClientConfiguration(TargetModuleID id); | [
"public ClientConfiguration getConfiguration() {\r\n return this.configuration;\r\n }",
"public ModuleConfiguration getModuleConfiguration() {\n return moduleConfiguration;\n }",
"default Config getClientConfiguration() {\n return Config.autoConfigure(null);\n }",
"public static Client... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Culls the CrimeData being displayed as DataPanes in a ScrollPane. This will allow better performance as only 813 panes will be displayed at once instead of all the data that is active. | public static VBox cullPanes (double height) {
VBox root;
int numData = activeData.size();
if (numData == 0) { // if there is no data to display, we don't want the scroll pane to contain anything
return new VBox();
}
int middle = (int) Math.round(height * (numData - 1... | [
"private void renderContactsList(ArrayList<Usuario> data) {\n VBox content = new VBox();\n\n VBox scrollContactContent = new VBox();\n\n //Define como cancelar botão de janela\n buttonAddConv.setText(\"cancelar\");\n\n //Gambiarra para criar o novo contato.\n Usuario newCon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scale the IStroke, which is represented in window coordinates, into pixels. | protected IStroke scaleStrokeIntoPixels(IStroke stroke) {
List<IPoint> scaledPoints = new ArrayList<IPoint>();
for (int i = 0; i < stroke.getNumPoints(); i++) {
IPoint pt = scalePointIntoPixels(stroke.getPoint(i));
scaledPoints.add(pt);
}
IStroke scaledStroke = new Stroke(stroke);
scaledStroke.... | [
"protected IStroke scaleStrokeIntoCoordinates(IStroke stroke) {\n\t\t\n\t\tList<IPoint> scaledPoints = new ArrayList<IPoint>();\n\t\tfor (int i = 0; i < stroke.getNumPoints(); i++) {\n\t\t\tscaledPoints.add(scalePointIntoCoordinates(stroke.getPoint(i)));\n\t\t}\n\t\t\n\t\tIStroke scaledStroke = new Stroke(stroke);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XAndExpression__Group__0" $ANTLR start "rule__XAndExpression__Group__0__Impl" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4063:1: rule__XAndExpression__Group__0__Impl : ( ruleXEqualityExpression ) ; | public final void rule__XAndExpression__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:4067:1: ( ( ruleXEqual... | [
"public final void rule__XAndExpression__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:5673:1: ( ( ruleXEqu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Call an external service to get some health information about the employee | @Override
public Health getHealthInfo(String id) {
RestTemplate restTemplate = new RestTemplate();
Health healthInfo = restTemplate.getForObject(BASE_URL + HEALTH_STATUS_URL, Health.class, id);
logger.debug("Employee Info :" + healthInfo);
return healthInfo;
} | [
"public String checkHealth()\n throws TapisClientException\n {\n // Make the REST call.\n RespProbe resp = null;\n try {\n // Get the API object using default networking.\n var generalApi = new GeneralApi(_apiClient);\n resp = generalApi.checkHealth();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notifies the local player of a remote player joining the game. | void notifyPlayerJoined(final String player, final String team); | [
"public void joinGame(){\n\t\tsendJoinMsg(ownPlayer);\t\n\t}",
"public void onJoin(PlayerJoinEvent event) {\r\n\t\tPlayer player = event.getPlayer();\r\n\t\t\r\n\t\t//This sends a private message to the player.\r\n\t\tplayer.sendMessage(\"Welcome to the server!\");\r\n\t}",
"public void sendJoiningPlayer() {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get pattern for tenant and port. | public Pattern getPattern(String tenantDomain, int port) {
ConcurrentHashMap concurrentHashMap = dispatchPatternMap.get(tenantDomain);
if (concurrentHashMap != null) {
Object val = concurrentHashMap.get(port);
if (val instanceof Pattern) {
return (Pattern) val;
... | [
"public String getPattern();",
"public final UriPattern getPattern() {\n return pattern;\n }",
"Pattern pattern() {\r\n\t\tArrayList<String> patternSpecs = new ArrayList<String>();\r\n\t\t\r\n\t\tif (delimiters.size() > 0) {\r\n\t\t delimiters.forEach(d -> patternSpecs.add(d.pattern().pattern()));... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end of adding bias This method will initialize weights with randome numbers | public void Initialize ()
{
for (int i=0; i<weightToHidden.length; i++)
for (int j=0; j<weightToHidden[0].length; j++)
weightToHidden[i][j] = myRandom();
// weightToHidden[i][j] =1;
for (int i=0; i<weightToOut.length; i++)
for ... | [
"@Override\r\n\tpublic void initializeWeights()\r\n\t{\r\n\t\tint i, j;\r\n\t\tint num_row, num_col;//number of rows and columns is a weight matrix\r\n\t\tdouble rnd_val;//generated random value\r\n\t\t\r\n\t\tRandom rand = new Random(_seed);\r\n\r\n\t\tnum_row = _weights.getRowDimension();\r\n\t\tnum_col = _... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper Method as a hotfix to resolve a bug that leaves emojis in the story under certain circumstances. | private String varifyStory(String story){
String storyOut = "";
for (String s : story.split(" ")){
if(isEmoji(s) || isExtendedEmoji(s)){
System.out.println("Unfortunately the Story is invalid and needs some fixing..");
storyOut = spliceEmoji(s);
}... | [
"private String spliceEmoji(String pStory){\n List<String> story = new LinkedList<>(Arrays.asList(pStory.split(\" \")));\n List<Integer> indexes = new ArrayList<>();\n List<String> blackList = Arrays.asList(\"the\", \"a\");\n\n boolean hasEmoji = false;\n\n for(String word... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |