query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Performs the specified action with context within the Swing Thread. If the action results in a modal dialog, waitForCompletion must be false.
public static void performAction(DockingActionIf action, ActionContext context, boolean wait) { doPerformAction(action, context, wait); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void performAction(DockingActionIf action, boolean waitForCompletion) {\n\n\t\tActionContext context = runSwing(() -> {\n\t\t\tActionContext actionContext = new DefaultActionContext();\n\t\t\tDockingWindowManager activeInstance = DockingWindowManager.getActiveInstance();\n\t\t\tif (activeInstance == ...
[ "0.6784211", "0.62206274", "0.58423084", "0.5760163", "0.5709899", "0.54291934", "0.54109293", "0.5366085", "0.52580166", "0.52505577", "0.52419305", "0.5229553", "0.51848084", "0.51830775", "0.514673", "0.51263857", "0.5125597", "0.51028115", "0.5051561", "0.5037893", "0.503...
0.58401895
3
Ensures the given toggle action is in the given selected state. If it is not, then the action will be performed. This call will wait for the action to finish.
public static void setToggleActionSelected(ToggleDockingActionIf toggleAction, ActionContext context, boolean selected) { setToggleActionSelected(toggleAction, context, selected, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setToggleActionSelected(ToggleDockingActionIf toggleAction,\n\t\t\tActionContext context, boolean selected, boolean wait) {\n\n\t\tboolean shouldPerformAction = runSwing(() -> {\n\t\t\treturn toggleAction.isSelected() != selected;\n\t\t});\n\n\t\tif (shouldPerformAction) {\n\t\t\tperformAction(t...
[ "0.6863955", "0.5616588", "0.56105375", "0.55198044", "0.540354", "0.53439856", "0.53306144", "0.53117603", "0.53076166", "0.5295569", "0.52929866", "0.5286976", "0.528189", "0.5281436", "0.5255206", "0.5247682", "0.52353907", "0.52200747", "0.52200747", "0.52113134", "0.5165...
0.6099956
1
Ensures the given toggle action is in the given selected state. If it is not, then the action will be performed. This call will wait for the action to finish.
public static void setToggleActionSelected(ToggleDockingActionIf toggleAction, ActionContext context, boolean selected, boolean wait) { boolean shouldPerformAction = runSwing(() -> { return toggleAction.isSelected() != selected; }); if (shouldPerformAction) { performAction(toggleAction, context, wait); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setToggleActionSelected(ToggleDockingActionIf toggleAction,\n\t\t\tActionContext context, boolean selected) {\n\t\tsetToggleActionSelected(toggleAction, context, selected, true);\n\t}", "@Test\n public void testToggle() {\n // Toggle on test.\n boolean before = plug.getCondition();\n ...
[ "0.6100761", "0.56145513", "0.5611466", "0.55207986", "0.54056233", "0.5344764", "0.53302306", "0.5310022", "0.530778", "0.52954656", "0.5294674", "0.528705", "0.5281782", "0.528093", "0.5254522", "0.5247784", "0.5234946", "0.52191186", "0.52191186", "0.5211525", "0.5164627",...
0.686502
0
Searches the component and subcomponents of the indicated provider and returns the component with the specified name.
public static Component findComponentByName(DialogComponentProvider provider, String componentName) { return findComponentByName(provider.getComponent(), componentName, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Component getComponent(String name) {\n Optional<Component> component = elements.getComponent(name);\n\n if(component.isPresent()) {\n return component.get();\n } else {\n Assert.fail(\"Missing component \" + name);\n return null;\n }\n\n }", ...
[ "0.6827663", "0.649735", "0.63537526", "0.6240117", "0.6027556", "0.5883563", "0.5882219", "0.58273286", "0.5786872", "0.5771183", "0.559719", "0.5595729", "0.5577144", "0.55730253", "0.55699545", "0.5564257", "0.554818", "0.5542023", "0.5533197", "0.55321467", "0.5501902", ...
0.72383827
0
Simulates a user typing a single key. This method should used for the special keyboard keys (ARROW, F1, END, etc) and alpha keys when associated with actions.
public static void triggerActionKey(Component c, int modifiers, int keyCode) { triggerKey(c, modifiers, keyCode, KeyEvent.CHAR_UNDEFINED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void keyTyped (KeyEvent e){\n switch (e.getKeyChar()){\n case '1':\n one.doClick(); break;\n case '2':\n two.doClick(); break;\n case '3':\n three.doClick(); break;\n case '4':\n ...
[ "0.7074093", "0.7000244", "0.69791263", "0.6918998", "0.69171584", "0.69168144", "0.6886256", "0.68469894", "0.680367", "0.67568994", "0.6727472", "0.6727434", "0.67178035", "0.6702769", "0.6694923", "0.66917646", "0.6686181", "0.6682441", "0.6679945", "0.6679945", "0.6679945...
0.0
-1
Really unusual method to call nonpublic libraries to force the text components to focus on what we want and not what Java thinks the focus should be.
private static void forceTextComponentFocus(JTextComponent tc) { Object contextKey = getInstanceField("FOCUSED_COMPONENT", tc); AppContext context = AppContext.getAppContext(); context.put(contextKey, tc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void setFocus() {\r\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t}", "@Override\n\tpublic void setFocus() {\n\t\t\n\t...
[ "0.7508117", "0.749886", "0.749886", "0.749886", "0.749886", "0.749886", "0.74722874", "0.7464193", "0.741226", "0.741226", "0.741226", "0.741226", "0.74108034", "0.7397448", "0.7395279", "0.7395279", "0.7395279", "0.7395279", "0.7395279", "0.7395279", "0.7395279", "0.73902...
0.75544524
0
Simulates a user initiated keystroke using the keybinding of the given action
public static void triggerActionKey(Component destination, DockingActionIf action) { Objects.requireNonNull(destination); KeyStroke keyStroke = action.getKeyBinding(); if (keyStroke == null) { throw new IllegalArgumentException("No KeyStroke assigned for the given action"); } int modifiers = keyStroke.getModifiers(); int keyCode = keyStroke.getKeyCode(); char keyChar = keyStroke.getKeyChar(); boolean isDefined = Character.isDefined(keyChar); if (!isDefined) { keyChar = KeyEvent.VK_UNDEFINED; } triggerKey(destination, modifiers, keyCode, keyChar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default void interactWith(Key key) {\n\t}", "public boolean keyInput(int code, int action);", "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "void keyPress(int key);", "@Override\n public void nativeKeyAction(int keyCode) {\n getProgramController().nativeKeyAc...
[ "0.69642127", "0.67589223", "0.66752195", "0.654239", "0.6412469", "0.64030594", "0.6391532", "0.63813114", "0.63805556", "0.6375148", "0.63623595", "0.6342358", "0.630584", "0.63057566", "0.6294083", "0.6284715", "0.6277102", "0.6211106", "0.6193055", "0.6177804", "0.6172429...
0.6209777
18
text components will not perform builtin actions if they are not focused
public static void triggerEscapeKey(Component c) { if (c instanceof JTextComponent) { triggerFocusGained(c); } triggerText(c, "\033"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "B disableTextInput();", "public void textBoxAction( TextBoxWidgetExt tbwe ){}", "public void focus() {}", "@Override\r\n\tpublic boolean isFocused() {\n\t\treturn false;\r\n\t}", "@Override\n public boolean isFocusable() {\n return false;\n }", "@Override \n\tpublic void focusGained(FocusEv...
[ "0.6574352", "0.6515615", "0.6442601", "0.639964", "0.63772655", "0.63670576", "0.6318644", "0.6268089", "0.6268089", "0.62240934", "0.62145156", "0.6212194", "0.6191877", "0.6183002", "0.6178807", "0.61607873", "0.6151147", "0.61493236", "0.6110675", "0.60957843", "0.6091385...
0.0
-1
Simulates the user pressing the 'Enter' key on the given text field
public static void triggerEnter(Component c) { // text components will not perform built-in actions if they are not focused triggerFocusGained(c); triggerActionKey(c, 0, KeyEvent.VK_ENTER); waitForSwing(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void enterPressed()\n\t{\n\t\t// Call the enter method if the enter key was pressed\n\t\tif (showCaret)\n\t\t\tonSubmit(text.getText().substring(0, text.getText().length() - 1));\n\t\telse onSubmit(text.getText());\n\t}", "public static void pressEnterKey() {\n\t\tActions act = new Actions(Browser.Driv...
[ "0.78321296", "0.76086015", "0.73714596", "0.7312808", "0.7228152", "0.7117411", "0.6998213", "0.69548935", "0.69498825", "0.69248945", "0.684238", "0.6823254", "0.6770565", "0.6737059", "0.67275804", "0.670139", "0.6699469", "0.66849434", "0.6660785", "0.6655484", "0.6652474...
0.65025866
28
Simulates a focus event on the given component
private static void triggerFocusGained(Component component) { FocusListener[] listeners = component.getFocusListeners(); FocusEvent e = new FocusEvent(component, (int) System.currentTimeMillis()); runSwing(() -> { for (FocusListener l : listeners) { l.focusGained(e); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void focusGained(FocusEvent event) {}", "public void focus() {}", "void setFocusedComponent(GComponent component)\n {\n if (!this.components.contains(component))\n throw new IllegalArgumentException(String.format(\"The component %s is not part of this context\",component));\n \n this.focu...
[ "0.7181335", "0.71211314", "0.6973088", "0.69335777", "0.69335777", "0.69192505", "0.68124247", "0.6807407", "0.6758759", "0.67173713", "0.67116743", "0.6689834", "0.6667538", "0.6667538", "0.6640798", "0.6640798", "0.6630174", "0.65966624", "0.6592922", "0.6543241", "0.65401...
0.7789867
0
we have to call the method directly, but it is restricted, so use some magic
private static void dispatchKeyEventDirectlyToComponent(Component c, KeyEvent e) { invokeInstanceMethod("processEvent", c, new Class[] { AWTEvent.class }, new Object[] { e }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public void trySafeMethod(){\n safeMethod();\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\n\tpublic void call() {\n\t\t\n\t}", "@Override\r\n\tpublic void method() {\n\t...
[ "0.6807018", "0.6570568", "0.64349955", "0.64349955", "0.6352257", "0.6337867", "0.6154639", "0.6152852", "0.6135456", "0.61134124", "0.6111616", "0.6106893", "0.6096677", "0.6042715", "0.60392547", "0.6031", "0.6031", "0.59968895", "0.59591836", "0.59351516", "0.5927937", ...
0.0
-1
Gets any current text on the clipboard
public String getClipboardText() throws Exception { Clipboard c = GClipboard.getSystemClipboard(); Transferable t = c.getContents(null); try { String text = (String) t.getTransferData(DataFlavor.stringFlavor); return text; } catch (UnsupportedFlavorException e) { Msg.error(this, "Unsupported data flavor - 'string'. Supported flavors: "); DataFlavor[] flavors = t.getTransferDataFlavors(); for (DataFlavor dataFlavor : flavors) { Msg.error(this, "\t" + dataFlavor.getHumanPresentableName()); } throw e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getClipboardContents() {\n\t\tString result = \"\";\n\t\tClipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\n\t\t// odd: the Object param of getContents is not currently used\n\t\tTransferable contents = clipboard.getContents(null);\n\t\tboolean hasTransferableText = (contents !=...
[ "0.7489287", "0.7467568", "0.7428294", "0.7403013", "0.72832155", "0.7276216", "0.7066515", "0.7031097", "0.6991253", "0.6985411", "0.6908583", "0.6757234", "0.66851616", "0.6650204", "0.65934145", "0.6585979", "0.65643823", "0.6440767", "0.6407419", "0.63582397", "0.6290579"...
0.6949558
10
Shows the provider by the given name.
public ComponentProvider showProvider(Tool tool, String name) { ComponentProvider provider = tool.getComponentProvider(name); tool.showComponentProvider(provider, true); return provider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getProviderName() {\n return mDeveloperProvider;\n }", "public CurrencyXRateProvider findByName(String name) {\n\t\treturn (CurrencyXRateProvider) this\n\t\t\t\t.getEntityManager()\n\t\t\t\t.createNamedQuery(CurrencyXRateProvider.NQ_FIND_BY_NAME)\n\t\t\t\t.setParameter(\"cl...
[ "0.63367075", "0.6123839", "0.6038349", "0.59925574", "0.59318674", "0.5904078", "0.5899835", "0.5760865", "0.5703105", "0.5697256", "0.56850886", "0.56850886", "0.5636912", "0.56326026", "0.56279504", "0.5626981", "0.5566501", "0.5566501", "0.5566501", "0.5566501", "0.556500...
0.7228277
0
Performs a single left mouse click in the center of the given provider. This is useful when trying to make a provider the active provider, while making sure that one of the provider's components has focus.
public static Component clickComponentProvider(ComponentProvider provider) { JComponent component = provider.getComponent(); DockableComponent dockableComponent = getDockableComponent(component); selectTabIfAvailable(dockableComponent); Rectangle bounds = component.getBounds(); int centerX = (bounds.x + bounds.width) >> 1; int centerY = (bounds.y + bounds.height) >> 1; return clickComponentProvider(provider, MouseEvent.BUTTON1, centerX, centerY, 1, 0, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default public void clickLeft() {\n\t\tremoteControlAction(RemoteControlKeyword.LEFT);\n\t}", "boolean onLeftClick(double mouseX, double mouseY);", "@Override\n\tpublic void leftClick(MouseEvent e) {\n\n\t}", "public static Component clickComponentProvider(ComponentProvider provider, int button, int x,\n\t\t...
[ "0.6223318", "0.589118", "0.5852195", "0.56694865", "0.5645635", "0.5585427", "0.55263096", "0.54152834", "0.53858", "0.53847843", "0.5382803", "0.53735715", "0.5363824", "0.5363455", "0.53452706", "0.5341211", "0.532738", "0.52865857", "0.52781945", "0.523928", "0.5235041", ...
0.62208444
1
If this dockable component is in a tabbed pane then select the associated tab.
protected static void selectTabIfAvailable(final DockableComponent dockableComponent) { Container parent = (dockableComponent != null) ? dockableComponent.getParent() : null; if (parent instanceof JTabbedPane) { final JTabbedPane tabbedPane = (JTabbedPane) parent; runSwing(() -> tabbedPane.setSelectedComponent(dockableComponent), true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void selectTab(Tab tab) {\n\t\t\n\t}", "public void selectTab(Predicate<? super CTabItem> tabFilter) {\r\n\t\tthis.displayTab.setSelection(Arrays.stream(this.getTabFolder().getItems()).filter(tabFilter).findFirst().orElseThrow(() -> new UnsupportedOperationException()));\r\n\t\tthis.displayTa...
[ "0.68254864", "0.6683512", "0.64739764", "0.6385255", "0.6374617", "0.62725127", "0.6226892", "0.6219324", "0.6203245", "0.61923367", "0.61593944", "0.6115224", "0.60773975", "0.605434", "0.6045828", "0.6023901", "0.5875433", "0.5854182", "0.5768705", "0.5756873", "0.5751206"...
0.7595609
0
Get the dockable component that contains this component if there is one.
protected static DockableComponent getDockableComponent(JComponent component) { Container parent = component.getParent(); while (parent != null) { if (parent instanceof DockableComponent) { return (DockableComponent) parent; } parent = parent.getParent(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Component getDocked(Component c) {\r\n\t\tif (c instanceof DefaultDockingPort)\r\n\t\t\treturn ((DefaultDockingPort) c).getDockedComponent();\r\n\t\treturn c;\r\n\t}", "public Optional<ComponentSymbol> getComponent() {\r\n if (!this.getEnclosingScope().getSpanningSymbol().isPresent()) {\r\n retur...
[ "0.7539412", "0.62539953", "0.6240763", "0.6209821", "0.62076557", "0.61936885", "0.61434346", "0.6066125", "0.6042534", "0.6037874", "0.6034446", "0.60103387", "0.5990374", "0.5908725", "0.5904332", "0.5894569", "0.5884222", "0.58621955", "0.5844491", "0.58156544", "0.580525...
0.7696856
0
Clicks the JComponent at the given point from within the given provider.
public static Component clickComponentProvider(ComponentProvider provider, int button, int x, int y, int clickCount, int modifiers, boolean popupTrigger) { JComponent component = provider.getComponent(); final Component clickComponent = SwingUtilities.getDeepestComponentAt(component, x, y); clickMouse(clickComponent, MouseEvent.BUTTON1, x, y, clickCount, modifiers, popupTrigger); return clickComponent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Component clickComponentProvider(ComponentProvider provider) {\n\n\t\tJComponent component = provider.getComponent();\n\t\tDockableComponent dockableComponent = getDockableComponent(component);\n\t\tselectTabIfAvailable(dockableComponent);\n\t\tRectangle bounds = component.getBounds();\n\t\tint cente...
[ "0.7046529", "0.6037904", "0.5933472", "0.58838713", "0.5774358", "0.5697461", "0.55540985", "0.54938823", "0.5487503", "0.54642326", "0.54536253", "0.54046035", "0.539155", "0.53839904", "0.5332486", "0.53050876", "0.5296344", "0.52807957", "0.52519286", "0.5216789", "0.5205...
0.68404305
1
Prints all found windows that are showing, nesting by parentchild relationship.
public static void printOpenWindows() { Msg.debug(AbstractDockingTest.class, "Open windows: " + getOpenWindowsAsString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getOpenWindowsAsString() {\n\t\tSet<Window> allFoundWindows = getAllWindows();\n\n\t\t//@formatter:off\n\t\tList<Window> roots = allFoundWindows\n\t\t\t\t.stream()\n\t\t\t\t.filter(w -> w.getParent() == null)\n\t\t\t\t.collect(Collectors.toList())\n\t\t\t\t;\n\t\t//@formatter:on\n\n\t\tStringB...
[ "0.66640365", "0.6444008", "0.60021883", "0.5997712", "0.5899482", "0.57439405", "0.5604533", "0.5545383", "0.5533157", "0.5443926", "0.5416286", "0.54156", "0.5378622", "0.5367", "0.53646153", "0.53558517", "0.5334795", "0.53211236", "0.5307922", "0.52960926", "0.52914", "...
0.6357496
2
Returns a prettyprint string of all found windows that are showing, nesting by parentchild relationship.
public static String getOpenWindowsAsString() { Set<Window> allFoundWindows = getAllWindows(); //@formatter:off List<Window> roots = allFoundWindows .stream() .filter(w -> w.getParent() == null) .collect(Collectors.toList()) ; //@formatter:on StringBuilder buffy = new StringBuilder("\n"); for (Window w : roots) { if (!isHierarchyShowing(w)) { continue; } windowToString(w, 0, buffy); } return buffy.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printOpenWindows() {\n\t\tMsg.debug(AbstractDockingTest.class, \"Open windows: \" + getOpenWindowsAsString());\n\t}", "public String toString(){\n String str = \"\";\n for(int i = level; i>0; i--){\n str+=\"\\t\";\n }\n str += getCla...
[ "0.5810363", "0.56393963", "0.5624088", "0.55344135", "0.5496104", "0.54794306", "0.5450129", "0.5235794", "0.51726097", "0.5166431", "0.5133234", "0.5081261", "0.5076566", "0.505481", "0.50503373", "0.5025347", "0.50197196", "0.5017841", "0.49907383", "0.49689052", "0.495195...
0.7640026
0
/ Debug timing of waiting for tree long start = System.nanoTime(); doWaitForTableModel(model); long end = System.nanoTime(); Msg.out( "waitForTable() " + TimeUnit.MILLISECONDS.convert(end start, TimeUnit.NANOSECONDS));
public static <T> void waitForTableModel(ThreadedTableModel<T, ?> model) { doWaitForTableModel(model); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static <T> void doWaitForTableModel(ThreadedTableModel<T, ?> model) {\n\t\twaitForSwing();\n\n\t\tboolean didWait = false;\n\t\tint waitTime = 0;\n\t\twhile (model.isBusy()) {\n\t\t\tdidWait = true;\n\t\t\twaitTime += sleep(DEFAULT_WAIT_DELAY);\n\n\t\t\t// model loading may take longer than normal waits\n\...
[ "0.70610285", "0.600978", "0.5678197", "0.5503278", "0.5502349", "0.54023755", "0.5395682", "0.53806245", "0.5332212", "0.53062254", "0.530399", "0.5269147", "0.52621967", "0.51844156", "0.51219755", "0.51205605", "0.51189107", "0.5105512", "0.50939095", "0.5082452", "0.50822...
0.60784775
1
Always wait for Swing at least once. There seems to be a race condition for incremental threaded models where the table is not busy at the time this method is called, but there is an update pending via an invokeLater().
private static <T> void doWaitForTableModel(ThreadedTableModel<T, ?> model) { waitForSwing(); boolean didWait = false; int waitTime = 0; while (model.isBusy()) { didWait = true; waitTime += sleep(DEFAULT_WAIT_DELAY); // model loading may take longer than normal waits if (waitTime >= PRIVATE_LONG_WAIT_TIMEOUT) { Msg.error(AbstractDockingTest.class, createStackTraceForAllThreads()); // debug String busyState = getBusyState(model); Msg.error(AbstractDockingTest.class, busyState); throw new AssertException( "Timed-out waiting for table model to load in " + waitTime + "ms"); } } waitForSwing(); if (didWait) { // try again (the idea is that we may have had a small window where the model was // not busy, but more work may be pushed on) waitForTableModel(model); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jButtonFillTableActionPerformed(java.awt.event.ActionEvent evt) {\n SwingWorkerDemo worker = new SwingWorkerDemo( jBusyTable.getBusyModel() , (DefaultTableModel)jXTable.getModel() );\n\n // Start the worker\n worker.execute();\n }", "public static void waitForEDT() {\n\t\ttr...
[ "0.6638079", "0.64815664", "0.6479976", "0.6116877", "0.61150765", "0.6033413", "0.5859537", "0.57484835", "0.5716975", "0.5700566", "0.5697767", "0.56503075", "0.56313956", "0.56213504", "0.5613221", "0.5608069", "0.55717665", "0.55696845", "0.5569354", "0.5563248", "0.55401...
0.65082747
1
/ // Debug timing of waiting for tree long start = System.nanoTime(); doWaitForTree(gTree); long end = System.nanoTime(); Msg.out( "waitForTree() " + TimeUnit.MILLISECONDS.convert(end start, TimeUnit.NANOSECONDS));
public static void waitForTree(GTree gTree) { doWaitForTree(gTree); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void test6_OpenTree() throws GeneralLeanFtException{\n\t\ttry\n\t\t{\t\t\t\t\n\t\t\tSystem.out.println(\"Test 6 - Open Trees Started\");\n\t\t\t\n\t\t\t//Main Window\n\t\t\tWindow mainWindow = Desktop.describe(Window.class, new WindowDescription.Builder()\n\t\t\t.title(\"SwingSet2\").index(0).build...
[ "0.5847472", "0.5846232", "0.5809433", "0.58021677", "0.56813866", "0.5671621", "0.55088174", "0.5483346", "0.5479776", "0.537849", "0.5349457", "0.53475034", "0.52518076", "0.5212047", "0.52020395", "0.5201081", "0.51862943", "0.5179422", "0.5140879", "0.51172644", "0.511115...
0.7183157
0
Creates a generic action context with no provider, with the given context object
public ActionContext createContext(Object contextObject) { return new DefaultActionContext().setContextObject(contextObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActionContext createContext(ComponentProvider provider, Object contextObject) {\n\t\treturn new DefaultActionContext(provider).setContextObject(contextObject);\n\t}", "Context createContext();", "Context createContext();", "public abstract void makeContext();", "private static Context createContext(...
[ "0.6536887", "0.60300034", "0.60300034", "0.55725694", "0.550121", "0.5444788", "0.54399115", "0.54365003", "0.53757656", "0.53593785", "0.53473294", "0.52834463", "0.52812487", "0.52180547", "0.52180547", "0.5199371", "0.5159954", "0.5151366", "0.51316947", "0.51108897", "0....
0.72139126
0
Creates a generic action context with the given provider, with the given context object
public ActionContext createContext(ComponentProvider provider, Object contextObject) { return new DefaultActionContext(provider).setContextObject(contextObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActionContext createContext(Object contextObject) {\n\t\treturn new DefaultActionContext().setContextObject(contextObject);\n\t}", "Context createContext();", "Context createContext();", "public BadgeActionProvider(Context context) {\n super(context);\n }", "public abstract void makeContex...
[ "0.6408422", "0.59066164", "0.59066164", "0.5784824", "0.5654089", "0.53766847", "0.53673226", "0.5267226", "0.5258547", "0.51704603", "0.49974498", "0.49557143", "0.48799682", "0.48630452", "0.48339394", "0.48262766", "0.4809605", "0.48089787", "0.4803606", "0.4796193", "0.4...
0.7477228
0
Writes the given image to the given file
public static void writeImage(Image image, File imageFile) throws IOException { ImageUtils.writeFile(image, imageFile); Msg.info(AbstractDockingTest.class, "Wrote image to " + imageFile.getCanonicalPath()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeToImage() {\n imageWriter.writeToImage();\n }", "public void writeToImage() {\r\n\t\t_imageWriter.writeToImage();\r\n\t}", "static public void write(String filename, Image image) throws IOException\n {\n MyBMPFile reader = new MyBMPFile();\n \n reader.saveBit...
[ "0.7702079", "0.7614625", "0.73152965", "0.7120024", "0.7056708", "0.7039302", "0.70265335", "0.677559", "0.67614585", "0.67369527", "0.6604684", "0.6557754", "0.6511861", "0.64832896", "0.6446355", "0.64099866", "0.6400788", "0.63419694", "0.63273466", "0.6306576", "0.630388...
0.6967729
7
Asserts that the two icons are or refer to the same icon (handles GIcon)
public void assertIconsEqual(Icon expected, Icon actual) { if (expected.equals(actual)) { return; } URL url1 = getURL(expected); URL url2 = getURL(actual); if (url1 != null && url1.equals(url2)) { return; } fail("Expected icon [" + expected.getClass().getSimpleName() + "]" + expected.toString() + ", but got: [" + actual.getClass().getSimpleName() + "]" + actual.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testSpecialIcons() {\n Utility.FolderProperties fp = Utility.FolderProperties.getInstance(mContext);\n \n // Make sure they're available\n Drawable inbox = fp.getIconIds(Mailbox.TYPE_INBOX);\n Drawable mail = fp.getIconIds(Mailbox.TYPE_MAIL);\n Drawable parent = ...
[ "0.71214324", "0.6946155", "0.65009296", "0.65009296", "0.645788", "0.63518304", "0.6261465", "0.62113947", "0.59666157", "0.5939686", "0.58773935", "0.58188784", "0.5701431", "0.56823456", "0.568007", "0.567066", "0.56444985", "0.5596612", "0.5562253", "0.5556511", "0.553431...
0.8221608
0
Gets the URL for the given icon
public URL getURL(Icon icon) { if (icon instanceof UrlImageIcon urlIcon) { return urlIcon.getUrl(); } if (icon instanceof GIcon gIcon) { return gIcon.getUrl(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getGameIconUrl();", "public URL getIcon()\r\n {\r\n\treturn icon;\r\n }", "@Override\n\tpublic ToolIconURL getIconURL() {\n\t\treturn iconURL;\n\t}", "public String getIconUrl() {\n return iconUrl;\n }", "URL getIconURL(String iconId, IconSize medium);", "public String ge...
[ "0.778002", "0.77055186", "0.7263253", "0.72397643", "0.7239205", "0.72120774", "0.7204768", "0.71219563", "0.70882034", "0.70850694", "0.68533367", "0.68338007", "0.68338007", "0.680127", "0.6744923", "0.6744923", "0.67429394", "0.67120343", "0.6663191", "0.6660578", "0.6607...
0.7830529
0
Gets the frame count of this animation.
public int getTotalFrames() { int frame = 0; for (MOFPartPolyAnimEntry entry : getEntryList().getEntries()) frame += entry.getDuration(); return frame; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getFrameCount() {\n return frameCount;\n }", "int getFramesCount();", "int getNumberFrames();", "public int getFrames() {\r\n return frames;\r\n }", "@java.lang.Override\n public com.google.protobuf.UInt64Value getFramesCount() {\n return framesCount_ == null ? com.google.proto...
[ "0.8162913", "0.81130964", "0.798784", "0.79122394", "0.75433165", "0.7484507", "0.7336143", "0.7295862", "0.7021395", "0.6984544", "0.6964896", "0.69488436", "0.6936657", "0.69312406", "0.6918082", "0.6883501", "0.6875748", "0.687384", "0.6798663", "0.6777526", "0.6701158", ...
0.7715307
4
Created by MVISION on 11/2/2017 AD.
public interface RewardContract { interface View extends BaseView { void setUpViewReward(ArrayList<ModelRewardMerge> modelList); } interface Presenter { void getReward(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "@Override\n public void perish() {\n \n }", "protected boolean func_70814_o() { return true; }", "private stendhal() {\n\t}", "public void mo3811...
[ "0.59874356", "0.57317364", "0.5687838", "0.56848365", "0.56776065", "0.56531674", "0.56325233", "0.55918515", "0.55583215", "0.5482285", "0.54665226", "0.5454265", "0.54500645", "0.5434473", "0.5429664", "0.54263407", "0.54125607", "0.54125607", "0.54125607", "0.54125607", "...
0.0
-1
TODO maybe we need something else here? Create new Player
public Player(@NotNull String name, String region) { this.name = name; Cell cell = new Cell("",0,0, Color.BLUE,new RoundRectangle2D.Float()); cells.add(cell); if (log.isInfoEnabled()) { log.info(toString() + " created"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Player createPlayer();", "void createPlayer(Player player);", "Player(String playerName) {\n this.playerName = playerName;\n }", "public Player(String name) {\r\n this.name = name;\r\n }", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {}", "public ...
[ "0.8248438", "0.80824184", "0.77868056", "0.7562344", "0.7520023", "0.7520023", "0.7520023", "0.7520023", "0.7486525", "0.7486525", "0.7441992", "0.7388351", "0.7386495", "0.7385497", "0.7376056", "0.7375258", "0.73290014", "0.7324519", "0.73106146", "0.7250791", "0.72244257"...
0.0
-1
Here we are calling the test to click random item from the displayed list, the result is updated in the excel sheet. We are making use of assertion helper class
@Test public void randomItem() throws InterruptedException { productpage = new ProductPage(driver); productpage.clickOnSomePrompt(); productdetails = productpage.clickOnRandomItem(); boolean status = productdetails.isProductDEtailsPageDisplayed(); AssertionHelper.updateTestStatus(status); TestBaseRunner.result = TestBaseRunner.passOrFail(status); ExcelReadWrtite.updateResult("testData.xlsx", "TestScripts", "randomItem", result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void AddItemFavList( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Favourite List Link shou...
[ "0.6609866", "0.645311", "0.64314973", "0.6344801", "0.6229482", "0.6201251", "0.6173106", "0.6171189", "0.6164271", "0.6139593", "0.6135039", "0.6086289", "0.6074322", "0.60739", "0.60067844", "0.5992724", "0.59862745", "0.59858364", "0.59824866", "0.5970966", "0.5956654", ...
0.75679725
0
Here we are calling the test to scroll and click, the result is updated in the excel sheet. We are making use of assertion helper class
@Test public void scrollAndClick() throws InterruptedException { productpage = new ProductPage(driver); productpage.clickOnSomePrompt(); int num = productpage.numberOfItemsDisplayed(); log.info("number of items" +num); productdetails = productpage.clickOnLastItem(); boolean status = productdetails.isProductDEtailsPageDisplayed(); AssertionHelper.updateTestStatus(status); TestBaseRunner.result = TestBaseRunner.passOrFail(status); ExcelReadWrtite.updateResult("testData.xlsx", "TestScripts", "scrollAndClick", result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(dataProvider=\"getExcelData\", priority=1)\n\t \n\t public void clientQuickLinks(String OrigionLocation, String Dest, String Item, String Count, String Weight, String Volume, String Client_Order, String Busunit, String GeneralLedger) throws InterruptedException, IOException {\n\t\tTC001_LoginOTM.getDriver...
[ "0.6643793", "0.6553383", "0.64054793", "0.6321473", "0.6306204", "0.6196796", "0.6116646", "0.6115679", "0.6070061", "0.60696554", "0.60540915", "0.6043219", "0.6025589", "0.59912425", "0.5980582", "0.5950825", "0.59485114", "0.59389555", "0.5938072", "0.590883", "0.5903892"...
0.78136003
0
Overrides the overloaded console method getString
@Override public String getString(String prompt, String value1, String value2) { String s; do { System.out.print(prompt); s = sc.nextLine(); // read user entry // Provides error message if response is empty or not 'y' or 'n' if (s.trim().isEmpty()) { System.out.println("Error! This entry is required. Try again."); } else if (!s.equalsIgnoreCase(value1) && !s.equalsIgnoreCase(value2)) { System.out.println("Error! Entry must be 'y' or 'n'. Try agian."); } } while (!s.equalsIgnoreCase(value1) && !s.equalsIgnoreCase(value2)); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getString() {\n return consoleScanner.nextLine();\n }", "public String getString();", "public static String getString() throws IOException\n {\n InputStreamReader input=new InputStreamReader(System.in);\n BufferedReader b=new BufferedReader(input);\n Strin...
[ "0.7230889", "0.6914201", "0.6847531", "0.6840638", "0.6840638", "0.67236805", "0.67236805", "0.67236805", "0.66312176", "0.6558205", "0.65078807", "0.64706683", "0.64706683", "0.63858116", "0.638023", "0.6366365", "0.63621986", "0.63258183", "0.6276088", "0.62643653", "0.623...
0.58087254
48
Invoke the given method
public Object invoke( Object instance, Object[] parameterValues, boolean validateArguments ) throws ActionExecutionException, InternalComponentException { try { if (isDeprecated()) { log.warn("Method '" + this.toString() + "' is deprecated"); } //convert string to Enumerations if necessary if (hasEnumParameter) { parameterValues = convertToEnums(parameterValues); } //validate the arguments if (validateArguments) { validateArguments(parameterValues); } //invoke the action return doInvoke(instance, this.parameterNames, parameterValues); } catch (IllegalArgumentException ae) { throw new ActionExecutionException("Illegal arguments passed to action '" + actionName + "'", ae); } catch (IllegalAccessException iae) { throw new ActionExecutionException("Could not access action '" + actionName + "'", iae); } catch (InvocationTargetException ite) { throw new InternalComponentException(componentName, actionName, ite.getTargetException()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;", "protected void invokeMethod(MetaMethod method) {\n Class callClass = method.getInterfaceClass();\n boolean useInterface = false;\n if (callClass == null) {\n callClass = method.getCallClas...
[ "0.7435669", "0.7317846", "0.6899856", "0.6883774", "0.6827061", "0.6799089", "0.6790459", "0.67697054", "0.67562723", "0.6735786", "0.6724518", "0.66814715", "0.66530776", "0.6638351", "0.6611305", "0.6594148", "0.65842384", "0.6527405", "0.6527405", "0.65032965", "0.6497988...
0.0
-1
/ Here we log the action we are going to be execute. ATS has some actions for internal usage and users should not see them. Currently we do not have some good way to distinguish these actions from the regular ones, for example we could use a new attribute in the Action annotation. For now we can filter these ATS internal actions by expecting their names match the next regular expression.
protected Object doInvoke( Object instance, List<String> parameterNames, Object[] parameterValues ) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ActionExecutionException { if (log.isInfoEnabled()) { if (!actionName.matches("Internal.*Operations.*") && !actionName.startsWith("InternalProcessTalker")) { log.info("Executing '" + actionName + "' with arguments " + StringUtils.methodInputArgumentsToString(parameterValues)); } else { // internal action if (log.isDebugEnabled()) log.debug("Executing '" + actionName + "' with arguments " + StringUtils.methodInputArgumentsToString(parameterValues)); } } return method.invoke(instance, parameterValues); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void Log(String action) {\r\n\t}", "private static void LogStatic(String action) {\r\n\t}", "private void appendAction(String action) {\n \t\tif (board.isSetupPhase())\n \t\t\treturn;\n \n \t\tif (actionLog == \"\")\n \t\t\tactionLog += \"→ \" + action;\n \t\telse\n \t\t\tactionLog += \"\\n\" + \"→ \" ...
[ "0.7537419", "0.65910584", "0.65850884", "0.6579393", "0.6409128", "0.6375389", "0.6361266", "0.62516433", "0.61732394", "0.61732394", "0.6172609", "0.6138329", "0.6084305", "0.60761803", "0.60553443", "0.6031759", "0.5975644", "0.59573627", "0.59375423", "0.59305996", "0.591...
0.0
-1
Has this action method been deprecated
public boolean isDeprecated() { return isDeprecated; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default boolean isDeprecated() {\n return false;\n }", "@Deprecated\n public boolean isRequestCorrect(){\n\treturn true;\n }", "Boolean getDeprecated();", "@Deprecated\n/* */ public int getActions() {\n/* 289 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override...
[ "0.72046626", "0.7170946", "0.6798744", "0.6583601", "0.6578919", "0.6424395", "0.64046186", "0.6370021", "0.6362938", "0.63255095", "0.6206438", "0.61473393", "0.6050472", "0.6042166", "0.6000964", "0.5951614", "0.58887535", "0.58551276", "0.5782117", "0.5759873", "0.5742483...
0.6245414
10
Get the transfer unit associated with this action
public String getTransferUnit() { if (transferUnit.length() > 0) { return transferUnit + "/sec"; } else { return transferUnit; // default value is empty string } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Unit<?> getUnit() {\n return _unit;\n }", "public String getUnit() {\n\t\tString unit;\n\t\ttry {\n\t\t\tunit = this.getString(\"unit\");\n\t\t} catch (Exception e) {\n\t\t\tunit = null;\n\t\t}\n\t\treturn unit;\n\t}", "public String getToUnit() {\r\n return this.toUnit;\r\n ...
[ "0.63375723", "0.6284964", "0.61982065", "0.6192772", "0.6181646", "0.6127088", "0.6089513", "0.60790604", "0.6046319", "0.59814024", "0.59757006", "0.59606683", "0.59427524", "0.59229624", "0.59129804", "0.5903676", "0.58906555", "0.5882376", "0.5882376", "0.5882376", "0.587...
0.74654156
0
In case of using abstract action methods, we need to make an instance of the child class where the implementation is, not the abstract parent class
public Class<?> getTheActualClass() { if (actualClass != null) { return actualClass; } else { return method.getDeclaringClass(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "abstract public void performAction();", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }",...
[ "0.77044946", "0.77044946", "0.77044946", "0.77044946", "0.73627245", "0.70438135", "0.70438135", "0.70438135", "0.7026913", "0.7025211", "0.6980425", "0.69758606", "0.6972928", "0.6891487", "0.6874076", "0.6659947", "0.6636764", "0.65929294", "0.65667075", "0.6462211", "0.64...
0.0
-1
Convert any String arguments to proper Enumerations if necessary
@SuppressWarnings( { "rawtypes", "unchecked" }) protected Object[] convertToEnums( Object[] args ) throws ActionExecutionException { Object[] processedArgs = new Object[args.length]; //try to convert all strings to enums Class<?>[] parameterTypes = method.getParameterTypes(); for (int i = 0; i < parameterTypes.length; i++) { if (args[i] == null) { processedArgs[i] = null; continue; } boolean isParamArray = parameterTypes[i].isArray(); Class<?> paramType; Class<?> argType; if (isParamArray) { paramType = parameterTypes[i].getComponentType(); argType = args[i].getClass().getComponentType(); } else { paramType = parameterTypes[i]; argType = args[i].getClass(); } if (argType == String.class && paramType.isEnum()) { try { if (isParamArray) { Object convertedEnums = Array.newInstance(paramType, Array.getLength(args[i])); //convert all array elements to enums for (int j = 0; j < Array.getLength(args[i]); j++) { String currentValue = (String) Array.get(args[i], j); if (currentValue != null) { Array.set(convertedEnums, j, Enum.valueOf((Class<? extends Enum>) paramType, currentValue)); } } processedArgs[i] = convertedEnums; } else { processedArgs[i] = Enum.valueOf((Class<? extends Enum>) paramType, (String) args[i]); } } catch (IllegalArgumentException iae) { throw new ActionExecutionException("Could not convert string " + args[i] + " to enumeration of type " + paramType.getName()); } } else { processedArgs[i] = args[i]; } } return processedArgs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static <T extends Enum<T>> EnumMap<T, String> parseOptions(\n Deque<String> params, Class<T> type, Deque<String> args) {\n EnumMap<T, String> options = new EnumMap<T, String>(type);\n\n for (String param; null != (param = params.peek());) {\n params.pop();\n if (p...
[ "0.5959601", "0.57087374", "0.5524504", "0.539436", "0.5329585", "0.5282918", "0.52469164", "0.5189764", "0.5188317", "0.5186463", "0.5184061", "0.5182493", "0.5165234", "0.5145509", "0.51130235", "0.5106279", "0.50973755", "0.50486994", "0.50149065", "0.50017226", "0.4997408...
0.7100209
0
Validate the arguments according to the rules specified in the action using the Parameter annotations
protected void validateArguments( Object[] args ) throws ActionExecutionException { Annotation[][] annotations = method.getParameterAnnotations(); for (int i = 0; i < annotations.length; i++) { Annotation[] paramAnnotations = annotations[i]; for (Annotation paramAnnotation : paramAnnotations) { if (paramAnnotation instanceof Parameter) { Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation; ValidationType validationType = paramDescriptionAnnotation.validation(); String[] validationArgs; // if we are checking for valid constants, then the // args array should contain // the name of the array holding the valid constants if (validationType == ValidationType.STRING_CONSTANT || validationType == ValidationType.NUMBER_CONSTANT) { try { String arrayName = paramDescriptionAnnotation.args()[0]; // get the field and set access level if // necessary Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName); if (!arrayField.isAccessible()) { arrayField.setAccessible(true); } Object arrayValidConstants = arrayField.get(null); // convert the object array to string array String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)]; for (int j = 0; j < Array.getLength(arrayValidConstants); j++) { arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString(); } validationArgs = arrayValidConstatnsStr; } catch (IndexOutOfBoundsException iobe) { // this is a fatal error throw new ActionExecutionException("You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation"); } catch (Exception e) { // this is a fatal error throw new ActionExecutionException("Could not get array with valid constants - action annotations are incorrect"); } } else { validationArgs = paramDescriptionAnnotation.args(); } List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(), paramDescriptionAnnotation.name(), args[i], validationArgs); //perform validation for (BaseType baseType : typeValidators) { if (baseType != null) { try { baseType.validate(); } catch (TypeException e) { throw new InvalidInputArgumentsException("Validation failed while validating argument " + paramDescriptionAnnotation.name() + e.getMessage()); } } else { log.warn("Could not perform validation on argument " + paramDescriptionAnnotation.name()); } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validateInputParameters(){\n\n }", "public void checkParameters() {\n }", "public abstract ValidationResults validArguments(String[] arguments);", "@Override\n\tprotected void validateParameterValues() {\n\t\t\n\t}", "@Override\n\t\tprotected boolean validateAction(int actionID, String......
[ "0.70880544", "0.69344324", "0.69075656", "0.6803252", "0.6636857", "0.65446174", "0.643526", "0.636816", "0.6339766", "0.61951953", "0.61938864", "0.618019", "0.6171033", "0.6165563", "0.60613644", "0.60549474", "0.604648", "0.598217", "0.59734535", "0.5965768", "0.59506017"...
0.7940522
0
Creates as much validation types as needed to validate the input data
private List<BaseType> createBaseTypes( ValidationType type, String paramName, Object values, Object[] args ) { List<BaseType> typeValidators = new ArrayList<BaseType>(); // if this is an array of types to be validated, then add each // of them separately to the list if ( (values != null) && values.getClass().isArray()) { for (int i = 0; i < Array.getLength(values); i++) { Object value = Array.get(values, i); TypeFactory factory = TypeFactory.getInstance(); BaseType baseType = factory.createValidationType(type, paramName, value, args); typeValidators.add(baseType); } // otherwise just add the single validation type } else { TypeFactory factory = TypeFactory.getInstance(); BaseType baseType = factory.createValidationType(type, paramName, values, args); typeValidators.add(baseType); } return typeValidators; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validateData() {\n }", "public interface BuiltinTypeValidator {\n // -------------------------------------------------------------------------\n // CONSTANTS\n // -------------------------------------------------------------------------\n\n /** validation error string for Bit String f...
[ "0.672772", "0.6723745", "0.6410755", "0.63309216", "0.61922693", "0.6131344", "0.60947853", "0.6075779", "0.6051643", "0.60417545", "0.60317916", "0.6028844", "0.60062784", "0.6002845", "0.5988008", "0.5985624", "0.598245", "0.5946471", "0.59409475", "0.59362763", "0.5924342...
0.5471988
76
Builds the action method name. It is the method class name + method name split by CamelCase words For example: getDescription > MethodClassName get Description; getSMSCount > MethodClassName get S M S Count
public static String buildActionMethodName( Method actionMethod ) { String methodName = actionMethod.getName(); StringBuilder actionMethodName = new StringBuilder(); int charIndex; for (charIndex = 0; charIndex < methodName.length(); charIndex++) { char ch = methodName.charAt(charIndex); if (Character.isUpperCase(ch)) { actionMethodName.append(' '); } actionMethodName.append(ch); } return actionMethod.getDeclaringClass().getSimpleName() + " " + actionMethodName.toString().trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getMethodName();", "java.lang.String getMethodName();", "java.lang.String getMethodName();", "java.lang.String getMethodName();", "String getMethodName();", "String getMethodName();", "public java.lang.String getActionClassName() {\n java.lang.Object ref = actionClassName_;\n ...
[ "0.6691555", "0.6691555", "0.6691555", "0.6691555", "0.64300567", "0.64300567", "0.6394566", "0.63356173", "0.62647194", "0.6245855", "0.6218421", "0.60947496", "0.6083569", "0.6041248", "0.60128117", "0.58875644", "0.5870587", "0.5829131", "0.58233553", "0.57770586", "0.5764...
0.7859273
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ view = inflater.inflate(R.layout.fragment_edit_profile, container, false); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
/ access modifiers changed from: protected
public void draw(GLState pGLState, Camera pCamera) { this.mTiledSpriteVertexBufferObject.draw(4, this.mCurrentTileIndex * 6, 6); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.73744047", "0.7040692", "0.692117", "0.69076973", "0.6844561", "0.68277687", "0.68048066", "0.6581614", "0.653803", "0.6500888", "0.64905626", "0.64905626", "0.6471316", "0.64376974", "0.64308083", "0.64308083", "0.642771", "0.6424499", "0.6419003", "0.64083034", "0.640539...
0.0
-1
/ access modifiers changed from: protected
public void onUpdateColor() { getVertexBufferObject().onUpdateColor(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: protected
public void onUpdateVertices() { getVertexBufferObject().onUpdateVertices(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375753", "0.70422196", "0.69218373", "0.6907941", "0.6845266", "0.68283623", "0.6805162", "0.6583373", "0.653852", "0.6502129", "0.64900213", "0.64900213", "0.6471215", "0.64374804", "0.6431033", "0.6431033", "0.6428289", "0.642479", "0.6418873", "0.6408808", "0.64064246"...
0.0
-1
/ access modifiers changed from: protected
public void onUpdateTextureCoordinates() { getVertexBufferObject().onUpdateTextureCoordinates(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
Dismissing progress dialog calling method to parse json array
@Override public void onResponse(JSONArray response) { parseData(response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tprotected void onPostExecute(JSONObject result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\t\n\t\t\t\tmProgressDialog.dismiss();\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tprotected void onPostExecute(JSONObject result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tmProgressDialog.dismiss();...
[ "0.66784036", "0.66025686", "0.64335394", "0.63809776", "0.63642037", "0.6257296", "0.6243591", "0.62402713", "0.62374765", "0.6178905", "0.6178266", "0.6143203", "0.60827297", "0.60555065", "0.60555065", "0.60555065", "0.59948844", "0.5988617", "0.5980526", "0.5961931", "0.5...
0.0
-1
Allow only directories, or files with ".txt" extension
@Override public boolean accept(File file) { return file.isDirectory() || file.getAbsolutePath().endsWith(".txt") || file.getAbsolutePath().endsWith(".avro") || file.getAbsolutePath().endsWith(".json") || file.getAbsolutePath().endsWith(".text") || file.getAbsolutePath().endsWith(".seqjson") || file.getAbsolutePath().endsWith(".seqfile"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean accept(File file) {\n return file.isDirectory() || (file.isFile() && file.getName().toLowerCase().endsWith(\".txt\"));\n\t}", "@Override\r\n\tpublic boolean accept(File dir, String name) {\n\t\treturn name.toLowerCase().endsWith(\".txt\");\r\n\t}", "public boolean accept(File...
[ "0.7211349", "0.6926739", "0.64961046", "0.64701694", "0.6134258", "0.60351694", "0.6031931", "0.59089327", "0.5896794", "0.5856178", "0.5848834", "0.57063794", "0.5702788", "0.5702695", "0.5695902", "0.56920266", "0.56878984", "0.56861365", "0.566064", "0.5593704", "0.558798...
0.6255032
4
This description will be displayed in the dialog, hardcoded = ugly, should be done via I18N
@Override public String getDescription() { return "(*.txt) (*.avro) (*.json) (*.text) (*.seqjson) (*.seqfile)"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String getDescription() {\n\t\treturn \"\";\r\n\t}", "@Override\n public String getDescription() {\n return descriptionText;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription(...
[ "0.757552", "0.75549227", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7545551", "0.7479445", "0.7427426", "0.7374041", "0.73515284", "0.73256624", "0.73099506", "0.7307715", "0.7307715", "0.7304971", "0.7302537", ...
0.0
-1
Creates new form Demo2
public Demo2() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FORM createFORM();", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession....
[ "0.72373736", "0.6666591", "0.6511039", "0.6467132", "0.63879573", "0.63692504", "0.63409036", "0.61433876", "0.6091715", "0.6042294", "0.600454", "0.5997471", "0.59945655", "0.59620094", "0.5933287", "0.593313", "0.5880605", "0.5873497", "0.58643216", "0.58602726", "0.585734...
0.5994901
12
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { fileChooser = new javax.swing.JFileChooser(); DBChooser = new javax.swing.JDialog(); DBInfo = new javax.swing.JPanel(); UserName = new javax.swing.JLabel(); Password = new javax.swing.JLabel(); url = new javax.swing.JLabel(); DBName = new javax.swing.JLabel(); jTextFieldUsername = new javax.swing.JTextField(); jTextFieldPassword = new javax.swing.JTextField(); jTextFieldurl = new javax.swing.JTextField(); jTextFieldDBName = new javax.swing.JTextField(); Add = new javax.swing.JButton(); Cancel = new javax.swing.JButton(); jScrollPane4 = new javax.swing.JScrollPane(); ConnectionStatus = new javax.swing.JTextArea(); buttonGroup2 = new javax.swing.ButtonGroup(); jInternalFrame1 = new javax.swing.JInternalFrame(); jTabbedPaneMainTree = new javax.swing.JTabbedPane(); jScrollPane3 = new javax.swing.JScrollPane(); jTreeAction = new javax.swing.JTree(); jScrollPane2 = new javax.swing.JScrollPane(); textarea = new javax.swing.JTextArea(); jTabbedPane1 = new javax.swing.JTabbedPane(); jTextField1 = new javax.swing.JTextField(); jButton2 = new javax.swing.JButton(); jInternalFrame3 = new javax.swing.JInternalFrame(); jLayeredPane3 = new javax.swing.JLayeredPane(); jLabelDuke = new javax.swing.JLabel(); canvas2 = new java.awt.Canvas(); jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jPanel1 = new javax.swing.JPanel(); jButtonSave = new javax.swing.JButton(); jButtonSaveAs = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jProgressBar1 = new javax.swing.JProgressBar(); jMenuBar1 = new javax.swing.JMenuBar(); File = new javax.swing.JMenu(); OpenLocalFile = new javax.swing.JMenuItem(); OpenDB = new javax.swing.JMenuItem(); OpenHDFS = new javax.swing.JMenuItem(); Exit = new javax.swing.JMenuItem(); jMenuEdit = new javax.swing.JMenu(); jMenuItemUndo = new javax.swing.JMenuItem(); jMenuItemRedo = new javax.swing.JMenuItem(); jMenuItemCut = new javax.swing.JMenuItem(); jMenuItemCopy = new javax.swing.JMenuItem(); jMenuItemPaste = new javax.swing.JMenuItem(); jMenuItemDelete = new javax.swing.JMenuItem(); jMenuItemSelectAll = new javax.swing.JMenuItem(); jMenuView = new javax.swing.JMenu(); jMenuItemEnlarge = new javax.swing.JMenuItem(); jMenuItemShrink = new javax.swing.JMenuItem(); jMenuItemFullScreen = new javax.swing.JMenuItem(); jMenuRun = new javax.swing.JMenu(); jMenuItemRun = new javax.swing.JMenuItem(); jMenuItemPreview = new javax.swing.JMenuItem(); jMenuItemDebug = new javax.swing.JMenuItem(); jMenuItemReplay = new javax.swing.JMenuItem(); jMenuItemCheck = new javax.swing.JMenuItem(); jMenuTools = new javax.swing.JMenu(); jMenuItem5 = new javax.swing.JMenuItem(); jMenuHelp = new javax.swing.JMenu(); fileChooser.setDialogTitle("Please choose your local input file"); fileChooser.setFileFilter(new MyCustomFilter()); DBInfo.setBorder(javax.swing.BorderFactory.createTitledBorder("Please choose your DB File here!")); UserName.setText("UserName"); Password.setText("Password"); url.setText("url"); DBName.setText("DBName"); jTextFieldUsername.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextFieldUsernameActionPerformed(evt); } }); javax.swing.GroupLayout DBInfoLayout = new javax.swing.GroupLayout(DBInfo); DBInfo.setLayout(DBInfoLayout); DBInfoLayout.setHorizontalGroup( DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(DBInfoLayout.createSequentialGroup() .addContainerGap() .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(DBInfoLayout.createSequentialGroup() .addComponent(DBName) .addGap(13, 13, 13) .addComponent(jTextFieldDBName, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)) .addGroup(DBInfoLayout.createSequentialGroup() .addComponent(url) .addGap(41, 41, 41) .addComponent(jTextFieldurl)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DBInfoLayout.createSequentialGroup() .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(Password) .addComponent(UserName)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextFieldUsername) .addComponent(jTextFieldPassword)))) .addGap(35, 35, 35)) ); DBInfoLayout.setVerticalGroup( DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(DBInfoLayout.createSequentialGroup() .addContainerGap() .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(UserName) .addComponent(jTextFieldUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Password) .addComponent(jTextFieldPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(url) .addComponent(jTextFieldurl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(DBInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(DBName) .addComponent(jTextFieldDBName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(43, Short.MAX_VALUE)) ); Add.setText("Add"); Add.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AddActionPerformed(evt); } }); Cancel.setText("Cancel"); jScrollPane4.setBorder(javax.swing.BorderFactory.createTitledBorder("Connection Status")); ConnectionStatus.setColumns(20); ConnectionStatus.setRows(5); jScrollPane4.setViewportView(ConnectionStatus); javax.swing.GroupLayout DBChooserLayout = new javax.swing.GroupLayout(DBChooser.getContentPane()); DBChooser.getContentPane().setLayout(DBChooserLayout); DBChooserLayout.setHorizontalGroup( DBChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DBChooserLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(Add) .addGap(95, 95, 95) .addComponent(Cancel) .addGap(101, 101, 101)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, DBChooserLayout.createSequentialGroup() .addContainerGap() .addComponent(DBInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(23, 23, 23)) ); DBChooserLayout.setVerticalGroup( DBChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(DBChooserLayout.createSequentialGroup() .addContainerGap() .addGroup(DBChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(DBInfo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE) .addGroup(DBChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Cancel) .addComponent(Add)) .addContainerGap()) ); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jInternalFrame1.setVisible(true); javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("JTree"); javax.swing.tree.DefaultMutableTreeNode treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Inputs"); javax.swing.tree.DefaultMutableTreeNode treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Connection"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("DBInput"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("LocalFileInput"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("HDFSInput"); treeNode2.add(treeNode3); treeNode1.add(treeNode2); treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Actions"); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Hop"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("DBClean"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Extract"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Union"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Join"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Clean"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("Sort"); treeNode2.add(treeNode3); treeNode1.add(treeNode2); treeNode2 = new javax.swing.tree.DefaultMutableTreeNode("Outputs"); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("TextOutputs"); treeNode2.add(treeNode3); treeNode3 = new javax.swing.tree.DefaultMutableTreeNode("AvroOutputs"); treeNode2.add(treeNode3); treeNode1.add(treeNode2); jTreeAction.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1)); jTreeAction.setDragEnabled(true); jTreeAction.addTreeExpansionListener(new javax.swing.event.TreeExpansionListener() { public void treeCollapsed(javax.swing.event.TreeExpansionEvent evt) { } public void treeExpanded(javax.swing.event.TreeExpansionEvent evt) { jTreeActionTreeExpanded(evt); } }); jTreeAction.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent evt) { jTreeActionMouseEntered(evt); } }); jScrollPane3.setViewportView(jTreeAction); jTabbedPaneMainTree.addTab("Palette", jScrollPane3); textarea.setColumns(20); textarea.setRows(5); jScrollPane2.setViewportView(textarea); jTabbedPaneMainTree.addTab("Previews", jScrollPane2); jTabbedPaneMainTree.addTab("MainTree", jTabbedPane1); jButton2.setText("Search"); javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane()); jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout); jInternalFrame1Layout.setHorizontalGroup( jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jInternalFrame1Layout.createSequentialGroup() .addContainerGap() .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTabbedPaneMainTree) .addGroup(jInternalFrame1Layout.createSequentialGroup() .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE))) .addContainerGap()) ); jInternalFrame1Layout.setVerticalGroup( jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jInternalFrame1Layout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTabbedPaneMainTree, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap()) ); jInternalFrame3.setVisible(true); jLayeredPane3.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { jLayeredPane3MouseDragged(evt); } public void mouseMoved(java.awt.event.MouseEvent evt) { jLayeredPane3MouseMoved(evt); } }); jLayeredPane3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabelDuke.setIcon(new javax.swing.ImageIcon(getClass().getResource("/learn/std2.jpg"))); // NOI18N jLabelDuke.setToolTipText(""); jLayeredPane3.setLayer(jLabelDuke, javax.swing.JLayeredPane.DRAG_LAYER); jLayeredPane3.add(jLabelDuke, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 160, 50, 60)); canvas2.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { canvas2FocusGained(evt); } }); jLayeredPane3.setLayer(canvas2, javax.swing.JLayeredPane.PALETTE_LAYER); jLayeredPane3.add(canvas2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 10, 260, 180)); jLabel1.setText("jLabel1"); jLayeredPane3.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 190, 220)); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); jLayeredPane3.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 220, -1, -1)); javax.swing.GroupLayout jInternalFrame3Layout = new javax.swing.GroupLayout(jInternalFrame3.getContentPane()); jInternalFrame3.getContentPane().setLayout(jInternalFrame3Layout); jInternalFrame3Layout.setHorizontalGroup( jInternalFrame3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jInternalFrame3Layout.createSequentialGroup() .addContainerGap() .addComponent(jLayeredPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 327, Short.MAX_VALUE) .addContainerGap()) ); jInternalFrame3Layout.setVerticalGroup( jInternalFrame3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jInternalFrame3Layout.createSequentialGroup() .addContainerGap() .addComponent(jLayeredPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(71, Short.MAX_VALUE)) ); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("My Transformation")); jButtonSave.setText("Save"); jButtonSaveAs.setText("Save As"); jButton1.setText("Run"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jButtonSave) .addGap(18, 18, 18) .addComponent(jButtonSaveAs) .addGap(18, 18, 18) .addComponent(jButton1) .addGap(18, 18, 18) .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonSave) .addComponent(jButtonSaveAs) .addComponent(jButton1)) .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); File.setText("File"); OpenLocalFile.setText("OpenLocalFile"); OpenLocalFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OpenLocalFileActionPerformed(evt); } }); File.add(OpenLocalFile); OpenDB.setText("OpenDB"); OpenDB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OpenDBActionPerformed(evt); } }); File.add(OpenDB); OpenHDFS.setText("OpenHDFS"); OpenHDFS.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OpenHDFSActionPerformed(evt); } }); File.add(OpenHDFS); Exit.setText("Exit"); Exit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ExitActionPerformed(evt); } }); File.add(Exit); jMenuBar1.add(File); jMenuEdit.setText("Edit"); jMenuItemUndo.setText("Undo"); jMenuEdit.add(jMenuItemUndo); jMenuItemRedo.setText("Redo"); jMenuEdit.add(jMenuItemRedo); jMenuItemCut.setText("Cut"); jMenuEdit.add(jMenuItemCut); jMenuItemCopy.setText("Copy"); jMenuEdit.add(jMenuItemCopy); jMenuItemPaste.setText("Paste"); jMenuEdit.add(jMenuItemPaste); jMenuItemDelete.setText("Detele"); jMenuEdit.add(jMenuItemDelete); jMenuItemSelectAll.setText("Select all"); jMenuEdit.add(jMenuItemSelectAll); jMenuBar1.add(jMenuEdit); jMenuView.setText("View"); jMenuItemEnlarge.setText("放大"); jMenuView.add(jMenuItemEnlarge); jMenuItemShrink.setText("缩小"); jMenuView.add(jMenuItemShrink); jMenuItemFullScreen.setText("全屏"); jMenuView.add(jMenuItemFullScreen); jMenuBar1.add(jMenuView); jMenuRun.setText("Run"); jMenuItemRun.setText("运行"); jMenuItemRun.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemRunActionPerformed(evt); } }); jMenuRun.add(jMenuItemRun); jMenuItemPreview.setText("预览"); jMenuRun.add(jMenuItemPreview); jMenuItemDebug.setText("调试"); jMenuRun.add(jMenuItemDebug); jMenuItemReplay.setText("重放"); jMenuRun.add(jMenuItemReplay); jMenuItemCheck.setText("校验"); jMenuRun.add(jMenuItemCheck); jMenuBar1.add(jMenuRun); jMenuTools.setText("Tools"); jMenuItem5.setText("jMenuItem5"); jMenuTools.add(jMenuItem5); jMenuBar1.add(jMenuTools); jMenuHelp.setText("Help"); jMenuBar1.add(jMenuHelp); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jInternalFrame3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(69, 69, 69)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jInternalFrame3) .addComponent(jInternalFrame1)) .addGap(12, 12, 12)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7321342", "0.7292121", "0.7292121", "0.7292121", "0.72863305", "0.7249828", "0.7213628", "0.7209084", "0.7197292", "0.71912086", "0.7185135", "0.7159969", "0.7148876", "0.70944786", "0.70817256", "0.7057678", "0.69884527", "0.69786763", "0.69555986", "0.69548863", "0.69453...
0.0
-1
TODO Autogenerated method stub
private void addListenerOnButton() { radioSex = (RadioGroup) findViewById(R.id.radioSex); btnDisplay = (Button) findViewById(R.id.btnDisplay); btnDisplay.setOnClickListener(new OnClickListener() { public void onClick(View arg0) { // TODO Auto-generated method stub int seledtedId = radioSex.getCheckedRadioButtonId(); RadioButton radioMale = (RadioButton) findViewById(seledtedId); Toast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void onClick(View arg0) { int seledtedId = radioSex.getCheckedRadioButtonId(); RadioButton radioMale = (RadioButton) findViewById(seledtedId); Toast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
BaseHandler baseHandler = new BaseHandler();
public static void main(String[] args) { AbsHandler absHandler = new AbsHandler(); AnotherAbsHandler anotherAbsHandler = new AnotherAbsHandler(); InterfaceHandler interfaceHandler = new InterfaceHandler(); System.out.println(interfaceHandler.sayHello()); System.out.println(absHandler.sayHello()); System.out.println(anotherAbsHandler.sayHello()); System.out.println(absHandler.sayHi()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GenericHandler() {\n\n }", "CreateHandler()\n {\n }", "public ContentHandler getContentHandler()\n {\n return (contentHandler == base) ? null : contentHandler;\n }", "ByteHandler getInstance();", "private PersonHandler() {\n }", "public Handler getHandler();", "public ModuliH...
[ "0.7859275", "0.7787462", "0.6883897", "0.66643876", "0.6664272", "0.6591575", "0.6580743", "0.65483403", "0.65360534", "0.638366", "0.6311826", "0.6310814", "0.6304096", "0.6289577", "0.62646836", "0.62646836", "0.6244364", "0.62431777", "0.6218549", "0.61918354", "0.6184711...
0.0
-1
Copy the directories into the target ...
@Override protected RepositorySource setUpSource() throws Exception { File sourceRepo = new File(REPO_SOURCE_PATH); scratchDirectory = new File(REPO_PATH); scratchDirectory.mkdirs(); FileUtil.delete(scratchDirectory); FileUtil.copy(sourceRepo, scratchDirectory); // Set the connection properties to be use the content of "./src/test/resources/repositories" as a repository ... String[] predefinedWorkspaceNames = new String[] {"test", "otherWorkspace", "airplanes", "cars"}; source = new FileSystemSource(); source.setName("Test Repository"); source.setWorkspaceRootPath(REPO_PATH); source.setPredefinedWorkspaceNames(predefinedWorkspaceNames); source.setDefaultWorkspaceName(predefinedWorkspaceNames[0]); source.setCreatingWorkspacesAllowed(true); source.setUpdatesAllowed(true); source.setExclusionPattern("\\.svn"); source.setInclusionPattern(".+"); testWorkspaceRoot = new File(REPO_PATH, "test"); testWorkspaceRoot.mkdir(); otherWorkspaceRoot = new File(REPO_PATH, "otherWorkspace"); otherWorkspaceRoot.mkdir(); newWorkspaceRoot = new File(REPO_PATH, "newWorkspace"); newWorkspaceRoot.mkdir(); return source; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length...
[ "0.66364884", "0.66039735", "0.6587539", "0.65822923", "0.6524656", "0.6505356", "0.64569914", "0.6425295", "0.6354383", "0.6336055", "0.62958306", "0.6225143", "0.61746556", "0.6171725", "0.61639005", "0.61469257", "0.61407197", "0.6127812", "0.60901487", "0.6085007", "0.600...
0.0
-1
Since the FS connector does not support UUIDs (under the root node), all clones are just copies (clone for nonreferenceable nodes is a copy to the corresponding path).
@Test public void shouldBeAbleToCloneFolder() { graph.useWorkspace("otherWorkspace"); graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); File newFile = new File(otherWorkspaceRoot, "testFolder/testFile"); assertContents(newFile, TEST_CONTENT); graph.useWorkspace("test"); graph.clone("/testFolder").fromWorkspace("otherWorkspace").as("clonedFolder").into("/").failingIfAnyUuidsMatch(); File copiedFolder = new File(testWorkspaceRoot, "clonedFolder"); assertTrue(copiedFolder.exists()); assertTrue(copiedFolder.isDirectory()); File copiedFile = new File(testWorkspaceRoot, "clonedFolder/testFile"); assertContents(copiedFile, TEST_CONTENT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void shouldBeAbleToCloneFile() {\n graph.useWorkspace(\"otherWorkspace\");\n graph.create(\"/testFile\").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and();\n graph.create(\"/testFile/jcr:content\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RES...
[ "0.63469356", "0.6329597", "0.63011366", "0.6032061", "0.5956035", "0.5949423", "0.5815972", "0.57356584", "0.57290506", "0.5718554", "0.5694486", "0.5694486", "0.56633407", "0.56414723", "0.56208456", "0.5618407", "0.56150395", "0.5554634", "0.5544848", "0.55372715", "0.5534...
0.6175727
3
Since the FS connector does not support UUIDs (under the root node), all clones are just copies (clone for nonreferenceable nodes is a copy to the corresponding path).
@Test public void shouldBeAbleToCloneFile() { graph.useWorkspace("otherWorkspace"); graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); File newFile = new File(otherWorkspaceRoot, "testFile"); assertContents(newFile, TEST_CONTENT); graph.useWorkspace("test"); graph.clone("/testFile").fromWorkspace("otherWorkspace").as("clonedFile").into("/").failingIfAnyUuidsMatch(); File copiedFile = new File(testWorkspaceRoot, "clonedFile"); assertContents(copiedFile, TEST_CONTENT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Node copy();", "public abstract TreeNode copy();", "@Test\n public void shouldBeAbleToCloneFolder() {\n graph.useWorkspace(\"otherWorkspace\");\n graph.create(\"/testFolder\").orReplace().and();\n graph.create(\"/testFolder/testFile\").with(JcrLexicon.PRIMARY_TYPE, JcrNt...
[ "0.6330461", "0.6302595", "0.6176355", "0.6032009", "0.5955845", "0.5949129", "0.5815095", "0.57358307", "0.5728423", "0.57209986", "0.5694154", "0.5694154", "0.5663088", "0.56407887", "0.5620366", "0.5618125", "0.56146604", "0.5554333", "0.55458754", "0.5536847", "0.55347264...
0.6347025
0
This method attempts to create a small subgraph and then delete some of the nodes in that subgraph, all within the same batch operation.
@FixFor( "MODE-788" ) @Test public void shouldCreateSubgraphAndDeletePartOfThatSubgraphInSameOperation() { graph.batch() .create("/a") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .create("/a/b") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .create("/a/b/c") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .delete("/a/b") .and() .execute(); // Now look up node A ... File newFile = new File(testWorkspaceRoot, "a"); assertTrue(newFile.exists()); assertTrue(newFile.isDirectory()); assertTrue(newFile.list().length == 0); assertFalse(new File(newFile, "b").exists()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FixFor( \"MODE-788\" )\n @Test\n public void shouldCreateSubgraphAndDeleteSubgraphInSameOperation() {\n graph.batch()\n .create(\"/a\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b\")\n ...
[ "0.7278635", "0.599739", "0.5823925", "0.5739531", "0.5693812", "0.56821156", "0.56541276", "0.56407434", "0.56407434", "0.5627781", "0.56220406", "0.56177694", "0.56053716", "0.55546874", "0.55480355", "0.5509134", "0.5497742", "0.54974985", "0.5477809", "0.547051", "0.54656...
0.7420185
0
This method attempts to create a small subgraph and then delete some of the nodes in that subgraph, all within the same batch operation.
@FixFor( "MODE-788" ) @Test public void shouldCreateSubgraphAndDeleteSubgraphInSameOperation() { graph.batch() .create("/a") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .create("/a/b") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .create("/a/b/c") .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER) .orReplace() .and() .delete("/a") .and() .execute(); // Now look up node A ... assertTrue(testWorkspaceRoot.list().length == 0); assertFalse(new File(testWorkspaceRoot, "a").exists()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FixFor( \"MODE-788\" )\n @Test\n public void shouldCreateSubgraphAndDeletePartOfThatSubgraphInSameOperation() {\n graph.batch()\n .create(\"/a\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER)\n .orReplace()\n .and()\n .create(\"/a/b\...
[ "0.7420843", "0.59974355", "0.582291", "0.5739358", "0.5693441", "0.5682855", "0.5651998", "0.564225", "0.564225", "0.5626353", "0.5623594", "0.56165606", "0.5603594", "0.5553024", "0.55465573", "0.5509044", "0.5497688", "0.5496958", "0.5476319", "0.5468764", "0.5463897", "...
0.7279151
1
============ Equivalence Partitions Tests ============== TC01: the closest point is in the middle of the list
@Test public void findClosestPointTest() { Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100)); List<Point3D> list = new LinkedList<Point3D>(); list.add(new Point3D(1, 1, -100)); list.add(new Point3D(-1, 1, -99)); list.add(new Point3D(0, 2, -10)); list.add(new Point3D(0.5, 0, -100)); assertEquals(list.get(2), ray.findClosestPoint(list)); // =============== Boundary Values Tests ================== //TC01: the list is empty List<Point3D> list2 = null; assertNull("try again",ray.findClosestPoint(list2)); //TC11: the closest point is the first in the list List<Point3D> list3 = new LinkedList<Point3D>(); list3.add(new Point3D(0, 2, -10)); list3.add(new Point3D(-1, 1, -99)); list3.add(new Point3D(1, 1, -100)); list3.add(new Point3D(0.5, 0, -100)); assertEquals(list3.get(0), ray.findClosestPoint(list3)); //TC12: the closest point is the last in the list List<Point3D> list4 = new LinkedList<Point3D>(); list4.add(new Point3D(1, 1, -100)); list4.add(new Point3D(0.5, 0, -100)); list4.add(new Point3D(-1, 1, -99)); list4.add(new Point3D(0, 2, -10)); assertEquals(list4.get(3), ray.findClosestPoint(list4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void findClosestGeoPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n Geometry geo = new Sphere(new Point3D(1,1,1),2);\n\n List<Intersectable.GeoPoint> list = new LinkedList<Intersectable.GeoPoint>();\n list.add(new GeoPoint(geo,new Po...
[ "0.6686584", "0.66632354", "0.6312553", "0.6272355", "0.61855155", "0.6176435", "0.6023272", "0.6021953", "0.60191184", "0.5979776", "0.5958544", "0.5944896", "0.59373707", "0.59077567", "0.5896149", "0.58902943", "0.58853793", "0.5877106", "0.58695483", "0.58572495", "0.5854...
0.67657083
0
============ Equivalence Partitions Tests ============== TC01: the closest point is in the middle of the list
@Test public void findClosestGeoPointTest() { Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100)); Geometry geo = new Sphere(new Point3D(1,1,1),2); List<Intersectable.GeoPoint> list = new LinkedList<Intersectable.GeoPoint>(); list.add(new GeoPoint(geo,new Point3D(1, 1, -100))); list.add(new GeoPoint(geo,new Point3D(-1, 1, -99))); list.add(new GeoPoint(geo,new Point3D(0, 2, -10))); list.add(new GeoPoint(geo,new Point3D(0.5, 0, -100))); assertEquals(list.get(2), ray.findClosestGeoPoint(list)); // =============== Boundary Values Tests ================== //TC01: the list is empty List<GeoPoint> list2 = null; assertNull("try again",ray.findClosestGeoPoint(list2)); //TC11: the closest point is the first in the list List<GeoPoint> list3 = new LinkedList<GeoPoint>(); list3.add(new GeoPoint(geo,new Point3D(0, 2, -10))); list3.add(new GeoPoint(geo,new Point3D(-1, 1, -99))); list3.add(new GeoPoint(geo,new Point3D(1, 1, -100))); list3.add(new GeoPoint(geo,new Point3D(0.5, 0, -100))); assertEquals(list3.get(0), ray.findClosestGeoPoint(list3)); //TC12: the closest point is the last in the list List<GeoPoint> list4 = new LinkedList<GeoPoint>(); list4.add(new GeoPoint(geo,new Point3D(1, 1, -100))); list4.add(new GeoPoint(geo,new Point3D(0.5, 0, -100))); list4.add(new GeoPoint(geo,new Point3D(-1, 1, -99))); list4.add(new GeoPoint(geo,new Point3D(0, 2, -10))); assertEquals(list4.get(3), ray.findClosestGeoPoint(list4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void findClosestPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n\n List<Point3D> list = new LinkedList<Point3D>();\n list.add(new Point3D(1, 1, -100));\n list.add(new Point3D(-1, 1, -99));\n list.add(new Po...
[ "0.6764975", "0.66624093", "0.6311925", "0.6270923", "0.61857826", "0.6175613", "0.60234827", "0.60216856", "0.6017866", "0.59805524", "0.5957756", "0.5943561", "0.5937141", "0.5905895", "0.5896286", "0.589011", "0.58854115", "0.58774817", "0.58703387", "0.5857428", "0.585470...
0.66859096
1
Open your local db as the input stream
protected static void copyDataBaseFromAssets(Context context) throws IOException { InputStream myInput = context.getAssets().open("employee_mobile.db"); // Path to the just created empty db String outFileName = "/data/data/com.example.multiframe/databases/" + ETConstants.DB_NAME; SQLiteDatabase db = context.openOrCreateDatabase("employee_mobile.db", context.MODE_PRIVATE, null); db.close(); Log.w("DBHelper", "Copying file from "+myInput+" to "+outFileName); //Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName); //transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[1024]; int length; while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); } //Close the streams myOutput.flush(); myOutput.close(); myInput.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File getInputDb();", "private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\n...
[ "0.6653542", "0.6627006", "0.6245373", "0.61839867", "0.6142275", "0.6101584", "0.60835016", "0.6078054", "0.6069067", "0.6023752", "0.59847206", "0.5955093", "0.5949633", "0.59181404", "0.5912812", "0.5895137", "0.5891108", "0.5891108", "0.5891108", "0.5891108", "0.5891108",...
0.5230739
87
/ Name : sqlSelect Params : tablename and list of colums to be retrieved Desc : Return 0 or more rows in the HashMap array with hash map containing columns & values
public HashMap<String, String>[] sqlSelect(String sTable, String hCols[], HashMap<String, String> hWhere) { Log.i("DBHelper:sqlSelect", "=> Start"); String sColsSelect = ""; String sColsWhere = " "; int i = 0; SQLiteDatabase db = this.getWritableDatabase(); for (i = 0; i < hCols.length; i++) { sColsSelect = sColsSelect + hCols[i] + ", "; } for (Entry<String, String> e : hWhere.entrySet()) { String field = e.getKey(); String value = e.getValue(); sColsWhere = sColsWhere + field + " = " + value + " and "; } String sqlQuery = "SELECT " + sColsSelect + "1 FROM " + sTable + " WHERE " + sColsWhere + " 1=1 "; Log.i("DBHelper:sqlSelect", sqlQuery); Cursor c = db.rawQuery(sqlQuery, null); int nRows = 0; HashMap<String, String>[] hResult = new HashMap[c.getCount()]; Log.i("DBHelper:sqlSelect", "Total Rows : " + c.getCount()); if (c.moveToFirst()) { hResult[0] = new HashMap<String, String>(); for (i = 0; i < hCols.length; i++) { hResult[0].put(hCols[i], c.getString(i)); Log.i("DBHelper:sqlSelect", c.getString(i)); } } nRows++; while (c.moveToNext()) { hResult[nRows] = new HashMap<String, String>(); for (i = 0; i < hCols.length; i++) { hResult[nRows].put(hCols[i], c.getString(i)); Log.i("DBHelper:sqlSelect", c.getString(i)); } nRows++; } Log.i("DBHelper:sqlSelect", "Total records " + hResult.length); Log.i("DBHelper:sqlSelect", "<= End"); return hResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Select({\"<script>\",\n \"SELECT\",\n \"<foreach collection='columnNames' index='index' item='item' separator=','>\",\n \" ${item}\",\n \"</foreach>\",\n \"FROM ${tableName}\",\n \"WHERE ${primaryKeyName} = #{primaryKeyValue}\",\n \"</s...
[ "0.65408707", "0.63828987", "0.6352846", "0.6295555", "0.62664926", "0.6090925", "0.6079106", "0.606163", "0.5990623", "0.59111905", "0.58930176", "0.5875889", "0.58714145", "0.5849658", "0.584651", "0.58182955", "0.58139056", "0.57940257", "0.57733405", "0.57448596", "0.5715...
0.7347453
0
TODO Autogenerated method stub
@Override public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Instantiates a new Change scene event.
public ChangeSceneEvent(String param) { super(SCENE_CHANGE_EVENT_TYPE); this.param = param; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void changeScene(ActionEvent event,String fxmlPage) throws IOException {\n\t\tParent root = FXMLLoader.load(getClass().getResource(fxmlPage));\n\t\tScene scene = new Scene(root);\n\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t\tstage.setScene(scene);\n\t}", "public void ...
[ "0.6519344", "0.6476011", "0.642505", "0.6407698", "0.6324729", "0.6189128", "0.6182313", "0.6087657", "0.6011621", "0.59749997", "0.5882414", "0.58730525", "0.5830461", "0.5809143", "0.5809143", "0.5769819", "0.57413495", "0.5732499", "0.57291555", "0.5670995", "0.5670995", ...
0.6927367
0
Creates file with given name, at given path and fills it with given text
public static void outputFile(String name, String path, List<String> txt) { String pathb = Constants.path + "/" + path; File folder = new File(pathb); if (!folder.exists()) { folder.mkdirs(); } try { File bin = new File(pathb, "bin.inf"); boolean binex = false; boolean recount = false; int count = -1; if (!bin.exists()) { bin.createNewFile(); } else { binex = true; FileReader fr = new FileReader(bin); BufferedReader br = new BufferedReader(fr); count = Integer.parseInt(br.readLine()); br.close(); } for (int i = count; i >= -1; i--) { File file = new File(pathb, addBefoPnt(name, "_" + i)); if (file.exists()) { file.renameTo(new File(pathb, addBefoPnt(name, "_" + (i + 1)))); } else if (i == -1) { file = new File(pathb, addBefoPnt(name, "_latest")); if (file.exists()) { file.renameTo(new File(pathb, addBefoPnt(name, "_" + (i + 1)))); } } else recount = true; } File file = new File(pathb, addBefoPnt(name, "_" + (count + 1))); if (file.exists()) { recount = true; } file = new File(pathb, addBefoPnt(name, "_latest")); file.createNewFile(); FileWriter ffr = new FileWriter(file); BufferedWriter fbr = new BufferedWriter(ffr); for (String s : txt) { fbr.write(s + "\n"); } fbr.flush(); fbr.close(); if (!binex) { // -1 for latest int cnt = -1; File f = new File(pathb, name + "_" + 0); while (f.exists()) { cnt += 1; f = new File(pathb, addBefoPnt(name, "_" + (cnt + 1))); } FileWriter fr = new FileWriter(bin); BufferedWriter br = new BufferedWriter(fr); br.write(cnt + ""); br.flush(); br.close(); } else { FileWriter fr = new FileWriter(bin); BufferedWriter br = new BufferedWriter(fr); bin.delete(); bin.createNewFile(); if (!recount) br.write(count + 1 + ""); else { count = -1; File f = new File(pathb, addBefoPnt(name, "_" + 0)); while (f.exists()) { count += 1; f = new File(pathb, addBefoPnt(name, "_" + (count + 1))); } br.write(count + ""); } br.flush(); br.close(); } } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeText(FsPath path, String text);", "public void writeFile(String path, String name, String content)\n\t\t\tthrows Exception {\n\n\t\ttry {\n\t\t\tString ruta = path + File.separator + name;\n\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(ruta);\n\t\t\tBufferedWriter out = new Buffered...
[ "0.71888775", "0.6764961", "0.6722402", "0.6691577", "0.6672433", "0.6548442", "0.652405", "0.6499527", "0.6400736", "0.63903487", "0.6345442", "0.6285875", "0.62704074", "0.62287724", "0.6220511", "0.6205108", "0.6164314", "0.6154901", "0.6126859", "0.61099327", "0.6058569",...
0.5525449
85
Creates file with given name, at given path and fills it with given text
public static void rewriteFile(String name, String path, List<String> txt) { String pathb = Constants.path + "/" + path; File folder = new File(pathb); if (!folder.exists()) { folder.mkdirs(); } try { File file = new File(pathb, name); if (!file.exists()) file.createNewFile(); FileWriter ffr = new FileWriter(file); BufferedWriter fbr = new BufferedWriter(ffr); for (String s : txt) { fbr.write(s + "\n"); } fbr.flush(); fbr.close(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeText(FsPath path, String text);", "public void writeFile(String path, String name, String content)\n\t\t\tthrows Exception {\n\n\t\ttry {\n\t\t\tString ruta = path + File.separator + name;\n\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(ruta);\n\t\t\tBufferedWriter out = new Buffered...
[ "0.7190296", "0.67657495", "0.6720805", "0.66905355", "0.6672956", "0.65468955", "0.6525531", "0.650099", "0.639984", "0.6389891", "0.63443065", "0.6284416", "0.626783", "0.62309676", "0.62182736", "0.6204815", "0.616591", "0.6156325", "0.61283326", "0.6110893", "0.6056178", ...
0.56068
71
Appearance app = new Appearance(); app.setAttribute(CommonAttributes.LINE_SHADER + "." + CommonAttributes.PICKABLE, false); app.setAttribute(CommonAttributes.POINT_SHADER + "." + CommonAttributes.PICKABLE, false); app.setAttribute(CommonAttributes.POLYGON_SHADER + "." + CommonAttributes.PICKABLE, false); auxComponent.setAppearance(app);
private void initAuxComponent() { auxComponent.setPickable(false); auxComponent.addChild(unitDiscComponent); auxComponent.addChild(circlesComponent); auxComponent.addChild(hyperboloidComponent); auxComponent.addChild(paraboloidComponent); auxComponent.addChild(poincareGeodesicsComponent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void init() {\n glEnable( GL_BLEND );\n glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );\n glEnable( GL_LINE_SMOOTH );\n glEnable( GL_POINT_SMOOTH );\n }", "public void addPolyGon() {\n abstractEditor.drawNewShape(new ESurfaceDT());\n }", "@Ove...
[ "0.6222561", "0.5928599", "0.5905518", "0.58058465", "0.57774264", "0.5696348", "0.5651869", "0.56414104", "0.5533411", "0.5518116", "0.5485503", "0.54627717", "0.54134125", "0.53989345", "0.539747", "0.5392655", "0.53712034", "0.5368844", "0.53550607", "0.5348903", "0.534204...
0.51808167
42
Cria um novo Prato
public Prato criaPrato(String nomePrato, String descricaoPrato, double precoPrato) throws CadastroPratoInvalidoException { VerificaPrato.verificaNomePratovazio(nomePrato); VerificaPrato.verificaDescVazio(descricaoPrato); VerificaPrato.verificaPrecoInvalido(precoPrato); return new Prato(nomePrato, descricaoPrato, precoPrato); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Secuencia createSecuencia();", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "Motivo create(Motivo motivo);", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setM...
[ "0.7184366", "0.7107954", "0.70864797", "0.69300884", "0.6828432", "0.6823568", "0.6766508", "0.6731207", "0.67197126", "0.66259146", "0.66172063", "0.6568384", "0.65387964", "0.65316164", "0.65094745", "0.64975595", "0.64820176", "0.64661294", "0.6457062", "0.64418936", "0.6...
0.62130356
36
SE 1 ataque ganhou, se 0 defesa ganhou se 2 nada acontece
private int[] comparaSeAtaqueGanhouNoDado() { int size_ataque; int size_defesa; if (dadosAtaque[1] == 0) { size_ataque = 1; } else if (dadosAtaque[2] == 0) { size_ataque = 2; } else { size_ataque = 3; } if (dadosDefesa[1] == 0) { size_defesa = 1; } else if (dadosDefesa[2] == 0) { size_defesa = 2; } else { size_defesa = 3; } int[] resultado = new int[Math.max(size_defesa, size_ataque)]; for (int i = resultado.length - 1; i >= 0; i--) { if (dadosAtaque[i] > 0 && dadosDefesa[i] > 0) { if (dadosAtaque[i] > dadosDefesa[i]) { resultado[i] = 1; } else { resultado[i] = 0; } } else { resultado[i] = 2; } } return resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public int hayGanador() {\n\t\tif(marcador1==2) {\n\t\t\tresultado=1;\n\t\t\treturn 1;\n\t\t}\n\t\telse if(marcador2==2) {\n\t\t\tresultado=2;\n\t\t\treturn 2;\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\...
[ "0.6815345", "0.65059155", "0.6439356", "0.62209046", "0.62070614", "0.61596197", "0.6152673", "0.6136207", "0.6104359", "0.6097907", "0.6095065", "0.60835165", "0.6081271", "0.60686857", "0.6063797", "0.6062863", "0.60537076", "0.60223126", "0.59671503", "0.5960836", "0.5945...
0.0
-1
Initialise une liste de components. Pascal Luttgens.
public void init(Component... components) { for (Component component : components) { if (component instanceof Script) { this.scripts.add((Script) component); } else { this.components.add(component); } } this.components.sort(new Component.UpdatePriorityComparator()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List init(List list) {\n Iterator it = components.iterator();\n PortletComponent comp;\n while (it.hasNext()) {\n comp = (PortletComponent) it.next();\n comp.setTheme(theme);\n list = comp.init(list);\n }\n System.err.println(\"Made...
[ "0.7522236", "0.7059854", "0.7059854", "0.705644", "0.69118863", "0.67304754", "0.6674681", "0.6670304", "0.6637488", "0.6612427", "0.65532047", "0.6506848", "0.6497704", "0.6481467", "0.6452172", "0.6449916", "0.6447648", "0.64285505", "0.6424458", "0.642304", "0.6417502", ...
0.60918546
60
Initialise tous les components
public void initComponents() { Iterator<Component> itComponent = this.components.iterator(); while (itComponent.hasNext()) { itComponent.next().init(this); } Iterator<Script> itScript = this.scripts.iterator(); while (itScript.hasNext()) { itScript.next().init(this); } System.out.println(this.owner.id + " : " + this.components.toString() + " " + this.scripts.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "private void initcomponent() {\n\r\n\t}", "public void init() {\n initComponents();\n initData();\n }", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n ...
[ "0.8220887", "0.8220887", "0.8019211", "0.79788685", "0.7886524", "0.78449225", "0.7690912", "0.7557128", "0.7463869", "0.7445563", "0.740579", "0.73586047", "0.73554504", "0.73541194", "0.73470414", "0.73400503", "0.73321235", "0.72963333", "0.7280608", "0.72696775", "0.7241...
0.7149726
34
/ Test adding item to basket
@Test public void testAddItemToBasket() throws Exception { BBBRequest request = BBBRequestFactory.getInstance().createAddBasketItemRequest(BOOK_BASKET_ITEM_ISBN); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS_ITEMS); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); if(response.getResponseCode() != HttpURLConnection.HTTP_OK) { fail("Error: "+response.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Then(\"^click on add to basket$\")\r\n\tpublic void click_on_add_to_basket() throws Throwable {\n\t\tverbose(\"***********************************************************\");\r\n\t\tAssert.assertTrue(navigate_rsc.addbasket());\r\n\t\tverbose(\"***********************************************************\");\r\n\t ...
[ "0.7638219", "0.7412803", "0.7269644", "0.7044094", "0.6967302", "0.69509816", "0.6940419", "0.69289917", "0.6896751", "0.68956304", "0.68359053", "0.6825949", "0.67878205", "0.675983", "0.6749824", "0.6747619", "0.6743207", "0.66962034", "0.66835463", "0.6674203", "0.6631549...
0.80988383
0
/ Test getting the users basket
@Test public void testGetBasket() throws Exception { BBBRequest request = BBBRequestFactory.getInstance().createGetBasketRequest(); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); basketHandler.receivedResponse(response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test \n\tpublic void testGetBasketItem() throws Exception {\n\t\tBBBBasket basket = AccountHelper.getInstance().getBasket();\n\t\t\n\t\tif(basket == null || basket.items == null || basket.items.length < 1) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString id = basket.items[0].id;\n\t\t\n\t\tBBBRequest request = BBBReques...
[ "0.70718795", "0.65635943", "0.62733585", "0.6256325", "0.62383866", "0.6158505", "0.6148199", "0.61442876", "0.6092615", "0.6040337", "0.6010067", "0.5954026", "0.5947795", "0.5934649", "0.59338325", "0.58861214", "0.5853281", "0.5832235", "0.58016664", "0.5787045", "0.57822...
0.7107449
0
/ Test getting a single basket item
@Test public void testGetBasketItem() throws Exception { BBBBasket basket = AccountHelper.getInstance().getBasket(); if(basket == null || basket.items == null || basket.items.length < 1) { return; } String id = basket.items[0].id; BBBRequest request = BBBRequestFactory.getInstance().createGetBasketItemRequest(id); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) ); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); basketItemHandler.receivedResponse(response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void getCostForItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(2, fc) == 0);\n\n\t}", "@Test \n\tpublic void testG...
[ "0.7060678", "0.6896003", "0.683193", "0.6720334", "0.6640545", "0.6608811", "0.6582085", "0.65181917", "0.6421486", "0.641511", "0.6390982", "0.6372108", "0.6366718", "0.6355223", "0.6346719", "0.6340909", "0.6319029", "0.6315865", "0.63012165", "0.6254966", "0.6193832", "...
0.83049196
0
/ Test deleting a basket item
@Test public void testDeleteBasketItem() throws Exception { BBBBasket basket = AccountHelper.getInstance().getBasket(); if(basket == null || basket.items == null || basket.items.length < 1) { return; } String id = basket.items[0].id; BBBRequest request = BBBRequestFactory.getInstance().createDeleteBasketItemRequest(id); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), String.format(PATH_MY_BASKETS_ITEMS_, id) ); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); if(response.getResponseCode() != HttpURLConnection.HTTP_OK) { fail("Error: "+response.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDelete() {\n TDelete_Return[] Basket_delete_out = basketService.delete(new String[] { BasketPath });\n assertNoError(Basket_delete_out[0].getError());\n }", "@Test\n public void deleteItem() {\n Item item = new Item();\n item.setName(\"Drill\");\n item.set...
[ "0.8221381", "0.78238595", "0.7811078", "0.75750095", "0.7524319", "0.74137574", "0.74055564", "0.73427993", "0.72979057", "0.7274842", "0.7258394", "0.7179679", "0.7066568", "0.7047497", "0.703303", "0.6945744", "0.6935872", "0.6916322", "0.68847895", "0.6861349", "0.6859907...
0.8605222
0
/ Test clearing the whole basket
@Test public void testClearBasket() throws Exception { BBBRequest request = BBBRequestFactory.getInstance().createClearBasketRequest(); String expectedUrl = AccountHelper.constructUrl(BBBRequestFactory.getInstance().getHostBasket(), PATH_MY_BASKETS); assertEquals(expectedUrl, request.getUrl()); BBBResponse response = BBBRequestManager.getInstance().executeRequestSynchronously(request); if(response.getResponseCode() != HttpURLConnection.HTTP_OK) { fail("Error: "+response.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void emptyBasket() {\n balls.clear();\n }", "public void clearCart() {\n this.items.clear();\n }", "public void emptyCart() {\n cart.clear();\n total = 0;\n }", "@Test\n\t\tpublic void testEmptyTheCart() {\n\t\t\tProduct hamburger = new Product(\"burger\", 10);\n\t...
[ "0.7774713", "0.71371704", "0.6848777", "0.6833519", "0.6742688", "0.6696179", "0.6677125", "0.655147", "0.6522898", "0.651004", "0.64243054", "0.64140457", "0.64123434", "0.63519496", "0.6348832", "0.6334742", "0.63213086", "0.63211685", "0.6273422", "0.62728", "0.62523645",...
0.750051
1
don't want to overwrite the current drawable, so do nothing here.
@Override public void setLoadingDrawable(ImageView imageView, Drawable drawable) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setBackgroundDrawable(Drawable d) {\n if (d != getBackground()) {\n super.setBackgroundDrawable(d);\n }\n }", "@Override\n public void excute() {\n drawable.setColor(color);\n }", "@Override\n public void invalidateDrawable(Drawable drawable) {\n ...
[ "0.67786646", "0.6743884", "0.6678951", "0.66634345", "0.65283704", "0.6340017", "0.62284046", "0.6226154", "0.6192913", "0.61843985", "0.6166612", "0.61550236", "0.61550236", "0.61530125", "0.61371744", "0.6116776", "0.61056674", "0.6099158", "0.60882527", "0.6074515", "0.60...
0.5804919
36
/ JADX WARNING: Removed duplicated region for block: B:47:0x00ba / JADX WARNING: Removed duplicated region for block: B:76:0x016f / JADX WARNING: Removed duplicated region for block: B:73:0x0133
public final android.os.Bundle a(java.lang.String r10, android.os.Bundle r11, @android.support.annotation.Nullable java.util.List<java.lang.String> r12, boolean r13, boolean r14) { /* r9 = this; r0 = 0; if (r11 == 0) goto L_0x0174; L_0x0003: r7 = new android.os.Bundle; r7.<init>(r11); r0 = 0; r1 = r11.keySet(); r8 = r1.iterator(); r6 = r0; L_0x0012: r0 = r8.hasNext(); if (r0 == 0) goto L_0x0173; L_0x0018: r2 = r8.next(); r2 = (java.lang.String) r2; r0 = 0; if (r12 == 0) goto L_0x0027; L_0x0021: r1 = r12.contains(r2); if (r1 != 0) goto L_0x003d; L_0x0027: if (r13 == 0) goto L_0x0032; L_0x0029: r0 = "event param"; r0 = r9.a(r0, r2); if (r0 != 0) goto L_0x005b; L_0x0031: r0 = 3; L_0x0032: if (r0 != 0) goto L_0x003d; L_0x0034: r0 = "event param"; r0 = r9.c(r0, r2); if (r0 != 0) goto L_0x0075; L_0x003c: r0 = 3; L_0x003d: if (r0 == 0) goto L_0x008f; L_0x003f: r1 = a(r7, r0); if (r1 == 0) goto L_0x0057; L_0x0045: r1 = 40; r3 = 1; r1 = a(r2, r1, r3); r3 = "_ev"; r7.putString(r3, r1); r1 = 3; if (r0 != r1) goto L_0x0057; L_0x0054: a(r7, r2); L_0x0057: r7.remove(r2); goto L_0x0012; L_0x005b: r0 = "event param"; r1 = 0; r0 = r9.a(r0, r1, r2); if (r0 != 0) goto L_0x0067; L_0x0064: r0 = 14; goto L_0x0032; L_0x0067: r0 = "event param"; r1 = 40; r0 = r9.a(r0, r1, r2); if (r0 != 0) goto L_0x0073; L_0x0071: r0 = 3; goto L_0x0032; L_0x0073: r0 = 0; goto L_0x0032; L_0x0075: r0 = "event param"; r1 = 0; r0 = r9.a(r0, r1, r2); if (r0 != 0) goto L_0x0081; L_0x007e: r0 = 14; goto L_0x003d; L_0x0081: r0 = "event param"; r1 = 40; r0 = r9.a(r0, r1, r2); if (r0 != 0) goto L_0x008d; L_0x008b: r0 = 3; goto L_0x003d; L_0x008d: r0 = 0; goto L_0x003d; L_0x008f: r4 = r11.get(r2); r9.c(); if (r14 == 0) goto L_0x00f4; L_0x0098: r1 = "param"; r0 = r4 instanceof android.os.Parcelable[]; if (r0 == 0) goto L_0x00e4; L_0x009e: r0 = r4; r0 = (android.os.Parcelable[]) r0; r0 = r0.length; L_0x00a2: r3 = 1000; // 0x3e8 float:1.401E-42 double:4.94E-321; if (r0 <= r3) goto L_0x00f2; L_0x00a6: r3 = r9.zzge(); r3 = r3.u(); r5 = "Parameter array is too long; discarded. Value kind, name, array length"; r0 = java.lang.Integer.valueOf(r0); r3.a(r5, r1, r2, r0); r0 = 0; L_0x00b8: if (r0 != 0) goto L_0x00f4; L_0x00ba: r0 = 17; L_0x00bc: if (r0 == 0) goto L_0x012d; L_0x00be: r1 = "_ev"; r1 = r1.equals(r2); if (r1 != 0) goto L_0x012d; L_0x00c6: r0 = a(r7, r0); if (r0 == 0) goto L_0x00df; L_0x00cc: r0 = 40; r1 = 1; r0 = a(r2, r0, r1); r1 = "_ev"; r7.putString(r1, r0); r0 = r11.get(r2); a(r7, r0); L_0x00df: r7.remove(r2); goto L_0x0012; L_0x00e4: r0 = r4 instanceof java.util.ArrayList; if (r0 == 0) goto L_0x00f0; L_0x00e8: r0 = r4; r0 = (java.util.ArrayList) r0; r0 = r0.size(); goto L_0x00a2; L_0x00f0: r0 = 1; goto L_0x00b8; L_0x00f2: r0 = 1; goto L_0x00b8; L_0x00f4: r0 = r9.o(); r1 = r9.f(); r1 = r1.s(); r0 = r0.f(r1); if (r0 == 0) goto L_0x010c; L_0x0106: r0 = h(r10); if (r0 != 0) goto L_0x0112; L_0x010c: r0 = h(r2); if (r0 == 0) goto L_0x0120; L_0x0112: r1 = "param"; r3 = 256; // 0x100 float:3.59E-43 double:1.265E-321; r0 = r9; r5 = r14; r0 = r0.a(r1, r2, r3, r4, r5); L_0x011c: if (r0 == 0) goto L_0x012b; L_0x011e: r0 = 0; goto L_0x00bc; L_0x0120: r1 = "param"; r3 = 100; r0 = r9; r5 = r14; r0 = r0.a(r1, r2, r3, r4, r5); goto L_0x011c; L_0x012b: r0 = 4; goto L_0x00bc; L_0x012d: r0 = a(r2); if (r0 == 0) goto L_0x016f; L_0x0133: r0 = r6 + 1; r1 = 25; if (r0 <= r1) goto L_0x0170; L_0x0139: r1 = 48; r3 = new java.lang.StringBuilder; r3.<init>(r1); r1 = "Event can't contain more than 25 params"; r1 = r3.append(r1); r1 = r1.toString(); r3 = r9.zzge(); r3 = r3.r(); r4 = r9.k(); r4 = r4.a(r10); r5 = r9.k(); r5 = r5.a(r11); r3.a(r1, r4, r5); r1 = 5; a(r7, r1); r7.remove(r2); r6 = r0; goto L_0x0012; L_0x016f: r0 = r6; L_0x0170: r6 = r0; goto L_0x0012; L_0x0173: r0 = r7; L_0x0174: return r0; */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.measurement.ie.a(java.lang.String, android.os.Bundle, java.util.List, boolean, boolean):android.os.Bundle"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test (timeout=180000)\n public void testDegenerateRegions() throws Exception {\n TableName table = TableName.valueOf(\"tableDegenerateRegions\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, ...
[ "0.59960264", "0.5826527", "0.5812728", "0.5679325", "0.56472206", "0.5538066", "0.55072904", "0.5425242", "0.5407311", "0.54045165", "0.53943646", "0.53784907", "0.53576726", "0.5304307", "0.52991486", "0.5284393", "0.5239532", "0.522024", "0.5203805", "0.5196874", "0.519571...
0.0
-1
TODO Autogenerated method stub
public void savePerson() { System.out.println("save person"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Transfer as List and sort it
public static ArrayList<Entry<String, Double>> sortValue(HashMap<String, Double> t_e_f2){ ArrayList<Map.Entry<String, Double>> l = new ArrayList(t_e_f2.entrySet()); Collections.sort(l, new Comparator<Map.Entry<String, Double>>(){ public int compare(Map.Entry<String, Double> o1, Map.Entry<String, Double> o2) { return o1.getValue().compareTo(o2.getValue()); }}); Collections.reverse(l); // System.out.println(l); return l; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void listSort() {\n\t\tCollections.sort(cd);\n\t}", "protected void sort() {\n\n\t\tCollections.sort(this.myRRList);\n\t}", "public void sort() {\r\n Collections.sort(this.list, this);\r\n }", "public void sort(){\n Collections.sort(list, new SortBySpecies());\n }", "public List<...
[ "0.7510931", "0.71441674", "0.710797", "0.7067694", "0.6986124", "0.69752586", "0.69391245", "0.6906628", "0.6903318", "0.6903318", "0.6847043", "0.6822655", "0.67683566", "0.6765436", "0.6764906", "0.67597103", "0.6752885", "0.6740968", "0.6734492", "0.67289084", "0.66695887...
0.0
-1
initialize at the beginning of each iteration
private void initialize() { for(String key: count_e_f.keySet()){ count_e_f.put(key, 0.0); } for(Integer key: total_f.keySet()){ total_f.put(key, 0.0); } //This code is not efficient. // for(Entry<String, Integer> german : mainIBM.gerWordsIdx.entrySet()){ // for(Entry<String, Integer> english : mainIBM.engWordsIdx.entrySet()){ // count_e_f.put(english.getValue() + "-" + german.getValue(), 0.0); // } // total_f.put(german.getValue(), 0.0); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void initialize() {\n counter = 0;\n }", "@Override\n public void initialize() {\n counter = 0;\n }", "private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }", "@Override public void init_loop() {\n loop_cnt_++...
[ "0.7454756", "0.7454756", "0.7304527", "0.7062571", "0.70592433", "0.7038347", "0.70215166", "0.6905453", "0.68617624", "0.6803858", "0.67966497", "0.67790204", "0.67484206", "0.67482024", "0.6747498", "0.67115295", "0.66847813", "0.66823757", "0.6645919", "0.6636593", "0.659...
0.655552
26
esto esta fallando ahora!!
@Test public void testtraerInfoParaCertificado() { Long idDeuda = 1l; String username = "alonsoir"; InfoCertificadoDeuda info = despachoService.traerInfoParaCertificado( idDeuda, username); // LOG.info(info.toString()); Assert.assertNotNull(info); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n ...
[ "0.6898607", "0.6586228", "0.6437901", "0.6423511", "0.642269", "0.63917273", "0.6385232", "0.6381684", "0.6270706", "0.6164695", "0.61486876", "0.6147099", "0.6133089", "0.6125883", "0.6112931", "0.60996604", "0.60978824", "0.60782474", "0.6051348", "0.60481095", "0.60475963...
0.0
-1
esto esta fallando ahora!!
@Test public void testtraerCertificadosAdmin() { List<DatosDemandaAdmin> lista = despachoService .traerCertificadosAdmin(); Assert.assertNotNull(lista); Assert.assertTrue(lista.size() > 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n ...
[ "0.68987685", "0.65863866", "0.6438103", "0.6423337", "0.6422485", "0.6391242", "0.638527", "0.63813406", "0.6270209", "0.6164746", "0.61485654", "0.6147903", "0.61329186", "0.6125462", "0.61127406", "0.6100454", "0.60980165", "0.60779715", "0.60517466", "0.6048581", "0.60473...
0.0
-1
Handles requests to home page
@RequestMapping("/") public String home(ModelMap modelMap) { List<Gif> allGifs = gifRepo.getAllGifs(); modelMap.put("gifs", allGifs); return "home"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"home.do\", method = RequestMethod.GET)\n public String getHome(HttpServletRequest request, Model model) {\n logger.debug(\"Home page Controller:\");\n return \"common/home\";\n }", "@RequestMapping(value = \"/\")\r\n\tpublic ModelAndView home(HttpServletRequest reque...
[ "0.7292709", "0.72889745", "0.72628385", "0.71784455", "0.7137918", "0.7064675", "0.7036334", "0.699106", "0.6983865", "0.6978897", "0.6901915", "0.6890149", "0.6887485", "0.68644816", "0.6853239", "0.6818279", "0.6810525", "0.6762125", "0.669907", "0.6693323", "0.66823673", ...
0.0
-1
Handles requests to favorites page
@RequestMapping("/favorites") public String favorites(ModelMap modelMap) { List<Gif> gifs = gifRepo.findFavorites(); modelMap.put("gifs", gifs); return "favorites"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\"/favorites\")\n public String favorites(Model model) {\n // TODO: Get list of all GIFs marked as favorite\n List<Gif> faves = new ArrayList<>();\n\n model.addAttribute(\"gifs\", faves);\n model.addAttribute(\"username\", \"Chris Ramacciotti\"); // Static username\n ...
[ "0.6910567", "0.6710623", "0.63564026", "0.6314854", "0.6314068", "0.6284689", "0.6258011", "0.6189846", "0.61865145", "0.6121911", "0.60870886", "0.6079946", "0.6015214", "0.59834886", "0.597886", "0.597282", "0.5966132", "0.59072566", "0.5888393", "0.5870886", "0.58697754",...
0.6514942
2
Handles requests to categories page
@RequestMapping("/categories") public String categories(ModelMap modelMap) { List<Category> categories = categoryRepository.getAllCategories(); modelMap.put("categories", categories); return "categories"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(\"\")\n\tpublic ModelAndView category(){\n\t\tJSONObject json = categoryService.getAllCategorys();\n\t\tModelAndView mv = new ModelAndView(\"category/category\");\n\t\tmv.addObject(\"categories\",json);\n\t\tmv.addObject(\"active\", \"2\");\n\t\treturn mv;\n\t}", "public String getManageCategorie...
[ "0.70226896", "0.66187644", "0.65931606", "0.64509946", "0.64439124", "0.64237887", "0.6420564", "0.6413951", "0.6413606", "0.6348121", "0.629256", "0.62635654", "0.6251696", "0.6175978", "0.6131227", "0.61266977", "0.60988945", "0.6090651", "0.6072585", "0.6030492", "0.60058...
0.59836364
22
Handles requests to specific category
@RequestMapping("/category/{id}") public String category(@PathVariable int id,ModelMap modelMap) { Category category = categoryRepository.findById(id); modelMap.put("category", category); List<Gif> gifs = gifRepo.findByCategoryId(id); modelMap.put("gifs", gifs); return "category"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onCategoryClicked(String category){\n\t\tfor(int i = 0 ; i < mData.getStatistics().size(); i++){\r\n\t\t\tif(mData.getStatistics().get(i).getCategory().equals(category)){\r\n\t\t\t\tif(mData.getStatistics().get(i).getDueChallenges() == 0){\r\n\t\t\t\t\tmGui.showToastNoDueChallenges(mData.getActivity())...
[ "0.6659614", "0.65968555", "0.64729434", "0.6447404", "0.6447404", "0.6447404", "0.6447404", "0.6447404", "0.63836634", "0.63371545", "0.6314578", "0.62972856", "0.6242356", "0.6213628", "0.6213628", "0.61900985", "0.61656356", "0.6156787", "0.61514693", "0.6146537", "0.61427...
0.56281006
90
Handles requests to individual gif page
@RequestMapping("/gif/{name}") public String gifDetails(@PathVariable String name, ModelMap modelMap) { Gif gif = gifRepo.getGifByName(name); modelMap.put("gif",gif); return "gif-details"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void handleGifResponse(Response<GifResponse> response) {\n GifResponse gifResponse = (GifResponse) response.body();\n if (gifResponse != null) {\n this.listener.onSuccess(getImagesFromResponse(gifResponse.results()));\n return;\n }\n this.listener.onError();...
[ "0.7186867", "0.660475", "0.6401707", "0.6307213", "0.62609065", "0.60098606", "0.5863254", "0.5786957", "0.5680105", "0.5677655", "0.5524975", "0.5493128", "0.54750454", "0.54748416", "0.53675604", "0.534591", "0.5338633", "0.5313506", "0.53006274", "0.52922964", "0.5291427"...
0.6058022
5
FIXME implement constructors if needed
public School(){ _persons = new TreeMap<Integer, Person>(); _students = new HashMap<Integer, Student>(); _professors = new HashMap<Integer, Professor>(); _administratives = new HashMap<Integer, Administrative>(); _courses = new HashMap<String,Course>(); _disciplines = new HashMap<String,Discipline>(); _disciplineCourse = new TreeMap<String, HashMap<String, Discipline>>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "protected abstract void construct();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public void init() {}", "Repro...
[ "0.7294366", "0.68127555", "0.6660814", "0.66557944", "0.65174615", "0.6440068", "0.64208597", "0.6396245", "0.6354576", "0.6341697", "0.6303242", "0.6301993", "0.62988526", "0.6288192", "0.6288192", "0.6288192", "0.62775433", "0.627181", "0.6262655", "0.62533355", "0.6244511...
0.0
-1
Imports the file with the predefined concepts in the start of the application
public void importFile(String filename) throws IOException, BadEntryException, ImportFileException{ try{ BufferedReader reader = new BufferedReader(new FileReader(filename)); String line; line = reader.readLine(); while(line != null){ String[] fields = line.split("\\|"); int id = Integer.parseInt(fields[1]); if(_persons.get(id) != null){ throw new BadEntryException(fields[0]); } if(fields[0].equals("FUNCIONÁRIO")){ registerAdministrative(fields); line = reader.readLine(); }else if(fields[0].equals("DOCENTE")){ Professor _professor = new Professor(id, fields[2], fields[3]); _professors.put(id, _professor); _persons.put(id, (Person) _professor); line = reader.readLine(); if(line != null){ fields = line.split("\\|"); while((line != null) && (fields[0].charAt(0) == '#')){ String course = fields[0].substring(2); String discipline = fields[1]; Course _course = _courses.get(course); if(_course == null){ _course = new Course(course); _disciplineCourse.put(course, new HashMap<String, Discipline>()); _courses.put(course, _course); } if(_professor.getDisciplineCourses().get(course) == null){ _professor.getDisciplineCourses().put(course, new HashMap<String, Discipline>()); } Discipline _discipline = _disciplines.get(discipline); if(_discipline == null){ _discipline = new Discipline(discipline,_course); _disciplines.put(discipline, _discipline); _course.getDisciplines().put(discipline, _discipline); } _discipline.registerObserver(_professor, id); _disciplineCourse.get(course).put(discipline, _discipline); if(_professor.getDisciplines() != null){ _professor.getDisciplines().put(discipline, _discipline); _professor.getDisciplineCourses().get(course).put(discipline, _discipline); } line = reader.readLine(); if(line != null){ fields = line.split("\\|"); } } } }else if(fields[0].equals("DELEGADO")){ Student _student = new Student(id, fields[2], fields[3]); _students.put(id, _student); _persons.put(id, (Person) _student); line = reader.readLine(); fields = line.split("\\|"); while((line != null) && (fields[0].charAt(0) == '#')){ String course = fields[0].substring(2); String discipline = fields[1]; Course _course = _courses.get(course); if(_course == null){ _course = new Course(course); _disciplineCourse.put(course, new HashMap<String, Discipline>()); _courses.put(course,_course); } if(_course.getRepresentatives().size() == 8){ System.out.println(id); throw new BadEntryException(course); }else{ _course.getRepresentatives().put(id,_student); } _student.setCourse(_course); Discipline _discipline = _disciplines.get(discipline); if(_discipline == null){ _discipline = new Discipline(discipline, _course); _disciplines.put(discipline,_discipline); _course.getDisciplines().put(discipline, _discipline); } if(_student.getDisciplines().size() == 6){ throw new BadEntryException(discipline); }else{ if(_discipline.getStudents().size() == 100){ throw new BadEntryException(discipline); }else{ _student.getDisciplines().put(discipline,_discipline); _discipline.getStudents().put(id,_student); } } line = reader.readLine(); if(line != null){ fields = line.split("\\|"); } } }else if(fields[0].equals("ALUNO")){ Student _student = new Student(id, fields[2], fields[3]); _students.put(id, _student); _persons.put(id, (Person) _student); line = reader.readLine(); fields = line.split("\\|"); while((line != null) && (fields[0].charAt(0) == '#')){ String course = fields[0].substring(2); String discipline = fields[1]; Course _course = _courses.get(course); if(_course == null){ _course = new Course(course); _disciplineCourse.put(course, new HashMap<String, Discipline>()); _courses.put(course, _course); } _student.setCourse(_course); Discipline _discipline = _disciplines.get(discipline); if(_discipline == null){ _discipline = new Discipline(discipline, _course); _disciplines.put(discipline, _discipline); _course.getDisciplines().put(discipline, _discipline); } _discipline.registerObserver(_student, id); if(_student.getDisciplines().size() == 6){ throw new BadEntryException(discipline); }else{ _student.getDisciplines().put(discipline,_discipline); if(_discipline.getStudents().size() == 100){ throw new BadEntryException(discipline); }else{ _discipline.getStudents().put(id,_student); } } line = reader.readLine(); if(line != null){ fields = line.split("\\|"); } } }else{ throw new BadEntryException(fields[0]); } } for(Course course: _courses.values()){ HashMap<Integer,Student> representatives = course.getRepresentatives(); HashMap<String, Discipline> disciplines = course.getDisciplines(); for(Discipline discipline: disciplines.values()){ for(Student representative: representatives.values()){ discipline.registerObserver(representative, representative.getId()); } } } reader.close(); }catch(BadEntryException e){ throw new ImportFileException(e); }catch(IOException e){ throw new ImportFileException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Imports createImports();", "public void loadWorkflow(String filename);", "public static void loadFromFile() {\n\t\tloadFromFile(Main.getConfigFile(), Main.instance.getServer());\n\t}", "Import createImport();", "Import createImport();", "public static void load() {\n }", "private void importAll() {\...
[ "0.61100763", "0.57258344", "0.5714626", "0.5662041", "0.5662041", "0.5657207", "0.55299205", "0.5513641", "0.5495746", "0.5460986", "0.5446563", "0.5434829", "0.542749", "0.54219234", "0.54209346", "0.5409183", "0.538708", "0.5384553", "0.5356482", "0.5331675", "0.5328412", ...
0.49585602
89
Registers the administratives that come from the file that is imported.
public void registerAdministrative(String[] fields) throws BadEntryException{ int id = Integer.parseInt(fields[1]); if(_persons.get(id) != null){ throw new BadEntryException(fields[0]); } Administrative _administrative = new Administrative(id, fields[2], fields[3]); _administratives.put(id, _administrative); _persons.put(id, (Person) _administrative); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void adminLoad() {\n try {\n File file = new File(adminPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n String data = scanner.nextLine();\n String[]userData = data.split(separator);\n AdminAc...
[ "0.57709175", "0.5582676", "0.54741985", "0.5343136", "0.532459", "0.53007793", "0.5265715", "0.5198186", "0.51953894", "0.5166416", "0.5148085", "0.51136905", "0.5103977", "0.50577277", "0.5031643", "0.5009474", "0.49901482", "0.49651653", "0.49651653", "0.4941768", "0.49109...
0.5014661
15
Returns the persons in the school database
public TreeMap<Integer, Person> getPersons() { return _persons; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Map<String, Object> getSchool() {\n\t\treturn getSession().selectOne(getNamespace() + \"getSchool\");\n\t}", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "public ArrayList<Person> getPeople(String descendant) {\n ...
[ "0.6506123", "0.64141273", "0.6381909", "0.63584256", "0.62949157", "0.62947", "0.6259685", "0.62467813", "0.62413895", "0.6219244", "0.62152374", "0.62050927", "0.6167156", "0.6101667", "0.60696113", "0.6064819", "0.6045175", "0.6040154", "0.5999078", "0.59905", "0.5979659",...
0.0
-1
Returns the students in the school database
public HashMap<Integer, Student> getStudents() { return _students; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Student> getStudents() {\n\n ArrayList<Student> students = new ArrayList<Student>();\n String query = \"SELECT * FROM student\";\n try{\n result = statement.executeQuery(query);\n while(result.next()) {\n\n String id = Integer.toString(resu...
[ "0.74881935", "0.72812086", "0.7215592", "0.71681446", "0.71432596", "0.7108698", "0.7081259", "0.70775026", "0.69926584", "0.6988015", "0.69590443", "0.69279134", "0.6912567", "0.69085383", "0.6903234", "0.69016397", "0.6893166", "0.68872935", "0.68829495", "0.68751943", "0....
0.669418
43
Returns the professors in the school database
public HashMap<Integer, Professor> getProfessors() { return _professors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Professor> getProfessors() {\n\t\tList<Professor> pros=null;\n\t\tProfessor pro=null;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tstmt=conn.prepareStatement(\"SELECT ssn,name,department,password FROM Professor\");\n\t\t\t/*stmt.setString(1, admin.getCname());\n\t\t\tstmt.setString(2, admin.getCplace())...
[ "0.79824996", "0.72064507", "0.67560667", "0.6407562", "0.6292695", "0.62751", "0.62473756", "0.6159804", "0.6105584", "0.6099174", "0.6083897", "0.6012647", "0.5967316", "0.5929308", "0.5829182", "0.5803508", "0.5768367", "0.5765594", "0.57011795", "0.5690267", "0.5658959", ...
0.76104516
1
Returns the administratives in the school database
public HashMap<Integer, Administrative> getAdministratives() { return _administratives; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Administrator[] getAllAdmin() {\n\t\ttry {\n\t\t\tConnection conn = DbConnections.getConnection(DbConnections.ConnectionType.POSTGRESQL);\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from public.administrator\");\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tList<Administrator> adminLis...
[ "0.66345286", "0.6347857", "0.6268534", "0.6099846", "0.60676396", "0.6066665", "0.60214347", "0.59785414", "0.5943866", "0.58909243", "0.5884971", "0.5868474", "0.5844687", "0.58235407", "0.57888603", "0.5783816", "0.5764956", "0.5747656", "0.5731894", "0.5700441", "0.569950...
0.6474291
1
Checks if the person who tried to login is in the school database or not
public Person login(int id) throws NoSuchPersonIdException{ _person = getPersons().get(id); if(_person == null){ throw new NoSuchPersonIdException(id); } return _person; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkDb() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select id from PersonalDetails where id='\"+userId+\"'\";\n\t\tint gotId;\n\t\t//connectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.ex...
[ "0.6660471", "0.6565207", "0.64242536", "0.6392101", "0.6392101", "0.6373798", "0.6314649", "0.6268589", "0.62261724", "0.6113907", "0.6089858", "0.6089192", "0.6080787", "0.6057837", "0.6049426", "0.6040646", "0.60365975", "0.60364765", "0.6022985", "0.6019772", "0.6017877",...
0.0
-1
/=============================PORTAL DA PESSOA=============================== Prints the information of the person who logged in
public String showPerson(){ return _person.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}", "public void printUser() {\n\t\tSystem.out.println(\"First name: ...
[ "0.7663435", "0.72066504", "0.70923424", "0.68570447", "0.67870045", "0.6717056", "0.67124707", "0.6558077", "0.64820683", "0.6477801", "0.6461386", "0.6404629", "0.64038527", "0.6401553", "0.63990194", "0.63561106", "0.6354855", "0.6344759", "0.62974685", "0.62750524", "0.62...
0.61040425
43
Prints the information of all the persons in the database
public String showAllPersons() { String string = ""; for(Person person: getPersons().values()){ string += person.toString(); } return string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void showStudentDB () {\n for (Student s : studentDB) {\n System.out.println(\"ID: \" + s.getID() + \"\\n\" + \"Student: \" + s.getName());\n }\n }", "public void printInfo() throws IOException {\n System.out.println();\n System.out.printl...
[ "0.74529827", "0.7137839", "0.69478947", "0.69386786", "0.6933284", "0.690188", "0.6795211", "0.6791674", "0.67825603", "0.6743708", "0.67315483", "0.6715956", "0.66368604", "0.66314536", "0.6627346", "0.66200525", "0.6606059", "0.65810937", "0.65679467", "0.6553109", "0.6527...
0.7041062
2