content stringlengths 40 137k |
|---|
"protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n int width = right - left;\n int x = 0;\n for (View v : new View[] { findViewById(R.id.image1), findViewById(R.id.image2), findViewById(R.id.image3) }) {\n v.layout(x, 0, x + width, bottom);\n x += (width + sPadding);\n }\n findViewById(R.id.padding1).layout(width, 0, width + sPadding, bottom);\n findViewById(R.id.padding2).layout(width + sPadding + width, 0, width + sPadding + width + sPadding, bottom);\n if (changed) {\n mViewImage.mLayoutComplete = true;\n mViewImage.onLayoutChanged();\n }\n}\n"
|
"public void parcelsCorrectly() throws JSONException {\n PaymentMethodToken paymentMethodToken = mock(PaymentMethodToken.class);\n when(paymentMethodToken.getToken()).thenReturn(stringFromFixture(\"String_Node_Str\"));\n UserAddress billingAddress = getAddressObject();\n UserAddress shippingAddress = getAddressObject();\n FullWallet wallet = mock(FullWallet.class);\n when(wallet.getPaymentMethodToken()).thenReturn(paymentMethodToken);\n when(wallet.getPaymentDescriptions()).thenReturn(new String[] { \"String_Node_Str\" });\n when(wallet.getEmail()).thenReturn(\"String_Node_Str\");\n when(wallet.getBuyerBillingAddress()).thenReturn(billingAddress);\n when(wallet.getBuyerShippingAddress()).thenReturn(shippingAddress);\n when(wallet.getGoogleTransactionId()).thenReturn(\"String_Node_Str\");\n AndroidPayCardNonce androidPayCardNonce = AndroidPayCardNonce.fromFullWallet(wallet, cart);\n Parcel parcel = Parcel.obtain();\n androidPayCardNonce.writeToParcel(parcel, 0);\n parcel.setDataPosition(0);\n AndroidPayCardNonce parceled = AndroidPayCardNonce.CREATOR.createFromParcel(parcel);\n assertEquals(\"String_Node_Str\", parceled.getTypeLabel());\n assertEquals(\"String_Node_Str\", parceled.getNonce());\n assertEquals(\"String_Node_Str\", parceled.getDescription());\n assertEquals(\"String_Node_Str\", parceled.getCardType());\n assertEquals(\"String_Node_Str\", parceled.getLastTwo());\n assertEquals(\"String_Node_Str\", parceled.getEmail());\n assertNotNull(parceled.getBillingAddress());\n assertNotNull(parceled.getShippingAddress());\n assertEquals(\"String_Node_Str\", parceled.getGoogleTransactionId());\n}\n"
|
"public static List<String> getTargetMethods(String source, boolean publicRequired, boolean protectedRequired, boolean packageLocalRequired) {\n source = source.replaceAll(\"String_Node_Str\" + STR.COMMA, STR.COMMA).replaceAll(STR.COMMA + \"String_Node_Str\", STR.COMMA).replaceAll(\"String_Node_Str\", \"String_Node_Str\").replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n List<String> result = new ArrayList<String>();\n String regexp = \"String_Node_Str\";\n Pattern pat = Pattern.compile(regexp);\n Matcher mat = pat.matcher(source);\n while (mat.find()) {\n String matched = mat.group();\n String prefix = \"String_Node_Str\";\n String postfix = \"String_Node_Str\";\n if (!publicRequired && matched.matches(prefix + \"String_Node_Str\" + postfix)) {\n continue;\n }\n if (!protectedRequired && matched.matches(prefix + \"String_Node_Str\" + postfix)) {\n continue;\n }\n if (!packageLocalRequired && !matched.matches(prefix + \"String_Node_Str\" + postfix) && !matched.matches(prefix + \"String_Node_Str\" + postfix)) {\n continue;\n }\n matched = matched.replaceAll(STR.TAB, STR.SPACE).replaceAll(prefix + \"String_Node_Str\" + \"String_Node_Str\", STR.EMPTY).replaceAll(prefix + \"String_Node_Str\" + \"String_Node_Str\", STR.EMPTY).replaceAll(prefix + \"String_Node_Str\", STR.EMPTY).replaceAll(\"String_Node_Str\", STR.SPACE);\n result.add(STR.SPACE + matched);\n }\n return result;\n}\n"
|
"public RealMatrix getD() {\n if (cachedD == null) {\n cachedD = MatrixUtils.createRealDiagonalMatrix(realEigenvalues);\n for (int i = 0; i < imagEigenvalues.length; i++) {\n if (Precision.compareTo(imagEigenvalues[i], 0.0, EPSILON) > 0) {\n cachedD.setEntry(i, i + 1, imagEigenvalues[i]);\n } else if (Precision.compareTo(imagEigenvalues[i], 0.0, epsilon) < 0) {\n cachedD.setEntry(i, i - 1, imagEigenvalues[i]);\n }\n }\n }\n return cachedD;\n}\n"
|
"public boolean skipTo(int target) throws IOException {\n if (doc == 0 || target > spans.doc())\n more = spans.skipTo(target);\n return advance();\n}\n"
|
"public Map<K, V> getAll(Set<? extends K> keys, ExpiryPolicy expiryPolicy) {\n long startNanos = nowInNanosOrDefault();\n ensureOpen();\n checkNotNull(keys, NULL_KEY_IS_NOT_ALLOWED);\n if (keys.isEmpty()) {\n return emptyMap();\n }\n int keysSize = keys.size();\n List<Data> dataKeys = new LinkedList<Data>();\n List<Object> resultingKeyValuePairs = new ArrayList<Object>(keysSize * 2);\n getAllInternal(keys, dataKeys, expiryPolicy, resultingKeyValuePairs, startNanos);\n Map<K, V> result = createHashMap(keys.size());\n for (int i = 0; i < resultingKeyValuePairs.size(); ) {\n K key = toObject(resultingKeyValuePairs.get(i++));\n V value = toObject(resultingKeyValuePairs.get(i++));\n result.put(key, value);\n }\n return result;\n}\n"
|
"protected IConnectWizard createConnectWizard() {\n final URI uri = getURI();\n String authAndPath = uri.getSchemeSpecificPart();\n while (authAndPath.startsWith(\"String_Node_Str\")) authAndPath = authAndPath.substring(1);\n String fragment = uri.getFragment();\n if (fragment != null) {\n StringBuffer buf = new StringBuffer(authAndPath);\n buf.append(\"String_Node_Str\").append(fragment);\n authAndPath = buf.toString();\n }\n return new IRCConnectWizard(authAndPath);\n}\n"
|
"Query createQuery(String jpaQuery, final String persistenceUnit) {\n Client client = getClient(persistenceUnit);\n EntityMetadata metadata = KunderaMetadataManager.getMetamodel(client.getPersistenceUnit()).getEntityMetadataMap().values().iterator().next();\n Query query = new QueryResolver().getQueryImplementation(jpaQuery, getClient(persistenceUnit).getQueryImplementor(), this, metadata);\n return query;\n}\n"
|
"public static void startServer() throws Exception {\n orchestrator.resetData();\n createReportsWithAbsolutePath();\n SonarScanner build = SonarScanner.create().setProjectDir(PROJECT_DIR).setProjectKey(\"String_Node_Str\").setProjectName(\"String_Node_Str\").setProjectVersion(\"String_Node_Str\").setSourceDirs(SOURCE_DIR).setTestDirs(TESTS_DIR).setProperty(\"String_Node_Str\", REPORTS_DIR + \"String_Node_Str\").setProperty(\"String_Node_Str\", REPORTS_DIR + \"String_Node_Str\").setProperty(\"String_Node_Str\", REPORTS_DIR + \"String_Node_Str\").setProperty(\"String_Node_Str\", REPORTS_DIR + \"String_Node_Str\");\n Tests.executeBuildWithExpectedWarnings(orchestrator, build);\n}\n"
|
"public GRCandidateProgram[] crossover(CandidateProgram p1, CandidateProgram p2) {\n GRCandidateProgram program1 = (GRCandidateProgram) p1;\n GRCandidateProgram program2 = (GRCandidateProgram) p2;\n GRCandidateProgram child1 = (GRCandidateProgram) program1.clone();\n GRCandidateProgram child2 = (GRCandidateProgram) program2.clone();\n NonTerminalSymbol parseTree1 = child1.getParseTree();\n NonTerminalSymbol parseTree2 = child2.getParseTree();\n List<NonTerminalSymbol> nonTerminals1 = parseTree1.getNonTerminalSymbols();\n List<NonTerminalSymbol> nonTerminals2 = parseTree2.getNonTerminalSymbols();\n int selection = rng.nextInt(nonTerminals1.size());\n NonTerminalSymbol point1 = nonTerminals1.get(selection);\n List<NonTerminalSymbol> matchingNonTerminals = new ArrayList<NonTerminalSymbol>();\n for (NonTerminalSymbol nt : nonTerminals2) {\n if (nt.equals(point1)) {\n matchingNonTerminals.add(nt);\n }\n }\n if (matchingNonTerminals.isEmpty()) {\n return null;\n } else {\n selection = rng.nextInt(matchingNonTerminals.size());\n NonTerminalSymbol point2 = matchingNonTerminals.get(selection);\n List<Symbol> temp = point1.getChildren();\n point1.setChildren(point2.getChildren());\n point2.setChildren(temp);\n }\n return new GRCandidateProgram[] { child1, child2 };\n}\n"
|
"public void testGetPercentageStr_undefined() {\n Ratio ratio = Ratio.create(1.0f, 0.0f);\n assertEquals(\"String_Node_Str\", ratio.getPercentageStr());\n ratio = Ratio.create(1.0f, -50.0f);\n assertEquals(\"String_Node_Str\", ratio.getPercentageStr());\n}\n"
|
"public void map(PactRecord record, Collector out) throws Exception {\n Tuple inputTuple = record.getField(1, Tuple.class);\n float price = Float.parseFloat(inputTuple.getStringValueAt(5)) * (1 - Float.parseFloat(inputTuple.getStringValueAt(6)));\n inputTuple.project((0 << 0) | (1 << 1) | (1 << 2) | (0 << 3) | (1 << 4));\n inputTuple.addAttribute(\"String_Node_Str\" + price);\n record.setField(1, inputTuple);\n out.collect(record);\n}\n"
|
"public void addCharacter(List<Tag> tags, char character, String fontName) {\n int fontStyle = getFontStyle();\n FontType font = fonts.get(0);\n SHAPE shp = SHAPERECORD.systemFontCharacterToSHAPE(fontName, fontStyle, 20 * font.nominalSize, character);\n int code = (int) character;\n int pos = -1;\n for (int i = 0; i < font.glyphInfo.size(); i++) {\n if (font.glyphInfo.get(i).glyphCode >= code) {\n if (font.glyphInfo.get(i).glyphCode == code) {\n exists = true;\n }\n pos = i;\n break;\n }\n }\n if (pos == -1) {\n pos = font.glyphInfo.size();\n }\n FontTag.shiftGlyphIndices(fontId, pos, tags);\n Font fnt = new Font(fontName, fontStyle, 20 * font.nominalSize);\n int advance = (int) Math.round(fnt.createGlyphVector((new JPanel()).getFontMetrics(fnt).getFontRenderContext(), \"String_Node_Str\" + character).getGlyphMetrics(0).getAdvanceX());\n font.glyphInfo.add(pos, new GlyphInfoType(code, advance, 0));\n font.glyphs.add(pos, new GlyphType(shp.shapeRecords));\n shapeCache.add(pos, font.glyphs.get(pos).toSHAPE());\n imageCache.remove(\"String_Node_Str\" + fontId);\n}\n"
|
"private JPanel constructView() {\n final JTextField filterTextField = new JTextField();\n final MatcherEditor textFilterMatcherEditor = new ThreadedMatcherEditor(new TextComponentMatcherEditor(filterTextField, null));\n StatusMatcherEditor statusMatcherEditor = new StatusMatcherEditor(issuesEventList);\n SwingUsersMatcherEditor userMatcherEditor = new SwingUsersMatcherEditor(issuesEventList);\n FilterList issuesUserFiltered = new FilterList(issuesEventList, userMatcherEditor);\n FilterList issuesStatusFiltered = new FilterList(issuesUserFiltered, statusMatcherEditor);\n FilterList issuesTextFiltered = new FilterList(issuesStatusFiltered, textFilterMatcherEditor);\n ThresholdList priorityList = new ThresholdList(issuesTextFiltered, \"String_Node_Str\");\n final SortedList issuesSortedList = new SortedList(priorityList, null);\n issuesSortedList.setMode(SortedList.AVOID_MOVING_ELEMENTS);\n issuesTableModel = new EventTableModel(issuesSortedList, new IssueTableFormat());\n JTable issuesJTable = new JTable(issuesTableModel);\n issuesSelectionModel = new EventSelectionModel(issuesSortedList);\n issuesSelectionModel.setSelectionMode(ListSelection.MULTIPLE_INTERVAL_SELECTION_DEFENSIVE);\n issuesSelectionModel.addListSelectionListener(new IssuesSelectionListener());\n issuesJTable.setSelectionModel(issuesSelectionModel);\n issuesJTable.getColumnModel().getColumn(0).setPreferredWidth(10);\n issuesJTable.getColumnModel().getColumn(1).setPreferredWidth(30);\n issuesJTable.getColumnModel().getColumn(2).setPreferredWidth(10);\n issuesJTable.getColumnModel().getColumn(3).setPreferredWidth(30);\n issuesJTable.getColumnModel().getColumn(4).setPreferredWidth(30);\n issuesJTable.getColumnModel().getColumn(5).setPreferredWidth(200);\n issuesJTable.setDefaultRenderer(Priority.class, new PriorityTableCellRenderer());\n new TableComparatorChooser(issuesJTable, issuesSortedList, true);\n JScrollPane issuesTableScrollPane = new JScrollPane(issuesJTable, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n JScrollPane usersListScrollPane = new JScrollPane(userMatcherEditor.getUserSelect(), JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n EventTableModel descriptionsTableModel = new EventTableModel(descriptions, new DescriptionTableFormat());\n JTable descriptionsTable = new JTable(descriptionsTableModel);\n descriptionsTable.setRowSelectionAllowed(false);\n descriptionsTable.getColumnModel().getColumn(0).setCellRenderer(new DescriptionRenderer());\n JScrollPane descriptionsTableScrollPane = new JScrollPane(descriptionsTable, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n BoundedRangeModel priorityRangeModel = GlazedListsSwing.lowerRangeModel(priorityList);\n priorityRangeModel.setRangeProperties(0, 0, 0, 101, false);\n JSlider prioritySlider = new JSlider(priorityRangeModel);\n Hashtable prioritySliderLabels = new Hashtable();\n prioritySliderLabels.put(new Integer(0), new JLabel(\"String_Node_Str\"));\n prioritySliderLabels.put(new Integer(100), new JLabel(\"String_Node_Str\"));\n prioritySlider.setOpaque(false);\n prioritySlider.setLabelTable(prioritySliderLabels);\n prioritySlider.setSnapToTicks(true);\n prioritySlider.setPaintLabels(true);\n prioritySlider.setPaintTicks(true);\n prioritySlider.setForeground(UIManager.getColor(\"String_Node_Str\"));\n prioritySlider.setMajorTickSpacing(25);\n prioritySlider.setForeground(Color.white);\n EventList projects = Project.getProjects();\n EventComboBoxModel projectsComboModel = new EventComboBoxModel(projects);\n JComboBox projectsCombo = new JComboBox(projectsComboModel);\n projectsCombo.setEditable(false);\n projectsCombo.setOpaque(false);\n projectsCombo.addItemListener(new ProjectChangeListener());\n projectsComboModel.setSelectedItem(new Project(null, \"String_Node_Str\"));\n issueCounter = new IssueCounterLabel(issuesSortedList);\n issueCounter.setHorizontalAlignment(SwingConstants.CENTER);\n issueCounter.setForeground(Color.WHITE);\n ClassLoader jarLoader = IssuesBrowser.class.getClassLoader();\n URL url = jarLoader.getResource(\"String_Node_Str\");\n if (url != null)\n throbberStatic = new ImageIcon(url);\n url = jarLoader.getResource(\"String_Node_Str\");\n if (url != null)\n throbberActive = new ImageIcon(url);\n throbber = new JLabel(throbberStatic);\n throbber.setHorizontalAlignment(SwingConstants.RIGHT);\n JPanel iconBar = new GradientPanel(GLAZED_LISTS_MEDIUM_BROWN, GLAZED_LISTS_DARK_BROWN, true);\n iconBar.setLayout(new GridLayout(1, 3));\n iconBar.add(projectsCombo);\n iconBar.add(issueCounter);\n iconBar.add(throbber);\n iconBar.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\n JLabel textFilterLabel = new JLabel(\"String_Node_Str\");\n textFilterLabel.setFont(textFilterLabel.getFont().deriveFont(11.0f));\n JLabel priorityLabel = new JLabel(\"String_Node_Str\");\n priorityLabel.setFont(priorityLabel.getFont().deriveFont(11.0f));\n JLabel stateLabel = new JLabel(\"String_Node_Str\");\n stateLabel.setFont(stateLabel.getFont().deriveFont(11.0f));\n JLabel userLabel = new JLabel(\"String_Node_Str\");\n userLabel.setFont(userLabel.getFont().deriveFont(11.0f));\n JPanel filtersPanel = new JPanel();\n filtersPanel.setBackground(GLAZED_LISTS_LIGHT_BROWN);\n filtersPanel.setLayout(new GridBagLayout());\n filtersPanel.add(textFilterLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));\n filtersPanel.add(filterTextField, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(2, 5, 10, 5), 0, 0));\n filtersPanel.add(stateLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));\n filtersPanel.add(statusMatcherEditor.getComponent(), new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(2, 5, 10, 5), 0, 0));\n filtersPanel.add(priorityLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));\n filtersPanel.add(prioritySlider, new GridBagConstraints(0, 5, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(2, 5, 10, 5), 0, 0));\n filtersPanel.add(userLabel, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));\n filtersPanel.add(usersListScrollPane, new GridBagConstraints(0, 7, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(2, 0, 0, 0), 0, 0));\n JPanel dataPanel = new JPanel();\n dataPanel.setLayout(new GridBagLayout());\n dataPanel.add(issuesTableScrollPane, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.5, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));\n dataPanel.add(descriptionsTableScrollPane, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.5, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));\n JPanel mainPanel = new JPanel(new GridBagLayout());\n mainPanel.add(iconBar, new GridBagConstraints(0, 0, 2, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));\n mainPanel.add(filtersPanel, new GridBagConstraints(0, 1, 1, 1, 0.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));\n mainPanel.add(dataPanel, new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));\n return mainPanel;\n}\n"
|
"public void testStuff() {\n BigEndianString16Type type = new BigEndianString16Type();\n byte[] bytes = new byte[] { 1, 'a', 2, 'b' };\n char[] value = (char[]) type.extractValueFromBytes(0, bytes, true);\n assertEquals(\"String_Node_Str\", new String(value));\n}\n"
|
"public void visitMethodCallNode(ASTPtMethodCallNode node) throws IllegalActionException {\n Type[] childTypes = _inferAllChildren(node);\n if (childTypes.length == 1 && childTypes[0] instanceof RecordType) {\n RecordType type = (RecordType) childTypes[0];\n if (type.labelSet().contains(node.getMethodName())) {\n _setType(node, type.get(node.getMethodName()));\n return;\n }\n }\n if (childTypes.length == 1 && childTypes[0] == BaseType.UNKNOWN) {\n _setType(node, BaseType.UNKNOWN);\n } else {\n _setType(node, _methodCall(node.getMethodName(), childTypes));\n }\n}\n"
|
"protected void handeAmpConfigDirectory(AmpPackagingContext context) throws MojoExecutionException {\n if (!context.getAmpConfigDirectory().exists()) {\n context.getLog().debug(\"String_Node_Str\");\n } else {\n if (!context.getAmpConfigDirectory().getAbsolutePath().equals(context.getAmpDirectory().getPath())) {\n final PathSet sources = getFilesToIncludes(context.getAmpConfigDirectory(), new String[0], new String[] { \"String_Node_Str\", \"String_Node_Str\" });\n try {\n context.getLog().info(\"String_Node_Str\" + CONFIG_PATH);\n copyFiles(id, context, context.getAmpConfigDirectory(), sources, CONFIG_PATH);\n } catch (IOException e) {\n throw new MojoExecutionException(\"String_Node_Str\" + context.getAmpDirectory().getAbsolutePath() + \"String_Node_Str\", e);\n }\n }\n }\n}\n"
|
"public Dependencies makeSootClass(SootClass sc, String className) {\n if (Util.isByteCodeClassName(className)) {\n className = Util.dottedClassName(className);\n }\n try {\n for (String dexEntry : dexContainer.getDexEntryNames()) {\n DexFile dexFile = dexContainer.getEntry(dexEntry);\n ClassDef defItem = classesToDefItems.get(className);\n if (dexFile.getClasses().contains(defItem))\n return dexLoader.makeSootClass(sc, defItem, dexFile);\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n throw new RuntimeException(\"String_Node_Str\" + className);\n}\n"
|
"public IStyledString.IComposedStyledString getStyledText(Object object) {\n final UMLDiff umlDiff = (UMLDiff) object;\n Stereotype stereotype = ((StereotypeApplicationChange) umlDiff).getStereotype();\n if (stereotype == null) {\n stereotype = UMLUtil.getStereotype(umlDiff.getDiscriminant());\n }\n final ComposedStyledString stereotypeText = new ComposedStyledString();\n if (stereotype != null) {\n stereotypeText.append(AdapterFactoryUtil.getText(getRootAdapterFactory(), stereotype) + ' ');\n } else if (umlDiff.getDiscriminant() instanceof NamedElement) {\n stereotypeText.append(\"String_Node_Str\" + ((NamedElement) umlDiff.getDiscriminant()).getName() + ' ');\n } else {\n stereotypeText.append(\"String_Node_Str\");\n }\n final Match targetMatch = umlDiff.getMatch();\n final EObject target = findNonNullSide(targetMatch);\n String targetLabel = null;\n final String action;\n switch(umlDiff.getKind()) {\n case ADD:\n action = \"String_Node_Str\";\n break;\n case DELETE:\n action = \"String_Node_Str\";\n break;\n case CHANGE:\n action = \"String_Node_Str\";\n break;\n case MOVE:\n action = \"String_Node_Str\";\n break;\n default:\n throw new IllegalStateException(\"String_Node_Str\" + DifferenceKind.class.getSimpleName() + \"String_Node_Str\" + umlDiff.getKind());\n }\n if (target != null) {\n targetLabel += AdapterFactoryUtil.getText(getRootAdapterFactory(), target);\n }\n return stereotypeText.append(\"String_Node_Str\" + action + \"String_Node_Str\", Style.DECORATIONS_STYLER);\n}\n"
|
"public Writer buildDeletionWriter(AbstractSession session, Writer writer) throws ValidationException {\n if (shouldDropTableDefinition()) {\n return tableDefinition.buildDeletionWriter(session, writer);\n } else {\n try {\n writer.write(\"String_Node_Str\");\n writer.write(getSequenceTableQualifiedName());\n writer.write(\"String_Node_Str\" + getSequenceNameFieldName());\n writer.write(\"String_Node_Str\" + getName() + \"String_Node_Str\");\n } catch (IOException ioException) {\n throw ValidationException.fileError(ioException);\n }\n return writer;\n }\n}\n"
|
"public void trigger(Object... args) {\n int mouseX = (int) args[0];\n int mouseY = (int) args[1];\n int clickedMouseButton = (int) args[2];\n long timeSinceLastClick = (long) args[3];\n try {\n CTJS.getInstance().getModuleManager().invokeFunction(methodName, mouseX, mouseY, clickedMouseButton, timeSinceLastClick);\n } catch (ScriptException | NoSuchMethodException exception) {\n onMouseDragged = null;\n Console.getConsole().printStackTrace(exception);\n }\n}\n"
|
"public void onGuiClosed() {\n super.onGuiClosed();\n this.deactivateRenderViewEntity();\n}\n"
|
"protected void evaluateTextField() {\n if (readOnly) {\n return;\n }\n if (nameText == null || nameText.isDisposed()) {\n return;\n }\n if (nameText.getText().length() == 0) {\n nameStatus = createStatus(IStatus.ERROR, Messages.getString(\"String_Node_Str\"));\n } else if (!Pattern.matches(RepositoryConstants.getPattern(getRepositoryObjectType()), nameText.getText()) || nameText.getText().startsWith(\"String_Node_Str\") || nameText.getText().trim().contains(\"String_Node_Str\")) {\n nameStatus = createStatus(IStatus.ERROR, Messages.getString(\"String_Node_Str\"));\n } else if (type != null && !type.getType().equals(\"String_Node_Str\") && (isKeywords(nameText.getText()) || \"String_Node_Str\".equalsIgnoreCase(nameText.getText()))) {\n nameStatus = createStatus(IStatus.ERROR, Messages.getString(\"String_Node_Str\"));\n } else if (type != null && type.getType().equals(\"String_Node_Str\") && (JavaConventions.validateClassFileName(nameText.getText() + CLASS, JavaCore.getOption(JavaCore.COMPILER_SOURCE), JavaCore.getOption(JavaCore.COMPILER_COMPLIANCE)).getSeverity() == IStatus.ERROR || \"String_Node_Str\".equalsIgnoreCase(nameText.getText()))) {\n nameStatus = createStatus(IStatus.ERROR, Messages.getString(\"String_Node_Str\"));\n } else if (nameModifiedByUser) {\n if (retrieveNameFinished) {\n if (!isValid(nameText.getText())) {\n nameStatus = createStatus(IStatus.ERROR, Messages.getString(\"String_Node_Str\"));\n } else {\n nameStatus = createOkStatus();\n }\n } else {\n nameStatus = createStatus(IStatus.ERROR, \"String_Node_Str\");\n }\n } else {\n nameStatus = createOkStatus();\n }\n if (property != null && nameStatus.getSeverity() == IStatus.OK) {\n property.setLabel(getPropertyLabel(StringUtils.trimToNull(nameText.getText())));\n property.setDisplayName(StringUtils.trimToNull(nameText.getText()));\n property.setModificationDate(new Date());\n }\n updatePageStatus();\n}\n"
|
"private void checkCurrentTag() {\n if (hasCurrentTag() && !ReaderTagTable.tagExists(getCurrentTag())) {\n mCurrentTag = ReaderTag.TAG_NAME_DEFAULT;\n}\n"
|
"public GetChecksumMessage getChecksum(ChannelID replyChannel, String filename) throws NotImplementedException, ArgumentNotValid {\n ArgumentNotValid.checkNotNull(replyChannel, \"String_Node_Str\");\n ArgumentNotValid.checkNotNullOrEmpty(filename, \"String_Node_Str\");\n GetChecksumMessage msg = new GetChecksumMessage(theBamon, replyChannel, filename, \"String_Node_Str\" + \"String_Node_Str\");\n jmsCon.send(msg);\n log.debug(\"String_Node_Str\" + msg.toString() + \"String_Node_Str\");\n return msg;\n}\n"
|
"public boolean hasNextChild() {\n if (currentElement < totalElements) {\n return true;\n }\n if (endOfListing) {\n return false;\n }\n int endGroup = rset.getEndingGroupLevel();\n if (endGroup <= 0) {\n ListingDesign listingDesign = (ListingDesign) getDesign();\n totalElements = 0;\n currentElement = 0;\n if (listingDesign.getFooter() != null) {\n executableElements[totalElements++] = listingDesign.getFooter();\n }\n endOfListing = true;\n return true;\n }\n if (rset.next()) {\n collectExecutableElements();\n return true;\n }\n return false;\n}\n"
|
"public ActionResult doExecute(HttpServletRequest req, RenderContext renderContext, Resource resource, JCRSessionWrapper session, Map<String, List<String>> parameters, URLResolver urlResolver) throws Exception {\n JCRSessionWrapper jcrSessionWrapper = resource.getNode().getSession();\n JCRNodeWrapper node = resource.getNode();\n if (!node.isNodeType(\"String_Node_Str\")) {\n node.checkout();\n node.addMixin(\"String_Node_Str\");\n node.getRealNode().getSession().save();\n logger.info(\"String_Node_Str\" + node.getPath());\n }\n long topicnbOfViews = node.getProperty(\"String_Node_Str\").getLong();\n node.setProperty(\"String_Node_Str\", ++topicnbOfViews);\n logger.info(\"String_Node_Str\" + node.getPath() + \"String_Node_Str\" + topicnbOfViews);\n jcrSessionWrapper.save();\n return new ActionResult(HttpServletResponse.SC_OK, node.getPath(), Render.serializeNodeToJSON(node));\n}\n"
|
"public boolean allowsFromQuery() {\n return false;\n}\n"
|
"public Object getExtraCtrl() {\n return new ExtraCtrl();\n}\n"
|
"private Product getL1cMosaicProduct(File granuleMetadataFile, boolean isAGranule) throws IOException {\n Objects.requireNonNull(granuleMetadataFile);\n String filterTileId = null;\n File metadataFile = null;\n if (isAGranule) {\n try {\n Objects.requireNonNull(granuleMetadataFile.getParentFile());\n Objects.requireNonNull(granuleMetadataFile.getParentFile().getParentFile());\n Objects.requireNonNull(granuleMetadataFile.getParentFile().getParentFile().getParentFile());\n } catch (NullPointerException npe) {\n throw new IOException(String.format(\"String_Node_Str\", granuleMetadataFile.getName()));\n }\n File up2levels = granuleMetadataFile.getParentFile().getParentFile().getParentFile();\n File tileIdFilter = granuleMetadataFile.getParentFile();\n filterTileId = tileIdFilter.getName();\n File[] files = up2levels.listFiles();\n for (File f : files) {\n if (S2ProductFilename.isProductFilename(f.getName()) && S2ProductFilename.isMetadataFilename(f.getName())) {\n metadataFile = f;\n break;\n }\n }\n if (metadataFile == null) {\n throw new IOException(String.format(\"String_Node_Str\", granuleMetadataFile.getName()));\n }\n } else {\n metadataFile = granuleMetadataFile;\n }\n final String aFilter = filterTileId;\n L1cMetadata metadataHeader = null;\n try {\n metadataHeader = parseHeader(metadataFile);\n } catch (JDOMException | UnmarshalException e) {\n throw new IOException(\"String_Node_Str\" + metadataFile.getName());\n }\n L1cSceneDescription sceneDescription = L1cSceneDescription.create(metadataHeader, Tile.idGeom.G10M);\n logger.fine(\"String_Node_Str\" + sceneDescription);\n File productDir = getProductDir(metadataFile);\n initCacheDir(productDir);\n ProductCharacteristics productCharacteristics = metadataHeader.getProductCharacteristics();\n Product product = new Product(FileUtils.getFilenameWithoutExtension(metadataFile), \"String_Node_Str\" + productCharacteristics.processingLevel, sceneDescription.getSceneRectangle().width, sceneDescription.getSceneRectangle().height);\n product.getMetadataRoot().addElement(metadataHeader.getMetadataElement());\n product.setFileLocation(metadataFile.getParentFile());\n if (forceResize) {\n setGeoCoding(product, sceneDescription.getSceneEnvelope());\n }\n product.setPreferredTileSize(DEFAULT_JAI_TILE_SIZE, DEFAULT_JAI_TILE_SIZE);\n product.setNumResolutionsMax(L1C_TILE_LAYOUTS[0].numResolutions);\n String autoGrouping = \"String_Node_Str\";\n for (String utmZone : metadataHeader.getUTMZonesList()) {\n autoGrouping += utmZone.replace(':', '_');\n }\n autoGrouping += \"String_Node_Str\";\n product.setAutoGrouping(autoGrouping);\n for (String utmZone : metadataHeader.getUTMZonesList()) {\n Map<Integer, BandInfo> bandInfoMap = new HashMap<Integer, BandInfo>();\n List<L1cMetadata.Tile> utmZoneTileList = metadataHeader.getTileList(utmZone);\n if (isAGranule) {\n utmZoneTileList = metadataHeader.getTileList().stream().filter(p -> p.id.equalsIgnoreCase(aFilter)).collect(Collectors.toList());\n } else {\n utmZoneTileList = metadataHeader.getTileList(utmZone);\n }\n for (SpectralInformation bandInformation : productCharacteristics.bandInformations) {\n int bandIndex = bandInformation.bandId;\n if (bandIndex >= 0 && bandIndex < productCharacteristics.bandInformations.length) {\n HashMap<String, File> tileFileMap = new HashMap<String, File>();\n for (Tile tile : utmZoneTileList) {\n S2GranuleDirFilename gf = S2GranuleDirFilename.create(tile.id);\n S2GranuleImageFilename imageFilename = gf.getImageFilename(bandInformation.physicalBand);\n String imgFilename = \"String_Node_Str\" + File.separator + tile.id + File.separator + \"String_Node_Str\" + File.separator + imageFilename.name;\n logger.finer(\"String_Node_Str\" + imgFilename + \"String_Node_Str\" + bandInformation.physicalBand);\n File file = new File(productDir, imgFilename);\n if (file.exists()) {\n tileFileMap.put(tile.id, file);\n } else {\n logger.warning(String.format(\"String_Node_Str\", file));\n }\n }\n if (!tileFileMap.isEmpty()) {\n BandInfo bandInfo = createBandInfoFromHeaderInfo(bandInformation, tileFileMap);\n bandInfoMap.put(bandIndex, bandInfo);\n } else {\n logger.warning(String.format(\"String_Node_Str\", bandInformation.physicalBand));\n }\n } else {\n logger.warning(String.format(\"String_Node_Str\", bandInformation.physicalBand));\n }\n }\n if (!bandInfoMap.isEmpty()) {\n addBands(product, bandInfoMap, sceneDescription.getSceneEnvelope(), new L1cSceneMultiLevelImageFactory(sceneDescription, ImageManager.getImageToModelTransform(product.getGeoCoding())), utmZone);\n }\n List<EopPolygon> polygons = filterMasksInUTMZones(utmZoneTileList);\n Map<String, List<EopPolygon>> polygonsByType = new HashMap<>();\n if (!polygons.isEmpty()) {\n Set<String> polygonTypes = polygons.stream().map(p -> p.getType()).collect(Collectors.toSet());\n for (String polygonType : polygonTypes) {\n polygonsByType.put(polygonType, polygons.stream().filter(p -> p.getType().equals(polygonType)).collect(Collectors.toList()));\n }\n try {\n AffineTransform scaler = AffineTransform.getScaleInstance(this.productResolution, this.productResolution).createInverse();\n AffineTransform move = AffineTransform.getTranslateInstance(-sceneDescription.getSceneEnvelope().getMinX(), -sceneDescription.getSceneEnvelope().getMinY());\n AffineTransform mirror_y = new AffineTransform(1, 0, 0, -1, 0, sceneDescription.getSceneEnvelope().getHeight() / this.productResolution);\n AffineTransform world2pixel = new AffineTransform(mirror_y);\n world2pixel.concatenate(scaler);\n world2pixel.concatenate(move);\n try {\n for (String polygonType : polygonTypes) {\n final SimpleFeatureType type = Placemark.createGeometryFeatureType();\n final DefaultFeatureCollection collection = new DefaultFeatureCollection(\"String_Node_Str\", type);\n List<EopPolygon> typedPolygon = polygonsByType.get(polygonType);\n for (int index = 0; index < typedPolygon.size(); index++) {\n Polygon pol = typedPolygon.get(index).getPolygon();\n pol = (Polygon) JTS.transform(pol, new AffineTransform2D(world2pixel));\n Object[] data1 = { pol, String.format(\"String_Node_Str\", index) };\n SimpleFeatureImpl f1 = new SimpleFeatureImpl(data1, type, new FeatureIdImpl(String.format(\"String_Node_Str\", index)), true);\n collection.add(f1);\n }\n VectorDataNode vdn = new VectorDataNode(polygonType, collection);\n product.getVectorDataGroup().add(vdn);\n }\n } catch (MismatchedDimensionException e) {\n } catch (TransformException e) {\n }\n } catch (NoninvertibleTransformException e) {\n }\n }\n }\n if (metadataHeader.getTileList().get(0).sunAnglesGrid != null) {\n addTiePointGridBand(product, metadataHeader, sceneDescription, \"String_Node_Str\", 0);\n }\n if (metadataHeader.getTileList().get(1).sunAnglesGrid != null) {\n addTiePointGridBand(product, metadataHeader, sceneDescription, \"String_Node_Str\", 1);\n }\n if (metadataHeader.getTileList().get(2).sunAnglesGrid != null) {\n addTiePointGridBand(product, metadataHeader, sceneDescription, \"String_Node_Str\", 2);\n }\n if (metadataHeader.getTileList().get(3).sunAnglesGrid != null) {\n addTiePointGridBand(product, metadataHeader, sceneDescription, \"String_Node_Str\", 3);\n }\n return product;\n}\n"
|
"public org.hl7.fhir.dstu2.model.Distance convertDistance(org.hl7.fhir.dstu3.model.Distance src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Distance tgt = new org.hl7.fhir.dstu2.model.Distance();\n copyElement(src, tgt);\n tgt.setValue(src.getValue());\n tgt.setComparator(convertQuantityComparator(src.getComparator()));\n tgt.setUnit(src.getUnit());\n tgt.setSystem(src.getSystem());\n tgt.setCode(src.getCode());\n return tgt;\n}\n"
|
"public static CommandLineParser generateParser(UICommand command, ShellContext context) {\n ParserBuilder builder = new ParserBuilder();\n ParameterInt parameter = new ParameterInt(command.getMetadata().getName(), command.getMetadata().getDescription());\n for (InputComponent<?, ?> input : context.getInputs()) {\n if (!input.getName().equals(\"String_Node_Str\")) {\n try {\n if (input.getValueType() == Boolean.class) {\n parameter.addOption(new OptionBuilder().longName(input.getName()).hasValue(false).description(input.getLabel()).create());\n } else {\n parameter.addOption(new OptionBuilder().longName(input.getName()).description(input.getLabel()).required(input.isRequired()).create());\n }\n } catch (OptionParserException e) {\n }\n }\n }\n builder.addParameter(parameter);\n return builder.generateParser();\n}\n"
|
"public OrderedVersionedColumnarTable openTable(byte[] tableName) throws OperationException {\n HyperSQLOVCTable table = new HyperSQLOVCTable(Bytes.toString(tableName), this.connection);\n if (table.openTable()) {\n return table;\n else\n return null;\n}\n"
|
"public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n Context appContext = getActivity().getApplicationContext();\n mRecyclerView = view.findViewById(R.id.recycler_view);\n mRecyclerView.setHasFixedSize(false);\n mRecyclerView.setLayoutManager(createLayoutManager(appContext));\n mRecyclerView.setAdapter(new DemoKeyboardAdapter());\n mRecyclerViewItemTouchHelper.attachToRecyclerView(mRecyclerView);\n if (mIsSingleSelection) {\n mSelectedKeyboardView = (DemoAnyKeyboardView) view.findViewById(R.id.selected_demo_keyboard_view);\n if (mSimulateTyping) {\n mSelectedKeyboardView.setSimulatedTypingText(\"String_Node_Str\");\n }\n }\n}\n"
|
"protected TdDataProvider findDataProvider() {\n TypedReturnCode<TdDataProvider> returnVlaue = PrvResourceFileHelper.getInstance().findProvider((IFile) selectedObj);\n return returnVlaue.getObject();\n}\n"
|
"private static void encodeTab(FacesContext context, ResponseWriter writer, UIComponent tab, boolean isActive) throws IOException {\n writer.startElement(LI, tab);\n writer.writeAttribute(ROLE, \"String_Node_Str\", ROLE);\n Map<String, Object> tabAttributes = tab.getAttributes();\n String classes = isActive ? ACTIVE : \"String_Node_Str\";\n if (tabAttributes.containsKey(STYLECLASS)) {\n classes += \"String_Node_Str\";\n classes += tabAttributes.get(STYLECLASS);\n }\n if (classes.length() > 0)\n writer.writeAttribute(CLASS, classes, CLASS);\n encodeTabAnchorTag(writer, tab, tabAttributes);\n writer.endElement(LI);\n}\n"
|
"public void publish(final String channelName, final ContentKey key) {\n final MessageListener<String> listener = messageListenerMap.get(channelName);\n if (listener == null) {\n return;\n }\n threadPoolExecutor.execute(new Runnable() {\n\n public void run() {\n Message<String> message = new Message<>(channelName, key.keyToString(), System.currentTimeMillis(), null);\n listener.onMessage(message);\n }\n }).start();\n}\n"
|
"public void exited() {\n m_isTerminated = true;\n m_isSuspended = false;\n DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);\n DebugPlugin.getDefault().getExpressionManager().removeExpressionListener(this);\n fireTerminateEvent();\n try {\n m_debugServer.shutdown();\n } catch (DebugServerException e) {\n }\n}\n"
|
"public static StoreQueryRuntime parse(StoreQuery storeQuery, SiddhiAppContext siddhiAppContext, Map<String, Table> tableMap, Map<String, Window> windowMap, Map<String, AggregationRuntime> aggregationMap) {\n String queryName = \"String_Node_Str\" + storeQuery.getInputStore().getStoreId();\n InputStore inputStore = storeQuery.getInputStore();\n Within within = null;\n Expression per = null;\n Expression onCondition = Expression.value(true);\n MetaStreamEvent metaStreamEvent = new MetaStreamEvent();\n metaStreamEvent.setInputReferenceId(inputStore.getStoreReferenceId());\n if (inputStore instanceof AggregationInputStore) {\n AggregationInputStore aggregationInputStore = (AggregationInputStore) inputStore;\n if (aggregationMap.get(inputStore.getStoreId()) == null) {\n throw new StoreQueryCreationException(\"String_Node_Str\" + inputStore.getStoreId() + \"String_Node_Str\" + \"String_Node_Str\");\n }\n if (aggregationInputStore.getPer() != null && aggregationInputStore.getWithin() != null) {\n within = aggregationInputStore.getWithin();\n per = aggregationInputStore.getPer();\n } else if (aggregationInputStore.getPer() != null || aggregationInputStore.getWithin() != null) {\n throw new StoreQueryCreationException(inputStore.getStoreId() + \"String_Node_Str\");\n }\n if (((AggregationInputStore) inputStore).getOnCondition() != null) {\n onCondition = ((AggregationInputStore) inputStore).getOnCondition();\n }\n } else if (inputStore instanceof ConditionInputStore) {\n if (((ConditionInputStore) inputStore).getOnCondition() != null) {\n onCondition = ((ConditionInputStore) inputStore).getOnCondition();\n }\n }\n List<VariableExpressionExecutor> variableExpressionExecutors = new ArrayList<>();\n Table table = tableMap.get(inputStore.getStoreId());\n if (table != null) {\n metaStreamEvent.setEventType(EventType.TABLE);\n initMetaStreamEvent(metaStreamEvent, table.getTableDefinition());\n MatchingMetaInfoHolder metaStreamInfoHolder = generateMatchingMetaInfoHolder(metaStreamEvent, table.getTableDefinition());\n CompiledCondition compiledCondition = table.compileCondition(onCondition, metaStreamInfoHolder, siddhiAppContext, variableExpressionExecutors, tableMap, queryName);\n StoreQueryRuntime storeQueryRuntime = new StoreQueryRuntime(table, compiledCondition, queryName, metaStreamEvent.getEventType());\n populateStoreQueryRuntime(storeQueryRuntime, metaStreamInfoHolder, storeQuery.getSelector(), variableExpressionExecutors, siddhiAppContext, tableMap, queryName, metaPosition);\n return storeQueryRuntime;\n } else {\n AggregationRuntime aggregation = aggregationMap.get(inputStore.getStoreId());\n if (aggregation != null) {\n metaStreamEvent.setEventType(EventType.AGGREGATE);\n initMetaStreamEvent(metaStreamEvent, aggregation.getAggregationDefinition());\n MatchingMetaInfoHolder metaStreamInfoHolder = generateMatchingMetaInfoHolder(metaStreamEvent, aggregation.getAggregationDefinition());\n CompiledCondition compiledCondition = aggregation.compileExpression(onCondition, within, per, metaStreamInfoHolder, variableExpressionExecutors, tableMap, queryName, siddhiAppContext);\n metaStreamInfoHolder = aggregation.getAlteredMatchingMetaInfoHolder();\n StoreQueryRuntime storeQueryRuntime = new StoreQueryRuntime(aggregation, compiledCondition, queryName, metaStreamEvent.getEventType());\n populateStoreQueryRuntimeForAggregator(storeQueryRuntime, metaStreamInfoHolder, storeQuery.getSelector(), variableExpressionExecutors, siddhiAppContext, tableMap, queryName);\n ComplexEventPopulater complexEventPopulater = StreamEventPopulaterFactory.constructEventPopulator(metaStreamInfoHolder.getMetaStateEvent().getMetaStreamEvent(0), 0, ((IncrementalAggregateCompileCondition) compiledCondition).getAdditionalAttributes());\n ((IncrementalAggregateCompileCondition) compiledCondition).setComplexEventPopulater(complexEventPopulater);\n return storeQueryRuntime;\n } else {\n Window window = windowMap.get(inputStore.getStoreId());\n if (window != null) {\n metaStreamEvent.setEventType(EventType.WINDOW);\n initMetaStreamEvent(metaStreamEvent, window.getWindowDefinition());\n MatchingMetaInfoHolder metaStreamInfoHolder = generateMatchingMetaInfoHolder(metaStreamEvent, window.getWindowDefinition());\n CompiledCondition compiledCondition = window.compileCondition(onCondition, generateMatchingMetaInfoHolder(metaStreamEvent, window.getWindowDefinition()), siddhiAppContext, variableExpressionExecutors, tableMap, queryName);\n StoreQueryRuntime storeQueryRuntime = new StoreQueryRuntime(window, compiledCondition, queryName, metaStreamEvent.getEventType());\n populateStoreQueryRuntime(storeQueryRuntime, metaStreamInfoHolder, storeQuery.getSelector(), variableExpressionExecutors, siddhiAppContext, tableMap, queryName);\n return storeQueryRuntime;\n } else {\n throw new StoreQueryCreationException(inputStore.getStoreId() + \"String_Node_Str\");\n }\n }\n }\n}\n"
|
"public void removeMonitorsFor(Animation animation) {\n for (int i = 0; i < animationMonitors.size(); i++) {\n AnimationMonitor animationMonitor = animationMonitors.get(i);\n if (animationMonitor.getAnimation() == animation)\n animationMonitorsToRemove.add(animationMonitor);\n }\n animationMonitors.removeAll(animationMonitorsToRemove);\n animationMonitorsToRemove.clear();\n}\n"
|
"public void updateQuery(Control control) {\n if (textCollection.containsKey(control)) {\n Query query = (Query) textCollection.get(control);\n query.setDefinition(ChartUIUtil.getActualExpression(control));\n adjustScaleData(query);\n ColorPalette.getInstance().putColor(getText(control));\n control.setBackground(ColorPalette.getInstance().getColor(getText(control)));\n }\n}\n"
|
"public void activate() {\n Char ch = Actor.findChar(pos);\n if (ch instanceof Hero) {\n ScrollOfTeleportation.teleportHero((Hero) ch);\n ((Hero) ch).curAction = null;\n } else if (ch instanceof Mob) {\n int count = 10;\n int newPos;\n do {\n newPos = Dungeon.level.randomRespawnCell();\n if (count-- <= 0) {\n break;\n }\n } while (newPos == -1);\n if (newPos != -1 && !Dungeon.bossLevel()) {\n ch.pos = newPos;\n ch.sprite.place(ch.pos);\n ch.sprite.visible = Dungeon.visible[pos];\n }\n }\n if (Dungeon.visible[pos]) {\n CellEmitter.get(pos).start(Speck.factory(Speck.LIGHT), 0.2f, 3);\n }\n}\n"
|
"public static SkyKey key(BuildOptions buildOptions, Class<? extends Fragment> fragmentType, RuleClassProvider ruleClassProvider) {\n BuildOptions optionsKey = buildOptions.trim(BuildConfiguration.getOptionsClasses(ImmutableList.<Class<? extends BuildConfiguration.Fragment>>of(fragmentType), ruleClassProvider));\n return new SkyKey(SkyFunctions.CONFIGURATION_FRAGMENT, new ConfigurationFragmentKey(optionsKey, fragmentType));\n}\n"
|
"public void testGetTablesConnectionCatalogStringBoolean() {\n java.sql.Connection sqlConn = null;\n DatabaseMetaData metaData = null;\n String catalogName = \"String_Node_Str\";\n List<TdTable> tableList = new ArrayList<TdTable>();\n List<TdTable> retableList = new ArrayList<TdTable>();\n List<TdTable> resultList1 = null;\n List<TdTable> resultList2 = null;\n List<TdTable> resultList3 = null;\n String tablePattern = null;\n boolean loadFromDB = true;\n TdTable tableMock = Mockito.mock(TdTable.class);\n retableList.add(tableMock);\n ResultSet tables = Mockito.mock(ResultSet.class);\n try {\n Connection dataProvider = Mockito.mock(DatabaseConnection.class);\n Catalog catalog = Mockito.mock(Catalog.class);\n Mockito.when(catalog.getName()).thenReturn(catalogName);\n TypedReturnCode<java.sql.Connection> reConn = new TypedReturnCode<java.sql.Connection>();\n sqlConn = Mockito.mock(java.sql.Connection.class);\n reConn.setOk(true);\n reConn.setObject(sqlConn);\n ReturnCode rc = new ReturnCode(true);\n metaData = Mockito.mock(DatabaseMetaData.class);\n PowerMockito.mockStatic(MetadataConnectionUtils.class);\n Mockito.when(MetadataConnectionUtils.checkConnection((DatabaseConnection) dataProvider)).thenReturn(reConn);\n Mockito.when(ExtractMetaDataUtils.getInstance().getDatabaseMetaData(sqlConn, (DatabaseConnection) dataProvider, false)).thenReturn(metaData);\n PowerMockito.mockStatic(PackageHelper.class);\n Mockito.when(PackageHelper.getTables(catalog)).thenReturn(tableList);\n MetadataFillFactory metadataMock = Mockito.mock(MetadataFillFactory.class);\n Mockito.when(metadataMock.fillTables((orgomg.cwm.objectmodel.core.Package) Mockito.eq(catalog), Mockito.eq(metaData), Mockito.anyList(), Mockito.eq(tablePattern), (String[]) Mockito.any())).thenReturn(retableList);\n PowerMockito.mockStatic(MetadataFillFactory.class);\n Mockito.when(MetadataFillFactory.getDBInstance()).thenReturn(metadataMock);\n PowerMockito.mockStatic(ConnectionUtils.class);\n Mockito.when(ConnectionUtils.closeConnection(sqlConn)).thenReturn(rc);\n PowerMockito.mockStatic(CatalogHelper.class);\n Mockito.when(CatalogHelper.getTables(catalog)).thenReturn(retableList);\n resultList1 = DqRepositoryViewService.getTables(dataProvider, catalog, tablePattern, loadFromDB);\n tableList.add(tableMock);\n resultList2 = DqRepositoryViewService.getTables(dataProvider, catalog, tablePattern, loadFromDB);\n loadFromDB = false;\n resultList3 = DqRepositoryViewService.getTables(dataProvider, catalog, tablePattern, loadFromDB);\n Mockito.verify(catalog, Mockito.times(2)).getName();\n Mockito.verify(metadataMock, Mockito.times(2)).fillTables((orgomg.cwm.objectmodel.core.Package) Mockito.eq(catalog), Mockito.eq(metaData), Mockito.anyList(), Mockito.eq(tablePattern), (String[]) Mockito.any());\n Mockito.verify(metadataMock).setLinked(true);\n Mockito.verify(metadataMock).setLinked(false);\n Mockito.verifyZeroInteractions(tableMock, tables, dataProvider, catalog, sqlConn, metaData, metadataMock);\n assertTrue(resultList1.size() == 1);\n assertTrue(resultList2.size() == 1);\n assertTrue(resultList3.size() == 1);\n } catch (Exception e) {\n e.printStackTrace();\n fail(e.getMessage());\n }\n}\n"
|
"public void determineAccessRights(String page, State currentState) {\n if (currentState.isSiteAdministrator() == true) {\n currentState.setMode(GwtModesType.ReadWrite);\n } else if (currentState.getUserProjectRole() == ProjectRole.Acquisition_Organization_Engineer) {\n currentState.setMode(GwtModesType.ReadOnly);\n } else if (currentState.getUserProjectRole() == ProjectRole.Contractor) {\n currentState.setMode(GwtModesType.NoAccess);\n } else if (currentState.getUserProjectRole() == ProjectRole.Security_Specialist) {\n currentState.setMode(GwtModesType.ReadWrite);\n } else if (currentState.getUserProjectRole() == ProjectRole.COTS_Vendor) {\n currentState.setMode(GwtModesType.ReadOnly);\n } else if (currentState.getUserProjectRole() == ProjectRole.None) {\n currentState.setMode(GwtModesType.NoAccess);\n } else if (currentState.getUserProjectRole() == ProjectRole.Administrator) {\n currentState.setMode(GwtModesType.ReadWrite);\n } else {\n currentState.setMode(GwtModesType.ReadOnly);\n }\n}\n"
|
"public void doubleClick(DoubleClickEvent dcEvent) {\n Node node = null;\n if (dcEvent.getSelection() instanceof IStructuredSelection) {\n IStructuredSelection ss = (IStructuredSelection) dcEvent.getSelection();\n if (ss.getFirstElement() instanceof Node)\n node = (Node) ss.getFirstElement();\n }\n if (node instanceof TypeNode)\n node = node.getParent();\n else if (node instanceof VersionNode)\n node = (((VersionNode) node).getNewestVersion());\n if (node != null) {\n setCurrentNode(node);\n select(node);\n navigatorMenus.doubleClickNotification();\n }\n}\n"
|
"public void cdata(String value) {\n if (isStartElementOpen) {\n outputStreamWrite(CLOSE_ELEMENT);\n isStartElementOpen = false;\n }\n outputStreamWrite(CR);\n outputStreamWriteTab();\n super.cdata(value);\n complexType = false;\n}\n"
|
"private void connectUntilPong() throws InterruptedException {\n gotGoodPong = false;\n while (!gotGoodPong) {\n String[] hosts = settings.getQuickConnectHosts();\n for (int i = 0; i < hosts.length && !gotGoodPong; i++) {\n Endpoint e;\n try {\n e = new Endpoint(hosts[i]);\n } catch (IllegalArgumentException exc) {\n continue;\n }\n try {\n manager.createRouterConnection(e.getHostname(), e.getPort());\n } catch (IOException exc) {\n continue;\n }\n synchronized (gotGoodPongLock) {\n if (!gotGoodPong) {\n gotGoodPongLock.wait(CONNECT_TIME);\n }\n }\n }\n if (stale) {\n synchronized (staleLock) {\n stale = false;\n staleLock.notifyAll();\n }\n }\n if (!gotGoodPong)\n Thread.sleep(RETRY_TIME);\n }\n}\n"
|
"public T greaterThan(Object val) {\n Assert.parametersNotNull(\"String_Node_Str\", val);\n return addCrit(FilterOperator.GREATER_THAN, val);\n}\n"
|
"public int execute(final String command) throws Exception {\n logger.info(\"String_Node_Str\" + command + \"String_Node_Str\" + host);\n final Session session = getSession();\n session.connect();\n final ChannelExec channel = (ChannelExec) session.openChannel(\"String_Node_Str\");\n channel.setCommand(command);\n channel.connect();\n final InputStream input = channel.getInputStream();\n final Reader reader = new InputStreamReader(input);\n final BufferedReader buffered = new BufferedReader(reader);\n while (true) {\n final String line = buffered.readLine();\n if (line == null) {\n break;\n }\n logger.info(\"String_Node_Str\" + line);\n }\n channel.disconnect();\n final int status = channel.getExitStatus();\n session.disconnect();\n logger.info(\"String_Node_Str\" + status);\n return status;\n}\n"
|
"public void save() throws IOException {\n final byte[] out;\n final String text = toText();\n if (utf8Bom) {\n final ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bos.write(0xEF);\n bos.write(0xBB);\n bos.write(0xBF);\n bos.write(text.getBytes(RawParseUtils.UTF8_CHARSET.name()));\n out = bos.toByteArray();\n } else {\n out = Constants.encode(text);\n }\n final LockFile lf = new LockFile(getFile(), fs);\n if (!lf.lock())\n throw new LockFailedException(getFile());\n try {\n lf.setNeedSnapshot(true);\n lf.write(out);\n if (!lf.commit())\n throw new IOException(MessageFormat.format(JGitText.get().cannotCommitWriteTo, getFile()));\n } finally {\n lf.unlock();\n }\n snapshot = lf.getCommitSnapshot();\n hash = hash(out);\n fireConfigChangedEvent();\n}\n"
|
"private void init() {\n setWidgetLayoutResource(R.layout.colour_preference);\n}\n"
|
"public static ECPoint doublePoint(EllipticCurve curve, ECPoint ecPoint) {\n if (ecPoint.equals(ECPoint.POINT_INFINITY)) {\n return ecPoint;\n }\n BigInteger p = ((ECFieldFp) curve.getField()).getP();\n BigInteger a = curve.getA();\n BigInteger xp = ecPointP.getAffineX();\n BigInteger yp = ecPointP.getAffineY();\n BigInteger lambda = ((((xp.pow(2)).multiply(THREE)).add(a)).multiply((yp.multiply(TWO)).modInverse(p))).mod(p);\n BigInteger xr = computeXr(p, lambda, xp);\n BigInteger yr = computeYr(p, lambda, xp, yp, xr);\n ECPoint ecPointR = new ECPoint(xr, yr);\n return ecPointR;\n}\n"
|
"public static void addPropertiesToMessageBundle(String language, Class invokingClass, PropFileOperations propFileOperations, ProjectOperations projectOperations, FileManager fileManager) {\n Properties properties = new Properties();\n LogicalPath webappPath = WebProjectUtils.getWebappPath(projectOperations);\n String sourcePropertyFile = \"String_Node_Str\".concat(invokingClass.getPackage().getName()).replace('.', '/');\n String targetFilePath = \"String_Node_Str\";\n String targetFile = projectOperations.getPathResolver().getIdentifier(webappPath, targetFilePath);\n try {\n if (language == \"String_Node_Str\") {\n propertiesFolderPath = propertiesFolderPath.concat(\"String_Node_Str\");\n properties.load(invokingClass.getResourceAsStream(propertiesFolderPath));\n } else {\n messageBundleRelativeFilePath = \"String_Node_Str\".concat(language).concat(\"String_Node_Str\");\n messageBundle = projectOperations.getPathResolver().getIdentifier(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP, \"String_Node_Str\"), messageBundleRelativeFilePath);\n propertiesFolderPath = propertiesFolderPath.concat(\"String_Node_Str\" + language + \"String_Node_Str\");\n properties.load(invokingClass.getResourceAsStream(propertiesFolderPath));\n }\n if (fileManager.exists(messageBundle)) {\n propFileOperations.addProperties(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP, \"String_Node_Str\"), messageBundleRelativeFilePath, new HashMap<String, String>((Map) properties), true, true);\n } else {\n logger.warning(messageBundle.concat(\"String_Node_Str\"));\n }\n } catch (IOException e) {\n logger.log(Level.SEVERE, \"String_Node_Str\".concat(language).concat(\"String_Node_Str\"));\n }\n}\n"
|
"public void execute(Connection connection, FtpRequest request, FtpSessionImpl session, FtpReplyOutput out) throws IOException, FtpException {\n session.resetState();\n FtpServerContext serverContext = connection.getServerContext();\n String fileName = request.getArgument();\n if (fileName == null || fileName.indexOf(File.pathSeparatorChar) > -1) {\n out.write(FtpReplyUtil.translate(session, FtpReply.REPLY_501_SYNTAX_ERROR_IN_PARAMETERS_OR_ARGUMENTS, \"String_Node_Str\", null));\n return;\n }\n Ftplet ftpletContainer = serverContext.getFtpletContainer();\n FtpletEnum ftpletRet;\n try {\n ftpletRet = ftpletContainer.onMkdirStart(session, request, out);\n } catch (Exception e) {\n LOG.debug(\"String_Node_Str\", e);\n ftpletRet = FtpletEnum.RET_DISCONNECT;\n }\n if (ftpletRet == FtpletEnum.RET_SKIP) {\n return;\n } else if (ftpletRet == FtpletEnum.RET_DISCONNECT) {\n serverContext.getConnectionManager().closeConnection(connection);\n return;\n }\n FileObject file = null;\n try {\n file = session.getFileSystemView().getFileObject(fileName);\n } catch (Exception ex) {\n LOG.debug(\"String_Node_Str\", ex);\n }\n if (file == null) {\n out.write(FtpReplyUtil.translate(session, FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN, \"String_Node_Str\", fileName));\n return;\n }\n fileName = file.getFullName();\n if (!file.hasWritePermission()) {\n out.write(FtpReplyUtil.translate(session, FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN, \"String_Node_Str\", fileName));\n return;\n }\n if (file.doesExist()) {\n out.write(FtpReplyUtil.translate(session, FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN, \"String_Node_Str\", fileName));\n return;\n }\n if (file.mkdir()) {\n out.write(FtpReplyUtil.translate(session, FtpReply.REPLY_257_PATHNAME_CREATED, \"String_Node_Str\", fileName));\n String userName = session.getUser().getName();\n LOG.info(\"String_Node_Str\" + userName + \"String_Node_Str\" + fileName);\n ServerFtpStatistics ftpStat = (ServerFtpStatistics) connection.getServerContext().getFtpStatistics();\n ftpStat.setMkdir(connection, file);\n try {\n ftpletRet = ftpletContainer.onMkdirEnd(session, request, out);\n } catch (Exception e) {\n LOG.debug(\"String_Node_Str\", e);\n ftpletRet = FtpletEnum.RET_DISCONNECT;\n }\n if (ftpletRet == FtpletEnum.RET_DISCONNECT) {\n serverContext.getConnectionManager().closeConnection(connection);\n return;\n }\n } else {\n out.write(FtpReplyUtil.translate(session, FtpReply.REPLY_550_REQUESTED_ACTION_NOT_TAKEN, \"String_Node_Str\", fileName));\n }\n}\n"
|
"private String getCrfVersionStatus(String seSubjectEventStatus, int cvStatusId, int ecStatusId, int validatorId) {\n DataEntryStage stage = DataEntryStage.INVALID;\n Status status = Status.get(ecStatusId);\n if (stage.equals(DataEntryStage.INVALID) || status.equals(Status.INVALID)) {\n stage = DataEntryStage.UNCOMPLETED;\n }\n if (status.equals(Status.AVAILABLE)) {\n stage = DataEntryStage.INITIAL_DATA_ENTRY;\n }\n if (status.equals(Status.PENDING)) {\n if (validatorId != 0) {\n stage = DataEntryStage.DOUBLE_DATA_ENTRY;\n } else {\n stage = DataEntryStage.INITIAL_DATA_ENTRY_COMPLETE;\n }\n }\n if (status.equals(Status.UNAVAILABLE)) {\n stage = DataEntryStage.DOUBLE_DATA_ENTRY_COMPLETE;\n }\n if (status.equals(Status.LOCKED)) {\n stage = DataEntryStage.LOCKED;\n }\n try {\n if (seSubjectEventStatus.equals(SubjectEventStatus.LOCKED.getName()) || seSubjectEventStatus.equals(SubjectEventStatus.SKIPPED.getName()) || seSubjectEventStatus.equals(SubjectEventStatus.STOPPED.getName())) {\n stage = DataEntryStage.LOCKED;\n } else if (seSubjectEventStatus.equals(SubjectEventStatus.INVALID.getName())) {\n stage = DataEntryStage.LOCKED;\n } else if (cvStatusId != 1) {\n stage = DataEntryStage.LOCKED;\n }\n } catch (NullPointerException e) {\n logger.debug(\"String_Node_Str\");\n }\n logger.debug(\"String_Node_Str\" + stage.getName());\n return stage.getName();\n}\n"
|
"public void serviceStart() {\n try {\n Configuration conf = getConfig();\n InetSocketAddress addr = new InetSocketAddress(0);\n DAGClientAMProtocolBlockingPBServerImpl service = new DAGClientAMProtocolBlockingPBServerImpl(realInstance);\n BlockingService blockingService = DAGClientAMProtocol.newReflectiveBlockingService(service);\n int numHandlers = conf.getInt(TezConfiguration.TEZ_AM_CLIENT_THREAD_COUNT, TezConfiguration.TEZ_AM_CLIENT_THREAD_COUNT_DEFAULT);\n server = createServer(DAGClientAMProtocolBlockingPB.class, addr, conf, numHandlers, blockingService, TezConfiguration.TEZ_AM_CLIENT_AM_PORT_RANGE);\n if (conf.getBoolean(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION, false)) {\n refreshServiceAcls(conf, new TezAMPolicyProvider());\n }\n server.start();\n bindAddress = NetUtils.getConnectAddress(server);\n LOG.info(\"String_Node_Str\" + bindAddress);\n } catch (Exception e) {\n LOG.error(\"String_Node_Str\", e);\n throw new TezUncheckedException(e);\n }\n}\n"
|
"public Collection<? extends PhpNamedElement> getBySignature(String expression, Project project) {\n int endIndex = expression.lastIndexOf(TRIM_KEY);\n if (endIndex == -1) {\n return Collections.emptySet();\n }\n String originalSignature = expression.substring(0, endIndex);\n String parameter = expression.substring(endIndex + 1);\n PhpIndex phpIndex = PhpIndex.getInstance(project);\n Collection<? extends PhpNamedElement> phpNamedElementCollections = phpIndex.getBySignature(originalSignature, null, 0);\n if (phpNamedElementCollections.size() == 0) {\n return Collections.emptySet();\n }\n PhpNamedElement phpNamedElement = phpNamedElementCollections.iterator().next();\n if (!(phpNamedElement instanceof Method)) {\n return phpNamedElementCollections;\n }\n if (!new Symfony2InterfacesUtil().isCallTo((Method) phpNamedElement, \"String_Node_Str\", \"String_Node_Str\")) {\n return phpNamedElementCollections;\n }\n parameter = PhpTypeProviderUtil.getResolvedParameter(phpIndex, parameter);\n if (parameter == null) {\n return phpNamedElementCollections;\n }\n PhpClass phpClass = EntityHelper.resolveShortcutName(project, parameter);\n if (phpClass == null) {\n return phpNamedElementCollections;\n }\n return Arrays.asList(phpClass);\n}\n"
|
"public static void removeEmbargoTypeJSON(String embargoTypeId) {\n try {\n Long id = Long.valueOf(embargoTypeId);\n EmbargoType embargo = settingRepo.findEmbargoType(id);\n embargo.delete();\n Logger.info(\"String_Node_Str\", context.getPerson().getFormattedName(NameFormat.FIRST_LAST), context.getPerson().getId(), context.getPerson().getEmail(), embargo.getId(), embargo.getName(), embargo.getDescription(), embargo.getDuration(), embargo.isActive(), embargo.getGuarantor());\n renderJSON(\"String_Node_Str\");\n } catch (RuntimeException re) {\n Logger.error(re, \"String_Node_Str\");\n String message = escapeJavaScript(re.getMessage());\n renderJSON(\"String_Node_Str\" + message + \"String_Node_Str\");\n }\n}\n"
|
"public void onSuccess(Void info) {\n getState().addAlias(alias);\n super.onSuccess(info);\n}\n"
|
"public void characters(char[] ch, int start, int length) throws SAXException {\n String text = new String(ch, start, length);\n if (text.length() > 0) {\n lastText.append(text);\n }\n}\n"
|
"public void testRemoveAmendmentControllerWithListener() throws Exception {\n final OverlayWidget overlayWidget = new OverlayWidgetImpl();\n final Boolean[] hits = new Boolean[] { false, false };\n overlayWidget.setListener(new OverlayWidgetListenerMock() {\n public boolean beforeAmendmentControllerRemoved(OverlayWidget overlayWidget, AmendmentController amendmentController) {\n hits[0] = true;\n return false;\n }\n public void afterAmendmentControllerRemoved(OverlayWidget overlayWidget, AmendmentController amendmentController) {\n hits[1] = true;\n }\n });\n final ClientFactory clientFactory = new ClientFactoryMock();\n final AmendmentView amendmentView = new AmendmentViewImpl(null);\n final AmendmentView amendmentViewExtended = new AmendmentViewImpl(null);\n final AmendmentController amendmentController = new DefaultAmendmentController(amendmentView, amendmentViewExtended);\n overlayWidget.addAmendmentController(amendmentController);\n overlayWidget.removeAmendmentController(amendmentController);\n Assert.assertTrue(\"String_Node_Str\", hits[0]);\n Assert.assertTrue(\"String_Node_Str\", hits[1]);\n Assert.assertFalse(Arrays.asList(overlayWidget.getAmendmentControllers()).contains(amendmentController));\n}\n"
|
"public static DatabaseConnection fillDbConnectionInformation(DatabaseConnection dbConn, IMetadataConnection metadataConnection) {\n boolean noStructureExists = ConnectionHelper.getAllCatalogs(dbConn).isEmpty() && ConnectionHelper.getAllSchemas(dbConn).isEmpty();\n java.sql.Connection sqlConn = null;\n try {\n if (noStructureExists) {\n IMetadataConnection metaConnection = metadataConnection;\n if (metadataConnection == null) {\n metaConnection = ConvertionHelper.convert(dbConn);\n }\n dbConn = (DatabaseConnection) MetadataFillFactory.getDBInstance().fillUIConnParams(metaConnection, dbConn);\n sqlConn = MetadataConnectionUtils.checkConnection(metaConnection).getObject();\n if (sqlConn != null) {\n DatabaseMetaData databaseMetaData = null;\n if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(metaConnection.getDbType())) {\n databaseMetaData = HiveConnectionManager.getInstance().extractDatabaseMetaData(metaConnection);\n } else {\n databaseMetaData = ExtractMetaDataUtils.getInstance().getDatabaseMetaData(sqlConn, dbConn, false);\n }\n if (sqlConn != null) {\n MetadataFillFactory.getDBInstance().fillCatalogs(dbConn, databaseMetaData, metaConnection, MetadataConnectionUtils.getPackageFilter(dbConn, databaseMetaData, true));\n MetadataFillFactory.getDBInstance().fillSchemas(dbConn, databaseMetaData, metaConnection, MetadataConnectionUtils.getPackageFilter(dbConn, databaseMetaData, false));\n }\n }\n }\n } catch (Exception e) {\n log.error(e, e);\n } finally {\n boolean hsql = ConnectionUtils.isHsql(metadataConnection.getUrl());\n if (hsql && sqlConn != null) {\n ConnectionUtils.closeConnection(sqlConn);\n }\n closeDerbyDriver();\n }\n return dbConn;\n}\n"
|
"public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, AbstractSession session, NamespaceResolver namespaceResolver, XMLMarshaller marshaller) {\n if (xmlCompositeObjectMapping.isReadOnly()) {\n return false;\n }\n if (xPathFragment.hasLeafElementType()) {\n marshalRecord.setLeafElementType(xPathFragment.getLeafElementType());\n }\n Object objectValue = xmlCompositeObjectMapping.getAttributeValueFromObject(object);\n if (xmlCompositeObjectMapping.getConverter() != null) {\n Converter converter = xmlCompositeObjectMapping.getConverter();\n if (converter instanceof XMLConverter) {\n objectValue = ((XMLConverter) converter).convertObjectValueToDataValue(objectValue, session, marshaller);\n } else {\n objectValue = converter.convertObjectValueToDataValue(objectValue, session);\n }\n }\n if (null == objectValue) {\n return xmlCompositeObjectMapping.getNullPolicy().compositeObjectMarshal(xPathFragment, marshalRecord, object, session, namespaceResolver);\n }\n if ((marshaller != null) && (marshaller.getMarshalListener() != null)) {\n marshaller.getMarshalListener().beforeMarshal(objectValue);\n }\n XPathFragment groupingFragment = marshalRecord.openStartGroupingElements(namespaceResolver);\n marshalRecord.closeStartGroupingElements(groupingFragment);\n XMLDescriptor descriptor = (XMLDescriptor) session.getDescriptor(objectValue);\n TreeObjectBuilder objectBuilder = (TreeObjectBuilder) descriptor.getObjectBuilder();\n if (!xPathFragment.isSelfFragment()) {\n getXPathNode().startElement(marshalRecord, xPathFragment, object, session, namespaceResolver, objectBuilder, objectValue);\n }\n List extraNamespaces = objectBuilder.addExtraNamespacesToNamespaceResolver(descriptor, marshalRecord, session);\n writeExtraNamespaces(extraNamespaces, marshalRecord, session);\n if ((xmlCompositeObjectMapping.getReferenceDescriptor() == null) && (descriptor.getSchemaReference() != null)) {\n addTypeAttributeIfNeeded(descriptor, xmlCompositeObjectMapping, marshalRecord);\n }\n objectBuilder.buildRow(marshalRecord, objectValue, (org.eclipse.persistence.internal.sessions.AbstractSession) session, marshaller);\n if (!xPathFragment.isSelfFragment()) {\n marshalRecord.endElement(xPathFragment, namespaceResolver);\n }\n objectBuilder.removeExtraNamespacesFromNamespaceResolver(marshalRecord, extraNamespaces, session);\n if ((marshaller != null) && (marshaller.getMarshalListener() != null)) {\n marshaller.getMarshalListener().afterMarshal(objectValue);\n }\n return true;\n}\n"
|
"public Container xor(ArrayContainer value2) {\n ArrayContainer value1 = this;\n final int desiredcapacity = Math.min(value1.getCardinality() + value2.getCardinality(), 65536);\n ArrayContainer answer = ContainerFactory.getArrayContainer();\n if (answer.content.length < desiredcapacity)\n answer.content = new short[desiredcapacity];\n answer.cardinality = Util.unsigned_exclusiveunion2by2(value1.content, value1.getCardinality(), value2.content, value2.getCardinality(), answer.content);\n if (answer.cardinality > DEFAULTMAXSIZE)\n return ContainerFactory.transformToBitmapContainer(answer);\n return answer;\n}\n"
|
"public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {\n AbstractProject<?, ?> rootProject = build.getProject().getRootProject();\n if (!(rootProject.getScm() instanceof IntegritySCM)) {\n listener.getLogger().println(\"String_Node_Str\" + rootProject.getScm() + \"String_Node_Str\");\n return true;\n }\n IntegritySCM scm = IntegritySCM.class.cast(rootProject.getScm());\n IntegrityDeleteNonMembersTask deleteNonMembers = new IntegrityDeleteNonMembersTask(build, listener, scm.getAlternateWorkspace(), scm.getIntegrityProject());\n if (!build.getWorkspace().act(deleteNonMembers)) {\n return false;\n }\n return true;\n}\n"
|
"public void initializeFromParent(CachePolicy parentPolicy, ClassDescriptor descriptor, ClassDescriptor descriptorDescriptor, AbstractSession session) throws DescriptorException {\n if (!parentPolicy.isSharedIsolation()) {\n if (!isIsolated() && (getCacheIsolation() != parentPolicy.getCacheIsolation())) {\n session.log(SessionLog.WARNING, SessionLog.METADATA, \"String_Node_Str\", new Object[] { descriptorDescriptor.getAlias(), parentPolicy.getCacheIsolation(), descriptor.getAlias(), getCacheIsolation() });\n setCacheIsolation(parentPolicy.getCacheIsolation());\n }\n }\n for (CacheIndex index : parentPolicy.getCacheIndexes().values()) {\n addCacheIndex(index);\n }\n if ((getDatabaseChangeNotificationType() == null) && (parentPolicy.getDatabaseChangeNotificationType() != null)) {\n setDatabaseChangeNotificationType(parentPolicy.getDatabaseChangeNotificationType());\n }\n if ((getCacheSynchronizationType() == UNDEFINED_OBJECT_CHANGE_BEHAVIOR) && (parentPolicy.getCacheSynchronizationType() != UNDEFINED_OBJECT_CHANGE_BEHAVIOR)) {\n setCacheSynchronizationType(parentPolicy.getCacheSynchronizationType());\n }\n}\n"
|
"public TaskInstance nextUserTask(ProcessInstanceUUID processInstanceUUID, String currentUserName) throws Exception {\n initContext();\n Set<ActivityInstance> activities = queryRuntimeAPI.getActivityInstances(processInstanceUUID);\n for (ActivityInstance instance : activities) {\n if (instance.getState() == ActivityState.READY || instance.getState() == ActivityState.EXECUTING || instance.getState() == ActivityState.SUSPENDED) {\n LightTaskInstance task = instance.getTask();\n if (!task.isTaskAssigned())\n return assignAndStartTask(task.getUUID(), currentUserName);\n }\n }\n return null;\n}\n"
|
"public void showDuplicate(ActionRequest request, ActionResponse response) {\n String model = (String) request.getContext().get(\"String_Node_Str\");\n List<String> fields = new ArrayList<String>();\n if (model == null) {\n model = request.getModel();\n String searchFields = (String) request.getContext().get(\"String_Node_Str\");\n if (searchFields != null) {\n fields.addAll(Arrays.asList(searchFields.split(\"String_Node_Str\")));\n }\n } else {\n List<HashMap<String, Object>> fieldsSet = (List<HashMap<String, Object>>) request.getContext().get(\"String_Node_Str\");\n for (HashMap<String, Object> field : fieldsSet) {\n if (field.get(\"String_Node_Str\") != null && (Boolean) field.get(\"String_Node_Str\")) {\n MetaField metaField = metaFieldRepo.find(Long.parseLong(field.get(\"String_Node_Str\").toString()));\n fields.add(metaField.getName());\n }\n }\n }\n LOG.debug(\"String_Node_Str\", model);\n if (fields.size() > 0) {\n LOG.debug(\"String_Node_Str\", fields);\n String selectedRecored = request.getContext().get(\"String_Node_Str\").toString();\n selectedRecored = selectedRecored.substring(1, selectedRecored.length() - 1);\n String ids = findDuplicateRecords(fields, model, selectedRecored);\n if (ids.isEmpty())\n response.setFlash(I18n.get(IExceptionMessage.GENERAL_1));\n else {\n response.setView(ActionView.define(I18n.get(IExceptionMessage.GENERAL_2)).model(model).domain(\"String_Node_Str\" + ids + \"String_Node_Str\").map());\n response.setCanClose(true);\n }\n } else\n response.setFlash(I18n.get(IExceptionMessage.GENERAL_3));\n}\n"
|
"public void onPause() {\n finishActionMode();\n super.onPause();\n}\n"
|
"public Float getValue(double low, double high, Estimator estimator) {\n if (low > high)\n throw new IllegalArgumentException(\"String_Node_Str\" + \"String_Node_Str\");\n return getValue(new Interval<Float>(low, high, false, false), estimator);\n}\n"
|
"public String getMessage() {\n return \"String_Node_Str\";\n}\n"
|
"private void changeState(TabState tabState) {\n if (currentState != tabState) {\n this.currentState = tabState;\n switch(tabState) {\n case SELECTED:\n FontUtils.removeUnderline(mainButton);\n FontUtils.removeUnderline(additionalText);\n mainButton.setForeground(props.getSelectionColor());\n additionalText.setForeground(props.getSelectionColor());\n this.setBackgroundPainter(props.getSelectedPainter());\n removeButton.setIcon(removeSelectedIcon);\n break;\n case BACKGROUND:\n underline();\n mainButton.setForeground(props.getNormalColor());\n additionalText.setForeground(props.getNormalColor());\n this.setBackgroundPainter(props.getNormalPainter());\n removeButton.setIcon(removeBackgroundIcon);\n break;\n case ROLLOVER:\n setBackgroundPainter(props.getHighlightPainter());\n removeButton.setIcon(removeSelectedIcon);\n break;\n }\n }\n}\n"
|
"public static org.hl7.fhir.dstu2016may.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu3.model.OperationDefinition src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.OperationDefinition tgt = new org.hl7.fhir.dstu2016may.model.OperationDefinition();\n copyDomainResource(src, tgt);\n tgt.setUrl(src.getUrl());\n tgt.setVersion(src.getVersion());\n tgt.setName(src.getName());\n tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));\n tgt.setKind(convertOperationKind(src.getKind()));\n tgt.setExperimental(src.getExperimental());\n tgt.setDate(src.getDate());\n tgt.setPublisher(src.getPublisher());\n for (org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t));\n tgt.setDescription(src.getDescription());\n for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getUseContext()) tgt.addUseContext(convertCodeableConcept(t));\n tgt.setRequirements(src.getRequirements());\n tgt.setIdempotent(src.getIdempotent());\n tgt.setCode(src.getCode());\n tgt.setComment(src.getComment());\n tgt.setBase(convertReference(src.getBase()));\n tgt.setSystem(src.getSystem());\n for (org.hl7.fhir.dstu3.model.CodeType t : src.getType()) tgt.addType(t.getValue());\n tgt.setInstance(src.getInstance());\n for (org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t));\n return tgt;\n}\n"
|
"public File[] getFiles() {\n List<File> files = new ArrayList<File>();\n for (File archivePath : archivePaths) {\n File archiveDir = new File(archivePath, Constants.FILE_DIRECTORY_NAME);\n if (checkArchiveDir(archiveDir)) {\n File[] filesHere = archiveDir.listFiles();\n for (File file : filesHere) {\n if (!file.isFile()) {\n log.warn(\"String_Node_Str\" + file.getAbsolutePath() + \"String_Node_Str\");\n } else {\n files.add(file);\n }\n }\n }\n }\n return (files.toArray(new File[0]));\n}\n"
|
"public static IPropertySource<?> createFacetPropSource(XSDSimpleTypeDefinition simpleType, String facetPropName, Composite cellEditorParent) {\n SimpleTypeFacetPropSourceBuilder builder = getPropSourceBuilder(facetPropName);\n if (builder == null)\n return null;\n return builder.doCreatePropSource(targetSimpleType, cellEditorParent, builder.getSourceFacetValue(oldSimpleType));\n}\n"
|
"private SerialMessage setValueMessage(String str, int command) {\n logger.debug(\"String_Node_Str\", getNode().getNodeId(), str);\n byte[] nameBuffer = null;\n byte encoding = ENCODING_ASCII;\n CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();\n if (asciiEncoder.canEncode(str) == true) {\n nameBuffer = str.getBytes(StandardCharsets.US_ASCII);\n } else {\n nameBuffer = str.getBytes(StandardCharsets.UTF_16);\n encoding = ENCODING_UTF16;\n }\n int len = nameBuffer.length;\n if (len > 16) {\n len = 16;\n }\n SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.SendData, SerialMessagePriority.Set);\n byte[] newPayload = { (byte) this.getNode().getNodeId(), (byte) ((byte) len + 3), (byte) getCommandClass().getKey(), (byte) command, encoding };\n byte[] msg = new byte[newPayload.length + len];\n System.arraycopy(newPayload, 0, msg, 0, newPayload.length);\n System.arraycopy(nameBuffer, 0, msg, newPayload.length, len);\n result.setMessagePayload(msg);\n return result;\n}\n"
|
"public String printCardNumber() {\n if (m_sCardNumber.length() > 4) {\n return m_sCardNumber.substring(0, m_sCardNumber.length() - 4).replaceAll(\"String_Node_Str\", \"String_Node_Str\") + m_sCardNumber.substring(m_sCardNumber.length() - 4);\n } else {\n return \"String_Node_Str\";\n }\n}\n"
|
"protected void runShadowProcess(Boolean flag) {\n XmlFileConnection connection2 = getConnection();\n String tempXmlFilePath = getContextXmlPath(connection2);\n if (tempXmlFilePath == null ? XmlUtil.isXSDFile(connection2.getXmlFilePath()) : XmlUtil.isXSDFile(connection2.getXmlFilePath()) || XmlUtil.isXSDFile(tempXmlFilePath)) {\n refreshMetaDataTable(null, ((XmlXPathLoopDescriptor) connection2.getSchema().get(0)).getSchemaTargets(), flag);\n checkFieldsValue();\n return;\n }\n try {\n informationLabel.setText(\"String_Node_Str\" + Messages.getString(\"String_Node_Str\"));\n CsvArray csvArray = ShadowProcessHelper.getCsvArray(getProcessDescription(true), \"String_Node_Str\");\n if (csvArray == null) {\n informationLabel.setText(\"String_Node_Str\" + Messages.getString(\"String_Node_Str\"));\n } else {\n refreshMetaDataTable(csvArray, ((XmlXPathLoopDescriptor) connection2.getSchema().get(0)).getSchemaTargets(), flag);\n }\n } catch (CoreException e) {\n if (getParent().getChildren().length == 1) {\n new ErrorDialogWidthDetailArea(getShell(), PID, Messages.getString(\"String_Node_Str\") + \"String_Node_Str\" + Messages.getString(\"String_Node_Str\"), e.getMessage());\n } else {\n new ErrorDialogWidthDetailArea(getShell(), PID, Messages.getString(\"String_Node_Str\"), e.getMessage());\n }\n log.error(Messages.getString(\"String_Node_Str\") + \"String_Node_Str\" + e.getMessage());\n }\n checkFieldsValue();\n}\n"
|
"public void handleIOException(IOException exception) {\n repeatRequestOrShowResults(true);\n}\n"
|
"public Object getValue(int index, int selector, Object parameters) {\n if (index == 1) {\n return getLogicalName();\n } else if (index == 2) {\n ByteArrayOutputStream data = new ByteArrayOutputStream();\n data.write((byte) DataType.STRUCTURE.getValue());\n data.write(3);\n try {\n GXCommon.setData(data, DataType.INT16, MonitoredValue.getObjectType().getValue());\n GXCommon.setData(data, DataType.OCTET_STRING, MonitoredValue.getLogicalName());\n } catch (Exception ex) {\n throw new RuntimeException(ex.getMessage());\n }\n return data;\n } else if (index == 3) {\n return ThresholdActive;\n } else if (index == 4) {\n return ThresholdNormal;\n } else if (index == 5) {\n return ThresholdEmergency;\n } else if (index == 6) {\n return MinOverThresholdDuration;\n } else if (index == 7) {\n return MinUnderThresholdDuration;\n } else if (index == 8) {\n ByteArrayOutputStream data = new ByteArrayOutputStream();\n data.write((byte) DataType.STRUCTURE.getValue());\n data.write(3);\n try {\n GXCommon.setData(data, DataType.UINT16, EmergencyProfile.getID());\n GXCommon.setData(data, DataType.DATETIME, EmergencyProfile.getActivationTime());\n GXCommon.setData(data, DataType.UINT32, EmergencyProfile.getDuration());\n } catch (Exception ex) {\n throw new RuntimeException(ex.getMessage());\n }\n return data;\n } else if (index == 9) {\n ByteArrayOutputStream data = new ByteArrayOutputStream();\n data.write((byte) DataType.ARRAY.getValue());\n data.write((byte) EmergencyProfileGroupIDs.length);\n try {\n for (Object it : EmergencyProfileGroupIDs) {\n GXCommon.setData(data, DataType.UINT16, it);\n }\n } catch (Exception ex) {\n throw new RuntimeException(ex.getMessage());\n }\n return data;\n } else if (index == 10) {\n return EmergencyProfileActive;\n } else if (index == 11) {\n ByteArrayOutputStream data = new ByteArrayOutputStream();\n data.write((byte) DataType.STRUCTURE.getValue());\n data.write(2);\n data.write((byte) DataType.STRUCTURE.getValue());\n data.write(2);\n try {\n GXCommon.setData(data, DataType.OCTET_STRING, ActionOverThreshold.getLogicalName());\n GXCommon.setData(data, DataType.UINT16, ActionOverThreshold.getScriptSelector());\n data.write((byte) DataType.STRUCTURE.getValue());\n data.write(2);\n GXCommon.setData(data, DataType.OCTET_STRING, ActionUnderThreshold.getLogicalName());\n GXCommon.setData(data, DataType.UINT16, ActionUnderThreshold.getScriptSelector());\n } catch (Exception ex) {\n throw new RuntimeException(ex.getMessage());\n }\n return data;\n }\n throw new IllegalArgumentException(\"String_Node_Str\");\n}\n"
|
"public boolean addNodeGroups(ClusterCreate clusterSpec, NodeGroupCreate[] nodeGroupsAdd, List<BaseNode> vNodes) {\n boolean success = false;\n List<NodeGroupCreate> newNodeGroups = new ArrayList<NodeGroupCreate>();\n if (clusterSpec != null && clusterSpec.getNodeGroups() != null) {\n for (NodeGroupCreate ng : clusterSpec.getNodeGroups()) {\n newNodeGroups.add(ng);\n }\n }\n if (nodeGroupsAdd != null) {\n for (NodeGroupCreate ng : nodeGroupsAdd) {\n newNodeGroups.add(ng);\n }\n }\n if (clusterSpec != null) {\n clusterSpec.setNodeGroups(newNodeGroups.toArray(new NodeGroupCreate[newNodeGroups.size()]));\n }\n if (null != createVcFolders(clusterSpec, true)) {\n if (null != createVcResourcePools(vNodes, true)) {\n success = true;\n }\n }\n return success;\n}\n"
|
"public void register() {\n try {\n memberRegistration.register(newMember);\n facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"String_Node_Str\", \"String_Node_Str\"));\n initNewMember();\n } catch (Exception e) {\n String errorMessage = getRootErrorMessage(e);\n facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, errorMessage, \"String_Node_Str\"));\n }\n}\n"
|
"public void send() {\n try {\n connection = getConnection();\n int response = connection.getResponseCode();\n if (response == HttpConnection.HTTP_UNAUTHORIZED) {\n String challenge = getChallenge(connection);\n if (this.issueChallenge(connection, challenge)) {\n connection.close();\n connection = getConnection();\n handleResponse(connection);\n } else {\n handleResponse(connection);\n }\n } else {\n handleResponse(connection);\n }\n } catch (IOException e) {\n e.printStackTrace();\n this.setStatus(TransportMessageStatus.FAILED);\n this.setFailureReason(WrappedException.printException(e));\n }\n}\n"
|
"protected Data replaceInternal(final Data key, final Data value) {\n ReplaceOperation operation = new ReplaceOperation(name, key, value);\n final Data result = (Data) invokeOperation(key, operation);\n invalidateNearCache(key);\n return result;\n}\n"
|
"private void _arpWindows() {\n if (_ipMap.size() == 0) {\n System.err.println(\"String_Node_Str\" + _pingWindowsCommand + \"String_Node_Str\");\n }\n try {\n Process process = Runtime.getRuntime().exec(_arpCommand);\n BufferedReader stdOut = null;\n try {\n stdOut = new BufferedReader(new InputStreamReader(process.getInputStream(), \"String_Node_Str\"));\n String line;\n int index;\n JSONObject object;\n while ((line = stdOut.readLine()) != null) {\n for (Entry<String, JSONObject> entry : _ipMap.entrySet()) {\n object = entry.getValue();\n index = line.indexOf(object.getString(\"String_Node_Str\"));\n if (index != -1) {\n if (index != 2) {\n object.put(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n object.put(\"String_Node_Str\", line.substring(index + 22, index + 39));\n }\n _ipMap.put(key, object);\n }\n }\n }\n } finally {\n if (stdOut != null) {\n stdOut.close();\n }\n }\n } catch (IOException e) {\n System.err.println(\"String_Node_Str\" + _arpCommand);\n } catch (JSONException e2) {\n System.err.println(\"String_Node_Str\");\n }\n}\n"
|
"public static ChannelID getTheBamon() throws IllegalState {\n ChannelID res = getInstance().THE_BAMON;\n if (res == null) {\n throw new IllegalState(\"String_Node_Str\" + \"String_Node_Str\" + getInstance().useReplica + \"String_Node_Str\");\n }\n return res;\n}\n"
|
"private static void executeDeleteSubDocuments(DSLContext dsl, Set<SubDocTable> tables, Collection<Integer> dids) {\n ConnectionProvider connectionProvider = dsl.configuration().connectionProvider();\n Connection connection = connectionProvider.acquire();\n try {\n for (SubDocTable table : tables) {\n delete(connection, table.getSchema(), table, dids);\n }\n } catch (SQLException ex) {\n throw new RuntimeException(ex);\n } finally {\n connectionProvider.release(connection);\n }\n}\n"
|
"protected boolean upgradeTable(HTableDescriptor tableDescriptor) {\n HColumnDescriptor columnDescriptor = tableDescriptor.getFamily(DATA_COLUMN_FAMILY);\n boolean needUpgrade = false;\n if (columnDescriptor.getMaxVersions() < Integer.MAX_VALUE) {\n columnDescriptor.setMaxVersions(Integer.MAX_VALUE);\n needUpgrade = true;\n }\n if (tableUtil.getBloomFilter(columnDescriptor) != HBaseTableUtil.BloomType.ROW) {\n tableUtil.setBloomFilter(columnDescriptor, HBaseTableUtil.BloomType.ROW);\n needUpgrade = true;\n }\n if (spec.getProperty(TxConstants.PROPERTY_TTL) == null && columnDescriptor.getValue(TxConstants.PROPERTY_TTL) != null) {\n columnDescriptor.remove(TxConstants.PROPERTY_TTL.getBytes());\n needUpgrade = true;\n } else if (spec.getProperty(TxConstants.PROPERTY_TTL) != null && !spec.getProperty(TxConstants.PROPERTY_TTL).equals(columnDescriptor.getValue(TxConstants.PROPERTY_TTL))) {\n columnDescriptor.setValue(TxConstants.PROPERTY_TTL, spec.getProperty(TxConstants.PROPERTY_TTL));\n needUpgrade = true;\n }\n return needUpgrade;\n}\n"
|
"public GenericSQLHandler replaceLimitOffset(String colName, String table, String limitRow, String offset, String limitRowPlusOffset) {\n this.replaceColumnTable(colName, table);\n sqlString = this.sqlString.replace(LIMIT_ROW, limitRow).replace(LIMIT_OFFSET, offset).replace(LIMIT_ROW_PLUS_OFFSET, limitRowPlusOffset);\n return this;\n}\n"
|
"public static List<ModuleInfo> getPage(int position) {\n int from = position * ITEMS_PER_PAGE;\n int to = Math.min((position + 1) * ITEMS_PER_PAGE, mModules.size());\n Log.d(TAG, \"String_Node_Str\" + Integer.toString(from) + \"String_Node_Str\" + Integer.toString(to) + \"String_Node_Str\" + Integer.toString(position));\n if (!(from < to)) {\n return null;\n }\n return mModules.subList(from, to);\n}\n"
|
"public void invalidNo() {\n verifySemanticException(QualifierType.NO, \"String_Node_Str\");\n}\n"
|
"public void init(String ownerId, String owningGroupId, int perms, ACLEntry[] acl, Map<String, Object> rootDirDefSp, AtomicDBUpdate update) throws DatabaseException {\n try {\n int time = (int) (TimeSync.getGlobalTime() / 1000);\n createDir(1, 0, volumeName, time, time, time, ownerId, owningGroupId, perms, 0, update);\n setLastFileId(1, update);\n if (rootDirDefSp != null)\n setDefaultStripingPolicy(1, Converter.mapToStripingPolicy(this, rootDirDefSp), update);\n if (acl != null)\n for (ACLEntry entry : acl) setACLEntry(1L, entry.getEntity(), entry.getRights(), update);\n } catch (UserException exc) {\n throw new DatabaseException(exc);\n }\n}\n"
|
"private static void checkTimeValue(int hour, int minute) {\n if (hour < 0 || hour > 23) {\n throw new IllegalArgumentException(\"String_Node_Str\" + hour);\n }\n if (minute < 0 || minute > 60) {\n throw new IllegalArgumentException(\"String_Node_Str\" + minute);\n }\n}\n"
|
"public ICustomerDataset getCustomerDataset() {\n Map<IndicatorEnum, Double> map = new HashMap<IndicatorEnum, Double>();\n CustomerDefaultCategoryDataset customerdataset = new CustomerDefaultCategoryDataset();\n for (IndicatorUnit unit : units) {\n if (Java2SqlType.isNumbericInSQL(sqltype)) {\n String value = unit.getValue() == null ? \"String_Node_Str\" : unit.getValue().toString();\n try {\n map.put(unit.getType(), Double.parseDouble(value));\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }\n ChartDataEntity entity = new ChartDataEntity();\n entity.setIndicator(unit.getIndicator());\n entity.setLabel(unit.getType().getLabel());\n entity.setValue(String.valueOf(unit.getValue()));\n customerdataset.addDataEntity(entity);\n }\n if (isIntact()) {\n CustomerDefaultBAWDataset dataset = new CustomerDefaultBAWDataset();\n BoxAndWhiskerItem item = ChartDatasetUtils.createBoxAndWhiskerItem(map.get(IndicatorEnum.MeanIndicatorEnum), map.get(IndicatorEnum.MedianIndicatorEnum), map.get(IndicatorEnum.LowerQuartileIndicatorEnum), map.get(IndicatorEnum.UpperQuartileIndicatorEnum), map.get(IndicatorEnum.MinValueIndicatorEnum), map.get(IndicatorEnum.MaxValueIndicatorEnum), null);\n dataset.add(item, \"String_Node_Str\", \"String_Node_Str\");\n List zerolist = new ArrayList();\n dataset.add(zerolist, \"String_Node_Str\", \"String_Node_Str\");\n dataset.add(zerolist, \"String_Node_Str\", \"String_Node_Str\");\n dataset.add(zerolist, \"String_Node_Str\", \"String_Node_Str\");\n dataset.add(zerolist, \"String_Node_Str\", \"String_Node_Str\");\n dataset.add(zerolist, \"String_Node_Str\", \"String_Node_Str\");\n dataset.add(zerolist, \"String_Node_Str\", \"String_Node_Str\");\n dataset.addDataEntity(customerdataset.getDataEntities());\n return dataset;\n } else {\n map.remove(IndicatorEnum.RangeIndicatorEnum);\n map.remove(IndicatorEnum.IQRIndicatorEnum);\n for (IndicatorEnum indicatorEnum : map.keySet()) {\n customerdataset.addValue(map.get(indicatorEnum), \"String_Node_Str\", indicatorEnum.getLabel());\n }\n return customerdataset;\n }\n}\n"
|
"private boolean getCookieSupport() {\n boolean cookieSupport = false;\n try {\n if (sessionID.getCookieMode() != null) {\n cookieSupport = sessionID.getCookieMode().booleanValue();\n } else if (this.cookieMode != null) {\n cookieSupport = this.cookieMode.booleanValue();\n }\n } catch (Exception ex) {\n debug.error(\"String_Node_Str\", ex);\n cookieSupport = true;\n }\n if (DEBUG.messageEnabled()) {\n DEBUG.message(\"String_Node_Str\" + cookieSupport);\n }\n return cookieSupport;\n}\n"
|
"protected void mouseClickMove(int x, int y, int c, long d) {\n Slot slot = this.getSlot(x, y);\n ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();\n if (slot instanceof SlotFake && itemstack != null) {\n drag_click.add(slot);\n if (drag_click.size() > 1) {\n try {\n PacketInventoryAction p = new PacketInventoryAction(InventoryAction.PICKUP_OR_SETDOWN, slot.slotNumber, 0);\n NetworkHandler.instance.sendToServer(p);\n } catch (IOException e) {\n AELog.error(e);\n }\n }\n } else\n super.mouseClickMove(x, y, c, d);\n}\n"
|
"private void validateKeepStateOption(DeploymentContext context, DeployCommandParameters params, Application app) {\n if ((params.keepstate != null && params.keepstate) || app.getKeepState()) {\n if (!isDASTarget(context, params)) {\n params.keepstate = false;\n String warningMsg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\");\n ActionReport subReport = context.getActionReport().addSubActionsReport();\n subReport.setActionExitCode(ActionReport.ExitCode.WARNING);\n subReport.setMessage(warningMsg);\n context.getLogger().log(Level.WARNING, warningMsg);\n }\n }\n}\n"
|
"public static org.hl7.fhir.dstu2016may.model.Period convertPeriod(org.hl7.fhir.dstu3.model.Period src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Period tgt = new org.hl7.fhir.dstu2016may.model.Period();\n copyElement(src, tgt);\n tgt.setStart(src.getStart());\n tgt.setEnd(src.getEnd());\n return tgt;\n}\n"
|
"protected void changed(StringProperty property, String newValue) {\n if (currentRule == null)\n return;\n String cleanValue = newValue.trim();\n String existingValue = currentRule.getProperty(property);\n if (StringUtil.areSemanticEquals(existingValue, cleanValue))\n return;\n currentRule.setProperty(property, cleanValue);\n changeListener.changed(currentRule, property, cleanValue);\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.