query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Function to find the length of the given number | static int letterLength(int n) {
int length = 0;
String[] digits = {"", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
String[] tens = {"", "ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"};
String[] teens = {"ten", "eleven", "twelve", "thirte... | [
"public int getIntegerLength(int n) {\n\n int count = 0;\n while (n != 0) {\n n /= 10;\n count++;\n }\n\n return count;\n }",
"public int getNumberOfDigits()\n\t{\n\t\treturn number.length;\n\t}",
"static int numOfDigits(int num) {\n \tint digits =0;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | [
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home\n Intent intent = new Intent(this, MainMenuCard.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Delete actions older than time milliseconds | public final int gc(long time) {
Iterator<Long> i = liveactions.keySet().iterator();
long ts = System.currentTimeMillis();
int count = 0;
while (i.hasNext()) {
long id = i.next();
if (liveactions.get(id).end > -1 && // Action executed
ts - live... | [
"public void deleteAttemptsOlderThan(String actionName, Instant date);",
"void delete(String[] timeIds) throws Exception;",
"public void deleteTimeSame() {\n\t\t\n\t}",
"@Override\n public void timeOut() {\n sendDelete();\n }",
"public synchronized static void deleteExpired () {\n Enu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ method name is quite self explanatory use this method either every new day or twice a day or more if doctors can treat different patients in a day | public void makeAllDocsAvailable() {
for (Doctor doc : this.doctors) {
doc.setBusy(false);
}
} | [
"public void nextDay()\n {\n \tthis.updateLifeSpan();\n }",
"public void nextDay() \n\t{\n\n\t\tif(this.lifeState == Person.ALIVE && Util.getDeathChance(this.Age) == true) \n\t\t{\n\t\t\t\n\t\t\tdie();\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t\n\t\t\tAge++;\n\t\t\t\n\t\t}\n\t}",
"public void addTreatmen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method sets the Theta component of the Odometer | public void setTheta(double theta) {
synchronized (lock) {
this.theta = theta;
}
} | [
"public void Totaal() {\n float totaal_cur = 0.0f;\n for (int i = 0; i < circle_value.length; i++) {\n totaal_cur += circle_value[i];\n }\n this.totaal = totaal_cur;\n Log.i(TAG, \"Totaal:\" + this.totaal);\n }",
"public void setTheta(double angle){\n this.arrow... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Utility method, creates a key for a date | public static int getKey(Date day) {
Calendar c = Calendar.getInstance();
c.setTime(day);
int key = c.get(Calendar.DATE);
key += c.get(Calendar.MONTH)*100;
key += c.get(Calendar.YEAR)*10000;
return key;
} | [
"public static String createRowKey(final Date date) {\n return String.format(\"%025d\", date.getTime());\n }",
"public SearchKey(final Date value) {\n this.type = AtomicKeyType.DATE;\n this.size = Long.BYTES;\n this.values = new Date[]{value};\n }",
"String getKey(MetaData metaData){\n M... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ / public method | public void ClearDbEx() {
if (actionStateDb.get() == PlayList.DB_ACTION_CLOSE)
return;
getExecutor().execute(new Runnable() {
@Override
public void run() {
Clear_();
... | [
"@Override\n }",
"@Override\n public void extornar() {\n \n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\r\n public void publicando() {\n }",
"protected void method_5557() {}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Ov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a string at a specific path | public String getString(String path) {
Object object = get(path);
if (object instanceof String) {
return (String) object;
}
return null;
} | [
"String getStringPath();",
"String get(String path, Integer pos){\n\t\tTreeMap map = (TreeMap)pathMaps.get(path);\n\t\tEntry e = getClosest(map,pos);\n\t\treturn e == null ? null : (String)e.getValue();\n\t}",
"public String get(String path) throws MalformedURLException, IOException\n\t{\n\t\treturn getUrl(new ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/WebDriverWait wait = new WebDriverWait(driver, 30); return wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("amount"))).getText().substring(1); | public String captureAmount() {
return captureAmount(orderSummaryPageProperties.getValue("captureAmount"), true);
} | [
"public static void verifyAmountDueHeader(WebDriver driver) {\n FindElement.waitForElementXpath(driver,\"//span[text() = 'Amount Due']\",\"Billing page - Amount due Header\");\n }",
"@Then(\"^I do the Update Price Check$\")\npublic void i_do_the_update_price_check() throws Throwable {\ndriver.manage().t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to test Depth First Search Algorithm | @Test
public void testDFS() {
/* Create nodes for the graph */
DFSGraphNode<String> nodeA = new DFSGraphNode<>("A");
DFSGraphNode<String> nodeB = new DFSGraphNode<>("B");
DFSGraphNode<String> nodeC = new DFSGraphNode<>("C");
DFSGraphNode<String> nodeD = new DFSGraphNode<>("D");
DFSGraphNode<String> nodeE =... | [
"private void depthSearch() {\n\t\t// TODO\n\t}",
"int searchDepth();",
"@Test\n public void testTraversalVariableDepth() {\n\n TestNode root = new TestNode(\"root\");\n root.addNode(new TestNode(\"0\"));\n \n TestNode node1 = new TestNode(\"1\");\n root.addNode(node1);\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtain attribute name for stop words | public static String getTranslationsCountAttributeName(WSContext context) throws IOException {
if (!_initiated) {
init(context);
} else {
refresh(context);
}
return _translatorsCountAttributeName;
} | [
"KEYWORD getKeywords();",
"public void allStopWords() {\r\n stopWords.add(\"a\");\r\n stopWords.add(\"a's\");\r\n stopWords.add(\"able\");\r\n stopWords.add(\"about\");\r\n stopWords.add(\"above\");\r\n stopWords.add(\"according\");\r\n stopWords.add(\"accordingly\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a short description of the servlet. | @Override
public String getServletInfo() {
return "Short description";
} | [
"public String getServletInfo()\n {\n return \"Short description\";\n }",
"public String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}",
"public String getServletInfo()\r\n {\r\n\treturn \"Short description\";\r\n }",
"@Override\n public String getServletInfo() {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Autogenerated main method to display this JDialog | public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame frame = new JFrame();
InstanceDetailsDialog inst = new InstanceDetailsDialog(frame);
inst.setVisible(true);
}
});
} | [
"public void showDialog ( ) { _frame.setVisible(true); }",
"protected void showDialog() {\n\t\tpack();\n\n\t\tsetLocationRelativeTo(location);\n\t\tsetVisible(true);\n\t}",
"public JDialog()\n\t\t{\n\t\t\t_box.getChildren().add(_title);\n\t\t\t_box.getChildren().add(_questions);\n\n\t\t\tgetDialogPane().setCont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update double sparse data to double sparse row. | public abstract void updateDoubleSparseToDoubleSparse(ByteBuf dataBuf, ServerSparseDoubleRow row); | [
"public void set(SparseDoubleMatrix1D vector)\n {\n IntArrayList indices = new IntArrayList();\n DoubleArrayList values = new DoubleArrayList();\n\n vector.getNonZeros(indices, values);\n\n set(indices.elements(), values.elements(), vector.size());\n }",
"@Test public void te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Required Passes: C299,C307,C318 Element Tested: Intracurrency Correlation (Same Sign Pos) Risk Measure: Vega & Curvature Group: Rates & Fx | @Test
public void testC325() {
List<FixedAmount> fixed = Collections.emptyList();
List<NotionalFactor> factors = Collections.emptyList();
List<Notional> notional = Collections.emptyList();
List<ProductMultiplier> multipliers = Collections.emptyList();
List<Sensitivity> sensitivities = Arrays.asLis... | [
"@Test\n public void presentValueNoConvexityAjustment() {\n double mqExpected = MQ_3M_CAL[2]; // Dec 14 price\n double pvExpected = (mqExpected - LAST_MARGIN_PRICE_ERZ4) * NOTIONAL * FUTURE_FACTOR * QUANTITY_ERZ4;\n MultiCurrencyAmount pvComputedDsc = ERZ4_TRA.accept(PVDC, MULTICURVE_DSC);\n assertEqua... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new address Accepts as the parameter format: name "mydb" <host>/name "127.0.0.1/mydb" <host>:<port>/name "127.0.0.1:8080/mydb" | public DBAddress(String urlFormat) throws UnknownHostException {
super(_getHostSection(urlFormat));
_check(urlFormat, "urlFormat");
_db = _fixName(_getDBSection(urlFormat));
_check(_host, "host");
_check(_db, "db");
} | [
"abstract public NetAddress createAddress( MessageHandler handler);",
"public void createAddress(String name) {\n\t\taddress.clear();\n\t\taddress.sendKeys(name);\n\t\tWaitTool.waitForJQueryProcessing(driver, 5);\n\t\taddressBtn.click();\n\t\tWaitTool.waitForJQueryProcessing(driver, 5);\n\t}",
"public abstract ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Este metodo compueba que vertices y caras referencian aristas existentes | public String checkReferencial() {
Vertice3d v;
Triangulo3d t;
NodoArista n;
boolean flag;
// En primer lugar comprueba que todo vertice referencia
// a una arista que esta en el cierre
ListIterator iter1 = vertices.listIterator();
ListIterator iter2;
while (iter1.hasNext()) {
v = (Vertice3d) ... | [
"private void computeVertexReferences()\n \t{\n \t\tlogger.debug(\"Compute vertex references\");\n \t\t// For each topological vertex, compute the list of\n \t\t// MNode1D objects which are bound to this vertex.\n \t\tBCADGraphCell root = model.getGraph().getRootCell();\n \t\tint nVertex = 0;\n \t\tfor (Iterator ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called when creating the sign in as a client window. | @FXML
void initialize() {
assert signInClientButton != null : "fx:id=\"signInClientButton\" was not injected: check your FXML file 'signInAsAClient.fxml'.";
assert inEmailClientTxt != null : "fx:id=\"inEmailClientTxt\" was not injected: check your FXML file 'signInAsAClient.fxml'.";
assert i... | [
"public void clientSignedIn() {\n\t\tthis.logout.setEnabled(true);\n\t\tthis.startAsServerMenuItem.setEnabled(false);\n\t\tthis.startAsClientMenuItem.setEnabled(false);\n\t\tthis.mf.setTitle(\"AOL Messenger - connected as \\'\" + mf.getUsername() + \"\\'\");\n\t}",
"protected void showLoginWindow(){\n\t\tshowLogi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Collapses all nodes of the tree. | void collapseAll(); | [
"private void collapseTree() {\n\t\tint row = _ontoTree.getRowCount() - 1;\n\t\twhile (row >= 0) {\n\t\t\t_ontoTree.collapseRow(row);\n\t\t\trow--;\n\t\t}\n\t}",
"private void collapseTree() {\n int row = trClusters.getRowCount() - 1;\n while (row > 0) {\n trClusters.collapseRow(row);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the estimated upload speed in KILOBITS/s [sic] of the next transfer, assuming the client (i.e., downloader) has infinite bandwidth. Returns 1 if not enough data is available for an accurate estimate. | public int measuredUploadSpeed() {
//Note that no lock is needed.
return highestSpeed;
} | [
"public int getMaxUploadSpeed(){\n return megaApi.getMaxUploadSpeed();\n }",
"public long getTransferRate() {\n long time = (System.currentTimeMillis() - _startTime) / 1000;\n if (time <= 0) {\n return 0;\n }\n return getProgress() / time;\n }",
"java.lang.Str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public static void main(String[] args) {
thisDemo cd = new thisDemo();
cd.getData();
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ / / / / / | public String getName() {
/* 348 */ return this.fName;
/* */ } | [
"private void calculatePaths() {\n\n\n }",
"public static void main (String arg[]){\n\tSystem.out.println(\" ( ) ( ( \"); \n\n\tSystem.out.println(\" ( )\\\\ ) ( /( ( )\\\\ ) ( )\\\\ ) \");\n\t\n\tSystem.out.println(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the bytes representing the given serialized object. Original Source: net.spy.memcached.transcoders.BaseSerializingTranscoder | public byte[] serializeToByteArray(final Object o) {
if (o == null) {
return null;
}
byte[] rv = null;
ByteArrayOutputStream bos = null;
ObjectOutputStream os = null;
try {
bos = new ByteArrayOutputStream();
os = new ObjectOutputStream(bos);
os.writeObject(o);
os.close();
os = null;
rv... | [
"com.google.protobuf.ByteString getBytesObj();",
"byte[] serialize(T object);",
"byte[] toStream() throws OSerializationException;",
"public static byte[] getSerializedObject(Object o) throws IOException {\r\n ByteArrayOutputStream ba = new ByteArrayOutputStream();\r\n ObjectOutputStream p = new... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A measure of how quickly your page loads after clicks on your mobile ads. The score is a range from 1 to 10, 10 being the fastest. optional int64 speed_score = 147; | boolean hasSpeedScore(); | [
"public int performanceMeasure(Agent a) {\r\n \tAgentBody body = a.body;\r\n \tVector p = (Vector) a.percept;\r\n \tPoint e = new Point(a.body.loc.x, a.body.loc.y);\r\n \tif(a.coord.add(e) == false) a.repeat++;\r\n \tif (p.elementAt(0) == \"bump\") a.bumps++;\r\n \tif (step == 200) a.reach = 1; \r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates code from tokens created by delimiter parser Special syntax includes: +, , ., ^, & This code gets messy but hopefully the comments should help anyone who wants to understand it. I am trying to document my code more and better. | ParserGenerator( List<Token> tokens, boolean removeNull ) {
/*Create StringBuilder with proper starting things and store tokens. If the whole thing is wrapped with
* a start or end char, we use an initializer with no for loop. Boolean usingFor tells resetCode whether we
* are going to reset x t... | [
"public interface Lexer {\n /** Token returned by the scanner to signal the end of its input. */\n public static final int EOF = 0;\n\n/* Tokens. */\n /** Token number,to be returned by the scanner. */\n static final int COMMENT = 258;\n /** Token number,to be returned by the scanner. */\n sta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
static Object host; / Setup synthesis. | public LiveOutput()
{
} | [
"@Before\n public void setUp() {\n osc1 = new SineOscillator();\n osc1.frequency.set(345.0);\n osc1.amplitude.set(0.6);\n synth.add(osc1);\n\n sequencer = new ASequencer(synth);\n osc1.output.connect(sequencer.getGatePort());\n synth.start();\n }",
"private v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column public.crd_executed.collect_time | public Date getCollectTime() {
return collectTime;
} | [
"public BigDecimal getRunTime() {\r\n return runTime;\r\n }",
"public Long getExecutionTime();",
"public double get_execution_time(){\n\t\treturn this.execution_time;\n\t}",
"public long getExecuteTime() {\n\t\treturn executeTime;\n\t}",
"@java.lang.Override\n public com.google.protobuf.Timestamp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set listener for action item clicked. | public void setOnActionItemClickListener(OnActionItemClickListener listener) {
mItemClickListener = listener;
} | [
"private void setItemOnClickListener(View v, final ActionEvent actionEvent) {\n v.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onItemClick(actionEvent);\n }\n });\n }",
"@Override\n\t\t\t\tpublic void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /planetas : get all the planetas. | @GetMapping("/planetas")
@Timed
public ResponseEntity<List<Planeta>> getAllPlanetas(@ApiParam Pageable pageable) {
log.debug("REST request to get a page of Planetas");
Page<Planeta> page = planetaRepository.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHea... | [
"@RequestMapping(method = RequestMethod.GET)\n public ResponseEntity findAll() {\n\n PlanetResponse planetResponse = new PlanetResponse();\n\n try {\n List<Planet> planetList = planetService.findAll();\n if(planetList.isEmpty()){\n planetResponse.setDescription(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by ron on 9/30/2018. | public interface StoreMvpView extends MvpView {
//void openMainActivity();
} | [
"@Override\n public void extornar() {\n \n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n }",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n public int utilite() {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
////////////////////////////////////////////////////////// GetRoutingSuffix Method to retrieve the 4 or 5 character URSA routing suffix ////////////////////////////////////////////////////////// | public String GetRoutingSuffix()
{
return RoutingSuffixGet(m_contextIndex);
} | [
"protected abstract String suffix();",
"public static String getFuelFileNameSuffix()\r\n/* 94: */ {\r\n/* 95: 89 */ return fuelFileNameSuffix;\r\n/* 96: */ }",
"public final String getValidationNameSuffix()\n {\n String validationNameSuffix1a = this.validationNameSuffix1a;\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .google.protobuf.StringValue currency = 7 [json_name = "currency"]; | public java.util.List<com.google.protobuf.StringValue.Builder>
getCurrencyBuilderList() {
return getCurrencyFieldBuilder().getBuilderList();
} | [
"java.util.List<? extends ai.visma.ssn.type.CandidateOrBuilder> \n getCurrencyOrBuilderList();",
"com.aldren.wallet.grpc.MoneyOrBuilder getMoneyOrBuilder();",
"com.bol.protojx.xsdtypes.ProtoMessage.Decimal.Value getValue();",
"com.ubbcluj.amcds.myDalgs.communication.Protocol.ValueOrBuilder getValueOrBuil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to return the type of the pizza | public String getCrustType()
{
return crustType.getCrustName();
} | [
"public String getType() {\n\t\treturn pizza.getType();\n\t}",
"public final String getPizzaType(){\n\t\tString type = (String) this.Pizza.get(3);\n\t\treturn type;\n\t}",
"@Override\n public String getFoodType() {\n return TYPE;\n }",
"@Override\n\tPizza createPizza(String type) {\n\t\tif( type.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a sorted list of gradeRangeItems using GrItemComparator. NOTE: gradeRange values that do not have a corresponding GradeRangeItem are ignored. | public List makeSortedGRList(String[] values) {
List sorted = new ArrayList();
for (int i = 0; i < values.length; i++) {
GradeRangeItem grItem = getGradeRangeItem(values[i]);
if (grItem != null)
sorted.add(grItem);
}
Collections.sort(sorted, new GrItemComparator());
showList(sorted, "sorted");
ret... | [
"public List<KVPair<K,V>> range(K start, K end) {\n sort.clear();\n result.clear();\n helperForRange(root);\n for (int i = 0; i < sort.size(); i++){\n if(sort.get(i).key.compareTo(start)>=0 \n && sort.get(i).key.compareTo(end)<=0)\n result.add(sor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test to reduce the credits of an existing organisation. | @Test
public void testReduceCredits() throws InvalidValueException, UnknownDatabaseException {
int decreasedAmount = -20;
adminAccount.updateCreditAmount(standardOrganisation, decreasedAmount);
int newAmount = dataSource.getCredits(standardOrganisation);
assertEquals(standardOrganisa... | [
"@Test\n\tpublic void creditoIncorrectoAsignatura() {\n\t\tint NUM_REGISTRATION = 1;\n\t\tDegreeCourse degreeCourse = new DegreeCourse(INCORRECT_DEGREE_COURSE, NUM_REGISTRATION);\n\t\tdegreeCourse.getCredits();\n\t}",
"@Test\n public void testGetNextYearUsesSameContributionInCalculations() {\n SavingsYe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the last post | public Post getLastPost() {
return lastPost;
} | [
"public void setLastPost(Post lastPost) {\n this.lastPost = lastPost;\n }",
"private Long getLastPostedDate(List<Message> response) {\n Long lastPostedDate = 0L;\n\n for (Message responseMessage : response) {\n // Get last posted date\n lastPostedDate = Math.max(lastPostedDate, respons... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
never need to // block | @Override
public void put(E e) throws InterruptedException {
offer(e, DEFAULT_MAX_TIMEOUT, TimeUnit.MILLISECONDS);
} | [
"protected void block() \n\t{\n\t\tblock(this.block);\n\t}",
"abstract public void blockade();",
"default boolean isLoopBlock() {\n return false;\n }",
"public void collectBlock() {\r\n\t\tcaptureBlock = true;\r\n\t\tdone = false;\n\t}",
"void beginBlock();",
"@Override\n synchronized public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Must be private to ensure integrity of the singleton pattern | private GameColors() {
} | [
"private SingletonDesignDemo(){}",
"private Singleton() {\r\n\r\n }",
"private Singleton() {\r\n }",
"private SingletonExample() {\n\t\tsuper();\n\t}",
"public Singleton() {\n super();\n }",
"private Singleton() {\n\n }",
"private ThreadSafeSingletonUsingStaticMethod() {}",
"private... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
don't display last item. It is used as hint. | @Override
public int getCount() {
int count = super.getCount();
return count > 0 ? count - 1 : count;
} | [
"@Override\r\n\tpublic void onLastItemVisible() {\n\t\tint nextPage = currentPage+1;\r\n\t\tloadData(nextPage,1);\r\n\t}",
"private void showNoItemText() {\n mSwipeRefreshLayout.setRefreshing(false);\n mNoItemText.setVisibility(View.VISIBLE);\n mErrorMessageDisplay.setVisibility(View.INVISIBL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add the API and builds a client | private void buildGoogleApiClient() {
mGoogleApiClient = new GoogleApiClient.Builder(LocationService.this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(LocationServices.API)
.addApi(ActivityRecognition.API)
... | [
"void newClient(String clientId, ClientAPI api);",
"protect buildAPIClient();",
"private void init() {\n ApiClient apiClient = new ApiClient();\n String path = node.getAttribute(\"url\").getString();\n client = apiClient.setBasePath(path);\n api = new MangoDSLApi(client);\n cl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Just print cost and detection rate, with a few decimal digits | public String toShortString() {
return "("+fmt.format(c)+" "+fmt.format(d)+")";
} | [
"private void showIterationCost(int iteration, double cost, double rate) {\n\t\tSystem.out.println(\"Iteration:\\t\" + iteration + \"|Cost:\\t\" + cost + \"|rate:\\t\" + rate);\n\t}",
"public void print() {\n double usd = euros *rate;\n System.out.printf(\"%.2f euros at an exchange rate of %.5f is\\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 room_id = 2; optional int32 room_id = 2; | boolean hasRoomId(); | [
"public String getRoomID() { return roomID; }",
"public Integer getRoomId() {\n\t\treturn room_id;\n\t}",
"public int getRoomNumber() {return room.getRoomNumber();}",
"public String getRoomId() {\n return roomId;\n }",
"public long getRoomId() {\n return this.roomId;\n }",
"private void setr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saves data array of map ids to file. | public static void saveToFile(String file, int[][] data) {
try {
File mapFile = new File(App.getMapFolderFile().getAbsolutePath() + file);
if (!mapFile.exists()) {
if (!mapFile.createNewFile()) {
throw new IOException("Cannot create file: " + mapFile.g... | [
"private void save() {\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(uuidMapFile));\n\n for (String name : nameToUUID.keySet()) {\n writer.write(name + \" \" + nameToUUID.get(name) + \"\\n\");\n }\n writer.flush();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used by DatumReader. Applications should not call. | @SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: course_id = (java.lang.Long)value$; break;
case 1: course_title = (java.lang.CharSequence)value$; break;
case 2: average_rating = (java.lang.Double)value$; break;
case 3: count_rev... | [
"@Override\n public void readData(DataReader dr)\n {\n }",
"@Override\n\tvoid readSpecificData() {\n\t\t\n\t}",
"@Override\r\n\t\tprotected void getData() {\n\r\n\t\t}",
"@Override\r\n protected Data<?> getData() {\n return null;\r\n }",
"protected void read() {\n\t}",
"@Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches necessary data and initializes the variables | public Report(int reportid) throws ClassNotFoundException, SQLException {
Db db = new Db();
db.connect();
ResultSet rs = db.executeQuery("SELECT * FROM " + t_name + " WHERE REPORTID = " + reportid);
rs.next();
this.reportid = reportid;
this.title = rs.getString("TITLE");
this.description = rs.getStr... | [
"private static void setupInitialData() {\n\t\tClassBLL.getInstance().findAll();\n\t\tClassRoomBLL.getInstance().findAll();\n\t\tGradeBLL.getInstance().findAll();\n\t\tPeriodBLL.getInstance().findAll();\n\t\tSchoolBLL.getInstance().findAll();\n\t\tSubjectBLL.getInstance().findAll();\n\t\tUserBLL.getInstance().findA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests null template arg to applyTemplate. | public void testApplyTemplate5Null7() {
try {
generator.applyTemplate((XsltTemplate) null, (String) null, (StringWriter) null);
fail("Did not fail.");
} catch (IllegalArgumentException e) { /* expected */
} catch (Exception e) {
fail("wrong exception" + e.toSt... | [
"public void testSetTemplate() {\n XsltTemplate test = new XsltTemplate();\n\n try {\n test.setTemplate(null);\n fail(\"Did not fail.\");\n } catch (IllegalArgumentException e) { /* expected */\n } catch (Exception e) {\n fail(\"Wrong exception - \" + e.t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ A function use to show dialog on screen when ended game | private void showWinnerDialog() {
try {
if (countDownTimer != null) {
countDownTimer.cancel();
}
final android.app.AlertDialog.Builder dialog1 = new android.app.AlertDialog.Builder(this);
LayoutInflater inflater = (LayoutInflater) getSystemServ... | [
"private void openFinalDialog() {\n\t\tnew AlertDialog.Builder(gameView.getContext())\n\t\t\t.setTitle(R.string.game_over_label)\n\t\t\t.setMessage(R.string.game_over_message)\n\t\t\t.setPositiveButton(R.string.again_label, \n\t\t\t\t\tnew DialogInterface.OnClickListener() {\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
your code goes here | public static void main (String[] args) throws java.lang.Exception
{
int n=fs.nextInt();
for(int i=0;i<n;i++){
int test=fs.nextInt();
String a=fs.next();
String b=fs.next();
String c=fs.next();
int shift= b.charAt(0)-a.charAt(0);
... | [
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n }",
"@Override\n public void cammina() {\n \n }",
"@Override\r\n\tvoid strech() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n public void extornar() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Localisation Localisation' containment reference. If the meaning of the 'Localisation Localisation' containment reference isn't clear, there really should be more of a description here... | TypeLocalisation getLocalisationLocalisation(); | [
"public String getLocalisation() {\n\t\treturn localisation;\n\t}",
"public Localization getLocalization() {\n return localization;\n }",
"private String getLocalValue() {\n\t\tObject node = section.getElement().getValue();\n\t\tif (node instanceof APropertyNode) {\n\t\t\tAPropertyNode pholder = getPr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Exports all Vempprojacts matching the given input query to the given exportType format. Note: Go through the documentation for query syntax. | Downloadable export(ExportType exportType, String query, Pageable pageable); | [
"private void export(String input){\n assert(invariant());\n System.out.println(\"Exporting....\");\n ExportVisitor ev = new ExportVisitor();\n for(Address adr : search.getAddressResults())\n adr.accept(ev);\n for(Group g : search.getGroupResults())\n g.accep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by wangshirui on 16/9/10. | public interface CompleteUserInfoView extends HHBaseView {
/**
* ๆพ็คบไฟกๆฏ
*
* @param message
*/
void showMessage(String message);
/**
* ๆฟๆดปๆๆๆ้ฎ
*/
void enableButtons();
/**
* ็ฆ็จๆๆๆ้ฎ
*/
void disableButtons();
/**
* ่ทณ่ฝฌๅฐ้ฆ้กต
*/
void navigateToHo... | [
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets settings button enabled value to selected state. | public void setSettingsBtnStatus(boolean isActive)
{
btnSettings.setEnabled(isActive);
} | [
"protected void setControlsEnabled() {\n if (_useProjectSettingsButton != null) {\n _overlayStore.setProjectSettings(_useProjectSettingsButton.getSelection());\n }\n updatePreferenceStore();\n }",
"private void setEnabled(boolean isEnabled) {\n\t\tif (getButton(IDialogConstants.OK_ID) != null) {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string content = 2; | public Builder clearContent() {
content_ = getDefaultInstance().getContent();
onChanged();
return this;
} | [
"char getContent(){\n return content;\n }",
"public void setContent( String c ){ content = c; }",
"@Override\n\tpublic Integer part1() {\n\t\tString s = getContent();\n\t\ts = react(s.trim());\n\t\tSystem.out.println(s.length());\n\t\treturn s.length();\n\t}",
"public String getContent(){ return con... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test if 2 objects are equals by means of the names of their current active layers | boolean equals(ExternalObjectDescription d) {
// System.out.println("Comparing "+nombre+" with "+d.nombre);
if (name == null && d.name == null) {
return true;
}
if (name[Layer.layerActivo] == null && d.name[Layer.layerActivo] == null) {
return true;
... | [
"@Override\n public boolean equals(Object obj)\n {\n //TODO Dieses equals wird 10000 mal aufgerufen\n if (obj instanceof WMSServiceLayer)\n {\n WMSServiceLayer tester = (WMSServiceLayer) obj;\n return (getName() + getGetMapPrefix() + getLayersString(wmsLayers) + getStylesString(wmsLayers... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PowerExpr__Group__0" $ANTLR start "rule__PowerExpr__Group__0__Impl" InternalAgreeParser.g:18269:1: rule__PowerExpr__Group__0__Impl : ( ruleUnaryExpr ) ; | public final void rule__PowerExpr__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalAgreeParser.g:18273:1: ( ( ruleUnaryExpr ) )
// InternalAgreeParser.g:18274:1: ( ruleUnaryExpr )
{
// Intern... | [
"public final void rule__NumericalUnaryExpression__Group_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.yakindu.sct.statechart.expressions.ui/src-gen/org/yakindu/sct/statechart/ui/contentassist/antlr/internal/InternalExp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ access modifiers changed from: private | public synchronized boolean attachToGLContext(int i) {
if (this.mSurfaceTexture == null) {
this.mThread = new Thread(this);
this.mThread.start();
while (this.mSurfaceTexture == null) {
try {
wait();
... | [
"@Override\n }",
"protected void method_5557() {}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n public void publicando() {\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"private InternalReflect() {\n\t\t\t// do nothing\n\t\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public boolean canFly() {
return true;
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodos Get y Set | public int getCodigo(){
return this.codigo;
} | [
"public T getY() {\n\t\treturn ((T) getValues().get(1));\n\t}",
"public void setY(Y newY);",
"public double getY() {\n return ycoor;\n }",
"public int getY() { return y ; }",
"public T getY()\n {\n\t return yCoordinate;\n }",
"public double getY()\n {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new views (invoked by the layout manager) | @NonNull
@Override
public MyViewHolder onCreateViewHolder(ViewGroup viewGroup,
int viewType) {
// create a new view
Context context = viewGroup.getContext();
int layoutIdForListItem = R.layout.my_text_view;
LayoutInflater inflater = Layo... | [
"private\n void\n createViews()\n {\n itsViews = new View[ViewKeys.values().length];\n\n getViews()[BUDGETS.ordinal()] = new BudgetsView();\n getViews()[HOME.ordinal()] = new HomeView();\n getViews()[REGISTER.ordinal()] = new RegisterView();\n getViews()[TOTALS.ordinal()] = new TotalsView();\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027; | public com.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigOrBuilder
getPreconfiguredWafConfigOrBuilder() {
if (preconfiguredWafConfigBuilder_ != null) {
return preconfiguredWafConfigBuilder_.getMessageOrBuilder();
} else {
return preconfiguredWafConfig_ == null
... | [
"@Override\n protected PreprocessingConfig getPreprocessingConfig() {\n PreprocessingConfig config = super.getPreprocessingConfig();\n config.put(TargetEncoding.CONFIG_PREPARE_CV_ONLY, aml().isCVEnabled());\n return config;\n }",
"public Patch set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO::Call touda user service | @Override
public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
return callToudaUserValidation(s);
} | [
"@Override\n public void getUser() {\n bUser = DatabaseId.getCurrentUser();\n }",
"UserInfo getUser();",
"public void user() {\n\t\t\n\t}",
"public void mo91712c(User user) {\n }",
"public UserIF getUser();",
"public void mo91717d(User user) {\n }",
"private void getUser() {\n\t\tsend = new T... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Auto generated method signature for Asynchronous Invocations | public void startsetAssistFlag(
com.mingdasoft.SetAssistFlag setAssistFlag8,
final com.mingdasoft.ServiceMainCallbackHandler callback)
throws java.rmi.RemoteException; | [
"@Override\n public void asyncRpc(Method arg0) throws IOException {\n \n }",
"@Async\n\t@Override\n\tpublic Future<String> asyncMethodWithVoidReturnType() throws InterruptedException {\n\t\tThread.sleep(2000L);\n//\t\tSystem.out.println(\"Execute method asynchronously. \" + Thread.currentThread().getName());... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates whether the content is available if it's update | public void validateContentOnUpdate(FacesContext context, UIComponent comp, Object value) throws ResourceAppException {
String contentId = (String) value;
if(contentId == null || contentId.trim().equals("")) {
return;
}
contentId = contentId.trim();
YouTubeDo... | [
"public void checkUpdate() {\n\t\tgetServerValues();\n\t}",
"private Boolean checkChanged() {\n\n if (!DataManager.isNetworkAvailable(this)) {\n return false;\n }\n\n load(true);\n if(changeTask.getStatus().equals(Task.TaskStatus.BIDDED)) {\n return true;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool record_timeline = 3; | boolean getRecordTimeline(); | [
"public boolean isRecording(){ return recording; }",
"public boolean isRecording() { return _sndRec.isRecording(); }",
"boolean getReplay();",
"public static void setRecord(boolean record){\n m_record = record;\n \n }",
"public void setReplay(boolean bool){\n this.replay = bool;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
btAltaArticulos = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
... | [
"public StForm() {\n initComponents();\n }",
"public CineForm() {\n initComponents();\n }",
"public javaform() {\n initComponents();\n }",
"public EditDemographicForm() {\n initComponents();\n }",
"public FightForm() {\n initComponents();\n }",
"public For... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Execute the task, task must be of Runnable type. | public synchronized void execute(Runnable task) throws Exception {
if (this.poolShutDownInitiated)
throw new Exception("ThreadPool has been shutDown, no further tasks can be added");
/*
* Add task in sharedQueue,
* and notify all waiting threads that task is available.
... | [
"@Override\n\tpublic void executeTask(DcTask task) {\n Thread thread = new Thread(task);\n thread.start();\n\t}",
"public void execute(Task task) {\n try {\n // If executor have already shutdown, the event is directly run in the current thread\n // itself, which generall... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the conditions collection for the "where" clause, usually needed to add/remove/change a condition of the "where" clause e.g.: query.where().addAnd("p.salary = :salary").addOr("p.startDate >= :startDate") | public ConditionsClause<E> where() {
queryChanged();
return conditions;
} | [
"private Map<String, String> getWhereConditionParameters() { Parameters: see which ones are defined in the SQL\n //\n Map<String, String> conditionParameters = new HashMap<>();\n if ( sql.getWhereCondition() != null ) {\n extractConditionParameters( sql.getWhereCondition().getCondition(), cond... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ write weights as .CSV file (each weight separated by a comma, each line a perceptron) Parameter: networkFilename the prefix of the filename | public void printToFile(String networkFilename){
try {
BufferedWriter bw = new BufferedWriter(new FileWriter(networkFilename+".csv"));
System.out.println("Writing weights to "+networkFilename+".csv");
//first two lines are the number of perceptrons and the number of weights
bw.write(weights.length+"\... | [
"public void saveWeights()\n\t{\n\t\ttry( PrintWriter out = new PrintWriter( this.filePath + this.saveFile ) ){\n\t\t\tString networkDescriptionString = \"\";\n\t\t\tfor(int i = 0; i < networkDescription.length; i++)\n\t\t\t{\n\t\t\t\tnetworkDescriptionString += networkDescription[i] + \" \";\n\t\t\t}\n\t\t\t\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
a new job proposal has been sent out that I need to evaluate if I can run it | public void processRequest(JobProposal req) {
// if leader receives this, it forwards it to other nodes
// otherwise it generates a random msg
// if leader is not present, then block
if (ElectionManager.getInstance().leaderDown()) {
// block
}
if (ElectionManager.getInstance().isLeader()) {
for (Hear... | [
"void reviewAnnouncedJobs();",
"@Override\n public int selectJob() {\n System.out.println(\"Selecting job by PBS PRO...\");\n ResourceInfo r_cand = null;\n int scheduled = 0;\n\n // we go through all queues according to their priority\n for (int q = 0; q < Scheduler.all_queue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the type of this content object. The nature must be set before. | public void setType (int type)
throws IllegalArgumentException, IllegalStateException
{
if ( this.nature == Nature.UNDEFINED )
throw new IllegalStateException("Nature must be set before type");
if ( this.nature == Nature.DOCUMENT )
{
if ( !DocType.exists(type) )
throw new Il... | [
"public void setType (foo.cms.entity.main.ContentType type) {\n\t\tthis.type = type;\n\t}",
"@Override\n public void setContentType(String type)\n {\n }",
"public void setType(Type type) {\r\n\t\tthis.type = type;\r\n\t\tupdateStyle();\r\n\t}",
"public void setType(Type type) {\n mType = type;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string email = 3; optional string email = 3; | boolean hasEmail(); | [
"public void setEmail(String email)\r\n/* 470: */ {\r\n/* 471:484 */ this.email = email;\r\n/* 472: */ }",
"public void setEmail(Email email) {\n \tthis.email = email;\n}",
"public void setEmail(String email) {\r\n this.email = email;\r\n}",
"public void setEmail(String email){\r\n thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A method for building a Glide request for svg decoding. | private GlideRequest<PictureDrawable> buildSvgRequest(){
return GlideApp.with(context)
.as(PictureDrawable.class)
.placeholder(R.drawable.test_image)
.listener(new SvgSoftwareLayerSetter());
} | [
"String getSVG(int speed, String x, String y, String w, String h);",
"public SVGDocument parseSvg(String filedescr) {\n Document doc;\n try {\n String parser = XMLResourceDescriptor.getXMLParserClassName();\n SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the Schema Service | public void init( DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg ) throws NamingException
{
if ( IS_DEBUG )
{
log.debug( "Initializing SchemaService..." );
}
nexus = factoryCfg.getPartitionNexus();
registries = factoryCfg.getRegist... | [
"public DefaultSchema() {\r\n\r\n }",
"protected void init() {\n if (_isInited) {\n return;\n }\n synchronized (AppModuleServiceImpl.class) {\n if (_isInited) {\n return;\n }\n try {\n SDOHelper.INSTANCE.defineSchema(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create and show a simple notification containing the received FCM message. | private void sendNotification(String messageBody) {
Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_stat_ic_notification)
.setContentTitle("FCM Message")... | [
"private void showNotification(String message) {\n\n /*Intent i = new Intent(this,MainActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this,0,i, PendingIntent.FLAG_UPDATE_CURRENT);\n\n android.support.v4.app.Notifi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Methods used to convert the model object into structs and call the service. | public void createElementsForGroup(long groupKey, List<GroupElementModel> newGroupElements)
throws SystemException, TransactionFailedException, CommunicationException, AuthorizationException, DataValidationException
{
ElementEntryStruct[] newElements = new ElementEntryStruct[newGroupElements.siz... | [
"public interface IDataApiService {\n\n Model talent_distribution_city(String url, JSONObject params, String time, Integer type);\n\n Model talent_distribution_func(String url, JSONObject params, String time, Integer type);\n\n Model talent_city_flow_in_top(String url, JSONObject params, String time, Integ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
prints out all the passive abilitys contained within the ability list | public void printPassiveAbilitys()
{
for(Ability ability : abilityList){
if(!ability.getActive()){
System.out.println(ability.getName());
System.out.println("----------------");
System.out.println(ability.getDescription());
if(ability.getActive()){
if(ability.getOffensive()){
System.out... | [
"public LinkedList<Ability> getAbilities() {\n return abilities;\n }",
"public Collection<Ability> getAll();",
"public ArrayList<String> getAbilities() {\n return new ArrayList<>(this.abilities);\n }",
"public void showAbs() {\n\t\tSystem.out.println(\"+++++++++++++++++++++++++++++++++++++... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a polar point into a cartesian point for mapping a polygon onto the 3Dlooking globe. | public final void polarToCart(double lon, double lat, int x, int y)
{
// Orthographic projection
x = _cenX + (int)Math.floor(_radius.get(_zoom) * Math.cos(lat) * Math.sin(lon - _cenLon));
y = _cenY + (int)Math.floor(_radius.get(_zoom) * (Math.cos(_cenLat) * Math.sin(lat) - Math.sin(_cenLat) * Math.cos(lat) * Math.co... | [
"protected PolarPoint cartesianToPolar(double x, double y) {\n double theta = Math.atan2(y,x);\n double radius = Math.sqrt(x*x+y*y);\n return new PolarPoint(theta, radius);\n }",
"Point toCartesian(int r, int angle) {\n double theta = Math.toRadians(angle);\n int x = (int)(r ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void actionPerformed(ActionEvent e) {
System.out.println("Job: " + e.getActionCommand()); //new window or whatever
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
height of subtree TODO implement the node class here | public AVLNode(String key, String value) {
this.key = key;
this.value = value;
left = null;
right = null;
height = 0;
} | [
"public int getTreeHeight();",
"public int treeHeight()\r\n {\r\n return height(root);\r\n }",
"@Override\n public int getHeight() {\n traverseInorder(node -> {\n if (node.isLeaf()) {\n if (node.getDepth() >= height) {\n height = node.getDepth... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sort the scaffolds using ref as the anchor | public void sort (final Molecule ref) {
final MolFpFactory fpFact = MolFpFactory.getInstance();
Collections.sort(scaffolds, new Comparator<RGroupTable>() {
public int compare
(RGroupTable a, RGroupTable b) {
... | [
"@Override\n public void sort()\n {\n sortModel();\n for (final UIStructurBrowser child : children) {\n child.sort();\n }\n }",
"public void sortChangePre ();",
"private void createRefs(){\n\t\tfor(TemplateItem templateItem:expandedList){\n addQuickRef(templat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ access modifiers changed from: private | public final void handleLoadingProcess(Boolean bool) {
if (bool != null) {
bool.booleanValue();
TextInputEditText textInputEditText = (TextInputEditText) _$_findCachedViewById(C5619R.C5622id.etName);
Intrinsics.checkNotNullExpressionValue(textInputEditText, "etName");
... | [
"@Override\n }",
"protected void method_5557() {}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n public void publicando() {\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"private InternalReflect() {\n\t\t\t// do nothing\n\t\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a window to edit the pizza from | @Override
public void actionPerformed(ActionEvent arg0) {
@SuppressWarnings("unused")
EditPizzaWin edit = new EditPizzaWin(this.app, this.pizzaBox);
} | [
"void showDetailPizzaScreen(PizzaModel pizzaModel);",
"private void makeWindow() {\n\t\t\n\t\tJFrame frame = new JFrame(\"Resultados IPlasma\");\n\t\t\n\t\tJPanel painel = new JPanel(new BorderLayout());\n\t\t\n\t\tJTextArea resul = new JTextArea();\n\t\tresul.setBounds(10, 79, 179, 339);\n\t\tresul.setEditable(f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public Map<Integer, book> getAllBook() {
return books;
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
, error = true; | public GeneratedOutput (Process aProc, boolean errorType) {
// outputStream = output; // But this nearly kills the app when Ejs is exited
if (errorType) {
stream = aProc.getErrorStream();
outputStream = System.err;
}
else {
stream = aProc.getInputStream();
outputStream = Sys... | [
"public boolean errorState(){return errorState;}",
"public void setHasError(Boolean error);",
"private void setError(boolean error) {\n\t\tthis.error = error;\n\t}",
"public boolean isErrorEnabled() {\n/* 78 */ return true;\n/* */ }",
"public final void setError ( boolean error )\n {\n this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Captures firstparty attribute types for later reference during compilation | private void captureAttributeType(AttributeType type, String typeName) {
if (currentPackage.getQualifiedName().equals("shadow:standard:attributes")) {
switch (typeName) {
case "ImportAssembly" -> AttributeType.IMPORT_ASSEMBLY = type;
case "ExportAssembly" -> AttributeType.EXPORT_ASSEMBLY = typ... | [
"Object buildAttribute2(Object type);",
"Map<IKeyword,IAttribute<?>> attributes();",
"public void depureAttributes();",
"public interface Attribute extends AttributeDescriptor{\n\n public String getValue (); // all types map to string or are unsupported\n public void setValue (String value);\n\n\n}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string MeetingHandle = 14; | public Builder setMeetingHandle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00002000;
meetingHandle_ = value;
onChanged();
return this;
} | [
"public static String meeting_id() {\n\t\treturn moduleProvider.get().meeting_id;\n\t}",
"public void setSenderSocialNo(java.lang.String param){\r\n localSenderSocialNoTracker = true;\r\n \r\n this.localSenderS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests if we are running an acceptable Java and terminates JabRef when we are sure the version is not supported. This test uses the requirements for the Java version as specified in gradle.build. It is possible to define a minimum version including the built number and to indicate whether Java 9 can be used (which it cu... | private static void ensureCorrectJavaVersion() {
// Check if we are running an acceptable version of Java
final BuildInfo buildInfo = Globals.BUILD_INFO;
JavaVersion checker = new JavaVersion();
final boolean java9Fail = !buildInfo.allowJava9 && checker.isJava9();
final boolean v... | [
"boolean isJava10Compatible();",
"boolean isToolingApiTargetJvmSupported(JavaVersion javaVersion);",
"boolean isJava12Compatible();",
"public static boolean checkJREVersion(String requiredVersion)\n\t{\n\t\tString[] versionReq = requiredVersion.split(\"\\\\.\"); //$NON-NLS-1$\n\t\tString[] version = System.ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
removes the current deal from the database | public void removeDeal() throws UnknownHostException {
DealDataConnection.deleteDeal(dealId);
} | [
"private void removeFromDb()\n\t{\n\t\t// cancel lazy update task if need\n\t\tif(Config.LAZY_ITEM_UPDATE && _lazyUpdateInDb != null)\n\t\t{\n\t\t\t_lazyUpdateInDb.cancel(true);\n\t\t\t_lazyUpdateInDb = null;\n\t\t}\n\n\t\tif(!_whflag)\n\t\t\tremoveAugmentation();\n\n\t\tConnection con = null;\n\t\tPreparedStatemen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column yxtk_user_behavior.id | public Integer getId() {
return id;
} | [
"public org.morozko.java.mod.db.dao.DAOID getIdUser() {\n return this.idUser;\n }",
"public Integer getUserActivityId() {\n return userActivityId;\n }",
"public Long getIdUser() {\r\n return idUser;\r\n }",
"public int getUserIdTelecommdao() {\r\n\t\treturn TelecommDAO.useridDao;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prepares the model object for the showAll or showAllByYear methods. | private Model prepareModelForShowAllMethods(int year, Model model) {
DateMidnight firstDay = new DateMidnight(year, DateTimeConstants.JANUARY, 1);
DateMidnight lastDay = new DateMidnight(year, DateTimeConstants.DECEMBER, 31);
Map<Application, String> gravatarUrls = new HashMap<>();
Lis... | [
"public void buildModels() {\n setupHeader();\n setupNoStatsDescriptionRow();\n setupResponseRateRow();\n setupLearnMoreRow();\n setupStatsExplanationRow();\n }",
"public void viewToModel() {\r\n/* */ Object articles;\r\n/* 347 */ if (this.constructionTypeAttr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the user's ip addres | public void setIP(InetAddress ip) {
this.ip = ip;
} | [
"public void setIpUser(String ip){\n \tthis.ipUser=ip;\n }",
"void setIP(String ip);",
"public static void setIPAdd(String ip)\r\n\t{\r\n\t\tipAdd=ip;\r\n\t}",
"public void setIp(InetAddress ip) {\r\n\t\tthis.ip = ip;\r\n\t}",
"public void setClnt_ip(String usr_ip) {\n\n\t\t}",
"public void setIp(St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public boolean isClosed() throws SQLException {
return false;
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the Storage offer based on the uuid. | @Query(value = "SELECT storage FROM StorageOffering storage WHERE storage.uuid = :uuid")
StorageOffering findByUUID(@Param("uuid") String uuid); | [
"StorageSku storagesku();",
"public Storage getStorage (String id) throws OCCIException;",
"public int getStorageID();",
"StoredPlayer getStoredPlayer(UUID uuid);",
"public StorageSpec getStorageSpec() {\n return StorageSpec.newBuilder()\n .setId(id)\n .setType(type)\n .p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void dispose() {
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a classifier that was moved to the project folder structure. This function also adds an entry to the list of thresholds to be used. | private void addClassifier( final ProjectFile pfClassifier ) {
vecClassifierFiles.add( pfClassifier );
final List< Double > defaultThresholdList = new ArrayList< Double >();
defaultThresholdList.add( 0.5 );
vecThresholds.add( defaultThresholdList );
linkedListModel.add( pfClassifier.getFilename() );
saveSta... | [
"public static void classification(ArrayList<csvInfo> data, double threshold, \n \t\tString restrFilename)\n {\n \tcsvInfo curSlice = null;\n \tcsvInfo train = null;\n \tDocumentImpl runRes = null;\n \tConfusionMatrix results = new ConfusionMatrix();\n \tdouble avgAccu = 0;\n \t\n \t//For... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End of Panels' Setters Listeners' methods | @Override
public void actionPerformed(ActionEvent arg0) {
// Cancel button -> Close only this window.
if(arg0.getSource() == jbCancel){
this.dispose();
return;
}
// Done button -> Add new student on the list.
if(arg0.getSource() == jbDone){
// If Name or ID is not entered, show a warning massage.... | [
"@Override\n public void componentClosed()\n {\n }",
"public SubAddMealPanel() {\n mealPanels = null;\n initComponents();\n }",
"public void panelDeactivated() {\n controller = null;\n context = null;\n }",
"private void end()\r\n\t{\r\n\t\tthis.setVisible(false);\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of PersonalMaternidad | public PersonalMaternidad() {
} | [
"public void newPantalla() {\n\t\tpantallaDTO = new PantallaDTO();\n\t\tpantallaDTO.setEstado(Parameter.ESTADO_ACTIVO);\n\t\tpantallaDTO.setIdUsuarioCreacion(loginController.getSessionUser()\n\t\t\t\t.getUsuarioDTO().getIdUsuario());\n\t\tpantallaDTO.setFechaCreacion(new Timestamp(new Date().getTime()));\n\t\tsetPa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form LuuHoaDon | public LuuHoaDon() {
initComponents();
this.setTitle("Dแปch vแปฅ");
this.setLocationRelativeTo(null);
dfQLKH = (DefaultTableModel) this.JTableThue.getModel();
} | [
"public void newPersona() {\n\t\tcleanForm();\n\t\tthis.action = Action.NEW;\n\t\tthis.stateNewEdit();\n\t\tthis.addMessage(\"Hice click en Nuevo\");\n\t}",
"public String doNewForm(){\n\t\tsetUser(new User());\n\t\t//Por defecto, no se ha pulsado cambiar foto\n\t\tsetCambiarFoto(false);\n\t\t//cargo la lista de ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public static void main(String[] args) {
Polynomial poly = new Polynomial (1,1,3,4);
System.out.println(poly.degree);
System.out.println(poly.deriv().degree);
System.out.println();
System.out.println (poly.valueAt(3)+ " "+poly.deriv_valueAt(3));
System.out.println();
poly.print();
poly.deriv().pr... | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test success delete customer. | @Test
public void testSuccessDeleteCustomer() throws AccountException {
assertTrue(repositoryFactory.getCustomerRepository().deleteCustomer(1L) == 1);
assertTrue(repositoryFactory.getCustomerRepository().getCustomerById(1L) == null);
} | [
"@Test\n public void testDeleteCustomerSuccessfully() throws InvalidPasswordException, InvalidUsernameException,\n UnauthorizedException, InvalidCustomerIdException {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // delete customer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |