content stringlengths 40 137k |
|---|
"public boolean onDoubleTap(MotionEvent e) {\n OnChartGestureListener l = mChart.getOnChartGestureListener();\n if (l != null) {\n l.onChartDoubleTapped(e);\n return super.onDoubleTap(e);\n }\n if (mChart.isDoubleTapToZoomEnabled()) {\n PointF trans = getTrans(e.getX(), e.getY());\n mChart.zoom(mChart.isScaleXEnabled() ? 1.4f : 1f, mChart.isScaleYEnabled() ? 1.4f : 1f, trans.x, trans.y);\n if (mChart.isLogEnabled())\n Log.i(\"String_Node_Str\", \"String_Node_Str\" + trans.x + \"String_Node_Str\" + trans.y);\n }\n return super.onDoubleTap(e);\n}\n"
|
"public void setLong(Property property, long value) {\n convertValueAndSet(property, value);\n}\n"
|
"private void renderEnchantment() {\n float tickModifier = (float) (Minecraft.getSystemTime() % 3000L) / 3000.0F * 48.0F;\n renderer.bindTextureByName(\"String_Node_Str\");\n GL11.glEnable(GL11.GL_BLEND);\n float var20 = 0.5F;\n GL11.glColor4f(var20, var20, var20, 1.0F);\n GL11.glDepthFunc(GL11.GL_EQUAL);\n GL11.glDepthMask(false);\n for (int var21 = 0; var21 < 2; ++var21) {\n GL11.glDisable(GL11.GL_LIGHTING);\n float var22 = 0.76F;\n GL11.glColor4f(0.5F * var22, 0.25F * var22, 0.8F * var22, 1.0F);\n GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);\n GL11.glMatrixMode(GL11.GL_TEXTURE);\n GL11.glLoadIdentity();\n float var23 = tickModifier * (0.001F + (float) var21 * 0.003F) * 20.0F;\n float var24 = 0.33333334F;\n GL11.glScalef(var24, var24, var24);\n GL11.glRotatef(30.0F - (float) var21 * 60.0F, 0.0F, 0.0F, 1.0F);\n GL11.glTranslatef(0.0F, var23, 0.0F);\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n renderAll();\n }\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n GL11.glMatrixMode(GL11.GL_TEXTURE);\n GL11.glDepthMask(true);\n GL11.glLoadIdentity();\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n GL11.glEnable(GL11.GL_LIGHTING);\n GL11.glDisable(GL11.GL_BLEND);\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n}\n"
|
"public RenderedImage create(ParameterBlock args, RenderingHints hints) {\n ImageLayout layout = RIFUtil.getImageLayoutHint(hints);\n Interpolation interp = (Interpolation) args.getObjectParameter(3);\n double[] backgroundValues = (double[]) args.getObjectParameter(4);\n RenderedImage source = args.getRenderedSource(0);\n if (!MediaLibAccessor.isMediaLibCompatible(args, layout) || !MediaLibAccessor.hasSameNumBands(args, layout) || source.getTileWidth() >= 32768 || source.getTileHeight() >= 32768) {\n return null;\n }\n BorderExtender extender = RIFUtil.getBorderExtenderHint(hints);\n float x_center = args.getFloatParameter(0);\n float y_center = args.getFloatParameter(1);\n float angle = args.getFloatParameter(2);\n double tmp_angle = 180.0F * angle / Math.PI;\n double rnd_angle = Math.round(tmp_angle);\n if (Math.abs(rnd_angle - tmp_angle) < 0.0001) {\n int dangle = (int) rnd_angle % 360;\n if (dangle < 0) {\n dangle += 360;\n }\n if (dangle == 0) {\n return new MlibCopyOpImage(source, hints, layout);\n }\n int ix_center = (int) Math.round(x_center);\n int iy_center = (int) Math.round(y_center);\n if (((dangle % 90) == 0) && (Math.abs(x_center - ix_center) < 0.0001) && (Math.abs(y_center - iy_center) < 0.0001)) {\n int transType = -1;\n int rotMinX = 0;\n int rotMinY = 0;\n int sourceMinX = source.getMinX();\n int sourceMinY = source.getMinY();\n int sourceMaxX = sourceMinX + source.getWidth();\n int sourceMaxY = sourceMinY + source.getHeight();\n if (dangle == 90) {\n transType = 4;\n rotMinX = ix_center - (sourceMaxY - iy_center);\n rotMinY = iy_center - (ix_center - sourceMinX);\n } else if (dangle == 180) {\n transType = 5;\n rotMinX = 2 * ix_center - sourceMaxX;\n rotMinY = 2 * iy_center - sourceMaxY;\n } else {\n transType = 6;\n rotMinX = ix_center - (iy_center - sourceMinY);\n rotMinY = iy_center - (sourceMaxX - ix_center);\n }\n RenderedImage trans = new MlibTransposeOpImage(source, hints, layout, transType);\n int imMinX = trans.getMinX();\n int imMinY = trans.getMinY();\n if (layout == null) {\n OpImage intermediateImage = new TranslateIntOpImage(trans, hints, rotMinX - imMinX, rotMinY - imMinY);\n try {\n return new PointMapperOpImage(intermediateImage, hints, transform);\n } catch (NoninvertibleTransformException nite) {\n return intermediateImage;\n }\n } else {\n ParameterBlock pbScale = new ParameterBlock();\n pbScale.addSource(trans);\n pbScale.add(0F);\n pbScale.add(0F);\n pbScale.add(rotMinX - imMinX);\n pbScale.add(rotMinY - imMinY);\n pbScale.add(interp);\n return JAI.create(\"String_Node_Str\", pbScale, hints);\n }\n }\n }\n AffineTransform transform = AffineTransform.getRotateInstance(angle, x_center, y_center);\n if (interp instanceof InterpolationNearest) {\n return new MlibAffineNearestOpImage(source, extender, hints, layout, transform, interp, backgroundValues);\n } else if (interp instanceof InterpolationBilinear) {\n return new MlibAffineBilinearOpImage(source, extender, hints, layout, transform, interp, backgroundValues);\n } else if (interp instanceof InterpolationBicubic || interp instanceof InterpolationBicubic2) {\n return new MlibAffineBicubicOpImage(source, extender, hints, layout, transform, interp, backgroundValues);\n } else if (interp instanceof InterpolationTable) {\n return new MlibAffineTableOpImage(source, extender, hints, layout, transform, interp, backgroundValues);\n } else {\n return null;\n }\n}\n"
|
"public ImmutableSet<FactoryMethodDescriptor> visitExecutableAsConstructor(ExecutableElement e, Void p) {\n return ImmutableSet.of(generateDescriptorForConstructor(declaration, e));\n}\n"
|
"public int select0(int count) {\n if (count > size0)\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 c = count - 1;\n int ci = bvD.rank1(c) - 1;\n int u = ci + arS[bvR.rank1(ci) - 1];\n if (u != 0) {\n int ui = u * 8;\n int r = rank0(ui - 1);\n int bi = u % 8;\n return ui + BITPOS0[(int) ((longs[u / 8] >>> ((7 - bi) * 8)) & 0xff)][c - r];\n } else {\n return find0(longs[0], c);\n }\n}\n"
|
"public Object getParent(Object model) {\n ExtendedItemHandle element = (ExtendedItemHandle) model;\n try {\n CrosstabCellHandle cell = (CrosstabCellHandle) element.getReportItem();\n if (cell.getContainer() != null) {\n if (cell.getContainer() instanceof MeasureViewHandle) {\n MeasureViewHandle measure = (MeasureViewHandle) cell.getContainer();\n PropertyHandle property = cell.getModelHandle().getContainerPropertyHandle();\n return measure.getModelHandle().getPropertyHandle(property.getPropertyDefn().getName());\n } else if (cell.getContainer() instanceof LevelViewHandle || cell.getContainer() instanceof CrosstabViewHandle || cell.getContainer() instanceof CrosstabReportItemHandle) {\n return cell.getContainer().getModelHandle();\n }\n }\n } catch (ExtendedElementException e) {\n }\n return null;\n}\n"
|
"public RiakFuture getStream(String key, Range range, StreamResponseHandler handler) {\n notNull(key, \"String_Node_Str\");\n notNull(range, \"String_Node_Str\");\n notNull(handler, \"String_Node_Str\");\n HttpRequest request = buildGetStreamRequest(key);\n request.setHeader(HttpHeaders.Names.RANGE, range.toRangeSpec());\n final String procedure = \"String_Node_Str\";\n return _getStream(procedure, request, handler);\n}\n"
|
"private int decodeBytecodeInstruction(int index, int stackLen, byte[] stackWords) throws InvalidBytecodeException {\n int opcode = code[index] & 0xFF;\n Instruction i = simpleInstructions[opcode];\n if (i != null) {\n decoded.add(i);\n return index + 1;\n }\n boolean wide = false;\n while (true) {\n index++;\n switch(opcode) {\n case OP_nop:\n break;\n case OP_bipush:\n i = ConstantInstruction.make(code[index]);\n index++;\n break;\n case OP_sipush:\n i = ConstantInstruction.make(decodeShort(index));\n index += 2;\n break;\n case OP_ldc:\n i = makeConstantPoolLoad(code[index] & 0xFF);\n index++;\n break;\n case OP_ldc_w:\n i = makeConstantPoolLoad(decodeShort(index));\n index += 2;\n break;\n case OP_ldc2_w:\n i = makeConstantPoolLoad(decodeShort(index));\n index += 2;\n break;\n case OP_iload:\n case OP_lload:\n case OP_fload:\n case OP_dload:\n case OP_aload:\n i = LoadInstruction.make(indexedTypes[opcode - OP_iload], wide ? decodeUShort(index) : (code[index] & 0xFF));\n index += wide ? 2 : 1;\n break;\n case OP_istore:\n case OP_lstore:\n case OP_fstore:\n case OP_dstore:\n case OP_astore:\n i = StoreInstruction.make(indexedTypes[opcode - OP_istore], wide ? decodeUShort(index) : (code[index] & 0xFF));\n index += wide ? 2 : 1;\n break;\n case OP_pop2:\n i = PopInstruction.make(elemCount(stackWords, stackLen - 1));\n break;\n case OP_dup_x2:\n i = DupInstruction.make(1, elemCount(stackWords, stackLen - 2));\n break;\n case OP_dup2:\n i = DupInstruction.make(elemCount(stackWords, stackLen - 1), 0);\n break;\n case OP_dup2_x1:\n i = DupInstruction.make(elemCount(stackWords, stackLen - 1), 1);\n break;\n case OP_dup2_x2:\n {\n int twoDown = elemCount(stackWords, stackLen - 1);\n i = DupInstruction.make(twoDown, elemCount(stackWords, stackLen - twoDown - 1));\n break;\n }\n case OP_iinc:\n {\n int v = wide ? decodeUShort(index) : (code[index] & 0xFF);\n int c = wide ? decodeShort(index + 2) : code[index + 1];\n decoded.add(LoadInstruction.make(TYPE_int, v));\n decoded.add(ConstantInstruction.make(c));\n decoded.add(BinaryOpInstruction.make(TYPE_int, Operator.ADD));\n i = StoreInstruction.make(TYPE_int, v);\n index += wide ? 4 : 2;\n break;\n }\n case OP_ifeq:\n case OP_ifne:\n case OP_iflt:\n case OP_ifle:\n case OP_ifgt:\n case OP_ifge:\n decoded.add(makeZero);\n i = ConditionalBranchInstruction.make(TYPE_int, ConditionalBranchInstruction.Operator.values()[opcode - OP_ifeq], (index - 1) + decodeShort(index));\n index += 2;\n break;\n case OP_if_icmpeq:\n case OP_if_icmpne:\n case OP_if_icmplt:\n case OP_if_icmple:\n case OP_if_icmpgt:\n case OP_if_icmpge:\n i = ConditionalBranchInstruction.make((short) opcode, (index - 1) + decodeShort(index));\n index += 2;\n break;\n case OP_if_acmpeq:\n case OP_if_acmpne:\n i = ConditionalBranchInstruction.make(TYPE_Object, ConditionalBranchInstruction.Operator.values()[opcode - OP_if_acmpeq], (index - 1) + decodeShort(index));\n index += 2;\n break;\n case OP_goto:\n i = GotoInstruction.make((index - 1) + decodeShort(index));\n index += 2;\n break;\n case OP_jsr:\n {\n index += 2;\n break;\n }\n case OP_jsr_w:\n {\n index += 4;\n break;\n }\n case OP_ret:\n int v = wide ? decodeUShort(index) : (code[index] & 0xFF);\n i = GotoInstruction.make(-1 - v);\n if (retInfo == null) {\n throw new InvalidBytecodeException(\"String_Node_Str\");\n }\n retInfo[index - (wide ? 2 : 1)] = new RetInfo(-1, v, stackLen, stackWords);\n index += wide ? 2 : 1;\n break;\n case OP_tableswitch:\n {\n int start = index - 1;\n while ((index & 3) != 0) {\n index++;\n }\n int def = start + decodeInt(index);\n int low = decodeInt(index + 4);\n int high = decodeInt(index + 8);\n int[] t = new int[(high - low + 1) * 2];\n for (int j = 0; j < t.length; j += 2) {\n t[j] = j / 2 + low;\n t[j + 1] = start + decodeInt(index + 12 + j * 2);\n }\n i = SwitchInstruction.make(t, def);\n index += 12 + (high - low + 1) * 4;\n break;\n }\n case OP_lookupswitch:\n {\n int start = index - 1;\n while ((index & 3) != 0) {\n index++;\n }\n int def = start + decodeInt(index);\n int n = decodeInt(index + 4);\n int[] t = new int[n * 2];\n for (int j = 0; j < t.length; j += 2) {\n t[j] = decodeInt(index + 8 + j * 4);\n t[j + 1] = start + decodeInt(index + 12 + j * 4);\n }\n i = SwitchInstruction.make(t, def);\n index += 8 + n * 8;\n break;\n }\n case OP_getstatic:\n case OP_getfield:\n {\n int f = decodeUShort(index);\n i = GetInstruction.make(constantPool, f, opcode == OP_getstatic);\n index += 2;\n break;\n }\n case OP_putstatic:\n case OP_putfield:\n {\n int f = decodeUShort(index);\n i = PutInstruction.make(constantPool, f, opcode == OP_putstatic);\n index += 2;\n break;\n }\n case OP_invokevirtual:\n case OP_invokespecial:\n case OP_invokestatic:\n {\n int m = decodeUShort(index);\n i = InvokeInstruction.make(constantPool, m, opcode);\n index += 2;\n break;\n }\n case OP_invokeinterface:\n {\n int m = decodeUShort(index);\n i = InvokeInstruction.make(constantPool, m, opcode);\n index += 4;\n break;\n }\n case OP_invokedynamic:\n {\n int m = decodeUShort(index);\n i = InvokeDynamicInstruction.make(constantPool, m, opcode);\n index += 4;\n break;\n }\n case OP_new:\n i = NewInstruction.make(constantPool.getConstantPoolClassType(decodeUShort(index)), 0);\n index += 2;\n break;\n case OP_newarray:\n i = NewInstruction.make(Util.makeArray(getPrimitiveType(code[index])), 1);\n index++;\n break;\n case OP_anewarray:\n i = NewInstruction.make(Util.makeArray(constantPool.getConstantPoolClassType(decodeUShort(index))), 1);\n index += 2;\n break;\n case OP_checkcast:\n i = CheckCastInstruction.make(constantPool.getConstantPoolClassType(decodeUShort(index)));\n index += 2;\n break;\n case OP_instanceof:\n i = InstanceofInstruction.make(constantPool.getConstantPoolClassType(decodeUShort(index)));\n index += 2;\n break;\n case OP_wide:\n wide = true;\n opcode = code[index] & 0xFF;\n continue;\n case OP_multianewarray:\n i = NewInstruction.make(constantPool.getConstantPoolClassType(decodeUShort(index)), code[index + 2] & 0xFF);\n index += 3;\n break;\n case OP_ifnull:\n case OP_ifnonnull:\n decoded.add(ConstantInstruction.make(TYPE_Object, null));\n i = ConditionalBranchInstruction.make(TYPE_Object, ConditionalBranchInstruction.Operator.values()[opcode - OP_ifnull], (index - 1) + decodeShort(index));\n index += 2;\n break;\n case OP_goto_w:\n i = GotoInstruction.make((index - 1) + decodeInt(index));\n index += 4;\n break;\n default:\n throw new InvalidBytecodeException(\"String_Node_Str\" + opcode);\n }\n break;\n }\n if (i != null) {\n decoded.add(i);\n }\n return index;\n}\n"
|
"public synchronized SimpleCacheSpan startReadWriteNonBlocking(String key, long position) throws CacheException {\n SimpleCacheSpan cacheSpan = getSpan(key, position);\n if (cacheSpan.isCached) {\n SimpleCacheSpan newCacheSpan = index.get(key).touch(cacheSpan);\n notifySpanTouched(cacheSpan, newCacheSpan);\n return newCacheSpan;\n }\n CachedContent cachedContent = index.getOrAdd(key);\n if (!cachedContent.isLocked()) {\n cachedContent.setLocked(true);\n return cacheSpan;\n }\n return null;\n}\n"
|
"public boolean equalsAsOption(PossibleAction action) {\n if (!(action.getClass() == LayTile.class))\n return false;\n LayTile a = (LayTile) action;\n return (a.locationNames == null && locationNames == null || a.locationNames.equals(locationNames)) && a.type == type && a.tileColours == tileColours && a.tiles == tiles && a.specialProperty == specialProperty;\n}\n"
|
"public SearchingRecordIterator getRecordIterator(String tableName, byte[] mustStartWith, byte[] startSearchingAt, DatabaseSession databaseSession) throws BimserverLockConflictException, BimserverDatabaseException {\n Cursor cursor = null;\n try {\n cursor = getDatabase(tableName).openCursor(getTransaction(databaseSession), cursorConfig);\n return new BerkeleySearchingRecordIterator(cursor, mustStartWith, startSearchingAt);\n } catch (BimserverLockConflictException e) {\n if (cursor != null) {\n try {\n cursor.close();\n throw e;\n } catch (DatabaseException e1) {\n LOGGER.error(\"String_Node_Str\", e1);\n }\n }\n } catch (DatabaseException e1) {\n LOGGER.error(\"String_Node_Str\", e1);\n }\n return null;\n}\n"
|
"private void maybeFinishPrepare() {\n if (released || prepared || seekMap == null || !tracksBuilt) {\n return;\n }\n int trackCount = sampleQueues.size();\n for (int i = 0; i < trackCount; i++) {\n if (sampleQueues.valueAt(i).getUpstreamFormat() == null) {\n return;\n }\n }\n loadCondition.close();\n TrackGroup[] trackArray = new TrackGroup[trackCount];\n trackEnabledStates = new boolean[trackCount];\n durationUs = seekMap.getDurationUs();\n for (int i = 0; i < trackCount; i++) {\n Format trackFormat = sampleQueues.valueAt(i).getUpstreamFormat();\n trackArray[i] = new TrackGroup(trackFormat);\n String mimeType = trackFormat.sampleMimeType;\n boolean isAudioVideo = MimeTypes.isVideo(mimeType) || MimeTypes.isAudio(mimeType);\n trackIsAudioVideoFlags[i] = isAudioVideo;\n haveAudioVideoTracks |= isAudioVideo;\n }\n tracks = new TrackGroupArray(trackArray);\n prepared = true;\n sourceListener.onSourceInfoRefreshed(new SinglePeriodTimeline(durationUs, seekMap.isSeekable()), null);\n callback.onPrepared(this);\n}\n"
|
"private void createFormArea(Composite parent) {\n final IObservableValue master = new WritableValue();\n IObservableValue treeObs = ViewerProperties.singleSelection().observe(viewer);\n treeObs.addValueChangeListener(new IValueChangeListener() {\n public void handleValueChange(ValueChangeEvent event) {\n if (event.diff.getNewValue() instanceof Project) {\n master.setValue(event.diff.getNewValue());\n }\n }\n });\n ctx = new EMFDataBindingContext();\n addStatusSupport(ctx);\n form = toolkit.createForm(parent);\n toolkit.decorateFormHeading(form);\n form.setText(\"String_Node_Str\");\n Composite body = form.getBody();\n body.setLayout(new GridLayout(2, false));\n IWidgetValueProperty prop = WidgetProperties.text(SWT.Modify);\n {\n final IEMFValueProperty shortProp = EMFEditProperties.value(editingDomain, ProjectPackage.Literals.PROJECT__SHORTNAME);\n ;\n toolkit.createLabel(body, \"String_Node_Str\");\n Text t = toolkit.createText(body, \"String_Node_Str\");\n t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n ctx.bindValue(prop.observeDelayed(400, t), shortProp.observeDetail(master));\n final IEMFValueProperty longProp = EMFEditProperties.value(editingDomain, ProjectPackage.Literals.PROJECT__LONGNAME);\n toolkit.createLabel(body, \"String_Node_Str\");\n t = toolkit.createText(body, \"String_Node_Str\");\n t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n ctx.bindValue(prop.observeDelayed(400, t), longProp.observeDetail(master));\n ctx.bindValue(FormTextProperty.create().observe(form), new ComputedValue() {\n private IObservableValue shortname = shortProp.observeDetail(master);\n private IObservableValue longname = longProp.observeDetail(master);\n protected Object calculate() {\n return shortname.getValue() + \"String_Node_Str\" + longname.getValue();\n }\n });\n }\n {\n IEMFValueProperty mProp = EMFEditProperties.value(editingDomain, ProjectPackage.Literals.PROJECT__START);\n toolkit.createLabel(body, \"String_Node_Str\");\n Text t = toolkit.createText(body, \"String_Node_Str\");\n t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n ctx.bindValue(prop.observeDelayed(400, t), mProp.observeDetail(master), new EMFUpdateValueStrategy().setConverter(new StringToDateConverter(NLSMessages.ProjectAdminViewPart_StartDateNotParseable)), new EMFUpdateValueStrategy().setConverter(new DateToStringConverter()));\n }\n {\n IEMFValueProperty mProp = EMFEditProperties.value(editingDomain, ProjectPackage.Literals.PROJECT__END);\n toolkit.createLabel(body, \"String_Node_Str\");\n Text t = toolkit.createText(body, \"String_Node_Str\");\n t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n ctx.bindValue(prop.observeDelayed(400, t), mProp.observeDetail(master), new EMFUpdateValueStrategy().setConverter(new StringToDateConverter(NLSMessages.ProjectAdminViewPart_EndDateNotParseable)), new EMFUpdateValueStrategy().setConverter(new DateToStringConverter()));\n }\n addTabArea(ctx, master, body);\n body.setBackgroundMode(SWT.INHERIT_DEFAULT);\n}\n"
|
"public SimulatedRead getNextRead() throws IOException {\n SimulatedRead read;\n final String nameLine = fastqBr.readLine();\n if (nameLine == null || nameLine.trim().length() < 1)\n return null;\n ArtAlnRecord alnRecord;\n if ((alnRecord = artAlnR.getNextAln()) == null)\n return null;\n final String[] nameFields = nameLine.trim().substring(1).split(\"String_Node_Str\");\n read = new SimulatedRead();\n read.fragment = Integer.parseInt(nameFields[nameFields.length - 1]);\n read.setReadId(nameFields[nameFields.length - 2]);\n read.sequence = fastqBr.readLine().trim();\n if (forceFiveBaseEncoding) {\n read.sequence = nonACGTPattern.matcher(read.sequence).replaceAll(\"String_Node_Str\");\n }\n fastqBr.readLine();\n read.quality = fastqBr.readLine().trim();\n if (read.fragment == 1) {\n read.locs1.add(new GenomeLocation(alnRecord.chromosome, alnRecord.location, alnRecord.direction));\n read.origLocs1.add(new GenomeLocation(alnRecord.chromosome, alnRecord.location, alnRecord.direction));\n read.alignedBases1 = alnRecord.alignedBases;\n } else {\n read.locs2.add(new GenomeLocation(alnRecord.chromosome, alnRecord.location, alnRecord.direction));\n read.origLocs2.add(new GenomeLocation(alnRecord.chromosome, alnRecord.location, alnRecord.direction));\n read.alignedBases2 = alnRecord.alignedBases;\n }\n return read;\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (!super.equals(obj))\n return false;\n if (getClass() != obj.getClass())\n return false;\n Module other = (Module) obj;\n if (definition == null) {\n if (other.definition != null)\n return false;\n } else if (!definition.equals(other.definition)) {\n if (getDefinition() == null || other.getDefinition() == null || !getDefinition().equals(other.getDefinition())) {\n return false;\n }\n }\n if (mapsTos == null) {\n if (other.mapsTos != null)\n return false;\n } else if (!mapsTos.equals(other.mapsTos))\n return false;\n return true;\n}\n"
|
"public <T extends Loadable> long startLoading(T loadable, Callback<T> callback, int minRetryCount) {\n Looper looper = Looper.myLooper();\n Assertions.checkState(looper != null);\n long startTimeMs = SystemClock.elapsedRealtime();\n new LoadTask<>(looper, loadable, callback, defaultMinRetryCount, startTimeMs).start(0);\n return startTimeMs;\n}\n"
|
"public MinHashSearch getMatchSearch(SequenceSketchStreamer hashStreamer) throws IOException {\n return new MinHashSearch(hashStreamer, this.numHashes, this.numMinMatches, this.numThreads, false, this.minStoreLength, this.maxShift, this.acceptScore, this.alignmentOffset);\n}\n"
|
"public String getText(Object obj) {\n if (obj == null) {\n return \"String_Node_Str\";\n }\n if (obj instanceof ImpactNode) {\n return ((ImpactNode) obj).toString();\n } else if (obj instanceof IFile) {\n IFile file = (IFile) obj;\n ModelElement modelElement = ModelElementFileFactory.getModelElement(file);\n String name = modelElement != null ? PropertyHelper.getProperty(modelElement).getDisplayName() : file.getName();\n return name;\n } else if (obj instanceof RepositoryViewObject) {\n return ((IRepositoryViewObject) obj).getLabel();\n }\n return ((ModelElement) obj).getName();\n}\n"
|
"void getStrings(StringArray array, ArrayList<Person> persons, int begin, int number){\n\tfor (int i = begin; i < number + begin; i++){\n\t\tPerson p = persons.get(i);\n\t\tarray.addString(p == null ? \"null\" : p.toString());\n\t}\n}\n"
|
"public void runOpMode() throws InterruptedException {\n strafeAlignController = new PIDController(STRAFE_ALIGN_PID);\n dashboard = RobotDashboard.getInstance();\n telemetry = new MultipleTelemetry(telemetry, dashboard.getTelemetry());\n drive = new MecanumDrive(hardwareMap, telemetry);\n drive.setEstimatedPose(new Pose2d(48, -48, Math.PI));\n camera = new VuforiaCamera();\n cryptoboxTracker = new CryptoboxTracker(AllianceColor.BLUE);\n cryptoboxLocalizer = new CryptoboxLocalizer(cryptoboxTracker, camera.getProperties(), drive);\n cryptoboxTracker.disable();\n fpsTracker = new FpsTracker();\n camera.addTracker(cryptoboxTracker);\n camera.addTracker(fpsTracker);\n camera.initialize();\n waitForStart();\n drive.followPath(new PathBuilder(new Pose2d(48, -48, Math.PI)).lineTo(new Vector2d(12, -48)).turn(-Math.PI / 2).lineTo(new Vector2d(12, -12)).build());\n waitForPathFollower();\n while (opModeIsActive()) {\n int choice = (int) (3 * Math.random());\n choice--;\n Vector2d v = new Vector2d(12 + choice * CryptoboxTracker.ACTUAL_RAIL_GAP, -60);\n if (USE_VISION) {\n cryptoboxTracker.enable();\n }\n sleep(1500);\n if (USE_VISION) {\n cryptoboxTracker.disable();\n }\n if (STRAFE_ALIGN) {\n drive.enableHeadingCorrection();\n drive.setTargetHeading(Math.PI / 2);\n strafeAlignController.reset();\n strafeAlignController.setSetpoint(v.x());\n while (opModeIsActive()) {\n double error = strafeAlignController.getError(drive.getEstimatedPose().x());\n if (Math.abs(error) < 1.5) {\n drive.stop();\n break;\n }\n drive.setVelocity(new Vector2d(0, strafeAlignController.update(error)), 0);\n sleep(10);\n }\n drive.disableHeadingCorrection();\n drive.followPath(new PathBuilder(new Pose2d(v.x(), -12, Math.PI / 2)).lineTo(v).build());\n waitForPathFollower();\n } else {\n drive.followPath(new PathBuilder(new Pose2d(12, -12, Math.PI / 2)).lineTo(v).build());\n waitForPathFollower();\n }\n sleep(1500);\n drive.followPath(new PathBuilder(new Pose2d(v, Math.PI / 2)).lineTo(new Vector2d(12, -12)).build());\n waitForPathFollower();\n }\n}\n"
|
"private URL promptForWorkspace(Shell shell, ChooseWorkspaceData launchData, boolean force) {\n URL url = null;\n boolean doForce = force;\n do {\n ChooseWorkspaceDialog chooseWorkspaceDialog = new ChooseWorkspaceDialog(shell, launchData, false, true);\n boolean isDisableLoginDialog = ArrayUtils.contains(Platform.getApplicationArgs(), EclipseCommandLine.TALEND_DISABLE_LOGINDIALOG_COMMAND);\n if (isDisableLoginDialog) {\n chooseWorkspaceDialog.setForceHide(true);\n }\n chooseWorkspaceDialog.prompt(doForce);\n String instancePath = launchData.getSelection();\n if (instancePath == null) {\n return null;\n }\n doForce = true;\n if (instancePath.length() <= 0) {\n MessageDialog.openError(shell, Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n continue;\n }\n File workspace = new File(instancePath);\n if (!workspace.exists()) {\n workspace.mkdir();\n }\n try {\n String path = workspace.getAbsolutePath().replace(File.separatorChar, '/');\n url = new URL(\"String_Node_Str\", null, path);\n } catch (MalformedURLException e) {\n MessageDialog.openError(shell, Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n continue;\n }\n } while (url == null);\n return url;\n}\n"
|
"public void createClient(CubeConfiguration cubeConfiguration) {\n dockerClientExecutorProducer.set(new DockerClientExecutor(cubeConfiguration, new CommandLineExecutor()));\n}\n"
|
"public void run() {\n synchronized (latch) {\n h.getMap(\"String_Node_Str\").put(\"String_Node_Str\", counter1.incrementAndGet());\n latch.countDown();\n }\n System.out.println(Thread.currentThread() + \"String_Node_Str\" + count);\n}\n"
|
"public void canCloseFrameReaderAndReadExpectedLines() throws Exception {\n int exitCode = dockerClient.waitContainerCmd(dockerfileFixture.getContainerId()).exec(new WaitContainerResultCallback()).awaitStatusCode();\n assertEquals(0, exitCode);\n Iterator<Frame> response = getLoggingFrames().iterator();\n assertEquals(response.next(), new Frame(StreamType.STDOUT, \"String_Node_Str\".getBytes()));\n assertEquals(response.next(), new Frame(StreamType.STDERR, \"String_Node_Str\".getBytes()));\n assertFalse(response.hasNext());\n}\n"
|
"public void testThirdLevel() {\n addCard(Constants.Zone.BATTLEFIELD, playerA, \"String_Node_Str\");\n addCard(Constants.Zone.BATTLEFIELD, playerA, \"String_Node_Str\", 15);\n for (int i = 0; i < 12; i++) {\n activateAbility(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n }\n setStopAt(2, Constants.PhaseStep.END_TURN);\n execute();\n Permanent master = getPermanent(\"String_Node_Str\", playerA.getId());\n Assert.assertEquals(12, master.getCounters().getCount(CounterType.LEVEL));\n Assert.assertEquals(\"String_Node_Str\", 9, master.getPower().getValue());\n Assert.assertEquals(\"String_Node_Str\", 9, master.getToughness().getValue());\n Assert.assertTrue(master.getAbilities().contains(LifelinkAbility.getInstance()));\n Assert.assertTrue(master.getAbilities().containsRule(new IndestructibleAbility()));\n}\n"
|
"protected Control createDialogArea(Composite parent) {\n GridData layoutData = new GridData(GridData.FILL_BOTH);\n Composite composite = new Composite(parent, SWT.BORDER);\n GridLayout layout = new GridLayout();\n composite.setLayout(layout);\n composite.setLayoutData(layoutData);\n tableViewerCreator = new TableViewerCreator(composite);\n tableViewerCreator.setCheckboxInFirstColumn(false);\n tableViewerCreator.setColumnsResizableByDefault(true);\n tableViewerCreator.setLinesVisible(true);\n tableViewerCreator.setLayoutMode(LAYOUT_MODE.CONTINUOUS);\n tableViewerCreator.createTable();\n TableViewerCreatorColumn column = new TableViewerCreatorColumn(tableViewerCreator);\n column.setTitle(Messages.getString(\"String_Node_Str\"));\n column.setToolTipHeader(Messages.getString(\"String_Node_Str\"));\n column.setBeanPropertyAccessors(new IBeanPropertyAccessors<ModuleToInstall, String>() {\n public String get(ModuleToInstall bean) {\n return bean.getName();\n }\n public void set(ModuleToInstall bean, String value) {\n }\n });\n column.setSortable(true);\n tableViewerCreator.setDefaultSort(column, SORT.ASC);\n column.setWeight(5);\n column.setModifiable(false);\n column = new TableViewerCreatorColumn(tableViewerCreator);\n column.setTitle(Messages.getString(\"String_Node_Str\"));\n column.setToolTipHeader(Messages.getString(\"String_Node_Str\"));\n column.setSortable(true);\n column.setBeanPropertyAccessors(new IBeanPropertyAccessors<ModuleToInstall, String>() {\n public String get(ModuleToInstall bean) {\n return bean.getDescription();\n }\n public void set(ModuleToInstall bean, String value) {\n }\n });\n column.setWeight(4);\n column.setModifiable(false);\n column = new TableViewerCreatorColumn(tableViewerCreator);\n column.setSortable(true);\n column.setTitle(Messages.getString(\"String_Node_Str\"));\n column.setToolTipHeader(Messages.getString(\"String_Node_Str\"));\n column.setBeanPropertyAccessors(new IBeanPropertyAccessors<ModuleToInstall, String>() {\n public String get(ModuleToInstall bean) {\n return bean.getContext();\n }\n public void set(ModuleToInstall bean, String value) {\n }\n });\n column.setModifiable(false);\n column.setWeight(6);\n column = new TableViewerCreatorColumn(tableViewerCreator);\n column.setTitle(Messages.getString(\"String_Node_Str\"));\n column.setToolTipHeader(Messages.getString(\"String_Node_Str\"));\n column.setDisplayedValue(\"String_Node_Str\");\n column.setSortable(true);\n column.setImageProvider(new IColumnImageProvider<ModuleToInstall>() {\n public Image getImage(ModuleToInstall bean) {\n if (bean.isRequired()) {\n return ImageProvider.getImage(EImage.CHECKED_ICON);\n } else {\n return ImageProvider.getImage(EImage.UNCHECKED_ICON);\n }\n }\n });\n column.setBeanPropertyAccessors(new IBeanPropertyAccessors<ModuleToInstall, Boolean>() {\n public Boolean get(ModuleToInstall bean) {\n return bean.isRequired();\n }\n public void set(ModuleToInstall bean, Boolean value) {\n }\n });\n column.setModifiable(false);\n column.setWeight(3);\n column = new TableViewerCreatorColumn(tableViewerCreator);\n column.setTitle(Messages.getString(\"String_Node_Str\"));\n column.setToolTipHeader(Messages.getString(\"String_Node_Str\"));\n column.setSortable(true);\n column.setBeanPropertyAccessors(new IBeanPropertyAccessors<ModuleToInstall, String>() {\n public String get(ModuleToInstall bean) {\n return bean.getLicenseType();\n }\n public void set(ModuleToInstall bean, String value) {\n }\n });\n column.setModifiable(false);\n column.setWeight(3);\n TableViewerCreatorColumn urlcolumn = new TableViewerCreatorColumn(tableViewerCreator);\n urlcolumn.setTitle(Messages.getString(\"String_Node_Str\"));\n urlcolumn.setToolTipHeader(Messages.getString(\"String_Node_Str\"));\n urlcolumn.setModifiable(false);\n urlcolumn.setSortable(true);\n urlcolumn.setWeight(7);\n TableViewerCreatorColumn installcolumn = new TableViewerCreatorColumn(tableViewerCreator);\n installcolumn.setTitle(Messages.getString(\"String_Node_Str\"));\n installcolumn.setToolTipHeader(Messages.getString(\"String_Node_Str\"));\n installcolumn.setModifiable(false);\n installcolumn.setSortable(true);\n installcolumn.setWeight(6);\n tableViewerCreator.init(inputList);\n addInstallButtons(installcolumn, urlcolumn);\n layoutData = new GridData(GridData.FILL_BOTH);\n tableViewerCreator.getTable().setLayoutData(layoutData);\n tableViewerCreator.getTable().pack();\n Composite footComposite = new Composite(composite, SWT.NONE);\n layoutData = new GridData(GridData.FILL_HORIZONTAL);\n footComposite.setLayoutData(layoutData);\n layout = new GridLayout();\n layout.numColumns = 2;\n footComposite.setLayout(layout);\n Label label = new Label(footComposite, SWT.WRAP);\n layoutData = new GridData(GridData.FILL_HORIZONTAL);\n layoutData.widthHint = 200;\n label.setText(Messages.getString(\"String_Node_Str\"));\n label.setLayoutData(layoutData);\n installAllBtn = new Button(footComposite, SWT.NONE);\n installAllBtn.setText(Messages.getString(\"String_Node_Str\"));\n createFooter(composite);\n setTitle(title);\n addListeners();\n return composite;\n}\n"
|
"private boolean putCertInKeyStore(android.security.KeyStore keyStore, String name, Certificate cert) {\n try {\n byte[] certData = Credentials.convertToPem(cert);\n if (DBG)\n Slog.d(TAG, \"String_Node_Str\" + name + \"String_Node_Str\");\n return keyStore.put(name, certData, Process.WIFI_UID, KeyStore.FLAG_NONE);\n } catch (IOException e1) {\n return false;\n } catch (CertificateException e2) {\n return false;\n }\n}\n"
|
"public void process(GrayU8 binary) {\n labeled.reshape(binary.width, binary.height);\n contourFinder.process(binary, labeled);\n FastQueue<Contour> blobs = contourFinder.getContours();\n for (int i = 0; i < blobs.size; i++) {\n Contour c = blobs.get(i);\n proccessContour(c.external);\n if (internalContour) {\n for (int j = 0; j < c.internal.size(); j++) {\n proccessContour(c.internal.get(j));\n }\n }\n pointsF.reset();\n undistortContour(c.external, pointsF);\n if (!algebraic.process(pointsF.toList())) {\n if (verbose)\n System.out.println(\"String_Node_Str\" + pointsF.size());\n continue;\n }\n EllipseQuadratic_F64 quad = algebraic.getEllipse();\n Found f = found.grow();\n UtilEllipse_F64.convert(quad, f.ellipse);\n if (!isApproximatelyElliptical(f.ellipse, pointsF.toList(), 20)) {\n if (verbose)\n System.out.println(\"String_Node_Str\" + pointsF.size());\n found.removeTail();\n }\n if (verbose)\n System.out.println(\"String_Node_Str\" + pointsF.size());\n f.contour = c.external;\n }\n}\n"
|
"private JSONObject collectJobDetails() throws PersistenceException, JSONException {\n JSONObject jObject = new JSONObject();\n Project currentProject = ProjectManager.getInstance().getCurrentProject();\n final IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n int jobsNum = 0;\n int componentsNum = 0;\n int contextVarsNum = 0;\n int businessModelsNum = 0;\n int generatedJobDocsNum = 0;\n int metadatasNum = 0;\n Map<String, Integer> numComponentMap = new HashMap<String, Integer>();\n List<IRepositoryViewObject> all = factory.getAll(currentProject, ERepositoryObjectType.PROCESS);\n jobsNum += all.size();\n for (IRepositoryViewObject rvo : all) {\n Item item = rvo.getProperty().getItem();\n if (item instanceof ProcessItem) {\n ProcessType processType = ((ProcessItem) item).getProcess();\n componentsNum += processType.getNode().size();\n for (NodeType node : (List<NodeType>) processType.getNode()) {\n String componentName = node.getComponentName();\n Integer integer = numComponentMap.get(componentName);\n if (integer == null) {\n numComponentMap.put(componentName, 1);\n } else {\n numComponentMap.put(componentName, integer + 1);\n }\n }\n EList contexts = processType.getContext();\n if (contexts.size() > 0) {\n ContextType contextType = (ContextType) contexts.get(0);\n contextVarsNum += contextType.getContextParameter().size();\n }\n }\n }\n businessModelsNum += factory.getAll(currentProject, ERepositoryObjectType.BUSINESS_PROCESS).size();\n generatedJobDocsNum += factory.getAll(currentProject, ERepositoryObjectType.JOB_DOC).size();\n for (DynaEnum type : ERepositoryObjectType.values()) {\n if (type instanceof ERepositoryObjectType) {\n ERepositoryObjectType repType = (ERepositoryObjectType) type;\n String folder = repType.getFolder();\n if (repType.isDIItemType() && repType.isResouce() && folder != null && folder.startsWith(ERepositoryObjectType.METADATA.getFolder())) {\n metadatasNum += factory.getAll(currentProject, repType).size();\n }\n }\n }\n jObject.put(TOS_COUNT_JOBS.getKey(), jobsNum);\n jObject.put(TOS_COUNT_BUSINESS_MODELS.getKey(), businessModelsNum);\n jObject.put(TOS_COUNT_GENERATED_JOB_DOCS.getKey(), generatedJobDocsNum);\n jObject.put(TOS_COUNT_METADATAS.getKey(), metadatasNum);\n jObject.put(TOS_COUNT_CONTEXT_VARIABLES.getKey(), contextVarsNum);\n jObject.put(TOS_COUNT_COMPONENTS.getKey(), componentsNum);\n jObject.put(TOS_JOB_TOP20_COMPONENTS.getKey(), TokenInforUtil.convertTopComponents(numComponentMap, TOP_USED_COMPONENTS_MAX));\n return jObject;\n}\n"
|
"private boolean existSqlgSchema() {\n Connection conn = this.sqlgGraph.tx().getConnection();\n try {\n if (this.sqlDialect.supportSchemas()) {\n DatabaseMetaData metadata = conn.getMetaData();\n return this.sqlDialect.schemaExists(metadata, null, SQLG_SCHEMA);\n } else {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n}\n"
|
"public static VmInstance shutDown(VmInstance vm) throws TransactionException {\n if (VmStateSet.DONE.apply(vm)) {\n return VmInstances.delete(vm);\n } else {\n return Transitions.SHUTDOWN.apply(vm);\n }\n}\n"
|
"public void testEnumCompare() {\n GeneralCaseExpression result = (GeneralCaseExpression) parse(\"String_Node_Str\");\n GeneralCaseExpression expected = new GeneralCaseExpression(Arrays.asList(new WhenClauseExpression(new EqPredicate(path(\"String_Node_Str\"), literal(\"String_Node_Str\", \"String_Node_Str\")), foo(\"String_Node_Str\"))), foo(\"String_Node_Str\"));\n assertEquals(expected, result);\n}\n"
|
"protected void sendSharedObjectMsgTo(ID toID, SharedObjectMsg msg) throws IOException {\n if (msg == null)\n throw new NullPointerException(\"String_Node_Str\");\n String method = \"String_Node_Str\";\n traceEntering(method, new Object[] { toID, msg });\n getContext().sendMessage(toID, new SharedObjectMsgEvent(getID(), toID, msg));\n traceExiting(method);\n}\n"
|
"public void handleMessage(Message msg) {\n switch(msg.what) {\n case SHOW_ERROR_MSG:\n {\n HashMap data = (HashMap) msg.obj;\n synchronized (ActivityManagerService.this) {\n ProcessRecord proc = (ProcessRecord) data.get(\"String_Node_Str\");\n if (proc != null && proc.crashDialog != null) {\n Slog.e(TAG, \"String_Node_Str\" + proc);\n return;\n }\n AppErrorResult res = (AppErrorResult) data.get(\"String_Node_Str\");\n if (!mSleeping && !mShuttingDown) {\n Dialog d = new AppErrorDialog(mContext, res, proc);\n d.show();\n proc.crashDialog = d;\n } else {\n res.set(0);\n }\n }\n ensureBootCompleted();\n }\n break;\n case SHOW_NOT_RESPONDING_MSG:\n {\n synchronized (ActivityManagerService.this) {\n HashMap data = (HashMap) msg.obj;\n ProcessRecord proc = (ProcessRecord) data.get(\"String_Node_Str\");\n if (proc != null && proc.anrDialog != null) {\n Slog.e(TAG, \"String_Node_Str\" + proc);\n return;\n }\n Intent intent = new Intent(\"String_Node_Str\");\n if (!mProcessesReady) {\n intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);\n }\n broadcastIntentLocked(null, null, intent, null, null, 0, null, null, null, false, false, MY_PID, Process.SYSTEM_UID);\n Dialog d = new AppNotRespondingDialog(ActivityManagerService.this, mContext, proc, (ActivityRecord) data.get(\"String_Node_Str\"));\n d.show();\n proc.anrDialog = d;\n }\n ensureBootCompleted();\n }\n break;\n case SHOW_STRICT_MODE_VIOLATION_MSG:\n {\n HashMap<String, Object> data = (HashMap<String, Object>) msg.obj;\n synchronized (ActivityManagerService.this) {\n ProcessRecord proc = (ProcessRecord) data.get(\"String_Node_Str\");\n if (proc == null) {\n Slog.e(TAG, \"String_Node_Str\");\n break;\n }\n if (proc.crashDialog != null) {\n Slog.e(TAG, \"String_Node_Str\" + proc);\n return;\n }\n AppErrorResult res = (AppErrorResult) data.get(\"String_Node_Str\");\n if (!mSleeping && !mShuttingDown) {\n Dialog d = new StrictModeViolationDialog(mContext, res, proc);\n d.show();\n proc.crashDialog = d;\n } else {\n res.set(0);\n }\n }\n ensureBootCompleted();\n }\n break;\n case SHOW_FACTORY_ERROR_MSG:\n {\n Dialog d = new FactoryErrorDialog(mContext, msg.getData().getCharSequence(\"String_Node_Str\"));\n d.show();\n ensureBootCompleted();\n }\n break;\n case UPDATE_CONFIGURATION_MSG:\n {\n final ContentResolver resolver = mContext.getContentResolver();\n Settings.System.putConfiguration(resolver, (Configuration) msg.obj);\n }\n break;\n case GC_BACKGROUND_PROCESSES_MSG:\n {\n synchronized (ActivityManagerService.this) {\n performAppGcsIfAppropriateLocked();\n }\n }\n break;\n case WAIT_FOR_DEBUGGER_MSG:\n {\n synchronized (ActivityManagerService.this) {\n ProcessRecord app = (ProcessRecord) msg.obj;\n if (msg.arg1 != 0) {\n if (!app.waitedForDebugger) {\n Dialog d = new AppWaitingForDebuggerDialog(ActivityManagerService.this, mContext, app);\n app.waitDialog = d;\n app.waitedForDebugger = true;\n d.show();\n }\n } else {\n if (app.waitDialog != null) {\n app.waitDialog.dismiss();\n app.waitDialog = null;\n }\n }\n }\n }\n break;\n case BROADCAST_INTENT_MSG:\n {\n if (DEBUG_BROADCAST)\n Slog.v(TAG, \"String_Node_Str\");\n processNextBroadcast(true);\n }\n break;\n case BROADCAST_TIMEOUT_MSG:\n {\n synchronized (ActivityManagerService.this) {\n broadcastTimeoutLocked(true);\n }\n }\n break;\n case SERVICE_TIMEOUT_MSG:\n {\n if (mDidDexOpt) {\n mDidDexOpt = false;\n Message nmsg = mHandler.obtainMessage(SERVICE_TIMEOUT_MSG);\n nmsg.obj = msg.obj;\n mHandler.sendMessageDelayed(nmsg, SERVICE_TIMEOUT);\n return;\n }\n serviceTimeout((ProcessRecord) msg.obj);\n }\n break;\n case UPDATE_TIME_ZONE:\n {\n synchronized (ActivityManagerService.this) {\n for (int i = mLruProcesses.size() - 1; i >= 0; i--) {\n ProcessRecord r = mLruProcesses.get(i);\n if (r.thread != null) {\n try {\n r.thread.updateTimeZone();\n } catch (RemoteException ex) {\n Slog.w(TAG, \"String_Node_Str\" + r.info.processName);\n }\n }\n }\n }\n }\n break;\n case SHOW_UID_ERROR_MSG:\n {\n AlertDialog d = new BaseErrorDialog(mContext);\n d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);\n d.setCancelable(false);\n d.setTitle(\"String_Node_Str\");\n d.setMessage(\"String_Node_Str\");\n d.setButton(\"String_Node_Str\", mHandler.obtainMessage(IM_FEELING_LUCKY_MSG));\n mUidAlert = d;\n d.show();\n }\n break;\n case IM_FEELING_LUCKY_MSG:\n {\n if (mUidAlert != null) {\n mUidAlert.dismiss();\n mUidAlert = null;\n }\n }\n break;\n case PROC_START_TIMEOUT_MSG:\n {\n if (mDidDexOpt) {\n mDidDexOpt = false;\n Message nmsg = mHandler.obtainMessage(PROC_START_TIMEOUT_MSG);\n nmsg.obj = msg.obj;\n mHandler.sendMessageDelayed(nmsg, PROC_START_TIMEOUT);\n return;\n }\n ProcessRecord app = (ProcessRecord) msg.obj;\n synchronized (ActivityManagerService.this) {\n processStartTimedOutLocked(app);\n }\n }\n break;\n case DO_PENDING_ACTIVITY_LAUNCHES_MSG:\n {\n synchronized (ActivityManagerService.this) {\n doPendingActivityLaunchesLocked(true);\n }\n }\n break;\n case KILL_APPLICATION_MSG:\n {\n synchronized (ActivityManagerService.this) {\n int uid = msg.arg1;\n boolean restart = (msg.arg2 == 1);\n String pkg = (String) msg.obj;\n forceStopPackageLocked(pkg, uid, restart, false, true);\n }\n }\n break;\n case FINALIZE_PENDING_INTENT_MSG:\n {\n ((PendingIntentRecord) msg.obj).completeFinalize();\n }\n break;\n case POST_HEAVY_NOTIFICATION_MSG:\n {\n INotificationManager inm = NotificationManager.getService();\n if (inm == null) {\n return;\n }\n ActivityRecord root = (ActivityRecord) msg.obj;\n ProcessRecord process = root.app;\n if (process == null) {\n return;\n }\n try {\n Context context = mContext.createPackageContext(process.info.packageName, 0);\n String text = mContext.getString(R.string.heavy_weight_notification, context.getApplicationInfo().loadLabel(context.getPackageManager()));\n Notification notification = new Notification();\n notification.icon = com.android.internal.R.drawable.stat_sys_adb;\n notification.when = 0;\n notification.flags = Notification.FLAG_ONGOING_EVENT;\n notification.tickerText = text;\n notification.defaults = 0;\n notification.sound = null;\n notification.vibrate = null;\n notification.setLatestEventInfo(context, text, mContext.getText(R.string.heavy_weight_notification_detail), PendingIntent.getActivity(mContext, 0, root.intent, PendingIntent.FLAG_CANCEL_CURRENT));\n try {\n int[] outId = new int[1];\n inm.enqueueNotification(\"String_Node_Str\", R.string.heavy_weight_notification, notification, outId);\n } catch (RuntimeException e) {\n Slog.w(ActivityManagerService.TAG, \"String_Node_Str\", e);\n } catch (RemoteException e) {\n }\n } catch (NameNotFoundException e) {\n Slog.w(TAG, \"String_Node_Str\", e);\n }\n }\n break;\n case CANCEL_HEAVY_NOTIFICATION_MSG:\n {\n INotificationManager inm = NotificationManager.getService();\n if (inm == null) {\n return;\n }\n try {\n inm.cancelNotification(\"String_Node_Str\", R.string.heavy_weight_notification);\n } catch (RuntimeException e) {\n Slog.w(ActivityManagerService.TAG, \"String_Node_Str\", e);\n } catch (RemoteException e) {\n }\n }\n break;\n case CHECK_EXCESSIVE_WAKE_LOCKS_MSG:\n {\n synchronized (ActivityManagerService.this) {\n checkExcessivePowerUsageLocked(true);\n removeMessages(CHECK_EXCESSIVE_WAKE_LOCKS_MSG);\n Message nmsg = obtainMessage(CHECK_EXCESSIVE_WAKE_LOCKS_MSG);\n sendMessageDelayed(nmsg, POWER_CHECK_DELAY);\n }\n }\n break;\n }\n}\n"
|
"public void setMargins(int left, int top, int right, int bottom) {\n leftMargin = left;\n topMargin = top;\n rightMargin = right;\n bottomMargin = bottom;\n mMarginFlags &= ~LEFT_MARGIN_UNDEFINED_MASK;\n mMarginFlags &= ~RIGHT_MARGIN_UNDEFINED_MASK;\n if (isMarginRelative()) {\n mMarginFlags |= NEED_RESOLUTION_MASK;\n } else {\n mMarginFlags &= ~NEED_RESOLUTION_MASK;\n }\n}\n"
|
"private void putGridIntoCanonical_vertical(int numRows, int numCols) {\n DetectAsymmetricCircleGrid<?> alg = new DetectAsymmetricCircleGrid(numRows, numCols, null, null, null);\n Grid g = createGrid(numRows, numCols);\n List<EllipseRotated_F64> original = new ArrayList<>();\n original.addAll(g.ellipses);\n alg.putGridIntoCanonical(g);\n assertEquals(numRows, g.rows);\n assertEquals(numCols, g.columns);\n assertTrue(original.get(0) == g.get(0, 0));\n checkCounterClockWise(g);\n alg.putGridIntoCanonical(flipVertical(g));\n assertEquals(numRows, g.rows);\n assertEquals(numCols, g.columns);\n assertTrue(original.get(0) == g.get(0, 0));\n checkCounterClockWise(g);\n}\n"
|
"private EdgeInfo findOuterMostChildEdgeInfo(int dimAxisIndex, EdgeInfo edgeInfo) {\n if (dimAxisIndex < 0 || dimAxisIndex >= this.dimAxis.length || edgeInfo == null)\n return null;\n int endPosition = edgeInfo.firstChild;\n EdgeInfo info = edgeInfo;\n for (int i = dimAxisIndex + 1; i < this.dimAxis.length; i++) {\n if (this.dimAxis[i].isMirrored())\n break;\n info = (EdgeInfo) ((List) this.relationMap.currentRelation[i]).get(endPosition);\n endPosition = info.firstChild;\n }\n return info;\n}\n"
|
"private void destroyAutopilot() {\n if (drone == null)\n return;\n drone.removeDroneListener(this);\n final Parameters parameters = drone.getParameters();\n if (parameters != null)\n parameters.setParameterListener(null);\n final MagnetometerCalibrationImpl magnetometer = drone.getMagnetometerCalibration();\n if (magnetometer != null)\n magnetometer.setListener(null);\n drone = null;\n}\n"
|
"public IconicsDrawable color(int color) {\n setAlpha(Color.alpha(color));\n mIconPaint.setColor(color);\n invalidateSelf();\n return this;\n}\n"
|
"public boolean retainAll(Collection<?> c) {\n final E[] newData = (E[]) new Object[dataLocator.getCapacity()];\n boolean changed = false;\n int read = this.locator.getReadLocation();\n int write = this.locator.getWriterLocation();\n if (read == write)\n return false;\n int i = 0;\n if (read < write) {\n for (int location = read; location < write; location++) {\n if (c.contains(dataLocator.getData(location))) {\n newData[i++] = dataLocator.getData(location);\n } else {\n changed = true;\n }\n }\n } else {\n for (int location = read; location < dataLocator.getCapacity(); location++) {\n if (c.contains(dataLocator.getData(location))) {\n newData[i++] = dataLocator.getData(location);\n } else {\n changed = true;\n }\n }\n for (int location = 0; location <= write; location++) {\n if (c.contains(dataLocator.getData(location))) {\n newData[i++] = dataLocator.getData(location);\n } else {\n changed = true;\n }\n }\n }\n if (changed) {\n this.locator.setReadLocation(0);\n this.locator.setWriteLocation(i);\n dataLocator.writeAll(newData, i);\n return true;\n }\n return false;\n}\n"
|
"private void handleClassLoadFailure(String message, Exception cause) {\n throw new MissingClassError(message, cause);\n}\n"
|
"public static synchronized ConfigOption[] getRequiredOptions(final StoreFactoryFamilySpi storeFactoryFamily) {\n final List<ConfigOption> requiredOptions = new ArrayList<ConfigOption>();\n for (final ConfigOption option : getAllOptions(storeFactoryFamily, false)) {\n if (!option.isOptional()) {\n requiredOptions.add(option);\n }\n }\n return requiredOptions.toArray(new ConfigOption[] {});\n}\n"
|
"public void onResponseReceived(Request request, Response response) {\n JsArray<JsSetting> jsSettings = null;\n try {\n jsSettings = JsSetting.parseSettingsJson(response.getText());\n } catch (Throwable t) {\n }\n if (jsSettings == null) {\n return;\n }\n for (int i = 0; i < jsSettings.length(); i++) {\n String content = jsSettings.get(i).getValue();\n StringTokenizer nameValuePairs = new StringTokenizer(content, \"String_Node_Str\");\n String perspective = null, content_panel_id = null, content_url = null;\n for (int j = 0; j < nameValuePairs.countTokens(); j++) {\n String currentToken = nameValuePairs.tokenAt(j).trim();\n if (currentToken.startsWith(\"String_Node_Str\")) {\n perspective = currentToken.substring(\"String_Node_Str\".length());\n }\n if (currentToken.startsWith(\"String_Node_Str\")) {\n content_panel_id = currentToken.substring(\"String_Node_Str\".length());\n }\n if (currentToken.startsWith(\"String_Node_Str\")) {\n content_url = currentToken.substring(\"String_Node_Str\".length());\n }\n }\n if (perspective != null) {\n PerspectiveManager.getInstance().setPerspective(perspective);\n }\n if (content_panel_id != null && content_url != null) {\n loadAdminContent(content_panel_id, content_url);\n }\n if (perspective == null && content_panel_id == null && content_url == null) {\n GwtMessageBox warning = new GwtMessageBox();\n warning.setTitle(Messages.getString(\"String_Node_Str\"));\n warning.setMessage(content);\n warning.setButtons(new Object[GwtMessageBox.ACCEPT]);\n warning.setAcceptLabel(Messages.getString(\"String_Node_Str\"));\n warning.show();\n }\n }\n}\n"
|
"public void render(Component comp, Writer out) throws IOException {\n final SmartWriter wh = new SmartWriter(out);\n final Menu self = (Menu) comp;\n final String uuid = self.getUuid();\n final String zcls = self.getZclass();\n final Execution exec = Executions.getCurrent();\n if (self.isTopmost()) {\n wh.write(\"String_Node_Str\").write(uuid).write(\"String_Node_Str\");\n wh.write(self.getOuterAttrs()).write(self.getInnerAttrs()).write(\"String_Node_Str\");\n wh.write(\"String_Node_Str\").write(uuid).write(\"String_Node_Str\").write(zcls).write(\"String_Node_Str\");\n if (self.isImageAssigned()) {\n wh.write(\"String_Node_Str\").write(zcls).write(\"String_Node_Str\");\n if (self.getLabel().length() > 0)\n wh.write(\"String_Node_Str\");\n wh.write(\"String_Node_Str\");\n }\n wh.write(\"String_Node_Str\").write(zcls).write(\"String_Node_Str\").write(zcls).write(\"String_Node_Str\");\n wh.write(\"String_Node_Str\").write(zcls).write(\"String_Node_Str\").write(uuid).write(\"String_Node_Str\").write(zcls).write(\"String_Node_Str\");\n final String imagesrc = self.getEncodedImageURL();\n if (imagesrc != null)\n wh.write(\"String_Node_Str\").write(imagesrc).write(\"String_Node_Str\");\n wh.write('>');\n new Out(self.getLabel()).render(out);\n wh.write(\"String_Node_Str\").write(self.getMenupopup()).write(\"String_Node_Str\").write(zcls).writeln(\"String_Node_Str\");\n } else {\n wh.write(\"String_Node_Str\").write(uuid).write(\"String_Node_Str\");\n wh.write(self.getOuterAttrs()).write(self.getInnerAttrs()).write(\"String_Node_Str\").write(uuid).write(\"String_Node_Str\").write(zcls).write(\"String_Node_Str\").write(zcls).write(\"String_Node_Str\").write(self.getImgTag());\n new Out(self.getLabel()).render(out);\n wh.write(\"String_Node_Str\").write(self.getMenupopup()).writeln(\"String_Node_Str\");\n }\n}\n"
|
"public void fillContextMenu(IMenuManager menu) {\n TreeSelection treeSelection = ((TreeSelection) this.getContext().getSelection());\n List<IFile> selectedFiles = new ArrayList<IFile>();\n if (treeSelection.size() == 1) {\n Object obj = treeSelection.getFirstElement();\n if (obj instanceof IFolder) {\n IPath path = new Path(ResourceManager.LIBRARIES_FOLDER_NAME);\n path = path.append(DQStructureManager.SOURCE_FILES);\n IPath fullPath = ((IFolder) obj).getFullPath();\n IPath sourceFileFolderPath = ResourceManager.getLibrariesFolder().getFolder(DQStructureManager.SOURCE_FILES).getFullPath();\n if (fullPath.equals(sourceFileFolderPath)) {\n menu.add(new AddSqlFileAction((IFolder) obj));\n if (fullPath.segmentCount() > path.segmentCount()) {\n menu.add(new RenameFolderAction((IFolder) obj));\n }\n }\n } else if (obj instanceof IFile) {\n IFile file = (IFile) obj;\n if (file.getFileExtension().equalsIgnoreCase(\"String_Node_Str\")) {\n menu.add(new RenameSqlFileAction((IFile) obj));\n }\n }\n }\n boolean isSelectFile = computeSelectedFiles(treeSelection, selectedFiles);\n if (!isSelectFile && !selectedFiles.isEmpty()) {\n menu.add(new OpenSqlFileAction(selectedFiles));\n menu.add(new DeleteSqlFileAction(selectedFiles));\n }\n}\n"
|
"private void fileChecksumVote(long fileId) {\n List<Long> rfiGuids = retrieveReplicaFileInfoGuidsForFile(fileId);\n List<ReplicaFileInfo> rfis = retrieveReplicaFileInfosWithChecksum(rfiGuids);\n if (rfis.size() == 0) {\n log.warn(\"String_Node_Str\" + retrieveFilenameForFileId(fileId) + \"String_Node_Str\");\n return;\n }\n Set<String> hs = new HashSet<String>(rfis.size());\n for (ReplicaFileInfo rfi : rfis) {\n if (rfi.getFileListState() == FileListStatus.OK) {\n hs.add(rfi.getChecksum());\n }\n }\n if (hs.size() == 0) {\n log.warn(\"String_Node_Str\" + retrieveFilenameForFileId(fileId) + \"String_Node_Str\");\n return;\n }\n if (hs.size() == 1) {\n log.trace(\"String_Node_Str\" + fileId + \"String_Node_Str\");\n for (ReplicaFileInfo rfi : rfis) {\n updateReplicaFileInfoChecksumOk(rfi.getGuid());\n }\n return;\n }\n int[] csCount = new int[hs.size()];\n String[] uniqueCs = hs.toArray(new String[hs.size()]);\n for (ReplicaFileInfo rfi : rfis) {\n if (rfi.getFileListState() == FileListStatus.OK) {\n for (int i = 0; i < hs.size(); i++) {\n if (rfi.getChecksum().equals(uniqueCs[i])) {\n csCount[i]++;\n }\n }\n }\n }\n int largest = 0;\n boolean unique = false;\n int index = -1;\n for (int i = 0; i < csCount.length; i++) {\n if (csCount[i] > largest) {\n largest = csCount[i];\n unique = true;\n index = i;\n } else if (csCount[i] == largest) {\n unique = false;\n }\n }\n if (unique) {\n for (ReplicaFileInfo rfi : rfis) {\n if (!rfi.getChecksum().equals(uniqueCs[index])) {\n updateReplicaFileInfoChecksumCorrupt(rfi.getGuid());\n } else {\n updateReplicaFileInfoChecksumOk(rfi.getGuid());\n }\n }\n } else {\n String errMsg = \"String_Node_Str\" + \"String_Node_Str\" + retrieveFilenameForFileId(fileId) + \"String_Node_Str\";\n log.error(errMsg);\n NotificationsFactory.getInstance().errorEvent(errMsg);\n for (ReplicaFileInfo rfi : rfis) {\n updateReplicaFileInfoChecksumUnknown(rfi.getGuid());\n }\n }\n}\n"
|
"public Entry next() {\n if (_internal == null)\n return null;\n Entry e = _internal.next();\n e.frequency = (double) _entries.get(e) / (double) count;\n return e;\n}\n"
|
"private void displaySessionData(final SessionDetailModel data) {\n mTitle.setText(data.getSessionTitle());\n mSubtitle.setText(data.getSessionSubtitle());\n mPhotoViewContainer.setBackgroundColor(UIUtils.scaleSessionColorToDefaultBG(data.getSessionColor()));\n if (data.hasPhotoUrl()) {\n mHasPhoto = true;\n mNoPlaceholderImageLoader.loadImage(data.getPhotoUrl(), mPhotoView, new RequestListener<String, Bitmap>() {\n public boolean onException(Exception e, String model, Target<Bitmap> target, boolean isFirstResource) {\n mHasPhoto = false;\n recomputePhotoAndScrollingMetrics();\n return false;\n }\n public boolean onResourceReady(Bitmap resource, String model, Target<Bitmap> target, boolean isFromMemoryCache, boolean isFirstResource) {\n recomputePhotoAndScrollingMetrics();\n return false;\n }\n });\n recomputePhotoAndScrollingMetrics();\n } else {\n mHasPhoto = false;\n recomputePhotoAndScrollingMetrics();\n }\n tryExecuteDeferredUiOperations();\n mAddScheduleButton.setVisibility((AccountUtils.hasActiveAccount(getContext()) && !data.isKeynote()) ? View.VISIBLE : View.INVISIBLE);\n displayTags(data);\n if (!data.isKeynote()) {\n showStarredDeferred(data.isInSchedule(), false);\n }\n if (!TextUtils.isEmpty(data.getSessionAbstract())) {\n UIUtils.setTextMaybeHtml(mAbstract, data.getSessionAbstract());\n mAbstract.setVisibility(View.VISIBLE);\n } else {\n mAbstract.setVisibility(View.GONE);\n }\n final View requirementsBlock = getActivity().findViewById(R.id.session_requirements_block);\n final String sessionRequirements = data.getRequirements();\n if (!TextUtils.isEmpty(sessionRequirements)) {\n UIUtils.setTextMaybeHtml(mRequirements, sessionRequirements);\n requirementsBlock.setVisibility(View.VISIBLE);\n } else {\n requirementsBlock.setVisibility(View.GONE);\n }\n final ViewGroup relatedVideosBlock = (ViewGroup) getActivity().findViewById(R.id.related_videos_block);\n relatedVideosBlock.setVisibility(View.GONE);\n updateEmptyView(data);\n updateTimeBasedUi(data);\n if (data.getLiveStreamVideoWatched()) {\n mPhotoView.setColorFilter(getContext().getResources().getColor(R.color.played_video_tint));\n mLiveStreamPlayIconAndText.setText(getString(R.string.session_replay));\n }\n if (data.hasLiveStream()) {\n mLiveStreamPlayIconAndText.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n String videoId = YouTubeUtils.getVideoIdFromSessionData(data.getYouTubeUrl(), data.getLiveStreamId());\n YouTubeUtils.showYouTubeVideo(videoId, getActivity());\n }\n });\n }\n fireAnalyticsScreenView(data.getSessionTitle());\n mHandler.post(new Runnable() {\n public void run() {\n onScrollChanged(0, 0);\n mScrollViewChild.setVisibility(View.VISIBLE);\n }\n });\n mTimeHintUpdaterRunnable = new Runnable() {\n public void run() {\n if (getActivity() == null) {\n return;\n }\n updateTimeBasedUi(data);\n mHandler.postDelayed(mTimeHintUpdaterRunnable, SessionDetailConstants.TIME_HINT_UPDATE_INTERVAL);\n }\n };\n mHandler.postDelayed(mTimeHintUpdaterRunnable, SessionDetailConstants.TIME_HINT_UPDATE_INTERVAL);\n}\n"
|
"public String getAverageLengthWithNullBlankRows() {\n String sql = \"String_Node_Str\" + charLength(trimIfBlank(\"String_Node_Str\")) + \"String_Node_Str\" + \"String_Node_Str\" + charLength(trimIfBlank(\"String_Node_Str\")) + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + charLength(trimIfBlank(\"String_Node_Str\")) + \"String_Node_Str\";\n return sql;\n}\n"
|
"private void reconfig(Dictionary props) throws ConfigurationException {\n cacheLock.lock();\n try {\n long secsToIdle = Long.parseLong(props.get(SECS_TO_IDLE).toString());\n long secsToLive = Long.parseLong(props.get(SECS_TO_LIVE).toString());\n int maxMem = Integer.parseInt(props.get(MAX_CACHED_MEMORY).toString());\n int maxDisk = Integer.parseInt(props.get(MAX_CACHED_DISK).toString());\n CacheConfiguration config = tokens.getCacheConfiguration();\n config.setTimeToIdleSeconds(secsToIdle);\n config.setTimeToLiveSeconds(secsToLive);\n config.maxEntriesLocalHeap(maxMem);\n config.maxEntriesLocalDisk(maxDisk);\n } catch (Throwable t) {\n throw new ConfigurationException(null, TOKEN_STORE_CONFIG_ERR, t);\n } finally {\n cacheLock.unlock();\n }\n}\n"
|
"public char readChar() throws IOException {\n if (this.position < this.end - 1) {\n return (char) (((this.memory[this.position++] & 0xff) << 8) | ((this.memory[this.position++] & 0xff) << 0));\n } else {\n throw new EOFException();\n }\n}\n"
|
"private IPath getPath(ModelElement element, IPath itemPath) {\n IPath path = new Path(PluginConstant.EMPTY_STRING);\n if (element instanceof DatabaseConnection) {\n path = itemPath.makeRelativeTo(ResourceManager.getConnectionFolder().getFullPath());\n } else if (element instanceof MDMConnection) {\n path = itemPath.makeRelativeTo(ResourceManager.getMDMConnectionFolder().getFullPath());\n } else if (element instanceof Analysis) {\n path = itemPath.makeRelativeTo(ResourceManager.getAnalysisFolder().getFullPath());\n } else if (element instanceof Report) {\n path = itemPath.makeRelativeTo(ResourceManager.getReportsFolder().getFullPath());\n } else if (element instanceof IndicatorDefinition) {\n if (element instanceof WhereRule) {\n path = itemPath.makeRelativeTo(ResourceManager.getRulesFolder().getFullPath());\n } else {\n path = itemPath.makeRelativeTo(ResourceManager.getIndicatorFolder().getFullPath());\n }\n } else if (element instanceof Pattern) {\n path = itemPath.makeRelativeTo(ResourceManager.getPatternFolder().getFullPath());\n }\n return path;\n}\n"
|
"public DataSet<Boolean> execute(GraphCollection<G, V, E> firstCollection, GraphCollection<G, V, E> secondCollection) {\n DataSet<Tuple2<String, Long>> firstGraphLabels = labelGraphs(firstCollection);\n DataSet<Tuple2<String, Long>> secondGraphLabels = labelGraphs(secondCollection);\n DataSet<Long> firstLabelCount = Count.count(firstGraphLabels);\n DataSet<Long> matchingLabelCount = Count.count(firstGraphLabels.join(secondGraphLabels).where(0, 1).equalTo(0, 1));\n DataSet<Boolean> firstCollectionIsEmpty = firstCollection.isEmpty();\n return Or.union(And.cross(firstCollectionIsEmpty, secondCollection.isEmpty()), And.cross(Not.map(firstCollectionIsEmpty), Equals.cross(firstLabelCount, matchingLabelCount)));\n}\n"
|
"private static void createAddFunctions(List<String> r, DbOperations dbOps) {\n for (Table table : dbOps.getDatabase().getTables()) {\n if (!table.isStem()) {\n StringBuilder line = new StringBuilder();\n String rTableName = convertToRName(table.getName());\n List<String> argDefs = new ArrayList<String>();\n for (Field field : table.getFields()) {\n String rFieldName = convertToRName(field.getName());\n argDefs.add(rFieldName);\n }\n List<String> insertLines = dbOps.getInsertValues(table);\n line.append(\"String_Node_Str\" + rTableName + \"String_Node_Str\");\n line.append(StringUtilities.join(argDefs, \"String_Node_Str\"));\n line.append(\"String_Node_Str\");\n r.add(line.toString());\n r.add(\"String_Node_Str\" + rTableName + \"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.addAll(insertLines);\n r.add(\"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.add(\"String_Node_Str\" + table + \"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.add(dbOps.getInsertStatement(table));\n r.add(\"String_Node_Str\" + table + \"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.add(\"String_Node_Str\");\n r.add(\"String_Node_Str\");\n }\n }\n}\n"
|
"public void selectGeneSystemWide(IDType contentIDType, int davidID) {\n ClearSelectionsEvent clearSelectionsEvent = new ClearSelectionsEvent();\n clearSelectionsEvent.setSender(this);\n eventPublisher.triggerEvent(clearSelectionsEvent);\n SelectionUpdateEvent selectionUpdateEvent = new SelectionUpdateEvent();\n selectionUpdateEvent.setSender(this);\n ISelectionDelta delta = new SelectionDelta(contentIDType);\n delta.addSelection(davidID, SelectionType.SELECTION);\n selectionUpdateEvent.setSelectionDelta((SelectionDelta) delta);\n eventPublisher.triggerEvent(selectionUpdateEvent);\n}\n"
|
"public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n PluginPropertyField that = (PluginPropertyField) o;\n return required == that.required && name.equals(that.name) && description.equals(that.description) && type.equals(that.type) && macroSupported == that.macroSupported && macroEscapingEnabled == that.macroEscapingEnabled;\n}\n"
|
"public int getStepOffset() {\n return getConfig().getStepOffset();\n}\n"
|
"public void recomputeIndicators() {\n correlationAnalysisHandler = new ColumnCorrelationAnalysisHandler();\n correlationAnalysisHandler.setAnalysis((Analysis) this.currentModelElement);\n stringDataFilter = correlationAnalysisHandler.getStringDataFilter();\n analyzedColumns = correlationAnalysisHandler.getAnalyzedColumns();\n if (correlationAnalysisHandler.getIndicator() == null && columnSetMultiIndicator != null) {\n ColumnsetFactory columnsetFactory = ColumnsetFactory.eINSTANCE;\n if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator() == columnSetMultiIndicator.eClass()) {\n columnSetMultiIndicator = columnsetFactory.createCountAvgNullIndicator();\n fillSimpleIndicators(columnSetMultiIndicator);\n }\n if (ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator() == columnSetMultiIndicator.eClass()) {\n columnSetMultiIndicator = columnsetFactory.createMinMaxDateIndicator();\n }\n if (ColumnsetPackage.eINSTANCE.getWeakCorrelationIndicator() == columnSetMultiIndicator.eClass()) {\n columnSetMultiIndicator = columnsetFactory.createWeakCorrelationIndicator();\n }\n } else {\n columnSetMultiIndicator = (ColumnSetMultiValueIndicator) correlationAnalysisHandler.getIndicator();\n }\n initializeIndicator(columnSetMultiIndicator);\n columnSetMultiIndicator.setStoreData(true);\n for (ModelElement element : analyzedColumns) {\n TdColumn tdColumn = SwitchHelpers.COLUMN_SWITCH.doSwitch(element);\n if (tdColumn == null) {\n continue;\n }\n DataminingType dataminingType = correlationAnalysisHandler.getDatamingType(tdColumn);\n MetadataHelper.setDataminingType(dataminingType == null ? DataminingType.NOMINAL : dataminingType, tdColumn);\n }\n}\n"
|
"public static Object[][] getData(String methodName) {\n Object[][] testMethodData = null;\n List<IBrowserConf> browserConfFullList = RetryIAnnotationTransformer.methodBrowser.get(methodName);\n Set<IBrowserConf> browserConfSet = new HashSet<IBrowserConf>(browserConfFullList);\n List<IBrowserConf> browserConfFilteredList = new ArrayList<IBrowserConf>(browserConfSet);\n List<IProperty> testMData = RetryIAnnotationTransformer.methodData.get(methodName);\n mapStrategy strategy = RetryIAnnotationTransformer.runStrategy.get(methodName);\n int browserConfsize = browserConf.size();\n int propSize = prop.size();\n int loopCombination;\n int k = 0;\n switch(strategy) {\n case Full:\n loopCombination = browserConfsize * propSize;\n returnObject = new Object[loopCombination][2];\n for (int i = 0; i < browserConfsize; i++) {\n for (int j = 0; j < propSize; j++) {\n returnObject[k][0] = browserConf.get(i);\n returnObject[k][1] = prop.get(j);\n k++;\n }\n }\n break;\n case Optimal:\n if (browserConfsize >= propSize)\n loopCombination = browserConfsize;\n else\n loopCombination = propSize;\n returnObject = new Object[loopCombination][2];\n for (int i = 0; i < loopCombination; i++) {\n Random r = new Random();\n if (i >= browserConfsize) {\n returnObject[i][0] = browserConf.get(r.nextInt(browserConfsize));\n } else {\n returnObject[i][0] = browserConf.get(i);\n }\n if (i >= propSize) {\n returnObject[i][1] = prop.get(r.nextInt(propSize));\n } else {\n returnObject[i][1] = prop.get(i);\n }\n }\n break;\n default:\n break;\n }\n return returnObject;\n}\n"
|
"void init() {\n if (demoProjects == null) {\n synchronized (DemoProjectsProvider.class) {\n allDemoProviders = new HashMap<String, DemoProvider>();\n readRegistry();\n Map<String, DemoProvider> finalDemoProviders = new HashMap<String, DemoProvider>(allDemoProviders);\n List<String> overrideIds = new ArrayList<String>();\n Iterator<String> iterator = finalDemoProviders.keySet().iterator();\n while (iterator.hasNext()) {\n String id = iterator.next();\n String overrideId = finalDemoProviders.get(id).overrideId;\n if (overrideId != null && finalDemoProviders.containsKey(overrideId)) {\n overrideIds.add(overrideId);\n }\n }\n for (String overrideId : overrideIds) {\n finalDemoProviders.remove(overrideId);\n }\n List<DemoProvider> finalDemoProvidersList = new ArrayList<DemoProvider>(finalDemoProviders.values());\n Collections.sort(finalDemoProvidersList, new Comparator<DemoProvider>() {\n public int compare(DemoProvider dp1, DemoProvider dp2) {\n return dp1.order - dp2.order;\n }\n });\n List<DemoProjectBean> finalDemoProjects = new ArrayList<DemoProjectBean>();\n for (DemoProvider demoProvider : finalDemoProvidersList) {\n DemoProjectBean demoBean = new DemoProjectBean();\n demoBean.setProjectName(demoProvider.name);\n demoBean.setPluginId(demoProvider.pluginId);\n demoBean.setDescriptionFilePath(demoProvider.descHtml);\n demoBean.setDemoProjectFilePath(demoProvider.projectUrl);\n if (demoBean.getDemoProjectFilePath().endsWith(FileExtensions.ZIP_FILE_SUFFIX) || demoBean.getDemoProjectFilePath().endsWith(FileExtensions.TAR_FILE_SUFFIX) || demoBean.getDemoProjectFilePath().endsWith(FileExtensions.TAR_GZ_FILE_SUFFIX)) {\n demoBean.setDemoProjectFileType(EDemoProjectFileType.ARCHIVE);\n } else {\n demoBean.setDemoProjectFileType(EDemoProjectFileType.FOLDER);\n }\n finalDemoProjects.add(demoBean);\n }\n demoProjects = finalDemoProjects.toArray(new DemoProjectBean[0]);\n }\n }\n}\n"
|
"public void testDefaultConstructor() {\n Assert.assertNull(this.c.getClusterType());\n Assert.assertNull(this.c.getCommands());\n Assert.assertNull(this.c.getConfigs());\n Assert.assertNull(this.c.getName());\n Assert.assertNull(this.c.getStatus());\n Assert.assertNotNull(this.c.getTags());\n Assert.assertNull(this.c.getUser());\n Assert.assertNull(this.c.getVersion());\n}\n"
|
"protected void doRun() {\n IStructuredSelection selection = (IStructuredSelection) getSelection();\n IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n if (repositoryNode == null && selection != null) {\n repositoryNode = (RepositoryNode) selection.getFirstElement();\n }\n DatabaseConnectionItem dbConnectionItem = null;\n ConnectionParameters connParameters = new ConnectionParameters();\n if (repositoryNode.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {\n dbConnectionItem = (DatabaseConnectionItem) repositoryNode.getObject().getProperty().getItem();\n connParameters.setRepositoryName(repositoryNode.getObject().getLabel());\n connParameters.setRepositoryId(repositoryNode.getObject().getId());\n connParameters.setQuery(\"String_Node_Str\");\n } else if (repositoryNode.getObjectType() == ERepositoryObjectType.METADATA_CON_QUERY) {\n QueryRepositoryObject queryRepositoryObject = (QueryRepositoryObject) repositoryNode.getObject();\n dbConnectionItem = (DatabaseConnectionItem) queryRepositoryObject.getProperty().getItem();\n connParameters.setRepositoryName(dbConnectionItem.getProperty().getLabel());\n connParameters.setRepositoryId(dbConnectionItem.getProperty().getId());\n connParameters.setQueryObject(queryRepositoryObject.getQuery());\n connParameters.setQuery(queryRepositoryObject.getQuery().getValue());\n connParameters.setFirstOpenSqlBuilder(true);\n }\n Display display = Display.getCurrent();\n if (display == null) {\n display = Display.getDefault();\n }\n Shell parentShell = new Shell(display);\n TextUtil.setDialogTitle(TalendTextUtils.SQL_BUILDER_TITLE_REP);\n SQLBuilderDialog dial = new SQLBuilderDialog(parentShell);\n dial.setReadOnly(true);\n Connection connection = dbConnectionItem.getConnection();\n if (connection instanceof DatabaseConnection) {\n IMetadataConnection imetadataConnection = ConvertionHelper.convert(connection, true);\n connParameters.setSchema(imetadataConnection.getSchema());\n }\n connParameters.setNodeReadOnly(true);\n connParameters.setFromRepository(true);\n dial.setConnParameters(connParameters);\n dial.open();\n refresh(repositoryNode);\n}\n"
|
"private void triggerViewsReady(final ArrayMap<String, View> sharedElements) {\n if (mAreViewsReady) {\n return;\n }\n mAreViewsReady = true;\n final ViewGroup decor = getDecor();\n if (decor == null || (decor.isAttachedToWindow() && (sharedElements.isEmpty() || !sharedElements.valueAt(0).isLayoutRequested()))) {\n viewsReady(sharedElements);\n } else {\n decor.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {\n public boolean onPreDraw() {\n decor.getViewTreeObserver().removeOnPreDrawListener(this);\n viewsReady(sharedElements);\n return true;\n }\n };\n decor.getViewTreeObserver().addOnPreDrawListener(mViewsReadyListener);\n }\n}\n"
|
"public boolean onOptionsItemSelected(MenuItem menuItem) {\n super.onOptionsItemSelected(menuItem);\n switch(menuItem.getItemId()) {\n case R.id.send_tweetflow:\n Toast.makeText(this, TweeterParser.parseTweetFlow(mTweetFlow), Toast.LENGTH_SHORT).show();\n break;\n case R.id.deselect:\n mTweetFlow.deselectAll();\n mEditorView.redraw();\n break;\n case R.id.raster_add:\n mEditorView.setRasterOn(true);\n mEditorView.redraw();\n break;\n case R.id.raster_remove:\n mEditorView.setRasterOn(false);\n mEditorView.redraw();\n break;\n case R.id.snapping:\n break;\n case R.id.snapping_nothing:\n menuItem.setChecked(true);\n mEditorView.setSnapMode(SnapMode.NOTHING);\n mEditorView.redraw();\n break;\n case R.id.snapping_raster:\n menuItem.setChecked(true);\n mEditorView.setSnapMode(SnapMode.RASTER);\n mEditorView.redraw();\n break;\n case R.id.snapping_grid:\n menuItem.setChecked(true);\n mEditorView.setSnapMode(SnapMode.GRID);\n mEditorView.redraw();\n break;\n case R.id.add_open_sequence:\n mTweetFlow.addOpenSequence();\n mEditorView.redraw();\n break;\n case R.id.create_bigloop:\n mEditorView.setState(EDITOR_STATE.CREATE_LOOP);\n break;\n default:\n Toast.makeText(this, menuItem.getTitle(), Toast.LENGTH_SHORT).show();\n }\n return true;\n}\n"
|
"public void updateAfterConcurrentDeletionShouldCauseException() throws Exception {\n createAndPersistNovel();\n session.clear();\n Transaction transaction = session.beginTransaction();\n Novel novel = (Novel) session.get(Novel.class, \"String_Node_Str\");\n concurrentlyDeleteNovel();\n novel.setPosition(2);\n transaction.commit();\n}\n"
|
"static String stripVersionAndMetricsFromPath(String path) {\n int startPos = Constants.Gateway.GATEWAY_VERSION.length() + 9;\n return path.substring(startPos - 1, path.length());\n}\n"
|
"public org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent convertMedicationStatementDosageComponent(org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementDosageComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent tgt = new org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent();\n copyElement(src, tgt);\n tgt.setText(src.getText());\n tgt.setTiming(convertTiming(src.getTiming()));\n tgt.setAsNeeded(convertType(src.getAsNeeded()));\n tgt.setSite(convertType(src.getSite()));\n tgt.setRoute(convertCodeableConcept(src.getRoute()));\n tgt.setMethod(convertCodeableConcept(src.getMethod()));\n tgt.setRate(convertType(src.getRate()));\n tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod()));\n return tgt;\n}\n"
|
"public static void addFetishes(GameCharacter character) {\n List<Fetish> availableFetishes = new ArrayList<>();\n for (Fetish f : Fetish.values()) {\n if (f == Fetish.FETISH_PURE_VIRGIN) {\n if (character.hasVagina() && character.getHistory() != History.PROSTITUTE)\n availableFetishes.add(f);\n } else if (f == Fetish.FETISH_BIMBO) {\n if (character.isFeminine())\n availableFetishes.add(f);\n } else if (f == Fetish.FETISH_PREGNANCY) {\n if (character.hasVagina())\n availableFetishes.add(f);\n } else if (f == Fetish.FETISH_IMPREGNATION) {\n if (character.hasPenis() && character.sexualOrientation != SexualOrientation.ANDROPHILIC)\n availableFetishes.add(f);\n } else if (f == Fetish.FETISH_SEEDER) {\n if (character.hasPenis())\n availableFetishes.add(f);\n } else if (f == Fetish.FETISH_BROODMOTHER) {\n if (character.hasVagina())\n availableFetishes.add(f);\n } else if (f == Fetish.FETISH_CUM_STUD) {\n if (character.hasPenis())\n availableFetishes.add(f);\n } else if (f == Fetish.FETISH_BREASTS_SELF) {\n if (character.hasBreasts())\n availableFetishes.add(f);\n } else if (f == Fetish.FETISH_NON_CON) {\n if (Main.getProperties().nonConContent)\n availableFetishes.add(f);\n } else if (f == Fetish.FETISH_INCEST) {\n if (Main.getProperties().incestContent)\n availableFetishes.add(f);\n } else if (f.getFetishesForAutomaticUnlock().isEmpty()) {\n availableFetishes.add(f);\n }\n }\n int[] numberProb = new int[] { 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5 };\n int numberOfFetishes = numberProb[Util.random.nextInt(numberProb.length)];\n int fetishesAssigned = 0;\n if (((character.getMother() != null && character.getMother().isPlayer()) || (character.getFather() != null && character.getFather().isPlayer()))) {\n if (Main.getProperties().incestContent && Math.random() > 0.5f) {\n character.addFetish(Fetish.FETISH_INCEST);\n availableFetishes.remove(Fetish.FETISH_INCEST);\n fetishesAssigned++;\n }\n } else {\n if (Math.random() > 0.35f) {\n character.addFetish(Fetish.FETISH_TRANSFORMATION_GIVING);\n availableFetishes.remove(Fetish.FETISH_TRANSFORMATION_GIVING);\n fetishesAssigned++;\n }\n }\n while (fetishesAssigned < numberOfFetishes) {\n Fetish f = availableFetishes.get(Util.random.nextInt(availableFetishes.size()));\n character.addFetish(f);\n availableFetishes.remove(f);\n fetishesAssigned++;\n }\n}\n"
|
"public boolean isPathSuffix(final byte[] p, final int pLen) {\n final AbstractTreeIterator t = currentHead;\n final byte[] c = t.path;\n final int cLen = t.pathLen;\n for (int i = 1; i <= pLen; i++) {\n if (i > cLen)\n return false;\n if (c[cLen - i] != p[pLen - i])\n return false;\n }\n return true;\n}\n"
|
"private void setPieceOnBoard(boolean isBlack) {\n if (!option.isOccupied()) {\n if ((option.getColor().equals(Color.LIGHT_GRAY) == false) && (option.getColor().equals(Color.getHSBColor(30, 70, 70)) == false)) {\n square.setBackgroundColor(option.getColor());\n }\n if (option.isHabitable() == false) {\n square.setPiece(option.getPiece());\n }\n square.setHabitable(option.isHabitable());\n square.refresh();\n } else {\n if (square.isHabitable() == true) {\n Piece p = PieceBuilder.makePiece(option.getPiece().getName(), isBlack, square, board);\n if (isBlack)\n blackTeam.add(p);\n else\n whiteTeam.add(p);\n square.setPiece(p);\n square.refresh();\n } else {\n JOptionPane.showMessageDialog(null, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.WARNING_MESSAGE);\n }\n }\n}\n"
|
"public void removeErrors() {\n this.errorMessage = null;\n if (!wizard.isDisposed()) {\n wizard.getDialog().setErrorMessage(null);\n }\n}\n"
|
"public void addAuthenticator(Authenticator authenticator, String loginMethod) {\n if ((authenticator != null) && !(authenticator instanceof GlassFishValve)) {\n throw new IllegalArgumentException(sm.getString(\"String_Node_Str\"));\n }\n if (authenticators == null) {\n authenticators = new HashMap<String, Authenticator>();\n }\n authenticators.put(loginMethod, authenticator);\n}\n"
|
"private <T extends EventListener> T initializeListener(ListenerConfig listenerConfig) {\n T listener = getListenerImplOrNull(listenerConfig);\n if (listener instanceof HazelcastInstanceAware) {\n ((HazelcastInstanceAware) listener).setHazelcastInstance(getNodeEngine().getHazelcastInstance());\n }\n return listener;\n}\n"
|
"public void testBadTemplateType1() throws Exception {\n testTypes(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", FunctionTypeBuilder.TEMPLATE_TYPE_DUPLICATED.format());\n}\n"
|
"private void syncDetailsPane(TreeItem item) {\n TreeItemLogger.LogEvent logEvent = null;\n Object testLogEvent = item.getData();\n if (testLogEvent instanceof TreeItemLogger.LogEvent) {\n logEvent = (LogEvent) testLogEvent;\n }\n StringBuffer sb = new StringBuffer();\n if (logEvent != null && logEvent.type != null) {\n sb.append(\"String_Node_Str\");\n sb.append(logEvent.type.getLabel());\n sb.append(\"String_Node_Str\");\n }\n sb.append(item.getText());\n sb.append(\"String_Node_Str\");\n if (logEvent != null && logEvent.exceptionDetail != null) {\n sb.append(logEvent.exceptionDetail);\n }\n details.setText(sb.toString());\n}\n"
|
"protected UserInfo map2VO(ResultSet rs) throws SQLException {\n UserInfo user = new UserInfo();\n rs.next();\n user.setLogin(rs.getString(\"String_Node_Str\"));\n if (rs.getString(\"String_Node_Str\") == null) {\n user.setPassword(\"String_Node_Str\");\n } else {\n user.setPassword(rs.getString(\"String_Node_Str\"));\n }\n return user;\n}\n"
|
"public void setup() {\n HazelcastInstance[] cluster = createHazelcastInstanceFactory(2).newInstances();\n HazelcastInstance local = cluster[0];\n HazelcastInstance remote = cluster[1];\n map = local.getMap(randomName());\n serializationService = getSerializationService(local);\n remoteKey1 = generateKeyOwnedBy(remote);\n remoteKey2 = generateKeyOwnedBy(remote);\n remoteKey3 = generateKeyOwnedBy(remote);\n localKey1 = generateKeyOwnedBy(local);\n localKey2 = generateKeyOwnedBy(local);\n localKey3 = generateKeyOwnedBy(local);\n}\n"
|
"public boolean isEnabled() {\n boolean enabled = true;\n if (measureViewHandle instanceof ComputedMeasureViewHandle) {\n enabled = false;\n } else {\n if (DEUtil.isLinkedElement(measureViewHandle.getCrosstabHandle())) {\n return false;\n }\n IAggregationCellViewProvider provider = providerWrapper.getProvider(expectedView);\n SwitchCellInfo info = new SwitchCellInfo(measureViewHandle.getCrosstab(), SwitchCellInfo.MEASURE);\n info.setMeasureInfo(true, measureViewHandle.getCubeMeasureName(), expectedView);\n enabled = provider.canSwitch(info);\n IAggregationCellViewProvider matchProvider = providerWrapper.getMatchProvider(measureViewHandle.getCell());\n if (matchProvider != null && matchProvider.getViewName().equals(expectedView)) {\n enabled = false;\n }\n }\n setEnabled(enabled);\n return enabled;\n}\n"
|
"public void addWrappersToProject(Project toplinkProject) {\n getTypeHelperDelegate().addWrappersToProject(toplinkProject);\n}\n"
|
"protected void AddWordToStorage(String word, int frequency) {\n if (TextUtils.isEmpty(word)) {\n return;\n }\n if (frequency < 0)\n frequency = 0;\n if (frequency > 255)\n frequency = 255;\n ContentValues values = new ContentValues(4);\n values.put(Words.WORD, word);\n values.put(Words.FREQUENCY, frequency);\n values.put(Words.LOCALE, mLocale);\n values.put(Words.APP_ID, 0);\n Uri result = mContext.getContentResolver().insert(Words.CONTENT_URI, values);\n Log.i(TAG, \"String_Node_Str\" + word + \"String_Node_Str\" + result);\n}\n"
|
"public void testGetSubCpOptionForMencoder_withoutDetectedCharset() throws Exception {\n DLNAMediaSubtitle subtitle = new DLNAMediaSubtitle();\n File file_cp1251 = FileUtils.toFile(CLASS.getResource(\"String_Node_Str\"));\n subtitle.setType(VOBSUB);\n subtitle.setExternalFile(file_cp1251, null);\n assertThat(subtitle.getSubCharacterSet()).isNull();\n assertThat(getSubCpOptionForMencoder(subtitle)).isNull();\n}\n"
|
"public void test1() {\n testSee(\"String_Node_Str\", \"String_Node_Str\", 100);\n}\n"
|
"public void updateTable(AssemblyStatsTable table, List<File> assemblies, File reportDir, String subGroup) throws IOException {\n File quastReportFile = new File(reportDir, QUAST_REPORT_NAME);\n if (quastReportFile.exists()) {\n QuastV2_2Report quastReport = new QuastV2_2Report(quastReportFile);\n for (QuastV2_2Report.QuastV2_2AssemblyStats qStats : quastReport.getStatList()) {\n if (!qStats.getName().endsWith(\"String_Node_Str\")) {\n String desc = qStats.getName().substring(subGroup.length() + 1, qStats.getName().lastIndexOf(\"String_Node_Str\"));\n AssemblyStats stats = table.findStats(subGroup, desc);\n if (stats == null) {\n throw new IOException(\"String_Node_Str\" + subGroup + \"String_Node_Str\" + desc);\n }\n stats.setN50(qStats.getN50());\n stats.setL50(qStats.getL50());\n stats.setMaxLen(qStats.getLargestContig());\n stats.setGcPercentage(qStats.getGcPc());\n stats.setNbSeqs(qStats.getNbContigsGt0());\n stats.setNbSeqsGt1K(qStats.getNbContigsGt1k());\n stats.setNbBases(qStats.getTotalLengthGt0());\n stats.setNbBasesGt1K(qStats.getTotalLengthGt1k());\n stats.setNPercentage(qStats.getNsPer100k() / 1000.0);\n }\n }\n } else {\n log.warn(\"String_Node_Str\" + quastReportFile.getAbsolutePath() + \"String_Node_Str\");\n }\n}\n"
|
"protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n int targetWidth = HeaderGridView.this.getMeasuredWidth() - ViewCompat.getPaddingStart(HeaderGridView.this) - ViewCompat.getPaddingEnd(HeaderGridView.this);\n widthMeasureSpec = MeasureSpec.makeMeasureSpec(targetWidth, MeasureSpec.getMode(widthMeasureSpec));\n super.onMeasure(widthMeasureSpec, heightMeasureSpec);\n}\n"
|
"static Cursor query(SQLiteDatabase db, long accountId) {\n String[] credentials = getCredentials(db, accountId);\n ArrayList<Subreddit> subreddits = null;\n try {\n subreddits = NetApi.query(credentials[0]);\n } catch (IOException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n return null;\n }\n Cursor c = db.query(AccountSubreddits.TABLE_NAME, ACCOUNT_SUBREDDITS_PROJECTION, AccountSubreddits.ACCOUNT_ID_SELECTION, new String[] { Long.toString(accountId) }, null, null, null);\n while (c.moveToNext()) {\n String name = c.getString(INDEX_NAME);\n switch(c.getInt(INDEX_TYPE)) {\n case AccountSubreddits.TYPE_INSERT:\n insertSubreddit(subreddits, name);\n break;\n case AccountSubreddits.TYPE_DELETE:\n deleteSubreddit(subreddits, name);\n break;\n default:\n throw new IllegalStateException();\n }\n }\n c.close();\n return new SubredditCursor(subreddits);\n}\n"
|
"protected List<SourceFile> createInputs(List<String> files, List<String> zips, List<JsonFileSpec> jsonFiles, boolean allowStdIn) throws FlagUsageException, IOException {\n List<SourceFile> inputs = new ArrayList<>(files.size());\n boolean usingStdin = false;\n for (FlagEntry<JsSourceType> file : files) {\n String filename = file.value;\n if (file.flag == JsSourceType.JS_ZIP) {\n if (!\"String_Node_Str\".equals(filename)) {\n List<SourceFile> newFiles = SourceFile.fromZipFile(filename, inputCharset);\n inputs.addAll(newFiles);\n }\n } else if (!\"String_Node_Str\".equals(filename)) {\n SourceFile newFile = SourceFile.fromFile(filename, inputCharset);\n inputs.add(newFile);\n } else {\n if (!allowStdIn) {\n throw new FlagUsageException(\"String_Node_Str\");\n }\n if (usingStdin) {\n throw new FlagUsageException(\"String_Node_Str\");\n }\n if (!config.outputManifests.isEmpty()) {\n throw new FlagUsageException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n if (!config.outputBundles.isEmpty()) {\n throw new FlagUsageException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n this.err.println(WAITING_FOR_INPUT_WARNING);\n inputs.add(SourceFile.fromInputStream(\"String_Node_Str\", this.in, inputCharset));\n usingStdin = true;\n }\n }\n for (String zipName : zips) {\n if (!\"String_Node_Str\".equals(zipName)) {\n List<SourceFile> newFiles = SourceFile.fromZipFile(zipName, inputCharset);\n inputs.addAll(newFiles);\n }\n }\n if (jsonFiles != null) {\n for (JsonFileSpec jsonFile : jsonFiles) {\n inputs.add(SourceFile.fromCode(jsonFile.getPath(), jsonFile.getSrc()));\n }\n }\n return inputs;\n}\n"
|
"public List<EntitlementPool> listByConsumer(String consumerUuid) {\n log.debug(\"String_Node_Str\" + consumerUuid);\n Consumer consumer = consumerCurator.lookupByUuid(consumerUuid);\n log.debug(\"String_Node_Str\" + consumer.toString());\n List<EntitlementPool> eps = entitlementPoolCurator.listByConsumer(consumer);\n log.debug(\"String_Node_Str\" + eps.toString());\n return eps;\n}\n"
|
"public int getPosixAccessRights(StorageManager sMan, FileMetadata file, String userId, List<String> groupIds) throws MRCException {\n return !file.isDirectory() && file.isReadOnly() ? file.getPerms() & READ_ONLY_MASK : file.getPerms();\n}\n"
|
"public IType getSimpleRefType() {\n if (this.simpleRefType != null) {\n return this.simpleRefType;\n }\n final String className = \"String_Node_Str\" + this.getTypePrefix() + \"String_Node_Str\";\n return this.simpleRefType = new ClassType(Package.dyvilRefSimple.resolveClass(className));\n}\n"
|
"public static ValidationDefinition parseDefinition(InputStream stream) throws ParserConfigurationException, IOException, SAXException, MalformedDataException {\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n documentBuilderFactory.setIgnoringElementContentWhitespace(true);\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document doc = documentBuilder.parse(stream);\n ValidationDefinition definition = new ValidationDefinition();\n for (Node node = doc.getDocumentElement().getFirstChild(); node != null; node = node.getNextSibling()) {\n if (node.getNodeType() == Node.TEXT_NODE || node.getNodeType() == Node.COMMENT_NODE) {\n continue;\n } else if (node.getNodeName().equals(\"String_Node_Str\")) {\n String name = node.getAttributes().getNamedItem(\"String_Node_Str\").getNodeValue();\n definition.setName(name);\n List<Parameter> parameter = Parameter.nodeToParameterList(node);\n definition.setParameters(parameter);\n } else {\n definition.metadata.put(node.getNodeName(), XmlUtil.textInNode(node, \"String_Node_Str\" + node.getNodeName()));\n }\n }\n return definition;\n}\n"
|
"private boolean isTargetForMapperFieldMapper(PropertyMapping pm) {\n return pm.getPropertyMeta().isSubProperty() || (JoinUtils.isArrayElement(pm.getPropertyMeta()) && pm.getColumnDefinition().isKey());\n}\n"
|
"public synchronized void wrapup() throws IllegalActionException {\n super.wrapup();\n if (_websocket != null) {\n _websocket.close();\n }\n if (_client != null) {\n _client.close();\n }\n _vertx.stop();\n}\n"
|
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.share_photo);\n Display display = getWindowManager().getDefaultDisplay();\n screenWidth = (int) (display.getWidth() * 0.95);\n margin = (int) ((display.getWidth() - screenWidth) / 2);\n btnSelectGroup = (Button) findViewById(R.id.groups_spinner);\n comment = (EditText) findViewById(R.id.edit_message);\n imageView = (ImageView) findViewById(R.id.image1);\n LayoutParams params = (LayoutParams) imageView.getLayoutParams();\n params.width = screenWidth;\n params.height = screenWidth;\n params.setMargins(0, margin, 0, margin);\n imageView.setLayoutParams(params);\n locationImg = (ImageView) findViewById(R.id.img_location_ok);\n locationTxt = (TextView) findViewById(R.id.txt_location);\n imageLoader = ImageLoader.getInstance();\n mLocationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n final boolean gpsEnabled = mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n if (!gpsEnabled) {\n Util.createGpsDisabledAlert(this);\n }\n Intent intent = getIntent();\n if (intent.getType() != null && intent.getType().indexOf(\"String_Node_Str\") != -1) {\n fileUri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);\n if (fileUri != null) {\n String path = Util.getRealPathFromURI(this, fileUri);\n fileUri = Uri.parse(path);\n rotation = Util.getRotationDegrees(fileUri.getPath());\n imageView.setImageBitmap(Util.decodeSampledBitmapFromFile(path, screenWidth, screenWidth, rotation));\n setupGps();\n }\n } else {\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n fileUri = Util.getOutputMediaFileUri(Util.MEDIA_TYPE_IMAGE);\n cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n startActivityForResult(cameraIntent, TAKE_PICTURE);\n }\n}\n"
|
"protected String buildBookmarkAction(IAction action, IReportContext context) {\n if (action == null || context == null)\n return null;\n String baseURL = null;\n Object renderContext = getRenderContext(context);\n if (renderContext instanceof HTMLRenderContext) {\n baseURL = ((HTMLRenderContext) renderContext).getBaseURL();\n }\n if (renderContext instanceof PDFRenderContext) {\n baseURL = ((PDFRenderContext) renderContext).getBaseURL();\n }\n if (baseURL == null)\n return null;\n String bookmark = action.getBookmark();\n if (baseURL.lastIndexOf(IBirtConstants.SERVLET_PATH_FRAMESET) > 0) {\n String func = \"String_Node_Str\" + ParameterAccessor.htmlEncode(bookmark) + \"String_Node_Str\";\n return \"String_Node_Str\" + func + \"String_Node_Str\" + func + \"String_Node_Str\";\n } else if (baseURL.lastIndexOf(IBirtConstants.SERVLET_PATH_RUN) > 0) {\n String func = \"String_Node_Str\" + bookmark + \"String_Node_Str\";\n return \"String_Node_Str\" + func + \"String_Node_Str\" + func + \"String_Node_Str\";\n }\n StringBuffer link = new StringBuffer();\n boolean realBookmark = false;\n if (this.document != null) {\n long pageNumber = this.document.getPageNumber(action.getBookmark());\n realBookmark = (pageNumber == this.page && !isEmbeddable);\n }\n try {\n bookmark = URLEncoder.encode(bookmark, ParameterAccessor.UTF_8_ENCODE);\n } catch (UnsupportedEncodingException e) {\n }\n link.append(baseURL);\n link.append(ParameterAccessor.QUERY_CHAR);\n if (document != null) {\n link.append(ParameterAccessor.PARAM_REPORT_DOCUMENT);\n link.append(ParameterAccessor.EQUALS_OPERATOR);\n String documentName = document.getName();\n try {\n documentName = URLEncoder.encode(documentName, ParameterAccessor.UTF_8_ENCODE);\n } catch (UnsupportedEncodingException e) {\n }\n link.append(documentName);\n } else if (action.getReportName() != null && action.getReportName().length() > 0) {\n link.append(ParameterAccessor.PARAM_REPORT);\n link.append(ParameterAccessor.EQUALS_OPERATOR);\n String reportName = getReportName(context, action);\n try {\n reportName = URLEncoder.encode(reportName, ParameterAccessor.UTF_8_ENCODE);\n } catch (UnsupportedEncodingException e) {\n }\n link.append(reportName);\n } else {\n return \"String_Node_Str\" + action.getActionString();\n }\n if (locale != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_LOCALE, locale.toString()));\n }\n if (isRtl) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_RTL, String.valueOf(isRtl)));\n }\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_MASTERPAGE, String.valueOf(this.isMasterPageContent)));\n try {\n if (resourceFolder != null) {\n String res = URLEncoder.encode(resourceFolder, ParameterAccessor.UTF_8_ENCODE);\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_RESOURCE_FOLDER, res));\n }\n } catch (UnsupportedEncodingException e) {\n }\n if (resourceFolder != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_RESOURCE_FOLDER, this.resourceFolder));\n }\n if (realBookmark) {\n link.append(\"String_Node_Str\");\n link.append(bookmark);\n } else {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_BOOKMARK, bookmark));\n }\n return link.toString();\n}\n"
|
"public void onEnable() {\n checkForLibs();\n trans = new Translation();\n instance = this;\n log = getServer().getLogger();\n try {\n dclistener = new DropChestListener();\n } catch (NoClassDefFoundError e) {\n dclistener = null;\n }\n try {\n worldguard = (WorldGuardPlugin) getServer().getPluginManager().getPlugin(\"String_Node_Str\");\n } catch (Exception e) {\n worldguard = null;\n }\n PluginDescriptionFile pdfFile = this.getDescription();\n PluginManager pm = getServer().getPluginManager();\n pm.registerEvent(Type.PLAYER_INTERACT, playerListener, Priority.Normal, this);\n pm.registerEvent(Type.PLAYER_PICKUP_ITEM, playerListener, Priority.Low, this);\n pm.registerEvent(Type.BLOCK_BREAK, blockListener, Priority.Low, this);\n pm.registerEvent(Type.PLAYER_DROP_ITEM, playerListener, Priority.Normal, this);\n pm.registerEvent(Type.CHUNK_LOAD, worldListener, Priority.Normal, this);\n pm.registerEvent(Type.CHUNK_UNLOAD, worldListener, Priority.Normal, this);\n pm.registerEvent(Type.BLOCK_PLACE, blockListener, Priority.Normal, this);\n if (dclistener != null) {\n pm.registerEvent(Type.CUSTOM_EVENT, dclistener, Priority.Normal, this);\n }\n for (World w : getServer().getWorlds()) {\n for (Entity e : w.getEntities()) {\n if (e instanceof Item) {\n Location loc = e.getLocation();\n Block b = loc.getBlock();\n if (b.getType().equals(Material.GLASS) || b.getType().equals(Material.STEP)) {\n e.remove();\n }\n }\n }\n }\n load();\n config = new Configuration();\n if (pm.getPlugin(\"String_Node_Str\") != null) {\n config.setUseSpout(true);\n }\n if (config.useSpout()) {\n if (!NarrowtuxLib.getInstance().installSpout()) {\n config.setUseSpout(false);\n }\n }\n odditem = (OddItem) pm.getPlugin(\"String_Node_Str\");\n trans.reload(new File(getDataFolder(), \"String_Node_Str\" + config.getLocale() + \"String_Node_Str\"));\n if (trans.getVersion() < 5) {\n try {\n copyFromJarToDisk(\"String_Node_Str\" + config.getLocale() + \"String_Node_Str\", getDataFolder());\n log.log(Level.INFO, \"String_Node_Str\" + config.getLocale() + \"String_Node_Str\");\n trans.reload(new File(getDataFolder(), \"String_Node_Str\" + config.getLocale() + \"String_Node_Str\"));\n } catch (IOException e) {\n System.out.println(\"String_Node_Str\");\n }\n }\n playerListener.config = config;\n registerProvider(new BasicShowcase());\n registerProvider(new FiniteShowcase());\n registerProvider(new InfiniteShowcase());\n registerProvider(new ExchangeShowcase());\n registerProvider(new TutorialShowcase());\n getServer().getScheduler().scheduleSyncDelayedTask(this, new ItemSpawner(), 20);\n getServer().getScheduler().scheduleSyncRepeatingTask(this, watcher, 10, 40);\n setupPermissions();\n if (config.getAutosaveInterval() != -1) {\n getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {\n public void run() {\n save();\n if (config.isShowingAutosaveNotification()) {\n log.log(Level.INFO, \"String_Node_Str\");\n }\n }\n }, 0, config.getAutosaveInterval() * 20);\n }\n String logText = trans.tr(\"String_Node_Str\", pdfFile.getName(), pdfFile.getVersion());\n log.log(Level.INFO, logText);\n}\n"
|
"private static byte[] alterChunk(String name, String transformedName, byte[] bytes, ClassReader cr) {\n String[] names;\n if (LoadingPlugin.runtimeDeobfEnabled) {\n names = new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n } else {\n names = new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n }\n name = transformedName.replace('.', '/');\n ClassNode cn = new ClassNode(ASM5);\n cr.accept(cn, ClassReader.EXPAND_FRAMES);\n l: {\n boolean updated = false;\n for (MethodNode m : cn.methods) {\n String mName = m.name;\n if (names[0].equals(mName) && \"String_Node_Str\".equals(m.desc)) {\n updated = true;\n for (int i = 0, e = m.instructions.size(); i < e; ++i) {\n AbstractInsnNode n = m.instructions.get(i);\n if (n.getOpcode() == RETURN) {\n m.instructions.insertBefore(n, new VarInsnNode(ALOAD, 0));\n m.instructions.insertBefore(n, new InsnNode(ICONST_0));\n m.instructions.insertBefore(n, new FieldInsnNode(PUTFIELD, name, names[1], \"String_Node_Str\"));\n break;\n }\n }\n }\n }\n if (!updated) {\n break l;\n }\n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);\n cn.accept(cw);\n bytes = cw.toByteArray();\n }\n return bytes;\n}\n"
|
"protected void initFields() {\n mainThreadHandler = new Handler(Looper.getMainLooper());\n resources = getResources();\n dataManager = DataManager.getInstance();\n imageUtils = new ImageUtils(this);\n loadAttachFileSuccessAction = new LoadAttachFileSuccessAction();\n loadDialogMessagesSuccessAction = new LoadDialogMessagesSuccessAction();\n loadDialogMessagesFailAction = new LoadDialogMessagesFailAction();\n typingTimer = new Timer();\n dialogObserver = new DialogObserver();\n messageObserver = new MessageObserver();\n dialogNotificationObserver = new DialogNotificationObserver();\n updatingDialogBroadcastReceiver = new UpdatingDialogBroadcastReceiver();\n appSharedHelper.saveNeedToOpenDialog(false);\n imagePickHelper = new ImagePickHelper();\n systemPermissionHelper = new SystemPermissionHelper(this);\n messagesTextViewLinkClickListener = new MessagesTextViewLinkClickListener();\n locationAttachClickListener = new LocationAttachClickListener();\n imageAttachClickListener = new ImageAttachClickListener();\n currentChatDialog = (QBChatDialog) getIntent().getExtras().getSerializable(QBServiceConsts.EXTRA_DIALOG);\n combinationMessagesList = new ArrayList<>();\n}\n"
|
"public Long run() throws Exception {\n long expires = token.renew(fs.getConf());\n log.info(\"String_Node_Str\", getPrintableExpirationTime(expires));\n return expires;\n}\n"
|
"protected void composeParameterDefinitionElements(ParameterDefinition element) throws IOException {\n composeElementElements(element);\n if (element.hasNameElement()) {\n composeCode(\"String_Node_Str\", element.getNameElement());\n }\n if (element.hasUseElement())\n composeEnumeration(\"String_Node_Str\", element.getUseElement(), new ParameterDefinition.ParameterUseEnumFactory());\n if (element.hasMinElement()) {\n composeInteger(\"String_Node_Str\", element.getMinElement());\n }\n if (element.hasMaxElement()) {\n composeString(\"String_Node_Str\", element.getMaxElement());\n }\n if (element.hasDocumentationElement()) {\n composeString(\"String_Node_Str\", element.getDocumentationElement());\n }\n if (element.hasTypeElement()) {\n composeCode(\"String_Node_Str\", element.getTypeElement());\n }\n if (element.hasProfileElement()) {\n composeCanonical(\"String_Node_Str\", element.getProfileElement());\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.