content stringlengths 40 137k |
|---|
"public void eigenvalues() {\n double[][] mat1 = { { 3, 0, 0 }, { 1, 3, 1 }, { 2, -1, 1 } };\n ComplexNumber[] evs1 = SquareMatrixOps.eigenvalues(new Matrix(mat1));\n ComplexNumber[] exp1 = { new ComplexNumber(3, 0), new ComplexNumber(2, 0), new ComplexNumber(2, 0) };\n for (ComplexNumber ev : evs1) {\n System.out.println(\"String_Node_Str\");\n double[][] fuck = { { 0, 0, 0 }, { 1, 0, 1 }, { 2, -1, -2 } };\n System.out.println(\"String_Node_Str\" + SquareMatrixOps.determinant(new Matrix(fuck)));\n Matrix m = new Matrix(mat1);\n System.out.println(m.subtract(Pattern.diag(ev, m.rows())));\n System.out.println(SquareMatrixOps.determinant(m.subtract(Pattern.diag(ev, m.rows()))));\n assertTrue(SquareMatrixOps.determinant(m.subtract(Pattern.diag(ev, m.rows()))).isZero());\n }\n Vector[] vecs = SquareMatrixOps.eigenvectors(new Matrix(mat1), evs1);\n for (Vector v : vecs) {\n System.out.println(v);\n }\n double epsilon = ComplexNumber.getEpsilon();\n ComplexNumber.setEpsilon(1e-6);\n assertTrue(compareArrays(evs1, exp1));\n ComplexNumber.setEpsilon(epsilon);\n}\n"
|
"public static JSONObject fillOwner(Element e, JSONObject einfo) {\n JSONObject info = einfo;\n if (info == null) {\n info = new JSONObject();\n info.put(\"String_Node_Str\", getElementID(e));\n }\n if (e.getOwner() == null)\n info.put(\"String_Node_Str\", null);\n else\n info.put(\"String_Node_Str\", \"String_Node_Str\" + getElementID(e.getOwner()));\n return info;\n}\n"
|
"private void setUpComponent(Component comp, IRecordInternal record, Object compColor, Object fgColor, Object compFont, Object compBorder, int visibleRowIndex) {\n if (tabIndex < 0) {\n TabIndexHelper.setUpTabIndexAttributeModifier(comp, tabIndex);\n } else {\n if (elementTabIndexes.size() > 0) {\n Integer idx = elementTabIndexes.get(cellToElement.get(comp));\n if (idx == null) {\n TabIndexHelper.setUpTabIndexAttributeModifier(comp, ISupportWebTabSeq.SKIP);\n } else {\n TabIndexHelper.setUpTabIndexAttributeModifier(comp, tabIndex + 1 + visibleRowIndex * elementTabIndexes.size() + idx.intValue());\n }\n } else {\n TabIndexHelper.setUpTabIndexAttributeModifier(comp, tabIndex + 1);\n }\n }\n if (compColor != null) {\n setParentBGcolor(comp, compColor);\n }\n WebCellBasedView.this.applyStyleOnComponent(comp, compColor, fgColor, compFont, listItemBorder);\n if (scriptable.isReadOnly() && validationEnabled && comp instanceof IScriptableProvider && ((IScriptableProvider) comp).getScriptObject() instanceof HasRuntimeReadOnly) {\n ((HasRuntimeReadOnly) ((IScriptableProvider) comp).getScriptObject()).setReadOnly(true);\n }\n if (!isEnabled() && comp instanceof IComponent) {\n ((IComponent) comp).setComponentEnabled(false);\n }\n if (comp instanceof IDisplayRelatedData && record != null) {\n ((IDisplayRelatedData) comp).setRecord(record, true);\n }\n MarkupContainer parent = comp.getParent();\n if (parent instanceof CellContainer) {\n parent.setVisible(comp.isVisible());\n }\n if (compBorder != null) {\n IPersist elem = WebCellBasedView.this.cellToElement.get(comp);\n Object colId = WebCellBasedView.this.elementToColumnIdentifierComponent.get(elem);\n final int idx = WebCellBasedView.this.visibleColummIdentifierComponents.indexOf(colId);\n final int[] borderWidth = new int[] { 0, 0 };\n Border cb = ComponentFactoryHelper.createBorder((String) compBorder);\n if (cb != null) {\n int defaultLeftPadding;\n int defaultRightPadding;\n switch(elem.getTypeID()) {\n case IRepository.FIELDS:\n Insets fieldMargin = null;\n if (comp instanceof IFieldComponent) {\n fieldMargin = ((IFieldComponent) comp).getMargin();\n }\n defaultLeftPadding = fieldMargin != null ? fieldMargin.left : TemplateGenerator.DEFAULT_FIELD_PADDING.left;\n defaultRightPadding = fieldMargin != null ? fieldMargin.right : TemplateGenerator.DEFAULT_FIELD_PADDING.right;\n break;\n case IRepository.GRAPHICALCOMPONENTS:\n Insets gcMargin = null;\n if (elem instanceof GraphicalComponent) {\n gcMargin = ((GraphicalComponent) elem).getMargin();\n }\n defaultLeftPadding = gcMargin != null ? gcMargin.left : TemplateGenerator.DEFAULT_LABEL_PADDING.left;\n defaultRightPadding = gcMargin != null ? gcMargin.right : TemplateGenerator.DEFAULT_LABEL_PADDING.right;\n break;\n default:\n defaultLeftPadding = 0;\n defaultRightPadding = 0;\n }\n Insets borderInsets = ComponentFactoryHelper.getBorderInsetsForNoComponent(cb);\n borderWidth[0] = borderInsets.left + defaultLeftPadding;\n borderWidth[1] = borderInsets.right + defaultRightPadding;\n }\n }\n}\n"
|
"public void readMarshallable(WireIn wire) throws IllegalStateException {\n StringBuilder mountDesc = new StringBuilder();\n while (!wire.isEmpty()) {\n MountPoint mp = wire.readEventName(mountDesc).typedMarshallable();\n mounts.put(mountDesc.toString(), mp);\n }\n}\n"
|
"private final void render(IDeviceRenderer idr, Bounds bo, RadarSeries se, SeriesDefinition sd) throws ChartException {\n List<Series> rts = sd.getRunTimeSeries();\n int iThisSeriesIndex = rts.indexOf(se);\n if (iThisSeriesIndex == -1)\n iThisSeriesIndex = getSeriesIndex();\n int totalSeriesCnt = getSeriesCount();\n int currSeriesIdx = getSeriesIndex();\n final EList<Fill> elPalette = sd.getSeriesPalette().getEntries();\n final AbstractScriptHandler<?> sh = getRunTimeContext().getScriptHandler();\n dc = getDeferredCache();\n Bounds boCA = goFactory.copyOf(bo);\n double dh = boCA.getHeight() - (boCA.getHeight() * percentReduce);\n double dl = boCA.getLeft() + (boCA.getWidth() * percentReduce) / 2;\n double dt = boCA.getTop() + (boCA.getHeight() * percentReduce) / 2;\n double dw = boCA.getWidth() - (boCA.getWidth() * percentReduce);\n double centrePointX = Math.round(dl + dw / 2);\n double centrePointY = Math.round(dt + dh / 2);\n double mag = dh / 2;\n Location cntpt = LocationImpl.create(centrePointX, centrePointY);\n if (currSeriesIdx == 1) {\n if (BULLSEYE_SUBTYPE_LITERAL.equals(getModel().getSubType())) {\n renderOvalBackgrounds(idr, cntpt, se, mag);\n }\n }\n PolarCoordinate pc = new PolarCoordinate(cntpt, dpha.length, getSeriesCount() - 1, getSeriesIndex() - 1);\n final boolean bPaletteByCategory = isPaletteByCategory();\n Fill fPaletteEntry = null;\n if (!bPaletteByCategory) {\n fPaletteEntry = FillUtil.getPaletteFill(elPalette, iThisSeriesIndex);\n updateTranslucency(fPaletteEntry, se);\n }\n Location loAxis = LocationImpl.create(centrePointX, centrePointY);\n List<Location> loList = new LinkedList<Location>();\n for (int index = 0; index < dpha.length; index++) {\n DataPointHints dph = dpha[index];\n if (isNaN(dph.getOrthogonalValue())) {\n continue;\n }\n double currval = ((Number) dph.getOrthogonalValue()).doubleValue();\n if (currval < 0) {\n continue;\n }\n pc.computeLocation(loAxis, index, mag);\n Location lo = pc.createLocation(index, mag * (currval / getAxisMax()));\n loList.add(lo);\n if (bPaletteByCategory) {\n fPaletteEntry = FillUtil.getPaletteFill(elPalette, index);\n updateTranslucency(fPaletteEntry, se);\n }\n LineAttributes llia = se.getLineAttributes();\n if (se.isPaletteLineColor() && index == 0) {\n llia.setColor(goFactory.copyOf(FillUtil.getColor(fPaletteEntry)));\n }\n Marker m = se.getMarker();\n if (m != null) {\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_DRAW_DATA_POINT, dph, fPaletteEntry, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT, dph);\n renderMarker(se, idr, m, lo, llia, fPaletteEntry, dph, m.getSize(), true, false);\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_DRAW_DATA_POINT, dph, fPaletteEntry, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT, dph);\n }\n drawSeriesLabel(idr, pc, dph, loAxis);\n }\n renderPolys(idr, loList.toArray(new Location[loList.size()]), se, sd);\n if (currSeriesIdx == (totalSeriesCnt - 1)) {\n if (se.getWebLineAttributes() != null && se.getWebLineAttributes().isVisible()) {\n renderAxes(idr, pc, mag);\n }\n RadarSeries rsd = getFirstSeries();\n if (rsd.isShowWebLabels()) {\n Location loLabel = LocationImpl.create(0, 0);\n for (int sc = 0; sc <= scaleCount; sc++) {\n final TextRenderEvent stre = ((EventObjectCache) idr).getEventObject(StructureSource.createSeries(se), TextRenderEvent.class);\n Label la = goFactory.copyOf(rsd.getLabel());\n la.setVisible(true);\n stre.setTextPosition(TextRenderEvent.RIGHT);\n double lblperc = ((double) sc / scaleCount) * 100;\n DecimalFormat decform = new DecimalFormat(\"String_Node_Str\");\n lblperc = Double.valueOf(decform.format(lblperc));\n la.getCaption().setValue(lblperc + \"String_Node_Str\");\n stre.setLabel(la);\n stre.setAction(TextRenderEvent.RENDER_TEXT_AT_LOCATION);\n double ycord = mag * sc / scaleCount;\n ycord = Math.round(centrePointY - ycord);\n double xcord = Math.round(centrePointX - 10);\n loLabel.set(xcord, ycord);\n stre.setLocation(loLabel);\n dc.addLabel(stre);\n }\n }\n }\n}\n"
|
"public void placeComponents(Composite parent) {\n Series series = seriesDefn.getDesignTimeSeries();\n linkSeries = new Link(parent, SWT.NONE);\n {\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n linkSeries.setLayoutData(gd);\n linkSeries.setText(\"String_Node_Str\" + seriesName + \"String_Node_Str\");\n linkSeries.addSelectionListener(this);\n }\n List<String> keys = null;\n if (getContext().getUIServiceProvider() != null) {\n keys = getContext().getUIServiceProvider().getRegisteredKeys();\n }\n txtTitle = new ExternalizedTextEditorComposite(parent, SWT.BORDER | SWT.SINGLE, -1, -1, keys, getContext().getUIServiceProvider(), series.getSeriesIdentifier().toString());\n {\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n txtTitle.setLayoutData(gd);\n txtTitle.addListener(this);\n }\n cmbTypes = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);\n {\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n cmbTypes.setLayoutData(gd);\n cmbTypes.addSelectionListener(this);\n if (iSeriesDefinitionIndex == 0) {\n cmbTypes.setEnabled(false);\n }\n }\n if (!series.getClass().isAssignableFrom(SeriesImpl.class)) {\n spnZOrder = new Spinner(parent, SWT.BORDER);\n {\n GridData gd = new GridData();\n gd.horizontalAlignment = SWT.CENTER;\n spnZOrder.setLayoutData(gd);\n spnZOrder.setMinimum(0);\n spnZOrder.setMaximum(10);\n if (getChart() instanceof ChartWithAxes && !(getContext().getChartType() instanceof BubbleChart)) {\n spnZOrder.setSelection(seriesDefn.getZOrder());\n spnZOrder.addSelectionListener(this);\n } else {\n spnZOrder.setEnabled(false);\n }\n }\n btnVisible = new Button(parent, SWT.CHECK);\n {\n GridData gd = new GridData();\n gd.horizontalAlignment = SWT.CENTER;\n btnVisible.setLayoutData(gd);\n btnVisible.setSelection(series.isVisible());\n btnVisible.addSelectionListener(this);\n }\n btnStack = new Button(parent, SWT.CHECK);\n {\n GridData gd = new GridData();\n gd.horizontalAlignment = SWT.CENTER;\n btnStack.setLayoutData(gd);\n btnStack.setEnabled(canStack && series.canBeStacked() && getChart().getDimension().getValue() != ChartDimension.THREE_DIMENSIONAL && !bStackedPercent);\n if (series.isStacked() && !canStack) {\n btnStack.setSelection(false);\n series.setStacked(false);\n } else {\n btnStack.setSelection(series.isStacked());\n }\n btnStack.addSelectionListener(this);\n }\n btnTranslucent = new Button(parent, SWT.CHECK);\n {\n GridData gd = new GridData();\n gd.horizontalAlignment = SWT.CENTER;\n btnTranslucent.setLayoutData(gd);\n btnTranslucent.setSelection(series.isTranslucent());\n btnTranslucent.addSelectionListener(this);\n }\n setTypeComboState();\n setStackedBoxState();\n } else {\n Label dummy = new Label(parent, SWT.CHECK);\n GridData gd = new GridData();\n gd.horizontalSpan = 4;\n dummy.setLayoutData(gd);\n }\n populateLists(seriesDefn.getDesignTimeSeries());\n}\n"
|
"private static MetricsContext getMetricCollector(Program program, String runId, MetricsCollectionService service) {\n if (service == null) {\n return null;\n }\n Map<String, String> tags = Maps.newHashMap();\n tags.put(Constants.Metrics.Tag.NAMESPACE, program.getNamespaceId());\n tags.put(Constants.Metrics.Tag.APP, program.getApplicationId());\n tags.put(ProgramTypeMetricTag.getTagName(program.getType()), program.getName());\n tags.put(Constants.Metrics.Tag.WORKFLOW_RUN_ID, runId);\n return service.getContext(tags);\n}\n"
|
"private static NetworkPartitionRef[] convertNetworkPartitionToASStubNetworkPartition(List<NetworkPartitionReferenceBean> networkPartitionReferenceBeans) {\n List<NetworkPartitionRef> networkPartitionRefList = new ArrayList<NetworkPartitionRef>();\n for (NetworkPartitionReferenceBean networkPartitionReferenceBean : networkPartitionReferenceBeans) {\n NetworkPartitionRef networkPartitionRef = new NetworkPartitionRef();\n networkPartitionRef.setId(networkPartitionReferenceBean.getId());\n networkPartitionRef.setPartitionAlgo(networkPartitionReferenceBean.getPartitionAlgo());\n networkPartitionRef.setPartitionRefs(convertToASStubPartitions(networkPartitionReferenceBean.getPartitions()));\n networkPartitionRefList.add(networkPartitionRef);\n }\n return networkPartitionRefList.toArray(new NetworkPartitionRef[networkPartitionRefList.size()]);\n}\n"
|
"private AttributeType actionImportHierarchy(final String path, final char separator) {\n try {\n return Hierarchy.create(path, separator);\n } catch (final IOException e) {\n main.showErrorDialog(Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"), e);\n }\n return null;\n}\n"
|
"private static void onPOBoxInfoRequest(EntityPlayer player) {\n MailAddress address = new MailAddress(player.getGameProfile());\n POBox pobox = PostRegistry.getOrCreatePOBox(player.worldObj, address);\n if (pobox == null) {\n return;\n }\n Proxies.net.sendToPlayer(new PacketPOBoxInfo(PacketId.POBOX_INFO, pobox.getPOBoxInfo()), player);\n}\n"
|
"public void autoUnbondWhenEntering(BleDeviceState... states) {\n autoUnbond_onStateEnter = autoUnbond_onStateEnter != null ? autoUnbond_onStateEnter : 0x0;\n for (int i = 0; i < states.length; i++) {\n autoUnbond_stateEnter |= states[i].bit();\n }\n}\n"
|
"public Operation getBackupOperation() {\n return new TxnPrepareBackupOperation(name, itemId, pollOperation, transactionId);\n}\n"
|
"public void run() {\n File[] tmp = null;\n try {\n tmp = _getOmcBinaryPaths();\n } catch (ConnectException e) {\n _omcLogger.getSever(\"String_Node_Str\");\n _couldNotStartOMC = true;\n hasInitialized = false;\n return;\n }\n File omcBinary = tmp[0];\n final File workingDirectory = tmp[1];\n Process proc = null;\n String[] command = { omcBinary.getAbsolutePath(), \"String_Node_Str\" + _corbaSession, \"String_Node_Str\" };\n ArrayList<String> both = new ArrayList<String>(command.length);\n Collections.addAll(both, command);\n String[] cmd = new String[both.size()];\n int nonNull = 0;\n for (int i = 0; i < both.size(); i++) {\n String str = both.get(i);\n if (str != null) {\n cmd[nonNull] = str;\n nonNull++;\n }\n }\n StringBuffer bufferCMD = new StringBuffer();\n for (int i = 0; i < nonNull; i++) {\n bufferCMD.append(cmd[i] + \"String_Node_Str\");\n }\n String fullCMD = bufferCMD.toString();\n String loggerInfo = \"String_Node_Str\" + fullCMD;\n _omcLoggerInstance.getInfo(loggerInfo);\n loggerInfo = \"String_Node_Str\" + workingDirectory.getAbsolutePath();\n _omcLoggerInstance.getInfo(loggerInfo);\n try {\n if (System.getenv(\"String_Node_Str\") == null) {\n Map<String, String> environmentalVariablesMap = System.getenv();\n Set<Entry<String, String>> entrySet = environmentalVariablesMap.entrySet();\n Collection<String> lst = new ArrayList<String>();\n String x = \"String_Node_Str\" + omcBinary.getParentFile().getParentFile().getAbsolutePath();\n lst.add(x);\n if (System.getenv(\"String_Node_Str\") == null) {\n String y = \"String_Node_Str\" + omcBinary.getParentFile().getParentFile().getAbsolutePath() + \"String_Node_Str\";\n lst.add(y);\n }\n Iterator<Entry<String, String>> i = entrySet.iterator();\n while (i.hasNext()) {\n Entry<String, String> z = i.next();\n lst.add(z.getKey() + \"String_Node_Str\" + z.getValue());\n }\n environmentalVariables = lst.toArray(new String[lst.size()]);\n }\n proc = Runtime.getRuntime().exec(cmd, environmentalVariables, workingDirectory);\n workDir = workingDirectory;\n } catch (IOException e) {\n loggerInfo = \"String_Node_Str\" + fullCMD;\n _omcLoggerInstance.getInfo(loggerInfo);\n _couldNotStartOMC = true;\n hasInitialized = false;\n return;\n }\n loggerInfo = \"String_Node_Str\";\n _omcLoggerInstance.getInfo(loggerInfo);\n loggerInfo = \"String_Node_Str\";\n _omcLoggerInstance.getInfo(loggerInfo);\n loggerInfo = \"String_Node_Str\";\n _omcLoggerInstance.getInfo(loggerInfo);\n try {\n proc.waitFor();\n } catch (InterruptedException e) {\n String loggerSever = \"String_Node_Str\" + e.getMessage() + (proc == null ? \"String_Node_Str\" : \"String_Node_Str\" + proc.exitValue());\n _omcLoggerInstance.getSever(loggerSever);\n hasInitialized = false;\n return;\n }\n if (proc != null) {\n if (_omcLoggerInstance != null) {\n loggerInfo = \"String_Node_Str\" + proc.exitValue();\n _omcLoggerInstance.getInfo(loggerInfo);\n } else {\n new Exception(\"String_Node_Str\" + proc.exitValue());\n }\n }\n hasInitialized = false;\n}\n"
|
"public double evaluateDouble(Evaluator evaluator) {\n List memberList = evaluateCurrentList(listCalc, evaluator);\n return (Double) avg(evaluator.push(false), memberList, calc);\n}\n"
|
"private void putChar(char c, boolean doshowcursor) {\n Dimension size;\n int rows = getRows();\n int columns = getColumns();\n int tm = getTopMargin();\n int bm = getBottomMargin();\n byte[] msg;\n if (debug > 4)\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + ((int) c) + \"String_Node_Str\" + R + \"String_Node_Str\" + C + \"String_Node_Str\" + columns + \"String_Node_Str\" + rows);\n markLine(R, 1);\n if (c > 255) {\n if (debug > 0)\n System.out.println(\"String_Node_Str\" + (int) c);\n }\n switch(term_state) {\n case TSTATE_DATA:\n if (!useibmcharset) {\n boolean doneflag = true;\n switch(c) {\n case OSC:\n osc = \"String_Node_Str\";\n term_state = TSTATE_OSC;\n break;\n case RI:\n if (R > tm)\n R--;\n else\n insertLine(R, 1, SCROLL_DOWN);\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case IND:\n if (R == tm - 1 || R == bm || R == rows - 1)\n insertLine(R, 1, SCROLL_UP);\n else\n R++;\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + R + \"String_Node_Str\");\n break;\n case NEL:\n if (R == tm - 1 || R == bm || R == rows - 1)\n insertLine(R, 1, SCROLL_UP);\n else\n R++;\n C = 0;\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + R + \"String_Node_Str\");\n break;\n case HTS:\n Tabs[C] = 1;\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case DCS:\n dcs = \"String_Node_Str\";\n term_state = TSTATE_DCS;\n break;\n default:\n doneflag = false;\n break;\n }\n if (doneflag)\n break;\n }\n switch(c) {\n case CSI:\n term_state = TSTATE_DCEQ;\n break;\n case ESC:\n term_state = TSTATE_ESC;\n lastwaslf = 0;\n break;\n case 12:\n System.out.println(\"String_Node_Str\");\n C = R = 0;\n break;\n case '\\b':\n C--;\n if (C < 0)\n C = 0;\n lastwaslf = 0;\n break;\n case '\\t':\n do {\n C++;\n } while (C < columns && (Tabs[C] == 0));\n lastwaslf = 0;\n break;\n case '\\r':\n C = 0;\n break;\n case '\\n':\n if (debug > 3)\n System.out.println(\"String_Node_Str\" + R + \"String_Node_Str\" + bm + \"String_Node_Str\" + tm + \"String_Node_Str\" + rows);\n if (!vms) {\n if (lastwaslf != 0 && lastwaslf != c)\n break;\n lastwaslf = c;\n }\n if (R == bm || R >= rows - 1)\n insertLine(R, 1);\n else\n R++;\n break;\n case 7:\n beep();\n break;\n case '\\016':\n gl = 1;\n break;\n case '\\017':\n gl = 0;\n break;\n default:\n lastwaslf = 0;\n if (c < 32) {\n if (c != 0)\n if (debug > 0)\n System.out.println(\"String_Node_Str\" + ((int) c));\n break;\n }\n if (C >= columns) {\n if (R < rows - 1)\n R++;\n else\n insertLine(R, SCROLL_UP);\n C = 0;\n }\n if (gx[gl] == '0') {\n if (c >= '\\u005f' && c <= '\\u007e') {\n if (debug > 3)\n System.out.print(\"String_Node_Str\" + c + \"String_Node_Str\" + ((short) c - 0x5f) + \"String_Node_Str\");\n c = DECSPECIAL[(short) c - 0x5f];\n if (debug > 3)\n System.out.println(c + \"String_Node_Str\" + (int) c + \"String_Node_Str\");\n }\n }\n if (debug > 4)\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + C + \"String_Node_Str\" + R);\n if (useibmcharset)\n c = map_cp850_unicode(c);\n if (debug > 4)\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + C + \"String_Node_Str\" + R);\n if (insertmode == 1) {\n insertChar(C, R, c, attributes);\n } else {\n putChar(C, R, c, attributes);\n }\n C++;\n break;\n }\n break;\n case TSTATE_OSC:\n if ((c < 0x20) && (c != ESC)) {\n handle_osc(osc);\n term_state = TSTATE_DATA;\n break;\n }\n if (c == '\\\\' && osc.charAt(osc.length() - 1) == ESC) {\n handle_osc(osc);\n term_state = TSTATE_DATA;\n break;\n }\n osc = osc + c;\n break;\n case TSTATE_ESC:\n term_state = TSTATE_DATA;\n switch(c) {\n case '#':\n term_state = TSTATE_ESCSQUARE;\n break;\n case 'c':\n gx[0] = 'B';\n gx[1] = '0';\n gx[2] = 'A';\n gx[3] = '<';\n gl = 0;\n gr = 1;\n int nw = getColumns();\n if (nw < 132)\n nw = 132;\n Tabs = new byte[nw];\n for (int i = 0; i < nw; i += 8) {\n Tabs[i] = 1;\n }\n break;\n case '[':\n DCEvar = 0;\n DCEvars[0] = 0;\n DCEvars[1] = 0;\n DCEvars[2] = 0;\n DCEvars[3] = 0;\n term_state = TSTATE_CSI;\n break;\n case ']':\n osc = \"String_Node_Str\";\n term_state = TSTATE_OSC;\n break;\n case 'P':\n dcs = \"String_Node_Str\";\n term_state = TSTATE_DCS;\n break;\n case 'E':\n if (R == tm - 1 || R == bm || R == rows - 1)\n insertLine(R, 1, SCROLL_UP);\n else\n R++;\n C = 0;\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + R + \"String_Node_Str\");\n break;\n case 'D':\n if (R == tm - 1 || R == bm || R == rows - 1)\n insertLine(R, 1, SCROLL_UP);\n else\n R++;\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + R + \"String_Node_Str\");\n break;\n case 'M':\n if ((R >= tm) && (R <= bm))\n insertLine(R, 1, SCROLL_DOWN);\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case 'H':\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + C);\n if (C >= columns)\n C = columns - 1;\n Tabs[C] = 1;\n break;\n case '=':\n if (debug > 0)\n System.out.println(\"String_Node_Str\");\n break;\n case '>':\n if (debug > 0)\n System.out.println(\"String_Node_Str\");\n break;\n case '7':\n Sc = C;\n Sr = R;\n Sgl = gl;\n Sgr = gr;\n Sa = attributes;\n Sgx = new char[4];\n for (int i = 0; i < 4; i++) Sgx[i] = gx[i];\n Stm = getTopMargin();\n Sbm = getBottomMargin();\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case '8':\n C = Sc;\n R = Sr;\n gl = Sgl;\n gr = Sgr;\n for (int i = 0; i < 4; i++) gx[i] = Sgx[i];\n setTopMargin(Stm);\n setBottomMargin(Sbm);\n attributes = Sa;\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case '(':\n term_state = TSTATE_SETG0;\n break;\n case ')':\n term_state = TSTATE_SETG1;\n break;\n case '*':\n term_state = TSTATE_SETG2;\n break;\n case '+':\n term_state = TSTATE_SETG3;\n break;\n case '~':\n gr = 1;\n break;\n case 'n':\n gl = 2;\n break;\n case '}':\n gr = 2;\n break;\n case 'o':\n gl = 3;\n break;\n case '|':\n gr = 3;\n break;\n default:\n System.out.println(\"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n break;\n }\n break;\n case TSTATE_SETG0:\n if (c != '0' && c != 'A' && c != 'B')\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n else {\n if (debug > 2)\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n gx[0] = c;\n }\n term_state = TSTATE_DATA;\n break;\n case TSTATE_SETG1:\n if (c != '0' && c != 'A' && c != 'B') {\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n } else {\n if (debug > 2)\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n gx[1] = c;\n }\n term_state = TSTATE_DATA;\n break;\n case TSTATE_SETG2:\n if (c != '0' && c != 'A' && c != 'B')\n System.out.println(\"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n else {\n if (debug > 2)\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n gx[2] = c;\n }\n term_state = TSTATE_DATA;\n break;\n case TSTATE_SETG3:\n if (c != '0' && c != 'A' && c != 'B')\n System.out.println(\"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n else {\n if (debug > 2)\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n gx[3] = c;\n }\n term_state = TSTATE_DATA;\n break;\n case TSTATE_ESCSQUARE:\n switch(c) {\n case '8':\n for (int i = 0; i < columns; i++) for (int j = 0; j < rows; j++) putChar(i, j, 'E', 0);\n break;\n default:\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\");\n break;\n }\n term_state = TSTATE_DATA;\n break;\n case TSTATE_DCS:\n if (c == '\\\\' && dcs.charAt(dcs.length() - 1) == ESC) {\n handle_dcs(dcs);\n term_state = TSTATE_DATA;\n break;\n }\n dcs = dcs + c;\n break;\n case TSTATE_DCEQ:\n term_state = TSTATE_DATA;\n switch(c) {\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n DCEvars[DCEvar] = DCEvars[DCEvar] * 10 + ((int) c) - 48;\n term_state = TSTATE_DCEQ;\n break;\n case ';':\n DCEvar++;\n DCEvars[DCEvar] = 0;\n term_state = TSTATE_DCEQ;\n break;\n case 's':\n if (true || debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case 'r':\n if (true || debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n for (i = 0; i <= DCEvar; i++) {\n switch(DCEvars[i]) {\n case 3:\n size = getSize();\n setScreenSize(80, rows);\n break;\n case 4:\n break;\n case 5:\n break;\n case 6:\n moveoutsidemargins = true;\n break;\n case 12:\n break;\n case 9:\n case 1000:\n case 1001:\n case 1002:\n case 1003:\n mouserpt = DCEvars[i];\n break;\n default:\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n }\n }\n break;\n case 'h':\n if (debug > 0)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n for (i = 0; i <= DCEvar; i++) {\n switch(DCEvars[i]) {\n case 1:\n KeyUp[0] = \"String_Node_Str\";\n KeyDown[0] = \"String_Node_Str\";\n KeyRight[0] = \"String_Node_Str\";\n KeyLeft[0] = \"String_Node_Str\";\n break;\n case 3:\n size = getSize();\n setScreenSize(132, rows);\n break;\n case 6:\n moveoutsidemargins = false;\n break;\n case 25:\n showCursor(true);\n redraw();\n break;\n case 9:\n case 1000:\n case 1001:\n case 1002:\n case 1003:\n mouserpt = DCEvars[i];\n break;\n default:\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n }\n }\n break;\n case 'i':\n switch(DCEvars[0]) {\n case 1:\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case 4:\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case 5:\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n }\n break;\n case 'l':\n if (debug > 0)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n for (i = 0; i <= DCEvar; i++) {\n switch(DCEvars[i]) {\n case 1:\n KeyUp[0] = \"String_Node_Str\";\n KeyDown[0] = \"String_Node_Str\";\n KeyRight[0] = \"String_Node_Str\";\n KeyLeft[0] = \"String_Node_Str\";\n break;\n case 3:\n size = getSize();\n setScreenSize(80, rows);\n break;\n case 6:\n moveoutsidemargins = true;\n break;\n case 25:\n showCursor(false);\n redraw();\n break;\n case 9:\n case 1000:\n case 1001:\n case 1002:\n case 1003:\n mouserpt = 0;\n break;\n default:\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n }\n }\n break;\n case 'n':\n if (debug > 0)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n switch(DCEvars[0]) {\n case 15:\n write(((char) ESC) + \"String_Node_Str\", false);\n System.out.println(\"String_Node_Str\");\n break;\n default:\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n }\n break;\n default:\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\" + c + \"String_Node_Str\");\n break;\n }\n break;\n case TSTATE_CSI_EX:\n term_state = TSTATE_DATA;\n switch(c) {\n case ESC:\n term_state = TSTATE_ESC;\n break;\n default:\n System.out.println(\"String_Node_Str\" + (int) c);\n break;\n }\n break;\n case TSTATE_CSI_DOLLAR:\n term_state = TSTATE_DATA;\n switch(c) {\n case '}':\n System.out.println(\"String_Node_Str\" + DCEvars[0]);\n statusmode = DCEvars[0];\n break;\n case '~':\n System.out.println(\"String_Node_Str\" + DCEvars[0]);\n break;\n default:\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + DCEvars[0]);\n break;\n }\n break;\n case TSTATE_CSI:\n term_state = TSTATE_DATA;\n switch(c) {\n case '$':\n term_state = TSTATE_CSI_DOLLAR;\n break;\n case '!':\n term_state = TSTATE_CSI_EX;\n break;\n case '?':\n DCEvar = 0;\n DCEvars[0] = 0;\n term_state = TSTATE_DCEQ;\n break;\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n DCEvars[DCEvar] = DCEvars[DCEvar] * 10 + ((int) c) - 48;\n term_state = TSTATE_CSI;\n break;\n case ';':\n DCEvar++;\n DCEvars[DCEvar] = 0;\n term_state = TSTATE_CSI;\n break;\n case 'c':\n write(((char) ESC) + \"String_Node_Str\", false);\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case 'q':\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case 'g':\n switch(DCEvars[0]) {\n case 3:\n int nw = getColumns();\n Tabs = new byte[nw];\n break;\n case 0:\n Tabs[C] = 0;\n break;\n }\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case 'h':\n switch(DCEvars[0]) {\n case 4:\n insertmode = 1;\n break;\n case 20:\n System.out.println(\"String_Node_Str\");\n sendcrlf = true;\n break;\n default:\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n }\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case 'i':\n switch(DCEvars[0]) {\n case 0:\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case 4:\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case 5:\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n default:\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n }\n break;\n case 'l':\n switch(DCEvars[0]) {\n case 4:\n insertmode = 0;\n break;\n case 20:\n System.out.println(\"String_Node_Str\");\n sendcrlf = false;\n break;\n default:\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n }\n break;\n case 'A':\n {\n int limit;\n if (R > bm)\n limit = bm + 1;\n else if (R >= tm) {\n limit = tm;\n } else\n limit = 0;\n if (DCEvars[0] == 0)\n R--;\n else\n R -= DCEvars[0];\n if (R < limit)\n R = limit;\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n }\n case 'B':\n {\n int limit;\n if (R < tm)\n limit = tm - 1;\n else if (R <= bm) {\n limit = bm;\n } else\n limit = rows - 1;\n if (DCEvars[0] == 0)\n R++;\n else\n R += DCEvars[0];\n if (R > limit)\n R = limit;\n else {\n if (debug > 2)\n System.out.println(\"String_Node_Str\");\n }\n if (debug > 2)\n System.out.println(\"String_Node_Str\" + R);\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\" + C + \"String_Node_Str\");\n break;\n }\n case 'C':\n if (DCEvars[0] == 0)\n C++;\n else\n C += DCEvars[0];\n if (C > columns - 1)\n C = columns - 1;\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case 'd':\n R = DCEvars[0];\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case 'D':\n if (DCEvars[0] == 0)\n C--;\n else\n C -= DCEvars[0];\n if (C < 0)\n C = 0;\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case 'r':\n if (DCEvar > 0) {\n R = DCEvars[1] - 1;\n if (R < 0)\n R = rows - 1;\n else if (R >= rows) {\n R = rows - 1;\n }\n } else\n R = rows - 1;\n setBottomMargin(DCEvars[1] - 1);\n if (R >= DCEvars[0]) {\n R = DCEvars[0] - 1;\n if (R < 0)\n R = 0;\n }\n setTopMargin(DCEvars[0] - 1);\n _SetCursor(0, 0);\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\" + DCEvars[1] + \"String_Node_Str\");\n break;\n case 'G':\n C = DCEvars[0];\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case 'H':\n _SetCursor(DCEvars[0] - 1, DCEvars[1] - 1);\n if (debug > 2) {\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\" + DCEvars[1] + \"String_Node_Str\" + moveoutsidemargins);\n System.out.println(\"String_Node_Str\" + R + \"String_Node_Str\" + C);\n }\n break;\n case 'f':\n R = DCEvars[0] - 1;\n C = DCEvars[1] - 1;\n if (C < 0)\n C = 0;\n if (R < 0)\n R = 0;\n if (debug > 2)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\" + DCEvars[1] + \"String_Node_Str\");\n break;\n case 'L':\n if (DCEvars[0] == 0)\n insertLine(R, SCROLL_DOWN);\n else\n insertLine(R, DCEvars[0], SCROLL_DOWN);\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\" + R + \"String_Node_Str\");\n break;\n case 'M':\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\" + R);\n if (DCEvars[0] == 0)\n deleteLine(R);\n else\n for (int i = 0; i < DCEvars[0]; i++) deleteLine(R);\n break;\n case 'K':\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n switch(DCEvars[0]) {\n case 0:\n if (C < columns - 1)\n deleteArea(C, R, columns - C, 1);\n break;\n case 1:\n if (C > 0)\n deleteArea(0, R, C + 1, 1);\n break;\n case 2:\n deleteArea(0, R, columns, 1);\n break;\n }\n break;\n case 'J':\n switch(DCEvars[0]) {\n case 0:\n if (R < rows - 1)\n deleteArea(0, R + 1, columns, rows - R - 1);\n if (C < columns - 1)\n deleteArea(C, R, columns - C, 1);\n break;\n case 1:\n if (R > 0)\n deleteArea(0, 0, columns, R);\n if (C > 0)\n deleteArea(0, R, C + 1, 1);\n break;\n case 2:\n deleteArea(0, 0, columns, rows);\n break;\n }\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n case '@':\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n for (int i = 0; i < DCEvars[0]; i++) insertChar(C, R, ' ', attributes);\n break;\n case 'P':\n if (debug > 1)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\" + C + \"String_Node_Str\" + R);\n if (DCEvars[0] == 0)\n DCEvars[0] = 1;\n for (int i = 0; i < DCEvars[0]; i++) deleteChar(C, R);\n break;\n case 'n':\n switch(DCEvars[0]) {\n case 5:\n write(((char) ESC) + \"String_Node_Str\", false);\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n case 6:\n write(((char) ESC) + \"String_Node_Str\" + R + \"String_Node_Str\" + C + \"String_Node_Str\", false);\n if (debug > 1)\n System.out.println(\"String_Node_Str\");\n break;\n default:\n if (debug > 0)\n System.out.println(\"String_Node_Str\" + DCEvars[0] + \"String_Node_Str\");\n break;\n }\n break;\n case 's':\n Sc = C;\n Sr = R;\n Sa = attributes;\n if (debug > 3)\n System.out.println(\"String_Node_Str\");\n break;\n case 'u':\n C = Sc;\n R = Sr;\n attributes = Sa;\n if (debug > 3)\n System.out.println(\"String_Node_Str\");\n break;\n case 'm':\n if (debug > 3)\n System.out.print(\"String_Node_Str\");\n if (DCEvar == 0 && DCEvars[0] == 0)\n attributes = 0;\n for (i = 0; i <= DCEvar; i++) {\n switch(DCEvars[i]) {\n case 0:\n if (DCEvar > 0)\n attributes = 0;\n break;\n case 4:\n attributes |= UNDERLINE;\n break;\n case 1:\n attributes |= BOLD;\n break;\n case 7:\n attributes |= INVERT;\n break;\n case 5:\n break;\n case 25:\n break;\n case 27:\n attributes &= ~INVERT;\n break;\n case 24:\n attributes &= ~UNDERLINE;\n break;\n case 22:\n attributes &= ~BOLD;\n break;\n case 30:\n case 31:\n case 32:\n case 33:\n case 34:\n case 35:\n case 36:\n case 37:\n attributes &= ~(0xf << 3);\n attributes |= ((DCEvars[i] - 30) + 1) << 3;\n break;\n case 39:\n attributes &= ~(0xf << 3);\n break;\n case 40:\n case 41:\n case 42:\n case 43:\n case 44:\n case 45:\n case 46:\n case 47:\n attributes &= ~(0xf << 7);\n attributes |= ((DCEvars[i] - 40) + 1) << 7;\n break;\n case 49:\n attributes &= ~(0xf << 7);\n break;\n default:\n System.out.println(\"String_Node_Str\" + DCEvars[i] + \"String_Node_Str\");\n break;\n }\n if (debug > 3)\n System.out.print(\"String_Node_Str\" + DCEvars[i] + \"String_Node_Str\");\n }\n if (debug > 3)\n System.out.print(\"String_Node_Str\" + attributes + \"String_Node_Str\");\n break;\n default:\n System.out.println(\"String_Node_Str\" + c + \"String_Node_Str\" + ((int) c) + \"String_Node_Str\");\n break;\n }\n break;\n default:\n term_state = TSTATE_DATA;\n break;\n }\n if (C > columns)\n C = columns;\n if (R > rows)\n R = rows;\n if (C < 0)\n C = 0;\n if (R < 0)\n R = 0;\n if (doshowcursor)\n setCursorPosition(C, R);\n markLine(R, 1);\n}\n"
|
"public void shouldDetectDifferentNullStrategy() {\n Mapper<Source, Destination> mapper = Mapping.from(Source.class).to(Destination.class).replaceCollection(Source::getIds, Destination::getIds).with(idBuilder()).mapper();\n assertThatThrownBy(() -> {\n AssertMapping.of(mapper).expectReplaceCollection(Source::getIds, Destination::getIds).andSkipWhenNull().ensure();\n }).isInstanceOf(AssertionError.class).hasMessageContaining(DIFFERENT_NULL_STRATEGY).hasNoCause();\n}\n"
|
"private Class load(CharSequence name) {\n int hash = (int) (Compare.calcLongHashCode(name) & 0x7ffffff) % CACHE_SIZE;\n if (classWeakReference == null)\n classWeakReference = new WeakReference[CACHE_SIZE];\n WeakReference<Class> ref = classWeakReference[hash];\n if (ref != null) {\n Class clazz = ref.get();\n if (clazz != null && StringInterner.isEqual(clazz.getName(), name))\n return clazz;\n }\n try {\n Class<?> clazz = SC_SHORT_NAME.get(name.toString());\n if (clazz != null)\n return clazz;\n clazz = classLoader.loadClass(name.toString());\n classWeakReference[hash] = new WeakReference<Class>(clazz);\n return clazz;\n } catch (ClassNotFoundException e) {\n throw new IllegalArgumentException(e);\n }\n}\n"
|
"private Date parseDate(String dateString) {\n if (dateString.length() > 1) {\n Date date = new Date();\n String[] parts = dateString.split(\"String_Node_Str\");\n String[] yyyymmdd = parts[0].split(\"String_Node_Str\");\n String[] hhmmss = parts[1].split(\"String_Node_Str\");\n date.setYear(new Integer(yyyymmdd[0]) - 1900);\n date.setMonth(new Integer(yyyymmdd[1]) - 1);\n date.setDate(new Integer(yyyymmdd[2]));\n date.setHours(new Integer(hhmmss[0]));\n date.setMinutes(new Integer(hhmmss[1]));\n date.setSeconds(new Integer(hhmmss[2]));\n return date;\n } else\n return null;\n}\n"
|
"private static PkgLookupResult checkIfPackage(Environment env, TraversalRequest traversal, FileInfo rootInfo) throws MissingDepException, IOException, InterruptedException {\n Preconditions.checkArgument(rootInfo.type.exists() && !rootInfo.type.isFile(), \"String_Node_Str\", traversal, rootInfo);\n PackageLookupValue pkgLookup = (PackageLookupValue) getDependentSkyValue(env, PackageLookupValue.key(traversal.root.asRootedPath().getRootRelativePath()));\n if (pkgLookup.packageExists()) {\n if (traversal.isGenerated) {\n return PkgLookupResult.conflict(traversal, rootInfo);\n } else {\n Root pkgRoot = pkgLookup.getRoot();\n if (!pkgRoot.equals(traversal.path.getRoot())) {\n traversal = traversal.forChangedRootPath(pkgRoot);\n rootInfo = lookUpFileInfo(env, traversal);\n Verify.verify(rootInfo.type.exists(), \"String_Node_Str\", traversal, rootInfo);\n }\n return PkgLookupResult.pkg(traversal, rootInfo);\n }\n } else {\n return PkgLookupResult.directory(traversal, rootInfo);\n }\n}\n"
|
"Map<String, Set<String>> buildTree(List<PBDBItem> itemList) {\n if (itemList == null)\n throw new RuntimeException(\"String_Node_Str\");\n Map<String, String> result = new HashMap<String, String>();\n for (PBDBItem item : itemList) {\n if (item.isValid()) {\n String name = item.getName();\n String parentName = item.getParentName();\n if (result.containsKey(parentName)) {\n Set<String> children = result.get(parentName);\n children.add(name);\n } else {\n Set<String> children = new HashSet<String>();\n children.add(name);\n result.put(parentName, children);\n }\n }\n }\n return result;\n}\n"
|
"public boolean setVersion(String version) {\n if (version == null) {\n return false;\n }\n File file = getFile(version);\n if (file == null || !file.isFile()) {\n if (\"String_Node_Str\".equals(databaseVersion)) {\n return setDefaultVersion();\n } else {\n return false;\n }\n }\n if (database != null) {\n if (databaseVersion.equals(version)) {\n return true;\n }\n Log.d(TAG, \"String_Node_Str\" + database.getPath() + \"String_Node_Str\");\n database.close();\n }\n databaseVersion = version;\n try {\n database = SQLiteDatabase.openDatabase(file.getAbsolutePath(), null, SQLiteDatabase.OPEN_READONLY | SQLiteDatabase.NO_LOCALIZED_COLLATORS);\n Log.d(TAG, \"String_Node_Str\" + database.getPath() + \"String_Node_Str\");\n setMetadata(database, databaseVersion);\n return true;\n } catch (Exception e) {\n try {\n file.delete();\n } catch (Exception f) {\n }\n checkVersions();\n return setDefaultVersion();\n }\n}\n"
|
"public Mono<ListOrganizationsResponse> retrieveOrgId(String orgName) {\n if (\"String_Node_Str\".equals(orgName)) {\n OrganizationResource or = OrganizationResource.builder().entity(OrganizationEntity.builder().name(orgName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(ORG_UUID).build()).build();\n List<OrganizationResource> list = new LinkedList<>();\n list.add(or);\n ListOrganizationsResponse resp = ListOrganizationsResponse.builder().addAllResources(list).build();\n return Mono.just(resp).delayElement(this.getSleepRandomDuration());\n }\n log.error(\"String_Node_Str\");\n return null;\n}\n"
|
"public void shutdown() {\n forge.getLockManager().performLocked(LockMode.READ, new Callable<Void>() {\n public Void call() throws Exception {\n logger.info(\"String_Node_Str\" + addon.getId() + \"String_Node_Str\");\n long start = System.currentTimeMillis();\n ClassLoaders.executeIn(addon.getClassLoader(), shutdownCallable);\n logger.info(\"String_Node_Str\" + addon.getId() + \"String_Node_Str\" + (System.currentTimeMillis() - start) + \"String_Node_Str\" + \"String_Node_Str\");\n return null;\n }\n });\n } catch (RuntimeException e) {\n logger.log(Level.SEVERE, \"String_Node_Str\" + addon.getId(), e);\n throw e;\n }\n}\n"
|
"private Tableau _createTableau() throws IllegalActionException {\n Effigy effigy = GTEntityUtils.findToplevelEffigy(this);\n TextEffigy textEffigy;\n try {\n textEffigy = TextEffigy.newTextEffigy(effigy, \"String_Node_Str\");\n } catch (Exception e) {\n throw new IllegalActionException(this, e, \"String_Node_Str\" + \"String_Node_Str\");\n }\n Tableau tableau;\n try {\n tableau = new Tableau(textEffigy, \"String_Node_Str\");\n } catch (NameDuplicationException e) {\n throw new IllegalActionException(this, e, \"String_Node_Str\" + \"String_Node_Str\");\n }\n TextEditor frame = new TextEditor(tableau.getTitle(), textEffigy.getDocument());\n frame.text.setColumns(((IntToken) columnsDisplayed.getToken()).intValue());\n frame.text.setRows(((IntToken) rowsDisplayed.getToken()).intValue());\n tableau.setFrame(frame);\n frame.setTableau(tableau);\n setToken(new ObjectToken(tableau, Tableau.class));\n frame.pack();\n frame.setVisible(true);\n return tableau;\n}\n"
|
"protected final void executeLoop() {\n long lastSyncWriteTimestamp = System.currentTimeMillis();\n long lastSyncReadTimestamp = lastSyncWriteTimestamp;\n while (true) {\n if (this.shouldStopHard())\n break;\n if (this.shouldStopSoft()) {\n if (this.cancel)\n break;\n else\n this.callbacks.handleLogEvent(Level.WARN, null, \"String_Node_Str\");\n }\n synchronized (this.monitor) {\n final long currentTimestamp = System.currentTimeMillis();\n if (this.syncWriteDatastore != null) {\n if ((currentTimestamp - lastSyncWriteTimestamp) > this.syncWriteTimeout) {\n this.callbacks.handleLogEvent(Level.DEBUG, null, \"String_Node_Str\");\n try {\n if (!this.syncWriteDatastore.syncWrite())\n this.callbacks.handleLogEvent(Level.ERROR, null, \"String_Node_Str\");\n } catch (final Error exception) {\n this.callbacks.handleException(exception, \"String_Node_Str\");\n }\n lastSyncWriteTimestamp = currentTimestamp;\n }\n }\n if (this.syncReadDatastore != null) {\n if ((currentTimestamp - lastSyncReadTimestamp) > this.syncReadTimeout) {\n this.callbacks.handleLogEvent(Level.DEBUG, null, \"String_Node_Str\");\n try {\n if (!this.syncReadDatastore.syncRead())\n this.callbacks.handleLogEvent(Level.ERROR, null, \"String_Node_Str\");\n } catch (final Error exception) {\n this.callbacks.handleException(exception, \"String_Node_Str\");\n }\n lastSyncReadTimestamp = currentTimestamp;\n }\n }\n }\n try {\n Thread.sleep(this.waitTimeout);\n } catch (final InterruptedException exception) {\n }\n }\n}\n"
|
"public int select0(int count) {\n if (count > size)\n return -1;\n if (count <= 3) {\n if (count == 1)\n return node1pos;\n else if (count == 2)\n return node2pos;\n else if (count == 3)\n return node3pos;\n else\n return -1;\n }\n int idx = count / CACHE_WIDTH;\n int start = indexCache0[idx];\n if (count % CACHE_WIDTH == 0)\n return start;\n start /= CACHE_WIDTH;\n int end = 0;\n if (indexCache0.length > (idx)) {\n int c = (indexCache0[idx]) / CACHE_WIDTH;\n if (c != 0)\n end = c + 1;\n }\n if (end == 0) {\n int vectorSize = size / 8 + 1;\n int blockSize = CACHE_WIDTH / 8;\n end = vectorSize / blockSize + (((vectorSize % blockSize) != 0) ? 1 : 0);\n if (end == 0) {\n end = size;\n }\n }\n int m = 0;\n int d = 0;\n while (start != end) {\n m = (start + end) / 2;\n d = count - countCache0[m];\n if (d < 0) {\n end = m;\n continue;\n } else if (d > 0) {\n if (start != m)\n start = m;\n else\n break;\n } else {\n break;\n }\n }\n if (d > 0) {\n count = d;\n } else {\n while (m >= 0 && count <= countCache0[m]) m--;\n if (m >= 0)\n count -= countCache0[m];\n }\n int n = size / 8 + 1;\n for (int i = (m + 1) * CACHE_WIDTH / 8; i < n; i++) {\n int bits = bytes[i] & 0xff;\n int c = BITCOUNTS0[bits];\n if (count <= c) {\n return i * 8 + BITPOS0[bits][count - 1];\n }\n count -= c;\n }\n return -1;\n}\n"
|
"private void runPrivoxyShellCmd() throws Exception {\n int privoxyProcId = TorServiceUtils.findProcessId(privoxyPath);\n StringBuilder log = null;\n int attempts = 0;\n while (privoxyProcId == -1 && attempts < MAX_START_TRIES) {\n log = new StringBuilder();\n String[] cmds = { PRIVOXY_INSTALL_PATH + \"String_Node_Str\" + PRIVOXY_COMMAND_LINE_ARGS };\n logNotice(cmds[0]);\n TorServiceUtils.doShellCommand(cmds, log, false, true);\n Thread.sleep(1000);\n privoxyProcId = TorServiceUtils.findProcessId(TorServiceConstants.PRIVOXY_INSTALL_PATH);\n if (privoxyProcId == -1) {\n logNotice(\"String_Node_Str\" + log);\n Thread.sleep(3000);\n attempts++;\n }\n logNotice(log.toString());\n }\n sendCallbackMessage(\"String_Node_Str\" + PORT_HTTP);\n Thread.sleep(100);\n logNotice(\"String_Node_Str\" + privoxyProcId);\n}\n"
|
"public FeatureVector getExpectedFeatureCounts(double[] params) {\n model.updateModelFromDoubles(params);\n FgModel feats = new FgModel(model);\n feats.zero();\n for (int i = 0; i < data.size(); i++) {\n FgExample ex = data.get(i);\n FgInferencer infLatPred = getInfLatPred(ex);\n FactorGraph fgLatPred = ex.updateFgLatPred(model, infLatPred.isLogDomain());\n infLatPred.run();\n addExpectedFeatureCounts(fgLatPred, ex, infLatPred, data.getTemplates(), 1.0, feats);\n }\n double[] f = new double[numParams];\n feats.updateDoublesFromModel(f);\n return new FeatureVector(f);\n}\n"
|
"public LTTngProjectNode getProject() {\n ILTTngProjectTreeNode projectNode = null;\n ILTTngProjectTreeNode parent = getParent();\n if (parent instanceof LTTngTraceFolderNode) {\n projectNode = parent.getParent();\n } else if (parent instanceof LTTngExperimentNode) {\n projectNode = parent.getParent().getParent();\n }\n return (LTTngProjectNode) projectNode;\n}\n"
|
"private void createTable(Composite mainComp) {\n int style = SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.FULL_SELECTION;\n resultsViewer = new TableViewer(mainComp, style);\n resultsViewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n resultsViewer.getTable().setHeaderVisible(true);\n resultsViewer.getTable().setLinesVisible(true);\n resultsViewer.setContentProvider(getContentProvider());\n TableViewerColumn column = new TableViewerColumn(resultsViewer, SWT.NONE);\n column.getColumn().setText(Messages.UpdateAutoIncrementDialog_entity);\n column.getColumn().setResizable(true);\n column.getColumn().setWidth(300);\n column.setLabelProvider(new CustomedLabelProvider(0));\n column.setEditingSupport(null);\n column = new TableViewerColumn(resultsViewer, SWT.NONE);\n column.getColumn().setText(Messages.UpdateAutoIncrementDialog_value);\n column.getColumn().setResizable(true);\n column.getColumn().setWidth(100);\n column.setLabelProvider(new CustomedLabelProvider(1));\n column.setEditingSupport(new EditingSupport(resultsViewer) {\n protected CellEditor getCellEditor(Object element) {\n return new VerificableTextCellEditor(resultsViewer.getTable());\n }\n protected boolean canEdit(Object element) {\n return true;\n }\n protected Object getValue(Object element) {\n Line line = (Line) element;\n return line.keyValues.get(1).value;\n }\n protected void setValue(Object element, Object value) {\n Line line = (Line) element;\n line.keyValues.get(1).value = value.toString();\n resultsViewer.refresh();\n }\n });\n resultsViewer.addSelectionChangedListener(new ISelectionChangedListener() {\n public void selectionChanged(SelectionChangedEvent event) {\n IStructuredSelection selection = (IStructuredSelection) resultsViewer.getSelection();\n resetBtn.setEnabled(!selection.isEmpty());\n }\n });\n List<Line> lines = getInput();\n resultsViewer.setInput(lines);\n}\n"
|
"public static List<MappingField> getFieldsForUpdate(Entity<?> en, FieldMatcher fm, Object refer) {\n List<MappingField> re = new ArrayList<MappingField>(en.getMappingFields().size());\n for (MappingField mf : en.getMappingFields()) {\n if (mf.isPk()) {\n if (en.getPkType() == PkType.ID && mf.isId())\n continue;\n if (en.getPkType() == PkType.NAME && mf.isName())\n continue;\n if (en.getPkType() == PkType.COMPOSITE && mf.isCompositePk())\n continue;\n }\n if (mf.isReadonly() || mf.isAutoIncreasement() || !mf.isUpdate())\n continue;\n else if (null != fm && null != refer && fm.isIgnoreNull() && null == mf.getValue(Lang.first(refer)))\n continue;\n if (null == fm || fm.match(mf.getName()))\n re.add(mf);\n }\n if (re.isEmpty() && log.isDebugEnabled())\n log.debug(\"String_Node_Str\");\n return re;\n}\n"
|
"public String[] getDatastoreName() {\n return datastoreName.clone();\n}\n"
|
"private void setValueAndType(long lval) {\n if (!isValidXsdInt(lval)) {\n this.valueType = XSD_LONG;\n this.value = lval;\n } else {\n this.valueType = XSD_INT;\n this.value = new Integer((int) lval);\n }\n this.isDecimal = false;\n}\n"
|
"public void writeToParcel(Parcel out, int flags) {\n out.writeFloat(scaleX);\n out.writeFloat(scaleY);\n out.writeInt(orientation);\n out.writeInt(pageMargin);\n out.writeInt(pageLimit);\n out.writeInt(pagerId);\n}\n"
|
"public PublicWSDefinition discover(int operation) {\n if (operation == PublicWSProvider2.GET) {\n return new PublicWSDefinition() {\n public List getParameters() {\n return null;\n }\n public String getReturnType() {\n return IMAGE_MIME_TYPE;\n }\n };\n }\n return null;\n}\n"
|
"public static List<Mail> readMails(Mailbox mailbox, MailFolder mailFolder) throws MessagingException {\n List<Mail> mails = new ArrayList<>();\n Properties props = new Properties();\n props.put(\"String_Node_Str\", \"String_Node_Str\");\n props.put(\"String_Node_Str\", \"String_Node_Str\");\n props.put(\"String_Node_Str\", mailbox.getPop3Port());\n props.put(\"String_Node_Str\", mailbox.getPop3Port());\n props.put(\"String_Node_Str\", mailbox.getPop3Server());\n props.put(\"String_Node_Str\", mailbox.getAccount());\n props.put(\"String_Node_Str\", \"String_Node_Str\");\n Authenticator auth = new Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n System.out.println(mailbox.getAccount() + \"String_Node_Str\" + mailbox.getPassword());\n return new PasswordAuthentication(mailbox.getAccount(), mailbox.getPassword());\n }\n };\n Session session = Session.getDefaultInstance(props, auth);\n Store store = session.getStore(\"String_Node_Str\");\n store.connect(mailbox.getPop3Server(), mailbox.getAccount(), mailbox.getPassword());\n Folder inbox = store.getFolder(\"String_Node_Str\");\n inbox.open(Folder.READ_ONLY);\n javax.mail.Message[] messages = inbox.getMessages();\n for (javax.mail.Message message : messages) {\n try {\n Mail mail = new Mail();\n StringBuffer txtBody = new StringBuffer();\n StringBuffer htmlBody = new StringBuffer();\n List<javax.mail.BodyPart> attachments = new ArrayList();\n mail.setFrom(\"String_Node_Str\");\n mail.setTo(\"String_Node_Str\");\n mail.setAttachments(new ArrayList<>());\n Arrays.asList(message.getFrom()).forEach(address -> {\n if (address instanceof InternetAddress) {\n mail.setFrom(mail.getFrom() + ((InternetAddress) address).getPersonal() + \"String_Node_Str\" + ((InternetAddress) address).getAddress() + \"String_Node_Str\");\n } else {\n mail.setFrom(mail.getFrom() + address.toString() + \"String_Node_Str\");\n }\n });\n Arrays.asList(message.getRecipients(javax.mail.Message.RecipientType.TO)).forEach(address -> {\n if (address instanceof InternetAddress) {\n mail.setTo(mail.getTo() + ((InternetAddress) address).getPersonal() + \"String_Node_Str\" + ((InternetAddress) address).getAddress() + \"String_Node_Str\");\n } else {\n mail.setTo(mail.getTo() + address.toString() + \"String_Node_Str\");\n }\n });\n mail.setContentType(message.getContentType());\n Object content = message.getContent();\n if (content instanceof MimeMultipart) {\n parseBodyParts((MimeMultipart) content, txtBody, htmlBody, attachments);\n } else {\n if (content instanceof javax.mail.BodyPart) {\n txtBody.append(getTxtPart((javax.mail.BodyPart) content));\n } else {\n txtBody.append(content);\n }\n }\n mail.setTextBody(txtBody.toString());\n mail.setHtmlBody(htmlBody.toString());\n mail.setSubject(message.getSubject());\n mail.setSendDate(message.getSentDate());\n mail.setMailFolder(mailFolder);\n mails.add(mail);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n inbox.close(false);\n store.close();\n return mails;\n}\n"
|
"public void onItemClick(AdapterView<?> adapter, View v, int position, long arg3) {\n final String room = (String) recentAdapter.getRoomAtPosition(position);\n if (RoomsList.size() != 0) {\n new Thread() {\n public void run() {\n try {\n binder.getService().getConnection(serverId).joinChannel(room);\n } catch (Exception E) {\n }\n }\n }.start();\n recentList.remove(position);\n saveRecentItems();\n refreshActivity();\n } else {\n new Thread() {\n public void run() {\n try {\n binder.getService().getConnection(serverId).joinChannel(room);\n } catch (Exception E) {\n }\n }\n }.start();\n saveRecentItems();\n refreshActivity();\n }\n}\n"
|
"public GetMessage withDetail(String detail) {\n return new GetMessage(queue, id, matchHidden, detail, wait, hide);\n}\n"
|
"static void handleElement(Element ele, Map cssStyles, IContent content, ActionContent action, int index) {\n IStyle cssStyle = (IStyle) cssStyles.get(ele);\n if (cssStyle != null) {\n if (\"String_Node_Str\".equals(cssStyle.getDisplay())) {\n return;\n }\n }\n String lTagName = ele.getTagName().toLowerCase();\n if (lTagName.equals(\"String_Node_Str\")) {\n IContainerContent container = content.getReportContent().createContainerContent();\n addChild(content, container);\n handleStyle(ele, cssStyles, container);\n ActionContent actionContent = handleAnchor(ele, container, action);\n processNodes(ele, cssStyles, content, actionContent);\n } else if (tagName.toLowerCase().equals(\"String_Node_Str\")) {\n outputImg(ele, cssStyles, content);\n } else if (tagName.toLowerCase().equals(\"String_Node_Str\")) {\n outputEmbedContent(ele, cssStyles, content);\n } else if (tagName.toLowerCase().equals(\"String_Node_Str\")) {\n ILabelContent label = content.getReportContent().createLabelContent();\n addChild(content, label);\n label.setText(\"String_Node_Str\");\n StyleDeclaration inlineStyle = new StyleDeclaration(content.getCSSEngine());\n inlineStyle.setProperty(IStyle.STYLE_DISPLAY, CSSValueConstants.INLINE_VALUE);\n label.setInlineStyle(inlineStyle);\n } else if (tagName.toLowerCase().equals(\"String_Node_Str\") || tagName.toLowerCase().equals(\"String_Node_Str\")) {\n IReportContent report = content.getReportContent();\n ITableContent table = report.createTableContent();\n addChild(content, table);\n Column column1 = new Column(report);\n column1.setWidth(new DimensionType(2, \"String_Node_Str\"));\n table.addColumn(column1);\n column1 = new Column(report);\n table.addColumn(column1);\n handleStyle(ele, cssStyles, table);\n processNodes(ele, cssStyles, table, action);\n } else if (tagName.toLowerCase().equals(\"String_Node_Str\") && ele.getParentNode().getNodeType() == Node.ELEMENT_NODE) {\n IReportContent report = content.getReportContent();\n IRowContent row = report.createRowContent();\n addChild(content, row);\n handleStyle(ele, cssStyles, row);\n StyleDeclaration style = new StyleDeclaration(content.getCSSEngine());\n style.setProperty(IStyle.STYLE_VERTICAL_ALIGN, CSSValueConstants.TOP_VALUE);\n style.setProperty(IStyle.STYLE_PADDING_BOTTOM, IStyle.NUMBER_0);\n style.setProperty(IStyle.STYLE_PADDING_LEFT, IStyle.NUMBER_0);\n style.setProperty(IStyle.STYLE_PADDING_RIGHT, IStyle.NUMBER_0);\n style.setProperty(IStyle.STYLE_PADDING_TOP, IStyle.NUMBER_0);\n ICellContent orderCell = report.createCellContent();\n orderCell.setRowSpan(1);\n orderCell.setColumn(0);\n orderCell.setColSpan(1);\n orderCell.setInlineStyle(style);\n addChild(row, orderCell);\n TextContent text = (TextContent) report.createTextContent();\n addChild(orderCell, text);\n if (ele.getParentNode().getNodeName().equals(\"String_Node_Str\")) {\n text.setText(new Integer(index).toString() + \"String_Node_Str\");\n } else if (ele.getParentNode().getNodeName().equals(\"String_Node_Str\")) {\n text.setText(new String(new char[] { '\\u2022' }));\n }\n ICellContent childCell = report.createCellContent();\n childCell.setRowSpan(1);\n childCell.setColumn(1);\n childCell.setColSpan(1);\n childCell.setInlineStyle(style);\n addChild(row, childCell);\n processNodes(ele, cssStyles, childCell, action);\n } else if (tagName.toLowerCase().equals(\"String_Node_Str\") || tagName.toLowerCase().equals(\"String_Node_Str\")) {\n IContainerContent container = content.getReportContent().createContainerContent();\n addChild(content, container);\n handleStyle(ele, cssStyles, container);\n if (tagName.toLowerCase().equals(\"String_Node_Str\")) {\n StyleDeclaration style = new StyleDeclaration(content.getCSSEngine());\n style.setProperty(IStyle.STYLE_DISPLAY, CSSValueConstants.INLINE_VALUE);\n style.setProperty(IStyle.STYLE_VERTICAL_ALIGN, CSSValueConstants.TOP_VALUE);\n TextContent text = (TextContent) content.getReportContent().createTextContent();\n addChild(container, text);\n if (ele.getParentNode().getNodeName().equals(\"String_Node_Str\")) {\n text.setText(\"String_Node_Str\");\n }\n style.setTextIndent(\"String_Node_Str\");\n text.setInlineStyle(style);\n IContainerContent childContainer = content.getReportContent().createContainerContent();\n childContainer.setInlineStyle(style);\n addChild(container, childContainer);\n processNodes(ele, cssStyles, container, action);\n } else {\n processNodes(ele, cssStyles, container, action);\n }\n } else if (\"String_Node_Str\".equals(tagName.toLowerCase())) {\n TableProcessor.processTable(ele, cssStyles, content, action);\n } else {\n IContainerContent container = content.getReportContent().createContainerContent();\n handleStyle(ele, cssStyles, container);\n addChild(content, container);\n processNodes(ele, cssStyles, container, action);\n }\n}\n"
|
"public static String parseArguments(String[] arguments) throws IOException {\n Level traceLevel = Level.WARNING;\n Queue<String> args = new LinkedList<>();\n for (String arg : arguments) {\n if (arg.length() > 0) {\n args.add(arg);\n }\n }\n AbortRetryIgnoreHandler handler = null;\n Map<String, String> format = new HashMap<>();\n double zoom = 1;\n Selection selection = new Selection();\n Selection selectionIds = new Selection();\n String nextParam = null, nextParamOriginal = null;\n OUTER: while (true) {\n nextParam = args.remove();\n if (nextParam != null) {\n nextParam = nextParam.toLowerCase();\n }\n switch(nextParam) {\n case \"String_Node_Str\":\n selectionIds = parseSelect(args);\n break;\n case \"String_Node_Str\":\n selection = parseSelect(args);\n break;\n case \"String_Node_Str\":\n zoom = parseZoom(args);\n break;\n case \"String_Node_Str\":\n format = parseFormat(args);\n break;\n case \"String_Node_Str\":\n parseConfig(args);\n if (args.isEmpty()) {\n Configuration.saveConfig();\n System.out.println(\"String_Node_Str\");\n return null;\n }\n break;\n case \"String_Node_Str\":\n handler = parseOnError(args);\n break;\n case \"String_Node_Str\":\n parseTimeout(args);\n break;\n case \"String_Node_Str\":\n parseExportTimeout(args);\n break;\n case \"String_Node_Str\":\n parseExportFileTimeout(args);\n break;\n case \"String_Node_Str\":\n parseAffinity(args);\n break;\n case \"String_Node_Str\":\n parsePriority(args);\n break;\n case \"String_Node_Str\":\n traceLevel = Level.FINE;\n break;\n case \"String_Node_Str\":\n Configuration.debugMode.set(true);\n break;\n default:\n break OUTER;\n }\n if (args.isEmpty()) {\n return null;\n }\n }\n if (nextParam.equals(\"String_Node_Str\")) {\n ContextMenuTools.addToContextMenu(false, true);\n System.exit(0);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n ContextMenuTools.addToContextMenu(true, true);\n System.exit(0);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n parseProxy(args);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n parseExport(selection, selectionIds, args, handler, traceLevel, format);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n parseCompress(args);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n parseDecompress(args);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n parseExtract(args);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n parseRenameInvalidIdentifiers(args);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n parseDumpSwf(args);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n parseFlashPaperToPdf(selection, zoom, args);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n parseReplaceBinaryData(args);\n } else if (nextParam.equals(\"String_Node_Str\")) {\n ActionScriptParser.compile(null, args.remove(), args.remove());\n } else if (nextParam.equals(\"String_Node_Str\") || nextParam.equals(\"String_Node_Str\") || nextParam.equals(\"String_Node_Str\")) {\n printHeader();\n printCmdLineUsage();\n System.exit(0);\n } else if (args.isEmpty()) {\n return nextParam;\n } else {\n badArguments();\n }\n return null;\n}\n"
|
"private static void setDatabaseValue(DatabaseConnection connection, INode node, String repositoryValue) {\n if (\"String_Node_Str\".equals(repositoryValue)) {\n String value = getValueFromRepositoryName(connection, node, \"String_Node_Str\");\n if (value != null) {\n connection.setUsername(value);\n }\n }\n if (\"String_Node_Str\".equals(repositoryValue)) {\n String value = getValueFromRepositoryName(connection, node, \"String_Node_Str\");\n if (value != null) {\n try {\n String pwd = TalendQuoteUtils.checkAndRemoveBackslashes(value);\n connection.setPassword(PasswordEncryptUtil.encryptPassword(TalendQuoteUtils.removeQuotes(pwd)));\n } catch (Exception e) {\n ExceptionHandler.process(e);\n }\n }\n }\n if (\"String_Node_Str\".equals(repositoryValue)) {\n String value = getValueFromRepositoryName(connection, node, \"String_Node_Str\");\n if (value != null) {\n connection.setServerName(TalendQuoteUtils.removeQuotes(value));\n }\n }\n if (\"String_Node_Str\".equals(repositoryValue)) {\n String value = getValueFromRepositoryName(connection, node, \"String_Node_Str\");\n if (value != null) {\n connection.setPort(TalendQuoteUtils.removeQuotes(value));\n }\n }\n if (\"String_Node_Str\".equals(repositoryValue)) {\n String value = getValueFromRepositoryName(connection, node, \"String_Node_Str\");\n if (value != null) {\n connection.setSID(TalendQuoteUtils.removeQuotes(value));\n }\n }\n if (\"String_Node_Str\".equals(repositoryValue)) {\n String value = getValueFromRepositoryName(connection, node, \"String_Node_Str\");\n if (value != null) {\n if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName())) {\n connection.setUiSchema(TalendQuoteUtils.removeQuotes(value.toUpperCase()));\n } else {\n connection.setUiSchema(TalendQuoteUtils.removeQuotes(value));\n }\n }\n }\n if (\"String_Node_Str\".equals(repositoryValue)) {\n String value = getParameterValue(connection, node, \"String_Node_Str\");\n if (value != null && Boolean.valueOf(value).booleanValue()) {\n connection.setCdcTypeMode(CDCTypeMode.LOG_MODE.getName());\n }\n }\n if (\"String_Node_Str\".equals(repositoryValue)) {\n String value = getParameterValue(connection, node, \"String_Node_Str\");\n if (value != null) {\n connection.setDBRootPath(value);\n }\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName())) {\n setDatabaseValueForOracleSid(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLESN.getDisplayName())) {\n setDatabaseValueForOracleSeverName(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.MYSQL.getDisplayName())) {\n setDatabaseValueForMysql(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.EXASOL.getDisplayName())) {\n setDatabaseValueForEXASolution(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.SYBASEASE.getDisplayName()) || connection.getDatabaseType().equals(EDatabaseTypeName.SYBASEIQ.getDisplayName())) {\n setDatabaseValueForSysbase(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.ACCESS.getDisplayName())) {\n setDatabaseValueForAccess(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.SQLITE.getDisplayName())) {\n setDatabaseValueForSqlite(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.FIREBIRD.getDisplayName())) {\n setDatabaseValueForFileBird(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.AS400.getDisplayName())) {\n setDatabaseValueForAs400(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.VERTICA.getDisplayName())) {\n setDatabaseValueForVertica(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.MSSQL.getDisplayName())) {\n setDatabaseValueForMSSql(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.GODBC.getDisplayName())) {\n setDatabaseValueForDB(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.INGRES.getDisplayName())) {\n setDatabaseValueForIngres(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.INFORMIX.getDisplayName())) {\n setDatabaseValueForInformix(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.JAVADB.getDisplayName()) || connection.getDatabaseType().equals(EDatabaseTypeName.JAVADB_EMBEDED.getDisplayName()) || connection.getDatabaseType().equals(EDatabaseTypeName.JAVADB_JCCJDBC.getDisplayName()) || connection.getDatabaseType().equals(EDatabaseTypeName.JAVADB_DERBYCLIENT.getDisplayName())) {\n setDatabaseValueForjavadb(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.NETEZZA.getDisplayName())) {\n setDatabaseValueForNetezza(connection, node, repositoryValue);\n }\n if (connection.getDatabaseType().equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {\n setDatabaseValueForJdbc(connection, node, repositoryValue);\n }\n}\n"
|
"private static void getImportFiles(String xsdFile, String newPath) {\n File file = new File(xsdFile);\n if (!file.exists()) {\n return;\n }\n String xsdFolder = file.getParent();\n SAXReader saxReader = new SAXReader();\n Document doc;\n try {\n URL url = file.toURI().toURL();\n doc = saxReader.read(url.getFile());\n Element root = doc.getRootElement();\n List<Element> elementsList = new ArrayList<Element>();\n List<Element> importList = root.elements(\"String_Node_Str\");\n if (importList != null) {\n elementsList.addAll(importList);\n }\n List<Element> includeList = root.elements(\"String_Node_Str\");\n if (includeList != null) {\n elementsList.addAll(includeList);\n }\n if (elementsList.size() <= 0) {\n return;\n }\n for (Element n : elementsList) {\n Attribute attr = n.attribute(\"String_Node_Str\");\n if (attr != null) {\n String importFile = xsdFolder + File.separator + attr.getValue();\n File f = new File(importFile);\n if (f.exists()) {\n File newFile = new File(newPath + attr.getValue());\n if (!filePaths.contains(newFile.getCanonicalPath())) {\n filePaths.add(newFile.getCanonicalPath());\n FilesUtils.copyFile(f, newFile);\n getImportFiles(importFile, newFile.getParent() + File.separator, filePaths);\n }\n }\n }\n }\n } catch (DocumentException e) {\n ExceptionHandler.process(e);\n } catch (MalformedURLException e) {\n ExceptionHandler.process(e);\n } catch (IOException e) {\n ExceptionHandler.process(e);\n }\n}\n"
|
"public void setPartName(String typeTitle, Image icon) {\n String title = null;\n String type = null;\n if (typeTitle != null && typeTitle.contains(SEPARATOR)) {\n String[] tt = typeTitle.split(SEPARATOR);\n type = tt[0];\n title = tt[1];\n } else {\n title = typeTitle;\n }\n String viewName = getViewNameLable();\n if (element instanceof IProcess && AbstractProcessProvider.isExtensionProcessForJoblet((IProcess) element)) {\n viewName = VIEW_NAME_JOBLET;\n }\n if (type != null) {\n viewName = type;\n }\n if (title == null) {\n title = \"String_Node_Str\";\n }\n if (!title.equals(\"String_Node_Str\")) {\n viewName = viewName + \"String_Node_Str\" + title + \"String_Node_Str\";\n super.setTitleToolTip(title);\n }\n if (tabFactory != null && icon == null) {\n icon = ImageProvider.getImage(ECoreImage.PROCESS_ICON);\n if (this.element != null && this.element instanceof IProcess) {\n if (((IProcess2) this.element).disableRunJobView()) {\n icon = ImageProvider.getImage(ECoreImage.JOBLET_ICON);\n } else if (ProcessUtils.isTestContainer(process)) {\n icon = ImageProvider.getImage(ECoreImage.TEST_CONTAINER);\n } else if (ComponentCategory.CATEGORY_4_MAPREDUCE.getName().equals(process.getComponentsType())) {\n icon = ImageProvider.getImage(EJobSettingImage.PROCESS_MR_ICON_X16);\n } else if (ComponentCategory.CATEGORY_4_SPARK.getName().equals(process.getComponentsType())) {\n icon = ImageProvider.getImage(EJobSettingImage.PROCESS_SPARK_ICON_X16);\n } else if (ComponentCategory.CATEGORY_4_SPARKSTREAMING.getName().equals(process.getComponentsType())) {\n icon = ImageProvider.getImage(EJobSettingImage.PROCESS_SPARK_STREAMING_ICON_X16);\n } else if (ComponentCategory.CATEGORY_4_STORM.getName().equals(process.getComponentsType())) {\n icon = ImageProvider.getImage(EJobSettingImage.PROCESS_STORM_ICON_X16);\n }\n }\n }\n tabFactory.setTitle(title, icon);\n super.setTitleImage(icon);\n if (gitService != null && gitService.isProjectInGitMode())\n return;\n super.setPartName(viewName);\n}\n"
|
"public static List<Boolean> getRestartStates(int uid, String restrictionName) {\n List<Boolean> listRestartRestriction = new ArrayList<Boolean>();\n Set<String> listRestriction = new HashSet<String>();\n if (restrictionName == null)\n listRestriction = mRestart.keySet();\n else if (mRestart.keySet().contains(restrictionName))\n listRestriction.add(restrictionName);\n try {\n for (String restriction : listRestriction) {\n for (String method : mRestart.get(restriction)) listRestartRestriction.add(getRestrictionEx(uid, restriction, method).restricted);\n }\n } catch (Throwable ex) {\n Util.bug(null, ex);\n }\n return listRestartRestriction;\n}\n"
|
"public List<MethodInfo> findSetters(Class<?> parameterType) {\n String setterSignature = \"String_Node_Str\" + parameterType.getName().replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\";\n List<MethodInfo> methodInfos = new ArrayList<>();\n for (MethodInfo methodInfo : methodsInfo().methods()) {\n if (methodInfo.getTypeDescriptor().equals(setterSignature)) {\n methodInfos.add(methodInfo);\n }\n }\n return methodInfos;\n}\n"
|
"private boolean handleKey(Event event) {\n HasDataPresenter<T> presenter = getPresenter();\n int oldRow = getKeyboardSelectedRow();\n boolean isRtl = LocaleInfo.getCurrentLocale().isRTL();\n int keyCodeLineEnd = isRtl ? KeyCodes.KEY_LEFT : KeyCodes.KEY_RIGHT;\n int keyCodeLineStart = isRtl ? KeyCodes.KEY_RIGHT : KeyCodes.KEY_LEFT;\n int keyCode = event.getKeyCode();\n if (keyCode == keyCodeLineEnd) {\n int nextColumn = findInteractiveColumn(keyboardSelectedColumn, false);\n if (nextColumn <= keyboardSelectedColumn) {\n if (presenter.hasKeyboardNext()) {\n keyboardSelectedColumn = nextColumn;\n presenter.keyboardNext();\n event.preventDefault();\n return true;\n }\n } else {\n keyboardSelectedColumn = nextColumn;\n getPresenter().setKeyboardSelectedRow(oldRow, true, true);\n event.preventDefault();\n return true;\n }\n } else if (keyCode == keyCodeLineStart) {\n int prevColumn = findInteractiveColumn(keyboardSelectedColumn, true);\n if (prevColumn >= keyboardSelectedColumn) {\n if (presenter.hasKeyboardPrev()) {\n keyboardSelectedColumn = prevColumn;\n presenter.keyboardPrev();\n event.preventDefault();\n return true;\n }\n } else {\n keyboardSelectedColumn = prevColumn;\n getPresenter().setKeyboardSelectedRow(oldRow, true);\n event.preventDefault();\n return true;\n }\n }\n return false;\n}\n"
|
"public List<IWizardPage> getWizardPages(ApplicationWizardDescriptor descriptor, CloudFoundryServer cloudServer, CloudFoundryApplicationModule applicationModule) {\n List<IWizardPage> defaultPages = new ArrayList<IWizardPage>();\n StandaloneDeploymentWizardPage deploymentPage = new StandaloneDeploymentWizardPage(cloudServer, applicationModule, descriptor, getApplicationUrlLookup(), this);\n CloudFoundryApplicationWizardPage applicationNamePage = new CloudFoundryApplicationWizardPage(cloudServer, deploymentPage, applicationModule, descriptor);\n defaultPages.add(applicationNamePage);\n defaultPages.add(deploymentPage);\n CloudFoundryApplicationServicesWizardPage servicesPage = new CloudFoundryApplicationServicesWizardPage(cloudServer, applicationModule, descriptor);\n defaultPages.add(servicesPage);\n return defaultPages;\n}\n"
|
"public void play(String uri) {\n final libvlc_exception_t ex = new libvlc_exception_t();\n String defaultLibraryPath = \"String_Node_Str\";\n if (Platform.isLinux())\n defaultLibraryPath = \"String_Node_Str\";\n libraryPath = libraryPath != null ? libraryPath : defaultLibraryPath;\n ArrayList<String> vlc_args = new ArrayList<String>(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n if (debug) {\n vlc_args.add(\"String_Node_Str\");\n } else {\n vlc_args.add(\"String_Node_Str\");\n vlc_args.add(\"String_Node_Str\");\n vlc_args.add(\"String_Node_Str\");\n vlc_args.add(\"String_Node_Str\");\n }\n if (Platform.isWindows()) {\n if (libraryPath != null) {\n vlc_args.add(\"String_Node_Str\");\n vlc_args.add(libraryPath);\n }\n }\n if (LIBVLC_VERSION.startsWith(\"String_Node_Str\")) {\n vlc_args.add(\"String_Node_Str\");\n vlc_args.add(\"String_Node_Str\");\n } else if (LIBVLC_VERSION.startsWith(\"String_Node_Str\")) {\n vlc_args.add(\"String_Node_Str\");\n vlc_args.add(\"String_Node_Str\");\n vlc_args.add(\"String_Node_Str\");\n vlc_args.add(\"String_Node_Str\");\n vlc_args.add(\"String_Node_Str\");\n } else {\n throw new VideoPlayerException(\"String_Node_Str\" + LIBVLC_VERSION);\n }\n instance = libvlc.libvlc_new(vlc_args.size(), vlc_args.toArray(new String[0]), ex);\n throwError(ex);\n libvlc.libvlc_audio_set_volume(instance, volume, ex);\n throwError(ex);\n if (muting)\n mute(muting);\n LibVlcMedia media = libvlc.libvlc_media_new(instance, uri, ex);\n throwError(ex);\n player = libvlc.libvlc_media_player_new_from_media(media, ex);\n throwError(ex);\n libvlc.libvlc_media_release(media);\n long drawable;\n Pointer drawableP;\n if (c == null && handle != DEADBEEF) {\n drawableP = Pointer.createConstant(handle);\n drawable = handle;\n } else if (c != null) {\n drawable = Native.getComponentID(c);\n drawableP = Native.getComponentPointer(c);\n } else {\n throw new VideoPlayerException(\"String_Node_Str\");\n }\n if (LIBVLC_VERSION.startsWith(\"String_Node_Str\")) {\n libvlc.libvlc_media_player_set_drawable(player, (int) drawable, ex);\n } else if (LIBVLC_VERSION.startsWith(\"String_Node_Str\")) {\n if (Platform.isWindows()) {\n libvlc.libvlc_media_player_set_hwnd(player, drawableP, ex);\n } else if (Platform.isX11()) {\n libvlc.libvlc_media_player_set_xwindow(player, drawable, ex);\n } else if (Platform.isMac()) {\n libvlc.libvlc_media_player_set_nsobject(player, drawableP, ex);\n }\n }\n throwError(ex);\n libvlc.libvlc_media_player_play(player, ex);\n throwError(ex);\n}\n"
|
"public HConsistencyLevel get(OperationType op, String cfName) {\n switch(op) {\n case READ:\n return HConsistencyLevel.QUORUM;\n case WRITE:\n return HConsistencyLevel.QUORUM;\n }\n return HConsistencyLevel.ONE;\n}\n"
|
"public boolean checkGUI(Player player) {\n if (Config.hasSpout) {\n SpoutPlayer spoutPlayer = (SpoutPlayer) player;\n if (spoutPlayer.isSpoutCraftEnabled()) {\n popGUI(spoutPlayer);\n return true;\n }\n }\n return false;\n}\n"
|
"public List<ConceptClass> getAllConceptClasses(boolean includeRetired) throws DAOException {\n Criteria crit = sessionFactory.getCurrentSession().createCriteria(ConceptClass.class);\n if (includeRetired == false)\n crit.add(Expression.eq(\"String_Node_Str\", false));\n return crit.list();\n}\n"
|
"public synchronized T getNextVisible(final T id) {\n final InMemoryTreeNode<T> node = getNodeFromTreeOrThrowAllowRoot(id);\n if (!node.isVisible()) {\n return null;\n }\n final List<InMemoryTreeNode<T>> children = node.getChildren();\n if (!children.isEmpty()) {\n final InMemoryTreeNode<T> firstChild = children.get(0);\n if (firstChild.isVisible()) {\n return firstChild.getId();\n }\n }\n final T sibl = getNextSibling(id);\n if (sibl != null) {\n return sibl;\n }\n T parent = node.getParent();\n do {\n if (parent == null) {\n return null;\n }\n final T parentSibling = getNextSibling(parent);\n if (parentSibling != null) {\n return parentSibling;\n }\n parent = getNodeFromTreeOrThrow(parent).getParent();\n } while (true);\n}\n"
|
"public void run() {\n try {\n super.run();\n schema = ((XSDTreeContentProvider) page.getTreeViewer().getContentProvider()).getXsdSchema();\n IStructuredSelection selection = (IStructuredSelection) page.getTreeViewer().getSelection();\n XSDAnnotationsStructure struc = new XSDAnnotationsStructure((XSDComponent) selection.getFirstElement());\n if (struc.getAnnotation() == null) {\n throw new RuntimeException(\"String_Node_Str\" + selection.getFirstElement().getClass().getName());\n }\n dlg = new AnnotationOrderedListsDialog(new ArrayList(struc.getForeignKeyInfos().values()), new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n dlg.close();\n }\n }, page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\", page, AnnotationOrderedListsDialog.AnnotationForeignKeyInfo_ActionType);\n dlg.setBlockOnOpen(true);\n int ret = dlg.open();\n if (ret == Window.CANCEL)\n return;\n struc.setForeignKeyInfos(dlg.getXPaths());\n if (struc.hasChanged()) {\n page.getTreeViewer().refresh(true);\n page.getTreeViewer().expandToLevel(selection.getFirstElement(), 2);\n page.markDirty();\n }\n } catch (Exception e) {\n e.printStackTrace();\n MessageDialog.openError(page.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + e.getLocalizedMessage());\n }\n}\n"
|
"public void testCommandExecution() throws Exception {\n Thread[] t = new Thread[10];\n List<ProcReturn> results = Collections.synchronizedList(new ArrayList<>(t.length));\n for (int i = 0; i < t.length; i++) {\n t[i] = newThread(i, results);\n }\n for (int i = 0; i < t.length; i++) {\n t[i].start();\n }\n for (int i = 0; i < t.length; i++) {\n t[i].join();\n }\n assertEquals(\"String_Node_Str\", t.length, results.size());\n for (ProcReturn r : results) {\n assertTrue(\"String_Node_Str\" + r.output, PID_PATTERN.matcher(r.output).find());\n assertEquals(0, r.exitCode);\n assertFalse(r.proc.isAlive());\n }\n}\n"
|
"public void showTables(UUID roomId) {\n this.roomId = roomId;\n UUID chatRoomId = null;\n if (SessionHandler.getSession() != null) {\n btnQuickStart.setVisible(SessionHandler.isTestMode());\n gameChooser.init();\n chatRoomId = SessionHandler.getRoomChatId(roomId).orElse(null);\n }\n if (newTableDialog == null) {\n newTableDialog = new NewTableDialog();\n MageFrame.getDesktop().add(newTableDialog, JLayeredPane.MODAL_LAYER);\n }\n if (newTournamentDialog == null) {\n newTournamentDialog = new NewTournamentDialog();\n MageFrame.getDesktop().add(newTournamentDialog, JLayeredPane.MODAL_LAYER);\n }\n if (joinTableDialog == null) {\n joinTableDialog = new JoinTableDialog();\n MageFrame.getDesktop().add(joinTableDialog, JLayeredPane.MODAL_LAYER);\n }\n if (chatRoomId != null) {\n this.chatPanelMain.getUserChatPanel().connect(chatRoomId);\n startTasks();\n this.setVisible(true);\n this.repaint();\n } else {\n hideTables();\n }\n reloadMessages();\n MageFrame.getUI().addButton(MageComponents.NEW_GAME_BUTTON, btnNewTable);\n Executors.newSingleThreadScheduledExecutor().schedule(() -> restoreDividers(), 300, TimeUnit.MILLISECONDS);\n}\n"
|
"public DataObject createDataObject(Property property, Type aType) {\n DataObject created = aHelperContext.getDataFactory().create(aType);\n if (property.isMany()) {\n ((ListWrapper) getList(property)).add(created, true);\n } else {\n set(property, created);\n }\n _setModified(true);\n ((SDODataObject) created)._setCreated(true);\n return created;\n}\n"
|
"public void navigateTo(String viewName) {\n if (currentViewName == null || !currentViewName.equals(viewName)) {\n if (views.containsKey(viewName)) {\n contentHolder.setContent(views.get(viewName).getViewComponent());\n this.listeners.forEach(viewChangeListener -> viewChangeListener.beforeViewChange(new ViewChangeListener.ViewChangeEvent(this, views.getOrDefault(currentViewName, null), views.get(viewName), viewName, null)));\n currentViewName = viewName;\n } else {\n currentViewName = null;\n if (errorView != null) {\n contentHolder.setContent(errorView.getViewComponent());\n } else {\n throw new RuntimeException(\"String_Node_Str\");\n }\n }\n }\n}\n"
|
"public String getLang() {\n if (lang == null) {\n lang = Strings2.firstWord(getText().substring(PREFIX.length()));\n }\n return lang;\n}\n"
|
"public ClassInfo getEnclosingSuperClassOf(ClassInfo classInfo, boolean membersOnly) {\n if (membersOnly && isLocalInnerClass()) {\n return null;\n }\n ClassInfo outer = enclosingClass;\n while (outer != null) {\n if (outer.isSubclassOf(classInfo)) {\n return outer;\n }\n if (membersOnly && outer.isLocalInnerClass()) {\n return null;\n } else {\n outer = outer.getEnclosingClassInfo();\n }\n }\n return null;\n}\n"
|
"public Object coerceToBean(Object val, Component comp, BindContext ctx) {\n if (val != null) {\n final Listbox lbx = (Listbox) comp;\n final ListModel<?> model = lbx.getModel();\n if (model != null) {\n final String varnm = (String) ((Listitem) val).getAttribute(BinderImpl.VAR);\n if (varnm != null) {\n return ((Listitem) val).getAttribute(varnm);\n } else {\n return model.getElementAt(((Listitem) val).getIndex());\n }\n } else {\n return ((Listitem) val).getValue();\n }\n }\n return null;\n}\n"
|
"public void onBackPressed() {\n AsyncTask<Void, AsyncTaskProgress, Boolean> loginTask = loginListener.getAsyncTask();\n if (loginTask != null && !loginTask.isCancelled() && !(loginTask.getStatus() == Status.FINISHED)) {\n loginTask.cancel(true);\n }\n super.onBackPressed();\n}\n"
|
"private MumblerNode toSpecialForm() {\n SymbolConvertible symbol = (SymbolConvertible) this.list.get(0);\n switch(symbol.name) {\n case \"String_Node_Str\":\n return quote(this.list.get(1));\n case \"String_Node_Str\":\n return new IfNode(this.list.get(1).convert(), this.list.get(2).convert(), this.list.get(3).convert());\n case \"String_Node_Str\":\n return DefineNodeFactory.create(this.list.get(2).convert(), frameDescriptors.peek().findOrAddFrameSlot(((SymbolConvertible) this.list.get(1)).name));\n case \"String_Node_Str\":\n frameDescriptors.push(new FrameDescriptor());\n List<FrameSlot> formalParameters = new ArrayList<>();\n for (Convertible arg : ((ListConvertible) this.list.get(1)).list) {\n formalParameters.add(((SymbolNode) arg.convert()).getSlot());\n }\n List<MumblerNode> bodyNodes = new ArrayList<>();\n for (Convertible bodyConv : this.list.subList(2, this.list.size())) {\n bodyNodes.add(bodyConv.convert());\n }\n frameDescriptors.pop();\n MumblerFunction function = MumblerFunction.create(formalParameters.toArray(new FrameSlot[] {}), bodyNodes.toArray(new MumblerNode[] {}), frameDescriptors.peek());\n return LambdaNodeFactory.create(function);\n default:\n throw new IllegalStateException(\"String_Node_Str\");\n }\n}\n"
|
"public void test() {\n String[] uniprotIDs = new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n for (String id : uniprotIDs) {\n try {\n testUniprot(id);\n Thread.sleep(1000);\n } catch (CompoundNotFoundException e) {\n fail(e.getMessage());\n }\n }\n}\n"
|
"public void run() {\n Object[] params = { mBlog.getRemoteBlogId(), mBlog.getUsername(), mBlog.getPassword() };\n instantiateInterface().callAsync(mOptionsCallback, Method.GET_OPTIONS, params);\n instantiateInterface().callAsync(mCategoriesCallback, Method.GET_CATEGORIES, params);\n}\n"
|
"public boolean wasSuccessful() {\n return (getValidation(\"String_Node_Str\") == null || getValidation(\"String_Node_Str\").wasSuccessful());\n}\n"
|
"private void checkMessagingTopics(Set<String> problemKeys) {\n validateMessagingTopic(Constants.Audit.TOPIC, problemKeys);\n validateMessagingTopic(Constants.Notification.TOPIC, problemKeys);\n}\n"
|
"int appendString(FeatureExpr ctx, MJIEnv env, int objref, Conditional<String> conditionalS) {\n Conditional<Integer> condAref = env.getReferenceField(ctx, objref, \"String_Node_Str\");\n Map<Integer, FeatureExpr> arefMap = condAref.toMap();\n for (Integer aref : arefMap.keySet()) {\n FeatureExpr arefCtx = ctx.and(arefMap.get(aref));\n Map<String, FeatureExpr> sMap = conditionalS.simplify(arefCtx).toMap();\n for (String s : sMap.keySet()) {\n FeatureExpr stringCtx = arefCtx.and(sMap.get(s));\n final int slen = s.length();\n final int alen = env.getArrayLength(aref);\n Conditional<Integer> condCount = env.getIntField(ctx, objref, \"String_Node_Str\").simplify(stringCtx);\n Map<Integer, FeatureExpr> map = condCount.toMap();\n for (Integer count : map.keySet()) {\n FeatureExpr currentCtx = stringCtx.and(map.get(count));\n int i, j;\n int n = count + slen;\n if (n < alen) {\n for (i = count, j = 0; i < n; i++, j++) {\n env.setCharArrayElement(currentCtx, aref, i, s.charAt(j));\n }\n } else {\n int m = 3 * alen / 2;\n if (m < n) {\n m = n;\n }\n int arefNew = env.newCharArray(currentCtx, m);\n for (i = 0; i < count; i++) {\n Map<Character, FeatureExpr> charMap = env.getCharArrayElement(aref, i).simplify(currentCtx).toMap();\n for (char c : charMap.keySet()) {\n env.setCharArrayElement(currentCtx.and(charMap.get(c)), arefNew, i, c);\n }\n }\n for (j = 0; i < n; i++, j++) {\n env.setCharArrayElement(currentCtx, arefNew, i, s.charAt(j));\n }\n env.setReferenceField(currentCtx, objref, \"String_Node_Str\", arefNew);\n }\n env.setIntField(currentCtx, objref, \"String_Node_Str\", n);\n }\n }\n }\n return objref;\n}\n"
|
"private static <T> void addIfNotNull(T item, String itemString, ImmutableList.Builder<T> builder, RuleContext ruleContext, String attrName) {\n if (item == null) {\n ruleErrorConsumer.attributeError(attrName, \"String_Node_Str\" + itemString + \"String_Node_Str\" + attrName);\n } else {\n builder.add(item);\n }\n}\n"
|
"public boolean isEnabled() {\n if (getSelectedElement() == null) {\n return false;\n }\n return super.isEnabled() && (getSelectedElement().isTemplateParameterValue());\n}\n"
|
"public int getValueAsInt() {\n if (this.value instanceof Number) {\n return ((Number) this.value).intValue();\n } else {\n throw new ClassCastException(\"String_Node_Str\");\n }\n}\n"
|
"public static void addStructures(PropertyHandle propHandle, List structures) throws SemanticException {\n if (structures == null || structures.isEmpty())\n return;\n if (propHandle == null)\n return;\n DesignElementHandle element = propHandle.getElementHandle();\n IPropertyDefn propDefn = propHandle.getDefn();\n PropertyValueValidationUtil.validateProperty(element, propDefn.getName(), structures);\n List oldList = element.getListProperty(propDefn.getName());\n List newList = null;\n if (!propHandle.isLocal()) {\n if (oldList != null)\n newList = (List) ModelUtil.copyValue(propDefn, oldList);\n else\n newList = new ArrayList();\n element.getElement().setProperty((ElementPropertyDefn) propDefn, newList);\n } else\n newList = oldList;\n newList.addAll(structures);\n}\n"
|
"protected Router createRouter(long id, long accountID, boolean isVpc) {\n String accountIdStr = String.valueOf(accountID);\n String routerName = getRouterName(isVpc, id);\n RuleChain pre = api.addChain().name(getChainName(routerName, RuleChainCode.TR_PRE)).tenantId(accountUuid).create();\n RuleChain post = api.addChain().name(getChainName(routerName, RuleChainCode.TR_POST)).tenantId(accountUuid).create();\n RuleChain preFilter = api.addChain().name(getChainName(routerName, RuleChainCode.TR_PREFILTER)).tenantId(accountUuid).create();\n RuleChain preNat = api.addChain().name(getChainName(routerName, RuleChainCode.TR_PRENAT)).tenantId(accountUuid).create();\n pre.addRule().type(DtoRule.Jump).jumpChainId(preFilter.getId()).position(1).create();\n pre.addRule().type(DtoRule.Jump).jumpChainId(preNat.getId()).position(2).create();\n return api.addRouter().tenantId(accountIdStr).name(routerName).inboundFilterId(pre.getId()).outboundFilterId(post.getId()).create();\n}\n"
|
"public void visitGoto(SSAGotoInstruction instruction) {\n Assertions.UNREACHABLE(\"String_Node_Str\");\n breakBasicBlock(index);\n}\n"
|
"public void invalidateClass(Class myClass, boolean recurse) {\n IdentityMap identityMap = this.getIdentityMap(myClass);\n Enumeration keys = identityMap.keys();\n while (keys.hasMoreElements()) {\n CacheKey key = (CacheKey) keys.nextElement();\n Object obj = key.getObject();\n if (recurse || ((obj != null) && obj.getClass().equals(myClass))) {\n key.setInvalidationState(CacheKey.CACHE_KEY_INVALID);\n }\n }\n}\n"
|
"public TrackingNumber createTrackingNumber(Product product, Company company, LocalDate date) throws AxelorException {\n TrackingNumber trackingNumber = new TrackingNumber();\n if (product.getIsPerishable()) {\n trackingNumber.setPerishableExpirationDate(date.plusMonths(product.getPerishableNbrOfMonths()));\n }\n if (product.getHasWarranty()) {\n trackingNumber.setWarrantyExpirationDate(date.plusMonths(product.getWarrantyNbrOfMonths()));\n }\n trackingNumber.setProduct(product);\n trackingNumber.setCounter(BigDecimal.ZERO);\n String seq = sequenceService.getSequence(IAdministration.PRODUCT_TRACKING_NUMBER, product, company, false);\n if (seq == null) {\n throw new AxelorException(String.format(\"String_Node_Str\", exceptionMsg, company.getName(), product.getCode()), IException.CONFIGURATION_ERROR);\n }\n trackingNumber.setTrackingNumberSeq(seq);\n return trackingNumber;\n}\n"
|
"protected void onResume() {\n askForPermissions(requestCounter);\n mReachabilityReceiver.startListening();\n super.onResume();\n}\n"
|
"public StateMultiProcessStreamReceiver clone(String key) {\n return new StateMultiProcessStreamReceiver(streamId + key, processCount, latencyTracker);\n}\n"
|
"private void readHeader() throws IOException {\n waitForTheHeaderToBeBuilt(bytes);\n bytes.position(HEADER_OFFSET);\n Consumer<WireIn> nullConsumer = o -> {\n };\n Consumer<WireIn> dataConsumer = $ -> {\n wire.read().marshallable(header);\n };\n wire.readDocument(dataConsumer, nullConsumer);\n firstBytes = bytes.position();\n}\n"
|
"public static double distance(EmpiricalCDF cdf1, EmpiricalCDF cdf2) {\n if (cdf1.numBins != cdf2.numBins || cdf1.min != cdf2.min || cdf1.max != cdf2.max) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n return IntStream.range(0, cdf1.numBins + 1).mapToDouble(i -> Math.abs(cdf1.probabilities[i] - cdf2.probabilities[i])).max().getAsDouble();\n}\n"
|
"protected Object call() throws Exception {\n ReplicatedMapService replicatedMapService = getService(ReplicatedMapService.SERVICE_NAME);\n ReplicatedRecordStore recordStore = replicatedMapService.getReplicatedRecordStore(parameters.name, true);\n Object returnValue = recordStore.put(serializationService.toObject(parameters.key), serializationService.toObject(parameters.value), parameters.ttl, TimeUnit.MILLISECONDS);\n return serializationService.toData(returnValue);\n}\n"
|
"private void sendMessageToOfflineClient(String client, Client cc) {\n if (!cc.supportAPNS()) {\n logger.error(\"String_Node_Str\", client);\n if (offlineMode == PBAPNSMessage.OfflineModes.SendAfterOnline_VALUE) {\n message.setStatus(client, new PushStatus(PushStatus.WaitOnline));\n } else {\n message.setStatus(client, new PushStatus(PushStatus.NoConnections));\n }\n return;\n }\n int offlineMode = message.getOfflineMode().intValue();\n if (StringUtils.isBlank(cc.getDeviceToken()) || NULL.equalsIgnoreCase(cc.getDeviceToken())) {\n logger.error(\"String_Node_Str\", client);\n if (offlineMode == PBAPNSMessage.OfflineModes.SendAfterOnline_VALUE) {\n message.setStatus(cc.getUserId(), new PushStatus(PushStatus.NO_DEVICE_TOKEN));\n } else {\n message.setStatus(cc.getUserId(), new PushStatus(PushStatus.Ignore));\n }\n return;\n }\n if (PBAPNSMessage.APNSModes.All_VALUE == message.getToMode()) {\n if (offlineMode == PBAPNSMessage.OfflineModes.APNS_VALUE) {\n if (PBAPNSMessage.APNSModes.Signined_VALUE == message.getApnsMode()) {\n if (ClientStatus.Offline == cc.getStatusId()) {\n message.setStatus(cc.getUserId(), new PushStatus(PushStatus.WaitOnline));\n } else {\n APNSKeeper.instance.push(this.product, cc, message);\n }\n } else {\n APNSKeeper.instance.push(this.product, cc, message);\n }\n } else if (offlineMode == PBAPNSMessage.OfflineModes.SendAfterOnline_VALUE) {\n message.setStatus(cc.getUserId(), new PushStatus(PushStatus.WaitOnline));\n }\n } else {\n message.setStatus(cc.getUserId(), new PushStatus(PushStatus.Ignore));\n }\n}\n"
|
"protected ICompletableFuture<Data> putAsyncInternal(final Data key, final Data value, final long ttl, final TimeUnit timeunit) {\n final NodeEngine nodeEngine = getNodeEngine();\n int partitionId = nodeEngine.getPartitionService().getPartitionId(key);\n PutOperation operation = new PutOperation(name, key, value, getTimeInMillis(ttl, timeunit));\n operation.setThreadId(ThreadUtil.getThreadId());\n try {\n ICompletableFuture<Data> future = nodeEngine.getOperationService().invokeOnPartition(SERVICE_NAME, operation, partitionId);\n invalidateNearCache(key);\n return future;\n } catch (Throwable t) {\n throw ExceptionUtil.rethrow(t);\n }\n}\n"
|
"public void shutdown(String dbId) {\n Pair<Server, Thread> entry = serverControls.remove(dbId);\n if (entry != null) {\n try {\n Thread second = entry.getSecond();\n removeShutdownHook(second);\n Server first = entry.getFirst();\n first.shutdownWithCatalogs(Database.CLOSEMODE_NORMAL);\n } catch (Exception e) {\n OseeLog.log(HyperSqlDbServer.class, Level.SEVERE, e.getMessage(), e);\n }\n }\n}\n"
|
"public int[] selectChannels(KeyValuePair<K, V> pair, int numberOfChannels) {\n switch(strategy) {\n case BROADCAST:\n return broadcast(numberOfChannels);\n case PARTITION_HASH:\n return partition(pair, numberOfChannels);\n case FORWARD:\n return robin(numberOfChannels);\n default:\n throw new UnsupportedOperationException(\"String_Node_Str\" + strategy.name());\n }\n}\n"
|
"public String getWor() {\n execute();\n setWorks(true);\n calls = numWorks / limit;\n rest = numWorks % limit;\n if (rest != 0) {\n calls++;\n }\n RetrievedWork[] wor = null;\n w = new ArrayList<RetrievedWork>();\n RetrievedWork resource;\n for (int i = 1; i <= calls; i++) {\n offset = (i * limit) - limit;\n wor = rdfstoreDAO.getWorks(sparqlEndpointURI, graphName, user, password, offset, limit);\n for (int a = 0; a < wor.length; a++) {\n resource = new RetrievedWork();\n resource.setWorkURI(wor[a].getWorkURI());\n resource.setExprURI(wor[a].getExprURI());\n resource.setManifURI(wor[a].getManifURI());\n resource.setTitle(wor[a].getTitle());\n resource.setDimensions(wor[a].getDimensions());\n resource.setExtension(wor[a].getExtension());\n resource.setAuthor(wor[a].getAuthor());\n resource.setPublicPlace(wor[a].getPublicPlace());\n resource.setPublicDate(wor[a].getPublicDate());\n resource.setEdition(wor[a].getEdition());\n w.add(resource);\n }\n }\n return SUCCESS;\n}\n"
|
"private static String buildUpdateLastUpdateSql(Set<Long> rawContactIds) {\n final String sql = \"String_Node_Str\" + Tables.CONTACTS + \"String_Node_Str\" + Contacts.CONTACT_LAST_UPDATED_TIMESTAMP + \"String_Node_Str\" + Clock.getInstance().currentTimeMillis() + \"String_Node_Str\" + Contacts._ID + \"String_Node_Str\" + \"String_Node_Str\" + ContactsContract.RawContacts.CONTACT_ID + \"String_Node_Str\" + Tables.RAW_CONTACTS + \"String_Node_Str\" + ContactsContract.RawContacts._ID + \"String_Node_Str\" + TextUtils.join(\"String_Node_Str\", rawContactIds) + \"String_Node_Str\" + \"String_Node_Str\";\n return sql;\n}\n"
|
"public SqlDatabase call(DatabaseInner inner) {\n return new SqlDatabaseImpl(inner.name(), (SqlServerImpl) sqlServer, inner, sqlServer.manager());\n}\n"
|
"private NetResponse fetch(final NetRequest request) throws ApiException {\n try {\n HttpResponse response = conn.exec(request);\n int statusCode = response.getStatusLine().getStatusCode();\n if (App.DEBUG) {\n log(\"String_Node_Str\" + request.url + \"String_Node_Str\" + request.post + \"String_Node_Str\" + statusCode);\n }\n if (statusCode == HTTP_OK) {\n return new NetResponse(response);\n } else {\n throw new ApiException(statusCode, Parser.error(response));\n }\n } catch (IOException e) {\n if (App.DEBUG) {\n Log.e(TAG, e.getMessage() + \"String_Node_Str\" + e.toString());\n }\n throw new ApiException(ERROR_NOT_CONNECTED, e.toString(), e.getCause());\n }\n}\n"
|
"public int hashCode() {\n final int prime = 31;\n int result = super.hashCode();\n result = prime * result + ((this.loadbalancer == null || this.loadbalancer.getOwnerUserId() == null) ? 0 : this.loadbalancer.getOwnerUserId().hashCode());\n result = prime * result + ((this.loadbalancer == null || this.loadbalancer.getDisplayName() == null) ? 0 : this.loadbalancer.getDisplayName().hashCode());\n result = prime * result + ((this.displayName == null) ? 0 : this.displayName.hashCode());\n return result;\n}\n"
|
"public void StorePendingBlockUpdateRecord(net.minecraft.world.NextTickListEntry PendingBlockUpdate, long WorldTime) {\n net.minecraft.nbt.NBTTagCompound PendingBlockUpdateRecord = new net.minecraft.nbt.NBTTagCompound();\n PendingBlockUpdateRecord.setInteger(\"String_Node_Str\", PendingBlockUpdate.xCoord);\n PendingBlockUpdateRecord.setInteger(\"String_Node_Str\", PendingBlockUpdate.yCoord);\n PendingBlockUpdateRecord.setInteger(\"String_Node_Str\", PendingBlockUpdate.zCoord);\n PendingBlockUpdateRecord.setInteger(\"String_Node_Str\", Block.getIdFromBlock(PendingBlockUpdate.func_151351_a()));\n PendingBlockUpdateRecord.setInteger(\"String_Node_Str\", (int) (PendingBlockUpdate.scheduledTime - WorldTime));\n PendingBlockUpdateRecord.setInteger(\"String_Node_Str\", PendingBlockUpdate.priority);\n PendingBlockUpdates.appendTag(PendingBlockUpdateRecord);\n}\n"
|
"protected IStatus run(IProgressMonitor monitor) {\n TacitFormComposite.setConsoleViewInFocus();\n TacitFormComposite.updateStatusMessage(getViewSite(), null, null, form);\n monitor.beginTask(\"String_Node_Str\", 100);\n Date dateObj = new Date();\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n outputDir = outputPath.getText();\n classificationInputDir = classifyInputText.getText();\n tempkValue = kValueText.getText();\n isPreprocessEnabled = preprocessEnabled.getSelection();\n isClassificationEnabled = classificationEnabled.getSelection();\n }\n });\n HashMap<Integer, String> perf;\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n NaiveBayesClassifierWeka cv;\n int kValue = Integer.parseInt(tempkValue);\n monitor.worked(1);\n if (isPreprocessEnabled) {\n monitor.subTask(\"String_Node_Str\");\n try {\n preprocessTask = new Preprocessor(\"String_Node_Str\", isPreprocessEnabled);\n for (String dirPath : classPaths.keySet()) {\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n List<String> allSelectedClassFiles = classPaths.get(dirPath);\n List<Object> tempFiles = new ArrayList<Object>();\n tempFiles.addAll(allSelectedClassFiles);\n List<String> preprocessedFilePaths = preprocessTask.processData(new File(dirPath).getName(), tempFiles);\n String preProcessedClassDir = null;\n if (!preprocessedFilePaths.isEmpty())\n preProcessedClassDir = new File(preprocessedFilePaths.get(0)).getParent();\n trainingDataPaths.add(preProcessedClassDir);\n tempClassPaths.put(preProcessedClassDir, preprocessedFilePaths);\n monitor.worked(1);\n }\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n if (isClassificationEnabled) {\n List<Object> files = new ArrayList<Object>();\n nbc.selectAllFiles(classificationInputDir, files);\n List<String> preprocessedFilePaths = preprocessTask.processData(new File(classificationInputDir).getName(), files);\n if (!preprocessedFilePaths.isEmpty())\n classificationInputDir = new File(preprocessedFilePaths.get(0)).getParent();\n monitor.worked(1);\n }\n } catch (Exception e) {\n return handleException(monitor, e, \"String_Node_Str\");\n }\n monitor.worked(10);\n } else {\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n try {\n nbc.createTempDirectories(classPaths, trainingDataPaths, monitor);\n } catch (IOException e) {\n return handleException(monitor, e, \"String_Node_Str\");\n }\n monitor.worked(10);\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n }\n try {\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n monitor.subTask(\"String_Node_Str\");\n if (!isPreprocessEnabled) {\n cv = new NaiveBayesClassifierWeka(classPaths);\n } else {\n cv = new NaiveBayesClassifierWeka(tempClassPaths);\n }\n try {\n cv.initializeInstances();\n cv.doCrossValidate(kValue, monitor, dateObj);\n } catch (IllegalArgumentException iae) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handleException(monitor, iae, \"String_Node_Str\");\n }\n monitor.worked(40);\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n if (isClassificationEnabled) {\n monitor.subTask(\"String_Node_Str\");\n ConsoleView.printlInConsoleln(\"String_Node_Str\");\n cv.doClassify(classificationInputDir, outputDir, monitor, dateObj);\n ConsoleView.printlInConsoleln(\"String_Node_Str\");\n }\n monitor.worked(15);\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n if (!isPreprocessEnabled)\n nbc.deleteTempDirectories(trainingDataPaths);\n monitor.worked(10);\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n } catch (IOException e) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handleException(monitor, e, \"String_Node_Str\");\n } catch (EvalError e) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handleException(monitor, e, \"String_Node_Str\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (monitor.isCanceled()) {\n TacitFormComposite.writeConsoleHeaderBegining(\"String_Node_Str\");\n return handledCancelRequest(\"String_Node_Str\");\n }\n if (isPreprocessEnabled) {\n preprocessTask.clean();\n }\n monitor.worked(100);\n monitor.done();\n return Status.OK_STATUS;\n}\n"
|
"public void setFocused(HUDComponent component, boolean focused) {\n if (component != null) {\n component.changeTransparency(component.getTransparency(), focused ? focusedTransparency : ((component.getPreferredTransparency() != 1.0f) ? component.getPreferredTransparency() : unfocusedTransparency));\n }\n}\n"
|
"private String getAbrvFromUnit(String t, String s) {\n int i = 0;\n Converter[] u;\n if (t == \"String_Node_Str\")\n u = volUnits;\n else\n u = weightUnits;\n while (i < u.length && !u[i].unit.equalsIgnoreCase(s)) {\n i++;\n }\n if (i >= u.length)\n return null;\n else\n return u[i].abrv;\n}\n"
|
"public static DelegateAccountPo agentToPojo(Consensus<Agent> bean) {\n if (null == bean) {\n return null;\n }\n DelegateAccountPo po = new DelegateAccountPo();\n po.setAddress(bean.getAddress());\n po.setDeposit(bean.getExtend().getDeposit().getValue());\n po.setStartTime(bean.getExtend().getStartTime());\n po.setRemark(bean.getExtend().getIntroduction());\n po.setNodeAddress(bean.getExtend().getAgentAddress());\n po.setId(bean.getAddress());\n po.setStatus(bean.getExtend().getStatus());\n po.setAgentName(bean.getExtend().getAgentName());\n po.setCommissionRate(bean.getExtend().getCommissionRate());\n return po;\n}\n"
|
"private void addListeners() {\n if (WindowSystem.isGTK() && forceDrawLinksGtk) {\n table.addListener(SWT.Paint, new Listener() {\n public void handleEvent(Event event) {\n paintEvent(event);\n }\n });\n }\n ControlListener controlListener = new ControlListener() {\n public void controlMoved(ControlEvent e) {\n }\n public void controlResized(ControlEvent e) {\n backgroundRefresher.refreshBackgroundWithLimiter();\n }\n };\n table.addControlListener(controlListener);\n if (tableViewerCreator != null) {\n tableViewerCreator.getSelectionHelper().addAfterSelectionListener(new ILineSelectionListener() {\n public void handle(LineSelectionEvent e) {\n controlsLinker.updateLinksStyleAndControlsSelection(table, true);\n }\n });\n } else {\n tableSelectionListener = new SelectionListener() {\n\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n controlsLinker.updateLinksStyleAndControlsSelection(table, true);\n }\n });\n }\n ScrollBar vBarTable = table.getVerticalBar();\n SelectionListener scrollListener = new SelectionAdapter() {\n public void widgetSelected(SelectionEvent event) {\n backgroundRefresher.refreshBackgroundWithLimiter();\n }\n };\n vBarTable.addSelectionListener(scrollListener);\n}\n"
|
"public int run(String[] args) throws Exception {\n if (args.length < 3) {\n System.out.println(\"String_Node_Str\");\n System.exit(0);\n }\n Configuration conf = new Configuration();\n String outputPath = args[1];\n String input_file_type = args[2];\n conf.setStrings(\"String_Node_Str\", outputPath);\n conf.setStrings(\"String_Node_Str\", input_file_type);\n Job job = new Job(conf, \"String_Node_Str\");\n job.setJarByClass(AverageImage.class);\n job.setMapperClass(MyMapper.class);\n job.setReducerClass(MyReducer.class);\n job.setOutputKeyClass(IntWritable.class);\n job.setOutputValueClass(FloatImage.class);\n job.setMapOutputKeyClass(NullWritable.class);\n job.setMapOutputValueClass(FloatImage.class);\n removeDir(outputPath, conf);\n FileOutputFormat.setOutputPath(job, new Path(outputPath));\n JPEGFileInputFormat.addInputPath(job, new Path(args[0]));\n if (input_file_type.equals(\"String_Node_Str\"))\n job.setInputFormatClass(ImageBundleInputFormat.class);\n else if (input_file_type.equals(\"String_Node_Str\"))\n job.setInputFormatClass(JPEGFileInputFormat.class);\n else if (input_file_type.equals(\"String_Node_Str\"))\n job.setInputFormatClass(JPEGFileInputFormat.class);\n else if (input_file_type.equals(\"String_Node_Str\"))\n job.setInputFormatClass(JPEGSequenceFileInputFormat.class);\n else {\n System.out.println(\"String_Node_Str\");\n System.exit(0);\n }\n System.exit(job.waitForCompletion(true) ? 0 : 1);\n return 0;\n}\n"
|
"public void executeTask(final Map<String, Object> context) throws GenieException, IOException {\n final long start = System.nanoTime();\n try {\n final JobExecutionEnvironment jobExecEnv = (JobExecutionEnvironment) context.get(JobConstants.JOB_EXECUTION_ENV_KEY);\n final String jobWorkingDirectory = jobExecEnv.getJobWorkingDir().getCanonicalPath();\n final Writer writer = (Writer) context.get(JobConstants.WRITER_KEY);\n final String jobId = jobRequest.getId().orElseThrow(() -> new GeniePreconditionException(\"String_Node_Str\"));\n log.info(\"String_Node_Str\", jobId);\n try {\n writer.flush();\n writer.close();\n } catch (IOException e) {\n throw new GenieServerException(\"String_Node_Str\" + e);\n }\n final String runScript = jobWorkingDirectory + JobConstants.FILE_PATH_DELIMITER + JobConstants.GENIE_JOB_LAUNCHER_SCRIPT;\n if (this.isUserCreationEnabled) {\n final String user = jobExecEnv.getJobRequest().getUser();\n this.createUser(user, jobExecEnv.getJobRequest().getGroup().orElse(null));\n }\n final List<String> command = new ArrayList<>();\n if (this.isRunAsUserEnabled) {\n changeOwnershipOfDirectory(jobWorkingDirectory, jobExecEnv.getJobRequest().getUser());\n makeDirGroupWritable(jobWorkingDirectory + \"String_Node_Str\");\n command.add(\"String_Node_Str\");\n command.add(\"String_Node_Str\");\n command.add(jobExecEnv.getJobRequest().getUser());\n }\n if (SystemUtils.IS_OS_LINUX) {\n command.add(\"String_Node_Str\");\n }\n command.add(runScript);\n final ProcessBuilder pb = new ProcessBuilder(command);\n pb.directory(jobExecEnv.getJobWorkingDir());\n pb.redirectOutput(new File(jobExecEnv.getJobWorkingDir() + JobConstants.GENIE_LOG_PATH));\n pb.redirectError(new File(jobExecEnv.getJobWorkingDir() + JobConstants.GENIE_LOG_PATH));\n try {\n final Process process = pb.start();\n final int processId = this.getProcessId(process);\n final JobRequest request = jobExecEnv.getJobRequest();\n final Calendar calendar = Calendar.getInstance(UTC);\n calendar.add(Calendar.SECOND, request.getTimeout().orElse(JobRequest.DEFAULT_TIMEOUT_DURATION));\n final JobExecution jobExecution = new JobExecution.Builder(this.hostname).withId(jobId).withProcessId(processId).withCheckDelay(jobExecEnv.getCommand().getCheckDelay()).withTimeout(calendar.getTime()).withMemory(jobExecEnv.getMemory()).build();\n context.put(JobConstants.JOB_EXECUTION_DTO_KEY, jobExecution);\n } catch (final IOException ie) {\n throw new GenieServerException(\"String_Node_Str\" + String.valueOf(command), ie);\n }\n log.info(\"String_Node_Str\", jobExecEnv.getJobRequest().getId());\n } finally {\n final long finish = System.nanoTime();\n this.timer.record(finish - start, TimeUnit.NANOSECONDS);\n }\n}\n"
|
"public String getURL() {\n int selectedPrefix = prefixURLSpinner.getSelectedItemPosition();\n String url = profileLocation.getText().toString();\n if (url == null || url.length() == 0) {\n return url;\n }\n if (selectedPrefix < prefixURLSpinner.getCount() - 1) {\n url = prefixURLSpinner.getSelectedItem() + \"String_Node_Str\" + url;\n } else {\n if (BuildConfig.DEBUG) {\n if (!(prefixURLSpinner.getSelectedItem().toString().equalsIgnoreCase(\"String_Node_Str\"))) {\n throw new AssertionError(\"String_Node_Str\");\n }\n }\n if (url.indexOf(\"String_Node_Str\") == -1) {\n url = \"String_Node_Str\" + url;\n }\n }\n return url;\n}\n"
|
"public void startTestJob(ITestJobPO testJob, Locale locale, boolean autoScreenshot) {\n TestExecution.getInstance().setStartedTestJob(testJob);\n m_testjobStartTime = new Date();\n try {\n final AtomicBoolean isTestExecutionFailed = new AtomicBoolean(false);\n final AtomicInteger testExecutionMessageId = new AtomicInteger(0);\n final AtomicInteger testExecutionState = new AtomicInteger(0);\n final AtomicBoolean isTestExecutionFinished = new AtomicBoolean(false);\n ITestExecutionEventListener executionListener = new ITestExecutionEventListener() {\n public void stateChanged(TestExecutionEvent event) {\n testExecutionState.set(event.getState());\n if (event.getState() == TestExecutionEvent.TEST_EXEC_FAILED) {\n if (event.getException() instanceof JBException) {\n JBException e = (JBException) event.getException();\n testExecutionMessageId.set(e.getErrorId());\n }\n isTestExecutionFailed.set(true);\n testExecutionFinished();\n }\n }\n public void endTestExecution() {\n testExecutionFinished();\n }\n private void testExecutionFinished() {\n isTestExecutionFinished.set(true);\n removeTestExecutionEventListener(this);\n }\n };\n List<INodePO> refTestSuiteList = testJob.getUnmodifiableNodeList();\n for (INodePO node : refTestSuiteList) {\n IRefTestSuitePO refTestSuite = (IRefTestSuitePO) node;\n isTestExecutionFailed.set(false);\n isTestExecutionFinished.set(false);\n addTestExecutionEventListener(executionListener);\n AutIdentifier autId = new AutIdentifier(refTestSuite.getTestSuiteAutID());\n String testSuiteGuid = refTestSuite.getTestSuiteGuid();\n ITestSuitePO testSuite = NodePM.getTestSuite(testSuiteGuid);\n startTestSuite(testSuite, locale, autId, autoScreenshot);\n while (!isTestExecutionFinished.get()) {\n TimeUtil.delay(500);\n }\n if (!continueTestJobExecution(testExecutionState, testExecutionMessageId)) {\n break;\n }\n }\n } finally {\n TestExecution.getInstance().setStartedTestJob(null);\n }\n}\n"
|
"private List<Class<?>> scanClassAndPutMetadata(InputStream bits, Reader reader, Map<String, EntityMetadata> entityMetadataMap, Map<String, Class<?>> entityNameToClassMap, String persistenceUnit, String client, Map<String, List<String>> clazzToPuMap, Map<String, IdDiscriptor> entityNameToKeyDiscriptorMap) throws IOException {\n DataInputStream dstream = new DataInputStream(new BufferedInputStream(bits));\n ClassFile cf = null;\n String className = null;\n List<Class<?>> classes = new ArrayList<Class<?>>();\n try {\n cf = new ClassFile(dstream);\n className = cf.getName();\n List<String> annotations = new ArrayList<String>();\n reader.accumulateAnnotations(annotations, (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.visibleTag));\n reader.accumulateAnnotations(annotations, (AnnotationsAttribute) cf.getAttribute(AnnotationsAttribute.invisibleTag));\n for (String validAnn : reader.getValidAnnotations()) {\n if (annotations.contains(validAnn)) {\n Class<?> clazz = this.getClass().getClassLoader().loadClass(className);\n if (entityNameToClassMap.containsKey(clazz.getSimpleName()) && !entityNameToClassMap.get(clazz.getSimpleName()).getName().equals(clazz.getName())) {\n throw new MetamodelLoaderException(\"String_Node_Str\" + entityNameToClassMap.get(clazz.getSimpleName()).getName() + \"String_Node_Str\" + clazz.getName() + \"String_Node_Str\" + \"String_Node_Str\" + persistenceUnit);\n }\n entityNameToClassMap.put(clazz.getSimpleName(), clazz);\n EntityMetadata metadata = entityMetadataMap.get(clazz);\n if (null == metadata) {\n log.debug(\"String_Node_Str\" + clazz.getName());\n synchronized (clazz) {\n if (null == metadata) {\n MetadataBuilder metadataBuilder = new MetadataBuilder(persistenceUnit, client, KunderaCoreUtils.getExternalProperties(persistenceUnit, externalPropertyMap, persistenceUnits));\n metadata = metadataBuilder.buildEntityMetadata(clazz);\n if (metadata != null) {\n entityMetadataMap.put(clazz.getName(), metadata);\n mapClazztoPu(clazz, persistenceUnit, clazzToPuMap);\n processGeneratedValueAnnotation(clazz, persistenceUnit, metadata, entityNameToKeyDiscriptorMap);\n }\n }\n }\n }\n onValidateClientProperties(classes, clazz, persistenceUnit);\n }\n }\n } catch (ClassNotFoundException e) {\n log.error(\"String_Node_Str\" + className + \"String_Node_Str\");\n } finally {\n dstream.close();\n bits.close();\n }\n return classes;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.