content
stringlengths 40
137k
|
---|
"private ITimeFunction adaptTimeFunction(ComputedColumnHandle handle) throws DataException, BirtException {\n if (handle.getCalculationType() == null || handle.getCalculationType().trim().length() == 0)\n return null;\n TimeFunction timeFunction = new TimeFunction();\n Object referenceDate = null;\n if (DesignChoiceConstants.REFERENCE_DATE_TYPE_TODAY.equals(handle.getReferenceDateType())) {\n referenceDate = ScriptEvalUtil.evalExpr(new ScriptExpression(\"String_Node_Str\"), this.context.getDataEngineContext().getScriptContext(), \"String_Node_Str\", 0);\n } else if (DesignChoiceConstants.REFERENCE_DATE_TYPE_FIXED_DATE.equals(handle.getReferenceDateType())) {\n IBaseExpression sciptExpr = this.adaptExpression((Expression) (handle.getReferenceDateValue().getValue()));\n referenceDate = ScriptEvalUtil.evalExpr(sciptExpr, this.context.getDataEngineContext().getScriptContext(), \"String_Node_Str\", 0);\n }\n timeFunction.setReferenceDate(new ReferenceDate(DataTypeUtil.toDate(referenceDate)));\n timeFunction.setTimeDimension(handle.getTimeDimension());\n timeFunction.setBaseTimePeriod(populateBaseTimePeriod(handle));\n timeFunction.setRelativeTimePeriod(populateRelativeTimePeriod(handle));\n return timeFunction;\n}\n"
|
"public static void beforeClass() throws IOException {\n zkServer = InMemoryZKServer.builder().setDataDir(TEMP_FOLDER.newFolder()).build();\n zkServer.startAndWait();\n CConfiguration cConf = CConfiguration.create();\n cConf.set(Constants.Zookeeper.QUORUM, zkServer.getConnectionStr());\n cConf.setInt(Constants.Stream.CONTAINER_INSTANCE_ID, 0);\n cConf.set(Constants.CFG_LOCAL_DATA_DIR, TEMP_FOLDER.newFolder().getAbsolutePath());\n Injector injector = Guice.createInjector(Modules.override(new ZKClientModule(), new DataFabricModules().getInMemoryModules(), new ConfigModule(cConf, new Configuration()), new DiscoveryRuntimeModule().getInMemoryModules(), new LocationRuntimeModule().getInMemoryModules(), new ExploreClientModule(), new DataSetServiceModules().getInMemoryModules(), new DataSetsModules().getStandaloneModules(), new NotificationFeedServiceRuntimeModule().getInMemoryModules(), new NotificationServiceRuntimeModule().getInMemoryModules(), new MetricsClientRuntimeModule().getInMemoryModules(), new ViewAdminModules().getInMemoryModules(), new StreamServiceRuntimeModule().getDistributedModules(), new StreamAdminModules().getInMemoryModules()).with(new AbstractModule() {\n protected void configure() {\n bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);\n bind(StreamConsumerStateStoreFactory.class).to(LevelDBStreamConsumerStateStoreFactory.class).in(Singleton.class);\n bind(StreamAdmin.class).to(FileStreamAdmin.class).in(Singleton.class);\n bind(StreamConsumerFactory.class).to(LevelDBStreamFileConsumerFactory.class).in(Singleton.class);\n bind(StreamFileWriterFactory.class).to(LocationStreamFileWriterFactory.class).in(Singleton.class);\n bind(StreamFileJanitorService.class).to(LocalStreamFileJanitorService.class).in(Scopes.SINGLETON);\n bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class).in(Scopes.SINGLETON);\n bind(HeartbeatPublisher.class).to(MockHeartbeatPublisher.class).in(Scopes.SINGLETON);\n }\n }));\n zkClient = injector.getInstance(ZKClientService.class);\n txManager = injector.getInstance(TransactionManager.class);\n datasetService = injector.getInstance(DatasetService.class);\n notificationService = injector.getInstance(NotificationService.class);\n streamHttpService = injector.getInstance(StreamHttpService.class);\n streamService = injector.getInstance(StreamService.class);\n heartbeatPublisher = (MockHeartbeatPublisher) injector.getInstance(HeartbeatPublisher.class);\n namespacedLocationFactory = injector.getInstance(NamespacedLocationFactory.class);\n streamAdmin = injector.getInstance(StreamAdmin.class);\n zkClient.startAndWait();\n txManager.startAndWait();\n datasetService.startAndWait();\n notificationService.startAndWait();\n streamHttpService.startAndWait();\n streamService.startAndWait();\n hostname = streamHttpService.getBindAddress().getHostName();\n port = streamHttpService.getBindAddress().getPort();\n Locations.mkdirsIfNotExists(namespacedLocationFactory.get(Id.Namespace.DEFAULT));\n}\n"
|
"public Iterable<NotifGroup> findNotificationGroupsForAlertingConfigById(final int id) throws UniformInterfaceException {\n final List<NotifGroup> notifGroups = new ArrayList<NotifGroup>();\n final List<NotifGroupMapping> notifGroupMappings = fetchObject(NOTIF_GROUP_MAPPING_PATH + \"String_Node_Str\" + id, new GenericType<List<NotifGroupMapping>>() {\n });\n}\n"
|
"private void addZhaoSupervisedCombinedFeats(ZhaoObject zhaoPred, ZhaoObject zhaoArg, BinaryStrFVBuilder feats, ArrayList<CoNLL09Token> betweenPathTokens, ArrayList<CoNLL09Token> linePathCoNLL, List<Pair<Integer, Dir>> dpPathArg) {\n String feat;\n feat = zhaoArg.getLemma() + \"String_Node_Str\" + zhaoPred.getLemma();\n feats.add(feat);\n ArrayList<String> depRelPath = new ArrayList<String>();\n ArrayList<String> depRelPathLemma = new ArrayList<String>();\n for (CoNLL09Token t : betweenPathTokens) {\n if (t == null) {\n depRelPath.add(\"String_Node_Str\");\n depRelPathLemma.add(\"String_Node_Str\");\n } else {\n depRelPath.add(t.getDeprel());\n depRelPathLemma.add(t.getLemma());\n }\n }\n feat = StringUtils.join(depRelPath, \"String_Node_Str\") + \"String_Node_Str\" + zhaoPred.getFeat().get(0);\n feats.add(feat);\n feat = StringUtils.join(depRelPathLemma, \"String_Node_Str\");\n feats.add(feat);\n feat = StringUtils.join(bag(depRelPathLemma), \"String_Node_Str\");\n feats.add(feat);\n ArrayList<String> linePathFeat = new ArrayList<String>();\n ArrayList<String> linePathLemma = new ArrayList<String>();\n ArrayList<String> linePathDeprel = new ArrayList<String>();\n for (CoNLL09Token t : linePathCoNLL) {\n List<String> tFeat1 = t.getFeat();\n if (tFeat1 == null) {\n linePathFeat.add(NO_MORPH);\n } else {\n linePathFeat.add(t.getFeat().get(0));\n }\n linePathLemma.add(t.getLemma());\n linePathDeprel.add(t.getDeprel());\n }\n List<String> linePathFeatBag = bag(linePathFeat);\n feat = StringUtils.join(linePathFeatBag, \"String_Node_Str\");\n feats.add(feat);\n feat = StringUtils.join(linePathLemma, \"String_Node_Str\");\n feats.add(feat);\n feat = StringUtils.join(linePathDeprel, \"String_Node_Str\");\n feats.add(feat);\n ArrayList<String> dpPathLemma = new ArrayList<String>();\n for (Pair<Integer, Dir> dpP : dpPathArg) {\n dpPathLemma.add(sent.get(dpP.get1()).getLemma());\n }\n feat = StringUtils.join(dpPathLemma, \"String_Node_Str\");\n feats.add(feat);\n feat = StringUtils.join(bag(dpPathLemma), \"String_Node_Str\");\n feats.add(feat);\n}\n"
|
"public static void main(String[] args) {\n Options cmdlineOptions = configureOptions();\n CommandLineParser parser = new PosixParser();\n CommandLine cmdline = null;\n try {\n cmdline = parser.parse(cmdlineOptions, args);\n } catch (ParseException exp) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp(DitaDxpMapPackager.class.getSimpleName(), cmdlineOptions);\n System.exit(-1);\n }\n if (!cmdline.hasOption(INPUT_OPTION_ONE_CHAR)) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp(DitaDxpMapPackager.class.getSimpleName(), cmdlineOptions);\n System.exit(-1);\n }\n DitaDxpMapPackager app = new DitaDxpMapPackager(cmdline);\n try {\n app.run();\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n}\n"
|
"final void doLock(Request request) {\n boolean lock = (request.operation == OP_CMAP_LOCK || request.operation == OP_CMAP_LOCK_RETURN_OLD) ? true : false;\n if (!lock) {\n boolean unlocked = true;\n Record record = recordExist(request);\n if (DEBUG) {\n log(request.operation + \"String_Node_Str\" + record);\n }\n if (record != null) {\n unlocked = record.unlock(request.lockThreadId, request.lockAddress);\n if (unlocked) {\n sendLockBackup(record);\n }\n }\n if (request.local) {\n if (unlocked)\n request.response = Boolean.TRUE;\n else\n request.response = Boolean.FALSE;\n }\n } else if (!testLock(request)) {\n if (request.hasEnoughTimeToSchedule()) {\n final Record record = ensureRecord(request);\n final Request reqScheduled = (request.local) ? request : request.softCopy();\n if (request.operation == OP_CMAP_LOCK_RETURN_OLD) {\n reqScheduled.value = ThreadContext.get().hardCopy(record.getValue());\n }\n if (DEBUG) {\n log(\"String_Node_Str\");\n }\n record.addScheduledAction(new ScheduledLockAction(reqScheduled, record));\n request.scheduled = true;\n } else {\n request.response = Boolean.FALSE;\n }\n } else {\n if (DEBUG) {\n log(\"String_Node_Str\");\n }\n Record rec = ensureRecord(request);\n if (request.operation == OP_CMAP_LOCK_RETURN_OLD) {\n request.value = ThreadContext.get().hardCopy(rec.getValue());\n }\n rec.lock(request.lockThreadId, request.lockAddress);\n sendLockBackup(rec);\n request.response = Boolean.TRUE;\n }\n}\n"
|
"public void testGetterAndSetter() throws DesignFileException {\n slotDefn = new SlotDefn();\n MetadataTestUtil.setMultipleCardinality(slotDefn, true);\n MetadataTestUtil.setDisplayNameKey(slotDefn, \"String_Node_Str\");\n MetadataTestUtil.setName(slotDefn, \"String_Node_Str\");\n MetadataTestUtil.setID(slotDefn, 99);\n assertEquals(true, slotDefn.isMultipleCardinality());\n assertEquals(\"String_Node_Str\", slotDefn.getDisplayName());\n assertEquals(\"String_Node_Str\", slotDefn.getDisplayNameID());\n assertEquals(\"String_Node_Str\", slotDefn.getName());\n assertEquals(99, slotDefn.getSlotID());\n}\n"
|
"public Expression visit(FunctionExpression expression) {\n if (com.blazebit.persistence.impl.util.ExpressionUtils.isSizeFunction(expression) && clause != ClauseType.WHERE) {\n PathExpression sizeArg = (PathExpression) expression.getExpressions().get(0);\n String property = sizeArg.getPathReference().getField();\n Class<?> startClass = ((JoinNode) sizeArg.getBaseNode()).getPropertyClass();\n ManagedType<?> managedTargetType = MetamodelUtils.resolveManagedTargetType(metamodel, startClass, property);\n PersistenceType collectionIdType;\n if (managedTargetType instanceof EntityType<?>) {\n collectionIdType = ((EntityType<?>) managedTargetType).getIdType().getPersistenceType();\n } else {\n throw new RuntimeException(\"String_Node_Str\" + sizeArg.toString() + \"String_Node_Str\");\n }\n if (collectionIdType == PersistenceType.EMBEDDABLE || !metamodel.entity(startClass).hasSingleIdAttribute() || joinManager.getRoots().size() > 1 || clause == ClauseType.JOIN || !isCountTransformationEnabled() || (hasComplexGroupBySelects && !dbmsDialect.supportsComplexGroupBy()) || (hasGroupBySelects && !isImplicitGroupByFromSelectEnabled())) {\n return generateSubquery(sizeArg, startClass);\n } else {\n List<PathElementExpression> pathElementExpr = new ArrayList<PathElementExpression>();\n List<JoinNode> roots = joinManager.getRoots();\n String rootAlias = roots.get(0).getAliasInfo().getAlias();\n String rootId = JpaUtils.getIdAttribute(metamodel.entity(roots.get(0).getPropertyClass())).getName();\n pathElementExpr.add(new PropertyExpression(rootAlias));\n pathElementExpr.add(new PropertyExpression(rootId));\n PathExpression groupByExpr = new PathExpression(pathElementExpr);\n joinManager.implicitJoin(groupByExpr, true, null, null, false, false, false);\n if (groupByManager.hasGroupBys() && !groupByManager.existsGroupBy(groupByExpr)) {\n return generateSubquery(sizeArg, startClass);\n }\n sizeArg.setUsedInCollectionFunction(false);\n AggregateExpression countExpr = new AggregateExpression(distinctRequired, \"String_Node_Str\", expression.getExpressions());\n transformedExpressions.add(countExpr);\n JoinNode originalNode = (JoinNode) sizeArg.getBaseNode();\n String nodeLookupKey = originalNode.getAliasInfo().getAbsolutePath() + \"String_Node_Str\" + sizeArg.getField();\n PathReference generatedJoin = generatedJoins.get(nodeLookupKey);\n if (generatedJoin == null) {\n joinManager.implicitJoin(sizeArg, true, null, clause, false, false, true);\n generatedJoin = sizeArg.getPathReference();\n generatedJoins.put(((JoinNode) generatedJoin.getBaseNode()).getAliasInfo().getAbsolutePath(), generatedJoin);\n } else {\n sizeArg.setPathReference(new SimplePathReference(generatedJoin.getBaseNode(), generatedJoin.getField(), null));\n }\n if (distinctRequired == false) {\n if (joinManager.getCollectionJoins().size() > 1) {\n distinctRequired = true;\n for (AggregateExpression aggregateExpr : transformedExpressions) {\n aggregateExpr.setDistinct(true);\n }\n }\n }\n groupByManager.groupBy(groupByExpr);\n super.visit(expression);\n return countExpr;\n }\n } else {\n super.visit(expression);\n }\n return expression;\n}\n"
|
"public static Class getClass(int typeCode) {\n if (typeCode < 0 || typeCode >= classes.length) {\n return null;\n }\n for (int i = 0; i < typeCodes.length; i++) {\n if (typeCodes[i] == typeCode) {\n return classes[i];\n }\n }\n return null;\n}\n"
|
"public void setup() {\n ContextImpl context = new ContextImpl();\n CoreRegistry.setContext(context);\n ReflectFactory reflectFactory = new ReflectionReflectFactory();\n CopyStrategyLibrary copyStrategies = new CopyStrategyLibrary(reflectFactory);\n TypeSerializationLibrary serializationLibrary = new TypeSerializationLibrary(reflectFactory, copyStrategies);\n EntitySystemLibrary entitySystemLibrary = new EntitySystemLibrary(context, serializationLibrary);\n compLibrary = entitySystemLibrary.getComponentLibrary();\n entityManager = new PojoEntityManager();\n entityManager.setComponentLibrary(entitySystemLibrary.getComponentLibrary());\n entityManager.setPrefabManager(new PojoPrefabManager(context));\n NetworkSystem networkSystem = mock(NetworkSystem.class);\n when(networkSystem.getMode()).thenReturn(NetworkMode.NONE);\n EventCatcher eventCatcher = new EventCatcher();\n eventSystem = new EventSystemImpl(entitySystemLibrary.getEventLibrary(), networkSystem, eventCatcher);\n entityManager.setEventSystem(eventSystem);\n entity = entityManager.create();\n}\n"
|
"public void validate(UIFormInput uiInput) throws Exception {\n if (uiInput.getValue() == null || ((String) uiInput.getValue()).length() == 0)\n return;\n UIComponent uiComponent = (UIComponent) uiInput;\n UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);\n String label;\n try {\n label = uiForm.getLabel(uiInput.getName());\n } catch (Exception e) {\n label = uiInput.getName();\n label = label.trim();\n if (label.charAt(label.length() - 1) == ':')\n label = label.substring(0, label.length() - 1);\n String s = (String) uiInput.getValue();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0 && s.length() > 1)) {\n continue;\n }\n Object[] args = { label, uiInput.getBindingField() };\n throw new MessageException(new ApplicationMessage(\"String_Node_Str\", args));\n }\n}\n"
|
"private static JsonNode dotNotationToStandardJson(JsonNode etcdJson) throws IOException {\n if (!etcdJson.isValueNode()) {\n String unflattened = new JsonUnflattener(jsonToString(flattenJson(etcdJson, \"String_Node_Str\"))).withFlattenMode(FlattenMode.MONGODB).withKeyTransformer(new KeyTransformer() {\n\n public String transform(String s) {\n return s.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n }\n }).unflatten();\n return mapper.readTree(unflattened);\n}\n"
|
"public String getVersion() {\n return getRealValue(this.version);\n}\n"
|
"public void addValue(Object value, boolean updateObject, Object container) {\n this.value = value;\n if (updateObject) {\n if (null != children) {\n return;\n }\n CoreContainerPolicy containerPolicy = mapping.getContainerPolicy();\n if (null == container && !(mapping.isWriteOnly())) {\n container = containerPolicy.containerInstance();\n mapping.setAttributeValueInObject(object, container);\n }\n containerMapping.getContainerPolicy().addInto(value, container, null);\n }\n}\n"
|
"public void getWorkerInstances(HttpRequest request, HttpResponder responder, String namespaceId, String appId, String workerId) {\n try {\n int count = store.getWorkerInstances(Id.Program.from(namespaceId, appId, ProgramType.WORKER, workerId));\n responder.sendJson(HttpResponseStatus.OK, new Instances(count));\n } catch (SecurityException e) {\n responder.sendStatus(HttpResponseStatus.UNAUTHORIZED);\n } catch (Throwable e) {\n if (respondIfElementNotFound(e, responder)) {\n return;\n }\n throw e;\n }\n}\n"
|
"public static void main(String[] args) {\n OOSpider.create(Site.me().addStartUrl(\"String_Node_Str\"), OschinaBlog.class).pipeline(new ConsolePipeline()).pipeline(new JsonFilePipeline()).run();\n}\n"
|
"public void renderSeries(IPrimitiveRenderer ipr, Plot p, ISeriesRenderingHints isrh) throws ChartException {\n final ChartWithAxes cwa = (ChartWithAxes) getModel();\n if (cwa.getDimension() != ChartDimension.TWO_DIMENSIONAL_LITERAL && cwa.getDimension() != ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { cwa.getDimension().getName() }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n logger.log(ILogger.INFORMATION, Messages.getString(\"String_Node_Str\", new Object[] { getClass().getName(), Integer.valueOf(iSeriesIndex + 1), Integer.valueOf(iSeriesCount) }, getRunTimeContext().getULocale()));\n BubbleSeries bs = (BubbleSeries) getSeries();\n if (!bs.isVisible()) {\n restoreClipping(ipr);\n return;\n }\n final AbstractScriptHandler<?> sh = getRunTimeContext().getScriptHandler();\n final SeriesRenderingHints srh = (SeriesRenderingHints) isrh;\n DataPointHints[] dpha = srh.getDataPoints();\n Location lo;\n LineAttributes lia = bs.getLineAttributes();\n LineAttributes accLia = bs.getAccLineAttributes();\n Orientation accOrientation = bs.getAccOrientation();\n double[] faX = new double[dpha.length];\n double[] faY = new double[dpha.length];\n Integer[] iSize = new Integer[dpha.length];\n double[] dSizePixel = new double[dpha.length];\n SeriesDefinition sd = getSeriesDefinition();\n final EList<Fill> elPalette = sd.getSeriesPalette().getEntries();\n if (elPalette.isEmpty()) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { bs }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n final boolean bPaletteByCategory = isPaletteByCategory();\n if (bPaletteByCategory && bs.eContainer() instanceof SeriesDefinition) {\n sd = (SeriesDefinition) bs.eContainer();\n }\n int iThisSeriesIndex = sd.getRunTimeSeries().indexOf(bs);\n if (iThisSeriesIndex < 0) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { bs, sd }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n Fill fPaletteEntry = null;\n if (!bPaletteByCategory) {\n fPaletteEntry = FillUtil.getPaletteFill(elPalette, iThisSeriesIndex);\n updateTranslucency(fPaletteEntry, bs);\n }\n Marker m = null;\n if (bs.getMarkers().size() > 0) {\n m = bs.getMarkers().get(iThisSeriesIndex % bs.getMarkers().size());\n }\n final boolean isCategoryAxis = srh.isCategoryScale();\n final Bounds plotBounds = getPlotBoundsWithMargin();\n double dPointCoefficient = computeBestFit(srh, plotBounds, isCategoryAxis);\n if (dPointCoefficient == 0) {\n restoreClipping(ipr);\n return;\n }\n for (int i = 0; i < dpha.length; i++) {\n BubbleEntry be = (BubbleEntry) dpha[i].getOrthogonalValue();\n if (!isValidBubbleEntry(be)) {\n faX[i] = Double.NaN;\n faY[i] = Double.NaN;\n continue;\n }\n double unitSize = dpha[i].getSize();\n lo = dpha[i].getLocation();\n if (cwa.isTransposed()) {\n faX[i] = srh.getLocationOnOrthogonal(be.getValue());\n faY[i] = lo.getY() + (isCategoryAxis ? (unitSize / 2) : 0);\n } else {\n faX[i] = lo.getX() + (isCategoryAxis ? (unitSize / 2) : 0);\n faY[i] = srh.getLocationOnOrthogonal(be.getValue());\n }\n dSizePixel[i] = be.getSize() * dPointCoefficient;\n iSize[i] = Integer.valueOf((int) (dSizePixel[i] / getDeviceScale()));\n }\n handleOutsideDataPoints(ipr, srh, faX, faY, false);\n PlotWith2DAxes pwa = (PlotWith2DAxes) getComputations();\n double dAxisMin;\n if (accOrientation == Orientation.HORIZONTAL_LITERAL) {\n OneAxis oaxaBase = pwa.getAxes().getPrimaryBase();\n AutoScale sc = oaxaBase.getScale();\n dAxisMin = sc.getTickCordinates().getStart();\n } else {\n OneAxis oaxaBase = pwa.getAxes().getPrimaryOrthogonal();\n AutoScale sc = oaxaBase.getScale();\n dAxisMin = sc.getTickCordinates().getStart();\n }\n if (accLia.isVisible()) {\n Location[] loa = new Location[2];\n for (int i = 0; i < dpha.length; i++) {\n if (!isValidBubbleEntry((BubbleEntry) dpha[i].getOrthogonalValue())) {\n continue;\n }\n LineRenderEvent lre;\n if (accOrientation == Orientation.HORIZONTAL_LITERAL) {\n if (cwa.isTransposed()) {\n loa[0] = goFactory.createLocation(faX[i], dAxisMin);\n } else {\n loa[0] = goFactory.createLocation(dAxisMin, faY[i]);\n }\n } else {\n if (cwa.isTransposed()) {\n loa[0] = goFactory.createLocation(dAxisMin, faY[i]);\n } else {\n loa[0] = goFactory.createLocation(faX[i], dAxisMin);\n }\n }\n loa[1] = goFactory.createLocation(faX[i], faY[i]);\n lre = ((EventObjectCache) ipr).getEventObject(StructureSource.createSeries(bs), LineRenderEvent.class);\n lre.setLineAttributes(accLia);\n lre.setStart(loa[0]);\n lre.setEnd(loa[1]);\n ipr.drawLine(lre);\n }\n }\n if (bs.isCurve()) {\n CurveRenderer cr = new CurveRenderer(cwa, this, lia, goFactory.createLocations(faX, faY), false, -1, true, true, fPaletteEntry, bs.isPaletteLineColor(), true);\n cr.draw(ipr);\n renderShadowAsCurve(ipr, lia, srh, goFactory.createLocations(faX, faY), false, -1);\n if (m != null) {\n for (int i = 0; i < dpha.length; i++) {\n if (dpha[i].isOutside()) {\n continue;\n }\n if (bPaletteByCategory) {\n fPaletteEntry = FillUtil.getPaletteFill(elPalette, i);\n } else {\n fPaletteEntry = FillUtil.getPaletteFill(elPalette, iThisSeriesIndex);\n }\n updateTranslucency(fPaletteEntry, bs);\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_DRAW_DATA_POINT, dpha[i], fPaletteEntry, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT, dpha[i]);\n renderMarker(bs, ipr, m, goFactory.createLocation(faX[i], faY[i]), bs.getLineAttributes(), fPaletteEntry, dpha[i], iSize[i], true, true);\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_DRAW_DATA_POINT, dpha[i], fPaletteEntry, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT, dpha[i]);\n }\n }\n } else {\n LineRenderEvent lre;\n final Location positionDelta = (cwa.isTransposed()) ? goFactory.createLocation(-3 * getDeviceScale(), 0) : goFactory.createLocation(0, 3 * getDeviceScale());\n Location[] loaShadow = null;\n lre = ((EventObjectCache) ipr).getEventObject(StructureSource.createSeries(bs), LineRenderEvent.class);\n final ColorDefinition cLineShadow = bs.getShadowColor();\n if (cLineShadow != null && cLineShadow.getTransparency() != goFactory.TRANSPARENT().getTransparency()) {\n for (int i = 1; i < dpha.length; i++) {\n if (!isValidBubbleEntry((BubbleEntry) dpha[i].getOrthogonalValue())) {\n continue;\n }\n int pindex = getPreviousNonNullIndex(i, dpha);\n if (pindex == -1) {\n continue;\n }\n if (loaShadow == null) {\n loaShadow = new Location[2];\n loaShadow[0] = goFactory.createLocation(faX[pindex] + positionDelta.getX(), faY[pindex] + positionDelta.getY());\n loaShadow[1] = goFactory.createLocation(faX[i] + positionDelta.getX(), faY[i] + positionDelta.getY());\n } else {\n loaShadow[0].set(faX[pindex] + positionDelta.getX(), faY[pindex] + positionDelta.getY());\n loaShadow[1].set(faX[i] + positionDelta.getX(), faY[i] + positionDelta.getY());\n }\n lre.setStart(loaShadow[0]);\n lre.setEnd(loaShadow[1]);\n LineAttributes liaShadow = goFactory.copyOf(lia);\n liaShadow.setColor(cLineShadow);\n lre.setLineAttributes(liaShadow);\n ipr.drawLine(lre);\n }\n }\n if (lia.isVisible()) {\n Location[] loa = new Location[2];\n for (int i = 1; i < dpha.length; i++) {\n if (!isValidBubbleEntry((BubbleEntry) dpha[i].getOrthogonalValue())) {\n continue;\n }\n int pindex = getPreviousNonNullIndex(i, dpha);\n if (pindex == -1) {\n continue;\n }\n loa[0] = goFactory.createLocation(faX[pindex], faY[pindex]);\n loa[1] = goFactory.createLocation(faX[i], faY[i]);\n lre = ((EventObjectCache) ipr).getEventObject(StructureSource.createSeries(bs), LineRenderEvent.class);\n if (bs.isPaletteLineColor()) {\n LineAttributes newLia = goFactory.copyOf(lia);\n newLia.setColor(FillUtil.getColor(fPaletteEntry));\n lre.setLineAttributes(newLia);\n } else {\n lre.setLineAttributes(lia);\n }\n lre.setStart(loa[0]);\n lre.setEnd(loa[1]);\n ipr.drawLine(lre);\n }\n }\n if (m != null) {\n for (int i = 0; i < dpha.length; i++) {\n if (!isValidBubbleEntry((BubbleEntry) dpha[i].getOrthogonalValue()) || dpha[i].isOutside()) {\n continue;\n }\n if (bPaletteByCategory) {\n fPaletteEntry = FillUtil.getPaletteFill(elPalette, i);\n } else {\n fPaletteEntry = FillUtil.getPaletteFill(elPalette, iThisSeriesIndex);\n }\n updateTranslucency(fPaletteEntry, bs);\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_DRAW_DATA_POINT, dpha[i], fPaletteEntry, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT, dpha[i]);\n renderMarker(bs, ipr, m, goFactory.createLocation(faX[i], faY[i]), bs.getLineAttributes(), fPaletteEntry, dpha[i], iSize[i], true, true);\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_DRAW_DATA_POINT, dpha[i], fPaletteEntry, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT, dpha[i]);\n }\n }\n }\n Label laDataPoint = null;\n Position pDataPoint = null;\n Location loDataPoint = null;\n try {\n laDataPoint = srh.getLabelAttributes(bs);\n pDataPoint = srh.getLabelPosition(bs);\n loDataPoint = goFactory.createLocation(0, 0);\n } catch (Exception ex) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, ex);\n }\n if (laDataPoint.isVisible()) {\n for (int i = 0; i < dpha.length; i++) {\n if (!isValidBubbleEntry(((BubbleEntry) dpha[i].getOrthogonalValue())) || dpha[i].isOutside()) {\n continue;\n }\n laDataPoint.getCaption().setValue(dpha[i].getDisplayValue());\n final double dSize = dSizePixel[i];\n switch(pDataPoint.getValue()) {\n case Position.ABOVE:\n loDataPoint.set(faX[i], faY[i] - dSize - p.getVerticalSpacing());\n break;\n case Position.BELOW:\n loDataPoint.set(faX[i], faY[i] + dSize + p.getVerticalSpacing());\n break;\n case Position.LEFT:\n loDataPoint.set(faX[i] - dSize - p.getHorizontalSpacing(), faY[i]);\n break;\n case Position.RIGHT:\n loDataPoint.set(faX[i] + dSize + p.getHorizontalSpacing(), faY[i]);\n break;\n case Position.INSIDE:\n loDataPoint.set(faX[i], faY[i]);\n break;\n default:\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { pDataPoint }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_DRAW_DATA_POINT_LABEL, dpha[i], laDataPoint, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT_LABEL, dpha[i]);\n if (laDataPoint.isVisible()) {\n renderLabel(StructureSource.createSeries(bs), TextRenderEvent.RENDER_TEXT_AT_LOCATION, laDataPoint, pDataPoint, loDataPoint, null);\n }\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_DRAW_DATA_POINT_LABEL, dpha[i], laDataPoint, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT_LABEL, dpha[i]);\n }\n }\n if (getSeries().getCurveFitting() != null) {\n Location[] larray = new Location[faX.length];\n for (int i = 0; i < larray.length; i++) {\n larray[i] = goFactory.createLocation(faX[i], faY[i]);\n }\n larray = filterNull(larray, isrh.getDataPoints());\n renderFittingCurve(ipr, larray, getSeries().getCurveFitting(), false, true);\n }\n restoreClipping(ipr);\n}\n"
|
"public static synchronized void initialize(ClassLoader cl) {\n if (Instance != null) {\n if (logger.isLoggable(Level.FINER)) {\n logger.finer(\"String_Node_Str\" + getInstance());\n }\n }\n Instance = new SingleHK2Factory(cl);\n logger.finer(\"String_Node_Str\" + getInstance());\n}\n"
|
"private void notifyUser(boolean close) {\n if (VERSION.SDK_INT >= 14) {\n mContent.animate().alpha(0).setDuration(250).start();\n mConfirmation.setAlpha(0);\n mConfirmation.setVisibility(View.VISIBLE);\n mConfirmation.animate().alpha(1).setDuration(250).start();\n } else {\n mContent.setVisibility(View.INVISIBLE);\n mConfirmation.setVisibility(View.VISIBLE);\n }\n if (close) {\n delayedDismiss();\n } else {\n int duration = COMPLETION_DELAY_BASE + COMPLETION_DELAY_MAX / ++mSaveCounter;\n mContent.postDelayed(mReset, duration);\n }\n}\n"
|
"public void saveAnalysis() throws DataprofilerCoreException {\n analysisHandler.clearAnalysis();\n TableIndicator[] tableIndicators = treeViewer.getTableIndicator();\n TdDataProvider tdProvider = null;\n Analysis analysis = analysisHandler.getAnalysis();\n analysis.getParameters().setExecutionLanguage(ExecutionLanguage.get(execLang));\n if (tableIndicators != null && tableIndicators.length != 0) {\n tdProvider = EObjectHelper.getTdDataProvider(tableIndicators[0].getTdTable());\n analysis.getContext().setConnection(tdProvider);\n for (TableIndicator tableIndicator : tableIndicators) {\n analysisHandler.addIndicator(tableIndicator.getTdTable(), tableIndicator.getIndicators());\n }\n }\n analysisHandler.setStringDataFilter(dataFilterComp.getDataFilterString());\n String urlString = analysis.eResource() != null ? analysis.eResource().getURI().toFileString() : PluginConstant.EMPTY_STRING;\n ReturnCode saved = AnaResourceFileHelper.getInstance().save(analysis);\n if (saved.isOk()) {\n if (tdProvider != null) {\n PrvResourceFileHelper.getInstance().save(tdProvider);\n }\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + urlString + \"String_Node_Str\");\n }\n } else {\n throw new DataprofilerCoreException(DefaultMessagesImpl.getString(\"String_Node_Str\", analysis.getName(), urlString, saved.getMessage()));\n }\n treeViewer.setDirty(false);\n dataFilterComp.setDirty(false);\n}\n"
|
"public void deleteIndex(Book book) throws BookException {\n File tempPath = null;\n try {\n File storage = NetUtil.getAsFile(getStorageArea(book));\n String finalCanonicalPath = storage.getCanonicalPath();\n tempPath = new File(finalCanonicalPath + '.' + IndexStatus.CREATING.toString());\n FileUtil.delete(tempPath);\n if (!storage.renameTo(tempPath)) {\n throw new BookException(UserMsg.DELETE_FAILED);\n }\n book.setIndexStatus(IndexStatus.UNDONE);\n } catch (IOException ex) {\n throw new BookException(UserMsg.DELETE_FAILED, ex);\n }\n FileUtil.delete(tempPath);\n}\n"
|
"private void sendMessage(Messages.ProtocolMessage message) {\n message.seq = this.sequenceNumber.getAndIncrement();\n String jsonMessage = JsonUtils.toJson(message);\n byte[] jsonBytes = jsonMessage.getBytes(PROTOCOL_ENCODING);\n String header = String.format(\"String_Node_Str\", jsonBytes.length, TWO_CRLF);\n byte[] headerBytes = header.getBytes(PROTOCOL_ENCODING);\n byte[] data = new byte[headerBytes.length + jsonBytes.length];\n System.arraycopy(headerBytes, 0, data, 0, headerBytes.length);\n System.arraycopy(jsonBytes, 0, data, headerBytes.length, jsonBytes.length);\n String utf8Data = new String(data, PROTOCOL_ENCODING);\n try {\n logger.info(\"String_Node_Str\" + new String(data));\n this.writer.write(utf8Data);\n this.writer.flush();\n } catch (IOException e) {\n logger.log(Level.SEVERE, String.format(\"String_Node_Str\", e.toString()), e);\n }\n}\n"
|
"public String buildWordReport() {\n String ret = \"String_Node_Str\";\n String conFontTag = \"String_Node_Str\" + core.getLangFont().getFontName() + \"String_Node_Str\";\n Map<String, Integer> wordStart = new HashMap<String, Integer>();\n Map<String, Integer> wordEnd = new HashMap<String, Integer>();\n Map<String, Integer> characterCombos2 = new HashMap<String, Integer>();\n Integer highestCombo2 = 0;\n Map<String, Integer> characterCombos3 = new HashMap<String, Integer>();\n Map<String, Integer> typeCountByWord = new HashMap<String, Integer>();\n Map<String, Integer> phonemeCount = new HashMap<String, Integer>();\n Map<String, Integer> charCount = new HashMap<String, Integer>();\n Map<String, Integer> phonemeCombo2 = new HashMap<String, Integer>();\n Integer wordCount = nodeMap.size();\n Iterator<ConWord> wordIt = new ArrayList<ConWord>(nodeMap.values()).iterator();\n while (wordIt.hasNext()) {\n ConWord curWord = wordIt.next();\n final String curValue = curWord.getValue();\n final int curValueLength = curValue.length();\n final String curType = curWord.getWordType();\n String beginsWith = curValue.substring(0, 1);\n String endsWith = curValue.substring(curValueLength - 1, curValueLength);\n if (wordStart.containsKey(beginsWith)) {\n int newValue = wordStart.get(beginsWith) + 1;\n wordStart.remove(beginsWith);\n wordStart.put(beginsWith, newValue);\n } else {\n wordStart.put(beginsWith, 1);\n }\n if (wordEnd.containsKey(endsWith)) {\n wordEnd.replace(endsWith, wordEnd.get(endsWith) + 1);\n } else {\n wordEnd.put(endsWith, 1);\n }\n List<PronunciationNode> phonArray = core.getPronunciationElements(curValue);\n for (int i = 0; i < phonArray.size(); i++) {\n if (phonemeCount.containsKey(phonArray.get(i).getPronunciation())) {\n phonemeCount.replace(phonArray.get(i).getPronunciation(), phonemeCount.get(phonArray.get(i).getPronunciation()) + 1);\n } else {\n phonemeCount.put(phonArray.get(i).getPronunciation(), 1);\n }\n if (i + 1 < phonArray.size()) {\n String curCombo = phonArray.get(i).getPronunciation() + \"String_Node_Str\" + phonArray.get(i + 1).getPronunciation();\n if (phonemeCombo2.containsKey(curCombo)) {\n phonemeCombo2.replace(curCombo, phonemeCombo2.get(curCombo) + 1);\n } else {\n phonemeCombo2.put(curCombo, 1);\n }\n }\n }\n for (int i = 0; i < curValueLength; i++) {\n String curChar = curValue.substring(i, i + 1);\n if (charCount.containsKey(curChar)) {\n charCount.replace(curChar, charCount.get(curChar) + 1);\n } else {\n charCount.put(curChar, 1);\n }\n }\n for (int i = 0; i < curValueLength - 1; i++) {\n String combo = curValue.substring(i, i + 2);\n if (characterCombos2.containsKey(combo)) {\n int curComboCount = characterCombos2.get(combo);\n if (highestCombo2 <= curComboCount) {\n highestCombo2 = curComboCount + 1;\n }\n characterCombos2.replace(combo, curComboCount + 1);\n } else {\n characterCombos2.put(combo, 1);\n }\n }\n for (int i = 0; i < curValueLength - 2; i++) {\n String combo = curValue.substring(i, i + 3);\n if (characterCombos3.containsKey(combo)) {\n characterCombos3.replace(combo, characterCombos3.get(combo) + 1);\n } else {\n characterCombos3.put(combo, 1);\n }\n }\n if (typeCountByWord.containsKey(curType)) {\n typeCountByWord.replace(curType, typeCountByWord.get(curType) + 1);\n } else {\n typeCountByWord.put(curType, 1);\n }\n }\n ret += \"String_Node_Str\" + wordCount + \"String_Node_Str\";\n ret += \"String_Node_Str\";\n for (Entry<String, Integer> curEntry : typeCountByWord.entrySet()) {\n ret += curEntry.getKey() + \"String_Node_Str\" + curEntry.getValue() + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n for (char letter : core.getPropertiesManager().getAlphaPlainText().toCharArray()) {\n ret += \"String_Node_Str\" + conFontTag + \"String_Node_Str\" + letter + \"String_Node_Str\" + (wordStart.containsKey(\"String_Node_Str\" + letter) ? wordStart.get(\"String_Node_Str\" + letter) : \"String_Node_Str\") + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n for (char letter : core.getPropertiesManager().getAlphaPlainText().toCharArray()) {\n ret += \"String_Node_Str\" + conFontTag + \"String_Node_Str\" + letter + \"String_Node_Str\" + (wordEnd.containsKey(\"String_Node_Str\" + letter) ? wordEnd.get(\"String_Node_Str\" + letter) : \"String_Node_Str\") + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n for (char letter : core.getPropertiesManager().getAlphaPlainText().toCharArray()) {\n ret += \"String_Node_Str\" + conFontTag + \"String_Node_Str\" + letter + \"String_Node_Str\" + (charCount.containsKey(\"String_Node_Str\" + letter) ? charCount.get(\"String_Node_Str\" + letter) : \"String_Node_Str\") + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n Iterator<PronunciationNode> procLoop = core.getPronunciations();\n while (procLoop.hasNext()) {\n PronunciationNode curNode = procLoop.next();\n ret += curNode.getPronunciation() + \"String_Node_Str\" + (phonemeCount.containsKey(curNode.getPronunciation()) ? phonemeCount.get(curNode.getPronunciation()) : \"String_Node_Str\") + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n for (char topRow : core.getPropertiesManager().getAlphaPlainText().toCharArray()) {\n ret += \"String_Node_Str\" + conFontTag + \"String_Node_Str\" + topRow + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n for (char y : core.getPropertiesManager().getAlphaPlainText().toCharArray()) {\n ret += \"String_Node_Str\" + conFontTag + \"String_Node_Str\" + y + \"String_Node_Str\";\n for (char x : core.getPropertiesManager().getAlphaPlainText().toCharArray()) {\n String search = \"String_Node_Str\" + x + y;\n Integer comboValue = (characterCombos2.containsKey(search) ? characterCombos2.get(search) : 0);\n Integer red = (255 / highestCombo2) * comboValue;\n Integer blue = 255 - red;\n ret += \"String_Node_Str\" + red + \"String_Node_Str\" + blue + \"String_Node_Str\" + blue + \"String_Node_Str\" + \"String_Node_Str\" + conFontTag + \"String_Node_Str\" + x + y + \"String_Node_Str\" + \"String_Node_Str\" + comboValue.toString() + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n ret += \"String_Node_Str\";\n Iterator<PronunciationNode> procIty = core.getPronunciations();\n while (procIty.hasNext()) {\n ret += \"String_Node_Str\" + procIty.next().getPronunciation() + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n procIty = core.getPronunciations();\n while (procIty.hasNext()) {\n PronunciationNode y = procIty.next();\n ret += \"String_Node_Str\" + y.getPronunciation() + \"String_Node_Str\";\n Iterator<PronunciationNode> procItx = core.getPronunciations();\n while (procItx.hasNext()) {\n PronunciationNode x = procItx.next();\n String search = x.getPronunciation() + \"String_Node_Str\" + y.getPronunciation();\n Integer comboValue = (phonemeCombo2.containsKey(search) ? phonemeCombo2.get(search) : 0);\n Integer red = (255 / highestCombo2) * comboValue;\n Integer blue = 255 - red;\n ret += \"String_Node_Str\" + red + \"String_Node_Str\" + blue + \"String_Node_Str\" + blue + \"String_Node_Str\" + x.getPronunciation() + y.getPronunciation() + \"String_Node_Str\" + comboValue.toString() + \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n }\n ret += \"String_Node_Str\";\n return ret;\n}\n"
|
"public boolean onCreate() {\n mOpenDbHelper = new SimpleVideoDbHelper(getContext());\n return true;\n}\n"
|
"public void error(final Throwable cause) {\n executor.execute(new Runnable() {\n public void run() {\n listener.error(cause);\n }\n }, \"String_Node_Str\");\n}\n"
|
"public List<XMLDBModel> executeGetFirstLevelParents(GetFirstLevelParentsTask task) throws DBExecutionException {\n String references = null;\n ArrayList<XMLDBModel> parentsList = new ArrayList<XMLDBModel>();\n XMLDBModel model = task.getModel();\n try {\n XmlQueryContext xmlContext = _xmlManager.createQueryContext();\n String query = \"String_Node_Str\" + _params.getContainerName() + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + model.getModelName() + \"String_Node_Str\";\n XmlQueryExpression queryExpression = _xmlManager.prepare(query, xmlContext);\n XmlResults results = queryExpression.execute(xmlContext);\n if (results != null && results.size() > 0) {\n XmlValue xmlValue = results.next();\n references = \"String_Node_Str\" + xmlValue.asString() + \"String_Node_Str\";\n Node entitiesNode = Utilities.parseXML(references);\n NodeList entityList = entitiesNode.getChildNodes();\n for (int i = 0; i < entityList.getLength(); i++) {\n Node entity = entityList.item(i);\n String parentName = Utilities.getValueForAttribute(entity, XMLDBModel.DB_MODEL_NAME);\n String parentId = Utilities.getValueForAttribute(entity, XMLDBModel.DB_MODEL_ID_ATTR);\n parentsList.add(new XMLDBModel(parentName, parentId));\n }\n }\n } catch (XmlException e) {\n throw new DBExecutionException(\"String_Node_Str\" + e.getMessage(), e);\n } catch (XMLDBModelParsingException e) {\n throw new DBExecutionException(\"String_Node_Str\" + e.getMessage(), e);\n }\n return parentsList;\n}\n"
|
"public void setVisible(boolean visible) {\n super.setVisible(visible);\n if (visible) {\n checkboxTableViewer.setInput(wizardImport.getData().getWizardColumns());\n check();\n }\n}\n"
|
"public boolean isEnabled() throws IllegalActionException {\n try {\n if (!_relationList.isEmpty()) {\n _parseTreeEvaluator.setEvaluationMode(false);\n }\n Token token = _guard.getToken();\n if (token == null) {\n return false;\n }\n boolean result = ((BooleanToken) token).booleanValue() || _relationList.hasEvent();\n return result;\n } catch (UnknownResultException ex) {\n return false;\n }\n}\n"
|
"public void updateConnectionParam(String name, String paramName, String paramValue) {\n ConnectionDetails connectionDetails = connectionDetailsMap.get(name);\n connectionDetails.put(paramName, paramValue);\n}\n"
|
"public void setStatusArea() throws PersistenceException {\n String productName = brandingService.getFullProductName();\n if (productName != null) {\n String[] split = productName.split(\"String_Node_Str\");\n if (split != null && split.length > 3) {\n productName = brandingService.getShortProductName();\n }\n }\n if (getConnection() != null) {\n final boolean localConn = getConnection().getRepositoryId() == null || getConnection().getRepositoryId().equals(RepositoryConstants.REPOSITORY_LOCAL_ID);\n boolean visible = PluginChecker.isSVNProviderPluginLoaded() && !localConn;\n if (passwordLabel != null) {\n passwordLabel.setVisible(visible);\n }\n if (passwordText != null) {\n passwordText.setVisible(visible);\n }\n if (svnBranchLabel != null) {\n svnBranchLabel.setVisible(visible);\n }\n if (branchesViewer != null) {\n branchesViewer.getControl().setVisible(visible);\n }\n manageViewer.setInput(getManageElements());\n setManageViewer();\n if (!isWorkSpaceSame()) {\n iconLabel.setImage(LOGIN_CRITICAL_IMAGE);\n onIconLabel.setImage(LOGIN_CRITICAL_IMAGE);\n colorComposite.setBackground(RED_COLOR);\n onIconLabel.setBackground(colorComposite.getBackground());\n statusLabel.setText(Messages.getString(\"String_Node_Str\"));\n statusLabel.setBackground(RED_COLOR);\n statusLabel.setForeground(WHITE_COLOR);\n Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.BOLD);\n statusLabel.setFont(font);\n } else if (inuse) {\n iconLabel.setImage(LOGIN_CRITICAL_IMAGE);\n onIconLabel.setImage(LOGIN_CRITICAL_IMAGE);\n colorComposite.setBackground(RED_COLOR);\n onIconLabel.setBackground(colorComposite.getBackground());\n statusLabel.setText(Messages.getString(\"String_Node_Str\"));\n statusLabel.setBackground(RED_COLOR);\n statusLabel.setForeground(WHITE_COLOR);\n Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.BOLD);\n statusLabel.setFont(font);\n } else if (projectViewer == null || projectViewer.getCombo().getItemCount() > 0) {\n iconLabel.setImage(LOGIN_CORRECT_IMAGE);\n onIconLabel.setImage(LOGIN_CORRECT_IMAGE);\n colorComposite.setBackground(YELLOW_GREEN_COLOR);\n onIconLabel.setBackground(colorComposite.getBackground());\n statusLabel.setText(Messages.getString(\"String_Node_Str\", productName));\n int size = calStatusLabelFont(11, statusLabel.getText());\n statusLabel.setBackground(YELLOW_GREEN_COLOR);\n statusLabel.setForeground(WHITE_COLOR);\n Font font = new Font(null, LoginComposite.FONT_ARIAL, size, SWT.BOLD);\n statusLabel.setFont(font);\n if (fillProjectsBtn != null) {\n fillProjectsBtn.setEnabled(true);\n }\n if (projectViewer != null) {\n int visibleItemCount = projectViewer.getCombo().getItemCount();\n if (visibleItemCount > VISIBLE_PROJECT_COUNT) {\n visibleItemCount = VISIBLE_PROJECT_COUNT;\n }\n projectViewer.getCombo().setVisibleItemCount(visibleItemCount);\n }\n projectViewer.getCombo().setVisibleItemCount(visibleItemCount);\n } else {\n iconLabel.setImage(LOGIN_CRITICAL_IMAGE);\n onIconLabel.setImage(LOGIN_CRITICAL_IMAGE);\n colorComposite.setBackground(RED_COLOR);\n onIconLabel.setBackground(colorComposite.getBackground());\n statusLabel.setText(Messages.getString(\"String_Node_Str\"));\n statusLabel.setBackground(RED_COLOR);\n statusLabel.setForeground(WHITE_COLOR);\n Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.BOLD);\n statusLabel.setFont(font);\n }\n } else {\n iconLabel.setImage(LOGIN_CRITICAL_IMAGE);\n onIconLabel.setImage(LOGIN_CRITICAL_IMAGE);\n colorComposite.setBackground(RED_COLOR);\n onIconLabel.setBackground(colorComposite.getBackground());\n statusLabel.setText(Messages.getString(\"String_Node_Str\"));\n statusLabel.setBackground(RED_COLOR);\n statusLabel.setForeground(WHITE_COLOR);\n Font font = new Font(null, LoginComposite.FONT_ARIAL, 9, SWT.BOLD);\n statusLabel.setFont(font);\n }\n updateVisible();\n}\n"
|
"public static Request to(String resource, Object... args) {\n if (args != null && args.length > 0) {\n resource = String.format(Locale.ENGLISH, resource, args);\n }\n return new Request(resource);\n}\n"
|
"public Number getX(int series, int item) {\n XYSeries s = this.data.get(series);\n return s.getX(item);\n}\n"
|
"public void removePolicy(String name) throws AuthException {\n if (name == null) {\n throw new AuthException(AuthException.EMPTY_POLICY_NAME);\n }\n EntityWrapper<GroupEntity> db = EntityWrapper.get(GroupEntity.class);\n try {\n GroupEntity group = db.getUnique(GroupEntity.newInstanceWithGroupId(this.delegate.getGroupId()));\n PolicyEntity policy = DatabaseAuthUtils.removeGroupPolicy(group, name);\n if (policy != null) {\n db.recast(PolicyEntity.class).delete(policy);\n }\n db.commit();\n } catch (Exception e) {\n db.rollback();\n Debugging.logError(LOG, e, \"String_Node_Str\" + name + \"String_Node_Str\" + this.delegate);\n throw new AuthException(\"String_Node_Str\", e);\n }\n}\n"
|
"private void processMessages(Response response, boolean isFromTheFuture) {\n if (response.code() == 200) {\n ChatOverall chatOverall = (ChatOverall) response.body();\n List<ChatMessage> chatMessageList = chatOverall.getOcs().getData();\n if (isFirstMessagesProcessing) {\n isFirstMessagesProcessing = false;\n if (loadingProgressBar != null) {\n loadingProgressBar.setVisibility(View.GONE);\n }\n if (chatMessageList.size() == 0) {\n if (emptyLayout != null) {\n emptyLayout.setVisibility(View.VISIBLE);\n }\n } else {\n messagesListView.setVisibility(View.VISIBLE);\n }\n } else {\n if (emptyLayout.getVisibility() != View.GONE) {\n emptyLayout.setVisibility(View.GONE);\n }\n if (messagesListView.getVisibility() != View.VISIBLE) {\n messagesListView.setVisibility(View.VISIBLE);\n }\n }\n int countGroupedMessages = 0;\n if (!isFromTheFuture) {\n for (int i = 0; i < chatMessageList.size(); i++) {\n if (chatMessageList.size() > i + 1) {\n if (chatMessageList.get(i + 1).getActorId().equals(chatMessageList.get(i).getActorId()) && countGroupedMessages < 4 && DateFormatter.isSameDay(chatMessageList.get(i).getCreatedAt(), chatMessageList.get(i + 1).getCreatedAt())) {\n chatMessageList.get(i).setGrouped(true);\n countGroupedMessages++;\n } else {\n countGroupedMessages = 0;\n }\n }\n chatMessageList.get(i).setBaseUrl(conversationUser.getBaseUrl());\n if (globalLastKnownPastMessageId == -1 || chatMessageList.get(i).getJsonMessageId() < globalLastKnownPastMessageId) {\n globalLastKnownPastMessageId = chatMessageList.get(i).getJsonMessageId();\n }\n if (globalLastKnownFutureMessageId == -1) {\n if (chatMessageList.get(i).getJsonMessageId() > globalLastKnownFutureMessageId) {\n globalLastKnownFutureMessageId = chatMessageList.get(i).getJsonMessageId();\n }\n }\n }\n adapter.addToEnd(chatMessageList, false);\n } else {\n ChatMessage chatMessage;\n for (int i = 0; i < chatMessageList.size(); i++) {\n chatMessage = chatMessageList.get(i);\n chatMessage.setBaseUrl(conversationUser.getBaseUrl());\n if (conversationUser.getUserId().equals(\"String_Node_Str\") && !TextUtils.isEmpty(myFirstMessage.toString())) {\n if (chatMessage.getActorType().equals(\"String_Node_Str\") && chatMessage.getActorDisplayName().equals(conversationUser.getDisplayName())) {\n conversationUser.setUserId(chatMessage.getActorId());\n setSenderId();\n }\n }\n boolean shouldScroll = layoutManager.findFirstVisibleItemPosition() == 0 || adapter.getItemCount() == 0;\n if (!shouldScroll && popupBubble != null) {\n if (!popupBubble.isShown()) {\n newMessagesCount = 1;\n popupBubble.show();\n } else if (popupBubble.isShown()) {\n newMessagesCount++;\n }\n } else {\n newMessagesCount = 0;\n }\n chatMessage.setGrouped(adapter.isPreviousSameAuthor(chatMessage.getActorId(), -1) && (adapter.getSameAuthorLastMessagesCount(chatMessage.getActorId()) % 5) > 0);\n adapter.addToStart(chatMessage, shouldScroll);\n }\n String xChatLastGivenHeader;\n if (response.headers().size() > 0 && !TextUtils.isEmpty((xChatLastGivenHeader = response.headers().get(\"String_Node_Str\")))) {\n globalLastKnownFutureMessageId = Integer.parseInt(xChatLastGivenHeader);\n }\n }\n if (!lookingIntoFuture && inChat) {\n pullChatMessages(1);\n }\n } else if (response.code() == 304 && !isFromTheFuture) {\n if (isFirstMessagesProcessing) {\n isFirstMessagesProcessing = false;\n loadingProgressBar.setVisibility(View.GONE);\n if (emptyLayout.getVisibility() != View.VISIBLE) {\n emptyLayout.setVisibility(View.VISIBLE);\n }\n }\n historyRead = true;\n if (!lookingIntoFuture && inChat) {\n pullChatMessages(1);\n }\n }\n}\n"
|
"void logCommandLine() {\n StringBuilder sb = new StringBuilder();\n for (String s : commandLine) {\n sb.append(NEWLINE);\n sb.append(s);\n }\n if (!isFakeLaunch()) {\n GFLauncherLogger.fine(\"String_Node_Str\", sb.toString());\n }\n}\n"
|
"public String getAttribute(Attribute attribute) {\n if (attribute == null)\n return null;\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(prefix).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\")) {\n ArrayList<dEntity> entities = new ArrayList<dEntity>();\n for (Entity entity : getWorld().getEntities()) {\n entities.add(new dEntity(entity));\n }\n return new dList(entities).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n ArrayList<dEntity> entities = new ArrayList<dEntity>();\n for (Entity entity : getWorld().getLivingEntities()) {\n entities.add(new dEntity(entity));\n }\n return new dList(entities).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n ArrayList<dPlayer> players = new ArrayList<dPlayer>();\n for (Player player : getWorld().getPlayers()) {\n if (Depends.citizens == null || !CitizensAPI.getNPCRegistry().isNPC(player))\n players.add(new dPlayer(player));\n }\n return new dList(players).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().canGenerateStructures()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\")) {\n dList chunks = new dList();\n for (Chunk ent : this.getWorld().getLoadedChunks()) chunks.add(new dChunk((CraftChunk) ent).identify());\n return chunks.getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n int random = CoreUtilities.getRandom().nextInt(getWorld().getLoadedChunks().length);\n return new dChunk((CraftChunk) getWorld().getLoadedChunks()[random]).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getSeaLevel()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new dLocation(getWorld().getSpawnLocation()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getName()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getSeed()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getAllowAnimals()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getAllowMonsters()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getPVP()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getAmbientSpawnLimit()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getAnimalSpawnLimit()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().isAutoSave()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getDifficulty().name()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getDifficulty().name()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getMaxHeight()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getMonsterSpawnLimit()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Duration(getWorld().getTicksPerAnimalSpawns()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Duration(getWorld().getTicksPerMonsterSpawns()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getWaterAnimalSpawnLimit()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\")) {\n long time = getWorld().getTime();\n String period;\n if (time >= 23000)\n period = \"String_Node_Str\";\n else if (time >= 13500)\n period = \"String_Node_Str\";\n else if (time >= 12500)\n period = \"String_Node_Str\";\n else\n period = \"String_Node_Str\";\n return new Element(period).getAttribute(attribute.fulfill(2));\n }\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getFullTime()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().getTime()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\") || attribute.startsWith(\"String_Node_Str\"))\n return new Element((int) ((getWorld().getFullTime() / 24000) % 8) + 1).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().hasStorm()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Duration((long) getWorld().getThunderDuration()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getWorld().isThundering()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Duration((long) getWorld().getWeatherDuration()).getAttribute(attribute.fulfill(1));\n for (Property property : PropertyParser.getProperties(this)) {\n String returned = property.getAttribute(attribute);\n if (returned != null)\n return returned;\n }\n return new Element(identify()).getAttribute(attribute);\n}\n"
|
"public void setLastLocation(Location loc) {\n if (loc == null)\n datas.removeProperty(\"String_Node_Str\");\n else {\n ExtendedNode lastLoc = datas.createNode(\"String_Node_Str\");\n lastLoc.setProperty(\"String_Node_Str\", loc.getWorld().getName());\n lastLoc.setProperty(\"String_Node_Str\", loc.getX());\n lastLoc.setProperty(\"String_Node_Str\", loc.getY());\n lastLoc.setProperty(\"String_Node_Str\", loc.getZ());\n lastLoc.setProperty(\"String_Node_Str\", loc.getYaw());\n lastLoc.setProperty(\"String_Node_Str\", loc.getPitch());\n }\n writeFile();\n}\n"
|
"public FileHolder copy() {\n usages.incrementAndGet();\n return new FileHolder(action, usages);\n}\n"
|
"private void initExternalLoader() {\n try {\n String start = null;\n if (StringUtils.isNotEmpty(m_installationDir)) {\n start = m_installationDir + StringConstants.SLASH + Constants.EXTERNAL_JARS_NAME;\n }\n if (StringUtils.isBlank(start)) {\n start = AUTServer.class.getProtectionDomain().getCodeSource().getLocation().getPath();\n if (System.getProperty(\"String_Node_Str\").startsWith(\"String_Node_Str\")) {\n start = start.substring(1, start.length());\n }\n start = start.replaceFirst(\"String_Node_Str\", Constants.EXTERNAL_JARS_NAME);\n }\n start = start.replaceFirst(\"String_Node_Str\", \"String_Node_Str\");\n File dir = new File(start);\n File[] res = dir.listFiles(new FilenameFilter() {\n public boolean accept(File directory, String name) {\n return name.endsWith(\"String_Node_Str\");\n }\n });\n if (res == null) {\n return;\n }\n ArrayList<URL> urls = new ArrayList<URL>();\n for (int i = 0; i < res.length; i++) {\n try {\n urls.add(res[i].toURI().toURL());\n } catch (MalformedURLException e) {\n }\n }\n if (!urls.isEmpty()) {\n m_externalLoader = new URLClassLoader(urls.toArray(new URL[0]));\n }\n } catch (Exception e) {\n }\n}\n"
|
"public void test_image_sizing() {\n ZBlock p = P(\"String_Node_Str\");\n assertTrue(p.ele(0).isImage());\n assertEquals(\"String_Node_Str\", p.ele(0).getSrc().getValue());\n assertEquals(3, p.ele(0).getWidth());\n assertEquals(5, p.ele(0).getHeight());\n p = p(\"String_Node_Str\");\n assertTrue(p.ele(0).isImage());\n assertEquals(\"String_Node_Str\", p.ele(0).getSrc().getValue());\n assertEquals(3, p.ele(0).getWidth());\n assertEquals(5, p.ele(0).getHeight());\n p = p(\"String_Node_Str\");\n assertTrue(p.ele(0).isImage());\n assertEquals(\"String_Node_Str\", p.ele(0).getSrc().getValue());\n assertEquals(0, p.ele(0).getWidth());\n assertEquals(5, p.ele(0).getHeight());\n p = p(\"String_Node_Str\");\n assertTrue(p.ele(0).isImage());\n assertEquals(\"String_Node_Str\", p.ele(0).getSrc().getValue());\n assertEquals(3, p.ele(0).getWidth());\n assertEquals(0, p.ele(0).getHeight());\n}\n"
|
"public void onClick(View v) {\n myCal.add(Calendar.MONTH, 1);\n refresh();\n}\n"
|
"public ChannelPipeline getPipeline() throws Exception {\n ChannelPipeline pipeline = Channels.pipeline();\n addLengthFieldPipes(pipeline);\n pipeline.addLast(\"String_Node_Str\", new ServerHandler());\n return pipeline;\n}\n"
|
"public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {\n if (camera != null) {\n Camera.Parameters p = camera.getParameters();\n p.setPreviewSize(arg2, arg3);\n bitmap = Bitmap.createBitmap(arg2, arg3, Bitmap.Config.ARGB_8888);\n canvas = new Canvas(bitmap);\n setOverlayImage(overlayIdx);\n try {\n camera.setPreviewDisplay(arg0);\n } catch (IOException e) {\n e.printStackTrace();\n }\n camera.startPreview();\n }\n camera.startPreview();\n}\n"
|
"private void loadProjectStatuses() throws IOException {\n Path path = AppDirectory.dir().resolve(PROJECT_STATUS_FILENAME);\n projectStates.addListener((InvalidationListener) x -> saveProjectStatuses());\n if (!Files.exists(path))\n return;\n List<String> lines = Files.readAllLines(path);\n for (String line : lines) {\n if (line.startsWith(\"String_Node_Str\"))\n continue;\n List<String> parts = Splitter.on(\"String_Node_Str\").splitToList(line);\n String key = parts.get(0);\n String val = parts.get(1);\n if (val.equals(\"String_Node_Str\")) {\n projectStates.put(key, new LighthouseBackend.ProjectStateInfo(LighthouseBackend.ProjectState.OPEN, null));\n } else {\n Sha256Hash claimedBy = new Sha256Hash(val);\n log.info(\"String_Node_Str\", key, claimedBy);\n projectStates.put(key, new LighthouseBackend.ProjectStateInfo(LighthouseBackend.ProjectState.CLAIMED, claimedBy));\n }\n }\n}\n"
|
"public boolean applies(GameEvent event, Ability source, Game game) {\n player1 = (Player) game.getState().getValue(source.getSourceId() + \"String_Node_Str\");\n player2 = (Player) game.getState().getValue(source.getSourceId() + \"String_Node_Str\");\n if (player1 != null && player2 != null) {\n UUID targetPlayerId = null;\n switch(event.getType()) {\n case DAMAGE_PLAYER:\n targetPlayerId = event.getTargetId();\n break;\n case DAMAGE_CREATURE:\n case DAMAGE_PLANESWALKER:\n Permanent permanent = game.getPermanent(event.getTargetId());\n if (permanent != null) {\n targetPlayerId = permanent.getControllerId();\n }\n break;\n default:\n return false;\n }\n if (player1.getId().equals(targetPlayerId) || player2.getId().equals(targetPlayerId)) {\n UUID sourcePlayerId = null;\n MageObject damageSource = game.getObject(event.getSourceId());\n if (damageSource instanceof StackObject) {\n sourcePlayerId = ((StackObject) damageSource).getControllerId();\n } else if (damageSource instanceof Permanent) {\n sourcePlayerId = ((Permanent) damageSource).getControllerId();\n } else if (damageSource instanceof Card) {\n sourcePlayerId = ((Card) damageSource).getOwnerId();\n }\n if (sourcePlayerId != null && (player1.getId().equals(sourcePlayerId) || player2.getId().equals(sourcePlayerId)) && !sourcePlayerId.equals(targetPlayerId)) {\n return true;\n }\n }\n }\n return false;\n}\n"
|
"private Composite createMeasureArea(Composite parent) {\n getShell().setText(Messages.getString(\"String_Node_Str\"));\n Group group = new Group(parent, SWT.NONE);\n GridData gd = new GridData();\n gd.grabExcessHorizontalSpace = true;\n gd.horizontalAlignment = SWT.FILL;\n group.setLayoutData(gd);\n GridLayout layout = new GridLayout();\n layout.numColumns = 3;\n group.setLayout(layout);\n Label nameLabel = new Label(group, SWT.NONE);\n nameLabel.setText(Messages.getString(\"String_Node_Str\"));\n nameText = new Text(group, SWT.BORDER);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.horizontalSpan = 2;\n nameText.setLayoutData(gd);\n nameText.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n checkOkButtonStatus();\n }\n });\n new Label(group, SWT.NONE);\n derivedMeasureBtn = new Button(group, SWT.CHECK);\n derivedMeasureBtn.setText(Messages.getString(\"String_Node_Str\"));\n derivedMeasureBtn.setSelection(input.isCalculated());\n derivedMeasureBtn.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n updateDerivedMeasureStatus();\n if (!derivedMeasureBtn.getSelection()) {\n handleTypeSelectEvent();\n }\n }\n });\n new Label(group, SWT.NONE);\n Label functionLabel = new Label(group, SWT.NONE);\n functionLabel.setText(Messages.getString(\"String_Node_Str\"));\n functionCombo = new Combo(group, SWT.BORDER | SWT.READ_ONLY);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.horizontalSpan = 2;\n functionCombo.setLayoutData(gd);\n functionCombo.setVisibleItemCount(30);\n functionCombo.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n handleFunctionSelectEvent();\n checkOkButtonStatus();\n }\n });\n functionCombo.setEnabled(!(derivedMeasureBtn.getSelection() || isAutoPrimaryKeyChecked));\n Label typeLabel = new Label(group, SWT.NONE);\n typeLabel.setText(Messages.getString(\"String_Node_Str\"));\n typeCombo = new Combo(group, SWT.BORDER | SWT.READ_ONLY);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.horizontalSpan = 2;\n typeCombo.setLayoutData(gd);\n typeCombo.setVisibleItemCount(30);\n typeCombo.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n if (!derivedMeasureBtn.getSelection()) {\n handleTypeSelectEvent();\n }\n checkOkButtonStatus();\n if (formatHelper != null) {\n if (typeCombo.getSelectionIndex() > -1)\n formatHelper.setProperty(BuilderConstants.FORMAT_VALUE_TYPE, getDataTypeNames()[typeCombo.getSelectionIndex()]);\n formatHelper.update(true);\n }\n }\n });\n Label expressionLabel = new Label(group, SWT.NONE);\n expressionLabel.setText(Messages.getString(\"String_Node_Str\"));\n expressionText = new Text(group, SWT.WRAP | SWT.BORDER);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.heightHint = expressionText.computeSize(SWT.DEFAULT, SWT.DEFAULT).y - expressionText.getBorderWidth() * 2;\n expressionText.setLayoutData(gd);\n expressionText.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n checkOkButtonStatus();\n }\n });\n provider = new CubeMeasureExpressionProvider(input, input.isCalculated());\n ExpressionButtonUtil.createExpressionButton(group, expressionText, provider, input);\n new Label(group, SWT.NONE);\n exprDesc = new Label(group, SWT.NONE);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.horizontalSpan = 2;\n gd.grabExcessHorizontalSpace = true;\n exprDesc.setLayoutData(gd);\n exprDesc.setText(Messages.getString(Messages.getString(derivedMeasureBtn.getSelection() ? \"String_Node_Str\" : \"String_Node_Str\")));\n exprDesc.setForeground(ColorManager.getColor(128, 128, 128));\n createSecurityPart(group);\n createHyperLinkPart(group);\n createFormatPart(group);\n createAlignmentPart(group);\n return group;\n}\n"
|
"private SootMethod createUnresolvedErrorMethod(SootClass declaringClass) {\n SootMethod m = Scene.v().makeSootMethod(name, parameterTypes, returnType, isStatic() ? Modifier.STATIC : 0);\n int modifiers = Modifier.PUBLIC;\n if (isStatic())\n modifiers |= Modifier.STATIC;\n m.setModifiers(modifiers);\n JimpleBody body = Jimple.v().newBody(m);\n m.setActiveBody(body);\n final LocalGenerator lg = new LocalGenerator(body);\n body.insertIdentityStmts(declaringClass);\n RefType runtimeExceptionType = RefType.v(\"String_Node_Str\");\n NewExpr newExpr = Jimple.v().newNewExpr(runtimeExceptionType);\n Local exceptionLocal = lg.generateLocal(runtimeExceptionType);\n AssignStmt assignStmt = Jimple.v().newAssignStmt(exceptionLocal, newExpr);\n body.getUnits().add(assignStmt);\n SootMethodRef cref = Scene.v().makeConstructorRef(runtimeExceptionType.getSootClass(), Collections.<Type>singletonList(RefType.v(\"String_Node_Str\")));\n SpecialInvokeExpr constructorInvokeExpr = Jimple.v().newSpecialInvokeExpr(exceptionLocal, cref, StringConstant.v(\"String_Node_Str\" + getSignature() + \"String_Node_Str\"));\n InvokeStmt initStmt = Jimple.v().newInvokeStmt(constructorInvokeExpr);\n body.getUnits().insertAfter(initStmt, assignStmt);\n body.getUnits().insertAfter(Jimple.v().newThrowStmt(exceptionLocal), initStmt);\n return declaringClass.getOrAddMethod(m);\n}\n"
|
"public List<IEntityInstance> handle(DriverContext<RadioDriverConfiguration, String, String> driverContext, String response) {\n List<IEntityInstance> result;\n if (HamlibProtocolHelper.isErrorResponse(response)) {\n result = Collections.emptyList();\n } else {\n TypeConverter converter = driverContext.getTypeConverter();\n String linkName = GetFrequency.getLinkName(driverContext);\n String name = String.format(\"String_Node_Str\", linkName);\n String description = String.format(\"String_Node_Str\", linkName);\n String id = driverContext.getPart().getID();\n Parameter param = new Parameter(id + \"String_Node_Str\" + name, name);\n param.setIssuedBy(id);\n param.setDescription(description);\n param.setValue(converter.convertTo(Long.class, HamlibProtocolHelper.toMap(response).get(KEY)));\n param.setUnit(\"String_Node_Str\");\n result = new ArrayList<IEntityInstance>(1);\n result.add(param);\n }\n return result;\n}\n"
|
"protected IResultIterator executeOdiQuery(IEventHandler eventHandler, StopSign stopSign) throws DataException {\n try {\n RDLoad rdLoad = RDUtil.newLoad(engine.getSession().getTempDir(), engine.getContext(), new QueryResultInfo(realBasedQueryID, null, -1));\n DataSetResultSet dataSetResult = rdLoad.loadDataSetData();\n StreamManager manager = new StreamManager(engine.getContext(), new QueryResultInfo(queryDefn.getQueryResultsID(), null, 0));\n if (PLSUtil.isPLSEnabled(queryDefn) && PLSUtil.needUpdateDataSet(queryDefn, manager)) {\n populatePLSDataSetData(eventHandler, stopSign, manager);\n dataSetResult.close();\n rdLoad = RDUtil.newLoad(engine.getSession().getTempDir(), engine.getContext(), new QueryResultInfo(realBasedQueryID, null, -1));\n dataSetResult = rdLoad.loadDataSetData();\n }\n IResultClass meta = dataSetResult.getResultClass();\n IResultIterator resultIterator = new CachedResultSet(query, populateResultClass(meta), dataSetResult, eventHandler, engine.getSession(), stopSign);\n dataSetResult.close();\n return resultIterator;\n } catch (IOException e) {\n throw new DataException(e.getLocalizedMessage());\n }\n dataSetResult.close();\n return resultIterator;\n}\n"
|
"private void appendRoi(float[] x, float[] y, int[] slice, int[] indices, Overlay o, int start, int end) {\n int p = end - start;\n float[] x2 = new float[p];\n float[] y2 = new float[p];\n for (int j = start, ii = 0; j < end; j++, ii++) {\n x2[ii] = x[indices[j]];\n y2[ii] = y[indices[j]];\n }\n PointRoi roi = new PointRoi(x2, y2, p);\n roi.setPosition(slice[indices[start]]);\n o.add(roi);\n}\n"
|
"private void readHeader() {\n byte pageType = buf.get();\n if (pageType != currentType.getId()) {\n buf.get();\n buf.getShort();\n long txId = buf.getLong();\n throw DBLogger.newFatal(\"String_Node_Str\" + currentType.getId() + \"String_Node_Str\" + currentType + \"String_Node_Str\" + txId + \"String_Node_Str\" + pageType + \"String_Node_Str\" + root.getTxId() + \"String_Node_Str\" + currentPage);\n }\n buf.position(PAGE_HEADER_SIZE);\n if (isAutoPaging) {\n pageHeader = buf.getLong();\n }\n}\n"
|
"public void testHTMLandDomEx5() {\n List<VjoSemanticProblem> problems = getVjoSemanticProblem(VjoValidationBaseTester.VJLIB_FOLDER, \"String_Node_Str\", \"String_Node_Str\", this.getClass(), \"String_Node_Str\", false);\n assertProblemEquals(expectProblems, problems);\n}\n"
|
"private void convertSampleData(Axis axis, AxisType axisType) {\n if ((axis.getAssociatedAxes() != null) && (axis.getAssociatedAxes().size() != 0)) {\n BaseSampleData bsd = (BaseSampleData) getChartModel().getSampleData().getBaseSampleData().get(0);\n bsd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType, bsd.getDataSetRepresentation()));\n } else {\n int iStartIndex = getFirstSeriesDefinitionIndexForAxis(axis);\n int iEndIndex = iStartIndex + axis.getSeriesDefinitions().size();\n int iOSDSize = getChartModel().getSampleData().getOrthogonalSampleData().size();\n for (int i = 0; i < iOSDSize; i++) {\n OrthogonalSampleData osd = (OrthogonalSampleData) getChartModel().getSampleData().getOrthogonalSampleData().get(i);\n if (osd.getSeriesDefinitionIndex() >= 0 && osd.getSeriesDefinitionIndex() <= iEndIndex) {\n osd.setDataSetRepresentation(ChartUIUtil.getConvertedSampleDataRepresentation(axisType, osd.getDataSetRepresentation()));\n }\n }\n }\n}\n"
|
"private final ContentProviderHolder getContentProviderImpl(IApplicationThread caller, String name) {\n ContentProviderRecord cpr;\n ProviderInfo cpi = null;\n synchronized (this) {\n ProcessRecord r = null;\n if (caller != null) {\n r = getRecordForAppLocked(caller);\n if (r == null) {\n throw new SecurityException(\"String_Node_Str\" + caller + \"String_Node_Str\" + Binder.getCallingPid() + \"String_Node_Str\" + name);\n }\n }\n cpr = (ContentProviderRecord) mProvidersByName.get(name);\n if (cpr != null) {\n cpi = cpr.info;\n if (checkContentProviderPermissionLocked(cpi, r, -1) != null) {\n return new ContentProviderHolder(cpi, cpi.readPermission != null ? cpi.readPermission : cpi.writePermission);\n }\n if (r != null && cpr.canRunHere(r)) {\n if (cpr.provider != null) {\n cpr = new ContentProviderRecord(cpr);\n }\n return cpr;\n }\n final long origId = Binder.clearCallingIdentity();\n if (r != null) {\n if (DEBUG_PROVIDER)\n Log.v(TAG, \"String_Node_Str\" + r.processName + \"String_Node_Str\" + cpr.info.processName);\n Integer cnt = r.conProviders.get(cpr);\n if (cnt == null) {\n r.conProviders.put(cpr, new Integer(1));\n } else {\n r.conProviders.put(cpr, new Integer(cnt.intValue() + 1));\n }\n cpr.clients.add(r);\n } else {\n cpr.externals++;\n }\n if (cpr.app != null) {\n updateOomAdjLocked(cpr.app);\n }\n Binder.restoreCallingIdentity(origId);\n } else {\n try {\n cpi = ActivityThread.getPackageManager().resolveContentProvider(name, STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);\n } catch (RemoteException ex) {\n }\n if (cpi == null) {\n return null;\n }\n if (checkContentProviderPermissionLocked(cpi, r, -1) != null) {\n return new ContentProviderHolder(cpi, cpi.readPermission != null ? cpi.readPermission : cpi.writePermission);\n }\n cpr = (ContentProviderRecord) mProvidersByClass.get(cpi.name);\n final boolean firstClass = cpr == null;\n if (firstClass) {\n try {\n ApplicationInfo ai = ActivityThread.getPackageManager().getApplicationInfo(cpi.applicationInfo.packageName, STOCK_PM_FLAGS);\n if (ai == null) {\n Log.w(TAG, \"String_Node_Str\" + cpi.name);\n return null;\n }\n cpr = new ContentProviderRecord(cpi, ai);\n } catch (RemoteException ex) {\n }\n }\n if (r != null && cpr.canRunHere(r)) {\n return cpr;\n }\n if (DEBUG_PROVIDER) {\n RuntimeException e = new RuntimeException(\"String_Node_Str\");\n Log.w(TAG, \"String_Node_Str\" + r.info.uid + \"String_Node_Str\" + cpr.appInfo.uid + \"String_Node_Str\" + cpr.info.name, e);\n }\n final int N = mLaunchingProviders.size();\n int i;\n for (i = 0; i < N; i++) {\n if (mLaunchingProviders.get(i) == cpr) {\n break;\n }\n }\n if (i >= N) {\n final long origId = Binder.clearCallingIdentity();\n ProcessRecord proc = startProcessLocked(cpi.processName, cpr.appInfo, false, 0, \"String_Node_Str\", new ComponentName(cpi.applicationInfo.packageName, cpi.name), false);\n if (proc == null) {\n Log.w(TAG, \"String_Node_Str\" + cpi.applicationInfo.packageName + \"String_Node_Str\" + cpi.applicationInfo.uid + \"String_Node_Str\" + name + \"String_Node_Str\");\n return null;\n }\n cpr.launchingApp = proc;\n mLaunchingProviders.add(cpr);\n Binder.restoreCallingIdentity(origId);\n }\n if (firstClass) {\n mProvidersByClass.put(cpi.name, cpr);\n }\n mProvidersByName.put(name, cpr);\n if (r != null) {\n if (DEBUG_PROVIDER)\n Log.v(TAG, \"String_Node_Str\" + r.processName + \"String_Node_Str\" + cpr.info.processName);\n r.conProviders.add(cpr);\n cpr.clients.add(r);\n } else {\n cpr.externals++;\n }\n }\n }\n synchronized (cpr) {\n while (cpr.provider == null) {\n if (cpr.launchingApp == null) {\n Log.w(TAG, \"String_Node_Str\" + cpi.applicationInfo.packageName + \"String_Node_Str\" + cpi.applicationInfo.uid + \"String_Node_Str\" + name + \"String_Node_Str\");\n EventLog.writeEvent(LOG_AM_PROVIDER_LOST_PROCESS, cpi.applicationInfo.packageName, cpi.applicationInfo.uid, name);\n return null;\n }\n try {\n cpr.wait();\n } catch (InterruptedException ex) {\n }\n }\n }\n return cpr;\n}\n"
|
"public static XMPPError parseError(XmlPullParser parser) throws Exception {\n final String errorNamespace = \"String_Node_Str\";\n String errorCode = \"String_Node_Str\";\n String type = null;\n String message = null;\n String condition = null;\n List<PacketExtension> extensions = new ArrayList<PacketExtension>();\n for (int i = 0; i < parser.getAttributeCount(); i++) {\n if (parser.getAttributeName(i).equals(\"String_Node_Str\")) {\n errorCode = parser.getAttributeValue(\"String_Node_Str\", \"String_Node_Str\");\n }\n if (parser.getAttributeName(i).equals(\"String_Node_Str\")) {\n type = parser.getAttributeValue(\"String_Node_Str\", \"String_Node_Str\");\n }\n }\n boolean done = false;\n while (!done) {\n int eventType = parser.next();\n if (eventType == XmlPullParser.START_TAG) {\n if (parser.getName().equals(\"String_Node_Str\")) {\n message = parser.nextText();\n } else {\n String elementName = parser.getName();\n String namespace = parser.getNamespace();\n if (errorNamespace.equals(namespace)) {\n condition = elementName;\n } else {\n extensions.add(parsePacketExtension(elementName, namespace, parser));\n }\n }\n } else if (eventType == XmlPullParser.END_TAG) {\n if (parser.getName().equals(\"String_Node_Str\")) {\n done = true;\n }\n }\n }\n return new XMPPError(Integer.parseInt(errorCode), XMPPError.Type.fromString(type), condition, message, extensions);\n}\n"
|
"public final Param_type_idContext param_type_id() throws RecognitionException {\n Param_type_idContext _localctx = new Param_type_idContext(_ctx, getState());\n enterRule(_localctx, 126, RULE_param_type_id);\n int _la;\n try {\n enterOuterAlt(_localctx, 1);\n {\n setState(582);\n _la = _input.LA(1);\n if (_la == 1 || _la == 2) {\n {\n setState(568);\n ptrs();\n }\n }\n setState(578);\n switch(getInterpreter().adaptivePredict(_input, 61, _ctx)) {\n case 1:\n {\n setState(571);\n match(28);\n setState(572);\n param_type_id();\n setState(573);\n match(12);\n }\n break;\n case 2:\n {\n setState(576);\n _la = _input.LA(1);\n if (((((_la - 25)) & ~0x3f) == 0 && ((1L << (_la - 25)) & ((1L << (25 - 25)) | (1L << (31 - 25)) | (1L << (44 - 25)) | (1L << (ALPHA_NUMERIC - 25)))) != 0)) {\n {\n setState(575);\n parameter_name();\n }\n }\n }\n break;\n }\n setState(581);\n _la = _input.LA(1);\n if (_la == 3 || _la == 28) {\n {\n setState(580);\n type_suffix();\n }\n }\n }\n } catch (RecognitionException re) {\n _localctx.exception = re;\n _errHandler.reportError(this, re);\n _errHandler.recover(this, re);\n } finally {\n exitRule();\n }\n return _localctx;\n}\n"
|
"protected void resetJdbcInfo(DataSourceDesign curDataSourceDesign) {\n if (metaDataProvider != null) {\n metaDataProvider.closeConnection();\n metaDataProvider = null;\n createMetaDataProvider();\n jdbcConnection = connectMetadataProvider(metaDataProvider, curDataSourceDesign);\n tableList = null;\n schemaList = null;\n schemaCombo.removeAll();\n }\n try {\n if (jdbcConnection != null) {\n isSchemaSupported = metaDataProvider.isSchemaSupported();\n }\n } catch (Exception e) {\n ExceptionHandler.showException(this.getShell(), JdbcPlugin.getResourceString(\"String_Node_Str\"), e.getLocalizedMessage(), e);\n }\n}\n"
|
"public CancelResult cancel(String media, Account account, int useraction, String selection) throws IOException, OpacErrorException {\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(\"String_Node_Str\", \"String_Node_Str\"));\n params.add(new BasicNameValuePair(\"String_Node_Str\", account.getName()));\n params.add(new BasicNameValuePair(\"String_Node_Str\", pwEncoded));\n params.add(new BasicNameValuePair(\"String_Node_Str\", media));\n String html = httpPost(https_url + \"String_Node_Str\" + db + \"String_Node_Str\", new UrlEncodedFormEntity(params, getDefaultEncoding()), getDefaultEncoding());\n Document doc = Jsoup.parse(html);\n if (doc.select(\"String_Node_Str\").text().contains(\"String_Node_Str\")) {\n return new CancelResult(MultiStepResult.Status.OK);\n } else if (doc.select(\"String_Node_Str\").text().contains(\"String_Node_Str\")) {\n try {\n account(account);\n return cancel(media, account, useraction, selection);\n } catch (JSONException e) {\n throw new OpacErrorException(\"String_Node_Str\");\n }\n } else {\n throw new OpacErrorException(\"String_Node_Str\");\n }\n}\n"
|
"public void acceptSearchMatch(SearchMatch match) throws CoreException {\n if (match.getElement() instanceof IMethod) {\n result.add((IMethod) match.getElement());\n }\n}\n"
|
"public void run() throws Exception {\n MapReduceService mapReduceService = getService();\n JobSupervisor supervisor = mapReduceService.getJobSupervisor(getName(), getJobId());\n if (supervisor == null) {\n result = new RequestPartitionResult(NO_SUPERVISOR, -1);\n return;\n }\n JobProcessInformationImpl processInformation = supervisor.getJobProcessInformation();\n while (true) {\n JobPartitionState.State newState = JobPartitionState.State.WAITING;\n JobPartitionState[] partitionStates = processInformation.getPartitionStates();\n JobPartitionState oldPartitionState = partitionStates[partitionId];\n if (oldPartitionState == null || !getCallerAddress().equals(oldPartitionState.getOwner())) {\n result = new RequestPartitionResult(CHECK_STATE_FAILED, partitionId);\n return;\n }\n JobPartitionState newPartitionState = new JobPartitionStateImpl(getCallerAddress(), newState);\n if (processInformation.updatePartitionState(partitionId, oldPartitionState, newPartitionState)) {\n result = new RequestPartitionResult(SUCCESSFUL, partitionId);\n return;\n }\n }\n}\n"
|
"public void uncaughtException(Thread t, Throwable e) {\n LOGGER.fatal(null, e);\n}\n"
|
"public Object executeImpl(ExecutionEvent event) {\n ProjectDialog.ProjectData project = null;\n boolean cancelPressed = false;\n ProjectDialog dialog = null;\n List<IProjectPO> projList = checkAllAvailableProjects();\n if (ProjectUIBP.getInstance().shouldPerformAutoProjectLoad()) {\n project = ProjectUIBP.getMostRecentProjectData();\n } else {\n dialog = openProjectOpenDialog(projList);\n if (dialog.getReturnCode() == Window.CANCEL) {\n cancelPressed = true;\n } else {\n project = dialog.getSelection();\n }\n }\n if (!cancelPressed && !projList.isEmpty()) {\n loadProject(project, projList);\n }\n return null;\n}\n"
|
"int interactWithProcess(ExecutionContext context, Process process) throws InterruptedException {\n ProcessExecutor executor = context.getProcessExecutor();\n ProcessExecutor.Result result = executor.execute(process, options.build(), getStdin());\n stdout = result.getStdout();\n stderr = result.getStderr();\n Verbosity verbosity = context.getVerbosity();\n if (!stderr.isEmpty() && shouldPrintStderr(verbosity)) {\n context.postEvent(ConsoleEvent.severe(\"String_Node_Str\", stderr));\n }\n if (!stdout.isEmpty() && shouldPrintStdout(verbosity)) {\n context.postEvent(ConsoleEvent.info(\"String_Node_Str\", stdout));\n }\n return result.getExitCode();\n}\n"
|
"public boolean matches(World world, int x, int y, int z) {\n return BuildCraftAPI.isFarmlandProperty.get(world, x, y, z) && !robot.getRegistry().isTaken(new ResourceIdBlock(x, y, z)) && isAirAbove(world, x, y, z);\n}\n"
|
"public String getCity() {\n return city;\n}\n"
|
"public void run() {\n ChunkImpl chunk = new ChunkImpl(getPosition());\n generator.createChunk(chunk);\n if (nearCache.putIfAbsent(getPosition(), chunk) != null) {\n logger.warn(\"String_Node_Str\", getPosition());\n }\n preparingChunks.remove(getPosition());\n pipeline.requestReview(Region3i.createFromCenterExtents(getPosition(), ChunkConstants.GENERATION_EXTENTS));\n}\n"
|
"public void shouldRunStaticCall() throws ProcessException, IOException, InterruptedException {\n String inFile = \"String_Node_Str\";\n String outFile = \"String_Node_Str\";\n RawToProfileConverter.procedureRaw(bowtieParams, inFile, outFile, true, true, true, \"String_Node_Str\", genomeBowtie2, \"String_Node_Str\", \"String_Node_Str\");\n}\n"
|
"public void listen(EntityDeathEvent event) {\n if (event.getEntity().getKiller() != player.getPlayerEntity())\n return;\n if (region != null) {\n }\n if (cuboid != null)\n if (!cuboid.isInsideCuboid(player.getLocation()))\n return;\n if (type == KillType.ENTITY) {\n dEntity ent = new dEntity(event.getEntity());\n boolean count_it = false;\n for (String target : targets) {\n if (dEntity.valueOf(target) != null)\n if (ent.comparesTo(dEntity.valueOf(target)) == 1)\n count_it = true;\n }\n boolean right_name = false;\n for (String name : names) {\n if (ChatColor.stripColor(ent.getName()).contains(name)) {\n right_name = true;\n }\n }\n if (count_it || targets.contains(\"String_Node_Str\")) {\n if (right_name || names.contains(\"String_Node_Str\")) {\n kills_so_far++;\n dB.log(player.getName() + \"String_Node_Str\" + ent.identify() + \"String_Node_Str\" + kills_so_far + \"String_Node_Str\" + required + \"String_Node_Str\");\n check();\n }\n }\n } else if (type == KillType.NPC) {\n if (!CitizensAPI.getNPCRegistry().isNPC(event.getEntity()))\n return;\n dNPC npc = dNPC.mirrorCitizensNPC(CitizensAPI.getNPCRegistry().getNPC(event.getEntity()));\n boolean count_it = false;\n for (String target : targets) {\n if (dNPC.valueOf(target) != null) {\n if (dNPC.valueOf(target).getId() == npc.getId())\n count_it = true;\n }\n if (npc.getName().equalsIgnoreCase(target.toLowerCase().replace(\"String_Node_Str\", \"String_Node_Str\")))\n count_it = true;\n }\n if (count_it || targets.contains(\"String_Node_Str\")) {\n kills_so_far++;\n dB.log(player.getName() + \"String_Node_Str\" + npc.toString() + \"String_Node_Str\" + kills_so_far + \"String_Node_Str\" + required + \"String_Node_Str\");\n check();\n }\n } else if (type == KillType.PLAYER) {\n if (event.getEntityType() != EntityType.PLAYER)\n return;\n if (Depends.citizens != null && CitizensAPI.getNPCRegistry().isNPC(event.getEntity()))\n return;\n dPlayer player = dPlayer.mirrorBukkitPlayer((Player) event.getEntity());\n boolean count_it = false;\n for (String target : targets) {\n if (dPlayer.valueOf(target) != null)\n if (dPlayer.valueOf(target).getName().equalsIgnoreCase(player.getName()))\n count_it = true;\n }\n if (count_it || targets.contains(\"String_Node_Str\")) {\n kills_so_far++;\n dB.log(player.getName() + \"String_Node_Str\" + player.getName() + \"String_Node_Str\" + kills_so_far + \"String_Node_Str\" + required + \"String_Node_Str\");\n check();\n }\n } else if (type == KillType.GROUP) {\n if (event.getEntityType() == EntityType.PLAYER)\n for (String group : Depends.permissions.getPlayerGroups((Player) event.getEntity())) if (targets.contains(group.toUpperCase())) {\n kills_so_far++;\n dB.log(player.getName() + \"String_Node_Str\" + ((Player) event.getEntity()).getName().toUpperCase() + \"String_Node_Str\" + group + \"String_Node_Str\");\n check();\n break;\n }\n }\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source));\n Player controller = game.getPlayer(source.getControllerId());\n if (controller != null) {\n for (UUID targetId : getTargetPointer().getTargets(game, source)) {\n Permanent permanent = game.getPermanent(targetId);\n if (permanent != null) {\n Zone currentZone = game.getState().getZone(permanent.getId());\n if (!currentZone.equals(Zone.EXILED) && (onlyFromZone == null || onlyFromZone.equals(Zone.BATTLEFIELD))) {\n controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, currentZone);\n }\n } else {\n Card card = game.getCard(targetId);\n if (card != null) {\n Zone currentZone = game.getState().getZone(card.getId());\n if (!currentZone.equals(Zone.EXILED) && (onlyFromZone == null || onlyFromZone.equals(currentZone))) {\n controller.moveCardToExileWithInfo(card, exileId, exileZone, source.getSourceId(), game, currentZone);\n }\n }\n }\n }\n }\n return false;\n}\n"
|
"private BoundingVolume updateWorldTransform(Identity identity) {\n CellTransform oldWorld;\n boolean transformChanged = false;\n if (worldTransform == null)\n oldWorld = null;\n else\n oldWorld = worldTransform.clone(null);\n if (parent != null) {\n CellTransform parentWorld = parent.worldTransform.clone(null);\n worldTransform = parentWorld.mul(localTransform);\n } else {\n worldTransform = localTransform.clone(null);\n }\n if (!worldTransform.equals(oldWorld)) {\n if (worldTransformChangeListener != null)\n worldTransformChangeListener.transformChanged(this);\n transformChanged = true;\n }\n computeWorldBounds();\n if (children != null) {\n for (SpatialCellImpl s : children) {\n worldBounds.mergeLocal(s.updateWorldTransform(identity));\n }\n }\n if (transformChanged) {\n notifyViewCaches(worldTransform);\n notifyTransformChangeListeners(identity);\n }\n return worldBounds;\n}\n"
|
"public static void main(String[] args) {\n List<List<Double>> tuple1 = simulate(new EconCost());\n List<List<Double>> tuple2 = simulate(new ShortestPathCost());\n for (int i = 0; i < tuple1.get(0).size(); i++) {\n costOutput.write(tuple1.get(0).get(i) + \"String_Node_Str\" + tuple2.get(0).get(i));\n costOutput.newLine();\n }\n for (int i = 0; i < tuple1.get(1).size(); i++) {\n System.err.println(tuple1.get(1).get(i) + \"String_Node_Str\" + tuple2.get(1).get(i));\n }\n}\n"
|
"private void createManifestHead() throws IOException {\n String manifestHead = String.format(\"String_Node_Str\", MANIFESTHEAD, NAMEBLOCK, app.getName());\n fileAccess.access(MANIFEST_PATH).appendln(manifestHead).close();\n}\n"
|
"public void deleteFromTableTest4() throws InterruptedException {\n log.info(\"String_Node_Str\");\n SiddhiManager siddhiManager = new SiddhiManager();\n String streams = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n String query = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(streams + query);\n executionPlanRuntime.addCallback(\"String_Node_Str\", new QueryCallback() {\n public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {\n EventPrinter.print(timeStamp, inEvents, removeEvents);\n if (inEvents != null) {\n for (Event event : inEvents) {\n inEventsList.add(event.getData());\n inEventCount.incrementAndGet();\n }\n eventArrived = true;\n }\n });\n InputHandler stockStream = executionPlanRuntime.getInputHandler(\"String_Node_Str\");\n InputHandler checkStockStream = executionPlanRuntime.getInputHandler(\"String_Node_Str\");\n InputHandler deleteStockStream = executionPlanRuntime.getInputHandler(\"String_Node_Str\");\n executionPlanRuntime.start();\n stockStream.send(new Object[] { \"String_Node_Str\", 55.6f, 100l });\n stockStream.send(new Object[] { \"String_Node_Str\", 55.6f, 100l });\n checkStockStream.send(new Object[] { \"String_Node_Str\" });\n checkStockStream.send(new Object[] { \"String_Node_Str\" });\n deleteStockStream.send(new Object[] { \"String_Node_Str\", 57.6f, 100l });\n checkStockStream.send(new Object[] { \"String_Node_Str\" });\n checkStockStream.send(new Object[] { \"String_Node_Str\" });\n List<Object[]> expected = Arrays.asList(new Object[] { \"String_Node_Str\" }, new Object[] { \"String_Node_Str\" }, new Object[] { \"String_Node_Str\" });\n SiddhiTestHelper.waitForEvents(100, 3, inEventCount, 60000);\n Assert.assertEquals(\"String_Node_Str\", true, SiddhiTestHelper.isEventsMatch(inEventsList, expected));\n Assert.assertEquals(\"String_Node_Str\", 3, inEventCount.get());\n Assert.assertEquals(\"String_Node_Str\", 0, removeEventCount);\n Assert.assertEquals(\"String_Node_Str\", true, eventArrived);\n } finally {\n executionPlanRuntime.shutdown();\n }\n}\n"
|
"public static String getTagNewestDate(ReaderTag tag) {\n return getDateColumn(tag, \"String_Node_Str\");\n}\n"
|
"private void bindWatched(Context context, ViewHolder vh, Cursor cursor) {\n final int airdateCount = cursor.getInt(cursor.getColumnIndexOrThrow(CathodeContract.Seasons.AIRDATE_COUNT));\n final int unairedCount = cursor.getInt(cursor.getColumnIndexOrThrow(CathodeContract.Seasons.UNAIRED_COUNT));\n final int watchedCount = cursor.getInt(cursor.getColumnIndexOrThrow(CathodeContract.Seasons.WATCHED_COUNT));\n int toWatch = airdateCount - unairedCount - watchedCount;\n toWatch = Math.max(toWatch, 0);\n vh.progress.setMax(airdateCount);\n vh.progress.setProgress(watchedCount);\n TypedArray a = context.obtainStyledAttributes(new int[] { android.R.attr.textColorPrimary, android.R.attr.textColorSecondary });\n ColorStateList primaryColor = a.getColorStateList(0);\n ColorStateList secondaryColor = a.getColorStateList(1);\n a.recycle();\n final String unwatched = resources.getQuantityString(R.plurals.x_unwatched, toWatch, toWatch);\n String unaired;\n if (unairedCount > 0) {\n unaired = resources.getString(R.string.x_unaired, unairedCount);\n } else {\n unaired = \"String_Node_Str\";\n }\n SpannableStringBuilder ssb = new SpannableStringBuilder().append(unwatched).append(\"String_Node_Str\").append(unaired);\n ssb.setSpan(new TextAppearanceSpan(null, 0, 0, primaryColor, null), 0, unwatched.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n if (unairedCount > 0) {\n ssb.setSpan(new TextAppearanceSpan(null, 0, 0, secondaryColor, null), unwatched.length(), unwatched.length() + unaired.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n vh.summary.setText(ssb.toString());\n}\n"
|
"private ParseResult parseModule(IResource parseResource, boolean updateStorage) {\n String moduleFilename = parseResource.getLocation().toOSString();\n int specStatus = 0;\n Errors parseErrors = null;\n Errors semanticErrors = null;\n FilenameToStream resolver = new RCPNameToFileIStream(null);\n ToolIO.reset();\n ToolIO.setDefaultResolver(resolver);\n ToolIO.setMode(ToolIO.TOOL);\n SpecObj moduleSpec = new SpecObj(ResourceHelper.getModuleName(moduleFilename), resolver);\n PrintStream outputStr = ToolIO.out;\n try {\n SANY.frontEndInitialize(moduleSpec, outputStr);\n SANY.frontEndParse(moduleSpec, outputStr);\n SANY.frontEndSemanticAnalysis(moduleSpec, outputStr, true);\n } catch (InitException e) {\n specStatus = IParseConstants.UNKNOWN_ERROR;\n return new ParseResult(specStatus, null, parseResource, parseErrors, semanticErrors);\n } catch (ParseException e) {\n specStatus = IParseConstants.SYNTAX_ERROR;\n parseErrors = moduleSpec.getParseErrors();\n } catch (SemanticException e) {\n specStatus = IParseConstants.SEMANTIC_ERROR;\n }\n if (specStatus > IParseConstants.SYNTAX_ERROR) {\n semanticErrors = moduleSpec.semanticErrors;\n if (semanticErrors != null) {\n if (semanticErrors.getNumMessages() > 0) {\n if (semanticErrors.isSuccess()) {\n specStatus = IParseConstants.SEMANTIC_WARNING;\n } else {\n specStatus = IParseConstants.SEMANTIC_ERROR;\n }\n }\n }\n }\n Vector userModules = new Vector();\n boolean rootModuleFound = false;\n Enumeration enumerate = moduleSpec.parseUnitContext.keys();\n while (enumerate.hasMoreElements()) {\n String moduleName = (String) enumerate.nextElement();\n ParseUnit parseUnit = (ParseUnit) moduleSpec.parseUnitContext.get(moduleName);\n String absoluteFileName = null;\n if (parseUnit.getNis() != null && parseUnit.getNis().sourceFile() != null) {\n absoluteFileName = parseUnit.getNis().sourceFile().getAbsolutePath();\n }\n if (absoluteFileName == null) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n Module module = new Module(absoluteFileName);\n if (!module.isStandardModule() && updateStorage) {\n IResource moduleResource = ResourceHelper.getResourceByModuleName(moduleName);\n if (moduleResource != null && moduleResource.exists()) {\n resourcesToTimeStamp.add(moduleResource);\n }\n }\n if (specStatus > IParseConstants.SEMANTIC_ERROR) {\n ExternalModuleTable.ExternalModuleTableEntry emt = (ExternalModuleTable.ExternalModuleTableEntry) moduleSpec.getExternalModuleTable().moduleHashTable.get(UniqueString.uniqueStringOf(module.getModuleName()));\n if (emt != null) {\n module.setNode(emt.getModuleNode());\n }\n }\n if (module.getModuleName().equals(ResourceHelper.getModuleName(moduleFilename))) {\n rootModuleFound = true;\n module.setRoot(true);\n }\n if (module.isStandardModule()) {\n } else {\n userModules.addElement(module);\n if (module.getAbsolutePath().indexOf(parseResource.getProject().getLocation().toOSString()) != 0) {\n ResourceHelper.getLinkedFile(parseResource.getProject(), module.getAbsolutePath(), true);\n }\n }\n }\n if (!rootModuleFound) {\n specStatus = IParseConstants.COULD_NOT_FIND_MODULE;\n }\n if (updateStorage) {\n Activator.getModuleDependencyStorage().put(parseResource.getName(), AdapterFactory.adaptModules(parseResource.getName(), userModules));\n }\n return new ParseResult(specStatus, moduleSpec, parseResource, parseErrors, semanticErrors);\n}\n"
|
"public static PieceType getKnightPieceType() {\n Set<TwoHopMovement> twoHopMovements = Sets.newHashSet(TwoHopMovement.with(2, 1));\n return new PieceType(\"String_Node_Str\", null, twoHopMovements);\n}\n"
|
"public static Expression lookupStruct(Value var, Expression subscript, Expression decrRead) {\n return Square.fnCall(LOOKUP_STRUCT, var, subscript, decrRead);\n}\n"
|
"public Long getValue() {\n return i++;\n}\n"
|
"protected void onInnerViewSetup() {\n mCardTitle.setText(mData.name);\n mCardSubTitle.setText(mData.artistName);\n String artist = mData.albumArtistName;\n if (TextUtils.isEmpty(artist)) {\n artist = mData.artistName;\n }\n ArtworkManager.loadImage(new ArtInfo(artist, mData.albumName, mData.artworkUri), mArtwork);\n}\n"
|
"public void setMessage(String message, int messageType) {\n String messageToDisplay = message;\n if (messageToDisplay == null) {\n sform.setMessage(null, IMessageProvider.NONE);\n } else {\n sform.setMessage(message, messageType);\n }\n}\n"
|
"private Cartridge getCartridge(String cartridgeType) throws ApplicationDefinitionException {\n try {\n return CloudControllerServiceClient.getInstance().getCartridge(cartridgeUuid);\n } catch (Exception e) {\n log.error(\"String_Node_Str\" + cartridgeType, e);\n throw new ApplicationDefinitionException(e);\n }\n}\n"
|
"protected void onPreExecute() {\n mProgressDialog = new MaterialDialog.Builder(getContext()).content(R.string.loading).progress(true, 0).show();\n}\n"
|
"public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {\n ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();\n String parameter = param.toString();\n br.getPage(parameter);\n File file = this.getLocalCaptchaFile();\n Form form = br.getForm(0);\n Browser.download(file, br.cloneBrowser().openGetConnection(\"String_Node_Str\"));\n Point p = UserIO.getInstance().requestClickPositionDialog(file, JDLocale.L(\"String_Node_Str\", \"String_Node_Str\"), JDLocale.L(\"String_Node_Str\", \"String_Node_Str\"));\n if (p == null)\n throw new DecrypterException(DecrypterException.CAPTCHA);\n form.remove(\"String_Node_Str\");\n form.remove(\"String_Node_Str\");\n form.put(\"String_Node_Str\", p.x + \"String_Node_Str\");\n form.put(\"String_Node_Str\", p.y + \"String_Node_Str\");\n br.submitForm(form);\n String[] links = br.getRegex(\"String_Node_Str\").getColumn(0);\n for (String link : links) {\n decryptedLinks.add(createDownloadlink(link.trim()));\n }\n return decryptedLinks;\n}\n"
|
"public SQLEditor openInSqlEditor(TdDataProvider tdDataProvider, String query, String editorName) {\n if (editorName == null) {\n editorName = String.valueOf(SQLExplorerPlugin.getDefault().getEditorSerialNo());\n }\n SQLExplorerPlugin sqlPlugin = SQLExplorerPlugin.getDefault();\n AliasManager aliasManager = sqlPlugin.getAliasManager();\n Alias alias = aliasManager.getAlias(tdDataProvider.getName());\n if (alias != null) {\n try {\n SQLEditorInput input = new SQLEditorInput(\"String_Node_Str\" + editorName + \"String_Node_Str\");\n input.setUser(alias.getDefaultUser());\n try {\n IWorkbenchPage page = SQLExplorerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();\n editorPart = (SQLEditor) page.openEditor((IEditorInput) input, SQLEditor.class.getName());\n editorPart.setText(query);\n break;\n } catch (PartInitException e) {\n ExceptionHandler.process(e);\n }\n }\n }\n return editorPart;\n}\n"
|
"private void loadEditor(final FormPage page) {\n final LoadAndRefreshJob loadAndRefresh = new LoadAndRefreshJob(provider.getName());\n Jobs.startJob(loadAndRefresh, false, new JobChangeAdapter() {\n public void done(IJobChangeEvent event) {\n Displays.ensureInDisplayThread(new Runnable() {\n public void run() {\n editor.addPages();\n editor.removePage(0);\n }\n });\n }\n });\n}\n"
|
"public void onDisplayCompletions(CompletionInfo[] completions) {\n if (BuildConfig.DEBUG) {\n Logger.d(TAG, \"String_Node_Str\");\n for (int i = 0; i < (completions != null ? completions.length : 0); i++) {\n Logger.d(TAG, \"String_Node_Str\" + i + \"String_Node_Str\" + completions[i]);\n }\n }\n if (mCompletionOn || (isFullscreenMode() && (completions != null))) {\n mCompletions = copyCompletionsFromAndroid(completions);\n mCompletionOn = true;\n if (completions == null) {\n clearSuggestions();\n return;\n }\n List<CharSequence> stringList = new ArrayList<>();\n for (CompletionInfo ci : completions) {\n if (ci != null)\n stringList.add(ci.getText());\n }\n setSuggestions(stringList, true, true, true);\n mWord.setPreferredWord(null);\n setCandidatesViewShown(true);\n }\n}\n"
|
"private void updateListViewFooter(View footer, double income, double expenses) {\n if (footer == null) {\n return;\n }\n TextView txtIncome = (TextView) footer.findViewById(R.id.textViewIncome);\n TextView txtExpenses = (TextView) footer.findViewById(R.id.textViewExpenses);\n TextView txtDifference = (TextView) footer.findViewById(R.id.textViewDifference);\n txtIncome.setText(currencyUtils.getCurrencyFormatted(currencyUtils.getBaseCurrencyId(), income));\n txtIncome.setTypeface(null, Typeface.BOLD_ITALIC);\n txtExpenses.setText(currencyUtils.getCurrencyFormatted(currencyUtils.getBaseCurrencyId(), Math.abs(expenses)));\n txtExpenses.setTypeface(null, Typeface.BOLD_ITALIC);\n txtDifference.setText(currencyUtils.getCurrencyFormatted(currencyUtils.getBaseCurrencyId(), income - Math.abs(expenses)));\n txtDifference.setTypeface(null, Typeface.BOLD_ITALIC);\n Core core = new Core(getActivity());\n if (income - Math.abs(expenses) < 0) {\n txtDifference.setTextColor(getResources().getColor(core.resolveIdAttribute(R.attr.holo_red_color_theme)));\n } else {\n txtDifference.setTextColor(getResources().getColor(core.resolveIdAttribute(R.attr.holo_green_color_theme)));\n }\n}\n"
|
"protected void onActivityResult(int requestCode, int resuleCode, Intent intent) {\n super.onActivityResult(requestCode, resuleCode, intent);\n if (resuleCode == Activity.RESULT_OK) {\n if (requestCode == INTENT_REQUEST_GET_IMAGES || requestCode == INTENT_REQUEST_GET_N_IMAGES) {\n Parcelable[] parcelableUris = intent.getParcelableArrayExtra(ImagePickerActivity.EXTRA_IMAGE_URIS);\n if (parcelableUris == null) {\n return;\n }\n Uri[] uris = new Uri[parcelableUris.length];\n System.arraycopy(parcelableUris, 0, uris, 0, parcelableUris.length);\n if (uris != null) {\n for (int i = 0; i < orientations.length; i++) {\n mMediaImages.add(new Image(uris[i], orientations[i]));\n }\n showMedia();\n }\n }\n }\n}\n"
|
"public static ResourceLocation getFluidSheet(Fluid liquid) {\n if (liquid.canBePlacedInWorld())\n return BLOCK_TEXTURE;\n else\n return ITEM_TEXTURE;\n}\n"
|
"public XmlType getElementXmlType() {\n try {\n return XmlTypeFactory.getXmlType(getParameters().iterator().next().getType());\n } catch (XmlTypeException e) {\n throw new ValidationException(getPosition(), e.getMessage());\n }\n}\n"
|
"public boolean play(CellKey this_cell_key, Player this_player) {\n assert (cell_space != null);\n assert (started);\n Cell this_cell = myCellSpace.get_cell_from_key(this_cell_key);\n if (this_cell != null)\n return play(this_cell, this_player);\n else\n return false;\n}\n"
|
"private boolean isFeedbackSessionViewableTo(FeedbackSessionAttributes session, String userEmail) throws EntityDoesNotExistException {\n if (fsDb.getFeedbackSession(session.feedbackSessionName, session.courseId) == null) {\n throw new EntityDoesNotExistException(\"String_Node_Str\");\n }\n if (session.feedbackSessionType == FeedbackSessionType.PRIVATE) {\n return session.creatorEmail.equals(userEmail);\n }\n InstructorAttributes instructor = instructorsLogic.getInstructorForEmail(session.courseId, userEmail);\n if (instructor != null) {\n if (instructorsLogic.isInstructorOfCourse(instructor.googleId, session.courseId)) {\n return true;\n }\n }\n if (session.isPublished() == false) {\n List<FeedbackQuestionAttributes> questions = fqLogic.getFeedbackQuestionsForUser(session.feedbackSessionName, session.courseId, userEmail);\n if (questions.isEmpty() == false) {\n return true;\n }\n } else {\n try {\n getFeedbackSessionResultsForUser(session.feedbackSessionName, session.courseId, userEmail);\n } catch (UnauthorizedAccessException e) {\n return false;\n }\n return true;\n }\n return false;\n}\n"
|
"public boolean onOptionsItemSelected(MenuItem item) {\n switch(item.getItemId()) {\n case R.id.actionToggleValues:\n {\n for (IDataSet set : mChart.getData().getDataSets()) set.setDrawValues(!set.isDrawValuesEnabled());\n mChart.invalidate();\n break;\n }\n case R.id.actionToggleHighlight:\n {\n if (mChart.getData() != null) {\n mChart.getData().setHighlightEnabled(!mChart.getData().isHighlightEnabled());\n mChart.invalidate();\n }\n break;\n }\n case R.id.actionTogglePinch:\n {\n if (mChart.isPinchZoomEnabled())\n mChart.setPinchZoom(false);\n else\n mChart.setPinchZoom(true);\n mChart.invalidate();\n break;\n }\n case R.id.actionToggleAutoScaleMinMax:\n {\n mChart.setAutoScaleMinMaxEnabled(!mChart.isAutoScaleMinMaxEnabled());\n mChart.notifyDataSetChanged();\n break;\n }\n case R.id.actionToggleHighlightArrow:\n {\n if (mChart.isDrawHighlightArrowEnabled())\n mChart.setDrawHighlightArrow(false);\n else\n mChart.setDrawHighlightArrow(true);\n mChart.invalidate();\n break;\n }\n case R.id.actionToggleStartzero:\n {\n mChart.getAxisLeft().setStartAtZero(!mChart.getAxisLeft().isStartAtZeroEnabled());\n mChart.getAxisRight().setStartAtZero(!mChart.getAxisRight().isStartAtZeroEnabled());\n mChart.invalidate();\n break;\n }\n case R.id.animateX:\n {\n mChart.animateX(3000);\n break;\n }\n case R.id.animateY:\n {\n mChart.animateY(3000);\n break;\n }\n case R.id.animateXY:\n {\n mChart.animateXY(3000, 3000);\n break;\n }\n case R.id.actionToggleFilter:\n {\n Approximator a = new Approximator(ApproximatorType.DOUGLAS_PEUCKER, 25);\n if (!mChart.isFilteringEnabled()) {\n mChart.enableFiltering(a);\n } else {\n mChart.disableFiltering();\n }\n mChart.invalidate();\n break;\n }\n case R.id.actionSave:\n {\n if (mChart.saveToGallery(\"String_Node_Str\" + System.currentTimeMillis(), 50)) {\n Toast.makeText(getApplicationContext(), \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n } else\n Toast.makeText(getApplicationContext(), \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n break;\n }\n }\n return true;\n}\n"
|
"private static String[] findInJar(String jarPath, Class<?> baseClass) {\n try {\n jarPath = decodePath(jarPath);\n ZipEntry[] entrys = Files.findEntryInZip(new ZipFile(jarPath), packageA.getName().replace('.', '/') + \"String_Node_Str\");\n if (null != entrys && entrys.length > 0) {\n String[] classNames = new String[entrys.length];\n for (int i = 0; i < entrys.length; i++) {\n String ph = entrys[i].getName();\n classNames[i] = ph.substring(0, ph.lastIndexOf('.')).replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n }\n return classNames;\n }\n } catch (IOException e) {\n }\n return null;\n}\n"
|
"private String computeTimeStampString(long now) {\n long last;\n synchronized (this) {\n last = lastTimestamp;\n if (now == lastTimestamp) {\n return timestamppStr;\n }\n }\n StringBuilder buf = new StringBuilder();\n Calendar cal = new GregorianCalendar();\n cal.setTimeInMillis(now);\n buf.append(Integer.toString(cal.get(Calendar.YEAR)));\n buf.append(\"String_Node_Str\");\n pad(cal.get(Calendar.MONTH) + 1, TWO_DIGITS, buf);\n buf.append(\"String_Node_Str\");\n pad(cal.get(Calendar.DAY_OF_MONTH), TWO_DIGITS, buf);\n buf.append(\"String_Node_Str\");\n pad(cal.get(Calendar.HOUR_OF_DAY), TWO_DIGITS, buf);\n buf.append(\"String_Node_Str\");\n pad(cal.get(Calendar.MINUTE), TWO_DIGITS, buf);\n buf.append(\"String_Node_Str\");\n pad(cal.get(Calendar.SECOND), TWO_DIGITS, buf);\n int millis = cal.get(Calendar.MILLISECOND);\n if (millis != 0) {\n buf.append(\"String_Node_Str\");\n pad(millis, THREE_DIGITS, buf);\n }\n int tzmin = (cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)) / MILLIS_PER_MINUTE;\n if (tzmin == 0) {\n buf.append(\"String_Node_Str\");\n } else {\n if (tzmin < 0) {\n tzmin = -tzmin;\n buf.append(\"String_Node_Str\");\n } else {\n buf.append(\"String_Node_Str\");\n }\n int tzhour = tzmin / MINUTES_PER_HOUR;\n tzmin -= tzhour * MINUTES_PER_HOUR;\n pad(tzhour, TWO_DIGITS, buf);\n buf.append(\"String_Node_Str\");\n pad(tzmin, TWO_DIGITS, buf);\n }\n synchronized (this) {\n if (last == lastTimestamp) {\n lastTimestamp = now;\n timestamppStr = buf.toString();\n }\n }\n return buf.toString();\n}\n"
|
"public void attachMetaFiles(Message message, Set<MetaFile> metaFiles) {\n Preconditions.checkNotNull(message.getId());\n if (metaFiles == null || metaFiles.isEmpty()) {\n return;\n }\n log.debug(\"String_Node_Str\", Message.class.getName(), message.getId());\n for (MetaFile metaFile : metaFiles) {\n Beans.get(MetaFiles.class).attach(metaFile, metaFile.getFileName(), message);\n }\n}\n"
|
"private void stopTableCleanup() {\n if (tgc != null)\n tgc.stopTableCleanup();\n}\n"
|
"private void dropKeysIfExist(Connection conn) {\n HashMap<String, List<String>> uniqueKeys = new HashMap<String, List<String>>();\n List<String> keys = new ArrayList<String>();\n keys.add(\"String_Node_Str\");\n uniqueKeys.put(\"String_Node_Str\", keys);\n uniqueKeys.put(\"String_Node_Str\", keys);\n s_logger.debug(\"String_Node_Str\");\n for (String tableName : uniqueKeys.keySet()) {\n DbUpgradeUtils.dropKeysIfExist(conn, tableName, uniqueKeys.get(tableName), false);\n }\n}\n"
|
"public static Object exec(String s) {\n ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"String_Node_Str\");\n try {\n return engine.eval(s);\n } catch (ScriptException e) {\n e.printStackTrace();\n throw new RuntimeException(\"String_Node_Str\" + s + \"String_Node_Str\" + e.getMessage() + postfix);\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.