query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
IMLog.logd(" onTranslateBegin id:" + Thread.currentThread().getId()); | @Override
public void onTranslateBegin() {
} | [
"@Override\n public void onTranslateEnd() {\n }",
"public void translate(){\n\t}",
"public static String _activity_resume() throws Exception{\n_translategui();\r\n //BA.debugLineNum = 68;BA.debugLine=\"End Sub\";\r\nreturn \"\";\r\n}",
"@Override\n public void translateTo(Integer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Put or replace an int value. If the index is greater than the length of the JSONArray, then null elements will be added as necessary to pad it out. | public JSONArray put(int index, int value) throws JSONException {
this.put(index, new Integer(value));
return this;
} | [
"public JSONArray put(int index, Object value) throws JSONException {\r\n if (index < 0) {\r\n throw new JSONException(\"JSONArray[\" + index + \"] not found.\");\r\n }\r\n if (index < this.length()) {\r\n \tObject wrappedValue = JacksonWrapper.wrap(value);\r\n \tif (wr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the parent info. | public String getParentInfo() {
return this.parentInfo;
} | [
"public iTData getParent()\r\n {\r\n return theParent;\r\n }",
"public Integer getParentid() {\r\n return parentid;\r\n }",
"protected Metadata getParentMeta() {\n\t\treturn getParent().getMetadata();\n\t}",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build a rack from rack name. | protected RackComponent buildRack(String rackName) throws ComponentBuildException,
SynthComponentException
{
final String connectorClassPropertyName = rackName + ".connector";
String className = properties.getProperty(connectorClassPropertyName);
if (className == null) {
... | [
"public Builder setRack(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n rack_ = value;\n onChanged();\n return this;\n }",
"public Builder setRack(\n java.lang.String value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SELECT FROM rubrica WHERE name= ... AND surname = ... | public List<Contatto> findByNameAndSurname(String name, String surname); | [
"public static String queryByLastName(String name)\n\t{\n\t\treturn \"SELECT * FROM Author WHERE Last_Name = name\";\n\t}",
"public static String queryByFirstName(String name)\n\t{\n\t\treturn \"SELECT * FROM Author WHERE First_Name = name\";\n\t}",
"public Customer[] findWhereSurnameEquals(String surname) thro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get the location of the sample from the data spreadsheet | public static String getSampleLocation(int rowNum){
FileInputStream file = null;
Workbook wb = null;
try {
file = new FileInputStream(new File(SAMPLE_DATA_LOCATION));
try {
wb = new XSSFWorkbook(file);
} catch (IOException e) {
e.printStackTrace();
}
} catch (FileNotFoundException e1) {
... | [
"private String getPathToSampleSummary() {\n\t\treturn pathToSampleSummary.getText();\n\t}",
"public String getSample_path() {\n return sample_path;\n }",
"java.lang.String getExternalLocation();",
"public L getDocumentLocation();",
"public String getPictureLocation() {\n if (value == null)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
API freelancer follow job | @POST("follow/createFlcFollowJob")
Call<Void> createFlcFollowJob(@Query("flcId") String flcId,
@Query("jobId") String jobId,
@Query("createdBy") String createdBy,
@Query("accessTokenDb") String accessTokenDb); | [
"public void follow(int followerId, int followeeId) {\n\n }",
"Boolean sendFollowRequest(User user);",
"Result<Void> follow( String userId1, String userId2, boolean isFollowing);",
"public void metFollower() {\n metFollowers++;\n }",
"public void addFollow(Follow follow);",
"@GET(\"follow/getJo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get metrics for page access user Get metrics for page access user | @Test
public void getPagesPageIdPageAccessUsersPageAccessUserIdMetricsTest() throws ApiException {
String pageId = null;
String pageAccessUserId = null;
List<Metric> response = api.getPagesPageIdPageAccessUsersPageAccessUserIdMetrics(pageId, pageAccessUserId);
// TODO: test validati... | [
"@Test\n public void postPagesPageIdPageAccessUsersPageAccessUserIdMetricsTest() throws ApiException {\n String pageId = null;\n String pageAccessUserId = null;\n PostPagesPageIdPageAccessUsersPageAccessUserIdMetrics postPagesPageIdPageAccessUsersPageAccessUserIdMetrics = null;\n Page... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to provide a gross level of synchronization with the target monitored jvm. gross synchronization works by polling for the hotspot.rt.hrt.ticks counter, which is the last counter created by the StatSampler initialization code. The counter is updated when the watcher thread starts scheduling tasks, which is the la... | protected void synchWithTarget(Map<String, Monitor> map) throws MonitorException {
/*
* synch must happen with syncWaitMs from now. Default is 5 seconds,
* which is reasonabally generous and should provide for extreme
* situations like startup delays due to allocation of large ISM hea... | [
"void startStatisticsMonitor();",
"public void runSystemStatusManagerMonitor()\n\t{\n\t\tsystemStatusManagerMonitor = SystemStatusManagerMonitor.getInstance();\n\t\tsystemStatusManagerMonitor.monitorSystems();\n\t}",
"protected void latchStats()\n {\n operationalData.latchStats( pDuration.uncheckedGet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The GameMenuView constructor Purpose: Initialize the menu data Parameters: none Returns: none =================================== | public GameMenuView(){
super("\n" +
"**********************************\n" +
"* CITY OF AARON: GAME MENU VIEW *\n" +
"**********************************\n" +
" 1 - View the map\n" +
" 2 - View/Pri... | [
"public MainMenuView() {\t\t\r\n\t\t//initialize();\r\n\t}",
"public Menu() {\n mainMenuScene = createMainMenuScene();\n mainMenu();\n }",
"public MenuSession() {\n initLayout();\n initWindow();\n initMainMenu();\n }",
"public Menu() {\n super();\n }",
"public Menu c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Composition + Inter + Sales Invoice + NIL Rated | @Test(priority = 15)
public static void SalesInvoice_Creationfor_India_Composition_InterState_NIL_Rated()
throws InterruptedException, AWTException, IOException {
GST_Sales_Invoice SI = new GST_Sales_Invoice();
SI.createSalesInvoice_NIL_Rated_Exempted_Non_GST(driver, Composition_Customer_Code_InterState,
N... | [
"@Test(priority = 14)\n\tpublic static void SalesInvoice_Creationfor_India_Composition_IntraState_NIL_Rated()\n\t\t\tthrows InterruptedException, AWTException, IOException {\n\n\t\tGST_Sales_Invoice SI = new GST_Sales_Invoice();\n\t\tSI.createSalesInvoice_NIL_Rated_Exempted_Non_GST(driver, Composition_Customer_Code... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the PictureConfig used to take this Picture. | public PictureConfig getConfig() {
return config;
} | [
"protected DrawableConfigurationInterface getConfig() {\n return config;\n }",
"public Config getConfig();",
"protected DrawableDisplayConfigurationInterface getDisplayConfig() {\n return displayConfig;\n }",
"public Config getPoolConfig() {\n\t\treturn config;\n\t}",
"public DeviceConfi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the component container populated for the given class loader. | public static ComponentContainer global(final ClassLoader loader) {
return new ContainerBoundary(loader);
} | [
"public ContainerLoader getLoader();",
"ClassLoader getWebComponentClassLoader(URI componentId);",
"public ClassLoader getClassLoader () { return _classLoader; }",
"IScriptLoader getLoader();",
"private ClassLoaderProvider getCLP()\n {\n return getBeanContext().getClassLoaderProvider();\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
=================== start header footer view ======================= // | @Override
public void addHeaderView(View v) {
if (mHeaderFooterHelper == null)
mHeaderFooterHelper = new HeaderFooterHelper();
int headerSize = getHeaderSize();
mHeaderFooterHelper.addHeaderView(v);
notifyItemInserted(headerSize);
} | [
"private void manageHeaderView() {\n PickupBoyDashboard.getInstance().manageHeaderVisibitlity(false);\n HeaderViewManager.getInstance().InitializeHeaderView(null, view, manageHeaderClick());\n HeaderViewManager.getInstance().setHeading(true, mActivity.getResources().getString(R.string.bokings))... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert from DTO to entity. | E convertToEntity(D dto); | [
"public abstract T convertToEntity(D dto);",
"E mapDtoToEntity(D dto);",
"E mapToEntity(D dto);",
"D convertToDTO(E entity);",
"public abstract D convertToDto(T entity);",
"private static DiaEntity basicDTO2Entity(DiaDTO dto) {\n if (dto != null) {\n DiaEntity entity = new DiaEntity();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the distance of the closest pair of points | public static Pair getClosestPair(Point[] points) {
Arrays.sort(points);
Pair pair = checkIdentical(points);
if (pair != null)
return pair;
else {
Point[] pointsOrderedOnY = points.clone();
Arrays.sort(points);
return distance(points, 0, points.length - 1, pointsOrderedOnY);
}
} | [
"public static double closestDistance2(Point[] points) {\n double closest = points[0].distance(points[1]);\n for (int i = 0; i < points.length; i++) {\n for (int j = i + 1; j < points.length; j++) {\n double dist = points[i].distance(points[j]);\n closest = Math.min(closest, dist);\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the keys of this cache/map | public List<Key> getKeys() {
List<Key> keys = new ArrayList<Key>();
keys.addAll(this.cache.keySet());
return keys;
} | [
"public Set<String> keySet() {\n return cache.keySet();\n }",
"public Collection<T> getKeys() {\n return map.keySet();\n }",
"public ArrayList<K> keys() {\n \n \tArrayList<K> returnKey;\n \tint entryNum = this.numEntries;\n \treturnKey = new ArrayList<K>(entryNum);\n \t\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds the URL and returns it as a string. If the "encode" argument is true, it also encodes the URL. | public String toString(boolean encode) {
StringBuilder url = new StringBuilder();
boolean addSlash = true;
//Protocol
url.append(super.getProtocol());
//Media-Type
if(mediaType != null){
url.append(mediaType);
}
//Base64
if(base64){
... | [
"public String toString(boolean encode){\n StringBuilder url = new StringBuilder();\n\n //Protocol\n url.append(super.getProtocol());\n\n //E-Mail address\n //# Throw an error if the e-mail address is null or empty\n if(emailAddress == null || emailAddress.isEmpty()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtains the value of a list of characters as a string. | String getListChars() throws Exception; | [
"@RequiresApi(api = Build.VERSION_CODES.N)\n private String toString(List<Character> array) {\n if (array.isEmpty()) {\n return \"\";\n }\n StringBuilder temp = new StringBuilder();\n array.forEach(temp::append);\n return temp.toString();\n }",
"public String In... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function will get the pull quote from component Library and drops into the pull quote text area | public static void getPullQuote() throws Exception {
Window window = getWindowProperty(STORY_PREPARATION_PAGE);
Property getPullQuoteSelectProperty = window.getPropertyByName(PULL_QUOTE_SELECT);
AutoIt.methode.winActivate(window.getTitle());
AutoIt.methode.sleep(INTERVAL);
AutoIt.methode.controlFocus(window.g... | [
"public static void textPullQuote(String pullQuoteText) throws Exception {\n\t\tWindow window = getWindowProperty(STORY_PREPARATION_PAGE);\n\t\tProperty PullQuoteLineProperty = window.getPropertyByName(PULL_QUOTE_LINE);\n\t\tAutoIt.methode.winActivate(window.getTitle());\n\t\tAutoIt.methode.sleep(INTERVAL);\n\t\tAu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes jPanelSetParameterAlgoritma | private JPanel getJPanelSetParameterAlgoritma() {
if (jPanelSetParameterAlgoritma == null) {
jLabelBeta1 = new JLabel();
jLabelBeta1.setText("beta(konstanta pengendali visibilitas jejak semut)");
jLabelNCmax1 = new JLabel();
jLabelNCmax1.setText("NCmax(jumlah siklus semut)");
jLabelTou1 = new JLabel();... | [
"private JPanel getJPanelSetParameter() {\n\t\tif (jPanelSetParameter == null) {\n\t\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\t\tgridBagConstraints.gridx = -1;\n\t\t\tgridBagConstraints.gridy = -1;\n\t\t\tjPanelSetParameter = new JPanel();\n\t\t\tjPanelSetParameter.setLayout(new Grid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes an input stream to a file specified by its path. | public static void writeInputStreamToFile(final InputStream input, final File file) throws IOException {
try (OutputStream output = Files.newOutputStream(file.toPath())) {
final byte[] buffer = new byte[BUFFER_SIZE];
for (int bytes = input.read(buffer); bytes > -1; bytes = input.read(buf... | [
"public static void write(InputStream is, File file) throws IOException {\n OutputStream os = null;\n try {\n os = new FileOutputStream(file);\n byte[] buffer = new byte[BUFFER_SIZE];\n int count;\n while ((count = is.read(buffer)) != -1) {\n os.write(buffer, 0, count);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
KSNotes: testToString is a test that actually takes a typed out String as an array defines the typed out array as the expected result given a sudoku add guess scenario and then checks if the toString method from the real program which shows the same "arraystring" as the "answer key" does. | private static boolean testToString() {
String answer = "1 2 3 4 9 7 8 6 5 \n" +
"4 5 9 _ _ _ _ _ _ \n" +
"6 7 8 _ _ _ _ _ _ \n" +
"3 _ _ _ 1 _ _ _ _ \n" +
"2 _ _ _ _ _ _ _ _ \n" +
"9 _ ... | [
"public void testToString() {\n assertEquals(\"toString returns incorrect string.\",\n \"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\", array.toString());\n\n assertEquals(\"toString on empty array incorrect.\",\n \"[]\", empty.toString());\n }",
"@Test\n public void testGetAnalysis_String() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find expired jobs (Not yet implemented) | @Override
public List<HistoryJobEntity> findExpiredJobs(Page page) {
return Lists.newArrayList();
} | [
"private List<BatchJobInstance> getFailedJobs() {\r\n\t\tlog.info(\"Searching for failed jobs ...\");\r\n\t\tlog.info(\" \");\r\n\r\n\t\tList<BatchJobInstance> jobs = new ArrayList<BatchJobInstance>();\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tString qs = \"sele... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the sub matrix of the given matrix m, between the top left given element and the bottom right given element. assumes that i2>i1 and j2>j1 | public static int[][] subMatrix(int[][] m, int i1, int j1, int i2
, int j2) {
int N = i2 - i1 + 1;
int M = j2 - j1 + 1;
int[][] subMatrix = new int[N][M];
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
subMatrix[i][j] = m[i + i1 - 1][j + j1 - 1];
}
}
return subMatrix;
} | [
"Matrix sub(Matrix M){\n if (this.getSize() != M.getSize()) {\n throw new RuntimeException(\"Matrix Error: sub() called on Matrices of different size\");\n }\n Matrix A = new Matrix(this.getSize());\n for (int i = 1; i <= this.getSize(); i++) {\n List t = this.row[i];\n L... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
construct a DirTree from all the zip entries. Later we sill convert into final tree of nodes | private DirNode load(ErrorHandler handler) throws IOException {
DirTree zipTree = new DirTree( (new File(zipFileName)).getName() );
try ( ZipFile zip = new ZipFile(zipFileName) ) {
java.util.Enumeration <? extends ZipEntry> entries = zip.entries();
while (entrie... | [
"private ArchiveEntriesTree buildArchiveEntriesTree() {\n ArchiveEntriesTree tree = new ArchiveEntriesTree();\n String repoKey = getRepoKey();\n ArchiveInputStream archiveInputStream = null;\n try {\n ArchiveEntry archiveEntry;\n // create repo path\n Rep... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns this array as an array of doubles | public abstract double[] asDoubleArray(); | [
"public double[] toDouble(){\n\t\tdouble[] out = new double[this.length];\n\t\tfor (int j = 0; j < this.length; j++){\n\t\t\tout[j] = this.x[j];\n\t\t}\n\t\treturn out;\n\t}",
"public abstract double[] toDoubleArray();",
"public abstract double[] getAsArray();",
"public double[] toDoubleArray()\n\t{\n\t\tdoub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A POST method call to take the user id and pwd Validate the user and if successful, show the welcome page. | @RequestMapping(value="/login", method = RequestMethod.POST)
@ApiOperation(value = "POST call to validate the user and route to Welcome Page.")
public String showWelcomePage(ModelMap model,
@ApiParam(name = "name", value = "User Name") @RequestParam String name,
@ApiParam(name = "password", value... | [
"public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\tuser = new User(request.getParameter(\"username\"),\r\n\t\t\t\trequest.getParameter(\"password\"));\r\n\r\n\t\tus = new Users();\r\n\r\n\t\tif (us.getP().userExist(user) == true) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method Rotates the Sprite // | public void rotateSprite(int dt) {
spriteDirection += dt * spriteRotation;
aTrans = AffineTransform.getRotateInstance(-spriteDirection+(Math.PI/2), width/2, height/2);
aTransOp = new AffineTransformOp(aTrans, AffineTransformOp.TYPE_BILINEAR);
} | [
"@Override\n\tpublic void rotate(float radians) {\n\t\tfinal Point center = new Point(getX(), getY());\n\t\tPoint.rotate(center, radians, swingX, swingY);\n\t\tfinal float dx = center.x - getX();\n\t\tfinal float dy = center.y - getY();\n\t\tsuper.offset(dx, dy); // Note super.offset() will move the center p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Manually set the current testcaseState | public void setTestcaseState(
TestCaseState testCaseState ) {
this.testCaseState = testCaseState;
} | [
"@Test\n\tpublic void testSetState() {\n\t\tDriver driver = new Driver(\"William\",\"Willy\");\n\t\tdriver.setState(\"on-a-ride\");\n\t\tassertEquals(driver.getState(),\"on-a-ride\");\n\t}",
"public void setState(State state) {\n\t\tenvironmentStatus = state.name();\n\t\tsetupResult = state.name();\n\t}",
"@Tes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes a compare operation, given the reference location for the source HTML document and destination HTML document, a writer with which to write the result to the client, and a mapping of optional arguments that may be used by the operation to configure the comparison. | protected abstract void doCompare(String srcDocument, String destDocument,
Writer writer, Map<String, Object> options) throws Exception; | [
"public void runDiff( final String folder1, final String folder2, final String listFilesToCompare ) throws Exception {\n\n final File report = new File(reportFolder);\n report.mkdir();\n System.out.println( \"output: to folder '\" + report + \"'\" );\n\n final FileSystem ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The length of the vertical radii of the topright corner. | public final double getTopRightVerticalRadius() { return topRightVerticalRadius; } | [
"public final double getBottomRightVerticalRadius() { return bottomRightVerticalRadius; }",
"public float getTopRightCornerRadius() {\n return cornerRadius.y;\n }",
"private float longestSideLength()\n {\n return maxCorner - minCorner;\n }",
"public int getVerticalRadius() {\r\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the current train is joining the train passed by parameter. | public boolean isJoining(Train train){
return join==train;
} | [
"private boolean hasTrainPassed(Train train){\n\t\tif (train==null)\n\t\t\treturn true;\n\t\tfor (Car c : cars)\n\t\t\tfor (Car c2 : train.getCars())\n\t\t\t\tfor (Point2D.Float p : c.getPoints())\n\t\t\t\t\tif (c2.contains(p))\n\t\t\t\t\t\treturn false;\n\t\treturn true;\n\t}",
"private boolean canJoin() {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether add and OccurrencesOf return the correct output when only one item is added to the cart | public static boolean testAddAndOccurrencesOfForOnlyOneItem() {
boolean testPassed = true; // evaluated to true if test passed without problems, false otherwise
// define the shopping cart as an oversize array of elements of type String
// we can set an arbitrary capacity for the cart - for instance 10
... | [
"public static boolean testAddOccurrencesOfDuplicateItems() {\n\t \n\t boolean testPassed = false; \n\t \n\t String[] cart = new String[10];\n\t \n\t int count = 0;\n\t \n\t \n\t for (int i=0; i<1; ++i) {\n\t\t \n\t ShoppingCart.add(5, cart, count);\n\t \n\t }\n\t \n\t if (ShoppingCart.occurrencesOf(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FIXME: Are there other characters than comma which need escaping? | private static String escape(String s) {
StringBuilder buf = new StringBuilder();
int length = s.length();
for (int i = 0; i < length; i++) {
char c = s.charAt(i);
if (c == ',') {
buf.append("\\,");
} else {
buf.append(c);
... | [
"private static String seperateValue() {\n return \"\\\"\" + \", \" + \"\\\"\";\n }",
"private String escape(String token) {\n return token.replace(\",\" , \"\");\n }",
"public static String escapeCommas(String in) {\n\t\treturn in.replace(\"\\\\\", \"\\\\\\\\\").replace(\",\", \"\\\\,\");\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the annotations in the implementing class expects the implementing class to have 1 BackendDescription and 0 or more PropertyDescription | private void parseClassAnnotations(Class<? extends Backend> implementingClass) throws InvalidBackendException {
// load class
try {
Class.forName(implementingClass.getCanonicalName());
} catch (ClassNotFoundException e) {
throw new InvalidBackendException("Class not found, sho... | [
"InstrumentedType withAnnotations(List<? extends AnnotationDescription> annotationDescriptions);",
"private void parseAnnotation(final List<ScannedAnnotation> descriptions, final AnnotationNode annotation,\n final Object annotatedObject) {\n // desc has the format 'L' + className.replace('.', '/... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getSkin get skin name for menu element | public String getSkin()
{
// get skin from definition or inherit from parent menu
String skin = definition.getSkin();
if (skin == null)
{
skin = super.getSkin();
}
return skin;
} | [
"int getSkin();",
"public String getSkinName() {\n return skinName;\n }",
"abstract public Skin getSkin();",
"public int getSkin() {\n return skin_;\n }",
"public String getSkin()\n {\n return this.xwiki.getSkin(getXWikiContext());\n }",
"public String getWebappSkinName()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .cosmos.gov.v1beta1.Deposit deposits = 1 [(.gogoproto.nullable) = false]; | cosmos.gov.v1beta1.Deposit getDeposits(int index); | [
"java.util.List<? extends cosmos.gov.v1beta1.DepositOrBuilder> \n getDepositsOrBuilderList();",
"java.util.List<cosmos.gov.v1beta1.Deposit> \n getDepositsList();",
"cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getDepositOrBuilder();",
"public ArrayList<ResourceAmount> getDeposits() {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays a victory message, and allow player to return to IHM Main. | public void displayVictory(); | [
"public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }",
"public void displayVictoryCard() {\n System.out.println(\"Ta Victory Card est : \" + GameManager.getInstance().getPlayerAtIndex(GameManager.getInstance().getPlayerIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Paints the ring labels. | private void paintRingLabels(Graphics g)
{
g.setColor(myFontColor);
final int labelYOffset = g.getFont().getSize() >> 1;
for (List<OpsClockCell> ring : getWheel(g))
{
for (OpsClockCell segment : ring)
{
if (segment.getRingLa... | [
"@Override\n protected void createLabels()\n {\n String text = this.getGraphicLabel();\n\n this.addLabel(text); // Start label\n this.addLabel(text); // End label\n }",
"public void drawLabel(Renderer renderer){\n \n \n \t//if (!getView3D().isStarted()) return;\n \t\n \t\tif(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
perform query: SELECT DISTINCT processInstanceId, duration FROM PROCESS_USAGE_SUMMARY WHERE AND | public String getExecutionTimeVsProcessInstanceId(String filters) {
String sortedResult = "";
try {
if (BPMNAnalyticsCoreUtils.isDASAnalyticsActivated()) {
JSONObject filterObj = new JSONObject(filters);
long from = filterObj.getLong(BPMNAnalyticsCoreConstants.START_TIME);
long to = filterObj.getLong... | [
"public String getTotalTimeVsUserIdForProcess(String filters) {\n\t\tString sortedResult = \"\";\n\t\ttry {\n\t\t\tif (BPMNAnalyticsCoreUtils.isDASAnalyticsActivated()) {\n\t\t\t\tJSONObject filterObj = new JSONObject(filters);\n\t\t\t\tString processId = filterObj.getString(BPMNAnalyticsCoreConstants.PROCESS_ID);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Represents a dataset that contains genepair relation information. | public interface GenePairRelationDataset extends Identifiable, Versioned, Loadable {
/**
* Gets relation types.
*
* @return relation types
*/
@NotNull
List<GenePairRelationType> getRelationTypes();
/**
* Gets species.
*
* @return species
*/
@NotEmpty
I... | [
"private Dataset createDataset1() {\n final RDF factory1 = createFactory();\n\n final IRI name = factory1.createIRI(\"http://xmlns.com/foaf/0.1/name\");\n final Dataset g1 = factory1.createDataset();\n final BlankNode b1 = createOwnBlankNode(\"b1\", \"0240eaaa-d33e-4fc0-a4f1-169d6ced3680... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets up the test to create a new CourseNameValidatorFSM() | @Before
public void setUp() throws Exception {
cn = new CourseNameValidatorFSM();
} | [
"@Test\r\n\tpublic void testIsValidStateInitial() {\r\n\t\ttry {\r\n\t\t\tcn.isValid(\"216CSC\");\r\n\t\t\tfail();\r\n\t\t} catch (InvalidTransitionException e) {\r\n\t\t\tassertEquals(e.getMessage(), \"Course name must start with a letter.\");\r\n\t\t}\r\n\t}",
"public uCoursesTest(String name) {\n\t\tsuper(name... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Private constructor. Just start the timer thread. | private Timer() {
myThread = new TimerThread();
myThread.start();
} | [
"public Timer() { start = System.nanoTime(); }",
"public Timer(){}",
"public Timer() { }",
"public void start() {\r\n\t\tif (timerThread.isAlive())\r\n\t\t\tstop();\r\n\t\t\r\n\t\ttimerThread = new Thread(this);\r\n\t\t\r\n\t\tticksPerformed = 0;\r\n\t\tstartTime = System.currentTimeMillis();\r\n\t\trunning =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the CheckID field. The ID of the check to which the gross amount corresponds | @gw.internal.gosu.parser.ExtendedProperty
public java.lang.Long getCheckID(); | [
"public Integer getCheckId() {\n return checkId;\n }",
"public Integer getCheckNumber() {\n return checkNumber;\n }",
"public java.lang.String getCheckNumber() {\n return checkNumber;\n }",
"public void setCheckId(Integer checkId) {\n this.checkId = checkId;\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column shopping_cart.product_model_id | public Long getProductModelId() {
return productModelId;
} | [
"public Integer getModelId() {\r\n return modelId;\r\n }",
"public Long getId_product() {\n\t\treturn id_product;\n\t}",
"int getModelId();",
"public String getModelId() {\r\n return modelId;\r\n }",
"public Long getProductid() {\r\n\t\treturn productid;\r\n\t}",
"@Override\n\tpublic l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate qno and send to blog | private String sendToBlog() throws IOException{
//generate text
Qno qno = new Qno();
qno.load("patterns.txt");
String text = qno.execute();
String title = Calendar.getInstance().getTime().toString();
this.sendEmail(title ,text);
return text;
} | [
"public void setqNo(Integer qNo) {\n this.qNo = qNo;\n }",
"public void generateQ(){\n\t\t\tq = wsum.add(BigInteger.ONE);\n\t}",
"public void setQq(String qq) {\r\n this.qq = qq;\r\n }",
"public static String buildQrUrl(HttpServletRequest srequest, String nut) {\n //\"http://\" + sr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the width of the to area covered by the joystick entitie | public float getWidth()
{
return this.joystickOuter.getWidth();
} | [
"int getBoundsWidth();",
"public float getWidth()\n {\n return getUpperRightX() - getLowerLeftX();\n }",
"public double getWidth() {\r\n \tif (this.x1 >= this.x3) {\r\n \t\tif (this.y1 >= this.y3) {\r\n \t\t\twidth = Math.sqrt(Math.pow((this.x1 - this.x3), 2) + Math.pow((this.y1 - this.y3)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the font for the major tick labels. | public Font getMajorTickLabelFont()
{
Font font = UIManager.getFont( MAJOR_TICK_LABEL_FONT );
if ( font == null )
{
font = LafDefaults.DEFAULT_MAJOR_TICK_FONT;
}
return font;
} | [
"public JRFont getTickLabelFont();",
"public Font getMinorTickLabelFont()\n {\n Font font = UIManager.getFont( MINOR_TICK_LABEL_FONT );\n if ( font == null )\n {\n font = LafDefaults.DEFAULT_MINOR_TICK_FONT;\n }\n return font;\n }",
"public String getTickFontName() {\n return ticks.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the nodeTypes property: The list of node types in the cluster. | List<NodeTypeDescription> nodeTypes(); | [
"public List<NodeTypeDescription> nodeTypes() {\n return this.nodeTypes;\n }",
"Collection<TGNodeType> getNodeTypes();",
"public String[] getNodeTypes()\r\n {\r\n\treturn ntMap.keySet().toArray(new String[ntMap.size()]);\r\n }",
"List<NodeTypeData> getAllNodeTypes() throws RepositoryException;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Show or hide buttons based on the boolean value | private void showHideButtons() {
mBinding.ibPrev.setVisibility(vm.shouldShowPrevBtn() ? View.VISIBLE : View.INVISIBLE);
mBinding.ibNext.setVisibility(vm.shouldShowNextBtn() ? View.VISIBLE : View.INVISIBLE);
} | [
"public boolean isButtonVisible();",
"private void showButtons(boolean show) {\n int visibility = show ? View.VISIBLE : View.GONE;\n mMuteBtn.setVisibility(visibility);\n mSwitchCameraBtn.setVisibility(visibility);\n }",
"private void hideOrShowButtons(int status, int hideOrShow){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Hit chicken Hit the chicken selected by the user, reduce it's hearts by one and make it sad | public void hitChicken() {
if (this.hearts <= 0) {
System.out.println("You can't hit a dead chicken!");
} else {
// reduce hearts of chicken by 1
this.hearts -= 1;
// update if chicken is happy or sad
this.happyOrSad = false;
// ch... | [
"public void playWithChicken(Chicken playmate) {\n if (this.hearts <= 0 || playmate.hearts <= 0) {\n System.out.println(\"You can't play with a dead chicken!\");\n } else {\n this.happyOrSad = true;\n playmate.happyOrSad = true;\n System.out.println(\"This c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check whether the accelerometer rotation is enabled | public boolean isAccelerometerRotationEnabled() {
try {
int accelerometerRotationEnabled = Settings.System.getInt(
mContext.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION);
return accelerometerRotationEnabled == 1;
} catch (Settings.SettingNotFou... | [
"public boolean isAccelerometerPresent(){\n return _isAccelerometerPresent;\n }",
"public boolean isRotationEnabled() {\n return mRotationEnabled;\n }",
"private boolean isOrientationLocked() {\n return Settings.System.getInt(getPreferenceScreen().getContext().getContentResolver(),\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ SHOULD NOT BE USED Name: setTicker Param:String ticker Return: Purpose: Sets the ticker of the stock | private void setTicker(String ticker) {
this.ticker = ticker;
} | [
"public void setTicker(java.lang.String ticker) {\n this.ticker = ticker;\n }",
"public void setStock(String ticker) {\n this.ticker = ticker;\n stockLabel.setText(ticker.toUpperCase());\n setFocus(buttons.get(3));\n }",
"public void setTicker(Ticker ticker) {\n super.se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Wizard attributes Random selection of character's >>mana<< | public int setMana() {
if (characterClassTemp == 2) {
manaTemp = ThreadLocalRandom.current().nextInt(10, 50 + 1);
}
return manaTemp;
} | [
"private String randomOneHandedWeaponPrefix(){\r\n int randomNumber = random(5);\r\n String prefix = \"\";\r\n switch (randomNumber){\r\n case 0: prefix = \"Short sword\"; break;\r\n case 1: prefix = \"Axe\"; break;\r\n case 2: prefix = \"Mace\"; break;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Invoked when the underlying model structure has completely changed. For example, if the number of columns in a TableModel changed, this method would be invoked. You normally do not call this method. This method is public to allow view classes to call it. | public abstract void modelStructureChanged(); | [
"@Override\r\n\tpublic void modelChanged() \r\n\t{\t\t\r\n\t\t//Save model to file\r\n\t\tsaveModelToFile();\r\n\t}",
"public void fireModelChanged() {\n\t\tStyleModelEvent e =\n\t\t\tnew StyleModelEvent(this, StyleModelEvent.MODEL_CHANGED);\n\t\tfireStyleChanged(e);\n\t}",
"public void modelsChanged(IModelProv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
StartUDPConnection method stop the connector. Once stopped, this client will not send or receive. | public boolean stopUDPConnection() {
if(isStarted) {
comm.stopConnection();
isStarted = false;
return true;
} else return false;
} | [
"public static void stopConnection() {\n\t\trunning = false;\n\t}",
"public void stopConnecting();",
"public void stop() {\n this.reciever.kill();\n this.socket.close();\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic void stopUDPTask() {\r\n // Interrupt the thread so it unblocks an... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AstTypeDefinition__ParametersAssignment_2_1_1_1" $ANTLR start "rule__AstTypeDefinition__ConstructorAssignment_4_0_0" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23257:1: rule__AstTypeDefinition__ConstructorAssignment_4_0_0 : ( ruleAstConstru... | public final void rule__AstTypeDefinition__ConstructorAssignment_4_0_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23261:1: ( ( ruleAstConst... | [
"public final void rule__AstTypeDefinition__ConstructorAssignment_4_0_1_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23276:1: ( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Equivalent to calling setBitmap(view, view.getDrawable(), bitmap, radii). | public static void setBitmap(ImageView view, Bitmap bitmap, float[] radii) {
DebugUtils.__checkError(view == null || bitmap == null, "Invalid parameters - view == null || bitmap == null");
setBitmap(view, view.getDrawable(), bitmap, radii);
} | [
"protected abstract void setImageBitmapInto(Bitmap bitmap, View view);",
"public void setAttributesBitmap(int bitmap);",
"public void setImageBitmap(Bitmap bitmap);",
"public Bitmap setViewToBitmapImage(View view) {\n Bitmap returnedBitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Approach 3: Bottom up DP Tabulation create a 1d array table of length fees.length table[i] represents minimum fees required to reach the top (beyond the top most stair) in fees subarray starting from i to fees.length1 We are interested in table[0] Time Complexity: O(n) Space Complexity: O(n) | private int minimumFeeApproach3(int[] fees){
int length = fees.length;
int[] table = new int[length];
//Base cases
table[length-1] = fees[length-1];
for(int i = length-2; i>=0; i--){
table[i] = fees[i] + Math.min(
Math.min(
... | [
"private int[] optimalTable(int step) {\n\n\t\t// finds highest k-cover in each threshold\n\t\tint[][] list = fullMinCovers[step];\n\t\tint[][] results = new int[list.length][3];\n\t\t\n\t\tfor (int t=0 ; t<list.length ; t++) {\n\t\t\tfor (int c=0; c<list[0].length ; c++) {\n\t\t\t\tif (list[t][c] > results[t][0]) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate all coordinators data by office and role type | @RequestMapping(value = "/coordbyofficerole", method = RequestMethod.GET)
public @ResponseBody List<MasterUser> getCoordByOfficeRole(HttpServletRequest httpRequest) {
logger.debug("Received request to get all coordinators data by office and role type");
//
int officeId = Integer.parseInt(httpReque... | [
"@GET\n\t@Path(\"/openorders/coordinators\")\n\t@Produces(value = {MediaType.APPLICATION_JSON})\n\tpublic final Response PKG_DASHBOARD_getListCoordinators(\n\t @MatrixParam(\"bsn_ent_id\") String bsnEntId,\n\t @DefaultValue(\"1\") @MatrixParam(\"bsn_ent_lvl\") int bsnEntLvl,\n\t @MatrixParam(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reverse what the convertUnitaryVector does. | private Vector2Int revertConvertUnitaryVector(Vector2Int directionVector) {
int x = 0, y = 0;
if (directionVector.getXAsInteger() == 0) {
if (directionVector.getYAsInteger() == 0) {
x = -1;
y = -1;
} else if (directionVect... | [
"public ByteVector reverse() {\n byte[] buff = this.toByteArray();\n int n = buff.length - 1;\n byte temp;\n for (int j = (n - 1) >> 1; j >= 0; --j) {\n temp = buff[j];\n buff[j] = buff[n - j];\n buff[n - j] = temp;\n }\n return new ByteVect... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
parse an boolean value from xml parsed data | public static boolean parseBoolean(String value)
throws SAXException
{
if(value == null)
{
throw new SAXException("cannot parse numeric value from null string");
}
value = value.trim();
return (Boolean.valueOf(value)).booleanValue();
} | [
"private String parseBoolean () {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n char chr=next();//get next character\r\n assert \"ft\".indexOf(chr)>=0;//assert valid boolean start character\r\n switch (chr) {//switch on first character\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This will test the getDate method | public void testGetDate() {
assertEquals(test1.getDate(), 20200818);
} | [
"public void testGetDate ()\n\t{\n\t\tassertEquals(logInfo.getDate(), date);\n\t}",
"@Test\n public void testServerWebReader_setDate(){\n ServerWebReader testServerWebReader = new ServerWebReader();\n testServerWebReader.setDate(\"1000\");\n assertEquals(\"1000\", testServerWebReader.getDa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
FIXME The pos can must not be less than a min pos; the exposed start pos should not be used here | @Override
public boolean isPosBeforeStart() throws IOException {
boolean result = actualPos < minPos;
return result;
} | [
"Position getStart();",
"public int getStartPos() {\n return startPos;\n }",
"@Override\r\n \tpublic final int getStartPos() {\r\n \t\treturn sourceStart;\r\n \t}",
"@Override\n public Vec2 startPosition() {\n return new Vec2(-7, -7);\n }",
"public void setStartPos(int startPos) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an empty binary | public Binary() {
} | [
"Binary createBinary();",
"public void createEmptyNode(){\n\t\t\t\n\t\t\tNode newNode = new Node();\n\t\t\tnewNode.terminal = false;\n\t\t\troot = newNode;\n\t\t}",
"public static Data empty() {\r\n\t\treturn new Data(ByteBuffer.allocate(0)); // Make a new Data object from a 0-byte ByteBuffer\r\n\t}",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct the repository connection. | public RepositoryConnection(Connection conn) {
this.conn = conn;
} | [
"void init(String repository) throws Exception;",
"public void createRepo() {\n repository = new Repository(this.name, this.fullname, this.git_url);\n }",
"public abstract GitConnection getConnection(File workDir, GitUser user, LineConsumerFactory outputPublisherFactory) throws GitException;",
"stat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initial size of a data region reserved for system cache. | public long getInitialSize() {
return initSize;
} | [
"public long getSystemCacheInitialSize() {\n return sysCacheInitSize;\n }",
"public int getInitialSize() {\n return initialSize;\n }",
"public static long getDefaultRamCapacity() {\n return defaultRamCapacity;\n }",
"public Integer getInitialSize() throws SQLException, IOExceptio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
index of mnemonic word the device is expecting during ResetDevice workflow optional uint32 reset_word_pos = 11; | int getResetWordPos(); | [
"public int getResetWordPos() {\n\t\t\treturn resetWordPos_;\n\t\t}",
"public int getResetWordPos() {\n\t\t\t\treturn resetWordPos_;\n\t\t\t}",
"java.lang.String getResetWord();",
"public Builder setResetWordPos(int value) {\n\t\t\t\tbitField0_ |= 0x00000400;\n\t\t\t\tresetWordPos_ = value;\n\t\t\t\tonChanged... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An ALEVOS environment should provide an exogenous coordination mechanism defined by a transition system. | public interface IALEVOSEnvironment extends IEnvironment{
public AnnotatedTransitionSystem getATS();
} | [
"@Override\n public Environment getEnvironment(XYCoord coord)\n {\n return master.getEnvironment(coord);\n }",
"public interface IAeProcessCoordination {\r\n /**\r\n * Registers the coordination id with process invoke activity's enclosing scope.\r\n *\r\n * @param aProcessId\r\n * @param ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use for the client's activity to process token response attached to their intent | public static String handleResponse(Intent intent) {
if (intent.hasExtra(TOKEN_RESPONSE)) {
return intent.getStringExtra(TOKEN_RESPONSE);
}
return null;
} | [
"void onAuthTokenReceived(int requestCode, String accountName, String authToken);",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(requestCode==request_Code){\n AuthenticationRes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a library of cell styles | private static Map<String, CellStyle> createStyles(Workbook wb)
{
Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
DataFormat df = wb.createDataFormat();
Font titleFont = wb.createFont();
titleFont.setFontHeightInPoints((short) 18);
titleFont.setBoldweight(Font.BOLDWEIGHT_BOLD);
t... | [
"protected static Map<String, CellStyle> createStyles(final Workbook theWorkBook) {\n Map<String, CellStyle> styles = new HashMap<>();\n\n CellStyle style;\n Font titleFont = theWorkBook.createFont();\n titleFont.setFontHeightInPoints((short)14);\n titleFont.setFontName(\"Trebuchet MS\");\n style ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new Java3D node from the supplied class name using the parameterless constructor For Java3D nodes which do not have a default constructor you must overload this method and create the object using createNode( className, parameters ) This will correctly handle subclasses of Java3D classes | protected SceneGraphObject createNode( String className ) {
SceneGraphObject ret;
try {
Class state = Class.forName( className, true, control.getClassLoader() );
ret = createNode( state );
//System.err.println("Created J3D node for "+className );
} catch(ClassNotFoundException e) {
... | [
"protected SceneGraphObject createNode( Class j3dClass, Class[] parameterTypes, Object[] parameters ) {\n SceneGraphObject ret;\n Constructor constructor;\n\n try {\n constructor = j3dClass.getConstructor( parameterTypes );\n ret = (SceneGraphObject)constructor.newInstance... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the joystick listener. | void removeJoystickListener(JoystickListener listener); | [
"@Override\n public void removeListener() {\n this.listener = null;\n }",
"@Override\n public void removeListener() {\n this.mListener = null;\n }",
"public void removeListener();",
"private void unregisterListener() {\n mSensorManager.unregisterListener(this);\n }",
"voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column myvoteinfo.pricess | public Double getPricess() {
return pricess;
} | [
"public Long getPrice() {\n return price;\n }",
"@Override\n\tpublic List<TicketTable> getPrice(String seatID) {\n\t\tTicketRowmapper r = new TicketRowmapper(); \n\t\treturn jdbcTemplate.query(SELECT_PRICE, new Object[] {seatID}, r);\n\t}",
"public void setPricess(Double pricess) {\n this.price... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the use opaque u id. | public void setUseOpaqueUId(boolean useOpaqueUId)
{
_bUseOpaqueUId = useOpaqueUId;
} | [
"public void setIdUf(long idUf) {\n this.idUf = idUf;\n }",
"public void setuId(Integer uId) {\n this.uId = uId;\n }",
"public void setUserOid(long value) {\r\n this.userOid = value;\r\n }",
"public void setUniqueId(EObject target, Object uniqueId);",
"public void setUserid(lon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__State__NameAssignment_1" $ANTLR start "rule__State__ActionsAssignment_2_2" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27817:1: rule__State__ActionsAssignment_2_2 : ( ( RULE_ID ) ) ; | public final void rule__State__ActionsAssignment_2_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27821:1: ( ( ( RULE_ID ) ) )
... | [
"public final void rule__State__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalReflex.g:9753:1: ( ( RULE_ID ) )\n // InternalReflex.g:9754:2: ( RULE_ID )\n {\n // InternalReflex.g:97... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Service Interface for managing SysAdmin. | public interface SysAdminService {
/**
* Save a sysAdmin.
*
* @param sysAdmin the entity to save
* @return the persisted entity
*/
SysAdmin save(SysAdmin sysAdmin);
/**
* Get all the sysAdmins.
*
* @return the list of entities
*/
List<SysAdmin> findAll();
... | [
"private IAdminService getAdminManagementServices(){\n \t\tObject serviceObj = ServiceLocator.getInstance().getService(\n \t\t\t\tCommonConstants.ADMIN_MANAGEMENT_SERVICE);\n \t\treturn serviceObj == null ? null\n \t\t\t\t: (IAdminService) serviceObj;\n \t}",
"IAdminService getAdminService();",
"public voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sample the columns values and see what type is the best | private void analyzeColumnType(ColumnData columnData) {
if (columnData.getSqlType().contains("text") == false) {
log.info("Optimise.analyzeColumnType(): Type already defined in columnData, skipping and going with column definition.");
return;
}
fieldType = null;
deca = 0;
dec... | [
"@Test\n void recognizesDataTypeInColumn() {\n\n final String columnName = \"columnDataType\";\n given()\n .a_memory_list_of_Map_objects()\n .and()\n .the_list_contains_object(columnName, 1)\n .and()\n .the_list_contains_object(columnName, 2)\n .and()\n .the_list_contains_o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
utility function to swap between active marker and clicked marker | private void swapActiveMarkers(String msgId) {
//reset active marker
for(Marker marker : dropMarkers) {
if(this.activeMessageId.equalsIgnoreCase(marker.getSnippet())) {
//set Active Marker
String receiverId = this.messageMap.get(activeMessageId).getReceiverId(... | [
"private void setActiveMarker(String msgId) {\n for(Marker marker : dropMarkers) {\n if(msgId.equalsIgnoreCase(marker.getSnippet())) {\n //set Active Marker\n marker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW));\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
1. rename underconstruction file with 0sized blocks after snapshot. 2. delete the renamed directory. make sure we delete the 0sized block. see HDFS5476. | @Test
public void testDeletionWithZeroSizeBlock3() throws Exception {
final Path foo = new Path("/foo");
final Path subDir = new Path(foo, "sub");
final Path bar = new Path(subDir, "bar");
DFSTestUtil.createFile(hdfs, bar, BLOCKSIZE, REPLICATION, 0L);
hdfs.append(bar);
INodeFile barNode = fs... | [
"@Test\n public void testDeletionOfLaterBlocksWithZeroSizeFirstBlock() throws Exception {\n final Path foo = new Path(\"/foo\");\n final Path bar = new Path(foo, \"bar\");\n final byte[] testData = \"foo bar baz\".getBytes();\n \n // Create a zero-length file.\n DFSTestUtil.createFile(hdfs, bar, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
save way for getting nucleic from general java char | public static Nucleotide get(char b) {
switch (Character.toUpperCase(b)) {
case 'A':
return A;
case 'B':
return B;
case 'C':
return C;
case 'D':
return D;
case 'G':
return ... | [
"char getUnicode();",
"private char getNucleotideFromNumber(int nucleotide_number) {\n\t\tswitch (nucleotide_number) {\n\t\tcase NUCL_A_NUMBER:\n\t\t\treturn A;\n\t\tcase NUCL_C_NUMBER:\n\t\t\treturn C;\n\t\tcase NUCL_G_NUMBER:\n\t\t\treturn G;\n\t\tcase NUCL_T_NUMBER:\n\t\t\treturn T;\n\t\tdefault:\n\t\t\tthrow ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve all the available album ratings. | public void getAllAlbumRatings()
{
log("Entering getAllAlbumRatings()");
EntityTransaction tx = null;
try
{
tx = this.em.getTransaction();
tx.begin();
List<Rating> ratings = AlbumAccess.queryRatingLabels(this.em);
tx.commit();
}
catch (Persiste... | [
"List getRatings();",
"public List<Rating> getRatings() {\n return this.ratings;\n }",
"@Override\n public List<GameRating> getAllRatings(String gameName) throws SQLException {\n return myDatabaseEngine.getAllRatings(gameName);\n }",
"public List<Entity> getRatings() {\n Query query ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AWSSecurityTokenService sts_client = AWSSecurityTokenServiceClientBuilder.standard() .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("sts.amazonaws.com", "useast1")).build(); GetSessionTokenRequest session_token_request = new GetSessionTokenRequest(); GetSessionTokenResult session_token_result = s... | @GetMapping(value="/sts")
public String connectBySTS() {
AWSSecurityTokenService service = AWSSecurityTokenServiceClientBuilder.standard().build();
GetSessionTokenResult result = service.getSessionToken();
Credentials cred = result.getCredentials();
BasicAWSCredentials cred... | [
"private void populateCredentialsWithSts(String token) {\n\n boolean isAuthenticated = identityProvider.isAuthenticated();\n String roleArn = (isAuthenticated) ? authRoleArn : unauthRoleArn;\n\n AssumeRoleWithWebIdentityRequest sessionTokenRequest = new AssumeRoleWithWebIdentityRequest()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Game::getRound. Accessor method to get the round object. | public Round getRound(){
return mRound;
} | [
"public Integer getRound() {\n return round;\n }",
"public PaxosRound getRound(int a_round)\n {\n PaxosRound result = (PaxosRound) m_rounds.get(new Integer(a_round));\n return result;\n }",
"Round findCurrentRound(int gameId);",
"public Integer getGameRound() {\n return ga... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a Move object with the given row and column. | public Move(int row, int col) {
this.row = row;
this.col = col;
} | [
"Move createMove();",
"Move createMove(int x, int y, Player player);",
"public Tile(int row, int column){\n this.row = row;\n this.column = column;\n this.piece = null;\n }",
"public RCPosition(int row, int column) {\r\n this.row = row;\r\n this.column = column;\r\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
find the leftmost mid that target < weights[mid]; eg.target=10,weight[mid]=12 | private static int binarySearch(int[] weights, int start, int end, int target) {
while (start < end) {
int mid = start + (end - start) / 2;
if (target <= weights[mid]) end = mid;
else start = mid + 1;
}
return start;
} | [
"private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a JCE policy's crypto strength. | public static CryptoStrength getCryptoStrength(JcePolicy jcePolicy) throws CryptoException {
try {
File file = getJarFile(jcePolicy);
// if there is no policy file at all, we assume that we are running under OpenJDK
if (!file.exists()) {
return UNLIMITED;
}
JarFile jar = new JarFile(file);
Ma... | [
"EncryptionStrength getEncryptionStrengthExt();",
"public int getBitStrength() {\n int result = -1;\n\n PublicKey publicKey = null;\n\n if ( null != cert && \n (publicKey = cert.getPublicKey()) instanceof RSAPublicKey ) {\n result = ((RSAPublicKey)publicKey).getModulus().bitLength();\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs preprocessing before the body of this tag is executed. This implementation tries to resolve the icon handler if one is specified. | @Override
protected void processBeforeBody() throws JellyTagException,
FormBuilderException
{
super.processBeforeBody();
iconHandlerImplementation =
(getIconHandler() != null) ? resolveIconHandler(getIconHandler())
: createDefaultIconHandler()... | [
"public ImageIcon getHandlerImageIcon();",
"abstract protected void doFavicon(String icopath, DapContext cxt) throws IOException;",
"protected TreeIconHandler createDefaultIconHandler()\n {\n return DEF_ICON_HANDLER;\n }",
"public String getIconHandler()\n {\n return iconHandler;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets ith "organisationUnitLevel" element | org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel getOrganisationUnitLevelArray(int i); | [
"org.dhis2.ns.schema.dxf2.OrganisationUnitLevelsDocument.OrganisationUnitLevels getOrganisationUnitLevels();",
"org.dhis2.ns.schema.dxf2.OrganisationUnitLevelDocument.OrganisationUnitLevel[] getOrganisationUnitLevelArray();",
"public Integer getOrgLevel() {\n return orgLevel;\n }",
"public int getOr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required .EmrPatientInfo patient_info = 1; | nta.med.service.emr.proto.EmrapiModelProto.EmrPatientInfo getPatientInfo(); | [
"public void getPatientData() {\r\n }",
"nta.med.service.emr.proto.EmrapiModelProto.EmrPatientInfoOrBuilder getPatientInfoOrBuilder();",
"public Patient() {\n\t\t\n\t}",
"public Patient() {\r\n\r\n\t}",
"public Patient() {\n\t}",
"org.hl7.fhir.Patient getPatient();",
"protocol.Message.DeviceReportSenso... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apply rules based on entity that is passed in as input. This currently includes organisations/ name in source. | @Override
public void applyRule(DFEntity ent) {
String entityName = ent.getEntityName();
MapType type = getMapType(entityName);
switch (type) {
case ORGANISATION_MAP:
source.addOrganisation(getOrganisationMap().get(entityName));
break;
case NAME:
source.addName(ent.getEntityValue().getStringVal... | [
"public interface EntityOrAssetRule extends Rule {\n /**\n * Return the component id of the Entity or Asset that this rule should\n * belong to.\n * @return The component id.\n */\n public String getComponentId();\n \n /**\n * Given a mission objective and a system, find the correspo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Await for job execution response to come. | private void awaitResponse() throws GridInterruptedException{
U.await(respLatch);
} | [
"protected void awaitResult(){\t\n\t\ttry {\n\t\t\t/*place thread/tuple identifier in waitlist for future responses from web service*/\n\t\t\tResponses.getInstance().addToWaitList(this.transId, this);\n\t\t\tthis.latch.await();\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\n\t\t\tLogger.getLogger(\"RSpace\").lo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EqualityExpression__Group_1__1" $ANTLR start "rule__EqualityExpression__Group_1__1__Impl" InternalReflex.g:8669:1: rule__EqualityExpression__Group_1__1__Impl : ( ( rule__EqualityExpression__EqCmpOpAssignment_1_1 ) ) ; | public final void rule__EqualityExpression__Group_1__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalReflex.g:8673:1: ( ( ( rule__EqualityExpression__EqCmpOpAssignment_1_1 ) ) )
// InternalReflex.g:8674:1: ( ( rule__EqualityE... | [
"public final void rule__Equality__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:30366:1: ( ( ( rule__Equality__OpAssignment_1_1 ) ) )\n // InternalDsl.g:30367:1: ( ( rule__Equality__OpAssignment_1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XFeatureCall__Group_1__2__Impl" $ANTLR start "rule__XFeatureCall__Group_1__3" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:11349:1: rule__XFeatureCall__Group_1__3 : rule__XFeatureCall__Group_1__3__Impl ; | public final void rule__XFeatureCall__Group_1__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:11353:1: ( rule__XFeatureCal... | [
"public final void rule__XFeatureCall__Group_3_1_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:11640:1: (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the set of all valid words in the given Boggle board, as an Iterable. | public Iterable<String> getAllValidWords(BoggleBoard board) {
B = board;
HashSet<String> validWords = new HashSet<>();
for (int i = 0; i < B.rows(); i++) {
for (int j = 0; j < B.cols(); j++) {
dfs(validWords, "", new boolean[B.rows()][B.cols()], i, j);
}
... | [
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n if (board == null)\n throw new IllegalArgumentException();\n\n HashSet<String> result = new HashSet<>();\n for (int i = 0; i < board.rows(); i++)\n for (int j = 0; j < board.cols(); j++)\n chec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns a ShardedJedis resource, which allows the user to do operations into the database. The connexion returned MUST be closed using ShardedJedis.close() | public abstract Jedis getResource(); | [
"public Jedis conexion() {\n Jedis jedis = null;\n try {\n jedis = new Jedis(ipRedis, portRedis);\n// jedis.auth(\"redisespoch2018\");//comenta esta linea \n jedis.auth(\"fieespochredis\");//pass docker \n } catch (Exception e) {\n }\n return jedis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allocates a FunctionTypeImpl object and initializes it to represent the specified marker ID. | FunctionTypeImpl(String markerId) {
this.markerId = markerId;
} | [
"private void initTypeDef()\n {\n mCounters.push(new MethodCounter());\n }",
"TypeDef createTypeDef();",
"public IdFunction() {}",
"CodeType createCodeType();",
"Typedef createTypedef();",
"public void initFuncData(String id, int start, int end){\n FunctionEnvironmentRecord topRecord =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the previous index, unless x <= x[0], in which case we return 0 | protected int getIndex(double x) {
int index = DatasetUtils.findIndexGreaterThan(xDataset, x) - 1;
return Math.max(index, 0);
} | [
"public int getPrevValue(int x) {\n int i = x - offset;\n int val = contents.prevSetBit(i - 1);\n if (val >= 0)\n return val + offset;\n else\n return -1;\n }",
"public int getIndexForXVal(double xVal) {\n\t\tint upper = pointList.size()-1;\n\t\tint lower = 0;\n\t\t\n\t\tif (pointList... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field starred is set (has been assigned a value) and false otherwise | public boolean isSetStarred() {
return EncodingUtils.testBit(__isset_bitfield, __STARRED_ISSET_ID);
} | [
"public boolean isSetField() {\r\n return this.field != null;\r\n }",
"public boolean isSetIs_star() {\n return EncodingUtils.testBit(__isset_bitfield, __IS_STAR_ISSET_ID);\n }",
"public boolean isSetPattFill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |