query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking. | public static BinaryExpression subtractAssignChecked(Expression expression0, Expression expression1, Method method) {
return makeBinary(ExpressionType.SubtractAssignChecked, expression0, expression1, false, method);
} | [
"public static BinaryExpression subtractAssignChecked(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.SubtractAssignChecked, expression0, expression1);\n }",
"public static BinaryExpression subtractAssign(Expression expression0, Expression expression1) {\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub / write a code to return to editloan page | private String editloan(HttpServletRequest request, HttpServletResponse response) {
return null;
} | [
"private String editloan(HttpServletRequest request, HttpServletResponse response) throws SQLException, ServletException, IOException {\n\t\tString loanId= request.getParameter(\"LoanID\");\n\t\tLoanInfo AppliedLoan= connDao.getuserLoans(loanId);\n\t\trequest.setAttribute(\"Loan\", AppliedLoan);\n\t\t\n\t\tRequestD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resend Signup code success | private Response.Listener<SignupResponseDto> signUpCodeResendSuccessListener(final ReSendSignUpCodeListener reSendSignUpCodeListener) {
return new Response.Listener<SignupResponseDto>() {
@Override
public void onResponse(SignupResponseDto response) {
mSignupResponseDto = ... | [
"private void onSignUpSuccess(SignUpData data) {\n HomeActivity.mLoginToken = data.getmToken();\n HomeActivity.mUserId = data.getmUserId();\n HomeActivity.mPicUrl = data.getPicUrl();\n HomeActivity.mUserName = data.getmName();\n session.createLoginSession(HomeActivity.mLoginToken,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test delete pending changelist by Id and option. | @Test
public void testDeletePendingChangelistOption() throws Exception {
when(server.execMapCmdList(eq(CHANGE.toString()), argThat(DELETE_ID_PARAMS_MATCHER),
eq(null))).thenReturn(buildChangeList(MESSAGE_CODE_IN_INFO_RANGE));
String deletePendingChangelistId = changeDelegator.deleteP... | [
"@Test\n public void testDeletePendingChangelist() throws Exception {\n // given\n when(server.execMapCmdList(eq(CHANGE.toString()), argThat(DELETE_ID_PARAMS_MATCHER),\n eq(null))).thenReturn(buildChangeList(MESSAGE_CODE_IN_INFO_RANGE));\n String deletePendingChangelistId = ch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
este metodo le las marcas por su id | public ArrayList<MarcaPojo> leerMarcaId(@Param("id") int id); | [
"public List<MarcaEntity> consultaMarcasRelCat(Integer idCate) {\n List<MarcaEntity> respuesta = null;\n try {\n this.initOperation();\n Query query = sesion.createQuery(\"from MarcaEntity where id in (select distinct marca from ProductoSimpleEntity where dska_cate = :idCate) ord... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use PriceOnStockExchange.newBuilder() to construct. | private PriceOnStockExchange(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"org.adscale.format.opertb.AmountMessage.AmountOrBuilder getExchangepriceOrBuilder();",
"public StockQuote(@NotNull String companySymbol, @NotNull BigDecimal price, @NotNull LocalDateTime date){\n if (companySymbol == null){\n throw new NullPointerException(\"Company Symbol may not be null\");\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
randState ^= seed; randState = randLong(); | public void seed(long seed) {
} | [
"void reSeed(long seed);",
"public void setRNG(long seed);",
"public S getRandomState();",
"void new_seed( Seed seed );",
"public XorShiftRandom(final long seed) {\n\t\tthis.seed = seed;\n\t}",
"public long getRandomSeed (){\n return randomSeed;\n }",
"long getSeed();",
"@Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
to check that the givenTime if it is less than curr system time | private boolean givenGreaterThanSysTime(String givenTime){
dateUtil du=new dateUtil();
if(du.givenTimeGreaterSystime(givenTime)){
return true;
}else{
return false;
}
} | [
"public boolean lessThan (Time t){\n if (toMins()<t.toMins()){\n return true;\n } else {\n return false;\n }\n }",
"public boolean checkTime() {\n \tCalendar current = Calendar.getInstance();\n \tif(current.getTimeInMillis() < start.getTimeInMillis())\n \t\tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the delete(String address) method. | public void testDelete() {
long start = System.currentTimeMillis();
for (int i = 0; i < TOTAL_INVOCATION_COUNT; i++) {
storage.delete("address" + i);
}
System.out.println("Testing delete method with " + TOTAL_INVOCATION_COUNT
+ " invocations, will cost " + (Syst... | [
"public void deleteAddress(Address address);",
"public boolean deleteAddress(String addressId) throws AddressException;",
"String deleteAddress(String userId, String addressId) throws Exception;",
"@Test\n public void clientAddressDeleteTest() throws ApiException {\n UUID clientUuid = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This turns the matrix generated above into an array of ints | private int[] getIntArray(int[][] histogram)
{
int[] histValues = new int[grid_size * BINS];
int index = 0;
for(int i = 0; i < histogram.length; i++)
{
for(int k = 0; k < histogram[i].length; k++)
{
histValues[index++] = histogram[i][k];
... | [
"public static int[][] make_integer(int[][] codon_matrix){\n\t\tint[][] integer_matrix = new int[codon_matrix.length][codon_matrix[0].length*3];\n\t\tfor(int i=0;i<integer_matrix.length;i++){\n\t\t\tfor (int j=0 ,k=0; j< integer_matrix[0].length; j=j+3, k++){\n\t\t\t\tint[] split = codonSplitter(codon_matrix[i][k])... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads data from console. It reads both of operands as well as the sign of operation. | public void readDataFromConsole() {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the first number:");
operand1 = Double.valueOf(scanner.next().replace(",", "."));
// we read String value, then make replacement of a comma to a period for user convenience, then con... | [
"private static char readOperation() {\n\t\tOut.println();\n\t\tOut.print(\"Bitte Operation auswaehlen: (a, z, e, n, l, p, x): \");\n\n\t\tString line = In.readLine().trim();\n\t\t//Student (Simon Sternbauer): I have added a method to show all appointments by typing in \"p\"\n\t\twhile (line.length() == 0 || ! line... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This constructor makes a new Course and stores it in our database. JDBC code is modified from code originally found on tutorialspoint.com | Course(int cNumber, String cName, int cInstructor){
System.out.println("Creating new Course");
callNumber = cNumber;
Connection conn = null;
try{
//STEP 2: Register JDBC driver
Class.forName("com.mysql.jdbc.Driver");
//STEP 3: Open a connection
System.out.println("Connecting ... | [
"public Course(Course c) { \r\n\t\tthis.code = c.code;\r\n\t this.assignment = c.assignment;\r\n\t this.credit = c.credit;\r\n\t}",
"public Course()\r\n\t{\r\n\t\tthis.code = \"\";\r\n\t\tthis.name = \"\";\r\n\t\tthis.description = \"\";\r\n\t\tthis.format = \"\";\r\n\t}",
"public Secon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the documentScores property: Document level sentiment confidence scores between 0 and 1 for each sentiment class. | public DocumentSentiment setDocumentScores(SentimentConfidenceScorePerLabel documentScores) {
this.documentScores = documentScores;
return this;
} | [
"public SentimentConfidenceScorePerLabel getDocumentScores() {\n return this.documentScores;\n }",
"public void setScores(BigDecimal scores) {\n this.scores = scores;\n }",
"public void setScores(Map<String, Integer> scores) {\r\n if (scores != null) { //& inside scores all valid\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the default query cache | public QueryCache getQueryCache(); | [
"private StockCache getDefaultCache()\n\t{\n\t\treturn stockCacheMap.get(\"default\");\n\t}",
"public Cache getDefaultCache() {\n return defaultCache;\n }",
"public static ResponseCache getDefault() {\n SecurityManager sm = System.getSecurityManager();\n if (sm != null) {\n sm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter accessor for attribute 'keyspace'. | public void setKeyspace(String keyspace) {
this.keyspace = keyspace;
} | [
"public Builder setKeyspace(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n keyspace_ = value;\n onChanged();\n return this;\n }",
"@Override\n public String getKeyspaceName() {\n return env.getProperty(\"cassandra.keyspace\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Swaps the bytecode of the given classes. | public void redefineClasses(Map<Class<?>, byte[]> newByteCodes) {
int i = 0;
for (Class<?> clazz : newByteCodes.keySet()) {
try {
ClassDefinition cd = new ClassDefinition(clazz, newByteCodes.get(clazz));
LOGGER.debug("Going to redefined class: {}", clazz.getName());
ClassDefinition[] cdArray = new C... | [
"void replaceClasses(Class current, Class replacement);",
"private void replaceMethods() {\n\t\t\tclassGen.setMethods(new Method[0]);\n\t\t\tfor (var method: methods) {\n\t\t\t\tmethod.setMaxLocals();\n\t\t\t\tmethod.setMaxStack();\n\t\t\t\tremoveUselessAttributes(method);\n\t\t\t\tif (!method.isAbstract()) {\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the max ptid of the transaction fetched | public boolean updateMaxTransaction(java.math.BigDecimal transactionID) throws java.rmi.RemoteException; | [
"public int getUpdatedTaskID(){\r\n int resultID;\r\n synchronized (lock) {\r\n ++baseTaskID;\r\n resultID = baseTaskID;\r\n //insert new parameters to paraList\r\n }\r\n return resultID;\r\n }",
"public static int getMaxId() {\r\n\t\treturn maxId++;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public RBNode getRoot() returns the root of the red black tree | public RBNode getRoot() {
return root;
} | [
"public RBNode getRoot() {\n\t\tif (!this.root.equals(NULL)) {\n\t\t\treturn this.root;\n\t\t}\n\t\treturn null;\n\t}",
"public BSTNode getRoot(){\n\t\tif (nelems==0){\n\t\t\treturn null;\n\t\t}\n\t\telse{\n\t\t\treturn root;\n\t\t}\n\t}",
"public Node getRoot() {\r\n return root;\r\n }",
"public No... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Document xmlDocument = DOMUtil.parseDocument(xmlString); Schema javaxSchema = prismContext.getSchemaRegistry().getJavaxSchema(); Validator validator = javaxSchema.newValidator(); validator.setResourceResolver(prismContext.getEntityResolver()); validator.validate(new DOMSource(xmlDocument)); | @Override
protected void validateXml(String xmlString, PrismContext prismContext) throws SAXException, IOException {
} | [
"private void validate(Document document) {\n try {\n SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);\n URL schemaUrl = this.getClass().getResource(\"/edu/mit/blocks/codeblocks/codeblocks.xsd\");\n Schema schema = schemaFactory.new... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define el valor de la propiedad idCartelera. | public void setIdCartelera(int value) {
this.idCartelera = value;
} | [
"public int getIdCartelera() {\n return idCartelera;\n }",
"Carta obtenerCarta(Long id);",
"public void setIdProduto(Integer idProduto) {\n this.idProduto = idProduto;\n }",
"public void setId_produto(int pId_produto){\n this.id_produto = pId_produto;\n }",
"public void setIdCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reiniciar el servicio. Ejecuta una llamada de sistema para reiniciar el servicio y evalua la respuesta de la misma para determinar si se ha reiniciado el servicio. | @Override
public int reiniciar(){
try {
Process proceso;
proceso = Runtime.getRuntime().exec("/etc/init.d/"+nombreServicio+" restart");
InputStream is = proceso.getInputStream();
BufferedReader buffer = new BufferedReader (new InputStreamReader (is))... | [
"private void restartMonitorApp()\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"Requesting IMA restart...\");\n }\n\n ccm.getSystemContext().runInContext(new Runnable()\n {\n public void run()\n {\n restartMonitorAppImpl();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Output only. The pretax subtotal amount of invoice level adjustments, in micros. int64 adjustments_subtotal_amount_micros = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; | long getAdjustmentsSubtotalAmountMicros(); | [
"long getAdjustmentsTotalAmountMicros();",
"long getAdjustmentsTaxAmountMicros();",
"long getRegulatoryCostsSubtotalAmountMicros();",
"long getTotalAmountMicros();",
"public BigDecimal getAmtSubtotalPO();",
"com.google.protobuf.DoubleValue getTransactionAmountMicros();",
"public float invoiceSubtotal(){... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a given number of milliseconds, into a number of rl years, months, days, hours, minutes, and seconds. If in short form, returns y, m, d, h, m, and s. Usage: date2EllapsedTime(time) | public String date2EllapsedTime(long time, TimeUnit minUnit, boolean shortest); | [
"public String date2SmartEllapsedTime(long time, boolean shortest);",
"public String date2SecondsString(long time);",
"public String date2BestShortEllapsedTime(long t);",
"public static String getEllapseTimeString(long milliSec) {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tlong MSEC_IN_SEC = 1000;\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensure that names of functions declared on the Object prototype are valid data to insert into the PrefixTree (. | public void testBug631Prefixes() {
// Set the prefix length large enough so that we ensure prefixes are
// appropriately tested
final String[] prototypeNames = {
"__proto__", "constructor", "eval", "prototype", "toString",
"toSource", "unwatch", "valueOf",};
for (int i = 0; i < prototyp... | [
"public void testBug631Suffixes() {\n // Set the prefix length large enough so that we ensure suffixes are\n // appropriately tested\n final PrefixTree tree = new PrefixTree(100);\n final String[] prototypeNames = {\n \"__proto__\", \"constructor\", \"eval\", \"prototype\", \"toString\",\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct an instance of StaticWeaveDirectoryOutputHandler. | public StaticWeaveDirectoryOutputHandler(URL source,URL target){
this.source=source;
this.target=target;
} | [
"private HttpStaticFileServerHandler() {\n\t\tfinal String codeSourcePath = getClass().getProtectionDomain().getCodeSource().getLocation().getPath();\n\t\tFile file = new File(codeSourcePath);\n\t\tfinal boolean isJar = codeSourcePath.endsWith(\".jar\") && file.exists() && file.canRead();\n\t\tif(isJar) {\n\t\t\tst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column lb01_pt.lbt06_meisai_m_pkey.gnkkbn | public void setGnkkbn(String gnkkbn) {
this.gnkkbn = gnkkbn;
} | [
"public void setMpnId(String value)\n {\n mpnId = value;\n }",
"public void setPknum(Integer pknum) {\n this.pknum = pknum;\n }",
"public org.LNDCDC_ADS_PRPSL.PROPOSAL_LINE.apache.nifi.LNDCDC_ADS_PRPSL_PROPOSAL_LINE.Builder setPKGRTTNKEY(java.lang.Long value) {\n validate(fields()[25... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
productIndex translates a product code (eg. "A0", "F7") into an index into the machine's product racks. | public int productIndex(String code, int offset) //made this public for testing purposes, was private
{
/**
* Parse the parts of the string code into chars.
* */
char letter, number;
letter = code.charAt(0);
number = code.charAt(1);
/**
* Assigning index value
* */
int index = -1;
index... | [
"java.lang.String getProductNumberCode();",
"public void retrieveProductIndex(int productIndex) {\n this.productIndex = productIndex;\n }",
"private void createProductIndex() {\n\t\tLinkedList<String> ids = new LinkedList<>(productIds.keySet());\n\t\tArrayList<ArrayList<Integer>> vals = new ArrayList<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check interval of buffer pool's size. | public long getBufferPoolSizeCheckIntervalMs() {
return bufferPoolSizeCheckIntervalMs;
} | [
"abstract boolean hasCapacity(long bytes);",
"public boolean hasReachedSizeLimit() {\n\t\treturn accumulator.size() >= maxSize;\n\t}",
"private void checkCapacity() {\n\t\tif (size.get() >= region.getCapacity()) {\n\t\t\tsynchronized (cleanUpThread) {\n\t\t\t\tcleanUpThread.notify();\n\t\t\t}\n\t\t}\n\t}",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The timestamp of when the build completed. .google.protobuf.Timestamp build_finished_on = 3; | public com.google.protobuf.Timestamp getBuildFinishedOn() {
if (buildFinishedOnBuilder_ == null) {
return buildFinishedOn_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: buildFinishedOn_;
} else {
return buildFinishedOnBuilder_.getMessage();
}
... | [
"@java.lang.Override\n public com.google.protobuf.Timestamp getBuildFinishedOn() {\n return buildFinishedOn_ == null\n ? com.google.protobuf.Timestamp.getDefaultInstance()\n : buildFinishedOn_;\n }",
"@java.lang.Override\n public com.google.protobuf.TimestampOrBuilder getBuildFinishedOnOrBuild... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a list of DB_IDs for events contained by a Pathway with specified pathwayId. All events, both Pathways and Reactions, should be in the returned list, recursively. | @GET
@Path("/getContainedEventIds/{dbId}")
@Produces(MediaType.TEXT_PLAIN)
public String getContainedEventIds(@PathParam("dbId") Long pathwayId) {
List<Long> dbIds = restHelper.getContainedEventIds(pathwayId);
String rtn = dbIds.stream().map(id -> id.toString()).collect(Collectors.joining(",... | [
"public int getDbId(){\r\n\t\treturn pathwayId;\r\n\t}",
"public void setParentPathway (int dbId) {\r\n\t\tthis.parentPathwayId = dbId;\r\n\t}",
"private List<Way> getConnectedBackwardWays(Waypoint waypoint, List<Way> ways) {\n\t\tList<Way> connectedBackwardWays = new ArrayList<Way>();\n\t\tfor (Way way : ways)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets array of all "CResolution" element | void setCResolutionArray(org.apache.xmlbeans.XmlObject[] cResolutionArray); | [
"void setCResolutionArray(int i, org.apache.xmlbeans.XmlObject cResolution);",
"org.apache.xmlbeans.XmlObject[] getCResolutionArray();",
"void setCPixSizeArray(org.apache.xmlbeans.XmlObject[] cPixSizeArray);",
"void setValue(int v[][]) {\n for(int i = 0; i < c.length; i++)\n for(int j = 0; j... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notify listeners that a slot object was added. | private void fireAdded(final RPObject object, final String slotName,
final RPObject sobject) {
/*
* Notify child
*/
fireAdded(sobject);
/*
* Call after the child has been notified
*/
listener.onSlotAdded(object, slotName, sobject);
userListener.onSlotAdded(object, slotName, sobject);
} | [
"private void fireChangedAdded(final RPObject object, final RPSlot cslot) {\n\t\tfinal String slotName = cslot.getName();\n\t\tRPSlot slot;\n\n\t\t/*\n\t\t * Find the original slot entry (if any)\n\t\t */\n\t\tif (object.hasSlot(slotName)) {\n\t\t\tslot = object.getSlot(slotName);\n\t\t} else {\n\t\t\tslot = null;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of MouthNotEmptyException | public MouthNotEmptyException(Hamster hamster) {
super(hamster);
} | [
"public NotEmptyException() {\n \tsuper(\"Object was occupied.\");\n }",
"public InvalidWorldException() {\n }",
"public InvalidMembershipProofException() {\n super();\n }",
"public NotEmptyException(String msg) {\n super(msg);\n }",
"SpaceInvaderTest_test_UnNouveauVaisseauPosit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
parse_nic_ip_address For a given VirtualEthernetCard it will pase the Device Config info to find the IP Address, if any. | private String parse_nic_ip_address(VirtualEthernetCard vNic, GuestNicInfo[] guestNicInfo)
{
logger.fine("Entering VMwareInventory.parse_nic_ip_address(VirtualEthernetCard vNic, GuestNicInfo[] guestNicInfo)");
for(int j=0; j < guestNicInfo.length; j++) {
if (guestNicInfo[j].getDeviceConfigId() == vNic.g... | [
"private HashMap<String, Object> get_nic(VirtualEthernetCard vNic, Hashtable[] pTables, int i)\n {\n logger.fine(\"Entering VMwareInventory.get_nic(VirtualEthernetCard vNic, Hashtable[] pTables, int i)\");\n HashMap<String, Object> nic_hash = new HashMap<String, Object>();\n nic_hash.put(\"mac_address\",v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the resource bundle for the given locale based on the resource bundle defined in the deployment descriptor with resourcebundle tag or the inlined resources defined in the deployment descriptor. | public ResourceBundle getResourceBundle(Locale locale) {
return ResourceBundle.getBundle(definition.getResourceBundle(), locale);
} | [
"ResourceBundle getResourceBundle(Locale locale);",
"public static ResourceBundle get(Locale locale) {\n return ResourceBundle.getBundle(\"bundle.language\", locale);\n }",
"public static synchronized ResourceBundle getLabelBundle(Locale locale) {\n // fix for RFE 157 (allowing custom class... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns conversions from Ounces to other units | private static String fromOunces(String fromValue, String toUnit) {
double returnValue;
switch (toUnit) {
case "Kilograms":
returnValue = (toDouble(fromValue) / 16.00) / 2.2046;
return String.valueOf(decimalFormat.format(returnValue));
case "Grams"... | [
"public abstract UnitConverter toStandardUnit();",
"private Double convertFluidOunces (Double quantity, String outUnit) {\n\n switch (outUnit) {\n case (\"tsp\") : return (quantity * 6);\n\n case (\"tbsp\") : return (quantity * 2);\n\n case (\"cups\") : return (quantity / 8... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the first split point | public Point getFirstSplitPoint() {
return (Point) splitPoints.firstElement();
} | [
"P getSplitPoint();",
"public GJPoint2D firstPoint() {\n\t\tif (this.segments.isEmpty()) \n\t\t\treturn null;\n\t\treturn this.segments.get(0).controlPoints()[0];\n\t}",
"public IPoint getFirstPoint()\n {\n Object[] verticesArray = this.getVertices().toArray();\n IPoint firstPoint = (IPoint)ver... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleUnit" $ANTLR start "entryRuleUnary" InternalGaml.g:2144:1: entryRuleUnary : ruleUnary EOF ; | public final void entryRuleUnary() throws RecognitionException {
int entryRuleUnary_StartIndex = input.index();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 149) ) { return ; }
// InternalGaml.g:2145:1: ( ruleUnary EOF )
// InternalGaml.g:2146:1: ruleUn... | [
"public final void entryRuleUnaryExpression() throws RecognitionException {\n try {\n // InternalReflex.g:1014:1: ( ruleUnaryExpression EOF )\n // InternalReflex.g:1015:1: ruleUnaryExpression EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes dragon fall asleep. | public void fallAsleep(){
state = State.ASLEEP;
symbol = 'd';
} | [
"public void moveDelay ( )\r\n\t{\r\n\t\ttry {\r\n\t\t\tThread.sleep( 1000 );\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n public void run() {\n while (antiSleep != null) {\n //Sleep for 30 seconds\n antiSleep.delay(30000);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Toggles the display of mDrawingView | public void toggle(View view) {
if (mDrawingView.getVisibility() == View.VISIBLE)
mDrawingView.setVisibility(View.INVISIBLE);
else
mDrawingView.setVisibility(View.VISIBLE);
} | [
"public void toggleView() {\n\t\tisIsometric = !isIsometric;\n\t\tthis.repaint();\n\t}",
"public void toggleIsosurfaceViewPanel ()\r\n\t{\r\n\t\tm_isosurfaceViewPanel.toggleVisibility ();\r\n\t}",
"public void makeVisible()\n {\n isVisible = true;\n draw();\n }",
"public void makeVisible()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the oleDiscoveryExportProfile instance. | public OleDiscoveryExportProfile getOleDiscoveryExportProfile() {
return oleDiscoveryExportProfile;
} | [
"public void setOleDiscoveryExportProfile(OleDiscoveryExportProfile oleDiscoveryExportProfile) {\n this.oleDiscoveryExportProfile = oleDiscoveryExportProfile;\n }",
"private IProfile getProfile() {\n \t\treturn profileRegistry.getProfile(getProfileId());\n \t}",
"public UriDt getProfileElement() { \n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Internetseite' attribute. If the meaning of the 'Internetseite' attribute isn't clear, there really should be more of a description here... | String getInternetseite(); | [
"public java.lang.String getInternetForAll() {\n return internetForAll;\n }",
"public java.lang.String getNetsiteid () {\n\t\treturn netsiteid;\n\t}",
"public java.lang.String getWebsite() {\n return website;\n }",
"public String getWebsite() {\n return website;\n }",
"public S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ int addExpensiveToolLog(ExpensiveToolLog expensiveToolLog); void updateExpensiveToolLog(ExpensiveToolLog expensiveToolLog); void removeExpensiveToolLog(ExpensiveToolLog expensiveToolLog); | int getTotalOfExpensiveToolLogByEmployee(Employee employee); | [
"public void logUpdate() {\n\n }",
"int insertProductTaskLog(ProductTaskLog productTaskLog);",
"public long append(LogEntry logEntry);",
"public void addAntiQueryLog(AntiQueryLog antiQueryLog);",
"public void logStats();",
"public void saveLog (TradeConditionLog tradeConditionLog);",
"public void updat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fast power approximation for floats. | public static final float fastPow(final float a, final float b) {
return fastPow2(b * fastLog2(a));
} | [
"static float powerOfTwoF(int n) {\n return Float.intBitsToFloat(((n + FloatConsts.MAX_EXPONENT) <<\n (FloatConsts.SIGNIFICAND_WIDTH-1))\n & FloatConsts.EXP_BIT_MASK);\n }",
"static float powerOfTwoF(int n) {\n assert(n >= Flo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Testing: Initiate from truthful agents, and report MDP generated | public static void main(String args[]) throws IOException {
Cache.init();
// parameters
int no_rounds = 2;
int no_agents = 2;
double p0 = 0.5;
double rho = 0.9; // signal strength
double epsilon = 0.1; // trembling
Random rng = new Random();
int no_simulations = 100000;
boolean take_log = tr... | [
"private void setupAgents() {\r\n try {\r\n setupJade();\r\n //createAgent(Bank.class, \"Bank\");\r\n createAgent(ProductionAgent.class, \"Res1\");\r\n createAgent(ProductionAgent.class, \"Res2\");\r\n createAgent(SocialAgent.class, \"Soc\");\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PictureCarousel__Group__3" $ANTLR start "rule__PictureCarousel__Group__3__Impl" InternalLPDSL.g:786:1: rule__PictureCarousel__Group__3__Impl : ( ( rule__PictureCarousel__TimerAssignment_3 ) ) ; | public final void rule__PictureCarousel__Group__3__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalLPDSL.g:790:1: ( ( ( rule__PictureCarousel__TimerAssignment_3 ) ) )
// InternalLPDSL.g:791:1: ( ( rule__PictureCarousel__Ti... | [
"public final void rule__PictureCarousel__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalLPDSL.g:778:1: ( rule__PictureCarousel__Group__3__Impl rule__PictureCarousel__Group__4 )\r\n // InternalLPDSL.g:7... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleLogicalRelationExpression" $ANTLR start "ruleLogicalRelationExpression" ../org.yakindu.sct.model.stext/srcgen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2925:1: ruleLogicalRelationExpression returns [EObject current=null] : (this_ShiftExpression_0= ruleShiftExpression ( () ( ... | public final EObject ruleLogicalRelationExpression() throws RecognitionException {
EObject current = null;
EObject this_ShiftExpression_0 = null;
Enumerator lv_operator_2_0 = null;
EObject lv_rightOperand_3_0 = null;
enterRule();
try {
... | [
"public final EObject ruleLogicalRelationExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_NumericalAddSubtractExpression_0 = null;\r\n\r\n Enumerator lv_operator_2_0 = null;\r\n\r\n EObject lv_rightOperand_3_0 = null;\r\n\r\n\r\n enterRu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Since this is the factory instance provided by the bridge, it will never wrap another factory. | public BridgeContextFactory getWrapped() {
return null;
} | [
"@Override\n\tpublic ExternalContextFactory getWrapped() {\n\t\treturn wrappedFactory;\n\t}",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"public DiscoveryHandlerFactory getWrapped() {\n return null;\n }",
"public Factory() {\n this(getInternalClient());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all the agendas where uuid = &63; from the database. | public void removeByUuid(String uuid); | [
"@Override\n\tpublic void removeByUuid(String uuid) {\n\t\tfor (Arret arret :\n\t\t\t\tfindByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\n\t\t\tremove(arret);\n\t\t}\n\t}",
"@Override\n\tpublic void removeByUuid(String uuid) {\n\t\tfor (registrationDetails registrationDetails : findByUuid(uuid,\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Distribute data into bins to obtain histogram zero bin position provided | public static double[][] histogramBins(final double[] data, final double binWidth, final double binZero) {
final double dmax = TMath.Maximum(data);
int nBins = (int) Math.ceil((dmax - binZero) / binWidth);
if (binZero + nBins * binWidth > dmax) {
nBins++;
}
final int ... | [
"private void computeHistogramBins() {\r\n int nBins = (int) Math.ceil(hismax / binWidth);\r\n histoBins = new double[nBins];\r\n for (int i = 0; i < nBins; i++) {\r\n histoBins[i] = binWidth * (double) i + binWidth;\r\n }\r\n }",
"public static double[][] histogramBins(f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the contact addresses. | public List<Address> getAddresses() {
return addresses;
} | [
"public List<Address> getAddresses();",
"public List<Address> getAllAddresses();",
"public List<Address> getAddresses() {\n\n\t\tList<Address> addresses = null;\n\t\ttry {\n\t\t\t// Start a new trasaction\n\t\t\tem.getTransaction().begin();\n\t\t\t// Get list of addresses\n\t\t\taddresses = em.createQuery(\"SEL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Generate__Group__2__Impl" $ANTLR start "rule__Generate__Group__3" InternalDsl.g:22385:1: rule__Generate__Group__3 : rule__Generate__Group__3__Impl rule__Generate__Group__4 ; | public final void rule__Generate__Group__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:22389:1: ( rule__Generate__Group__3__Impl rule__Generate__Group__4 )
// InternalDsl.g:22390:2: rule__Generate__Group__3__Impl rule__Gene... | [
"public final void rule__GenerateOption__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:23091:1: ( rule__GenerateOption__Group__3__Impl rule__GenerateOption__Group__4 )\n // InternalDsl.g:23092:2: rule__Gen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests error handling for an undefined annotation property edge source arrow (property graph) | @Test(expected = IllegalArgumentException.class)
public void testErroneousAnnPropSourceShape() throws IllegalArgumentException {
GraphRequestModel requestModel = createCustomPropertyGraphRequestModel();
requestModel.setAnnPropSourceShape(SPACE);
GraphRequestValidator.validateRequest(requestModel);
} | [
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testErroneousDataPropSourceShape() throws IllegalArgumentException {\n\t GraphRequestModel requestModel = createCustomPropertyGraphRequestModel();\n\t requestModel.setDataPropSourceShape(SPACE);\n\t GraphRequestValidator.validateRequest(reque... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a new "back step" (the undo action) to the stack. The action here is to do nothing! This is just a place holder so when user is backstepping through the program no instructions will be skipped. Cosmetic. If the top of the stack has the same PC counter, the donothing action will not be added. | public int addDoNothing(int pc) {
if (backSteps.empty() || backSteps.peek().pc != pc) {
backSteps.push(DO_NOTHING, pc);
}
return 0;
} | [
"public void undoAction() {\n\t\tString message = history.undoAction();\n\t\tguiController.updateHistory();\n\t\tif(!message.equals(\"\")) {\n\t\t\tupdateEffects(message);\n\t\t}\n\t}",
"void undo() {\n if (_moveCount > 0) {\n _moveCount--;\n this.copy(positionstack.pop());\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("MyScribeClient.childAdded("+topic+","+child+")"); System.out.println("Stats: "+myScribe.getChildrenOfTopic(topic)+ " // "+myScribe.getClients(topic)); | public void childAdded(Topic topic, NodeHandle child) {
} | [
"public void listSubscribedTopics() {\r\n for (Topic topic : subscriberTopics){\r\n System.out.print(topic);\r\n }\r\n }",
"DirectCommonSubsumers createDirectCommonSubsumers();",
"public void displaySubs() throws RemoteException {\r\n // Subscribers for specific topics\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the metadataRelationshipControllingField value for this CustomField. | public void setMetadataRelationshipControllingField(java.lang.String metadataRelationshipControllingField) {
this.metadataRelationshipControllingField = metadataRelationshipControllingField;
} | [
"public java.lang.String getMetadataRelationshipControllingField() {\r\n return metadataRelationshipControllingField;\r\n }",
"public Claim setRelationship(CodeableConceptDt theValue) {\n\t\tmyRelationship = theValue;\n\t\treturn this;\n\t}",
"public void setRelationship(Relationship r) {\n\t\trelatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a new vertical fill. | public void setVerticalFill(boolean vfill) {
this.vfill = vfill;
} | [
"public void setVerticalFill(boolean vfill) {\n this.vfill = vfill;\n }",
"public boolean getVerticalFill() {\n return vfill;\n }",
"public GridBagConstraintsBuilder fillVertical()\n\t{\n\t\tconstraints.fill = GridBagConstraints.VERTICAL;\n\t\treturn this;\n\t}",
"public void setHorizontalFill(b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Check if imag. part is negative to display the number in a proper way | @Override
public String toString() {
String result = "";
if(im > 0) {
result = String.format("%.2f", re) + " + i" + String.format("%.2f", im);
} else {
result = String.format("%.2f", re) + " - i" + String.format("%.2f", Math.abs(im));
}
return result;
... | [
"@Override\n\tpublic String toString() {\n\t\tif (this.imag == 0) {\n\t\t\tif (this.reell == 0) {\n\t\t\t\treturn \"\" + 0;\n\t\t\t} else {\n\t\t\t\treturn \"\" + reell;\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.reell == 0) {\n\t\t\t\tif (this.imag > 0) {\n\t\t\t\t\treturn \"+\" + imag + \"i\";\n\t\t\t\t} else {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string patchUrl = 79; | com.google.protobuf.ByteString
getPatchUrlBytes(); | [
"java.lang.String getPatchUrl();",
"boolean hasPatchUrl();",
"public java.lang.String getPatchUrl() {\r\n java.lang.Object ref = patchUrl_;\r\n if (ref instanceof java.lang.String) {\r\n return (java.lang.String) ref;\r\n } else {\r\n com.google.protobuf.ByteString bs = \r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the HazelcastMQ instance that this transaction manager is managing the transactions for. | public HazelcastMQInstance getHazelcastMQInstance() {
return hazelcastMQInstance;
} | [
"private HazelcastMQContextHolder getHazelcastMQContextHolder() {\n return hazelcastMQContextHolder;\n }",
"public HazelcastMQTransactionManager() {\n setNestedTransactionAllowed(false);\n }",
"protected PlatformTransactionManager getTxManager() {\n return manager;\n }",
"MIBTransactionManager... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new date setting. | public DateSetting(DateSettingOption key, DateSetting setting)
{
this.key = key;
if (setting != null)
{
this.before = setting.getBefore();
this.middle = setting.getMiddle();
this.after = setting.getAfter();
}
} | [
"public DateSetting()\n {\n }",
"public SimpleDate(int mm, int dd, int yyyy) { setDate(mm, dd, yyyy); }",
"public MainDate() {\n\n\t}",
"DateConstant createDateConstant();",
"public TimelineDate() {\n this (new Date());\n }",
"public DateChooser() {\n\t\tthis(Calendar.getInstance());\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Testing a 270 degrees clockwise rotation of a board | @Test
public void testRotate270(){
Board board1 = new Board(4, 3);
board1.setupBoard();
board1.burnSquare(0, 2);
board1.burnSquare(2, 0);
board1.getSquare(1, 1).setAmazon(new Piece(true));
board1.getSquare(3, 2).setAmazon(new Piece(false));
Board board2 = ne... | [
"@Test\n public void testRotate90(){\n\n Board board1 = new Board(4, 3);\n board1.setupBoard();\n board1.burnSquare(0, 2);\n board1.burnSquare(2, 0);\n board1.getSquare(1, 1).setAmazon(new Piece(true));\n board1.getSquare(3, 2).setAmazon(new Piece(false));\n\n Boa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Does the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBCCompliant driver will always return false. | public boolean supportsMixedCaseIdentifiers()
throws SQLException
{
return false;
} | [
"public boolean storesLowerCaseQuotedIdentifiers()\n throws SQLException\n {\n return false;\n }",
"public boolean storesLowerCaseQuotedIdentifiers()\n throws SQLException\n {\n return false;\n }",
"public boolean storesLowerCaseIdentifiers()\n throws SQLException\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the property 'linkcheckertransformerRewriteElements' | @Test
public void linkcheckertransformerRewriteElementsTest() {
// TODO: test linkcheckertransformerRewriteElements
} | [
"@Test\n public void linkcheckertransformerDisableCheckingTest() {\n // TODO: test linkcheckertransformerDisableChecking\n }",
"@Test\n public void linkcheckertransformerDisableRewritingTest() {\n // TODO: test linkcheckertransformerDisableRewriting\n }",
"@Test\n public void linkch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prueba para consultar un Perro. | @Test
public void getPerroTest() {
PerroEntity entity = Perrodata.get(0);
PerroEntity resultEntity = perroLogic.getPerro(entity.getId());
Assert.assertNotNull(resultEntity);
Assert.assertEquals(entity.getId(), resultEntity.getId());
Assert.assertEquals(entit... | [
"public List<RamoVehiculo> consultarRamoVehiculo() throws HiperionException;",
"public void consultar() {\n\t\tSystem.out.println(\"Perfil: \" + nombre);\n\t\tSystem.out.print(\"Permisos: \");\n\t\tfor (int i = 0; i < permisos.size(); i++) {\n\t\t\tif (i == 0)\n\t\t\t\tSystem.out.print(permisos.get(i).getNombre()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subclasses may extend this method to perform their own retrieval of a default java source folder. This implementation returns the JavaSource folder as default since we are in a web project. This method may return null. | protected IFolder getDefaultJavaSourceFolder() {
// Ensure project is not null
if (!isSet(ArtifactEditOperationDataModel.PROJECT_NAME))
return null;
IProject project = getTargetProject();
if (project == null)
return null;
return (IFolder) WebPropertiesUtil.getJavaSourceFolder(project);
} | [
"public FileObject getCurrentFolder() {\n if (currentPackage != null) {\n FileObject srcFile = getSourceFile();\n FileObject folder = ClassPath.getClassPath(srcFile, ClassPath.SOURCE)\n .findResource(currentPackage);\n if (folder == null)\n f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /associations/:id/clubs : get clubs by "id" of association. | @RequestMapping(value = "/associations/{id}/clubs", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public List<Club> getClubs(@PathVariable Long id) {
log.debug("REST request to get Association Clubs: {}", id);
Club example = new Club();
Association exampleAssociation = new Asso... | [
"Club getOne(Integer idClub);",
"public static List<Club> getClubs(){\n return clubs;\n }",
"@RequestMapping(value = \"/associations/{id}/divisions\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic List<Division> getAssociationGames(@PathVariable Long id) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constant symbol single flyweight instance accessor. If the symbol is not a constant symbol an error is added to the global error table. | protected static final OwExprConstantSymbol symbolInstance(String image_p, OwExprSymbolTable symbolTable_p, OwExprErrorTable errorTable_p)
{
try
{
return (OwExprConstantSymbol) symbolTable_p.getSymbol(image_p);
}
catch (ClassCastException e)
{
... | [
"public Object getConstValue() {\n if (sym == CONSTSYM) {\n return constvalue;\n }\n throw new UnsupportedOperationException(\"This method is only available to CONSTSYM tokens\");\n }",
"CycSymbol getSymbol();",
"private Symbol() {}",
"SymbolName getSymbolName();",
"java.l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the X location of the player starting postion. | public int getStartingLocationX() {
return startingLocationX;
} | [
"double getPositionX();",
"public static int getStartXCoordinate(){\n\t\tint x = getThymioStartField_X(); \n\t\t\n\t\tif(x == 0){\n\t\t\n \t}else{\n \t x *= FIELD_HEIGHT;\n \t}\n \t\n\t\treturn x ;\n\t}",
"public static int getCurrentXPosition() {\n // TODO: Implement this method.\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the level stats | public LevelStats getLevelStats() {
return stats;
} | [
"double getLevel();",
"long getLevel();",
"public int getLevelsPerBonusDamage();",
"int getOnLevel();",
"public Map<SkillType, Integer> getLevels() {\n return levels;\n }",
"java.lang.String getUserLevel();",
"public double getLevel(SkillType name) { return levels.get(name); }",
"public int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the current line join style [PDF:1.6:4.3.2]. | public LineJoinEnum getLineJoin(
)
{return lineJoin;} | [
"LineStyle getLineStyle();",
"public LineJoin getOutlineJoin() {\n return borderJoin;\n }",
"public String getLineJoin() {\n return jsonObject.get(LineOptions.PROPERTY_LINE_JOIN).getAsString();\n }",
"public int getLineStyle() {\r\n return LineStyle;\r\n }",
"Integer getLINEJ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the higher location of this cuboid. | public Location3D getHighLoc() {
return highPoint;
} | [
"public ILocation getUpperBound() {\n if (getPlot() != null) {\n return PlotMeCoreManager.getInstance().getPlotTopLoc(world, getPlot().getId());\n } else {\n return null;\n }\n }",
"public GameObject getBelow() {\n\t\tif (this.getRow() == this.level.getSize().height-1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Wrap this token in parenthesis. | public String wrap() {
if (representationMode != Mode.REPLACE) {
//Don't want to wrap a single leaf node for viz purposes.
this.tokenStr = "(" + tokenStr + ")";
}
return tokenStr;
} | [
"public Token getLeftParenthesis() {\n return leftParenthesis;\n }",
"ParenthesisExpr createParenthesisExpr();",
"public void parenthesis() { \r\n\t\t\r\n\t\twhile(!newStack.isEmpty()) {\r\n\t\t\tchar y = newStack.pop();\r\n\t\t\tif(y == '(') break;\r\n\t\t\telse printThis = printThis + y;\r\n\t\t\r\n\t\t}\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets channel 0 temperature | @Override
public double getChannel0Temp() throws DeviceException {
try {
if (getTargetTemp()> currentTemperature) {
return currentTemperature += scalledTemperatureChange(1);
} else if (getTargetTemp() < currentTemperature) {
return currentTemperature -= scalledTemperatureChange(1);
} else {
retu... | [
"@Override\n\tpublic double getChannel1Temp() throws DeviceException {\n\t\ttry {\n\t\t\tif (getTargetTemp()> currentTemperature) {\n\t\t\t\treturn currentTemperature += scalledTemperatureChange(0.9);\n\t\t\t} else if (getTargetTemp() < currentTemperature) {\n\t\t\t\treturn currentTemperature -= scalledTemperatureC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the user's last login date. May return null if the user has never logged in. | Date getUserLastLogin(); | [
"Date getLastLoginDate();",
"@Nullable\n public String getLastLoginDate() {\n return _lastLoginDate;\n }",
"Date getLastLogin();",
"public Date getLastLoginTime() {\r\n return lastLoginTime;\r\n }",
"public Date getLastLoginTime() {\n return lastLoginTime;\n }",
"public Da... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs the absent modified value. | public static Value makeAbsentModified() {
return theAbsentModified;
} | [
"public static Value makeAbsent() {\n return theAbsent;\n }",
"public Value restrictToNotAbsent() {\n checkNotUnknown();\n if (isNotAbsent())\n return this;\n Value r = new Value(this);\n r.flags &= ~ABSENT;\n if (r.var != null && (r.flags & (PRESENT_DATA | ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns ResponseMetaDataXML, XML bean which is created by setting the values of this POJO instace. | public WebSocketResponseMetaDataXML toXML() throws TransportException {
WebSocketResponseMetaDataXML responseMetaData =super.toXML();
if (endPointHost != null) {
responseMetaData.setServiceEndpointHost(endPointHost);
}
if (endPointIP != null) {
responseMetaData.setServiceEndpointIp(endPoint... | [
"public String toXML() {\n return this.responseXml;\n }",
"public static WebSocketResponseMetaDataXML getSocketResponseMetaData(\n XmlObject xbean) throws TransportException {\n if (xbean == null) {\n return null;\n } else if (xbean instanceof WebSocketResponseMetaDataXML) {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
endpoint for translation preprocess: split document into sentences or segments | @RequestMapping(value = "/e-smt/splitdoc", method = {RequestMethod.POST, RequestMethod.GET})
public ResponseEntity<String> split(
@RequestHeader(value = "Accept", required = false) String acceptHeader,
@RequestHeader(value = "Content-Type", required = false) String contentTypeHeader,
... | [
"@Override\n\tprotected Map<Object, Object> rawTextParse(CharSequence text) {\n\n\t\tStanfordCoreNLP pipeline = null;\n\t\ttry {\n\t\t\tpipeline = pipelines.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAnnotation document = new Annotation(text.toString());\n\t\tpipeline.an... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the Binding's slot id. If this is 0, it is an AVM assigned id. | public void setSlotId(int slotId)
{
sharedBindingInfo.setSlotId(slotId);
} | [
"private void setSlotId(int slotId)\n {\n assert (slotId != ITraitsVisitor.RUNTIME_SLOT) : \"setSlotId should only be used manually allocated slot ids\";\n this.slotId = slotId;\n }",
"public void setSlot( int slot, Slot s );",
"private void setSlot(int slot) {\n\t}",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds song to array library list | public ArrayList addSong(Song newSong) {
Library.add(newSong);
return Library;
} | [
"public void addSong(Song song) {\n songLibrary.add(song);\n addArtists(song.getArtistList());\n }",
"public void addSong(Song song) {\n mSongs.add(song);\r\n }",
"private void createNewSongList() {\n\t\t//set up the default list of songs to the list\n\t\tsongs = new ArrayList<>();\n\t\t//a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
read APF document and create entities and relations | void readAPFdocument (Document apfDoc, String fileText) {
NodeList sourceFileElements = apfDoc.getElementsByTagName("source_file");
Element sourceFileElement = (Element) sourceFileElements.item(0);
sourceFile = sourceFileElement.getAttribute("URI");
sourceType = sourceFileElement.getAttribute("SOURCE");
Node... | [
"public void loadData(){\n try {\n entities.clear();\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.par... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Highlights the square a specific colour instead of the default green. | public void highlightSquare(Color pColor)
{
// Set the background colour
this.setBackground(pColor);
// Set the square that it can be occupied
setCanOccupy(true);
} | [
"public void highlightSquare()\n\t{\n\t\t// Depending on the square's colour, determine if the highlight should be light or dark green.\n\t\tif(color == Color.GRAY)\n\t\t{\n\t this.setBackground(Color.GREEN.darker());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.setBackground(Color.GREEN);\n\t\t}\n\t\t\n\t\t// Set th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns marks as integer array of marks | public int[] getMarks(){
return marks;
} | [
"public int getMarks() {\n return marks;\n }",
"public void setMarks(int[] newMarks){\n marks = newMarks;\n }",
"public int getBaseMarks() {\n return baseMarks;\n }",
"public int[] getIntArray() throws MdsException\n\t{\n\t\tfinal Data data = executeWithContext(\"LONG(DATA($1))\",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated int32 gang_count = 14; | int getGangCount(int index); | [
"int getGangCountCount();",
"int getGCount();",
"int getMingGangCount(int index);",
"int getMingGangCountCount();",
"@Test\n public void sdf() {\n StringANF anf = new StringANF(\"6996\");\n\n int k = 0;\n for (long i = 15; i > 1; i--)\n for (long j = i; j > 0; j--) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a Dictionary object containing all words from the listOfWords passed as a parameter and stores it as a BST | public Dictionary ( ArrayList < String > listOfWords ) {
super(listOfWords.get((listOfWords.size()-1)/2));
//store words list as binary tree
//starts with left side then with right
int start = 0;
int end = listOfWords.size()-1;
int mid = (start+end)/2;
makeTree(listOfWords, start, mid-1);
makeTree(li... | [
"private TrieNode buildTree(String[] words) {\r\n TrieNode root = new TrieNode();\r\n \r\n for(String word : words) {\r\n TrieNode current = root;\r\n //build the trie for each char in the word\r\n for(char c : word.toCharArray()) {\r\n int index ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
testTermValue does not chech the round triple because datatype and lexical form may not be preserved. Additional value tests needed. | @Test public void term_value_01() {
RDF_Term rt = testTermValue("123") ;
assertEquals(rt.getTermCase(), TermCase.VALINTEGER);
assertEquals(123, rt.getValInteger()) ;
} | [
"private double parseTerm() {\n double value = parseFactor();\n while (true) {\n if (token.getType().equals(Token.Type.DIVIDE)) { // division\n token = lexer.getNextToken();\n value /= parseFactor();\n } else if (token.getType().equals(Token.Type.MUL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tesselates the given polygon into a set of triangles. | public List<Triangle2D> tesselatePolygon(Polygon2D poly); | [
"public List<ga_Triangle2D> tesselatePolygon(ga_Polygon poly);",
"public List<Vector2> computeTriangles (final List<Vector2> polygon) {\r\n \t\t// TODO Check if LinkedList performs better\r\n \t\tfinal ArrayList<Vector2> triangles = new ArrayList<Vector2>();\r\n \t\tfinal ArrayList<Vector2> vertices = new ArrayLi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This adds a property descriptor for the Broker Open Cache Expiry feature. | protected void addBrokerOpenCacheExpiryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MQQueueManager_brokerOpenCacheExpiry_feature"), //$NON-N... | [
"protected void addExpiryIntervalPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResourceLocator(),\r\n\t\t\t\t getString(\"_UI_MQQueueManager_expiryInterval_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an onset to the end of this Timeline. | public Timeline addOnset(int duration, boolean isAccent)
throws IllegalArgumentException {
return insertOnset(pulses.size(), duration, isAccent);
} | [
"public void addToOnsets(entity.TransactionOnset element) {\n __getInternalInterface().addArrayElement(ONSETS_PROP.get(), element);\n }",
"void setEnd(Instant instant);",
"public void addMinorOnset() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"minor-onset\",\n nu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setDistance Listener method to display the distance covered and the number of wheel revolutions for the model car holding the ThunderBoard. The distance can be measured in either meters or feet. | @Override
public void setDistance(double distance, int revolutions, int measurementsType) {
distanceText.setText(String.format("%.1f", distance));
if (measurementsType == ThunderBoardPreferences.UNIT_METRIC) {
distanceUnitsText.setText(getString(R.string.motion_meters));
} else {... | [
"public void setDistance(double dist) \n {\n this.distance = dist;\n }",
"public void setViewDistance(float distance) { viewDistance = distance; }",
"public void setDistance(double aDistance) {\r\n distance = aDistance;\r\n }",
"public void setDistanceToScreen(double distance) {\n distance... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an operand from the entry | public DataProcessOperand(Entry entry) {
this(Misc.newList(entry));
} | [
"ExpOperand createExpOperand();",
"Operand createOperand();",
"InteractionOperand createInteractionOperand();",
"Operands createOperands();",
"ColumnOperand createColumnOperand();",
"INaviOperandTree getOperand();",
"OpFunctionArgOperand createOpFunctionArgOperand();",
"Expression createExpression();"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/INSERT INTO Vender (Id, Name, Location) VALUES (1, 'Best Buy', '123 Main'); | public static void createVender() throws IOException {
String name = names[random(50)] + " " + names[random(50)];
venders.add(vendId);
writer.write("INSERT INTO Vender (Id, Name, Location) Values (" + vendId++ +", '" + name + "', '" + streets[random(50)] + "'" + line);
writer.flush();
} | [
"void insertLocationID(int i, java.lang.String locationID);",
"@Insert({\n \"insert into eng_division_plan (division_sn_code, div_version, \",\n \"start_date, end_date, pre_jobs, \",\n \"version_date, version_man_code)\",\n \"values (#{divisionSnCode,jdbcType=VARCHAR}, #{divVersion,jdb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test will pass when totalNumberOfRecords are 29 | @Test
public void givenNumberOfRecords_WhenMatched_ShouldReturnTrue() {
String CSV_FILE_PATH = "src/test/resources/StateCensusData.csv";
try {
int numberOfRecords = indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);
Assert.assertEquals(2... | [
"@Test\n public void givenIPLMostWicketsCSVFile_whenCheckedForRecords_shouldReturnCorrectRecords() throws CricketLeagueAnalyserException {\n int numOfRecords = cricketLeagueAnalyser.loadLeagueData(IplEnumCollection.CricketerSkill.BOWLING, IPL_MOST_WICKETS_CSV_FILE_PATH);\n Assert.assertEquals(99,nu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method getUserCurrent. Contains the get parameter for the service | public String getUserCurrent() {
return userCurrent;
} | [
"@GET\n @Path(\"Current\")\n public User getCurrentUser() {\n return userFacade.getCurrentUser();\n }",
"@Override\r\n\tpublic User getCurrentUser() {\r\n\t\tString currentUserName = this.getCurrentUserName();\r\n\t\tUser userdetails = this.getByUsername(currentUserName);\r\n\t\treturn userdetails... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the Request by its id | public Request getRequest(UUID id); | [
"public FriendshipRequest getOne(Long id){\r\n return requestRepository.findOne(id);\r\n }",
"public Request getRequestById(String requestId) {\n for(Process process : this.getProcessSet()) {\n for(Request request : process.getRequestSet()) {\n if(request.getId().equals(requestId)) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the symbol which is currently in use as morelines symbol. Morelines symbol is the symbol user types at the end of the line informing the MyShell that the query is not yet finished and new furhter arguments are to be provided. | void setMorelinesSymbol(Character symbol); | [
"public void setMorelinesSymbol(Character symbol);",
"Character getMorelinesSymbol();",
"void setMultilineSymbol(Character symbol);",
"public void setMultilineSymbol(Character symbol);",
"private static boolean isMultiline(String line, char morelinesSymbol) {\n\t\treturn line.trim().endsWith(String.valueOf(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of CalificacionREST | public CalificacionREST() {
gson = new Gson();
sdao = new SolicitudDAO();
/**
* Creates a new instance of SolicitudREST
*/
} | [
"public CalificacionesResource() {\n }",
"public SolicitudREST() {\n gson = new Gson();\n sdao= new SolicitudDAO();\n }",
"Rest createRest();",
"@POST\n Response createCalendar(Calendar calendar);",
"public REST_Usuarios() {\n }",
"public EstadoFacadeREST() {\n super(Estad... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to return level select panel | public JPanel getSelectLevelPanel()
{
return selectLevelPanel;
} | [
"public LevelSelector getLevelSelector(){return levelSelector;}",
"public AbsBuilderLevelPanel getCurrentLevelPanel()\n\t{\n\t\tAbsBuilderLevelPanel card = null;\n\n\t\t//find the component that is set to visible (will be a JPanel\n\t\tfor (Component comp : pnlLevelSwitch.getComponents() ) {\n\t\t\tif (comp.isVis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ this method will edit a given practical | public void editPractical(Practical practical, String name) {
SQLiteDatabase dbs = this.getReadableDatabase();
Practical practical1 = new Practical();
Cursor cursor1 = dbs.rawQuery(" select * from "+ TABLE_CONTACTS+ " where "+ KEY_NAME+ " = ? ", new String[] {name});
cursor1.moveToFirst();
... | [
"public void setPractices(int newVal);",
"SrInwardTruckQualityCheck edit(SrInwardTruckQualityCheck srInwardTruckQualityCheck);",
"public boolean editCourse(String id) {\n\t\tScanner input= new Scanner(System.in);\r\n\t\tint index=getCourseIndex(id);\r\n\t\tSystem.out.println(\"What is the new professor's name\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that the getContactTrackingActivities throws the proper exception | @Test(expected = IllegalArgumentException.class)
public void getContactTrackingActivitiesExceptionTest() {
String contactId = null;
try {
ResultSet resultSet = mock(ResultSet.class);
resultSet = contactTrackingService.getActivities(contactId, 1, null);
verify(c... | [
"@Test(expected = IllegalArgumentException.class)\n public void getContactTrackingOpensExceptionTest() {\n String contactId = null;\n int limit = 0;\n\n try {\n\n ResultSet contactTrackingBounceResultSet = mock(ResultSet.class);\n\n contactTrackingBounceResultSet = cont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |